コード例 #1
0
ファイル: action_import.php プロジェクト: MenZil-Team/anwiki
 function run()
 {
     // load CSS
     $this->head($this->getCssSrcComponent(self::CSS_FILENAME));
     $this->setTitle($this->t_("title"));
     if (AnwEnv::_POST(self::IN_FILENAME) && AnwEnv::_POST(self::IN_PAGENAMES)) {
         //4) do import
         $bContinueOnErrors = AnwEnv::_POST(self::IN_CONTINUE_ON_ERRORS) == 'true' ? true : false;
         $this->doImport(AnwEnv::_POST(self::IN_FILENAME), AnwEnv::_POST(self::IN_PAGENAMES), $bContinueOnErrors);
     } else {
         if (AnwEnv::_GET(self::IN_FILENAME)) {
             //3) form: select pages to import
             $this->importSelectionForm(AnwEnv::_GET(self::IN_FILENAME), AnwEnv::_GET(self::IN_PREFIX, ""));
         } else {
             if (AnwEnv::_FILES(self::IN_UPLOAD)) {
                 //2) do upload of an export file
                 $this->doUpload(AnwEnv::_FILES(self::IN_UPLOAD), AnwEnv::_POST(self::IN_PREFIX, ""));
             } else {
                 //1) form: upload an export file
                 $this->uploadForm();
             }
         }
     }
 }