Hacked By AnonymousFox
<?
include("lib/connect.php");
include("lib/session.php");
$selectdept=$_POST["selectdept"];
if($System_Session_User_ID=="") {
echo "<SCRIPT LANGUAGE=\"JavaScript\">window.location = \"index.php\";alert(\"You must Login first.\");</SCRIPT>";
}
$sql="select * from fin_staff where StaffID='$System_Session_User_ID'";
$query=mysql_query($sql);
$row=mysql_fetch_array($query);
function ShowDate($myDate) {
$myDateArray=explode("-",$myDate);
$myDay = sprintf("%d",$myDateArray[2]);
switch($myDateArray[1]) {
case "01" : $myMonth = "ม.ค."; break;
case "02" : $myMonth = "ก.พ."; break;
case "03" : $myMonth = "มี.ค."; break;
case "04" : $myMonth = "เม.ย."; break;
case "05" : $myMonth = "พ.ค."; break;
case "06" : $myMonth = "มิ.ย."; break;
case "07" : $myMonth = "ก.ค."; break;
case "08" : $myMonth = "ส.ค."; break;
case "09" : $myMonth = "ก.ย."; break;
case "10" : $myMonth = "ต.ค."; break;
case "11" : $myMonth = "พ.ย."; break;
case "12" : $myMonth = "ธ.ค."; break;
}
$myYear = sprintf("%d",$myDateArray[0])+543;
return($myDay . " " . $myMonth . " " . $myYear);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>FINANCIAL V.1</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/list.ico"/>
<!--===============================================================================================-->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Mitr:wght@300&display=swap" rel="stylesheet">
<style type="text/css">
body{
font-family: 'Mitr', sans-serif;
}
.inputlogin1 {
background:#056839;
font-family: 'Mitr', sans-serif;
font-size:16px;
padding: 5px 10px 5px 10px;
color: #fff;
font-weight: bold;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
border-bottom: 1px solid rgba(0,0,0,0.25);
cursor: pointer;
border-left:none;
border-top:none;
margin:10px 0 10px 0;
}
.inputlogin{
background:#056839;
font-family: 'Mitr', sans-serif;
font-size:16px;
padding: 5px 10px 5px 10px;
color: #fff;
font-weight: bold;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
border-bottom: 1px solid rgba(0,0,0,0.25);
cursor: pointer;
border-left:none;
border-top:none;
margin:10px 0 10px 0;
}
.inputlogin:hover{
background:#727FB2;
}
</style>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.table2excel.js"></script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td><div align="center">
<h2><strong><img src="logo.jpg" height="100"><br>
</strong><br>
<span class="h5"> <strong>รายงานผลการติดตามเงินงบประมาณ ปีงบประมาณ 2568 </strong></span></h2>
</div></td>
</tr>
<tr>
<tr>
<td>
<hr>
</td></tr>
<td bgcolor="#FDE8FA"><div align="center">
<h3><span class="page_title"><strong>ยินดีต้อนรับ !
<?=$System_Session_FullName?>
เข้าสู่ระบบ</strong>
<input type="submit" name="button" id="button" class="inputlogin" value="ออกจากระบบ" onClick="window.location='system/logout.php'" />
</span></h3>
</div></td>
</tr>
<tr><td>
<hr>
</td></tr>
</table>
<div align="center"><strong><span class="page_title">
<input type="submit" name="button322" id="button322" class="inputlogin" value="กลับหน้าหลัก" onClick="window.location='home.php'" />
</span></strong>
</div>
<table width="80%" border="1" align="center" cellpadding="10" cellspacing="0" style="border-collapse:collapse">
<tr>
<td align="center"><form action="report3.php" method="post">
<strong>เลือก หน่วยงาน :
<select name="selectdept">
<option value="">-------ทั้งหมด-------</option>
<?php
$sqld="select * from fin_staff where StaffID>32 order by StaffFname asc";
$queryd=mysql_query($sqld);
while($rowd=mysql_fetch_array($queryd)){
?>
<option value="<?=$rowd[StaffID]?>" <?php if($selectdept==$rowd[StaffID]){?> selected="selected"<?php } ?>>
<?=$rowd[StaffFname]?>
</option>
<?php } ?>
</select>
</strong> <br>
<strong><span class="page_title">
<input type="submit" name="button3" id="button3" class="inputlogin" value="ค้นหาข้อมูล" />
</span></strong><br>
</form></td>
</tr>
</table>
<br>
<div align="left">
<button class="inputlogin">Export to excel</button>
<strong><span class="page_title">
<input type="submit" name="button32" id="button32" class="inputlogin" value="PRINT/PDF" onClick="window.location='report1print.php?selectdept=<?=$selectdept?>'" />
</span></strong> </div>
<table class="table2excel" data-tableName="Header Table" border="1" cellpadding="10" style="border-collapse:collapse">
<tr>
<td colspan="13" bgcolor="#FFFFFF"><div align="center">
<h3><strong>ผลการดำเนินงานรายการงบลงทุน (ยังไม่ก่อหนี้)<br>
งบประมาณรายจ่ายประจำปี 2567 ที่กันไว้เบิกเหลื่อมปี 2568 <br>
ณ
<?php
echo "<meta charset='utf-8'>";
function ThDate()
{
//วันภาษาไทย
//$ThDay = array ( "อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์" );
//เดือนภาษาไทย
$ThMonth = array ( "มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน","พฤษภาคม", "มิถุนายน", "กรกฏาคม", "สิงหาคม","กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม" );
//กำหนดคุณสมบัติ
$week = date( "w" ); // ค่าวันในสัปดาห์ (0-6)
$months = date( "m" )-1; // ค่าเดือน (1-12)
$day = date( "d" ); // ค่าวันที่(1-31)
$years = date( "Y" )+543; // ค่า ค.ศ.บวก 543 ทำให้เป็น ค.ศ.
return "วันที่ $day
เดือน $ThMonth[$months]
พ.ศ. $years";
}
echo ThDate(); // แสดงวันที่
?>
<br>
สำนักการแพทย์</strong></h3>
</div></td>
</tr>
<tr>
<td colspan="13" bgcolor="#FFFFFF"><div align="right">หน่วย : บาท</div></td>
</tr>
<tr valign="middle">
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong><span class="style37">ลำดับ</span></strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong><span class="style37">รายการ/โครงการ</span></strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong><span class="style37">งบประมาณหลังปรับโอน(1)</span></strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong><span class="style37">วงเงินได้ผู้รับจ้าง(2)</span></strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong>งบประมาณคงเหลือหลังก่อหนี้</strong><strong>(3) = (1) - (2)</strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong>วันที่คาดว่าลงนามสัญญา</strong><strong></strong></div></td>
<td colspan="4" bgcolor="#EFEFEF"><div align="center"><strong>แผนการเบิกจ่ายงบประมาณ</strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong>ว.ด.ป.</strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong>ขั้นตอนการดำเนินการ</strong></div></td>
<td rowspan="2" bgcolor="#EFEFEF"><div align="center"><strong>หมายเหตุ</strong></div></td>
</tr>
<tr>
<td bgcolor="#EFEFEF"><div align="center"><strong>ต.ค. 67</strong><strong>-ม.ค.68</strong><strong>(3)</strong></div></td>
<td bgcolor="#EFEFEF"><div align="center"><strong>ก.พ.68</strong><strong>-พ.ค.68</strong><strong>(4)</strong></div></td>
<td bgcolor="#EFEFEF"><div align="center"><strong>มิ.ย.68</strong><strong>-ก.ย.68</strong><strong>(5)</strong></div></td>
<td bgcolor="#EFEFEF"><div align="center"><strong>รวม(6)=(3)+(4)+(5)</strong></div></td>
</tr>
<?php
if($selectdept==""){
$sql="select * from fin_staff where StaffID>32 order by StaffFname asc";
}else{
$sql="select * from fin_staff where StaffID='$selectdept' order by StaffFname asc";
}
//$sql="select * from fin_staff where StaffID>32 order by StaffFname asc";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
?>
<tr>
<td colspan="13"><strong>
<?=$row[StaffFname]?>
</strong></td>
</tr>
<?php
$sql2="select * from fin_data where Idrefer='$row[StaffID]' and Result='3' order by Id asc";
$query2=mysql_query($sql2);
$i=1;
while($row2=mysql_fetch_array($query2)) {
?>
<tr>
<td><div align="center">
<?=$i?>
</div></td>
<td><?=$row2[Record]?></td>
<td><div align="center">
<?php
$a=$row2[Money];
$b=$row2[Moneyco];
$c=$a-b;
$aa=$row2[Money1];
$bb=$row2[Money2];
$cc=$row2[Money3];
$dd=$aa+$bb+$cc;
?>
<?=number_format($row2[Money],2)?>
</div></td>
<?
$sqlc2="select * from fin_step where Idfin='$row2[Id]' order by ID desc";
$queryc2=mysql_query($sqlc2);
$rowc2=mysql_fetch_array($queryc2);
?>
<td align="center"><?=number_format($row2[Moneyco],2)?></td>
<td align="center"><?=number_format($c,2)?></td>
<td align="center"><?=$rowc2[Date1]?>
<?=$rowc2[Date3]?></td>
<td align="center"><?=number_format($row2[Money1],2)?></td>
<td align="center"><?=number_format($row2[Money2],2)?></td>
<td align="center"><?=number_format($row2[Money3],2)?></td>
<td align="center"><?=number_format($dd,2)?></td>
<td><div align="center">
<?=$rowc2[Date2]?>
</div></td>
<td><div align="center">
<?
if($rowc2[Step]=="1"){ echo"1. TOR แล้วเสร็จ"; }
if($rowc2[Step]=="2"){ echo"1.1 ประกาศแผนการจัดซ้อจัดจ้าง"; }
if($rowc2[Step]=="3"){ echo"1.2 แต่งตั้งคกก.กำหนดร่างขอบเขตงาน (TOR) และราคากลาง"; }
if($rowc2[Step]=="4"){ echo" 1.3 คกก.กำหนดรายละเอียดและคุณลักษณะครุภัณฑ์"; }
if($rowc2[Step]=="5"){ echo" 1.4 ขอความเห็นชอบร่างขอบเขตงาน (TOR) และราคากลาง"; }
if($rowc2[Step]=="6"){ echo" 1.5 ผลการประกวดร่าง TOR มีผู้วิจารณ์ คกก.ทบทวน TOR ใหม่"; }
if($rowc2[Step]=="7"){ echo" 1.6 รายงานขอซื้อและจัดทำร่างประกาศและร่างเอกสารประกวดราคาประกาศทางเว็บไซต์"; }
if($rowc2[Step]=="8"){ echo"1.7 นำร่าง TOR พร้อมร่างประกาศและร่างเอกสารประกวดราคาประกาศฯทางเว็บไซต์"; }
if($rowc2[Step]=="9"){ echo"1.8 รอผลประกาศร่างขอบเขตของงาน TOR ทางเว็บไซต์"; }
if($rowc2[Step]=="10"){ echo"2. รายงานขอซื้อขอจ้าง"; }
if($rowc2[Step]=="11"){ echo"2.1 รายงานผลการรับฟังความคิดเห็นร่าง TOR"; }
if($rowc2[Step]=="12"){ echo"2.2 จัดทำเอกสารประกาศประกวดราคา"; }
if($rowc2[Step]=="13"){ echo" 3. การจัดหา (กำหนดยื่นข้อเสนอและราคา)"; }
if($rowc2[Step]=="14"){ echo"3.1 จัดทำประกาศประกวดราคาทางเว็บไซต์"; }
if($rowc2[Step]=="15"){ echo" 3.1 จัดทำประกาศประกวดราคาทางเว็บไซต์"; }
if($rowc2[Step]=="16"){ echo" 3.2 รอเปิดซอง"; }
if($rowc2[Step]=="17"){ echo" 3.3 อยู่ระหว่างคกก.พิจารณาผลการเปิดซอง"; }
if($rowc2[Step]=="18"){ echo" 3.4 คกก.รายงานผลการจัดซื้อโดยวิธีประกวดราคา (e-bidding)"; }
if($rowc2[Step]=="19"){ echo"4. อนุมัติจัดซื้อ"; }
if($rowc2[Step]=="20"){ echo" 4.1 อนุมัติจัดซื้อ"; }
if($rowc2[Step]=="21"){ echo" 4.2 อยู่ระหว่างขออนุมัติเงินประจำงวด"; }
if($rowc2[Step]=="22"){ echo" 5. การจัดทำสัญญา"; }
if($rowc2[Step]=="23"){ echo" 5.1 รวบรวมเอกสารส่งตรวจร่างสัญญา"; }
if($rowc2[Step]=="24"){ echo" 5.2 ตรวจร่างสัญญา"; }
if($rowc2[Step]=="25"){ echo" 5.3 อยู่ระหว่างจัดทำสัญญา/ใบสั่งซื้อ"; }
if($rowc2[Step]=="26"){ echo" 5.4 ลงนามสัญญา"; }
if($rowc2[Step]=="27"){ echo" 6. บริหารพัสดุ"; }
if($rowc2[Step]=="28"){ echo" 6.1 รอส่งมอบของ"; }
if($rowc2[Step]=="29"){ echo" 6.2 ส่งมอบของแล้ว อยู่ระหว่าง คกก.ตรวจรับพัสดุ"; }
if($rowc2[Step]=="30"){ echo" 7. การเบิกจ่ายเงิน"; }
if($rowc2[Step]=="31"){ echo" 7.1 รวบรวมเอกสารตั้งฎีกาเบิกจ่ายเงิน"; }
if($rowc2[Step]=="32"){ echo" 7.2 เบิกจ่ายเงินแล้ว"; }
?>
</div></td>
<td align="center"><?=$rowc2[Comment]?></td>
</tr>
<?php
$i++; }
} ?>
<tr>
<td bgcolor="#F4F4F4"><div align="center"><strong>รวม</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sql_level1="select * from fin_data a,fin_step b where a.Id=b.Idfin and b.Id>30 and a.Result='3'";
}else{
$sql_level1="select * from fin_data a,fin_step b where a.Id=b.Idfin and b.Id>30 and a.Result='3' and a.Idrefer='$selectdept' ";
}
$query_level1=mysql_query($sql_level1);
$num_level1=mysql_num_rows($query_level1);
?>
<?=$num_level1?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sqlc1="select sum(Money) from fin_data where Result='3' order by Id asc";
}else{
$sqlc1="select sum(Money) from fin_data where Result='3' and Idrefer='$selectdept' order by Id asc";
}
$queryc1=mysql_query($sqlc1);
$rowc1=mysql_fetch_array($queryc1);
$suma=$rowc1[0];
?>
<?=number_format($rowc1[0],2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sqlc1="select sum(Moneyco) from fin_data where Result='3' order by Id asc";
}else{
$sqlc1="select sum(Moneyco) from fin_data where Result='3' and Idrefer='$selectdept' order by Id asc";
} $queryc1=mysql_query($sqlc1);
$rowc1=mysql_fetch_array($queryc1);
$sumb=$rowc1[0];
$sumc=$suma-$sumb;
?>
<?=number_format($sumb,2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?=number_format($sumc,2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"> </td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sqlc1="select sum(Money1) from fin_data where Result='3' order by Id asc";
}else{
$sqlc1="select sum(Money1) from fin_data where Result='3' and Idrefer='$selectdept' order by Id asc";
} $queryc1=mysql_query($sqlc1);
$rowc1=mysql_fetch_array($queryc1);
$sumaa=$rowc1[0];
?>
<?=number_format($rowc1[0],2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sqlc1="select sum(Money2) from fin_data where Result='3' order by Id asc";
}else{
$sqlc1="select sum(Money2) from fin_data where Result='3' and Idrefer='$selectdept' order by Id asc";
} $queryc1=mysql_query($sqlc1);
$rowc1=mysql_fetch_array($queryc1);
$sumbb=$rowc1[0];
?>
<?=number_format($rowc1[0],2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?
if($selectdept==""){
$sqlc1="select sum(Money3) from fin_data where Result='3' order by Id asc";
}else{
$sqlc1="select sum(Money3) from fin_data where Result='3' and Idrefer='$selectdept' order by Id asc";
} $queryc1=mysql_query($sqlc1);
$rowc1=mysql_fetch_array($queryc1);
$sumcc=$rowc1[0];
$totaldd=$sumaa+$sumbb+$sumcc;
?>
<?=number_format($rowc1[0],2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"><strong>
<?=number_format($totaldd,2)?>
</strong></div></td>
<td bgcolor="#F4F4F4"><div align="center"></div></td>
<td bgcolor="#F4F4F4"><div align="center"></div></td>
<td bgcolor="#F4F4F4"><div align="center"></div></td>
</tr>
</table>
</td>
</tr>
<script>
$(function() {
$("button").click(function(){
$(".table2excel").table2excel({
exclude: ".noExl",
name: "Excel Document Name",
filename: "report1",
fileext: ".xls",
exclude_img: true,
exclude_links: true,
exclude_inputs: true
});
});
});
</script>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox