");
unset($text);
}
+
+
// ------- Quick Add User --------------
if (isset($_POST['adduser'])) {
$e107cache->clear("online_menu_member_total");
@@ -201,6 +226,21 @@ if (isset($_POST['adduser'])) {
}
}
+
+// ------- Bounce --> Unverified --------------
+if (isset($_POST['useraction']) && $_POST['useraction'] == "reqverify")
+{
+ $sql->db_Select("user", "*", "user_id='".$_POST['userid']."'");
+ $row = $sql->db_Fetch();
+ extract($row);
+ $sql->db_Update("user", "user_ban='2' WHERE user_id='".$_POST['userid']."' ");
+ $user->show_message("User now has to verify");
+ $action = "main";
+ if(!$sub_action) {$sub_action = "user_id"; }
+}
+
+
+
// ------- Ban User. --------------
if (isset($_POST['useraction']) && $_POST['useraction'] == "ban")
{
@@ -237,6 +277,8 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "ban")
$action = "main";
if(!$sub_action){$sub_action = "user_id"; }
}
+
+
// ------- Unban User --------------
if (isset($_POST['useraction']) && $_POST['useraction'] == "unban") {
$sql->db_Select("user", "user_ip", "user_id='".$_POST['userid']."'");
@@ -623,37 +665,53 @@ class users{
";
@@ -1014,47 +1072,119 @@ class users{
}
}
-// ---------------------------------------------------------------------
- function check_bounces(){
+
+// ---------------------------------------------------------------------
+// Bounce handling
+// ---------------------------------------------------------------------
+// $bounce_act has the task to perform:
+// 'first_check' - initial read of list of bounces
+// 'delnonbounce' - delete any emails that aren't bounces
+// 'delchecked' - delete the emails whose comma-separated IDs are in $bounce_arr
+// 'delall' - delete all bounced emails
+
+ function check_bounces($bounce_act='first_check', $bounce_arr = '')
+ {
global $sql,$pref;
include(e_HANDLER."pop3_class.php");
+ if (!$bounce_act) $bounce_act='first_check';
+
+// echo "Check bounces. Action: {$bounce_act}; Entries: {$bounce_arr} ";
+
$obj= new receiveMail($pref['mail_bounce_user'],$pref['mail_bounce_pass'],$pref['mail_bounce_email'],$pref['mail_bounce_pop3'],'pop3','110');
+ if ($bounce_act !='first_check')
+ { // Must do some deleting
+ $obj->connect();
+ $tot=$obj->getTotalMails();
+ $del_array = explode(',',$bounce_arr);
+ for($i=1;$i<=$tot;$i++)
+ {
+ $dodel = FALSE;
+ switch ($bounce_act)
+ {
+ case 'delnonbounce' :
+ $head=$obj->getHeaders($i);
+ $dodel = (!$head['bounce']);
+ break;
+ case 'delall' :
+ $dodel = TRUE;
+ break;
+ case 'delchecked' :
+ $dodel = in_array($i, $del_array);
+ break;
+ }
+ if ($dodel)
+ {
+// echo "Delete email ID {$i} ";
+ $obj->deleteMails($i);
+ }
+ }
+ $obj->close_mailbox(); // This actually deletes the emails
+ }
+
$obj->connect();
$tot=$obj->getTotalMails();
$found = FALSE;
$DEL = ($pref['mail_bounce_delete']) ? TRUE : FALSE;
- $text = "
+ $text = " ";
+
+ if ($tot)
+ { // Option to delete emails
+ $text .= "
+
\n
+
\n
+
\n
+
";
+ }
+ $text .= "
";
array_unique($id);
array_unique($emails);
@@ -1063,17 +1193,26 @@ class users{
$all_emails = implode(",",$emails);
$obj->close_mailbox();
- $found = count($id) + count($emails);
- if($ed = $sql -> db_Update("user", "user_ban=3 WHERE (user_id IN (".$all_ids.") OR user_email IN (".$all_emails.")) AND user_sess !='' ")){
- $this->show_message(LAN_UPDATED." Found $tot, updated $ed / $found".$text);
- }else{
- $this->show_message(LAN_UPDATED_FAILED." Found $tot, not updated $ed / $found".$text);
+// $found = count($id) + count($emails);
+ $found = count($emails); // Number of bounce emails found
+ // Update bounce status for users
+ if($ed = $sql -> db_Update("user", "user_ban=3 WHERE (`user_id` IN (".$all_ids.") OR `user_email` IN (".$all_emails.")) AND user_sess !='' "))
+ {
+ $this->show_message(LAN_UPDATED." Found {$tot}, updated {$ed} / {$found}".$text);
+ }
+ else
+ {
+ $this->show_message(LAN_UPDATED_FAILED." Found {$tot}, not updated {$ed} / {$found}".$text);
}
}
-}
-function users_adminmenu() {
+} // End class users
+
+
+
+function users_adminmenu()
+{
global $user;
global $action;
$user->show_options($action);
diff --git a/e107_languages/English/admin/lan_users.php b/e107_languages/English/admin/lan_users.php
index 506cd216c..3ea794def 100644
--- a/e107_languages/English/admin/lan_users.php
+++ b/e107_languages/English/admin/lan_users.php
@@ -4,9 +4,9 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_users.php,v $
-| $Revision: 1.4 $
-| $Date: 2007-04-15 22:50:31 $
-| $Author: e107coders $
+| $Revision: 1.5 $
+| $Date: 2007-08-06 19:35:17 $
+| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
define("USRLAN_1", "Options Saved.");
@@ -133,10 +133,34 @@ define("USRLAN_135", "No IP address found in user's info; IP not banned");
define("USRLAN_136", "Multiple users found with IP address of {IP}; IP not banned.");
define("USRLAN_137", "Users IP address of {IP} banned.");
+
+define("USRLAN_138", "Unverified users");
+define("USRLAN_139", "Your account has been activated.\n\nYou can visit {SITEURL} and log into the site using the login information you provided.");
+
+define("USRLAN_140", "Email Re-sent to");
+define("USRLAN_141", "Failed to Re-send email to");
+define("USRLAN_142", "with the following activation link");
+
+define("USRLAN_143", "Check For Bounces");
+define("USRLAN_144", "Resend Confirmation Email to All");
+define("USRLAN_145", "Bounced users");
+define("USRLAN_146", "Member information is available to");
+
+define("USRLAN_147", "Email address is already used by a banned user");
+define("USRLAN_148", "Email address is banned");
+
+define("USRLAN_149", "Delete checked emails");
+define("USRLAN_150", "Delete all emails");
+define("USRLAN_151", "Clear bounce, require Activation");
+define("USRLAN_152", "Clear bounce and Activate");
+define("USRLAN_153", "Delete non-bounce emails");
+
+
define("LAN_MAINADMIN","Main Admin");
define("LAN_ADMIN","Admin");
define("LAN_NOTVERIFIED","Not Verified");
define("LAN_BANNED","Banned");
+define("LAN_BOUNCED","Bounced");
define("DUSRLAN_1", "ID");
define("DUSRLAN_2", "Display Name");
@@ -176,20 +200,4 @@ define("DUSRLAN_35", "Picture");
define("DUSRLAN_36", "Password Change");
define("DUSRLAN_37", "XUP");
-define("USRLAN_138", "Unverified users");
-define("USRLAN_139", "Your account has been activated.\n\nYou can visit {SITEURL} and log into the site using the login information you provided.");
-
-define("USRLAN_140", "Email Re-sent to");
-define("USRLAN_141", "Failed to Re-send email to");
-define("USRLAN_142", "with the following activation link");
-
-define("LAN_BOUNCED","Bounced");
-define("USRLAN_143", "Check For Bounces");
-define("USRLAN_144", "Resend Confirmation Email to All");
-define("USRLAN_145", "Bounced users");
-define("USRLAN_146", "Member information is available to");
-
-define("USRLAN_147", "Email address is already used by a banned user");
-define("USRLAN_148", "Email address is banned");
-
?>
\ No newline at end of file