29 |
$sth->finish(); |
$sth->finish(); |
30 |
} |
} |
31 |
function newsLoad($id, $ct = "", $limit = 0, $offset = 0, $npar = 1) { |
function newsLoad($id, $ct = "", $limit = 0, $offset = 0, $npar = 1) { |
32 |
global $dbh, $spec, $isMed; |
global $dbh, $spec, $isMed, $isEdit; |
33 |
$arts = array(); |
$arts = array(); |
34 |
if (!$offset) $offset = 0; |
if (!$offset) $offset = 0; |
35 |
$sql = "SELECT DISTINCT news.news_id, title, lead, title_pic, title_alt, title_pos, url, url_title, d_orig, author_pic, author_alt, author_info, author_name, ord FROM news".(isset($ct)?", cat_news":"").($spec?", spec_news":"")." WHERE (".($isMed?"":"NOT ")."plivamed)"; |
$sql = "SELECT DISTINCT news.news_id, title, lead, title_pic, title_alt, title_pos, url, url_title, d_orig, author_pic, author_alt, author_info, author_name, ord, prikazi FROM news".(isset($ct)?", cat_news":"").($spec?", spec_news":"")." WHERE (".($isMed?"":"NOT ")."plivamed)".($isEdit?"":" AND (prikazi)"); |
36 |
if ($id > 0) $sql .= " AND (news.news_id = $id)"; |
if ($id > 0) $sql .= " AND (news.news_id = $id)"; |
37 |
if ($ct) $sql .= " AND ((category = '$ct') OR ((cat_news.cat_id = '$ct') AND (cat_news.news_id = news.news_id)))"; |
if ($ct) $sql .= " AND ((category = '$ct') OR ((cat_news.cat_id = '$ct') AND (cat_news.news_id = news.news_id)))"; |
38 |
if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)"; |
if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)"; |
47 |
$art["pic_alt"], $art["pic_pos"], $art["more"], |
$art["pic_alt"], $art["pic_pos"], $art["more"], |
48 |
$art["more_title"], $art["date"], $art["au_pic"], |
$art["more_title"], $art["date"], $art["au_pic"], |
49 |
$art["au_alt"], $art["au_info"], $art["au_name"], |
$art["au_alt"], $art["au_info"], $art["au_name"], |
50 |
$ord) = $row; |
$ord, $art["show"]) = $row; |
51 |
|
$art["show"] = ($art["show"][0] == "f" || $art["show"][0] == "F") ? false : true; |
52 |
list($art["pic_w"], $art["pic_h"]) = PicSize($art["pic_url"]); |
list($art["pic_w"], $art["pic_h"]) = PicSize($art["pic_url"]); |
53 |
$art["more_new"] = strstr($art["more"], "://") ? true : false; |
$art["more_new"] = strstr($art["more"], "://") ? true : false; |
54 |
global $sysaupicdir; |
global $sysaupicdir; |