Vergleich admin/moderate.php - 1.2.0 - 1.2.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: moderate.php 2154 2006-08-27 16:52:47Z Tikitiki $

 * $Id: moderate.php 3004 2007-04-11 04:23:20Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 71Zeile 71
			$db->update_query(TABLE_PREFIX."attachments", $sql_array, "aid IN ({$aids})");
}
}

			$db->update_query(TABLE_PREFIX."attachments", $sql_array, "aid IN ({$aids})");
}
}

	cpmessage($lang->attachments_moderated);

	cpredirect("moderate.php?".SID."&action=attachments", $lang->attachments_moderated);

}

if($mybb->input['action'] == "do_threads" || $mybb->input['action'] == "do_posts" || $mybb->input['action'] == "do_threadsposts")

}

if($mybb->input['action'] == "do_threads" || $mybb->input['action'] == "do_posts" || $mybb->input['action'] == "do_threadsposts")

Zeile 87Zeile 87
			if($mybb->input['threaddelete'][$tid] == "yes")
{
delete_thread($tid);

			if($mybb->input['threaddelete'][$tid] == "yes")
{
delete_thread($tid);

				$update_forum_count[$thread['fid']] = 1;

 
			}
else
{

			}
else
{

Zeile 104Zeile 103
						"visible" => 1
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "tid = '".$tid."'");

						"visible" => 1
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "tid = '".$tid."'");

					$update_forum_count[$thread['fid']] = 1;

 

// Update unapproved thread count


// Update unapproved thread count

					$db->query("UPDATE ".TABLE_PREFIX."forums SET unapprovedthreads=unapprovedthreads-1,unapprovedposts=unapprovedposts-1 WHERE fid='{$thread['fid']}'");

					$db->query("UPDATE ".TABLE_PREFIX."forums SET unapprovedthreads=unapprovedthreads-1,unapprovedposts=unapprovedposts-1,threads=threads+1, posts=posts+1 WHERE fid='{$thread['fid']}'");

				}
}
}

				}
}
}

Zeile 125Zeile 123
			if($mybb->input['postdelete'][$pid] == "yes")
{
delete_post($pid);

			if($mybb->input['postdelete'][$pid] == "yes")
{
delete_post($pid);

				$update_thread_count[$post['tid']] = 1;
$update_forum_count[$thread['fid']] = 1;

 
			}
else
{

			}
else
{

Zeile 141Zeile 137
						"subject" => $subject
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "pid = '".$pid."'");

						"subject" => $subject
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "pid = '".$pid."'");

					$update_thread_count[$post['tid']] = 1;
$update_forum_count[$thread['fid']] = 1;

 

// Update unapproved thread count


// Update unapproved thread count

					$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1 WHERE tid='$post[tid]'");


					$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1, replies=replies+1 WHERE tid='$post[tid]'");					
$db->query("UPDATE ".TABLE_PREFIX."forums SET posts=posts+1 WHERE fid='$post[fid]'");

				}
}
}
}

				}
}
}
}

	if(is_array($update_thread_count)) 
{
foreach($update_thread_count as $tid => $val)
{
update_thread_count($tid);
}
}
if(is_array($update_forum_count))
{
foreach($update_forum_count as $fid => $val)
{
update_forum_count($fid);
}
}
cpmessage($lang->threadsposts_moderated);

	cpredirect("moderate.php?".SID."&action=".str_replace('do_', '', $mybb->input['action']), $lang->threadsposts_moderated);















}
if($mybb->input['action'] == "attachments")
{

}
if($mybb->input['action'] == "attachments")
{

Zeile 185Zeile 166
	startform("moderate.php", "" , "do_attachments");
starttable();
tableheader($lang->attachments_awaiting);

	startform("moderate.php", "" , "do_attachments");
starttable();
tableheader($lang->attachments_awaiting);

	$done = 0;

	$done = 0;

	while($attachment = $db->fetch_array($query))
{
$done = 1;

	while($attachment = $db->fetch_array($query))
{
$done = 1;

Zeile 225Zeile 206
}

if($mybb->input['action'] == "threads" || $mybb->input['action'] == "threadsposts")

}

if($mybb->input['action'] == "threads" || $mybb->input['action'] == "threadsposts")

{
$done = 0;

{
$done = 0;


$query = $db->query("
SELECT t.tid, t.fid, t.subject, p.message AS postmessage, p.pid AS postpid, f.name AS forumname, u.username AS username


$query = $db->query("
SELECT t.tid, t.fid, t.subject, p.message AS postmessage, p.pid AS postpid, f.name AS forumname, u.username AS username

Zeile 267Zeile 248
		echo "<tr>\n<td class=\"subheader\" align=\"center\" colspan=\"2\" height=\"2\"><img src=\"pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n</tr>\n";
}
if($tcount >= 1)

		echo "<tr>\n<td class=\"subheader\" align=\"center\" colspan=\"2\" height=\"2\"><img src=\"pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n</tr>\n";
}
if($tcount >= 1)

	{

	{

		endtable();
}
if($mybb->input['action'] != "threadsposts")

		endtable();
}
if($mybb->input['action'] != "threadsposts")

Zeile 295Zeile 276
	$count = $db->num_rows($query);
if(!$tcount && !$count && $mybb->input['action'] == "threadsposts")
{

	$count = $db->num_rows($query);
if(!$tcount && !$count && $mybb->input['action'] == "threadsposts")
{

	  endform();

	  	endform();

		cpmessage($lang->no_threadsposts);
}


		cpmessage($lang->no_threadsposts);
}


Zeile 319Zeile 300
	while($post = $db->fetch_array($query))
{
if(!$donepid[$post['pid']])

	while($post = $db->fetch_array($query))
{
if(!$donepid[$post['pid']])

		{ // so we dont show new threads main post again


		{ 
// so we dont show new threads main post again

			$done = 1;
$thread['subject'] = htmlspecialchars_uni(stripslashes($thread['subject']));
makeinputcode($lang->post_subject, "postsubject[$post[pid]]", "$post[subject]");

			$done = 1;
$thread['subject'] = htmlspecialchars_uni(stripslashes($thread['subject']));
makeinputcode($lang->post_subject, "postsubject[$post[pid]]", "$post[subject]");

Zeile 330Zeile 312
			makeyesnocode($lang->validate_post, "postvalidate[$post[pid]]");
makeyesnocode($lang->delete_post, "postdelete[$post[pid]]", "no");
echo "<tr>\n<td class=\"subheader\" align=\"center\" colspan=\"2\" height=\"2\"><img src=\"pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n</tr>\n";

			makeyesnocode($lang->validate_post, "postvalidate[$post[pid]]");
makeyesnocode($lang->delete_post, "postdelete[$post[pid]]", "no");
echo "<tr>\n<td class=\"subheader\" align=\"center\" colspan=\"2\" height=\"2\"><img src=\"pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n</tr>\n";

		  ++$postscount;
}

		  	++$postscount;
}

	}
if($postscount < 1)
{

	}
if($postscount < 1)
{

    echo "<tr>\n";

    	echo "<tr>\n";

		echo "<td class=\"$bgcolor\" colspan=\"1\">".$lang->no_posts."</td>\n";
echo "</tr>\n";

		echo "<td class=\"$bgcolor\" colspan=\"1\">".$lang->no_posts."</td>\n";
echo "</tr>\n";

  }

  	}

	if($count >= 1)
{
endtable();

	if($count >= 1)
{
endtable();