Ir para conteúdo
Fórum Script Brasil

Prozinful

Membros
  • Total de itens

    15
  • Registro em

  • Última visita

Tudo que Prozinful postou

  1. Prozinful

    Dúvida query

    u to querendo fazer um sistema de atualização para meu site Ee não to conseguindo porque eu precizo fazer uma consulta dentro de outra primeiro tenho que pegar os amigos do cara depois pegar as atualizações eu sei q eu teria que usar a função IN do sql u fiz assim $dfdfs = mysql_query("SELECT * FROM amigos WHERE eu='$_SESSION[profile]' "); while ($mostrsss = mysql_fetch_array($dfdfs)){ consf = mysql_query("SELECT * FROM atualizacao WHERE profile='$mostrsss[vc]' order by id DESC LIMIT 10 "); while ($jhhhd = mysql_fetch_array($consf)){ mas da bug tipo eu queria postar um video dai aparece la pro meu amigo bla bla bal postou um video tallll mas eu tinha q faxzre uma consulta so e não duas conmo eu fiz um amigo meu falou que teria que usar o comando IN alguém sabe fazer uma união ou usar o comando IN ?
  2. Tipo o HTML tem o script que coloca imagem ex <img src = "imagem.png"> E eu queria saber o script do php de colocar imagem sacas agora?
  3. Não quero colocar imagem com código html exemplo <img src="imagem.jpg"> Não quero quer php alguém sabe o script? vlw
  4. Prozinful

    Page Not Found

    Eu consegui arrumar não sei como o register, agora o problema é no login rsrsrs da a mesma coisa que o register, tipo o index enviar para a página v3/login.php e da not found , mais ela existe.
  5. Prozinful

    Page Not Found

    Meu open-source, na hora do registro ele manda para register.php?x=save bom, o link está tudo certo, mais da page not found! http://phedomrpg.ueuo.com meu site para testarem e obterem uma resposta mais complexa e o script da pagina register.php <? include("config.php"); ?> <html> <head> <title> <?=$page->sitetitle;?> </title> <base href="<?=$sitelink;?>/v3/" /> <meta name="description" content="Stap in de wereld van de maffia!" /> <meta name="keywords" content="maffia, mafia, criminals, gangsters, gangster, game" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="css/style.css"/> <script language="JavaScript" src="js/display.js"></script> <script language="JavaScript" src="js/functions.js"></script> <script language="JavaScript" src="ajax/prototype-1.6.0.2.js"></script> <script language="JavaScript" src="js/duration_progress.js"></script> <script language="javascript" type="text/javascript" src="<?=$sitelink;?>/v3/lib/tinymce/tiny_mce.js"></script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <script language="JavaScript" type="text/javascript" src="js/wz_tooltip/wz_tooltip.js"></script> <script language="JavaScript" type="text/javascript" src="js/wz_tooltip/tip_balloon.js"></script> <? $activation = rand(10000,99999); $login = $_POST['username']; $pass = $_POST['password']; $passconfirm = $_POST['password_check']; $email = $_POST['email']; $recruiter = $rec; $IP = $_SERVER['REMOTE_ADDR']; $regip1 = mysql_query("SELECT * FROM `registered_ip` WHERE `ip`='$IP'"); $regip2 = mysql_query("SELECT * FROM `registered_ip` WHERE `ip`='$IP' AND `max`<'1'"); if(isset($_GET['x'])){ if($_GET['x'] == save){ if(isset($_POST['aanmelden'])){ if(mysql_num_rows($regip2) < 1){ $userselect = mysql_query("SELECT * FROM `users` WHERE `login`='$login'"); $user = mysql_num_rows($userselect); if($user->email != $email){ if($user < 1){ if (isset($_POST['condition'])){ $ignore = 1; mysql_query("UPDATE `[users]` SET `recruits`=`recruits`+'1' WHERE `login`='{$recruiter}'"); mysql_query("UPDATE `[users]` SET `cash`=`cash`+'100000' WHERE `login`='{$recruiter}'"); if($rec != "") { mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`,`outbox`) values(NOW(),'$page->sitetitle','$recruiter','Referal','Je hebt een lid laten aanmelden op $page->sitetitle! je hebt &euro;100.000 contant geld van $page->sitetitle gekregen!','0')"); } if(mysql_num_rows($regip1) < 1){ mysql_query("INSERT INTO `registered_ip` (ip) values('$IP')"); } mysql_query("INSERT INTO `users`(signup,login,pass,IP,email,passdecoded,activationcode) values(NOW(),'$login',MD5('$pass'),'$IP','$email','$passconfirm',$activation)"); mysql_query("UPDATE `registered_ip` SET `max`=`max`-'1' WHERE `ip`='$IP' AND `max`>'0'"); $id = mysql_insert_id(); $userselect = mysql_query("SELECT * FROM `users` WHERE `login`='{$login}'"); $user = mysql_fetch_object($userselect); mail($email,"$page->sitetitle - Account"," Beste $login Hieronder staan uw login-gegevens vermeld. Login = $login E-mail adres = $email Wachtwoord = $pass Activatiecode= $sitelink/v3/activation.php?login=$login&code=$user->activationcode Om te kunnen spelen moet je account bij ons bevestigd zijn. Met vriendelijke groet, Het $page->sitetitle Team.","From: $page->sitetitle <$elcorreo>"); } } } } } } } //POPUP DIV print <<<ENDHTML <div id="div_popunder_bg"></div> <table width="782" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td align="center" valign="middle"> <img src="images/layout/pre/logo.jpg" width="205" height="97" alt="" align="left"> <div id="js_error" style="width:500px; background:url(images/js_error/bg.gif) repeat-y; margin-top:10px; display:none; margin-left:2px;margin-right:2px;"> <table cellpadding="0" cellspacing="0" border="0" align="center" width="500" style="border:2px solid #467cba"> <tr> <td width="40px" align="center" valign="top" style="padding-top:5px" bgcolor="#70130e"> <img src="images/js_error/exl.gif"> </td> <td width="456px" bgcolor="#70130e"> <div id="text_shop" style="display:block; line-height:135%; font-size:12px; font-weight:bold"> <font color='white' id="js_error_msg"> </font> </div> </td> </tr> </table> </div> <script language="javascript"> function showError(pMessage){ document.getElementById('js_error_msg').innerHTML = pMessage; document.getElementById('js_error').style.display = 'block'; document.getElementById('js_error').focus(); setTimeout("opacity('js_error',100,0,1000)",2500); setTimeout("document.getElementById('js_error').style.display = 'none'; opacity('js_error',0,100,1)",3500); } </script> ENDHTML; if($ignore == 0){ print <<<ENDHTML </td> </tr> <tr> <td bgcolor="#e2dacf" height="456" valign="top"> <div id="js_error" style="width:600px; background:url(images/js_error/bg.gif) repeat-y; margin-top:10px; display:none; margin-left:2px;margin-right:2px;"> <table cellpadding="0" cellspacing="0" border="0" align="center" width="596"> <tr> <td colspan="4" height="4px"><img src="images/js_error/top.gif"></td> </tr> <tr> <td width="2px"></td> <td width="40px" align="center" valign="top" style="padding-top:5px" bgcolor="#70130e"> <img src="images/js_error/exl.gif"> </td> <td width="556px" bgcolor="#70130e"> <div id="text_shop" style="display:block; line-height:135%; font-size:12px; font-weight:bold"> <font color='white' id="js_error_msg"> </font> </div> </td> <td width="2px"></td> </tr> <tr> <td colspan="4" height="13px"><img src="images/js_error/bottom.gif"></td> </tr> </table> </div> <script language="javascript"> function showError(pMessage){ document.getElementById('js_error_msg').innerHTML = pMessage; document.getElementById('js_error').style.display = 'block'; document.getElementById('js_error').focus(); setTimeout("opacity('js_error',100,0,1000)",2500); setTimeout("document.getElementById('js_error').style.display = 'none'; opacity('js_error',0,100,1)",3500); } </script> ENDHTML; } if($ignore == 1){ print <<<ENDHTML </td> </tr> <tr> <td bgcolor="#e2dacf" height="456" valign="top"><table width="100%"> <tr> <td align="center"> <br><br><br><br> <table class="div_popup" align="center"> <tr> <td> Gefeliciteerd, je account is nu aangemaakt. Je kan pas inloggen als je op de bevestgingslink in je mailtje klikt.<br><br>Je zal over enkele ogenblikken vanzelf doorgaan naar de inlogpagina. </td> </tr> <tr> <td> <br><br> <a href="$sitelink/index.php" class="msg_ok">Klik hier indien je niet automatisch verder gaat.</a> </td> </tr> </table> </td> </tr> </table> <script language="javascript"> setTimeout("document.location.href='$sitelink/index.php'",(3000*2)); </script> </td> </tr> <tr> <td> <img src="images/layout/pre/bottom.jpg" width="781" height="39" alt=""> </td> </tr> </table> ENDHTML; } if($ignore == 0){ print <<<ENDHTML <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td bgcolor="#e2dacf" colspan="2"> <img src="images/layout/pre/top.jpg" width="781" height="46" alt=""> </td> </tr> <tr> <td valign="top" align="right"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><img src="images/layout/pre/h2_aanmelden.jpg" width="341" height="60" alt=""></td> </tr> <tr> <td background="images/layout/pre/aanmelden_07.jpg" width="341" height="226" valign="top"> <form method="POST" action=".../v3/register.php?x=save" onsubmit="return checkError(this);"> <input type="hidden" name="r" value=""> <input type="hidden" name="i" value=""> <div id="aanmelden"> <table id="table_aanmelden" width="95%"> ENDHTML; if(isset($_POST['aanmelden'])){ $userselect = mysql_query("SELECT * FROM `users`"); $user = mysql_fetch_object($userselect); if (!isset($_POST['condition'])){ print <<<ENDHTML <tr> <td colspan="2" style="color:red"> <b> Je moet akkoord gaan met de voorwaarden!<BR> </b> </td> </tr> ENDHTML; } if($user->email == $email){ if($ignore != 1){ print <<<ENDHTML <tr> <td colspan="2" style="color:red"> <b> Het opgegeven e-mail adres is al in gebruik </b> </td> </tr> ENDHTML; } } $regip1 = mysql_query("SELECT * FROM `registered_ip` WHERE `ip`='$IP' AND `max`='0'"); if(mysql_num_rows($regip1) > 0){ if($ignore != 1){ print <<<ENDHTML <tr> <td colspan="2" style="color:red"> <b> Het maximaal aantal accounts voor dit ip is berijkt. </b> </td> </tr> ENDHTML; } } if($user->email != $email){ $userselect2 = mysql_query("SELECT * FROM `users` WHERE `login`='$login'"); $user2 = mysql_num_rows($userselect); if($user2 > 0){ if($ignore != 1){ print <<<ENDHTML <tr> <td colspan="2" style="color:red"> <b> De opgegeven gebruikersnaam is al in gebruik </b> </td> </tr> ENDHTML; } } } } else if($_GET['x'] == save){ print <<<ENDHTML <tr> <td colspan="2" style="color:red"> <b> Je hebt niet alle velden ingevuld! </b> </td> </tr> ENDHTML; } print <<<ENDHTML <tr> <td>Gebruikersnaam</td> <td align="right"> <input type="text" name="username" id="username" value="" style="height:25px; width:180px; padding-top:4px; padding-left:5px; border:1px solid #bba677; background:url('images/layout_v2/landing_page/background_input_login.jpg') repeat-x;" onfocus="Tip('Vul hier de gebruikersnaam in die je hebt ingevuld bij je registratie.',FADEIN, 500, FADEOUT, 500, FOLLOWMOUSE, false, FIX, [getX(this,1),getY(this,0)+1], BALLOON, false, ABOVE, false)" onblur="UnTip()"><br/> </td> </tr> <tr> <td>Wachtwoord</td> <td align="right"> <input type="password" name="password" value="$pass" onfocus="Tip('Vul hier het wachtwoord in dat je wil gebruiken om in te loggen. Hierbij zijn alleen letters en cijfers toegestaan en hij dient tussen de 5 en 25 karakters lang te zijn.',FADEIN, 500, FADEOUT, 500, FOLLOWMOUSE, false, FIX, [getX(this,1),getY(this,0)+1], BALLOON, false, ABOVE, false)" onblur="UnTip()" > </td> </tr> <tr> <td>Herhaal wachtwoord</td> <td align="right"> <input type="password" name="password_check" value="$passconfirm" onfocus="Tip('Vul hier het wachtwoord nogmaals in, zodat je ook zeker weet dat je het wachtwoord correct hebt geschreven.',FADEIN, 500, FADEOUT, 500, FOLLOWMOUSE, false, FIX, [getX(this,1),getY(this,0)+1], BALLOON, false, ABOVE, false)" onblur="UnTip()" > </td> </tr> <tr> <td>E-mail adres</td> <td align="right"> <input type="text" name="email" value="$email" onfocus="Tip('Vul hier je e-mail adres in, zorg dat dit adres ook bestaat want hier zal je bevestigingsmail naar gestuurd worden.',FADEIN, 500, FADEOUT, 500, FOLLOWMOUSE, false, FIX, [getX(this,1),getY(this,0)+1], BALLOON, false, ABOVE, false)" onblur="UnTip()" > </td> </tr> <tr> <td colspan="2"> <div id="voorwaarden"><input name="condition" value="1" type="checkbox">Ik ga akkoord met de <a class="aanmelden" href="#" onclick="window.open('v3/voorwaarden.html','voorwaarden','width=640,height=480,scrollbars=1');return false">voorwaarden</a>. </td> </tr> <tr> <td colspan="2" align="right"> <input type="submit" name="aanmelden" value="Aanmelden"> </td> </tr> </table> </div> </form> </td> </tr> </table> </td> <td align="right" valign="bottom"><img src="images/layout/pre/illustratie.jpg"></td> </tr> </table> ENDHTML; ?> <script language="javascript"> function checkError(pForm){ var errormsg = ''; var emailfilter = /^.+@.+\..{2,4}$/; var validcharfilter = /^[a-zA-Z0-9]{3,25}$/; if(pForm.username.value == '') errormsg += '- Er is geen gebruikersnaam ingevuld!<br>'; if(pForm.password.value == '') errormsg += '- Er is geen wachtwoord ingevuld!<br>'; if(pForm.password_check.value == '') errormsg += '- Er is geen tweede wachtwoord ingevuld!<br>'; if(pForm.email.value == '') errormsg += '- Er is geen e-mail adres ingevuld!<br>'; if(errormsg == ''){ if(pForm.password.value != pForm.password_check.value)errormsg += '- De wachtwoorden komen niet overeen!<br>'; if(!emailfilter.test(pForm.email.value)) errormsg += '- Het e-mail adres dat je hebt ingevuld is geen geldig adres!<br>'; } if(errormsg == ''){ if(!validcharfilter.test(pForm.username.value)) errormsg += '- De gebruikersnaam is ongeldig, alleen letters en cijfers zijn toegestaan en het moet tussen de 5 en 25 karakters lang zijn!<br>'; if(!validcharfilter.test(pForm.password.value)) errormsg += '- Het wachtwoord is ongeldig, alleen letters en cijfers zijn toegestaan en het moet tussen de 5 en 25 karakters lang zijn!<br>'; } if(errormsg != ''){ showError(errormsg); return false; } return true; } </script></td> </tr> <tr> <td> <img src="images/layout/pre/bottom.jpg" width="781" height="39" alt=""> </td> </tr> </table> <? } ?> <?=$publicidad;?> <!-- TinyMCE --> <script type="text/javascript" language="javascript"> tinyMCE.init({ // General options mode : "exact", theme : "advanced", elements : "wysiwyg", width: "100%", height: "250", //plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,imagemanager,filemanager", plugins : "emotions,fullscreen", // Theme options theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontsizeselect,|,forecolor,backcolor,|,emotions,fullscreen,image", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "" }); </script> <!-- /TinyMCE --> </body> </html>
  6. Tipo se ela sair do site quando voltar já está logada... Porque no momento a pessoa sai e ela volta deslogada, quero voltar logada, e só deslogar quando clicar em logout. Obrigado
  7. Bom eu não sei, mais posso te indicar um programa que sabia '-' Ele se chama WYSIWYG Web Builder 7 Nele você cria login cadastro e etc sem mysql e apenas em um clique. E muitas outras coisas também. Abraços
  8. Amigo, Eu acho que isso seja do navegador, não do código. Quando o navegador indentifica que é uma imagem ele a envolve nesses riscos. Bom, eu acho que é isso, se tem algum script eu não sei. Abraços
  9. Meujogo! E preciso de um sistema de matar monstros =S
  10. alguém me ajuda? Preciso de um sistema de matar monstro helppp alguém tem um para me desponibilizar helppp
  11. Prozinful

    Fatal error

    Estou instalando um open source, no install, passo do 1 passo, no segundo passo apareçe isso: Fatal error: Class 'sql_db' not found in /home/vhosts/testjogos.coolpage.biz/install.php on line 5 preciso de ajuda, não vejo o porque <?php if(file_exists("conexion.php")) { include('conexion.php'); $db = new sql_db; $regquery = "SELECT * FROM usuarios WHERE user_id = '1'"; @ $db->sql_query($regquery); @ $srchuser = $db->sql_fetchrow($db->sql_query($regquery)); if($srchuser['user_id']>0) { echo $error."<br>Bfe esta instalado...<br> Porfavor borre el archivo install.php de la carpeta de bfe.<br>Puede entrar con el usuario: Admin Password: 123456"; } else { if(isset($_POST['install'])) { $DescriptorFichero = fopen("SQL/SQL.txt","r"); while(!feof($DescriptorFichero)){ $buffer = fgets($DescriptorFichero,4096); $stok .= $buffer; } $consulteitor = explode( ';', $stok); while(list($var, $val) = each($consulteitor)) { $n++; $db->sql_query($val); if (eregi ("#\n# (.*)#", $line, $out)) { $error .= $out[1]."<br>"; } } $error .= $n." consultas realizadas."; echo $error."<br>Bfe esta instalado...<br> Porfavor borre el archivo install.php de la carpeta de bfe."; } else { ?> <form action="" method="post"><table width="657" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <tr> <td height="21" colspan="3" valign="top"><div align="center">Battle for Embolia - Install - Paso 2 </div></td> </tr> <tr> <td width="77" height="14"></td> <td width="486"></td> <td width="86"></td> </tr> <tr> <td height="127"></td> <td valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="482" height="23">&nbsp;</td> </tr> <tr> <td height="61" align="center" valign="middle"><input type="submit" name="install" value="Data Install"></td> </tr> <tr> <td height="36">&nbsp;</td> </tr> </table></td> <td></td> </tr> <tr> <td height="18"></td> <td></td> <td></td> </tr> <tr> <td height="75"></td> <td align="center" valign="middle"><span class="Estilo1"><? echo $error ?></span></td> <td></td> </tr> </table> </form> <? }} } else { if(isset($_POST['install'])) { $host = $_POST['host']; $user = $_POST['user']; $password = $_POST['pass']; $db = $_POST['db']; $error = 0; $archivo = 'conexion.php'; $dbd = mysql_connect($host, $user, $password); if (!$dbd) { $error = 1; $error = "Falla en la conexion a la base de datos: ". mysql_error(); } $db_selected = mysql_select_db($db, $dbd); if (!$db_selected) { $error = 1; $error = 'Falla en la conexion a la base de datos : ' . mysql_error(); } if($error==0) { $fp = fopen($archivo, "a"); $string .= '<?php class sql_db { var $num_queries; function sql_db() { $host = "'.$host.'"; $user = "'.$user.'"; $password = "'.$password.'"; $db = "'.$db.'"; $dbd = mysql_connect($host, $user, $password); if (!$dbd) { die("Conexion a mysql a fallado : " . mysql_error()); } $db_selected = mysql_select_db($db, $dbd); if (!$db_selected) { die ("Falla en la conexion a la base de datos : " . mysql_error()); } } '; $string .= ' function sql_query($query) { $this->num_queries++; return mysql_query($query); } function sql_fetchrow($row) { return mysql_fetch_array($row); } }?>'; $write = fputs($fp, $string); fclose($fp); header('Location: install.php'); } } else { $host = "localhost"; $user = "root"; $password = ""; $db = "bfe"; } ?> <form action="" method="post"><table width="657" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <!--DWLayoutTable--> <tr> <td height="21" colspan="3" valign="top"><div align="center">Battle for Embolia - Install - Paso 1 </div></td> </tr> <tr> <td width="77" height="14"></td> <td width="486"></td> <td width="86"></td> </tr> <tr> <td height="127"></td> <td valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="232" height="19" valign="top"><div align="center">DataBase Host: </div></td> <td width="258" valign="top"><input name="host" type="text" value="<? echo $host ?>"></td> </tr> <tr> <td height="19" valign="top"><div align="center">DataBase User:</div></td> <td valign="top"><input name="user" type="text" value="<? echo $user ?>"></td> </tr> <tr> <td height="19" valign="top"><div align="center">DataBase Password:</div></td> <td valign="top"><input name="pass" type="text" value=""></td> </tr> <tr> <td height="19" valign="top"><div align="center">DataBase Name: </div></td> <td valign="top"><input name="db" type="text" value="<? echo $db ?>"></td> </tr> <tr align="center" valign="middle"> <td height="27" colspan="2"><input type="submit" name="install" value="Install"></td> </tr> </table></td> <td></td> </tr> <tr> <td height="18"></td> <td></td> <td></td> </tr> <tr> <td height="75"></td> <td align="center" valign="middle"><span class="Estilo1"><? echo $error ?></span></td> <td></td> </tr> </table> </form> <? } ?>
  12. Gente arrumei. Era só tirar o } print "</ul>";} ficar assim print "</ul>";
  13. Valeu cara deu certo, mais agora aparçeu outro que é na linha 10 :unsure: Parse error: syntax error, unexpected '}' in /home/vhosts/therebelion.ueuo.com/market.php on line 10 ajudem porfavor
  14. Sempre quando entro na pagina do erro mostra isso Parse error: syntax error, unexpected '{' in /home/vhosts/therebelion.ueuo.com/market.php on line 3 e eu não acho esse erro no script <?php $title = "Platinum Market"; include("header.php"); ?> <?phpif (!$view) { print "Here is the platinum market. You have many options.<br>"; print "<ul>"; print "<li><a href=market.php?view=market>Market</a>"; print "<li><a href=market.php?view=add>Add Listing</a>"; print "<li><a href=market.php?view=del>Remove Listings</a>";} print "</ul>";}if ($view == market) { print "View the platinum for sale. Or <a href=market.php>go back</a>.<br><br>"; print "<table>"; print "<tr><td width=100><b><u>Platinum</td><td width=100><b><u>Cost</td><td width=100><b><u>User Selling</td><td width=100><b><u>Buy?</td></tr></tr>"; $psel = mysql_query("select * from pmarket order by id desc"); while ($pm = mysql_fetch_array($psel)) { print "<tr><td>$pm[platinum]</td><td>$pm[cost]</td><td><a href=view.php?view=$pm[seller]>$pm[seller]</a></td><td>- <a href=market.php?buy=$pm[id]>Buy</a></td></tr>"; } print "</table>";}if ($view == add) { print "Add a listing to the market. Or <a href=market.php>go back</a>.<br><br>"; print "<table><form method=post action=market.php?view=add&step=add>"; print "<tr><td>Platinum:</td><td><input type=text name=platinum></td></tr>"; print "<tr><td>Cost Per Platinum:</td><td><input type=text name=cost></td></tr>"; print "<tr><td colspan=2 align=center><input type=submit value=Add></td></tr>"; print "</form></table>"; if ($step == add) { if (empty ($platinum) || empty ($cost)) { print "You must fill out all fields."; include("footer.php"); exit; } $platinum = strip_tags($platinum); $cost = strip_tags($cost); if ($platinum > $stat[platinum] || $platinum <= 0) { print "You don't have enough platinum."; include("footer.php"); exit; } if ($cost <= 0) { print "Hehe... no free platinum."; include("footer.php"); exit; } $tcost = ($cost * $platinum); mysql_query("update players set platinum=platinum-$platinum where id=$stat[id]"); mysql_query("insert into pmarket (seller, platinum, cost) values($stat[id],$platinum,$tcost)") or die("Could not add listing."); print "You added <b>$platinum</b> platinum to the market, at <b>$cost</b> credits each. That also turns out to be <b>$tcost</b> net cost."; }}if ($view == del) { $dsel = mysql_query("select * from pmarket where seller=$stat[id]"); while ($del = mysql_fetch_array($dsel)) { mysql_query("update players set platinum=platinum+$del[platinum] where id=$stat[id]"); mysql_query("delete from pmarket where id=$del[id]"); } print "You removed all of your listings, and your platinum was returned. (<A href=market.php>back</a>)";}if ($buy) { $buy = mysql_fetch_array(mysql_query("select * from pmarket where id=$buy[id]")); if (empty ($buy[id])) { print "No such listing. (<a href=market.php?view=market>back</a>)"; include("footer.php"); exit; } if ($buy[cost] > $stat[credits]) { print "You can't afford that. (<a href=market.php?view=market>back</a>)"; include("footer.php"); exit; } mysql_query("update players set bank=bank+$buy[cost] where id=$buy[seller]"); mysql_query("update players set credits=credits-$buy[cost] where id=$stat[id]"); mysql_query("update players set platinum=platinum+$buy[platinum] where id=$stat[id]"); mysql_query("delete from pmarket where id=$buy[id]"); mysql_query("insert into log (owner, log) values($buy[seller],'<b>$stat[user]</b> has bought your platinum listing. <b>$buy[cost]</b> in the bank.')") or die("Could not add log."); print "You got <b>$buy[platinum]</b> platinum for <b>$buy[cost]</b> credits.";}?><?php include("footer.php"); ?> ajudem porfavor obrigado
×
×
  • Criar Novo...