Ejemplo n.º 1
0
 protected function side_menu()
 {
     if (AuthenticationUtil::is_logged_in() && AuthenticationUtil::check_privilege($this->user, AuthenticationUtil::PRIVILEGE_USER_ADMIN)) {
         $sideMenu = new UserAdminMenu($this->title);
         echo $sideMenu;
     }
 }
Ejemplo n.º 2
0
 protected function side_menu()
 {
     //Check if the user can see this
     if (!(AuthenticationUtil::is_logged_in() && AuthenticationUtil::check_privilege($this->user, AuthenticationUtil::PRIVILEGE_VIEW_ADMIN_PAGE))) {
         return;
     }
     $menu = new AdminMenu();
     echo $menu;
 }
Ejemplo n.º 3
0
    /**
     * Renders the Page with the Template
     */
    private function render_html_template()
    {
        ?>
        <!DOCTYPE HTML>

        <html>
    <head>
<!--        meta data-->
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!--        CSS-->
        <link rel="stylesheet" type="text/css" href="/stylesheets/base.css">
        <?php 
        $this->render_css();
        ?>

<!--        JS-->
        <script src="/javascript/jquery-2.1.3.min.js"></script>
        <?php 
        $this->render_js();
        ?>
        <title><?php 
        echo $this->title;
        ?>
</title>
    </head>

    <body>

    <header>
    <div class="template-header-wrapper">
        <div class="template-logo-wrapper">
            <a href="<?php 
        echo 'http://' . $_SERVER['SERVER_NAME'];
        ?>
"><img src="/images/QdinkaFull25.png" /></a>
        </div>
        <div class="template-search-bar-wrapper">
            <form action="" method="post">
                <input type="text" name="txtSearch" placeholder="Search <?php 
        echo $this->title;
        ?>
 ..."/>
                <input type="image" name="btnSubmit" src="/images/icons/search.png" />
            </form>
        </div>
        <div class="template-header-menu">
            <ul>
                <li class="template-header-menu-right"><a href="/index.php"><img class="template-header-menu-right" src="/images/icons/Shopping-Cart.png" alt="shopping cart" title="Shopping Cart"/></a></li>
                <?php 
        //Print the admin page if they have access to it
        if (!is_null($this->user) && AuthenticationUtil::check_privilege($this->user, AuthenticationUtil::PRIVILEGE_VIEW_ADMIN_PAGE)) {
            echo '<li class="template-header-menu-right"><a href="/pages/admin/admin.php"> | Admin</a></li>';
        }
        //Print the merchant page if they have access to it.
        if (!is_null($this->user) && AuthenticationUtil::check_privilege($this->user, AuthenticationUtil::PRIVILEGE_VIEW_MERCHANT_PAGE)) {
            echo '<li class="template-header-menu-right"><a href="/index.php"> | Sell</a></li>';
        }
        //Check to see if the person is logged in an display the correct link
        if (AuthenticationUtil::is_logged_in()) {
            echo '<li><a href="/pages/users/logout.php"> | Logout</a></li>';
        } else {
            echo '<li><a href="/pages/users/login.php"> | Login</a></li>';
        }
        ?>
            </ul>
        </div>
    </div>
    </header>

    <section>
        <div class="template-wrapper">
            <div class="template-side-menu-wrapper">
                <?php 
        $this->side_bar();
        ?>
            </div>
            <div class="template-content-wrapper">
                <?php 
        $this->body();
        ?>
            </div>
        </div>
    </section>

    <footer>
    <div class="template-footer-wrapper">

    <div class="template-footer-menu-wrapper">

    <div class="menu-item"><a href="#">About Qdinka</a></div>
    <div class="menu-item"><a href="#">Community</a></div>
    <div class="menu-item"><a href="#">Seller Information Center</a></div>
    <div class="menu-item"><a href="#">Policies</a></div>
    <div class="menu-item"><a href="#">Affiliates and Partners</a></div>
    <div class="menu-item"><a href="#">Help/Contact</a></div>
    <br>
<hr />
</div>

<div class="template-footer-content-wrapper">
<div class="footer-image-wrapper">
<a href="<?php 
        echo 'http://' . $_SERVER['SERVER_NAME'];
        ?>
"><img class="footer-image" src="/images/QdinkaFull25.png" /> </a>
</div>
<div class="footer-content">
A Note from the founders:<br />
Created in order to bring a balance to the Online Marketplace industry, we want our users to actually enjoy selling on
the internet, and not have to worry about hundreds of hidden fees, unnavigable seller profiles, and unreliable customer
service. Our users are guaranteed a more than satisfactory experience with the most comprehensive seller platform
available; post products, track sales, integrate QuickBooks, market and promote your business and products.
</div>
<div class="footer-social-wrapper">
<img class="social-image" src="/images/social_media/facebook-icon.png" />
<img class="social-image" src="/images/social_media/twitter-icon.png" />
<img class="social-image" src="/images/social_media/google-icon.png" />
</div>
</div>

</div>
    </footer>

    </body>
    </html>
    <?php 
    }