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


PHP View::forge方法代码示例

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


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

示例1: action_index

 public function action_index()
 {
     $this->template->title = "Terms of Use";
     $this->template->sub = "";
     $view = View::forge("terms");
     $this->template->content = $view;
 }
开发者ID:Trd-vandolph,项目名称:game-bootcamp,代码行数:7,代码来源:terms.php

示例2: action_edit

 public function action_edit($id = null)
 {
     $setting = Model_Setting::find($id);
     $val = Model_Setting::validate('edit');
     if ($val->run()) {
         $setting->setting_key = Input::post('setting_key');
         $setting->setting_title = Input::post('setting_title');
         $setting->setting_value = Input::post('setting_value');
         $setting->setting_data_type_id = Input::post('setting_data_type_id');
         if ($setting->save()) {
             Session::set_flash('success', e('Updated setting #' . $id));
             Response::redirect('admin/settings/view/' . $setting->id);
         } else {
             Session::set_flash('error', e('Could not update setting #' . $id));
         }
     } else {
         if (Input::method() == 'POST') {
             $setting->setting_key = $val->validated('setting_key');
             $setting->setting_title = $val->validated('setting_title');
             $setting->setting_value = $val->validated('setting_value');
             $setting->setting_data_type_id = $val->validated('setting_data_type_id');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('setting', $setting, false);
     }
     $this->template->set_global('data_types', Model_Setting_Data_Type::find('all', array('order_by' => array(array('name', 'asc')))));
     $this->template->title = "Settings";
     $this->template->content = View::forge('admin/settings/edit');
 }
开发者ID:AfterCursor,项目名称:restaurant-pos-backend,代码行数:29,代码来源:settings.php

示例3: action_edit

 public function action_edit($id = null)
 {
     $pay = Model_Part::find($id);
     $val = Model_Part::validate('edit');
     if ($val->run()) {
         $pay->status = Input::post('status');
         $pay->price = Input::post('price');
         $pay->ship_number = Input::post('ship_number');
         $pay->box_number = Input::post('box_number');
         $pay->tracking = Input::post('tracking');
         $pay->memo = Input::post('memo');
         if ($pay->save()) {
             Session::set_flash('success', e('Updated pay #' . $id));
             Response::redirect('admin/pay');
         } else {
             Session::set_flash('error', e('Could not update pay #' . $id));
         }
     } else {
         if (Input::method() == 'POST') {
             $pay->status = $val->validated('status');
             $pay->price = $val->validated('price');
             $pay->ship_number = $val->validated('ship_number');
             $pay->box_number = $val->validated('box_number');
             $pay->tracking = $val->validated('tracking');
             $pay->memo = $val->validated('memo');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('pay', $pay, false);
     }
     $this->template->title = "pays";
     $this->template->content = View::forge('admin/pay/edit');
 }
开发者ID:notfoundsam,项目名称:yahooauc,代码行数:32,代码来源:pay.php

示例4: view

 public function view()
 {
     $right_items = [View::forge('layouts/index/right_items/settings_icon')];
     $section_links = [View::forge('layout/navtab', ['link_content' => 'Start', 'link' => 'view/layouts_start']), View::forge('layout/navtab', ['link_content' => 'Settings', 'link' => 'view/layouts_settings']), View::forge('layout/navtab', ['link_content' => 'Fleet', 'link' => 'view/layouts_fleet'])];
     $header = View::forge('layout/nav_header', ['section_links' => $section_links, 'right_items' => $right_items]);
     $this->header_view = $header;
 }
开发者ID:stabernz,项目名称:wnb,代码行数:7,代码来源:header.php

示例5: action_edit

 /**
  * Редактирование записи
  * 
  * @param int $id
  */
 public function action_edit($id = null)
 {
     is_null($id) and \Response::redirect_back('admin/videos');
     if (!($video = \Model_Video::find($id))) {
         \Session::set_flash('error', 'Невозможно найти видео #' . $id);
         \Response::redirect_back('admin/videos');
     }
     $val = \Model_Video::validate('edit');
     if ($val->run()) {
         $video->videoid = \Input::post('videoid');
         if ($video->save()) {
             \Session::set_flash('success', 'Видео обновлено.');
             \Response::redirect_back('admin/videos');
         } else {
             \Session::set_flash('error', 'Could not update video #' . $id);
         }
     } else {
         if (\Input::method() == 'POST') {
             $video->videoid = $val->validated('videoid');
             \Session::set_flash('error', $val->error());
         }
         $this->template->set_global('video', $video, false);
     }
     $this->template->content = \View::forge('videos/edit');
 }
开发者ID:alexmon1989,项目名称:fcssadon.ru,代码行数:30,代码来源:videos.php

示例6: action_new

 public function action_new()
 {
     if (@$_GET['bbstype']) {
         $bbstype = $_GET['bbstype'];
     } elseif (@$_POST['bbs_type_id']) {
         $bbstype = $_POST['bbs_type_id'];
     } else {
         $bbstype = 0;
     }
     $input = \Model\Imp::setDefaultPost($_POST, $_GET, Session::get());
     //if(@$_POST) \De::str($input);
     $view = View::forge('imp/new');
     $view->set('bbstype', $bbstype);
     $view->set_safe('input', $input);
     $view->set('mail_flag', @$input['mail_flag'] == 'on' ? true : false);
     // $mail_flag = @$input['mail_flag'] ? "checked='checked'" : '' ;
     $this->template->set_global('title', \Model\imp::getTitle($bbstype));
     $this->template->set_global('bbstype', $bbstype);
     if (@$_POST['formkey']) {
         $result = \Model\Imp::insertPost($_POST);
         // \De::str($result);
         if ($result) {
             \Response::redirect('/imp/imp?bbstype=' . $_POST['bbs_type_id']);
             exit;
         } else {
             //\De::str(\Session::get());
             //\Response::redirect('/imp/new');
         }
     } else {
         // if(@$_POST) //echo "不正アクセスです。";exit;
     }
     $this->template->content = $view;
     return $this->template;
 }
开发者ID:cresta522,项目名称:imp,代码行数:34,代码来源:imp.php

示例7: action_Edit

 public function action_Edit($Kid = 0)
 {
     //ドロップダウンリストの生成
     $select = Model_College::get_list();
     $Kid and $this->data['category'] = Model_Category::query()->where('Kid', '=', $Kid)->get();
     if (Input::post()) {
         $val = Model_Category::validate();
         if ($val->run()) {
             $query = DB::update('Category')->set(array('Cid' => Input::post('college'), 'Kname' => Input::post('Kname'), 'Kkana' => Input::post('Kkana'), 'luID' => Auth::get_screen_name()))->where('Kid', '=', $Kid)->execute();
             Response::redirect('category');
         } else {
             $this->message = $val->error();
             $view = View::forge('categorymanagement/CategoryEdit', $this->data);
             $view->set_global('message', $this->message, false);
             //ドロップダウン箇所のセット
             $view->set_global('select', $select, false);
         }
     } else {
         $view = View::forge('categorymanagement/CategoryEdit', $this->data);
         $view->set_global('message', $this->message, false);
         //ドロップダウン箇所のセット
         $view->set_global('select', $select, false);
     }
     return $view;
 }
开发者ID:nihonLoomba,项目名称:noteshare-,代码行数:25,代码来源:categorymanagement.php

示例8: action_edit

 public function action_edit($id = null)
 {
     is_null($id) and Response::redirect('point');
     if (!($point = Model_Point::find($id))) {
         Session::set_flash('error', 'Could not find point #' . $id);
         Response::redirect('point');
     }
     $val = Model_Point::validate('edit');
     if ($val->run()) {
         $point->user_id = Input::post('user_id');
         $point->point = Input::post('point');
         if ($point->save()) {
             Session::set_flash('success', 'Updated point #' . $id);
             Response::redirect('point');
         } else {
             Session::set_flash('error', 'Could not update point #' . $id);
         }
     } else {
         if (Input::method() == 'POST') {
             $point->user_id = $val->validated('user_id');
             $point->point = $val->validated('point');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('point', $point, false);
     }
     $this->template->title = "Points";
     $this->template->content = View::forge('point/edit');
 }
开发者ID:NoguHiro,项目名称:metro,代码行数:28,代码来源:point.php

示例9: action_index

 public function action_index()
 {
     require "call.php";
     $this->template->title = "Try It Yourself";
     $view = View::forge("try");
     $this->template->content = $view;
 }
开发者ID:Trd-vandolph,项目名称:game-bootcamp,代码行数:7,代码来源:try.php

示例10: action_edit

 public function action_edit($id = null)
 {
     $form = Model_Form::find($id);
     $val = Model_Form::validate('edit');
     if ($val->run()) {
         $form->name = Input::post('name');
         $form->email = Input::post('email');
         $form->comment = Input::post('comment');
         $form->ip_address = Input::post('ip_address');
         $form->user_agent = Input::post('user_agent');
         if ($form->save()) {
             Session::set_flash('success', e('Updated form #' . $id));
             Response::redirect('admin/form');
         } else {
             Session::set_flash('error', e('Could not update form #' . $id));
         }
     } else {
         if (Input::method() == 'POST') {
             $form->name = $val->validated('name');
             $form->email = $val->validated('email');
             $form->comment = $val->validated('comment');
             $form->ip_address = $val->validated('ip_address');
             $form->user_agent = $val->validated('user_agent');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('form', $form, false);
     }
     $this->template->title = "Forms";
     $this->template->content = View::forge('admin/form/edit');
 }
开发者ID:tammax,项目名称:aimless,代码行数:30,代码来源:form.php

示例11: action_edit

 public function action_edit($id = null)
 {
     $currency = Model_Currency::find($id);
     $val = Model_Currency::validate('edit');
     if ($val->run()) {
         $currency->name = Input::post('name');
         $currency->symbol = Input::post('symbol');
         $currency->country = Input::post('country');
         $currency->is_default = Input::post('is_default');
         $currency->exchange_rate = Input::post('exchange_rate');
         if ($currency->save()) {
             Session::set_flash('success', e('Updated currency #' . $id));
             Response::redirect('admin/currencies');
         } else {
             Session::set_flash('error', e('Could not update currency #' . $id));
         }
     } else {
         if (Input::method() == 'POST') {
             $currency->name = $val->validated('name');
             $currency->symbol = $val->validated('symbol');
             $currency->country = $val->validated('country');
             $currency->is_default = $val->validated('is_default');
             $currency->exchange_rate = $val->validated('exchange_rate');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('currency', $currency, false);
     }
     $countries = Model_Country::find('all', array('order_by' => array(array('name', 'asc'))));
     $this->template->set_global('countries', $countries);
     $this->template->set_global('yes_no', array('0' => 'No', '1' => 'Yes'));
     $this->template->title = "Currencies";
     $this->template->content = View::forge('admin/currencies/edit');
 }
开发者ID:AfterCursor,项目名称:restaurant-pos-backend,代码行数:33,代码来源:currencies.php

示例12: action_index

 /**
  * TOP
  *
  * @access  public
  * @return  Response
  */
 public function action_index()
 {
     if (Input::get('lang') == 'en') {
         $view = View::forge(self::VIEW_FILE_PREFIX_EN . 'index.tpl');
     } elseif (Input::get('lang') == 'hk') {
         $view = View::forge(self::VIEW_FILE_PREFIX_HK . 'index.tpl');
     } elseif (Input::get('lang') == 'hkj') {
         $view = View::forge(self::VIEW_FILE_PREFIX_HKJ . 'index.tpl');
     } elseif (Input::get('lang') == 'hkzh') {
         $view = View::forge(self::VIEW_FILE_PREFIX_HKZH . 'index.tpl');
     } else {
         $view = View::forge(self::VIEW_FILE_PREFIX . 'index.tpl');
     }
     // 現在、tplに直書きの為、コメントアウト
     /*        
             $list = Model_Support_Help::get_help(2, null);
             $ipost_list = Model_Support_Help::get_help_ipost();
             $sub_menu   = Model_Master_Support_Help_Genre::find_all();
     
             $view->set('sub_menu',     $sub_menu);
             $view->set('list',         $list);
             $view->set('ipost_list',   $ipost_list);
     */
     return $view;
 }
开发者ID:buiquangquyet,项目名称:ipost,代码行数:31,代码来源:help.php

示例13: action_edit

 public function action_edit($id = null)
 {
     is_null($id) and Response::redirect('Proxies');
     $proxy = Model_Proxy::find($id);
     $val = Model_Proxy::validate('edit');
     if ($val->run()) {
         $proxy->host = Input::post('host');
         $proxy->port = Input::post('port');
         $proxy->fail_count = Input::post('fail_count');
         if ($proxy->save()) {
             Session::set_flash('success', 'Updated proxy #' . $id);
             Response::redirect('proxies');
         } else {
             Session::set_flash('error', 'Could not update proxy #' . $id);
         }
     } else {
         if (Input::method() == 'POST') {
             $proxy->host = $val->validated('host');
             $proxy->port = $val->validated('port');
             $proxy->fail_count = $val->validated('fail_count');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('proxy', $proxy, false);
     }
     $this->template->title = "Proxies";
     $this->template->content = View::forge('proxies/edit');
 }
开发者ID:ClixLtd,项目名称:pccupload,代码行数:27,代码来源:proxies.php

示例14: action_edit

 public function action_edit($id = null)
 {
     is_null($id) and Response::redirect('Survey');
     if (!($survey = Model_Survey::find($id))) {
         Session::set_flash('error', 'Could not find survey #' . $id);
         Response::redirect('Survey');
     }
     $val = Model_Survey::validate('edit');
     if ($val->run()) {
         $survey->title = Input::post('title');
         $survey->description = Input::post('description');
         $survey->type = Input::post('type');
         if ($survey->save()) {
             Session::set_flash('success', 'Updated survey #' . $id);
             Response::redirect('survey');
         } else {
             Session::set_flash('error', 'Could not update survey #' . $id);
         }
     } else {
         if (Input::method() == 'POST') {
             $survey->title = $val->validated('title');
             $survey->description = $val->validated('description');
             $survey->type = $val->validated('type');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('survey', $survey, false);
     }
     $this->template->title = "Surveys";
     $this->template->content = View::forge('survey/edit');
 }
开发者ID:ClixLtd,项目名称:pccupload,代码行数:30,代码来源:survey.php

示例15: action_edit

 /**
  * Mmeber_profile edit
  * 
  * @access  public
  * @return  Response
  */
 public function action_edit($type = null)
 {
     list($type, $is_regist) = self::validate_type($type, $this->u->id);
     $form_member_profile = new Form_MemberProfile($type == 'regist' ? 'regist-config' : 'config', $this->u);
     $form_member_profile->set_validation();
     if (\Input::method() == 'POST') {
         \Util_security::check_csrf();
         try {
             $form_member_profile->validate(true);
             \DB::start_transaction();
             $form_member_profile->seve();
             if ($is_regist) {
                 Model_MemberConfig::delete_value($this->u->id, 'terms_un_agreement');
             }
             \DB::commit_transaction();
             $message = $is_regist ? sprintf('%sが%sしました。', term('site.registration'), term('form.complete')) : term('profile') . 'を編集しました。';
             $redirect_uri = $is_regist ? $this->after_auth_uri : 'member/profile';
             \Session::set_flash('message', $message);
             \Response::redirect($redirect_uri);
         } catch (\FuelException $e) {
             if (\DB::in_transaction()) {
                 \DB::rollback_transaction();
             }
             \Session::set_flash('error', $e->getMessage());
         }
     }
     $this->set_title_and_breadcrumbs(term('profile') . term($is_regist ? 'site.registration' : 'form.edit'), $is_regist ? array() : array('member/profile' => term('common.my', 'profile')), $is_regist ? null : $this->u);
     $this->template->content = View::forge('member/profile/edit', array('is_regist' => $is_regist, 'val' => $form_member_profile->get_validation(), 'member_public_flags' => $form_member_profile->get_member_public_flags(), 'profiles' => $form_member_profile->get_profiles(), 'member_profile_public_flags' => $form_member_profile->get_member_profile_public_flags()));
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:35,代码来源:profile.php


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