Award system

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

5 replies · 510 views · started 17 years ago · 2 min read

4 participants
riderz Lead · 975 posts #1

Who can help me to make this one work on lava script

$totaw = wsd_query("* WSIN ".WS_AWARDS." WSIS uid='$proid'","c");

////////////////////////////////

if($wsm=="addaward2"){
ws_admincheck();
$color = ws_get_var("color");
$message   = ws_get_var("message");
$now   = time();
$who   = ws_get_var("who");
$personuid = ws_idfromuser($who);

$a = wsd_query("".WS_AWARDS." (uid,award,note,datestamp) VALUES ('$personuid','$color','$message','$now')","i");
if($a){
$message = "Your award has been added!";
}else{
$message = "Error: your award has not been added try again!";
}
$button = "<a href=\"".$self."".$mode."admin2k\">Admin Zone</a><br/>";
$what = Array("message","button");
$with = Array($message,$button);
ws_temp("ws_msg");
}

/////////////////////////////////////

if($totaw >  0){
$profileinfo .= "Awards: <a href=\"".$self."".$mode."awards&proid=".$proid."\">".$totaw."</a><br/>";
}
///////////////////////////////////////

if($wsm=="awards"){
$listname = "Awards";
$mypage = ws_get_var("page");
$page = ws_page($mypage);
$proid = ws_get_var("proid");
$awards = "";
$limit = 10;
$start = ($page - 1) * $limit;

if(empty($proid)){
$awardsql = wsd_query("* WSIN ".WS_AWARDS." LIMIT $start, $limit","n");
} else {
$awardsql = wsd_query("* WSIN ".WS_AWARDS." WSIS uid='$proid' LIMIT $start, $limit","n");
}

if(empty($proid)){
$total = wsd_query("* WSIN ".WS_AWARDS."","c");
} else {
$total = wsd_query("* WSIN ".WS_AWARDS." WHERE uid='$proid'","c");
}
if(!empty($total)){
while($row = mysql_fetch_array($awardsql)){

if($settvar[0]=="1"){
$awards .= "</p><p align=\"center\"><img src=\"http://coding-talk.com/images/".$row["award"].".png\" alt=\"".$row["award"]."\"/></p><p>";
} else {
$awards .= "<center><img src=\"http://coding-talk.com/images/".$row["award"].".png\" alt=\"".$row["award"]."\"/></center>";
}

$awards .= ws_prolink($row["uid"],ws_userfromid($row["uid"]))."<br/>";
$awards .= $row["note"]."<br/>"; 
$awards .= date("(g:i) D, d  y",$row["datestamp"]);
$awards .= "<br/><br/>";

}
} else {

if(empty($proid)){
$awards .= "No Awards have been given yet<br/>";
}else{
$awards .= "This Member has no awards<br/>";
}
}

if(!empty($proid)){
$mybutton = "<a href=\"".$self."".$mode."profile&proid=".$proid."\">Back to profile</a><br/>";
}
$tots = $limit * $page;
$nav = ws_nav();
$what = Array("online","nav","mybutton","listname");
$with = Array($awards,$nav,$mybutton,$listname);
ws_temp("ws_list"); 
}

//////////////////////////////////////////////////

$a = wsd_delete("".WS_AWARDS." WSIS uid='$proid'");

/////////////////////////////////////////////////

CREATE TABLE IF NOT EXISTS `wst_awards` (
  `id` int(255) NOT NULL auto_increment,
  `uid` varchar(1000) NOT NULL,
  `award` varchar(1000) NOT NULL,
  `note` varchar(1000) NOT NULL,
  `datestamp` varchar(1000) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

got it out of wapside script


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

something else Fellow · 2,296 posts #2

with all those functions you might aswell start from fresh and code your own :P* btw some of that code is missing 😛

morse Senior · 364 posts #3

Instead of filing up the site with so many addons its better your first correct the addons you already have, coz the day you figure out that everything has become upside down, it will be too much of work.. As something_else said.. the code is partial

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

riderz Lead · 975 posts #5

well this code should be able when u have competitions u can award the person with a blue red yellow etc ribbon or anything u want like when the person wrote the best poem or most active user u give them the Award


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

something else Fellow · 2,296 posts #6

just modify avatar script saves messing around (but dont give user option to change)

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close