has any one got the code for a rating system with a drop down box where u can rate from 1-10 for a wapdesire v2 script plz
rating system for wapdesire v2
Collapse
X
-
Originally posted by mzdesirez View Posthas any one got the code for a rating system with a drop down box where u can rate from 1-10 for a wapdesire v2 script plzLast edited by woody; 30.10.11, 06:14.
Comment
-
Here Ya Go, I Coded It For V2, Dont Forget To Say Thanks
* You Should Try Coding For V2, Just Take It From LAVA And Change The echo to $main.
You Wont Learn Unless Ya Try, Ya Cant Keep Beggin!!!
Make A file And Name It rating.php
PHP Code:
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
///////////////////
else if($action=="rate")
{
$rate= mysql_real_escape_string( $_REQUEST["rate"] );
$bid = mysql_real_escape_string( $_REQUEST["bid"] );
$who = mysql_real_escape_string( $_REQUEST["who"] );
$whnick = getnick_uid($who);
addonline(getuid_sid($sid),"Rating $whnick","rating.php?action=rate&who=$who");
addonline(getuid_sid($sid),"Viewing $nick Profile","");
echo head_tag(getnick_sid($sid)."@View Profile",1,getnick_sid($sid));
//$uid = getuid_sid($sid);
if ($uid==$who)
{
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
$main.="You Cant Rate Yourself You Daft Pervert lol<br/>";
$main.="<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
exit();
}
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
// Let's see how many is there count it up
$addplus = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
// Let's add the rate + so the rate add's to the data
// replace rate with ccreate
$add = $rate;
$addplus = $add + $addplus[0];
// Ok.... done Lets send the query!!
//$res = mysql_query("UPDATE users SET rate= '".$addplus."',ratecount = ( ratecount +1 ) WHERE id='".$who."'");
$res = mysql_query("UPDATE users SET rate= '".$addplus."' WHERE id='".$who."'");
// query has being sent to mysql Job done!
if($res)
{
mysql_query("UPDATE users SET rateuser= $who WHERE id='".$uid."'");
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/>".getnick_uid($who)." Rated Successfully You Daft Pervert lol<br/>";
}
$main.="";
$L1="$sixkey<a $key6 href=\"./profile.php?who=$who&sid=$sid\">Back</a>";
$L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
else if($action=="rate2")
{
$rate= $_REQUEST["rate"];
$who = mysql_real_escape_string( $_REQUEST["who"] );
addonline(getuid_sid($sid),"Rating a member","");
if ($uid==$who)
{
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
$main.="You Cant Rate Yourself Silly<br/>";
$main.="</p></body></html>";
exit();
}
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
// Let's see how many is there count it up
$addplus = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
// Let's add the rate + so the rate add's to the data
// replace rate with ccreate
$add = $rate;
$addplus = $add + $addplus[0];
// Ok.... done Lets send the query!!
$res = mysql_query("UPDATE users SET rate= '".$addplus."',ratecount = ( ratecount +1 ) WHERE id='".$who."'");
//$res = mysql_query("UPDATE users SET rate= '".$addplus."' WHERE id='".$who."'");
// query has being sent to mysql Job done!
if($res)
{
mysql_query("UPDATE users SET rateuser= $who WHERE id='".$uid."'");
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";
}else {
$main.="<img src=\"../images/notok.gif\" alt=\"x\"/>You have rated this user before<br/>";
}
$L1="$sixkey<a $key6 href=\"./profile.php?who=$who&sid=$sid\">Back</a>";
$L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
PHP Code:
$rate = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
$main.="<b>Rating:</b> $rate[0]<br/>";
$who = mysql_real_escape_string( $_REQUEST["who"] );
$main.="<form action=\"rating.php?action=rate&sid=$sid&who=$who\" method=\"post\"><p align=\"center\">";
$main.="<select name=\"rate\">";
$main.="<option value=\"1\">1</option>";
$main.="<option value=\"2\">2</option>";
$main.="<option value=\"3\">3</option>";
$main.="<option value=\"4\">4</option>";
$main.="<option value=\"5\">5</option>";
$main.="<option value=\"6\">6</option>";
$main.="<option value=\"7\">7</option>";
$main.="<option value=\"8\">8</option>";
$main.="<option value=\"9\">9</option>";
$main.="<option value=\"10\">10</option>";
$main.="</select>";
$main.="<input type=\"Submit\" Name=\"Rate\" Value=\"Rate\"></form>";
$main.="<p align=\"center\">";
Comment
-
Here Ya Are. Dont Forget To Say Thanks!
**Try Code SomeThing Yourself & Post What Uve Made And You'll Get Help
In Profile.php Add This:
PHP Code:$rate = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
$main.="<b>Rating:</b> $rate[0]<br/>";
$who = mysql_real_escape_string( $_REQUEST["who"] );
$main.="<form action=\"rating.php?action=rate&sid=$sid&who=$who\" method=\"post\"><p align=\"center\">";
$main.="<select name=\"rate\">";
$main.="<option value=\"1\">1</option>";
$main.="<option value=\"2\">2</option>";
$main.="<option value=\"3\">3</option>";
$main.="<option value=\"4\">4</option>";
$main.="<option value=\"5\">5</option>";
$main.="<option value=\"6\">6</option>";
$main.="<option value=\"7\">7</option>";
$main.="<option value=\"8\">8</option>";
$main.="<option value=\"9\">9</option>";
$main.="<option value=\"10\">10</option>";
$main.="</select>";
$main.="<input type=\"Submit\" Name=\"Rate\" Value=\"Rate\"></form>";
$main.="<p align=\"center\">";
PHP Code:<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
///////////////////
else if($action=="rate")
{
$rate= mysql_real_escape_string( $_REQUEST["rate"] );
$bid = mysql_real_escape_string( $_REQUEST["bid"] );
$who = mysql_real_escape_string( $_REQUEST["who"] );
$whnick = getnick_uid($who);
addonline(getuid_sid($sid),"Rating $whnick","rating.php?action=rate&who=$who");
addonline(getuid_sid($sid),"Viewing $nick Profile","");
echo head_tag(getnick_sid($sid)."@View Profile",1,getnick_sid($sid));
//$uid = getuid_sid($sid);
if ($uid==$who)
{
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
$main.="You Cant Rate Yourself You Daft Pervert lol<br/>";
$main.="<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
exit();
}
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
// Let's see how many is there count it up
$addplus = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
// Let's add the rate + so the rate add's to the data
// replace rate with ccreate
$add = $rate;
$addplus = $add + $addplus[0];
// Ok.... done Lets send the query!!
//$res = mysql_query("UPDATE users SET rate= '".$addplus."',ratecount = ( ratecount +1 ) WHERE id='".$who."'");
$res = mysql_query("UPDATE users SET rate= '".$addplus."' WHERE id='".$who."'");
// query has being sent to mysql Job done!
if($res)
{
mysql_query("UPDATE users SET rateuser= $who WHERE id='".$uid."'");
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/>".getnick_uid($who)." Rated Successfully You Daft Pervert lol<br/>";
}
$main.="";
$L1="$sixkey<a $key6 href=\"./profile.php?who=$who&sid=$sid\">Back</a>";
$L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
else if($action=="rate2")
{
$rate= $_REQUEST["rate"];
$who = mysql_real_escape_string( $_REQUEST["who"] );
addonline(getuid_sid($sid),"Rating a member","");
if ($uid==$who)
{
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
$main.="You Cant Rate Yourself Silly<br/>";
$main.="</p></body></html>";
exit();
}
$main.="<head>";
$main.="<title>$sitename</title>";
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="</head>";
$main.="<body>";
$main.="<p align=\"center\">";
// Let's see how many is there count it up
$addplus = mysql_fetch_array(mysql_query("SELECT rate FROM users WHERE id='".$who."'"));
// Let's add the rate + so the rate add's to the data
// replace rate with ccreate
$add = $rate;
$addplus = $add + $addplus[0];
// Ok.... done Lets send the query!!
$res = mysql_query("UPDATE users SET rate= '".$addplus."',ratecount = ( ratecount +1 ) WHERE id='".$who."'");
//$res = mysql_query("UPDATE users SET rate= '".$addplus."' WHERE id='".$who."'");
// query has being sent to mysql Job done!
if($res)
{
mysql_query("UPDATE users SET rateuser= $who WHERE id='".$uid."'");
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";
}else {
$main.="<img src=\"../images/notok.gif\" alt=\"x\"/>You have rated this user before<br/>";
}
$L1="$sixkey<a $key6 href=\"./profile.php?who=$who&sid=$sid\">Back</a>";
$L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
There Ya Are, 100 percent working, next time try re-code a lava version into v2 like ive done
Comment
-
Originally posted by mzdesirez View Posti dont beg i just ask, i was told that if u dont ask u dont get lol so thats what i do i ask for thingsI need some facebook likes, can you please help me
http://facebook.com/softwarefreakin
I noticed social media is really powerful
Well DONE is better than well SAID
Comment
-
Originally posted by mzdesirez View Postwell if i knew the answer then id give it loli was told that if u dont ask u dont getI need some facebook likes, can you please help me
http://facebook.com/softwarefreakin
I noticed social media is really powerful
Well DONE is better than well SAID
Comment
-
Originally posted by carebear View Postsoftwarefreak she dosent like helping or sharing things n what she dose have on her site its not her work.. or she hasnt had a go..
Ok, don't fight
Sharing is caring!I need some facebook likes, can you please help me
http://facebook.com/softwarefreakin
I noticed social media is really powerful
Well DONE is better than well SAID
Comment
Comment