<?php

include_once "../class/CheckAsset.php";
$updateChk = new CheckAsset();
$id = $_GET["id"];
$status = $_GET["status"];
if ($status == "ใช้งานได้") {
    $stat = "Y";
} else {
    if ($status == "ชำรุด") {
        $stat = "N";
    } else {
        if ($status == "เสื่อมสภาพ") {
            $stat = "D";
        } else {
            $stat = null;
        }
    }
}
$updateChk->setId($id);
$updateChk->setStatus($stat);
$updateChk->checkAssetStatus();
//** CoddingDate : 13/08/2556
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
//*************** Check Session ****************
session_start();
include_once "../class/User.php";
$user = new User();
if (!$user->getSession()) {
    header("location: ../page/main.php");
}
//**********************************************
include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$updateAsset = new Asset();
$updateChk = new CheckAsset();
$assetId = $_GET["assetId"];
$upAssName = $_GET["upAssName"];
$upAssPrice = $_GET["upAssPrice"];
$upRemark = $_GET["upRemark"];
$upAssAddDate = $_GET["upAddDate"];
$dateM = substr($upAssAddDate, 0, 6);
$month = substr($upAssAddDate, 3, 2);
$text = substr($upAssAddDate, 6, 4);
$YearD = substr($upAssAddDate, 6, 4);
if ($month >= 10 && $month <= 12) {
    $YearD++;
}
$year = $text - 543;
$dateType = $dateM . "" . $year;
$datetime = DateTime::createFromFormat('d/m/yy', $dateType);
Ejemplo n.º 3
0
<?php

session_start();
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$db = new Config();
?>
    <table class="table table-bordered">
        <thead>
            <tr>
            	<th style="width: 1%; text-align:center">ลำดับ</th>
                <th style="width: 3%; text-align:center">วัน/เดือน/ปี</br>ที่ได้มา</th>
                <th style="width: 8%; text-align:center">เลขครุภัณฑ์</th>
                <th style="width: 15%; text-align:center">ชื่อครุภัณฑ์</th>
                <th style="width: 5%; text-align:center">ราคา</th>
                <th style="width: 10%; text-align:center">ใช้ประจำหน่วยงาน</th>
                <th style="width: 5%; text-align:center">สถานะ</th>
            </tr>
        </thead>
            <tbody>
            
<?php 
$no = 1;
$assStat = $_GET["id"];
if ($assStat == "0") {
    $stat = "";
} else {
    if ($assStat == "1") {
        $stat = "Y";
    } else {
<?php

//****************************************************************//
//****************************************************************//
//** ชื่อไฟล์ : listMenuYearCheck.php
//** คำอธิบาย : ไฟล์นี้เป็น แสดง ListMenu ประเภทครุภัณฑ์ หน้า QR
//** Version : 1.0
//** CoddingDate : 02/09/2556
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$showYear = new CheckAsset();
$dbAsset = new config();
$arr = $showYear->getShowAssetYear();
?>
		<select id="assetYearCheck" onchange="changeYearCheck();">
		<option value="0000">ประจำปี</option>
<?php 
while ($row = $dbAsset->fetch_array($arr)) {
    $selDate = $row['assetYear'];
    echo "<option value='" . $selDate . "'>";
    echo $selDate . "</option>";
}
?>
		</select>
	   
Ejemplo n.º 5
0
<?php

include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$dbAsset = new config();
$checkId = $_GET["checkId"];
//$checkId = "6";
$checkAsset->setCheckId($checkId);
$arr = $checkAsset->getCheckAssetById();
$data_array = array();
$no = 0;
while ($res = $dbAsset->fetch_object($arr)) {
    if ($res->checkStatus == "Y") {
        $stat = "ใช้งานได้";
    } else {
        if ($res->checkStatus == "N") {
            $stat = "ชำรุด";
        } else {
            if ($res->checkStatus == "D") {
                $stat = "เสื่อมสภาพ";
            } else {
                if ($res->checkStatus == null) {
                    $stat = "-";
                }
            }
        }
    }
    $selDate = $res->assetAddDate;
    $newYear = $res->assetYear;
    $dateM = substr($selDate, 4, 6);
<?php

session_start();
include_once "../class/CheckAsset.php";
$updateChk = new CheckAsset();
$checkId = $_GET["checkId"];
$status = $_GET["status"];
$userId = $_SESSION["id"];
if ($status == "ใช้งานได้") {
    $stat = "Y";
} else {
    if ($status == "ชำรุด") {
        $stat = "N";
    } else {
        if ($status == "เสื่อมสภาพ") {
            $stat = "D";
        } else {
            $stat = null;
        }
    }
}
$updateChk->setCheckId($checkId);
$updateChk->setCheckStatus($stat);
$updateChk->setUserId($userId);
$updateChk->checkAssetStatus();
Ejemplo n.º 7
0
<?php

session_start();
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$db = new Config();
?>
    <table class="table table-bordered">
        <thead>
            <tr>
            	<th style="width: 1%; text-align:center">ลำดับ</th>
                <th style="width: 3%; text-align:center">วัน/เดือน/ปี</br>ที่ได้มา</th>
                <th style="width: 8%; text-align:center">เลขครุภัณฑ์</th>
                <th style="width: 15%; text-align:center">ชื่อครุภัณฑ์</th>
                <th style="width: 5%; text-align:center">ราคา</th>
                <th style="width: 10%; text-align:center">ใช้ประจำหน่วยงาน</th>
                <th style="width: 5%; text-align:center">สถานะ</th>
                <th style="width: 5%; text-align:center">ตรวจเช็ค</th>
            </tr>
        </thead>
            <tbody>
            
<?php 
$no = 1;
$assetYear = $_GET['assetYear'];
//$yearChk = $assetYear-543;
$arrYear = $checkAsset->getCheckAssetByYear($assetYear);
$arrAll = $checkAsset->getCheckAsset();
if ($assetYear == null) {
    $cmd = $arrAll;
<?php

include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$assetChk = new CheckAsset();
$db = new Config();
$year = $_GET['assetYear'];
$yearS = $year - 543;
$arrYear = $assetChk->getCheckYear($year);
$arrCheck = $assetChk->getCheckAssetByYear($year);
header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename="AssetY.xls"');
#ชื่อไฟ
?>


<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<html>
<head>

<meta http-equiv="Content-type" content="text/html;charset=utf-8" />
<link href="../css/ReportStyle.css" rel="stylesheet" type="text/css" />
</head>
<body >

<style>
@import “css/ReportStyle.css”;
</style>
Ejemplo n.º 9
0
<?php

include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$addAsset = new Asset();
$addCheck = new CheckAsset();
/*
$addYear = $_GET["addYear"];
$addType = $_GET["addType"];
$addGroup = $_GET["addGroup"];
$addAsset = $_GET["addAsset"];
$addAssName = $_GET["addAssName"];
$addPrice = $_GET["addPrice"];
$addAddDate = $_GET["addAddDate"];
$addRemark = $_GET["addRemark"];
*/
//$assetYear = $_GET["addYear"];
$assetTypeCode = $_GET["addType"];
$assetGroupCode = $_GET["addGroup"];
$assetCode = $_GET["addAsset"];
$assetName = $_GET["addAssName"];
$assetPrice = $_GET["addPrice"];
$assetAddDate = $_GET["addAddDate"];
$remark = $_GET["addRemark"];
$assetLocation = "วิทยาลัยแม่ฮ่องสอน";
//$numberAsString = number_format($assetPrice, 2);
$dateM = substr($assetAddDate, 0, 6);
$text = substr($assetAddDate, 6, 4);
$year = $text - 543;
$dateType = $dateM . "" . $year;
$datetime = DateTime::createFromFormat('d/m/yy', $dateType);
Ejemplo n.º 10
0
<?php

//****************************************************************//
//****************************************************************//
//** ชื่อไฟล์ : tableMain.php
//** คำอธิบาย : ไฟล์นี้  แสดงตาราง Main
//** Version : 1.0
//** CoddingDate : 12/09/2556
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
session_start();
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$db = new Config();
?>
    <table class="table table-bordered">
        <thead>
            <tr>
            	<th style="width: 1%; text-align:center">ลำดับ</th>
                <th style="width: 3%; text-align:center">วัน/เดือน/ปี</br>ที่ได้มา</th>
                <th style="width: 8%; text-align:center">เลขครุภัณฑ์</th>
                <th style="width: 15%; text-align:center">ชื่อครุภัณฑ์</th>
                <th style="width: 5%; text-align:center">ราคา</th>
                <th style="width: 10%; text-align:center">ใช้ประจำหน่วยงาน</th>
                <th style="width: 5%; text-align:center">สถานะ</th>
            </tr>
        </thead>
            <tbody>
            
Ejemplo n.º 11
0
<?php

session_start();
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$db = new Config();
?>
    <table class="table table-bordered">
        <thead>
            <tr>
            	<th style="width: 1%; text-align:center">ลำดับ</th>
                <th style="width: 3%; text-align:center">วัน/เดือน/ปี</br>ที่ได้มา</th>
                <th style="width: 8%; text-align:center">เลขครุภัณฑ์</th>
                <th style="width: 15%; text-align:center">ชื่อครุภัณฑ์</th>
                <th style="width: 5%; text-align:center">ราคา</th>
                <th style="width: 10%; text-align:center">ใช้ประจำหน่วยงาน</th>
                <th style="width: 5%; text-align:center">สถานะ</th>
                <th style="width: 5%; text-align:center">ตรวจเช็ค</th>
            </tr>
        </thead>
            <tbody>
            
<?php 
$no = 1;
$assetYear = $_GET['assetYear'];
//$yearChk = $assetYear-543;
$arrYear = $checkAsset->getCheckAssetByYear($assetYear);
$arrAll = $checkAsset->getCheckAsset();
if ($assetYear == null) {
    $cmd = $arrAll;
Ejemplo n.º 12
0
<?php

include_once "../class/Config.php";
include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$delAsset = new Asset();
$delChkAsset = new CheckAsset();
$db = new Config();
$delId = $_GET["id"];
//$delId = "12";
$delAsset->setId($delId);
$arr = $delAsset->getAssetById();
$res = $db->fetch_array($arr);
$DelChkType = $res['assetTypeCode'];
$DelChkGroup = $res['assetGroupCode'];
$DelChkAsset = $res['assetCode'];
$delChkAsset->setAssetTypeCode($DelChkType);
$delChkAsset->setAssetGroupCode($DelChkGroup);
$delChkAsset->setAssetCode($DelChkAsset);
$delChkAsset->delCheckAsset();
$delAsset->delAsset();
Ejemplo n.º 13
0
<?php

include_once "../class/Config.php";
include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$delAsset = new Asset();
$delChkAsset = new CheckAsset();
$db = new Config();
$delId = $_GET["assetId"];
//$delId = "12";
$delAsset->setAssetId($delId);
$arr = $delAsset->getAssetById();
$res = $db->fetch_array($arr);
$DelChkType = $res['assetTypeId'];
$DelChkGroup = $res['assetGroupId'];
$DelChkAsset = $res['assetId'];
$delChkAsset->setAssetTypeId($DelChkType);
$delChkAsset->setAssetGroupId($DelChkGroup);
$delChkAsset->setAssetId($DelChkAsset);
$delChkAsset->delCheckAsset();
$delAsset->delAsset();
Ejemplo n.º 14
0
//** Version : 1.0
//** CoddingDate : 13/08/2556
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
session_start();
include_once "../class/User.php";
$user = new User();
if (!$user->getSession()) {
    header("location: ../page/main.php");
}
include_once "../class/Config.php";
include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$addAsset = new Asset();
$addCheck = new CheckAsset();
$db = new Config();
$assetTypeId = $_GET["addType"];
$assetGroupId = $_GET["addGroup"];
$assetCode = $_GET["addAsset"];
$assetName = $_GET["addAssName"];
$assetNum = $_GET["addAssNum"];
$assetPrice = $_GET["addPrice"];
$assetAddDate = $_GET["addAddDate"];
$remark = $_GET["addRemark"];
$assetLocation = "วิทยาลัยแม่ฮ่องสอน";
$userId = $_SESSION["id"];
$dateM = substr($assetAddDate, 0, 6);
$day = substr($assetAddDate, 0, 2);
$month = substr($assetAddDate, 3, 2);
$text = substr($assetAddDate, 6, 4);
Ejemplo n.º 15
0
<?php

session_start();
include_once "../class/Config.php";
include_once "../class/CheckAsset.php";
$checkAsset = new CheckAsset();
$db = new Config();
?>
    <table class="table table-bordered">
        <thead>
            <tr>
            	<th style="width: 1%; text-align:center">ลำดับ</th>
                <th style="width: 3%; text-align:center">วัน/เดือน/ปี</br>ที่ได้มา</th>
                <th style="width: 8%; text-align:center">เลขครุภัณฑ์</th>
                <th style="width: 15%; text-align:center">ชื่อครุภัณฑ์</th>
                <th style="width: 5%; text-align:center">ราคา</th>
                <th style="width: 10%; text-align:center">ใช้ประจำหน่วยงาน</th>
                <th style="width: 5%; text-align:center">สถานะ</th>
                <th style="width: 5%; text-align:center">ตรวจเช็ค</th>
            </tr>
        </thead>
            <tbody>
            
<?php 
$no = 1;
$assetYear = $_GET['assetYear'];
$yearChk = $assetYear - 543;
$arrYear = $checkAsset->getCheckAssetByYear($yearChk);
$arrAll = $checkAsset->getCheckAsset();
if ($assetYear == null) {
    $cmd = $arrAll;