Exemplo n.º 1
0
 function update_setting($id, $value)
 {
     \SKS\LIB\Session::isSuperAdmin();
     $db = new DB();
     $sql = "UPDATE setting SET value = \"" . $value . "\" WHERE id = {$id} ";
     $db->executeUpdateQuery($sql);
     $this->view->message = "Record updated.";
     $this->view->render("message/message", false);
 }
Exemplo n.º 2
0
 function pagination($url = null)
 {
     $sql = "SELECT p.id AS id, p.title AS title, c.type AS type , c.name AS category_name, NULL AS comments, \n            p.posted_at AS posted_at, p.publish AS publish, u.first_name AS posted_by,\n            img.thumb_small as thumb_small, img.original as original         \n            FROM post p \n            LEFT JOIN post_category c ON p.post_category_id = c.id\n            LEFT JOIN user u ON p.user_id = u.id\n            LEFT JOIN image img ON img.id = p.banner_image";
     if (!\SKS\LIB\Session::isSuperAdmin()) {
         $sql .= " WHERE u.id = " . \SKS\LIB\Session::getLoggedInUser()->getId();
     }
     $table_page = PATH_ADMIN_VIEWS . "publish/paginator/row.php";
     $paginator = new \Paginator();
     $paginator->execute($sql, $table_page, $url);
 }
Exemplo n.º 3
0
                    </div>
                </div>
                <a href="<?php 
echo URL . 'publish/managePost';
?>
">
                    <div class="panel-footer pb">
                        <span class="pull-left">View Details</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
         <?php 
if (\SKS\LIB\Session::isSuperAdmin()) {
    ?>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-yellow">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-users fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge"><?php 
    echo $this->user_count;
    ?>
</div>
                            <div>Users !</div>
                        </div>