From de458fa62615ecfecb6bf5a1b39972a73d009e5c Mon Sep 17 00:00:00 2001 From: eldy Date: Sat, 16 Mar 2013 12:22:37 +0100 Subject: [PATCH 1/3] Qual: Move option at better place --- htdocs/admin/pdf.php | 54 +++++++++++++++++++++++++++++++++++---- htdocs/admin/security.php | 44 ------------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index fc384046256..2734bacea2a 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -68,6 +68,20 @@ if ($action == 'update') exit; } +if ($action == 'activate_pdfsecurity') +{ + dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} +else if ($action == 'disable_pdfsecurity') +{ + dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + /* * View @@ -366,31 +380,61 @@ else // Show print_fiche_titre($langs->trans("Other"),'','').'
'; $var=true; print ''; - print ''; + print ''; + // Hide any PDF informations $var=!$var; - print ''; + + // Encrypt and protect PDF + $var=!$var; + print ""; + print ''; + print ''; + print '"; + + print ""; + print ''; + if ($conf->global->MAIN_FEATURES_LEVEL > 1) { //Desc $var=!$var; - print ''; //Ref $var=!$var; - print ''; //Details $var=!$var; - print ''; } diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index a78d2354141..9c4bfc67af4 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -154,19 +154,6 @@ else if ($action == 'disable_encryptdbpassconf') } } -if ($action == 'activate_pdfsecurity') -{ - dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity); - header("Location: security.php"); - exit; -} -else if ($action == 'disable_pdfsecurity') -{ - dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity); - header("Location: security.php"); - exit; -} - if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_set_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", '1','chaine',0,'',$conf->entity); @@ -364,37 +351,6 @@ print ""; print ""; print ''; -// Encryption et protection des PDF -$var=!$var; -print ""; -print ''; -print ''; - -print '"; - -print ""; -print ''; - - // Disable link "Forget password" on logon $var=!$var; From 55f9879a6cf9c7030d91808be92892b6b44f6afc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Mar 2013 14:53:15 +0100 Subject: [PATCH 2/3] Replace table with div. Prepare work for android application. --- htdocs/adherents/index.php | 12 +++++++----- htdocs/categories/index.php | 13 ++++++++----- htdocs/comm/index.php | 16 +++++++++------- htdocs/comm/mailing/index.php | 18 +++++++++--------- htdocs/comm/propal/index.php | 14 +++++++++----- htdocs/comm/prospect/index.php | 19 ++++++++++--------- htdocs/commande/index.php | 14 +++++++++----- htdocs/compta/index.php | 19 +++++++++---------- htdocs/compta/paiement/cheque/index.php | 16 +++++++++------- htdocs/compta/prelevement/index.php | 13 +++++++++---- htdocs/compta/ventilation/index.php | 22 ++++++++++++++-------- htdocs/ecm/index.php | 2 ++ htdocs/expedition/index.php | 17 ++++++++++------- htdocs/fourn/index.php | 20 +++++++++++++------- htdocs/product/index.php | 14 ++++++++++---- htdocs/product/stock/index.php | 16 +++++++++++----- htdocs/societe/index.php | 15 ++++++++++----- htdocs/user/home.php | 18 ++++++++++-------- 18 files changed, 168 insertions(+), 110 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 9e86de34c58..e3787b18c89 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -47,7 +47,6 @@ $subscriptionstatic=new Cotisation($db); print_fiche_titre($langs->trans("MembersArea")); -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; + print '
'.$langs->trans("HideAnyVATInformationOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); print '
'; + $text = $langs->trans("ProtectAndEncryptPdfFiles"); + $desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); + print $desc; + print ''; + if($conf->global->PDF_SECURITY_ENCRYPTION == 1) + { + print img_picto($langs->trans("Active"),'tick'); + } + print ''; + if ($conf->global->PDF_SECURITY_ENCRYPTION == 0) + { + print ''.$langs->trans("Activate").''; + } + if($conf->global->PDF_SECURITY_ENCRYPTION == 1) + { + print ''.$langs->trans("Disable").''; + } + print "
'.$langs->trans("HideDescOnPDF").''; + print '
'.$langs->trans("HideDescOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1); print '
'.$langs->trans("HideRefOnPDF").''; + print '
'.$langs->trans("HideRefOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1); print '
'.$langs->trans("HideDetailsOnPDF").''; + print '
'.$langs->trans("HideDetailsOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); print '
'; -$text = $langs->trans("ProtectAndEncryptPdfFiles"); -$desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); -print $desc; -print ''; -if($conf->global->PDF_SECURITY_ENCRYPTION == 1) -{ - print img_picto($langs->trans("Active"),'tick'); -} - -print ''; -if ($conf->global->PDF_SECURITY_ENCRYPTION == 0) -{ - print ''.$langs->trans("Activate").''; -} -if($conf->global->PDF_SECURITY_ENCRYPTION == 1) -{ - print ''.$langs->trans("Disable").''; -} -print "
'; $var=True; @@ -122,7 +121,8 @@ if ($result) } -print '
'; +//print '
'; +print '
'; // Formulaire recherche adherent @@ -195,7 +195,9 @@ if ($conf->use_javascript_ajax) print '
'; } -print ''; + +//print ''; +print '
'; $var=true; @@ -416,8 +418,8 @@ print "".price(price2num($numb>0?($tot/$numb):0,'MT'))."\n"; print "
\n"; -print ''; -print ''; +//print ''; +print '
'; llxFooter(); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index cf0138a0022..532a95f7317 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -60,9 +60,9 @@ llxHeader('',$title,'','',0,0,$arrayofjs,$arrayofcss); print_fiche_titre($title); -print ''; - -print '
'; +//print ''; +//print '
'; +print '
'; /* @@ -89,7 +89,9 @@ print '
'; -print ''; + +//print ''; +print '
'; /* @@ -121,7 +123,8 @@ if ($catname || $id > 0) } -print '
'; +//print '
'; +print '
'; print '
'; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index cfcd8ee121c..c30d75192d8 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -87,8 +87,9 @@ llxHeader(); print_fiche_titre($langs->trans("CustomerArea")); +print '
'; +/* print ''; - print ''; if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) || (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) || @@ -96,6 +97,7 @@ if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) || { print ''; -print '
'; } +*/ // Recherche Propal if (! empty($conf->propal->enabled) && $user->rights->propal->lire) @@ -256,7 +258,8 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } } -if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) || + +/*if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) || (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) || (! empty($conf->commande->enabled) && $user->rights->commande->lire)) { @@ -266,8 +269,8 @@ if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) || else { print ''; -} - +}*/ +print '
'; $NBMAX=3; @@ -542,11 +545,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } -print '
'; +//print ''; +print '
'; llxFooter(); $db->close(); - ?> \ No newline at end of file diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index e2cbe9fb5a9..b2ff4d92f76 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -44,9 +44,9 @@ llxHeader('','EMailing',$help_url); print_fiche_titre($langs->trans("MailingArea")); -print ''; - -print ''; -print '
'; +//print ''; +//print '
'; +print '
'; // Recherche emails @@ -141,7 +141,9 @@ if (is_resource($handle)) print "

"; -print '
'; + +//print ''; +print '
'; /* @@ -198,11 +200,8 @@ else } - -print '
'; - -$db->close(); +//print ''; +print '
'; if ($langs->file_exists("html/spam.html",0)) { @@ -217,4 +216,5 @@ if ($langs->file_exists("html/spam.html",0)) { llxFooter(); +$db->close(); ?> diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 41bc6bf5f0b..4ac166b54a2 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -54,9 +54,10 @@ llxHeader("",$langs->trans("ProspectionArea"),$help_url); print_fiche_titre($langs->trans("ProspectionArea")); -print ''; +//print '
'; +//print '
'; +print '
'; -print '
'; /* * Search form @@ -199,7 +200,9 @@ if (! empty($conf->propal->enabled)) } } -print ''; + +//print ''; +print '
'; $max=5; @@ -509,10 +512,11 @@ if (! empty($conf->propal->enabled)) } */ -print '
'; +//print ''; +print '
'; -$db->close(); llxFooter(); +$db->close(); ?> diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index 6d9ad5c3f62..bf53b674bc5 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -46,9 +46,10 @@ llxHeader(); print_fiche_titre($langs->trans("ProspectionArea")); -print ''; +//print '
'; +//print ''; -print '
'; +print '
'; -print '
'; if (! empty($conf->propal->enabled)) { @@ -158,17 +159,18 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) } } + +//print ''; +print '
'; + + /* * Actions commerciales a faire - * */ -print '
'; - if (! empty($conf->agenda->enabled)) show_array_actions_to_do(10); /* * Dernieres propales ouvertes - * */ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) { @@ -276,11 +278,10 @@ if ($resql) } -print '
'; +//print ''; +print '
'; llxFooter(); $db->close(); - ?> \ No newline at end of file diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index c382599bb4c..3301721df7a 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -55,9 +55,10 @@ llxHeader("",$langs->trans("Orders"),$help_url); print_fiche_titre($langs->trans("OrdersArea")); -print ''; +//print '
'; +//print '
'; +print '
'; -print '
'; /* * Search form @@ -204,7 +205,9 @@ if (! empty($conf->commande->enabled)) } } -print ''; + +//print ''; +print '
'; $max=5; @@ -421,10 +424,11 @@ if (! empty($conf->commande->enabled)) } -print '
'; +//print ''; +print '
'; -$db->close(); llxFooter(); +$db->close(); ?> diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 978109ff67e..d4aad86977e 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -104,10 +104,9 @@ llxHeader("",$langs->trans("AccountancyTreasuryArea")); print_fiche_titre($langs->trans("AccountancyTreasuryArea")); -print ''; - -print ''; -print ''; - -print '
'; +//print ''; +//print ''; -print '
'; +print '
'; $max=3; @@ -323,8 +322,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- } } -print '
'; + +//print ''; +print '
'; + // Last modified customer invoices if (! empty($conf->facture->enabled) && $user->rights->facture->lire) @@ -1031,12 +1032,10 @@ if ($resql) print "

"; } -print '
'; +//print ''; +print '
'; llxFooter(); $db->close(); - ?> diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index aec05b00da4..45a1f665a37 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -46,9 +46,9 @@ llxHeader('',$langs->trans("ChequesArea")); print_fiche_titre($langs->trans("ChequesArea")); -print ''; - -print '
'; +//print ''; +//print '\n"; -print "
'; +print '
'; $sql = "SELECT count(b.rowid)"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -86,7 +86,8 @@ else } -print '
'; +//print ''; +print '
'; $sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.number as ref"; @@ -143,10 +144,11 @@ else dol_print_error($db); } -print "
\n"; -$db->close(); +//print "
\n"; +print '
'; llxFooter(); + +$db->close(); ?> diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 907aad6679c..5fdd334db55 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -61,9 +61,10 @@ if (prelevement_check_config() < 0) print_fiche_titre($langs->trans("CustomersStandingOrdersArea")); -print ''; +//print '
'; +//print '
'; +print '
'; -print '
'; $thirdpartystatic=new Societe($db); $invoicestatic=new Facture($db); @@ -85,8 +86,9 @@ print ''; print price($bprev->SommeAPrelever()); print '

'; -print ''; +//print ''; +print '
'; /* @@ -218,7 +220,10 @@ else } -print ''; +//print ''; +print '
'; llxFooter(); + +$db->close(); ?> diff --git a/htdocs/compta/ventilation/index.php b/htdocs/compta/ventilation/index.php index 9cd939868c8..d01d1735734 100644 --- a/htdocs/compta/ventilation/index.php +++ b/htdocs/compta/ventilation/index.php @@ -32,14 +32,14 @@ llxHeader('','Compta - Ventilation'); print_fiche_titre("Ventilation Comptable"); -print ''; - -print '
'; +//print ''; +//print '
'; +print '
'; $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet as fd"; $sql.= " , ".MAIN_DB_PREFIX."facture as f"; $sql.= " WHERE fd.fk_code_ventilation = 0"; -$sql.= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;"; +$sql.= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1"; $result = $db->query($sql); if ($result) @@ -56,14 +56,17 @@ print ''; print ''; print ''; $var=!$var; -print "".''; +print "".''; $var=!$var; print "
'.$langs->trans("Lines").'
'.$langs->trans("Type").''.$langs->trans("Nb").'
'.$langs->trans("Invoices").''.$nbfac.'
'.$langs->trans("Invoices").''.$nbfac.'
\n"; -print '
'; + +//print ''; +print '
'; + print ''; -print ''; +print ''; $sql = "SELECT count(*), ccg.intitule, ccg.rowid,ccg.numero FROM ".MAIN_DB_PREFIX."facturedet as fd"; $sql.= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg"; @@ -90,8 +93,11 @@ if ($resql) } print "
Type'.$langs->trans("NbOfLines").''.$langs->trans("AccountNumber").''.$langs->trans("TransID").'
'.$langs->trans("Type").''.$langs->trans("NbOfLines").''.$langs->trans("AccountNumber").''.$langs->trans("TransID").'
\n"; -print '
'; +//print '
'; +print '
'; + llxFooter(); +$db->close(); ?> diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 2f42787dda6..418177e44d8 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -393,9 +393,11 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { } print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager")); +print '
'; print $langs->trans("ECMAreaDesc")."
"; print $langs->trans("ECMAreaDesc2")."
"; print "
\n"; +print '
'; // Confirm remove file (for non javascript users) if ($action == 'delete' && empty($conf->use_javascript_ajax)) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 084fb65aca7..1b28f1f7b7f 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -43,8 +43,11 @@ llxHeader('',$langs->trans("Sendings"),$helpurl); print_fiche_titre($langs->trans("SendingsArea")); -print ''; -print '
'; + +//print ''; +//print '
'; +print '
'; + $var=false; print ''; @@ -159,10 +162,8 @@ if ($resql) } -/* - * - */ -print '
'; +//print ''; +print '
'; /* @@ -272,7 +273,9 @@ if ($resql) } else dol_print_error($db); -print '
'; + +//print '
'; +print '
'; llxFooter(); diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index c03004cf7b5..ec832a670d2 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -50,8 +50,11 @@ llxHeader("",$langs->trans("SuppliersArea")); print_fiche_titre($langs->trans("SuppliersArea")); -print ''; -print '
'; + +//print ''; +//print '\n"; -print '\n"; -print "
'; +print '
'; + // Orders $commande = new CommandeFournisseur($db); @@ -221,8 +224,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- } } -print "
'; + +//print ''; +print '
'; + /* * List last modified supliers @@ -314,10 +319,11 @@ if (count($companystatic->SupplierCategories)) print "
\n"; } -print "
\n"; -$db->close(); +//print "
\n"; +print '
'; llxFooter(); + +$db->close(); ?> diff --git a/htdocs/product/index.php b/htdocs/product/index.php index bb5baaaf698..f0ab56ae6f0 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -66,9 +66,11 @@ llxHeader("",$langs->trans("ProductsAndServices"),$helpurl); print_fiche_titre($transAreaType); -print ''; -print '
'; +//print ''; +//print ''; print '
'; +print '
'; + /* * Zone recherche produit/service @@ -156,7 +158,10 @@ print $total; print '
'; -print '
'; + +//print ''; +print '
'; + /* * Last modified products @@ -253,7 +258,8 @@ else dol_print_error($db); } -print '
'; +//print '
'; +print '
'; llxFooter(); diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 1dc2d16957b..d544175b2fd 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -42,8 +42,11 @@ llxHeader("",$langs->trans("Stocks"),$help_url); print_fiche_titre($langs->trans("StocksArea")); -print ''; -print '
'; + +//print ''; +//print '
'; +print '
'; + /* * Zone recherche entrepot @@ -101,7 +104,10 @@ else dol_print_error($db); } -print '
'; + +//print ''; +print '
'; + // Last movements $max=10; @@ -157,10 +163,10 @@ if ($resql) print "
"; } -print '
'; +//print ''; +print '
'; llxFooter(); $db->close(); - ?> diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index f273549efb9..e113ad7e0e1 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -48,9 +48,11 @@ llxHeader("",$langs->trans("ThirdParties"),$helpurl); print_fiche_titre($transAreaType); -print ''; -print '
'; +//print ''; +//print ''; print '
'; +print '
'; + /* * Search area @@ -148,7 +150,10 @@ print $total; print '
'; -print '
'; + +//print ''; +print '
'; + /* * Last third parties modified @@ -243,10 +248,10 @@ else dol_print_error($db); } -print '
'; +//print ''; +print '
'; llxFooter(); $db->close(); - ?> diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 7dd9e44f800..66c74e5d290 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -56,9 +56,10 @@ llxHeader(); print_fiche_titre($langs->trans("MenuUsersAndGroups")); -print ''; +//print '
'; +//print ''; -print '
'; +print '
'; -print '
'; // Search User $var=false; @@ -87,7 +88,9 @@ if ($canreadperms) print ''; } -print ''; + +//print ''; +print '
'; /* @@ -250,11 +253,10 @@ if ($canreadperms) } } -print '
'; - -$db->close(); - +//print ''; +print '
'; llxFooter(); + +$db->close(); ?> From 5ad1cbbfa5c7807fe7db63720e4c9e89a3d9cdab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Mar 2013 15:04:27 +0100 Subject: [PATCH 3/3] Fix: Filter lost during navigation --- htdocs/admin/tools/listevents.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 7f5abf388eb..8056080be23 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -111,7 +111,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) * View */ -llxHeader(); +llxHeader('',$langs->trans("Audit")); $form=new Form($db); @@ -124,11 +124,11 @@ $sql.= " u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."events as e"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user"; $sql.= " WHERE e.entity = ".$conf->entity; -if ($search_code) { $usefilter++; $sql.=" AND e.type LIKE '%".$search_code."%'"; } -if ($search_ip) { $usefilter++; $sql.=" AND e.ip LIKE '%".$search_ip."%'"; } -if ($search_user) { $usefilter++; $sql.=" AND u.login LIKE '%".$search_user."%'"; } -if ($search_desc) { $usefilter++; $sql.=" AND e.description LIKE '%".$search_desc."%'"; } -if ($search_ua) { $usefilter++; $sql.=" AND e.user_agent LIKE '%".$search_ua."%'"; } +if ($search_code) { $usefilter++; $sql.=" AND e.type LIKE '%".$db->escape($search_code)."%'"; } +if ($search_ip) { $usefilter++; $sql.=" AND e.ip LIKE '%".$db->escape($search_ip)."%'"; } +if ($search_user) { $usefilter++; $sql.=" AND u.login LIKE '%".$db->escape($search_user)."%'"; } +if ($search_desc) { $usefilter++; $sql.=" AND e.description LIKE '%".$db->escape($search_desc)."%'"; } +if ($search_ua) { $usefilter++; $sql.=" AND e.user_agent LIKE '%".$db->escape($search_ua)."%'"; } $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); //print $sql; @@ -138,7 +138,14 @@ if ($result) $num = $db->num_rows($result); $i = 0; - print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num,0,'setup'); + $param=''; + if ($search_code) $param.='&search_code='.$search_code; + if ($search_ip) $param.='&search_ip='.$search_ip; + if ($search_user) $param.='&search_user='.$search_user; + if ($search_desc) $param.='&search_desc='.$search_desc; + if ($search_ua) $param.='&search_ua='.$search_ua; + + print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, 'setup'); if ($action == 'purge') { @@ -178,7 +185,7 @@ if ($result) print ''; print ''; - print ''; + //print ''; print ''; print '';