コード例 #1
0
ファイル: super.php プロジェクト: onyxnz/quartzpos
 Quartzpos, Open Source Point-Of-Sale System
 http://Quartzpos.chalcedony.co.nz

 

 Released under the GNU General Public License
*/
if (!isset($_SESSION)) {
    session_start();
}
include_once "config.php";
include_once "languages/" . POS_DEFAULT_LANGUAGE . ".php";
require 'fb.php';
require_once "database.php";
require 'login.php';
//Logout
if (isset($_GET['action']) && $_GET['action'] == "logout") {
    session_destroy();
    header("Location:admin.php");
}
$extracss = "<style type='text/css'>body{background:none !important;}</style>";
include_once 'template.php';
if (isset($_SESSION['admin']) && $_SESSION['admin'] < 2) {
    echo "<p>In order to go to a higher level of privilege, you need a supervisor login.</p>";
    loginnow('super');
} else {
    echo "<p>Set to supervisor : " . $_SESSION['user'] . ".</p>";
    //data[0]='<a href=\"admin.php?action=login\">".TXT_ADMINISTRATION."</a> | ';
    echo "<p>This is only for the immediate transaction, administrative functions are not available.</p>";
    echo "<script type='text/javascript'>\n      var data=[];\n      data[0]='';\n      data[1]='" . $_SESSION['username'] . "';\n      data[2]='0';\n     parent.IPC('su',data);\n       </script>";
}
コード例 #2
0
ファイル: admin.php プロジェクト: onyxnz/quartzpos
                                    <TD><a href="admin.php?action=logout"><?php 
    echo ADMINMENU_LOGOUT;
    ?>
</a></TD>
                                </TR>
                            </table>
                        </div>

                        <?php 
}
//end username check
if (!isset($_SESSION['username'])) {
    if (isset($_GET['msg'])) {
        loginnow($_GET['msg']);
    } else {
        loginnow();
    }
}
if (!isset($_GET['action'])) {
    $_GET['action'] = "login";
}
if ($_GET['action'] == "login") {
    //FB::log("ADMIN php login");
    if (isset($_SESSION['admin'])) {
        if ($_SESSION['admin'] > 0) {
            echo ' <div class="admin_content">' . ADMIN_WELCOME_TEXT . '</div>';
        }
    }
}
if (isset($_SESSION['stock'])) {
    if ($_SESSION['stock'] > 1) {
コード例 #3
0
ファイル: index.php プロジェクト: ChrisTUth/PHPSummber2015
include './functions/until.php';
include './functions/datafunctions.php';
include './functions/userdate.php';
include './functions/add.php';
//some varibles i use.
$_SESSION["page"] = "";
$data = "";
$adddata = array(array("fname", ""), array("lname", ""), array("email", ""), array("addr", ""), array("phone", ""), array("website", ""), array("bday", ""), array("group", ""), array("image", ""));
?>
            <?php 
//PAGE HANDLER
?>
            <?php 
if (isPostRequest()) {
    if (filter_input(INPUT_POST, "login") == 1) {
        if (loginnow(filter_input(INPUT_POST, 'email'), filter_input(INPUT_POST, 'pass')) == false) {
            $data = filter_input(INPUT_POST, 'email');
            $_SESSION["page"] = "login";
        } else {
            $_SESSION["theid"] = login(filter_input(INPUT_POST, 'email'), filter_input(INPUT_POST, 'pass'));
            $data = "";
            $_SESSION["page"] = "usermain";
        }
    } else {
        if (filter_input(INPUT_POST, "login") == 2) {
            if (signnow(filter_input(INPUT_POST, 'email'), filter_input(INPUT_POST, 'pass'), filter_input(INPUT_POST, 'pass2')) == false) {
                $data = filter_input(INPUT_POST, 'email');
                $_SESSION["page"] = "signup";
            } else {
                $_SESSION["theid"] = login(filter_input(INPUT_POST, 'email'), filter_input(INPUT_POST, 'pass'));
                $data = "";