".$locale['401']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else { $result = dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_type='l' ORDER BY submit_datestamp DESC"); if (dbrows($result) != "0") { while ($data = dbarray($result)) { $submit_criteria = unserialize($data['submit_criteria']); $links .= "\n".$submit_criteria['link_name']." ".$locale['417']." | ".$locale['418']."\n\n"; } } else { $links = "\n".$locale['414']."\n\n"; } $result = dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_type='n' ORDER BY submit_datestamp DESC"); if (dbrows($result) != "0") { while ($data = dbarray($result)) { $submit_criteria = unserialize($data['submit_criteria']); $news .= "\n".$submit_criteria['news_subject']." ".$locale['417']." | ".$locale['418']."\n\n"; } } else { $news = "\n".$locale['415']."\n\n"; } $result = dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_type='a' ORDER BY submit_datestamp DESC"); if (dbrows($result) != "0") { while ($data = dbarray($result)) { $submit_criteria = unserialize($data['submit_criteria']); $articles .= "\n".$submit_criteria['article_subject']." ".$locale['417']." | ".$locale['418']."\n\n"; } } else { $articles = "\n".$locale['416']."\n\n"; } $result = dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_type='p' ORDER BY submit_datestamp DESC"); if (dbrows($result) != "0") { while ($data = dbarray($result)) { $submit_criteria = unserialize($data['submit_criteria']); $photos .= "\n".$submit_criteria['photo_title']." ".$locale['417']." | ".$locale['418']."\n\n"; } } else { $photos = "\n".$locale['420']."\n\n"; } opentable($locale['410']); echo " $links $news $articles $photos
".$locale['411']."
".$locale['412']."
".$locale['413']."
".$locale['419']."
\n"; closetable(); } } if ($stage == "2" && $t == "l") { if (isset($_POST['add'])) { $link_name = stripinput($_POST['link_name']); $link_url = stripinput($_POST['link_url']); $link_description = stripinput($_POST['link_description']); $result = dbquery("INSERT INTO ".$db_prefix."weblinks (weblink_name, weblink_description, weblink_url, weblink_cat, weblink_datestamp, weblink_count) VALUES ('$link_name', '$link_description', '$link_url', '".$_POST['link_category']."', '".time()."', '0')"); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); opentable($locale['430']); echo "
".$locale['431']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else if (isset($_POST['delete'])) { opentable($locale['432']); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); echo "
".$locale['433']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else { $opts = ""; $result = dbquery("SELECT * FROM ".$db_prefix."weblink_cats ORDER BY weblink_cat_name"); if (dbrows($result) != 0) { while($data = dbarray($result)) $opts .= "\n"; } else { $opts .= "\n"; } $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $posted = showdate("longdate", $data['submit_datestamp']); opentable($locale['440']); echo "
".$locale['441']."".$data['user_name']."".$locale['442']."$posted
".$submit_criteria['link_name']." - ".$submit_criteria['link_url']."
".$locale['443']." ".$submit_criteria['link_category']."
".$locale['443']."
".$locale['444']."
".$locale['445']."
".$locale['446']."

".$locale['447']."
\n"; closetable(); } } if ($stage == "2" && $t == "n") { if (isset($_POST['publish'])) { $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $news_subject = stripinput($_POST['news_subject']); $news_cat = isNum($_POST['news_cat']) ? $_POST['news_cat'] : "0"; $news_body = addslash($_POST['news_body']); $news_breaks = ($_POST['news_breaks'] == "y") ? "y" : "n"; $result = dbquery("INSERT INTO ".$db_prefix."news (news_subject, news_cat, news_news, news_extended, news_breaks, news_name, news_datestamp, news_start, news_end, news_visibility, news_reads, news_allow_comments, news_allow_ratings) VALUES ('$news_subject', '$news_cat', '$news_body', '', '$news_breaks', '".$data['user_id']."', '".time()."', '0', '0', '0', '0', '1', '1')"); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); opentable($locale['490']); echo "
".$locale['491']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else if (isset($_POST['delete'])) { opentable($locale['492']); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); echo "
".$locale['493']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else { if ($settings['tinymce_enabled'] == 1) echo "\n"; $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $news_subject = $submit_criteria['news_subject']; $news_cat = $submit_criteria['news_cat']; $news_body = phpentities(stripslashes($submit_criteria['news_body'])); $news_breaks = $submit_criteria['news_breaks']; $news_cat_opts = ""; $sel = ""; $result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats ORDER BY news_cat_name"); if (dbrows($result2)) { while ($data2 = dbarray($result2)) { if (isset($news_cat)) $sel = ($news_cat == $data2['news_cat_id'] ? " selected" : ""); $news_cat_opts .= "\n"; } } opentable($locale['500']); echo "
".$locale['505']."
".$locale['506']."
".$locale['508']."

".$locale['501']."".$data['user_name']."

".$locale['502']."
\n"; closetable(); } } if ($stage == "2" && $t == "a") { if (isset($_POST['publish'])) { $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $article_cat = $_POST['article_cat']; $article_subject = $_POST['article_subject']; $article_snippet = addslash($_POST['article_snippet']); $article_body = addslash($_POST['article_body']); $article_breaks = ($_POST['article_breaks'] == "y") ? "y" : "n"; $result = dbquery("INSERT INTO ".$db_prefix."articles (article_cat, article_subject, article_snippet, article_article, article_breaks, article_name, article_datestamp, article_reads, article_allow_comments, article_allow_ratings) VALUES ('$article_cat', '$article_subject', '$article_snippet', '$article_body', '$article_breaks', '".$data['user_id']."', '".time()."', '0', '1', '1')"); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); opentable($locale['530']); echo "
".$locale['531']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else if (isset($_POST['delete'])) { opentable($locale['532']); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); echo "
".$locale['533']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else { if ($settings['tinymce_enabled'] == 1) echo "\n"; $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $article_cat = $submit_criteria['article_cat']; $article_subject = $submit_criteria['article_subject']; $article_snippet = phpentities(stripslashes($submit_criteria['article_snippet'])); $article_body = phpentities(stripslashes($submit_criteria['article_body'])); $article_breaks = $submit_criteria['article_breaks']; $result2 = dbquery("SELECT * FROM ".$db_prefix."article_cats ORDER BY article_cat_name DESC"); $article_cat_opts = ""; $sel = ""; while ($data2 = dbarray($result2)) { if (isset($article_cat)) $sel = ($article_cat == $data2['article_cat_id'] ? " selected" : ""); $article_cat_opts .= "\n"; } opentable($locale['540']); echo "
".$locale['506']."
".$locale['505']."
".$locale['547']."
".$locale['548']."

".$locale['541']."".$data['user_name']."

".$locale['542']."
\n"; closetable(); } } if ($stage == "2" && $t == "p") { if (isset($_POST['publish'])) { define("SAFEMODE", @ini_get("safe_mode") ? true : false); require_once INCLUDES."photo_functions_include.php"; $photo_file = ""; $photo_thumb1 = ""; $photo_thumb2 = ""; $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $photo_title = stripinput($_POST['photo_title']); $photo_description = stripinput($_POST['photo_description']); $album_id = isNum($_POST['album_id']) ? $_POST['album_id'] : "0"; $photo_name = strtolower(substr($submit_criteria['photo_file'], 0, strrpos($submit_criteria['photo_file'], "."))); $photo_ext = strtolower(strrchr($submit_criteria['photo_file'],".")); $photo_dest = PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : ""); $photo_file = image_exists($photo_dest, $photo_name.$photo_ext); copy(PHOTOS."submissions/".$submit_criteria['photo_file'], $photo_dest.$photo_file); chmod($photo_dest.$photo_file, 0644); unlink(PHOTOS."submissions/".$submit_criteria['photo_file']); $imagefile = @getimagesize($photo_dest.$photo_file); $photo_thumb1 = image_exists($photo_dest, $photo_name."_t1".$photo_ext); createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb1, $settings['thumb_w'], $settings['thumb_h']); if ($imagefile[0] > $settings['photo_w'] || $imagefile[1] > $settings['photo_h']) { $photo_thumb2 = image_exists($photo_dest, $photo_name."_t2".$photo_ext); createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb2, $settings['photo_w'], $settings['photo_h']); } $photo_order = dbresult(dbquery("SELECT MAX(photo_order) FROM ".$db_prefix."photos WHERE album_id='$album_id'"), 0) + 1; $result = dbquery("INSERT INTO ".$db_prefix."photos (album_id, photo_title, photo_description, photo_filename, photo_thumb1, photo_thumb2, photo_datestamp, photo_user, photo_views, photo_order, photo_allow_comments, photo_allow_ratings) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$data['submit_user']."', '0', '$photo_order', '1', '1')"); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); opentable($locale['580']); echo "
".$locale['581']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else if (isset($_POST['delete'])) { opentable($locale['582']); $data = dbarray(dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'")); $submit_criteria = unserialize($data['submit_criteria']); @unlink(PHOTOS."submissions/".$submit_criteria['photo_file']); $result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"); echo "
".$locale['583']."

".$locale['402']."

".$locale['403']."

\n"; closetable(); } else { $data = dbarray(dbquery( "SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id WHERE submit_id='$submit_id'" )); $submit_criteria = unserialize($data['submit_criteria']); $photo_title = $submit_criteria['photo_title']; $photo_description = $submit_criteria['photo_description']; $photo_file = $submit_criteria['photo_file']; $album_id = $submit_criteria['album_id']; $photo_albums = ""; $sel = ""; $result2 = dbquery("SELECT * FROM ".$db_prefix."photo_albums ORDER BY album_title"); if (dbrows($result2)) { while ($data2 = dbarray($result2)) { if (isset($album_id)) $sel = ($album_id == $data2['album_id'] ? " selected" : ""); $photo_albums .= "\n"; } } opentable($locale['500']); echo "
".$locale['596']."
".$locale['597']."
".$locale['598']."

".$locale['591']."

".$locale['592']."".$data['user_name']."

".$locale['593']."
\n"; closetable(); } } echo "\n"; require_once BASEDIR."footer.php"; ?>