public function actionNewPreview() { $flowId = intval(EnvUtil::getRequest("flowid")); $flow = new ICFlowType($flowId); $printmodel = $flow->form->printmodelshort; $hidden = $read = array(); $viewer = new ICFlowFormViewer(array("form" => $flow->form)); $viewer->handleForm($printmodel, $hidden, $read, true); $data = array("formname" => $flow->form->formname, "flowID" => $flowId, "type" => $flow->type, "printmodel" => $printmodel, "script" => $flow->form->script, "css" => $flow->form->css); $this->render("newPreview", $data); }
public function actionPreview() { $formId = intval(EnvUtil::getRequest("formid")); $ver = intval(EnvUtil::getRequest("verid")); if (!$ver) { $arr = FlowFormType::model()->fetchByPk($formId); } else { $arr = FlowFormVersion::model()->fetchByPk($ver); } if ($arr) { $form = new ICFlowForm($arr["formid"]); $printmodel = $form->printmodelshort; $hidden = $read = array(); $viewer = new ICFlowFormViewer(array("form" => $form)); $viewer->handleForm($printmodel, $hidden, $read, true); $data = array("formname" => $form->formname, "printmodel" => $printmodel, "script" => $form->script, "css" => $form->css); $this->layout = false; $this->render("preview", $data); } }