當前位置: 首頁>>代碼示例>>PHP>>正文


PHP url::location方法代碼示例

本文整理匯總了PHP中url::location方法的典型用法代碼示例。如果您正苦於以下問題:PHP url::location方法的具體用法?PHP url::location怎麽用?PHP url::location使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在url的用法示例。


在下文中一共展示了url::location方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index()
 {
     $view = new View(url::location());
     $view->articles = orm::factory('news')->where('group', 'site')->where('status', 'approved')->find_all(6);
     $this->template->title = 'About Us › News & Updates';
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:7,代碼來源:news.php

示例2: login

 public function login()
 {
     // Load the view
     $view = new view(url::location());
     // populate the post information if it exists
     $view->post = array();
     // assign the form post information, if it exists
     $view->post['unique'] = isset($this->post['unique']) ? $this->post['unique'] : '';
     // HAXXX
     $view->title = 'Spicers | Admin Login';
     $view->base_href = isset($this->base_href) ? $this->base_href : 'http://' . $_SERVER['HTTP_HOST'] . url::base();
     if ($this->notification->count()) {
         $view->notifications = View::factory('templates/notification_ajax', array('notifications' => $this->notification->get()));
     }
     $this->auth = new Security();
     if ($this->auth->logged_in()) {
         // note if they do not have access to the dashboard and they are signed in, this will
         // start an infinate loop. @todo fix this. maybe just a check to see if they have access
         // before the redirect - jpeake
         url::redirect('home');
         die;
     }
     echo $view;
     die;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:25,代碼來源:account.php

示例3: index

 public function index()
 {
     $view = new View(url::location());
     $this->template->title = 'Retail';
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:7,代碼來源:retail.php

示例4: index

 /**
  * Used to display the index page but also uses a jquery and the pagination to do preload of next pages
  * of the news articles. Which are then displaye don scroll 
  * @param integer $page the page number  (Matt are you sure this is needed, the pagination is smart enough not to need this). 
  */
 public function index($page = 1)
 {
     $total = orm::factory('news')->where('group', 'site')->where('status', 'approved')->count_all();
     $paging = new Pagination(array('total_items' => $total, 'items_per_page' => 3));
     $articles = orm::factory('news')->where('group', 'site')->where('status', 'approved')->find_all($paging->items_per_page, $paging->sql_offset);
     $view = new View(url::location());
     $view->articles = $articles;
     $view->pagination = $paging->render();
     $view->page_number = $paging->page_number();
     // If the request is an ajax request, then the page is attempting to autoupdate
     // the items with in the news, so just send through the news items.
     if (request::is_ajax()) {
         // if the ajax is attempting to get a page which doesnt exist, send 404
         if ($page > $paging->total_pages) {
             Event::run('system.404');
         } else {
             $this->ajax['view'] = $view;
         }
     } else {
         // otherwise its a http request, send throught he entire page with template.
         $this->template->title = 'About Us › News & Updates Archive';
         $this->breadcrumbs->add()->url(false)->title('Archive');
         $view->breadcrumbs = $this->breadcrumbs->cut();
         $this->template->content = $view;
     }
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:31,代碼來源:archive.php

示例5: parners

 public function parners()
 {
     $view = new View(url::location());
     $this->template->title = 'About Us › Global Alliances › Partners';
     $this->breadcrumbs->add()->url(false)->title('Partners');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:alliances.php

示例6: brochure

 public function brochure()
 {
     $view = new View(url::location());
     $this->template->title = 'Pre-media Solutions › Request Brochure or Demo';
     $this->breadcrumbs->add()->url(false)->title('Request Brochure or Demo');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:premedia.php

示例7: contact

 public function contact()
 {
     $view = new View(url::location());
     $this->template->title = 'About Us › Contact Us';
     $this->breadcrumbs->add()->url(false)->title('Contact Us');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:aboutus.php

示例8: faq

 public function faq()
 {
     $view = new View(url::location());
     $this->template->title = 'FAQ';
     $this->breadcrumbs->add()->url(false)->title('Education');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:education.php

示例9: sticky

 /**
  * This is a place holder to be removed one we have a spec for the stick items, 
  * 
  * Thisis cause sticky ites are sreaiuly just papers, witha  flag of type set to sticky.
  * Also it would make sence for theis to eb with in the oparent item. 
  * 
  * As we may one day require that wer can edi tythis timem s. 
  * 
  */
 public function sticky()
 {
     $view = new View(url::location());
     $this->template->title = 'Products › Sticky Papers';
     $this->breadcrumbs->add()->url(false)->title('Sticky Papers');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:17,代碼來源:products.php

示例10: environmental

 public function environmental()
 {
     $view = new View(url::location());
     $this->template->title = 'Resources › Icons › Environmental';
     $this->breadcrumbs->add()->url(false)->title('Environmental');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:icons.php

示例11: calculators

 public function calculators()
 {
     $view = new View(url::location());
     $this->template->title = 'Resources › Calculators';
     $this->breadcrumbs->add()->url(false)->title('Calculators');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:8,代碼來源:resources.php

示例12: glossary

 public function glossary()
 {
     $view = new View(url::location());
     $this->template->title = 'Environmental › Glossary';
     $this->breadcrumbs->add()->url(false)->title('Glossary');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $view->glossaries = orm::factory('glossary')->where('status', 'approved')->find_all();
     $this->template->content = $view;
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:9,代碼來源:environmental.php

示例13: view

 /** 
  * This page will display a page much like the page for the paper products. 
  * 
  * the expcetion will be it will have multiple images and missing some of the relationships that 
  * the papers have.
  * 
  * 
  * @param unknown_type $name
  */
 public function view($name)
 {
     // clean the input, remove and opf the escape characters
     $name = url::encode($name);
     $industrial = orm::factory('industrial')->where('name', $name)->find_all();
     //if ($industrial->loaded)
     //{
     $view = new view(url::location());
     $view->industrial = $industrial[0];
     $this->template->title = ucwords($name);
     $this->template->content = $view;
     //}
     //else
     //{
     // unable to find the industrial item
     //}
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:26,代碼來源:industrials.php

示例14: header

 public static function header($form = array())
 {
     if (is_string($form) || is_numeric($form)) {
         $form = array('globalid' => $form);
     }
     if (is_array($form)) {
         $form += array('class' => 'form', 'method' => 'post', 'action' => url::location(), 'globalid' => 0);
     }
     $html[] = '';
     if (arr::take('valid', $form) !== false) {
         $html[] = html::script('$common/js/jquery.validate.js');
     }
     if (arr::take('ajax', $form) !== false) {
         $html[] = html::script('$common/js/jquery.form.js');
     }
     $icon = arr::take('icon', $form);
     $title = arr::take('title', $form);
     $description = arr::take('description', $form);
     $globalid = arr::take('globalid', $form);
     $template = arr::take('template', $form);
     if (!empty($template)) {
         form::$template = $template;
     }
     //加載表頭
     $html[] = '<form' . html::attributes($form) . '>';
     $html[] = field::hidden(array('name' => '_REFERER', 'value' => url::referer()));
     $html[] = field::hidden(array('name' => '_FORMHASH', 'value' => form::hash()));
     $html[] = field::hidden(array('name' => '_GLOBALID', 'value' => empty($globalid) ? form::globalid() : $globalid));
     //表單頭部
     if (isset($title) || isset($description)) {
         $html[] = '<div class="form-header clearfix">';
         if (isset($icon)) {
             $html[] = '<div class="form-icon"><div class="zotop-icon zotop-icon-' . $icon . '"></div></div>';
         }
         if (isset($title)) {
             $html[] = '	<div class="form-title">' . $title . '</div>';
         }
         if (isset($description)) {
             $html[] = '	<div class="form-description">' . $description . '</div>';
         }
         $html[] = '</div>';
     }
     $html[] = '<div class="form-body clearfix">';
     $html[] = '';
     echo implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:46,代碼來源:form.php

示例15: add

 public function add()
 {
     if ($this->access->allowed('inspirations', 'create')) {
         $this->template->title = 'Add Inspiration';
         $this->breadcrumbs->add()->url(FALSE)->title('Add Inspiration');
         $view = new view(url::location());
         $user = new User_Model(NULL, 'default');
         $user = $user->find_all();
         $view->users = $user;
         $view->applications = ORM::factory('application')->find_all();
         $view->industries = orm::factory('industry')->find_all();
         $view->post = $this->post;
         $this->template->content = $view;
     } else {
         url::failed();
     }
 }
開發者ID:HIVE-Creative,項目名稱:spicers,代碼行數:17,代碼來源:inspirations.php


注:本文中的url::location方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。