$title Control Panel
$title Control Panel
$title Control Panel
"); while (list($key, $val) = each($menu)) { if ($key == $y) {echo("» ");} echo(""); echo($val); if ($key == $y) {echo("");} echo(" |
"); } echo("
"); $sures = mysql_query("select value from adminprops where field='surplu'"); function surplus() { global $sures; $surp = mysql_result($sures, 0); $surp = round($surp, 2); if ($surp < 0) {$uig = 'Credits Deficiency';} else {$uig = 'Surplus Credits';} echo("
$uig: $surp |
$full_menu[$y]
"); } if ($y == 0) { surplus(); title(); $res = mysql_query("select value from admin where field='lastac'"); $lastac = date("Y-m-d H:i:s", mysql_result($res, 0)); $lastac2 = mysql_result($res, 0); $res = mysql_query("select id, email from user where joindate>'$lastac'"); if (mysql_num_rows($res) == 0) { echo("
There are no new users
"); } else { echo("
New users:
"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $em = mysql_result($res, $i, "email"); echo("$em
"); } echo("
"); } $res = mysql_query("select id, url from site where state='Waiting'"); if (mysql_num_rows($res) == 0) { echo("
There are no sites waiting for approval
"); } else { $kuku = mysql_num_rows($res); switch ($kuku) { case 1: $there = "There is"; $sitez = "site"; break; default: $there = "There are"; $sitez = "sites"; } echo("
$there $kuku $sitez waiting for approval
"); } $res = mysql_query("select id, siteid, usrid from abuse where unix_timestamp(date)>'$lastac2'"); if (mysql_num_rows($res) == 0) { echo("
There are no new abuse reports
"); } else { echo("
New abuse reports:
"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $em = mysql_result($res, $i, "siteid"); $et = mysql_result($res, $i, "usrid"); echo("Site #$em by user #$et
"); } echo("
"); } } elseif ($y == 1) { surplus(); title(); if ($a_form1 == 'sent') { $error = ""; if ($a_login == "") { $error = $error . "You must not leave the 'login' field blank
"; } if ($a_email == "") { $error = $error . "You must not leave the 'e-mail' field blank
"; } if ($a_passwd != $asess_passwd) { $error = $error . "Your password is wrong
"; } if ($error != "") { $error = $error . "
Use your browser's BACK button"; echo($error); } else { $res = mysql_query("update admin set value='$a_login' where field='login'"); $res = mysql_query("update admin set value='$a_email' where field='email'"); $asess_name = $a_login; echo("New values were successfully saved in the database."); } } elseif ($a_form2 == 'sent') { $error = ""; if ($a_old_passwd != $asess_passwd) { $error = $error . "Your old password is wrong
"; } if ($a_new_passwd1 == "") { $error = $error . "You must not leave 'new password' field blank
"; } if ($a_new_passwd1 != $a_new_passwd2) { $error = $error . "Your new password doesn't match
"; } if ($error != "") { $error = $error . "
Use your browser's BACK button"; echo($error); } else { $res = mysql_query("update admin set value='$a_new_passwd1' where field='passwd'"); $asess_passwd = $a_new_passwd1; echo("Your password was successfully changed."); } } else { $res = mysql_query("select value from admin where field='email'"); $a_email = mysql_result($res, 0); echo("
Change password
");
}
} elseif ($y == 2) {
surplus();
title();
$fields = array("inibon", "reftim", "negact", "contex", "contey", "inact");
if ($pform == 'sent') {
$error = "";
if (!is_numeric($inact) || !is_numeric($inibon) || !is_numeric($reftim) || !is_numeric($contex) || !is_numeric($contey)) {
$error = $error . "All the values you enter must be numeric"; } if ($inact == "" || $inibon == "" || $reftim == "" || $contex == "" || $contey == "") { $error = $error . "You must not leave any fields blank
"; } if ($error != "") { $error = $error . "
Use your browser's BACK button"; echo($error); } else { while (list($k, $v) = each($fields)) { $res = mysql_query("update adminprops set value=${$v} where field='$v'"); } echo("New values were successfully saved in the database."); } } else { while (list($k, $v) = each($fields)) { $res = mysql_query("select value from adminprops where field='$v'"); $props[$v] = mysql_result($res, 0); } reset($props); echo("
"); echo("
"); while (list($k, $v) = each($props)) { switch ($k) { case 'inibon': echo(""); break; case 'reftim': echo(""); break; case 'negact': echo(""); break; case 'contex': echo(""); break; case 'contey': echo(""); break; case 'inact': echo(""); break; } } echo("
Initial bonus: | This value is added to every new user's account. | |
Refresh time: | Time in seconds the viewbar is refreshed. | |
Show sites in advance: | System behavior when there are no valid user sites to show. When set to 'NO' the default site (defined in '/vars.php') is shown. | |
Contest 'x': | Number of site views user gets a bonus link. If set to '0', the feature is disabled. | |
Contest bonus: | Amount of credits user wins in viewing contest. | |
Inactivity threshold: | Number of days before user is considered inactive. |
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
echo("
");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$name = mysql_result($res, $i, "name");
$email = mysql_result($res, $i, "email");
$acc = mysql_result($res, $i, "acctype");
echo("");
}
echo("
");
if ($pages > 1) {
echo("id | Name | Account | |
$id | $name | $actypes[$acc] |
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
} else {
if ($fform == 'sent') {
if ($fac == 'trash') {
$fquery = "delete from user where id=$u";
$res = mysql_query("select id from site where usrid=$u");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$sss = mysql_result($res, $i);
$newres = mysql_query("delete from abuse where siteid=$sss");
$newres = mysql_query("delete from 7statsite where siteid=$sss");
}
$res = mysql_query("delete from site where usrid=$u");
$res = mysql_query("delete from 7stat where usrid=$u");
$rep = "User #$u was deleted from the database.";
$back = "a=$a";
} else {
$rep = "Changes to user #$u were saved in the database.";
$back = "a=$a&s=$s";
$opactyp = mysql_result(mysql_query("select name from acctype where id=$acctype"), 0);
if ($opactyp == 'Premium') {
$oppremrd = mysql_result(mysql_query("select premregdate from user where id=$u"), 0);
if (!isset($oppremrd)) {
$opdate = date('Y-m-d H:i:s');
$opprembn = mysql_result(mysql_query("select value from adminprops where field='prembn'"), 0);
$res = mysql_query("update user set premregdate='$opdate' where id=$u");
$credits = $credits + $opprembn;
}
}
$oldcred = mysql_result(mysql_query("select credits from user where id=$u"), 0);
$surp = $oldcred - $credits;
$surpres = mysql_query("update adminprops set value=value+$surp where field='surplu'");
$fquery = "update user set name='$name', email='$email', passwd='$passwd', ref='$ref', acctype='$acctype', credits='$credits', minmax='$minmax' where id=$u";
}
$res = mysql_query($fquery);
echo("$rep« GO TO to user list"); } else { $res = mysql_query("select name, email, passwd, ref, acctype, credits, DATE_FORMAT(joindate, '%Y-%m-%d') as joindate, minmax from user where id=$u"); if (mysql_num_rows($res) == 0) { echo("User #$u was not found in the database."); } else { if ($mail == 'send') { $email = mysql_result(mysql_query("select email from user where id=$u"), 0); $admail = mysql_result(mysql_query("select value from admin where field='email'"), 0); $subject = stripslashes($subject); $message = stripslashes($message); mail($email, $subject, $message, "From: \"$title Admin\" <$admail>"); echo("Your e-mail message was sent.
« BACK to user #$u
« GO TO to user list"); } else { $name = mysql_result($res, 0, "name"); $email = mysql_result($res, 0, "email"); $passwd = mysql_result($res, 0, "passwd"); $ref = mysql_result($res, 0, "ref"); $acctype = mysql_result($res, 0, "acctype"); $credits = mysql_result($res, 0, "credits"); $credits = round($credits, 2); $joindate = mysql_result($res, 0, "joindate"); $minmax = mysql_result($res, 0, "minmax"); $res = mysql_query("select id, name from acctype"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $key = mysql_result($res, $i, "id"); $val = mysql_result($res, $i, "name"); $actypes[$key] = $val; } $almin = array("No", "Yes"); $res = mysql_query("select id, url, state, credits from site where usrid=$u"); echo("
User #$u:
Signed up: | $joindate |
E-mail: | |
Password: | |
Name: | |
Credits: | |
Account: | |
Allow minimized: | |
Referrer: |
User sites:
"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $url = mysql_result($res, $i, "url"); $state = mysql_result($res, $i, "state"); $credits = mysql_result($res, $i, "credits"); $credits = round($credits, 2); echo(""); } echo("
");
echo(""); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $url = mysql_result($res, $i, "url"); $state = mysql_result($res, $i, "state"); $credits = mysql_result($res, $i, "credits"); $credits = round($credits, 2); echo(""); } echo("
id | URL | State | Credits |
$id | $url | $state | $credits |
E-mail this user:
Subject: | |
Message: |
"); }} } } } elseif ($y == 4) { surplus(); title(); if (!isset($u) || !is_numeric($u)) { $actypes = array("All sites", "Enabled", "On hold", "Waiting", "Suspended"); if (!isset($a) || !is_numeric($a)) { $a = 0; } echo("| "); while (list($k, $v) = each($actypes)) { if ($k == $a) {echo("");} else {echo("");} echo($v); if ($k == $a) {echo("");} else {echo("");} echo(" | "); } if (!isset($s) || $s < 1 || !is_numeric($s)) { $s = 1; } $start = ($s - 1) * $lim; $fquery = "select id, usrid, url, state from site"; if ($a != 0) {$fquery = $fquery . " where state='$actypes[$a]'";} $countpages = $fquery; $fquery = $fquery . " order by id asc limit $start, $lim"; $res = mysql_query($fquery); $pages = ceil(mysql_num_rows(mysql_query($countpages)) / $lim); if ($pages > 1) { echo("
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
echo("
");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$url = mysql_result($res, $i, "url");
$usrid = mysql_result($res, $i, "usrid");
$state = mysql_result($res, $i, "state");
echo("");
}
echo("
");
if ($pages > 1) {
echo("id | URL | User id | State | Open |
$id | $url | $usrid | $state | [open] |
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
} else {
if ($fform == 'sent') {
if ($fac == 'trash') {
$fquery = "delete from site where id=$u";
$kukures = mysql_query("delete from abuse where siteid=$u");
$rep = "Site #$u was deleted from the database.";
$back = "a=$a";
} else {
$fquery = "update site set name='$name', url='$url', lang='$lang', state='$state', credits='$credits' where id=$u";
$rep = "Changes to site #$u were saved in the database.";
$back = "a=$a&s=$s";
}
$oldcred = mysql_result(mysql_query("select credits from site where id=$u"), 0);
$surp = $oldcred - $credits;
$surpres = mysql_query("update adminprops set value=value+$surp where field='surplu'");
$res = mysql_query($fquery);
echo("$rep« GO TO to site list"); } else { $res = mysql_query("select usrid, name, url, lang, state, credits, totalhits from site where id=$u"); if (mysql_num_rows($res) == 0) { echo("Site #$u was not found in the database."); } else { $name = mysql_result($res, 0, "name"); $usrid = mysql_result($res, 0, "usrid"); $url = mysql_result($res, 0, "url"); $lang = mysql_result($res, 0, "lang"); $state = mysql_result($res, 0, "state"); $credits = mysql_result($res, 0, "credits"); $credits = round($credits, 2); $totalhits = mysql_result($res, 0, "totalhits"); $states = array("Enabled" => "Enabled", "On hold" => "On hold", "Waiting" => "Waiting for approval", "Suspended" => "Suspended"); $langs = array("English" => "English", "Arabic" => "Arabic", "Chinese" => "Chinese", "Czech" => "Czech", "Danish" => "Danish", "Dutch" => "Dutch", "Estonian" => "Estonian", "Finnish" => "Finnish", "French" => "French", "German" => "German", "Greek" => "Greek", "Hebrew" => "Hebrew", "Hungarian" => "Hungarian", "Icelandic" => "Icelandic", "Italian" => "Italian", "Japanese" => "Japanese", "Korean" => "Korean", "Latvian" => "Latvian", "Lithuanian" => "Lithuanian", "Norwegian" => "Norwegian", "Polish" => "Polish", "Portuguese" => "Portuguese", "Romanian" => "Romanian", "Russian" => "Russian", "Spanish" => "Spanish", "Swedish" => "Swedish", "Turkish" => "Turkish"); $res = mysql_query("select id, usrid, DATE_FORMAT(date, '%Y-%m-%d') as date from abuse where siteid=$u order by date desc"); echo("
Site #$u:
Owned by: | user #$usrid |
Total hits: | $totalhits |
URL: | [open] |
Name: | |
State: | |
Credits: | |
Language: |
Abuse reports:
"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $usrid = mysql_result($res, $i, "usrid"); $date = mysql_result($res, $i, "date"); echo(""); } echo("
");
}
}
}
} elseif ($y == 5) {
surplus();
title();
if (!isset($u) || !is_numeric($u)) {
if (!isset($s) || $s < 1 || !is_numeric($s)) {
$s = 1;
}
$start = ($s - 1) * $lim;
$fquery = "select id, siteid, usrid, DATE_FORMAT(date, '%Y-%m-%d') as date from abuse";
$countpages = $fquery;
$fquery = $fquery . " order by id desc limit $start, $lim";
$res = mysql_query($fquery);
$pages = ceil(mysql_num_rows(mysql_query($countpages)) / $lim);
if ($pages > 1) {
echo(""); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $usrid = mysql_result($res, $i, "usrid"); $date = mysql_result($res, $i, "date"); echo(""); } echo("
id | By user # | Date | |
$id | $usrid | $date | open» |
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
echo("
");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$siteid = mysql_result($res, $i, "siteid");
$usrid = mysql_result($res, $i, "usrid");
$date = mysql_result($res, $i, "date");
$siteurl = mysql_result(mysql_query("select url from site where id=$siteid"), 0);
echo("");
}
echo("
");
if ($pages > 1) {
echo("id | Subject | By user# | Date |
$id | $siteurl | $usrid | $date |
");
for ($i = 1; $i <= $pages; $i++) {
echo("[");
if ($i == $s) {echo("");}
else {echo("");}
echo("Page $i");
if ($i == $s) {echo("");}
else {echo("
");}
echo("] ");
}
echo("");
}
} else {
if ($fform == 'sent') {
$res = mysql_query("delete from abuse where id=$u");
echo("Abuse report #$u was deleted from the database.« GO TO to abuse report list"); } else { $res = mysql_query("select siteid, usrid, text, DATE_FORMAT(date, '%Y-%m-%d') as date from abuse where id=$u"); if (mysql_num_rows($res) == 0) { echo("Abuse report #$u was not found in the database."); } else { if ($mail == 'send') { $email = mysql_result(mysql_query("select email from user where id=$usrid"), 0); $admail = mysql_result(mysql_query("select value from admin where field='email'"), 0); $subject = stripslashes($subject); $message = stripslashes($message); mail($email, $subject, $message, "From: \"$title Admin\" <$admail>"); echo("Your e-mail message was sent.
« BACK to abuse report #$u
« GO TO to abuse reports list"); } else { $siteid = mysql_result($res, 0, "siteid"); $usrid = mysql_result($res, 0, "usrid"); $text = mysql_result($res, 0, "text"); $date = mysql_result($res, 0, "date"); $res = mysql_query("select email from user where id=$usrid"); $author = mysql_result($res, 0, "email"); $res = mysql_query("select usrid, url from site where id=$siteid"); $url = mysql_result($res, 0, "url"); $ownid = mysql_result($res, 0, "usrid"); $res = mysql_query("select email from user where id=$ownid"); $ownmail = mysql_result($res, 0); $text = nl2br($text); echo("
Abuse report #$u:
");
echo("
E-mail report author:
Subject: | |
Message: |
"); } } } } } elseif ($y == 6) { surplus(); title(); $css_file_name = $DOCUMENT_ROOT . "/style.css"; $fields = array("1page", "terms", "head1", "foot1", "head2", "foot2", "thanx", "paymn"); $fnames = array("Site first page", "Terms & conditions", "Main page header", "Main page footer", "User area header", "User area footer", "'Thank you' page", "Payment details"); if ($cform == 1) { $fp = fopen($css_file_name, "w"); fwrite($fp, $css); fclose($fp); } elseif ($cform > 1 && $cform < 10) { $key = $cform - 2; $res = mysql_query("update html set content='${$fields[$key]}' where type='$fields[$key]'"); } $fp = fopen($css_file_name, "r"); $css = fread($fp, filesize($css_file_name)); fclose($fp); echo("
Cascading Style Sheets:
"); while (list($k, $v) = each($fields)) { $cfn = $k + 2; $content = mysql_result(mysql_query("select content from html where type='$v'"), 0); echo("
$fnames[$k] (HTML):
"); } } elseif ($y == 7) { surplus(); title(); if (is_numeric($fform) && ereg($self_name, $HTTP_REFERER)) { if ($fform == 0) { $fquery = "insert into sellcredit (name, descr, cost, paypal) values ('$name', '$descr', '$cost', '$paypal')"; } elseif ($fac == 'trash') { $fquery = "delete from sellcredit where id=$fform"; } else { $fquery = "update sellcredit set name='$name', descr='$descr', cost='$cost', paypal='$paypal' where id=$fform"; } $res = mysql_query($fquery); } echo("
New entry:
"); $res = mysql_query("select * from sellcredit order by id asc"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $name = mysql_result($res, $i, "name"); $descr = mysql_result($res, $i, "descr"); $cost = mysql_result($res, $i, "cost"); $paypal = mysql_result($res, $i, "paypal"); echo("
Entry #$id:
Title: | |
Cost: | |
Description: | |
PayPal code: |
New entry:
"); $res = mysql_query("select * from acctype order by id asc"); for ($i = 0; $i < mysql_num_rows($res); $i++) { $id = mysql_result($res, $i, "id"); $name = mysql_result($res, $i, "name"); $descr = mysql_result($res, $i, "descr"); $ratemin = mysql_result($res, $i, "ratemin"); $ratemax = mysql_result($res, $i, "ratemax"); $cost = mysql_result($res, $i, "cost"); $paypal = mysql_result($res, $i, "paypal"); echo("
Entry #$id:
");
if ($name == 'Premium') {
$premmx = mysql_result(mysql_query("select value from adminprops where field='premmx'"), 0);
$prembn = mysql_result(mysql_query("select value from adminprops where field='prembn'"), 0);
echo("");
}
echo("
");
}
} elseif ($y == 9) {
surplus();
title();
if ($fform == 'sent' && ereg($self_name, $HTTP_REFERER) && $subject != "" && $message != "") {
$admail = mysql_result(mysql_query("select value from admin where field='email'"), 0);
$res = mysql_query("select name, email from user");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$name = mysql_result($res, $i, "name");
$email = mysql_result($res, $i, "email");
$message = str_replace('[name]', $name, $message);
$subject = stripslashes($subject);
$message = stripslashes($message);
mail($email, $subject, $message, "From: \"$title Admin\" <$admail>");
}
}
echo("Title: | |
Cost: | |
Minimized rate: | |
Maximized rate: | |
Max. months no.: | |
First month bonus: | |
Description: | |
PayPal code: |
"); } elseif ($y == 10) { surplus(); title(); if ($bform == 'file') { if (($HTTP_POST_FILES['upfile']['type'] == "image/gif" || $HTTP_POST_FILES['upfile']['type'] == "image/jpeg" || $HTTP_POST_FILES['upfile']['type'] == "image/pjpeg") && $HTTP_POST_FILES['upfile']['size'] <= 30720 && ereg($self_name, $HTTP_REFERER)) { switch ($HTTP_POST_FILES['upfile']['type']) { case "image/gif": $ext = ".gif"; break; case "image/pjpeg": case "image/jpeg": $ext = ".jpg"; break; } $simgurl = '/banners/' . $HTTP_POST_FILES['upfile']['name']; $wh = getimagesize($HTTP_POST_FILES['upfile']['tmp_name']); $res = mysql_query("insert into banner (imgurl, widtheight) values ('$simgurl', '$wh[3]')"); $lastid = mysql_insert_id(); rename($HTTP_POST_FILES['upfile']['tmp_name'], $DOCUMENT_ROOT . "/banners/ban$lastid" . $ext); $simgurl = $self_url . "banners/ban$lastid" . $ext; $res = mysql_query("update banner set imgurl='$simgurl' where id=$lastid"); } } elseif (is_numeric($bform) && ereg($self_name, $HTTP_REFERER)) { $res = mysql_query("select imgurl from banner where id=$bform"); $dext = mysql_result($res, 0); $dext = substr($dext, -4); unlink($DOCUMENT_ROOT . "/banners/ban" . $bform . $dext); $res = mysql_query("delete from banner where id=$bform"); } echo("
Upload new banner:
");
$res = mysql_query("select id, imgurl, widtheight from banner order by id asc");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$imgurl = mysql_result($res, $i, "imgurl");
$widht = mysql_result($res, $i, "widtheight");
echo("
Banner #$id:
");
}
} elseif ($y == 11) {
surplus();
title();
if (is_numeric($fform) && ereg($self_name, $HTTP_REFERER)) {
if ($fform == 0) {
$fquery = "insert into faq (quest, answ) values ('$quest', '$answ')";
} elseif ($fac == 'trash') {
$fquery = "delete from faq where id=$fform";
} else {
$fquery = "update faq set quest='$quest', answ='$answ' where id=$fform";
}
$res = mysql_query($fquery);
}
echo("
New entry:
");
$res = mysql_query("select * from faq order by id asc");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$quest = mysql_result($res, $i, "quest");
$answ = mysql_result($res, $i, "answ");
echo("
Entry #$id:
Question: | |
Answer: |
New entry:
");
$res = mysql_query("select * from tads order by id asc");
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$id = mysql_result($res, $i, "id");
$text = mysql_result($res, $i, "text");
echo("
Entry #$id:
Text (HTML): |
Users' earned credits:
"); reset($arr2); while (list($k, $v) = each($arr2)) { $v = round($v); $px = 500 * ((($v * 100) / $maxnum) / 100); $px = round($px); echo(""); } echo("
Total: $maxnum
");
$res = mysql_query("select date from 7statsite order by date desc");
$sarr1 = array();
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$sarr1[] = mysql_result($res, $i);
}
$sarr1u = array();
for ($i = 0; $i < count($sarr1); $i++) {
if (!in_array($sarr1[$i], $sarr1u)) { $sarr1u[] = $sarr1[$i];}
}
$sarr1u = array_slice($sarr1u, 0, 7);
$sarr2 = array();
reset($sarr1u);
while (list($k, $v) = each($sarr1u)) {
$res = mysql_query("select sum(num) from 7statsite where date='$v'");
$sarr2[$v] = mysql_result($res, 0);
}
$maxnum = 0;
reset($sarr2);
while (list($k, $v) = each($sarr2)) {
$maxnum = $maxnum + $v;
}
$maxnum = round($maxnum);
echo(""); reset($arr2); while (list($k, $v) = each($arr2)) { $v = round($v); $px = 500 * ((($v * 100) / $maxnum) / 100); $px = round($px); echo(""); } echo("
$k | $v |
Users' sites shown:
"); reset($sarr2); while (list($k, $v) = each($sarr2)) { $v = round($v); $px = 500 * ((($v * 100) / $maxnum) / 100); $px = round($px); echo(""); } echo("
Total: $maxnum
");
} elseif ($y == 14) {
title();
unset($HTTP_SESSION_VARS);
session_destroy();
$time = time();
$res = mysql_query("update admin set value='$time' where field='lastac'");
echo("You have successfully logged out.");
}
echo("");
mysql_close;
?>"); reset($sarr2); while (list($k, $v) = each($sarr2)) { $v = round($v); $px = 500 * ((($v * 100) / $maxnum) / 100); $px = round($px); echo(""); } echo("
$k | $v |