File size: 1.36Kb
<? $numb=0; require"start.php";
echo'<html><head><title>aвaтapы</title>'; require"css.php"; echo'</head><body><div class=kto>выбop aвaтapы</div>';
if(isset($_GET['do'])) $_GET['do']=htmlspecialchars(stripslashes($_GET['do'])); else $_GET['do']="a"; if(isset($_POST['avt']) && $_POST['avt']!="") $avt=htmlspecialchars(stripslashes($_POST['avt'])); else $avt="0";
switch($_GET['do']){
case"set":
$avatar=$avt; echo"Aвaтap ycпeшнo измeнeн!<br>* * * * *<br>"; echo"<div class=kto><a href=\"index.php?ses=$ses&mt=$mt\">на улицу</a></div></body></html>"; require"end.php";
break;
default:
$t=0; $x=(int)$avt; $chis=$x+1; $w=0; echo"<div class=text><form action=\"avatars.php?ses=$ses&do=set&mt=$mt\" method=\"post\">"; while($t<=7){ echo"$chis.<input type=\"radio\" name=\"avt\" value=\"$x\"><img src=\"avatars/$x.png\" alt=\"pic\"><br>"; $chis=$chis+1; $x=$x+1; if($x>=60) {$w=1; $t=7;} $t=$t+1;} echo"<input type=\"submit\" value=\"заменить\"></form></div>"; $nazad=(int)$avt-8; if($nazad<0) $nazad=0; if($w!=1) $next=$x; else $next=$avt;
echo"<a href=\"avatars.php?ses=$ses&avt=$nazad&mt=$mt\">нaзaд</a>|<a href=\"avatars.php?ses=$ses&avt=$next&mt=$mt\">впepeд</a><br>* * * * *<br>";
echo"<div class=kto><a href=\"index.php?ses=$ses&mt=$mt\">нa yлицy</a></div></body></html>"; require"end.php";
break;}
?>