106 lines
3.6 KiB
PHP
106 lines
3.6 KiB
PHP
<?php header('Content-Type: text/html; charset=utf-8');?>
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<?php
|
|
function uuid() {
|
|
// The field names refer to RFC 4122 section 4.1.2
|
|
return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',
|
|
mt_rand(0, 65535), mt_rand(0, 65535),
|
|
mt_rand(0, 65535),
|
|
mt_rand(0, 4095),
|
|
bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
|
|
mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)
|
|
);
|
|
}
|
|
$fresh=uuid();
|
|
|
|
?>
|
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="refresh" content="30; url=http://bateworld.com/mailservices/spam_profile_messages.php?dofresh=<?php echo $fresh;?>">
|
|
<title>Lion Hunt (Profile Comments)</title>
|
|
</head>
|
|
<body>
|
|
<img src="/mailservices/hunt_the_lion_100x104.jpg" width="55" height="55" style="float:right;margin-left:10px;" />
|
|
<h1>Welcome to Lion Hunt (Profile Messages)</h1>
|
|
<table>
|
|
<thead>
|
|
<tr style="background-color:darkred;color:#fff;">
|
|
<th style="text-align:left;padding:5px 10px 5px 5px;">Author ID</th>
|
|
<th style="text-align:left;padding:5px;">Username</th>
|
|
<th style="text-align:left;padding:5px;" colspan="2">Message</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="4" style="background-color:darkred;color:white;font-weight:bold;padding:5px 10px 5px 10px;">Profile Comments Moderation</th>
|
|
</tr>
|
|
</tfoot>
|
|
<tbody>
|
|
<?php
|
|
function connecttodb()
|
|
{
|
|
$emsg="Ok";
|
|
$mhostname = "localhost";
|
|
$mdatabase = "bateworldcom";
|
|
$musername = "db.bateworldcom";
|
|
$mpassword = "sDIE8U8!5n*4%Ue_x.Pq";
|
|
mysql_connect($mhostname, $musername, $mpassword) or $emsg="Host Connect Error";
|
|
if($emsg=="Ok"){mysql_select_db($mdatabase) or $emsg="Database Connection Error";}
|
|
return($emsg);
|
|
}
|
|
|
|
$ctb=connecttodb();
|
|
mysql_query("SET NAMES UTF8");
|
|
$sqlpm="SELECT `profilecomment_id`,`profilecomment_authoruser_id`,`profilecomment_date`, `profilecomment_body`, `se_users`.`user_username` FROM `se_profilecomments`
|
|
LEFT OUTER JOIN `se_users` ON `profilecomment_authoruser_id` =`se_users`.`user_id`
|
|
WHERE CHAR_LENGTH(`profilecomment_body`) > 10 AND ((floor((UNIX_TIMESTAMP()-`se_users`.`user_signupdate`) / (60*60*24))) <= 7)";
|
|
$query = mysql_query($sqlpm);
|
|
$rownum=0;
|
|
|
|
|
|
|
|
|
|
while ($row = mysql_fetch_assoc($query)) {
|
|
$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."\">";
|
|
echo '<td style="padding:5px 10px 5px 5px;text-align:left;"><a href="#" onclick="killleo('.$row["profilecomment_authoruser_id"].')">'.$row["profilecomment_authoruser_id"].'</a></td>';
|
|
echo '<td style="padding:5px;text-align:left;">'.$row["user_username"].'</td>';
|
|
echo '<td style="padding:5px;text-align:left;">'.$row["profilecomment_body"].'</td>';
|
|
echo '<td style="padding:5px;text-align:right;" nowrap="nowrap"> Delete | Ban | <a href="#" onclick="lionhunt(\'kill\','.$row["profilecomment_authoruser_id"].')">Kill</a></td>';
|
|
echo '</tr>';
|
|
}
|
|
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<script type='text/javascript' src="/mailservices/js/jquery-1.7.2.min.js"></script>
|
|
<script>
|
|
function lionhunt(theact,theid)
|
|
{
|
|
"use strict";
|
|
var url="/bebop/lionhunt.php";
|
|
jQuery.ajax({
|
|
url: url,
|
|
type: 'GET',
|
|
data:{userid:theid,takeaction:theact},
|
|
async: true,
|
|
cache: false,
|
|
success: function(data) {
|
|
//setup the wall
|
|
|
|
alert(data.theerror);
|
|
|
|
|
|
},
|
|
error: function(resp, textStatus, errorThrown){
|
|
alert('problem'); }
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|