?
Path : /home/admin/domains/happytokorea.com/public_html_bk/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/notice.php |
<?php session_start(); header('Expires: Thu, 01 Jan 1970 00:00:00 GMT, -1'); header('Cache-Control: no-cache, no-store, must-revalidate'); header('Pragma: no-cache'); $root_path="./"; include($root_path."header.php"); $db_tm = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname_happy, false); $template = new Template($tpl_path); $result=$db_tm->sql_query("SET NAMES utf8"); $result=$db_tm->sql_query("SELECT jos_content.id,jos_content.title,jos_content.alias,jos_categories.id,jos_categories.title,jos_categories.alias,jos_content.created,jos_content.state,jos_content_frontpage.content_id FROM jos_content Left Join jos_categories ON jos_categories.id = jos_content.catid Inner Join jos_content_frontpage ON jos_content.id = jos_content_frontpage.content_id WHERE jos_content.catid = '71' AND jos_content.state = '1' ORDER BY jos_content.created DESC LIMIT 5"); $num_rows=$db_tm->sql_numrows($result); $data=''; for($i=0;$i<$num_rows;$i++){ $rows=$db_tm->sql_fetchrow($result); $data.= '<a href="'.$cur_host.'index.php?option=com_content&view=article&id='.$rows[0].':'.$rows[2].'&catid='.$rows['id'].':'.$rows['5'].'&Itemid=157 " target="_blank" style="color:#0066FF;font-size: 14px; font-weight:bold; text-decoration: none">[ '.htmlspecialchars($rows[1]).' ]</a> '; } $template->set_filenames(array('body'=>"notice.html")); $template->assign_vars(array( "CUR_HOST"=>$cur_host, "TITLE"=>$title, "data"=>$data, )); $template->pparse('body'); ?>