Esempio n. 1
0
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script type="text/javascript" src="../js/share.js"></script>
	<script type="text/javascript" src="../js/iScroll.js"></script>
	
    <script type="text/javascript" src="../js/jquery-ui.js"></script>
	<script type="text/javascript" src="fm.js"></script>
  
    <link href="../css/ui-lightness/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />
    <!--script src="js/jquery-ui-timepicker-addon.js" type="text/javascript"></script-->
    <script src="../js/jquery-ui.js"></script>
   <script src="../js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

 <body>
 
  <?php 
$LastDay = DateTimeFormat(addDay(-1), "d-m-Y");
$vehID_ = getQUERY("vehid");
$tpoint = getQUERY("tpoint");
opendb();
$reg = "";
//dlookup("select registration from vehicles where id=" . $vehID);
$cLang = getQUERY("l");
?>

<table class="text2_" width=400px align="center" style="padding-top: 13px; margin-left:60px">
		<tr>
  <td width=160px style="font-size:13px" ><b><?php 
echo dic_("Reports.ChooseCost");
?>
:</b></td>
      <td style="padding-left:0px">      
Esempio n. 2
0
            echo "</td>";
            $columnCount++;
            if ($columnCount == 3) {
                $columnCount = 0;
                echo "</tr>";
                echo "<tr>";
            }
        }
    }
    echo "</tr></table>";
} else {
    $currDateYear = substr($daySelected, 0, 2);
    $currDateMonth = substr($daySelected, 3, 2);
    $currDateDay = substr($daySelected, 6, 2);
    $lastDay = subDay($currDateYear, $currDateMonth, $currDateDay);
    $nextDay = addDay($currDateYear, $currDateMonth, $currDateDay);
    $lastLink = 'index.php?day=' . $lastDay . '&type=' . $plotType;
    $nextLink = 'index.php?day=' . $nextDay . '&type=' . $plotType;
    $currentLink = 'index.php?day=' . $daySelected;
    echo '<center><table><tr><td>';
    echo '<a href="' . $lastLink . '"><input type="button" value="' . $lastDay . '" style="background-color:#FF8C00"/></a>';
    echo '</td><td>';
    echo '<a href="index.php"><input type="button" value="Return to selection" style="background-color:#FF8C00"/></a>';
    echo '</td><td>';
    echo '<a href="' . $nextLink . '"><input type="button" value="' . $nextDay . '" style="background-color:#FF8C00"/></a>';
    echo '</td><td>';
    if ($plotType == "MSArea") {
        echo '<a href="' . $currentLink . '&type=zoomline"><input type="button" value="Switch to zoomable" style="background-color:#FF8C00"/></a>';
    } else {
        echo '<a href="' . $currentLink . '&type=MSArea"><input type="button" value="Switch to filled" style="background-color:#FF8C00"/></a>';
    }
Esempio n. 3
0
</strong></td>
	 		</tr>
				<?php 
        while ($drData = pg_fetch_array($dsData)) {
            $tmpIDA = explode(",", $idUsers);
            $ifNE = true;
            for ($ch = 0; $ch < sizeof($tmpIDA); $ch++) {
                if ($drData["userid"] == $tmpIDA[$ch]) {
                    $ifNE = false;
                    break;
                }
            }
            if ($ifNE) {
                $idUsers .= $drData["userid"] . ",";
            }
            $LastDay = DatetimeFormat(addDay(-1), 'd-m-Y');
            $dt = DateTimeFormat(nnull($LastDay, "01-01-1900"), "Y-m-d" . " 00:00:00");
            $user = dlookup("select fullname from users where id=" . $drData["userid"]);
            $desc = nnull($drData["description"], "/");
            $act = "";
            if (nnull($drData["activity"], "/") != "/") {
                $actarr = explode("/", $drData["activity"]);
                if (count($actarr) > 1) {
                    $actarr = array_reverse($actarr);
                    for ($i = 0; $i < count($actarr); $i++) {
                        $act .= " -> " . dic_($actarr[$i]);
                    }
                } else {
                    $act .= " -> " . dic_($drData["activity"]);
                }
            }
Esempio n. 4
0
    exit;
}
if ($_POST['method'] == 'update_fefo') {
    $data = array('product_fefo' => 1, 'product_fefo_date' => $_POST['date_fefo'], 'product_create_date' => $_POST['product_create']);
    $db->update('inbound_po', $data, array('inbound_id' => $_POST['id']));
} else {
    if ($_POST['method'] == 'start_inbound') {
        $db->insert('inbound_status', array('inbound_id' => $_POST['poID'], 'start_date' => _DATE_TIME_));
        $ex = explode('&', $_SERVER['HTTP_REFERER']);
        $ex[0] = '';
        $url = implode('&', $ex);
        header('location:' . _BASE_URL_ . '?page=inbound_items&' . $url);
    } else {
        if ($_POST['method'] == 'addday') {
            if ($_POST['dateIn'] != '') {
                $date['date'] = addDay($_POST['dateIn'], $_POST['numExp']);
                $date['remain'] = date_sum_remain($date['date']);
            } else {
                $date['remain'] = date_sum_remain($_POST['dateExp']);
            }
            echo json_encode($date);
        } else {
            if ($_POST['method'] == 'updateNumQTY') {
                $numQTY = $_POST['numQTY'];
                foreach ($numQTY as $key => $value) {
                    $inboundKey = $key;
                    $sqlGet = $db->get_where('inbound_po', array('inbound_id' => $inboundKey));
                    $rsGet = $sqlGet->row_array();
                    if ($rsGet['product_qty'] != $value && $value != 0 && $value != '') {
                        $poID = $rsGet['po_id'];
                        $inboundID = $rsGet['inbound_id'];
Esempio n. 5
0
			<div style="position: relative; width: 100%; padding: 18px 0px 50px 0px;">
				<div style="width: 331px; position: relative; float: left;">
					<span class="text2" style="margin-left: 20px;"><?php 
echo dic_("Routes.From");
?>
:</span>&nbsp;
					<input id="txtSDate" type="text" width="80px" class="textboxCalender corner5 text2" value="<?php 
echo DateTimeFormat(addDay(-1), 'd-m-Y');
?>
" style="width: 105px;position: relative; top: -1px; margin-left: 5px"/>
					<span class="text2" style="margin-left: 5px;"><?php 
echo dic_("Routes.To");
?>
:</span>&nbsp;
					<input id="txtEDate" type="text" width="80px" class="textboxCalender corner5 text2" value="<?php 
echo DateTimeFormat(addDay(-1), 'd-m-Y');
?>
" style="width: 105px;position: relative; top: -1px; margin-left: 5px"/>
				</div>
				
				<div style="width: 232px; position: relative; float: left; margin-left: 4px;">
					<span class="text2" style="margin-left: 20px;"><?php 
echo dic_("Routes.Vehicle");
?>
:</span>&nbsp;
					<select id="selVeh" class="combobox text2" style="width: 160px; font-size: 11px; position: relative; top: 0px; z-index: 99999; visibility: visible;">
						<?php 
if ($roleid == "2") {
    $sqlV = "select * from vehicles where clientID=" . $client_id . " and active='1' order by cast(code as integer) asc";
} else {
    $sqlV = "select * from vehicles where id in (select vehicleID from uservehicles uv left outer join vehicles v on v.id=uv.vehicleid where userID=" . $user_id . " and v.active='1')  order by cast(code as integer) asc";
Esempio n. 6
0
    $timeformat = $timeformat . " A";
}
if ($timeformat == "H:i:s") {
    $tf = " H:i";
} else {
    $tf = " h:i A";
}
$datejs = str_replace('d', 'dd', $dateformat);
$datejs = str_replace('m', 'mm', $datejs);
$datejs = str_replace('Y', 'yy', $datejs);
$americaUser = dlookup("select count(*) from cities where id = (select cityid from users where id=" . session("user_id") . ") and countryid = 4");
$americaUserStyle = "";
if ($americaUser == 1) {
    $americaUserStyle = "display: none";
}
$LastDay = DateTimeFormat(addDay(-1), $dateformat);
?>
      <tr>
      <td style="font-weight:bold;"><?php 
dic("Fm.OrgUnit");
?>
:</td>
         <td style="">
                  <select id="orgUnit" style="width: 161px; font-size: 11px; position: relative; top: 0px; z-index: 1; visibility: visible;" class="combobox text2">
                             <?php 
$units = "select name, id from organisation where clientid=" . Session("client_id");
$dsUnits = query($units);
while ($drUnits = pg_fetch_array($dsUnits)) {
    ?>
                                     <option value="<?php 
    echo $drUnits["id"];
Esempio n. 7
0
$YearOfPrevMonth = $CurrentYear;
if ($LastMonth == 0) {
    $LastMonth = 12;
    $YearOfPrevMonth = $CurrentYear - 1;
}
$LastDateOfMonth = cal_days_in_month(CAL_GREGORIAN, $LastMonth, $YearOfPrevMonth);
//Kolku dena ima prethodniot mesec
$Today = DateTimeFormat(now(), 'd-m-Y');
$LastDay = DatetimeFormat(addDay(-1), 'd-m-Y');
$LastWeek = DatetimeFormat(addDay(-7), 'd-m-Y');
$LastWeek1 = DatetimeFormat(addDay("-" . ($TodayDayOfWeek + 6)), 'd-m-Y');
$startLastMonth = "01-" . leadingZero($LastMonth) . "-" . $CurrentYear;
$endLastMonth = $LastDateOfMonth . "-" . leadingZero($LastMonth) . "-" . $CurrentYear;
$currentWeek = DatetimeFormat(addDay("-" . ($TodayDayOfWeek + 6) + 7), 'd-m-Y');
$startCurrYear = "01-01-" . $CurrentYear;
$Last10 = DatetimeFormat(addDay(-10), 'd-m-Y');
?>
<html>
	<script type="text/javascript">
		lang = '<?php 
echo $cLang;
?>
';
	</script>
	<head>
	<link rel="stylesheet" type="text/css" href="../style.css">
	<link rel="stylesheet" type="text/css" href="./gui.css">
	<link rel="stylesheet" type="text/css" href="./timeframe.css">
	<link rel="stylesheet" type="text/css" href="../css/ui-lightness/jquery-ui-1.8.14.custom.css">
	<script type="text/javascript" src="prototype.js"></script>
	<script type="text/javascript" src="timeframe.js"></script>
Esempio n. 8
0
     $americaUserStyle = "";
     if ($americaUser == 1) $americaUserStyle = "display: none";

         $fullName = nnull(dlookup("select fullname from drivers where id=" . $id), "");
         $code = nnull(dlookup("select code from drivers where id=" . $id), "");
         $bornDate = DateTimeFormat(nnull(dlookup("select borndate from drivers where id=" . $id), addDay(-1)), $dateformat);
         $dlnumber = nnull(dlookup("select dlnumber from drivers where id=" . $id), "");
         $gender = nnull(dlookup("select gender from drivers where id=" . $id), "");
         $startCom = DateTimeFormat(nnull(dlookup("select startincompany from drivers where id=" . $id), addDay(-1)), $dateformat);
         $contract = nnull(dlookup("select jobcontract from drivers where id=" . $id), "");
         $rfId = nnull(dlookup("select rfid from drivers where id=" . $id), "");
         $licenceCat = nnull(dlookup("select licensetype from drivers where id=" . $id), "");
         $firstLicence = DateTimeFormat(nnull(dlookup("select firstlicense from drivers where id=" . $id), addDay(-1)), $dateformat);
         $licExpir = DateTimeFormat(nnull(dlookup("select licenseexp from drivers where id=" . $id), addDay(-1)), $dateformat);
         $interLicence = nnull(dlookup("select interlicense from drivers where id=" . $id), "0");
         $IntLicExp = DateTimeFormat(nnull(dlookup("select interlicenseexp from drivers where id=" . $id), addDay(-1)), $dateformat);
         $orgUnit = nnull(dlookup("select organisationid from drivers where id=" . $id), "");
         $checkOrg = dlookup("select count(*) from organisation where id=" . $orgUnit);
      ?>
        <div id="div-add" style="display:none" title="<?php dic("Fm.AddAllVehicle") ?>"></div>
        <div id="dialog-message" title="<?php dic("Reports.Message")?>" style="display:none">
             <p>
	             <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
	             <div id="div-msgbox" style="font-size:14px"></div>
             </p>
        </div>
    
    
    <table style="padding-left:40px;" class="text2_">
    <tr>
    <td width="50%" align="left"><div class="textTitle" style="padding-top:10px;"><?php echo dic_("Fm.ModDri")?></div></td>