$text = new CHAW_text(camila_get_translation('camila.export.print'), HAW_TEXTFORMAT_SMALL); $_CAMILA['page']->add_text($text); $text = new CHAW_text(''); $_CAMILA['page']->add_text($text); $code = "</div>"; $js = new CHAW_js($code); $_CAMILA['page']->add_userdefined($js); } if (CAMILA_SHOW_MICROTIME) { $camila_time_end = camila_microtime_float(); $time = $camila_time_end - $camila_time_start; $text = new CHAW_text('-' . sprintf("%01.3f", $time)); $_CAMILA['page']->add_text($text); } if (DEBUG_COUNTER) { $text = new CHAW_text(">" . displayCounter($counternum) . "<"); $_CAMILA['page']->add_text($text); } //echo $_CAMILA["session_countdown"]; $_CAMILA['page']->create_page(); /***********/ /* logging */ /***********/ if (CAMILA_LOG_LEVEL > 0) { require CAMILA_LIB_DIR . 'oolog/class_oolog.inc.php'; if (isset($_CAMILA['user_surname'])) { $l =& new oolog(CAMILA_LOG_DIR . '/' . $_CAMILA['user_surname'] . '-' . $_CAMILA['user_name'] . ".log", FILE); } else { $l =& new oolog(CAMILA_LOG_DIR . '/anon.log', FILE); } $camila_time_end = camila_microtime_float();
function populer_tow_month() { require_once INCLUDE_PATH . "lib/common.php"; $obj = new userFrontEnd(); //========================== ARTICLE SEARCH SECTION ======================== // $row = $obj->selectAllChannel(); for ($n = 0; $n < count($row); $n++) { $channelDD[$row[$n][CHANNEL_ID]] = $row[$n][CHANNEL_NAME]; } $smarty->assign("channelDD", $channelDD); //========================= SELECT ALL CATEGORY ============================== // $row = $obj->selectAllCategories(); for ($n = 0; $n < count($row); $n++) { $categorylDD[$row[$n][ARTICLE_CATEGORY_ID]] = $row[$n][ARTICLE_CATEGORY_NAME]; } $smarty->assign("categorylDD", $categorylDD); //========================= SELECT ALL AUTHORS =============================== // $row = $obj->selectAll_Authors(); for ($n = 0; $n < count($row); $n++) { $authorlDD[$row[$n][AUTHOR_ID]] = $row[$n][AUTHOR_NAME]; } $smarty->assign("authorlDD", $authorlDD); $obj->category_id = $_REQUEST['category_id']; if ($_REQUEST['mode'] == "populer_tow_month") { $obj->most_tow_month = "most_tow_month"; } if ($_REQUEST['mode'] == "populer_six_month") { $obj->most_tow_month = "most_six_month"; } if ($_REQUEST['mode'] == "most_disc") { $obj->most_tow_month = "most_disc"; } $result = $obj->selectategoryList(); $total = $obj->countCategoryListing(); $smarty->assign("total", $total); for ($n = 0; $n < count($result); $n++) { $articleId[] = $result[$n][ARTICLE_ID]; $articleTitle[] = showArticleTitle($result[$n][ARTICLE_TITLE], DOUBLE_LINE); $articleBody[] = shortText($result[$n][ARTICLE_BODY], DOUBLE_LINE); $postDate[] = date("dS M, y", strtotime($result[$n][POST_DATE])); } $smarty->assign("articleId", $articleId); $smarty->assign("articleTitle", $articleTitle); $smarty->assign("articleBody", $articleBody); $smarty->assign("postDate", $postDate); $smarty->assign('displayCounterTXT', displayCounter($total, $GLOBALS['offset'], $GLOBALS['toshow'], "headertext", $message = "", $start = 5, $end = 100, $step = 5, $use = 1)); $smarty->assign('pageCounterTXT', pageCounter($total, $GLOBALS['offset'], $GLOBALS['toshow'], "headertext", $groupby = 10, $showcounter = 1, $linkStyle = 'view_link', $redText = 'headertext')); $smarty->display("article_for_category.tpl"); }