advanced();\n"; } else { require_once INCLUDES."html_buttons_include.php"; } 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 = dbcount("(anime_cat_id)", DB_anime_CATS); if (!empty($result)) { if (isset($_POST['save'])) { $subject = stripinput($_POST['subject']); $body = addslash($_POST['body']); $body2 = addslash($_POST['body2']); $draft = isset($_POST['anime_draft']) ? "1" : "0"; if ($settings['tinymce_enabled'] != 1) { $breaks = isset($_POST['line_breaks']) ? "y" : "n"; } else { $breaks = "n"; } $comments = isset($_POST['anime_comments']) ? "1" : "0"; $ratings = isset($_POST['anime_ratings']) ? "1" : "0"; if (isset($_POST['anime_id']) && isnum($_POST['anime_id'])) { $result = dbquery("UPDATE ".DB_animeS." SET anime_cat='".intval($_POST['anime_cat'])."', anime_subject='$subject', anime_snippet='$body', anime_anime='$body2', anime_draft='$draft', anime_breaks='$breaks', anime_allow_comments='$comments', anime_allow_ratings='$ratings' WHERE anime_id='".$_POST['anime_id']."'"); redirect(FUSION_SELF.$aidlink."&status=su"); } else { $result = dbquery("INSERT INTO ".DB_animeS." (anime_cat, anime_subject, anime_snippet, anime_anime, anime_draft, anime_breaks, anime_name, anime_datestamp, anime_reads, anime_allow_comments, anime_allow_ratings) VALUES ('".intval($_POST['anime_cat'])."', '$subject', '$body', '$body2', '$draft', '$breaks', '".$userdata['user_id']."', '".time()."', '0', '$comments', '$ratings')"); redirect(FUSION_SELF.$aidlink."&status=sn"); } } else if (isset($_POST['delete']) && (isset($_POST['anime_id']) && isnum($_POST['anime_id']))) { $result = dbquery("DELETE FROM ".DB_animeS." WHERE anime_id='".$_POST['anime_id']."'"); $result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_item_id='".$_POST['anime_id']."' and comment_type='A'"); $result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_item_id='".$_POST['anime_id']."' and rating_type='A'"); redirect(FUSION_SELF.$aidlink."&status=del"); } else { if (isset($_POST['preview'])) { $anime_cat = $_POST['anime_cat']; $subject = stripinput($_POST['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['anime_draft']) ? " checked='checked'" : ""; if (isset($_POST['line_breaks'])) { $breaks = " checked='checked'"; $bodypreview = nl2br($bodypreview); $body2preview = nl2br($body2preview); } else { $breaks = ""; } $comments = isset($_POST['anime_comments']) ? " checked='checked'" : ""; $ratings = isset($_POST['anime_ratings']) ? " checked='checked'" : ""; opentable($subject); echo $bodypreview."\n"; closetable(); opentable($subject); echo $body2preview."\n"; closetable(); } $result = dbquery("SELECT anime_id, anime_subject, anime_draft FROM ".DB_animeS." ORDER BY anime_draft DESC, anime_datestamp DESC"); if (dbrows($result)) { $editlist = ""; $sel = ""; while ($data = dbarray($result)) { if ((isset($_POST['anime_id']) && isnum($_POST['anime_id'])) || (isset($_GET['anime_id']) && isnum($_GET['anime_id']))) { $anime_id = isset($_POST['anime_id']) ? $_POST['anime_id'] : $_GET['anime_id']; $sel = ($anime_id == $data['anime_id'] ? " selected='selected'" : ""); } else { $sel = ""; } $editlist .= "\n"; } opentable($locale['402']); echo "
\n
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n
\n"; closetable(); } if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_POST['anime_id']) && isnum($_POST['anime_id'])) || (isset($_GET['anime_id']) && isnum($_GET['anime_id']))) { $result = dbquery("SELECT anime_cat, anime_subject, anime_snippet, anime_anime, anime_draft, anime_breaks, anime_allow_comments, anime_allow_ratings FROM ".DB_animeS." WHERE anime_id='".(isset($_POST['anime_id']) ? $_POST['anime_id'] : $_GET['anime_id'])."'"); if (dbrows($result)) { $data = dbarray($result); $anime_cat = $data['anime_cat']; $subject = $data['anime_subject']; $body = phpentities(stripslashes($data['anime_snippet'])); $body2 = phpentities(stripslashes($data['anime_anime'])); $draft = $data['anime_draft'] ? " checked='checked'" : ""; $breaks = $data['anime_breaks'] == "y" ? " checked='checked'" : ""; $comments = $data['anime_allow_comments'] ? " checked='checked'" : ""; $ratings = $data['anime_allow_ratings'] ? " checked='checked'" : ""; } else { redirect(FUSION_SELF.$aidlink); } } if ((isset($_POST['anime_id']) && isnum($_POST['anime_id'])) || (isset($_GET['anime_id']) && isnum($_GET['anime_id']))) { opentable($locale['401']); } else { if (!isset($_POST['preview'])) { $subject = ""; $body = ""; $body2 = ""; $draft = ""; $breaks = " checked='checked'"; $comments = " checked='checked'"; $ratings = " checked='checked'"; } opentable($locale['400']); } $result = dbquery("SELECT anime_cat_id, anime_cat_name FROM ".DB_anime_CATS." ORDER BY anime_cat_name DESC"); $catlist = ""; $sel = ""; while ($data = dbarray($result)) { if (isset($anime_cat)) $sel = ($anime_cat == $data['anime_cat_id'] ? " selected='selected'" : ""); $catlist .= "\n"; } echo "
\n"; echo "\n\n"; echo "\n"; echo "\n"; echo "\n\n"; echo "\n"; echo "\n"; echo "\n\n"; echo "\n"; echo "\n"; echo "\n"; if ($settings['tinymce_enabled'] != 1) { echo "\n\n\n\n"; } echo "\n\n"; echo "\n"; echo "\n"; if ($settings['tinymce_enabled'] != 1) { echo "\n\n\n"; } echo "\n"; echo "\n"; echo "\n"; if ($settings['comments_enabled'] == "0" || $settings['ratings_enabled'] == "0") { $sys = ""; if ($settings['comments_enabled'] == "0" && $settings['ratings_enabled'] == "0") { $sys = $locale['459']; } elseif ($settings['comments_enabled'] == "0") { $sys = $locale['457']; } else { $sys = $locale['458']; } echo "\n\n"; } echo "\n"; echo "\n"; echo "\n
".$locale['422']."
".$locale['423']."
".$locale['424']."
\n"; echo display_html("inputform", "body", true, true, true, IMAGES_A); echo "
".$locale['425']."
\n"; echo "');\" />\n"; echo display_html("inputform", "body2", true, true, true, IMAGES_A); echo "
\n"; echo "
\n"; if ($settings['tinymce_enabled'] != 1) { echo "
\n"; } echo ""; if ($settings['comments_enabled'] == "0") { echo "*"; } echo "
\n"; echo ""; if ($settings['ratings_enabled'] == "0") { echo "*"; } echo "
"; echo "*".sprintf($locale['456'], $sys); echo "

\n"; if ((isset($_POST['anime_id']) && isnum($_POST['anime_id'])) || (isset($_GET['anime_id']) && isnum($_GET['anime_id']))) { echo "\n"; } echo "\n"; echo "
\n
\n"; closetable(); echo "\n"; } } else { opentable($locale['403']); echo "
".$locale['452']."
\n".$locale['453']."
\n"; echo "".$locale['454']."".$locale['455']."
\n"; closetable(); } require_once THEMES."templates/footer.php"; ?>