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


PHP DataForm::process方法代码示例

本文整理汇总了PHP中DataForm::process方法的典型用法代码示例。如果您正苦于以下问题:PHP DataForm::process方法的具体用法?PHP DataForm::process怎么用?PHP DataForm::process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataForm的用法示例。


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

示例1: process

 function process()
 {
     //$this->_details_fields();
     $result = parent::process();
     switch ($this->_action) {
         case "update":
             if ($this->on_error()) {
                 $this->_status = "modify";
                 $this->_process_uri = $this->rapyd->uri->uri_string();
                 $this->_details_fields();
                 $this->_sniff_fields();
                 $this->_build_buttons();
                 $this->_rel_script();
                 $this->build_form();
             }
             if ($this->on_success()) {
                 $this->_postprocess_uri .= "/" . $this->rapyd->uri->build_clause("show" . $this->pk_to_URI($this->_dataobject->pk));
                 if ($this->back_save) {
                     header("Refresh:0;url=" . $this->back_url);
                 } else {
                     redirect("/" . $this->_postprocess_uri, 'refresh');
                 }
             }
             break;
         case "insert":
             if ($this->on_error()) {
                 $this->_status = "create";
                 $this->_process_uri = $this->rapyd->uri->uri_string();
                 $this->_details_fields();
                 $this->_sniff_fields();
                 $this->_build_buttons();
                 $this->_rel_script();
                 $this->build_form();
             }
             if ($this->on_success()) {
                 $this->_postprocess_uri .= $this->pk_to_URI($this->_dataobject->pk);
                 if ($this->back_save) {
                     header("Refresh:0;url=" . $this->back_url);
                 } else {
                     redirect($this->_postprocess_uri, 'refresh');
                 }
             }
             break;
         case "delete":
             if ($this->on_error()) {
                 $this->_build_buttons();
                 if (empty($this->_dataobject->error_message_ar['pre_del'])) {
                     $this->build_message_form(RAPYD_MSG_0206);
                 } else {
                     $this->build_message_form($this->_dataobject->error_message_ar['pre_del']);
                 }
             }
             if ($this->on_success()) {
                 $this->_build_buttons();
                 if ($this->back_delete) {
                     header("Refresh:0;url=" . $this->back_url);
                 } else {
                     $this->build_message_form(RAPYD_MSG_0202);
                 }
             }
             break;
     }
     switch ($this->_status) {
         case "show":
         case "modify":
         case "create":
             //$this->_details_fields();
             $this->_build_buttons();
             $this->_rel_script();
             $this->build_form();
             break;
         case "delete":
             //$this->_details_fields();
             $this->_build_buttons();
             $this->build_message_form(RAPYD_MSG_0209);
             break;
         case "unknow_record":
             //$this->_details_fields();
             $this->_build_buttons();
             $this->build_message_form(RAPYD_MSG_0208);
             break;
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:83,代码来源:datadetails.php

示例2: process

 function process($miview = 'dataform')
 {
     $result = parent::process();
     switch ($this->_action) {
         case 'search':
             // prepare the WHERE clause
             foreach ($this->_fields as $fieldname => $field) {
                 if ($field->value != '') {
                     if (strpos($field->name, '_copy') > 0) {
                         $name = substr($field->db_name, 0, strpos($field->db_name, '_copy'));
                     } else {
                         $name = $field->db_name;
                     }
                     $field->_getValue();
                     $field->_getNewValue();
                     $value = $field->newValue;
                     switch ($field->clause) {
                         case 'like':
                             //$this->db->like($name, $value,$field->like_side);
                             $comodin = $this->ci->datasis->traevalor('COMODIN');
                             if (!empty($comodin)) {
                                 $v = str_replace($comodin, '%', $value);
                             } else {
                                 $v = $value;
                             }
                             if ($field->like_side == 'before') {
                                 $v = $this->db->escape('%' . $v);
                             } elseif ($field->like_side == 'after') {
                                 $v = $this->db->escape($v . '%');
                             } else {
                                 $v = $this->db->escape('%' . $v . '%');
                             }
                             $strlike = "{$name} LIKE {$v}";
                             $this->db->where($strlike);
                             break;
                         case 'orlike':
                             $this->db->orlike($name, $value);
                             break;
                         case 'where':
                             /*if(is_numeric($value)){
                             			$value =1*$value;
                             			$bool  =FALSE;
                             		}else{
                             			$bool=TRUE;
                             		}*/
                             $this->db->where($name . ' ' . $field->operator, $value);
                             break;
                         case 'orwhere':
                             /*if(is_numeric($value)){
                             			$value =1*$value;
                             			$bool  =FALSE;
                             		}else{
                             			$bool=TRUE;
                             		}*/
                             $this->db->orwhere($name . ' ' . $field->operator, $value);
                             break;
                             //..
                     }
                 }
             }
             $this->_build_buttons();
             $this->build_form($miview);
             break;
         case 'reset':
             //pulire sessioni
             $this->_build_buttons();
             $this->build_form($miview);
             break;
         default:
             $this->_build_buttons();
             $this->build_form($miview);
             break;
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:74,代码来源:datafilter.php

示例3: process

 function process()
 {
     $result = parent::process();
     switch ($this->_action) {
         case "update":
             if ($this->on_error()) {
                 $this->_status = 'modify';
                 $this->_process_uri = $this->rapyd->uri->uri_string();
                 $this->_sniff_fields();
                 $this->_build_buttons();
                 $this->build_form();
             }
             if ($this->on_success()) {
                 $this->_postprocess_uri .= '/' . $this->rapyd->uri->build_clause('show' . $this->pk_to_URI($this->_dataobject->pk));
                 if ($this->on_save_redirect) {
                     if ($this->back_save) {
                         header("Refresh:0;url=" . $this->back_url);
                     } else {
                         redirect('/' . $this->_postprocess_uri, 'refresh');
                     }
                 }
             }
             break;
         case "insert":
             if ($this->on_error()) {
                 $this->_status = 'create';
                 $this->_process_uri = $this->rapyd->uri->uri_string();
                 $this->_sniff_fields();
                 $this->_build_buttons();
                 $this->build_form();
             }
             if ($this->on_success()) {
                 $this->_postprocess_uri .= $this->pk_to_URI($this->_dataobject->pk);
                 if ($this->on_save_redirect) {
                     if ($this->back_save) {
                         header("Refresh:0;url=" . $this->back_url);
                     } else {
                         redirect($this->_postprocess_uri, 'refresh');
                     }
                 }
             }
             break;
         case 'delete':
             if ($this->on_error()) {
                 $this->_build_buttons();
                 if (empty($this->_dataobject->error_message_ar['pre_del'])) {
                     $this->build_message_form(RAPYD_MSG_0206);
                 } else {
                     $this->build_message_form($this->_dataobject->error_message_ar['pre_del']);
                 }
             }
             if ($this->on_success()) {
                 $this->_build_buttons();
                 if ($this->back_delete) {
                     header("Refresh:0;url=" . $this->back_url);
                 } else {
                     $this->build_message_form(RAPYD_MSG_0202);
                 }
             }
             break;
     }
     switch ($this->_status) {
         case 'show':
         case 'modify':
         case 'create':
             $this->_build_buttons();
             $this->build_form();
             break;
         case 'delete':
             $this->_build_buttons();
             $this->build_message_form(RAPYD_MSG_0209);
             break;
         case 'unknow_record':
             $this->_build_buttons();
             $this->build_message_form(RAPYD_MSG_0208);
             break;
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:78,代码来源:dataedit.php

示例4: process

 function process()
 {
     $result = parent::process();
     switch ($this->_action) {
         case "search":
             // prepare the WHERE clause
             foreach ($this->_fields as $fieldname => $field) {
                 if ($field->value != "") {
                     if (strpos($field->name, "_copy") > 0) {
                         $name = substr($field->db_name, 0, strpos($field->db_name, "_copy"));
                     } else {
                         $name = $field->db_name;
                     }
                     $field->_getValue();
                     $field->_getNewValue();
                     $value = $field->newValue;
                     switch ($field->clause) {
                         case "like":
                             $this->db->like($name, $value, $field->like_side);
                             break;
                         case "orlike":
                             $this->db->orlike($name, $value);
                             break;
                         case "where":
                             $this->db->where($name . " " . $field->operator, $value);
                             break;
                         case "orwhere":
                             $this->db->orwhere($name . " " . $field->operator, $value);
                             break;
                             //..
                     }
                 }
             }
             $this->_build_buttons();
             $this->build_form();
             break;
         case "reset":
             //pulire sessioni
             $this->_build_buttons();
             $this->build_form();
             break;
         default:
             $this->_build_buttons();
             $this->build_form();
             break;
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:47,代码来源:datafilter.php


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