Location: PHPKode > projects > PBBoard > PBBoard_v2.1.4/Upload/modules/special_topics.module.php
<?php

// ##############################################################################||
// #
// #   PowerBB Version 2.0.0
// #   http://www.PBBoard.com
// #   Copyright (c) 2009 by Abu.Rakan
// #
// #   filename : special_topics.module.php
// #
// ##############################################################################||

(!defined('IN_PowerBB')) ? die() : '';

$CALL_SYSTEM				=	array();
$CALL_SYSTEM['SECTION'] 	= 	true;
$CALL_SYSTEM['REPLY'] 		= 	true;
$CALL_SYSTEM['SUBJECT'] 	= 	true;

include('common.php');

define('CLASS_NAME','PowerBBSpecialSubjectMOD');

class PowerBBSpecialSubjectMOD
{
	function run()
	{
		global $PowerBB;


      	//////////
		// Show the header

  	  $PowerBB->functions->ShowHeader();


				if ($PowerBB->_GET['index'])
				{
					$this->_SpecialSubject();
				}


			$PowerBB->functions->GetFooter();

	}

	function _SpecialSubject()
	{
		global $PowerBB;


		$SpecialArr 							= 	array();
		$SpecialArr['proc'] 					= 	array();
		$SpecialArr['proc']['*'] 				= 	array('method'=>'clean','param'=>'html');

		$SpecialArr['where']					=	array();
		$SpecialArr['where'][0]				=	array();
		$SpecialArr['where'][0]['name']		=	'special';
		$SpecialArr['where'][0]['oper']		=	'=';
		$SpecialArr['where'][0]['value']		=	'1';

		$SpecialArr['order']					=	array();
		$SpecialArr['order']['field']			=	'id';
		$SpecialArr['order']['type']			=	'DESC';

		$SpecialArr['proc'] 						= 	array();
		// Ok Mr.XSS go to hell !
		$SpecialArr['proc']['*'] 					= 	array('method'=>'clean','param'=>'html');
		$SpecialArr['proc']['native_write_time'] 	= 	array('method'=>'date','store'=>'write_date','type'=>$PowerBB->_CONF['info_row']['timesystem']);
		$SpecialArr['proc']['write_time'] 			= 	array('method'=>'date','store'=>'reply_date','type'=>$PowerBB->_CONF['info_row']['timesystem']);


		$PowerBB->_CONF['template']['while']['Special_subjectList'] = $PowerBB->subject->GetSubjectList($SpecialArr);

         $subject_special_nm = $PowerBB->DB->sql_num_rows($PowerBB->DB->sql_query("SELECT * FROM " . $PowerBB->table['subject'] . " WHERE special='1'"));
		 $PowerBB->template->assign('subject_special_nm',$subject_special_nm);

		$PowerBB->template->display('special_subject');
	}


}

?>
Return current item: PBBoard