core.php
Code:
function getpmood($uid)
{
$pmood = mysql_fetch_array(mysql_query("SELECT pmood FROM ibwf_users WHERE id='".$uid."'"));
return $pmood[0];
}
use as
Code:
echo "<a href=\"lists.php?action=pmoods&sid=$sid\">»Profile Moods</a><br/>";
Code:
$pmoodlink = getpmood($who);
if($pmoodlink=="")
{
echo "";
}else{
echo "<img src=\"$pmoodlink\" alt=\"$whonick\"/><br/>";
}
Code:
//////////////////////////////////////////Select Profile Moods
else if($action=="uppmoods")
{
/*
Profile Moods Lavalair Modification
Editor:opticalpigion
forum.wapfuns.com
*/
addonline(getuid_sid($sid),"Updating Profile Moods","");
$pmoodid = $_GET["pmoodid"];
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$pmoodlnk = mysql_fetch_array(mysql_query("SELECT pmoodlink FROM ibwf_profilemood WHERE id='".$pmoodid."'"));
$res = mysql_query("UPDATE ibwf_users SET pmood='".$pmoodlnk[0]."' WHERE id='".$uid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Profile Mood Selected<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
echo "<br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
echo"Script By:opticalpigion";
}
Code:
//////////////////////////////////Profile Moods
else if($action=="pmoods")
{
/*
Profile Moods Lavalair Modification
Editor:opticalpigion
forum.wapfuns.com
*/
addonline(getuid_sid($sid),"Viwing The Profile Moods List","");
echo "<head>";
echo "<title>Profile Moods List</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_profilemood"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT id, pmoodlink FROM ibwf_profilemood ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
echo "<img src=\"$item[1]\" width=\"119\" height=\"30\" alt=\"Profile Moods\"/><br/>";
echo "<a href=\"genproc.php?action=uppmoods&sid=$sid&pmoodid=$item[0]\">SELECT</a><br/>";
echo "<br/>";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=pmoods&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"lists.php?action=pmoods&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"lists.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=\"submit\" value=\"Go To Page\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
echo"Script By:opticalpigion";
}
Code:
CREATE TABLE `ibwf_profilemood` ( `id` int(10) NOT NULL auto_increment, `pmoodlink` varchar(150) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `pmoodlink` (`pmoodlink`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=235; -- -- Dumping data for table `ibwf_profilemood` -- INSERT INTO `ibwf_profilemood` VALUES (1, '../profilemoods/0carefree.gif'); INSERT INTO `ibwf_profilemood` VALUES (2, '../profilemoods/0euphoric.gif'); INSERT INTO `ibwf_profilemood` VALUES (3, '../profilemoods/0excited0.gif'); INSERT INTO `ibwf_profilemood` VALUES (4, '../profilemoods/0flirty.gif'); INSERT INTO `ibwf_profilemood` VALUES (5, '../profilemoods/0happy.gif');
Code:
pmood varchar(100) latin1_swedish_ci No
make new directory with name"profilemoods" into root
u have to insert image in to sql ur self.
uploading images was not working here
so i have upload to mediafire.
file name is methos profile moods.rar and my profile moods.rar






























Leave a comment: