Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
73
application/controllers/admin/Main.php
Normal file
73
application/controllers/admin/Main.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Main class
|
||||
*/
|
||||
|
||||
/**
|
||||
* 관리자 메인 controller 입니다.
|
||||
*/
|
||||
class Main extends MY_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 관리자 페이지 상의 현재 디렉토리입니다
|
||||
* 페이지 이동시 필요한 정보입니다
|
||||
*/
|
||||
public $pagedir = '';
|
||||
|
||||
/**
|
||||
* 모델을 로딩합니다
|
||||
*/
|
||||
protected $models = array();
|
||||
|
||||
/**
|
||||
* 이 컨트롤러의 메인 모델 이름입니다
|
||||
*/
|
||||
protected $modelname = '';
|
||||
|
||||
/**
|
||||
* 헬퍼를 로딩합니다
|
||||
*/
|
||||
protected $helpers = array('form', 'array');
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
/**
|
||||
* 라이브러리를 로딩합니다
|
||||
*/
|
||||
$this->load->library(array('querystring'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 메인 페이지입니다
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$view = array();
|
||||
$view['view'] = array();
|
||||
|
||||
|
||||
$view['view']['latest_user'] = $this->User_model->get_admin_list(7, '', '', '', 'user_id', 'desc', '', '');
|
||||
if (isset($view['view']['latest_user']['list']) && is_array($view['view']['latest_user']['list'])) {
|
||||
foreach ($view['view']['latest_user']['list'] as $key => $val) {
|
||||
$view['view']['latest_user']['list'][$key]['display_name'] = display_username(
|
||||
element('user_username', $val)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 어드민 레이아웃을 정의합니다
|
||||
*/
|
||||
$layoutconfig = array('layout' => 'layout', 'skin' => 'main');
|
||||
$view['layout'] = $this->layoutlib->admin($layoutconfig, $this->configlib->get_device_view_type());
|
||||
$this->data = $view;
|
||||
$this->layout = element('layout_skin_file', element('layout', $view));
|
||||
$this->view = element('view_skin_file', element('layout', $view));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user