Jump to content
php.lv forumi

ipb ko dara problēma!


Snaip3Rs

Recommended Posts

<?
 $db=(object)array(
   'host'=>'xxxxxxxxxx', // Datubazes hosts
   'user'=>'xxxxxxxxxxx', // Datubazes lietotajs
   'pass'=>'xxxxxxxx', // Datubazes lietotaja parole
   'name'=>'xxxxxxxxxxx', // 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, 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 '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif" /><font color="blue">'.$row->members_display_name.'</font><br />'; //admins pienjemsim
   }
   if($row->mgroup == "3") {
    echo '<img src="http://bildites.lv/images/9ehe1hyp6efjgwn64bd.gif" /><font color="black">'.$row->members_display_name.'</font><br />'; //VIP pienjemsim
   }
   if($row->mgroup == "4") {
    echo '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif" /><font color="red">'.$row->members_display_name.'</font><br />'; //moderators pienjemsim
   }
   if($row->mgroup == "5") {
    echo '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif" /><font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim
   }
   if($row->mgroup == "6") {
    echo '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif" /><font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim
   }
   if($row->mgroup == "7") {
    echo '<img src="http://bildites.lv/images/9ehe1hyp6efjgwn64bd.gif" /><font color="purple">'.$row->members_display_name.'</font><br />'; //Ipasnieks pienjemsim
   }
   if($row->mgroup == "8") {
    echo '<img src="http://bildites.lv/images/9ehe1hyp6efjgwn64bd.gif" /><font color="red">'.$row->members_display_name.'</font><br />'; //admins pienjemsim
   }
   if($row->mgroup == "9") {
    echo '<img src="http://bildites.lv/images/9ehe1hyp6efjgwn64bd.gif" /><font color="orange">'.$row->members_display_name.'</font><br />'; //admins pienjemsim
   }
   if($row->mgroup == "lietotaaju_grupas_nr") {
    echo $row->members_display_name.'<br />'; //parasts mirstiigais
   }
  }
 }
 else {
  echo 'Neviens nav fourma!';
 }
?>

 

Lūdzu pasaktiet kas jaliek lai rādītos kur katrs atrodās un ja ir gvests tad arī viņa ip varda vieta un arī atrašanās vieta! būšu pateicīgs ja kādam ir kautkas aizķēries tamlīdzīgs!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...