get_files(e_PLUGIN."featurebox/templates/"); if (e_QUERY) { $qs = explode(".", e_QUERY); $action = varset($qs[0],FALSE); $id = intval(varset($qs[1],0)); } else { $action = FALSE; $id = FALSE; } if(isset($_POST['createFB']) || isset($_POST['updateFB'])) { if ($_POST['fb_title'] && $_POST['fb_text']) { $fbInfo = array(); $fbInfo['fb_title'] = $tp -> toDB($_POST['fb_title']); $fbInfo['fb_text'] = $tp -> toDB($_POST['fb_text']); $fbInfo['fb_mode'] = intval($_POST['fb_mode']); $fbInfo['fb_class'] = intval($_POST['fb_class']); $fbInfo['fb_rendertype'] = intval($_POST['fb_rendertype']); $fbInfo['fb_template'] = $tp -> toDB($_POST['fb_template']); if(isset($_POST['createFB'])) { $sql->db_Insert("featurebox", $fbInfo); $admin_log->logArrayAll('FBLAN_01',$fbInfo); $message = FBLAN_15; } if(isset($_POST['updateFB'])) { $sql->db_UpdateArray('featurebox',$fbInfo, 'WHERE `fb_id`='.intval($_POST['fb_id'])); $admin_log->logArrayAll('FBLAN_02',$fbInfo); $message = FBLAN_16; } } else { $message = FBLAN_17; } } if (($action == "delete") && $id) { $sql->db_Delete("featurebox", "fb_id=".$id); $admin_log->log_event('FBLAN_03',$id,E_LOG_INFORMATIVE,''); $message = FBLAN_18; } if (isset($message)) { $ns->tablerender("", "
".$message."
"); } if($headline_total = $sql->db_Select("featurebox")) { $nfArray = $sql -> db_getList(); $text = "
\n"; foreach($nfArray as $entry) { $text .= " "; } $text .= "
ID ".FBLAN_07." ".FBLAN_19."
".$entry['fb_id']." ".$entry['fb_title']." ".FBLAN_20." - ".FBLAN_21."
\n
"; } else { $text = FBLAN_05; } $ns->tablerender(FBLAN_06, $text); if($action == "edit") { if($sql->db_Select("featurebox", "*", "fb_id=".$id)) { $row = $sql->db_Fetch(); extract($row); } } else { unset($fb_name, $fb_text, $fb_mode, $fb_class); } $text = "
\n
".FBLAN_07."
".FBLAN_08."
".FBLAN_09." ".r_userclass("fb_class", $fb_class, 'off', "public, guests, nobody, member, admin, classes")."
".FBLAN_12." ".FBLAN_13." 
".FBLAN_14."
".FBLAN_22." ".FBLAN_23." 
".FBLAN_24."
".FBLAN_25."
".FBLAN_26."
".($action == "edit" ? "" : "")."
"; $caption = ($action == "edit" ? FBLAN_11 : FBLAN_10); $ns->tablerender($caption, $text); require_once(e_ADMIN."footer.php"); ?>