Exemplo n.º 1
0
 function events()
 {
     $calendar = new Calendar();
     $events = auth_filter($calendar)->get()->all_to_array();
     echo json_encode($events);
     //echo json_encode($events);
 }
Exemplo n.º 2
0
 function index()
 {
     $document = new Document();
     if (@$_GET['search']) {
         $document->like('title', '%' . $_GET['search'] . '%');
     }
     $data['documents'] = auth_filter($document)->order_by('id', 'desc')->get_page();
     $this->template->build('document_index', $data);
 }
Exemplo n.º 3
0
 function index()
 {
     $data['english_zones'] = new English_zone();
     if (@$_GET['search']) {
         $data['informations']->where("title like '%" . $_GET['search'] . "%'");
     }
     auth_filter($data['english_zones'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/english_zone_index', $data);
 }
Exemplo n.º 4
0
 function index()
 {
     $data['hilights'] = new hilight();
     if (@$_GET['status']) {
         $data['hilights']->where('status', $_GET['status']);
     }
     auth_filter($data['hilights'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/hilight_index', $data);
 }
Exemplo n.º 5
0
 function index()
 {
     $categories = new Category();
     if (!empty($_POST['search'])) {
         $categories->where("name like '%" . $_POST['search'] . "%'");
     }
     if (@$_GET['status']) {
         $categories->where('status', $_GET['status']);
     }
     $data['categories'] = auth_filter($categories)->where("module = 'galleries' and parents <> 0")->order_by('id', 'desc')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/category_index', $data);
 }
Exemplo n.º 6
0
 function index()
 {
     $data['executives'] = new Executive();
     if (isset($_GET['search'])) {
         $data['executives']->where('title like \'%' . $_GET['search'] . '%\'');
     }
     if (@$_GET['status']) {
         $data['executives']->where('status', $_GET['status']);
     }
     auth_filter($data['executives'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/executive_index', $data);
 }
Exemplo n.º 7
0
 function index()
 {
     $data['notices'] = new Notice();
     if (@$_GET['search']) {
         $data['notices']->where("title like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['status']) {
         $data['notices']->where('status', $_GET['status']);
     }
     if (@$_GET['category_id']) {
         $data['notices']->where("category_id = " . $_GET['category_id']);
     }
     auth_filter($data['notices'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox())->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/notice_index', $data);
 }
Exemplo n.º 8
0
 function index()
 {
     $data['topics'] = new Topic();
     if (@$_GET['search']) {
         $data['topics']->like('title', '%' . $_GET['search'] . '%');
     }
     if (isset($_GET['status']) && $_GET['status'] != '') {
         $data['topics']->where('status', $_GET['status']);
     }
     if (@$_GET['group_id']) {
         $data['topics']->where_related('user', 'group_id', $_GET['group_id']);
     }
     if (@$_GET['start']) {
         $data['topics']->where('DATE(question_topics.created) >= DATE(\'' . Date2DB($_GET['start']) . '\')');
     }
     if (@$_GET['end']) {
         $data['topics']->where('DATE(question_topics.created) <= DATE(\'' . Date2DB($_GET['end']) . '\')');
     }
     auth_filter($data['topics'])->order_by('id', 'desc')->get_page();
     $this->template->build('index', $data);
 }
Exemplo n.º 9
0
 function index()
 {
     $data['contacts'] = new contact();
     auth_filter($data['contacts'])->order_by('id', 'desc')->get_page(limit());
     $this->template->build('admin/index', $data);
 }
Exemplo n.º 10
0
function draft($module)
{
    $orm = new $module();
    if ($module == "category") {
        $orm->where('module', 'galleries');
    }
    return '<span class="draft">' . auth_filter($orm)->where('status <>', 'approve')->count() . '</span>';
}