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


PHP SPRequest::int方法代码示例

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


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

示例1: load

 private function load($task)
 {
     $db =& SPFactory::db();
     $adm = defined('SOBIPRO_ADM') ? 'adm.' : null;
     $cond = array($adm . '*', $adm . $task);
     if (strstr($task, '.')) {
         $t = explode('.', $task);
         $cond[] = $adm . $t[0] . '.*';
         $task = $t[0] . '.' . $t[1];
     }
     $this->_actions[$task] = null;
     try {
         $pids = $db->select('pid', 'spdb_plugin_task', array('onAction' => $cond))->loadResultArray();
     } catch (SPException $x) {
         Sobi::Error('Plugins', $x->getMessage(), SPC::WARNING, 0, __LINE__, __FILE__);
     }
     if (!count($pids)) {
         $this->_actions[$task] = array();
     }
     // get section depend apps
     if (Sobi::Section() && count($pids)) {
         try {
             $this->_actions[$task] = $db->select('pid', 'spdb_plugin_section', array('section' => Sobi::Section(), 'enabled' => 1, 'pid' => $pids))->loadResultArray();
         } catch (SPException $x) {
             Sobi::Error('Plugins', $x->getMessage(), SPC::WARNING, 0, __LINE__, __FILE__);
         }
     } elseif (!(SPRequest::sid() || SPRequest::int('pid'))) {
         $this->_actions[$task] = $pids;
     }
     // here is a special exception for the custom listings
     // it can be l.alpha or list.alpha or listing.alpha
     if (preg_match('/^list\\..*/', $task) || preg_match('/^l\\..*/', $task)) {
         $this->_actions['listing' . '.' . $t[1]] = $pids;
     }
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:35,代码来源:interface.php

示例2: edit

 /**
  */
 private function edit()
 {
     $id = $this->get('entry.id');
     if ($id) {
         $this->addHidden($id, 'entry.id');
     }
     $sid = SPRequest::int('pid') ? SPRequest::int('pid') : SPRequest::sid();
     $this->assign(Sobi::Url(array('task' => 'category.chooser', 'sid' => $sid, 'out' => 'html', 'multiple' => 1), true), 'cat_chooser_url');
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:11,代码来源:entry.php

示例3: search

 protected function search()
 {
     if (!SPFactory::mainframe()->checkToken()) {
         Sobi::Error('Token', SPLang::e('UNAUTHORIZED_ACCESS_TASK', SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
     }
     //		$selected = SPRequest::int( 'selected', 0 );
     $ssid = SPRequest::base64('ssid');
     $query = SPRequest::string('q', null);
     $session = SPFactory::user()->getUserState('userSelector', null, array());
     $setting = $session[$ssid];
     /* get the site to display */
     $site = SPRequest::int('site', 1);
     $eLim = Sobi::Cfg('user_selector.entries_limit', 18);
     $eLimStart = ($site - 1) * $eLim;
     $params = array();
     if ($query) {
         $q = '%' . $query . '%';
         $params = SPFactory::db()->where(array('name' => $q, 'username' => $q, 'email' => $q), 'OR');
     }
     try {
         $count = SPFactory::db()->select('COUNT(*)', '#__users', $params, $setting['ordering'])->loadResult();
         $data = SPFactory::db()->select(array('id', 'name', 'username', 'email', 'registerDate', 'lastvisitDate'), '#__users', $params, $setting['ordering'], $eLim, $eLimStart)->loadAssocList();
     } catch (SPException $x) {
         echo $x->getMessage();
         exit;
     }
     $response = array('sites' => ceil($count / $eLim), 'site' => $site);
     if (count($data)) {
         $replacements = array();
         preg_match_all('/\\%[a-z]*/', $setting['format'], $replacements);
         $placeholders = array();
         if (isset($replacements[0]) && count($replacements[0])) {
             foreach ($replacements[0] as $placeholder) {
                 $placeholders[] = str_replace('%', null, $placeholder);
             }
         }
         if (count($replacements)) {
             foreach ($data as $index => $user) {
                 $txt = $setting['format'];
                 foreach ($placeholders as $attribute) {
                     if (isset($user[$attribute])) {
                         $txt = str_replace('%' . $attribute, $user[$attribute], $txt);
                     }
                 }
                 $data[$index]['text'] = $txt;
             }
         }
         $response['users'] = $data;
     }
     SPFactory::mainframe()->cleanBuffer();
     echo json_encode($response);
     exit;
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:53,代码来源:user.php

示例4: view

 /**
  */
 protected function view()
 {
     /* determine template package */
     $tplPackage = Sobi::Cfg('section.template', SPC::DEFAULT_TEMPLATE);
     Sobi::ReturnPoint();
     /* load template config */
     $this->template();
     $this->tplCfg($tplPackage);
     /* get limits - if defined in template config - otherwise from the section config */
     $eLimit = $this->tKey($this->template, 'entries_limit', Sobi::Cfg('list.entries_limit', 2));
     $eInLine = $this->tKey($this->template, 'entries_in_line', Sobi::Cfg('list.entries_in_line', 2));
     $cInLine = $this->tKey($this->template, 'categories_in_line', Sobi::Cfg('list.categories_in_line', 2));
     $cLim = $this->tKey($this->template, 'categories_limit', -1);
     $entriesRecursive = $this->tKey($this->template, 'entries_recursive', Sobi::Cfg('list.entries_recursive', false));
     /* get the site to display */
     $site = SPRequest::int('site', 1);
     $eLimStart = ($site - 1) * $eLimit;
     /* get the right ordering */
     $eOrder = $this->parseOrdering('entries', 'eorder', $this->tKey($this->template, 'entries_ordering', Sobi::Cfg('list.entries_ordering', 'name.asc')));
     $cOrder = $this->parseOrdering('categories', 'corder', $this->tKey($this->template, 'categories_ordering', Sobi::Cfg('list.categories_ordering', 'name.asc')));
     $orderings = array('entries' => $eOrder, 'categories' => $cOrder);
     /* get entries */
     $eCount = count($this->getEntries($eOrder, 0, 0, true, null, $entriesRecursive));
     $entries = $this->getEntries($eOrder, $eLimit, $eLimStart, false, null, $entriesRecursive);
     $categories = array();
     if ($cLim) {
         $categories = $this->getCats($cOrder, $cLim);
     }
     /* create page navigation */
     $url = array('sid' => SPRequest::sid(), 'title' => Sobi::Cfg('sef.alias', true) ? $this->_model->get('nid') : $this->_model->get('name'));
     if (SPRequest::cmd('sptpl')) {
         $url['sptpl'] = SPRequest::cmd('sptpl');
     }
     $pnc = SPLoader::loadClass('helpers.pagenav_' . $this->tKey($this->template, 'template_type', 'xslt'));
     /* @var SPPageNavXSLT $pn */
     $pn = new $pnc($eLimit, $eCount, $site, array('sid' => SPRequest::sid(), 'title' => Sobi::Cfg('sef.alias', true) ? $this->_model->get('nid') : $this->_model->get('name')));
     /* handle meta data */
     SPFactory::header()->objMeta($this->_model);
     /* add pathway */
     SPFactory::mainframe()->addObjToPathway($this->_model, array(ceil($eCount / $eLimit), $site));
     $this->_model->countVisit();
     /* get view class */
     //		$class = SPLoader::loadView( $this->_type );
     $view = SPFactory::View($this->_type);
     //		$view = new $class( $this->template );
     $view->assign($eLimit, '$eLimit')->assign($eLimStart, '$eLimStart')->assign($eCount, '$eCount')->assign($cInLine, '$cInLine')->assign($eInLine, '$eInLine')->assign($this->_task, 'task')->assign($this->_model, $this->_type)->setConfig($this->_tCfg, $this->template)->setTemplate($tplPackage . '.' . $this->templateType . '.' . $this->template)->assign($categories, 'categories')->assign($pn->get(), 'navigation')->assign(SPFactory::user()->getCurrent(), 'visitor')->assign($entries, 'entries')->assign($orderings, 'orderings');
     Sobi::Trigger($this->name(), 'View', array(&$view));
     $view->display($this->_type);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:51,代码来源:section.php

示例5: execute

 public function execute()
 {
     $this->start = microtime(true);
     $sites = $this->getSites();
     $responses = array();
     $status = 'working';
     $message = null;
     $this->format = SPRequest::bool('fullFormat') ? self::FORMAT_FULL : self::FORMAT;
     //		$this->format = SPRequest::bool( 'fullFormat' ) ? self::FORMAT_FULL : self::FORMAT_FULL;
     $task = SPRequest::task();
     if (in_array($task, array('crawler.init', 'crawler.restart'))) {
         if ($task == 'crawler.restart') {
             SPFactory::cache()->cleanSection(Sobi::Section());
         }
         SPFactory::db()->truncate(self::DB_TABLE);
         $multiLang = Sobi::Cfg('lang.multimode', false);
         if ($multiLang) {
             $langs = SPFactory::CmsHelper()->getLanguages();
             if ($multiLang && $langs) {
                 foreach ($langs as $lang) {
                     $responses[] = $this->getResponse(Sobi::Cfg('live_site') . 'index.php?option=com_sobipro&sid=' . Sobi::Section() . '&lang=' . $lang);
                 }
             }
         }
         $responses[] = $this->getResponse(Sobi::Cfg('live_site') . 'index.php?option=com_sobipro&sid=' . Sobi::Section());
         $sites = $this->getSites();
     }
     if (!count($sites) && !in_array($task, array('crawler.init', 'crawler.restart'))) {
         $message = Sobi::Txt('CRAWL_URL_PARSED_DONE', SPFactory::db()->select('count(*)', self::DB_TABLE)->loadResult());
         SPFactory::db()->truncate(self::DB_TABLE);
         $this->response(array('status' => 'done', 'data' => array(), 'message' => $message));
     }
     if (count($sites)) {
         $i = 0;
         $timeLimit = SPRequest::int('timeLimit', self::TIME_LIMIT, 'get', true);
         foreach ($sites as $site) {
             if (!strlen($site)) {
                 continue;
             }
             $responses[] = $this->getResponse($site);
             $i++;
             if (microtime(true) - $this->start > $timeLimit) {
                 break;
             }
         }
         $message = Sobi::Txt('CRAWL_URL_PARSED_WORKING', $i, count($sites));
     }
     $this->response(array('status' => $status, 'data' => $responses, 'message' => $message));
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:49,代码来源:crawler.php

示例6: functions

 public function functions()
 {
     $functions = $this->get('functions');
     $out = array();
     $section = SPRequest::int('section');
     $out[] = '<form action="index.php" method="post">';
     $out[] = SPHtml_Input::select('function', $functions, null, false, array('id' => 'SobiProFunctions'));
     $out[] = '<input type="hidden" name="option" value="com_sobipro">';
     $out[] = '<input type="hidden" name="task" value="menu">';
     $out[] = '<input type="hidden" name="tmpl" value="component">';
     $out[] = '<input type="hidden" name="format" value="html">';
     $out[] = '<input type="hidden" name="mid" value="' . SPRequest::int('mid') . '">';
     $out[] = '<input type="hidden" name="section" value="' . $section . '">';
     $out[] = '</form>';
     echo implode("\n", $out);
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:16,代码来源:joomla-menu.php

示例7: js

 protected function js()
 {
     $lang = SPLang::jsLang(true);
     if (count($lang)) {
         foreach ($lang as $term => $text) {
             unset($lang[$term]);
             $term = str_replace('SP.JS_', null, $term);
             $lang[$term] = $text;
         }
     }
     if (!SPRequest::int('deb')) {
         SPFactory::mainframe()->cleanBuffer();
         header('Content-type: text/javascript');
     }
     echo 'SobiPro.setLang( ' . json_encode($lang) . ' );';
     exit;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:17,代码来源:txt.php

示例8: getTemplates

 protected function getTemplates($type)
 {
     $templates = array();
     $templates[''] = Sobi::Txt('SELECT_TEMPLATE_OVERRIDE');
     $template = SPFactory::db()->select('sValue', 'spdb_config', array('section' => SPRequest::int('section'), 'sKey' => 'template', 'cSection' => 'section'))->loadResult();
     $templateDir = $this->templatePath($template);
     $this->listTemplates($templates, $templateDir, $type);
     return $templates;
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:9,代码来源:menu.php

示例9: execute

 /**
  * Route task
  */
 public function execute()
 {
     /* parent class executes the plugins */
     $r = false;
     $task = $this->_task;
     if (strstr($this->_task, '.')) {
         $task = explode('.', $this->_task);
         $this->_fieldType = $task[1];
         $task = $task[0];
     }
     switch ($task) {
         case 'list':
             $r = true;
             $this->listFields();
             break;
         case 'add':
         case 'edit':
             $r = true;
             $this->edit();
             break;
         case 'cancel':
             $r = true;
             $this->checkIn();
             $this->response(Sobi::Back());
             break;
         case 'addNew':
             $r = true;
             Sobi::Redirect(Sobi::Url(array('task' => 'field.edit', 'fid' => $this->saveNew(), 'sid' => SPRequest::sid())));
             break;
         case 'apply':
         case 'save':
             $r = true;
             $this->save();
             break;
         case 'clone':
             $r = true;
             $this->save(true);
             break;
         case 'delete':
             $r = true;
             SPFactory::cache()->cleanSection();
             $this->response(Sobi::Url(array('task' => 'field.list', 'pid' => Sobi::Section())), $this->delete(), true);
             break;
         case 'reorder':
             $r = true;
             $this->reorder();
             break;
         case 'revisions':
             $r = true;
             $this->revisions();
             break;
         case 'up':
         case 'down':
             $r = true;
             $this->singleReorder($this->_task == 'up');
             break;
         case 'hide':
         case 'publish':
         case 'setRequired':
         case 'setNotRequired':
         case 'setEditable':
         case 'setNotEditable':
         case 'setFee':
         case 'setFree':
         case 'toggle':
             $r = true;
             $this->authorise($this->_task);
             SPFactory::cache()->cleanSection();
             $this->response(Sobi::Back(), $this->changeState($task), true);
             break;
         default:
             /* case plugin didn't registered this task, it was an error */
             if (!Sobi::Trigger('Execute', $this->name(), array(&$this))) {
                 $fid = SPRequest::int('fid');
                 $method = $this->_task;
                 if ($fid) {
                     SPLoader::loadModel('field', true);
                     $fdata = $this->loadField($fid);
                     $field = new SPAdmField();
                     $field->extend($fdata);
                     try {
                         $field->{$method}();
                     } catch (SPException $x) {
                         Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
                     }
                 } elseif (!parent::execute()) {
                     Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
                 }
             }
             break;
     }
     return $r;
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:96,代码来源:field.php

示例10: getSection

 /**
  * get the right section
  * @return void
  */
 private function getSection()
 {
     $pid = SPRequest::int('pid');
     $pid = $pid ? $pid : $this->_sid;
     if ($pid) {
         $this->_model = SPFactory::object($pid);
         /** @noinspection PhpParamsInspection
          * @var $this ->_model stdClass
          */
         if ($this->_model->oType == 'section') {
             $this->_section = $this->_model->id;
         } else {
             $db = SPFactory::db();
             $path = array();
             $id = $pid;
             while ($id > 0) {
                 try {
                     $db->select('pid', 'spdb_relations', array('id' => $id));
                     $id = $db->loadResult();
                     if ($id) {
                         $path[] = (int) $id;
                     }
                 } catch (SPException $x) {
                     Sobi::Error('CoreCtrl', SPLang::e('DB_REPORTS_ERR', $x->getMessage()), SPC::ERROR, 500, __LINE__, __FILE__);
                 }
             }
             $path = array_reverse($path);
             $this->_section = $path[0];
         }
     } else {
         $this->_section = '0';
     }
     SPFactory::registry()->set('current_section', $this->_section);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:38,代码来源:sobipro.php

示例11: save

 public function save($attr)
 {
     /* @var SPdb $db */
     $db = SPFactory::db();
     $base = $attr;
     $this->loadType();
     /* clean input */
     if (isset($attr['name'])) {
         $base['name'] = $db->escape($attr['name']);
     } else {
         $base['name'] = 'missing name - something went wrong';
     }
     if (isset($attr['nid'])) {
         $base['nid'] = $this->nid($db->escape(preg_replace('/[^[:alnum:]\\-\\_]/', null, $attr['nid'])), false);
     }
     if (isset($attr['cssClass'])) {
         $base['cssClass'] = $db->escape(preg_replace('/[^[:alnum:]\\-\\_ ]/', null, $attr['cssClass']));
     }
     if (isset($attr['notice'])) {
         $base['notice'] = $attr['notice'];
     }
     if (isset($attr['showIn'])) {
         $base['showIn'] = $db->escape(preg_replace('/[^[:alnum:]\\.\\-\\_]/', null, $attr['showIn']));
     }
     if (isset($attr['filter'])) {
         $base['filter'] = preg_replace('/[^[:alnum:]\\.\\-\\_]/', null, $attr['filter']);
     }
     if (isset($attr['fieldType'])) {
         $base['fieldType'] = preg_replace('/[^[:alnum:]\\.\\-\\_]/', null, $attr['fieldType']);
     }
     if (isset($attr['type'])) {
         $base['fieldType'] = preg_replace('/[^[:alnum:]\\.\\-\\_]/', null, $attr['type']);
     }
     if (isset($attr['enabled'])) {
         $base['enabled'] = (int) $attr['enabled'];
     }
     if (isset($attr['required'])) {
         $base['required'] = (int) $attr['required'];
     }
     if (isset($attr['adminField'])) {
         $base['adminField'] = (int) $attr['adminField'];
     }
     if ($attr['adminField']) {
         $attr['required'] = false;
     }
     if (isset($attr['editable'])) {
         $base['editable'] = (int) $attr['editable'];
     }
     if (isset($attr['inSearch'])) {
         $base['inSearch'] = (int) $attr['inSearch'];
     }
     if (isset($attr['editLimit'])) {
         $base['editLimit'] = (int) $attr['editLimit'];
     }
     $base['editLimit'] = isset($base['editLimit']) && $base['editLimit'] > 0 ? $base['editLimit'] : -1;
     if (isset($attr['isFree'])) {
         $base['isFree'] = (int) $attr['isFree'];
     }
     if (isset($attr['withLabel'])) {
         $base['withLabel'] = (int) $attr['withLabel'];
     }
     if (isset($attr['fee'])) {
         $base['fee'] = (double) str_replace(',', '.', $attr['fee']);
     }
     if (isset($attr['addToMetaDesc'])) {
         $base['addToMetaDesc'] = (int) $attr['addToMetaDesc'];
     }
     if (isset($attr['addToMetaKeys'])) {
         $base['addToMetaKeys'] = (int) $attr['addToMetaKeys'];
     }
     if (isset($attr['uniqueData'])) {
         $base['uniqueData'] = (int) $attr['uniqueData'];
     }
     /* both strpos are removed because it does not allow to have one parameter only */
     //      if( isset( $attr[ 'allowedAttributes' ] ) && strpos( $attr[ 'allowedAttributes' ], '|' ) )
     if (isset($attr['allowedAttributes'])) {
         $att = SPFactory::config()->structuralData($attr['allowedAttributes'], true);
         if (count($att)) {
             foreach ($att as $i => $k) {
                 $att[$i] = trim($k);
             }
         }
         $base['allowedAttributes'] = SPConfig::serialize($att);
     }
     if (isset($attr['allowedTags'])) {
         $tags = SPFactory::config()->structuralData($attr['allowedTags'], true);
         if (count($tags)) {
             foreach ($tags as $i => $k) {
                 $tags[$i] = trim($k);
             }
         }
         $base['allowedTags'] = SPConfig::serialize($tags);
     }
     if (isset($attr['admList'])) {
         $base['admList'] = (int) $attr['admList'];
     }
     if (isset($attr['description'])) {
         $base['description'] = $attr['description'];
     } else {
         $base['description'] = null;
//.........这里部分代码省略.........
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:101,代码来源:field.php

示例12: languages

 public function languages()
 {
     $subMenu = array();
     if (Sobi::Cfg('lang.multimode', false)) {
         $availableLanguages = SPFactory::CmsHelper()->availableLanguages();
         $sectionLength = 30;
         if (count($availableLanguages)) {
             $sid = SPRequest::sid();
             if (!$sid) {
                 $sid = Sobi::Section();
             }
             $subMenu = array();
             $task = SPRequest::task();
             $url = array('sid' => $sid, 'task' => $task, 'sp-language' => null);
             if ($task == 'field.edit') {
                 $url = array('sid' => $sid, 'task' => $task, 'fid' => SPRequest::int('fid'), 'sp-language' => null);
             }
             foreach ($availableLanguages as $language) {
                 $url['sp-language'] = $language['tag'];
                 $subMenu[] = array('type' => 'url', 'task' => '', 'url' => $url, 'label' => strlen($language['name']) < $sectionLength ? $language['name'] : substr($language['name'], 0, $sectionLength - 3) . ' ...', 'icon' => 'file', 'element' => 'button', 'selected' => $language['tag'] == Sobi::Lang());
             }
         }
     }
     return $subMenu;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:25,代码来源:view.php

示例13: view

 protected function view()
 {
     /* determine template package */
     $tplPckg = Sobi::Cfg('section.template', SPC::DEFAULT_TEMPLATE);
     Sobi::ReturnPoint();
     $this->_task = 'alpha';
     if (!$this->_model) {
         $this->setModel('section');
         $this->_model->init(Sobi::Section());
     }
     $this->visible();
     /* load template config */
     $this->template();
     $this->tplCfg($tplPckg);
     /* get limits - if defined in template config - otherwise from the section config */
     $eLimit = $this->tKey($this->template, 'entries_limit', Sobi::Cfg('list.entries_limit', 2));
     $eInLine = $this->tKey($this->template, 'entries_in_line', Sobi::Cfg('list.entries_in_line', 2));
     /* get the site to display */
     $site = SPRequest::int('site', 1);
     $eLimStart = ($site - 1) * $eLimit;
     $eCount = count($this->getEntries(0, 0, true));
     $entries = $this->getEntries($eLimit, $site);
     $compare = $this->_field ? $this->_field : $this->_nid;
     if (strlen($compare) && $compare != Sobi::Cfg('alphamenu.primary_field')) {
         $t = 'list.alpha.' . strtolower($this->_letter) . '.' . $this->_nid;
     } else {
         $t = 'list.alpha.' . strtolower($this->_letter);
     }
     $pn = SPFactory::Instance('helpers.pagenav_' . $this->tKey($this->template, 'template_type', 'xslt'), $eLimit, $eCount, $site, array('sid' => SPRequest::sid(), 'task' => $t));
     $cUrl = array('sid' => SPRequest::sid(), 'task' => $t);
     if (SPRequest::int('site', 0)) {
         $cUrl['site'] = SPRequest::int('site', 0);
     }
     SPFactory::header()->addCanonical(Sobi::Url($cUrl, true, true, true));
     /* handle meta data */
     SPFactory::header()->objMeta($this->_model);
     $letter = urldecode(SPRequest::cmd('letter'));
     /* add pathway */
     if (!$this->_fieldType) {
         SPFactory::mainframe()->addToPathway(Sobi::Txt('AL.PATH_TITLE', array('letter' => $letter)), Sobi::Url('current'));
         SPFactory::header()->addTitle(Sobi::Txt('AL.TITLE', array('letter' => $letter, 'section' => $this->_model->get('name'))), array(ceil($eCount / $eLimit), $site));
     } else {
         $field = SPFactory::Model('field');
         $field->init($this->_field);
         SPFactory::mainframe()->addToPathway(Sobi::Txt('AL.PATH_TITLE_FIELD', array('letter' => $letter, 'field' => $field->get('name'))), Sobi::Url('current'));
         SPFactory::header()->addTitle(Sobi::Txt('AL.TITLE_FIELD', array('letter' => $letter, 'section' => $this->_model->get('name'), 'field' => $field->get('name'))), array(ceil($eCount / $eLimit), $site));
     }
     /* get view class */
     $view = SPFactory::View('listing');
     $view->assign($eLimit, '$eLimit');
     $view->assign($eLimStart, '$eLimStart');
     $view->assign($eCount, '$eCount');
     $view->assign($eInLine, '$eInLine');
     $view->assign($this->_task, 'task');
     $view->assign($this->_model, 'section');
     $view->assign(Sobi::Txt('AL.PATH_TITLE', array('letter' => $this->_letter)), 'listing_name');
     $view->setConfig($this->_tCfg, $this->template);
     $view->setTemplate($tplPckg . '.' . $this->templateType . '.' . $this->template);
     $view->assign($pn->get(), 'navigation');
     $view->assign(SPFactory::user()->getCurrent(), 'visitor');
     $view->assign($entries, 'entries');
     Sobi::Trigger('AlphaListing', 'View', array(&$view));
     $view->display();
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:64,代码来源:alpha.php

示例14: customOutput

 protected function customOutput($output)
 {
     $header = $this->key('output.header', false);
     if ($this->key('output.clear', false)) {
         SPFactory::mainframe()->cleanBuffer();
     }
     if (strlen($header)) {
         header($header);
     }
     if (SPRequest::int('crawl')) {
         header('SobiPro: ' . Sobi::Section());
     }
     echo $output;
     if ($this->key('output.close', false)) {
         exit;
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:17,代码来源:view.php

示例15: screen

 private function screen()
 {
     $eLimit = Sobi::GetUserState('adm.errors.limit', 'elimit', Sobi::Cfg('adm_list.entries_limit', 25));
     $eLimStart = SPRequest::int('errSite', 1);
     $LimStart = $eLimStart ? ($eLimStart - 1) * $eLimit : $eLimStart;
     $eCount = 0;
     try {
         $eCount = SPFactory::db()->select('COUNT(eid)', 'spdb_errors')->loadResult();
     } catch (SPException $x) {
     }
     if ($eLimit == -1) {
         $eLimit = $eCount;
     }
     try {
         $errors = SPFactory::db()->select(array('eid', 'date', 'errNum', 'errCode', 'errFile', 'errLine', 'errMsg', 'errUid', 'errSect', 'errReq'), 'spdb_errors', null, 'eid.desc', $eLimit, $LimStart)->loadAssocList();
     } catch (SPException $x) {
     }
     $l = $this->levels();
     $menu = $this->createMenu('error');
     /** @var $view SPAdmView */
     SPFactory::View('error', true)->assign($this->_task, 'task')->assign($menu, 'menu')->assign($errors, 'errors')->assign($l, 'levels')->assign($eLimit, 'errors-limit')->assign($eCount, 'errors-count')->assign($eLimStart, 'errors-site')->display();
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:22,代码来源:error.php


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