Esempio n. 1
0
 if ($StringUtils->equalsPost('subtab', 'pop')) {
     $_production = ias_db_query("SELECT `prod_id` FROM `{$CONFIG['TABLE_PREFIX']}production_master` WHERE `job_card` = {$_POST['jobcard']}");
     $production = ias_db_fetch_row($_production);
     mysql_free_result($_production);
     if ($production === false) {
         ias_db_query("INSERT INTO `{$CONFIG['TABLE_PREFIX']}production_master`(`prod_id`, `job_card`) VALUES(NULL, '{$_POST['jobcard']}')");
         $prop['jobcard'] = $_POST['jobcard'];
         $prop['prodid'] = mysql_insert_id();
     } else {
         $prop['jobcard'] = $_POST['jobcard'];
         $prop['prodid'] = $production['prod_id'];
     }
 } else {
     if ($StringUtils->equalsPost('subtab', 'prod')) {
         $_production = ias_db_query("SELECT `prod_id`, " . "       date_format(`order_date`, '%Y-%m-%d') order_date, " . "       date_format(`order_date`, '%b %d, %Y') order_date_text, " . "       date_format(`delivery_date`, '%Y-%m-%d') delivery_date, " . "       date_format(`delivery_date`, '%b %d, %Y') delivery_date_text, " . "       `party_name`, " . "       `production_item`, " . "       `item_size`, " . "       `reference`, " . "       `material`, " . "       `item_thickness`, " . "       `item_packing`, " . "       `remarks`, " . "       `item_name`, " . "       `lemination`, " . "       `min_order`, " . "       `max_weight`, " . "       `max_count`, " . "       `job_card` " . "FROM `{$CONFIG['TABLE_PREFIX']}production_master` WHERE `job_card` = {$_POST['jobcard']}");
         $production = ias_db_fetch_row($_production);
         mysql_free_result($_production);
         $arr['prod_id'] = $production['prod_id'];
         $arr['order_date'] = $production['order_date'];
         //$arr['order_date_text']    = $production['order_date_text'];
         $arr['delivery_date'] = $production['delivery_date'];
         //$arr['delivery_date_text'] = $production['delivery_date_text'];
         $arr['party_name'] = $production['party_name'];
         $arr['production_item'] = $production['production_item'];
         $arr['item_size'] = $production['item_size'];
         $arr['reference'] = $production['reference'];
         $arr['material'] = $production['material'];
         $arr['item_thickness'] = $production['item_thickness'];
         $arr['item_packing'] = $production['item_packing'];
         $arr['remarks'] = $production['remarks'];
         $arr['item_name'] = $production['item_name'];
Esempio n. 2
0
<?php

require_once 'db.php';
$error = "";
if (isset($_POST['form'])) {
    $_users = ias_db_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}users` WHERE `user` = '{$_POST['user']}' AND `pass` = MD5('{$_POST['pass']}') AND `active` = 'Y'");
    $users = ias_db_fetch_row($_users);
    mysql_free_result($_users);
    if (!$users) {
        $error = "You are not authorized to view this page<br/>You have specified invalid authentication information";
    } else {
        if ($users['iprestrict'] == 'Y') {
            $_ips = ias_db_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}ips` WHERE `userid` = '{$users['id']}' AND `ip` = '{$raw_ip}'");
            $ips = ias_db_fetch_row($_ips);
            mysql_free_result($_ips);
            if (!$ips) {
                $error = "You are not authorized to view this page<br/>You are logging in from restricted IP address ({$raw_ip})";
            }
        }
        if (strlen($error) < 1) {
            list($sh, $sm, $ss) = explode(':', $CONFIG['time_start']);
            list($ch, $cm, $cs) = explode(':', myDST());
            list($eh, $em, $es) = explode(':', $CONFIG['time_end']);
            $start = $sh * 60 * 60 + $sm * 60 + $ss;
            $current = $ch * 60 * 60 + $cm * 60 + $cs;
            $end = $eh * 60 * 60 + $em * 60 + $es;
            if ($start == 0) {
                $start = $current;
                $end = $current;
                $users['timerestrict'] = 'N';
            }
Esempio n. 3
0
function ias_db_query_fetch($query, $column)
{
    $_result = ias_db_query($query);
    $result = ias_db_fetch_row($_result);
    mysql_free_result($_result);
    return $result[$column];
}
Esempio n. 4
0
    exit(0);
}
$msgToShow = "";
if (isset($_GET['m2s'])) {
    $msgToShow = $_GET['m2s'];
}
$patches = parsePatches();
$toPatch = array();
$_patchs = ias_safedb_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}patch`");
if (!$_patchs) {
    $toPatch[] = $patches[0];
} else {
    mysql_free_result($_patchs);
    foreach ($patches as $patch) {
        $_patchs = ias_safedb_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}patch` WHERE `id` = {$patch['id']}");
        $_p = ias_db_fetch_row($_patchs);
        mysql_free_result($_patchs);
        if (!$_p) {
            $toPatch[] = $patch;
        }
    }
}
if (count($toPatch) < 1) {
    header("Location: production.php");
    exit(0);
}
?>
<html>
<head>
<title> :: <?php 
echo $CONFIG['APP_TITLE'];