Beispiel #1
0
 private function onSolveB($flagid, $password)
 {
     if (false === ($flag = WC_Warflag::getByID($flagid))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     if ($this->box->getID() !== $flag->getVar('wf_wbid')) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->onAnswer($flag, $password);
 }
Beispiel #2
0
 public function execute()
 {
     $this->module->includeClass('WC_Warbox');
     $this->module->includeClass('WC_Warflag');
     $this->module->includeClass('WC_Warflags');
     $this->module->includeClass('sites/warbox/WCSite_WARBOX');
     if (false === ($this->flag = WC_Warflag::getByID(Common::getGetString('flag')))) {
         return $this->module->error('err_warflag');
     }
     return $this->templateSolvers();
 }
Beispiel #3
0
 private function onDown()
 {
     if (false === ($flag = WC_Warflag::getByID(Common::getGetString('down')))) {
         return $this->module->error('err_warflag');
     }
     if ($flag->getVar('wf_wbid') !== $this->warbox->getID()) {
         return GWF_HTML::err('ERR_NO_PERMISSION');
     }
     if (false === ($lower = $flag->getNext())) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $upid = $flag->getVar('wf_order');
     $doid = $lower->getVar('wf_order');
     $flag->saveVar('wf_order', $doid);
     $lower->saveVar('wf_order', $upid);
     return '';
 }