โดย birdkritsna » 03/10/2019 11:40 am
thatsawan เขียน:ดู Code ทั้งหมดหน่อย
โค้ด: เลือกทั้งหมด
<?php
date_default_timezone_set("Asia/Bangkok");
require_once'connect.php';
include '../head_html.php';
include '../config.php';
?>
<link rel="stylesheet" href="../css/color.css">
<link rel="stylesheet" href="../tools_keyword_youtube/cssyou.css">
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<meta property="og:url" content="<?php echo ((array_key_exists('HTTPS', $_SERVER) && $_SERVER["HTTPS"] == "on") ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>"/>
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo $lang_unitcomdate; ?>"/>
<meta property="og:description" content="<?php echo $lang_unitcomdate; ?>"/>
<meta property="og:image" content="https://www.mindphp.com/images/content/Tool/tools_search_keyword_youtube.png"/>
<meta property="og:image:alt" content="<?php echo $lang_programconver; ?>"/>
<meta name="keywords" content="<?php echo $lang_progrcalculatetaxkk; ?>"/>
<title><?php echo $lang_program_converter; ?></title>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"name": "keyword youtube",
"image": "https://www.mindphp.com/images/info/mindphp-logo-v40.png",
"description": "โปรแกรมสำหรับแปลงไฟล์ PDF",
"operatingSystem": "Windows 7",
"applicationCategory": "http://schema.org/GameApplication",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"ratingCount": "23214"
}
}
</script>
<script src="https://www.google.com/recaptcha/api.js" asyncdefer></script>
<?php
include '../header.php';
include '../PHP-Pagination-master/Pagination.class.php';
ini_set('display_errors', 1);
error_reporting(~0);
$strKeyword = null;
if (isset($_POST["txtKeyword"])) {
$strKeyword = $_POST["txtKeyword"];
}
$page = 1;
if (isset($_GET['page'])) {
$page = $_GET['page'];
}
$row = 10;
$total_data = "SELECT COUNT(id) FROM $table_con";
$result_1 = mysqli_query($con, $total_data);
$total = mysqli_fetch_row($result_1);
$total_data = $total[0];
$start = ($page - 1) * $row;
$Pagination = new Pagination($page, $total_data);
$Pagination->parse();
$sql = "SELECT * FROM $table_con WHERE name LIKE '%" . $strKeyword . "%' ORDER BY id DESC Limit $start,$row";
$result = mysqli_query($con, $sql);
//curl เรียกใช้ web service//
?>
<div class="container">
<div class="col-md-12">
<div class="row">
<div class="btn-group btn-breadcrumb">
<a class="btn btn-default"><?php echo $lang_youarehere; ?> :</a>
<a href="https://www.mindphp.com/online-tools/mindphp-tools.html" class="btn btn-default"><?php echo $lang_tools; ?></a>
<a href="index.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_program_converter; ?></a>
</div>
</div><br>
<?php include 'script_facebook.php'; ?>
</div>
<div class="col-md-4">
<?php include 'menu_sidebar.php'; ?>
</div>
<div class=" col-md-8">
<div class="col-md-13">
<div class="panel panel-primary">
<div class="panel-heading"><?php echo $lang_program_converter; ?></div>
<div class="panel-body">
<form class="form-horizontal" name="form" method="post" action="">
<br>
<div class="col-md-12">
<div class="form-group">
<label for="inputname" class="col-sm-2 control-label"><?php echo $lang_name; ?> : </label>
<div class="col-sm-10">
<input required name="name" type="text" class="form-control" placeholder="<?php echo $lang_pleaseyourname ?>" value="">
</div>
</div>
<br>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#html" aria-controls="html" role="tab" data-toggle="tab"><?php echo $lang_htmllist; ?></a></li>
<li role="presentation"><a href="#image2" aria-controls="image2" role="tab" data-toggle="tab"><?php echo $lang_imagelist; ?></a></li>
<li role="presentation"><a href="#form2" aria-controls="form2" role="tab" data-toggle="tab"><?php echo $lang_formlist; ?></a></li>
</ul>
<!--------------แถบเมนู code html------------------>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="html"><br>
<div class="col-md-12">
<div class="form-group">
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_html; ?> :</label>
<div class="col-sm-10">
<div >
<textarea name="html2" id="html2" ></textarea>
<script>
CKEDITOR.replace('html2');
function CKupdate() {
for (instance in CKEDITOR.instances)
CKEDITOR.instances[instance].updateElement();
}
</script>
</div>
</div>
</div>
</div>
</div>
<!--------------แถบเมนู image------------------>
<div role="tabpanel" class="tab-pane" id="image2"><br>
<div class="col-md-12">
<div class="form-group">
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_image; ?> :</label>
<div class="col-sm-10">
<input type="file" name="picture" id="picture"><br/>
</div>
</div>
</div>
</div>
<!--------------แถบเมนู Form ------------------>
<div role="tabpanel" class="tab-pane" id="form2"><br>
<div class="col-md-9">
<div>
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_com_logo; ?> :</label>
<div class="col-sm-10">
<input type="file" name="image" ><br />
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_company_name; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_name" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_com_address; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_address" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_com_phone; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_phone" class="form-control" autocomplete="off" value="">
</div>
<label for="inputarea-value" class="col-sm-1 control-label"><?php echo $lang_com_fax; ?>:</label>
<div class="col-sm-3">
<input type="text" required name="com_fax" class="form-control" autocomplete="off" value="">
</div>
</div>
<br><br> <br> <br>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_name; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="cus_name" class="form-control" autocomplete="off" value="">
</div>
<label for="inputarea-value" class="col-sm-1 control-label"><?php echo $lang_invoice_number; ?> :</label>
<div class="col-sm-3">
<input type="text" required name="in_number" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_address; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="cus_address" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_invoice_date; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="in_date" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_tax_id ?> :</label>
<div class="col-sm-3">
<input type="text" required name="qty" class="form-control" autocomplete="off" placeholder="" value="">
</div>
<script>
function hiddenn(pvar) {
if(pvar==0){
document.getElementById("branch_no").style.display = 'none';
}else{
document.getElementById("branch_no").style.display = '';
}
}
</script>
<body onload="hiddenn('0')">
<input type="radio" required name="branch_no" autocomplete="off" placeholder=""
value="0" onClick="hiddenn('0')" /> <?php echo $lang_id_head_office ?>
<input type="radio" required name="branch_no" autocomplete="off" placeholder=""
value="1" onClick="hiddenn('1')" /> <?php echo $lang_branch_no ?>
<textarea rows="1" cols="10" type="text" name="branch_no" id="branch_no" placeholder="สาขาที่"></textarea>
</div><br>
<!---- ตารางในฟอร์ม------->
<div class="row">
<div class="col-md-12 table-responsive" align="center">
<table id="myTable" border='1'>
<tr>
<td align="center" width="10%"><?php echo "ลำดับ"; ?> </td>
<td align="center" width="35%"><?php echo "รายการ"; ?> </td>
<td align="center" width="35%"><?php echo "จำนวน"; ?> </td>
<td align="center" width="20%"><?php echo "ราคา/หน่วย"; ?> </td>
<td align="center" width="40%"><?php echo "จำนวนเงิน"; ?> </td>
</tr>
<td><input type="text" required name="idd" class="form-control" autocomplete="off" placeholder="" value=""> </td>
<td>
<input type="text" required name="name2" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="qty" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="price" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="total" class="form-control" autocomplete="off" placeholder="" value="">
</td>
</table>
</div>
</div>
<br>
<button onclick="add_row()">+</button>
<button onclick="del_row()">-</button>
<script>
function add_row() {
var table = document.getElementById("myTable");
count_rows = table.getElementsByTagName("tr").length;
var row = table.insertRow(count_rows);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
var cell5 = row.insertCell(4);
cell1.innerHTML = "<input type='number' name='id'"+count_rows+" value>";
cell2.innerHTML = "<input type='text' name='name2'"+count_rows+" value>";
cell3.innerHTML = "<input type='number' name='qty'"+count_rows+" value>";
cell4.innerHTML = "<input type='number' name='price'"+count_rows+" value>";
cell5.innerHTML = "<input type='number' name='total'"+count_rows+" value>";
}
function del_row(){
var table = document.getElementById("myTable");
count_rows = table.getElementsByTagName("tr").length;
document.getElementById("myTable").deleteRow(count_rows-1);
}
</script>
<!----------------------------->
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_note ?> :</label>
<div class="col-sm-9">
<input type="text" required name="note" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_payment_method ?> :</label>
<div class="col-sm-9">
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="cash"> <?php echo $lang_payment1 ?>
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="tmoney"> <?php echo $lang_payment2 ?>
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="check"> <?php echo $lang_payment3 ?>
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_bank_name ?> :</label>
<div class="col-sm-9">
<input type="text" required name="bank_name" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_note ?> :</label>
<div class="col-sm-9">
<input type="text" required name="note" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
</div>
</div>
</div>
<!-- -----------------ปุ่มคำสั่ง submit / reset--------------->
</div>
</div>
<div class="col-md-12">
<div align="center" class="g-recaptcha" required data-sitekey="<?php echo $keyrecaptcha; ?>"></div><br>
</div><br>
<div class="col-md-12">
<center>
<input class=" btn btn-success" type="submit" name="submit" value="<?php echo $lang_converter; ?>" />
<input type="reset" name="reset" class="btn btn-warning" onclick="window.location = 'index2.php?lang=<?php echo $lang; ?>';">
</center>
</div>
</form>
</div>
<div class="col-md-12">
<?php
print_r($_POST);
exit();
if (isset($_POST['g-recaptcha-response'])) {
$keyrecaptcha = $_POST['g-recaptcha-response'];
$response = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . $secretkeyrecaptcha . "&response=" . $keyrecaptcha . "&remoteip=" . $_SERVER['REMOTE_ADDR']), true);
if (!$keyrecaptcha) {
$missinginputsecret = "คลิกทำเครื่องหมายถูกตรวจสอบว่าคุณไม่ใช้โปรแกรมอัตโนมัติ";
?>
<br><div align="center" class="unnit-color"><b><?php print_r($missinginputsecret) ?></b></div>
<?php
}
}
if (isset($_POST['submit']) && $response['success'] == true) {
$submit = @$_POST['submit1'];
$html2 = $_POST['html2'];
$name = $_POST['name'];
file_put_contents('./file/'. $name. ".html", $html2);
date_default_timezone_set("Asia/Bangkok");
$datetime = time();
$date = date("Y-m-d H:i:s", time());
$ip = $_SERVER["REMOTE_ADDR"];
?>
<br><br>
<div align="center">
<h3><?php echo $lang_userinformation;?></h3>
<table class="table">
<tbody>
<!-- ชื่อ ผู้ใช้้งาน -->
<tr class="active">
<td align="right" width="50%">
<?php echo "ชื่อ : "; ?>
</td>
<td>
<?php echo $name ?>
</td>
</tr>
<tr class="active">
<td align="right" width="50%">
<?php echo $lang_recordtime . " :" ?>
</td>
<td>
<?php echo date("m-d-Y H:i:s", time()); ?>
</td>
</tr>
<tr class="warning">
<td align="right" width="50%">
<?php echo $lang_ipaddress . " : "; ?>
</td>
<td>
<?php echo $ip; ?>
</td>
</tr>
</tbody>
</table>
<?php
require_once 'connect.php';
$sql = "INSERT INTO $table_con (name, filename,use_date, ip)"
. "VALUES ('$name' ,'$html2', '$date', '$ip')";
mysqli_query($con, $sql) or die('Save Error');
$last_id = mysqli_insert_id($con);
}
?>
</div>
<div align="right"> <?php echo $lang_vercheckunit; ?> <?php echo $verconvertunit; ?></div>
</div>
</div>
</div>
<div class="col-md-12">
<?php include 'tags.php'; ?>
</div>
<div class="well2">
<br>
<ul>
<b><?php echo $lang_html_howto;?></b>
<li><?php echo $lang_enteryourname;?> <b><?php echo $lang_name;?></b></li>
<li><?php echo $lang_html_enter;?> </li>
<li><?php echo $lang_pressbutton;?> <b><?php echo $lang_converter;?></b> <?php echo $lang_seeresults;?></li>
</ul>
</div>
</div>
<div class="col-md-12 well well-lg">
<?php include 'content.php' ?>
</div>
<div class="row">
<div class="col-md-12 table-responsive" align="center">
<h3 align="center"><?php echo $lang_recentinformation;?></h3>
<table class="table table-striped">
<thead class="bg-primary" align="bottom">
<tr>
<th class="text-center" width="2%"><b><?php echo $lang_no; ?></b></th>
<th class="text-center" width="5%"> <?php echo $lang_name?> </th>
<th class="text-center" width="15%"> <?php echo $lang_html?> </th>
<th class="text-center" width="5%"> <?php echo $lang_savewhen?> </th>
<th class="text-center" width="5%"> <?php echo $lang_ipaddress;?> </th>
<!-- <th> Edit time-date </th> -->
<th class="text-center" width="5%"> <?php echo $lang_showinformation?> </th>
</tr>
</thead>
<?php
$sql = "SELECT * FROM $table_con ORDER BY id desc Limit $start,$row";
$result2 = mysqli_query($con, $sql);
while ($fetch = mysqli_fetch_assoc($result2)) {
?>
<tr>
<td class="text-center"> <?php echo $fetch['id']; ?></td> <!-- ลำดับ-->
<td class="text-center"> <?php echo $fetch['name']; ?></td> <!-- ชื่อ-->
<td class="text-center"> <?php echo $fetch['filename']; ?></td> <!-- url-->
<td class="textcenter"> <?php
if ($fetch['use_date']) {
echo $fetch['use_date'];
}
?></td>
<td class="text-center"> <?php include 'ip.php'; ?></td>
<td>
<center><a class="glyphicon glyphicon-new-window" href="show.php?id= <?php echo $fetch['id']; ?>&lang=<?php echo $lang; ?> "></a></center>
</td>
</tr>
<?php
}
?>
</table>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<nav aria-label="Page navigation">
<?php
echo $Pagination->parse();
?>
</nav>
</div>
</div>
</div>
<a href="list.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_moreinformation; ?></a>
</div>
</div>
</div>
<?php include '../footer.php'; ?>
[quote="thatsawan"]ดู Code ทั้งหมดหน่อย[/quote]
[code]<?php
date_default_timezone_set("Asia/Bangkok");
require_once'connect.php';
include '../head_html.php';
include '../config.php';
?>
<link rel="stylesheet" href="../css/color.css">
<link rel="stylesheet" href="../tools_keyword_youtube/cssyou.css">
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<meta property="og:url" content="<?php echo ((array_key_exists('HTTPS', $_SERVER) && $_SERVER["HTTPS"] == "on") ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>"/>
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo $lang_unitcomdate; ?>"/>
<meta property="og:description" content="<?php echo $lang_unitcomdate; ?>"/>
<meta property="og:image" content="https://www.mindphp.com/images/content/Tool/tools_search_keyword_youtube.png"/>
<meta property="og:image:alt" content="<?php echo $lang_programconver; ?>"/>
<meta name="keywords" content="<?php echo $lang_progrcalculatetaxkk; ?>"/>
<title><?php echo $lang_program_converter; ?></title>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"name": "keyword youtube",
"image": "https://www.mindphp.com/images/info/mindphp-logo-v40.png",
"description": "โปรแกรมสำหรับแปลงไฟล์ PDF",
"operatingSystem": "Windows 7",
"applicationCategory": "http://schema.org/GameApplication",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"ratingCount": "23214"
}
}
</script>
<script src="https://www.google.com/recaptcha/api.js" asyncdefer></script>
<?php
include '../header.php';
include '../PHP-Pagination-master/Pagination.class.php';
ini_set('display_errors', 1);
error_reporting(~0);
$strKeyword = null;
if (isset($_POST["txtKeyword"])) {
$strKeyword = $_POST["txtKeyword"];
}
$page = 1;
if (isset($_GET['page'])) {
$page = $_GET['page'];
}
$row = 10;
$total_data = "SELECT COUNT(id) FROM $table_con";
$result_1 = mysqli_query($con, $total_data);
$total = mysqli_fetch_row($result_1);
$total_data = $total[0];
$start = ($page - 1) * $row;
$Pagination = new Pagination($page, $total_data);
$Pagination->parse();
$sql = "SELECT * FROM $table_con WHERE name LIKE '%" . $strKeyword . "%' ORDER BY id DESC Limit $start,$row";
$result = mysqli_query($con, $sql);
//curl เรียกใช้ web service//
?>
<div class="container">
<div class="col-md-12">
<div class="row">
<div class="btn-group btn-breadcrumb">
<a class="btn btn-default"><?php echo $lang_youarehere; ?> :</a>
<a href="https://www.mindphp.com/online-tools/mindphp-tools.html" class="btn btn-default"><?php echo $lang_tools; ?></a>
<a href="index.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_program_converter; ?></a>
</div>
</div><br>
<?php include 'script_facebook.php'; ?>
</div>
<div class="col-md-4">
<?php include 'menu_sidebar.php'; ?>
</div>
<div class=" col-md-8">
<div class="col-md-13">
<div class="panel panel-primary">
<div class="panel-heading"><?php echo $lang_program_converter; ?></div>
<div class="panel-body">
<form class="form-horizontal" name="form" method="post" action="">
<br>
<div class="col-md-12">
<div class="form-group">
<label for="inputname" class="col-sm-2 control-label"><?php echo $lang_name; ?> : </label>
<div class="col-sm-10">
<input required name="name" type="text" class="form-control" placeholder="<?php echo $lang_pleaseyourname ?>" value="">
</div>
</div>
<br>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#html" aria-controls="html" role="tab" data-toggle="tab"><?php echo $lang_htmllist; ?></a></li>
<li role="presentation"><a href="#image2" aria-controls="image2" role="tab" data-toggle="tab"><?php echo $lang_imagelist; ?></a></li>
<li role="presentation"><a href="#form2" aria-controls="form2" role="tab" data-toggle="tab"><?php echo $lang_formlist; ?></a></li>
</ul>
<!--------------แถบเมนู code html------------------>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="html"><br>
<div class="col-md-12">
<div class="form-group">
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_html; ?> :</label>
<div class="col-sm-10">
<div >
<textarea name="html2" id="html2" ></textarea>
<script>
CKEDITOR.replace('html2');
function CKupdate() {
for (instance in CKEDITOR.instances)
CKEDITOR.instances[instance].updateElement();
}
</script>
</div>
</div>
</div>
</div>
</div>
<!--------------แถบเมนู image------------------>
<div role="tabpanel" class="tab-pane" id="image2"><br>
<div class="col-md-12">
<div class="form-group">
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_image; ?> :</label>
<div class="col-sm-10">
<input type="file" name="picture" id="picture"><br/>
</div>
</div>
</div>
</div>
<!--------------แถบเมนู Form ------------------>
<div role="tabpanel" class="tab-pane" id="form2"><br>
<div class="col-md-9">
<div>
<label for="inputarea-value" class="col-sm-2 control-label"><?php echo $lang_com_logo; ?> :</label>
<div class="col-sm-10">
<input type="file" name="image" ><br />
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_company_name; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_name" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_com_address; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_address" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_com_phone; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="com_phone" class="form-control" autocomplete="off" value="">
</div>
<label for="inputarea-value" class="col-sm-1 control-label"><?php echo $lang_com_fax; ?>:</label>
<div class="col-sm-3">
<input type="text" required name="com_fax" class="form-control" autocomplete="off" value="">
</div>
</div>
<br><br> <br> <br>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_name; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="cus_name" class="form-control" autocomplete="off" value="">
</div>
<label for="inputarea-value" class="col-sm-1 control-label"><?php echo $lang_invoice_number; ?> :</label>
<div class="col-sm-3">
<input type="text" required name="in_number" class="form-control" autocomplete="off" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_address; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="cus_address" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_invoice_date; ?> :</label>
<div class="col-sm-5">
<input type="text" required name="in_date" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_cus_tax_id ?> :</label>
<div class="col-sm-3">
<input type="text" required name="qty" class="form-control" autocomplete="off" placeholder="" value="">
</div>
<script>
function hiddenn(pvar) {
if(pvar==0){
document.getElementById("branch_no").style.display = 'none';
}else{
document.getElementById("branch_no").style.display = '';
}
}
</script>
<body onload="hiddenn('0')">
<input type="radio" required name="branch_no" autocomplete="off" placeholder=""
value="0" onClick="hiddenn('0')" /> <?php echo $lang_id_head_office ?>
<input type="radio" required name="branch_no" autocomplete="off" placeholder=""
value="1" onClick="hiddenn('1')" /> <?php echo $lang_branch_no ?>
<textarea rows="1" cols="10" type="text" name="branch_no" id="branch_no" placeholder="สาขาที่"></textarea>
</div><br>
<!---- ตารางในฟอร์ม------->
<div class="row">
<div class="col-md-12 table-responsive" align="center">
<table id="myTable" border='1'>
<tr>
<td align="center" width="10%"><?php echo "ลำดับ"; ?> </td>
<td align="center" width="35%"><?php echo "รายการ"; ?> </td>
<td align="center" width="35%"><?php echo "จำนวน"; ?> </td>
<td align="center" width="20%"><?php echo "ราคา/หน่วย"; ?> </td>
<td align="center" width="40%"><?php echo "จำนวนเงิน"; ?> </td>
</tr>
<td><input type="text" required name="idd" class="form-control" autocomplete="off" placeholder="" value=""> </td>
<td>
<input type="text" required name="name2" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="qty" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="price" class="form-control" autocomplete="off" placeholder="" value="">
</td>
<td>
<input type="text" required name="total" class="form-control" autocomplete="off" placeholder="" value="">
</td>
</table>
</div>
</div>
<br>
<button onclick="add_row()">+</button>
<button onclick="del_row()">-</button>
<script>
function add_row() {
var table = document.getElementById("myTable");
count_rows = table.getElementsByTagName("tr").length;
var row = table.insertRow(count_rows);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
var cell5 = row.insertCell(4);
cell1.innerHTML = "<input type='number' name='id'"+count_rows+" value>";
cell2.innerHTML = "<input type='text' name='name2'"+count_rows+" value>";
cell3.innerHTML = "<input type='number' name='qty'"+count_rows+" value>";
cell4.innerHTML = "<input type='number' name='price'"+count_rows+" value>";
cell5.innerHTML = "<input type='number' name='total'"+count_rows+" value>";
}
function del_row(){
var table = document.getElementById("myTable");
count_rows = table.getElementsByTagName("tr").length;
document.getElementById("myTable").deleteRow(count_rows-1);
}
</script>
<!----------------------------->
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_note ?> :</label>
<div class="col-sm-9">
<input type="text" required name="note" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_payment_method ?> :</label>
<div class="col-sm-9">
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="cash"> <?php echo $lang_payment1 ?>
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="tmoney"> <?php echo $lang_payment2 ?>
<input type="radio" required name="payment_method" autocomplete="off" placeholder="" value="check"> <?php echo $lang_payment3 ?>
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_bank_name ?> :</label>
<div class="col-sm-9">
<input type="text" required name="bank_name" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
<div class="form-group">
<label for="inputarea-value" class="col-sm-3 control-label"><?php echo $lang_note ?> :</label>
<div class="col-sm-9">
<input type="text" required name="note" class="form-control" autocomplete="off" placeholder="" value="">
</div>
</div>
</div>
</div>
</div>
<!-- -----------------ปุ่มคำสั่ง submit / reset--------------->
</div>
</div>
<div class="col-md-12">
<div align="center" class="g-recaptcha" required data-sitekey="<?php echo $keyrecaptcha; ?>"></div><br>
</div><br>
<div class="col-md-12">
<center>
<input class=" btn btn-success" type="submit" name="submit" value="<?php echo $lang_converter; ?>" />
<input type="reset" name="reset" class="btn btn-warning" onclick="window.location = 'index2.php?lang=<?php echo $lang; ?>';">
</center>
</div>
</form>
</div>
<div class="col-md-12">
<?php
print_r($_POST);
exit();
if (isset($_POST['g-recaptcha-response'])) {
$keyrecaptcha = $_POST['g-recaptcha-response'];
$response = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . $secretkeyrecaptcha . "&response=" . $keyrecaptcha . "&remoteip=" . $_SERVER['REMOTE_ADDR']), true);
if (!$keyrecaptcha) {
$missinginputsecret = "คลิกทำเครื่องหมายถูกตรวจสอบว่าคุณไม่ใช้โปรแกรมอัตโนมัติ";
?>
<br><div align="center" class="unnit-color"><b><?php print_r($missinginputsecret) ?></b></div>
<?php
}
}
if (isset($_POST['submit']) && $response['success'] == true) {
$submit = @$_POST['submit1'];
$html2 = $_POST['html2'];
$name = $_POST['name'];
file_put_contents('./file/'. $name. ".html", $html2);
date_default_timezone_set("Asia/Bangkok");
$datetime = time();
$date = date("Y-m-d H:i:s", time());
$ip = $_SERVER["REMOTE_ADDR"];
?>
<br><br>
<div align="center">
<h3><?php echo $lang_userinformation;?></h3>
<table class="table">
<tbody>
<!-- ชื่อ ผู้ใช้้งาน -->
<tr class="active">
<td align="right" width="50%">
<?php echo "ชื่อ : "; ?>
</td>
<td>
<?php echo $name ?>
</td>
</tr>
<tr class="active">
<td align="right" width="50%">
<?php echo $lang_recordtime . " :" ?>
</td>
<td>
<?php echo date("m-d-Y H:i:s", time()); ?>
</td>
</tr>
<tr class="warning">
<td align="right" width="50%">
<?php echo $lang_ipaddress . " : "; ?>
</td>
<td>
<?php echo $ip; ?>
</td>
</tr>
</tbody>
</table>
<?php
require_once 'connect.php';
$sql = "INSERT INTO $table_con (name, filename,use_date, ip)"
. "VALUES ('$name' ,'$html2', '$date', '$ip')";
mysqli_query($con, $sql) or die('Save Error');
$last_id = mysqli_insert_id($con);
}
?>
</div>
<div align="right"> <?php echo $lang_vercheckunit; ?> <?php echo $verconvertunit; ?></div>
</div>
</div>
</div>
<div class="col-md-12">
<?php include 'tags.php'; ?>
</div>
<div class="well2">
<br>
<ul>
<b><?php echo $lang_html_howto;?></b>
<li><?php echo $lang_enteryourname;?> <b><?php echo $lang_name;?></b></li>
<li><?php echo $lang_html_enter;?> </li>
<li><?php echo $lang_pressbutton;?> <b><?php echo $lang_converter;?></b> <?php echo $lang_seeresults;?></li>
</ul>
</div>
</div>
<div class="col-md-12 well well-lg">
<?php include 'content.php' ?>
</div>
<div class="row">
<div class="col-md-12 table-responsive" align="center">
<h3 align="center"><?php echo $lang_recentinformation;?></h3>
<table class="table table-striped">
<thead class="bg-primary" align="bottom">
<tr>
<th class="text-center" width="2%"><b><?php echo $lang_no; ?></b></th>
<th class="text-center" width="5%"> <?php echo $lang_name?> </th>
<th class="text-center" width="15%"> <?php echo $lang_html?> </th>
<th class="text-center" width="5%"> <?php echo $lang_savewhen?> </th>
<th class="text-center" width="5%"> <?php echo $lang_ipaddress;?> </th>
<!-- <th> Edit time-date </th> -->
<th class="text-center" width="5%"> <?php echo $lang_showinformation?> </th>
</tr>
</thead>
<?php
$sql = "SELECT * FROM $table_con ORDER BY id desc Limit $start,$row";
$result2 = mysqli_query($con, $sql);
while ($fetch = mysqli_fetch_assoc($result2)) {
?>
<tr>
<td class="text-center"> <?php echo $fetch['id']; ?></td> <!-- ลำดับ-->
<td class="text-center"> <?php echo $fetch['name']; ?></td> <!-- ชื่อ-->
<td class="text-center"> <?php echo $fetch['filename']; ?></td> <!-- url-->
<td class="textcenter"> <?php
if ($fetch['use_date']) {
echo $fetch['use_date'];
}
?></td>
<td class="text-center"> <?php include 'ip.php'; ?></td>
<td>
<center><a class="glyphicon glyphicon-new-window" href="show.php?id= <?php echo $fetch['id']; ?>&lang=<?php echo $lang; ?> "></a></center>
</td>
</tr>
<?php
}
?>
</table>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<nav aria-label="Page navigation">
<?php
echo $Pagination->parse();
?>
</nav>
</div>
</div>
</div>
<a href="list.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_moreinformation; ?></a>
</div>
</div>
</div>
<?php include '../footer.php'; ?>
[/code]