<commit_before><?php require_once '../_theme/util.inc.php'; chk_login(); $MasterPage = 'page_main.php';?>

<?php sb('title');?>ศูนย์สุขภาพองค์รวม<?php eb();?>

<?php sb('js_and_css_head'); ?>
<link rel="stylesheet" href="script/bootstrap-slider.css">
<link rel="stylesheet" href="css/datepicker.css">

<style>
    .form-group.paddingleft {
          padding-bottom: 5px;
          padding-left: 50px;
    }
    .form-group.fix {
          padding-bottom: 5px;
    }
    .form-control.fix {
          width: 270px !important;
    }
    .p3tableheader {
      background-color: #ccc;
    }
    .radio.p3paddingleft {
      padding-left: 50px;
    }
    .form-control.fix2 {
          width: 40px !important;
    }
    input[type=radio] {
    border: 0px;
    width: 35px;
    height: 35px;
   }
    input[type=checkbox]
    {
        margin: auto;
      width: 25px;
      height: 100%;
    }
    .textindent{
      text-indent: 1.5em;
    }
    .table-responsive.fix {
      overflow-x: hidden;
    }
    .showError{
      padding:20px;
      background-color:#FE2B2B;
      border-radius:2px;
      color:white;
    }
</style>
  
<?php eb();?>

<?php sb('notifications');?>
  <?php include_once '../notifications.php'; ?>
<?php eb();?>

<?php sb('content');?>
<?php include_once "../_connection/db_form.php"; ?>

<!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      บันทึกข้อมูลการล้างพิษตับ 
      <small>สำหรับฐานข้อมูลทะเบียนผู้ล้างพิษตับ (Liver Flushing Registry)</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li class="active">SITE NAME HERE</li>
    </ol>
  </section>

  <!-- Main content -->
  <section class="content">

    <div class="box box-primary">
            <div class="box-header with-border">
            <h3 class="box-title">Input Form</h3>
            <div class="pull-right">
                <a href="." class="btn btn-primary btn-lg active"><li class="fa fa-home"></li> รายการข้อมูลการล้างพิษตับ</a>
                <a href="form_private.php" class="btn btn-danger btn-lg"><li class="fa fa-lock"></li> ข้อมูลส่วนบุคคล</a>
            </div>
          </div>

          <div class="box-body">
            
            <div class="row">
                <div class="col-lg-12">
                <div class="alert alert-danger" id="showError" style="display:none;"></div>
                </div>
            </div>
            
            <div class="row">
                <div class="col-lg-12">
 
                <?php
                if(isset($_GET["form_id"])){
                    $form_id =$_GET["form_id"];
                }else{
                    $form_id='';
                }
                ?>
                <?php
                include_once("system_function.php");
                $sql = "SELECT * FROM `tbl_surveyuser` WHERE id='".$form_id."';";
                $query = $conn->query($sql);
                $data = $query->fetch_assoc();
                if($data["location"] =='10000001'){ $dbarr['site_name'] = 'บ้าน';} else if($data['location']=='10000002') {$dbarr['site_name']= 'อื่นๆ'; } else {
                   $sql = "select `site_name` from site_detail where id='".$data['location']."';";
                   $res = $conn->query($sql);
                   $dbarr = $res->fetch_assoc();
                }
                ?>
                
                </div>
            </div>            
            
            
            <input type="hidden" class="form-control" value="<?php echo $form_id;?>" id="form_id" />
            <?php
                $sqlSelectValue =  "SELECT * FROM `tbl_surveyform` WHERE ref_id_create='".$form_id."' ";
                $querySelectValue = $conn->query($sqlSelectValue);
                $dataform = $querySelectValue->fetch_assoc();
            ?>
            <div id="formsurvey">
            <!-------------------------- form 1-2-->
            <?php include_once "form_1.php"; ?>
            <?php
                $sqlx =  "SELECT MIN(b.id) as min FROM `tbl_surveyform` AS a INNER JOIN  tbl_surveyuser AS b ON a.ref_id_create=b.id WHERE b.user_id = '".$_SESSION['dtt_user_form']."';";
                $queryx = $conn->query($sqlx);
                if($form_id == $queryx->num_rows)
                    include_once "form_2.php";
                else{ ?>
                <table class="table table-hover" style="border: 1.5px solid #AA66CC;">
			<tr>
				<td class="p3tableheader" style="background-color: #AA66CC;color: #FFFFFF;">
					<strong>ตอนที่ 2 ผลการล้างพิษตับในครั้งที่ผ่านมา (กรอกครั้งเดียวคือครั้งแรก)</strong>
				</td>
			</tr>
                </table>
                <?php    
                }
            ?>
            
            <!-------------------------- form 3-4-->
            <?php include_once "form_3.php"; ?>
            <?php include_once "form_4.php"; ?>
            
            <!-------------------------- form 5-6-->
            <?php include_once "form_5.php"; ?>
            <?php include_once "form_6.php"; ?>
            </div>



          </div><!-- /.box-body -->
    </div><!-- /.box -->


  </section><!-- /.content -->'
  
<?php eb();?><commit_msg>push update frm<commit_after><?php require_once '../_theme/util.inc.php'; chk_login(); $MasterPage = 'page_main.php';?>

<?php sb('title');?>ศูนย์สุขภาพองค์รวม<?php eb();?>

<?php sb('js_and_css_head'); ?>
<link rel="stylesheet" href="script/bootstrap-slider.css">
<link rel="stylesheet" href="css/datepicker.css">

<style>
    .form-group.paddingleft {
          padding-bottom: 5px;
          padding-left: 50px;
    }
    .form-group.fix {
          padding-bottom: 5px;
    }
    .form-control.fix {
          width: 270px !important;
    }
    .p3tableheader {
      background-color: #ccc;
    }
    .radio.p3paddingleft {
      padding-left: 50px;
    }
    .form-control.fix2 {
          width: 40px !important;
    }
    input[type=radio] {
    border: 0px;
    width: 35px;
    height: 35px;
   }
    input[type=checkbox]
    {
        margin: auto;
      width: 25px;
      height: 100%;
    }
    .textindent{
      text-indent: 1.5em;
    }
    .table-responsive.fix {
      overflow-x: hidden;
    }
    .showError{
      padding:20px;
      background-color:#FE2B2B;
      border-radius:2px;
      color:white;
    }
</style>
  
<?php eb();?>

<?php sb('notifications');?>
  <?php include_once '../notifications.php'; ?>
<?php eb();?>

<?php sb('content');?>
<?php include_once "../_connection/db_form.php"; ?>

<!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      บันทึกข้อมูลการล้างพิษตับ 
      <small>สำหรับฐานข้อมูลทะเบียนผู้ล้างพิษตับ (Liver Flushing Registry)</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li class="active">SITE NAME HERE</li>
    </ol>
  </section>

  <!-- Main content -->
  <section class="content">

    <div class="box box-primary">
            <div class="box-header with-border">
            <h3 class="box-title">Input Form</h3>
            <div class="pull-right">
                <a href="." class="btn btn-primary btn-lg active"><li class="fa fa-home"></li> รายการข้อมูลการล้างพิษตับ</a>
                <a href="form_private.php" class="btn btn-danger btn-lg"><li class="fa fa-lock"></li> ข้อมูลส่วนบุคคล</a>
            </div>
          </div>

          <div class="box-body">
            
            <div class="row">
                <div class="col-lg-12">
                <div class="alert alert-danger" id="showError" style="display:none;"></div>
                </div>
            </div>
            
            <div class="row">
                <div class="col-lg-12">
 
                <?php
                if(isset($_GET["form_id"])){
                    $form_id =$_GET["form_id"];
                }else{
                    $form_id='';
                }
                ?>
                <?php
                include_once("system_function.php");
                $sql = "SELECT * FROM `tbl_surveyuser` WHERE id='".$form_id."';";
                $query = $conn->query($sql);
                $data = $query->fetch_assoc();
                if($data["location"] =='10000001'){ $dbarr['site_name'] = 'บ้าน';} else if($data['location']=='10000002') {$dbarr['site_name']= 'อื่นๆ'; } else {
                   $sql = "select `site_name` from site_detail where id='".$data['location']."';";
                   $res = $conn->query($sql);
                   $dbarr = $res->fetch_assoc();
                }
                ?>
                
                </div>
            </div>            
            
            
            <input type="hidden" class="form-control" value="<?php echo $form_id;?>" id="form_id" />
            <?php
                $sqlSelectValue =  "SELECT * FROM `tbl_surveyform` WHERE ref_id_create='".$form_id."' ";
                $querySelectValue = $conn->query($sqlSelectValue);
                $dataform = $querySelectValue->fetch_assoc();
            ?>
            <div id="formsurvey">
            <!-------------------------- form 1-2-->
            <?php include_once "form_1.php"; ?>
            <?php
                $sqlx =  "SELECT MIN(b.id) as min FROM `tbl_surveyform` AS a INNER JOIN  tbl_surveyuser AS b ON a.ref_id_create=b.id WHERE b.user_id = '".$_SESSION['dtt_user_form']."';";
                $queryx = $conn->query($sqlx);
                $resx = $queryx->fetch_assoc();
                if($form_id == $resx['min'])
                    include_once "form_2.php";
                else{ ?>
                <table class="table table-hover" style="border: 1.5px solid #AA66CC;">
			<tr>
				<td class="p3tableheader" style="background-color: #AA66CC;color: #FFFFFF;">
					<strong>ตอนที่ 2 ผลการล้างพิษตับในครั้งที่ผ่านมา (กรอกครั้งเดียวคือครั้งแรก)</strong>
				</td>
			</tr>
                </table>
                <?php    
                }
            ?>
            
            <!-------------------------- form 3-4-->
            <?php include_once "form_3.php"; ?>
            <?php include_once "form_4.php"; ?>
            
            <!-------------------------- form 5-6-->
            <?php include_once "form_5.php"; ?>
            <?php include_once "form_6.php"; ?>
            </div>



          </div><!-- /.box-body -->
    </div><!-- /.box -->


  </section><!-- /.content -->'
  
<?php eb();?>
{'fraction_non_alphanumeric': 0.1944950608995876, 'fraction_numerical': 0.014385729356478373, 'mean_word_length': 1.64, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2075600', 'n_tokens_mistral': 3712, 'n_tokens_neox': 3532, 'n_words': 593}