From b040b679fbd11b46564b295b496db40e158bbb22 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Wed, 27 Feb 2013 16:37:31 +0100 Subject: [PATCH] Welcome message - code and LAN cleanup --- e107_admin/wmessage.php | 92 ++++++------------- e107_languages/English/admin/lan_wmessage.php | 2 +- 2 files changed, 28 insertions(+), 66 deletions(-) diff --git a/e107_admin/wmessage.php b/e107_admin/wmessage.php index 230dfb189..aea30d406 100644 --- a/e107_admin/wmessage.php +++ b/e107_admin/wmessage.php @@ -2,16 +2,10 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2013 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * - * - * - * $Source: /cvs_backup/e107_0.8/e107_admin/wmessage.php,v $ - * $Revision$ - * $Date$ - * $Author$ */ require_once("../class2.php"); @@ -120,13 +114,6 @@ if (isset($_POST['main_delete'])) } } -/* -if (isset($message)) -{ - $ns->tablerender("", "
".$message."
"); -} -*/ - $ns->tablerender($caption, $mes->render() . $text); // Show Existing ------- @@ -135,7 +122,6 @@ if ($action == "main" || $action == "") if ($wm_total = $sql->db_Select("generic", "*", "gen_type='wmessage' ORDER BY gen_id ASC")) { $wmList = $sql->db_getList(); - // $text = $rs->form_open('post', e_SELF, 'myform_wmessage', '', ''); $text = $frm->open('myform_wmessage','post',e_SELF); $text .= " @@ -163,8 +149,8 @@ if ($action == "main" || $action == "") "; } @@ -173,7 +159,6 @@ if ($action == "main" || $action == "") $text .= $frm->close(); } else { - //$text .= "
".WMLAN_09."
"; $mes->addInfo(WMLAN_09); } @@ -198,51 +183,41 @@ if ($action == "create" || $action == "edit") - "; - - $text .= " - - + + + + + + "; - $text .= " - - + + + - - -
".strip_tags($tp->toHTML($row['gen_ip']))." ".r_userclass_name($row['gen_intdata'])." - ".ADMIN_EDIT_ICON." - + ".ADMIN_EDIT_ICON." +
".WMLAN_10." - toForm(vartrue($row['gen_ip']))."\" /> - ".WMLAN_10."".$frm->text(wm_caption, $tp->toForm(vartrue($row['gen_ip'])), 80)."
".WMLAN_04."
".WMLAN_04." - -
"; - // $text .= display_help("helpb", "admin"); //XXX Serves as BC Check - $text .= " -
".LAN_VISIBILITY."".r_userclass("wm_active", vartrue($row['gen_intdata']), "off", "public,guest,nobody,member,admin,classes")."
".LAN_VISIBILITY."".r_userclass("wm_active", vartrue($row['gen_intdata']), "off", "public,guest,nobody,member,admin,classes")."
"; + - $text .= "
"; - if($sub_action == "edit") - { - $text .= $frm->admin_button('wm_update', LAN_UPDATE, 'update'); - } - else - { - $text .= $frm->admin_button('wm_insert', LAN_CREATE, 'create'); - } + if($sub_action == "edit") + { + $text .= $frm->admin_button('wm_update', LAN_UPDATE, 'update'); + } + else + { + $text .= $frm->admin_button('wm_insert', LAN_CREATE, 'create'); + } $text .= ""; $text .= "
- - "; + "; - $ns->tablerender(WMLAN_01.SEP.LAN_CREATE, $mes->render() . $text); + $ns->tablerender(WMLAN_00.SEP.LAN_CREATE, $mes->render() . $text); } @@ -259,21 +234,12 @@ if ($action == "opt") { - - - ".WMLAN_05."
- ".WMLAN_06." - - ". (varset($pref['wm_enclose'], 0) ? "" : "")." - + ".WMLAN_05." + ".$frm->checkbox('wm_enclose', 1, varset($pref['wm_enclose'],0))."".WMLAN_06." - - - ".WMLAN_07." - - ". (varset($pref['wmessage_sc'], 0) ? "" : "")." - + ".WMLAN_07." + ".$frm->checkbox('wmessage_sc', 1, varset($pref['wmessage_sc'],0))." @@ -285,8 +251,6 @@ if ($action == "opt") { "; $ns->tablerender(WMLAN_00.SEP.LAN_PREFS, $mes->render() . $text); - - } function wmessage_adminmenu() @@ -323,6 +287,4 @@ function welcome_adminlog($msg_num='00', $id=0, $woffle='') } $admin_log->log_event('WELCOME_'.$msg_num,$msg,E_LOG_INFORMATIVE,''); } - - ?> \ No newline at end of file diff --git a/e107_languages/English/admin/lan_wmessage.php b/e107_languages/English/admin/lan_wmessage.php index d24068d4c..24c446928 100644 --- a/e107_languages/English/admin/lan_wmessage.php +++ b/e107_languages/English/admin/lan_wmessage.php @@ -18,7 +18,7 @@ // define("WMGLAN_7", "Welcome message settings updated."); define("WMLAN_00","Welcome Messages"); -define("WMLAN_01","Create New Message"); +//define("WMLAN_01","Create New Message"); define("WMLAN_02","Message"); //define("WMLAN_03","Visibility"); define("WMLAN_04","Message Text");