From 2fdd8e0cec9f6fb2ffeb9301c5078874b64c52e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 31 Oct 2004 17:13:24 +0000 Subject: [PATCH] Fix: register_globals --- htdocs/comm/action/index.php | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 48705f0df74..85254ada34a 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -35,6 +35,8 @@ require("../../contact.class.php"); require("../../cactioncomm.class.php"); require("../../actioncomm.class.php"); +$langs->load("companies"); + /* * Sécurité accés client @@ -45,14 +47,10 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } -llxHeader(); - -/* - * - * Affichage liste des actions - * - */ +$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; +$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; +$page = isset($_GET["page"])?$_GET["page"]:$_POST["page"]; if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; @@ -66,6 +64,16 @@ if ($sortfield == "") $sortfield="a.datea"; } + +llxHeader(); + + +/* + * + * Affichage liste des actions + * + */ + $sql = "SELECT s.nom as societe, s.idp as socidp, s.client, a.id,".$db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact, a.note, a.percent as percent"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid"; @@ -108,10 +116,11 @@ if ( $db->query($sql) ) print ''; print ''.$langs->trans("Date").''; print 'Avancement'; - print 'Action'; - print 'Société'; - print 'Contact'; - print "".$langs->trans("Comments")."".$langs->trans("Author").""; + print ''.$langs->trans("Action").''; + print ''.$langs->trans("Company").''; + print ''.$langs->trans("Contact").''; + print ''.$langs->trans("Comments").''; + print ''.$langs->trans("Author").''; print "\n"; $var=true; while ($i < min($num,$limit))