Hello, If anyone can plesase code here a sample for lavalair plssues converter that can conert Chat posts to Plusses... Please try on it.
Lavalair Plusses Converter
Collapse
X
-
This code below is probably the one that you are using right?
this code in found in chat.php not far down so you gotta search for it.
Here is the code that you have which updates the user's chat post.
Code:$hehe=mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); $totl = $hehe[0]+1; $msgst= mysql_query("UPDATE ibwf_users SET chmsgs='".$totl."' WHERE id='".$uid."'");
Code:$upls = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); $upls = $upls[0]+1; mysql_query("UPDATE ibwf_users SET plusses='".$upls."' WHERE id='".$uid."'");
-
This one's my own codings of chatposts to plusses converter..I took 1 day to finish this..Lol..SorRy, i'm just a beginner and only a learner..Not a pro.!All erRors and bugs in my site are fixeD by me..Coz no one's solved my pr0blems that i p0sted here..
Code:
PHP Code:<?php
include("config.php");
include("core.php");
header("Cache-Control: no-cache, must-revalidate"); //Prevent caching, HTTP/1.1
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml');
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
$uid = $_GET['uid'];
$pwd = $_GET['pwd'];
$bcon = connectdb();
if (!$bcon)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/default_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div class=\"online\"><img src=\"../images/notok.gif\" alt=\"x\"/>Error!!!</div><div class=\"text\">cannot connect to database</div>";
echo "<div class=\"text\">This error usually happens when backing up the database. Please be patient and try again later.</div><div class=\"online\">Thank you very much!!!";
echo "</div>";
echo "</body>";
echo "</html>";
exit();
}
$brws = explode("/",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<head>";
echo "<title>IP Blocked!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/default_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div class=\"online\"><img src=\"../images/point.gif\" alt=\"!\"/> This IP Address is Blocked!!!</div>";
echo "<div class=\"text\">However, we grant shield against IP-Ban for our great users. You can try to see if you are shielded by trying to login again. If you keep coming to this page, that means you are not shielded. So, just come back when the ip-ban period is over. Thank you!!!</div>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
$remain = $banto[0] - time();
$rmsg = gettimemsg($remain);
echo "<div class=\"online\"><b>Time Left: </b>$rmsg</div>";
echo "<div><img src=\"/images/logo.gif\" alt=\"..LOGO..\"/><br/>";
echo "Today is ".date("F n, Y")."<br/>".date("l, g:i:s a")."</div>";
echo "<div class=\"online\">Welcome to the UnderGroundWAP Community!</div><div class=\"text\">Enjoy variety of our great features here like forums, chatrooms, clubs, blogs, polls, downloads and many more. =)</div>";
echo "<div class=\"text\">Seems good? <a href=\"index.php?action=terms\">Join now!</a></div>";
echo "<div class=\"input\">";
echo "<form action=\"login.php\" method=\"get\">Username:<br/><input name=\"loguid\" style=\"-wap-input-format: '*x'\" size=\"15\" maxlength=\"15\"/><br/>";
echo "Password:<br/><input type=\"password\" name=\"logpwd\" size=\"15\" maxlength=\"15\"/><br/>";
echo "<input type=\"submit\" value=\"+ LOGIN +\"></form>";
echo "</div>";
echo "<div class=\"online\">";
$onu = getnumonline();
echo "$onu Members Inside";
echo "</div>";
echo "<div class=\"text\"><a href=\"/wap/index.php\">WML Version</a></div>";
echo "<div>Copyright © 2008-2009<br/>UnderGroundWAP Community</div>";
echo "</body>";
echo "</html>";
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<head>";
echo "<title>Session Expired!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/default_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div class=\"online\">";
echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>Session Expired!!!</div>";
echo "<div class=\"input\">";
echo "<form action=\"login.php\" method=\"get\">Username:<br/><input name=\"loguid\" style=\"-wap-input-format: '*x'\" size=\"15\" maxlength=\"15\"/><br/>";
echo "Password:<br/><input type=\"password\" name=\"logpwd\" size=\"15\" maxlength=\"15\"/><br/>";
echo "<input type=\"submit\" value=\"+ LOGIN +\"></form>";
echo "</div>";
echo "</body>";
echo "</html>";
exit();
}
}
echo isbanned($uid);
if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/default_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div class=\"online\"><img src=\"../images/point.gif\" alt=\"!\"/>You Are Banned!!!</div>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "<div class=\"text\"><b>Time Left: </b>$rmsg<br/>";
$nick = getnick_uid($banto[2]);
echo "<b>By: </b>$nick<br/>";
echo "<b>Reason: </b>$banto[1]</div>";
echo "<p align=\"center\">";
echo "<a href=\"index.php\"><img src=\"../images/home.gif\" alt=\"\"/>Main Page</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
if($action=="c2pconverter")
{
addonline(getuid_sid($sid),"C2P Converter","");
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$plusses = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "You currently have $chatpost[0] ChatPosts and $plusses[0] Plusses<br/>";echo "5 ChatPosts = 1 Plus<br/>";
echo "Select number of ChatPosts you want to convert</br>";
echo "<form action=\"convert.php?action=convert&sid=$sid\" method=\"post\">";
echo " <select name=\"cp\">";
echo "<option value=\"5\">5</option>";
echo "<option value=\"20\">20</option>";
echo "<option value=\"80\">80</option>";
echo "<option value=\"100\">100</option>";
echo "</select><br/>";
echo "<input type=\"submit\" value=\"convert\"/>";
echo "</form>";
echo "---";
echo "<br/>";
echo "| <a href=\"inbox.php?action=main&sid=$sid\">Inbox</a> |";
echo " <a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a> |";
echo " <a href=\"index.php?action=chat&sid=$sid\">Chatrooms</a> |";
echo " <a href=\"index.php?action=forumindx&sid=$sid\">Forums</a> |";
echo " <a href=\"index.php?action=main&sid=$sid\">Home</a> |";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
else if($action=="convert")
{
addonline(getuid_sid($sid),"Converting ChatPosts to Plusses","");
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<center>";
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$cp = $_POST["cp"];
if($chatpost[0] >= $cp)
{
if($cp=="5")
{
echo "$cp was deducted to your ChatPosts<br/>";
echo "1 was added to your Plusses<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid&sid=$sid\">View My Statistics</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'1' WHERE id='".$uid."'");
}
else if($cp=="20")
{
echo "$cp was deducted to your ChatPosts<br/>";
echo "4 was added to your Plusses<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid&sid=$sid\">View My Statistics</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'4' WHERE id='".$uid."'");
}
else if($cp=="80")
{
echo "$cp was deducted to your ChatPosts<br/>";
echo "16 was added to your Plusses<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid&sid=$sid\">View My Statistics</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'16' WHERE id='".$uid."'");
}
else if($cp=="100")
{
echo "$cp was deducted to your ChatPosts<br/>";
echo "20 was added to your Plusses<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid&sid=$sid\">View My Statistics</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'20' WHERE id='".$uid."'");
}
}else{
echo "Insufficient ChatPost!!!";
}
echo "</center>";
echo "<center>";
echo "<a href=\"convert.php?action=c2pconverter&sid=$sid\">Back</a><br/>";
echo "---";
echo "<br/>";
echo "| <a href=\"inbox.php?action=main&sid=$sid\">Inbox</a> |";
echo " <a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a> |";
echo " <a href=\"index.php?action=chat&sid=$sid\">Chatrooms</a> |";
echo " <a href=\"index.php?action=forumindx&sid=$sid\">Forums</a> |";
echo " <a href=\"index.php?action=main&sid=$sid\">Home</a> |";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
?>Last edited by metulj; 03.05.09, 10:52. Reason: use [ code ] ... [ / code ] or [ php ] ... [ / php ] tag for posting codesMy Blog: http://jhommark.blogspot.com
My Facebook: http://www.facebook.com/jhommark
My Official Site: http://www.undergroundweb.tk
My Community Site: http://undergroundwap.xtreemhost.com
Comment
-
Place it to file convert.php
And this is the link to c2p converter
PHP Code:echo "<a href=\"../convert.php?action=c2pconverter&sid=$sid\">C2P Converter</a>";
Last edited by kiLLeR-eyEd_14; 03.05.09, 12:53.My Blog: http://jhommark.blogspot.com
My Facebook: http://www.facebook.com/jhommark
My Official Site: http://www.undergroundweb.tk
My Community Site: http://undergroundwap.xtreemhost.com
Comment
-
Yeh..It's 100% w0rking..No erRor..Originally script c0ded by me..Last edited by metulj; 03.05.09, 13:14.My Blog: http://jhommark.blogspot.com
My Facebook: http://www.facebook.com/jhommark
My Official Site: http://www.undergroundweb.tk
My Community Site: http://undergroundwap.xtreemhost.com
Comment
Comment