load_files(); return $js; } $e_sub_cat = 'news'; $e_wysiwyg = "data,news_extended"; // -------- Presets. ------------ // always load before auth.php require_once(e_HANDLER."preset_class.php"); $pst = new e_preset; $pst->form = "dataform"; // form id of the form that will have it's values saved. $pst->page = "newspost.php?create"; // display preset options on which page(s). $pst->id = "admin_newspost"; // ------------------------------ $newspost = new newspost; require_once("auth.php"); $pst->save_preset(); // save and render result using unique name require_once(e_HANDLER."userclass_class.php"); require_once(e_HANDLER."news_class.php"); require_once(e_HANDLER."ren_help.php"); require_once(e_HANDLER."form_handler.php"); require_once(e_HANDLER."file_class.php"); $fl = new e_file; $rs = new form; $ix = new news; $deltest = array_flip($_POST); if (e_QUERY) { list($action, $sub_action, $id, $from) = explode(".", e_QUERY); $id = intval($id); $from = intval($from); unset($tmp); } $from = ($from ? $from : 0); $amount = 10; // ##### Main loop ----------------------------------------------------------------------------------------------------------------------- if(isset($_POST['news_userclass'])) { $_POST['news_class'] = implode(",", array_keys($_POST['news_userclass'])); } if (preg_match("#(.*?)_delete_(\d+)#", $deltest[$tp->toJS(LAN_DELETE)], $matches)) { $delete = $matches[1]; $del_id = $matches[2]; } if(isset($_POST['delete'])) { $tmp = array_keys($_POST['delete']); list($delete, $del_id) = explode("_", $tmp[0]); } if ($delete == "main" && $del_id) { if ($sql->db_Count('news','(*)',"WHERE news_id = '{$del_id}'")) { $e_event->trigger("newsdel", $del_id); if($sql->db_Delete("news", "news_id='$del_id' ")) { $newspost->show_message(NWSLAN_31." #".$del_id." ".NWSLAN_32); $e107cache->clear("news.php"); admin_purge_related("news", $del_id); } } unset($delete, $del); } if ($delete == "category" && $del_id) { if ($sql->db_Delete("news_category", "category_id='$del_id' ")) { $newspost->show_message(NWSLAN_33." #".$del_id." ".NWSLAN_32); unset($delete, $del_id); } } if($delete == "sn" && $del_id) { if ($sql->db_Delete("submitnews", "submitnews_id='$del_id' ")) { $newspost->show_message(NWSLAN_34." #".$del_id." ".NWSLAN_32); $e107cache->clear("news.php"); unset($delete, $del_id); } } if (isset($_POST['submitupload'])) { $pref['upload_storagetype'] = "1"; require_once(e_HANDLER."upload_handler.php"); $uploaded = file_upload(e_IMAGE."newspost_images/"); foreach($_POST['uploadtype'] as $key=>$uploadtype){ if($uploadtype == "thumb"){ rename(e_IMAGE."newspost_images/".$uploaded[$key]['name'],e_IMAGE."newspost_images/thumb_".$uploaded[$key]['name']); } if($uploadtype == "file"){ rename(e_IMAGE."newspost_images/".$uploaded[$key]['name'],e_FILE."downloads/".$uploaded[$key]['name']); } if ($uploadtype == "resize" && $_POST['resize_value']) { require_once(e_HANDLER."resize_handler.php"); resize_image(e_IMAGE."newspost_images/".$uploaded[$key]['name'], e_IMAGE."newspost_images/".$uploaded[$key]['name'], $_POST['resize_value'], "copy"); } } } // required. if (isset($_POST['preview'])) { $_POST['news_title'] = $tp->toDB($_POST['news_title']); $_POST['news_summary'] = $tp->toDB($_POST['news_summary']); $newspost->preview_item($id); } if (isset($_POST['submit_news'])) { $newspost->submit_item($sub_action, $id); $action = "main"; unset($sub_action, $id); } if (isset($_POST['create_category'])) { if ($_POST['category_name']) { if (empty($_POST['category_button'])) { $handle = opendir(e_IMAGE."icons"); while ($file = readdir($handle)) { if ($file != "." && $file != ".." && $file != "/" && $file != "null.txt" && $file != "CVS") { $iconlist[] = $file; } } closedir($handle); $_POST['category_button'] = $iconlist[0]; } $_POST['category_name'] = $tp->toDB($_POST['category_name']); $sql->db_Insert("news_category", "'0', '".$_POST['category_name']."', '".$_POST['category_button']."'"); $newspost->show_message(NWSLAN_35); } } if (isset($_POST['update_category'])) { if ($_POST['category_name']) { $category_button = ($_POST['category_button'] ? $_POST['category_button'] : ""); $_POST['category_name'] = $tp->toDB($_POST['category_name']); $sql->db_Update("news_category", "category_name='".$_POST['category_name']."', category_icon='".$category_button."' WHERE category_id='".$_POST['category_id']."'"); $newspost->show_message(NWSLAN_36); } } if (isset($_POST['save_prefs'])) { $pref['newsposts'] = $_POST['newsposts']; // ##### ADDED FOR NEWSARCHIVE -------------------------------------------------------------------- $pref['newsposts_archive'] = $_POST['newsposts_archive']; $pref['newsposts_archive_title'] = $tp->toDB($_POST['newsposts_archive_title']); // ##### END -------------------------------------------------------------------------------------- $pref['news_cats'] = $_POST['news_cats']; $pref['nbr_cols'] = $_POST['nbr_cols']; $pref['subnews_attach'] = $_POST['subnews_attach']; $pref['subnews_resize'] = $_POST['subnews_resize']; $pref['subnews_class'] = $_POST['subnews_class']; $pref['subnews_htmlarea'] = $_POST['subnews_htmlarea']; $pref['subnews_hide_news'] = $_POST['subnews_hide_news']; $pref['news_subheader'] = $_POST['news_subheader']; /* changes by jalist 22/01/2005: added pref to render new date header */ $pref['news_newdateheader'] = $_POST['news_newdateheader']; $pref['news_unstemplate'] = $_POST['news_unstemplate']; save_prefs(); $e107cache->clear("news.php"); $newspost->show_message(NWSLAN_119); } if (!e_QUERY || $action == "main") { $newspost->show_existing_items($action, $sub_action, $id, $from, $amount); } if ($action == "create") { $preset = $pst->read_preset("admin_newspost"); //only works here because $_POST is used. if ($sub_action == "edit" && !$_POST['preview'] && !$_POST['submit_news']) { if ($sql->db_Select("news", "*", "news_id='$id' ")) { $row = $sql->db_Fetch(); extract($row); $_POST['news_title'] = $news_title; $_POST['data'] = $news_body; $_POST['news_extended'] = $news_extended; $_POST['news_allow_comments'] = $news_allow_comments; $_POST['news_class'] = $news_class; $_POST['news_summary'] = $news_summary; $_POST['news_sticky'] = $news_sticky; $_POST['news_datestamp'] = $news_datestamp; $_POST['cat_id'] = $news_category; $_POST['news_start'] = $news_start; $_POST['news_end'] = $news_end; $_POST['comment_total'] = $sql->db_Count("comments", "(*)", " WHERE comment_item_id='$news_id' AND comment_type='0' "); $_POST['news_rendertype'] = $news_render_type; $_POST['news_thumbnail'] = $news_thumbnail; } } $newspost->create_item($sub_action, $id); } if ($action == "cat") { $newspost->show_categories($sub_action, $id); } if ($action == "sn") { $newspost->submitted_news($sub_action, $id); } if ($action == "pref") { $newspost->show_news_prefs($sub_action, $id); } echo " \n"; require_once("footer.php"); exit; class newspost { function show_existing_items($action, $sub_action, $id, $from, $amount) { // ##### Display scrolling list of existing news items --------------------------------------------------------------------------------------------------------- global $sql, $rs, $ns, $tp; $text = "
"; if (isset($_POST['searchquery'])) { $query = "news_title REGEXP('".$_POST['searchquery']."') OR news_body REGEXP('".$_POST['searchquery']."') OR news_extended REGEXP('".$_POST['searchquery']."') ORDER BY news_datestamp DESC"; } else { $query = "ORDER BY ".($sub_action ? $sub_action : "news_datestamp")." ".($id ? $id : "DESC")." LIMIT $from, $amount"; } if ($sql->db_Select("news", "*", $query, ($_POST['searchquery'] ? 0 : "nowhere"))) { $newsarray = $sql -> db_getList(); $text .= "
"; $ren_type = array("default","title","other-news","other-news 2"); foreach($newsarray as $row) { extract($row); // Note: To fix the alignment bug. Put both buttons inside the Form. // But make EDIT a 'button' and DELETE 'submit' $text .= ""; } $text .= "
".LAN_NEWS_45." ".NWSLAN_40." ".LAN_NEWS_49." ".LAN_OPTIONS."
$news_id ".($news_title ? $tp->toHTML($news_title,"","no_make_clickable") : "[".NWSLAN_42."]")." "; $text .= $ren_type[$news_render_type]; if($news_sticky) { $sicon = (file_exists(THEME."generic/sticky.png") ? THEME."generic/sticky.png" : e_IMAGE."generic/".IMODE."/sticky.png"); $text .= " "; } $text .= " ".ADMIN_EDIT_ICON."
"; } else { $text .= "
".NWSLAN_43."
"; } $newsposts = $sql->db_Count("news"); $text .= "
"; if ($newsposts > $amount && !$_POST['searchquery']) { $a = $newsposts/$amount; $r = explode(".", $a); if ($r[1] != 0 ? $pages = ($r[0]+1) : $pages = $r[0]); if ($pages) { $current = ($from/$amount)+1; $text .= "
".NWSLAN_62." "; for($a = 1; $a <= $pages; $a++) { $text .= ($current == $a ? " [$a]" : " [$a] "); } $text .= "
"; } } $text .= "

\n

\n\n\n

\n
\n
"; $ns->tablerender(NWSLAN_4, $text); } function show_options($action) { global $sql; if ($action == "") { $action = "main"; } $var['main']['text'] = NWSLAN_44; $var['main']['link'] = e_SELF; $var['create']['text'] = NWSLAN_45; $var['create']['link'] = e_SELF."?create"; $var['cat']['text'] = NWSLAN_46; $var['cat']['link'] = e_SELF."?cat"; $var['cat']['perm'] = "7"; $var['pref']['text'] = NWSLAN_90; $var['pref']['link'] = e_SELF."?pref"; $var['pref']['perm'] = "N"; if ($sql->db_Select("submitnews", "*", "submitnews_auth ='0' ")) { $var['sn']['text'] = NWSLAN_47; $var['sn']['link'] = e_SELF."?sn"; $var['sn']['perm'] = "N"; } show_admin_menu(NWSLAN_48, $action, $var); } function create_item($sub_action, $id) { global $cal; // ##### Display creation form --------------------------------------------------------------------------------------------------------- /* 08-08-2004 - unknown - fixed `Insert Image' display to use $IMAGES_DIRECTORY */ global $sql, $rs, $ns, $pref, $tp, $pst, $e107; if ($sub_action == "sn" && !$_POST['preview']) { if ($sql->db_Select("submitnews", "*", "submitnews_id=$id", TRUE)) { list($id, $submitnews_name, $submitnews_email, $_POST['news_title'], $submitnews_category, $_POST['data'], $submitnews_datestamp, $submitnews_ip, $submitnews_auth, $submitnews_file) = $sql->db_Fetch(); if (e_WYSIWYG) { $_POST['data'] .= "
".NWSLAN_49." ".$submitnews_name.""; $_POST['data'] .= ($submitnews_file)? "

": ""; } else { $_POST['data'] .= "\n[[b]".NWSLAN_49." ".$submitnews_name."[/b]]"; $_POST['data'] .= ($submitnews_file)?"\n\n[img]{E_IMAGE}newspost_images/".$submitnews_file."[/img]": ""; } $_POST['cat_id'] = $submitnews_category; } } if ($sub_action == "upload" && !$_POST['preview']) { if ($sql->db_Select("upload", "*", "upload_id=$id")) { $row = $sql->db_Fetch(); extract($row); $post_author_id = substr($upload_poster, 0, strpos($upload_poster, ".")); $post_author_name = substr($upload_poster, (strpos($upload_poster, ".")+1)); $upload_file = "pub_" . (preg_match("#Binary\s(.*?)\/#", $upload_file, $match) ? $match[1] : $upload_file); $_POST['news_title'] = NWSLAN_66.": ".$upload_name; $_POST['data'] = $upload_description."\n[b]".NWSLAN_49." ".$post_author_name."[/b]\n\n[file=request.php?".$upload_file."]".$upload_name."[/file]\n"; } } $text = "
"; $text .= ""; $text .=""; // -------- end of datestamp --------------------- $text .=" \n\n"; if($pref['trackbackEnabled']){ $text .= "\n"; } $text .= "
".NWSLAN_6.": "; if (!$sql->db_Select("news_category")) { $text .= NWSLAN_10; } else { $text .= " "; } $text .= "
".NWSLAN_12.":
".LAN_NEWS_27.":
".NWSLAN_13.":
"; $insertjs = (!e_WYSIWYG) ? "rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'": "rows='25' "; $_POST['data'] = $tp->toForm($_POST['data']); $text .= " "; //Main news body textarea if (!e_WYSIWYG) { $text .= "
". display_help("helpb", 'news'); } // end of htmlarea check. //Extended news form textarea if(e_WYSIWYG){ $ff_expand = "tinyMCE.execCommand('mceResetDesignMode')"; } // Fixes Firefox issue with hidden wysiwyg textarea. $text .= "
".NWSLAN_14.": ".NWSLAN_83."
"; if (!e_WYSIWYG) { $text .="
". display_help("helpb", 'news'); } $text .= "
".NWSLAN_66.": ".NWSLAN_69."
"; if (!FILE_UPLOADS) { $text .= "".NWSLAN_78.""; } else { if (!is_writable(e_FILE."downloads")) { $text .= "".NWSLAN_70."

"; } if (!is_writable(e_IMAGE."newspost_images")) { $text .= "".NWSLAN_71."

"; } $up_name = array(LAN_NEWS_24,NWSLAN_67,LAN_NEWS_22,NWSLAN_68); $up_value = array("resize","image","thumb","file"); $text .= "
 
".LAN_NEWS_25."  px
"; } $text .= "
".LAN_NEWS_47.": ".LAN_NEWS_23."

"; $parms = "name=news_thumbnail"; $parms .= "&path=".e_IMAGE."newspost_images/"; $parms .= "&default=".$_POST['news_thumbnail']; $parms .= "&width=100px"; $parms .= "&height=100px"; $parms .= "&multiple=TRUE"; $parms .= "&label=-- ".LAN_NEWS_48." --"; $text .= $tp->parseTemplate("{IMAGESELECTOR={$parms}}"); $text .= "
".NWSLAN_15.": ".NWSLAN_18."
". ($_POST['news_allow_comments'] ? "".NWSLAN_16."  ".NWSLAN_17 : "".NWSLAN_16."  ".NWSLAN_17)."
".NWSLAN_73.": ".NWSLAN_74."
"; $ren_type = array(NWSLAN_75,NWSLAN_76,NWSLAN_77,NWSLAN_77." 2"); foreach($ren_type as $key=>$value) { $checked = ($_POST['news_rendertype'] == $key) ? "checked='checked'" : ""; $text .= ""; $text .= $value."
"; } $text .="
".NWSLAN_19.": ".NWSLAN_72."

".NWSLAN_21.":
"; $_startdate = ($_POST['news_start'] > 0) ? date("d/m/Y", $_POST['news_start']) : ""; $cal_options['firstDay'] = 0; $cal_options['showsTime'] = false; $cal_options['showOthers'] = false; $cal_options['weekNumbers'] = false; $cal_options['ifFormat'] = "%d/%m/%Y"; $cal_attrib['class'] = "tbox"; $cal_attrib['size'] = "10"; $cal_attrib['name'] = "news_start"; $cal_attrib['value'] = $_startdate; $text .= $cal->make_input_field($cal_options, $cal_attrib); $text .= " - "; $_enddate = ($_POST['news_end'] > 0) ? date("d/m/Y", $_POST['news_end']) : ""; unset($cal_options); unset($cal_attrib); $cal_options['firstDay'] = 0; $cal_options['showsTime'] = false; $cal_options['showOthers'] = false; $cal_options['weekNumbers'] = false; $cal_options['ifFormat'] = "%d/%m/%Y"; $cal_attrib['class'] = "tbox"; $cal_attrib['size'] = "10"; $cal_attrib['name'] = "news_end"; $cal_attrib['value'] = $_enddate; $text .= $cal->make_input_field($cal_options, $cal_attrib); $text .= "
".LAN_NEWS_32.": ".LAN_NEWS_33."
"; $update_checked = ($_POST['update_datestamp']) ? "checked='checked'" : ""; $_update_datestamp = ($_POST['news_datestamp'] > 0) ? date("d/m/Y H:i:s", $_POST['news_datestamp']) : ""; unset($cal_options); unset($cal_attrib); $cal_options['firstDay'] = 0; $cal_options['showsTime'] = true; $cal_options['showOthers'] = true; $cal_options['weekNumbers'] = false; $cal_options['ifFormat'] = "%d/%m/%Y %H:%M:%S"; $cal_options['timeFormat'] = "24"; $cal_attrib['class'] = "tbox"; $cal_attrib['name'] = "news_datestamp"; $cal_attrib['value'] = $_update_datestamp; $text .= $cal->make_input_field($cal_options, $cal_attrib); $text .= "
".NWSLAN_105."
".NWSLAN_22.": ".NWSLAN_84."
".r_userclass_check("news_userclass", $_POST['news_class'], "nobody,public,guest,member,admin,classes,language")."
".LAN_NEWS_28.": ".LAN_NEWS_29."
"; if($_POST['news_sticky']) { $sel = " checked='checked' "; } else { $sel = ""; } $text .= " ".LAN_NEWS_30."\n
\n
".LAN_NEWS_34.": ".LAN_NEWS_35."
"; /* pingback */ // ".LAN_NEWS_36."
$text .= LAN_NEWS_37."

". (isset($_POST['preview']) ? " " : " "). ($id && $sub_action != "sn" && $sub_action != "upload" ? " " : " ")." \n
"; $ns->tablerender(NWSLAN_29, $text); } function preview_item($id) { // ##### Display news preview --------------------------------------------------------------------------------------------------------- global $tp, $sql, $ix, $IMAGES_DIRECTORY; $_POST['news_id'] = $id; if($_POST['news_start']) { $tmp = explode("/", $_POST['news_start']); $_POST['news_start'] = mktime(0, 0, 0, $tmp[1], $tmp[0], $tmp[2]); } else { $_POST['news_start'] = 0; } if($_POST['news_end']) { $tmp = explode("/", $_POST['news_end']); $_POST['news_end'] = mktime(0, 0, 0, $tmp[1], $tmp[0], $tmp[2]); } else { $_POST['news_end'] = 0; } if(preg_match("#(.*?)/(.*?)/(.*?) (.*?):(.*?):(.*?)$#", $_POST['news_datestamp'], $matches)) { $_POST['news_datestamp'] = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); } else { $_POST['news_datestamp'] = time(); } if($_POST['update_datestamp']) { $_POST['news_datestamp'] = time(); } $sql->db_Select("news_category", "*", "category_id='".$_POST['cat_id']."' "); list($_POST['category_id'], $_POST['category_name'], $_POST['category_icon']) = $sql->db_Fetch(); $_POST['user_id'] = USERID; $_POST['user_name'] = USERNAME; $_POST['comment_total'] = $comment_total; $_PR = $_POST; $_PR['news_body'] = $tp->post_toHTML($_PR['data'],FALSE); $_PR['news_title'] = $tp->post_toHTML($_PR['news_title']); $_PR['news_summary'] = $tp->post_toHTML($_PR['news_summary']); $_PR['news_extended'] = $tp->post_toHTML($_PR['news_extended']); $_PR['news_file'] = $_POST['news_file']; $_PR['news_image'] = $_POST['news_image']; $ix -> render_newsitem($_PR); echo $tp -> parseTemplate('{NEWSINFO}', FALSE, $news_shortcodes); } function submit_item($sub_action, $id) { // ##### Format and submit item --------------------------------------------------------------------------------------------------------- global $tp, $ix, $sql; if($_POST['news_start']) { $tmp = explode("/", $_POST['news_start']); $_POST['news_start'] = mktime(0, 0, 0, $tmp[1], $tmp[0], $tmp[2]); } else { $_POST['news_start'] = 0; } if($_POST['news_end']) { $tmp = explode("/", $_POST['news_end']); $_POST['news_end'] = mktime(0, 0, 0, $tmp[1], $tmp[0], $tmp[2]); } else { $_POST['news_end'] = 0; } $_POST['update_datestamp'] = 0; if(preg_match("#(.*?)/(.*?)/(.*?) (.*?):(.*?):(.*?)$#", $_POST['news_datestamp'], $matches)) { $_POST['news_datestamp'] = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); } else { $_POST['news_datestamp'] = time(); } if($_POST['update_datestamp']) { $_POST['news_datestamp'] = time(); } if($sub_action == 'edit') { $_POST['news_author'] = -1; } if ($id && $sub_action != "sn" && $sub_action != "upload") { $_POST['news_id'] = $id; } else { $sql->db_Update("submitnews", "submitnews_auth='1' WHERE submitnews_id ='".$id."' "); } if (!$_POST['cat_id']) { $_POST['cat_id'] = 1; } $this->show_message($ix->submit_item($_POST)); unset($_POST['news_title'], $_POST['cat_id'], $_POST['data'], $_POST['news_extended'], $_POST['news_allow_comments'], $_POST['startday'], $_POST['startmonth'], $_POST['startyear'], $_POST['endday'], $_POST['endmonth'], $_POST['endyear'], $_POST['news_id'], $_POST['news_class']); } function show_message($message) { // ##### Display comfort --------------------------------------------------------------------------------------------------------- global $ns; $ns->tablerender("", "
".$message."
"); } function show_categories($sub_action, $id) { global $sql, $rs, $ns, $tp; $handle = opendir(e_IMAGE."icons"); while ($file = readdir($handle)) { if ($file != "." && $file != ".." && $file != "/" && $file != "null.txt" && $file != "CVS") { $iconlist[] = $file; } } closedir($handle); if ($sub_action == "edit") { if ($sql->db_Select("news_category", "*", "category_id='$id' ")) { $row = $sql->db_Fetch(); extract($row); } } $text = "
".$rs->form_open("post", e_SELF."?cat", "dataform")." "; } else { $text .= ""; } $text .= "
".NWSLAN_52." ".$rs->form_text("category_name", 30, $category_name, 200)."
".NWSLAN_53." ".$rs->form_text("category_button", 60, $category_icon, 100)."
"; if ($id) { $text .= " ".$rs->form_button("submit", "category_clear", NWSLAN_79). $rs->form_hidden("category_id", $id)."
".$rs->form_close()."
"; $ns->tablerender(NWSLAN_56, $text); unset($category_name, $category_icon); $text = "
"; if ($category_total = $sql->db_Select("news_category")) { $text .= "
"; while ($row = $sql->db_Fetch()) { extract($row); if ($category_icon) { $icon = (strstr($category_icon, "images/") ? THEME."$category_icon" : e_IMAGE."icons/$category_icon"); } $text .= "\n"; } $text .= "
".LAN_NEWS_45."   ".NWSLAN_6." ".LAN_OPTIONS."
{$category_id} $category_name ".ADMIN_EDIT_ICON." toJS(NWSLAN_37." [ID: $category_id ]")."') \"/>
"; } else { $text .= "
".NWSLAN_10."
"; } $text .= "
"; $ns->tablerender(NWSLAN_51, $text); } function show_news_prefs() { global $sql, $rs, $ns, $pref; $text = "
".$rs->form_open("post", e_SELF."?pref", "dataform")." "; // // // // "; // ##### ADDED FOR NEWSARCHIVE -------------------------------------------------------------------- // the possible archive values are from "0" to "< $pref['newsposts']" // this should really be made as an onchange event on the selectbox for $pref['newsposts'] ... $text .= " "; // ##### END -------------------------------------------------------------------------------------- require_once(e_HANDLER."userclass_class.php"); $text .= " "; $text .= " "; $text .= " "; $text .= "
".NWSLAN_86."
".NWSLAN_87."
".NWSLAN_88."
".NWSLAN_108."
".NWSLAN_109."
// //
".NWSLAN_115."
".NWSLAN_116."
".NWSLAN_117."
".NWSLAN_106." ".r_userclass("subnews_class", $pref['subnews_class']). "
".NWSLAN_107."
".NWSLAN_100."
".NWSLAN_101." ".NWSLAN_102."
".NWSLAN_111."
".NWSLAN_112."
".NWSLAN_113."
".NWSLAN_114."
".NWSLAN_120."

" . ren_help(2) . "
"; $text .= "
".$rs->form_close()."
"; $ns->tablerender(NWSLAN_90, $text); } function submitted_news($sub_action, $id) { global $rs, $ns, $tp; $sql2 = new db; $text = "
"; if ($category_total = $sql2->db_Select("submitnews", "*", "submitnews_id !='' ORDER BY submitnews_id DESC")) { $text .= ""; while ($row = $sql2->db_Fetch()) { extract($row); $text .= "\n"; } $text .= "
ID ".NWSLAN_57." ".LAN_OPTIONS."
$submitnews_id "; $text .= ($submitnews_auth == 0)? "".$tp->toHTML($submitnews_title)."": $tp->toHTML($submitnews_title); $text .= " [ ".NWSLAN_104." $submitnews_name on ".date("D dS M y, g:ia", $submitnews_datestamp)."]
".$tp->toHTML($submitnews_item)."
"; $buttext = ($submitnews_auth == 0)? NWSLAN_58 : NWSLAN_103; $text .= $rs->form_open("post", e_SELF."?sn", "myform__{$submitnews_id}", "", "", " onsubmit=\"return jsconfirm('".$tp->toJS(NWSLAN_38." [ID: $submitnews_id ]")."')\" ") ."
".$rs->form_button("button", "category_edit_{$submitnews_id}", $buttext, "onclick=\"document.location='".e_SELF."?create.sn.$submitnews_id'\"")." ".$rs->form_button("submit", "delete[sn_{$submitnews_id}]", LAN_DELETE)."
".$rs->form_close()."
"; } else { $text .= "
".NWSLAN_59."
"; } $text .= "
"; $ns->tablerender(NWSLAN_60, $text); } } function newspost_adminmenu() { global $newspost; global $action; $newspost->show_options($action); } ?>