예제 #1
0
 function doedit($wf)
 {
     $thisclass_string = wra_adminmenu::getbaseclass();
     if ($thisclass_string != '') {
         eval('$thisclass=new ' . $thisclass_string . '($wf);');
         if (!true) {
             WRA::gotopage('admin');
             return;
         }
         if (wra_adminpage::isedit()) {
             $backurl = wra_adminmenu::getassoc(WRA::getcurpage());
             if (!WRA::ir('id')) {
                 WRA::gotopage($backurl);
                 WRA::nicedie();
             }
             if (!WRA::ir('type')) {
                 $code = '$isexist=' . $thisclass_string . '::isexist($wf,' . WRA::r('id') . ');';
             } else {
                 $pid_class = wra_adminmenu::getclass(wra_adminmenu::getassoc(WRA::r('mod')) . '_' . WRA::r('type'));
                 //   echo $pid_class;
                 $code = '$isexist=' . $pid_class . '::isexist($wf,' . WRA::r('id') . ');';
             }
             eval($code);
             if (!$isexist && WRA::r('id') != -1) {
                 WRA::gotopage($backurl);
                 WRA::nicedie();
             }
         } else {
             $backurl = WRA::getcurpage();
             if (WRA::ir('pid')) {
                 if (!WRA::ir('type')) {
                     $code = '$isexist=' . $thisclass_string . '::isexist($wf,' . WRA::r('pid') . ');';
                 } else {
                     $pid_class = wra_adminmenu::getclass(WRA::r('mod') . '_' . WRA::r('type'));
                     // echo $pid_class;
                     $code = '$isexist=' . $pid_class . '::isexist($wf,' . WRA::r('pid') . ');';
                 }
                 eval($code);
                 if (!$isexist) {
                     WRA::gotopage($backurl);
                     WRA::nicedie();
                 }
             }
         }
         $this->deletebyId($wf, $thisclass, $thisclass_string);
     }
 }