示例#1
0
         $topicTitleField = "<em>{$l_topic}:</em><br /><br />{$topicTitle}<br /><br />";
     } elseif ($topicTitle != '') {
         $topicTitleField = "{$l_topic}:<br /><input type=\"text\" name=\"topicTitle\" class=\"textForm topicTitle\" value=\"{$topicTitle}\" /><br /><br />";
         unset($_POST['topicTitle']);
     } else {
         $topicTitleField = '';
     }
 } else {
     $topicTitleField = '';
 }
 /* message text */
 if (isset($_POST['postText']) and isset($displayFormElements['postText'])) {
     if (!function_exists('deCodeBB')) {
         require_once $pathToFiles . 'bb_codes.php';
     }
     $postText = deCodeBB(trim($_POST['postText']));
     if (isset($fieldsReadOnly)) {
         $postTextField = "<em>{$l_message}:</em><br /><br />" . str_replace("\n", '<br />', $postText) . "<br /><br />";
     } elseif ($postText != '') {
         $postTextField = "{$l_message}:<br /><textarea name=\"postText\" cols=\"38\" rows=\"10\" class=\"textForm postingForm\">{$postText}</textarea><br /><br />";
         unset($_POST['postText']);
     } else {
         $postTextField = '';
     }
 } else {
     $postTextField = '';
 }
 foreach ($_POST as $key => $val) {
     if (!is_array($val)) {
         if (substr_count($val, '"') > 0 or substr_count($val, '<') > 0 or substr_count($val, '>') > 0 or substr_count($val, '&') > 0) {
             $hiddenFields .= "<textarea name=\"{$key}\" style=\"display:none\" cols=\"0\" rows=\"0\">" . htmlspecialchars($val, ENT_QUOTES) . "</textarea>\n";
示例#2
0
             $topicsLink = "<a href=\"" . addGenURLPage("{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}", PAGE1_OFFSET + 1) . "\">{$l_returntotopics}</a><br />";
         }
         $correctErr = "<a href=\"{$furl}\">{$l_back}</a>";
     }
     if (isset($editMsgReloc)) {
         header("Refresh: 0; url={$furlCl}");
         exit;
     } else {
         echo load_header();
         echo ParseTpl(makeUp('main_warning'));
         return;
     }
 } else {
     //default edit
     require $pathToFiles . 'bb_codes.php';
     $postText = deCodeBB($row[0]);
     $topicTitle = $row[1];
     $l_messageABC = $l_editPost;
     if ($first) {
         $mainPostForm = ParseTpl(makeUp('tools_edit_topic_title'));
     } else {
         $mainPostForm = '';
     }
     if ($user_id == 1 or $isMod == 1) {
         if ($whoEdited == 2 or $whoEdited == 3) {
             $ch = 'checked';
         } else {
             $ch = '';
         }
         if (isset($l_editLock)) {
             $ledt = $l_editLock;