Snaip3Rs Posted May 30, 2009 Report Share Posted May 30, 2009 Es jau izmeklējos visur un atradu uz vienu jautājumu atbildi kā uztaisīt lai rādās kas ir forumā, bet kā uztaisīt lai no foruma viņiem rādītos kategoriju krāsa vai arī kāda smuka bildīte jus man var pietaisīt klāt ši mskriptam lūdzu! Šis man ir about.php ielikts! <? $db=(object)array( 'host'=>'localhost', // Datubazes hosts 'user'=>'jzvac', // Datubazes lietotajs 'pass'=>'9969470', // Datubazes lietotaja parole 'name'=>'jzvac', // Datubazes nosaukums 'prefix'=>'ibf_members', // Bla, bla ); $cfg=(object)array( 'offset'=>5, // Minutes kops pedejas aktivitates ); @mysql_connect($db->host,$db->user,$db->pass)or die('Konekcija nospraga!'); @mysql_select_db($db->name)or die('Datubazi ieselektet neizdevas!'); $now=time(); $offset=$cfg->offset*200; $activity=$now-$offset; $sql="SELECT members_display_name FROM `".mysql_real_escape_string($db->prefix)."` WHERE last_activity>='".intval($activity)."' ORDER BY last_activity DESC"; $res=mysql_query($sql); if(mysql_num_rows($res)>0){ while($row=mysql_fetch_object($res)){ echo $row->members_display_name.'<br />'; } }else{ echo 'Ku ku Neviens nav fourma!'; } ?> Šis ir man pielikts pie index.php <?php include("about.php");?> Lūdzu sataisiet kā ir pareizi lai rādītos adminiem moderātorem un citiem atšķirīgas krāsas vai bildītes! Es tik māku html bet ja jūs dodat linku tāpat es vēl nemāku php valodu! šī izskatās grūtāka nekā html. lūdzu palīdziet būšu pateicīgs! :( Quote Link to comment Share on other sites More sharing options...
kechums Posted May 30, 2009 Report Share Posted May 30, 2009 (edited) while($row=mysql_fetch_object($res)){ if($row->lauks_kursh_atbild_par_lietotaju_grupam == "grupas_nr") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } else { echo $row->members_display_name.'<br />'; //parasts mirstiigais } } Tikai pie selekta vēl vajag izvilkt lauku, kurš atbild par lietotāju grupām. Edited May 30, 2009 by kechums Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted May 31, 2009 Author Report Share Posted May 31, 2009 a kur viņš jāliek un no kurienes jāvelk bet tā paldies par šo pašu! Quote Link to comment Share on other sites More sharing options...
kechums Posted May 31, 2009 Report Share Posted May 31, 2009 $sql="SELECT members_display_name, mgroup FROM `".mysql_real_escape_string($db->prefix)."` WHERE last_activity>='".intval($activity)."' ORDER BY last_activity DESC"; $res=mysql_query($sql); if(mysql_num_rows($res)>0){ while($row=mysql_fetch_object($res)){ if($row->mgroup == "grupas_nr") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } else { echo $row->members_display_name.'<br />'; //parasts mirstiigais } } } else { echo 'Ku ku Neviens nav fourma!'; } Ceru, ka grupas numuru pratīsi ielikt un apskatīties, kurš kurai grupai atbilst. Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted May 31, 2009 Author Report Share Posted May 31, 2009 $sql="SELECT members_display_name, mgroup FROM `".mysql_real_escape_string($db->prefix)."` WHERE last_activity>='".intval($activity)."' ORDER BY last_activity DESC"; $res=mysql_query($sql); if(mysql_num_rows($res)>0){ while($row=mysql_fetch_object($res)){ if($row->mgroup == "1") { echo '<font color="Purple">'.$row->members_display_name.'</font><br />'; //ipasnieks pienjemsim } else{ if($row->mgroup == "2") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } else{ if($row->mgroup == "3") { echo '<font color="blue">'.$row->members_display_name.'</font><br />'; //moderātors pienjemsim } else{ if($row->mgroup == "4") { echo '<font color="orange">'.$row->members_display_name.'</font><br />'; //VIP pienjemsim } else{ if($row->mgroup == "4") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } else { echo $row->members_display_name.'<br />'; //parasts mirstiigais } } } else { echo 'Ku ku Neviens nav fourma!'; } Šādi ten drīkst būt? Un ja jā kur man tas grupas ipb likt? tur būs tie cipari? Quote Link to comment Share on other sites More sharing options...
kechums Posted May 31, 2009 Report Share Posted May 31, 2009 $sql="SELECT members_display_name, mgroup FROM `".mysql_real_escape_string($db->prefix)."` WHERE last_activity>='".intval($activity)."' ORDER BY last_activity DESC"; $res=mysql_query($sql); if(mysql_num_rows($res)>0){ while($row=mysql_fetch_object($res)){ if($row->mgroup == "1") { echo '<font color="Purple">'.$row->members_display_name.'</font><br />'; //ipasnieks pienjemsim } if($row->mgroup == "2") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } if($row->mgroup == "3") { echo '<font color="blue">'.$row->members_display_name.'</font><br />'; //moderātors pienjemsim } if($row->mgroup == "4") { echo '<font color="orange">'.$row->members_display_name.'</font><br />'; //VIP pienjemsim } if($row->mgroup == "4") { echo '<font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim } if($row->mgroup == "lietotaaju_grupas_nr") { echo $row->members_display_name.'<br />'; //parasts mirstiigais } } } else { echo 'Ku ku Neviens nav fourma!'; } Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted May 31, 2009 Author Report Share Posted May 31, 2009 Vis strādā paldies bet viena problēma! man tagad rāda divus nikus! Snaip3Rs Snaup3Rs Bet IPB esmu tikai ROOT admin nu moderātors jāsaka a kur tās grupas var mainīt? Tas ir pēdējais jautājums! Jāsaka kādā failā jaglabā! Quote Link to comment Share on other sites More sharing options...
kechums Posted May 31, 2009 Report Share Posted May 31, 2009 Zem viena IF'a tev stāv vienādi cipari "4". Quote Link to comment Share on other sites More sharing options...
Puika1 Posted May 31, 2009 Report Share Posted May 31, 2009 ka var uztaisit kad uzpiez uz lietotaju parmet uz vina profilu? Quote Link to comment Share on other sites More sharing options...
kechums Posted May 31, 2009 Report Share Posted May 31, 2009 <a href="url">...</a> ? Quote Link to comment Share on other sites More sharing options...
Puika1 Posted May 31, 2009 Report Share Posted May 31, 2009 ka pielikt katram savu bildi? es liku šādi: echo '<img src='img/f_ico.gif' alt='face' /><font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim bet nestrada ir kadi ieteikumi? Quote Link to comment Share on other sites More sharing options...
alfinsh Posted May 31, 2009 Report Share Posted May 31, 2009 aizvar to font color un <img src="ikonas/blabla.gif"> Quote Link to comment Share on other sites More sharing options...
Puika1 Posted May 31, 2009 Report Share Posted May 31, 2009 (edited) es nesapratu šo aizvar a un ka tu teici laikam nestrada Edited May 31, 2009 by Puika1 Quote Link to comment Share on other sites More sharing options...
alfinsh Posted May 31, 2009 Report Share Posted May 31, 2009 viss strādā es pats tiko uzliku .. pareizi ieliec :) Quote Link to comment Share on other sites More sharing options...
Puika1 Posted May 31, 2009 Report Share Posted May 31, 2009 es iespējams izprastu ja tu pateiktu ko nozime aizvar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.