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


PHP config::siteURL方法代码示例

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


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

示例1: browse

 public function browse()
 {
     // Parameters
     $params = array('join_columns' => array(), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Actions
     $actions = array(0 => __('select', 'system'), 'approve' => __('approve', 'system'), 'decline' => __('decline', 'system'), 'delete' => __('delete', 'system'));
     // Check form action
     if (input::post('do_action')) {
         // Delete selected blogs
         if (input::post('action') && isset($actions[input::post('action')]) && input::post('blog_id') && is_array(input::post('blog_id'))) {
             foreach (input::post('blog_id') as $blogID) {
                 $blogID = (int) $blogID;
                 if ($blogID && $blogID > 0) {
                     $this->action(input::post('action'), $blogID);
                 }
             }
         }
         // Success
         view::setInfo(__('action_applied', 'system'));
         router::redirect('cp/plugins/blogs?' . $qstring['url'] . 'page=' . $qstring['page']);
     }
     // Get blogs
     $blogs = array();
     if ($params['total']) {
         $blogs = $this->blogs_model->getBlogs('in_list', $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Create table grid
     $grid = array('uri' => 'cp/plugins/blogs', 'keyword' => 'blogs', 'header' => array('check' => array('html' => 'blog_id', 'class' => 'check'), 'data_title' => array('html' => __('name', 'system'), 'class' => 'name', 'sortable' => true), 'user' => array('html' => __('user', 'system'), 'class' => 'user'), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'status' => array('html' => __('status', 'system'), 'class' => 'status'), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array());
     // Create grid content
     foreach ($blogs as $blog) {
         if ($blog['active'] == 1) {
             $status = html_helper::anchor('cp/plugins/blogs/decline/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('active', 'system'), array('class' => 'label small success'));
         } else {
             $status = html_helper::anchor('cp/plugins/blogs/approve/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], $blog['active'] ? __('pending', 'system') : __('inactive', 'system'), array('class' => 'label small ' . ($blog['active'] ? 'info' : 'important')));
         }
         $grid['content'][] = array('check' => array('html' => $blog['blog_id']), 'data_title' => array('html' => html_helper::anchor('cp/plugins/blogs/edit/' . $blog['blog_id'], text_helper::truncate($blog['data_title'], 64))), 'user' => array('html' => users_helper::anchor($blog['user'])), 'post_date' => array('html' => date_helper::formatDate($blog['post_date'])), 'status' => array('html' => $status), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/plugins/blogs/edit/' . $blog['blog_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/plugins/blogs/delete/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('blog_delete?', 'blogs'), 'data-role' => 'confirm', 'class' => 'delete')))));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('cp/plugins/blogs?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->blogsPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Filter hooks
     hook::filter('cp/plugins/blogs/browse/grid', $grid);
     hook::filter('cp/plugins/blogs/browse/actions', $actions);
     // Assign vars
     view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('blogs_manage', 'system_navigation'));
     // Set trail
     if ($qstring['search_id']) {
         view::setTrail('cp/plugins/blogs?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system'));
     }
     // Assign actions
     view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#blogs-search\').toggle();return false;'));
     // Load view
     view::load('cp/plugins/blogs/browse');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:60,代码来源:blogs.php

示例2: setSettings

 public function setSettings()
 {
     config::set('site_url', config::siteURL('/'), 'config');
     foreach ($this->data['settings'] as $plugin => $settings) {
         config::set($settings, '', $plugin);
     }
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:7,代码来源:bootstrap.php

示例3: index

 public function index()
 {
     // Parameters
     $params = array('join_columns' => array('`n`.`active`=1'), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring(config::item('news_per_page', 'news'), $params['max']);
     // Get news
     $news = array();
     if ($params['total']) {
         $news = $this->news_model->getEntries('in_list', $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('news?' . $qstring['url']), 'total_items' => $params['total'], 'max_items' => $params['max'], 'items_per_page' => config::item('news_per_page', 'news'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('news' => $news, 'pagination' => $pagination));
     // Set meta tags
     $this->metatags_model->set('news', 'news_index');
     // Set title
     view::setTitle(__(config::item('news_blog', 'news') ? 'blog' : 'news', 'system_navigation'), false);
     // Assign actions
     if (session::permission('news_search', 'news') && ($params['total'] || input::post_get('do_search'))) {
         view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#news-search\').toggle();return false;'));
     }
     // Load view
     view::load('news/index');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:29,代码来源:news.php

示例4: manage

 public function manage()
 {
     // Assign user from session to variable
     $user = session::section('session');
     // Get fields
     $fields = array();
     foreach (config::item('usertypes', 'core', 'keywords') as $categoryID => $keyword) {
         $fields[$categoryID] = $this->fields_model->getFields('users', $categoryID, 'view', 'in_list');
     }
     // Parameters
     $params = array('total' => $user['total_blocked'], 'profiles' => true);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Get blocked users
     $users = array();
     if ($params['total']) {
         $users = $this->users_blocked_model->getUsers(session::item('user_id'), $qstring['order'], $qstring['limit'], $params);
     } else {
         view::setInfo(__('no_blocked_users', 'users_blocked'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('users/blocked/manage?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => config::item('blocked_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('user' => $user, 'users' => $users, 'fields' => $fields, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('blacklist', 'users'));
     // Load view
     view::load('users/blocked/manage');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:blocked.php

示例5: invoices

 public function invoices()
 {
     // Get page
     $page = is_numeric(input::get('page')) && input::get('page') > 0 ? input::get('page') : 1;
     // Parameters
     $params = array('join_columns' => array('`t`.`user_id`=' . session::item('user_id')));
     // Process query string
     $qstring = $this->parseQuerystring(config::item('invoices_per_page', 'billing'), session::item('total_transactions'));
     // Get invoices
     $invoices = array();
     if (session::item('total_transactions')) {
         $invoices = $this->transactions_model->getTransactions($params['join_columns'], '', $qstring['limit']);
     } else {
         view::setInfo(__('no_invoices_user', 'billing_transactions'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('billing/invoices?'), 'total_items' => session::item('total_transactions'), 'items_per_page' => config::item('invoices_per_page', 'billing'), 'current_page' => $page, 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('invoices' => $invoices, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('invoices', 'billing_transactions'));
     // Load view
     view::load('billing/invoices');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:25,代码来源:invoices.php

示例6: results

 public function results()
 {
     if (!input::get('search_id')) {
         $this->index();
         return;
     }
     // Parameters
     $params = array('join_columns' => array('`u`.`verified`=1', '`u`.`active`=1', '`u`.`group_id` IN (' . implode(',', session::permission('users_groups_browse', 'users')) . ')', '`u`.`type_id` IN (' . implode(',', session::permission('users_types_browse', 'users')) . ')'), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring($params['max']);
     // Get users
     $users = array();
     if ($params['total']) {
         $users = $this->users_model->getUsers('in_list', isset($params['values']['type_id']) ? $params['values']['type_id'] : 0, $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Get fields
     $fields = $this->fields_model->getFields('users', isset($params['values']['type_id']) ? $params['values']['type_id'] : 0, 'view', 'in_list');
     // Set pagination
     $config = array('base_url' => config::siteURL('users/results?' . $qstring['url']), 'total_items' => $params['total'], 'max_items' => config::item('max_search_results', 'system'), 'items_per_page' => config::item('users_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('users' => $users, 'fields' => $fields, 'pagination' => $pagination));
     // Set meta tags
     $this->metatags_model->set('users', 'users_search_results');
     // Set title
     view::setTitle(__('search_results', 'system'), false);
     // Assign actions
     view::setAction('users?' . substr($qstring['url'], 0, -1), __('search_modify', 'system'), array('class' => 'icon-text icon-users-search-edit'));
     // Load view
     view::load('users/index');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:33,代码来源:users.php

示例7: browse

 public function browse()
 {
     // Parameters
     $params = array('join_columns' => array(), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Actions
     $actions = array(0 => __('select', 'system'), 'delete' => __('delete', 'system'));
     // Check form action
     if (input::post('do_action')) {
         // Delete selected news
         if (input::post('action') == 'delete') {
             if (input::post('news_id') && is_array(input::post('news_id'))) {
                 foreach (input::post('news_id') as $newsID) {
                     $newsID = (int) $newsID;
                     if ($newsID && $newsID > 0) {
                         $this->delete($newsID);
                     }
                 }
             }
         }
         // Success
         view::setInfo(__('action_applied', 'system'));
         router::redirect('cp/content/news?' . $qstring['url'] . 'page=' . $qstring['page']);
     }
     // Get news
     $news = array();
     if ($params['total']) {
         $news = $this->news_model->getEntries('in_list', $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Create table grid
     $grid = array('uri' => 'cp/content/news', 'keyword' => 'news', 'header' => array('check' => array('html' => 'news_id', 'class' => 'check'), 'data_title_' . session::item('language') => array('html' => __('name', 'system'), 'class' => 'name', 'sortable' => true), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'status' => array('html' => __('status', 'system'), 'class' => 'status'), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array());
     // Create grid content
     foreach ($news as $entry) {
         $grid['content'][] = array('check' => array('html' => $entry['news_id']), 'data_title_' . session::item('language') => array('html' => html_helper::anchor('cp/content/news/edit/' . $entry['news_id'], text_helper::truncate($entry['data_title'], 64))), 'post_date' => array('html' => date_helper::formatDate($entry['post_date'])), 'status' => array('html' => $entry['active'] ? '<span class="label success small">' . __('yes', 'system') . '</span>' : '<span class="label important small">' . __('no', 'system') . '</span>'), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/content/news/edit/' . $entry['news_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/content/news/delete/' . $entry['news_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('entry_delete?', 'news'), 'data-role' => 'confirm', 'class' => 'delete')))));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('cp/content/news?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->newsPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Filter hooks
     hook::filter('cp/content/news/browse/grid', $grid);
     hook::filter('cp/content/news/browse/actions', $actions);
     // Assign vars
     view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('news_manage', 'system_navigation'));
     // Set trail
     if ($qstring['search_id']) {
         view::setTrail('cp/content/news?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system'));
     }
     // Assign actions
     view::setAction('cp/content/news/edit/', __('entry_new', 'news'), array('class' => 'icon-text icon-news-new'));
     view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#news-search\').toggle();return false;'));
     // Load view
     view::load('cp/content/news/browse');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:58,代码来源:news.php

示例8: browse

 public function browse()
 {
     // Parameters
     $params = array('join_columns' => array());
     // Process filters
     $params = $this->parseCounters($params);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Actions
     $actions = array(0 => __('select', 'system'), 'delete' => __('delete', 'system'));
     // Check form action
     if (input::post('do_action')) {
         // Delete selected messages
         if (input::post('action') == 'delete') {
             if (input::post('message_id') && is_array(input::post('message_id'))) {
                 foreach (input::post('message_id') as $messageID) {
                     $messageID = (int) $messageID;
                     if ($messageID && $messageID > 0) {
                         $this->delete($messageID);
                     }
                 }
             }
         }
         // Success
         view::setInfo(__('action_applied', 'system'));
         router::redirect('cp/plugins/messages?' . $qstring['url'] . 'page=' . $qstring['page']);
     }
     // Get messages
     $messages = array();
     if ($params['total']) {
         $messages = $this->messages_model->getMessages($params['join_columns'], $qstring['order'], $qstring['limit']);
     }
     // Create table grid
     $grid = array('uri' => 'cp/plugins/messages', 'keyword' => 'messages', 'header' => array('check' => array('html' => 'message_id', 'class' => 'check'), 'message' => array('html' => __('message', 'messages'), 'class' => 'name'), 'user' => array('html' => __('user', 'system'), 'class' => 'user'), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array());
     // Create grid content
     foreach ($messages as $message) {
         $grid['content'][] = array('check' => array('html' => $message['message_id']), 'message' => array('html' => html_helper::anchor('cp/plugins/messages/edit/' . $message['message_id'], text_helper::truncate($message['message'], 64))), 'user' => array('html' => users_helper::anchor($message['user'])), 'post_date' => array('html' => date_helper::formatDate($message['post_date'])), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/plugins/messages/edit/' . $message['message_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/plugins/messages/delete/' . $message['message_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('message_delete?', 'messages'), 'data-role' => 'confirm', 'class' => 'delete')))));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('cp/plugins/messages?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->messagesPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Filter hooks
     hook::filter('cp/plugins/messages/browse/grid', $grid);
     hook::filter('cp/plugins/messages/browse/actions', $actions);
     // Assign vars
     view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('messages_manage', 'system_navigation'));
     // Set trail
     if ($qstring['search_id']) {
         view::setTrail('cp/plugins/messages?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system'));
     }
     // Assign actions
     view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#messages-search\').toggle();return false;'));
     // Load view
     view::load('cp/plugins/messages/browse');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:57,代码来源:messages.php

示例9: authorize

 public function authorize($action = '')
 {
     $this->initialize();
     $request = $this->twitter->getRequestToken(config::siteURL('users/connect/confirm/twitter/' . $action));
     if ($request && $this->twitter->http_code == 200) {
         $data = array('twitter' => array('token' => $request['oauth_token'], 'secret' => $request['oauth_token_secret']));
         session::set($data, '', 'remote_connect');
         $url = $this->twitter->getAuthorizeURL($request['oauth_token']);
         router::redirect($url);
     }
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:11,代码来源:twitter.php

示例10: browse

 public function browse()
 {
     // Parameters
     $params = array('join_columns' => array("`u`.`picture_id`!=0"), 'join_items' => array());
     // Process filters
     $params = $this->parseCounters($params, 0);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Actions
     $actions = array(0 => __('select', 'system'), 'approve' => __('approve', 'system'), 'decline' => __('decline', 'system'), 'delete' => __('delete', 'system'));
     // Check form action
     if (input::post('do_action')) {
         // Delete selected albums
         if (input::post('action') && isset($actions[input::post('action')]) && input::post('user_id') && is_array(input::post('user_id'))) {
             foreach (input::post('user_id') as $userID) {
                 $userID = (int) $userID;
                 if ($userID && $userID > 0) {
                     $this->action(input::post('action'), $userID);
                 }
             }
         }
         // Success
         view::setInfo(__('action_applied', 'system'));
         router::redirect('cp/users/pictures/browse?' . $qstring['url'] . 'page=' . $qstring['page']);
     }
     // Get pictures
     $users = array();
     if ($params['total']) {
         $users = $this->users_model->getUsers('in_list', isset($params['values']['type']) ? $params['values']['type'] : 0, $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']);
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('cp/users/pictures/browse?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->picturesPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('users' => $users, 'pagination' => $pagination, 'actions' => $actions));
     // Set title
     view::setTitle(__('users_pictures_manage', 'system_navigation'));
     // Set trail
     if ($qstring['search_id']) {
         view::setTrail('cp/users/pictures/browse?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system'));
     }
     // Assign actions
     view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#pictures-search\').toggle();return false;'));
     // Load view
     view::load('cp/users/pictures/browse');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:46,代码来源:pictures.php

示例11: manage

 public function manage()
 {
     // Does user have permission to view visitors?
     if (!session::permission('users_visitors_browse', 'users')) {
         view::noAccess();
     }
     // Assign user from session to variable
     $user = session::section('session');
     // Get fields
     $fields = array();
     foreach (config::item('usertypes', 'core', 'keywords') as $categoryID => $keyword) {
         $fields[$categoryID] = $this->fields_model->getFields('users', $categoryID, 'view', 'in_list');
     }
     // Parameters
     $params = array('total' => session::permission('users_visitors_limit', 'users') && session::permission('users_visitors_limit', 'users') < $user['total_visitors'] ? session::permission('users_visitors_limit', 'users') : $user['total_visitors'], 'profiles' => true);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Get visitors
     $visitors = array();
     if ($params['total']) {
         $visitors = $this->users_visitors_model->getVisitors(session::item('user_id'), $qstring['order'], $qstring['limit'], $params);
     } else {
         view::setInfo(__('no_visitors', 'users_visitors'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('users/visitors/manage?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => config::item('visitors_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('user' => $user, 'visitors' => $visitors, 'fields' => $fields, 'pagination' => $pagination));
     // Dow we have new visitors?
     if (session::item('total_visitors_new')) {
         // Reset new visitors counter
         $this->users_visitors_model->resetCounter();
     }
     // Set title
     view::setTitle(__('my_visitors', 'system_navigation'));
     // Set trail
     view::setTrail(session::item('slug'), __('my_profile', 'system_navigation'));
     view::setTrail('users/visitors/manage', __('users_visitors', 'system_navigation'));
     // Load view
     view::load('users/visitors/manage');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:42,代码来源:visitors.php

示例12: array

    echo form_helper::openForm();
    ?>

				<fieldset class="form">
					<div class="row">
						<div class="field">

							<?php 
    view::load('system/elements/field/edit', array('prefix' => $resource . '_' . $itemID, 'field' => array('keyword' => 'comment', 'type' => 'textarea', 'class' => 'input-wide input-small')));
    ?>

						</div>
					</div>
					<div class="row actions clearfix">
						<?php 
    view::load('system/elements/button', array('onclick' => "postComment('" . config::siteURL('comments/browse') . "',{'do_save_comment':1,'resource':'" . $resource . "','item_id':" . $itemID . ",'split':" . $split . ",'post':" . ($post ? 1 : 0) . ",'info':" . ($info ? 1 : 0) . "});return false;", 'class' => 'small'));
    ?>
						<span class="icon icon-system-ajax ajax" style="display:none" id="ajax-comments-<?php 
    echo $resource;
    ?>
-<?php 
    echo $itemID;
    ?>
"></span>
					</div>
				</fieldset>

			<?php 
    echo form_helper::closeForm(array('do_save_comment' => 1));
    ?>
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:index.php

示例13: _set_url

 protected function _set_url($setting)
 {
     $setting['value'] = config::siteURL($setting['value']);
     return $setting;
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:5,代码来源:system.php

示例14: authorize

 public function authorize($action = '')
 {
     $this->initialize();
     $url = $this->facebook->getLoginUrl(array('redirect_uri' => config::siteURL(config::siteURL('users/connect/confirm/facebook/' . $action)), 'scope' => join(',', array('email', 'user_birthday', 'user_status', 'publish_stream', 'offline_access'))));
     router::redirect($url);
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:6,代码来源:facebook.php

示例15: _resendHash

 protected function _resendHash()
 {
     // Create rules
     $rules = array('email' => array('label' => 'email', 'rules' => array('trim', 'required', 'max_length' => 255, 'valid_email')));
     // Assign rules
     validate::setRules($rules);
     // Validate fields
     if (!validate::run()) {
         return false;
     }
     // Does user exist?
     if (!($user = $this->users_model->getUser(input::post('email')))) {
         validate::setFieldError('email', __('email_invalid', 'users_signup'));
         return false;
     }
     // Is user's email already verified?
     if ($user['verified']) {
         view::setError(__('user_already_verified', 'users_signup'));
         return false;
     }
     // Loader
     loader::library('email');
     loader::model('system/requests');
     // Is this a recent request?
     if ($this->requests_model->isRecentRequest('signup', $user['user_id'], 0, 5)) {
         // Success
         view::setError(__('request_recent_sendhash', 'users_signup'));
         return false;
     }
     // Save resend hash request
     $hash = $this->requests_model->saveRequest('signup', $user['user_id']);
     $user['security_hash'] = $hash;
     $user['activation_link'] = config::siteURL('users/signup/confirm/' . $user['user_id'] . '/' . $hash);
     // Send activation email
     $this->email->sendTemplate('users_account_confirm', $user['email'], $user, $user['language_id']);
     // Success
     view::setInfo(__('confirm_email', 'users_signup'));
     router::redirect('users/login/index/verify');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:39,代码来源:login.php


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