function code_aff($subject, $story, $bodytext, $notes) { global $local_user_language; $subjectX = aff_code(preview_local_langue($local_user_language, $subject)); $storyX = aff_code(preview_local_langue($local_user_language, $story)); $bodytextX = aff_code(preview_local_langue($local_user_language, $bodytext)); $notesX = aff_code(preview_local_langue($local_user_language, $notes)); themepreview($subjectX, $storyX, $bodytextX, $notesX); }
function PreviewStory($name, $address, $subject, $story, $storyext, $topic, $alanguage) { global $user, $cookie, $bgcolor1, $bgcolor2, $anonymous, $prefix, $multilingual, $AllowableHTML, $db, $module_name, $nuke_editor; include "header.php"; $f_story = filter($story); $f_storyext = filter($storyext); $subject = filter($subject, "nohtml", 0, preview); $story2 = "{$f_story}<br><br>{$f_storyext}"; OpenTable(); echo "<center><font class=\"title\"><b>" . _NEWSUBPREVIEW . "</b></font>"; CloseTable(); echo "<br>"; OpenTable(); echo "<center><i>" . _STORYLOOK . "</i></center><br><br>"; echo "<table width=\"70%\" bgcolor=\"{$bgcolor2}\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\"align=\"center\"><tr><td>" . "<table width=\"100%\" bgcolor=\"{$bgcolor1}\" cellpadding=\"8\" cellspacing=\"1\" border=\"0\"><tr><td>"; if (empty($topic)) { $topicimage = "AllTopics.gif"; $warning = "<center><blink><b>" . _SELECTTOPIC . "</b></blink></center>"; } else { $warning = ""; $row = $db->sql_fetchrow($db->sql_query("SELECT topictext, topicimage FROM " . $prefix . "_topics WHERE topicid='{$topic}'")); $topicimage = filter($row['topicimage'], "nohtml"); } echo "<img src=\"images/topics/{$topicimage}\" border=\"0\" align=\"right\" alt=\"" . $row['topictext'] . "\" title=\"" . $row['topictext'] . "\">"; themepreview($subject, $story2); echo "{$warning}" . "</td></tr></table></td></tr></table>" . "<br><br><center><font class=\"tiny\">" . _CHECKSTORY . "</font></center>"; CloseTable(); echo "<br>"; OpenTable(); echo "<table border=\"0\" widht=\"100%\">"; echo "<tr><td><form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<b>" . _YOURNAME . ":</b></td><td>"; if (is_user($user)) { cookiedecode($user); echo "<a href=\"modules.php?name=Your_Account\">{$cookie['1']}</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&op=logout\">" . _LOGOUT . "</a> ]</font>"; } else { echo "{$anonymous}"; } echo "<tr><td colspan=\"2\"> </td></tr>"; echo "</td></tr>"; echo "<tr><td><b>" . _SUBTITLE . ":</b></td><td>" . "<input type=\"text\" name=\"subject\" size=\"50\" maxlength=\"80\" value=\"{$subject}\"><br>(" . _BEDESCRIPTIVE . ")</td></tr>" . "<tr><td colspan=\"2\"> </td></tr>" . "<tr><td><b>" . _TOPIC . ":</b></td><td><select name=\"topic\">"; $result2 = $db->sql_query("SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext"); echo "<OPTION VALUE=\"\">" . _SELECTTOPIC . "</option>\n"; while ($row2 = $db->sql_fetchrow($result2)) { $topicid = intval($row2['topicid']); $topics = filter($row2['topictext'], "nohtml"); if ($topicid == $topic) { $sel = "selected "; } echo "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n"; $sel = ""; } echo "</select></td></tr>"; if ($multilingual == 1) { echo "<tr><td colspan=\"2\"> </td></tr>"; echo "<tr><td><b>" . _LANGUAGE . ":</b></td><td>" . "<select name=\"alanguage\">"; $handle = opendir('language'); while ($file = readdir($handle)) { if (preg_match("/^lang\\-(.+)\\.php/", $file, $matches)) { $langFound = $matches[1]; $languageslist .= "{$langFound} "; } } closedir($handle); $languageslist = explode(" ", $languageslist); sort($languageslist); for ($i = 0; $i < sizeof($languageslist); $i++) { if (!empty($languageslist[$i])) { echo "<option value=\"{$languageslist[$i]}\" "; if ($languageslist[$i] == $alanguage) { echo "selected"; } echo ">" . ucfirst($languageslist[$i]) . "</option>\n"; } } echo "</select></td></tr>"; } echo "<tr><td colspan=\"2\"> </td></tr>"; echo "<tr><td><b>" . _STORYTEXT . ":</b></td><td>" . "<textarea cols=\"70\" rows=\"15\" name=\"story\">{$f_story}</textarea></td></tr>" . "<tr><td colspan=\"2\"> </td></tr>" . "<tr><td><b>" . _EXTENDEDTEXT . ":</b></td><td>" . "<textarea cols=\"70\" rows=\"15\" name=\"storyext\">{$f_storyext}</textarea><br>" . "<font class=\"content\">(" . _AREYOUSURE . ")</font><br>"; if ($nuke_editor == 0) { echo "<font class=\"content\">" . _ALLOWEDHTML . ""; while (list($key, ) = each($AllowableHTML)) { echo " <" . $key . ">"; } echo "</font></td></tr>"; } else { echo "" . _HTMLNOTALLOWED . "</font></td></tr>"; } echo "<tr><td colspan=\"2\"> </td></tr>"; echo "<tr><td> </td><td><hr noshade size=\"1\"></td></tr>"; echo "<tr><td colspan=\"2\"> </td></tr>"; echo "<tr><td> </td><td><input type=\"submit\" name=\"op\" value=\"" . _PREVIEW . "\"> " . "<input type=\"submit\" name=\"op\" value=\"" . _OK . "\"></form>" . "</td></tr></table>"; CloseTable(); include "footer.php"; }
function moderation_news_view($id) { global $prefix, $db, $admin_file; include "header.php"; GraphicAdmin(); mod_menu(); OpenTable(); $comm = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_comments_moderated WHERE tid=" . intval($id))); $comm['name'] = filter($comm['name'], "nohtml"); $comm['subject'] = filter($comm['subject'], "nohtml"); $comm['comment'] = filter($comm['comment']); $news = $db->sql_fetchrow($db->sql_query("SELECT title, hometext, bodytext, topic FROM " . $prefix . "_stories WHERE sid=" . intval($comm['sid']))); $news['title'] = filter($news['title'], "nohtml"); $news['hometext'] = filter($news['hometext']); $news['bodytext'] = filter($news['bodytext']); $news['topic'] = intval($news['topic']); $topic = $db->sql_fetchrow($db->sql_query("SELECT topicimage FROM " . $prefix . "_topics WHERE topicid='" . $news['topic'] . "'")); $comm['pid'] = intval($comm['pid']); if ($comm['pid'] != 0) { $reply = $db->sql_fetchrow($db->sql_query("SELECT name, subject, comment FROM " . $prefix . "_comments WHERE tid=" . $comm['pid'])); $reply['name'] = filter($reply['name'], "nohtml"); $reply['subject'] = filter($reply['subject'], "nohtml"); $reply['comment'] = filter($reply['comment']); } else { $reply = ""; } echo "<center><b>" . _ORIGINALARTICLE . "</b></center><br>"; OpenTable2(); echo "<img src=\"images/topics/" . $topic['topicimage'] . "\" border=\"0\" align=\"right\">"; themepreview($news['title'], $news['hometext'], $news['bodytext']); CloseTable2(); if (!empty($reply)) { echo "<br><br><center><b>" . _INREPLYTO . "</b></center><br>"; OpenTable2(); echo "<b>" . $reply['subject'] . "</b><br>" . _BY . " " . $reply['name'] . "<br><br>" . $reply['comment'] . ""; CloseTable2(); } echo "<br><br><center><b>" . _COMMENTAPPPENDING . "</b></center><br>"; OpenTable2(); echo "<b>" . $comm['subject'] . "</b><br>" . _BY . " " . $comm['name'] . "<br><br>" . $comm['comment'] . "<br><br>"; echo "<center><hr size=\"1\" width=\"80%\"><a href=\"" . $admin_file . ".php?op=moderation_approval§ion=news&id={$id}\"><img src=\"images/karma/approve.gif\" alt=\"" . _APPROVE . "\" title=\"" . _APPROVE . "\" width=\"15\" heigh=\"15\" border=\"0\"></a> <a href=\"" . $admin_file . ".php?op=moderation_reject§ion=news&id={$id}\"><img src=\"images/karma/reject.gif\" alt=\"" . _REJECT . "\" title=\"" . _REJECT . "\" width=\"15\" heigh=\"15\" border=\"0\"></a></center>"; CloseTable2(); echo "<br>"; CloseTable(); include "footer.php"; }
function PreviewStory($name, $subject, $story, $bodytext, $topic, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur) { global $tipath, $NPDS_Prefix, $topictext, $topicimage; $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>'; include 'header.php'; $subject = stripslashes(str_replace('"', '"', strip_tags($subject))); $story = stripslashes($story); $bodytext = stripslashes($bodytext); echo ' <h2>' . translate("Submit News") . '</h2> <form class="" action="submit.php" method="post" name="adminForm"> <p class="lead"><strong>' . translate("Your Name") . '</strong> : ' . $name . '</p> <input type="hidden" name="name" value="' . $name . '" />'; echo '<div class="card card-block">'; if ($topic == '') { // $topicimage='all-topics.gif'; $warning = '<strong class="text-danger">' . translate("Select Topic") . '</strong>'; } else { $warning = ''; $result = sql_query("SELECT topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'"); list($topictext, $topicimage) = sql_fetch_row($result); } if ($topicimage !== '') { if (!($imgtmp = theme_image('topics/' . $topicimage))) { $imgtmp = $tipath . $topicimage; } $timage = $imgtmp; if (file_exists($imgtmp)) { $topiclogo = '<img class="img-fluid N_sujetsize" src="' . $timage . '" align="right" alt="" />'; } } $storyX = aff_code($story); $bodytextX = aff_code($bodytext); themepreview('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $storyX . '</div>', $bodytextX); // if ($no_img) { // echo '<strong>'.aff_langue($topictext).'</strong>'; // } echo ' </div> <div class="form-group row"> <label class="form-control-label col-sm-3" for="subject">' . translate("Title") . '</label> <div class="col-sm-9"> <input type="text" name="subject" class="form-control" value="' . $subject . '" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-3" for="topic">' . translate("Topic") . '</label> <div class="col-sm-9"> <select class="c-select form-control" name="topic">'; $toplist = sql_query("SELECT topicid, topictext FROM " . $NPDS_Prefix . "topics ORDER BY topictext"); echo ' <option value="">' . translate("Select Topic") . '</option>'; while (list($topicid, $topics) = sql_fetch_row($toplist)) { if ($topicid == $topic) { $sel = 'selected="selected" '; } echo ' <option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>'; $sel = ''; } echo ' </select> <span class="help-block text-danger">' . $warning . '</span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-12" for="story">' . translate("Intro Text") . '</label> <div class="col-sm-12"> <span class="help-block">' . translate("HTML is fine, but double check those URLs and HTML tags!") . '</span> <textarea class="tin form-control" rows="25" name="story">' . $story . '</textarea>'; echo aff_editeur('story', ''); echo '</div> </div> <div class="form-group row"> <label class="form-control-label col-sm-12">' . translate("Full Text") . '</label> <div class="col-sm-12"> <textarea class="tin form-control" rows="25" name="bodytext">' . $bodytext . '</textarea>'; echo aff_editeur('bodytext', ''); echo ' </div> </div>'; publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur); echo '' . Q_spambot() . ''; echo ' <div class="form-group"> <div class="col-sm-12"> <input class="btn btn-secondary" type="submit" name="op" value="' . translate("Preview") . '" /> </div> </div>'; echo ' <div class="form-group"> <div class="col-sm-12"> <input class="btn btn-primary" type="submit" name="op" value="Ok" /> </div> </div> </form>'; include 'footer.php'; }
function previewAdminStory($automated, $year, $day, $month, $hour, $min, $subject, $hometext, $bodytext, $topic, $catid, $ihome, $alanguage, $acomm, $pollTitle, $optionText, $assotop) { global $user, $bgcolor1, $bgcolor2, $prefix, $db, $alanguage, $multilingual; include 'header.php'; if ($topic < 1) { $topic = 1; } GraphicAdmin(); OpenTable(); echo "<center><font class=\"title\"><b>" . _ARTICLEADMIN . "</b></font></center>"; CloseTable(); echo "<br>"; $today = getdate(); $tday = $today[mday]; if ($tday < 10) { $tday = "0{$tday}"; } $tmonth = $today[month]; $tyear = $today[year]; $thour = $today[hours]; if ($thour < 10) { $thour = "0{$thour}"; } $tmin = $today[minutes]; if ($tmin < 10) { $tmin = "0{$tmin}"; } $tsec = $today[seconds]; if ($tsec < 10) { $tsec = "0{$tsec}"; } $date = "{$tmonth} {$tday}, {$tyear} @ {$thour}:{$tmin}:{$tsec}"; OpenTable(); echo "<center><font class=\"option\"><b>" . _PREVIEWSTORY . "</b></font></center><br><br>" . "<form action=\"admin.php\" method=\"post\">" . "<input type=\"hidden\" name=\"catid\" value=\"{$catid}\">"; $subject = stripslashes($subject); $subject = ereg_replace("\"", "''", $subject); $hometext = stripslashes($hometext); $bodytext = stripslashes($bodytext); $result = $db->sql_query("select topicimage from " . $prefix . "_topics where topicid='{$topic}'"); list($topicimage) = $db->sql_fetchrow($result); echo "<table border=\"0\" width=\"75%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"{$bgcolor2}\" align=\"center\"><tr><td>" . "<table border=\"0\" width=\"100%\" cellpadding=\"8\" cellspacing=\"1\" bgcolor=\"{$bgcolor1}\"><tr><td>" . "<img src=\"images/topics/{$topicimage}\" border=\"0\" align=\"right\" alt=\"\">"; themepreview($subject, $hometext, $bodytext); echo "</td></tr></table></td></tr></table>" . "<br><br><b>" . _TITLE . "</b><br>" . "<input type=\"text\" name=\"subject\" size=\"50\" value=\"{$subject}\"><br><br>" . "<b>" . _TOPIC . "</b><select name=\"topic\">"; $toplist = $db->sql_query("select topicid, topictext from " . $prefix . "_topics order by topictext"); echo "<option value=\"\">" . _ALLTOPICS . "</option>\n"; while (list($topicid, $topics) = $db->sql_fetchrow($toplist)) { $topicid = intval($topicid); if ($topicid == $topic) { $sel = "selected "; } echo "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n"; $sel = ""; } echo "</select><br><br>"; for ($i = 0; $i < sizeof($assotop); $i++) { $associated .= "{$assotop[$i]}-"; } $asso_t = explode("-", $associated); echo "<table border='0' width='100%' cellspacing='0'><tr><td width='20%'><b>" . _ASSOTOPIC . "</b></td><td width='100%'>" . "<table border='1' cellspacing='3' cellpadding='8'><tr>"; $sql = "SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { if ($a == 3) { echo "</tr><tr>"; $a = 0; } for ($i = 0; $i < sizeof($asso_t); $i++) { if ($asso_t[$i] == $row[topicid]) { $checked = "CHECKED"; break; } } echo "<td><input type='checkbox' name='assotop[]' value='{$row['topicid']}' {$checked}>{$row['topictext']}</td>"; $checked = ""; $a++; } echo "</tr></table></td></tr></table><br><br>"; $cat = $catid; SelectCategory($cat); echo "<br>"; puthome($ihome, $acomm); if ($multilingual == 1) { echo "<br><b>" . _LANGUAGE . ": </b>" . "<select name=\"alanguage\">"; $handle = opendir('language'); while ($file = readdir($handle)) { if (preg_match("/^lang\\-(.+)\\.php/", $file, $matches)) { $langFound = $matches[1]; $languageslist .= "{$langFound} "; } } closedir($handle); $languageslist = explode(" ", $languageslist); sort($languageslist); for ($i = 0; $i < sizeof($languageslist); $i++) { if ($languageslist[$i] != "") { echo "<option value=\"{$languageslist[$i]}\" "; if ($languageslist[$i] == $alanguage) { echo "selected"; } echo ">" . ucfirst($languageslist[$i]) . "</option>\n"; } } if ($alanguage == "") { $sellang = "selected"; } else { $sellang = ""; } echo "<option value=\"\" {$sellang}>" . _ALL . "</option></select>"; } else { echo "<input type=\"hidden\" name=\"alanguage\" value=\"{$language}\">"; } echo "<br><br><b>" . _STORYTEXT . "</b><br>" . "<textarea wrap=\"virtual\" cols=\"50\" rows=\"12\" name=\"hometext\">{$hometext}</textarea><br><br>" . "<b>" . _EXTENDEDTEXT . "</b><br>" . "<textarea wrap=\"virtual\" cols=\"50\" rows=\"12\" name=\"bodytext\">{$bodytext}</textarea><br><br>"; if ($automated == 1) { $sel1 = "checked"; $sel2 = ""; } else { $sel1 = ""; $sel2 = "checked"; } echo "<br><b>" . _PROGRAMSTORY . "</b> " . "<input type=\"radio\" name=\"automated\" value=\"1\" {$sel1}>" . _YES . " " . "<input type=\"radio\" name=\"automated\" value=\"0\" {$sel2}>" . _NO . "<br><br>" . "" . _NOWIS . ": {$date}<br><br>"; $xday = 1; echo "" . _DAY . ": <select name=\"day\">"; while ($xday <= 31) { if ($xday == $day) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"day\" {$sel}>{$xday}</option>"; $xday++; } echo "</select>"; $xmonth = 1; echo "" . _UMONTH . ": <select name=\"month\">"; while ($xmonth <= 12) { if ($xmonth == $month) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"month\" {$sel}>{$xmonth}</option>"; $xmonth++; } echo "</select>"; echo "" . _YEAR . ": <input type=\"text\" name=\"year\" value=\"{$year}\" size=\"5\" maxlength=\"4\">"; echo "<br>" . _HOUR . ": <select name=\"hour\">"; $xhour = 0; $cero = "0"; while ($xhour <= 23) { $dummy = $xhour; if ($xhour < 10) { $xhour = "{$cero}{$xhour}"; } if ($xhour == $hour) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"hour\" {$sel}>{$xhour}</option>"; $xhour = $dummy; $xhour++; } echo "</select>"; echo ": <select name=\"min\">"; $xmin = 0; while ($xmin <= 59) { if ($xmin == 0 or $xmin == 5) { $xmin = "0{$xmin}"; } if ($xmin == $min) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"min\" {$sel}>{$xmin}</option>"; $xmin = $xmin + 5; } echo "</select>"; echo ": 00<br><br>" . "<select name=\"op\">" . "<option value=\"PreviewAdminStory\" selected>" . _PREVIEWSTORY . "</option>" . "<option value=\"PostAdminStory\">" . _POSTSTORY . "</option>" . "</select>" . "<input type=\"submit\" value=\"" . _OK . "\">"; CloseTable(); echo "<br>"; putpoll($pollTitle, $optionText); echo "</form>"; include 'footer.php'; }
function previewAdminStory($automated, $year, $day, $month, $hour, $min, $subject, $hometext, $bodytext, $topic, $catid, $ihome, $alanguage, $acomm, $pollTitle, $optionText, $assotop) { global $user, $bgcolor1, $bgcolor2, $prefix, $db, $alanguage, $multilingual, $admin_file; include 'header.php'; if ($topic < 1) { $topic = 1; } GraphicAdmin(); OpenTable(); echo "<center><font class=\"title\"><b>" . _ARTICLEADMIN . "</b></font></center>"; CloseTable(); echo "<br>"; $today = getdate(); $tday = $today['mday']; if ($tday < 10) { $tday = "0{$tday}"; } $tmonth = $today['month']; $tyear = $today['year']; $thour = $today['hours']; if ($thour < 10) { $thour = "0{$thour}"; } $tmin = $today['minutes']; if ($tmin < 10) { $tmin = "0{$tmin}"; } $tsec = $today['seconds']; if ($tsec < 10) { $tsec = "0{$tsec}"; } $nowdate = "{$tmonth} {$tday}, {$tyear} @ {$thour}:{$tmin}:{$tsec}"; OpenTable(); echo "<center><font class=\"option\"><b>" . _PREVIEWSTORY . "</b></font></center><br>" . "<form action=\"" . $admin_file . ".php\" method=\"post\">" . "<input type=\"hidden\" name=\"catid\" value=\"{$catid}\">"; $subject = filter($subject, "nohtml", 0, preview); $hometext = filter($hometext); $bodytext = filter($bodytext); $result = $db->sql_query("select topicimage from " . $prefix . "_topics where topicid='{$topic}'"); list($topicimage) = $result->fetch_row(); echo "<table border=\"0\" width=\"75%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"{$bgcolor2}\" align=\"center\"><tr><td>" . "<table border=\"0\" width=\"100%\" cellpadding=\"8\" cellspacing=\"1\" bgcolor=\"{$bgcolor1}\"><tr><td>" . "<img src=\"images/topics/{$topicimage}\" border=\"0\" align=\"right\" alt=\"\">"; themepreview($subject, $hometext, $bodytext); echo "</td></tr></table></td></tr></table><br><br>" . "<table width=\"100%\" border=\"0\" cellspacing=\"6\">" . "<tr><td nowrap><b>" . _TITLE . ":</b></td><td>" . "<input type=\"text\" name=\"subject\" size=\"50\" value=\"{$subject}\"></td></tr>" . "<tr><td nowrap><b>" . _TOPIC . ":</b></td><td><select name=\"topic\">"; $toplist = $db->sql_query("select topicid, topictext from " . $prefix . "_topics order by topictext"); echo "<option value=\"\">" . _ALLTOPICS . "</option>\n"; while (list($topicid, $topics) = $toplist->fetch_row()) { $topicid = intval($topicid); $topics = filter($topics, "nohtml"); if ($topicid == $topic) { $sel = "selected "; } echo "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n"; $sel = ""; } echo "</select></td></tr>"; for ($i = 0; $i < sizeof($assotop); $i++) { $associated .= "{$assotop[$i]}-"; } $asso_t = explode("-", $associated); echo "<tr><td nowrap><b>" . _ASSOTOPIC . ":</b></td><td>"; $sql = "SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext"; $result = $db->sql_query($sql); echo "<select multiple name=\"assotop[]\" size=\"3\">"; while ($row = $db->sql_fetchrow($result)) { for ($i = 0; $i < sizeof($asso_t); $i++) { if ($asso_t[$i] == $row['topicid']) { $checked = "selected"; break; } } $row['topicid'] = intval($row['topicid']); $row['topictext'] = filter($row['topictext'], "nohtml"); echo "<option value='" . $row['topicid'] . "' {$checked}>" . $row['topictext'] . "</option>"; $checked = ""; } echo "</select></td></tr>"; $cat = $catid; $selcat = $db->sql_query("select catid, title from " . $prefix . "_stories_cat order by title"); $a = 1; echo "<tr><td nowrap><b>" . _CATEGORY . ":</b></td><td>"; echo "<select name=\"catid\">"; if ($cat == 0) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"catid\" value=\"0\" {$sel}>" . _ARTICLES . "</option>"; while (list($catid, $title) = $selcat->fetch_row()) { $catid = intval($catid); $title = filter($title, "nohtml"); if ($catid == $cat) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"catid\" value=\"{$catid}\" {$sel}>{$title}</option>"; $a++; } echo "</select> <a href=\"" . $admin_file . ".php?op=AddCategory\"><img src=\"images/add.gif\" alt=\"" . _ADD . "\" title=\"" . _ADD . "\" border=\"0\" width=\"17\" height=\"17\"></a> <a href=\"" . $admin_file . ".php?op=EditCategory\"><img src=\"images/edit.gif\" alt=\"" . _EDIT . "\" title=\"" . _EDIT . "\" border=\"0\" width=\"17\" height=\"17\"></a> <a href=\"" . $admin_file . ".php?op=DelCategory\"><img src=\"images/delete.gif\" alt=\"" . _DELETE . "\" title=\"" . _DELETE . "\" border=\"0\" width=\"17\" height=\"17\"></a>" . "</td></tr>" . "<tr><td nowrap><b>" . _PUBLISHINHOME . "</b></td><td>"; if ($ihome == 0 or empty($ihome)) { $sel1 = "checked"; $sel2 = ""; } if ($ihome == 1) { $sel1 = ""; $sel2 = "checked"; } echo "<input type=\"radio\" name=\"ihome\" value=\"0\" {$sel1}>" . _YES . " " . "<input type=\"radio\" name=\"ihome\" value=\"1\" {$sel2}>" . _NO . "" . " <font class=\"content\">[ " . _ONLYIFCATSELECTED . " ]</font></td></tr>" . "<tr><td nowrap><b>" . _ACTIVATECOMMENTS . "</b></td><td>"; if ($acomm == 0 or empty($acomm)) { $sel1 = "checked"; $sel2 = ""; } if ($acomm == 1) { $sel1 = ""; $sel2 = "checked"; } echo "<input type=\"radio\" name=\"acomm\" value=\"0\" {$sel1}>" . _YES . " " . "<input type=\"radio\" name=\"acomm\" value=\"1\" {$sel2}>" . _NO . "</font></td></tr>"; if ($multilingual == 1) { echo "<tr><td nowrap><b>" . _LANGUAGE . ": </b>" . "<select name=\"alanguage\">"; $handle = opendir('language'); while ($file = readdir($handle)) { if (preg_match("/^lang\\-(.+)\\.php/", $file, $matches)) { $langFound = $matches[1]; $languageslist .= "{$langFound} "; } } closedir($handle); $languageslist = explode(" ", $languageslist); sort($languageslist); for ($i = 0; $i < sizeof($languageslist); $i++) { if (!empty($languageslist[$i])) { echo "<option value=\"{$languageslist[$i]}\" "; if ($languageslist[$i] == $alanguage) { echo "selected"; } echo ">" . ucfirst($languageslist[$i]) . "</option>\n"; } } if (empty($alanguage)) { $sellang = "selected"; } else { $sellang = ""; } echo "<option value=\"\" {$sellang}>" . _ALL . "</option></select></td></tr>"; } else { echo "<input type=\"hidden\" name=\"alanguage\" value=\"{$language}\"></td></tr>"; } echo "<tr><td nowrap><b>" . _STORYTEXT . ":</b></td><td>" . "<textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"hometext\">{$hometext}</textarea></td></tr>" . "<tr><td nowrap><b>" . _EXTENDEDTEXT . ":</b></td><td>" . "<textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"bodytext\">{$bodytext}</textarea></td></tr>"; if ($automated == 1) { $sel1 = "checked"; $sel2 = ""; } else { $sel1 = ""; $sel2 = "checked"; } echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>" . "<tr><td nowrap><b>" . _SCHEDULENEWS . ":</b></td><td>" . "<input type=\"radio\" name=\"automated\" value=\"1\" {$sel1}>" . _YES . " " . "<input type=\"radio\" name=\"automated\" value=\"0\" {$sel2}>" . _NO . "</td></tr>"; $xday = 1; echo "<tr><td nowrap><b>" . _PUBLISHON . ":</b></td><td>" . "" . _DAY . ": <select name=\"day\">"; while ($xday <= 31) { if ($xday == $day) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"day\" {$sel}>{$xday}</option>"; $xday++; } echo "</select>"; $xmonth = 1; echo " " . _UMONTH . ": <select name=\"month\">"; while ($xmonth <= 12) { if ($xmonth == $month) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"month\" {$sel}>{$xmonth}</option>"; $xmonth++; } echo "</select>"; echo " " . _YEAR . ": <input type=\"text\" name=\"year\" value=\"{$year}\" size=\"5\" maxlength=\"4\">"; echo " <b>@</b>" . _HOUR . ": <select name=\"hour\">"; $xhour = 0; $cero = "0"; while ($xhour <= 23) { $dummy = $xhour; if ($xhour < 10) { $xhour = "{$cero}{$xhour}"; } if ($xhour == $hour) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"hour\" {$sel}>{$xhour}</option>"; $xhour = $dummy; $xhour++; } echo "</select>"; echo " : <select name=\"min\">"; $xmin = 0; while ($xmin <= 59) { if ($xmin == 0 or $xmin == 5) { $xmin = "0{$xmin}"; } if ($xmin == $min) { $sel = "selected"; } else { $sel = ""; } echo "<option name=\"min\" {$sel}>{$xmin}</option>"; $xmin = $xmin + 5; } echo "</select>"; echo " : 00</td></tr>" . "<tr><td> </td><td>" . _NOWIS . ": {$nowdate}</td></tr>" . "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>" . "<tr><td> </td><td><select name=\"op\">" . "<option value=\"PreviewAdminStory\" selected>" . _PREVIEWSTORY . "</option>" . "<option value=\"PostAdminStory\">" . _POSTSTORY . "</option>" . "</select>" . " <input type=\"submit\" value=\"" . _OK . "\"></td></tr></table>"; CloseTable(); echo "<br>"; putpoll($pollTitle, $optionText); echo "</form>"; include 'footer.php'; }