Vergleich admin/modules/forum/attachments.php - 1.4.2 - 1.4.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: attachments.php 4195 2008-09-17 00:00:50Z Tikitiki $

 * $Id: attachments.php 5379 2011-02-21 11:06:42Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 183Zeile 183
	$table->construct_header($lang->username);
$table->construct_header($lang->total_size, array('width' => '20%', 'class' => 'align_center'));


	$table->construct_header($lang->username);
$table->construct_header($lang->total_size, array('width' => '20%', 'class' => 'align_center'));


	$query = $db->query("
SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
GROUP BY a.uid
ORDER BY totalsize DESC
LIMIT 5
");















	switch($db->type)
{
case "pgsql":
$query = $db->query("
SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
GROUP BY ".$db->build_fields_string("attachments", "a.").",u.uid,u.username
ORDER BY totalsize DESC
LIMIT 5
");
break;
default:
$query = $db->query("
SELECT a.*, u.uid AS useruid, u.username, SUM(a.filesize) as totalsize
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
GROUP BY a.uid
ORDER BY totalsize DESC
LIMIT 5
");
}

	while($user = $db->fetch_array($query))
{
if(!$user['useruid'])

	while($user = $db->fetch_array($query))
{
if(!$user['useruid'])

Zeile 596Zeile 610
		// Build the search SQL for users

// List of valid LIKE search fields

		// Build the search SQL for users

// List of valid LIKE search fields

		$user_like_fields = array("filename", "mimetype");

		$user_like_fields = array("filename", "filetype");

		foreach($user_like_fields as $search_field)
{
if($mybb->input[$search_field])

		foreach($user_like_fields as $search_field)
{
if($mybb->input[$search_field])

Zeile 650Zeile 664
		}

// LESS THAN or GREATER THAN

		}

// LESS THAN or GREATER THAN

		if($mybb->input['dateuploaded'])

		if($mybb->input['dateuploaded'] && $mybb->request_method == "post")

		{

		{

			$mybb->input['dateuploaded'] = TIME_NOW-60*60*24;

			$mybb->input['dateuploaded'] = TIME_NOW-$mybb->input['dateuploaded']*60*60*24;

		}

		}

		if($mybb->input['filesize'])

		if($mybb->input['filesize'] && $mybb->request_method == "post")

		{
$mybb->input['filesize'] *= 1024;
}

		{
$mybb->input['filesize'] *= 1024;
}

Zeile 777Zeile 791
			if($num_results > $mybb->input['perpage'])
{
$pagination_url = "index.php?module=forum/attachments&amp;results=1";

			if($num_results > $mybb->input['perpage'])
{
$pagination_url = "index.php?module=forum/attachments&amp;results=1";

				$pagination_vars = array('filename', 'mimetype', 'username', 'fid', 'downloads', 'downloads_dir', 'dateuploaded', 'dateuploaded_dir', 'filesize', 'filesize_dir');

				$pagination_vars = array('filename', 'filetype', 'username', 'fid', 'downloads', 'downloads_dir', 'dateuploaded', 'dateuploaded_dir', 'filesize', 'filesize_dir');

				foreach($pagination_vars as $var)
{
if($mybb->input[$var])

				foreach($pagination_vars as $var)
{
if($mybb->input[$var])

Zeile 815Zeile 829

$form_container = new FormContainer($lang->find_where);
$form_container->output_row($lang->name_contains, $lang->name_contains_desc, $form->generate_text_box('filename', $mybb->input['filename'], array('id' => 'filename')), 'filename');


$form_container = new FormContainer($lang->find_where);
$form_container->output_row($lang->name_contains, $lang->name_contains_desc, $form->generate_text_box('filename', $mybb->input['filename'], array('id' => 'filename')), 'filename');

	$form_container->output_row($lang->type_contains, "", $form->generate_text_box('mimetype', $mybb->input['mimetype'], array('id' => 'mimetype')), 'mimetype');

	$form_container->output_row($lang->type_contains, "", $form->generate_text_box('filetype', $mybb->input['filetype'], array('id' => 'filetype')), 'filetype');

	$form_container->output_row($lang->forum_is, "", $form->generate_forum_select('forum[]', $mybb->input['forum'], array('multiple' => true, 'size' => 5, 'id' => 'forum')), 'forum');
$form_container->output_row($lang->username_is, "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');

$more_options = array(

	$form_container->output_row($lang->forum_is, "", $form->generate_forum_select('forum[]', $mybb->input['forum'], array('multiple' => true, 'size' => 5, 'id' => 'forum')), 'forum');
$form_container->output_row($lang->username_is, "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');

$more_options = array(

		"greater_than" => $lang->more_than,
"less_than" => $lang->less_than

		"less_than" => $lang->more_than,
"greater_than" => $lang->less_than

	);

$greater_options = array(

	);

$greater_options = array(