<!DOCTYPE html> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge, chrome=1"/> <meta charset="utf-8"> <meta name='viewport' content='width=device-width, initial-scale=1.0' > <link rel="stylesheet" type="text/css" href="z0.css"> <link rel="stylesheet" type="text/css" href="z51.css"> <script type="text/javascript" src="z.js"></script> <?php require_once "ssession.php"; session_start(); // Check if the user is logged in, if not then redirect him to login page if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){ header("location: welcome.php"); exit; } $id=$_SESSION["uid"] ; $username=$_SESSION["username"]; // $company=$_SESSION["company"]; // $guser=$_SESSION["guser"]; $userid=$_SESSION["uid"] ; //if (intval($guser)>0) header("location: cosmos.php"); else header("location: kosmo.php"); ?> </head> <body> <div id=sbcont><div class="vsmenu"> <a href="zlisalist60.php" >User</a> <a href="zlisalist60.php" class=active> My</a> <a href="zlisalist60a.php" > User Score All</a> <a href="zprog_list.php" >Program</a> <a href="zprog_list.php" > Program</a> <a href="zprog_listd.php" > List Program</a> <a href="zlistq.php"> List Question</a> <a href="zall_items.php" > List all items</a> <a href="cloud3.php" class=> Cloud3</a> <a href="zsuperu2.php" >SU</a> <a href="cosmos.php" class=""> cosmos</a> <a href="cloud.php" > cloud</a> <a href=https://on.itlgx.xyz/zcreate_difa4.php?t=t> attcProfile</a> <a href="sky.php" class=""> Sky</a> <a href="sky2.php" class=""> Sky2</a> <a href="zregister.php" > AddUserR1</a> <a href="zprof_list.php" > Profile</a> <a href="zprof_listd.php"> List Address</a> <a href="zlistpf.php"> List Profile</a> <a href="zallpf_items.php" > List all items</a> <a href="zallpfa_items.php" > List all items/users</a> <a href="zallpfa2_items.php" > all items/users</a> <div class=rsslbar_body> <a href="earth.php" >earth</a> <center></center> <h3>Rec.Numbers <span id="count3" </span></h3> <br><br> <img src="venus.png" width=80px height=80px> </div></div></div> <div id="snackbar2">Data Saved <br>message<br>..</div> <div id="snackbar5" > <span class=close5 onclick=closeme5("snackbar5"); >✕</span><div id=snackbar5cont></div><br></div> <div id="snackbar6" > <span class=close6 onclick=closeme6("snackbar6"); >✕</span><div id=snackbar6cont></div><br></div> <div id="snackbarx" > <span class=closex onclick=closemex("snackbarx"); >✕</span><br></div> <div id="rsslbar" class="rsslbar vrmenu"> <div class=rsslbar_title onclick="rsslbar_off()"><span title="Setting"></span> </div><br><br> <a href="javascript:void(0)" class="closebtnr" onclick="rsslbar_off()">×</a> <a href="#" class="active">Q/A</a> <a href="#">Services</a> <a href="#">Clientss</a> <a href="#">Contact</a> <div class=rsslbar_body> <br> User Name:<?php echo htmlspecialchars($username);?><hr> Current LANG:<span id=lang>en</span> <br><button class="button1 grey" onclick=setlang("th")>TH</button>/<button class="button1 grey" onclick=setlang("en")>EN</button> </div> </div> <div id="lsslbar" class="lsslbar vlmenu" onclick="lsslbar_off()"> <div class=lsslbar_title><></div><br><br> <a href="javascript:void(0)" class="closebtn" onclick="lsslbar_off()">×</a> <a href="#" class="active" >About</a> <a href="#">Services</a> <a href="#">Clients</a> <a href="#">Contact</a> </div> <div id="extbar" class="extbar" onclick="extbar_off()"> <a href="javascript:void(0)" class="closebtn" onclick="extbar_off()">×</a> <br><br><div class=extbar_title >info</div> <div class=extbar_body> <div class=extbar_body_in> iNfO<br> User Name:<?php echo htmlspecialchars($username);?> </div><br> <center><button class="button1 red d-center" onclick="extbar_off()"></span>Close</button> </center> </div> </div> <div id="alertbar" class="alertbar" onclick="alertbar_off()"> <div class=extbar_body_in> info<br> User Name:<?php echo htmlspecialchars($username);?> </div> </div> <div id=maincont> <!--st breadcrumb--> <span class="breadcrumb"> <a href="welcome.php">Home</a> / <a href="zprogram.php" class=active>back Office</a> / <a href="kosmo.php" class=active>Dashboard</a> / <a href="logout.php" class="btn btn-danger">Sign Out of Your Account</a> </span> <!--en breadcrumb--> <div id=topbar> <span class=whead>WMenu</span><span class=mhead >⟨</span> <span id="logo" class="icon icon-logo" ></span> <span class=right > <a style="padding-left:1px;" href="#\" onclick="extbar_on();"><span class="icon icon-warning" title="connected"></span></a> <a style="padding-left:1px;" href="#\" onclick="snackbar('user');"><span class="icon icon-user" title="HELLO <?php echo htmlspecialchars($username);?>"></span></a> <a style="padding-left:1px;" href="#\" onclick=reloadme();><span class="icon icon-sync" title="sync data"></span></a> <a style="padding-left:1px;" href="#\" onclick="rsslbar_on();"><span class="icon icon-gear" title="Setting"></span></a> <!-- <a style="padding-left:1px;" href="#" onclick=sbconth2no();><span class="icon icon-menufold" title="LOGOUT"></span></a> --> <a style="padding-left:1px;" href="logout.php" ><span class="icon icon-logout" title="Logout"></span></a> </span> </div> <link rel="stylesheet" type="text/css" href="shirt.css"> <link rel="stylesheet" type="text/css" href="cardbox.css"> <script type="text/javascript" src="shoes.js"></script> <script> p=new makediv ("bottombar"); ebyid ("bottombar").innerHTML='<a id=lang style="margin-right:10px;float:left;" href=# ><?php echo $_SESSION['lang'];?></a><a style="margin-right:10px;float:left;" href=# ></a><span class="ibrinking" style="color:black"; style="margin-left:1%;"><?php echo htmlspecialchars($username);?></span><a style="margin-right:20px;float:right;;" href=#\ onclick="dlmode();return false;">DAK</a><a style="margin-right:10px;float:right;" href=# onclick="blmode();return false;" >BLU</a><a style="margin-right:10px;float:right;" href=# onclick="ormode();return false;" >YEL</a><a style="margin-right:10px;float:right;" href=# onclick="rdmode();return false;" >RED</a><a style="margin-right:10px;float:right;" href=# onclick="grmode();return false;" >GRE</a>'; showd("bottombar"); p=new makediv("snackbar"); ebyid("snackbar").innerHTML="<p>USER</p>"; showd("snackbar"); //active user icon var cols = document.getElementsByClassName('icon-user')[0]; // cols.style.Color = 'black'; cols.style.filter = 'invert(0%)';// cols.style.filter = 'invert(0%)'; //active user icon var cols = document.getElementsByClassName('icon-logout')[0]; // cols.style.marginTop = '5px'; </script> <script type="text/javascript" src="socks.js"></script> <!--startflexcontainer--> <div class="flex container"> <!--startsection--> <!--endsection--> <!--startsection--> <section class="section5"> <div class="flex info"> <div class="info-name">RANKING 5</div> <div class="info-code">code</div> </div> Modify Items <link rel="stylesheet" type="text/css" href="table.css"> <input type="text" id="mySTInput" onkeyup="mySTFunction()" placeholder="Search for .." title="Type for searching..."> <input type="button" value=">" onclick=mySTFunction();> <select id=selecti onchange="newr(this.options[this.selectedIndex].value)"> <option value=30 selected="selected">30</option> <option value=50>50</option> <option value=100>100</option> </select> <span id="pageNavPosition" style="float:right;margin-top:4px;margin-right:15%;"></span> <div class = "outertb"> <?php $packid=$_GET["packid"]; $title=$_GET["title"]; // Include config file require_once "configs.php"; $rows=0; // Attempt select query execution $sql = "select * from fixa where scode like 'q%'"; $sql="SELECT *,lisa.id as lisaid FROM `lisa` join fixa on fixa.id=lisa.fixaid where lisa.packid=".$packid." group by lisa.packid,lisa.id order by lisa.lcode";//group by fixaid"; $sql="SELECT *,lisa.id as lisaid FROM `lisa` join fixa on fixa.id=lisa.fixaid where lisa.packid=".$packid." and lisa.fbox>0 group by lisa.packid,lisa.id order by lisa.lcode "; $res = $db->query($sql); if ($res) { echo "<table id=tble >"; echo "<thead><tr id='tableHeader'>"; echo "<tr>"; echo "<th style='width:3%;'>#</th>"; echo "<th style='width:40%;'>title</th>"; echo "<th style='width:3%;'>code</th>"; echo "<th style='width:3%;'>packid</th>"; echo "<th style='width:3%;'>code</th>"; echo "<th style='width:3%;'>code</th>"; echo "<th style='width:3%;'>FNo</th>"; echo "<th style='width:3%;'>Change</th>"; echo "</tr>"; echo "</thead>"; echo "<tbody>"; while ($row = $res->fetchArray()) { echo "<tr>"; echo "<td>" . $row['lisaid'] . "</td>"; echo "<td>" . $row['title'] . "</td>"; echo "<td>" . $row['scode'] . "</td>"; echo "<td>" . $row['packid'] . "</td>"; echo "<td>" . $row['lcode'] . "</td>"; echo "<td><input type='text' style='width: 5em' maxlength=5 name='b".$row['lisaid']."' placeholder='".$row['lcode']."' value=".$row['lcode']."></td>"; echo "<td><input type='text' style='width: 3em' maxlength=5 name='f".$row['lisaid']."' placeholder='".$row['fbox']."' value=".$row['fbox']."></td>"; $lid=$row['lisaid'];?> <td> <input type="checkbox" name="save" id ="myCheck" value="save" onclick=myfuncf2("lisaupdate.php?lid=<?php echo $lid;?>","rf2","<?php echo $lid;?>",this) > </td> <?php echo "</tr>"; $rows++; } echo "</tbody>"; echo "</table>"; // Free result set // mysqli_free_result($result); } else{ echo "<p class='lead'><em>No records were found.</em></p>"; } ?> </div> <!-- end outertb --> </div></div> <script> function myfuncf2(server,param="",row1,el) { var checkBox = document.getElementById("myCheck"); //var obj = JSON.parse(myJSON); //var drow1 = atob(row1); // var myJSON = JSON.stringify(drow1); er="b"+row1; fr="f"+row1; cmd1=(document.getElementsByName(er)[0].value); cmd2=(document.getElementsByName(fr)[0].value); // alert("update:"+row1+":"+cmd1); // document.getElementById("snackbar2").innerHTML = "Updated record:"+row1+",Lvalue:"+cmd1+",Fvalue:"+cmd2; // snackbar2reload(); alert("Updated record:"+row1+",Lvalue:"+cmd1+",Fvalue:"+cmd2); // var myJSON = JSON.parse(drow1); //alert(myJSON.hbx1+myJSON.hbx2+myJSON.hbx3); // cmd1=(document.getElementsByName(myJSON.hbx1)[0].value); // cmd2=(document.getElementsByName(myJSON.hbx2)[0].value); // cmd3=(document.getElementsByName(myJSON.hbx3)[0].value); //alert(cmd1+cmd2+cmd3); if (el.checked == true){ datapack={}; //dont need this -as issue with special charactor // datapack.name=btoa(en1.value); //decode =atob datapack.lid=row1; datapack.lcode=cmd1; datapack.fbox=cmd2; data=datapack; data=JSON.stringify(datapack); // alert(data); //alert(obj.hbx1); //document.getElementById(param).innerHTML =row1; // alert(row1); // rr="row"+row; //if (row) rr=(document.getElementById(row).value); //cmd1=(document.getElementsByName(row1)[0].value); //cmd2=(document.getElementsByName(row2)[0].value); if (el.checked == true){ //alert(el.attributes["name"].value+"+"+drow1); params="postdata="+data;//+row2+cmd1+cmd2; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //document.getElementById(param).innerHTML = console.log(this.responseText); // alert(this.responseText); } }; xhttp.open("POST",server, true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send(params); } } //exit; //alert(el.attributes["name"].value+"+"+row1); } </script> </section> <!--end1flexcontainer--> </div> <!--end2flexcontainer--> </div> </body> <script> window.addEventListener('DOMContentLoaded', () => { const circle = new CircularProgressBar('pie'); const pie = document.querySelectorAll('.pie'); const range = document.querySelector('[type="range"]'); range.addEventListener('input', (e) => { pie.forEach((el, index) => { const options = { index: index + 1, percent: e.target.value } circle.animationTo(options); }) }) document.querySelectorAll('pre code').forEach((el) => { hljs.highlightElement(el); }); const infoCode = document.querySelectorAll('.info-code'); infoCode.forEach(info => { info.addEventListener('click', (e) => { e.target.closest('section').classList.toggle('show-code'); }) }) }); </script> <script src="circularProgressBar.min.js"></script> <!-- Display the countdown timer in an element --> <script> // Set the date we're counting down to var countDownDate = new Date("Aug 18, 2022 15:37:25").getTime(); // Update the count down every 1 second var x = setInterval(function() { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); // Display the result in the element with id="demo" document.getElementById("demo").innerHTML = days + " day(s) " + hours + "h " + minutes + "m " + seconds + "s "; // If the count down is finished, write some text if (distance < 0) { clearInterval(x); document.getElementById("demo").innerHTML = "EXPIRED"; } }, 1000); </script> <style> #main { margin:auto; } </style> <style> #main{ width:87%; } .vrmenu { color:black; } #piechart { margin-left:-100px; margin-top:-10px; height:300px; } </style> <script>snackbar2("noom");</script>
Edit file:zlisalist2ps.php20782