public function action_index() { if (!\DBUtil::table_exists('blog') && !\DBUtil::table_exists('blog_comment')) { \Response::redirect('blog/installrequired'); } // list posts ----------------------------------------------------------------------------------------------------- $option['limit'] = \Model_Config::getval('content_items_perpage'); $option['offset'] = trim(\Input::get('page')) != null ? ((int) \Input::get('page') - 1) * $option['limit'] : 0; $list_items = \Blog\Model_Blog::listItems($option); // pagination config $config['pagination_url'] = \Uri::main() . \Uri::getCurrentQuerystrings(true, true, false); $config['total_items'] = $list_items['total']; $config['per_page'] = $option['limit']; $config['uri_segment'] = 'page'; $config['num_links'] = 3; $config['show_first'] = true; $config['show_last'] = true; $config['first-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['first-inactive-link'] = '<a href="#">{page}</a>'; $config['first-marker'] = '«'; $config['last-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['last-inactive-link'] = '<a href="#">{page}</a>'; $config['last-marker'] = '»'; $config['previous-marker'] = '‹'; $config['next-marker'] = '›'; $pagination = \Pagination::forge('viewlogins_pagination', $config); $output['list_items'] = $list_items; $output['pagination'] = $pagination; unset($config, $list_accounts, $option, $pagination); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = $this->generateTitle(\Lang::get('blog')); // <head> output ---------------------------------------------------------------------------------------------- return $this->generatePage('blog_v', $output, false); }
/** * default method for this controller. * you may replace code in this method with yours to start build your project. */ public function action_index() { // load language \Lang::load('fslang'); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = \Model_Config::getval('site_name'); // example for asset and theme asset //\Asset::css('bootstrap.min.css', array(), 'fuelstart'); //\Theme::instance()->asset->css('main.css', array(), 'fuelstart'); //$output['page_meta'][] = \Html::meta('description', 'test-fuel-start-description'); //$output['page_link'][] = html_tag('link', array('rel' => 'stylesheet', 'href' => Uri::createNL(\Theme::instance()->asset_path('css/main.css')))); // end example // <head> output ---------------------------------------------------------------------------------------------- $theme = \Theme::instance(); return $theme->view('front/templates/index_v', $output, false); }
/** * gmt date. the timezone up to current user data. * * @param string $date_format date format can use both date() function or strftime() function * @param integer $timestamp localtime timestamp. * @param type $timezone php timezone (http://www.php.net/manual/en/timezones.php) * @return null */ public static function gmtDate($date_format = '%Y-%m-%d %H:%M:%S', $timestamp = '', $timezone = '') { // check empty date format if (empty($date_format)) { $date_format = '%Y-%m-%d %H:%M:%S'; } // check timestamp if (empty($timestamp)) { $timestamp = time(); } else { if (!self::isValidTimeStamp($timestamp)) { $timestamp = strtotime($timestamp); } } // make very sure that selected timezone is in the timezone list or converted to real timezone. if ($timezone != null) { $timezone = static::isValidTimezone($timezone); } // check timezone if ($timezone == null) { $account_model = new \Model_Accounts(); $cookie = $account_model->getAccountCookie(); $site_timezone = static::getRealTimezoneValue(\Model_Config::getval('site_timezone')); if (!isset($cookie['account_id'])) { // not member or not log in. use default config timezone. $timezone = $site_timezone; } else { // find timezone for current user. $row = \Model_Accounts::find($cookie['account_id']); if (!empty($row)) { $timezone = static::getRealTimezoneValue($row->account_timezone); } else { $timezone = $site_timezone; } } unset($account_model, $cookie, $row, $site_timezone); } // what format of the date_format (use date() value or strftime() value) if (strpos($date_format, '%') !== false) { // use strftime() format return \Date::forge($timestamp)->set_timezone($timezone)->format($date_format); } else { // use date() format return date($date_format, strtotime(\Date::forge($timestamp)->set_timezone($timezone)->format('%Y-%m-%d %H:%M:%S'))); } }
/** * list items * * @param array $option * @return mixed */ public static function listItems($option = array()) { $query = self::query(); $output['total'] = $query->count(); // offset and limit if (!isset($option['offset'])) { $option['offset'] = 0; } if (!isset($option['limit'])) { if (isset($option['list_for']) && $option['list_for'] == 'admin') { $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); } else { $option['limit'] = \Model_Config::getval('content_items_perpage'); } } // get the results from sort, order, offset, limit. $output['items'] = $query->order_by('post_id', 'DESC')->offset($option['offset'])->limit($option['limit'])->get(); unset($orders, $query, $sort); return $output; }
/** * read template * * @author Vee Winch. * @param string $email_file email file. * @param string $template_path path to folder that store email file. * @return mixed */ public static function readTemplate($email_file = '', $template_path = null) { if ($email_file == null) { return null; } if ($template_path == null) { $template_path = APPPATH . 'lang' . DS . \Lang::get_lang() . DS . 'email' . DS; } if (file_exists($template_path . $email_file)) { $site_name = \Model_Config::getval('site_name'); $output = file_get_contents($template_path . $email_file); $output = str_replace("%site_name%", $site_name, $output); $output = str_replace("%site_url%", \Uri::base(), $output); $output = str_replace("%site_admin%", \Uri::create('admin'), $output); unset($site_name, $template_path); return $output; } else { return false; } }
/** * list login history. * * @param array $data * @param array $option available options: [orders], [sort], [offset], [limit], [list_for] * @return mixed */ public static function listLogins(array $data = array(), array $option = array()) { if (!isset($data['account_id']) || isset($data['account_id']) && !is_numeric($data['account_id'])) { return null; } // get total logins of current user $query = static::query()->where('account_id', $data['account_id']); // if specify to view logins from site id. if (isset($data['site_id'])) { $query->where('site_id', $data['site_id']); } $output['total'] = $query->count(); // sort and order $allowed_orders = array('account_login_id', 'site_id', 'login_ua', 'login_os', 'login_browser', 'login_ip', 'login_time', 'login_time_gmt', 'login_attempt', 'login_attempt_text'); if (!isset($option['orders']) || isset($option['orders']) && !in_array($option['orders'], $allowed_orders)) { $option['orders'] = 'account_login_id'; } unset($allowed_orders); if (!isset($option['sort'])) { $option['sort'] = 'DESC'; } // offset and limit if (!isset($option['offset'])) { $option['offset'] = 0; } if (!isset($option['limit'])) { if (isset($option['list_for']) && $option['list_for'] == 'admin') { $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); } else { $option['limit'] = \Model_Config::getval('content_items_perpage'); } } // get the results from sort, order, offset, limit. $output['items'] = $query->order_by($option['orders'], $option['sort'])->offset($option['offset'])->limit($option['limit'])->get(); unset($query); return $output; }
/** * send reset password email * * @param array $data * @return mixed */ public static function sendResetPasswordEmail(array $data = array()) { if (!isset($data['account_email'])) { return false; } $query = static::query()->where('account_email', $data['account_email']); if ($query->count() > 0) { $row = $query->get_one(); unset($query); if ($row->account_status == '0') { return \Lang::get('account_was_disabled') . ' : ' . $row->account_status_text; } $cfg_member_confirm_wait_time = \Model_Config::getval('member_confirm_wait_time') * 60; // check confirm wait time. you need to wait until 'wait time' passed to send reset password request again. if ($row->account_confirm_code != null && time() - $row->account_confirm_code_since <= $cfg_member_confirm_wait_time) { return \Lang::get('account_reset_password_please_wait_until', array('wait_til_time' => date('d F Y H:i:s', $row->account_confirm_code_since + \Model_Config::getval('member_confirm_wait_time') * 60))); } $account_new_password = \Str::random('alnum', 10); $account_confirm_code = \Str::random('alnum', 5); $account_confirm_code_since = time(); $email_content = \Extension\EmailTemplate::readTemplate('reset_password1.html'); $email_content = str_replace("%username%", \Security::htmlentities($row->account_username), $email_content); $email_content = str_replace("%link_confirm%", \Uri::create('account/resetpw/' . $row->account_id . '/' . $account_confirm_code . '/reset'), $email_content); $email_content = str_replace("%link_cancel%", \Uri::create('account/resetpw/' . $row->account_id . '/' . $account_confirm_code . '/cancel'), $email_content); $email_content = str_replace("%confirm_until%", date('d F Y H:i:s', time() + $cfg_member_confirm_wait_time), $email_content); \Package::load('email'); $config = \Extension\Email::getConfig(); $email = \Email::forge($config); $email->from(\Model_Config::getval('mail_sender_email')); $email->to($data['account_email']); $email->subject(\Lang::get('account_email_reset_password_request')); $email->html_body($email_content); $email->alt_body(str_replace("\t", '', strip_tags($email_content))); if ($email->send() == false) { unset($account_confirm_code, $account_confirm_code_since, $account_new_password, $cfg_member_confirm_wait_time, $config, $email, $email_content, $query, $row); return \Lang::get('account_email_could_not_send'); } unset($cfg_member_confirm_wait_time, $config, $email, $email_content); // update to db. //$row->account_new_password = static::instance()->hashPassword($account_new_password); $row->account_confirm_code = $account_confirm_code; $row->account_confirm_code_since = $account_confirm_code_since; $row->save(); unset($account_confirm_code, $account_confirm_code_since, $account_new_password, $row); return true; } // account not found. return \Lang::get('account_didnot_found_entered_email'); }
public function action_viewlogins($account_id = '') { // set redirect url $redirect = $this->getAndSetSubmitRedirection(); // check permission if (\Model_AccountLevelPermission::checkAdminPermission('account_perm', 'account_viewlogin_log_perm') == false) { \Session::set_flash('form_status', array('form_status' => 'error', 'form_status_message' => \Lang::get('admin_permission_denied', array('page' => \Uri::string())))); \Response::redirect($redirect); } // viewing guest logins? if ($account_id == '0') { \Response::redirect($redirect); } // load language \Lang::load('account'); \Lang::load('accountlogins'); // read flash message for display errors. $form_status = \Session::get_flash('form_status'); if (isset($form_status['form_status']) && isset($form_status['form_status_message'])) { $output['form_status'] = $form_status['form_status']; $output['form_status_message'] = $form_status['form_status_message']; } unset($form_status); // get accounts data for this account. $account = \Model_Accounts::find($account_id); if ($account == null) { // not found account. \Response::redirect($redirect); } $output['account'] = $account; $output['account_id'] = $account_id; unset($account); // set sort variable for sortable in views. $next_sort = \Security::strip_tags(trim(\Input::get('sort'))); if ($next_sort == null || $next_sort == 'DESC') { $next_sort = 'ASC'; } else { $next_sort = 'DESC'; } $output['next_sort'] = $next_sort; unset($next_sort); // list logins ----------------------------------------------------------------------------------------------------- $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); $option['offset'] = trim(\Input::get('page')) != null ? ((int) \Input::get('page') - 1) * $option['limit'] : 0; if (\Security::strip_tags(trim(\Input::get('orders'))) != null) { $option['orders'] = \Security::strip_tags(trim(\Input::get('orders'))); } if (\Security::strip_tags(trim(\Input::get('sort'))) != null) { $option['sort'] = \Security::strip_tags(trim(\Input::get('sort'))); } $list_logins = \Model_AccountLogins::listLogins(array('account_id' => $account_id), $option); // pagination config $config['pagination_url'] = \Uri::main() . \Uri::getCurrentQuerystrings(true, true, false); $config['total_items'] = $list_logins['total']; $config['per_page'] = $option['limit']; $config['uri_segment'] = 'page'; $config['num_links'] = 3; $config['show_first'] = true; $config['show_last'] = true; $config['first-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['first-inactive-link'] = '<a href="#">{page}</a>'; $config['first-marker'] = '«'; $config['last-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['last-inactive-link'] = '<a href="#">{page}</a>'; $config['last-marker'] = '»'; $config['previous-marker'] = '‹'; $config['next-marker'] = '›'; $pagination = \Pagination::forge('viewlogins_pagination', $config); $output['list_logins'] = $list_logins; $output['pagination'] = $pagination; unset($config, $list_logins, $option, $pagination); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = $this->generateTitle(\Lang::get('account_view_login_history')); // <head> output ---------------------------------------------------------------------------------------------- // breadcrumb ------------------------------------------------------------------------------------------------- $page_breadcrumb = []; $page_breadcrumb[0] = ['name' => \Lang::get('admin_admin_home'), 'url' => \Uri::create('admin')]; $page_breadcrumb[1] = ['name' => \Lang::get('account_accounts'), 'url' => \Uri::create('admin/account')]; $page_breadcrumb[2] = ['name' => \Lang::get('account_view_login_history'), 'url' => \Uri::main()]; $output['page_breadcrumb'] = $page_breadcrumb; unset($page_breadcrumb); // breadcrumb ------------------------------------------------------------------------------------------------- return $this->generatePage('admin/templates/account/viewlogins_v', $output, false); }
/** * list websites from db * * @param array $option available options: [list_for], [filter_], [orders], [sort], [offset], [limit], [list_for], [unlimit] * @return array */ public static function listSites($option = array()) { $query = static::query(); // where conditions if (!isset($option['list_for']) || isset($option['list_for']) && $option['list_for'] == 'front') { $query->where('site_status', 1); } // filters -------------------------------------------------------------------------------------------------------------------------------------------- if (isset($option['filter_site_id'])) { $query->where('site_id', 'LIKE', '%' . $option['filter_site_id'] . '%'); } if (isset($option['filter_site_name'])) { $query->where('site_name', 'LIKE', '%' . \Security::htmlentities($option['filter_site_name']) . '%'); } if (isset($option['filter_site_domain'])) { $query->where('site_domain', 'LIKE', '%' . mb_strtolower(\Security::strip_tags($option['filter_site_domain'])) . '%'); } if (isset($option['filter_site_status'])) { $query->where('site_status', $option['filter_site_status']); } // end filters -------------------------------------------------------------------------------------------------------------------------------------- $output['total'] = $query->count(); // sort and order $allowed_orders = array('site_id', 'site_name', 'site_domain', 'site_status', 'site_create', 'site_update'); if (!isset($option['orders']) || isset($option['orders']) && !in_array($option['orders'], $allowed_orders)) { $option['orders'] = 'site_id'; } unset($allowed_orders); if (!isset($option['sort'])) { $option['sort'] = 'ASC'; } // offset and limit if (!isset($option['offset'])) { $option['offset'] = 0; } if (!isset($option['limit'])) { if (isset($option['list_for']) && $option['list_for'] == 'admin') { $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); } else { $option['limit'] = \Model_Config::getval('content_items_perpage'); } } // get the results from sort, order, offset, limit. $query->order_by($option['orders'], $option['sort']); if (!isset($option['unlimit']) || isset($option['unlimit']) && $option['unlimit'] == false) { $query->offset($option['offset'])->limit($option['limit']); } $output['items'] = $query->get(); unset($query); return $output; }
public function action_index() { // clear redirect referrer \Session::delete('submitted_redirect'); // check permission if (\Model_AccountLevelPermission::checkAdminPermission('siteman_perm', 'siteman_viewsites_perm') == false) { \Session::set_flash('form_status', array('form_status' => 'error', 'form_status_message' => \Lang::get('admin_permission_denied', array('page' => \Uri::string())))); \Response::redirect(\Uri::create('admin')); } // read flash message for display errors. $form_status = \Session::get_flash('form_status'); if (isset($form_status['form_status']) && isset($form_status['form_status_message'])) { $output['form_status'] = $form_status['form_status']; $output['form_status_message'] = $form_status['form_status_message']; } unset($form_status); // set sort variable for sortable in views. $next_sort = \Security::strip_tags(trim(\Input::get('sort'))); if ($next_sort == null || $next_sort == 'ASC') { $next_sort = 'DESC'; } else { $next_sort = 'ASC'; } $output['next_sort'] = $next_sort; unset($next_sort); // filters $output['filter_site_id'] = trim(\Input::get('filter_site_id')); $output['filter_site_name'] = trim(\Input::get('filter_site_name')); $output['filter_site_domain'] = trim(\Input::get('filter_site_domain')); $output['filter_site_status'] = trim(\Input::get('filter_site_status')); // list sites ------------------------------------------------------------------------------------------------------ $option['list_for'] = 'admin'; $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); $option['offset'] = trim(\Input::get('page')) != null ? ((int) \Input::get('page') - 1) * $option['limit'] : 0; if ($output['filter_site_id'] != null) { $option['filter_site_id'] = $output['filter_site_id']; } if ($output['filter_site_name'] != null) { $option['filter_site_name'] = $output['filter_site_name']; } if ($output['filter_site_domain'] != null) { $option['filter_site_domain'] = $output['filter_site_domain']; } if ($output['filter_site_status'] != null) { $option['filter_site_status'] = $output['filter_site_status']; } if (\Security::strip_tags(trim(\Input::get('orders'))) != null) { $option['orders'] = \Security::strip_tags(trim(\Input::get('orders'))); } if (\Security::strip_tags(trim(\Input::get('sort'))) != null) { $option['sort'] = \Security::strip_tags(trim(\Input::get('sort'))); } $list_sites = \Model_Sites::listSites($option); // pagination config $config['pagination_url'] = \Uri::main() . \Uri::getCurrentQuerystrings(true, true, false); $config['total_items'] = $list_sites['total']; $config['per_page'] = $option['limit']; $config['uri_segment'] = 'page'; $config['num_links'] = 3; $config['show_first'] = true; $config['show_last'] = true; $config['first-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['first-inactive-link'] = '<a href="#">{page}</a>'; $config['first-marker'] = '«'; $config['last-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['last-inactive-link'] = '<a href="#">{page}</a>'; $config['last-marker'] = '»'; $config['previous-marker'] = '‹'; $config['next-marker'] = '›'; $pagination = \Pagination::forge('default', $config); $output['list_sites'] = $list_sites; $output['pagination'] = $pagination; unset($config, $list_accounts, $option, $pagination); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = $this->generateTitle(\Lang::get('siteman_multisite_manager')); // <head> output ---------------------------------------------------------------------------------------------- // breadcrumb ------------------------------------------------------------------------------------------------- $page_breadcrumb = []; $page_breadcrumb[0] = ['name' => \Lang::get('admin_admin_home'), 'url' => \Uri::create('admin')]; $page_breadcrumb[1] = ['name' => \Lang::get('siteman_multisite_manager'), 'url' => \Uri::create('admin/siteman')]; $output['page_breadcrumb'] = $page_breadcrumb; unset($page_breadcrumb); // breadcrumb ------------------------------------------------------------------------------------------------- return $this->generatePage('admin/templates/siteman/index_v', $output, false); }
<?php // render assets echo \Asset::render('fuelstart'); // render *theme* assets. (required for render theme's assets) echo $theme->asset->render('fuelstart'); ?> </head> <body> <div class="container"> <div class="row row-with-vspace"> <header class="col-md-12 webpage-header"> <h1 class="brand"><?php echo \Model_Config::getval('site_name'); ?> </h1> </header> </div> <div class="row row-with-vspace"> <main class="col-sm-9" role="main"> <?php if (isset($page_content)) { echo $page_content; } ?> </main> <aside class="col-sm-3 sidebar">
public function action_index() { // is user logged in? if (\Model_Accounts::isMemberLogin() == false) { \Response::redirect(\Uri::create('account/login') . '?rdr=' . urlencode(\Uri::main())); } // load language \Lang::load('account'); \Lang::load('accountlogins'); // get account id $cookie_account = \Model_Accounts::forge()->getAccountCookie(); // get account data $row = \Model_Accounts::find($cookie_account['account_id']); if ($row == null) { // not found user data. unset($row); \Response::redirect(\Uri::main()); } $output['account'] = $row; // set sort variable for sortable in views. $next_sort = \Security::strip_tags(trim(\Input::get('sort'))); if ($next_sort == null || $next_sort == 'DESC') { $next_sort = 'ASC'; } else { $next_sort = 'DESC'; } $output['next_sort'] = $next_sort; unset($next_sort); // list logins ----------------------------------------------------------------------------------------------------- $option['limit'] = \Model_Config::getval('content_items_perpage'); $option['offset'] = trim(\Input::get('page')) != null ? ((int) \Input::get('page') - 1) * $option['limit'] : 0; if (\Security::strip_tags(trim(\Input::get('orders'))) != null) { $option['orders'] = \Security::strip_tags(trim(\Input::get('orders'))); } if (\Security::strip_tags(trim(\Input::get('sort'))) != null) { $option['sort'] = \Security::strip_tags(trim(\Input::get('sort'))); } $data['account_id'] = $cookie_account['account_id']; $data['site_id'] = \Model_Sites::getSiteId(); $list_logins = \Model_AccountLogins::listLogins($data, $option); // pagination config $config['pagination_url'] = \Uri::main() . \Uri::getCurrentQuerystrings(true, true, false); $config['total_items'] = $list_logins['total']; $config['per_page'] = $option['limit']; $config['uri_segment'] = 'page'; $config['num_links'] = 3; $config['show_first'] = true; $config['show_last'] = true; $config['first-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['first-inactive-link'] = '<a href="#">{page}</a>'; $config['first-marker'] = '«'; $config['last-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['last-inactive-link'] = '<a href="#">{page}</a>'; $config['last-marker'] = '»'; $config['previous-marker'] = '‹'; $config['next-marker'] = '›'; $pagination = \Pagination::forge('viewlogins_pagination', $config); $output['list_logins'] = $list_logins; $output['pagination'] = $pagination; unset($config, $data, $list_logins, $option, $pagination); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = $this->generateTitle(\Lang::get('account_login_history')); // <head> output ---------------------------------------------------------------------------------------------- return $this->generatePage('front/templates/account/viewlogins_v', $output, false); }
public function action_index() { // check permission if (\Model_AccountLevelPermission::checkAdminPermission('blog_perm', 'blog_manage_perm') == false) { \Session::set_flash('form_status', array('form_status' => 'error', 'form_status_message' => \Lang::get('admin_permission_denied', array('page' => \Uri::string())))); \Response::redirect(\Uri::create('admin')); } // check table exists and link to install page. if (!\DBUtil::table_exists('blog') && !\DBUtil::table_exists('blog_comment')) { echo \Extension\Html::anchor('blog/admin/setup', 'Installation required'); exit; } // read flash message for display errors. $form_status = \Session::get_flash('form_status'); if (isset($form_status['form_status']) && isset($form_status['form_status_message'])) { $output['form_status'] = $form_status['form_status']; $output['form_status_message'] = $form_status['form_status_message']; } unset($form_status); // list posts ----------------------------------------------------------------------------------------------------- $option['limit'] = \Model_Config::getval('content_admin_items_perpage'); $option['offset'] = trim(\Input::get('page')) != null ? ((int) \Input::get('page') - 1) * $option['limit'] : 0; $list_items = \Blog\Model_Blog::listItems($option); // pagination config $config['pagination_url'] = \Uri::main() . \Uri::getCurrentQuerystrings(true, true, false); $config['total_items'] = $list_items['total']; $config['per_page'] = $option['limit']; $config['uri_segment'] = 'page'; $config['num_links'] = 3; $config['show_first'] = true; $config['show_last'] = true; $config['first-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['first-inactive-link'] = '<a href="#">{page}</a>'; $config['first-marker'] = '«'; $config['last-inactive'] = "\n\t\t<li class=\"disabled\">{link}</li>"; $config['last-inactive-link'] = '<a href="#">{page}</a>'; $config['last-marker'] = '»'; $config['previous-marker'] = '‹'; $config['next-marker'] = '›'; $pagination = \Pagination::forge('viewlogins_pagination', $config); $output['list_items'] = $list_items; $output['pagination'] = $pagination; unset($config, $list_accounts, $option, $pagination); // <head> output ---------------------------------------------------------------------------------------------- $output['page_title'] = $this->generateTitle(\Lang::get('blog')); // <head> output ---------------------------------------------------------------------------------------------- return $this->generatePage('admin/blog_v', $output, false); }
include __DIR__ . DS . 'inc_html_head.php'; ?> <nav class="navbar navbar-inverse navbar-fixed-top navbar-top-page"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle sidebar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <?php echo \Html::anchor('admin', \Model_Config::getval('site_name'), array('class' => 'navbar-brand')); ?> </div><!--.navbar-header--> <ul class="nav navbar-nav navbar-right navbar-top"> <li class="dropdown"> <?php echo languageSwitchAdminBootstrapNavbar(true); ?> </li> <li class="dropdown"> <a href="#" onclick="return false;" class="dropdown-toggle user-link" data-toggle="dropdown" aria-expanded="false"> <?php echo \Html::img($admin_navbar_avatar, ['alt' => 'user avatar', 'class' => 'img-user-avatar img-circle']);