956 lines
23 KiB
PHP
956 lines
23 KiB
PHP
<?php header('Content-type: text/html; charset=utf-8');
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
|
|
include(PATHTOINCLUDES."base.php");
|
|
include(PATHTOINCLUDES."record_set.php");
|
|
require_once(PATHTOINCLUDES."/PHPMailer_5.2.1/class.phpmailer.php");
|
|
if(!isset($_SESSION["dealist"])){
|
|
$_SESSION["dealist"]=file('https://www.thebatorblog.com/disposable_email_addresses'); //$_SESSION["dealist"]=file('http://www.thebatorblog.com/disposable_email_addresses');
|
|
}
|
|
//$dbcon=dbconnect2();
|
|
//$hardbounce=file('https://bateworld.com/unsubscribe_list.txt');
|
|
//$em="";
|
|
//foreach($hardbounce as $u_mail)
|
|
//{
|
|
//$u_mail = str_replace(array("\r", "\n"), '', $u_mail);
|
|
//$u_mail = str_replace(' ', '', $u_mail);
|
|
//$u_mail=substr($u_mail, 0, -1);
|
|
//echo "'".$u_mail."'<br>";
|
|
//$turnoffsql="UPDATE `se_users` SET `se_users`.`user_pdp_evc` = 0 WHERE `se_users`.`user_email` = '".$u_mail."' Limit 1";
|
|
//$turnoffresult= mysql_query($turnoffsql) or $em=$em.mysql_error();
|
|
//echo $em." any error<br>";
|
|
//echo $turnoffsql."<br />";
|
|
//}
|
|
//exit();
|
|
function getUrlContent($url){
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
|
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
|
$data = curl_exec($ch);
|
|
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
curl_close($ch);
|
|
return ($httpcode>=200 && $httpcode<300) ? $data : false;
|
|
}
|
|
|
|
|
|
function is_temp_mail($mail, $dlist)
|
|
{
|
|
$mail_domains_ko = $dlist;
|
|
foreach($mail_domains_ko as $ko_mail) {
|
|
list(, $mail_domain) = explode('@', $mail);
|
|
if(strcasecmp($mail_domain, trim($ko_mail)) == 0) {
|
|
return TRUE;
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
function time_diff_conv($start, $s) {
|
|
$t = array( //suffixes
|
|
'd' => 86400,
|
|
'h' => 3600,
|
|
'm' => 60,
|
|
);
|
|
|
|
$s = abs($s - $start);
|
|
|
|
foreach($t as $key => &$val) {
|
|
|
|
$$key = floor($s/$val);
|
|
|
|
$s -= ($$key*$val);
|
|
|
|
$string .= ($$key==0) ? '' : $$key . "$key ";
|
|
|
|
}
|
|
|
|
return $string . $s. 's';
|
|
|
|
}
|
|
|
|
function is_int_val($data) {
|
|
|
|
if (is_int($data) === true) return true;
|
|
|
|
elseif (is_string($data) === true && is_numeric($data) === true) {
|
|
|
|
return (strpos($data, '.') === false);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
//Written by Philip Poremba 05/02/2012
|
|
|
|
$dbcon=dbconnect2(); // connect to bateworld db
|
|
|
|
|
|
$domail=0;
|
|
if(isset($_POST["mailsub"]))
|
|
{
|
|
if($_POST["mailsub"]==1)
|
|
{
|
|
$thesql="SELECT `mail_accounts`.`username`, `mail_accounts`.`password`, `mail_accounts`.`host`, `mail_accounts`.`port` FROM `mail_accounts` WHERE `mail_accounts`.`maid`= 1";
|
|
$theresult=mysql_query($thesql) or $em=$em.mysql_error();
|
|
$m=mysql_fetch_assoc($theresult);
|
|
$smtpusername=$m["username"];
|
|
$smtppassword=$m["password"];
|
|
$domail=1;
|
|
$thetemplate=file_get_contents ("http://bateworld.com/mailservices/email/cybersocket-award.html");
|
|
|
|
}
|
|
}
|
|
$em="";
|
|
|
|
$_SESSION["user_uri"]="/mailservices/bateworld/users.php";
|
|
|
|
$_SESSION["pagename"]="B8World Users";
|
|
|
|
$_SESSION["the_section_location"] = "/mailservices/bateworld/users.php";
|
|
|
|
$_SESSION["the_section_container"]="section_content";
|
|
|
|
$_SESSION["the_tab"]="one";
|
|
|
|
|
|
|
|
$_SESSION["se_user_id"]="";
|
|
|
|
if(!isset($_SESSION["se_user_limit"])) {$_SESSION["se_user_limit"]=20;}
|
|
if(!isset($_SESSION["se_user_enabled"])) {$_SESSION["se_user_enabled"]="";}
|
|
if(!isset($_SESSION["se_user_uid"])) {$_SESSION["se_user_uid"]="";}
|
|
|
|
if(!isset($_SESSION["user_level_id"])) {$_SESSION["user_level_id"]="";}
|
|
|
|
if(!isset($_SESSION["se_user_offset"])) {$_SESSION["se_user_offset"]=0;}
|
|
|
|
if(!isset($_SESSION["se_user_searchstring"])){$_SESSION["se_user_searchstring"]="";}
|
|
|
|
if(!isset($_SESSION["se_user_inactive"])){$_SESSION["se_user_inactive"]="";}
|
|
|
|
if(!isset($_SESSION["se_user_modifyer"])){$_SESSION["se_user_modifyer"]="lt";}
|
|
|
|
if(!isset($_SESSION["se_user_evc"])){$_SESSION["se_user_evc"]="";};
|
|
if(!isset($_SESSION["se_user_username"])){$_SESSION["se_user_username"]="";}
|
|
if(!isset($_SESSION["ip_lastactive"])){$_SESSION["ip_lastactive"]="";}
|
|
if(isset($_POST["modifyer"])){$_SESSION["se_user_modifyer"]=$_POST["modifyer"];}
|
|
|
|
if($domail==0){
|
|
if(isset($_POST["gosearch"])){$_SESSION["se_user_offset"]=0;}
|
|
if(isset($offset)){$_SESSION["se_user_offset"]=$offset;}
|
|
if(isset($_POST["limit"])){$_SESSION["se_user_limit"]=$_POST["limit"];$_SESSION["se_user_offset"]=0;}
|
|
}
|
|
$limit=$_SESSION["se_user_limit"];
|
|
$offset=$_SESSION["se_user_offset"];
|
|
|
|
$conda=" WHERE 0<1 ";
|
|
|
|
//AND (floor((`se_semods_userplans`.`userplan_expiredate` - UNIX_TIMESTAMP()) / (60*60*24))) > 0 and (floor((`se_semods_userplans`.`userplan_expiredate` - UNIX_TIMESTAMP()) / (60*60*24))) < 5 AND `se_semods_userplans`.`userplan_plan_id` <> 4 AND `se_users`.`user_enabled` = 1
|
|
|
|
if(isset($_POST["searchstring"]))
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_searchstring"]=$_POST["searchstring"];
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_searchstring"] != "")
|
|
|
|
{
|
|
|
|
$condb=" AND user_email like '%".$_SESSION["se_user_searchstring"]."%'";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condb="";
|
|
|
|
}
|
|
|
|
if(isset($_POST["inactive"]))
|
|
|
|
{
|
|
|
|
if(is_int_val($_POST["inactive"]))
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_inactive"]=$_POST["inactive"];
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$_SESSION["se_user_inactive"]="";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_inactive"] != "")
|
|
|
|
{
|
|
|
|
if($_SESSION["se_user_modifyer"]=="gt")
|
|
|
|
{
|
|
|
|
$condc=" AND (floor((UNIX_TIMESTAMP()-`se_users`.`user_lastlogindate`) / (60*60*24))) > ".$_SESSION["se_user_inactive"]."";
|
|
|
|
}
|
|
|
|
elseif ($_SESSION["se_user_modifyer"]=="lt")
|
|
{
|
|
|
|
$condc=" AND (floor((UNIX_TIMESTAMP()-`se_users`.`user_lastlogindate`) / (60*60*24))) < ".$_SESSION["se_user_inactive"]."";
|
|
|
|
}
|
|
elseif ($_SESSION["se_user_modifyer"]=="eq")
|
|
{
|
|
|
|
$condc=" AND (floor((UNIX_TIMESTAMP()-`se_users`.`user_lastlogindate`) / (60*60*24))) = ".$_SESSION["se_user_inactive"]."";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condc="";
|
|
|
|
}
|
|
|
|
if(isset($_POST["evc"]))
|
|
|
|
{
|
|
|
|
if($_POST["evc"]=="")
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_evc"]="";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_evc"]=$_POST["evc"];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_evc"]=="")
|
|
|
|
{
|
|
|
|
$condd="";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
if($_SESSION["se_user_evc"]==7){
|
|
$condd=" AND (`se_users`.`user_pdp_evc`= 1 OR `se_users`.`user_pdp_evc` = 3 OR `se_users`.`user_pdp_evc` = 5) ";
|
|
|
|
}
|
|
else
|
|
{
|
|
$condd=" AND `se_users`.`user_pdp_evc` = ".$_SESSION["se_user_evc"]." ";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(isset($_POST["uid"]))
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_uid"]=$_POST["uid"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_uid"] != "")
|
|
|
|
{
|
|
|
|
$conde=" AND `se_users`.`user_id` = ".$_SESSION["se_user_uid"]." ";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$conde="";
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($_POST["ulid"]))
|
|
|
|
{
|
|
|
|
$_SESSION["user_level_id"]=$_POST["ulid"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["user_level_id"] != "")
|
|
|
|
{
|
|
if($_SESSION["user_level_id"] < 6)
|
|
{
|
|
$condf=" AND `se_users`.`user_level_id` = ".$_SESSION["user_level_id"]." ";
|
|
}
|
|
else
|
|
{
|
|
$condf=" AND ((floor((UNIX_TIMESTAMP()-`se_users`.`user_signupdate`) / (60*60*24))) <= 7) AND `se_users`.`user_level_id` = 2";
|
|
}
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condf="";
|
|
|
|
}
|
|
|
|
|
|
if(isset($_POST["user_username"]))
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_username"]=$_POST["user_username"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_username"] != "")
|
|
|
|
{
|
|
|
|
$condg=" AND `se_users`.`user_username` LIKE '%".$_SESSION["se_user_username"]."%' ";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condg="";
|
|
|
|
}
|
|
|
|
if(isset($_POST["user_enabled"]))
|
|
|
|
{
|
|
|
|
$_SESSION["se_user_enabled"]=$_POST["user_enabled"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["se_user_enabled"] != "")
|
|
|
|
{
|
|
|
|
$condh=" AND `se_users`.`user_enabled` = ".$_SESSION["se_user_enabled"]." ";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condh="";
|
|
|
|
}
|
|
|
|
if(isset($_POST["ip_lastactive"]))
|
|
|
|
{
|
|
|
|
$_SESSION["ip_lastactive"]=$_POST["ip_lastactive"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($_SESSION["ip_lastactive"] != "")
|
|
|
|
{
|
|
|
|
$condi=" AND `se_users`.`user_ip_lastactive` LIKE '%".$_SESSION["ip_lastactive"]."%' ";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$condi="";
|
|
|
|
}
|
|
|
|
$condj=" AND (`se_users`.`user_lastlogindate` - `se_users`.`user_signupdate`) < 86400";
|
|
|
|
$condj="";
|
|
|
|
$condx=" AND (floor((`se_semods_userplans`.`userplan_expiredate` - UNIX_TIMESTAMP()) / (60*60*24))) < 0";
|
|
$condx="";
|
|
$condz=" AND ((floor((UNIX_TIMESTAMP()-`se_users`.`user_signupdate`) / (60*60*24))) >= 7) AND `se_users`.`user_email` not like '%.ca%' ";
|
|
$condz="";
|
|
$condx=" AND floor(DATEDIFF(NOW(),`se_profilevalues`.`profilevalue_4`) / 365.25) > 80";
|
|
$condx=" AND `se_users`.`user_pdp_optout` = 1";
|
|
$condx="";
|
|
$sql="SELECT
|
|
|
|
`se_users`.`user_id`,
|
|
|
|
`se_users`.`user_level_id`,
|
|
|
|
`se_users`.`user_email`,
|
|
|
|
`se_users`.`user_newemail`,
|
|
|
|
`se_users`.`user_fname`,
|
|
|
|
`se_users`.`user_lname`,
|
|
|
|
`se_users`.`user_username`,
|
|
|
|
`se_users`.`user_language_id`,
|
|
|
|
`se_users`.`user_signupdate`,
|
|
|
|
`se_users`.`user_lastlogindate`,
|
|
|
|
`se_users`.`user_lastactive`,
|
|
`se_users`.`user_ip_lastactive`,
|
|
`se_users`.`user_privacy`,
|
|
`se_users`.`user_enabled`,
|
|
|
|
|
|
(floor((UNIX_TIMESTAMP()-`se_users`.`user_lastlogindate`) / (60*60*24))) AS `daysinactive`,
|
|
(floor((UNIX_TIMESTAMP()-`se_users`.`user_signupdate`) / (60*60*24))) AS `newmembers`,
|
|
`se_users`.`user_lastlogindate` - `se_users`.`user_signupdate` AS `oneday`,
|
|
`se_users`.`user_hasnotifys`,
|
|
`se_users`.`user_pdp_evc`,
|
|
`se_users`.`user_pdp_optout`,
|
|
`se_profilevalues`.`profilevalue_4` AS `birthday`,
|
|
`se_semods_userplans`.`userplan_expiredate`,
|
|
(floor((`se_semods_userplans`.`userplan_expiredate` - UNIX_TIMESTAMP()) / (60*60*24))) AS `expiredays`,
|
|
`se_semods_userplans`.`userplan_plan_id`,
|
|
floor((DATEDIFF( NOW(),`se_profilevalues`.`profilevalue_4`) / 365.25)) AS `Age`
|
|
|
|
FROM
|
|
|
|
`se_users`
|
|
Left Outer Join `se_profilevalues` ON `se_profilevalues`.`profilevalue_user_id` = `se_users`.`user_id`
|
|
Left Outer Join `se_semods_userplans` ON `se_semods_userplans`.`userplan_user_id` = `se_users`.`user_id`
|
|
|
|
".$conda.$condb.$condc.$condd.$conde.$condf.$condg.$condh.$condi.$condj.$condx."
|
|
|
|
ORDER BY
|
|
|
|
`se_users`.`user_id` ASC
|
|
|
|
LIMIT ".$limit." OFFSET ".$offset;
|
|
|
|
$result= mysql_query($sql) or $em=$em.mysql_error();
|
|
echo $sql;
|
|
echo $em;
|
|
$sql2="SELECT count(`se_users`.`user_id`) AS cuid FROM `se_users` Left Outer Join `se_profilevalues` ON `se_profilevalues`.`profilevalue_user_id` = `se_users`.`user_id` Left Outer Join `se_semods_userplans` ON `se_semods_userplans`.`userplan_user_id` = `se_users`.`user_id` ".$conda.$condb.$condc.$condd.$conde.$condf.$condg.$condh.$condi.$condj.$condx;
|
|
$rcount=mysql_query($sql2);
|
|
$thecount = mysql_result($rcount,0);
|
|
mysql_free_result($rcount);
|
|
|
|
?>
|
|
|
|
<div id="se_user" class="list-container" style="padding-bottom:50px;">
|
|
|
|
<div id="searchform" class="search-form-container" style="background:transparent;border-bottom:1px solid #c0c0c0">
|
|
|
|
<form
|
|
|
|
action="javascript:search_form_submit('/mailservices/bateworld/users.php','section_content','frmsearch');"
|
|
|
|
method="post" name="frmsearch" id="frmsearch" style="background:transparent;">
|
|
|
|
<fieldset style="background:transparent;">
|
|
|
|
<label for="searchstring">Email: </label><input type="text" name="searchstring" id="searchstring"
|
|
|
|
size="20" class="expand_search"
|
|
|
|
value="<?php echo $_SESSION["se_user_searchstring"];?>"
|
|
|
|
onfocus="clearinput('search','se_user_searchstring');"
|
|
|
|
onblur="resetinput('search','se_user_searchstring');" onkeypress="submitenter()"
|
|
|
|
/>
|
|
<label for="user_username" style="padding-left:5px;">Username</label>
|
|
<input type="text" name="user_username" id="user_username" value="<?php echo $_SESSION["se_user_username"];?>" size="12" maxlength="32" />
|
|
<label for="uid" style="padding-left:5px;">UserID</label>
|
|
|
|
<input type="text" name="uid" id="uid" value="<?php echo $_SESSION['se_user_uid'];?>" size="2" maxlength="32" />
|
|
|
|
<label for="inactive" style="padding-left:5px;">Inactive (Days):</label>
|
|
|
|
<select name="modifyer" id="modifyer">
|
|
|
|
<option value="lt" <?php if($_SESSION["se_user_modifyer"]=="lt"){echo "selected=\"selected\"";} ?>>< </option>
|
|
<option value="gt" <?php if($_SESSION["se_user_modifyer"]=="gt"){echo "selected=\"selected\"";} ?>>> </option>
|
|
<option value="eq" <?php if($_SESSION["se_user_modifyer"]=="eq"){echo "selected=\"selected\"";} ?>>= </option>
|
|
</select>
|
|
|
|
<input type="text" name="inactive" id="inactive" value="<?php echo $_SESSION["se_user_inactive"];?>" size="1" maxlength="4" style="text-align:right;" />
|
|
|
|
|
|
<label for="limit" style="padding-left:5px;">EVC:</label>
|
|
|
|
<select name="evc" id="evc">
|
|
|
|
<option value="" <?php if($_SESSION["se_user_evc"]==""){echo "selected=\"selected\"";} ?>>ALL </option>
|
|
|
|
<option value="0" <?php if($_SESSION["se_user_evc"]=="0"){echo "selected=\"selected\"";} ?>>0 [off] </option>
|
|
|
|
<option value="1" <?php if($_SESSION["se_user_evc"]=="1"){echo "selected=\"selected\"";} ?>>1 [on] </option>
|
|
|
|
<option value="2" <?php if($_SESSION["se_user_evc"]=="2"){echo "selected=\"selected\"";} ?>>2 [open] </option>
|
|
|
|
<option value="3" <?php if($_SESSION["se_user_evc"]=="3"){echo "selected=\"selected\"";} ?>>3 [on] </option>
|
|
|
|
<option value="4" <?php if($_SESSION["se_user_evc"]=="4"){echo "selected=\"selected\"";} ?>>4 [abuse] </option>
|
|
|
|
<option value="5" <?php if($_SESSION["se_user_evc"]=="5"){echo "selected=\"selected\"";} ?>>5 [on] </option>
|
|
<option value="6" <?php if($_SESSION["se_user_evc"]=="6"){echo "selected=\"selected\"";} ?>>6 </option>
|
|
|
|
<option value="7" <?php if($_SESSION["se_user_evc"]=="7"){echo "selected=\"selected\"";} ?>>1,3,5 All On</option>
|
|
|
|
</select>
|
|
|
|
<label for="ulid">ML</label>
|
|
|
|
<select name="ulid" id="ulid">
|
|
|
|
<option value="" <?php if($_SESSION["user_level_id"]==""){echo "selected=\"selected\"";} ?>>All</option>
|
|
<option value="1" <?php if($_SESSION["user_level_id"]=="1"){echo "selected=\"selected\"";} ?>>Basic Plus</option>
|
|
<option value="5" <?php if($_SESSION["user_level_id"]=="5"){echo "selected=\"selected\"";} ?>> Basic (New)</option>
|
|
<option value="2" <?php if($_SESSION["user_level_id"]=="2"){echo "selected=\"selected\"";} ?>>Premium</option>
|
|
<option value="7" <?php if($_SESSION["user_level_id"]=="7"){echo "selected=\"selected\"";} ?>>Trial</option>
|
|
|
|
</select>
|
|
|
|
<label for="user_enabled">Enabled</label>
|
|
<select name="user_enabled" id="user_enabled">
|
|
<option value="" <?php if($_SESSION["se_user_enabled"]==""){echo "selected=\"selected\"";} ?>> All</option>
|
|
<option value="1" <?php if($_SESSION["se_user_enabled"]=="1"){echo "selected=\"selected\"";} ?>> Enabled</option>
|
|
<option value="0" <?php if($_SESSION["se_user_enabled"]=="0"){echo "selected=\"selected\"";} ?>> Disabled</option>
|
|
</select>
|
|
|
|
|
|
<label for="ip_lastactive">ip</label>
|
|
<input type="text" name="ip_lastactive" id="ip_lastactive" value="<?php echo $_SESSION["ip_lastactive"];?>" size="10" maxlength="64" style="text-align:right;" />
|
|
|
|
|
|
|
|
|
|
|
|
<label for="limit" style="padding-left:5px;">Rows:</label>
|
|
|
|
<select name="limit" id="limit">
|
|
|
|
<option value="1"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==1){echo "selected=\"selected\"";} ?>>
|
|
|
|
1 Row</option>
|
|
|
|
<option value="5"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==5){echo "selected=\"selected\"";} ?>>
|
|
|
|
5 Rows</option>
|
|
|
|
<option value="10"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==10){echo "selected=\"selected\"";} ?>>
|
|
|
|
10 Rows</option>
|
|
|
|
<option value="20"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==20){echo "selected=\"selected\"";} ?>>
|
|
|
|
20 Rows</option>
|
|
|
|
<option value="50"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==50){echo "selected=\"selected\"";} ?>>
|
|
|
|
50 Rows</option>
|
|
|
|
<option value="100"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==100){echo "selected=\"selected\"";} ?>>
|
|
|
|
100 Rows</option>
|
|
|
|
<option value="500"
|
|
|
|
<?php if($_SESSION["se_user_limit"]==500){echo "selected=\"selected\"";} ?>>
|
|
|
|
500 Rows</option>
|
|
|
|
|
|
</select>
|
|
|
|
<input type="submit" name="gosearch" id="gosearch" value="Search" class="redbutton search-btn" />
|
|
<div style="text-align:left;padding:5px 0px 0 0;">
|
|
<input type="button" name="gomail" id="gomail" value="Mail" class="redbutton search-btn" onclick="mail_form_submit();" /></div>
|
|
<input type="hidden" name="mailsub" id="mailsub" value="0" />
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php // end searchform?>
|
|
|
|
|
|
|
|
<div id="useraccounts" class="list-wrap">
|
|
|
|
<form name="frmactive" method="post" action="#">
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
|
|
|
|
</legend>
|
|
|
|
<table width="100%" cellpadding="0" cellspacing="1" id="tb-full"
|
|
|
|
class="tb-full">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="th-first"><span id="msev" onclick="uncheckall();">On/Off</span></th>
|
|
<th>EV<sup style="font-size:60%;vertical-align:top;line-height:280%;">2</sup>C</th>
|
|
<th>OPTIN</th>
|
|
<th>Username</th>
|
|
|
|
<th>Email</th>
|
|
<th>ID</th>
|
|
|
|
<th nowrap="norwrap">Sign Up</th>
|
|
|
|
<th nowrap="nowrap">Last Login</th>
|
|
|
|
<th nowrap="nowrap">Inactive</th>
|
|
|
|
<th nowrap="nowrap">Level</th>
|
|
|
|
<th nowrap="nowrap">Birthday</th>
|
|
<th nowrap="nowrap">ip Address</th>
|
|
|
|
<th class="th-last" style="text-align:right;padding-right:3px;"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$rownum=0;
|
|
|
|
while ($row = mysql_fetch_assoc($result)) {
|
|
$rownum=$rownum+1;
|
|
|
|
|
|
if($rownum % 2 != 0){$rc="#ffff99";} else{$rc="#fff";}
|
|
|
|
echo "<tr style=\"background:".$rc.";\" onmouseover=\"this.style.background='#ccffcc';\" onmouseout=\"this.style.background='".$rc."';\" class=\"trr\" valign=\"top\" id=\"therow_".$rownum."\">";
|
|
$account_on="";
|
|
if($row["user_enabled"]==1){$account_on=" checked=\"checked\"";}
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd td-first\"><input name=\"del_user_".$rownum."\" id=\"del_user_".$rownum."\" type=\"checkbox\" onclick=\"delmember('".$rownum."','".$row["user_id"]."','".$row["user_enabled"]."');\" ".$account_on." class=\"ev\" /></td>";
|
|
|
|
$checked="";
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"center\" style=\"text-align:center;\" id=\"emc_".$rownum."\">".$row["user_pdp_evc"]."</td>";
|
|
|
|
if($row["user_pdp_evc"]==5)
|
|
{
|
|
|
|
//$sqlupevc="UPDATE se_users SET user_pdp_evc = 3 WHERE user_email = '".$row["user_email"]."'";
|
|
// $qupevc=mysql_query($sqlupevc) or $em=$em.mysql_error();
|
|
}
|
|
|
|
|
|
if($row["user_pdp_optout"] == 0){$optin="Yes";} else {$optin="No";}
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"center\" style=\"text-align:center;\">".$optin."</td>";
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"left\" style=\"text-align:left;\">".$row["user_username"]."</td>";
|
|
|
|
|
|
|
|
if(is_temp_mail($row["user_email"], $_SESSION["dealist"])){
|
|
$tempemail="TEMP";
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\"><a href=\"mailto:".$row["user_email"]."\" style='color:red;background:black;'>".$row["user_email"]." ".$tempemail."</a></td>";
|
|
//$sqlupevc="UPDATE se_users SET user_pdp_evc = 0 WHERE user_email = '".$row["user_email"]."'";
|
|
//$qupevc=mysql_query($sqlupevc) or $em=$em.mysql_error();
|
|
|
|
}
|
|
|
|
else {
|
|
$tempemail="NOT TEMP";
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\"><a href=\"mailto:".$row["user_email"]."\" style='color:green;'>".$row["user_email"]." ".$tempemail."</a></td>";
|
|
|
|
}
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"left\" style=\"text-align:left;\">".$row["user_id"]."</td>";
|
|
|
|
$signup=date("m.d.y",$row["user_signupdate"]);
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\">".$signup."</td>";
|
|
|
|
$lastlogin=date("m.d.y",$row["user_lastlogindate"]);
|
|
|
|
|
|
|
|
|
|
|
|
$diff=abs(time() - $row["user_lastlogindate"]);
|
|
|
|
//$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
|
|
|
|
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\">".$lastlogin."</td>";
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" style=\"text-align:right\">".$row["daysinactive"]." days</td>";
|
|
|
|
if($row["daysinactive"] > 365)
|
|
{
|
|
|
|
//$sqlupinactive="UPDATE se_users SET user_enabled = 0, user_pdp_evc = 0 WHERE user_id = ".$row["user_id"]." ";
|
|
//$qupinactive=mysql_query($sqlupinactive) or $em=$em.mysql_error();
|
|
|
|
|
|
}
|
|
|
|
$mp="";
|
|
|
|
if($row["user_level_id"]==1)
|
|
|
|
{
|
|
|
|
$mp="Basic";
|
|
|
|
}
|
|
|
|
if($row["user_level_id"]==2)
|
|
|
|
{
|
|
|
|
$mp="Premium";
|
|
$expires_days=$row["userplan_expiredate"] - time();
|
|
|
|
//$expires_days = floor(($expires_days - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
|
|
|
|
}
|
|
|
|
if($row["user_level_id"]==5)
|
|
|
|
{
|
|
|
|
$mp="New Basic";
|
|
|
|
}
|
|
|
|
$expires=date("m.d.Y",$row["userplan_expiredate"]);
|
|
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"center\" style=\"text-align:left\">".$mp." ".$row["user_level_id"]."</td>";
|
|
|
|
$bday=strtotime($row["birthday"]);
|
|
|
|
$bm=date("m",$bday);
|
|
|
|
$bd=date("d",$bday);
|
|
|
|
$m=date("m",time());
|
|
|
|
$d=date("d",time());
|
|
|
|
if($bd!=$d && $bm!=$m)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo "<td nowrap=\"nowrap\" class=\"tdd\" align=\"center\" style=\"text-align:center\">".$row["birthday"]."---".$row["Age"]."";
|
|
echo "</td>";
|
|
echo '<td class="tdd" nowrap="nowrap">'.$row["user_ip_lastactive"].'</td>';
|
|
|
|
|
|
//echo '<td class="tdd" nowrap="nowrap">'.$expires.'sssssss'.$row["expiredays"].'</td>';
|
|
|
|
$smtp_validate="";
|
|
|
|
|
|
if($row["user_enabled"]<=0)
|
|
{
|
|
|
|
$evalid=getUrlContent("http://apilayer.net/api/check?access_key=03393a1af77497a8aaef46f4786c5a4f&email=".$row["user_email"]."");
|
|
$obj = json_decode($evalid);
|
|
if($obj->{'smtp_check'} === false)
|
|
{
|
|
$smtp_validate="NO";
|
|
}
|
|
else
|
|
{
|
|
$smtp_validate="YES";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
echo "<td align=\"right\" width=\"100%\" class=\"tdd tdd-last\">";
|
|
if($smtp_validate=="YES")
|
|
{
|
|
echo "Valid Email";
|
|
}
|
|
else
|
|
{
|
|
|
|
echo "not valid";
|
|
}
|
|
$themailsent="";
|
|
if($domail==1)
|
|
{
|
|
if($row["user_enabled"]==1)
|
|
{
|
|
if($row["user_pdp_evc"]== 1 || $row["user_pdp_evc"] == 3 || $row["user_pdp_evc"] == 5)
|
|
{
|
|
if($optin=="Yes")
|
|
{
|
|
if(strpos($row["user_email"], "verizon")===false && strpos($row["user_email"], "comcast")===false && strpos($row["user_email"], "aol")===false && strpos($row["user_email"], "hotmail")===false )
|
|
{
|
|
ini_set('display_errors','On');
|
|
include "/home/bateworldcom/public_html/mailservices/bateworld/mail/cybersocket_mail.php";
|
|
echo "<strong>".$themailsent."</strong> ";
|
|
}
|
|
else
|
|
{
|
|
echo "verizon";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
//rights will determine this
|
|
echo $row["user_pdp_optout"];
|
|
echo "---";
|
|
echo "<image src=\"/mailservices/images/icons/chat-small.png\" style=\"margin-right:5px;\" /> ";
|
|
|
|
|
|
echo '<a href="#" onclick="getmenucontent(\'/mailservices/bateworld/user_privacy.php?uid='.$row["user_id"].'\',\'section_content\',\'b8world_tabs\',\'five\',this.parentNode,\'h\')">Account Settings</a></td>';
|
|
|
|
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
if($rownum==0)
|
|
|
|
{
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td class=\"nrr\" colspan=\"5\">No Records Returned.</td>";
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php // user accoutns?>
|
|
|
|
<div class="page-nav">
|
|
|
|
<div style="float: right;">
|
|
|
|
|
|
|
|
<?php recordsetNav($thecount,$_SERVER['PHP_SELF'],$_SESSION['the_section_container'],$offset,$limit,1);?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div><?php // end se_user manager ?>
|
|
|