"; echo "


กรุณาทำการ Login ก่อน

"; echo ""; exit(); } else { /** Configuration */ require_once( "../configuration.php" ); require_once( $_Config_absolute_path . "/includes/framework.php" ); include("../include/Function.php"); /** Create Database Object */ $dbObj = new DBConn; /** Config Table for This Page */ $myTable = "accessories_type_tb"; $myTableFK = "Acc_type_code"; $myTableID = "Acc_type_code"; /** Paging */ $page = $_GET['page']; if( $page == "" ) { $page = 1; } /** จำนวนข้อมูล ต่อ 1 หน้า */ $perpage = $_REQUEST['perpage']; if( $perpage == "" ) { $perpage = 20; } /** Searching */ $keyword = $_REQUEST['keyword']; } # else ?> <?=$_Config_sitename;?>
execQuery($query); $numrows = $dbObj->_numrows; /** Paging */ $display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page']; $start = ( ($display * $limit) - $limit ); /** Paging */ //### Search if( $keyword != "" ) { if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable ORDER By $myTableFK "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable ORDER By $myTableFK "; } } else { if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable ORDER By $myTableFK"; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable ORDER By $myTableFK "; } } $query .= " LIMIT $start, $limit "; $result = $dbObj->execQuery($query); ?>
หน้าหลัก » ข้อมูลทั่วไป » ข้อมูลรายงาน » ข้อมูลประเภทครุภัณฑ์ จำนวนข้อมูลต่อหน้า
 
0 ) { ?> fetchArray($result)){ $bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF"; if( $keyword != "" ) { $url = eregi_replace( $keyword, "\\0", $rs->url ); $description = eregi_replace( $keyword, "\\0", $rs->description ); } else { $url = $rs->url; $description = $rs->description; } ?> freeresult($result); ?>
ลำดับ ประเภทครุภัณฑ์ จำนวนครุภัณฑ์
ทั้งหมด
คงเหลือจำนวนครุภัณฑ์
ที่มีค่าเสือม
ค่าเสื่อมครุภัณฑ์
ทั้งหมด ณ ปัจจุบัน
execQuery($query1); $countnum = $dbObj->_numrows; $dbObj->freeresult($result1); echo number_format( $countnum ); ?>   '".$sday1."' "; $result11 = $dbObj->execQuery($query); $count = $dbObj->_numrows; if($count) { while($rs11 = $dbObj->fetchArray($result11)) { $Price = $rs11["Price"]; $Day = $rs11["Day"]; $sday = $rs11["Date_buy"]; $yearthai1 = explode( "-", $sday ); $day1 = intval( $yearthai1[2] ); $month1 = intval( $yearthai1[1] ); $year1 = intval( $yearthai1[0] ); $Date_buy = $year1 ."-". $month1 ."-". $day1; $arrDate1 = explode("-",$sday1); $arrDate2 = explode("-",$Date_buy); $year_1=$arrDate1[0]; $month_1= $arrDate1[1]; $date_1=$arrDate1[2]; $year_2=$arrDate2[0]; $month_2=$arrDate2[1]; $date_2=$arrDate2[2]; $result_1 = mktime(0, 0, 0, $month_1, $date_1, $year_1); //นำวันเดือนปี 1 มาแปลงเป็นรูปแบบ Unix timestamp $result_2 = mktime(0, 0, 0, $month_2, $date_2, $year_2); //นำวันเดือนปี 2 มาแปลงเป็นรูปแบบ Unix timestamp $result_date = $result_1 - $result_2; //นำวันที่ 1 - วันที่ 2 $Day_buy = $result_date / (60 * 60 * 24); //แปลงค่าเวลารูปแบบ Unix timestamp ให้เป็นจำนวนวัน $Price_day = $Price/$Day; $Price_buy = $Day_buy*number_format($Price_day,2, '.', ','); $num = $num + $Price_buy; }echo number_format($num,'2','.',',')."
"; } else{ echo 0; } ?>
0 ) ?>
0 ) { ?>
Page : 1) { $previous = $display - 1; ?>|« หน้าแรก  « ก่อนหน้า $scroll) { $first = $_GET['page']; $last = ($scroll - 1) + $_GET['page']; } else { $first = 1; $last = $paging; } if($last > $paging ) { $first = $paging - ($scroll - 1); $last = $paging; } for($i=$first; $i<=$last; $i++) { if($display == $i) { echo " [$i] "; } else { //echo " $i "; printf(" %s ", $_SERVER['PHP_SELF'], $i, $perpage, $OrderBy, $ASCDESC, $keyword, $i); } } // end..for } // end..if if($display < $paging) { $next = $display + 1; ?> ถัดไป »  หน้าสุดท้าย »| Total:

disconn(); /** Unset Class */ unset($dbObj); ?>