Пример #1
0
         header("Location: index.php?s=" . $textbox->section . "\n");
         break;
     }
     if (!empty($MODULES['argv']['do_save'])) {
         if (!$MODULES['argv']['T_PRIORITY']) {
             $MODULES['argv']['T_PRIORITY'] = DEFAULT_PRIORITY;
         }
         $textbox->header = $MODULES['argv']['T_HEADER'];
         $textbox->text = $MODULES['argv']['T_TEXT'];
         $textbox->section = $MODULES['argv']['T_SECTION'];
         $textbox->type = $MODULES['argv']['T_TYPE'];
         $textbox->priority = $MODULES['argv']['T_PRIORITY'];
         $textbox->writeDataDB();
         header("Location: index.php?s=" . $textbox->section . "\n");
     } elseif (!$textbox->ready) {
         $textbox->readDataDB();
     }
     $myMain .= $textbox->editForm();
     break;
 case 'xoftheday':
     if (!empty($MODULES['argv']['do_save']) and is_numeric($catSecNum)) {
         $SQL->query("delete from " . DB_XOTD_SECTIONS_TABLE . " where " . DB_XOTD_SECTIONS_SECTION_ID . "={$catSecNum}");
         $ls = '';
         $cnt = 0;
         while (list($k, $v) = each($MODULES['argv']['XS'])) {
             $ls .= ($cnt++ ? ',' : '') . "({$catSecNum},{$v},'" . $MODULES['argv']['XP'][$k] . "')";
         }
         $SQL->query("insert into " . DB_XOTD_SECTIONS_TABLE . " values {$ls}");
         header("Location: index.php?s={$catSecNum}");
     }
     if (is_numeric($catSecNum)) {