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


PHP PHPWS_Text::getGetValues方法代碼示例

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


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

示例1: viewLinks

 /**
  * Returns a set of links to navigate the different calendar views
  *
  * @param string current_view   Name of the current view
  * @return string
  */
 public function viewLinks($current_view)
 {
     if (!$this->calendar->schedule->id) {
         return null;
     }
     $no_follow = PHPWS_Settings::get('calendar', 'no_follow');
     $vars = PHPWS_Text::getGetValues();
     unset($vars['module']);
     //        if ($current_view == 'grid') {
     //            $vars['date'] = $this->calendar->today;
     //        }
     if (isset($_REQUEST['m']) && isset($_REQUEST['y']) && isset($_REQUEST['d'])) {
         $vars['date'] = mktime(0, 0, 0, $_REQUEST['m'], $_REQUEST['d'], $_REQUEST['y']);
         unset($vars['m']);
         unset($vars['d']);
         unset($vars['y']);
     }
     $links['today'] = $this->todayLink($current_view);
     if ($current_view == 'event') {
         $vars['date'] = $this->event->start_time;
     }
     if (isset($this->calendar->schedule)) {
         $vars['sch_id'] = $this->calendar->schedule->id;
     }
     // Get the values for the left and right arrows in a month view
     if ($current_view == 'list' || $current_view == 'grid') {
         $oMonth = $this->calendar->getMonth();
         $left_arrow_time = $oMonth->prevMonth('timestamp');
         $right_arrow_time = $oMonth->nextMonth('timestamp');
         $left_link_title = dgettext('calendar', 'Previous month');
         $right_link_title = dgettext('calendar', 'Next month');
     }
     if ($current_view == 'grid') {
         //$links['GRID'] = dgettext('calendar', 'Grid');
     } else {
         $vars['view'] = 'grid';
         $glink = new PHPWS_Link(dgettext('calendar', 'Month Grid'), 'calendar', $vars);
         $glink->setNoFollow($no_follow);
         $glink->addClass('btn btn-default');
         $links['GRID'] = $glink->get();
     }
     if ($current_view == 'list') {
         //$links['LIST'] = dgettext('calendar', 'Month');
     } else {
         $vars['view'] = 'list';
         $glink = new PHPWS_Link(dgettext('calendar', 'Month list'), 'calendar', $vars);
         $glink->addClass('btn btn-default');
         $glink->setNoFollow($no_follow);
         $links['LIST'] = $glink->get();
     }
     if ($current_view == 'week') {
         require_once 'Calendar/Week.php';
         $oWeek = $this->calendar->getWeek();
         $left_arrow_time = $oWeek->prevWeek('timestamp');
         $right_arrow_time = $oWeek->nextWeek('timestamp');
         $left_link_title = dgettext('calendar', 'Previous week');
         $right_link_title = dgettext('calendar', 'Next week');
     } else {
         $vars['view'] = 'week';
         $wlink = new PHPWS_Link(dgettext('calendar', 'Week'), 'calendar', $vars);
         $wlink->setNoFollow($no_follow);
         $wlink->addClass('btn btn-default');
         $links['WEEK'] = $wlink->get();
     }
     if ($current_view == 'day') {
         require_once 'Calendar/Day.php';
         $oDay = new Calendar_Day($this->calendar->int_year, $this->calendar->int_month, $this->calendar->int_day);
         $left_arrow_time = $oDay->prevDay('timestamp');
         $right_arrow_time = $oDay->nextDay('timestamp');
         $left_link_title = dgettext('calendar', 'Previous day');
         $right_link_title = dgettext('calendar', 'Next day');
         $links['DAY_LINK'] = dgettext('calendar', 'Day');
     } else {
         $vars['view'] = 'day';
         $dlink = new PHPWS_Link(dgettext('calendar', 'Day'), 'calendar', $vars);
         $dlink->addClass('btn btn-default');
         $dlink->setNoFollow($no_follow);
         $links['DAY_LINK'] = $dlink->get();
     }
     $vars['view'] = $current_view;
     if (!empty($left_arrow_time)) {
         $vars['date'] = $left_arrow_time;
         $larrow = new PHPWS_Link('<i class="fa fa-chevron-left"></i>&nbsp;', 'calendar', $vars);
         $larrow->addClass('btn btn-default');
         $larrow->setTitle($left_link_title);
         $larrow->setNoFollow($no_follow);
         $links['LEFT_ARROW'] = $larrow->get();
     }
     if (!empty($right_arrow_time)) {
         $vars['date'] = $right_arrow_time;
         $rarrow = new PHPWS_Link('&nbsp;<i class="fa fa-chevron-right"></i>', 'calendar', $vars);
         $rarrow->addClass('btn btn-default');
         $rarrow->setTitle($right_link_title);
         $rarrow->setNoFollow($no_follow);
//.........這裏部分代碼省略.........
開發者ID:par-orillonsoft,項目名稱:phpwebsite,代碼行數:101,代碼來源:User.php

示例2: getLinkValues

 public function getLinkValues()
 {
     $output = null;
     if (isset($GLOBALS['DBPager_Link_Values'])) {
         return $GLOBALS['DBPager_Link_Values'];
     }
     if (empty($this->limit)) {
         $this->limit = DBPAGER_DEFAULT_LIMIT;
     }
     $values['pg'] = $this->current_page;
     $values['limit'] = $this->limit;
     if (!empty($this->search)) {
         $values['pager_search'] = $this->search;
     }
     if (isset($this->orderby)) {
         $values['orderby'] = $this->orderby;
         if (isset($this->orderby_dir)) {
             $values['orderby_dir'] = $this->orderby_dir;
         }
     }
     // pull get values from link setting
     if (!empty($this->link)) {
         $url = parse_url($this->link);
         if (isset($url['query'])) {
             parse_str(str_replace('&amp;', '&', $url['query']), $output);
         }
     }
     // pull any extra values in current url
     $extra = \PHPWS_Text::getGetValues();
     $search_val =& $extra['search'];
     if (UTF8_MODE) {
         $preg = '/[^\\w\\s\\pL]/u';
     } else {
         $preg = '/[^\\w\\s]/u';
     }
     $search_val = preg_replace($preg, '', $search_val);
     $search_val = preg_replace('/\\s/', '+', $search_val);
     // if extra values exist, add them to the values array
     // ignore matches in the output and other values
     if (!empty($extra)) {
         if ($output) {
             $diff = array_diff_assoc($extra, $output);
         } else {
             $diff = $extra;
         }
         $diff = array_diff_assoc($diff, $values);
         $values = array_merge($diff, $values);
     }
     if ($output) {
         $values = array_merge($output, $values);
     }
     // prevents a doubling of the value in the page form
     unset($values['change_page']);
     unset($values['pager_c_search']);
     // Don't need the Go button from search to be carried along
     unset($values['go']);
     if (empty($values['module'])) {
         $values['module'] = $this->module;
     }
     $GLOBALS['DBPager_Link_Values'] = $values;
     return $values;
 }
開發者ID:jeffrafter,項目名稱:InternshipInventory,代碼行數:62,代碼來源:SubselectPager.php

示例3: verifySaltedUrl

 public static function verifySaltedUrl()
 {
     $val = PHPWS_Text::getGetValues();
     unset($val['module']);
     unset($val['authkey']);
     unset($val['owpop']);
     $serial_url = str_replace(' ', '+', serialize($val));
     return Current_User::verifyAuthKey($serial_url);
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:9,代碼來源:Current_User.php


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