Parašė bartascs· 2012 Bir. 18 12:06:29
#1
Sveiki, taigi pasidariau tokias kaip ir kategorijas serveriu :) na tiksliau zaidimu serverius, kuriu galima matyt online statistika ir kaip man padaryti pagal mano visa daryta varianta, kad prie serverio pavadinimo rodytu zaidimo
ikona?
stai taip koda rasiau :)))
susikuriau lentelej laukeli :))
ALTER TABLE amx_servers ADD server_game VARCHAR(30) NOT NULL DEFAULT 'otr';
i register.php faila pasirasiau toki koda:
echo "<tr>\n<td class='tbl1'>Pasirinkite zaidima:<span style='color:#ff0000'>*</span></td>\n";
echo "<td class='tbl1' style='text-align:right'>";
echo "<select name='gametype' style='width:206px'>";
echo "<option value='otr'>Visi zaidimai</option>";
echo "<option value='cs'>Counter Strike 1.6</option>";
echo "<option value='css'>Counter Strike Source</option>";
echo "<option value='cz'>Counter Strike CZ</option>";
echo "<option value='hl'>Half Life</option>";
echo "<option value='hl2dm'>Half Life 2 DM</option>";
echo "<option value='hl2zp'>Half Life 2 ZP</option>";
echo "<option value='gm'>Garry's Mod</option>";
echo "<option value='ff'>Fortress Forever</option>";
echo "<option value='tfc'>TeamFortress Classic</option>";
echo "<option value='tf2'>TeamFortress 2</option>";
echo "<option value='dod'>Day of Defeat</option>";
echo "<option value='dods'>Day of Defeat Source</option>";
echo "<option value='l4d'>Left 4 Dead</option>";
echo "<option value='l4d2'>Left 4 Dead 2</option>";
echo "</select></td></tr>";
ir t.t.t....
taigi man reikia, kad rodytu ikona prie zaidimo pavadinimo:
pvz: rasau koda:
if ($_GET['id'] == "all")
{
require "gametype/all.php";
}
elseif ($_GET['id'] == "cs")
{
require "gametype/cs.php";
}
elseif ($_GET['id'] == "css")
{
require "gametype/css.php";
}
elseif ($_GET['id'] == "cz")
{
require "gametype/cz.php";
}
elseif ($_GET['id'] == "hl")
{
require "gametype/hl.php";
}
elseif ($_GET['id'] == "hl2dm")
{
require "gametype/hl2dm.php";
}
elseif ($_GET['id'] == "hl2zp")
{
require "gametype/hl2zp.php";
}
elseif ($_GET['id'] == "dod")
{
require "gametype/dod.php";
}
elseif ($_GET['id'] == "dods")
{
require "gametype/dods.php";
}
elseif ($_GET['id'] == "ff")
{
require "gametype/ff.php";
}
elseif ($_GET['id'] == "gm")
{
require "gametype/gm.php";
}
elseif ($_GET['id'] == "tfc")
{
require "gametype/tfc.php";
}
elseif ($_GET['id'] == "tf2")
{
require "gametype/tf2.php";
}
elseif ($_GET['id'] == "l4d")
{
require "gametype/l4d.php";
}
elseif ($_GET['id'] == "l4d2")
{
require "gametype/l4d2.php";
}
elseif ($_GET['id'] == "otr")
{
require "gametype/otr.php";
}
taigi kaip galima pagal tai padaryti ikonus jei bus pvz:
css serveris ir rodys
css ikona prie pavadinimo :)))
cia si koda dariau, kad rodytu serverius pagal pasirinkima tai glaima ir pritaikyt su ikonais :))
ar pavyktu ?
as manu jei butu pasirinkts serveris ir su get metodu atvaizduojamas is
mysql uzrasas
css ir man prie pavadinimo bus paveiksliukas to zaidimo kieno uzrasa atvaizdavo :))
pvz: ar pavyktu?
elseif ($_GET['id'] == "css")
{
require "<img src='/images/icons/css.gif'>";
}
ar butu kitu variantu? :)))