PK =A 4!/PK
>;w w 4!/.htaccessRewriteEngine on
RewriteRule ^articles.html$ articles.php?%{QUERY_STRING} [L]
RewriteRule ^([^\/]*)__([0-9]{1,4}).html$ articles.php?article_url=$1&article_id=$2&%{QUERY_STRING} [L]
RewriteRule ^novosti.html$ news.php?%{QUERY_STRING} [L]
RewriteRule ^([^\/]*)__([0-9]{1,4})_([0-9]{1,4}).html$ news.php?news_url=$1&news_cat=$2&readmore=$3&%{QUERY_STRING} [L]PK &A 4!/administration/PK
?Yl~2 ~2 4!/administration/articles.phpadvanced();\n";
} else {
require_once INCLUDES."html_buttons_include.php";
}
$url_suffix = '.html';
if (!function_exists('translit')) {
function translit($st) {
$st = strtr($st, "_", "abvgdeeziyklmnoprstufh'ie_");
$st = strtr($st, "Ũ_","ABVGDEEZIYKLMNOPRSTUFH'IEI");
//$st = strtr($st, "Ũ_", "abvgdeeziyklmnoprstufh'ie_");
$st = strtr($st, array("" => "zh", "" => "ts",
"" => "ch", "" => "sh", "" => "shch",
"" => "", "" => "yu", "" => "ya",
"" => "ZH", "" => "TS", "" => "CH",
"" => "SH", "" => "SHCH", "" => "",
"" => "YU", "" => "YA", "" => "i",
"" => "Yi", "" => "ie", "" => "Ye"));
$search = array(".", ",", ":", ";", "'", '"', '-');
$replace = array("", "", "", "", "", "", '_');
$st = str_replace($search, $replace, $st);
$st = str_replace("&", " and ", $st);
$st = str_replace("&", " and ", $st);
$st = str_replace(" ", " ", $st);
$st = str_replace(" ", "_", $st);
$st = str_replace("__", "_", $st);
$st = strtolower($st);
return $st;
}
}
if (isset($_GET['status']) && !isset($message)) {
if ($_GET['status'] == "sn") {
$message = $locale['410'];
} elseif ($_GET['status'] == "su") {
$message = $locale['411'];
} elseif ($_GET['status'] == "del") {
$message = $locale['412'];
}
if ($message) { echo "
".$message."
\n"; }
}
$result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS);
if (dbrows($result)) {
if (isset($_POST['save'])) {
$subject = stripinput($_POST['subject']);
$article_url = stripinput($_POST['article_url']);
if (!$article_url) $article_url = translit($subject);
$body = addslash($_POST['body']);
$body2 = addslash($_POST['body2']);
$draft = isset($_POST['article_draft']) ? "1" : "0";
if ($settings['tinymce_enabled'] != 1) { $breaks = isset($_POST['line_breaks']) ? "y" : "n"; } else { $breaks = "n"; }
$comments = isset($_POST['article_comments']) ? "1" : "0";
$ratings = isset($_POST['article_ratings']) ? "1" : "0";
if (isset($_POST['article_id']) && isnum($_POST['article_id'])) {
$result = dbquery("UPDATE ".DB_ARTICLES." SET article_cat='".intval($_POST['article_cat'])."', article_subject='$subject', article_snippet='$body', article_article='$body2', article_draft='$draft', article_breaks='$breaks', article_allow_comments='$comments', article_allow_ratings='$ratings', article_url='$article_url' WHERE article_id='".$_POST['article_id']."'");
redirect(FUSION_SELF.$aidlink."&status=su");
} else {
$result = dbquery("INSERT INTO ".DB_ARTICLES." (article_cat, article_subject, article_snippet, article_article, article_draft, article_breaks, article_name, article_datestamp, article_reads, article_allow_comments, article_allow_ratings, article_url) VALUES ('".intval($_POST['article_cat'])."', '$subject', '$body', '$body2', '$draft', '$breaks', '".$userdata['user_id']."', '".time()."', '0', '$comments', '$ratings', '$article_url')");
redirect(FUSION_SELF.$aidlink."&status=sn");
}
} else if (isset($_POST['delete']) && (isset($_POST['article_id']) && isnum($_POST['article_id']))) {
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_id='".$_POST['article_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_item_id='".$_POST['article_id']."' and comment_type='A'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_item_id='".$_POST['article_id']."' and rating_type='A'");
redirect(FUSION_SELF.$aidlink."&status=del");
} else {
if (isset($_POST['preview'])) {
$article_cat = $_POST['article_cat'];
$subject = stripinput($_POST['subject']);
$article_url = stripinput($_POST['article_url']);
if (!$article_url) $article_url = translit($subject);
$body = phpentities(stripslash($_POST['body']));
$body2 = phpentities(stripslash($_POST['body2']));
$bodypreview = str_replace("src='".str_replace("../", "", IMAGES_A), "src='".IMAGES_A, stripslash($_POST['body']));
$body2preview = str_replace("src='".str_replace("../", "", IMAGES_A), "src='".IMAGES_A, stripslash($_POST['body2']));
$draft = isset($_POST['article_draft']) ? " checked='checked'" : "";
if (isset($_POST['line_breaks'])) {
$breaks = " checked='checked'";
$bodypreview = nl2br($bodypreview);
$body2preview = nl2br($body2preview);
} else {
$breaks = "";
}
$comments = isset($_POST['article_comments']) ? " checked='checked'" : "";
$ratings = isset($_POST['article_ratings']) ? " checked='checked'" : "";
opentable($subject);
echo $bodypreview."\n";
closetable();
opentable($subject);
echo $body2preview."\n";
closetable();
}
$result = dbquery("SELECT * FROM ".DB_ARTICLES." ORDER BY article_draft DESC, article_datestamp DESC");
if (dbrows($result)) {
$editlist = ""; $sel = "";
while ($data = dbarray($result)) {
if ((isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
$article_id = isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'];
$sel = ($article_id == $data['article_id'] ? " selected='selected'" : "");
} else {
$sel = "";
}
$editlist .= "\n";
}
opentable($locale['402']);
echo "\n\n
\n";
closetable();
}
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
$result = dbquery("SELECT * FROM ".DB_ARTICLES." WHERE article_id='".(isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'])."'");
if (dbrows($result)) {
$data = dbarray($result);
$article_cat = $data['article_cat'];
$subject = $data['article_subject'];
$article_url = $data['article_url'];
if (!$article_url) $article_url = translit($subject);
$body = phpentities(stripslashes($data['article_snippet']));
$body2 = phpentities(stripslashes($data['article_article']));
$draft = $data['article_draft'] ? " checked='checked'" : "";
$breaks = $data['article_breaks'] == "y" ? " checked='checked'" : "";
$comments = $data['article_allow_comments'] ? " checked='checked'" : "";
$ratings = $data['article_allow_ratings'] ? " checked='checked'" : "";
} else {
redirect(FUSION_SELF.$aidlink);
}
}
if ((isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
opentable($locale['401']);
} else {
if (!isset($_POST['preview'])) {
$subject = "";
$article_url = "";
$body = "";
$body2 = "";
$draft = "";
$breaks = " checked='checked'";
$comments = " checked='checked'";
$ratings = " checked='checked'";
}
opentable($locale['400']);
}
$result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." ORDER BY article_cat_name DESC");
$catlist = ""; $sel = "";
while ($data = dbarray($result)) {
if (isset($article_cat)) $sel = ($article_cat == $data['article_cat_id'] ? " selected='selected'" : "");
$catlist .= "\n";
}
echo "\n";
closetable();
echo "\n";
}
} else {
opentable($locale['403']);
echo "\n";
closetable();
}
require_once THEMES."templates/footer.php";
?>PK
?ʎF F 4!/administration/news.phpadvanced();\n";
} else {
require_once INCLUDES."html_buttons_include.php";
}
$url_suffix = '.html';
if (!function_exists('translit')) {
function translit($st) {
$st = strtr($st, "_", "abvgdeeziyklmnoprstufh'ie_");
$st = strtr($st, "Ũ_","ABVGDEEZIYKLMNOPRSTUFH'IEI");
//$st = strtr($st, "Ũ_", "abvgdeeziyklmnoprstufh'ie_");
$st = strtr($st, array("" => "zh", "" => "ts",
"" => "ch", "" => "sh", "" => "shch",
"" => "", "" => "yu", "" => "ya",
"" => "ZH", "" => "TS", "" => "CH",
"" => "SH", "" => "SHCH", "" => "",
"" => "YU", "" => "YA", "" => "i",
"" => "Yi", "" => "ie", "" => "Ye"));
$search = array(".", ",", ":", ";", "'", '"', '-');
$replace = array("", "", "", "", "", "", '_');
$st = str_replace($search, $replace, $st);
$st = str_replace("&", " and ", $st);
$st = str_replace("&", " and ", $st);
$st = str_replace(" ", " ", $st);
$st = str_replace(" ", "_", $st);
$st = str_replace("__", "_", $st);
$st = strtolower($st);
return $st;
}
}
if (isset($_GET['status'])) {
if ($_GET['status'] == "sn") {
$message = $locale['410'];
} elseif ($_GET['status'] == "su") {
$message = $locale['411'];
} elseif ($_GET['status'] == "del") {
$message = $locale['412'];
}
if ($message) { echo "".$message."
\n"; }
}
if (isset($_POST['save'])) {
$news_subject = stripinput($_POST['news_subject']);
$news_url = stripinput($_POST['news_url']);
if (!$news_url) $news_url = translit($news_subject);
$news_cat = isnum($_POST['news_cat']) ? $_POST['news_cat'] : "0";
$body = addslash($_POST['body']);
if ($_POST['body2']) {
$body2 = addslash(preg_replace("(^\s
$)", "", $_POST['body2']));
} else {
$body2 = "";
}
$news_start_date = 0; $news_end_date = 0;
if ($_POST['news_start']['mday']!="--" && $_POST['news_start']['mon']!="--" && $_POST['news_start']['year']!="----") {
$news_start_date = mktime($_POST['news_start']['hours'],$_POST['news_start']['minutes'],0,$_POST['news_start']['mon'],$_POST['news_start']['mday'],$_POST['news_start']['year']);
}
if ($_POST['news_end']['mday']!="--" && $_POST['news_end']['mon']!="--" && $_POST['news_end']['year']!="----") {
$news_end_date = mktime($_POST['news_end']['hours'],$_POST['news_end']['minutes'],0,$_POST['news_end']['mon'],$_POST['news_end']['mday'],$_POST['news_end']['year']);
}
$news_visibility = isnum($_POST['news_visibility']) ? $_POST['news_visibility'] : "0";
$news_draft = isset($_POST['news_draft']) ? "1" : "0";
$news_sticky = isset($_POST['news_sticky']) ? "1" : "0";
if ($settings['tinymce_enabled'] != 1) { $news_breaks = isset($_POST['line_breaks']) ? "y" : "n"; } else { $news_breaks = "n"; }
$news_comments = isset($_POST['news_comments']) ? "1" : "0";
$news_ratings = isset($_POST['news_ratings']) ? "1" : "0";
if (isset($_POST['news_id']) && isnum($_POST['news_id'])) {
if ($news_sticky == "1") { $result = dbquery("UPDATE ".DB_NEWS." SET news_sticky='0' WHERE news_sticky='1'"); }
$result = dbquery("UPDATE ".DB_NEWS." SET news_subject='$news_subject', news_cat='$news_cat', news_news='$body', news_extended='$body2', news_breaks='$news_breaks',".($news_start_date != 0 ? " news_datestamp='$news_start_date'," : "")." news_start='$news_start_date', news_end='$news_end_date', news_visibility='$news_visibility', news_draft='$news_draft', news_sticky='$news_sticky', news_allow_comments='$news_comments', news_allow_ratings='$news_ratings', news_url='$news_url' WHERE news_id='".$_POST['news_id']."'");
redirect(FUSION_SELF.$aidlink."&status=su");
} else {
if ($news_sticky == "1") { $result = dbquery("UPDATE ".DB_NEWS." SET news_sticky='0' WHERE news_sticky='1'"); }
$result = dbquery("INSERT INTO ".DB_NEWS." (news_subject, news_cat, news_news, news_extended, news_breaks, news_name, news_datestamp, news_start, news_end, news_visibility, news_draft, news_sticky, news_reads, news_allow_comments, news_allow_ratings, news_url) VALUES ('$news_subject', '$news_cat', '$body', '$body2', '$news_breaks', '".$userdata['user_id']."', '".($news_start_date != 0 ? $news_start_date : time())."', '$news_start_date', '$news_end_date', '$news_visibility', '$news_draft', '$news_sticky', '0', '$news_comments', '$news_ratings', '$news_url')");
redirect(FUSION_SELF.$aidlink."&status=sn");
}
} else if (isset($_POST['delete']) && (isset($_POST['news_id']) && isnum($_POST['news_id']))) {
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_id='".$_POST['news_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_item_id='".$_POST['news_id']."' and comment_type='N'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_item_id='".$_POST['news_id']."' and rating_type='N'");
redirect(FUSION_SELF.$aidlink."&status=del");
} else {
if (isset($_POST['preview'])) {
$news_subject = stripinput($_POST['news_subject']);
$news_url = stripinput($_POST['news_url']);
if (!$news_url) $news_url = translit($news_url);
$news_cat = isnum($_POST['news_cat']) ? $_POST['news_cat'] : "0";
$body = phpentities(stripslash($_POST['body']));
$bodypreview = str_replace("src='".str_replace("../", "", IMAGES_N), "src='".IMAGES_N, stripslash($_POST['body']));
if ($_POST['body2']) {
$body2 = phpentities(stripslash($_POST['body2']));
$body2preview = str_replace("src='".str_replace("../", "", IMAGES_N), "src='".IMAGES_N, stripslash($_POST['body2']));
} else {
$body2 = "";
}
if (isset($_POST['line_breaks'])) {
$news_breaks = " checked='checked'";
$bodypreview = nl2br($bodypreview);
if ($body2) { $body2preview = nl2br($body2preview); }
} else {
$news_breaks = "";
}
$news_start = array(
"mday" => isnum($_POST['news_start']['mday']) ? $_POST['news_start']['mday'] : "--",
"mon" => isnum($_POST['news_start']['mon']) ? $_POST['news_start']['mon'] : "--",
"year" => isnum($_POST['news_start']['year']) ? $_POST['news_start']['year'] : "----",
"hours" => isnum($_POST['news_start']['hours']) ? $_POST['news_start']['hours'] : "0",
"minutes" => isnum($_POST['news_start']['minutes']) ? $_POST['news_start']['minutes'] : "0",
);
$news_end = array(
"mday" => isnum($_POST['news_end']['mday']) ? $_POST['news_end']['mday'] : "--",
"mon" => isnum($_POST['news_end']['mon']) ? $_POST['news_end']['mon'] : "--",
"year" => isnum($_POST['news_end']['year']) ? $_POST['news_end']['year'] : "----",
"hours" => isnum($_POST['news_end']['hours']) ? $_POST['news_end']['hours'] : "0",
"minutes" => isnum($_POST['news_end']['minutes']) ? $_POST['news_end']['minutes'] : "0",
);
$news_visibility = isnum($_POST['news_visibility']) ? $_POST['news_visibility'] : "0";
$news_draft = isset($_POST['news_draft']) ? " checked='checked'" : "";
$news_sticky = isset($_POST['news_sticky']) ? " checked='checked'" : "";
$news_comments = isset($_POST['news_comments']) ? " checked='checked'" : "";
$news_ratings = isset($_POST['news_ratings']) ? " checked='checked'" : "";
opentable($news_subject);
echo "$bodypreview\n";
closetable();
if (isset($body2preview)) {
opentable($news_subject);
echo "$body2preview\n";
closetable();
}
}
$result = dbquery("SELECT * FROM ".DB_NEWS." ORDER BY news_draft DESC, news_datestamp DESC");
if (dbrows($result) != 0) {
$editlist = ""; $sel = "";
while ($data = dbarray($result)) {
if ((isset($_POST['news_id']) && isnum($_POST['news_id'])) || (isset($_GET['news_id']) && isnum($_GET['news_id']))) {
$news_id = isset($_POST['news_id']) ? $_POST['news_id'] : $_GET['news_id'];
$sel = ($news_id == $data['news_id'] ? " selected='selected'" : "");
}
$editlist .= "\n";
}
opentable($locale['400']);
echo "\n
\n\n";
closetable();
}
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_POST['news_id']) && isnum($_POST['news_id'])) || (isset($_GET['news_id']) && isnum($_GET['news_id']))) {
$result = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_id='".(isset($_POST['news_id']) ? $_POST['news_id'] : $_GET['news_id'])."'");
if (dbrows($result)) {
$data = dbarray($result);
$news_subject = $data['news_subject'];
$news_url = $data['news_url'];
$news_cat = $data['news_cat'];
$body = phpentities(stripslashes($data['news_news']));
$body2 = phpentities(stripslashes($data['news_extended']));
if ($data['news_start'] > 0) $news_start = getdate($data['news_start']);
if ($data['news_end'] > 0) $news_end = getdate($data['news_end']);
$news_visibility = $data['news_visibility'];
$news_draft = $data['news_draft'] == "1" ? " checked='checked'" : "";
$news_sticky = $data['news_sticky'] == "1" ? " checked='checked'" : "";
$news_breaks = $data['news_breaks'] == "y" ? " checked='checked'" : "";
$news_comments = $data['news_allow_comments'] == "1" ? " checked='checked'" : "";
$news_ratings = $data['news_allow_ratings'] == "1" ? " checked='checked'" : "";
} else {
redirect(FUSION_SELF.$aidlink);
}
}
if ((isset($_POST['news_id']) && isnum($_POST['news_id'])) || (isset($_GET['news_id']) && isnum($_GET['news_id']))) {
opentable($locale['402']);
} else {
if (!isset($_POST['preview'])) {
$news_subject = "";
$news_url = "";
$news_cat = "0";
$body = "";
$body2 = "";
$news_visibility = 0;
$news_draft = "";
$news_sticky = "";
$news_breaks = " checked='checked'";
$news_comments = " checked='checked'";
$news_ratings = " checked='checked'";
}
opentable($locale['401']);
}
$result = dbquery("SELECT * FROM ".DB_NEWS_CATS." ORDER BY news_cat_name");
$news_cat_opts = ""; $sel = "";
if (dbrows($result)) {
while ($data = dbarray($result)) {
if (isset($news_cat)) $sel = ($news_cat == $data['news_cat_id'] ? " selected='selected'" : "");
$news_cat_opts .= "\n";
}
}
$visibility_opts = ""; $sel = "";
$user_groups = getusergroups();
while(list($key, $user_group) = each($user_groups)){
$sel = ($news_visibility == $user_group['0'] ? " selected='selected'" : "");
$visibility_opts .= "\n";
}
echo "\n";
closetable();
echo "\n";
}
require_once THEMES."templates/footer.php";
?>PK
?6R 4!/articles.php "zh", "" => "ts",
"" => "ch", "" => "sh", "" => "shch",
"" => "", "" => "yu", "" => "ya",
"" => "ZH", "" => "TS", "" => "CH",
"" => "SH", "" => "SHCH", "" => "",
"" => "YU", "" => "YA", "" => "i",
"" => "Yi", "" => "ie", "" => "Ye"));
$search = array(".", ",", ":", ";", "'", '"', '-');
$replace = array("", "", "", "", "", "", '_');
$st = str_replace($search, $replace, $st);
$st = str_replace("&", " and ", $st);
$st = str_replace("&", " and ", $st);
$st = str_replace(" ", " ", $st);
$st = str_replace(" ", "_", $st);
$st = str_replace("__", "_", $st);
$st = strtolower($st);
return $st;
}
}
add_to_title($locale['global_200'].$locale['400']);
if (isset($_GET['article_id']) && isnum($_GET['article_id'])) {
$page_url = '';
$page_suffix = '.html';
if (isset($_GET['article_url'])) {
$page_url = stripinput($_GET['article_url']);
$page_url = trim($page_url,'/');
$page_suffix = '.html';
}
$result = dbquery(
"SELECT ta.*,tac.*, tu.user_id,user_name FROM ".DB_ARTICLES." ta
INNER JOIN ".DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
LEFT JOIN ".DB_USERS." tu ON ta.article_name=tu.user_id
WHERE ".groupaccess('article_cat_access')." AND article_id='".$_GET['article_id']."' AND article_draft='0'"
);
if (dbrows($result)) {
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
$data = dbarray($result);
if ($data['article_url'] == '') $data['article_url'] = translit($data['article_subject']);
if ($data['article_url'] != $page_url) { redirect(makeurl_article($data['article_url'],$data['article_id'])); }
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($_GET['rowstart'] == 0) { $result = dbquery("UPDATE ".DB_ARTICLES." SET article_reads=article_reads+1 WHERE article_id='".$_GET['article_id']."'"); }
$article = stripslashes($data['article_article']);
if (ereg('<--PAGEBREAK-->', $article)) {
$article = explode("<--PAGEBREAK-->", $article);
} else {
$article = explode("", $article);
}
$pagecount = count($article);
$article_subject = stripslashes($data['article_subject']);
$article_info = array(
"article_id" => $data['article_id'],
"article_url" => $data['article_url'] ? $data['article_url'] : translit($data['article_subject']),
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"article_date" => $data['article_datestamp'],
"article_breaks" => $data['article_breaks'],
"article_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='".$data['article_id']."'"),
"article_reads" => $data['article_reads'],
"article_allow_comments" => $data['article_allow_comments']
);
add_to_title($locale['global_201'].$article_subject);
echo "";
render_article($article_subject, $article[$_GET['rowstart']], $article_info);
echo "";
if ($pagecount > 1) {
echo "\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, makeurl_article($data['article_url'],$data['article_id']).'?')."\n
\n";
}
if ($data['article_allow_comments']) { showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], makeurl_article($data['article_url'],$data['article_id'])); }
if ($data['article_allow_ratings']) { showratings("A", $_GET['article_id'], makeurl_article($data['article_url'],$data['article_id'])); }
} else {
redirect(FUSION_SELF);
}
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
opentable($locale['400']);
echo "\n";
$result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows) {
$counter = 0; $columns = 2;
echo "\n\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) { echo "
\n\n"; }
$num = dbcount("(article_cat)", DB_ARTICLES, "article_cat='".$data['article_cat_id']."' AND article_draft='0'");
echo "".$data['article_cat_name']." ($num)";
if ($data['article_cat_description'] != "") { echo " \n".$data['article_cat_description'].""; }
echo " | \n";
$counter++;
}
echo "
\n
\n";
} else {
echo "
\n".$locale['401']."
\n
\n";
}
echo "\n";
closetable();
} else {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." WHERE article_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['article_cat_name']);
opentable($locale['400'].": ".$cdata['article_cat_name']);
echo "";
$rows = dbcount("(article_id)", DB_ARTICLES, "article_cat='".$_GET['cat_id']."' AND article_draft='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT ta.article_id, ta.article_subject, ta.article_snippet, ta.article_datestamp, ta.article_url FROM ".DB_ARTICLES." ta
WHERE article_cat='".$_GET['cat_id']."' AND article_draft='0' ORDER BY ".$cdata['article_cat_sorting']." LIMIT ".$_GET['rowstart'].",15"
);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['article_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
$new = " [".$locale['402']."]";
} else {
$new = "";
}
if ($data['article_url'] == '') $data['article_url'] = translit($data['article_subject']);
echo "".$data['article_subject']."$new
\n".stripslashes($data['article_snippet']);
echo ($i != $numrows ? "
\n" : "\n"); $i++;
}
echo "";
closetable();
if ($rows > 15) echo "\n".makepagenav($_GET['rowstart'], 15, $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&")."\n
\n";
} else {
echo "".$locale['403']."
\n";
echo "";
closetable();
}
}
}
if ($res == 0) { redirect(FUSION_SELF); }
}
require_once THEMES."templates/footer.php";
?>PK
֣>8 4!/articles_url.install.phpPK &A 4!/locale/PK &A 4!/locale/Russian/PK &A 4!/locale/Russian/admin/PK
>