Пример #1
0
# version 1.3.008
session_start();
# --------------------------------
# INCLUDE
include_once "funct.php";
include_once "IceCash.php";
# --------------------------------
# SERVER AUTH
global $cIce;
global $ip, $user;
$error = False;
$cIce->global_to_sets();
$id = session_id();
# --------------------------------
# VERIF RULE
if ($ip != "127.0.0.1" && !ice_user_isadmin()) {
    ice_error("Управление кассовыми операциями возможно только с локального компьютера.");
    exit;
}
# --------------------------------
# MYSQL CONNECT
$conn = ice_mysql_connect();
if (isset($_POST['codetov']) && $_POST['codetov']) {
    $cIce->add_sale($_POST['code'], 0, $_POST['cena']);
} elseif (isset($_POST['code'])) {
    if (substr($_POST['code'], 0, 3) == $cIce->ice_sets['bonuscard']) {
        $cIce->find_bonuscard($_POST['code']);
    } elseif ($cIce->add_sale($_POST['code'], 1, 0)) {
        //($cIce->find_price($_POST['code'])){
    } elseif ($cIce->find_discount($_POST['code'])) {
    }
Пример #2
0
<?php

# SESSION START
# version 1.3.004
session_start();
# --------------------------------
# INCLUDE
include_once "funct.php";
include_once "IceCash.php";
# --------------------------------
# SERVER AUTH
global $ip, $user;
global $cIce;
# --------------------------------
# VERIF RULE
if (!ice_user_isadmin()) {
    ice_error("Вы не администратор. Доступ запрещен.");
    exit;
}
# --------------------------------
# POST VARIABLES
foreach ($_POST as $k => $v) {
    $cIce->ice_sets[$k] = $v;
}
# --------------------------------
# MYSQL CONNECT
$conn = ice_mysql_connect();
# --------------------------------
# INIT OBJECT
#$cIce->connectClient();#connect dIce daemon & connect frk port
# --------------------------------