<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="งานพัฒนาระบบสารสนเทศด้านงานคลัง มหาวิทยาลัยรามคำแหง"> <meta name="author" content="งานพัฒนาระบบสารสนเทศด้านงานคลัง มหาวิทยาลัยรามคำแหง"> <meta name="keywords" content="งานพัฒนาระบบสารสนเทศด้านงานคลัง มหาวิทยาลัยรามคำแหง" /> <title>แบบชำระเงิน Online</title> <!-- Bootstrap core CSS --> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <!-- Custom styles for this template --> <link href="css/modern-business.css" rel="stylesheet" type="text/css"> </head> <body> <?Php session_start(); if (!isset($_SESSION['appem2566'])) { $_SESSION['error'] = 'กรุณาเข้าสู่ระบบ!'; header('Location: https://spfin.ru.ac.th/application/admission/appemployee/login/loginappem.php'); }else{ if (($_SESSION['appem2566']=='admin')||($_SESSION['appem2566']=='user')){ $ref22=$_GET["ref2"]; $idproem1=$_SESSION['idproem']; } else{ $ref22=$_SESSION['ref2']; $idproem1=$_SESSION['idproem']; } } //เชื่อมต่อ database include_once("../../../conapps/dbcon.php"); //connect database $objConnect = mysqli_connect($servername,$username, $password, $dbname); // Check connection if ($objConnect->connect_error) { die("Connection failed: " . $objConnect->connect_error); } require_once("../../PromptPayQRM/lib/PromptPayQR-03.php"); //$idapps = $_GET["idapps"]; //$idapps = $_GET["ref1"]; //tbqr.ref1tbqr.idqrapi=$idapps tbqr.idqrapi=$idapps=$idapps //$idapps = 1; //$ref2='2088246267564000101'; //$ref2= $_GET["ref2"]; //$ref2= $_SESSION['ref2']; $ref2= $ref22; $idproem=$idproem1; //$ref2= $_POST["ref2"]; $strSQL = "SELECT tbqr.ref1,tbqr.ref2,tbcap.titlenamethai,tbad.thainame,tbad.surname,tbqr.amount,tbsub.subbiller,tbbk.billeridru,tbqr.timepay,tbpro.pnameem FROM tb_qrapicp tbqr, tb_projectem tbpro, tb_subbank tbsub, tb_bank tbbk ,tb_appemployee tbad,tb_capitalletters tbcap WHERE tbqr.ref2='".$ref2."' and tbqr.ref2 = tbad.ref2 and tbad.idtitlethai = tbcap.id and tbpro.idproem='".$idproem."' and tbqr.idproject=tbpro.idproem and tbpro.idsubbank=tbsub.idsub and tbsub.tb_bank_idbank=tbbk.idbank" or die("Error:" . mysqli_error()); //print_r($strSQL); $objQuery = $objConnect->query($strSQL); $objQuery1 = $objConnect->query($strSQL); $objResult1 = $objQuery1->fetch_assoc(); $billeridru= $objResult1["billeridru"]; $qrid=$objResult1["timepay"]; $subbiller=$objResult1["subbiller"]; $ref1=$objResult1["ref1"]; $ref2=$objResult1["ref2"]; $titlenamethai=$objResult1["titlenamethai"]; $firstname=$objResult1["thainame"]; $lastname=$objResult1["surname"]; $amount=$objResult1["amount"]; $pname=$objResult1["pnameem"]; ?> <!-- Navigation --> <nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark fixed-top"></nav> <!-- Page Content --> <div class="container"> <!-- Page Heading/Breadcrumbs --> <h1 class="mt-4 mb-3"><small>แบบชำระเงิน Online</small></h1> <!-- Intro Content --> <div class="row"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <td height="65" align="center" valign="middle"><table width="500" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td align="center">มหาวิทยาลัยรามคำแหง</td> </tr> <tr> <td height="35" align="center" valign="middle"><span class="mt-4 mb-3"><?php echo $pname?></span></td> </tr> <tr> <td align="center"><table width="246" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td><img src="../../appsall/images/qrpay.png" width="246" height="56" alt=""/></td> </tr> <tr> <td align="center" valign="top"><?php $PromptPayQR = new PromptPayQR(); // new object $PromptPayQR->size = 4; // Set QR code size to 8 //$PromptPayQR->id = '0841079779'; // PromptPay ID //$PromptPayQR->subbiller ='00YA'; //รับจาก database ตาราง bank //$PromptPayQR->ref1 = '3640600111689'; //รับข้อมูลจาก database ตาราง application //$PromptPayQR->ref1 = '3640600111689'; //รับข้อมูลจาก database ตาราง application //$PromptPayQR->ref2 = '010001TP10SAT'; //รับข้อมูลจาก database ตาราง application ==>รหัสregis+เลขที่ใบสมัคร+รหัสโครงการ //$PromptPayQR->amount = 800.00; // Set amount (not necessary) $PromptPayQR->billeridru=$billeridru; $PromptPayQR->qrid=$qrid; $PromptPayQR->subbiller=$subbiller; $PromptPayQR->ref1=$ref1; $PromptPayQR->ref2 =$ref2; $PromptPayQR->amount=$amount; //echo $billeridru; //echo '<br/>'; //echo $ref1; //echo '<br/>'; //echo $subbiller . $ref1; //echo '<br/>'; //echo $ref2; //echo '<br/>'; //echo $amount; //echo '<br/>'; echo '<img src="' . $PromptPayQR->generate() . '" />'; ?></td> </tr> <tr> <td align="center" valign="top" bgcolor="#0D3C66"> </td> </tr> </tbody> </table></td> </tr> <tr> <td align="center" valign="middle"><strong>ชื่อ-สกุล : <?php echo $titlename?><?php echo $firstname?> <?php echo $lastname?> </strong></td> </tr> <tr> <td align="center" valign="middle"><strong> หมายเลขบัตรประชาชน :</strong><?php echo $ref1?></td> </tr> <tr> <td align="center" valign="middle"><strong>ค่าสมัครสอบแข่งขัน :</strong><span class="mt-4 mb-3"><?php echo $amount?> บาท</span></td> </tr> <tr> <td align="center" valign="middle"> </td> </tr> </tbody> </table> <br> </td> </tr> </table> </div> <!-- /.row --> <hr> <!-- Features Section --> <div class="row"> <div class="col-lg-6"> <h6>งานพัฒนาระบบสารสนเทศด้านงานคลัง มหาวิทยาลัยรามคำแหง<br> </h6> </div> <div class="col-lg-6"></div> </div> <!-- /.row --> </div> <!-- /.container --> <!-- Footer --> <footer class="py-5 bg-dark"> <div class="container"> <p class="m-0 text-center text-white">Copyright © งานพัฒนาระบบสารสนเทศด้านงานคลัง มหาวิทยาลัยรามคำแหง</p> </div> <!-- /.container --> </footer> <!-- Bootstrap core JavaScript --> <script src="../appsall/vendor/jquery/jquery.min.js"></script> <script src="../appsall/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <? $objConnect->close(); ?> </body> </html>