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


PHP FormProcessor::getSessionData方法代码示例

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


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

示例1: __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

示例2: __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

示例3: __construct

 public function __construct($id = false)
 {
     parent::__construct();
     $this->name = "form_section";
     $this->enctype = "multipart/form-data";
     $this->action = URL::current();
     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->textarea("full_text", "Длинное описание:", FormProcessor::getSessionData("full_text"));
         $this->text("alias", "ЧПУ ссылка", FormProcessor::getSessionData("alias"));
         $this->submit("insert_section", "Сохранить");
     } else {
         $this->hidden("id", $id);
         $obj = new SectionDB();
         $obj->load($id);
         $this->text("title", "Название:", $obj->title);
         $this->textarea("meta_desc", "Описание:", $obj->meta_desc);
         $this->textarea("meta_key", "Ключевые слова:", $obj->meta_key);
         $this->textarea("full_text", "Длинное описание:", $obj->full_text);
         $link = URL::get("section", "", array("id" => $id), true, "", false);
         $alias = SefDB::getAliasOnLink($link);
         $this->text("alias", "ЧПУ ссылка", $alias);
         $this->submit("update_section", "Сохранить");
     }
 }
开发者ID:kuaa59,项目名称:www,代码行数:27,代码来源:formsection_class.php

示例4: __construct

 public function __construct($id = false)
 {
     parent::__construct();
     $this->add("categories");
     $this->add("brands");
     $this->name = "form_product";
     $this->enctype = "multipart/form-data";
     $this->action = URL::current();
     $this->categories = CategoryDB::getAll();
     $this->brands = BrandDB::getAll();
     if (!$id) {
         $this->text("title", "Название:", FormProcessor::getSessionData("title"));
         $this->text("price", "Цена:", FormProcessor::getSessionData("price"));
         $this->textarea("meta_desc", "Короткое описание<br />(не более 255 символов):", FormProcessor::getSessionData("meta_desc"));
         $this->textarea("full_text", "Длинное описание<br />(хоть сколько символов):", FormProcessor::getSessionData("full_text"));
         $this->textarea("meta_key", "Ключевые слова:", FormProcessor::getSessionData("meta_key"));
         $this->text("alias", "ЧПУ ссылка", FormProcessor::getSessionData("alias"));
         $this->text("video", "Ссылка на видео", FormProcessor::getSessionData("video"));
         $this->checkbox("available", "Наличие:", "1");
         $this->file("img", "Картинка:");
         $this->submit("insert_product", "Сохранить");
     } else {
         $this->add("category_id");
         $this->add("brand_id");
         $this->add("fotos");
         $this->hidden("id", $id);
         $obj = new ProductDB();
         $obj->load($id);
         $this->text("price", "Цена:", $obj->price);
         $this->textarea("title", "Название:", $obj->title);
         $this->textarea("meta_desc", "Короткое описание<br />(не более 255 символов):", $obj->meta_desc);
         $this->textarea("full_text", "Длинное описание<br />(хоть сколько символов):", $obj->full_text);
         $this->textarea("meta_key", "Ключевые слова:", $obj->meta_key);
         $link = URL::get("product", "", array("id" => $id), true, "", false);
         $alias = SefDB::getAliasOnLink($link);
         $this->text("alias", "ЧПУ ссылка", $alias);
         $this->text("video", "Ссылка на видео", $obj->video);
         $this->checkbox("available", "Наличие:", "1", "", (int) $obj->available);
         $this->file("img", "Картинка:");
         $this->submit("update_product", "Сохранить");
         $view = new View(Config::DIR_TMPL);
         $this->img = $view->render("img", array("src" => $obj->img), true);
         $this->category_id = $obj->category_id;
         $this->brand_id = $obj->brand_id;
         $this->fotos = ImgDB::getImgOnID($id);
     }
 }
开发者ID:kuaa59,项目名称:www,代码行数:47,代码来源:formproduct_class.php


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