this game is very interesting and please leave an opinion:p
PHP Code:
/////end this is the code put this in index owner cp
echo "<small>»<a href=\"sef.php?action=magazin&sid=$sid\">Administreaza Magazin Virtual</a></small><br/>";
PHP Code:
/////////this in sef.php
/////////////// magazin virtual
else if($action=="magazin")
{
addonline(getuid_sid($sid),"Comenzi Administrator","");
echo "<card id=\"main\" title=\"Lib3rty.Com\">";
echo "<p>";
echo "»<a href=\"sef.php?action=addauto&sid=$sid\">Adauga autoturism</a><br/>";
echo "»<a href=\"sef.php?action=stergeauto&sid=$sid\">Sterge autoturism</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<br/><br/><a href=\"index.php?action=proprietar&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
echo "Comenzi Administrator</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../wap/images/home.gif\" alt=\"\"/>Prim</a>";
echo "</p>";
echo "</card>";
}
else if($action=="addauto")
{
addonline(getuid_sid($sid),"Comenzi Administrator","");
echo "<card id=\"main\" title=\"Lib3rty.Com\">";
echo "<p align=\"center\">";
echo "Adauga Masina<br/><br/>";
echo "Imagine Masina<br/>";
echo "<input name=\"logo\"/>";
echo "<br/>";
echo "Nume<br/>";
echo "<input name=\"nume\"/>";
echo "<br/>";
echo "Viteza Maxima<br/>";
echo "<input name=\"viteza\"/>";
echo "<br/>";
echo "Pret:(++)<br/>";
echo "<input name=\"pret\"/>";
echo "<br/><anchor>adauga masina";
echo "<go href=\"seff.php?action=addauto&sid=$sid\" method=\"post\">";
echo "<postfield name=\"logo\" value=\"$(logo)\"/>";
echo "<postfield name=\"nume\" value=\"$(nume)\"/>";
echo "<postfield name=\"viteza\" value=\"$(viteza)\"/>";
echo "<postfield name=\"pret\" value=\"$(pret)\"/>";
echo "</go>";
echo "</anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<br/><br/><a href=\"index.php?action=proprietar&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
echo "Comenzi Administrator</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../wap/images/home.gif\" alt=\"\"/>Prim</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////// animale
else if($action=="stergeauto")
{
addonline(getuid_sid($sid),"Comenzi Administrator","");
echo "<card id=\"main\" title=\"Lib3rty.Com\">";
echo "<p>";
echo "Animale din magazin";
echo "</p><p>";
$res = mysql_query("SELECT * FROM lib3rtymrc_magazin");
while ($row = mysql_fetch_array($res))
{
echo $row[2];
echo " <a href=\"seff.php?action=stergeauto&sid=$sid&id=$row[0]\">[X]</a>";
echo "<br/>";
}
echo "</p>";
echo "<p align=\"center\">";
echo "<br/><br/><a href=\"index.php?action=proprietar&sid=$sid\"><img src=\"../wap/images/admn.gif\" alt=\"*\"/>";
echo "Comenzi Administrator</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../wap/images/home.gif\" alt=\"\"/>Prim</a>";
echo "</p>";
echo "</card>";
}
PHP Code:
/////////////////this in seff.php
else if($action=="addauto")
{
addonline(getuid_sid($sid),"Comenzi Administrator","");
echo "<card id=\"main\" title=\"Lib3rty.Com\">";
echo "<p align=\"center\">";
$logo = $_POST["logo"];
$nume = $_POST["nume"];
$pret = $_POST["pret"];
$viteza = $_POST["viteza"];
echo "<img src=\"$logo\" alt=\"$nume\"/>$nume<br/>";
echo "Pret:$pret ++";
$res = mysql_query("INSERT INTO lib3rtymrc_magazin SET logo='".$logo."', nume='".$nume."', cost='".$pret."', viteza='".$viteza."'");
if($res)
{
echo mysql_error();
echo "<br/><img src=\"../wap/images/ok.gif\" alt=\"O\"/>Autoturism adaugat cu succes<br/>";
}else{
echo "<br/><img src=\"../wap/images/notok.gif\" alt=\"X\"/>Eroare in baza de date<br/>";
}
echo "<br/>";
echo "<a href=\"sef.php?action=magazin&sid=$sid\">Administrare Magazin</a><br/>";
echo "<a href=\"index.php?action=proprietar&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
echo "Comenzi Administrator</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../wap/images/home.gif\" alt=\"\"/>Prim</a>";
echo "</p></card>";
}
//////////////////////////delete auto//////////////////////////
else if($action=="stergeauto")
{
addonline(getuid_sid($sid),"Comenzi Administrator","");
echo "<card id=\"main\" title=\"Lib3rty.Com\">";
echo "<p align=\"center\">";
$id=$_GET["id"];
$res = mysql_query("DELETE FROM lib3rtymrc_magazin WHERE id='".$id."'");
if($res)
{
echo "$site<br/><img src=\"../wap/images/ok.gif\" alt=\"O\"/>Masina stersa<br/>";
}else{
echo "<img src=\"../wap/images/notok.gif\" alt=\"X\"/>Eroare in baza de date<br/>";
}
echo "<br/>";
echo "<a href=\"sef.php?action=magazin&sid=$sid\">Administrare Magazin</a><br/>";
echo "<a href=\"index.php?action=proprietar&sid=$sid\"><img src=\"http://coding-talk.com/images/admn.gif\" alt=\"*\"/>";
echo "Comenzi Administrator</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../wap/images/home.gif\" alt=\"\"/>Prim</a>";
echo "</p></card>";
}
Comment