$nohtml = 1; } $html = empty($nohtml) ? 1 : 0; if (isset($nosmiley) && intval($nosmiley) > 0) { $nosmiley = 1; $smiley = 0; } else { $nosmiley = 0; $smiley = 1; } $p_message = $myts->makeTareaData4Preview($message, $html, $smiley, 1); $subject = $myts->makeTboxData4PreviewInForm($subject); $message = $myts->makeTareaData4PreviewInForm($message); $noname = isset($noname) ? intval($noname) : 0; $notifypub = isset($notifypub) ? intval($notifypub) : 0; $p_message = $xt->topic_imgurl() != '' ? '<img src="images/topics/' . $xt->topic_imgurl() . '" align="right" alt="" />' . $p_message : $p_message; themecenterposts($p_subject, $p_message); include 'include/storyform.inc.php'; include XOOPS_ROOT_PATH . '/footer.php'; break; case "post": $nohtml_db = 1; if ($xoopsUser) { $uid = $xoopsUser->getVar('uid'); if ($xoopsUser->isAdmin($xoopsModule->mid())) { $nohtml_db = empty($nohtml) ? 0 : 1; } } else { if ($xoopsModuleConfig['anonpost'] == 1) { $uid = 0; } else {
function modTopic() { global $xoopsDB, $xoopsConfig; global $xoopsModule; $xt = new XoopsTopic($xoopsDB->prefix("topics"), $_POST['topic_id']); $topics_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/news/images/topics/"); xoops_cp_header(); echo "<h4>" . _AM_CONFIG . "</h4>"; // $xoopsModule->printAdminMenu(); // echo "<br />"; echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">"; echo "<h4>" . _AM_MODIFYTOPIC . "</h4><br />"; if ($xt->topic_imgurl()) { echo "<div style='text-align: right;'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/topics/" . $xt->topic_imgurl() . "'></div>"; } echo "<form action='index.php' method='post'>"; echo "<b>" . _AM_TOPICNAME . "</b> " . _AM_MAX40CHAR . "<br /><input type='text' name='topic_title' size='20' maxlength='40' value='" . $xt->topic_title('E') . "' /><br />"; echo "<b>" . _AM_TOPICIMG . "</b> (" . sprintf(_AM_IMGNAEXLOC, "modules/" . $xoopsModule->dirname() . "/images/topics/") . ")<br />" . _AM_FEXAMPLE . "<br />"; // echo "<input type='text' name='topic_imgurl' size='20' maxlength='20' value='".$xt->topic_imgurl()."' /><br />\n"; echo "<select size='1' name='topic_imgurl'>"; echo "<option value=' '>------</option>"; foreach ($topics_array as $image) { if ($image == $xt->topic_imgurl()) { $opt_selected = "selected='selected'"; } else { $opt_selected = ""; } echo "<option value='" . $image . "' {$opt_selected}>" . $image . "</option>"; } echo "</select><br />"; echo "<b>" . _AM_PARENTTOPIC . "<b><br />\n"; $xt->makeTopicSelBox(1, $xt->topic_pid(), "topic_pid"); echo "\n<br /><br />"; echo "<input type='hidden' name='topic_id' value='" . $xt->topic_id() . "' />\n"; echo "<input type='hidden' name='op' value='modTopicS' />"; echo "<input type='submit' value='" . _AM_SAVECHANGE . "' /> <input type='button' value='" . _AM_DEL . "' onclick='location=\"index.php?topic_pid=" . $xt->topic_pid() . "&topic_id=" . $xt->topic_id() . "&op=delTopic\"' />\n"; echo " <input type='button' value='" . _AM_CANCEL . "' onclick='javascript:history.go(-1)' />\n"; echo "</form>"; echo "</td></tr></table>"; }