Server IP : 103.6.199.200 / Your IP : 3.144.109.159 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/asiageml/asiagemlab.com/wwwroot/lab/ |
Upload File : |
<%Response.Buffer = true%> <HTML> <HEAD><Link href="..\css\Style.css" type="text/css" rel="stylesheet"></HEAD> <title>KL Memo Setup</title> <BODY> <%docName="memoNew"%> <!--#include file="../inc/checklogin.inc"--> <!--#include file="menu.asp" --> <!--#include file="../inc/connection.inc"--> <!--#include file="../inc/dbOpen.inc"--> <HR><b><%=vBranch%> Memo Setup</B><HR> <% dataAction = Request.Form ("dataAction") vTempTableName = Request.QueryString ("temptableName") vbranchCode = "M" & vBranch If dataAction = "Generate New Memo ID" Then 'vbranchCode = delQuote(Request.Form ("branchCode")) rgch = UCase("abcdefghjklmnpqrstuvwxyz") If vbranchCode <> "" Then 'existing record Set rs = server.CreateObject ("ADODB.recordset") sql = "select code, runningNo from sysParam where Branch = '" & vBranchCode & "'" rs.Open sql, db, adOpenStatic, adLockReadOnly If Not rs.EOF Then vNew = vBranchCode vNew = vNew & rs("code") & "/" vRunning = cstr(rs("runningNo") + 1) vNew = vNew & string(5 - Len(vRunning), "0") & vRunning vNew = vNew & "/" Randomize vNew = vNew & Int(Rnd * 10) vNew = vNew & Mid(rgch, Int(Rnd() * Len(rgch) + 1), 1) vNew = vNew & Int(Rnd * 10) vNew = vNew & Int(Rnd * 10) sql = "Insert into log (reportNo, dateCreate, [Status]) " &_ "values ('" & vNew & "', '" & dateAdd("h", 0, now) & "', 'Y')" db.execute sql sql = "Update sysParam set runningNo = '" & vRunning & "' where " &_ "branch = '" & vBranchCode & "'" db.execute sql Response.Write "<font color=red>Enter Sucessfully.</font><BR>" '************ Generate QR Code **************** Function SaveBinaryData(FileName, ByteArray) Const adTypeBinary = 1 Const adSaveCreateOverWrite = 2 Dim BinaryStream Set BinaryStream = CreateObject("ADODB.Stream") BinaryStream.Type = adTypeBinary BinaryStream.Open BinaryStream.Write ByteArray BinaryStream.SaveToFile FileName, adSaveCreateOverWrite End Function Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP") ' Point to an image file with adequate access permissions granted 'objHTTP.open "GET", "https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://www.asiagemlab.com/verification.asp?repID=" & vNew & "&choe=UTF-8",false 'objHTTP.open "GET", "https://quickchart.io/qr?text=http://www.asiagemlab.com/verification.asp?repID=" & vNew & "&ecLevel=H&margin=7&size=250", False objHTTP.open "GET", "https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=http://www.asiagemlab.com/verification.asp?repID=" & vNew & "&charset-source=UTF-8", False objHTTP.send 'Response.BinaryWrite objHTTP.ResponseBody QRName = "QR_" & Replace(VNew, "/", "-") & ".png" call SaveBinaryData(Server.MapPath(".") & "\..\ImagesQRCode\" & QRName, objHTTP.ResponseBody) Set objHTTP = Nothing Response.Write "<img src='..\ImagesQRCode\QR_" & Replace(VNew, "/", "-") &".png' width=""140""><BR>" '************ END Generate QR Code **************** End If End If End If %> <center> <form action="memoNew.asp" name="f" method="post" onSubmit="return checkRequiredField(this)"> <TABLE cellSpacing="0" cellPadding="0" width="70%" border="0"> <TR> <TD width="30%">* <%=vBranch%> New Memo ID</TD> <TD>:</TD> <TD> <input name="memoCode" maxlength="50" value="<%=vNew%>" tabindex=1> <input type="submit" value="Generate New Memo ID" name="dataAction" tabindex=2> </TD> </TR> <tr><td colspan="3"><BR> <BR> Latest Memo List</TD></TR> <% 'existing record Set rs = server.CreateObject ("ADODB.recordset") sql = "Select top 15 DateCreate, ReportNo from Log where " &_ "mid(reportNo, 1, 3) = '" & vBranchCode & "' order by ID desc" rs.Open sql, db, adOpenStatic, adLockReadOnly If Not rs.EOF Then Do While Not rs.eof Response.write "<tr>" Response.write "<td>" & formatdatetime(rs("dateCreate"),0) &"</td>" Response.write "<td colspan=""2"">" & rs("reportNo") & "</td></tr>" rs.MoveNext Loop End If Set rs = Nothing If Response.IsClientConnected() Then Response.Flush() End If %> </TABLE> </form> </center> <!--#include file="../inc/dbClose.inc"--> <SCRIPT language=javascript> <!-- function checkRequiredField(){ //if (f.memoCode.value == "") { // alert("Required field!"); // f.memoCode.focus(); // return false; } return true; } function validateData() { return true; } --> </SCRIPT> </body> </HTML>