403Webshell
Server IP : 134.236.49.22  /  Your IP : 216.73.216.114
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/KPI monitor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/KPI monitor/add_report.php
<?php
session_start();
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
include( "function.php" );
//update 16/07/67 13.13
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="th">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>บันทึกข้อมูล KPI</title>

<!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" rel="stylesheet">

<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" />-->
<script  src="java/date/jquery.min.js"></script> 
<script  src="java/date/bootstrap.min.js">	</script>
<script  src="java/date/bootstrap-multiselect.js"></script>

<!-- Carendar-->
<!--<link href="Jcode/jquery-ui.css" rel="stylesheet" type="text/css">-->
<!--<script  src="java/date/bootstrap3-typeahead.min.js"></script>  -->
<!--<script  src="Jcode/jquery-ui.js"></script>-->
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">

<link href="dist/css/bootstrap-datepicker.css" rel="stylesheet" />
  <script src="dist/js/bootstrap-datepicker-custom.js"></script>
  <script src="dist/locales/bootstrap-datepicker.th.min.js" charset="UTF-8"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css" />
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>

<style>
body {
    background-color: #f2f8ff;
    font-family: "Prompt", sans-serif;
}
.container {
    max-width: 1100px;
}
.card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 2rem;
}
h1 {
    font-size: 1.8px;
    color: #FFFFFF;
    font-weight: 500;
}
textarea {
    resize: none;
}
label {
    font-weight: 550;
	font-size: 0.9rem;
}
.table-info {
    border-radius: 12px;
}
.form-check-label {
    font-size: 0.7rem;
}	
.footer-img img {
    margin: 0 10px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<?php
$_SESSION["Done"] = 'N';
$username =$_GET['username'];
$id_no = $_GET['id_no'] ;
$compair =$_GET['compair'] ;
$eva =$_GET['eva'] ;
$goal =$_GET['goal'] ;
$def =$_GET['def'] ;
$graph =$_GET['graph'] ;
if (isset($_GET['bdate'])) {
	$reportDate =trim($_GET['bdate']); //ddmmbbbb
	//if (strpos($reportDate,'/')==
	$curDate = (substr($reportDate,6)-543).'-'.substr($reportDate,3,2).'-'.substr($reportDate,0,2);
} else {
	$reportDate =trim(date("d/m/").(date("Y")+543));
	$curDate = date('Y-m-d');
}
$UfromDate=substr($reportDate,0,2).'/'.substr($reportDate,3,2).'/'.(substr($reportDate,6)-543);
$indicators ='';
$xgoal = 'x';
$HA = '' ;
$PA= '' ;
$GA= '' ;
$KFA= '' ;
$HPT= '' ;
$T_NO= '' ;
$res = '' ;
$def = '' ;
$graph='';
$name ='';
$sd='N';
$H='N';
$st='N';
$sr='N';
mysql_select_db("KPI");
mysql_query("SET NAMES 'tis620'; ");
$sql='select  *  from indicators where id_no="'.$id_no.'" limit 1';
$result = mysql_query($sql);
if ($result) {
	 while ($object = mysql_fetch_object($result)) {
		$xgoal =  $object -> goal;
		$id_no = $object ->id_no;
		$indicators =  $object -> indicators;
		$deptList =  $object -> dept;
		$name1 =$object -> name1;
		$name2 =$object -> name2;
		$HA =$object -> HA;
		$PA =$object -> PA;
		$GA =$object -> GA;
		$KFA =$object -> KFA;
		$HPT =$object -> HPT;
		$T_NO =$object -> T_NO;
		$res =$object -> response;
		$name =$object -> name;
		$def =$object -> def;
		$graph =$object -> graph;
		$sd=$object -> sd;
		$H=$object -> H;
		$st=$object -> st;
		$sr=$object -> sr;
    }
	$sql="select * from result where id_no=".$id_no." and date = '".$curDate."' limit 1" ;
	$result = mysql_query($sql);
    while ($object = mysql_fetch_object($result)) {
		$total =  $object -> total;
		$amount = $object ->amount;
	 }
  
} else {
	$id_no ="not found";
	$indicators  ="";
	$goal  ="";
}
mysql_close($objConnect);
?>

<div class="container">
    <div class="text-center my-3">
        <img src="image/templatemo_logo.png" width="200">
        <p class="text-muted mt-2">ตอบสนองวิสัยทัศน์ : บริการปลอดภัย ร่วมใจทุกภาคี เจ้าหน้าที่มีความสุข</p>
    </div>
	
	<div class="card">
		<div class="card-header bg-primary text-white text-center">
            <h1>บันทึกข้อมูล KPI</h1>
        </div>
		<div class="card-body">
		<form  id="form1" name="form1" method="post" enctype="multipart/form-data" action="Report.php">
		<div class="d-flex justify-content-between align-items-center">
    <h5>แบบฟอร์มบันทึกข้อมูล</h5>

   
    <button type="button" id="helpBtn" 
      class="btn btn-outline-primary btn-sm"
      data-bs-toggle="popover"
      data-bs-placement="right"
      title="คำแนะนำการใช้งาน"
      data-bs-content="1. กรอก ID No <br>2. เลือกวัน/เดือน/ปี จากปฏิทิน <br>3. คลิกปุ่มบันทึกข้อมูลเมื่อเสร็จ"
      data-bs-html="true">
      <i class="bi bi-question-square-fill fs-5"></i>
    </button>
  </div>
			<div class="row mb-3">
				
				<div class="col-md-6">
					<label>ID No</label>
					<input type="text" readonly class="form-control" value="<?php echo $id_no; ?>">
                    <input type="hidden" name="id_no" value="<?php echo $id_no; ?>">
				</div>
				
				<div class="col-md-6">
				<label>วัน/เดือน/ปี</label>
				<input name="DateRegis"  id="DateRegis" class="form-control thdatepicker" onKeyPress="event.returnValue = false;"  data-date-format="mm/dd/yyyy" value = "<?php echo $UfromDate ; ?>" onChange="changeFunc()" />
				</div>
				

			</div>
			
			<div class="mb-3">
            	<label>ตัวชี้วัด</label>
				<input type="text" class="form-control"  name="indicators" id="label" value="<?php echo $indicators;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
			</div>
			
			<div class="row mb-3">
				<div class="col-md-8">
				<label>จำนวนข้อมูล (ส่วน)</label>
                        <input type="text" name="name1" id="name1" class="form-control" value="<?php echo $name1;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                        <small class="text-danger">** ชื่อ หรือ คำจำกัดความ เพื่ออธิบายความหมายหรือที่มาของข้อมูล ที่เป็นเป้าหมายการดำเนินงาน เช่น จำนวนผู้ป่วยทั้งหมด</small>
                 </div>
				 
				 <div class="col-md-4">
				 <label>จำนวนข้อมูล</label>
				 <input type="text" name="total" id="mm" class="form-control" value="<?php echo $total;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
				 		<div class="form-check mt-1">
                            <input class="form-check-input" type="checkbox" name="st" value="Y" <?php if ($st=="Y") echo 'checked'; ?>>
                            <label class="form-check-label">ไม่สะสมเป้าหมาย</label>
                        </div>
				 </div>	 
			</div>	
			
			<div class="row mb-3">
					<div class="col-md-8">
                        <label>จำนวนผลงาน (เศษ)</label>
                        <input type="text" name="name2" id="name2" class="form-control" value="<?php echo $name2;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                        <small class="text-danger">** ชื่อ หรือ คำจำกัดความ แสดงความหมายของข้อมูลที่เป็นผลงานตามตัวชี้วัด เช่น ผู้ป่วยที่เป็นเพศชาย</small>
                    </div>
					
					<div class="col-md-4">
                        <label>จำนวนผลงาน</label>
                        <input type="text" name="amount" id="label3" class="form-control" value="<?php echo $amount;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                        <div class="form-check mt-1">
                            <input class="form-check-input" type="checkbox" name="sr" value="Y" <?php if ($sr=="Y") echo 'checked'; ?>>
                            <label class="form-check-label">ใช้ค่าล่าสุด</label>
                        </div>
                    </div>
			</div>
				
			<label>เป้าหมาย ผลลัพธ์</label>
				
			<div class="row mb-3 g-3">
                    <div class="col-md-2">
                        <label>หน่วย</label>
                        <input type="text" name="goal3" id="goal3" class="form-control" value="<?php echo $eva;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
                    <div class="col-md-2">
                        <label>การเปรียบเทียบ</label>
                        <input type="text" name="goal1" id="goal1" class="form-control" value="<?php echo $compair;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
                    <div class="col-md-2">
						<label>ค่าประเมิน</label>
                        <input type="text" name="goal2" id="goal2" class="form-control"value="<?php echo $goal;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
					
                    <div class="col-md-2 align-self-center">
                        <div class="form-check ">
                            <input class="form-check-input" type="checkbox" name="sd" value="Y" <?php if ($sd=="Y") echo 'checked'; ?>>
                            <label class="form-check-label">แสดง S.D</label>
                        </div>
                    </div>
			</div>
			
			<label>ผลงานเพื่อตอบสนองภารกิจ(ลำดับภารกิจ)</label>
			<small class="text-danger">** กำหนดลำดับการแสดงผลสำหรับแต่ละภารกิจ</small>
			<div class="row mb-3 g-3">
                    <div class="col-md-2">
                        <label>ระดับองค์กร</label>
                        <input type="text" name="response2" id="response2" class="form-control" value="<?php echo  $HA;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
                    <div class="col-md-2">
                        <label>PA</label>
                        <input type="text" name="response3" id="response3" class="form-control" value="<?php echo  $PA;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
                    <div class="col-md-2">
                        <label>ตัวชี้วัด สสจ.</label>
                        <input type="text" name="response5" id="response5" class="form-control" value="<?php echo $HPT;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
					<div class="col-md-2">
                        <label>ระดับทีม</label>
                        <input type="text" name="response6" id="response6" class="form-control" value="<?php echo $T_NO;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
					<div class="col-md-2">
                        <label>ระดับหน่วยงาน</label>
                        <input type="text" name="response4" id="response4" class="form-control" value="<?php echo $GA;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
					<div class="col-md-2">
                        <label>เข็มมุ่ง</label>
                        <input type="text" name="response7" id="response7" class="form-control" value="<?php echo $KFA;?>" onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}">
                    </div>
			</div>	
			
			
			 <div class="row mb-3">
			 		 <div class="col-md-6">
                        <label>คำจำกัดความ (ตัวชี้วัด)</label>
						<textarea id="def" name="def" rows="4" class="form-control"  onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}"><?php echo $def;?></textarea> 
                    </div>
			 
                    <div class="col-md-6">
                        <label>คำอธิบายกราฟ</label>
						<textarea id="graph" name="graph" rows="4" class="form-control"  onKeyPress=" if (event.keyCode ==13){event.returnValue = false;}" maxlength="1000"><?php echo $graph;?></textarea>
                    </div>
             </div>
			 
			 	
			<div class="row mb-3"> 
			
			  <div class="col-md-6">
			   <label>หน่วยงานที่รับผิดชอบ</label>
                    <select id="framework" name="framework[]" multiple class="form-control">
                        <?php
                        mysql_select_db("KPI");
                        mysql_query("SET NAMES 'tis620'; ");
                        $sql="select * from dept";
                        $result=mysql_query($sql); 
                        while ($rowResp = mysql_fetch_object($result)) {
                            $sel = (strpos($deptList, trim($rowResp->dept_id).',') !== false) ? 'selected' : '';
                            echo '<option value="'.$rowResp->dept_id.'" '.$sel.'>'.trim($rowResp->dept).'</option>';
                        }
                        ?>
                    </select>
					<input type="hidden" name="selected_depts" id="selected_depts">
                </div>
				 
				 <div class="col-md-6">
                    <label>รหัสผู้รับผิดชอบ</label>
                    <input type="text" name="name" class="form-control" value="<?php echo $name; ?>">
                </div>
		</div>
		
		         <div class="text-end">
                    <button type="submit" name="insert" id="label4" value="บันทึกข้อมูล" class="btn btn-success me-2">บันทึกข้อมูล</button>
                    <button type="submit" name="append" value="เพิ่มตัวชี้วัด" id="label5" class="btn btn-primary me-2">เพิ่มตัวชี้วัด</button>
                    <!--<button type="submit" name="delete" value="ลบตัวชี้วัด" id="label6"  class="btn btn-danger me-2">ลบตัวชี้วัด/button>-->
                    <button type="submit" name="cancel" class="btn btn-secondary"  value="ยกเลิก" id="cancel" >ยกเลิก</button>
                </div>
				 </form>
	</div>
	</div>
	</div>

<script>
$(document).ready(function () {
    //  Choices.js
    const frameworkSelect = document.getElementById('framework');
    const choices = new Choices(frameworkSelect, {
        removeItemButton: true,
        placeholder: true,
        placeholderValue: 'เลือกหน่วยงาน',
        searchPlaceholderValue: 'ค้นหา...',
        shouldSort: false,
        itemSelectText: 'เลือก',
        noResultsText: 'ไม่พบผลลัพธ์',
        noChoicesText: 'ไม่มีตัวเลือกให้เลือก',
    });
    //  submit
   //  script
$('#form1').on('submit', function (event) {
    // hidden fields 
    const selectedValues = choices.getValue(true);
    
    // hidden fields 
    $('input[name="framework[]"]').remove();
    
    // hidden field
 selectedValues.forEach(value => {
    $('#form1').append('<input type="hidden" name="framework[]" value="' + value + '">');
});
    
    // 
});
    // 
    $('.thdatepicker').datepicker({
        format: 'dd/mm/yyyy',
        todayBtn: true,
        language: 'th',
        thaiyear: true
    }).datepicker("setDate", "<?php echo $UfromDate; ?>");
});

</script>

<script>
document.addEventListener('DOMContentLoaded', function () {
  //Popover
  var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
  popoverTriggerList.map(function (popoverTriggerEl) {
    return new bootstrap.Popover(popoverTriggerEl)
  });
});
</script>

<script type="text/javascript"> 
	/*$( function() {
		$( "#DateRegis" ).datepicker();
	 } );
*/
	function getValue(vname) 
	{ 
		var n = document.getElementById(vname).value
		return n;
	} 
	function changeFunc() {
    	var URL;
		URL= "<?php echo $_SERVER['PHP_SELF'] ?>";
		URL+= "?&bdate=";
		URL+= getValue('DateRegis');
		URL+= "&id_no=";
		URL+= getValue('id_no');
		URL+= "&eva=";
		URL+= getValue('goal3');
		URL+= "&def=";
		URL+= getValue('def');
		URL+= "&goal=";
		URL+= getValue('goal2');
		URL+= "&compair=";
		URL+= getValue('goal1');
		window.location= URL;
   	}
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit