โค้ด: เลือกทั้งหมด
<?php
require_once'conn.php';
//include '../head_html.php';
include '../config.php';
include '../header.php';
?>
<link rel="stylesheet" href="../css/color.css">
<!-- <link rel="stylesheet" href="../tools_keyword_youtube/cssyou.css"> -->
<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_programframe; ?>" />
<meta property="og:description" content="<?php echo $lang_believethatkk; ?> " />
<meta property="og:image" content="https://www.mindphp.com/images/content/Tool/M-Tax-Calculator.png" />
<meta property="og:image:alt" content="<?php echo $lang_progrcalculatetax; ?>" />
<meta name="keywords" content="home loan, home loan Calculator , โปรแกรม Pace, โปรแกรมคำนวณสินเชื่อบ้าน, ภาษีหัก ณ ที่จ่าย" />
<title><?php echo $lang_programframe;?></title>
<!-- <script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"name": "Homeloan Calculator",
"image": "https://www.mindphp.com/images/info/mindphp-logo-v40.png",
"description": "",
"applicationCategory": "http://schema.org/GameApplication",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.3",
"ratingCount": "31242"
},
"offers": {
"@type": "Offer",
"price": "1.00",
"priceCurrency": "USD"
}
}
</script> -->
<?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 $data";
$result_1 = mysqli_query($conn, $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 $data WHERE name LIKE '%" . $strKeyword . "%' ORDER BY id DESC Limit $start,$row";
$result = mysqli_query($conn, $sql);
// ดาต้าเบสที่ปิดไว้ลอง รันหน้าเปล่าๆดูก่อน
// $row = 10;
// $total_data = "SELECT COUNT(id) FROM $data";
// $result_1 = mysqli_query($conn, $total_data);
// $total = mysqli_fetch_row($result_1);
// $total_data = $total[0];
// $Pagination = new Pagination($page,$total_data);
// $Pagination->parse();
// $start = ($page - 1)* $row;
?>
<div class="container">
<div class="col-md-12">
<div class="row">
<!--pathway-->
<div class="btn-group btn-breadcrumb">
<a href="#" 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_programframe;?></a>
</div>
</div><br>
</div>
<!-- <div class="row"> -->
<!--menu-->
<div class="col-md-4">
<?php include 'menu_sidebar.php'; ?>
</div>
<div class="col-md-4">
<div class="col-md-12">
<?php //include 'script_facebook.php'; ?>
</div>
</div><br>
<div class="col-md-8">
<form method="post" action="#" name="from" enctype="multipart/form-data">
<div class="panel-group">
<div class="panel panel-primary" align="center">
<div class="panel-heading"><b><?php echo $lang_programframe ?></b></div>
<div class="panel-body" >
<div class="input-group">
<span class="input-group-addon alert-info" id="basic-addon1"><?php echo $lang_user_name;?></span>
<input type="text" required name="user_name" id="user_name" class="form-control" autocomplete="off" placeholder="<?php echo $lang_enteryourname;?>" value="">
</div><br>
<div class="input-group">
<form>
<span class="input-group-addon alert-info" id="basic-addon1"><?php echo $lang_template_name;?></span>
<select name="template_name"type="text" required id="template_name" class="form-control" autocomplete="off" placeholder="<?php echo $lang_template_name;?>" value="">
<option value="<?php echo $lang_img1; ?>"><?php echo $lang_img1; ?></option>
<option value="<?php echo $lang_img2; ?>"><?php echo $lang_img2; ?></option>
<option value="<?php echo $lang_img3; ?>"><?php echo $lang_img3; ?></option>
</select>
<br>
<div class="col-2">
</div>
</div><br>
<div class="row">
<div class="col-md-3"> <input type="hidden" name="limit_over" id="limit_over" value="10"></div>
<div class="col-md-6">
<!-- <a><br>ลากหรือเลือกไฟล์รูปภาพ JPG, PNG, WebP</a> -->
<!-- <form name="form" method="post" action="upload.php" enctype="multipart/form-data">
<input type="file" name="fileupload" id="fileupload">
<input type="submit" class="btn btn-success" value="save" name="save">
</form> -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title> tools_frame_logs</title>
<!-- Google web fonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700" rel='stylesheet' />
<!-- The main CSS file -->
<link href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
<form id="upload" method="post" action="upload.php" enctype="multipart/form-data">
<div id="drop">
Drop Here
<a>Browse</a>
<input type="file" name="file_before" id ="file_before" multiple />
</div>
<ul>
<!-- The file uploads will be shown here -->
</ul>
<!-- <li class="">
<canvas width = "48" height ="48" >
<input type="text" value="0" data-width="48" data-height="48" data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#3e4043" />
<p>Sunset.jpg <i>145 KB</i></p>
<span></span>
</li> -->
<!-- <input type="text" value="75" class="dial">
<script>
$(function() {
$(".dial").knob();
});
</script>
<input type="text" class="dial" data-min="-50" data-max="50">
<script>
$(".dial").knob({
'release' : function (v) { /*make something*/ }
});
</script>
<input type="text" value="75" class="dial">
<script>
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
</script>
<script>
$('.dial').trigger(
'configure',
{
"min":10,
"max":40,
"fgColor":"#FF0000",
"skin":"tron",
"cursor":true
}
);
</script>
<script>
$('.dial')
.val(27)
.trigger('change');
</script> -->
<input type="submit" class="btn btn-success" value="save" name="save">
</form>
<!-- <footer>
<h2><a href="http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/"><i>Tutorial:</i> Mini Ajax File Upload Form</a></h2>
<div id="tzine-actions">
<a id="tzine-download" href="http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/" title="Download This Example!">Download</a>
</div>
</footer> -->
<!-- JavaScript Includes -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="assets/js/jquery.knob.js"></script>
<!-- jQuery File Upload Dependencies -->
<script src="assets/js/jquery.ui.widget.js"></script>
<script src="assets/js/jquery.iframe-transport.js"></script>
<script src="assets/js/jquery.fileupload.js"></script>
<!-- Our main JS file -->
<script src="assets/js/script.js"></script>
<!-- Only used for the demos. Please ignore and remove. -->
<script src="http://cdn.tutorialzine.com/misc/enhance/v1.js" async></script>
</body>
</html>
<!-- </form> -->
<div id="">
<!-- <label for="image" class="lb">รูปภาพ</label> -->
<!-- <input type="file" form id="upload" method="post" action="" class="contact-form-text" enctype="multipart/form-data"> -->
<!-- <input type="file" name="image" class="contact-form-text" id="image" placeholder="Enter image"> -->
<!-- <div id="downlaod_all" class="col-md-12" style="text-align: center;">
<input id="btn_all" type="button" name="submit" class="btn btn-success" value="แสดง">
</div> -->
</div>
</div>
<br><br>
<!--------------Result------------------>
<div class="row alert_token" style="display:none;">
<div class="col-md-12" style="font-weight:bold;">*** ไม่สามารถบันทึกข้อมูลได้ *** คลิกทำเครื่องหมายถูกตรวจสอบว่าคุณไม่ใช่โปรแกรมอัตโนมัติ</div>
</div>
<br><br><br><br>
<div class="row">
<div class="col-md-6" style="text-align:center;">
<input type="radio" id="save1" name="save" value="save"> เก็บภาพบนเว็บนี้
</div>
<div class="col-md-6" style="text-align:center;">
<input type="radio" id="save2" name="save" value="nosave" checked=""> ไม่เก็บภาพ
</div>
<!-- <div id="downlaod_all" class="col-md-12" style="text-align: center;">
<input id="btn_all" type="button" name="submit" class="btn btn-success" value="แสดง">
</div>-->
</div>
<br><br>
<div class="row">
<div class="col-md-11" style="text-align: right;">
เวอร์ชัน 1.0.0 Beta 1.0.0
</div>
</div>
</div>
</div>
</form>
<div class="col-md-12">
<?php
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['save'])) { //echo "cat"; exit();
$save = @$_POST['save'];
$user_name = $_POST['user_name'];
$template_name = $_POST['template_name'];
// $file_before = $_POST['file_before'];
$size_image_before = '';
$file_size_before = '';
$file_after = $_POST['file_after'];
$size_image_after ='';
$file_size_after = '';
$resize_optimize = 1;
$create_date = '';
$ip= 1 ;
$save_image = '';
$sql1 = "INSERT INTO tools_frame_logs
(user_name ,
template_name,
file_before,
size_image_before,
file_size_before,
file_after,
size_image_after,
file_size_after,
resize_optimize,
create_date,
ip,
save_image)
VALUES
('".$user_name."',
'".$template_name."',
'".$file_before."',
'".$size_image_before."',
'".$file_size_before."',
'".$file_after."',
'".$size_image_after."' ,
'".$file_size_after."',
'".$resize_optimize."',
'".$create_date."',
'".$ip."',
'".$save_image."')";
//echo $sql1;exit();
$result = mysqli_query($conn, $sql1);
}
?>
<!---------------------------------------------------- กราฟ ---------------------------------------------- -->
<?php
//พอกดคำนวณ SQL ด้านล่างนี้คือ ตัวบันทึกลงฐานข้อมูล ว่าบันทึกอะไรบ้าง
// $sql = "INSERT INTO tools_frame_logs ( user_name , template_name, file_before, size_image_before, file_size_before, file_after, size_image_after, file_size_after,resize_optimize, create_date, ip,save_image)
// VALUES ('$user_name','$template_name','$file_before','$size_image_before','$file_size_before','$file_after','$size_image_after' ,'$file_size_after', '$size_image_after' ,'$create_date','$lang_ip', '$save_image')";
// $result = mysqli_query($conn, $sql);
// $sql = "INSERT INTO $data (
// user_name,
// template_name,
// file_before,
// size_image_before,
// file_size_before,
// file_after,
// size_image_after,
// file_size_after,
// resize_optimize,
// create_date,
// ip,
// save_image
// )"
// . "VALUES (
// '$user_name',
// '$template_name',
// '$save_image'
// )";
#ตัวอย่างเดิมต้องมีทั้งหมดแบบข้าง เเต่นี้ลองเทสก่อนให้้มันเข้าดาต้าเบสเเค่ ชื่อ,เทมเพลต,ไฟล์รูปที่ผู้ใช้ใส่
// #. "VALUES (
// // '$user_name',
// // '$template_name',
// // '$file_before',
// // '$size_image_before',
// // '$file_size_before',
// // '$file_after',
// // '$size_image_after',
// // '$file_size_after',
// // '$resize_optimize',
// // '$create_date',
// // '$ip',
// // '$save_image'
// // )";
// mysqli_query($conn, $sql);
// }
?>
<?php include 'tags.php'; ?>
</div>
</div>
<div class="row">
</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_user_name?> </th>
<th class="text-center" width="15%"> <?php// echo $lang_file_before ?> </th>
<th class="text-center" width="20%"> <?php //echo $lang_size_image_before ?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_file_size_before ?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_file_after ?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_size_image_after?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_file_size_after?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_resize_optimize?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_create_date?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_ip;?> </th>
<th class="text-center" width="5%"> <?php //echo $lang_save_image?> </th>
<th> Edit time-date </th> -->
<!-- <th class="text-center" width="5%"> <?php //echo $lang_showinformation?> </th> -->
</tr>
</thead>
<!-- ข้อมูลการใช้งานล่าสุด -->
<div class="row">
<div class="col-md-15 table-responsive" class="text-center" width="30%">
<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%"><?php echo $lang_id;?></th>
<th class="text-center" width="20%"> <?php echo $lang_user_name ?></th>
<th class="text-center" width="50%"><?php echo $lang_template_name ?></th>
<th class="text-center" width="50%"><?php echo $lang_file_before ?></th>
<th class="text-center" width="50%" ><?php echo $lang_size_image_before ?></th>
<th class="text-center" width="20%"><?php echo $lang_file_size_before ?></th>
<th class="text-center" width="20%"><?php echo $lang_file_after ?></p></th>
<th class="text-center" width="20%"><?php echo $lang_size_image_after ?></th>
<th class="text-center" width="20%"><?php echo $lang_file_size_after ?></th>
<th class="text-center" width="20%"><?php echo $lang_resize_optimize ?></th>
<th class="text-center" width="20%"><?php echo $lang_create_date?></th>
<th class="text-center" width="20%"><?php echo $lang_ip ?></th>
<!-- <th class="text-center" width="20%"><?php //echo $lang_save_image;?></th> -->
<th class="text-center" width="20%"><?php echo $lang_showinformation; ?></p></th>
</tr>
</thead>
<!-- ฐานข้อมูลแสดง ผู้ใช้งานล่าสุด -->
<?php
$sql = "SELECT * FROM tools_frame_logs ORDER BY id desc Limit 0,10";
//echo $sql;exit();
$result2 = mysqli_query($conn, $sql);
while ($fetch = mysqli_fetch_assoc($result2)) {
?>
<tr align="center">
<td><?php echo $fetch['id']; ?> </td>
<td><?php echo $fetch['user_name']; ?></td>
<td><?php echo $fetch['template_name']; ?></td>
<td><?php echo $fetch['file_before']; ?></td>
<td><?php echo $fetch['size_image_before']; ?></td>
<td><?php echo $fetch['file_size_before']; ?></td>
<td><?php echo $fetch['file_after']; ?></td>
<td><?php echo $fetch['size_image_after']; ?></td>
<td><?php echo $fetch['file_size_after']; ?></td>
<td><?php echo $fetch['resize_optimize']; ?></td>
<td class="textcenter"> <?php
if ($fetch['create_date']) {
echo $fetch['create_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>
<center>
<a href="showhome.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_moreinformation; ?></a>
</div>
</div>
</div>
<?php include '../footer.php'; ?>