diff --git a/e107_admin/userclass.php b/e107_admin/userclass.php
deleted file mode 100644
index e9c7515c7..000000000
--- a/e107_admin/userclass.php
+++ /dev/null
@@ -1,138 +0,0 @@
-db_Update("user", "user_class='{$svar}' WHERE user_id={$id} ");
- $message = UCSLAN_9;
-
- if ($_POST['notifyuser'])
- {
- $sql->db_Select("user", "*", "user_id={$id} ");
- $row = $sql->db_Fetch();
- $message .= "
".UCSLAN_1.": ".$row['user_name']."
";
- require_once(e_HANDLER."mail.php");
- $messaccess = '';
- foreach (explode(',',$row['user_class']) as $a)
- {
- if (!isset($e_userclass->fixed_classes[$a]))
- {
- $messaccess .= $e_userclass->class_tree[$a]['userclass_name']." - " . $e_userclass->class_tree[$a]['userclass_description']. "\n";
- }
- }
- if ($messaccess == '') $messaccess = UCSLAN_12."\n";
- $send_to = $row['user_email'];
- $subject = UCSLAN_2;
- $message = UCSLAN_3." " . $row['user_name']. ",\n\n".UCSLAN_4." ".SITENAME."\n( ".SITEURL . " )\n\n".UCSLAN_5.": \n\n".$messaccess."\n".UCSLAN_10."\n".SITEADMIN."\n( ".SITENAME." )";
-// $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","User class change",str_replace("\n","
",$message),FALSE,LOG_TO_ROLLING);
- sendemail($send_to, $subject, $message);
- }
- $admin_log->log_event('USET_14',str_replace(array('--UID--','--CLASSES--'),array($id,$svar),UCSLAN_11),E_LOG_INFORMATIVE);
-
-
- header("location: ".$_POST['adminreturn']);
- echo "location redirect failed.";
- exit;
-}
-
-
-$e_sub_cat = 'userclass';
-require_once("auth.php");
-
-
-
-$sql->db_Select("user", "*", "user_id={$id} ");
-$row = $sql->db_Fetch();
-
-$caption = UCSLAN_6." ".$row['user_name']." (".$row['user_class'].")";
-
-$text = "
";
-
-$ns->tablerender($caption, $text);
-
-
-require_once("footer.php");
-
-
-// ----------------------------------------------------------
-
-function check_allowed($class_id)
-{
- global $e_userclass;
- if (!isset($e_userclass->class_tree[$class_id]))
- {
- header("location:".SITEURL);
- exit;
- }
- if (!getperms("0") && !check_class($e_userclass->class_tree[$class_id]['userclass_editclass']))
- {
- header("location:".SITEURL);
- exit;
- }
- return TRUE;
-}
-?>
\ No newline at end of file
diff --git a/e107_admin/userinfo.php b/e107_admin/userinfo.php
deleted file mode 100644
index 00989713e..000000000
--- a/e107_admin/userinfo.php
+++ /dev/null
@@ -1,71 +0,0 @@
-".USFLAN_1."";
- $ns->tablerender(LAN_ERROR, $text);
- require_once("footer.php");
- exit;
-} else {
- $ipd = e_QUERY;
-}
-
-if (isset($ipd)) {
- if(!defined("BULLET")) define("BULLET", "bullet2.gif");
-
- $obj = new convert;
- $sql->db_Select("chatbox", "*", "cb_ip='$ipd' LIMIT 0,20");
- $host = $e107->get_host_name($ipd);
- $text = USFLAN_3." ".$ipd." [ ".USFLAN_4.": $host ]
- ".USFLAN_5."
-
-
";
- while (list($cb_id, $cb_nick, $cb_message, $cb_datestamp, $cb_blocked, $cb_ip ) = $sql->db_Fetch()) {
- $datestamp = $obj->convert_date($cb_datestamp, "short");
- $post_author_id = substr($cb_nick, 0, strpos($cb_nick, "."));
- $post_author_name = substr($cb_nick, (strpos($cb_nick, ".")+1));
- $text .= "
- ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n".$datestamp."
". $cb_message."
-
";
- }
-
- $text .= "
";
-
- $sql->db_Select("comments", "*", "comment_ip='$ipd' LIMIT 0,20");
- while (list($comment_id, $comment_item_id, $comment_author, $comment_author_email, $comment_datestamp, $comment_comment, $comment_blocked, $comment_ip) = $sql->db_Fetch()) {
- $datestamp = $obj->convert_date($comment_datestamp, "short");
- $post_author_id = substr($comment_author, 0, strpos($comment_author, "."));
- $post_author_name = substr($comment_author, (strpos($comment_author, ".")+1));
- $text .= "
- ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n".$datestamp."
". $comment_comment."
";
- }
-
-}
-
-$ns->tablerender(USFLAN_7, $text);
-
-require_once("footer.php");
-?>
\ No newline at end of file
diff --git a/e107_admin/users.php b/e107_admin/users.php
index 4014d3684..208418a67 100644
--- a/e107_admin/users.php
+++ b/e107_admin/users.php
@@ -10,8 +10,8 @@
* Administration Area - Users
*
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
-* $Revision: 1.47 $
-* $Date: 2009-08-03 16:43:46 $
+* $Revision: 1.48 $
+* $Date: 2009-08-05 16:02:08 $
* $Author: e107coders $
*
*/
@@ -35,11 +35,11 @@ if (varset($_POST['useraction']))
}
}
}
-if (isset ($_POST['useraction']) && $_POST['useraction'] == 'userinfo')
+/*if (isset ($_POST['useraction']) && $_POST['useraction'] == 'userinfo')
{
header('location:'.e_ADMIN."userinfo.php?".$e107->tp->toDB($_POST['userip']));
exit;
-}
+}*/
if (isset ($_POST['useraction']) && $_POST['useraction'] == 'usersettings')
{
header('location:'.$e107->url->getUrl('core:user','main','func=settings&id='.(int) $_POST['userid']));
@@ -351,6 +351,13 @@ if (isset ($_POST['useraction']) && $_POST['useraction'] == "unban")
$user->user_unban($_POST['userid']);
}
+// User Info.
+if ((isset ($_POST['useraction']) && $_POST['useraction'] == "userinfo") || $_GET['userinfo'])
+{
+ $ip = ($_POST['userip']) ? $_POST['userip'] : $_GET['userinfo'];
+ $user->user_info($ip);
+}
+
// ------- Delete User --------------
if (isset ($_POST['useraction']) && $_POST['useraction'] == 'deluser')
{
@@ -724,6 +731,52 @@ class users
}
+ function user_info($ipd)
+ {
+ global $ns,$sql,$e107;
+
+ if (isset($ipd))
+ {
+ if(!defined("BULLET")) define("BULLET", "bullet2.gif");
+ // TODO - move to e_userinfo.php
+ $obj = new convert;
+ $sql->db_Select("chatbox", "*", "cb_ip='$ipd' LIMIT 0,20");
+ $host = $e107->get_host_name($ipd);
+ $text = USFLAN_3." ".$ipd." [ ".USFLAN_4.": $host ]
+ ".USFLAN_5."
+
+
";
+ while (list($cb_id, $cb_nick, $cb_message, $cb_datestamp, $cb_blocked, $cb_ip ) = $sql->db_Fetch())
+ {
+ $datestamp = $obj->convert_date($cb_datestamp, "short");
+ $post_author_id = substr($cb_nick, 0, strpos($cb_nick, "."));
+ $post_author_name = substr($cb_nick, (strpos($cb_nick, ".")+1));
+ $text .= "
+ ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n".$datestamp."
". $cb_message."
+
";
+ }
+
+ $text .= "
";
+
+ $sql->db_Select("comments", "*", "comment_ip='$ipd' LIMIT 0,20");
+ while (list($comment_id, $comment_item_id, $comment_author, $comment_author_email, $comment_datestamp, $comment_comment, $comment_blocked, $comment_ip) = $sql->db_Fetch())
+ {
+ $datestamp = $obj->convert_date($comment_datestamp, "short");
+ $post_author_id = substr($comment_author, 0, strpos($comment_author, "."));
+ $post_author_name = substr($comment_author, (strpos($comment_author, ".")+1));
+ $text .= "
+ ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n".$datestamp."
". $comment_comment."
";
+ }
+
+ }
+
+ $ns->tablerender(USFLAN_7, $text);
+
+
+
+ }
+
+
function showUserStatus($row)
{
if ($row['user_perms'] == "0")
diff --git a/e107_languages/English/admin/lan_userclass.php b/e107_languages/English/admin/lan_userclass.php
deleted file mode 100644
index 5647381f8..000000000
--- a/e107_languages/English/admin/lan_userclass.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
\ No newline at end of file
diff --git a/e107_languages/English/admin/lan_userinfo.php b/e107_languages/English/admin/lan_userinfo.php
deleted file mode 100644
index a95172381..000000000
--- a/e107_languages/English/admin/lan_userinfo.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/e107_languages/English/admin/lan_users.php b/e107_languages/English/admin/lan_users.php
index 03a8dd8cc..95df0ca8a 100644
--- a/e107_languages/English/admin/lan_users.php
+++ b/e107_languages/English/admin/lan_users.php
@@ -9,8 +9,8 @@
* Language file - user admin
*
* $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_users.php,v $
- * $Revision: 1.17 $
- * $Date: 2009-07-23 06:55:39 $
+ * $Revision: 1.18 $
+ * $Date: 2009-08-05 16:02:08 $
* $Author: e107coders $
*
*/
@@ -233,7 +233,8 @@ define('LAN_BOUNCED','Bounced');
define('USRLAN_220', 'No Userclass');
-// These need review - there are duplicates above.
+
+// These need review - there are duplicates above - they come from admin/lan_userclass.php.
define("UCSLAN_1", "Sending notification email to");
define("UCSLAN_2", "Updated Privileges");
define("UCSLAN_3", "Dear");
@@ -248,4 +249,14 @@ define('UCSLAN_11', 'Class membership for user ID --UID-- changed to --CLASSES--
define('UCSLAN_12', 'Member privileges only');
+// from admin/lan_userinfo.php
+define("USFLAN_1", "Unable to find poster's IP address - no information is available.");
+// define("USFLAN_2", "Error");
+define("USFLAN_3", "Messages posted from IP address");
+define("USFLAN_4", "Host");
+define("USFLAN_5", "Click here to transfer IP address to admin ban page");
+define("USFLAN_6", "User ID");
+define("USFLAN_7", "User Information");
+
+
?>
\ No newline at end of file