本文整理汇总了PHP中Template::set_view方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::set_view方法的具体用法?PHP Template::set_view怎么用?PHP Template::set_view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template
的用法示例。
在下文中一共展示了Template::set_view方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_category
public function add_category()
{
$data = array();
Template::set_view('v_category_add');
Template::set($data);
Template::render();
}
示例2: index
/**
* Displays a list of tables in the database.
*/
public function index()
{
$hide_form = false;
$this->field_total = 6;
$last_seg = $this->uri->segment($this->uri->total_segments());
if (is_numeric($last_seg)) {
$this->field_total = $last_seg;
}
if ($this->validate_form($this->field_total) == FALSE) {
Template::set('field_total', $this->field_total);
if (!empty($_POST)) {
Template::set('form_error', TRUE);
} else {
Template::set('form_error', FALSE);
}
Template::set('form_action_options', $this->options['form_action_options']);
Template::set('field_numbers', $this->field_numbers);
} else {
$this->build_module($this->field_total);
Template::set_view('developer/output');
}
Template::set('error', array());
Template::set('toolbar_title', 'Module Builder');
Template::render();
}
示例3: index
public function index($value = '')
{
$data = array();
Template::set_view('v_index');
Template::set($data);
Template::render();
}
示例4: index
/**
* Display a form with various site settings including site name and
* registration settings
*
* @return void
*/
public function index()
{
$this->load->config('extended_settings');
$extended_settings = config_item('extended_settings_fields');
if (isset($_POST['save'])) {
if ($this->saveSettings($extended_settings)) {
Template::set_message(lang('settings_saved_success'), 'success');
} else {
Template::set_message(lang('settings_error_success'), 'error');
$settingsError = $this->settings_lib->getError();
if ($settingsError) {
Template::set_message($settingsError, 'error');
}
}
redirect(SITE_AREA . '/settings/settings');
}
// Read the current settings
$settings = $this->settings_lib->find_all();
// Get the available languages
$this->load->helper('translate/languages');
Template::set_view('settings/settings/index');
Template::set('extended_settings', $extended_settings);
Template::set('languages', list_languages());
Template::set('selected_languages', unserialize($settings['site.languages']));
Template::set('settings', $settings);
Template::set('showDeveloperTab', $this->auth->has_permission($this->permissionDevView));
Template::render();
}
示例5: index
public function index()
{
if ($this->input->post('submit')) {
if ($this->save_settings()) {
Template::set_message(lang('mod_settings_saved'), 'success');
redirect(SITE_AREA . '/settings/comments');
} else {
Template::set_message(lang('md_settings_error'), 'error');
}
}
// Read our current settings
$settings = $this->settings_model->select('name,value')->find_all_by('module', 'comments');
Template::set('settings', $settings);
if (!isset($this->role_model)) {
$this->load->model('roles/role_model');
}
$roles = array();
$tmpRoles = $this->role_model->select('role_id, role_name, default')->where('deleted', 0)->find_all();
if (isset($tmpRoles) && is_array($tmpRoles) && count($tmpRoles)) {
foreach ($tmpRoles as $role) {
$roles = $roles + array($role->role_id => $role->role_name);
}
}
Template::set('roles', $roles);
Template::set('toolbar_title', lang('mod_settings_title'));
Template::set_view('comments/settings/index');
Template::render();
}
示例6: welcome
public function welcome()
{
$this->is_login();
$data = array();
Template::set_view('v_welcome');
Template::set($data);
Template::render('login');
}
示例7: index
/**
* Displays the initial page of the Content context
*
* @return void
*/
public function index()
{
if (isset($this->current_user) && $this->current_user->role_id == 9 && !isset($this->curr_user_profile)) {
redirect(SITE_AREA . '/content/vendor_profile/create');
} else {
Template::set_view('admin/content/index');
}
Template::render();
}
示例8: users
public function users()
{
$this->auth->restrict();
$this->set_current_user();
Assets::add_css(array('jquery.dataTables.css', 'dataTables.responsive.css'));
Assets::add_js(array('jquery.dataTables.js', 'dataTables.bootstrap.js', 'dataTables.responsive.js'));
Assets::add_module_js('users', 'manage_users.js');
Template::set_view('manage/user_list');
Template::render('user');
}
示例9: index
/**
* Displays the homepage of the Bonfire app
*
* @return void
*/
public function index()
{
//$this->load->library('users/auth');
//$this->set_current_user();
$embedData = $this->embedcontent_model->getAllEmbeds();
Template::set_theme('my_theme', 'embeds');
Template::set("embeds", $embedData);
Template::set_view('/home/embeds');
Template::render();
}
示例10: create
public function create($value = '')
{
$data = array();
$data['color'] = array(array('name' => '红色', 'color' => 'red'), array('name' => '蓝色', 'color' => 'blue'), array('name' => '黑色', 'color' => 'black'));
$data['size'] = array(array('name' => 'L', 'value' => 'L'), array('name' => 'LX', 'value' => 'LX'), array('name' => 'LL', 'value' => 'LL'));
Assets::add_js('product/create_product.js');
Assets::add_css('product/product.css');
Template::set_view('v_product_create');
Template::set($data);
Template::render();
}
示例11: login
public function login($value = '')
{
if ($this->input->is_ajax_request()) {
$this->ajaxLogin();
return;
}
$data = array();
Template::set_view('v_login');
Template::set($data);
Template::render('login');
}
示例12: add_type
public function add_type($value = '')
{
if ($this->input->is_ajax_request()) {
$this->ajaxConfirmAddType();
return;
}
$data = array();
Template::set_view('v_type_add');
Template::set($data);
Template::render();
}
示例13: create
public function create($value = '')
{
if ($this->input->is_ajax_request()) {
$this->ajaxConfirmAddAttributes();
return;
}
$data = array();
$data['type'] = array(array('id' => 1, 'name' => '营养品'), array('id' => 2, 'name' => '孕妇产品'), array('id' => 3, 'name' => '婴儿产品'));
Template::set_view('v_attributes_add');
Template::set($data);
Template::render();
}
示例14: index
public function index($value = '')
{
$data = array();
$this->category->get_product_category($data);
$this->package_unit->get_product_package_unit($data);
$this->product_unit->get_product_unit($data);
$data['category_json'] = json_encode($data['results']);
$data['product_pack_unit_json'] = json_encode($data['product_package_unit_list']);
$data['product_unit_json'] = json_encode($data['product_unit_list']);
Assets::add_js('js/lib/category.js');
Template::set_view('product/v_category');
Template::set($data);
Template::render();
}
示例15: index
public function index()
{
if ($this->input->post('submit')) {
if ($this->save_settings()) {
Template::set_message('Your settings were successfully saved.', 'success');
redirect(SITE_AREA . '/settings');
} else {
Template::set_message('There was an error saving your settings.', 'error');
}
}
// Read our current settings
Template::set('settings', read_config('application'));
Template::set_view('admin/settings/index');
Template::render();
}