當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。