วันศุกร์ที่ 23 เมษายน พ.ศ. 2564

php curl token

certifi 60 error 
linux ubuntu 

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https:/  ');

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$res = curl_exec($ch);

print_r($res);exit;


วันอังคารที่ 20 เมษายน พ.ศ. 2564

PHP Javascript

ศึกษาข้อมูล Json- w3school.com กดปุ่ม  Link File

<input type="button" onclick="window.location = 'token30.php';" value="<<Get_Token" />

copy ข้อความ

<SCRIPT LANGUAGE="JavaScript">
  <!--
   function copyit(field) {
   var temp=document.getElementById(field);
   temp.focus()
   temp.select()
   therange=temp.createTextRange()
   therange.execCommand("Copy")
   }
  /-->
  </SCRIPT>

<input type='text' value='ข้อมูลที่นำไปใช้' id='url' onfocus='javascript:this.select();' >
<input type='button' value='copy' onclick="copyit('url');">

== ใส่ใน page ที่ต้องการให้ขึ้น pop up นะครับ ==
<script type="text/javascript">
function refreshmain(){ window.opener.location.reload(true);}
</script>

เมื่อ process เสร็จแล้วก็ให้ใส่บันทัดข้างล่างนี้ครับ มันจะปิดตัวเองแล้วก็ refresh parent page ให้เลยครับ
echo "<script>alert(\"Insert Success.\");refreshmain();window.close();</script>";

[PHP] ส่งค่า id ไปยังอีกหน้า
[PHP] การส่งค่า id จาก php ไปโชว์ใน modal
https://stackoverflow.com/questions/15538225/how-do-i-process-a-div-as-a-form-input
https://www.goragod.com0%B8%B7%E0%B8%AD%E0%B8%84%E0%B8%A5%E0%B8%B4%E0%B8%81.html
https://www.thaicreate.com/php/forum/118953.html
https://www.thaicreate.com/community/php-submit-form-action-target-iframe.htmlส่งค่าไมเปลียนหน้า
https://www.ninenik.com/forum_view_2937_1.html
https://www.thaicreate.com/php/forum/077199.html
http://php-for-ecommerce.blogspot.com/2013/09/jquery-window-opener.html
http://php-for-ecommerce.blogspot.com/p/blog-page_2.html//สอนphp
https://devbanban.com/?p=251//Video PHP แจ้งซ่อมออนไลน์
https://www.thaicreate.com/jquery/jquery-ajax-ajax.html//Jquery
https://www.ninenik.com/content.php?arti_id=870//demo php
https://pantip.com/topic/34140727  //jquery แสดง html
[PHP] เราสามารถ query ข้อมูล มาเก็บไว้ในตัวแปร array

จัดระเบียบซอร์สโค๊ด PHP ลดการ query ฐานข้อมูล MySQL ลดภาระเซิร์ฟเวอร์ให้น้อยลง (คิวรี่ซ้อนคิวรี่)
https://www.thaicreate.com/community/php-array-push-mysql-result.html//
php กับการนำ array_push มาเก็บค่า result 

[PHP] อยากแทรก object JSON เข้าใน JSON Array โดย LOOP
https://www.thaicreate.com/php/forum/113853.html///Echo  Alert Saveแล้ว
https://www.thaicreate.com/community/php-multiple-insert-by-checkbox.html//Checkbox Save
https://www.thaicreate.com/community/php-multiple-insert-by-checkbox.html
https://pantip.com/topic/33500537??วนรอบ
https://www.thaicreate.com/php/forum/117469.html/
ranking และ insert ลงฐานข้อมูล
submit หน้าเดิม
คู่มือPHP
Submit Refesh ไม่เปลี่ยนหน้า
checkboxหลายอันแบบง่าย
การลบข้อมูลหลายแถวออกจากดาต้าเบส ด้วย CHECKBOX
http://www.amplysoft.com/knowledge//เกี่ยวกับ php บทความ
javascript for loop
https://www.youtube.com/watch?v=PGZ7QiKdumo//javascript
https://www.youtube.com/watch?v=AaJ31kaJwFU//การใช้งานvscode tip
Sweet Alertsweetalert.js.org
https://www.youtube.com/watch?v=oc-aiI46_OM/สอน ฺBootstrab Modal
https://www.mindphp.com/forums/viewforum.php?f=76///การใช้งานBootstrap
http://blog.phpcodemania.com/2017/06/free-php-project.html//แจกระบบต่างๆ PHP
https://sites.google.com/a/svc.ac.th/php/phasa-php/sxnphptidtxthankhxmulmysqlkarchikhasangnikarinsertkhxmullngthankhxmul//E-Learning PHP
https://cssauthor.com/free-bootstrap-4-admin-dashboard-templates/  //BootStarb
วิธีเพิ่มฟอนต์ Google kanit
สีนวล การดึงข้อมูลMysql มาใช้
Edittable
Bootstrap Edittable Mysql
Get json1
get+json+from+url+php
https://github.com/devbanban/covid-19/blob/main/covid19today.php//ดึงapi มาหน้าเว็บ
รวมลิงค์SouceCode PHP
https://www.youtube.com/watch?v=huPijvBpui0/Vscode+mysql
https://www.youtube.com/watch?v=35ZAB2Lk4E4// php ทำรายงาน
http://www.codetukyang.com/html/technic/print_page_in_div.htmพิมพ์ข้อความบางส่วน
http://cha-un.blogspot.com/2010/11/print-css-css-print.html
https://www.youtube.com/watch?v=mIczlVx0llM###Upgrade Win10 home to pro
https://www.youtube.com/watch?v=-KYlLhmSZpQ//learnphp login hash session
https://drive.google.com/drive/folders/1jWcOunrrmsVtEFi1uUcl3QM5a99YZBQA
http://www.code-father.com/บทความ PHP
http://phpcodemania.blogspot.com/2017/06/free-php-project.html////แจกCode PHP
https://www.ireallyhost.com/kb/other/176//ไม่ต้องคิวรี่ซ้ำ while 2 ครั้ง
https://tutorial101.blogspot.com/2019/12/create-progress-bar-data-insert-using.html//Insert_Progressbar
https://www.youtube.com/watch?v=8n5ZKxKnmkE!!!แบบฟอร์ม Multiple Input Array
[php] SourceCode https://github.com/purivaro/multiple-inputs
https://unclead.github.io/yii2-multiple-input/usage/ Yii2 multi input

https://www.youtube.com/watch?v=PGZ7QiKdumo!!!!สอนJacascript 
https://www.youtube.com/watch?v=jEdTXWBmwXg///โปรแกรมอ่าน Smart Card ใช้ได้
การใช้งาน Table แบบ Responsive///
<div class="form-check mb-2 mr-sm-2" style="position:absolute;right:30px;top:240px;z-index:+1" >//กำหนดตำแหน่ง เลื่อนได้
http://pancodefree.blogspot.com/2014/11/form-submit-javascript.html
<td class="text-nowrap" style="color:brown"><?php echo $row['ADM_DT']; ?>ยาวหมดในแถวดียว
***php decode base64 to image 

https://devbanban.com/?p=4214  //php uploads PDO เปิดดูpdf
https://code-boxx.com/simple-php-mvc-example/#sec-example//php mvc
mind.css
php opendir readdir
php อ่านโฟลเดอร์ แบ่งหน้า


***ตรวจสอบค่าว่าง php javascript****

อันนี้เพิ่มเติมนะครับมาใหม่ใช้ฟังก์ชั่น isNaN สั้น ๆ ง่าย ๆ ไม่ยุ่งยากอีกต่อไป (ลอดูครับ)
**********************************************************************
กรอกได้เฉพาะตัวเลข  
<input type="text" name="text_plain" onKeyUp="if(isNaN(this.value)){ alert('กรุณากรอกตัวเลข'); this.value='';}"/>
 
กรอกได้เฉพาะตัวอักษร
 
<input type="text" name="text_key" onKeyUp="if(!(isNaN(this.value))) { alert('กรุณากรอกอักษร'); this.value='';}"/>
**********************************************************************
1.อันนี้แบบที่ผมใช้อยู่ (ในโปรแกรม PHP Code Father ก็เช่นกัน)
<input name='s_money' id='s_money' type='text' size='10' onKeyUp="if(this.value*1!=this.value) this.value='' ;" >

https://devbanban.com/?cat=79 //แจก Template PHP
https://devbanban.com/?p=4214  //Free Code
ภาษา HTML การแทรกรูปและตัวอักษรในช่องตาราง ผสานเชลล์

 ฟอนต์สี
<td align="center">
    <?             
  if($objResult["Time"] <= "08:00:00")
{
   echo 
+ $objResult["time1"];  ใช้ ฟอนต์ สีปรกติ
}
else
{
    echo 
- $objResult["time1"];   ใช้ ฟอนต์สีเเดง
}
?>
 </td>








$strSQL = "SELECT * FROM `member` WHERE `Username` = '".$strUsername."' ";
// คำสั่ง sql สำหรับค้นหา Username ที่มีค่าเท่ากับ $strUsername
$objQuery = mysql_query($strSQL);
// นำคำสั่งข้างต้นมาประมวลผล
$objResult = mysql_fetch_array($objQuery);
// เอาผลลัพท์มาใส่ใน $objResult
if($objResult){ // ถ้ามีข้อมูลให้แสดง "มีผู้ใช้ชื่อนี้แล้วนะ"
echo "<h1><center>มีผู้ใช้ชื่อนี้แล้วนะ</center></h1>";
}else { // แต่ถ้าไม่ก็ให้เพิ่มข้อมูลลงไป
$strSQL    ="INSERT INTO `member` (`UserID`, `Username`, `Password`, `Name`, `Tel`, `Adr`) ";
$strSQL.=" VALUES ('NULL','".$strUsername."','".$strPassword."','".$strName."', '".$strTel."','".$strAdr."');" ;
// คำสั่ง sql สำหรับเพิ่มข้อมูล โดยเอาตัวแปร $strUsername,$strPassword,$strName,$strTel และ $strAdr ใส่ลง table member
$objQuery = mysql_query($strSQL);
//ประมวลข้อมูลด้วยคำสั่ง sql ในข้างต้น
echo "Register Completed!<br>";
//ประกาศเพิ่มข้อมูลเสร็จแล้วนะ

วันจันทร์ที่ 5 เมษายน พ.ศ. 2564

นำเสนอ Vaccine Covid19 โดยโปรแกรมmBase

 นำเสนอโดย
นายจีระพงษ์  สองศรี  
นายชาตรี  บุญทา   Email mhosp EOC:::Admin@858480

##############################################


ค่าย Vender  Hospxp Hi mBase ติดตั้งนำเสนอความพร้อมของโปรแกรม  ในการรองรับการฉีดวัคซีน
วันที่ 16  เมษายน 2564  รวมกันที่สรรพสิทธิ์ ทดสอบระบบจริงในการฉีดวัคซีน

วันที่ 20 เมษายน 2564
-13.00น Conference กลุ่มเป้าหมาย  EOC   .ใน 8 แห่ง ที่   9 อำเภอ

########################################

เตรียมระบบรองรับ  สำหรับโรงพยาบาล  เตรียมวางแผน

- ในขั้นตอนซักประวัติ บันทึก v/s  ให้คำแนะนำก่อนฉีดวัคซีน
- พยาบาลจะให้เซนต์ใบยินยอมก่อนครับ
- mBaseยังขาดใบเซ็นยินยอม Consent form


วันพฤหัสบดีที่ 1 เมษายน พ.ศ. 2564

Config Ubuntu14.04 maraidb5.5 php5.5.9 phpmyadmin mBase2012

ติดตัั้ง Ubuntu 14.04 server  ควรเลือกเปิด ssh ด้วยครับ

############LAMP SERVER##################

#####Apache2 Install###############

$ sudo apt-get install software-properties-common
$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

สำหรับ Ubuntu 14.04
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu trusty main'

 ######Update############

$ sudo apt-get update
$ sudo apt-get install mariadb-server-5.5

$ sudo apt-get install phpmyadmin

#######Stop Start##################

$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/mysql start

หรือ Service mysql restart

####Install PHP 5.5 Or 5.6 ###########
$ sudo apt-get install php5
$ sudo apt-get install php5-mcrypt
$ sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available 

$ sudo php5enmod mcrypt sudo service apache2 restart

****ต้องการใช้Navicat Connect Database*****
.ให้ปิด #bind-address           = 127.0.0.1 

#############Replicate  Master#######################
server-id=11

log-bin=mysql-bin

innodb_flush_log_at_trx_commit=1

sync_binlog=1

expire_logs_days=3

binlog-do-db=mbase_data1

binlog-do-db=mdevice_a 

#########################อื่นๆๆๆf################################

$ sudo apt-get  install curl //ติดต่อAPI

$ sudo apt-get install sshpass   //Sys ข้ามเครื่อง

 


mysql function แทนคำด้วย xxxx

 กรณีต้องการแทนค่า ด้วย xxx ใน function Mysql  แบบเนียน เช่น
CONCAT(trim(a.FNAME),'   ',REPLACE(a.lname,left(a.lname,3),'xxx')) as fullname,