function tpl_autoset_starttpl($idclient, $idtpl) { global $db, $cms_db; $sql = "SELECT \n\t\t\t\tcount(idtpl) AS c FROM " . $cms_db['tpl'] . " \n\t\t\tWHERE \n\t\t\t\tidclient='{$idclient}'"; $db->query($sql); $db->next_record(); if ($db->f('c') == 1) { tpl_make_start_tpl($idclient, $idtpl); } return true; }
/****************************************************************************** 1. Ben�tigte Funktionen und Klassen includieren ******************************************************************************/ include 'inc/fnc.tpl.php'; /****************************************************************************** 2. Eventuelle Actions/ Funktionen abarbeiten ******************************************************************************/ $perm->check('area_tpl'); switch ($action) { case 'delete': // Template l�schen $perm->check(5, 'tpl', $idtpl); $errno = tpl_delete_template($idtpl); break; case 'maketplstart': $errno = tpl_make_start_tpl((int) $client, (int) $idtpl); break; } /****************************************************************************** 3. Eventuelle Dateien zur Darstellung includieren ******************************************************************************/ include 'inc/inc.header.php'; /****************************************************************************** 4. Bildschirmausgabe aufbereiten und ausgeben ******************************************************************************/ $tpl->loadTemplatefile('tpl.tpl'); $tmp['AREA'] = $cms_lang['area_tpl']; $tmp['FOOTER_LICENSE'] = $cms_lang['login_licence']; if ($perm->have_perm(2, 'area_tpl', 0)) { $tmp['NEW_TEMPLATE'] = "\n<a class=\"action\" href=\"" . $sess->url("main.php?area=tpl_edit") . "\">" . $cms_lang["tpl_actions"]["10"] . "</a>"; }