예제 #1
0
 function Page_DrawContentCreate()
 {
     $this->CPrintLn(stencil_dd_formo('title=Создать новый контест'));
     $this->InsertTemplate('contest.create');
     $this->CPrintLn(stencil_dd_formc());
 }
예제 #2
0
 function PAGE_ProblemsManager_ProblemsHandler()
 {
     global $action, $redirect, $id, $pageid;
     redirector_add_skipvar('action', 'rejudge');
     if (!$this->GetAllowed('PROBLEMS.MANAGE')) {
         return;
     }
     $create = $this->GetAllowed('PROBLEMS.CREATE');
     $delete = $this->GetAllowed('PROBLEMS.DELETE');
     $edit = $this->GetAllowed('PROBLEMS.EDIT');
     $rejudge = $this->GetAllowed('PROBLEMS.REJUDGE');
     if ($edit) {
         $tried = false;
         if ($action == 'save') {
             if (!$this->problemsContainer->UpdateReceived()) {
                 $action = 'edit';
                 $tried = true;
             } else {
                 if ($redirect != '') {
                     redirect($redirect);
                 }
                 return;
             }
         } else {
             if ($action == 'edit') {
                 $this->gateway->AppendNavigation('Редактирование задачи', '.?page=prbmanager&action=edit&id=' . $id);
                 $this->CPrintLn(stencil_formo('title=Редактирование задачи;'));
                 $this->PAGE_DrawEditProblemForm($id, $redirect, $tried);
                 $this->CPrintLn(stencil_formc());
                 return;
             }
         }
     }
     if ($create) {
         if ($action == 'showcreate') {
             $this->gateway->AppendNavigation('Создание задачи', '.?page=prbmanager&action=showcreate');
             $this->CPrintLn(stencil_formo('title=Создать новую задачу;'));
             $this->PAGE_DrawCreateProblemForm($redirect);
             $this->CPrintLn(stencil_formc());
             return;
         } else {
             if ($action == 'create') {
                 $this->problemsContainer->CreateReceived();
                 if ($redirect != '') {
                     redirect($redirect);
                 }
             }
         }
     }
     if ($rejudge) {
         if ($action == 'rejudge') {
             $this->Problem_Rejudge($id);
         }
     }
     if ($action == 'delete' && $delete) {
         $this->problemsContainer->Delete($id);
     }
     if ($action == 'view') {
         $this->CPrintLn('<table width="100%"><tr valign="top">' . '<td width="40%" style="padding-right: 2px;">');
     }
     $this->CPrintLn(stencil_formo('title=Список существующих задач;'));
     $this->Problem_DrawProblems();
     $this->CPrintLn(stencil_formc());
     if ($action == 'view') {
         $this->gateway->AppendNavigation('Просмотр задачи', '');
         $this->CPrintLn('</td><td style="padding-left: 2px;">');
         $this->Problem_DrawDescription($id, $redirect);
         $this->CPrintLn('</td></tr></table>');
     }
     if ($create) {
         $this->CPrintLn('<script language="JavaScript" type="text/javascript">' . 'var descInited=false; function InitDesc () { ' . 'if (descInited) return; ' . 'iframeEditor_Init (\'desc\'); ' . 'descInited=true; };</script>');
         $this->CPrintLn(stencil_dd_formo('title=Создать новую задачу;onexpand=InitDesc ();'));
         $this->PAGE_DrawCreateProblemForm();
         $this->CPrintLn(stencil_dd_formc());
     }
 }
예제 #3
0
파일: dd_form.php 프로젝트: Nazg-Gul/gate
 function dd_formo($settings = '')
 {
     println(stencil_dd_formo($settings));
 }