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


PHP FormProcessor类代码示例

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


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

示例1: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new SwimmerAddForm("Add Swimmer", null, 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimmers = new SwimmersDataList("Swimmers", '100%', "swimmerid");
         $div = html_div();
         $div->set_id("swimmersgdl");
         $div->add($swimmers);
         $container->add($div);
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:31,代码来源:swimmer_add.php

示例2: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new FlipTurnEditHomePageForm("Home Edit", null, '100%');
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:25,代码来源:home_edit.php

示例3: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     $sdifqueue = new SDIFResultsQueue();
     if (!$sdifqueue->ValidateQueue()) {
         $msgs = $sdifqueue->get_status_message();
         foreach ($msgs as $msg) {
             $container->add($this->status_message($msg['msg'], $msg['severity']));
         }
         return $container;
     }
     //  Create the form
     $form = new SDIFQueueProcessForm("Process SDIF Queue", $_SERVER['PHP_SELF'], 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:33,代码来源:queue_process.php

示例4: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new ResultsQueuePurgeForm("Purge Results Queue", $_SERVER['PHP_SELF'], 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //$container->add($form->get_action_message()) ;
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:25,代码来源:queue_purge.php

示例5: content_block

 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new InfoTableCSS());
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new SDIFFileUploadForm("Upload SDIF File", $_SERVER['PHP_SELF'], 600);
     $form->setUploadFileLabel("SDIF Filename");
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         $sd3fileinfo = $form->get_file_info();
         $container->add($fp, $form->get_file_info_table());
     } else {
         //  Add the Form Processor to the container.
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:27,代码来源:queue_upload.php

示例6: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     if ($this->user_is_logged_in()) {
         $form = new FlipTurnAdminLogoutForm("Admin Flip Turn Logout", null, 350);
     } else {
         $form = new FlipTurnAdminLoginForm("Admin Flip Turn Login", null, 350);
     }
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some a welcome message.
     if ($fp->is_action_successful()) {
         //  Redirect to Member page on successful login
         //die($_SERVER['PHP_SELF']) ;
         $url = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php';
         header("Location: {$url}");
         exit;
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:32,代码来源:login-logout.php

示例7: content_block

 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimteamid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimteamid", $scriptargs)) {
         $swimteamid = $scriptargs["swimteamid"];
     } else {
         if (array_key_exists("_swimteamid", $scriptargs)) {
             $swimteamid = $scriptargs["_swimteamid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimteamid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimteamid = null;
             }
         }
     }
     //  Create the form
     //$form = new SwimTeamUpdateForm("Update Swim Team", $_SERVER['PHP_SELF'], 600) ;
     $form = new SwimTeamUpdateForm("Update Swim Team", null, 600);
     $form->setSwimTeamId($swimteamid);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Update the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimteams = new SwimTeamsDataList("Swim Teams", '100%', "swimteamid");
         $div = html_div();
         $div->set_id("swimteamsgdl");
         $div->add($swimteams);
         $container->add($div);
         //  Update the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
开发者ID:rjoverph,项目名称:flip-turn,代码行数:50,代码来源:swimteam_update.php

示例8: __construct

 public function __construct($id = false)
 {
     parent::__construct();
     $this->add("sections");
     $this->name = "form_category";
     $this->enctype = "multipart/form-data";
     $this->action = URL::current();
     $this->sections = SectionDB::getAll();
     if (!$id) {
         $this->text("title", "Название:", FormProcessor::getSessionData("title"));
         $this->textarea("meta_desc", "Описание:", FormProcessor::getSessionData("meta_desc"));
         $this->textarea("meta_key", "Ключевые слова:", FormProcessor::getSessionData("meta_key"));
         $this->text("alias", "ЧПУ ссылка", FormProcessor::getSessionData("alias"));
         $this->checkbox("show", "Показывать:", "1");
         $this->submit("insert_category", "Сохранить");
     } else {
         $this->add("section_id");
         $this->hidden("id", $id);
         $obj = new CategoryDB();
         $obj->load($id);
         $this->text("title", "Название:", $obj->title);
         $this->textarea("meta_desc", "Описание:", $obj->meta_desc);
         $this->textarea("meta_key", "Ключевые слова:", $obj->meta_key);
         $link = URL::get("category", "", array("id" => $id), true, "", false);
         $alias = SefDB::getAliasOnLink($link);
         $this->text("alias", "ЧПУ ссылка", $alias);
         $this->checkbox("show", "Показывать:", "1", "", (int) $obj->show);
         $this->submit("update_category", "Сохранить");
         $this->section_id = $obj->section_id;
     }
 }
开发者ID:kuaa59,项目名称:www,代码行数:31,代码来源:formcategory_class.php

示例9: __construct

 public function __construct($view, $param)
 {
     parent::__construct();
     $this->add("hornav");
     $this->add("n");
     $this->name = "form_viewgallery";
     $this->enctype = "multipart/form-data";
     $this->action = URL::current();
     $viewgallery_obj = new ViewgalleryDB();
     $viewgallery_obj->load($param["view_id"]);
     $this->hornav = new Hornav();
     $this->hornav->addData("Админпанель", URL::get("menu", "admin"));
     $this->hornav->addData("Галерея", URL::get("viewgallery", "admin"));
     $this->hornav->addData($viewgallery_obj->title, URL::get("listgallery", "admin", array("view_id" => $param["view_id"])));
     if (!$param["gallery_id"]) {
         $this->hornav->addData("Добавить");
         $this->text("title", "Название:", FormProcessor::getSessionData("title"));
         $this->file("img", "Картинка:");
         $this->textarea("meta_desc", "Описание:", FormProcessor::getSessionData("meta_desc"));
         $this->textarea("meta_key", "Ключевые слова:", FormProcessor::getSessionData("meta_key"));
         $this->submit("insert_listgallery", "Сохранить");
     } else {
         $this->hidden("id", $param["gallery_id"]);
         $gallery_obj = new GalleryDB();
         $gallery_obj->load($param["gallery_id"]);
         $this->hornav->addData("Изменить");
         $this->text("title", "Название:", $gallery_obj->title);
         $this->file("img", "Картинка:");
         $this->textarea("meta_desc", "Описание:", $gallery_obj->meta_desc);
         $this->textarea("meta_key", "Ключевые слова:", $gallery_obj->meta_key);
         $this->submit("update_listgallery", "Сохранить");
     }
 }
开发者ID:kuaa59,项目名称:www,代码行数:33,代码来源:formlistgallery_class.php

示例10: __construct

 public function __construct($product)
 {
     parent::__construct();
     $this->db = $product->getDb();
     $this->product = $product;
     $this->measurementAttribute = new DatabaseObject_Attribute_MeasurementWithImageAttribute($this->db);
 }
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:7,代码来源:MeasurementAttribute.php

示例11: __construct

 public function __construct($db)
 {
     parent::__construct();
     $this->db = $db;
     $this->user = new DatabaseObject_User($db);
     $this->universities = DatabaseObject_StaticUtility::loadUniversities($db);
 }
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:7,代码来源:UsermemberRegistration.php

示例12: __construct

 public function __construct(DatabaseObject_BlogPost $post)
 {
     parent::__construct();
     $this->post = $post;
     $this->image = new DatabaseObject_BlogPostImage($post->getDb());
     $this->image->post_id = $this->post->getId();
 }
开发者ID:kalroot,项目名称:phpweb20demo,代码行数:7,代码来源:BlogPostImage.php

示例13: __construct

 public function __construct($db, $signedInUserSessionInfoHolder, $product_type, $product_tag, $product_id = 0, $specificProductTypeConfig)
 {
     parent::__construct();
     $this->db = $db;
     $this->product = new DatabaseObject_UserProducts($this->db);
     $this->userID = $signedInUserSessionInfoHolder->generalInfo->userID;
     $this->product_tag = $product_tag;
     $this->username = $signedInUserSessionInfoHolder->generalInfo->username;
     $this->user_network = $signedInUserSessionInfoHolder->generalInfo->affiliation;
     $this->user_city = $signedInUserSessionInfoHolder->sellerInfo->city;
     $this->product_type = $product_type;
     $this->specificProductTypeConfig = $specificProductTypeConfig;
     //Zend_Debug::dump($productTypeConfig);
     echo "product_id: " . $product_id;
     if ($this->product->getProductForUser($this->userID, $product_id, $product_type)) {
         $this->product_id = $product_id;
         $this->name = $this->product->name;
         $this->shipping_rate = $this->product->shipping_rate;
         $this->quantity = $this->product->quantity;
         $this->price = $this->product->price;
         $this->product_tag = $this->product->product_tag;
         $this->brand = $this->product->brand;
         $this->reward_point = $this->product->reward_point;
         $this->video_youtube = $this->product->video_youtube;
         $this->description = $this->product->profile->description;
         foreach ($this->specificProductTypeConfig['measurement'] as $k => $v) {
             $this->{$k} = $this->product->{$k};
         }
     }
 }
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:30,代码来源:UserProduct.php

示例14: __construct

 public function __construct($db)
 {
     parent::__construct();
     $this->db = $db;
     $this->user = new DatabaseObject_User($db);
     $this->user->type = 'member';
 }
开发者ID:kalroot,项目名称:phpweb20demo,代码行数:7,代码来源:UserRegistration.php

示例15: __construct

 public function __construct(DatabaseObject_BlogPost $post)
 {
     parent::__construct();
     $this->post = $post;
     $this->location = new DatabaseObject_BlogPostLocation($post->getDb());
     $this->location->post_id = $this->post->getId();
 }
开发者ID:kalroot,项目名称:phpweb20demo,代码行数:7,代码来源:BlogPostLocation.php


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