Who can help me to make this one work on lava script
got it out of wapside script
Code:
$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 ;
Comment