Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[BUG] my epoints has been bug (BKCP)

Skilled Illusionist
Joined
Sep 20, 2009
Messages
315
Reaction score
68
Guys help me with this

I have bug encounter yesterday

Look this

Before I buy

SystemLog - [BUG] my epoints has been bug (BKCP) - RaGEZONE Forums


Buy success

SystemLog - [BUG] my epoints has been bug (BKCP) - RaGEZONE Forums


After Buy

SystemLog - [BUG] my epoints has been bug (BKCP) - RaGEZONE Forums



Nothing Happen In my Epoints My Cp has been buged Please help me with this

:*:
 
Custom Title Activated
Loyal Member
Joined
Jun 16, 2009
Messages
1,146
Reaction score
258
nothing happens at e-points
even your bank don`t have that
item...
 
Upvote 0
Newbie Spellweaver
Joined
Feb 25, 2010
Messages
48
Reaction score
0
use this one in ur itemshop.php

PHP:
<? 
session_start();
header("Cache-control: private");
ob_start();
$timeStart=gettimeofday();
$timeStart_uS=$timeStart["usec"];
$timeStart_S=$timeStart["sec"]; 
require("config.php");
include("includes/web_modules.php");
magic();
include("includes/clean_var.php");
include("includes/sql_check.php");
htmlspecialchars($_REQUEST);
include("includes/login.class.php");
login();
check_inject();
logincheck();
check_user(); 
function delayedrefresh($page) {
	echo "<meta http-equiv='refresh' content='3; URL={$page}'>";
}
function quickrefresh($page) {
	echo "<meta http-equiv='refresh' content='.0000000000000000001; URL={$page}'>";
}
if(isset($_SESSION['user'])) {clean_var($_SESSION['user']);}
?>
<META http-equiv=Content-Type content="text/html; charset=big5"><META http-equiv=Content-Type content="text/html; charset=big5">

<HTML>
<style type="text/css">
<!--
.STYLE4 {
	color: #057D8B;
	font-size: x-small;
}
-->
</style>

  <script type="text/javascript" src="includes/mootools-release-1.11.js"></script>
  <script type="text/javascript" src="includes/jsr_class.js"></script>
  <script type="text/javascript" src="includes/moodalbox.js"></script>
  <link rel="stylesheet" href="includes/moodalbox.css" type="text/css" media="screen" />

<!-- Mirrored from www.5jms.com/ by HTTrack Website Copier/3.x [XR&CO'2007], Tue, 19 Aug 2008 01:31:36 GMT -->
<HEAD>
<title><?php require("config.php"); echo($web['webtitle']); ?> - <? 
if(!isset($_GET['op'])){echo("News");} 
else{echo(ucfirst($_GET['op']));} 
?></title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<META content="µL·¥¾¥­»©x¤èºô¯¸" name="description">
<META name="keywords" content="µL·¥¾¥­»©x¤èºô¯¸">
<LINK href="images/bgs.css" type=text/css rel=stylesheet>
<LINK href="images/links.css" type=text/css rel=stylesheet>
<style type="text/css">
.xiaofeng { font-size:12px; color:#000000}
.xiaofeng:link {
	COLOR: #000000; TEXT-DECORATION: none
}
.xiaofeng:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
.xiaofeng:hover {
	COLOR: #FF3300; TEXT-DECORATION: none
}

.lumift { font-size:12px; color:#000000; font-weight:bolder}
.lumift:link {
	COLOR: #FFFFFF; TEXT-DECORATION: none
}
.lumift:visited {
	COLOR: #FFFFFF; TEXT-DECORATION: none
}
.lumift:hover {
	COLOR: #FFFFFF; TEXT-DECORATION: none
}
TD { font-size:12px}
.STYLE2 {
	color: #00CCCC;
	font-weight: bold;
}
</style>
<META content="MSHTML 6.00.3790.2920" name=GENERATOR>
<script language="javascript">
function OpenWin(code)
 {
 var newwin=window.open("viewgmbuy.asp?gStr=" + code,"mds_info","top=30,left=****width=460,height=300,status=no,toolbar=no,location=no,scrollbars=auto,menubar=no,resizable=yes");
 }
var aID=0;
function ShowTabs1(ID){
	if(ID!=aID){
	TabTitle1[aID].className="main_menu_title1";
	TabTitle1[ID].className="main_menu_title2";
	Tabs1[aID].style.display="none";
	Tabs1[ID].style.display="";
	aID=ID;
	 }
}
function isok(loginform)
{
if (loginform.username.value=="")
{
alert("½Ð¿é¤J§Aªº¥Î¤á¦W¡I");
loginform.username.focus();
return (false);
}

if (loginform.password.value=="")
{
alert("½Ð¿é¤J§Aªº­Ó¤H±K½X¡I");
loginform.password.focus();
return (false);
}
if(loginform.yzh.value=="")
{
alert("½Ð¿é¤JÅçÃÒ½X¡I");
loginform.yzh.focus();
return false;
}
return (true);
}
</SCRIPT>
</HEAD>
<BODY bgColor=#eaf8f6 leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<DIV align=center>
  <TABLE class=bg01 cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TR>
      <TD vAlign=top align=center><TABLE height=500 cellSpacing=0 cellPadding=0 width=950 border=0>
          <TR>
            <TD vAlign=top align=center width=13 background=images/bg_02_left_a.jpg><IMG height=430 src="images/bg_02_left.jpg" width=13> </TD>
            <TD vAlign=top align=center width=924><TABLE cellSpacing=0 cellPadding=0 width=924>
                <TR>
                  <TD vAlign=top align=center width=924 height=250><script src="Scripts/AC_RunActiveContent.js"></script>
<TABLE height=200 cellSpacing=0 cellPadding=0 width=924 bgColor=#cccccc border=0>
  <TR>
    <TD width="924px" height="200">
		<SCRIPT type=text/javascript>
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','924','height','200','src','flash/top_banner.swf','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/top_banner' ); //end AC code </SCRIPT>
	</TD>
  </TR>
  <TR>
    <TD width="924" height="50">
	<SCRIPT type=text/javascript>
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','924','height','50','src','flash/topbutton.swf','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/topbutton' ); //end AC code </SCRIPT>
    </TD>
  </TR>
</TABLE>
</TD>
                </TR>
                <TR>
                  <TD vAlign=top align=center><IMG height=25 src="images/content_top.jpg" width=924></TD>
                </TR>
                <TR>
                  <TD class=bg02 vAlign=top align=center bgColor=#cefcfa><TABLE cellSpacing=0 cellPadding=0 width=924 border=0>
                      <TR>
                        <TD vAlign=top align=center width=187 background=images/left_06_bg.jpg><META http-equiv=Content-Type content="text/html; charset=big5">
<TABLE cellSpacing=0 cellPadding=0 width=187>
<TBODY>
  <TR>
    <TD><IMG height=27 src="images/Left_form_top.jpg" width=187></TD>
  </TR>
  <TR>
    <TD width="187" height="133" align=center vAlign=top background=images/Left_form_midd.jpg><META http-equiv=Content-Type content="text/html; charset=big5">

<script language="javascript">
	function isok(frm)
	{	
		if(frm.userid.value==""){
			alert('½Ð¿é¤J±zªº±b¸¹¡I');
			frm.userid.focus();
			return false;
		}
		if (frm.password.value==""){
			alert('½Ð¿é¤J±zªº±K½X¡I');
			frm.password.focus();
			return false;
		}		
		if(frm.checknum.value==""){
			alert('½Ð¿é¤JÅçÃÒ½X¡I');
			frm.checknum.focus();
			return false;
		}
		return true;
	}
</script>
<script language="javascript">
function passwd_window(){
  var wndNew=window.open("msochpass.asp","","top=0,left=****width=450,height=305,status=no,toolbar=no,location=no,scrollbars=yes,menubar=no,resizable=yes") 
  if (wndNew)
    wndNew.focus();
}
function passedit_window(){
  var editNew=window.open("passedit.html","","top=0,left=****width=450,height=305,status=no,toolbar=no,location=no,scrollbars=yes,menubar=no,resizable=yes")
  if (editNew)
  	editNew.focus();	
}
</script>
<link href="images/css2.css" rel="stylesheet" type="text/css">
<BODY topmargin="0"><?
if ((isset($_SESSION['pass'])) && (isset($_SESSION['user'])))
				{
				echo "<br><form action='' method='post' name='logout_account' id='logout_account'>
                          <table width='100%' border='0' cellspacing='0' cellpadding='0' valign='middle'>
                            <tr>
                              <td colspan='2' scope='row' align='center'>Welcome to your Account 
							  <br>Username: <b>$_SESSION[user]</b><br><br>
                              <input name='logoutaccount' type='hidden' id='logoutaccount' value='logoutaccount'></td>
                            </tr>
				<tr><td colspan='2' scope='row' align=center ><font color=black size=2><b>$UserPoint</font>  <font color=red><b>Point(s)</b></font></td></tr>
                            <tr>
                              <th width='80' height='33' align='right' scope='row'>
                                <input name='Logout!' type=image id='Logout!' title='Logout!' src='images/uni_logout.gif' value='Logout!'>
                              <td width='104' align='center' scope='row'>
							    <a href='user.php'><font color=black>Control Panel</font></a></td>
                            </tr>
                          
                        </form>"; } else { echo"
<table width='149' border='0' cellspacing='0' cellpadding='0'>
<form action='' method='post' name='login_account' id='login_account'>
    <tr>
      <td width='57' align='center'><font style='font-size:12px; font-weight:bold'>Username</font></td>
      <td height='31' colspan='2'><label>
        <input name='login' type='text' class='login_field' id='login' title='Username' maxlength='16' size='16' style='height:16px; width:80px'><input name='account_login' type='hidden' id='account_login' value='account_login'>
        </label></td>
    </tr>
    <tr>
      <td width='57' align='center'><font style='font-size:12px; font-weight:bold'>Password</font></td>
      <td colspan='2'><input name='pass' type='password' class='login_field' id='pass' title='Password' maxlength='16' size='16' style='height:16px; width:80px' name='password'></td>
    </tr>

    <tr>
      <td height='19' align='center'> </td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td colspan='3' align='center'><table width='100%' border='0' cellspacing='0' cellpadding='0'>
          <tr>
            <td align='center' valign='bottom' width='50%'><input name='Submit' type=image class='button' src='images/go.jpg' value='Login!' title='Login'></td>
          </tr>
        </table></td>
    </tr>
  </form>"; } ?>
</table>

<br>
<div align="center"> <a href="register.php" onFocus="this.blur();"><img src="images/reg.gif" width="148" height="28" border="0"></a></div>

</TD>
</TR>
<TR>
  <TD width="187" height="27" align=left vAlign=top><img src="images/Left_form_bottom.jpg" width="187" height="27"></TD>
</TR>
<TR>
  <TD vAlign=top align=left height=19><img src="images/left_05_midd.jpg" width="187" height="19"></TD>
</TR>
<TR>
  <TD vAlign=top align=center background=images/left_04_bg.jpg height=130><table width="186" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20"> </td>
        <td width="166"><META http-equiv=Content-Type content='text/html; charset=big5'><table border=0 align=center cellpadding="0" cellspacing="0"><tr>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=index.php><font color=#00ffff>Home</font></a></td>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href="<? echo($web['forum_link']); ?>"><font color=#00ffff>Forum</font></a></td>
</tr><tr>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=index.php?op=news><font color=#00ffff>News</font></a></td>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=register.php><font color=#00ffff>Register</font></a></td>
</tr><tr>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=toppk.php><font color=#00ffff>Top Pk</font></a></td>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=rank.php><font color=#00ffff>Rankings</font></a></td>
</tr><tr>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=user.php?op=user&option=topup><font color=#00ffff>Top Up</font></a></td>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=user.php?op=user&option=school><font color=#00ffff>School</font></a></td>
</tr><tr>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href="webshop.php"  title="Welcome to CabalNight Webshop. Please Login to get started. If you have login Problems try to use Firefox."><font color=#00ffff>ItemShop</font></a></td>
<td width=78px height=25px><img src=img/tu.gif width=8 height=8>  <a href=guild.php><font color=#00ffff>Guild</font></a></td>
</tr><tr>
<td width=88px height=25px><img src=img/tu.gif width=8 height=8>  <a href=helpdesk.php><font color=#00ffff>HelpDesk</font></a></td>
<td width=88px height=25px><img src=img/tu.gif width=8 height=8>  <a href=download.php><font color=#00ffff>Download</font></a></td>
</tr><tr>
</tr></table></td>
      </tr>
    </table></TD>
</TR>
<TR>
  <TD><IMG height=19 src="images/left_05_bottom.jpg" width=187></TD>
</TR>
<TR>
  <TD height=5></TD>
</TR>

<TR>
  <TD height=260px></TD>
</TR>
</TBODY></TABLE></TD>
                        <TD vAlign=top align=center bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=520>
                            <TR>
                              <TD><TABLE cellSpacing=0 cellPadding=0 width=520 
                              border=0>
                                  <TR>
                                    <TD><IMG height=11 src="images/banner_bar_top.jpg" width=520></TD>
                                  </TR>
                                  <TR>
                                    <TD><OBJECT codeBase=https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 height=128 width=520 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
                                        <PARAM NAME="movie" VALUE="flash/Ran_ad.swf">
                                        <PARAM NAME="quality" VALUE="high">
                                        <embed src="flash/Ran_ad.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="520" height="128"></embed>
                                      </OBJECT>
                                    </TD>
                                  </TR>
                                  <TR>
                                    <TD><IMG height=11 src="images/banner_bar_bottom.jpg" width=520></TD>
                                  </TR>
                                </TABLE></TD>
                            </TR>
                            <TR>
                              <TD height=10></TD>
                            </TR>
                          </TABLE>
                          <TABLE cellSpacing=0 cellPadding=0 width=520 border=0>
                            <TR>
                              <td  style='text-align:justify' background='images/content_title_news2.jpg' height='28'>
<div style='float:left'>            <font face='Verdana' size='2pt' color=yellow><b>Downloads</font></div></TD>
                            </TR>
                            <TR>
                              <TD vAlign=top align=center background=images/content_title_bg.jpg><TABLE cellSpacing=0 cellPadding=0 width=500 border=0>
<? include_once("includes/items.php"); ?>
                                                                    <TR>
                                    <TD width=63 height=5></TD>

                                    <TD width=10 height=5></TD>
                                    <TD width=427 height=5></TD>
                                  </TR>
                                </TABLE>
                                <FONT color=#003366><STRONG><FONT color=#666666> 
                                </FONT></STRONG></FONT>
                                
                                
                                
                                <FONT color=#003366><STRONG><FONT color=#666666> </FONT></STRONG></FONT></TD>
                            </TR>
                            <TR>
                              <TD><IMG height=12 src="images/content_title_bottom.jpg" width=520></TD>
                            </TR>
                            <TR>
                              <TD height=10></TD>
                            </TR>



                         
                              
                            
                          </TABLE>
</TD>
                        <TD vAlign=top align=center width=187 background=images/right_05_bg.jpg><meta http-equiv="Content-Type" content="text/html; charset=big5">
<TABLE cellSpacing=0 cellPadding=0 width=187>
      <TR>
      <TD><TABLE cellSpacing=0 cellPadding=0 width=187 border=0>          
            <TR>
              <TD><a href="webshop.php"  title="Welcome to CabalNight Webshop. Please Login to get started. If you have login Problems try to use Firefox."><IMG height=46 src="images/redemption_cn.jpg" width=187 border=0></a></TD>
            </TR>
            <TR>
              <TD><a href="status.php" onfocus="this.blur();"><IMG height=46 src="images/mechandize_cn.jpg" width=187 border=0></a></TD>
            </TR>
            <TR>
              <TD><IMG height=19 src="images/right_01_top.jpg" width=187></TD>
            </TR>
          
        </TABLE></TD>
    </TR>
    <TR>
      <TD vAlign=top align=left background=images/right_02_bg.jpg><TABLE height=100 cellSpacing=0 cellPadding=0 width=187>
          
            <TR>
              <TD vAlign=top align=left width=168><TABLE cellSpacing=0 cellPadding=0 width=153 border=0>
                  
                    <TR>
                      <TD><IMG src="images/right_panel_ranking.jpg" width=153 height=32 border="0" usemap="#Map2"></TD>
                    </TR>
                    <TR>
                      <TD height="130" vAlign=top background=images/right_panel_bg01.jpg><TABLE cellSpacing=0 cellPadding=0 width="95%" align=center border=0 class="aa">
                          <tr>
                            <td colspan="3" align="left"><font color=white size=2><b>TOP CHARACTER</b></font></td>
                          </tr>
                          
<? include_once("includes/top10.php"); ?>
                          
                        </TABLE></TD>
                    </TR>
                  
                </TABLE>
                <TABLE cellSpacing=0 cellPadding=0 width=153 border=0>
                  
                    <TR>
                      <TD><IMG height=16 src="images/right_panel_bottom.jpg" width=153></TD>
                    </TR>
                  
                </TABLE>
                <TABLE cellSpacing=0 cellPadding=0 width=153 border=0>
                  
                    <TR>
                      <TD><TABLE cellSpacing=0 cellPadding=0 width=153 border=0>
                          
                            <TR>
                              <TD><IMG height=32 src="images/right_panel_partners_01.jpg" width=153 border="0"></TD>
                            </TR>
                            <TR>
                              <TD vAlign=top align=left background=images/right_panel_bg01.jpg><TABLE cellSpacing=0 cellPadding=0 width=153 border=0>
                                  
                                    <TR>
                                      <TD width=15> </TD>
                                      <TD height="90" align=left vAlign=top class="rightlinks01">
									  <table width="148">
									  <tr style="color:#FFFFFF" ><td width="44" class="rightlinks01">School</td>
									  <td width="92" class="rightlinks01">Guild</td>
  									    </tr>
									 
									  <? include_once("includes/topg.php"); ?></table>
                                      </TD>
                                    </TR>
                                  
                                </TABLE></TD>
                            </TR>
                            <TR>
                              <TD><IMG height=16 src="images/right_panel_bottom.jpg" width=153></TD>
                            </TR>
                          
                        </TABLE>
                        </TD>
                    </TR>
                  
                </TABLE></TD>
              <TD vAlign=top width=19><IMG height=130 src="images/right_04_side_bg.jpg" width=19></TD>
            </TR>
          
        </TABLE></TD>
    </TR>
    <TR>
      <TD><IMG height=19 src="images/right_03_bottom.jpg" width=187></TD>
    </TR>
    <TR>
      <TD vAlign=top align=left><TABLE cellSpacing=0 cellPadding=0 width=187 border=0>          
            <TR>
              <TD vAlign=top align=left></TD>
            </TR>        
        </TABLE></TD>
    </TR>  
</TABLE>

                        </TD>
                      </TR>
                    </TABLE></TD>
                </TR>
                <TR>
                  <TD vAlign=top align=center height=30><META http-equiv=Content-Type content="text/html; charset=big5">
<TABLE cellSpacing=0 cellPadding=0 width=924 border=0>
  <TR>
    <TD width=11><IMG height=30 src="images/bottom_left.jpg" width=11></TD>
    <TD width="485" background=images/bottom_tiled.jpg align="right"><FONT face="Arial, Helvetica, sans-serif" color=#ffffff size=2> <STRONG>Ran Online Copyright 2008  Min Com</STRONG></FONT></TD>
    <TD width="417" background=images/bottom_tiled.jpg align="left"><font face="Arial, Helvetica, sans-serif" color=#ffffff size=2><strong>  Publsihed by bK2483</strong></font></TD>
    <TD width=11><IMG height=30 src="images/bottom_right.jpg" width=11></TD>
  </TR>
</TABLE>

                  </TD>
                </TR>
              </TABLE></TD>
            <TD vAlign=top align=center width=13 background=images/bg_03_right_a.jpg><IMG height=430 src="images/bg_03_right.jpg" width=13></TD>
          </TR>
        </TABLE></TD>
    </TR>
  
  </TABLE>
</DIV>
<map name="Map2">
  <area shape="rect" coords="8,4,85,24" href="Rank.html" target="_blank">
</map>
  
</BODY>

<!-- Mirrored from www.5jms.com/ by HTTrack Website Copier/3.x [XR&CO'2007], Tue, 19 Aug 2008 01:32:30 GMT -->
</HTML>
 
Upvote 0
Joined
Dec 22, 2008
Messages
701
Reaction score
224
i think it's your purchase.php
look at this if you have:
PHP:
<?
$Price = $_POST['Price'];
mssql_query ("UPDATE Ranuser.dbo.Userinfo SET UserPoint = UserPoint - '$Price' WHERE Username = '$account_id'");
?>

full php code:
PHP:
<?
$account_id = stripslashes($_SESSION['user']);
$account_id = clean_var($account_id);
if($account_id == NULL){  echo "<script LANGUAGE='javascript'>alert('The cause of errors: \ n \ n Please login now!');window.navigate('index.php');</Script>"; }

$error=1;
function getD ($int) {
if ($int == 1) { $char = "1 Hour"; }
if ($int == 2) { $char = "2 Hour"; }
if ($int == 3) { $char = "5 Hour"; }
if ($int == 4) { $char = "10 Hour"; }
if ($int == 5) { $char = "1 Day"; }
if ($int == 6) { $char = "3 Days"; }
if ($int == 7) { $char = "5 Days"; }
if ($int == 8) { $char = "7 Days"; }
if ($int == 9) { $char = "10 Days"; }
if ($int == 10) { $char = "15 Days"; }
if ($int == 11) { $char = "30 Days"; }
if ($int == 12) { $char = "60 Days"; }
if ($int == 13) { $char = "90 Days"; }
if ($int == 14) { $char = "100 Days"; }
if ($int == 15) { $char = "120 Days"; }
if ($int == 16) { $char = "345 Days"; }
if ($int == 31) { $char = "Permanent"; }
return $char;
}
if($_POST['lostpassword']=='Buy') {

$error = 2;
$account_id = stripslashes($_SESSION['user']);
$ItemNum = $_POST['ItemNum'];
$ItemId = $_POST['ItemID'];
$ItemOpt = $_POST['ItemOpt'];
$Duration = $_POST['Duration'];
$Price = $_POST['Price'];
$PurPrice = ($PurPrice);
$PurPrice = $_POST['PurPrice'];
$ItemStock = $_POST['ItemStock'];

$result = mssql_query ("SELECT Username, UserPoint, UserNum FROM Ranuser.dbo.Userinfo Where Username = '$account_id'");
$rows=mssql_num_rows($result);

if($rows>0) {
$rows=mssql_fetch_assoc($result); 
extract($rows);

$UserPoint = ($UserPoint);
$ID = ($Username);
$Usernum = ($UserNum);

if($UserPoint<$Price) {
echo "<script LANGUAGE='javascript'>alert('You dont have enough points, please recharge your points and try again!');history.go(-1);</Script>";
$error = 1;
}
if($Price <= 0) {
			echo "<font color=red size=2><center>Warning!! Item Hack Detected <p>";
			$error = 1; delayedrefresh('http://tinyurl.com/2la2fy');
			require("manage/log_functions.php");
            $logfile = "manage/logs/item_check.php";
            writelog::writelog_item_check($logfile);}
$result1=mssql_query("SELECT ItemStock FROM Ranshop.dbo.ShopItemMap Where ProductNum = '$ItemNum'");
$rows1=mssql_num_rows($result1);
if ($rows1>0) {
$rows1=mssql_fetch_assoc($result1); 
extract($rows1);

$ItemStock = ($ItemStock);
$ItemMoney = ($ItemMoney);
$PurPrice = $_POST['PurPrice'];
$ItemMoney = $_POST['ItemMoney'];

if($ItemStock<=0) {
echo "<script LANGUAGE='javascript'>alert('Sorry out of Stock, Please try again later!');history.go(-1);</Script>";
$error = 1;
}





} else {
echo "<script LANGUAGE='javascript'>alert('Account doesn't exists!');history.go(-1);</Script>";

}
}
}
if($error==1) {

}
if($error==2) {
$account_id = stripslashes($_SESSION['user']);
$ItemName = $_POST['ItemName'];
$ItemNum = $_POST['ItemNum'];
$ItemId = $_POST['ItemMain'];
$ItemOpt = $_POST['ItemSub'];
$Duration = $_POST['Duration'];
$Price = $_POST['Price'];
$ItemStock = $_POST['ItemStock'];
$ItemImage = $_POST['ItemImage'];
$Usernum = ($UserNum);
$UserPoint = ($UserPoint);
$Point = ($UserPoint);
$ProductNum = $_POST['ProductNum'];
$PurPrice = $_POST['PurPrice'];
$UserUID = $_POST['UserUID'];
$PurFlag=$_POST['PurFlag'];


$pur = mt_rand(10000000,99999999);
mssql_query ("UPDATE Ranuser.dbo.Userinfo SET UserPoint = UserPoint - '$Price' WHERE Username = '$account_id'");
mssql_query ("UPDATE RanShop.dbo.ShopItemMap SET ItemStock = ItemStock - 1 WHERE ProductNum = '$ItemNum' ");
mssql_query("INSERT INTO RanShop.dbo.ShopPurchase (UserUID, ProductNum, PurPrice,Purkey)
VALUES('$account_id','$ItemNum','$Price','$pur')") ;


mssql_query ("INSERT INTO Ranuser.dbo.Donation (Name,Date, Item, Quantity, Duration, Usernum)
VALUES('$ItemName',getdate(),'$ItemImage',1,'$Dura tion','$Usernum')");
$result = mssql_query ("SELECT Username, UserPoint, UserNum FROM Ranuser.dbo.Userinfo Where Username = '$account_id'");
$rows=mssql_num_rows($result);

if($rows>0) {
$rows=mssql_fetch_assoc($result); 
extract($rows);
$ProductNum = ($ProductNum);
$UserPoint = ($UserPoint);
}require("manage/log_functions.php");
                                   $logfile = "manage/logs/item_purchase.php";
                                   writelog::writelog_item_purchase($logfile);
echo "<script LANGUAGE='javascript'>alert('Item Bought Succesfully, Your Account have: $UserPoint G-Points Left!');history.go(-1);</Script>";
}
?>
 
Last edited:
Upvote 0
Joined
Dec 22, 2008
Messages
701
Reaction score
224
how to make this jerico?

purchase.php on line 3
you need to include purchase.php in your itemshop.php file

for example here is the adress for the itemshop if you pruchase an item.

itemshop.php will include purchase.php to make it work

if you go directly to the file purchase.php you will encounter certain errors.
 
Last edited:
Upvote 0
Back
Top