本文整理汇总了PHP中admin_base_url函数的典型用法代码示例。如果您正苦于以下问题:PHP admin_base_url函数的具体用法?PHP admin_base_url怎么用?PHP admin_base_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了admin_base_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$per_page = (int) $this->input->get_post('per_page');
$cupage = config_item('site_page_num');
//每页显示个数
$return_arr = array('total_rows' => true);
$where = array();
// if($this->user_info->key != 'root'){
$where['status >='] = 0;
$where['gid !='] = 1;
// }
$title = htmlspecialchars($this->input->get_post("title"));
$like = array();
$string = '';
if ($title = trim($title)) {
$like['title'] = $title;
$string .= "title=" . $title;
}
$options = array('page' => $cupage, 'per_page' => $per_page, 'like' => $like, 'where' => $where, 'order' => 'gid desc');
$lc_list = $this->model->getAll($options, $return_arr);
//查询所有信息
$url = admin_base_url('user/group?');
$page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage);
$data = array('lc_list' => $lc_list, 'page' => $page, 'title' => $title, 'totals' => $return_arr['total_rows']);
$this->_template('admin/user/grouplist', $data);
}
示例2: index
function index()
{
$per_page = (int) $this->input->get_post('per_page');
$cupage = config_item('site_page_num');
//每页显示个数
$return_arr = array('total_rows' => true);
if ($this->user_info->key == 'root') {
$where['status >='] = -1;
} else {
$where['status >='] = 0;
}
$loginname = htmlspecialchars($this->input->get_post("loginname"));
$like = array();
$string = '';
if ($loginname = trim($loginname)) {
$like['loginname'] = $loginname;
$string .= "loginname=" . $loginname;
}
$options = array('page' => $cupage, 'per_page' => $per_page, 'where' => $where, 'like' => $like, 'order' => "logintime desc,lid desc");
$lc_list = $this->userlog_model->getAll($options, $return_arr);
//查询所有信息
$url = admin_base_url('user/userlog?') . $string;
$page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage);
$data = array('lc_list' => $lc_list, 'page' => $page, 'loginname' => $loginname, 'totals' => $return_arr['total_rows']);
$this->_template('admin/user/userlog', $data);
}
示例3: index
public function index($type = 'all', $start = 0)
{
switch ($type) {
case 'draft':
$where = array('state' => 0);
break;
case 'publish':
$where = array('state' => 1);
break;
case 'trash':
$where = array('state' => 2);
break;
default:
$where = array('state !=' => 2);
}
$data['type'] = in_array($type, array('all', 'publish', 'trash', 'draft')) ? $type : 'all';
$this->load->library('pagination');
$config['base_url'] = admin_base_url('article/' . $data['type']);
$config['total_rows'] = $this->article_model->get_rows($where);
$config['per_page'] = $this->_prepage;
$config['num_links'] = 5;
$config['uri_segment'] = 4;
$config['suffix'] = config_item('url_suffix');
$this->pagination->initialize($config);
$data['pres'] = $this->_prepage;
$data['page'] = $this->pagination->create_links();
$data['rows'] = $config['total_rows'];
$data['list'] = $this->article_model->get_list($start, $config['per_page'], $where);
$this->load->view('admin_article', $data);
}
示例4: index
function index()
{
$per_page = (int) $this->input->get_post('per_page');
$cupage = intval($this->config->item('site_page_num'));
//每页显示个数
$return_arr = array('total_rows' => true);
$where = array();
$like = array();
if ($this->user_info->key != 'root') {
$where[$this->model->_table . '.status >='] = 0;
$where['pid'] = $this->user_info->uid;
}
$user_name = htmlspecialchars($this->input->get_post("user_name"));
$string = '';
if ($user_name = trim($user_name)) {
$like['user_name'] = $user_name;
$string .= "user_name=" . $user_name;
}
$nickname = htmlspecialchars($this->input->get_post("nickname"));
if ($nickname = trim($nickname)) {
$like['nickname'] = $nickname;
$string .= "nickname=" . $nickname;
}
$options = array('page' => $cupage, 'per_page' => $per_page, 'where' => $where, 'like' => $like, 'order' => "uid desc");
$lc_list = $this->model->getAll($options, $return_arr);
//查询所有信息
// print_r($lc_list);die;
$url = admin_base_url('user/index?') . $string;
$page = $this->sharepage->showPage($url, $return_arr['total_rows'], $cupage);
$data = array('lc_list' => $lc_list, 'page' => $page, 'totals' => $return_arr['total_rows']);
$this->_template('admin/user/userlist', $data);
}
示例5: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Admin User Management"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = addslashes(t("No information found about admin user."));
$this->cls_msg["save_err"] = addslashes(t("Information about admin user failed to save."));
$this->cls_msg["save_succ"] = addslashes(t("Information about admin user saved successfully."));
$this->cls_msg["delete_err"] = addslashes(t("Information about admin user failed to remove."));
$this->cls_msg["delete_succ"] = addslashes(t("Information about admin user removed successfully."));
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
//table info
$this->tbl = $this->db->USER;
// loading default model here //
$this->load->model("user_login", "mod_rect");
//$this->load->model("customer_model","mod_rect");
$this->load->model("user_type_model", "mod_utype");
// end loading default model here //
$this->tbl = $this->db->USER;
$this->data['BREADCRUMB'] = array(addslashes(t('Manage Admin User')));
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->data["title"] = addslashes(t('Category'));
//Browser Title
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->tbl = 'acs_category';
// Default Table
}
示例7: index
public function index($start = 0)
{
$this->load->library('pagination');
$config['base_url'] = admin_base_url('category/index');
$config['total_rows'] = $this->category_model->get_rows();
$config['per_page'] = $this->_prepage;
$config['num_links'] = 5;
$config['uri_segment'] = 4;
$config['suffix'] = config_item('url_suffix');
$this->pagination->initialize($config);
$data['pres'] = $this->_prepage;
$data['page'] = $this->pagination->create_links();
$data['rows'] = $config['total_rows'];
$data['list'] = $this->category_model->get_list($start, $config['per_page']);
$this->load->view('admin_category', $data);
}
示例8: index
public function index($start = 0)
{
$type = 'all';
$this->load->library('pagination');
$config['base_url'] = admin_base_url('huangye/all');
$this->db->select('*');
$this->db->from('huangye');
$config['total_rows'] = $this->db->get()->num_rows();
$config['per_page'] = $this->_prepage;
$config['num_links'] = 5;
$config['uri_segment'] = 4;
$config['suffix'] = config_item('url_suffix');
$this->pagination->initialize($config);
$data['pres'] = $this->_prepage;
$data['page'] = $this->pagination->create_links();
$data['rows'] = $config['total_rows'];
$data['list'] = $this->huangye_model->get_list($start, $config['per_page']);
$this->load->view('admin_huangye', $data);
}
示例9: __construct
public function __construct()
{
try {
parent::__construct();
////////Define Errors Here//////
$this->cls_msg = array();
////////end Define Errors Here//////
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->model("dashboard_model", "mod_rect");
$this->load->model("user_model", "mod_user");
//$this->load->model("task_model","mod_task");
$this->load->model("common_model", "mod_common");
$logged_in = $this->session->userdata("admin_loggedin");
$this->user_type = decrypt($logged_in["user_type_id"]);
$this->user_id = decrypt($logged_in["user_id"]);
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例10: __construct
public function __construct()
{
try {
parent::__construct();
////////Define Errors Here//////
$this->cls_msg = array();
$this->cls_msg["no_result"] = addslashes(t("No information found about user."));
$this->cls_msg["save_err"] = addslashes(t("Information about user failed to save."));
$this->cls_msg["save_succ"] = addslashes(t("Information about user saved successfully."));
$this->cls_msg["delete_err"] = addslashes(t("Information about user failed to remove."));
////////end Define Errors Here//////
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->model("my_account_model", "mod_rect");
$this->load->model('user_model');
$this->load->model("common_model", "mod_common");
// for employee
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例11: admin_breadcrumb
function admin_breadcrumb($arr_breadcrumb = null)
{
$divider = '';
$str_breadcrumb = '<ol class="breadcrumb"><li><a href="' . admin_base_url() . '"><i class="fa fa-dashboard"></i>' . addslashes(t("Home")) . '</a></li>';
if (!empty($arr_breadcrumb)) {
$str_breadcrumb .= $divider;
foreach ($arr_breadcrumb as $key => $val) {
if (!is_array($val)) {
$str_breadcrumb .= '<li><a class="active" href="javascript:void(0);">' . $val . '</a></li>';
} else {
$str_breadcrumb .= '<li><a href="' . $val['link'] . '">' . $val['text'] . '</a></li>';
}
if ($arr_breadcrumb[$key + 1]) {
$str_breadcrumb .= $divider;
}
}
}
$str_breadcrumb .= '</ol>';
return $str_breadcrumb;
}
示例12: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Generate MVC"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = get_message('no_result');
$this->cls_msg["save_err"] = get_message('save_failed');
$this->cls_msg["save_succ"] = get_message('save_success');
$this->cls_msg["delete_err"] = get_message('del_failed');
$this->cls_msg["delete_succ"] = get_message('del_success');
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->helper('basic_text_template');
$this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例13: __construct
public function __construct()
{
try {
parent::__construct();
////////Define Errors Here//////
$this->data['title'] = addslashes(t("Admin Site Setting"));
////Browser Title
////////Define Errors Here//////
$this->cls_msg = array();
$this->cls_msg["no_result"] = addslashes(t("No information found about admin site setting."));
$this->cls_msg["save_err"] = addslashes(t("Admin site setting failed to save."));
$this->cls_msg["save_succ"] = addslashes(t("Admin site setting saved successfully."));
$this->cls_msg["delete_err"] = addslashes(t("Admin site setting failed to remove."));
$this->cls_msg["delete_succ"] = addslashes(t("Admin site setting removed successfully."));
////////end Define Errors Here//////
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->model("site_setting_model", "mod_rect");
//////// end loading default model here //////////////
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例14: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Email Template"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = addslashes(t("No information found about automail."));
$this->cls_msg["save_err"] = addslashes(t("Information about automail failed to save."));
$this->cls_msg["save_succ"] = addslashes(t("Information about automail saved successfully."));
$this->cls_msg["delete_err"] = addslashes(t("Information about automail failed to remove."));
$this->cls_msg["delete_succ"] = addslashes(t("Information about automail removed successfully."));
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
// loading default model here //
$this->load->model("auto_mail_model", "mod_rect");
// end loading default model here //
$this->data['BREADCRUMB'] = array(addslashes(t('Email Template')));
$this->tbl = $this->db->AUTOMAIL;
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例15: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Generate MVC"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = get_message('no_result');
$this->cls_msg["save_err"] = get_message('save_failed');
$this->cls_msg["save_succ"] = get_message('save_success');
$this->cls_msg["delete_err"] = get_message('del_failed');
$this->cls_msg["delete_succ"] = get_message('del_success');
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->helper('basic_text_template');
$this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
$this->form_field_type = array('text' => 'Text', 'password' => 'Password', 'textarea' => 'Textarea', 'select' => 'Drop Down', 'radio' => 'Radio', 'checkbox' => 'Checkbox', 'file' => 'File Upload');
$this->data['form_field_type'] = $this->form_field_type;
$this->tbl_prefix = $this->db->tableprefix;
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}