Exemplo n.º 1
0
/**
 * Gets core libraries and defines some variables
 */
require_once '../library/common.php';
require_once '../library/configuration.php';
$conn_id = connect();
require_once "security.php";
if (is_array($HTTP_GET_VARS)) {
    extract($HTTP_GET_VARS, EXTR_SKIP);
}
parse_str(decode($coded));
$page_id = $pg;
$template_path = "./";
$web = new speed_template($template_path);
$web->register($template_name);
$category_id = $category;
$query = "SELECT category_title FROM category WHERE page_id = '" . $page_id . "' AND category_id = '{$category_id}'";
$result = fn_query($conn_id, $query);
while ($rows = fn_fetch_array($result)) {
    extract($rows, EXTR_OVERWRITE);
}
$query = "\r\nSELECT \r\n\tnote_pangkas, note_id, note_images,\r\n\tnote_date,\r\n\tnote_title,\r\n\tnote_description,\r\n\tcase \r\n\t\twhen note_special = 'true' then 'Yes'\r\n\t\telse 'No' \r\n\tend as popup_status,\r\n\tcase \r\n\t\twhen note_user != 0 then 'Member'\r\n\t\telse 'Public' \r\n\tend as note_reader\r\nFROM \r\n\tnote \r\nWHERE\r\n\tcategory_id = '{$category_id}' \r\nORDER BY \r\n\tnote_date desc,\r\n\tnote_id desc\r\n";
//$row_count = 5;
require_once "../library/paging_script.php";
$result = fn_query($conn_id, $query);
if (!$result) {
    die("Err :<br>" . mysql_error());
}
while ($rows = fn_fetch_array($result)) {
    $no++;