![]() |
|
PHP Database USER_ID for Paymentwall Widget - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Website Scripting & Security (https://lckb.dev/forum/forumdisplay.php?fid=197) +---- Forum: Webmasters Help & Talk (https://lckb.dev/forum/forumdisplay.php?fid=142) +----- Forum: Help & Requests (https://lckb.dev/forum/forumdisplay.php?fid=116) +----- Thread: PHP Database USER_ID for Paymentwall Widget (/showthread.php?tid=1683) |
- primax16 - 08-04-2013 Hello Guys, I need your help. I need a script for the paymentwall widget which read the user_id from database. I dont know how to do it... So, I have a login system from eternia website template from noizy The script of login.php: <?php session_start(); error_reporting(0); ?> <?php include include/config.php; include include/functions.php; If (isset($_POST["username"])) { if (empty($_POST[username]) OR empty($_POST[password])) { echo "<div class=ferrorbig>Error! one or more fields are empty, please try again</div>"; ?> <?php die; } $conn = new mysqli($ip,$sqluser,$sqlpw,$userdb); if (mysqli_connect_errno() == 0) { $user = $conn->real_escape_string(htmlspecialchars(clean_str($_POST[username]))); $pass = $conn->real_escape_string(htmlspecialchars($_POST[password])); $realpass = hash("sha256",$user.$salt.$pass); $query = "SELECT user_id, passwd FROM bg_user WHERE user_id LIKE $user LIMIT 1"; $exec = $conn->query($query); $res = $exec->fetch_object(); If ($res->passwd == $realpass) { $_SESSION["username"] = $user; ?> <script type="text/javascript"> setTimeout("location.href=#",100); </script> <?php } Else; { echo "<center>PLEASE RELOAD THE PAGE!</center> <br> <center><img src=\"images/loading.gif\"></center> <br> <center><a href=\"index.php\">CLICK HERE</a></center> <bt> "; die; } } } Else; { } ?> <?PHP if(!isset($_SESSION[username])) { ?> <form id="login" action="login.php" name="login"> <table width="225" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td width="174" height="30"> <div style="background: url(images/loginfield.jpg) no-repeat 0 0 transparent; width: 174px; height: 26px;"> <input id="username" name="username" type="text" tabindex="1" style="background: none; border: none; color: #eeeeee; padding-left: 5px; width: 155px; height: 23px; padding-left: 15px;"> </div> </td> <td align="right" width="51" rowspan="2"> <input type="submit" value="" style="border: none;" class="botlogin" tabindex="3" onclick="new Ajax.Updater(container, login.php, {method: post, asynchronous:true, parameters:Form.serialize(document.login)}); esperar(container); return false;"> </td> </tr> <tr> <td> <div style="background: url(images/loginfield.jpg) no-repeat 0 0 transparent; width: 174px; height: 26px;"> <input id="password" name="password" type="password" tabindex="2" style="background: none; border: none; color: #eeeeee; padding-left: 5px; width: 155px; height: 23px; padding-left: 15px;"> </div> </td> </tr> </table> </form> <?PHP } else { ?> <?PHP include include/config.php; $accid = ; if(isset($_SESSION[username])){ $accid = $_SESSION[username]; } $connect = mysql_connect($ip, $sqluser, $sqlpw) or die(mysql_error()); mysql_select_db($userdb) or die(mysql_error()); $sql="SELECT * FROM bg_user,user_id WHERE user_id= $accid"; $result=mysql_fetch_array(mysql_query($sql)); ?> <div style="padding: 0px 7px; line-height: 15px;"> Welcome <b><?php echo $_SESSION["username"]; ?>,</b><br/> <div class="separator" style="height: 10px;"></div> Balance: <span id="balance2" name="balance2"><?php echo $result[cash]; ?></span><br/> <a href="#change_password" onclick="_gaq.push([_trackPageview, .com/s_ep3/index.php/user/change_pass]); new Ajax.Updater(container, include/chp.php, {method: get, asynchronous:true, evalScripts:true}); esperar(container); return false;" />Change your password</a><br/> <a href="#bl" onclick="_gaq.push([_trackPageview, .com/s_ep3/index.php/user/change_pass]); new Ajax.Updater(container, include/ban_list.php, {method: get, asynchronous:true, evalScripts:true}); esperar(container); return false;" />Banned Characters</a><br> <a href="#bl" onclick="_gaq.push([_trackPageview, .com/s_ep3/index.php/user/change_pass]); new Ajax.Updater(container, include/ban.php, {method: get, asynchronous:true, evalScripts:true}); esperar(container); return false;" />Banned Accounts</a><br> <br> <a href="#logout" onclick="_gaq.push([_trackPageview, .com/s_ep3/index.php/user/logout]); new Ajax.Updater(container, include/logout.php, {method: get, asynchronous:true, evalScripts:true}); esperar(container); return false;" />Logout</a> </div> <?PHP } ?> Script of Donate.php <?php session_start(); error_reporting(0); ?> <?PHP if(!isset($_SESSION[username])) { $usercode = $_SESSION[user_code]; ?> <div class=ferrorbig>You must be logged in to access this page.</div> <?PHP } else { ?> <div class="fbar"> <div class="ftitle">DONATE</div> <div class="clear"></div> </div> <div id="fbody" class="fbody"> <div style=""> <div class="fdesc">Donate, help server to grow up</div> <iframe src="https://wallapi.com/api/ps/?key=randomkey555414554514&uid=<?php echo $_SESSION["user_code"]; ?>&widget=p1_2" width="750" height="800" frameborder="0"></iframe> </div> <div style="height: 5px;"></div> </div> </div> <?PHP } ?> So well like i said, I need a script which read the USER_ID of the player who donate and I dont know how to script it.. - RomainLastChaos - 08-04-2013 as i know some months ago i have trying to get the same way paymentwall app well is the same if you have the config right working pingback etc into your database with your email sending the cash paymentwall need look your website and approved the script to make it alive but unfortunetly paymentwall dont approve the application for LastChaos anymore as i have see you need create and code a fake website to get paymentwall working and after you can copy past your code of the paymenjtwall widget into your real lastchaos website never tested again my paymentwall reponse date of 20 junuary Lol ... 2 - primax16 - 08-04-2013 Yes I heard about it but I need this script^^ So if you have an old script can you please post it? - RomainLastChaos - 08-04-2013 unfortunetly i have remake my compunter after junuary i dont have the script sorry - primax16 - 08-04-2013 Hmm well thanks for your help, did anyone else can code it please? I cant do it.. ![]() |