Vergleich admin/attachments.php - 1.2.3 - 1.2.13

  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: attachments.php 2148 2006-08-27 04:10:33Z Tikitiki $

 * $Id: attachments.php 3306 2007-09-13 05:29:43Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 57Zeile 57
	// add new type to database
if(($mybb->input['extension'] || $mybb->input['mimetype']) && $mybb->input['maxsize'])
{

	// add new type to database
if(($mybb->input['extension'] || $mybb->input['mimetype']) && $mybb->input['maxsize'])
{

 
		if($mybb->input['extension'] && $mybb->input['extension']{0} == '.')
{
$mybb->input['extension'] = substr($mybb->input['extension'], 1);
}

		$sqlarray = array(
"mimetype" => $db->escape_string($mybb->input['mimetype']),
"extension" => $db->escape_string($mybb->input['extension']),

		$sqlarray = array(
"mimetype" => $db->escape_string($mybb->input['mimetype']),
"extension" => $db->escape_string($mybb->input['extension']),

Zeile 193Zeile 197
			break;
}
if($mybb->input['sortdir'] == 'desc')

			break;
}
if($mybb->input['sortdir'] == 'desc')

	{

	{

		$sort_dir = 'DESC';
}
else

		$sort_dir = 'DESC';
}
else

Zeile 261Zeile 265
			$filename = "<span class=\"highlight1\">".stripslashes($result['filename'])."</span>";
}
if(!$result['visible'] && $result['pid'])

			$filename = "<span class=\"highlight1\">".stripslashes($result['filename'])."</span>";
}
if(!$result['visible'] && $result['pid'])

		{

		{

			$filename = "<em>".$filename."</em>";
}


			$filename = "<em>".$filename."</em>";
}


Zeile 397Zeile 401
{
$plugins->run_hooks("admin_attacments_add");
// form for adding new attachment type

{
$plugins->run_hooks("admin_attacments_add");
// form for adding new attachment type

	cpheader();

	cpheader();

	startform("attachments.php", "", "do_add");
starttable();
tableheader($lang->new_attach_type);

	startform("attachments.php", "", "do_add");
starttable();
tableheader($lang->new_attach_type);

Zeile 533Zeile 537
		
$options = array(
"order_by" => "downloads",

		
$options = array(
"order_by" => "downloads",

			"order_dir" => "DESC",
"limit_start" => "0",
"limit" => "5"
);

$query = $db->simple_select(TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)", "a.*, p.tid, p.subject, u.username", "", $options);
while($attachment = $db->fetch_array($query))
{
$bgcolor = getaltbg();
echo "<tr>\n";





			"order_dir" => "DESC",
"limit_start" => "0",
"limit" => "5"
);

$query = $db->simple_select(TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)", "a.*, p.tid, p.subject, u.username", "", $options);
while($attachment = $db->fetch_array($query))
{
$bgcolor = getaltbg();
if(!$attachment['username'])
{
$attachment['username'] = "<s>".$lang->unknown."</s>";
}
echo "<tr>\n";

			echo "<td class=\"$bgcolor\"><a href=\"../attachment.php?aid=".$attachment['aid']."\">".$attachment['filename']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../showthread.php?tid=".$attachment['tid']."&amp;pid=".$attachment['pid']."#pid".$attachment['pid']."\">".$attachment['subject']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../member.php?action=profile&amp;uid=".$attachment['uid']."\">".$attachment['username']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\">".$attachment['downloads']."</td>\n";

			echo "<td class=\"$bgcolor\"><a href=\"../attachment.php?aid=".$attachment['aid']."\">".$attachment['filename']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../showthread.php?tid=".$attachment['tid']."&amp;pid=".$attachment['pid']."#pid".$attachment['pid']."\">".$attachment['subject']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../member.php?action=profile&amp;uid=".$attachment['uid']."\">".$attachment['username']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\">".$attachment['downloads']."</td>\n";

			echo "</tr>\n";
}
endtable();


			echo "</tr>\n";
}
endtable();


		starttable();
tableheader($lang->largest_attachments, "", 4);
echo "<tr>\n";

		starttable();
tableheader($lang->largest_attachments, "", 4);
echo "<tr>\n";

Zeile 558Zeile 566
		echo "<td class=\"subheader\" align=\"center\" width=\"40%\">$lang->post</td>\n";
echo "<td class=\"subheader\" align=\"center\" width=\"20%\">$lang->username</td>\n";
echo "<td class=\"subheader\" align=\"center\" width=\"10%\">$lang->filesize</td>\n";

		echo "<td class=\"subheader\" align=\"center\" width=\"40%\">$lang->post</td>\n";
echo "<td class=\"subheader\" align=\"center\" width=\"20%\">$lang->username</td>\n";
echo "<td class=\"subheader\" align=\"center\" width=\"10%\">$lang->filesize</td>\n";

		echo "</tr>\n";


		echo "</tr>\n";


		$options = array(
"order_by" => "filesize",
"order_dir" => "DESC",

		$options = array(
"order_by" => "filesize",
"order_dir" => "DESC",

Zeile 572Zeile 580
		{
$bgcolor = getaltbg();
$attachment['filesize'] = get_friendly_size($attachment['filesize']);

		{
$bgcolor = getaltbg();
$attachment['filesize'] = get_friendly_size($attachment['filesize']);

 
			if(!$attachment['username'])
{
$attachment['username'] = "<s>".$lang->unknown."</s>";
}

			echo "<tr>\n";
echo "<td class=\"$bgcolor\"><a href=\"../attachment.php?aid=".$attachment['aid']."\">".$attachment['filename']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../showthread.php?tid=".$attachment['tid']."&amp;pid=".$attachment['pid']."#pid".$attachment['pid']."\">".$attachment['subject']."</a></td>\n";

			echo "<tr>\n";
echo "<td class=\"$bgcolor\"><a href=\"../attachment.php?aid=".$attachment['aid']."\">".$attachment['filename']."</a></td>\n";
echo "<td class=\"$bgcolor\" align=\"center\"><a href=\"../showthread.php?tid=".$attachment['tid']."&amp;pid=".$attachment['pid']."#pid".$attachment['pid']."\">".$attachment['subject']."</a></td>\n";

Zeile 602Zeile 614
		{
$bgcolor = getaltbg();
$user['totalsize'] = get_friendly_size($user['totalsize']);

		{
$bgcolor = getaltbg();
$user['totalsize'] = get_friendly_size($user['totalsize']);

 
			if(!$user['username'])
{
$user['username'] = "<s>".$lang->unknown."</s>";
}

			echo "<tr>\n";
echo "<td class=\"$bgcolor\"><a href=\"../member.php?action=profile&amp;uid=".$user['uid']."\">".$user['username']."</a></td>\n";
echo "<td class=\"$bgcolor\"><a href=\"attachments.php?".SID."&amp;action=do_search&amp;username=".urlencode($user['username'])."\">".$user['totalsize']."</a></td>\n";

			echo "<tr>\n";
echo "<td class=\"$bgcolor\"><a href=\"../member.php?action=profile&amp;uid=".$user['uid']."\">".$user['username']."</a></td>\n";
echo "<td class=\"$bgcolor\"><a href=\"attachments.php?".SID."&amp;action=do_search&amp;username=".urlencode($user['username'])."\">".$user['totalsize']."</a></td>\n";