Codice: Seleziona tutto
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN']);
}
page_header('Dowload List');
$sql = "SELECT dt.user_id, dt.attach_id, dt.dataora, ut.username, at.real_filename
FROM " . MAN_DOWNLOAD_TABLE . " dt, " . USERS_TABLE . " ut," . ATTACHMENTS_TABLE ." at
WHERE dt.user_id = ut.user_id
AND dt.attach_id= at.attach_id
ORDER BY dt.dataora";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
//echo "Risultato: " . $row['user_id'] . " | " . $row['attach_id'] . " | " . date('d/m/Y H:i:s', strtotime(substr($row['dataora'], 0, 20))) . " | " . $row['username'] . " | " . $row['real_filename'] . "<br>";
$template->assign_block_vars('var_list',array(
'VAR_DATAORA' => date('d/m/Y H:i:s', strtotime(substr($row['dataora'], 0, 20))) ,
'VAR_USERNAME' => $row['username'] ,
'VAR_REAL_FILENAME' => $row['real_filename']
)
);
}
$template->set_filenames(array(
'body' => 'download_list_body.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Codice: Seleziona tutto
<!-- INCLUDE overall_header.html -->
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>Download List</dt>
</dl>
</li>
</ul>
<ul class="topiclist forums">
<!-- BEGIN var_list -->
<li class="row"><span>{var_list.VAR_DATAORA}, {var_list.VAR_USERNAME}, {var_list.VAR_REAL_FILENAME}</span></li>
<!-- END var_list -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->