diff --git a/htdocs/comm/action/listevents.php b/htdocs/comm/action/listevents.php deleted file mode 100644 index f193714b909..00000000000 --- a/htdocs/comm/action/listevents.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - \file htdocs/comm/action/listevents.php - \ingroup agenda - \brief Page liste des evenements - \version $Id$ -*/ - -require_once("./pre.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); -require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); - -$langs->load("companies"); -$langs->load("agenda"); - -$socid = isset($_GET["socid"])?$_GET["socid"]:$_POST["socid"]; -$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; -$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; -$page = isset($_GET["page"])?$_GET["page"]:$_POST["page"]; - -// Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'societe',$socid,''); - -if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; -$offset = $limit * $page ; -if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="e.dateevent"; - -$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"]; - - -llxHeader(); - -$userstatic=new User($db); - -$sql = "SELECT e.rowid, e.type, ".$db->pdate("e.dateevent")." as dateevent,"; -$sql.= " e.fk_user, e.label, e.description,"; -$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.= " ORDER BY $sortfield $sortorder"; -$sql.= $db->plimit($conf->liste_limit+1, $offset); - -$result = $db->query($sql); -if ($result) -{ - $num = $db->num_rows($result); - $i = 0; - - print_barre_liste($langs->trans("ListOfEvents"), $page, "listevents.php","",$sortfield,$sortorder,'',$num); - - print ''; - print ''; - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"e.type","","",'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"u.login","","",'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"e.label","","",'align="left"',$sortfield,$sortorder); - print ''; - print "\n"; - -/* - // Lignes des champs de filtre - print ''; - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print "\n"; - print ''; -*/ - $var=True; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object(); - - $var=!$var; - - print ""; - print ''; - print ''; - $userstatic->id=$obj->fk_user; - $userstatic->login=$obj->login; - print ''; - print ''; -// print ''; - print ''; - print "\n"; - $i++; - } - print "
 
  '; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.dolibarr_print_date($obj->dateevent,'dayhour').''.$obj->type.''.$userstatic->getLoginUrl(1).''.$obj->label.''.$obj->description.' 
"; - $db->free(); -} -else -{ - dolibarr_print_error($db); -} - - -$db->close(); - -llxFooter('$Date$ - $Revision$'); -?>