當前位置: 首頁>>代碼示例>>PHP>>正文


PHP js::closeWindow方法代碼示例

本文整理匯總了PHP中js::closeWindow方法的典型用法代碼示例。如果您正苦於以下問題:PHP js::closeWindow方法的具體用法?PHP js::closeWindow怎麽用?PHP js::closeWindow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在js的用法示例。


在下文中一共展示了js::closeWindow方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: runCase

 /**
  * Run case.
  * 
  * @param  int    $runID 
  * @param  String $extras   others params, forexample, caseID=10, version=3
  * @access public
  * @return void
  */
 public function runCase($runID, $caseID = 0, $version = 0)
 {
     if (!empty($_POST)) {
         $this->testtask->createResult($runID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         echo js::reload('parent');
         die(js::closeWindow());
     }
     if (!$caseID) {
         $run = $this->testtask->getRunById($runID);
     }
     if ($caseID) {
         $run->case = $this->loadModel('testcase')->getById($caseID, $version);
     }
     $this->view->run = $run;
     die($this->display());
 }
開發者ID:huokedu,項目名稱:zentao,代碼行數:27,代碼來源:control.php

示例2: runCase

 /**
  * Run case.
  * 
  * @param  int    $runID 
  * @param  String $extras   others params, forexample, caseID=10, version=3
  * @access public
  * @return void
  */
 public function runCase($runID, $caseID = 0, $version = 0)
 {
     if ($caseID) {
         $run = new stdclass();
         $run->case = $this->loadModel('testcase')->getById($caseID, $version);
     } else {
         $run = $this->testtask->getRunById($runID);
     }
     $caseID = $caseID ? $caseID : $run->case->id;
     $preAndNext = $this->loadModel('common')->getPreAndNextObject('testcase', $caseID);
     if (!empty($_POST)) {
         $this->testtask->createResult($runID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if ($preAndNext->next) {
             $nextRunID = $runID ? $preAndNext->next->id : 0;
             $nextCaseID = $runID ? $preAndNext->next->case : $preAndNext->next->id;
             $nextVersion = $preAndNext->next->version;
             die(js::locate(inlink('runCase', "runID={$nextRunID}&caseID={$nextCaseID}&version={$nextVersion}")));
         } else {
             echo js::reload('parent');
             die(js::closeWindow());
         }
     }
     $preCase = '';
     $nextCase = '';
     if ($preAndNext->pre) {
         $preCase['runID'] = $runID ? $preAndNext->pre->id : 0;
         $preCase['caseID'] = $runID ? $preAndNext->pre->case : $preAndNext->pre->id;
         $preCase['version'] = $preAndNext->pre->version;
     }
     if ($preAndNext->next) {
         $nextCase['runID'] = $runID ? $preAndNext->next->id : 0;
         $nextCase['caseID'] = $runID ? $preAndNext->next->case : $preAndNext->next->id;
         $nextCase['version'] = $preAndNext->next->version;
     }
     $this->view->run = $run;
     $this->view->preCase = $preCase;
     $this->view->nextCase = $nextCase;
     $this->view->results = $this->testtask->getResults(0, $caseID);
     $this->view->users = $this->loadModel('user')->getPairs('noclosed, noletter');
     die($this->display());
 }
開發者ID:laiello,項目名稱:zentaoms,代碼行數:52,代碼來源:control.php


注:本文中的js::closeWindow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。