当前位置: 首页>>代码示例>>PHP>>正文


PHP pathos_flow_set函数代码示例

本文整理汇总了PHP中pathos_flow_set函数的典型用法代码示例。如果您正苦于以下问题:PHP pathos_flow_set函数的具体用法?PHP pathos_flow_set怎么用?PHP pathos_flow_set使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pathos_flow_set函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 function show($view, $loc = null)
 {
     global $db;
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     pathos_forms_initialize();
     if (defined("PREVIEW_READONLY") && !defined("SELECTOR")) {
         echo "";
     } else {
         $f = null;
         $f = $db->selectObject("formbuilder_form", "location_data='" . serialize($loc) . "'");
         if (!$f) {
             //Create a form if it's missing...
             $f->name = "New Form";
             $f->description = "";
             $f->location_data = serialize($loc);
             $f->table_name = "";
             $f->is_email = 0;
             $f->is_saved = 0;
             $f->submitbtn = "Submit";
             $f->resetbtn = "Reset";
             $f->response = "Your form has been submitted.";
             $f->subject = "Submitted form from site.";
             $frmid = $db->insertObject($f, "formbuilder_form");
             //Create Default Report;
             $rpt->name = "Default Report";
             $rpt->description = "";
             $rpt->location_data = $f->location_data;
             $rpt->text = "";
             $rpt->column_names = "";
             $rpt->form_id = $frmid;
             $db->insertObject($rpt, "formbuilder_report");
             $f->id = $frmid;
         }
         global $SYS_FLOW_REDIRECTIONPATH;
         pathos_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
         $SYS_FLOW_REDIRECTIONPATH = "editfallback";
         pathos_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
         $SYS_FLOW_REDIRECTIONPATH = "pathos_default";
         $floc = unserialize($f->location_data);
         $controls = $db->selectObjects("formbuilder_control", "form_id=" . $f->id);
         if (!defined("SYS_SORTING")) {
             require_once BASE . "subsystems/sorting.php";
         }
         usort($controls, "pathos_sorting_byRankAscending");
         $form = new form();
         foreach ($controls as $c) {
             $ctl = unserialize($c->data);
             $ctl->_id = $c->id;
             $ctl->_readonly = $c->is_readonly;
             $form->register($c->name, $c->caption, $ctl);
         }
         $form->register(uniqid(""), "", new htmlcontrol("<br><br>"));
         $form->register("submit", "", new buttongroupcontrol($f->submitbtn, $f->resetbtn, ""));
         $form->meta("action", "submit_form");
         $form->meta("m", $floc->mod);
         $form->meta("s", $floc->src);
         $form->meta("i", $floc->int);
         $form->meta("id", $f->id);
         $formmsg = '';
         $form->location(pathos_core_makeLocation("formbuilder", $floc->src, $floc->int));
         if (count($controls) == 0) {
             $form->controls['submit']->disabled = true;
             $formmsg .= 'This form is blank. Select "Edit Form" to add input fields.<br>';
         }
         if ($f->is_saved == 0 && $f->is_email == 0) {
             $form->controls['submit']->disabled = true;
             $formmsg .= 'There are no actions assigned to this form. Select "Edit Form Settings" then select "Email Form" and/or "Save to Database".';
         }
         $template = new template("formmodule", $view, $loc);
         $template->assign("formmsg", $formmsg);
         $template->assign("form_html", $form->toHTML($f->id));
         $template->assign("form", $f);
         $template->register_permissions(array("administrate", "editform", "editformsettings", "editreport", "viewdata", "editdata", "deletedata"), $loc);
         $template->output();
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:78,代码来源:class.php


注:本文中的pathos_flow_set函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。