here are the code where u can see if your yahoo friends are online
u can put this in yahoo.php file or just on the index
usage
and core
sql
Lol now i hope u guys can share sumthing nice with me too
and dont forget to say tanx
u can put this in yahoo.php file or just on the index
Code:
else if($action=="yahoo") { $whonick = getnick_uid($who); $who = $_GET["who"]; addonline(getuid_sid($sid),"Yahoo Id","index.php?action=$action"); $uid = getuid_sid($sid); //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yahoo")); $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; $sql = "SELECT id, uid, adresa, descriere FROM yahoo ORDER by id DESC LIMIT $limit_start, $items_per_page"; echo "<p align=\"center\">"; // alerte $uid = getuid_sid($sid); echo "<a href=\"index.php?action=adaugayahoo&sid=$sid\">(Add Yahoo Id)</a><br/>"; echo "<p>"; echo "<p align=\"left\">"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $descriere = parsepm($item[3], $sid); $bonick = getnick_uid($item[1]); $byview = ">->By: <a href=\"index.php?action=viewuser&sid=$sid&who=$item[1]\">".getsimbol($item[1])."$bonick</a>"; if(candelbl($uid,$item[0])) { $dl = "|<a href=\"index.php?action=delbl&sid=$sid&bid=$item[0]\">[X]</a>"; }else{ $dl = ""; } echo "<table><tr><td><a href=\"http://img.msg.yahoo.com/avatar.php?yids=$item[2]\"><img src=\"http://img.msg.yahoo.com/avatar.php?yids=$item[2]\" alt=\"avatar\" class=\"thumb\"/></a></td> <td class=\"vInfo\"> <img src=\"http://mail.opi.yahoo.com/online?u=$item[2]&m=g&t=0\" alt=\"\" height=\"12\" width=\"12\"/> <small><b><font color=\"#88CC00\">$item[2]</font></b>$byview</small> <br/> <small>$descriere</small>$dl </td></tr></table>"; // echo "$lnk"; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"index.php?action=$action&page=$ppage&sid=$sid&view=$view\">«Back</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo "<br/>$page/$num_pages<br/>"; if($num_pages>2) { $rets = "<form action=\"index.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>"; $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>"; $rets .= "<input type=\"submit\" value=\"Go to page\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>"; ////// UNTILL HERE >> echo "<p align=\"center\">"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; } else if($action=="adaugayahoo") { addvisitor(); addonline(getuid_sid($sid),"Add Yahoo Id","index.php?action=$action"); echo "<p align=\"center\">"; if(getplusses(getuid_sid($sid))<75) { echo "You must have 75 credits you can add an id!"; }else{ // alerte $uid = getuid_sid($sid); echo "<form action=\"index.php?action=aadaugayahoo&sid=$sid\" method=\"post\">"; echo "Id yahoo:<input name=\"adresa\" maxlength=\"30\"/><br/>"; echo "Description:<input name=\"descriere\" maxlength=\"10000\"/><br/>"; echo "<input type=\"submit\" value=\"Add\"/>"; echo "</form><br/>"; } echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; } else if($action=="delbl") { $bid = $_GET["bid"]; addonline(getuid_sid($sid),"delete id",""); echo "<p align=\"center\">"; if(candelmd(getuid_sid($sid), $bid)) { $res = mysql_query("DELETE FROM yahoo WHERE id='".$bid."'"); if($res) { echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>Id Deleted<br/>"; }else{ echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error!<br/>"; } }else{ echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>You can remove this meditation"; } echo "<br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; } else if($action=="aadaugayahoo") { $adresa = $_POST["adresa"]; $descriere = $_POST["descriere"]; //$qut = $_POST["qut"]; addonline(getuid_sid($sid),"Maximum add",""); echo "<p align=\"center\">"; $crdate = time(); //$uid = getuid_sid($sid); $res = false; if((trim($descriere)!="")&&(trim($adresa)!="")) { $res = mysql_query("INSERT INTO yahoo SET uid='".$uid."', adresa='".$adresa."', descriere='".$descriere."'"); } if($res) { echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"O\"/>Id Added"; }else{ echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>Error !!!"; } echo "<br/><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; }
Code:
$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM yahoo")); echo "<a href=\"index.php?action=yahoo&sid=$sid\">»Yahoo Id($noi[0])</a><br/>";
Code:
/////////////////////////////// function getsimbol($uid) { $info= mysql_fetch_array(mysql_query("SELECT perm, plusses FROM ibwf_users WHERE id='".$uid."'")); if(isbanned($uid)) { return "(x)"; } if($info[0]=='4') { return "©"; }else if($info[0]=='3') { return "¹"; }else if($info[0]=='2') { return "²"; }else if($info[0]=='1') { return "³"; }else{ if($info[1]<10) { return "."; }else if($info[1]<50) { return "+"; }else if($info[1]<125) { return "*"; }else if($info[1]<500) { return "ª"; }else if($info[1]<4000) { return "±"; }else if($info[1]<6000) { return "§"; }else if($info[1]<10000) { return ":D"; }else { return "¤"; } } } ////////////////////////////////////////////////////////// function candelmd($uid,$bid) { $minfo = mysql_fetch_array(mysql_query("SELECT bowner FROM lirmeditatii WHERE id='".$bid."'")); if(ismod($uid)) { return true; } if($minfo[0]==$uid) { return true; } return false; }
Code:
-- -- Table structure for table `yahoo` -- CREATE TABLE IF NOT EXISTS `yahoo` ( `id` int(100) NOT NULL auto_increment, `uid` int(100) NOT NULL default '0', `adresa` varchar(100) NOT NULL default '', `descriere` varchar(150) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; -- -- Dumping data for table `yahoo` -- -- Table structure for table `lirmeditatii` -- CREATE TABLE IF NOT EXISTS `lirmeditatii` ( `id` int(100) NOT NULL auto_increment, `bowner` int(100) NOT NULL default '0', `bname` varchar(30) NOT NULL default '', `btext` blob NOT NULL, `bgdate` int(100) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `bname` (`bname`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Dumping data for table `lirmeditatii` --
and dont forget to say tanx
Comment