bandeau

Smiles-War

33
14

calculateur.php

<body>
<?
include("configg9.php");
dbconnect();

// gestion des session
$result = mysql_query ("select now()");
$row = mysql_fetch_array($result);
$now = $row[0];
$bouton = array ();
//initialisation des variables:
if ($nums==  ){
$su="";
$msg.="erreur de connection";
}else{
$SQL="SELECT ki FROM smi_ses where nums= $nums ";
$result = mysql_query ("$SQL");
$row = mysql_fetch_array($result);
$su= $row[0];
}
// fin gestion des session
$msg.="connection: $su<br>";
if ($su<>""){
switch($act)
	{
	case"info";
    include("cache/info.php");
	break;
	case"trahir";
   include("cache/trahir.php");
	break;
	case"frapper";
 include("cache/frappe.php");
	break;
	case"";
include("cache/deplacer.php");
	break;
	case"f";
include("cache/fiche.php");
	break;
	case"xp1";
    $resultfc = mysql_query("SELECT pv,pvmax,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$xp = $row["XP"];$pv = $row["pv"];$pvmax = $row["pvmax"];
if ($pv<$pvmax){
if ($xp>0){
$resultfc = mysql_query("update smi_perso set pv=pv+10,XP=XP-1 where 1 and nom like  ".$su." ");
}else{$msg.=" pas assez de points d expérience";}
}else{$msg.=" maximum atteinds ";}
    $resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pvmax,pa,pd,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$nomm = $row[0];
    $x = $row["x"];
    $y = $row["y"];    $jeton = $row["jeton"];$pv = $row["pv"];$pvmax = $row["pvmax"];$pa = $row["pa"];$xp = $row["XP"];
	$pd = $row["pd"];
$msg.="$nomm<hr>Vie: <b>$pv</b>/$pvmax<br>attaque: <b>$pa</b><br>defense: <b>$pd</b><br>XP: <b>$xp</b>";
if ($xp>0){$msg.="<hr>convertir votre experience<br><a href=calculateur.php?nums=$nums&act=xp1> en récupération de 10 points de vie</a><br><a href=calculateur.php?nums=$nums&act=xp2>Gain de 1 point de vie max</a><br><a href=calculateur.php?nums=$nums&act=xp3>Gain en attaque +1</a><br><a href=calculateur.php?nums=$nums&act=xp4>Gain de défense +1</a><hr>";}
$msg.="<br>$jeton jetons";
	break;
	case"xp2";
    $resultfc = mysql_query("SELECT pv,pvmax,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$xp = $row["XP"];
if ($xp>0){
$resultfc = mysql_query("update smi_perso set pvmax=pvmax+1,XP=XP-1 where 1 and nom like  ".$su." ");
}else{$msg.=" pas assez de points d expérience";}

    $resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pvmax,pa,pd,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$nomm = $row[0];
    $x = $row["x"];
    $y = $row["y"];    $jeton = $row["jeton"];$pv = $row["pv"];$pvmax = $row["pvmax"];$pa = $row["pa"];$xp = $row["XP"];
	$pd = $row["pd"];
$msg.="$nomm<hr>Vie: <b>$pv</b>/$pvmax<br>attaque: <b>$pa</b><br>defense: <b>$pd</b><br>XP: <b>$xp</b>";
if ($xp>0){$msg.="<hr>convertir votre experience<br><a href=calculateur.php?nums=$nums&act=xp1> en récupération de 10 points de vie</a><br><a href=calculateur.php?nums=$nums&act=xp2>Gain de 1 point de vie max</a><br><a href=calculateur.php?nums=$nums&act=xp3>Gain en attaque +1</a><br><a href=calculateur.php?nums=$nums&act=xp4>Gain de défense +1</a><hr>";}
$msg.="<br>$jeton jetons";
	break;
	case"xp3";
    $resultfc = mysql_query("SELECT pv,pvmax,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$xp = $row["XP"];
if ($xp>0){
$resultfc = mysql_query("update smi_perso set pa=pa+1,XP=XP-1 where 1 and nom like  ".$su." ");
}else{$msg.=" pas assez de points d expérience";}
    $resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pvmax,pa,pd,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$nomm = $row[0];
    $x = $row["x"];
    $y = $row["y"];    $jeton = $row["jeton"];$pv = $row["pv"];$pvmax = $row["pvmax"];$pa = $row["pa"];$xp = $row["XP"];
	$pd = $row["pd"];
$msg.="$nomm<hr>Vie: <b>$pv</b>/$pvmax<br>attaque: <b>$pa</b><br>defense: <b>$pd</b><br>XP: <b>$xp</b>";
if ($xp>0){$msg.="<hr>convertir votre experience<br><a href=calculateur.php?nums=$nums&act=xp1> en récupération de 10 points de vie</a><br><a href=calculateur.php?nums=$nums&act=xp2>Gain de 1 point de vie max</a><br><a href=calculateur.php?nums=$nums&act=xp3>Gain en attaque +1</a><br><a href=calculateur.php?nums=$nums&act=xp4>Gain de défense +1</a><hr>";}
$msg.="<br>$jeton jetons";
	break;
	case"xp4";
    $resultfc = mysql_query("SELECT pv,pvmax,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$xp = $row["XP"];
if ($xp>0){
$resultfc = mysql_query("update smi_perso set pd=pd+1,XP=XP-1 where 1 and nom like  ".$su." ");
}else{$msg.=" pas assez de points d expérience";}
    $resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pvmax,pa,pd,XP FROM smi_perso where 1 and nom like  ".$su." ");
    $row = mysql_fetch_array($resultfc);
	$nomm = $row[0];
    $x = $row["x"];
    $y = $row["y"];    $jeton = $row["jeton"];$pv = $row["pv"];$pvmax = $row["pvmax"];$pa = $row["pa"];$xp = $row["XP"];
	$pd = $row["pd"];
$msg.="$nomm<hr>Vie: <b>$pv</b>/$pvmax<br>attaque: <b>$pa</b><br>defense: <b>$pd</b><br>XP: <b>$xp</b>";
if ($xp>0){$msg.="<hr>convertir votre experience<br><a href=calculateur.php?nums=$nums&act=xp1> en récupération de 10 points de vie</a><br><a href=calculateur.php?nums=$nums&act=xp2>Gain de 1 point de vie max</a><br><a href=calculateur.php?nums=$nums&act=xp3>Gain en attaque +1</a><br><a href=calculateur.php?nums=$nums&act=xp4>Gain de défense +1</a><hr>";}
$msg.="<br>$jeton jetons";
	break;
	case"his";
include("cache/histo.php");
	break;
	}

}
dbdeconnect();
echo"$msg";
?>
gorgu
2005-01-12 16:29:13



jouer.orgCNIL n° 822436