mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
More small things
This commit is contained in:
parent
48071a8035
commit
eb8d492ead
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/includes/infopanel.php,v $
|
||||
| $Revision: 1.15 $
|
||||
| $Date: 2009-11-05 09:15:12 $
|
||||
| $Revision: 1.16 $
|
||||
| $Date: 2009-11-17 13:12:33 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -144,7 +144,7 @@ $text .= "
|
||||
$text .= "<tr>
|
||||
<td class='nowrap'>".e107::getDateConvert()->convert_date($val['online_timestamp'],'short')."</td>
|
||||
<td>".renderOnlineName($val['online_user_id'])."</td>
|
||||
<td>".($val['online_ip'])."</td>
|
||||
<td>".e107::ipDecode($val['online_ip'])."</td>
|
||||
<td class='nowrap'><a href='".$val['online_location']."'>".$tp->text_truncate($val['online_location'],50)."</a></td>
|
||||
</tr>
|
||||
";
|
||||
|
@ -10,8 +10,8 @@
|
||||
* Administration Area - Users
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
|
||||
* $Revision: 1.67 $
|
||||
* $Date: 2009-11-12 05:11:41 $
|
||||
* $Revision: 1.68 $
|
||||
* $Date: 2009-11-17 13:12:35 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
@ -971,18 +971,18 @@ class users
|
||||
global $frm;
|
||||
$e_userclass = new user_class;
|
||||
// TODO - The search field (not the userclass drop-down) should be replaced with a generic ajax search-filter class element.
|
||||
$text = "<form method='post' action='".e_SELF."?".e_QUERY."'>
|
||||
$text = "<form method='get' action='".e_SELF."'>
|
||||
<table class='adminform'>\n";
|
||||
$text .= "<tr><td><input class='tbox' type='text' name='searchquery' size='20' value=\"".$_POST['searchquery']."\" maxlength='50' />\n";
|
||||
$text .= "<tr><td><input class='tbox' type='text' name='srch' size='20' value=\"".$_GET['srch']."\" maxlength='50' />\n";
|
||||
|
||||
$list = $e_userclass->uc_required_class_list("public,member,admin,main,classes");
|
||||
$ulist = $list + array('unverified'=>LAN_NOTVERIFIED,'banned'=>LAN_BANNED,'bounced'=>LAN_BOUNCED);
|
||||
|
||||
$text .= "<select class='tbox' name='searchclass' onchange='this.form.submit()' >\n";
|
||||
$text .= "<select class='tbox' name='filter' onchange='this.form.submit()' >\n";
|
||||
|
||||
foreach($ulist as $key=>$val)
|
||||
{
|
||||
$sel = ($_SESSION['searchclass'] == $key) ? "selected='selected'" : "";
|
||||
$sel = ($_SESSION['filter'] == $key) ? "selected='selected'" : "";
|
||||
$text .= "<option value='$key' {$sel}>".$val."</option>\n";
|
||||
}
|
||||
|
||||
@ -1002,28 +1002,28 @@ class users
|
||||
global $sql,$frm,$ns,$tp,$mySQLdefaultdb,$pref,$unverified,$userMethods,$sub_action,$id,$from, $amount;
|
||||
|
||||
|
||||
if(isset($_POST['searchquery'])) // We could use $_GET, if so, would need to rework the ordering to use $_GET also.
|
||||
if(isset($_GET['srch'])) // We could use $_GET, if so, would need to rework the ordering to use $_GET also.
|
||||
{
|
||||
$_SESSION['searchquery'] = $_POST['searchquery'];
|
||||
$_SESSION['srch'] = $_GET['srch'];
|
||||
}
|
||||
|
||||
if(isset($_POST['searchclass']))
|
||||
if(isset($_GET['filter']))
|
||||
{
|
||||
$_SESSION['searchclass'] = $_POST['searchclass'];
|
||||
$_SESSION['filter'] = $_GET['filter'];
|
||||
}
|
||||
|
||||
|
||||
if (isset ($_SESSION['searchquery']) && $_SESSION['searchquery'] != "")
|
||||
if (isset ($_SESSION['srch']) && $_SESSION['srch'] != "")
|
||||
{
|
||||
$_SESSION['searchquery'] = $tp->toDB(trim($_SESSION['searchquery']));
|
||||
$_SESSION['srch'] = $tp->toDB(trim($_SESSION['srch']));
|
||||
$query .= "( ";
|
||||
$query .= (strpos($_SESSION['searchquery'],"@") !== false) ? "user_email REGEXP('".$_SESSION['searchquery']."') OR " : "";
|
||||
$query .= (strpos($_SESSION['searchquery'],".") !== false) ? "user_ip REGEXP('".$_SESSION['searchquery']."') OR " : "";
|
||||
$query .= (strpos($_SESSION['srch'],"@") !== false) ? "user_email REGEXP('".$_SESSION['srch']."') OR " : "";
|
||||
$query .= (strpos($_SESSION['srch'],".") !== false) ? "user_ip REGEXP('".$_SESSION['srch']."') OR " : "";
|
||||
|
||||
$fquery = array();
|
||||
foreach ($this->fieldpref as $field)
|
||||
{
|
||||
$fquery[] = $field." REGEXP('".$_SESSION['searchquery']."')";
|
||||
$fquery[] = $field." REGEXP('".$_SESSION['srch']."')";
|
||||
}
|
||||
|
||||
$query .= implode(" OR ",$fquery);
|
||||
@ -1041,7 +1041,7 @@ class users
|
||||
$qry_order = 'ORDER BY '.($sub_action ? $sub_action : 'user_id').' '.($id ? $id : 'DESC')." LIMIT $from, $amount";
|
||||
}
|
||||
|
||||
if(varset($_SESSION['searchclass']))
|
||||
if(varset($_SESSION['filter']))
|
||||
{
|
||||
$uqry[e_UC_ADMIN] = " u.user_admin = 1 ";
|
||||
$uqry[e_UC_MEMBER] = " u.user_ban = '0' ";
|
||||
@ -1055,18 +1055,18 @@ class users
|
||||
$query .= " AND ";
|
||||
}
|
||||
|
||||
if(isset($uqry[$_SESSION['searchclass']]))
|
||||
if(isset($uqry[$_SESSION['filter']]))
|
||||
{
|
||||
$query .= $uqry[$_SESSION['searchclass']];
|
||||
$query .= $uqry[$_SESSION['filter']];
|
||||
}
|
||||
else
|
||||
{
|
||||
$query .= " FIND_IN_SET(".$_SESSION['searchclass'].",u.user_class) ";
|
||||
$query .= " FIND_IN_SET(".$_SESSION['filter'].",u.user_class) ";
|
||||
}
|
||||
}
|
||||
// $user_total = db_Count($table, $fields = '(*)',
|
||||
|
||||
if($_SESSION['searchclass']==e_UC_ADMIN)
|
||||
if($_SESSION['filter']==e_UC_ADMIN)
|
||||
{
|
||||
$this->fieldpref[] = 'user_perms';
|
||||
}
|
||||
@ -1127,7 +1127,7 @@ class users
|
||||
<div class='buttons-bar center'>".$this->show_batch_options();
|
||||
$users = (e_QUERY != "unverified") ? $sql->db_Count("user") : $unverified;
|
||||
|
||||
if ($users > $amount && !$_POST['searchquery'])
|
||||
if ($users > $amount && !$_GET['srch'])
|
||||
{
|
||||
$parms = "{$users},{$amount},{$from},".e_SELF."?".(e_QUERY ? "$action.$sub_action.$id." : "main.user_id.desc.")."[FROM]";
|
||||
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||
@ -1153,7 +1153,7 @@ class users
|
||||
|
||||
$emessage = & eMessage :: getInstance();
|
||||
|
||||
$total_cap = (isset ($_POST['searchquery'])) ? $user_total : $users;
|
||||
$total_cap = (isset ($_GET['srch'])) ? $user_total : $users;
|
||||
$caption = USRLAN_77." (total: $total_cap)";
|
||||
$ns->tablerender($caption,$emessage->render().$text);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: admin_shortcodes_class.php,v 1.31 2009-11-08 12:08:30 e107coders Exp $
|
||||
* $Id: admin_shortcodes_class.php,v 1.32 2009-11-17 13:12:43 e107coders Exp $
|
||||
*
|
||||
* Admin shortcode batch - class
|
||||
*/
|
||||
@ -824,13 +824,17 @@ class admin_shortcodes
|
||||
$members = $sql -> db_Count('user');
|
||||
$unverified = $sql -> db_Count('user', '(*)', 'WHERE user_ban=2');
|
||||
$banned = $sql -> db_Count('user', '(*)', 'WHERE user_ban=1');
|
||||
$comments = $sql -> db_Count('comments');
|
||||
$unver = ($unverified ? " <a href='".e_ADMIN."users.php?unverified'>".ADLAN_111."</a>" : ADLAN_111);
|
||||
$comments = $sql -> db_Count('comments');
|
||||
|
||||
|
||||
$unver = ($unverified ? " <a href='".e_ADMIN."users.php?filter=unverified'>".ADLAN_111."</a>" : ADLAN_111);
|
||||
|
||||
$text = "<div class='left'><div style='padding-bottom: 2px;'>".E_16_USER." ".ADLAN_110.": ".$members."</div>";
|
||||
$text .= "<div style='padding-bottom: 2px;'>".E_16_USER." {$unver}: ".$unverified."</div>";
|
||||
$text .= "<div style='padding-bottom: 2px;'>".E_16_BANLIST." ".ADLAN_112.": ".$banned."</div>";
|
||||
$text .= "<div style='padding-bottom: 2px;'>".E_16_COMMENT." ".ADLAN_114.": ".$comments."</div>";
|
||||
$text = "
|
||||
<div class='left'>
|
||||
<div style='padding-bottom: 2px;'>".E_16_USER." ".ADLAN_110.": <a href='".e_ADMIN."users.php?filter=0'>".$members."</a></div>
|
||||
<div style='padding-bottom: 2px;'>".E_16_USER." {$unver}: <a href='".e_ADMIN."users.php?filter=unverified'>".$unverified."</a></div>
|
||||
<div style='padding-bottom: 2px;'>".E_16_BANLIST." ".ADLAN_112.": <a href='".e_ADMIN."users.php?filter=banned'>".$banned."</a></div>
|
||||
<div style='padding-bottom: 2px;'>".E_16_COMMENT." ".ADLAN_114.": <a href='".e_ADMIN."comment.php'>".$comments."</a></div>";
|
||||
|
||||
if(vartrue($pref['e_status_list']))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user