From 2059ddb70e7963dfe33e473d569551fd84ab142c Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 11 May 2010 23:30:03 +0000 Subject: [PATCH] Remove $_REQUEST[PHPSESSID] it is now replaced by the cookie a flag in .htaccess must be set php_flag session.use_only_cookies on php_flag session.use_cookies 1 --- html/admin/setup.php | 31 +++++++-------- html/ajax.php | 1 - html/ajax_card.php | 11 +++--- html/ajax_extension.php | 8 ++-- html/ajax_misc.php | 6 +-- html/ajax_poste.php | 4 +- html/annulation.php | 2 +- html/compute.php | 1 - html/extension.php | 2 +- html/fid.php | 1 - html/get_pj.php | 1 - html/get_predef.php | 1 - html/import.php | 5 +-- html/js/acc_ledger.js | 42 ++++++++------------- html/js/acc_report.js | 10 ++--- html/js/accounting_item.js | 11 ++---- html/js/ajax_fiche.js | 13 +++---- html/js/anc_script.js | 10 ++--- html/js/bq_import.js | 15 +++----- html/js/card.js | 22 ++--------- html/js/confirm.js | 4 +- html/js/extension.js | 8 ---- html/js/gestion.js | 5 +-- html/js/scripts.js | 19 +++++----- html/js/todo_list.js | 8 ++-- html/login.php | 4 +- html/parametre.php | 2 +- html/recherche.php | 3 -- html/search_ca.php | 2 +- html/test.php | 2 - include/action.common.inc.php | 1 - include/adm.inc.php | 1 - include/adm_card.inc.php | 1 - include/balance.inc.php | 1 - include/class_acc_ledger.php | 23 +++++------ include/class_acc_ledger_fin.php | 2 - include/class_acc_ledger_purchase.php | 1 - include/class_acc_ledger_sold.php | 1 - include/class_acc_parm_code.php | 1 - include/class_acc_report.php | 3 +- include/class_action.php | 8 ++-- include/class_anc_balance_double.php | 4 +- include/class_anc_operation.php | 8 ++-- include/class_anc_print.php | 4 +- include/class_calendar.php | 1 - include/class_contact.php | 3 +- include/class_document_type.php | 2 +- include/class_html_input.php | 7 +--- include/class_icard.php | 6 +-- include/class_iconcerned.php | 5 +-- include/class_iposte.php | 4 +- include/class_itva.php | 6 +-- include/class_itva_popup.php | 3 +- include/class_lettering.php | 1 - include/client.inc.php | 1 - include/client_card.inc.php | 1 - include/constant.php | 4 +- include/extension.inc.php | 2 +- include/fiche.inc.php | 18 +++------ include/forecast.inc.php | 16 ++++---- include/import_inc.php | 10 ++--- include/impress_fiche.inc.php | 1 - include/impress_gl_comptes.inc.php | 2 +- include/impress_poste.inc.php | 2 +- include/jrn.php | 27 ++++++------- include/lettering.account.inc.php | 2 - include/lettering.card.inc.php | 1 - include/lettering.gestion.inc.php | 1 - include/param_jrn_add.inc.php | 3 +- include/param_jrn_detail.inc.php | 2 - include/param_pcmn.inc.php | 3 +- include/report.inc.php | 3 +- include/restore.inc.php | 2 +- include/stock_inc.php | 4 +- include/supplier.inc.php | 2 - include/supplier_card.inc.php | 1 - include/template/dashboard.php | 2 - include/template/detail-action.php | 3 +- include/template/letter_all.php | 9 ++--- include/template/letter_prop.php | 7 ++-- include/template/list_category_document.php | 2 +- include/user_menu.php | 6 +-- 82 files changed, 174 insertions(+), 314 deletions(-) diff --git a/html/admin/setup.php b/html/admin/setup.php index 9ae75c061..9d0494764 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -82,6 +82,11 @@ if ( strpos($inc_path,";") != 0 ) { set_include_path($new_path); require_once('config_file.php'); +include_once('constant.php'); +require_once('class_database.php'); + +include_once('debug.php'); +include_once('ac_common.php'); /* The config file is created here */ if (isset($_POST['save_config'])) { $url=config_file_create($_POST,1,$os); @@ -101,25 +106,17 @@ if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.D echo ''; exit(); } -include_once('constant.php'); -require_once('class_database.php'); - -include_once('debug.php'); -include_once('ac_common.php'); /* If htaccess file doesn't exists we create them here * if os == 1 then windows, 0 means Unix */ $file='..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'.htaccess'; -if ( ! file_exists ( $file) ) { - $hFile=@fopen($file,'a+'); - if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire include'); - fwrite($hFile,'order deny,allow'."\n"); - fwrite($hFile,'deny from all'."\n"); - fclose($hFile); -} +$hFile=@fopen($file,'a+'); +if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire include'); +fwrite($hFile,'order deny,allow'."\n"); +fwrite($hFile,'deny from all'."\n"); +fclose($hFile); $file='..'.DIRECTORY_SEPARATOR.'.htaccess'; -if ( ! file_exists ( $file) ) { $hFile=@fopen($file,'a+'); if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire html'); $array=array("php_flag magic_quotes_gpc off", @@ -132,8 +129,8 @@ if ( ! file_exists ( $file) ) { "php_flag short_open_tag on", "php_value upload_max_filesize 10M", "php_value session.use_trans_sid 1", - "php_value session.use_cookies 0", - "php_flag session.use_only_cookies off"); + "php_value session.use_cookies 1", + "php_flag session.use_only_cookies on"); if ( $os == 0 ) fwrite($hFile,'php_value include_path .;..\..\include;..\include;addon'."\n"); @@ -141,15 +138,13 @@ if ( ! file_exists ( $file) ) { fwrite($hFile,'php_value include_path .:../../include:../include:addon'."\n"); foreach ($array as $value ) fwrite($hFile,$value."\n"); fclose($hFile); - copy ($file,'.htaccess'); - echo '
Les informations sont sauvées vous pouvez continuer
'; exit(); -} + //---------------------------------------------------------------------- // End functions // diff --git a/html/ajax.php b/html/ajax.php index 4f1702488..9c99807f6 100644 --- a/html/ajax.php +++ b/html/ajax.php @@ -6,7 +6,6 @@ * Required variable in $_REQUEST * - gDossier * - code - * - PHPSESSID */ require_once('class_database.php'); require_once('class_user.php'); diff --git a/html/ajax_card.php b/html/ajax_card.php index 0a4680365..c6ae961d1 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -27,7 +27,6 @@ {'ctl':'','html':''} \endverbatim * The parameters are - * - PHPSESSID * - gDossier * - op - dc Detail of a card @@ -60,7 +59,7 @@ require_once('function_javascript.php'); require_once('ac_common.php'); require_once ('class_user.php'); -$var=array('PHPSESSID','gDossier','op','ctl'); +$var=array('gDossier','op','ctl'); $cont=0; /* check if mandatory parameters are given */ foreach ($var as $v) { @@ -95,7 +94,7 @@ case 'bc': $f=new Fiche($cn); $popup=str_replace('_content','',$ctl); $r.='
'; - $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=dossier::hidden(); $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; $r.=HtmlInput::hidden('fd_id',$fd_id); $r.=HtmlInput::hidden('ctl',$ctl); @@ -131,7 +130,7 @@ case 'st': $isel->value=$array; $popup=str_replace('_content','',$ctl); $r.=''; - $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=dossier::hidden(); $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; $r.='

choisissez le type de fiche à ajouter

'; $r.=$isel->input(); @@ -171,7 +170,7 @@ case 'fs': $r.=_('Fiche contenant'); $r.=$q->input(); $r.=HtmlInput::submit('fs',_('Recherche')); - $r.=dossier::hidden().HtmlInput::phpsessid().HtmlInput::hidden('op','fs'); + $r.=dossier::hidden().HtmlInput::hidden('op','fs'); $array=array(); foreach (array('query','inp','jrn','label','typecard','price','tvaid') as $i) { if (isset(${$i}) ){ @@ -253,7 +252,7 @@ case 'ac': $html.= '
'; $html.=$ctl; $html.= ''; - $html.= dossier::hidden().HtmlInput::phpsessid(); + $html.= dossier::hidden(); $html.=HtmlInput::hidden('cat',$cat); $search=new IPoste("class_base"); $search->size=40; diff --git a/html/ajax_extension.php b/html/ajax_extension.php index fdea35465..7c8e75fef 100644 --- a/html/ajax_extension.php +++ b/html/ajax_extension.php @@ -24,7 +24,7 @@ * \brief this file answer to ajax * parameters : * - action =de details extension - * parameters : dossier, phpsessid and ex_id + * parameters : dossier, and ex_id * * */ @@ -43,7 +43,7 @@ $user=new User($cn); set_language(); $user->check(true);$user->check_dossier(dossier::id(),true); if ($user->check_action(EXTENSION)==0 ) exit; -$var=array('PHPSESSID','gDossier','action'); +$var=array('gDossier','action'); $cont=0; /* check if mandatory parameters are given */ foreach ($var as $v) { @@ -86,7 +86,7 @@ switch($action) { $str_enable=$enable->input(); $r.='
'; $r.=''; - $r.=dossier::hidden().HtmlInput::phpsessid(); + $r.=dossier::hidden(); /* property of the extension */ ob_start(); require_once('template/extension-detail.php'); @@ -143,7 +143,7 @@ switch($action) { $str_enable=$enable->input(); $r.='
'; $r.=''; - $r.=dossier::hidden().HtmlInput::phpsessid(); + $r.=dossier::hidden(); ob_start(); require_once('template/extension-detail.php'); $r.=ob_get_contents(); diff --git a/html/ajax_misc.php b/html/ajax_misc.php index ef0681fa5..adb06b135 100644 --- a/html/ajax_misc.php +++ b/html/ajax_misc.php @@ -23,7 +23,6 @@ /*!\file * \brief this file respond to an ajax request * The parameters are - * - PHPSESSID * - gDossier * - $op operation the file has to execute * Part 1 @@ -42,7 +41,7 @@ require_once('function_javascript.php'); require_once('ac_common.php'); require_once ('class_user.php'); -$var=array('PHPSESSID','gDossier'); +$var=array('gDossier'); $cont=0; /* check if mandatory parameters are given */ foreach ($var as $v) { @@ -70,7 +69,6 @@ switch($op) $html=""; $html=$cal->display(); $html=escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); echo << @@ -221,7 +219,6 @@ jr_comment,j_montant, j_debit,jr_internal from jrnx join jrn on (j_grpt=jr_grpt_ $r.=''; $r.='
'; // needed hidden var - $r.=HtmlInput::phpsessid(); $r.=dossier::hidden(); if ( isset($_REQUEST['p_action'])) $r.=HtmlInput::hidden('p_action',$_REQUEST['p_action']); if ( isset($_REQUEST['sa'])) $r.=HtmlInput::hidden('sa',$_REQUEST['sa']); @@ -300,7 +297,6 @@ jr_comment,j_montant, j_debit,jr_internal from jrnx join jrn on (j_grpt=jr_grpt_ $form='
'; $form.=''; - $form.=HtmlInput::phpsessid(); $form.=dossier::hidden(); if ( isset($_REQUEST['p_action'])) $form.=HtmlInput::hidden('p_action',$_REQUEST['p_action']); if ( isset($_REQUEST['sa'])) $form.=HtmlInput::hidden('sa',$_REQUEST['sa']); diff --git a/html/ajax_poste.php b/html/ajax_poste.php index 3fa91e30c..07198e9ff 100644 --- a/html/ajax_poste.php +++ b/html/ajax_poste.php @@ -40,7 +40,7 @@ require_once('function_javascript.php'); require_once('class_acc_account_ledger.php'); extract($_REQUEST); -$var=array('PHPSESSID','gDossier','op','ctl'); +$var=array('gDossier','op','ctl'); $cont=0; /* check if mandatory parameters are given */ foreach ($var as $v) { @@ -79,7 +79,7 @@ case "sf": require_once('template/account_search.php'); $r.=ob_get_contents(); ob_clean(); - $r.=dossier::hidden();$r.=HtmlInput::phpsessid(); + $r.=dossier::hidden(); $r.=(isset ($c))?HtmlInput::hidden('account',$c):""; $r.=(isset ($l))?HtmlInput::hidden('label',$l):""; $r.=(isset ($j))?HtmlInput::hidden('jrn',$j):""; diff --git a/html/annulation.php b/html/annulation.php index 8c8f92d4f..35555bdf6 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -445,7 +445,7 @@ $operation->jr_id=$element; $w=new IButton(); $w->label=$operation->get_internal(); - $w->javascript="modifyOperation('".$element."','".$_REQUEST['PHPSESSID']."',".dossier::id(). + $w->javascript="modifyOperation('".$element."',".dossier::id(). ','.$_REQUEST['p_jrn'].",'S')"; echo $w->input().'
'; }//for diff --git a/html/compute.php b/html/compute.php index fadc75f89..19d1293a2 100644 --- a/html/compute.php +++ b/html/compute.php @@ -29,7 +29,6 @@ * - q for quantity * - n for number of the ctrl * - gDossier - * - PHPSESSID * Must return at least tva, htva and tvac */ diff --git a/html/extension.php b/html/extension.php index b48024d61..8914fb721 100644 --- a/html/extension.php +++ b/html/extension.php @@ -62,7 +62,7 @@ if ( $only_plugin != 'P' ) { // user with only plugin cannot go back to the dashboard /* return button */ $msg=_('Retour au tableau de bord'); -$hidden=dossier::hidden().HtmlInput::phpsessid(); +$hidden=dossier::hidden(); echo << diff --git a/html/fid.php b/html/fid.php index e3658510b..8c939eacc 100644 --- a/html/fid.php +++ b/html/fid.php @@ -31,7 +31,6 @@ * - p field for the price (sale) * - b field for the price (purchase) * - FID is the QuickCode - * - PHPSESSID *\note if the j is -1 then all the card are shown */ diff --git a/html/get_pj.php b/html/get_pj.php index 9d284b4d0..5e9a97d83 100644 --- a/html/get_pj.php +++ b/html/get_pj.php @@ -25,7 +25,6 @@ * the value : * - l for ledger * - gDossier - * - PHPSESSID * Must return at least tva, htva and tvac */ diff --git a/html/get_predef.php b/html/get_predef.php index b9c4c748d..87fbc0d3f 100644 --- a/html/get_predef.php +++ b/html/get_predef.php @@ -25,7 +25,6 @@ * the value : * - l for ledger * - gDossier - * - PHPSESSID * Must return at least tva, htva and tvac */ diff --git a/html/import.php b/html/import.php index 786bcf236..fd673f53d 100644 --- a/html/import.php +++ b/html/import.php @@ -58,9 +58,6 @@ echo JS_AJAX_FICHE; echo ''; -if ( isset( $_REQUEST['PHPSESSID'])) { - $sessid = $_REQUEST['PHPSESSID']; -} // if action is set proceed to it @@ -98,7 +95,7 @@ if ( isset ($_GET["action"]) ) { $ip->type=OPEN; $ip->javascript="onchange=submit(this)"; echo ''; - echo dossier::hidden().HtmlInput::phpsessid(); + echo dossier::hidden(); echo HtmlInput::hidden('action','transfer'); echo _('Choississez la période à transfèrer'); echo $ip->input(); diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index ef5ac9e77..b86937a7e 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -30,9 +30,8 @@ */ function update_predef(p_type,p_direct) { var jrn=g("p_jrn").value; - var phpsessid=g("phpsessid").value; var dossier=g("gDossier").value; - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn+'&t='+p_type+'&d='+p_direct; + var querystring='?&gDossier='+dossier+'&l='+jrn+'&t='+p_type+'&d='+p_direct; g("p_jrn_predef").value=jrn; var action=new Ajax.Request( "get_predef.php", @@ -73,9 +72,8 @@ function error_get_predef(request,json) { */ function update_pj() { var jrn=g("p_jrn").value; - var phpsessid=g("phpsessid").value; var dossier=g("gDossier").value; - var querystring='?PHPSESSID='+phpsessid+'&gDossier='+dossier+'&l='+jrn; + var querystring='?&gDossier='+dossier+'&l='+jrn; var action=new Ajax.Request( "get_pj.php", { @@ -113,7 +111,6 @@ function ledger_fin_add_row(){ var mytable=g("fin_item").tBodies[0]; var line=mytable.rows.length; var row=mytable.insertRow(line); - var phpsessid=g("phpsessid"); var nb=g("nb_item"); var rowToCopy=mytable.rows[1]; var nNumberCell=rowToCopy.cells.length; @@ -143,7 +140,6 @@ function ledger_add_row(){ var line=mytable.rows.length; var nCell=9; var row=mytable.insertRow(line); - var phpsessid=g("phpsessid"); var nb=g("nb_item"); for (var e=0;e'; + cellSearch.innerHTML=''; } /** * @brief create a file to export a report - * @param p_sessid the Session id * @param p_dossier the dossier id */ -function report_export(p_sessid,p_dossier,p_fr_id) { - var queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&f="+p_fr_id; +function report_export(p_dossier,p_fr_id) { + var queryString="?&gDossier="+p_dossier+"&f="+p_fr_id; var action=new Ajax.Request( "ajax_report.php", { diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js index 654285080..8ad6f7c38 100644 --- a/html/js/accounting_item.js +++ b/html/js/accounting_item.js @@ -38,9 +38,9 @@ function set_jrn_parent(p_ctl,p_value) { } -function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_sessid,p_dossier) +function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_dossier) { - var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&m'+p_type+'&PHPSESSID='+p_sessid+'&gDossier='+p_dossier,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); + var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&m'+p_type+'&gDossier='+p_dossier,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); } /** *@brief show the popup for search an accounting item @@ -56,10 +56,9 @@ function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_sessid,p_dossier) function search_poste(obj) { showIPopup(obj.ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString="?gDossier="+dossier; - queryString+="&PHPSESSID="+phpsessid; + queryString+="&op=sf"; try { if ( obj.jrn) { queryString+="&j="+obj.jrn;} @@ -100,10 +99,8 @@ function search_poste(obj) { */ function search_get_poste(obj) { var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; - var queryString="?gDossier="+dossier; - queryString+="&PHPSESSID="+phpsessid; + queryString+="&op=sf"; if ( obj.elements['jrn'] ) { queryString+="&j="+$F('jrn');} diff --git a/html/js/ajax_fiche.js b/html/js/ajax_fiche.js index 6ad68f584..7757915cb 100644 --- a/html/js/ajax_fiche.js +++ b/html/js/ajax_fiche.js @@ -54,7 +54,6 @@ function errorFid(request,json) { function ajaxFid(p_ctl) { var gDossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var jrn=$(p_ctl).jrn; $(p_ctl).value=$(p_ctl).value.toUpperCase(); if ( jrn == undefined ) { if ($('p_jrn')!=undefined) {jrn=$('p_jrn').value; } } @@ -74,7 +73,7 @@ function ajaxFid(p_ctl) if ( $(p_ctl).purchase) { queryString+='&b='+$(p_ctl).purchase;} if ( $(p_ctl).typecard) { queryString+='&d='+$(p_ctl).typecard;} queryString=queryString+"&j="+jrn+'&gDossier='+gDossier; - queryString=queryString+'&ctl='+p_ctl.id+'&PHPSESSID='+phpsessid; + queryString=queryString+'&ctl='+p_ctl.id; var action=new Ajax.Request ( "fid.php", @@ -127,16 +126,15 @@ function ajax_error_saldo(request,json) { } /*!\brief this function get the saldo * \param p_ctl the ctrl where we take the quick_code - * \param phpsessid */ -function ajax_saldo(phpsessid,p_ctl) +function ajax_saldo(p_ctl) { var gDossier=$('gDossier').value; var ctl_value=trim($(p_ctl).value); var jrn=$('p_jrn').value; queryString="?FID="+ctl_value; queryString=queryString+'&gDossier='+gDossier+'&j='+jrn; - queryString=queryString+'&ctl='+ctl_value+'&PHPSESSID='+phpsessid; + queryString=queryString+'&ctl='+ctl_value; /* alert(queryString); */ var action=new Ajax.Request ( "get_saldo.php", @@ -159,16 +157,15 @@ function ajax_success_saldo(request,json) { } /*!\brief this function get data from ajax_card.php and fill the hidden div with the return html string -* \param phpsessid * \param p_dossier * \param f_id fiche.f_id * \param p_operation what to do : op : history of operation * \param ctl : id of the div to show * \param page */ -function ajax_card(phpsessid,p_dossier,f_id,p_operation,ctl,page) { +function ajax_card(p_dossier,f_id,p_operation,ctl,page) { $(ctl).show(); -var queryString="PHPSESSID="+phpsessid+"&gDossier="+p_dossier+"&f_id="+f_id+"&op="+p_operation+"&p="+page+'&ctl='+ctl; +var queryString="gDossier="+p_dossier+"&f_id="+f_id+"&op="+p_operation+"&p="+page+'&ctl='+ctl; var action = new Ajax.Request( "ajax_card.php" , { method:'get', parameters:queryString,onFailure:ajax_get_failure,onSuccess:ajax_get_success} ); diff --git a/html/js/anc_script.js b/html/js/anc_script.js index a0bfd071b..7a2e3b6e8 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -106,7 +106,6 @@ function verify_ca(p_style) { } /*! * \brief open a window for searching a CA account, - * \param p_sessid PHPSESSID * \param p_dossier dossier id * \param p_target ctrl to update * \param p_source ctrl containing the pa_id @@ -114,10 +113,10 @@ function verify_ca(p_style) { * * \return */ -function search_ca (p_sessid,p_dossier,p_target,p_source) +function search_ca (p_dossier,p_target,p_source) { var pa_id=g(p_source).value; - var url="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&c1="+p_target+"&c2="+pa_id; + var url="?gDossier="+p_dossier+"&c1="+p_target+"&c2="+pa_id; var a=window.open("search_ca.php"+url,"CA recherche",'statusbar=no,scrollbars=yes,toolbar=no'); a.focus(); } @@ -171,14 +170,13 @@ function caod_checkTotal() { /** *@brief remove an operation - *@param p_sessid is the PHPSESSID *@param p_dossier is the folder *@param p_oa_group is the group of the analytic operation */ -function op_remove(p_sessid,p_dossier,p_oa_group) { +function op_remove(p_dossier,p_oa_group) { var a=confirm("Etes-vous sur de vouloir effacer cette operation ?\n"); if ( a == false ) return; - var obj={"PHPSESSID":p_sessid,"oa":p_oa_group,"gDossier":p_dossier}; + var obj={"oa":p_oa_group,"gDossier":p_dossier}; queryString=encodeJSON(obj); g(p_oa_group).style.display='none'; var e=new Ajax.Request("remove_op.php", diff --git a/html/js/bq_import.js b/html/js/bq_import.js index efcd4d20c..54b2bb6c5 100644 --- a/html/js/bq_import.js +++ b/html/js/bq_import.js @@ -23,12 +23,11 @@ */ /*! \brief import : update a record (in ajax) - * \param $p_sessid : PHPSESSID * \param $p_dossier : the dossier id * \param $p_count : the item number */ -function import_update(p_sessid,p_dossier,p_count) { - var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; +function import_update(p_dossier,p_count) { + var query_string="count="+p_count+"&gDossier="+p_dossier; var code=$("code"+p_count); var poste=$("poste"+p_count); var concerned=$("e_concerned"+p_count); @@ -51,13 +50,12 @@ function import_update(p_sessid,p_dossier,p_count) { form.hide(); } /*! \brief remove : remove a record (in ajax) - * \param $p_sessid : PHPSESSID * \param $p_dossier : the dossier id * \param $p_count : the item number */ -function import_remove(p_sessid,p_dossier,p_count) { - var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; +function import_remove(p_dossier,p_count) { + var query_string="count="+p_count+"&gDossier="+p_dossier; var code=$("code"+p_count); var url="ajax_import.php"; query_string+="&code="+code.value; @@ -77,13 +75,12 @@ function import_remove(p_sessid,p_dossier,p_count) { form.hide(); } /*! \brief remove : remove a record (in ajax) - * \param $p_sessid : PHPSESSID * \param $p_dossier : the dossier id * \param $p_count : the item number */ -function import_not_confirmed(p_sessid,p_dossier,p_count) { - var query_string="PHPSESSID="+p_sessid+"&count="+p_count+"&gDossier="+p_dossier; +function import_not_confirmed(p_dossier,p_count) { + var query_string="count="+p_count+"&gDossier="+p_dossier; var code=$("code"+p_count); var url="ajax_import.php"; query_string+="&code="+code.value; diff --git a/html/js/card.js b/html/js/card.js index 1bbf38073..0fef470f1 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -37,7 +37,6 @@ function search_card(obj) { try{ var gDossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var inp=obj.inp; var label=obj.label; var typecard=obj.typecard; @@ -47,7 +46,7 @@ function search_card(obj) { if ( jrn==undefined) { jrn=$('p_jrn').value; } - var query=encodeJSON({'gDossier':gDossier,'PHPSESSID':phpsessid, + var query=encodeJSON({'gDossier':gDossier, 'inp':inp,'label':label,'price':price,'tvaid':tvaid, 'ctl':obj.popup,'op':'fs','jrn':jrn, 'typecard':typecard @@ -73,10 +72,8 @@ function search_card(obj) { */ function search_get_card(obj) { var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString="?gDossier="+dossier; - queryString+="&PHPSESSID="+phpsessid; queryString+="&op=fs"; if ( obj.elements['inp'] ) { queryString+="&inp="+$F('inp');} @@ -161,8 +158,6 @@ function errorFid(request,json) { alert('erreur : ajax fiche'); } function update_value(text,li) { - var phpsessid=$('phpsessid').value; - if ( ! phpsessid ) { alert ('Il manque HIDDEN PHPSESSID');} } /** @@ -190,7 +185,7 @@ function fill_data(text,li) { */ function fill_fin_data_onchange(ctl) { ajaxFid(ctl); -ajax_saldo($('phpsessid'),ctl.id); +ajax_saldo(ctl.id); } /** *@brief is called when something change in ICard @@ -199,7 +194,7 @@ ajax_saldo($('phpsessid'),ctl.id); */ function fill_fin_data(text,li) { ajaxFid(text); -ajax_saldo($('phpsessid'),text.id); +ajax_saldo($(text.id)); } /** *@brief show the ipopup window and display the details of a card, @@ -215,7 +210,6 @@ function fill_ipopcard(obj) { $(content).innerHTML='chargement'; showIPopup($(obj).ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var qcode=''; if ( $(obj).qcode != undefined ) { qcode=obj.qcode; @@ -224,7 +218,6 @@ function fill_ipopcard(obj) { } // ctl=$(obj).id; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&qcode='+qcode; queryString+='&ctl='+content; queryString+='&op=dc'; // dc for detail card @@ -275,11 +268,9 @@ function select_card_type(obj) { $(content).innerHTML='chargement'; showIPopup($(obj).ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var filter=$(obj).filter; if ( filter==undefined) {filter=-1;} var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&ctl='+content; queryString+='&op=st'; // st for selecting type if ( $(obj).win_refresh!=undefined) { queryString+='&ref';} @@ -315,10 +306,8 @@ function dis_blank_card(obj) { $(content).innerHTML='chargement'; showIPopup($(obj).ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&ctl='+content; queryString+='&fd_id='+fd_id; queryString+=ref; @@ -347,9 +336,7 @@ function save_card(obj) { $(content).innerHTML='chargement'; showIPopup($(obj).ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&ctl='+content; queryString+=data; queryString+='&op=sc'; // sc for save card @@ -373,9 +360,7 @@ function add_category(obj){ // show ipopup showIPopup(obj.ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&op=ac'; queryString+='&ctl='+obj.ipopup+'_content'; if ( obj.type_cat) { queryString+='&cat='+obj.type_cat;} @@ -401,7 +386,6 @@ function save_card_category(obj) { $(content).innerHTML='chargement'; showIPopup($(obj).ipopup); var dossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var queryString='?'; queryString+='&ctl='+content+'&'; queryString+=data; diff --git a/html/js/confirm.js b/html/js/confirm.js index 65b77a6d9..bf6f9bb26 100644 --- a/html/js/confirm.js +++ b/html/js/confirm.js @@ -25,8 +25,8 @@ */ // \brief Confirm the removal of a template -function confirm_remove(p_phpsessid,p_obj_id,p_type) { +function confirm_remove(p_obj_id,p_type) { var - a=open('confirm_remove.php?PHPSESSID='+p_phpsessid+'&ob_id='+p_obj_id+'&p_type='+p_type,'Confirmez effacement','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); + a=open('confirm_remove.php?ob_id='+p_obj_id+'&p_type='+p_type,'Confirmez effacement','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes'); } diff --git a/html/js/extension.js b/html/js/extension.js index d6b792c08..2163a3b66 100644 --- a/html/js/extension.js +++ b/html/js/extension.js @@ -29,10 +29,8 @@ */ function detail_extension(p_code){ var dossier=$("gDossier").value; - var phpsessid=$("phpsessid").value; showIPopup("dtext"); var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&ex_id='+p_code; queryString+='&action=de'; // de for detail extension @@ -50,10 +48,8 @@ function detail_extension(p_code){ */ function new_extension(){ var dossier=$("gDossier").value; - var phpsessid=$('phpsessid').value; showIPopup("dtext"); var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&action=ne'; // ne for new extension var action=new Ajax.Request ( 'ajax_extension.php', @@ -93,9 +89,7 @@ function extDetail(req){ function extension_save(p_obj_form){ try{ var dossier=$("gDossier").value; - var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&action=se'; // se save extension // Data must be taken here try{ @@ -142,9 +136,7 @@ function successSave(req){ } function extension_remove(ex_id) { var dossier=$("gDossier").value; - var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; - queryString+='&PHPSESSID='+phpsessid; queryString+='&ex_id='+ex_id; queryString+='&action=re'; // re for remove extension var action=new Ajax.Request ( 'ajax_extension.php', diff --git a/html/js/gestion.js b/html/js/gestion.js index dd7010c35..90b96ba59 100644 --- a/html/js/gestion.js +++ b/html/js/gestion.js @@ -28,12 +28,11 @@ /** *@brief remove an attached document of an action - *@param phpsessid *@param dossier *@param dt_id id of the document (pk document:d_id) */ -function remove_document(p_sessid,p_dossier,p_id) { - queryString="?PHPSESSID="+p_sessid+"&gDossier="+p_dossier+"&a=rm&d_id="+p_id; +function remove_document(p_dossier,p_id) { + queryString="?gDossier="+p_dossier+"&a=rm&d_id="+p_id; var action=new Ajax.Request ( "show_document.php", { diff --git a/html/js/scripts.js b/html/js/scripts.js index 2fd888f3e..a68c53eaa 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -175,13 +175,12 @@ function toggleHideShow(p_obj,p_button) { } /** *@brief open popup with the search windows - *@param p_sessid,the PHPSESSID *@param p_dossier the dossier where to search *@param p_style style of the detail value are E for expert or S for simple */ -function openRecherche(p_sessid,p_dossier,p_style) { +function openRecherche(p_dossier,p_style) { if ( p_style == 'E' ) { p_style="expert";} - var w=window.open("recherche.php?gDossier="+p_dossier+"&PHPSESSID="+p_sessid+'&'+p_style,'','statusbar=no,scrollbars=yes,toolbar=no'); + var w=window.open("recherche.php?gDossier="+p_dossier+'&'+p_style,'','statusbar=no,scrollbars=yes,toolbar=no'); w.focus(); } /** @@ -237,7 +236,7 @@ function getNodeText(xmlNode) *@param object select */ function change_month(obj) { - var queryString="PHPSESSID="+obj.phpsessid+"&gDossier="+obj.gDossier+"&op=cal"+"&per="+obj.value; + var queryString="gDossier="+obj.gDossier+"&op=cal"+"&per="+obj.value; var action = new Ajax.Request( "ajax_misc.php" , { method:'get', parameters:queryString,onFailure:ajax_misc_failure,onSuccess:change_month_success} ); @@ -270,8 +269,8 @@ function ajax_misc_failure() { /** *@brief remove a document_modele */ -function cat_doc_remove(p_dt_id,phpsessid,p_dossier) { - var queryString="PHPSESSID="+phpsessid+"&gDossier="+p_dossier+"&op=rem_cat_doc"+"&dt_id="+p_dt_id; +function cat_doc_remove(p_dt_id,p_dossier) { + var queryString="gDossier="+p_dossier+"&op=rem_cat_doc"+"&dt_id="+p_dt_id; var action = new Ajax.Request( "ajax_misc.php" , { method:'get', parameters:queryString,onFailure:ajax_misc_failure,onSuccess:success_cat_doc_remove} ); @@ -291,12 +290,12 @@ function success_cat_doc_remove(req) { } /** *@brief display the popup with vat and explanation - *@param obj with 4 attributes gdossier, ctl,popup and phpsessid + *@param obj with 4 attributes gdossier, ctl,popup */ function popup_select_tva(obj) { try { showIPopup(obj.popup); - var queryString="PHPSESSID="+obj.phpsessid+"&gDossier="+obj.gDossier+"&op=dsp_tva"+"&ctl="+obj.ctl+'&popup='+obj.popup; + var queryString="gDossier="+obj.gDossier+"&op=dsp_tva"+"&ctl="+obj.ctl+'&popup='+obj.popup; if ( obj.jcode ) queryString+='&code='+obj.jcode; if (obj.compute) @@ -331,11 +330,11 @@ function success_popup_select_tva(req) { } /** *@brief display the popup with vat and explanation - *@param obj with 4 attributes gdossier, ctl,popup and phpsessid + *@param obj with 4 attributes gdossier, ctl,popup */ function set_tva_label(obj) { try { - var queryString="PHPSESSID="+obj.phpsessid+"&gDossier="+obj.gDossier+"&op=label_tva"+"&id="+obj.value; + var queryString="gDossier="+obj.gDossier+"&op=label_tva"+"&id="+obj.value; if ( obj.jcode ) queryString+='&code='+obj.jcode; var action = new Ajax.Request( diff --git a/html/js/todo_list.js b/html/js/todo_list.js index d79dff51a..f9150f597 100644 --- a/html/js/todo_list.js +++ b/html/js/todo_list.js @@ -21,19 +21,18 @@ /*!\file * \brief this file contains all the javascript needed by the todo_list. - * it requires prototype.js. The calling page must have the phpsessid and + * it requires prototype.js. The calling page must have * the gDossier * */ function todo_list_show(p_id) { var gDossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; try { var action=new Ajax.Request( 'todo_list.php', { method:'get', - parameters:{'show':1,'id':p_id,'PHPSESSID':phpsessid,'gDossier':gDossier}, + parameters:{'show':1,'id':p_id,'gDossier':gDossier}, onFailure:todo_list_show_error, onSuccess:todo_list_show_success } @@ -77,13 +76,12 @@ function todo_list_remove(p_ctl) { if ( confirm('Effacer ?') == false ) {return;} $("tr"+p_ctl).hide(); var gDossier=$('gDossier').value; - var phpsessid=$('phpsessid').value; var action=new Ajax.Request( 'todo_list.php', { method:'get', - parameters:{'del':1,'id':p_ctl,'PHPSESSID':phpsessid,'gDossier':gDossier} + parameters:{'del':1,'id':p_ctl,'gDossier':gDossier} } ); return false; diff --git a/html/login.php b/html/login.php index dc32f6091..00aa371a9 100644 --- a/html/login.php +++ b/html/login.php @@ -41,7 +41,7 @@ if ( isset ($_POST["p_user"] ) ) { $User=new User($rep); $User->Check(); - echo ""; + echo ""; } else { @@ -50,7 +50,7 @@ if ( isset ($_POST["p_user"] ) ) { $User=new User($rep); $User->Check(); - echo ""; + echo ""; // } } html_page_stop(); diff --git a/html/parametre.php b/html/parametre.php index a60e63f09..caaabe23f 100644 --- a/html/parametre.php +++ b/html/parametre.php @@ -129,7 +129,7 @@ echo_debug("parametre",__LINE__,$_POST); // divers //----------------------------------------------------- if ( $p_action == 'divers') { - $s=dossier::get().'&PHPSESSID='.$_REQUEST['PHPSESSID']; + $s=dossier::get(); $array = array ( array('parametre.php?p_action=divers&sa=mp&'.$s,_('Moyen de paiement'),_('Moyen de paiement'),2), diff --git a/html/recherche.php b/html/recherche.php index e8b259642..83cc6e625 100644 --- a/html/recherche.php +++ b/html/recherche.php @@ -55,9 +55,6 @@ include_once ('class_user.php'); $User=new User($cn); $User->Check(); - // PhpSessid -$sessid=$_REQUEST['PHPSESSID']; - // display a search box $ledger=new Acc_Ledger($cn,0); diff --git a/html/search_ca.php b/html/search_ca.php index fb5120e30..50c2ce3cb 100644 --- a/html/search_ca.php +++ b/html/search_ca.php @@ -26,7 +26,7 @@ * */ - // parameter are gDossier,PHPSESSID , c1 : the control id to update, + // parameter are gDossier , c1 : the control id to update, // c2 the control id which contains the pa_id require_once("class_itext.php"); require_once("class_ihidden.php"); diff --git a/html/test.php b/html/test.php index cfc37d6f8..be7d755c5 100644 --- a/html/test.php +++ b/html/test.php @@ -78,7 +78,6 @@ foreach ($array as $value) { $r.=''; $r.= Dossier::hidden(); $r.=''; -$r.=HtmlInput::hidden('PHPSESSID',$_REQUEST['PHPSESSID']); $r.=''; echo $r; @@ -133,7 +132,6 @@ case 18: Todo_List::test_me(); echo ''; echo '
'; - echo HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); echo dossier::hidden(); echo 'title :
'; echo 'desc :
'; diff --git a/include/action.common.inc.php b/include/action.common.inc.php index 7a276e48f..5c1e7fcae 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -266,7 +266,6 @@ function ShowActionList($cn,$p_base) $w->table=0; $list=$cn->make_list("select fd_id from fiche_def where frd_id in (4,8,9,14,15,16,25)"); $w->extra=$list; - echo HtmlInput::phpsessid(); echo _('Fiche').' :'.$w->search().$w->input().'
'; printf (_('Titre ou référence').': ', $a); diff --git a/include/adm.inc.php b/include/adm.inc.php index fc1d43de1..6cddd299e 100644 --- a/include/adm.inc.php +++ b/include/adm.inc.php @@ -39,7 +39,6 @@ echo js_include('controls.js'); echo js_include('dragdrop.js'); echo JS_CARD; echo JS_AJAX_FICHE; -echo HtmlInput::phpsessid(); echo ICard::ipopup('ipop_newcard'); $ip_cat=new IPopup('ipop_cat'); $ip_cat->title=_('Ajout d\'une catégorie'); diff --git a/include/adm_card.inc.php b/include/adm_card.inc.php index 6280106e1..fdd03d108 100644 --- a/include/adm_card.inc.php +++ b/include/adm_card.inc.php @@ -99,7 +99,6 @@ if ( $ss_action == 'op') { if ( $ss_action == 'cn') { echo '
'; echo dossier::hidden(); - echo HtmlInput::phpsessid(); $f=new fiche($cn,$_REQUEST['f_id']); $contact=new Contact($cn); $contact->company=$f->get_quick_code(); diff --git a/include/balance.inc.php b/include/balance.inc.php index 66b4a4820..8d523987b 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -88,7 +88,6 @@ $journal->name="p_jrn"; if ( isset($_POST['p_jrn'])) $journal->selected=$_POST['p_jrn']; else $journal->selected=-1; -echo HtmlInput::phpsessid(); echo "Journal = ".$journal->input(); $from_poste=new IPoste(); $from_poste->name="from_poste"; diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 9ed6dc59a..1d705b1db 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -594,7 +594,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ if ($Max==0) return array(0,_("Aucun enregistrement trouvé")); $r.=''; - $l_sessid=$_REQUEST['PHPSESSID']; + $r.=""; $r.=""; @@ -652,9 +652,9 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ exit (-1); } //DEBUG - // $r.=$l_sessid; - $r.=sprintf('%s', - $row['jr_id'], $l_sessid,$gDossier, $row['jrn_def_id'],$vue, $row['jr_internal']); + + $r.=sprintf('%s', + $row['jr_id'], $gDossier, $row['jrn_def_id'],$vue, $row['jr_internal']); $r.=""; if ( $this->type=='') $r.=td($row['jrn_def_name']); // date @@ -727,7 +727,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $operation->jr_id=$element; $l_amount=$this->db->get_value("select jr_montant from jrn ". " where jr_id=$element"); - $r.= " ".$operation->get_internal()." [ $l_amount € ]"; + $r.= " ".$operation->get_internal()." [ $l_amount € ]"; }//for }// if ( $a != null ) { $r.=""; @@ -740,19 +740,18 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $r.=""; } // else //document if ( $row['jr_pj_name'] != "") { $image=''; - $r.=""; } @@ -1295,7 +1294,6 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $ret.=HtmlInput::hidden('p_jrn',$this->id); $ret.=dossier::hidden(); - $ret.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $ret.=HtmlInput::hidden('jrn_type',$this->get_type()); $info= HtmlInput::infobulle(0); @@ -1308,7 +1306,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ ''. ''. ''; - $l_sessid=$_REQUEST['PHPSESSID']; + for ($i = 0 ;$i<$nb_row;$i++){ // Quick Code @@ -1994,7 +1992,6 @@ function get_last_date() $f_paid=new ICheckbox('unpaid'); $f_paid->selected=(isset($_REQUEST['unpaid']))?true:false; - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $r.=dossier::hidden(); $r.=HtmlInput::hidden('ledger_type',$this->type); ob_start(); @@ -2013,7 +2010,6 @@ function get_last_date() * struct array $p_array \verbatim ( - [phpsessid] => 016710a766b3c7b137ce6ee5bfbacc00 [gDossier] => 13 [p_jrn] => -1 [date_start] => @@ -2024,7 +2020,6 @@ function get_last_date() [search] => Rechercher [p_action] => ven [sa] => l - [PHPSESSID] => 016710a766b3c7b137ce6ee5bfbacc00 ) \endverbatim *\return an array with a valid sql statement, an the where clause => array[sql] array[where] diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index 5b5adee53..0a7e0bbe3 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -210,7 +210,6 @@ class Acc_Ledger_Fin extends Acc_Ledger { $r=""; $r.=dossier::hidden(); - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $f_legend='Banque, caisse'; // Date //-- @@ -530,7 +529,6 @@ class Acc_Ledger_Fin extends Acc_Ledger { // Hidden variables //-------------------------------------------------- $r.=dossier::hidden(); - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $r.=HtmlInput::hidden('p_jrn',$this->id); $r.=HtmlInput::hidden('nb_item',$nb_item); $r.=HtmlInput::hidden('last_sold',$last_sold); diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index f842d85c5..5bdc16b61 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -712,7 +712,6 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r=""; $r.=dossier::hidden(); - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $f_legend=_("En-tête facture fournisseur"); $f_legend_detail=_("Détail articles acheté"); diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index 537ab6664..067c65ed4 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -861,7 +861,6 @@ class Acc_Ledger_Sold extends Acc_Ledger { $r=''; $r.=dossier::hidden(); - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); $f_legend=_('En-tête facture client'); $Echeance=new IDate(); diff --git a/include/class_acc_parm_code.php b/include/class_acc_parm_code.php index 0702ea8e5..ea0b2ead8 100644 --- a/include/class_acc_parm_code.php +++ b/include/class_acc_parm_code.php @@ -148,7 +148,6 @@ class Acc_Parm_Code { $r.= ''; $r.=''; - $r.=HtmlInput::phpsessid(); $r.=Dossier::hidden(); return $r; diff --git a/include/class_acc_report.php b/include/class_acc_report.php index 9dbacfbbd..d0c4c3609 100644 --- a/include/class_acc_report.php +++ b/include/class_acc_report.php @@ -102,7 +102,6 @@ function form($p_line=0) { $r.= dossier::hidden(); $r.= HtmlInput::hidden('line',$p_line); $r.= HtmlInput::hidden('fr_id',$this->id); - $r.=HtmlInput::phpsessid(); $wForm=new IText(); $r.="Nom du rapport : "; $r.=$wForm->input('form_nom',$this->name); @@ -156,7 +155,7 @@ function form($p_line=0) { $r.= "
Internal"; // cancel operation if ( $user->check_action(GEOP)==1) - $r.=sprintf('', - _("Effacer"),$row['jr_grpt_id'],$l_sessid,$gDossier,$row['jrn_def_id']); + $r.=sprintf('', + _("Effacer"),$row['jr_grpt_id'],$gDossier,$row['jrn_def_id']); $r.="".sprintf('%s', + $r.="".sprintf('%s', $row['jrn_def_id'], $row['jr_grpt_id'], $str_dossier, - $_REQUEST['PHPSESSID'], $image) ."'._('Montant').''._('Débit').'
'.$value->input(); $r.='
"; $wButton=new IButton(); - $wButton->javascript=" rapport_add_row('".dossier::id()."','".$_REQUEST['PHPSESSID']."')"; + $wButton->javascript=" rapport_add_row('".dossier::id()."')"; $wButton->label="Ajout d'une ligne"; $r.=$wButton->input(); return $r; diff --git a/include/class_action.php b/include/class_action.php index d5223eceb..297c49543 100644 --- a/include/class_action.php +++ b/include/class_action.php @@ -368,8 +368,7 @@ class Action $upload->name="file_upload[]"; $upload->value=""; $aAttachedFile=$this->db->get_array('select d_id,d_filename,d_mimetype,'. - '\'show_document.php?PHPSESSID='. - $_REQUEST['PHPSESSID'].'&'. + '\'show_document.php?'. Dossier::get().'&d_id=\'||d_id as link'. ' from document where ag_id=$1', array($this->ag_id)); @@ -485,7 +484,6 @@ class Action /* Add the needed hidden values */ $r.=dossier::hidden(); - $r.=HtmlInput::hidden('phpsessid',$_REQUEST['PHPSESSID']); /* add the number of item */ $Hid=new IHidden(); @@ -831,8 +829,8 @@ class Action $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); $qexp=($qcode_dest=="- ERROR -")?"Interne":$qcode_dest; - $jsexp=sprintf("javascript:showfiche('%s','%s')", - $_REQUEST['PHPSESSID'],$qexp); + $jsexp=sprintf("javascript:showfiche('%s')", + $qexp); if ( $qexp != 'Interne' ) { $r.="$href".$qexp." : ".$fexp->getName().''; diff --git a/include/class_anc_balance_double.php b/include/class_anc_balance_double.php index dce582836..abc5c89a1 100644 --- a/include/class_anc_balance_double.php +++ b/include/class_anc_balance_double.php @@ -285,11 +285,11 @@ class Anc_Balance_Double extends Anc_Print $choose=new IButton(); $choose->name="Choix Poste"; $choose->label=_("Recherche"); - $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'from_poste2','pa_id2')"; + $choose->javascript="onClick=search_ca(".dossier::id().",'from_poste2','pa_id2')"; $r.=$choose->input(); $r.=" et le poste ".$poste->input("to_poste2",$this->to_poste2); - $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'to_poste2','pa_id2')"; + $choose->javascript="onClick=search_ca("dossier::id().",'to_poste2','pa_id2')"; $r.=$choose->input(); $r.=''. _('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche'). diff --git a/include/class_anc_operation.php b/include/class_anc_operation.php index d9242f4a7..a3646d195 100644 --- a/include/class_anc_operation.php +++ b/include/class_anc_operation.php @@ -189,7 +189,7 @@ class Anc_Operation { $efface=new IButton(); - $efface->javascript="op_remove('".$_REQUEST['PHPSESSID']."',".$gDossier.",".$oldgroup.")"; + $efface->javascript="op_remove('".$gDossier.",".$oldgroup.")"; $efface->name="Efface"; $efface->label="Efface"; $ret.="".$efface->input().""; @@ -200,7 +200,7 @@ class Anc_Operation if ( $jr_id != 0) { // get the old jr_id $detail=new IButton(); - $detail->javascript="viewOperation($jr_id,'".$_REQUEST['PHPSESSID']."',$gDossier)"; + $detail->javascript="viewOperation($jr_id,$gDossier)"; $detail->name="Detail"; $detail->label="Detail"; $ret.="".$detail->input().""; @@ -249,7 +249,7 @@ class Anc_Operation $efface=new IButton(); - $efface->javascript="op_remove('".$_REQUEST['PHPSESSID']."',$gDossier,".$oldgroup.")"; + $efface->javascript="op_remove('"."$gDossier,".$oldgroup.")"; $efface->name="Efface"; $efface->label="Efface"; $ret.="".$efface->input().""; @@ -258,7 +258,7 @@ class Anc_Operation $jr_id=$this->get_jrid(); if ( $jr_id != 0 ){ $detail=new IButton(); - $detail->javascript="viewOperation($jr_id,'".$_REQUEST['PHPSESSID']."',$gDossier)"; + $detail->javascript="viewOperation($jr_id,'"."$gDossier)"; $detail->name="Detail"; $detail->label="Detail"; $ret.="".$detail->input().""; diff --git a/include/class_anc_print.php b/include/class_anc_print.php index c32b67d3d..b8f3ada1b 100644 --- a/include/class_anc_print.php +++ b/include/class_anc_print.php @@ -127,11 +127,11 @@ class Anc_Print { $choose=new IButton(); $choose->name=_("Choix Poste"); $choose->label=_("Recherche"); - $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'from_poste','pa_id')"; + $choose->javascript="onClick=search_ca(".dossier::id().",'from_poste','pa_id')"; $r.=$choose->input(); $r.=_(" et le poste ").$poste->input("to_poste",$this->to_poste); - $choose->javascript="onClick=search_ca('".$_REQUEST['PHPSESSID']."',".dossier::id().",'to_poste','pa_id')"; + $choose->javascript="onClick=search_ca(".dossier::id().",'to_poste','pa_id')"; $r.=$choose->input(); $r.=''._('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche').''; diff --git a/include/class_calendar.php b/include/class_calendar.php index 890d798ba..bf5b23f0a 100644 --- a/include/class_calendar.php +++ b/include/class_calendar.php @@ -96,7 +96,6 @@ class Calendar { $wMonth->selected=$this->default_periode; $wMonth->javascript="onchange=change_month(this)"; $wMonth->set_attribute('gDossier',dossier::id()); - $wMonth->set_attribute('phpsessid',$_REQUEST['PHPSESSID']); $month_year=$wMonth->input().$wMonth->get_js_attr(); ob_start(); diff --git a/include/class_contact.php b/include/class_contact.php index eedf3c18f..0314837e7 100644 --- a/include/class_contact.php +++ b/include/class_contact.php @@ -114,8 +114,7 @@ $back_url=urlencode($_SERVER['REQUEST_URI']); // add popup for detail if ( $l_company_name !="") { - $l_company_name=sprintf("%s - %s", - $_REQUEST['PHPSESSID'], + $l_company_name=sprintf("%s - %s", $contact->strAttribut(ATTR_DEF_COMPANY), $contact->strAttribut(ATTR_DEF_COMPANY), $l_company_name diff --git a/include/class_document_type.php b/include/class_document_type.php index 1b56ceca2..f5d6e1a02 100644 --- a/include/class_document_type.php +++ b/include/class_document_type.php @@ -63,7 +63,7 @@ class Document_type $bt=new IButton('X'.$r[$i]['dt_id']); $bt->label=_('Effacer'); $bt->javascript="if (confirm('"._('Vous confirmez')."')==true) {"; - $bt->javascript.="cat_doc_remove('".$r[$i]['dt_id']."','".$_REQUEST['PHPSESSID']."','".Dossier::id()."');"; + $bt->javascript.="cat_doc_remove('".$r[$i]['dt_id']."','".Dossier::id()."');"; $bt->javascript.='}'; $tmp['js_remove']=$bt->input(); diff --git a/include/class_html_input.php b/include/class_html_input.php index 061b8ee6a..5cd793fc8 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -188,21 +188,18 @@ echo $string => property={'prop':'1','prop2':'2','prop3':'3'}; static function hidden($p_name,$p_value) { return ''; } - static function phpsessid() { - return self::hidden('phpsessid',$_REQUEST['PHPSESSID']); - } + static function extension() { return self::hidden('code',$_REQUEST['code']); } /*!\brief create a button with a ref *\param $p_label the text - *\param $p_value the location of the window, the PHPSESSID is added, but not the gDossier + *\param $p_value the location of the window, *\param $p_name the id of the span *\return string with htmlcode */ static function button_anchor($p_label,$p_value,$p_name="") { - $str='&PHPSESSID='.$_REQUEST['PHPSESSID']; $r=sprintf(' %s', $p_name, $p_value.$str, diff --git a/include/class_icard.php b/include/class_icard.php index 54dbdb490..3b2c67e94 100644 --- a/include/class_icard.php +++ b/include/class_icard.php @@ -32,7 +32,7 @@ * - extra contents the type (all, deb or cred, a list of FD_ID between parent. or a SQL clause * - attribute are the attribute to set (via ajax). The ledger is either a attribute (jrn) or a * hidden field in the document, if none are set, there is no filter on the ledger - *\note you must in a hidden field PHPSESSID and the gDossier (dossier::hidden) + *\note you must in a hidden field gDossier (dossier::hidden) *\see ajaxFid *\see card.js *\see fid.php @@ -177,7 +177,7 @@ class ICard extends HtmlInput $this->value=($p_value==null)?$this->value:$p_value; if ( $this->readOnly==true) return $this->display(); - $l_sessid=$_REQUEST['PHPSESSID']; + $attr=$this->get_js_attr(); @@ -204,7 +204,7 @@ class ICard extends HtmlInput $div=sprintf('
', $this->name); - $query=dossier::get().'&PHPSESSID='.$l_sessid.'&e='.urlencode($this->extra); + $query=dossier::get().'&e='.urlencode($this->extra); $javascript=sprintf('try { new Ajax.Autocompleter("%s","%s_choices","fid_card.php?%s",'. '{paramName:"FID",minChars:1,indicator:null,'. diff --git a/include/class_iconcerned.php b/include/class_iconcerned.php index d9ca66caa..5e89f3768 100644 --- a/include/class_iconcerned.php +++ b/include/class_iconcerned.php @@ -34,14 +34,13 @@ require_once('class_html_input.php'); if ( $this->readOnly==true) return $this->display(); $td="";$etd=""; - $l_sessid=$_REQUEST['PHPSESSID']; + $r=sprintf("$td - + $etd $td $etd", - $l_sessid, $this->name, $this->extra, $this->extra2, diff --git a/include/class_iposte.php b/include/class_iposte.php index bf3e208f8..892c8c93c 100644 --- a/include/class_iposte.php +++ b/include/class_iposte.php @@ -38,7 +38,6 @@ require_once('function_javascript.php'); * - 3 the button and the text are in the table (TD) *\note we use the set_attribute for giving parameter to search_account * attribute are - * - phpsessid * - gDossier * - jrn if set there is a filter on a ledger, in that case, contains the jrn_id (0 for no filter) * - ipopup ipopup to open @@ -75,7 +74,6 @@ $text->name('field'); $text->value=$p_res[$i]['pvalue']; $text->set_attribute('ipopup','ipop_account'); $text->set_attribute('gDossier',Dossier::id()); -$text->set_attribute('phpsessid',$_REQUEST['phpsessid']); $text->set_attribute('jrn',0); $text->set_attribute('account','field'); @@ -127,7 +125,7 @@ class IPoste extends HtmlInput if ( $this->readOnly==true) return $this->display(); //-- if ( ! isset($this->ctrl) ) $this->ctrl='none'; - $l_sessid=$_REQUEST['PHPSESSID']; + if ( ! isset($this->javascript)) $this->javascript=""; /* create the text */ diff --git a/include/class_itva.php b/include/class_itva.php index a2bea38db..d930a2441 100644 --- a/include/class_itva.php +++ b/include/class_itva.php @@ -40,10 +40,10 @@ require_once('class_html_input.php'); $this->value, $this->label, $this->name); - $l_sessid=$_REQUEST['PHPSESSID']; + $r.=sprintf("", - $l_sessid,dossier::id(),$this->name); + onClick=\"ShowTva(%d,'%s');\">", + dossier::id(),$this->name); if ( $this->table == 1 ) $r=td($r); return $r; diff --git a/include/class_itva_popup.php b/include/class_itva_popup.php index ed6081b7b..e18d04d8a 100644 --- a/include/class_itva_popup.php +++ b/include/class_itva_popup.php @@ -34,9 +34,8 @@ require_once('class_ispan.php'); echo $a->input(); $tva=new ITva_Popup("tva1"); $tva->with_button(true); - // You must add the attributes gDossier, popup and phpsessid + // You must add the attributes gDossier, popup $tva->set_attribute('popup','popup_tva'); - $tva->set_attribute('phpsessid',$_REQUEST['PHPSESSID']); $tva->set_attribute('gDossier',dossier::id()); // We can add a label for the code diff --git a/include/class_lettering.php b/include/class_lettering.php index da92d187a..32dec1c1b 100644 --- a/include/class_lettering.php +++ b/include/class_lettering.php @@ -83,7 +83,6 @@ class Lettering *@brief save from array *@param $p_array @code - 'phpsessid' => string 'a2c261a2f48b0045a8c28276afd31f5c' (length=32) 'gDossier' => string '13' (length=2) 'letter_j_id' => array diff --git a/include/client.inc.php b/include/client.inc.php index 113fdb04d..bd7334868 100644 --- a/include/client.inc.php +++ b/include/client.inc.php @@ -38,7 +38,6 @@ echo js_include('controls.js'); echo js_include('dragdrop.js'); echo JS_CARD; echo JS_AJAX_FICHE; -echo HtmlInput::phpsessid(); echo ICard::ipopup('ipop_newcard'); $ip_cat=new IPopup('ipop_cat'); $ip_cat->title=_('Ajout d\'une catégorie'); diff --git a/include/client_card.inc.php b/include/client_card.inc.php index e3b34ee06..ebd73d62d 100644 --- a/include/client_card.inc.php +++ b/include/client_card.inc.php @@ -104,7 +104,6 @@ if ( $ss_action == 'op') { if ( $ss_action == 'cn') { echo '
'; echo dossier::hidden(); - echo HtmlInput::phpsessid(); $f=new fiche($cn,$_REQUEST['f_id']); $contact=new Contact($cn); $contact->company=$f->get_quick_code(); diff --git a/include/constant.php b/include/constant.php index f542f272d..2b1da5fba 100644 --- a/include/constant.php +++ b/include/constant.php @@ -163,9 +163,9 @@ define ("JS_COMPUTE_ODS", ""); define ("JS_SHOW_TVA","