예제 #1
0
         $article->writeDataDB();
         header("Location: index.php?s=" . $article->section . "\n");
     } elseif (!$article->ready) {
         $article->readDataDB();
     }
     $myMain .= $article->editForm();
     break;
 case 'textbox':
     if (!is_numeric($miscId)) {
         $textbox = new TextBox();
         $textbox->section = $catSecNum;
     } else {
         $textbox = new TextBox($miscId);
     }
     if ($MODULES['argv']['do_delete'] == 1) {
         $textbox->deleteFromDB();
         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) {