Files
2026-09-16 23:20:08 +07:00

128 lines
5.3 KiB
PHP

<script type="text/javascript">
function showClaim(op) {
document.getElementById('claim1').style.display='none';
document.getElementById('claim2').style.display='none';
if (op == "1") {
document.getElementById('claim1').style.display="block";
}else if (op == "2") {
document.getElementById('claim2').style.display="block";
}
}
function submit_company(){
document.getElementById("check_price").submit();
}
</script>
<!-- BEGIN PHP CODE PATIENT STAT PER DAY -->
<?php
require("connect_web.php");
//require("date_format.php");
@$ses_id = session_id();
@$ssCompany = $_POST['company'];
@$ssNation = $_POST['nation'];
@$ssClaim = $_POST['claim'];
@$ssOperation = $_POST['operation'];
?>
<div class="headerpanel"> <a href="" class="showmenu"></a>
<div class="headerright">
<?php require("right_header.php"); ?>
</div>
<!--headerpanel-->
<div class="breadcrumbwidget">
<?php require("breadcrumb.php"); ?>
<div class="row-fluid">
<div class="span8">
<!-- Content -->
<h4 class="widgettitle nomargin shadowed">คำนวณค่าใช้จ่ายในการผ่าตัด </h4>
<div class="widgetcontent bordered shadowed nopadding">
<form class="stdform stdform2" method="post" action="" id="check_price" enctype="multipart/form-data">
<p>
<label>เชื้อชาติ :</label>
<span class="field"><select name="nation" id="nation" class="" style="width:350px;">
<option value="0" selected="selected">-- เลือก --</option>
<option value="1" <?php if($ssNation==1) {echo "selected"; } ?>> ไทย </option>
<option value="2" <?php if($ssNation==2) {echo "selected"; } ?>> ต่างชาติ </option>
</select></span>
</p>
<p>
<label>สิทธิ :</label>
<span class="field"><select name="claim" id="claim" class="" style="width:350px;">
<option value="0">-- เลือก --</option>
<?php
$sql=mysql_query("select * from or_claim");
while($row=mysql_fetch_array($sql)) {
$id=$row[0];
$name_th=$row[1];
$name_en=$row[2];
if($ssClaim==$name_en) { $sClaim="selected"; }else{ $sClaim=""; }
echo '<option value="'.$name_en.'" '.$sClaim.' >'.$name_th.'</option>';
} ?>
</select></span>
</p>
<p>
<label>การผ่าตัด :</label>
<span class="field"><select name="operation" id="operation" class="" style="width:350px;">
<option value="0">-- เลือก --</option>
<?php
$sql=mysql_query("select * from or_operation");
while($row=mysql_fetch_array($sql)) {
$id=$row[0];
$name_th=$row[1];
if($ssOperation==$id) { $sOperation="selected"; }else{ $sOperation=""; }
echo '<option value="'.$id.'" '.$sOperation.' >'.$name_th.'</option>';
} ?>
</select></span>
</p>
<p>
<label>บริษัท :</label>
<span class="field"><select name="company" id="company" class="" style="width:350px;" OnChange="JavaScript:submit_company();">
<option value="0">-- เลือก --</option>
<?php
$sql=mysql_query("select * from or_company");
while($row=mysql_fetch_array($sql)) {
$id=$row[0];
$name_th=$row[1];
if($ssCompany==$id) { $sCompany="selected"; }else{ $sCompany=""; }
echo '<option value="'.$id.'" '.$sCompany.' >'.$name_th.'</option>';
} ?>
</select></span>
<p>
<label>รายการอุปกรณ์ :</label>
<span class="field">
<?php
$sql=mysql_query("SELECT a.`code` ,a.short_name FROM $ssClaim a,or_company b where a.company=b.id and b.id=$ssCompany");
$num=1;
while($row=mysql_fetch_array($sql)) {
$item_code=$row[0];
$short_name=$row[1];
echo $num.'. '.$short_name.'&nbsp;&nbsp;จำนวน&nbsp;&nbsp;<input type="text" class="span2" id="tools_amount" /><br />';
$num++;
} ?>
</select></span>
</p>
</form>
</div><!--widgetcontent-->
</div>
<!--span4-->
<!--span4-->
<div class="span4">
<h4 class="widgettitle nomargin">ข่าวประชาสัมพันธ์</h4>
<div class="widgetcontent bordered" style="height: 478px">
<?php while($row_news1 =mysql_fetch_array($result_news2)) { ?>
<p><font size="" color="#0000ff"><?php echo datetime_to_date($row_news1['date_add']); ?></font> : <?php echo $row_news1['title']; ?></p>
<?php } ?>
</div>
<!--widgetcontent-->
</div>
<!--span4-->
<!--span4-->
</div>
<!--row-fluid-->
</div>
<!--contentinner-->
</div>
<!--maincontent-->