コード例 #1
0
ファイル: trash_can.php プロジェクト: N3X15/ATBBS-Plus
<?php

require 'includes/header.php';
force_id();
Output::Assign('sidebar', $sidebar);
Output::$tpl->display('dashhead.tpl.php');
$page_title = 'Your trash can';
if ($_POST['empty_trash']) {
    $delete_topic = $link->prepare('DELETE FROM trash WHERE uid = ?');
    $delete_topic->bind_param('s', $_SESSION['UID']);
    $delete_topic->execute();
    $delete_topic->close();
    $_SESSION['notice'] = 'Trash emptied.';
}
echo '<p>Your deleted topics and replies are archived here.</p>';
if ($trash = show_trash($_SESSION['UID'])) {
    echo $trash;
    ?>

	<form action="" method="post">
		<div class="row">
			<input type="submit" name="empty_trash" value="Empty trash can" onclick="return confirm('Really?');" />
		</div>
	</form>

	<?php 
}
Output::$tpl->display('dashfooter.tpl.php');
require 'includes/footer.php';
コード例 #2
0
ファイル: profile.php プロジェクト: N3X15/ATBBS-Plus
		'Age ▼'
	);
	$replies->DefineColumns($columns, 'Topic');
	$replies->SetTDClass('Topic', 'topic_headline');
	$replies->SetTDClass('Reply snippet', 'reply_body_snippet');

	while($row=$res->FetchRow()) 
	{
		list($reply_id, $parent_id, $reply_time, $reply_body, $reply_ip_address, $topic_headline, $topic_time)=$row;
		$values = array 
		(
			'<a href="/topic/' . $parent_id . '#reply_' . $reply_id . '">' . snippet($reply_body) . '</a>',
			'<a href="/topic/' . $parent_id . '">' . htmlspecialchars($topic_headline) . '</a> <span class="help unimportant" title="' . format_date($topic_time) . '">(' . calculate_age($topic_time) . ' old)</span>',
			'<a href="/IP_address/' . $reply_ip_address . '">' . $reply_ip_address . '</a>',
			'<span class="help" title="' . format_date($reply_time) . '">' . calculate_age($reply_time) . '</span>'
		);
									
		$replies->Row($values);
	}
	echo $replies;
}

if($trash = show_trash($_GET['uid']))
{
	echo '<h4 class="section">Trash</h4>' . $trash;
}

require('includes/footer.php');

?>