PHPFusion - tai laisvai platinama nemokama turinio valdymo sistema (TVS), kurios pagalba galite greitai, lengvai ir
patogiai susikurti norimą internetinį puslapį. Plačiau apie sistemą...
Jaunelis 2024 Lie. 25 11:07:43 Oho vis dar veikia svetainė Šimtas metų, matau Šaukykloje nuostalgija. Smagu panaršyt po forumą ir pažiūrėt senas temas
And2s 2024 Lie. 17 19:07:04 2008 pirmą kart čia patekau, man buvo 10m ir čia pramokau programavimo.. smagu skaityti senas žinutes, tokia nostalgija ačiū Ozz kad saugoji šitą kultūrinį reliktą
ozzWANTED 2024 Sau. 17 01:01:00 Desperatiškus komentarus šaukykloje su accountu po mėnesio prasibuvimo, ištryniau. Pasaulis ir taip juodas. Įjungiam šviesą, prašviesės.
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 NULLDEFAULT'otr';
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 )
Jaunelis bet jei jis i kikviena faila prides paveiksliuko nuoroda jam terodys tik paveikslius kai pasirinks pagal kategorija, o pgr puslapyje kazin ar rodys ) tai gal jau su if.... ))
Variantas neblogas, tik yra viena problema, kad tu nekreipi dėmesio į kodo vykdymo greitį... Jei nori, kad tavo kodas veiktų greičiau, naudok switch-case sakinį.
If-elseif-else tikrina tą tavo kintamąjį tiek kartų, kol daeina TRUE, o switch-case tavo kintamojo reikšmę gaus tik 1 kartą, todėl kodo vykdymas ne tiek ir daug užims laiko.
Aciu uz pagalba, taigi turiu dar viena klausima, turiu pasirases koda kuris yra maincore.php faile
$settings= dbarray(dbquery("SELECT * FROM ".DB_SETTINGS)); $servers= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='cs' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $all= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $cs= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='cs' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $css= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='css' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $cz= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='cz' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $hl= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='hl' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $hl2dm= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='hl2dm' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $hl2zp= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='hl2zp' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $gm= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='gm' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $dod= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='dod' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $dods= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='dods' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $ff= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='ff' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $tfc= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='tfc' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $tf2= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='tf2' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $l4d= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='l4d' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $l4d2= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='l4d2' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc"); $otr= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='otr' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc");
pagrindinis dalykas yra toks kad sitoje eiluteje
$servers= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='cs' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc");
yra rodomas pagrindinime puslapyje esantys serveriai, kai bandau dar keist sia veita
server_game='cs'
taip
server_game='all'
man nebepeta pagridniame puslapyje nei vieno serverio kai nekeiciu nieko man rodo tik cs serverius kur ica kladia yra bandziau cs, css ... taip rasyt irgi nieko gal patartumete ka daryt, kad rodytu mano visus serverius?
Jei gerai supratau, tai tu nori padaryti, kad tau rodytų ne CS vien tik serverius, o visus, tai tu praplatink paiešką:
$servers= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_game='cs' and server_status != 0 and server_off != 1 order by server_vip desc, votes desc");
Šitą pakeisk į:
$servers= dbquery("SELECT * FROM ".DB_SERVERS ." where server_new != 1 and server_status != 0 and server_off != 1 order by server_vip desc, votes desc");