* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-05-08 * modified 2008-06-26, Dominik Ziegler, add security fix * * $Id$: * }} * */ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } $tpl->set('s', 'SID', $sess->id); if (!isset($action)) $action = ""; if ($action == "client_delete") { if ($perm->have_perm_area_action("client", "client_delete")) { $sql = "DELETE FROM " .$cfg["tab"]["clients"]. " WHERE idclient = '".Contenido_Security::toInteger($idclient)."'"; $db->query($sql); } } $sql = "SELECT * FROM ".$cfg["tab"]["clients"]; $db->query($sql); while ($db->next_record()) { $idclient = $db->f("idclient"); if ((strpos($auth->auth["perm"],"admin[$idclient]") !== false) || (strpos($auth->auth["perm"],"sysadmin") !== false)) { $dark = !$dark; if ($dark) { $bgColor = $cfg["color"]["table_dark"]; } else { $bgColor = $cfg["color"]["table_light"]; } $tmp_mstr = '%s'; $idclient = $db->f("idclient"); $mstr = sprintf($tmp_mstr, 'right_top', $sess->url("main.php?area=$area&frame=3&idclient=$idclient"), 'right_bottom', $sess->url("main.php?area=client_edit&frame=4&idclient=$idclient"), $db->f("name") ); if (!$classclient->hasLanguageAssigned($idclient) && $perm->have_perm_area_action('client',"client_delete") ) { $delTitle = i18n("Delete client"); $delDescr = sprintf(i18n("Do you really want to delete the following client:

%s
"),clHtmlSpecialChars($db->f("name"))); $tpl->set('d', 'DELETE', ''.$delTitle.''); } else { $tpl->set('d', 'DELETE', ' '); } $tpl->set('d', 'ICON', ''); $tpl->set('d', 'BGCOLOR', $bgColor); $tpl->set('d', 'TEXT', $mstr); if ($_GET['idclient'] == $idclient) { $tpl->set('d', 'ID', 'id="marked"'); } else { $tpl->set('d', 'ID', ''); } $tpl->next(); } } # Generate template $tpl->generate($cfg['path']['templates'] . $cfg['templates']['client_menu']); ?>