diff --git a/include/class_admin.php b/include/class_admin.php index 6329c8187..73b29e8c8 100644 --- a/include/class_admin.php +++ b/include/class_admin.php @@ -66,7 +66,7 @@ class Admin extends fiche{ { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_admin=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -110,9 +110,11 @@ class Admin extends fiche{ " ".$admin->strAttribut(ATTR_DEF_PAYS). ""; $r.=""; - $r.=sprintf('C - ', + $r.=sprintf('Contact - ', $script,$admin->strAttribut(ATTR_DEF_QUICKCODE),$url); - $r.=sprintf('A - ', + $r.=sprintf('Action - ', + $script,$admin->strAttribut(ATTR_DEF_QUICKCODE) ,$url); + $r.=sprintf('Financier - ', $script,$admin->strAttribut(ATTR_DEF_QUICKCODE) ,$url); $r.=''; diff --git a/include/class_contact.php b/include/class_contact.php index b982a4e1f..71e53bde6 100644 --- a/include/class_contact.php +++ b/include/class_contact.php @@ -57,7 +57,7 @@ class contact extends fiche attr_value using (jft_id) where av_text='".$this->company."' and ad_id=".ATTR_DEF_COMPANY.") "; } $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_contact=$this->CountByDef($this->fiche_def_ref,$p_search,$extra_sql); @@ -82,13 +82,14 @@ attr_value using (jft_id) where av_text='".$this->company."' and ad_id=".ATTR_DE $r=$bar; $r.=' +'; - $base=$_SERVER['SCRIPT_NAME']; + $base=$_SERVER['PHP_SELF']; // Compute the url $url=""; $and="?"; @@ -122,7 +123,9 @@ attr_value using (jft_id) where av_text='".$this->company."' and ad_id=".ATTR_DE ); } $r.=""; - $r.='"; + $r.='"; + $r.=""; $r.=""; $r.="". "". diff --git a/include/class_customer.php b/include/class_customer.php index 6134c0e4f..28a260a95 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -196,7 +196,7 @@ where { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_client=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -225,7 +225,7 @@ where - +'; if ( sizeof ($step_client ) == 0 ) return $r; @@ -258,6 +258,8 @@ where $r.=''; + $r.=sprintf('', + $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$url); $r.=''; diff --git a/include/class_supplier.php b/include/class_supplier.php index 93f4a421f..e1b94a036 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -84,7 +84,7 @@ class Supplier extends fiche{ { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_supplier=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -113,7 +113,7 @@ class Supplier extends fiche{ - +'; if ( sizeof ($step_supplier ) == 0 ) return $r; @@ -148,6 +148,9 @@ class Supplier extends fiche{ $r.=''; + $r.=sprintf('', + $script,$supplier->strAttribut(ATTR_DEF_QUICKCODE) ,$url); + $r.=''; diff --git a/include/user_common.php b/include/user_common.php index bf302d75f..40c6ddb1b 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -897,7 +897,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $r=''; + $r=''; $r.="Précédent"; $r.="  "; } @@ -916,7 +916,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) if ( $e != $p_page ) { $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $go=sprintf($_SERVER['SCRIPT_NAME']."?".$url."&offset=$offset&step=$step&page=$e&size=$step"); + $go=sprintf($_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step"); $r.=sprintf('%d ',$go,$e); } else { $r.=" $e "; @@ -930,7 +930,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $r.=' '; + $r.=' '; $r.="Suivant"; $r.=""; } diff --git a/include/user_form_ach.php b/include/user_form_ach.php index 51abd2100..2e09d6c30 100644 --- a/include/user_form_ach.php +++ b/include/user_form_ach.php @@ -62,8 +62,8 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri $r.=JS_SHOW_TVA; $r.=JS_TVA; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -74,7 +74,7 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri $href="commercial.php?p_action=depense&p_jrn=$p_jrn"; break; default: - echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri'); + echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri '.$href); exit (-1); } @@ -574,8 +574,8 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi $r.=""; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php diff --git a/include/user_form_fin.php b/include/user_form_fin.php index a45321bac..7ca7a33da 100644 --- a/include/user_form_fin.php +++ b/include/user_form_fin.php @@ -154,8 +154,8 @@ function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=tru $r.=JS_CONCERNED_OP; } // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php module "Comptable" diff --git a/include/user_form_ven.php b/include/user_form_ven.php index 04524fec6..9c0f66f3e 100644 --- a/include/user_form_ven.php +++ b/include/user_form_ven.php @@ -63,8 +63,8 @@ function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_ $r.=JS_SHOW_TVA; $r.=JS_TVA; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -528,8 +528,8 @@ function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form' $r.=""; if ( $p_doc == 'form' ) { // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -558,9 +558,9 @@ function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form' // if we were in the management module, appl. propose to generate an invoice - // if ( $_SERVER['SCRIPT_NAME'] == '/commercial.php') - echo_debug('user_form_ven',__LINE__," _SERVER['SCRIPT_NAME'] ".$_SERVER['SCRIPT_NAME']); - if ( $_SERVER['SCRIPT_NAME'] == '/commercial.php') + // if ( $_SERVER['PHP_SELF'] == '/commercial.php') + echo_debug('user_form_ven',__LINE__," _SERVER['PHP_SELF'] ".$_SERVER['PHP_SELF']); + if ( $_SERVER['PHP_SELF'] == '/commercial.php') { // if a template exists propose to choose an invoice template if ( CountSql($p_cn, diff --git a/include/user_menu.php b/include/user_menu.php index dc19e831c..3473621d1 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -134,7 +134,7 @@ function ShowMenuCompta($p_dossier,$p_high="") include_once("postgres.php"); // find our current menu - $default=basename($_SERVER['SCRIPT_NAME']); + $default=basename($_SERVER['PHP_SELF']); switch ($default) { case "user_jrn.php": $default.="?show"; @@ -205,7 +205,7 @@ function GetFirstJrnIdForJrnType($p_dossier,$p_type) * \param $p_jrn journal * \param $p_extra html code to add at the return (before the \) * \return string with table in HTML - * \note we use the SCRIPT_NAME variable to build the href value but we need to add + * \note we use the PHP_SELF variable to build the href value but we need to add * a parameter when the REQUEST_url is commercial.php * * @@ -258,9 +258,9 @@ function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn,$p_extra="") // Minimum Lecture echo_debug('user_menu.php',__LINE__,"p_jrn = $p_jrn "); if ( $l_line['jrn_def_id'] != $p_jrn ) { - $href=basename($_SERVER["SCRIPT_NAME"]); + $href=basename($_SERVER["PHP_SELF"]); $add=""; - // if the SCRIPT_NAME == commercial.php, we need to add the parameter + // if the PHP_SELF == commercial.php, we need to add the parameter // p_action=facture if ( $href=="commercial.php" ) {
Quick Code Nom Téléphone email Fax Société
id."\">".$contact->strAttribut(ATTR_DEF_NAME)."id."\">".$contact->strAttribut(ATTR_DEF_QUICKCODE). + "".$contact->strAttribut(ATTR_DEF_NAME)."".$contact->strAttribut(ATTR_DEF_TEL)."".$contact->strAttribut(ATTR_DEF_EMAIL)." ".$contact->strAttribut(ATTR_DEF_FAX)."Nom Adresse SoldeAction Action
FactureFinancierNom Adresse SoldeAction Action
FactureFinancier