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


PHP helper::createLink方法代码示例

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


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

示例1: notify

 /**
  * show notify in msgBox.
  * 
  * @access public
  * @return string
  */
 public function notify()
 {
     $messages = $this->dao->select('COUNT(*) as count')->from(TABLE_MESSAGE)->where('`to`')->eq($this->app->user->account)->andWhere('readed')->eq(0)->fetch('count');
     if ($messages) {
         echo html::a(helper::createLink('user', 'message'), sprintf($this->lang->user->message->mine, $messages));
     }
 }
开发者ID:mustafakarali,项目名称:b2c-1,代码行数:13,代码来源:control.php

示例2: index

 /**
  * links profile.
  * 
  * @access public
  * @return void
  */
 public function index()
 {
     $this->view->links = $this->config->links;
     $this->view->mobileURL = helper::createLink('links', 'index', '', '', 'mhtml');
     $this->view->desktopURL = helper::createLink('links', 'index', '', '', 'html');
     $this->display();
 }
开发者ID:eric0614,项目名称:chanzhieps,代码行数:13,代码来源:control.php

示例3: createModuleMenu

 public function createModuleMenu($method)
 {
     if (!isset($this->lang->my->{$method}->menu)) {
         return false;
     }
     $string = "<nav id='menu'><ul class='nav'>\n";
     /* Get menus of current module and current method. */
     $moduleMenus = $this->lang->my->{$method}->menu;
     $currentMethod = $this->app->getMethodName();
     /* Cycling to print every menus of current module. */
     foreach ($moduleMenus as $methodName => $methodMenu) {
         /* Split the methodMenu to label, module, method, vars. */
         list($label, $module, $method, $vars) = explode('|', $methodMenu);
         $class = '';
         if ($method == $currentMethod) {
             $class = "class='active'";
         }
         $hasPriv = commonModel::hasPriv($module, $method);
         if ($module == 'my' and $method == 'order') {
             $hasPriv = commonModel::hasPriv('order', 'browse');
         }
         if ($module == 'my' and $method == 'contract') {
             $hasPriv = commonModel::hasPriv('contract', 'browse');
         }
         if ($hasPriv) {
             $string .= "<li {$class}>" . html::a(helper::createLink($module, $method, $vars), $label) . "</li>\n";
         }
     }
     $string .= "</ul></nav>\n";
     return $string;
 }
开发者ID:leowh,项目名称:colla,代码行数:31,代码来源:model.php

示例4: board

 /**
  * The board page.
  * 
  * @param int    $boardID       the board id
  * @param int    $pageID        the current page id
  * @access public
  * @return void
  */
 public function board($boardID = 0, $pageID = 1)
 {
     $board = $this->loadModel('tree')->getByID($boardID, 'forum');
     if (!$board) {
         die(js::locate('back'));
     }
     if ($board->link) {
         helper::header301($board->link);
     }
     /* Get common threads. */
     $recPerPage = !empty($this->config->site->forumRec) ? $this->config->site->forumRec : $this->config->forum->recPerPage;
     $this->app->loadClass('pager', $static = true);
     $pager = new pager(0, $recPerPage, $pageID);
     $threads = $this->loadModel('thread')->getList($board->id, $orderBy = 'repliedDate_desc', $pager);
     $this->view->title = $board->name;
     $this->view->keywords = $board->keywords . '' . $this->config->site->keywords;
     $this->view->desc = strip_tags($board->desc);
     $this->view->board = $board;
     $this->view->sticks = $this->thread->getSticks($board->id);
     $this->view->threads = $threads;
     $this->view->pager = $pager;
     $this->view->mobileURL = helper::createLink('forum', 'board', "borderID={$boardID}&pageID={$pageID}", "category={$board->alias}", 'mhtml');
     $this->view->desktopURL = helper::createLink('forum', 'board', "borderID={$boardID}&pageID={$pageID}", "category={$board->alias}", 'html');
     $this->display();
 }
开发者ID:dyp8848,项目名称:chanzhieps,代码行数:33,代码来源:control.php

示例5: index

 /**
  * index 
  * 
  * @param  int    $words 
  * @param  int    $pageID 
  * @access public
  * @return void
  */
 public function index($words = '', $pageID = 1)
 {
     if (empty($words)) {
         $words = $this->get->words;
     }
     $words = strip_tags(strtolower($words));
     if (isset($this->config->cn2tw) and $this->config->cn2tw and $this->app->getClientLang() == 'zh-tw') {
         $this->app->loadClass('cn2tw', true);
         $words = cn2tw::reverse($words);
     }
     $this->app->loadClass('pager', $static = true);
     $pager = new pager($recTotal = 0, $this->config->search->recPerPage, $pageID);
     $this->session->set('serachIngWord', $words);
     $begin = time();
     $this->view->results = $this->search->getList($words, $pager);
     /* Record post number. */
     $this->loadModel('guarder')->logOperation('ip', 'search');
     $this->loadModel('guarder')->logOperation('account', 'search');
     $this->view->consumed = time() - $begin;
     $this->view->title = $this->lang->search->index;
     $this->view->pager = $pager;
     $this->view->words = $words;
     $this->view->mobileURL = helper::createLink('search', 'index', "words={$words}&pageID={$pageID}", '', 'mhtml');
     $this->view->desktopURL = helper::createLink('search', 'index', "words={$words}&pageID={$pageID}", '', 'html');
     $this->display();
 }
开发者ID:hansen1416,项目名称:eastsoft,代码行数:34,代码来源:control.php

示例6: printFiles

 /**
  * Print files.
  * 
  * @param  object $files 
  * @access public
  * @return void
  * @todo fix style.
  */
 public function printFiles($files)
 {
     if (empty($files)) {
         return false;
     }
     $imagesHtml = '';
     $filesHtml = '';
     foreach ($files as $file) {
         if ($file->editor) {
             continue;
         }
         if ($file->isVideo) {
             continue;
         }
         $file->title = $file->title . ".{$file->extension}";
         $fileMD5 = md5_file(rtrim($this->app->getWwwRoot(), '/') . $file->fullURL);
         if ($file->isImage) {
             if ($file->objectType == 'product') {
                 continue;
             }
             $imagesHtml .= "<li class='file-image file-{$file->extension}'>" . html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), html::image($file->smallURL), "target='_blank' data-toggle='lightbox' data-img-width='{$file->width}' data-img-height='{$file->height}' title='{$file->title}'") . '</li>';
         } else {
             $filesHtml .= "<li class='file file-{$file->extension}'>";
             $filesHtml .= html::a(helper::createLink('file', 'download', "fileID={$file->id}&mouse=left"), $file->title, "target='_blank' title='{$file->title}'");
             $filesHtml .= "<span class='file-download'><i class='icon-download'></i> " . $file->downloads . "</span>";
             $filesHtml .= "<span class='file-md5'>";
             $filesHtml .= html::a('javascript:void(0)', 'MD5', "class='label' data-toggle='popover' data-placement='bottom' data-content='{$fileMD5}'");
             $filesHtml .= '</span></li>';
         }
     }
     echo "<ul class='files-list clearfix'>" . $imagesHtml . $filesHtml . '</ul>';
 }
开发者ID:peirancao,项目名称:chanzhieps,代码行数:40,代码来源:model.php

示例7: request

 /**
  * Request the api.
  * 
  * @param  string $moduleName 
  * @param  string $methodName 
  * @param  string $action 
  * @access public
  * @return void
  */
 public function request($moduleName, $methodName, $action)
 {
     $host = common::getSysURL() . $this->config->webRoot;
     $param = '';
     if ($action == 'extendModel') {
         if (!isset($_POST['noparam'])) {
             foreach ($_POST as $key => $value) {
                 $param .= ',' . $key . '=' . $value;
             }
             $param = ltrim($param, ',');
         }
         $url = rtrim($host, '/') . inlink('getModel', "moduleName={$moduleName}&methodName={$methodName}&params={$param}", 'json');
         $url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
         $url .= $this->config->sessionVar . '=' . session_id();
     } else {
         if (!isset($_POST['noparam'])) {
             foreach ($_POST as $key => $value) {
                 $param .= '&' . $key . '=' . $value;
             }
             $param = ltrim($param, '&');
         }
         $url = rtrim($host, '/') . helper::createLink($moduleName, $methodName, $param, 'json');
         $url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
         $url .= $this->config->sessionVar . '=' . session_id();
     }
     /* Unlock session. After new request, restart session. */
     session_write_close();
     $content = file_get_contents($url);
     session_start();
     return array('url' => $url, 'content' => $content);
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:40,代码来源:model.php

示例8: contact

 /**
  * company contact.
  *
  * @access public
  * @return void
  */
 public function contact()
 {
     $this->view->title = $this->lang->company->contact;
     $this->view->contact = $this->company->getContact();
     $this->view->mobileURL = helper::createLink('company', 'contact', '', '', 'mhtml');
     $this->view->desktopURL = helper::createLink('company', 'contact', '', '', 'html');
     $this->display();
 }
开发者ID:dyp8848,项目名称:chanzhieps,代码行数:14,代码来源:control.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     if (RUN_MODE == 'admin') {
         $this->view->treeModuleMenu = $this->loadModel('tree')->getTreeMenu('product', 0, array('treeModel', 'createAdminLink'));
         $this->view->treeManageLink = html::a(helper::createLink('tree', 'browse', "type=product"), $this->lang->tree->manage);
     }
 }
开发者ID:mustafakarali,项目名称:b2c-1,代码行数:8,代码来源:control.php

示例10: browse

 /**
  * Browse products in my address.
  * 
  * @access public
  * @return void
  */
 public function browse()
 {
     $this->app->loadLang('user');
     $this->view->title = $this->lang->address->browse;
     $this->view->addresses = $this->address->getListByAccount($this->app->user->account);
     $this->view->mobileURL = helper::createLink('address', 'browse', '', '', 'mhtml');
     $this->view->desktopURL = helper::createLink('address', 'browse', '', '', 'html');
     $this->display();
 }
开发者ID:eric0614,项目名称:chanzhieps,代码行数:15,代码来源:control.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     if (RUN_MODE == 'admin') {
         $this->view->treeModuleMenu = $this->loadModel('tree')->getTreeMenu('product', 0, array('treeModel', 'createAdminLink'));
         $this->view->treeManageLink = html::a(helper::createLink('product', 'setting'), $this->lang->product->setting, "data-toggle='modal'");
         $this->view->treeManageLink .= '&nbsp;&nbsp;' . html::a(helper::createLink('tree', 'browse', "type=product"), $this->lang->tree->manage);
     }
 }
开发者ID:peirancao,项目名称:chanzhieps,代码行数:9,代码来源:control.php

示例12: index

 /**
  * The index page of whole site.
  * 
  * @access public
  * @return void
  */
 public function index($categoryID = 0, $pageID = 1)
 {
     if (isset($this->config->site->type) and $this->config->site->type == 'blog') {
         $param = ($categoryID == 0 and $pageID == 1) ? '' : "categoryID={$categoryID}&pageID={$pageID}";
         $this->locate($this->createLink('blog', 'index', $param));
     }
     $this->view->title = $this->config->site->indexKeywords;
     $this->view->mobileURL = helper::createLink('index', 'index', '', '', 'mhtml');
     $this->view->desktopURL = helper::createLink('index', 'index', '', '', 'html');
     $this->display();
 }
开发者ID:dyp8848,项目名称:chanzhieps,代码行数:17,代码来源:control.php

示例13: browse

 /**
  * Browse products in my cart.
  * 
  * @access public
  * @return void
  */
 public function browse()
 {
     $this->app->loadLang('product');
     $this->app->loadConfig('product');
     $this->app->loadLang('order');
     $this->view->currencySymbol = $this->config->product->currencySymbol;
     $this->view->title = $this->lang->cart->browse;
     $this->view->products = $this->cart->getListByAccount($this->app->user->account);
     $this->view->mobileURL = helper::createLink('cart', 'browse', '', '', 'mhtml');
     $this->view->desktopURL = helper::createLink('cart', 'browse', '', '', 'html');
     $this->display();
 }
开发者ID:wenyinos,项目名称:chanzhieps,代码行数:18,代码来源:control.php

示例14: admin

 /**
  * Browse slides in admin.
  * 
  * @access public
  * @return void
  */
 public function admin($groupID = '')
 {
     if (!$groupID) {
         $firstGroup = $this->loadModel('tree')->getFirst('slide');
         $groupID = $firstGroup->id;
     }
     $this->view->title = $this->lang->slide->admin;
     $this->view->group = $groupID;
     $this->view->slides = $this->slide->getList($groupID);
     $this->view->treeModuleMenu = $this->loadModel('tree')->getTreeMenu('slide', 0, array('treeModel', 'createSlideAdminLink'));
     $this->view->treeManageLink = html::a(helper::createLink('tree', 'browse', "type=slide"), $this->lang->slideGroup->manage);
     $this->display();
 }
开发者ID:AlenWon,项目名称:chanzhieps,代码行数:19,代码来源:control.php

示例15: view

 /**
  * View an page.
  * 
  * @param  int      $pageID 
  * @access public
  * @return void
  */
 public function view($pageID)
 {
     $page = $this->loadModel('article')->getPageByID($pageID);
     $title = $page->title;
     $keywords = $page->keywords . ' ' . $this->config->site->keywords;
     $desc = $page->summary;
     $this->view->title = $title;
     $this->view->keywords = $keywords;
     $this->view->desc = $desc;
     $this->view->page = $page;
     $this->view->mobileURL = helper::createLink('page', 'view', "pageID={$pageID}", "name={$page->alias}", 'mhtml');
     $this->view->desktopURL = helper::createLink('page', 'view', "pageID={$pageID}", "name={$page->alias}", 'html');
     $this->dao->update(TABLE_ARTICLE)->set('views = views + 1')->where('id')->eq($page->id)->exec(false);
     $this->display();
 }
开发者ID:jnan77,项目名称:chanzhieps,代码行数:22,代码来源:control.php


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