Exemplo n.º 1
0
$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++;
    extract($rows, EXTR_OVERWRITE);
    if ($note_pangkas == 1) {
        $note_text = proc_pangkastext($note_text, 250);
    }
    if ($note_images) {
        $note_images = "../{$note_path}/t-{$note_images}";
    } else {
        $note_images = "../library/pixel.gif";
    }
    $hide_smilies = 1;
    $note_text = parse_message($note_text, $hide_smilies);
    $web->push($template_name, "blok");
}
$web->parse($template_name);
$web_content = $web->return_template($template_name);
disconnect($conn_id);
require_once "all_pages.php";