Foros del Web » Programando para Internet » PHP »

Alguien entiende de esto

Estas en el tema de Alguien entiende de esto en el foro de PHP en Foros del Web. HOLA GENTE QUISIERA SABER SI ALGUIEN PODRIA AYUDARME A PASAR ESTA PARTE DE UN SCRIPTS A PHP LO NESECITO MUCHO ES DE SUMA IMPORTANCIA ESTO ...
  #1 (permalink)  
Antiguo 13/02/2005, 17:54
 
Fecha de Ingreso: febrero-2005
Mensajes: 17
Antigüedad: 19 años, 2 meses
Puntos: 0
Alguien entiende de esto

HOLA GENTE QUISIERA SABER SI ALGUIEN PODRIA AYUDARME A PASAR ESTA PARTE DE UN SCRIPTS A PHP LO NESECITO MUCHO ES DE SUMA IMPORTANCIA ESTO ESTA EN FORMATO ASP Y LO QUISIERA PASAR A PHP..

DESDE YA MUCHAS GRACIAS
A POR SI ACASO DEJO MI MAIL
[email protected]




<!--#include file="conn.asp" -->
<%
lifedbnames="reset.mdb"

lifeneedlevel=400 'nivel minimo para hacer el reset

lifedonelevel=1 'nuevo nivel despues del reset

lifedoneexp=0 'experiencia de partida despues del reset

lifemoney=50000000 'zen necesario para el reset (inventario)

totalcocunt=100 'Numero de resets permitidos

accountname=request.form("username")
password=request.form("password")
character=request.form("userchr")


if instr(accountname,"'")<>0 then response.end
if instr(accountname,"=")<>0 then response.end
if instr(accountname,"%")<>0 then response.end

if accountname<>"" and password<>"" then


set rslife = Server.CreateObject("ADODB.Recordset")

sqllife="select * from Life where character='"&character&"'"

rslife.open sqllife,conn,1,3

set rs = Server.CreateObject("ADODB.Recordset")

sql="select * from MEMB_INFO where memb___id = '"&accountname&"' and memb__pwd='"&password&"'"

rs.open sql,conn,1,1

if rs.eof or rs.bof then

response.write "<script language=javascript>alert('\n\nLogin incorrecto');history.back()</script>"

response.end

else

set rs1 = Server.CreateObject("ADODB.Recordset")

sql1="select * from Character where AccountID='"&accountname&"' and Name='"&character&"' and cLevel>="&lifeneedlevel

rs1.open sql1,conn,1,3

if rs1.eof or rs1.bof then

%>
<script language=javascript>alert('\n\nYou must be at least level <%=lifeneedlevel%>');history.back()</script>

<%
response.end

end if
zscs=rslife("lifecount")+1

if rs1("money")<lifemoney then

response.write "<script language=javascript>alert('\n\nNo tienes suficiente zen en tu inventario. Necesitas "&lifemoney&" zen.');history.back()</script>"


response.end

end if

set rs3 = Server.CreateObject("ADODB.Recordset")

sql3="select * from AccountCharacter where id = '"&accountname&"'"

rs3.open sql3,conn,1,3


if rslife.eof or rslife.bof then
rslife.addnew
rslife("character")=rs1("name")
rslife("level")=rs1("cLevel")
rslife("time")=now()
rslife("lifecount")=rslife("lifecount")+1
else
rslife("level")=rs1("clevel")
rslife("lifecount")=rslife("lifecount")+1
rslife("time")=now()
rslife.update
end if

if rs1("class")=0 then


'????
currentlevel=rs1("cLevel")
getpoint=currentlevel
rslife.update
getpoint=rslife("getpoint")


rs1("money")=rs1("money")-lifemoney
rs1("cLevel")=lifedonelevel
rs1("Experience")=lifedoneexp
rs1("LevelUpPoint")=("LevelUpPoint")

rs1("Strength")=("Strength")
rs1("Dexterity")=("Dexterity")
rs1("Vitality")=("Vitality")
rs1("Energy")=("Energy")
rs1("Inventory")=("Inventory")
rs1("MagicList")=("MagicList")
rs1("Life")=("Life")
rs1("MaxLife")=("MaxLife")
rs1("Mana")=("Mana")
rs1("MaxMana")=("MaxMana")
rs1("MapNumber")=("MapNumber")
rs1("MapPosX")=("MapPosX")
rs1("MapPosY")=("MapPosY")
rs1("Pklevel")=3
rs1("Mapdir")=("Mapdir")
rs1("Inventory")=null
rs1("MagicList")=null
rs1.update
response.write "<script language=javascript>alert('"&rs1("name")&", you have done "&rslife("lifecount")&" resets. You have won "&getpoint&" points. Reduced "&lifemoney&" zen!');location.href='home.asp';</script>"
response.end
end if

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>-=Mu Online=-</title>
<link href="img/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Estilo1 {color: #666666}
.Estilo2 {color: #000000}
.Estilo3 {color: #FF0000}
.Estilo4 {color: #FFFFFF}
-->
</style>
</head>

<body leftmargin="0" topmargin="0">
<!--#include file="top.asp" -->
<TABLE align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="#666666" frame=vsides rules=none>
<TR>
<td width=204 align=left vAlign=top background="img/left_bg.gif"><img src="img/left_top_news.gif" width="204" height="36">
<img src="img/122.gif" width="195" height="130" class="hand">
<table width="99%">
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
<!--#include file="inc_hy.asp" -->
<table width="99%">
<tr>
<td width="100%" height="4"></td>
</tr>
</table>
<table width="195" background="img/xu2.gif">
</table>
</TD>
<td width=1 height="190" background="img/xu.gif"></TD>
<td width=553 align=left vAlign=middle bgcolor="#FFFFFF"><table width="99%">
<tr>
<td width="100%" height="26"></td>
</tr>
</table>
<table width="496" height="396" border="0" align="center" cellpadding="3" cellspacing="0">
<form action="reset.asp" method="post" name="zsform"><tr>
<td width="490" height="34" align="left" > <table width="489" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="483" height="22" align="center" style="font-size:16px"><strong class="bigf Estilo2">Resetear Personaje </strong></td>
</tr>
</table></td>
</tr>
<tr>
<td height="191" align="center"> <TABLE align=left border=0 cellPadding=5 cellSpacing=1 width="490">
<TBODY>
<TR>
<TD height="127" colSpan=2 align=right class=txt_gray> <DIV align=left>
<p class="con2"><span class="bigf Estilo2">Condiciones del reseteo:</span><FONT
color=#cc3300><br>
</FONT><span class="Estilo1"><span class="Estilo2">1.- Actualmente se puede resetear hasta <%=totalcocunt%> veces un personaje.<br>
2.- Tu personaje no puede estar logueado o no debe haber sido el ultimo en jugar (antes de salir del juego, entra con otro personaje).</span><br>
<br>
<span class="Estilo3">3.- <strong>Importante:</strong> Guarda todos los items en tu baul. Todo lo que este en tu personaje sera borrado.(el zen no se borra)</span><br>
<br>
<span class="Estilo2">4.- Necesitas ser nivel <%=lifeneedlevel%> como minimo. Despues del reseteo seras nivel <%=lifedonelevel%> y empezaras con <%=lifedoneexp%> EXP. Tambien recibiras puntos extra, uno por cada nivel que tengas antes del reseteo.<br>
5.- El coste del reseteo es de <%=lifemoney%> zen. Pon este zen en tu inventario antes del reseteo. <br>
6.- Sigue estos pasos con cuidado o el reseteo fallara en incluso tu personaje puede quedar inaccesible.</span></span></p>
<p class="con2">&nbsp;</p>
</DIV></TD>
</TR>
<TR>
<TD width="106" align=right class=Estilo2 txt_gray><strong> Personaje </strong></TD>
<TD width="361"> <INPUT name=userchr type=text class="lanyu" id="ps_person_id" size=18 maxLength=18>
</TD>
</TR>
<TR>
<TD width="106" align=right class=Estilo2 txt_gray><strong>Login</strong></TD>
<TD class=txt_gray><INPUT name=username type=text class="lanyu" id="username" size=18 maxLength=16></TD>
</TR>
<TR>
<TD width="106" align=right class=Estilo2 txt_gray><strong>Clave</strong></TD>
<TD class=txt_gray><INPUT name=password type=password class="lanyu" id="username3" size=18 maxLength=16></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td height="25" align="left"> <table width="301" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="295" align="center" class="bigf Estilo4">OK<img src="img/reg.gif" width="40" height="17" onclick="zsform.submit()" #invalid_attr_id="hand">¡¡<img src="img/reg1.gif" width="40" height="17" onclick="zsform.reset()" #invalid_attr_id="hand">Cancel</td>
</tr>
</table></td>
</tr></form>
</table></td>
</TR>
</TABLE>
<%
end if
rslife.close
set rslife=nothing
connlife.close
set connlife=nothing
%>
</body>
</html>
  #2 (permalink)  
Antiguo 13/02/2005, 19:29
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Mensaje cerrado por duplicado:

http://www.forosdelweb.com/f18/conversion-codigo-asp-php-usa-bd-access-270234/

Un saludo,
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Tema Cerrado




La zona horaria es GMT -6. Ahora son las 21:20.