public function view_updateScanSampleCoefficient() { if (!isset($_SESSION['userId'])) { //检测用户是否登陆 header('location:index.php?mod=login&act=index'); exit; } $sampleCoefficientAct = new SampleCoefficientAct(); $id = isset($_GET['id']) ? post_check($_GET['id']) : ''; if (empty($id)) { //id为空时,跳转到列表页面,输出错误信息 $status = '找不到要修改记录的id'; header("location:index.php?mod=sampleCoefficient&act=getSampleCoefficientList&status={$status}"); exit; } $where = "WHERE id={$id} "; $sampleCoefficientList = $sampleCoefficientAct->act_getSampleCoefficientList('*', $where); if (empty($sampleCoefficientList)) { $status = '找不到要修改记录的id'; header("location:index.php?mod=sampleCoefficient&act=getSampleCoefficientList&status={$status}"); exit; } else { $value = $sampleCoefficientList[0]; } //设置修改页面上指定字段的值 $navarr = $navarr = array("<a href='index.php?mod=sampleStandard&act=skuTypeQcList'>IQC检测标准</a>", ">>", "<a href='index.php?mod=sampleCoefficient&act=getSampleCoefficientList'>系数列表</a>", ">>", "修改系数"); $this->smarty->assign('navarr', $navarr); $this->smarty->assign('module', '修改系数'); $this->smarty->assign('username', $_SESSION['userName']); $this->smarty->assign("id", $value['id']); $this->smarty->assign("cName", $value['cName']); $this->smarty->assign("sampleTypeId", $value['sampleTypeId']); $this->smarty->assign("sizeCodeId", $value['sizeCodeId']); $this->smarty->assign("sampleTypeName", SampleCoefficientModel::getSampleTypeNameById($value['sampleTypeId'])); $this->smarty->assign("sizeCodeNum", SampleCoefficientModel::getSizeCodeNumById($value['sizeCodeId'])); $this->smarty->assign("Ac", $value['Ac']); $this->smarty->assign("Re", $value['Re']); $this->smarty->assign("Al", $value['Al']); $this->smarty->assign("Rt", $value['Rt']); $this->smarty->assign("is_open", $value['is_open']); $this->smarty->display("updateSampleCoefficient.html"); }