Example #1
0
								<textarea placeholder="Type in your comment..." name="text" id="textarea"></textarea>
								<input type="hidden" value="', $row['id'], '" name="article" />
								<input type="submit" value="Post comment" />
							</form>
						</div>
					 <!-- if logged in.end -->';
    }
}
?>
            
            <div class="comments-cont">
            	
                <?php 
//Let's setup our pagination
$pagies = new Pagination();
$pagies->addToLink('?page=' . $pageName . '&id=' . $ArticleID);
$perPage = 10;
//count the total records
$res = $DB->prepare("SELECT COUNT(*) FROM `article_comments` WHERE `article` = :id;");
$res->bindParam(':id', $ArticleID, PDO::PARAM_INT);
$res->execute();
$count_row = $res->fetch(PDO::FETCH_NUM);
$count = $count_row[0];
unset($count_row);
unset($res);
//Pull the comments
if ($count > 0) {
    //calculate the pages
    $pages = $pagies->calculate_pages($count, $perPage, $p);
    //get the activity records
    $res = $DB->prepare("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`id`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`added`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`author`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`article`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`text`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`account_data`.`displayName` AS `author_str` \r\n\t\t\t\t\t\t\t\t\t\t\tFROM `article_comments` \r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `account_data` ON `account_data`.`id` = `article_comments`.`author` \r\n\t\t\t\t\t\t\t\t\t\t\tWHERE `article_comments`.`article` = :id \r\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `article_comments`.`id` DESC \r\n\t\t\t\t\t\t\t\t\t\t\tLIMIT " . $pages['limit'] . ";");
Example #2
0
<?php

if (!defined('init_pages')) {
    header('HTTP/1.0 404 not found');
    exit;
}
//load the pagination module
$CORE->load_CoreModule('pagination.forum');
//$CORE->loggedInOrReturn();
$forumId = isset($_GET['id']) ? (int) $_GET['id'] : false;
$p = isset($_GET['p']) ? (int) $_GET['p'] : 1;
//Let's setup our pagination
$pagies = new Pagination();
$pagies->addToLink('?page=' . $pageName . '&id=' . $forumId);
$perPage = $config['FORUM']['Topics_Limit'];
//make sure we have the forum id
if (!$forumId) {
    WCF::SetupNotification('Please make sure you have selected a valid forum.');
    header("Location: " . $config['BaseURL'] . "/forums.php");
    die;
}
$res = $DB->prepare("SELECT * FROM `wcf_forums` WHERE `id` = :id LIMIT 1;");
$res->bindParam(':id', $forumId, PDO::PARAM_INT);
$res->execute();
if ($res->rowCount() == 0) {
    WCF::SetupNotification('The selected forum does not exist or was deleted.');
    header("Location: " . $config['BaseURL'] . "/forums.php");
    die;
}
//save the last viewd forum
WCF::setLastViewedForum($forumId);
Example #3
0
}
$CORE->loggedInOrReturn();
//Set the title
$TPL->SetTitle('Store Activity');
//Add header javascript
$TPL->AddHeaderJs($config['WoWDB_JS'], true);
//CSS
$TPL->AddCSS('template/style/page-activity-all.css');
//Print the header
$TPL->LoadHeader();
$p = isset($_GET['p']) ? (int) $_GET['p'] : 1;
//load the pagination module
$CORE->load_CoreModule('paginationType2');
//Let's setup our pagination
$pagies = new Pagination();
$pagies->addToLink('?page=' . $pageName);
$perPage = 8;
$where = "";
//count the total records
$res = $DB->prepare("SELECT COUNT(*) FROM `store_activity` WHERE `account` = :acc " . $where . ";");
$res->bindParam(':acc', $CURUSER->get('id'), PDO::PARAM_INT);
$res->execute();
$count_row = $res->fetch(PDO::FETCH_NUM);
$count = $count_row[0];
unset($count_row);
unset($res);
?>
<div class="content_holder">

<div class="sub-page-title">
	<div id="title"><h1>Account Panel<p></p><span></span></h1></div>
Example #4
0
<?php

if (!defined('init_pages')) {
    header('HTTP/1.0 404 not found');
    exit;
}
$CORE->load_CoreModule('forums.parser');
$CORE->load_CoreModule('pagination.forum');
//$CORE->loggedInOrReturn();
$topicId = isset($_GET['id']) ? (int) $_GET['id'] : false;
$p = isset($_GET['p']) ? (int) $_GET['p'] : 1;
//Let's setup our pagination
$pagies = new Pagination();
$pagies->addToLink('?page=' . $pageName . '&id=' . $topicId);
$perPage = $config['FORUM']['Posts_Limit'];
//make sure we have the forum id
if (!$topicId) {
    WCF::SetupNotification('Please make sure you have selected a valid topic.');
    header("Location: " . $config['BaseURL'] . "/forums.php");
    die;
}
$res = $DB->prepare("SELECT * FROM `wcf_topics` WHERE `id` = :id LIMIT 1;");
$res->bindParam(':id', $topicId, PDO::PARAM_INT);
$res->execute();
if ($res->rowCount() == 0) {
    WCF::SetupNotification('The selected topic does not exist or was deleted.');
    header("Location: " . $config['BaseURL'] . "/forums.php");
    die;
}
//save the last viewd topic
WCF::setLastViewedTopic($topicId);