public function info($get)
 {
     $ctrl = new SampleProduceOrderController();
     $r = Result::convert($ctrl->info($get));
     $view = new ViewBase($r);
     return $view->render('sampleproduceorder/info.php');
 }
Example #2
0
    public static function checkAuth($controller, $action)
    {
        if (!$controller || !$action) {
            return;
        }
        $result = self::isAuthAction($controller, $action);
        if (!$result) {
            if (!self::instance()->isLogin()) {
                $url = Router::getUrl('index/login');
                $html = <<<EOT
<!doctype html>
<html lang="en">
<head>
\t<meta charset="UTF-8">
\t<title>Document</title>
\t<script>top.location.href="{$url}";</script>
</head>
<body>
\t正在登录系统...
</body>
</html>
EOT;
                die($html);
            } else {
                //暂时不返回
                $viewer = new ViewBase();
                echo $viewer->render('index/deny.php', true);
                die;
            }
        }
    }
Example #3
0
 public function info($get)
 {
     $id = $get['id'];
     $sample = Sample::findOneByPk($id);
     $mould_list = SampleMould::find('sample_id=?', $id)->all();
     $package_type_list = SamplePackage::find('sample_id=?', $id)->all();
     $sample_image_list = SampleImage::find('sample_id=?', $id)->all();
     $tpl = $sample->sample_type == GlobalConf::SAMPLE_TYPE_SINGLE ? 'sample/single_info.php' : 'sample/suite_info.php';
     $v = new ViewBase(array('mould_list' => $mould_list, 'package_type_list' => $package_type_list, 'sample_image_list' => $sample_image_list, 'sample' => $sample));
     return $v->render($tpl, true);
 }