From 9ab872b199f556431e02c39e9d8d9781bf560391 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Fri, 17 Jul 2009 07:53:13 +0000 Subject: [PATCH] More icon cleanup, also reworked the $frm->thead function to automatically generate sorting-links based on a query-pattern. (ie. no need to enter urls into the field array) --- e107_admin/banlist.php | 10 +- e107_admin/cpage.php | 15 +- e107_admin/frontpage.php | 10 +- e107_admin/header.php | 14 +- e107_admin/links.php | 30 +- e107_admin/newspost.php | 22 +- e107_admin/plugin.php | 10 +- e107_admin/users.php | 351 ++++++++++-------- e107_admin/wmessage.php | 36 +- e107_handlers/form_handler.php | 58 ++- e107_images/admin_images/configure_16.png | Bin 0 -> 980 bytes e107_images/admin_images/configure_32.png | Bin 0 -> 1907 bytes e107_images/admin_images/info_16.png | Bin 1187 -> 978 bytes .../download/handlers/adminDownload_class.php | 52 ++- e107_plugins/gsitemap/admin_config.php | 12 +- e107_themes/_blank/admin_template.php | 14 +- 16 files changed, 363 insertions(+), 271 deletions(-) create mode 100644 e107_images/admin_images/configure_16.png create mode 100644 e107_images/admin_images/configure_32.png diff --git a/e107_admin/banlist.php b/e107_admin/banlist.php index 2d6398ab7..eca1d3ce3 100644 --- a/e107_admin/banlist.php +++ b/e107_admin/banlist.php @@ -9,9 +9,9 @@ * Ban List Management * * $Source: /cvs_backup/e107_0.8/e107_admin/banlist.php,v $ - * $Revision: 1.15 $ - * $Date: 2009-06-11 20:42:32 $ - * $Author: e107steved $ + * $Revision: 1.16 $ + * $Date: 2009-07-17 07:53:13 $ + * $Author: e107coders $ * */ @@ -729,8 +729,8 @@ switch($action) case 'ban_options': $row_class = ' class="center"'; $val = " - ".LAN_EDIT." -"; + ".ADMIN_EDIT_ICON." +"; break; case 'banlist_notes': default: diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index b3481e5d7..55e192ebf 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -9,8 +9,8 @@ * Custom Menus/Pages Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $ - * $Revision: 1.16 $ - * $Date: 2009-07-14 11:05:48 $ + * $Revision: 1.17 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -161,12 +161,11 @@ class page $text .= "
".CUSLAN_5." - - ".$frm->colGroup($this->fields,$this->fieldpref)." - - ".$frm->thead($this->fields,$this->fieldpref)." - - "; +
". + $frm->colGroup($this->fields,$this->fieldpref). + $frm->thead($this->fields,$this->fieldpref). + + ""; if(!$sql->db_Select("page", "*", "ORDER BY page_datestamp DESC", "nowhere")) { diff --git a/e107_admin/frontpage.php b/e107_admin/frontpage.php index 8ca74d7ca..21e5ff725 100644 --- a/e107_admin/frontpage.php +++ b/e107_admin/frontpage.php @@ -9,9 +9,9 @@ * Administration Area - Front page * * $Source: /cvs_backup/e107_0.8/e107_admin/frontpage.php,v $ - * $Revision: 1.10 $ - * $Date: 2008-12-21 11:47:29 $ - * $Author: secretr $ + * $Revision: 1.11 $ + * $Date: 2009-07-17 07:53:13 $ + * $Author: e107coders $ * */ @@ -317,8 +317,8 @@ class frontpage diff --git a/e107_admin/header.php b/e107_admin/header.php index d0c54bdd4..acce1d037 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $ -| $Revision: 1.36 $ -| $Date: 2009-07-17 03:53:14 $ +| $Revision: 1.37 $ +| $Date: 2009-07-17 07:53:13 $ | $Author: e107coders $ +---------------------------------------------------------------+ */ @@ -157,8 +157,14 @@ if (!defined('ADMIN_INFO_ICON')) if (!defined('ADMIN_CONFIGURE_ICON')) { - define("ADMIN_CONFIGURE_ICON", ""); - define("ADMIN_CONFIGURE_ICON_PATH", e_IMAGE."admin_images/cat_tools_16.png"); + define("ADMIN_CONFIGURE_ICON", ""); + define("ADMIN_CONFIGURE_ICON_PATH", e_IMAGE."admin_images/configure_16.png"); +} + +if (!defined('ADMIN_ADD_ICON')) +{ + define("ADMIN_ADD_ICON", ""); + define("ADMIN_ADD_ICON_PATH", e_IMAGE."admin_images/add_16.png"); } if (!defined('ADMIN_VIEW_ICON')) diff --git a/e107_admin/links.php b/e107_admin/links.php index 6424a230b..5f511caad 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -9,8 +9,8 @@ * Administration Area - Site Links * * $Source: /cvs_backup/e107_0.8/e107_admin/links.php,v $ - * $Revision: 1.24 $ - * $Date: 2009-07-17 03:53:14 $ + * $Revision: 1.25 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -341,18 +341,19 @@ class links + + + - - - - + + @@ -406,7 +407,7 @@ class links - + @@ -414,7 +415,7 @@ class links - + @@ -437,7 +438,7 @@ class links if($indent) { - $subimage = ""; + $subimage = ""; $subspacer = ($indent > 1) ? " style='padding-left: ".(($indent - 1) * 16)."px'" : ""; } @@ -453,11 +454,7 @@ class links "; $text .= " - + + "; diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 9f7270bf7..8a7a9a205 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -9,8 +9,8 @@ * News Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $ - * $Revision: 1.43 $ - * $Date: 2009-07-14 11:05:50 $ + * $Revision: 1.44 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ */ require_once("../class2.php"); @@ -164,9 +164,11 @@ class admin_newspost var $_fields; var $_sort_order; var $_sort_link; + var $fieldpref; function admin_newspost($qry, $pstobj) { + global $user_pref; $this->parseRequest($qry); require_once(e_HANDLER."calendar/calendar_class.php"); @@ -174,6 +176,8 @@ class admin_newspost $this->_pst = &$pstobj; + $this->fieldpref = $user_pref['admin_news_columns']; + $this->_fields = array( "checkboxes" => array("title" => "", "forced"=> TRUE, "width" => "3%", "thclass" => "center first", "url" => ""), "news_id" => array("title" => LAN_NEWS_45, "type"=>"number", "width" => "5%", "thclass" => "center", "url" => e_SELF."?main.news_id.".$this->_sort_link.".".$this->getFrom()), @@ -187,7 +191,7 @@ class admin_newspost "news_sticky" => array("title" => LAN_NEWS_28, "type"=>"boolean", "width" => "auto", "thclass" => "", "url" => ""), "news_allow_comments" => array("title" => NWSLAN_15, "type"=>"boolean", "width" => "auto", "thclass" => "", "url" => ""), "news_comment_total" => array("title" => LAN_NEWS_60, "type"=>"number", "width" => "auto", "thclass" => "", "url" => ""), - "options" => array("title" => LAN_OPTIONS, "width" => "300px", "thclass" => "center last", "url" => "") + "options" => array("title" => LAN_OPTIONS, "width" => "10%", "thclass" => "center last", "url" => "", 'forced'=>TRUE) ); @@ -588,6 +592,7 @@ class admin_newspost global $user_pref,$admin_log; $user_pref['admin_news_columns'] = $_POST['e-columns']; save_prefs('user'); + $this->fieldpref = $user_pref['admin_news_columns']; } function show_existing_items() @@ -610,8 +615,6 @@ class admin_newspost $field_columns = $this->_fields; - $field_count = count($field_columns); - $e107 = &e107::getInstance(); // Grab news Category Names; @@ -668,12 +671,9 @@ class admin_newspost
".NWSLAN_4."
".$this->lookup_path($current_value['page'])." ".$this->lookup_path($current_value['force'])." - - + +
".LCLAN_89." ".LCLAN_15."".LAN_OPTIONS."".LCLAN_95."".LCLAN_95." ".LCLAN_91." ".LAN_ORDER."".LAN_OPTIONS."
".LCLAN_89." ".LCLAN_15." (".LCLAN_12.": ".$link_category.")".LAN_OPTIONS."".LAN_OPTIONS." hihihi ".LCLAN_95." ".LCLAN_91." ".LAN_ORDER." - ".LINKLAN_10."  - ".ADMIN_EDIT_ICON."  - - ".r_userclass("link_class[".$link_id."]", $link_class, "off", "public,guest,nobody,member,main,admin,classes")." "; @@ -473,6 +470,11 @@ class links $text .= " + ".ADMIN_ADD_ICON."  + ".ADMIN_EDIT_ICON."  + +
- ".$frm->colGroup($this->_fields,$user_pref['admin_news_columns'])." - - ".$frm->thead($this->_fields,$user_pref['admin_news_columns'])." - - - "; + ".$frm->colGroup($this->_fields,$this->fieldpref). + $frm->thead($this->_fields,$this->fieldpref,"main.[FIELD].[ASC].[FROM]")." + "; $ren_type = array("default","title","other-news","other-news 2"); diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 86884fbad..451bd88c9 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $ -| $Revision: 1.33 $ -| $Date: 2009-07-17 03:53:14 $ +| $Revision: 1.34 $ +| $Date: 2009-07-17 07:53:13 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -671,10 +671,8 @@ class pluginManager{
".NWSLAN_4."
- ".$frm->colGroup($this->fields,$this->fieldpref)." - - ".$frm->thead($this->fields,$this->fieldpref)." - + ".$frm->colGroup($this->fields,$this->fieldpref). + $frm->thead($this->fields,$this->fieldpref)." "; diff --git a/e107_admin/users.php b/e107_admin/users.php index 7563c3bb9..3f435a333 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -9,8 +9,8 @@ * Administration Area - Users * * $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $ -* $Revision: 1.39 $ -* $Date: 2009-07-08 10:31:52 $ +* $Revision: 1.40 $ +* $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -658,6 +658,10 @@ class users var $fields = array(); var $fieldpref = array(); + var $sortorder = "asc"; + var $sortorderrev = "desc"; + var $sortfield = "user_id"; + var $from = 0; function users() @@ -668,19 +672,39 @@ class users if(isset($pref['admin_user_disp'])) { - $user_pref['admin_users_columns'] = ($pref['admin_user_disp']) ? explode("|",$pref['admin_user_disp']) : array('user_name', 'user_class'); + $user_pref['admin_users_columns'] = ($pref['admin_user_disp']) ? explode("|",$pref['admin_user_disp']) : array('user_status', 'user_name', 'user_class'); save_prefs('user'); unset($pref['admin_user_disp']); - save_prefs; + save_prefs(); } $this->usersSaveColumnPref(); $this->fieldpref = (!$user_pref['admin_users_columns']) ? array('user_name', 'user_class') : $user_pref['admin_users_columns']; +/* if (e_QUERY) + { + $tmp = explode('.', e_QUERY); + $action = $tmp[0]; // main + $sub_action = varset($tmp[1],''); + $id = varset($tmp[2],0); + $from = varset($tmp[3],0); + unset($tmp); + }*/ + + global $sub_action, $id, $from; + + if($from) + { + $this->sortfield = $sub_action; + $this->sortorder = $id; + $this->sortorderrev = ($this->sortorder == 'asc') ? 'desc' : 'asc'; + $this->from = $from; + } + $this->fields = array( 'user_id' => array('title'=> 'Id', 'width'=>'5%', 'forced'=> TRUE), - 'user_status' => array('title'=> ADLAN_134, 'forced'=> TRUE), - 'user_name' => array('title'=> LAN_USER_01, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name + 'user_status' => array('title'=> ADLAN_134, 'width'=>'auto'), + 'user_name' => array('title'=> LAN_USER_01, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first' ), // Display name 'user_loginname' => array('title'=> LAN_USER_02, 'type' => 'text', 'width' => 'auto'), // User name 'user_login' => array('title'=> LAN_USER_03, 'type' => 'text', 'width' => 'auto'), // Real name (no real vetting) 'user_customtitle' => array('title'=> LAN_USER_04, 'type' => 'text', 'width' => 'auto'), // No real vetting @@ -702,8 +726,7 @@ class users 'user_visits' => array('title' => LAN_USER_21, 'width'=> 'auto'), 'user_admin' => array('title' => LAN_USER_22, 'width'=> 'auto'), 'user_perms' => array('title' => LAN_USER_23, 'width'=> 'auto'), - 'user_pwchange' => array('title' => LAN_USER_24, 'width'=> 'auto') - + 'user_pwchange' => array('title' => LAN_USER_24, 'width'=> 'auto'), ); @@ -716,7 +739,7 @@ class users $this->fields[$field] = array('title'=>$title,'width'=>'auto'); } - $this->fields['options'] = array('title' => LAN_OPTIONS, 'width'=>'10%', "thclass" => "center last"); + $this->fields['options'] = array('title' => LAN_OPTIONS, 'width'=>'10%', "thclass" => "center last", 'forced'=>TRUE); } @@ -730,171 +753,33 @@ class users } } - - function show_existing_users($action, $sub_action, $id, $from, $amount) + function showUserStatus($row) { - global $sql, $frm, $ns, $tp, $mySQLdefaultdb,$pref,$unverified, $userMethods; - $e107 = e107::getInstance(); - - $text = "
"; - - if (isset($_POST['searchquery']) && $_POST['searchquery'] != "") - { - $_POST['searchquery'] = $tp->toDB(trim($_POST['searchquery'])); - $query = 'WHERE '. - $query .= (strpos($_POST['searchquery'], "@") !== FALSE) ? "user_email REGEXP('".$_POST['searchquery']."') OR ": ""; - $query .= (strpos($_POST['searchquery'], ".") !== FALSE) ? "user_ip REGEXP('".$_POST['searchquery']."') OR ": ""; - foreach($this->fieldpref as $disp) - { - $query .= $disp." REGEXP('".$_POST['searchquery']."') OR "; - } - $query .= "user_login REGEXP('".$_POST['searchquery']."') OR "; - $query .= "user_name REGEXP('".$_POST['searchquery']."') "; - if($action == 'unverified') - { - $query .= ' AND user_ban = 2 '; - } - $query .= ' ORDER BY user_id'; - } - else - { - $query = ''; - if($action == 'unverified') - { - $query = 'WHERE user_ban = 2 '; - } - $query .= 'ORDER BY '.($sub_action ? $sub_action : 'user_id').' '.($id ? $id : 'DESC')." LIMIT $from, $amount"; - } - - // $user_total = db_Count($table, $fields = '(*)', - $qry_insert = 'SELECT u.*, ue.* FROM `#user` AS u LEFT JOIN `#user_extended` AS ue ON ue.user_extended_id = u.user_id '; - - if ($user_total = $sql->db_Select_gen($qry_insert. $query)) - { - $text .= " -
- ".NWSLAN_4." -
- ".$frm->colGroup($this->fields,$this->fieldpref)." - - ".$frm->thead($this->fields,$this->fieldpref)." - - "; - - - - /* - - - "; - - - // Search Display Column header. - $display_lan = $userMethods->getNiceNames(TRUE); // List of field names and descriptive names - foreach($this->fieldpref as $disp) - { - if (isset($display_lan[$disp])) - { - $text .= ""; - } - else - { - $text .= ""; - } - } - - // ------------------------------ - - $text .= " - - ";*/ - - while ($row = $sql->db_Fetch()) - { - extract($row); - $text .= " - - "; + } - - - // Display Chosen options - - $datefields = array("user_lastpost","user_lastvisit","user_join","user_currentvisit"); - $boleanfields = array("user_admin","user_hideemail","user_ban"); - - foreach($this->fieldpref as $disp) - { - $text .= ""; - $prev[$disp] = $row[$disp]; - } - // ------------------------------------------------------------- - $qry = (e_QUERY) ? "?".e_QUERY : ""; - $text .= " - "; + + return $text; + } + + + function show_existing_users($action, $sub_action, $id, $from, $amount) + { + global $sql, $frm, $ns, $tp, $mySQLdefaultdb,$pref,$unverified, $userMethods; + $e107 = e107::getInstance(); + + $text = "
"; + + if (isset($_POST['searchquery']) && $_POST['searchquery'] != "") + { + $_POST['searchquery'] = $tp->toDB(trim($_POST['searchquery'])); + $query = 'WHERE '. + $query .= (strpos($_POST['searchquery'], "@") !== FALSE) ? "user_email REGEXP('".$_POST['searchquery']."') OR ": ""; + $query .= (strpos($_POST['searchquery'], ".") !== FALSE) ? "user_ip REGEXP('".$_POST['searchquery']."') OR ": ""; + foreach($this->fieldpref as $disp) + { + $query .= $disp." REGEXP('".$_POST['searchquery']."') OR "; + } + $query .= "user_login REGEXP('".$_POST['searchquery']."') OR "; + $query .= "user_name REGEXP('".$_POST['searchquery']."') "; + if($action == 'unverified') + { + $query .= ' AND user_ban = 2 '; + } + $query .= ' ORDER BY user_id'; + } + else + { + $query = ''; + if($action == 'unverified') + { + $query = 'WHERE user_ban = 2 '; + } + $query .= 'ORDER BY '.($sub_action ? $sub_action : 'user_id').' '.($id ? $id : 'DESC')." LIMIT $from, $amount"; + } + + // $user_total = db_Count($table, $fields = '(*)', + $qry_insert = 'SELECT u.*, ue.* FROM `#user` AS u LEFT JOIN `#user_extended` AS ue ON ue.user_extended_id = u.user_id '; + + if ($user_total = $sql->db_Select_gen($qry_insert. $query)) + { + + $text .= " +
+ ".NWSLAN_4." +
ID".USRLAN_79."".$display_lan[$disp]."".ucwords(str_replace("_"," ",$disp))."".LAN_OPTIONS."
{$user_id}"; - - if ($user_perms == "0") { + if ($row['user_perms'] == "0") { $text .= "
".LAN_MAINADMIN."
"; } - else if($user_admin) { + else if($row['user_admin']) { $text .= ""; } - else if($user_ban == 1) { + else if($row['user_ban'] == 1) { $text .= ""; } - else if($user_ban == 2) { + else if($row['user_ban'] == 2) { $text .= "
".LAN_NOTVERIFIED."
"; } - else if($user_ban == 3) { + else if($row['user_ban'] == 3) { $text .= "
".LAN_BOUNCED."
"; } else { $text .= " "; } + return $text; - $text .= "
"; - if($disp == 'user_class') - { - if ($user_class) - { - $tmp = explode(",", $user_class); - while (list($key, $class_id) = each($tmp)) - { - $text .= $e107->user_class->uc_get_classname($class_id)."
\n"; - } - } - else - { - $text .= " "; - } - } - elseif($disp == 'user_ip') - { - $text .= $e107->ipDecode($user_ip); - } - elseif (in_array($disp,$boleanfields)) - { - $text .= ($row[$disp]) ? ADMIN_TRUE_ICON : ''; - } - elseif(in_array($disp,$datefields)) - { - $text .= ($row[$disp]) ? strftime($pref['shortdate'],$row[$disp]).' ' : ' '; - } - elseif($disp == 'user_name') - { - $text .= "{$row['user_name']}"; - } - else - { - $text .= $row[$disp].' '; - } - if(!in_array($disp,$boleanfields) && isset($prev[$disp]) && $row[$disp] == $prev[$disp] && $prev[$disp] != "") - { // show matches - $text .= " *"; - } - - $text .= "
- -
+ function showUserOptions($row) + { + extract($row); + $text .= "
@@ -950,7 +835,153 @@ class users $text .= "\n"; } $text .= "
"; - $text .= "
". + $frm->colGroup($this->fields,$this->fieldpref). + $frm->thead($this->fields,$this->fieldpref,"main.[FIELD].[ASC].[FROM]"). + ""; + + + + /* + + + "; + + + // Search Display Column header. + $display_lan = $userMethods->getNiceNames(TRUE); // List of field names and descriptive names + foreach($this->fieldpref as $disp) + { + if (isset($display_lan[$disp])) + { + $text .= ""; + } + else + { + $text .= ""; + } + } + + // ------------------------------ + + $text .= " + + ";*/ + + while ($row = $sql->db_Fetch()) + { + extract($row); + $text .= " + "; + + // Display Chosen options + + $datefields = array("user_lastpost","user_lastvisit","user_join","user_currentvisit"); + $boleanfields = array("user_admin","user_hideemail","user_ban"); + + foreach($this->fieldpref as $disp) + { + $text .= ""; + $prev[$disp] = $row[$disp]; + } + // ------------------------------------------------------------- + $qry = (e_QUERY) ? "?".e_QUERY : ""; + $text .= " + "; } $text .= "
ID".USRLAN_79."".$display_lan[$disp]."".ucwords(str_replace("_"," ",$disp))."".LAN_OPTIONS."
{$user_id}"; + if($disp == 'user_class') + { + if ($user_class) + { + $tmp = explode(",", $user_class); + while (list($key, $class_id) = each($tmp)) + { + $text .= $e107->user_class->uc_get_classname($class_id)."
\n"; + } + } + else + { + $text .= " "; + } + } + elseif($disp == 'user_ip') + { + $text .= $e107->ipDecode($user_ip); + } + elseif (in_array($disp,$boleanfields)) + { + $text .= ($row[$disp]) ? ADMIN_TRUE_ICON : ''; + } + elseif(in_array($disp,$datefields)) + { + $text .= ($row[$disp]) ? strftime($pref['shortdate'],$row[$disp]).' ' : ' '; + } + elseif($disp == 'user_name') + { + $text .= "{$row['user_name']}"; + } + elseif($disp == "user_status") + { + $text .= $this->showUserStatus($row); + } + else + { + $text .= $row[$disp].' '; + } + if(!in_array($disp,$boleanfields) && isset($prev[$disp]) && $row[$disp] == $prev[$disp] && $prev[$disp] != "") + { // show matches + $text .= " *"; + } + + $text .= "
".$this->showUserOptions($row)."
"; diff --git a/e107_admin/wmessage.php b/e107_admin/wmessage.php index 2a7d3984b..01376c887 100644 --- a/e107_admin/wmessage.php +++ b/e107_admin/wmessage.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/wmessage.php,v $ -| $Revision: 1.4 $ -| $Date: 2009-07-14 11:05:51 $ +| $Revision: 1.5 $ +| $Date: 2009-07-17 07:53:13 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -111,28 +111,38 @@ if ($action == "main" || $action == "") $wmList = $sql->db_getList(); $text = $rs->form_open("post", e_SELF, "myform_{$gen_id}", "", ""); $text .= "
- +
+ + + + + + + - - - - - "; + + + + + + + "; + foreach($wmList as $row) { $text .= " - - - - + + + "; } - $text .= "
ID".WMLAN_02."".WMLAN_03."".LAN_OPTIONS."
ID".WMLAN_02."".WMLAN_03."".LAN_OPTIONS."
".$row['gen_id']."".strip_tags($tp->toHTML($row['gen_ip']))."".r_userclass_name($row['gen_intdata'])." + ".$row['gen_id']."".strip_tags($tp->toHTML($row['gen_ip']))."".r_userclass_name($row['gen_intdata'])." ".ADMIN_EDIT_ICON."
"; + $text .= ""; $text .= $rs->form_close(); } else { $text .= "
".WMLAN_09."
"; diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 287e8bf2f..6fe52a463 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -9,8 +9,8 @@ * Form Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $ - * $Revision: 1.35 $ - * $Date: 2009-07-17 03:53:14 $ + * $Revision: 1.36 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -606,36 +606,78 @@ class e_form function colGroup($fieldarray,$columnPref='') { $text = ""; - + $count = 0; foreach($fieldarray as $key=>$val) { if(in_array($key,$columnPref) || $key=='options' || varsettrue($val['forced'])) { $text .= "\n"; + $count++; } } - return $text; + + return "\n".$text."\n\n"; } - function thead($fieldarray,$columnPref='') + function thead($fieldarray,$columnPref='',$querypattern = '') { $text = ""; + + $tmp = explode(".",e_QUERY); + + $etmp = explode(".",$querypattern); + + // Note: this function should probably be adapted to ALSO deal with $_GET. eg. ?mode=main&field=user_name&asc=desc&from=100 + // or as a pattern: ?mode=main&field=[FIELD]&asc=[ASC]&from=[FROM] + + foreach($etmp as $key=>$val) // I'm sure there's a more efficient way to do this, but too tired to see it right now!. + { + + if($val == "[FIELD]") + { + $field = $tmp[$key]; + } + + if($val == "[ASC]") + { + $ascdesc = $tmp[$key]; + } + if($val == "[FROM]") + { + $fromval = $tmp[$key]; + } + } + + if(!$fromval){ $fromval = 0; } + + $ascdesc = ($ascdesc == 'desc') ? 'asc' : 'desc'; + foreach($fieldarray as $key=>$val) { if(in_array($key,$columnPref) || $key == "options" || (varsettrue($val['forced']))) { $cl = (varset($val['thclass'])) ? "class='".$val['thclass']."'" : ""; - $text .= "\n\t"; + $text .= "\n\t"; + + if($querypattern!="" && !varsettrue($val['nosort']) && $key != "options") + { + $from = ($key == $field) ? $fromval : 0; + $srch = array("[FIELD]","[ASC]","[FROM]"); + $repl = array($key,$ascdesc,$from); + $val['url'] = e_SELF."?".str_replace($srch,$repl,$querypattern); + } + $text .= (varset($val['url'])) ? "" : ""; // Really this column-sorting link should be auto-generated, or be autocreated via unobtrusive js. $text .= $val['title']; + $text .= ($val['url']) ? "" : ""; $text .= ($key == "options") ? $this->columnSelector($fieldarray,$columnPref) : ""; - $text .= ($val['url']) ? "" : ""; + $text .= ""; } } - return $text; + return "\n\n".$text."\n\n\n\n"; } diff --git a/e107_images/admin_images/configure_16.png b/e107_images/admin_images/configure_16.png new file mode 100644 index 0000000000000000000000000000000000000000..a4a3834abc93ce96f5847af4f43d36e06da5187a GIT binary patch literal 980 zcmV;_11tQAP)P*KqkyKv!*%&%YHSA$#uatJyG2q0!pPybDkkxACK zZe5qUb?aL0g9mq1)YUcAMMXt`hKMpee*9GY+O8;s6g13;+rW2mlcg5eNGE`WpND`vCg- z`2hL(_yG9$_yG0w_5k+w_5cEi<=wm2-`~D{%ONc-%aEE{==JQ`BQI-fTLu=E{|v0G z%nZMO|6zLn{=G0TsDL*91{&}a=z{+YA3uHss$pUP2q0!oPIhG-9eraN8Cjr{#TX0? z4S=?D0b_-k;nSyY4C?A?Y;WJbGrxNE%4wjVAA8g@+Fx zx~i&biAhUK0-encw3!uX!xsjSVp&-+1`7*ofk%&?`dz<%<f1iR30J(&TiHQLq zfS9GFr9M4>{&d^1V+UpK-McSz<;vB+M~)n2QdL!FR#K7#M-|YO43?JGT)+SgymIC8 zUZ6{!1H%Pu06+jS=&j;__ zdlY14Wyi(9zyb`H&kO4Fi2)B_WMl$*i}}>1O>6wi%JN@)`t%hT zOWZ&iCWd?W9xyzA{^A-y0O2(N1VDiW1V`7cTM?9(m+^{~l?@mkUl<}Hf)5`$v_BL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qGSpUjc)z+?JGD@A_IT`Vj;I42RVY1le2sM`enSp=&i1;Z3Jgk zV7&m8V+GeKAT?jUdTI}mkb(eiVQtHUCh8TrDx^JMZiSO&<-*KAb==t zmIK>_ppfWYvt~(SM@J(t$NUAxIU6_xK)LEau<*Kh<1xbnU^UOj#|bPk>lu`kR8wL4 z0Ro6B{Q{69fN7$6>C$=C?d|pde*O9l7W)fy#2;XV#?8wKEH$|qK7ITN425n6V9RHX$h)7^mJ4hIM_KE>Kp1ACQRsT0jg_+=>rHL zsyP7W2w)a%TfBGHw%Cfcc%Z zY3b7WUqK13s;Y@$^5kBSbq7Fm2dM4PyKv!bwi73g#@@Yqdks*y t0n~y*2LJ)YIMBUgfB+is-Z4Oc0RRy|LM!TsSl|Ev002ovPDHLkV1gJOUYP&@ literal 0 HcmV?d00001 diff --git a/e107_images/admin_images/info_16.png b/e107_images/admin_images/info_16.png index 28a0f9e5e6a24fe2cc3d842d0708e70512dbf84b..ecdc9917ca2ef1fc3ec65de8b9ce52aee8566d4a 100644 GIT binary patch delta 904 zcmV;319$wR3DO6USbqa#Nkl*6RSU?1$(F_KLKYtk*{{CZN`1x0Z zk%Ki~R9whkP>@&T?{5Z%_isMFd;j#+wtqi<^fNFpU1sO>whHpRq zGTeR!R0Is{kDtFYd;^BLfTjWS$9s1xfuf-R0R%RHUsNFQC8H$6ohN@8{{Q;R@ci`` z1{s0B3_pG{G5lxv$H2z&m*K_Rzd*x)hJ1O?@SB;5fq#Qvz!jtyAb`LI2nz5CpMUh9 z;moxU452104BvnJVfe%To1rj3n1KoC$-HUL87{s5#qj^%ABLx|-!QOqvokPpa`J%m z0t67)fd9bgV`2QmaP#puhUxGAFz8A#GhAc%#SmcjlR;UUh2it}KMXJ5d07_`@-+yKJ z{OSz@1IW(*|G*ah{_^!3NH0JDfn(w0i?`btKfMG-A0sd^{Q_$I&G7s8Z-#&WfQmu* zFEGmg1M#0<49v`o42(ca{=ENi5Tq9%fWQX)`hWJb|JjAhf8<12z+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j zL>0{Cs2=PutOrwSyD!%)XcedbzmW-UiFVv>-Wj#5>63f{eY}}GSFmiEK{K-r6Iv^@ z-k*b=-EBZz7{GBC0Ncd_teS}xhyHmc0Ba7Z`bIX#eV*J##A?fDw$>&jK@~;r5iwkU zxzLxE-0n8-O~;ea6AVUcQV}}P)tgsAEe>mo?<64+Eo?c98Fv!I;Z?uHhX*n})wD6T zM array("title"=>DOWLAN_67, "type"=>"", "width"=>"auto", "thclass"=>"center first", "url"=>e_SELF."?main.download_id.{$sort_link}.{$from}", "forced"=>true), - "download_name" => array("title"=>DOWLAN_12, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_name.{$sort_link}.{$from}"), - "download_url" => array("title"=>DOWLAN_13, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_url.{$sort_link}.{$from}"), - "download_author" => array("title"=>DOWLAN_15, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_author.{$sort_link}.{$from}"), - "download_author_email" => array("title"=>DOWLAN_16, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_author_email.{$sort_link}.{$from}"), - "download_author_website" => array("title"=>DOWLAN_17, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_author_website.{$sort_link}.{$from}"), - "download_description" => array("title"=>DOWLAN_18, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_description.{$sort_link}.{$from}"), - "download_filesize" => array("title"=>DOWLAN_66, "type"=>"", "width"=>"auto", "thclass"=>"right", "url"=>e_SELF."?main.download_filesize.{$sort_link}.{$from}"), - "download_requested" => array("title"=>DOWLAN_29, "type"=>"", "width"=>"auto", "thclass"=>"center", "url"=>e_SELF."?main.download_requested.{$sort_link}.{$from}"), - "download_category" => array("title"=>DOWLAN_11, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_category.{$sort_link}.{$from}"), - "download_active" => array("title"=>DOWLAN_21, "type"=>"", "width"=>"auto", "thclass"=>"center", "url"=>e_SELF."?main.download_active.{$sort_link}.{$from}"), - "download_datestamp" => array("title"=>DOWLAN_182, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_datestamp.{$sort_link}.{$from}"), - "download_thumb" => array("title"=>DOWLAN_20, "type"=>"", "width"=>"auto", "thclass"=>"center", "url"=>e_SELF."?main.download_thumb.{$sort_link}.{$from}"), - "download_image" => array("title"=>DOWLAN_19, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_image.{$sort_link}.{$from}"), - "download_comment" => array("title"=>DOWLAN_102, "type"=>"", "width"=>"auto", "thclass"=>"center", "url"=>e_SELF."?main.download_comment.{$sort_link}.{$from}"), - "download_class" => array("title"=>DOWLAN_113, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_class.{$sort_link}.{$from}"), - "download_mirror" => array("title"=>DOWLAN_128, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_mirror.{$sort_link}.{$from}"), - "download_mirror_type" => array("title"=>DOWLAN_195, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_mirror_type.{$sort_link}.{$from}"), - "download_visible" => array("title"=>DOWLAN_43, "type"=>"", "width"=>"auto", "thclass"=>"", "url"=>e_SELF."?main.download_visible.{$sort_link}.{$from}"), - "options" => array("title"=>LAN_OPTIONS, "width"=>"auto", "thclass"=>"center last", "url"=>"", "forced"=>true) + "download_id" => array("title"=>DOWLAN_67, "type"=>"", "width"=>"auto", "thclass"=>"center first", "forced"=>true), + "download_name" => array("title"=>DOWLAN_12, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_url" => array("title"=>DOWLAN_13, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_author" => array("title"=>DOWLAN_15, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_author_email" => array("title"=>DOWLAN_16, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_author_website" => array("title"=>DOWLAN_17, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_description" => array("title"=>DOWLAN_18, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_filesize" => array("title"=>DOWLAN_66, "type"=>"", "width"=>"auto", "thclass"=>"right"), + "download_requested" => array("title"=>DOWLAN_29, "type"=>"", "width"=>"auto", "thclass"=>"center"), + "download_category" => array("title"=>DOWLAN_11, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_active" => array("title"=>DOWLAN_21, "type"=>"", "width"=>"auto", "thclass"=>"center"), + "download_datestamp" => array("title"=>DOWLAN_182, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_thumb" => array("title"=>DOWLAN_20, "type"=>"", "width"=>"auto", "thclass"=>"center"), + "download_image" => array("title"=>DOWLAN_19, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_comment" => array("title"=>DOWLAN_102, "type"=>"", "width"=>"auto", "thclass"=>"center"), + "download_class" => array("title"=>DOWLAN_113, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_mirror" => array("title"=>DOWLAN_128, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_mirror_type" => array("title"=>DOWLAN_195, "type"=>"", "width"=>"auto", "thclass"=>""), + "download_visible" => array("title"=>DOWLAN_43, "type"=>"", "width"=>"auto", "thclass"=>""), + "options" => array("title"=>LAN_OPTIONS, "width"=>"10%", "thclass"=>"center last", "forced"=>true) ); $filterColumns = ($user_pref['admin_download_disp']) ? $user_pref['admin_download_disp'] : array("download_name","download_class"); @@ -292,11 +292,9 @@ class adminDownload extends download if ($dl_count = $sql->db_Select_gen($query)) { $text .= $rs->form_open("post", e_SELF."?".e_QUERY, "myform")." - - ".$eform->colGroup($columnInfo,$filterColumns)." - - ".$eform->thead($columnInfo,$filterColumns)." - +
+ ".$eform->colGroup($columnInfo,$filterColumns) + .$eform->thead($columnInfo,$filterColumns,"main.[FIELD].[ASC].[FROM]")." "; diff --git a/e107_plugins/gsitemap/admin_config.php b/e107_plugins/gsitemap/admin_config.php index 4525a9ee0..0928804eb 100644 --- a/e107_plugins/gsitemap/admin_config.php +++ b/e107_plugins/gsitemap/admin_config.php @@ -9,8 +9,8 @@ * Plugin Administration - gsitemap * * $Source: /cvs_backup/e107_0.8/e107_plugins/gsitemap/admin_config.php,v $ - * $Revision: 1.6 $ - * $Date: 2009-07-07 06:50:55 $ + * $Revision: 1.7 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -125,11 +125,11 @@ class gsitemap - + - + @@ -161,8 +161,8 @@ class gsitemap diff --git a/e107_themes/_blank/admin_template.php b/e107_themes/_blank/admin_template.php index 526a3a971..42628ab79 100644 --- a/e107_themes/_blank/admin_template.php +++ b/e107_themes/_blank/admin_template.php @@ -9,8 +9,8 @@ * Admin template - _blank theme * * $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $ - * $Revision: 1.13 $ - * $Date: 2009-07-17 03:53:14 $ + * $Revision: 1.14 $ + * $Date: 2009-07-17 07:53:13 $ * $Author: e107coders $ * */ @@ -50,6 +50,12 @@ if (!defined('ADMIN_WARNING_ICON')) define("ADMIN_WARNING_ICON_PATH", e_IMAGE."admin_images/warning_32.png"); } +if (!defined('ADMIN_ADD_ICON')) +{ + define("ADMIN_ADD_ICON", ""); + define("ADMIN_ADD_ICON_PATH", e_IMAGE."admin_images/add_32.png"); +} + if (!defined('ADMIN_INFO_ICON')) { define("ADMIN_INFO_ICON", ""); @@ -58,8 +64,8 @@ if (!defined('ADMIN_INFO_ICON')) if (!defined('ADMIN_CONFIGURE_ICON')) { - define("ADMIN_CONFIGURE_ICON", ""); - define("ADMIN_CONFIGURE_ICON_PATH", e_IMAGE."admin_images/cat_tools_32.png"); + define("ADMIN_CONFIGURE_ICON", ""); + define("ADMIN_CONFIGURE_ICON_PATH", e_IMAGE."admin_images/configure_32.png"); } if (!defined('ADMIN_VIEW_ICON'))
- - toJS(LAN_CONFIRMDEL." [".$row2['gsitemap_name']."]")."') \" src='".e_IMAGE."admin_images/delete_16.png' alt='".LAN_DELETE."' title='".LAN_DELETE."' style='border:0px' /> + + toJS(LAN_CONFIRMDEL." [".$row2['gsitemap_name']."]")."') \" src='".ADMIN_DELETE_ICON_PATH."' alt='".LAN_DELETE."' title='".LAN_DELETE."' style='border:0px' />