Esempio n. 1
0
    $sql->query("DELETE FROM `forummods` WHERE `forum`='{$id}'") or die(mysql_error());
    $sql->query("DELETE FROM `forums` WHERE `id`='{$id}'") or die(mysql_error());
    $lastthread = $sql->fetchq("SELECT * FROM `threads` WHERE `forum`='{$mergeid}' ORDER BY `lastpostdate` DESC LIMIT 1");
    $sql->query("UPDATE `forums` SET\r\n\t\t`numthreads`=`numthreads`+'{$counts['numthreads']}',\r\n\t\t`numposts`=`numposts`+'{$counts['numposts']}',\r\n\t\t`lastpostdate`='{$lastthread['lastpostdate']}',\r\n\t\t`lastpostuser`='{$lastthread['lastposter']}',\r\n\t\t`lastpostid`='{$lastthread['id']}'\r\n\tWHERE `id`='{$mergeid}'") or die(mysql_error());
    if (isset($_GET['preview'])) {
        $prevtext = "preview=" . $_GET['preview'];
    }
    trigger_error("DELETED forum ID {$id}; merged into forum ID {$mergeid}", E_USER_NOTICE);
    header("Location: ?{$prevtext}");
    die;
}
$windowtitle = "Editing Forum List";
require_once 'lib/layout.php';
print "{$header}<br>";
admincheck();
print adminlinkbar('admin-editforums.php');
foreach ($pwlnames as $pwl => $pwlname) {
    if ($pwl < 0) {
        continue;
    }
    $powers[] = $pwlname;
}
$powers[] = '[no access]';
$pollstyles = array(-2 => 'Disallowed', -1 => 'Normal', 0 => 'Force Regular', 1 => 'Force Influence');
if (isset($_GET['delete'])) {
    $forum = intval($_GET['delete']);
    $forums[-1] = "Choose a forum to merge into...";
    $forumquery = $sql->query("SELECT id,title FROM forums ORDER BY catid,forder");
    while ($f = $sql->fetch($forumquery, MYSQL_ASSOC)) {
        $forums[$f['id']] = $f['title'];
    }
Esempio n. 2
0
<?php

require_once 'lib/function.php';
$windowtitle = "IP Address Search";
require_once 'lib/layout.php';
print "{$header}<br>";
admincheck();
print adminlinkbar('ipsearch.php');
print "{$tblstart}";
if (!$su) {
    $su = 'n';
}
if (!$sp) {
    $sp = 'u';
}
if (!$sm) {
    $sm = 'n';
}
if (!$d) {
    $d = 'y';
}
$ch1[$su] = ' checked';
$ch2[$sp] = ' checked';
$ch3[$sm] = ' checked';
$ch4[$d] = ' checked';
print "\n\t  <form action=ipsearch.php method=post>\n\t  {$tccellh} colspan=2>IP search<tr>\n\t  {$tccell1} width=20%><b>IP to search:</b></td>\n\t  {$tccell2l}>{$inpt}=ip size=15 maxlength=15 value={$ip}><tr>\n\t  {$tccell1}><b>Sort users by:</b></td>\n\t  {$tccell2l}>\n\t    {$radio}=su value=n{$ch1['n']}> Name &nbsp; &nbsp;\n\t    {$radio}=su value=p{$ch1['p']}> Posts &nbsp; &nbsp;\n\t    {$radio}=su value=r{$ch1['r']}> Registration &nbsp; &nbsp;\n\t    {$radio}=su value=s{$ch1['s']}> Last post &nbsp; &nbsp;\n\t    {$radio}=su value=a{$ch1['a']}> Last activity &nbsp; &nbsp;\n\t    {$radio}=su value=i{$ch1['i']}> Last IP\n\t  <tr>\n\t  {$tccell1}><b>Sort posts by:</b></td>\n\t  {$tccell2l}>\n\t    {$radio}=sp value=u{$ch2['u']}> User &nbsp; &nbsp;\n\t    {$radio}=sp value=d{$ch2['d']}> Date &nbsp; &nbsp;\n\t    {$radio}=sp value=i{$ch2['i']}> IP\n\t  <tr>\n\t  {$tccell1}><b>Sort private messages by:</b></td>\n\t  {$tccell2l}>\n\t    {$radio}=sm value=n{$ch3['n']}> Sent by &nbsp; &nbsp;\n\t    {$radio}=sm value=d{$ch3['d']}> Date &nbsp; &nbsp;\n\t    {$radio}=sm value=i{$ch3['i']}> IP\n\t  <tr>\n\t  {$tccell1}><b>Distinct users and IP's:</b></td>\n\t  {$tccell2l}>\n\t    {$radio}=d value=y{$ch4['y']}> Yes &nbsp; &nbsp;\n\t    {$radio}=d value=n{$ch4['n']}> No\n\t  <tr>\n\t  {$tccell1}>&nbsp</td>\n\t  {$tccell1l}>{$inps}=s value=Submit></td>\n\t  </form>\n\t";
if ($ip) {
    $ip = str_replace('*', '%', $ip);
    switch ($su) {
        case 'n':
            $usort = 'ORDER BY name';
Esempio n. 3
0
<?php

$windowtitle = "Thread Repair System II";
require 'lib/function.php';
require 'lib/layout.php';
print "{$header}<br>";
if (!$isadmin) {
    print "  \r\n\t\t{$tblstart}\r\n\t\t\t{$tccell1}>This feature is restricted.</td>\r\n\t\t{$tblend}\r\n\r\n\t{$footer}\r\n\t";
    printtimedif($startingtime);
    die;
}
print adminlinkbar("admin-threads2.php");
if (!$_POST['run']) {
    print "<form action=\"admin-threads2.php\" method=\"post\">  \r\n\t\t\t{$tblstart}\r\n\t\t\t\t<tr>{$tccellh}>Thread Repair System II</td></tr>\r\n\t\t\t\t<tr>{$tccell1}>&nbsp;\r\n\t\t\t\t\t<br>This page is intended to repair threads with broken 'last reply' times/users.\r\n\t\t\t\t\t<br>This problem causes bumped threads that shouldn't be, especially with badly deleted posts.\r\n\t\t\t\t\t<br>&nbsp;\r\n\t\t\t\t\t<br>{$inps}=\"run\" value=\"Start\">\r\n\t\t\t\t\t<br>&nbsp;\r\n\t\t\t\t</td></tr>\r\n\t\t\t{$tblend}\r\n\t\t\t</form>\r\n\t\t";
} else {
    print "\r\n\t\t\t{$tblstart}\r\n\t\t\t\t<tr>{$tccellh}>Thread Repair System II</td></tr>\r\n\t\t\t\t<tr>{$tccell1}>Now running.\r\n\t\t\t\t</td></tr>\r\n\t\t\t{$tblend}\r\n\t\t<br>\r\n\t\t{$tblstart}\r\n\t\t\t<tr>\r\n\t\t\t\t{$tccellh}>id#</td>\r\n\t\t\t\t{$tccellh}>Name</td>\r\n\t\t\t\t{$tccellh}>Reported Date</td>\r\n\t\t\t\t{$tccellh}>Real Date</td>\r\n\t\t\t\t{$tccellh}>Difference</td>\r\n\t\t\t\t{$tccellh}>Status</td>\r\n\t\t\t</tr>\r\n\t\t";
    $q = "SELECT `threads`.`id`, `threads`.`title` , `threads`.`lastpostdate` , `posts`.`date` as realdate, (`posts`.`date` - `threads`.`lastpostdate`) AS `diff` FROM `threads` LEFT JOIN (SELECT MAX(`date`) as `date`, `thread` FROM `posts` GROUP BY `thread`) as `posts`  ON `posts`.`thread` = `threads`.`id` ORDER BY `diff` DESC";
    $sql = mysql_query($q) or die(mysql_error());
    $count = "";
    while ($data = mysql_fetch_array($sql, MYSQL_ASSOC)) {
        $status = "";
        if ($data['lastpostdate'] != $data['realdate']) {
            if ($data['lastpostdate'] == "0" && $data['realdate'] == NULL) {
                $status = "<font color=#ff8888>Broken thread</font>";
            } else {
                $userd = mysql_fetch_array(mysql_query("SELECT `date`, `user` FROM `posts` WHERE `thread` = '" . $data['id'] . "' ORDER BY `date` DESC LIMIT 1"), MYSQL_ASSOC);
                $status = mysql_query("UPDATE `threads` SET `lastposter` = '" . $userd['user'] . "', `lastpostdate` = '" . $userd['date'] . "' WHERE `id` = '" . $data['id'] . "'") or "<font color=#ff0000>Error</font>: " . mysql_error();
                if ($status == 1) {
                    $status = "<font color=#80ff80>Updated</font>";
                }
                $count++;
Esempio n. 4
0
<?php

require 'lib/function.php';
require 'lib/layout.php';
if (!$isadmin) {
    die;
}
print "{$header}<br>";
print adminlinkbar("perfdata.php");
Esempio n. 5
0
<?php

require 'lib/function.php';
$windowtitle = "Admin Cruft -- {$boardname}";
require 'lib/layout.php';
print "{$header}<br>";
if (!$isadmin) {
    print "  \n\t\t\t{$tblstart}\n\t\t\t\t{$tccell1}>Uh oh, you are not the admin go away.</td>\n\t\t\t{$tblend}\n\n\t\t{$footer}\n\t\t";
    printtimedif($startingtime);
    die;
}
$misc = $sql->fetchq("SELECT * FROM `misc`");
print adminlinkbar("admin.php") . "\n\t\t{$tblstart}\n\t\t\t<tr>{$tccellh}><b>Panel de Admin<br></td></tr>\n\t\t\t<tr>{$tccell1}>&nbsp;\n\t\t\t\t<br>Under construction for\n\t\t\t\t<br><b>" . timeunits2(time() - mktime(19, 20, 21, 9, 27, 2007)) . "</b>\n\t\t\t\t<br>...and counting!\n\t\t\t\t<br>&nbsp;\n\t\t\t</td></tr>\n\t\t{$tblend}\n\n\t\t<br>\n\t\t\n\t\t<form action='admin.php' method='post'>\n\t\t{$tblstart}\n\t\t\t<tr>{$tccellh} colspan=2><b>Setting up the Soft Dip</b></td></tr>\n\t\t\t<tr>{$tccellc} colspan=2>Board settings</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>" . $statusicons['hot'] . " threshold</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='hotcount' value='" . $misc['hotcount'] . "' class='right'> replies\n\t\t\t\t\t\t\t{$inph}='hotcount_' value='" . $misc['hotcount'] . "'>\n\t\t\t\t</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>Disable forum?</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpc}='disable' value='1'> Disable\n\t\t\t\t</td></tr>\n\n\n\t\t\t<tr>{$tccellc} colspan=2>Records</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>View count</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='views' value='" . $misc['views'] . "' class='right'> views\n\t\t\t\t\t\t\t{$inph}='views' value='" . $misc['views'] . "'>\n\t\t\t\t</td></tr>\n\n\n\t\t\t<tr>{$tccell1} width='200'><b>Max posts/day</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='maxpostsday' value='" . $misc['maxpostsday'] . "' class='right'> posts, at {$inpt}='maxpostsdaydate' value='" . $misc['maxpostsdaydate'] . "' class='right'>\n\t\t\t\t\t\t\t{$inph}='maxpostsday' value='" . $misc['maxpostsday'] . "'>{$inph}='maxpostsdaydate' value='" . $misc['maxpostsdaydate'] . "'>\n\t\t\t\t</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>Max posts/hour</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='maxpostshour' value='" . $misc['maxpostshour'] . "' class='right'> posts, at {$inpt}='maxpostshourdate' value='" . $misc['maxpostshourdate'] . "' class='right'>\n\t\t\t\t\t\t\t{$inph}='maxpostshour' value='" . $misc['maxpostshour'] . "'>{$inph}='maxpostshourdate' value='" . $misc['maxpostshourdate'] . "'>\n\t\t\t\t</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>Most users online</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='maxusers' value='" . $misc['maxusers'] . "' class='right'> users, at {$inpt}='maxusersdate' value='" . $misc['maxusersdate'] . "' class='right'>\n\t\t\t\t\t\t\t<br>{$inpc}='maxusersreset' value='1'> Reset user list\n\t\t\t\t\t\t\t{$inph}='maxusers' value='" . $misc['maxusers'] . "'>{$inph}='maxusersdate' value='" . $misc['maxusersdate'] . "'>\n\t\t\t\t</td></tr>\n\n\t\n\t\t\t<tr>{$tccellc} colspan=2><img src=\"images/ihateglennbeckbutistillthinkthisimagefitsquitenicelyundertheadminpanelmoneycounter.jpg\" title=\"longest file name ever\"><br>Monetary settings</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>Donations</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='donations' value='" . sprintf("%01.2f", $misc['donations']) . "' class='right'>\$\n\t\t\t\t\t\t\t{$inph}='donations' value='" . sprintf("%01.2f", $misc['donations']) . "'>\n\t\t\t\t</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'><b>\$\$\$ Ads \$\$\$</b></td>\n\t\t\t\t{$tccell2l}>\t{$inpt}='ads' value='" . sprintf("%01.2f", $misc['ads']) . "' class='right'>\$\n\t\t\t\t\t\t\t{$inph}='ads' value='" . sprintf("%01.2f", $misc['ads']) . "'>\n\t\t\t\t</td></tr>\n\n\n\t\t\t<tr>{$tccellc} colspan=2>&nbsp;</td></tr>\n\n\t\t\t<tr>{$tccell1} width='200'>&nbsp;</td>\n\t\t\t\t{$tccell2l}>\t{$inps}='submit' value='Submit changes'>\n\t\t\t\t<br><s><strong>(Only saves the money settings though.)</strong></s> just kidding, it doesn't work.\n\t\t\t\t</td></tr>\n\n\t\t\n\t\t{$tblend}\n\t\t</form>\n\n\t";
print "{$footer}";
printtimedif($startingtime);
// returns several field names with hours/date/time all set up and that jazz etc blah blah blah
function timetofields($fname, $time)
{
    return;
}
Esempio n. 6
0
<?php

require 'lib/function.php';
$windowtitle = "{$boardname} - Forum Moderators";
require 'lib/layout.php';
print $header . "<br>";
admincheck();
print adminlinkbar('admin-editmods.php');
$donotprint = false;
if ($action) {
    //  print "DEBUG: Asked to ".$action." a moderator of forum: ".${$action."modforum"}." and user: "******"moduser"};
    $donotprint = true;
    switch ($action) {
        case "remove":
            $removemod = explode("|", $removemod);
            $removemoduser = $removemod[1];
            $removemodforum = $removemod[0];
            $sql->query("DELETE FROM forummods WHERE user='******' AND forum='{$removemodforum}'");
            if (($err = mysql_error()) != "") {
                print "{$tblstart}{$tccell1}> ERROR: {$err}.";
            } else {
                $sql->query("INSERT INTO actionlog (atime, adesc, aip) VALUES (" . ctime() . ", \"User " . $loguserid . " removed mod {$removemoduser} from forum {$removemodforum}\", \"{$userip}\")");
                print "{$tblstart}{$tccell1}> You successfully deleted user {$removemoduser} from forum {$removemodforum}.<br>" . redirect("admin-editmods.php", 'go back to Edit Mods', 0);
            }
            break;
        case "add":
            $sql->query("INSERT INTO forummods VALUES('{$addmodforum}', '{$addmoduser}')");
            if (($err = mysql_error()) != "") {
                print "{$tblstart}{$tccell1}> ERROR: {$err}.";
            } else {
                $sql->query("INSERT INTO actionlog (atime, adesc, aip) VALUES (" . ctime() . ", \"User " . $loguserid . " added mod {$addmoduser} to forum {$addmodforum}\", \"{$userip}\")");