$message = "Error : 服务器临时文件丢失或写临时文件出错!"; break; } echo "<script>{window.alert('{$message}');self.location.href='/lib/execute/dcnCloudExecution.php';} </script>"; return 0; } elseif (preg_match("/^.*?\\.img/i", $_FILES['img_file']['name'], $temp) == 0) { echo "<script>{window.alert('您上传的不是img文件,请确认!');self.location.href='/lib/execute/dcnCloudExecution.php';} </script>"; return 0; } else { $total_module = 0; $topo_type = $_POST['topotype']; switch ($topo_type) { case 'affirm2': if (isset($_POST['affirm2'])) { $total_module++; $total_case['total'] += $total_case['affirm2'] = $platform_mgr->getJobTotalCase($args->tplan_id, $args->device_id, '确认测试2.0', 'all'); } break; case 'affirm3': if (isset($_POST['affirm3'])) { $total_module++; $total_case['total'] += $total_case['affirm3'] = $platform_mgr->getJobTotalCase($args->tplan_id, $args->device_id, '确认测试3.0', 'all'); } break; case 'college': if (isset($_POST['college'])) { $total_module++; $total_case['total'] += $total_case['college'] = $platform_mgr->getJobTotalCase($args->tplan_id, $args->device_id, 'college', 'all'); } break; case 'oversea':
require_once "common.php"; testlinkInitPage($db, false, false, "checkRights"); $templateCfg = templateConfiguration(); $args = init_args(); $platform_mgr = new tlPlatform($db, $args->testproject_id); $gui = new stdClass(); $envno = $_POST['affirmWirelessEnvSel']; if ($envno != 4) { $job_type = $suite = 'waffirm'; } if ($envno == 4) { $job_type = $suite = 'waffirm_X86'; } $continuerun = $_POST['WirelesscontinueRun']; $job_is_running = $platform_mgr->getJobExist($args->productline_id, $args->tplan_id, $args->device_id, $args->build_id, $job_type); $total_case = $platform_mgr->getJobTotalCase($args->tplan_id, $args->device_id, $args->build_id, $suite, 'all', $continuerun, 0); if ($job_is_running) { echo "<script> {window.alert('该环境上已经有任务在在执行中,请检查');location.href='/lib/dcnJobs/jobsView.php'} </script>"; } if ($total_case == 0) { echo "<script> {window.alert('该版本上没有制定覆盖策略(测试例为0),请检查');location.href='/lib/dcnJobs/jobsView.php'} </script>"; } else { //生成一个jobid:user+时间戳 $jobid = (string) $args->user_name . (string) time(); $client_ip = getIP(); $s1ip = $_POST['waffirms1ip']; $s2ip = $_POST['waffirms2ip']; $s1p1 = $_POST['waffirms1p1']; $s2p1 = $_POST['waffirms2p1']; $s3ip = $_POST['waffirms3ip']; $s3p1 = $_POST['waffirms3p1'];