Pls! Check this recode! If correct,

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

21 replies · 1,125 views · started 16 years ago · 1 min read

2 participants
arg0s12 Developer · 144 posts #1

Hi, to all coder's, since all my posted bout converter not working, i'll try to convert the wml to xhtml, as a newbie in php, will anyone help me or tell me if have a wrong syntax in my edit code, here's the code: for wml came from kaboom, 5 chatpost = 1 plusses ($hmany)userchatpost/5 = plusses here my first mod in lava mod before ahehhe convert in xhtml ahehhe

echo "<a href="index.php?action=w3c&sid=$sid">c2p converter</a> ";

add in index.php

else if($action=="w3c") {

addonline(getuid_sid($sid),"wml - chatpost convert","");
echo "<card id=\"main\" title=\"CONVERTING\">";

echo "

";

echo "Convert 5 Chatpost to 1 Plusses choose chatpost. "; echo "choose: <select name="hmany">"; 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 "<option value="200">200</option>"; echo "<option value="300">300</option>";

arg0s12 Developer · 144 posts #2

echo "<option value="500">500</option>"; echo "<option value="1000">1000</option>"; echo "<option value="2000">2000</option>"; echo "<option value="5000">5000</option>"; echo "<option value="10000">10000</option>"; echo "</select>"; echo " <anchor>go"; echo "<go href="index.php?action=cptop&sid=$sid" method="post">"; echo "<postfield name="hmany" value="$(hmany)"/>"; echo "</go></anchor>"; echo "


"; echo " <a href="index.php?action=main&sid=$sid&browse?">"; echo "main menu</a> "; echo "<do type="chatroom" label="chatroom"><go href="index.php?action=chat&sid=$sid"/></do>"; echo "<do type="whos online" label="whos online"><go href="index.php?action=online&sid=$sid"/></do>"; echo "<do type="downloads" label="downloads"><go href="index.php?action=vault&sid=$sid"/></do>"; echo "<do type="article" label="article"><go href="articles.php?action=articles&sid=$sid"/></do>";

arg0s12 Developer · 144 posts #3

echo "<do type="kawap rpg" label="kawap rpg"><go href="rpg.php?action=main&sid=$sid"/></do>"; echo "<do type="forums" label="forum Index"><go href="forum.php?action=main&sid=$sid"/></do>"; echo "<do type="my setting" label="my setting"><go href="index.php?action=cpanel&sid=$sid"/></do>";

echo "

"; echo "</card>"; }

else if($action=="cptop") { $hmany = $_POST["hmany"]; addonline(getuid_sid($sid),"wml - chat post convert",""); echo "<card id="main" title="CONVERTING">";

echo "

"; echo "<do type="chatroom" label="chatroom"><go href="index.php?action=chat&sid=$sid"/></do>"; echo "<do type="whos online" label="whos online"><go href="index.php?action=online&sid=$sid"/></do>"; echo "<do type="forums" label="forum Index"><go href="forum.php?action=main&sid=$sid"/></do>


"; $noi = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); if($noi[0]>=$hmany)

arg0s12 Developer · 144 posts #4

{ echo "Converted Succesfully :)"; $convert = $hmany/5; mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$hmany' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'$convert' WHERE id='".$uid."'"); }else{ echo "You have insufficient Chatpost go to chat and flood 🙂!"; } echo "


"; echo "<a href="index.php?action=main&sid=$sid&browse?">"; echo "main menu</a>";

echo " "; echo "<do type="chatroom" label="chatroom"><go href="index.php?action=chat&sid=$sid"/></do>"; echo "<do type="whos online" label="whos online"><go href="index.php?action=online&sid=$sid"/></do>"; echo "<do type="downloads" label="downloads"><go href="index.php?action=vault&sid=$sid"/></do>"; echo "<do type="article" label="article"><go href="articles.php?action=articles&sid=$sid"/></do>"; echo "<do type="kawap rpg" label="kawap rpg"><go href="rpg.php?action=main&sid=$sid"/></do>";

arg0s12 Developer · 144 posts #5

echo "<do type="forums" label="forum Index"><go href="forum.php?action=main&sid=$sid"/></do>"; echo "<do type="my setting" label="my setting"><go href="index.php?action=cpanel&sid=$sid"/></do>"; echo " "; echo "</card>"; } sorry for posting, my phone have limit char. This is wml, and i convert in xhtml, pls. Check if correct, heres the code:

arg0s12 Developer · 144 posts #6

//////////////////////////C2p Converter

else if ($action=="w3c") {

addonline(getuid_sid($sid) "xhtml - chatpost convert",""); echo "<title>Plusses Converter</title>"; echo "

echo "Convert 5 chatpost to 1 plusses! Choose Plusses! "; echo "Choose: <form action="index.php?action=cptop&sid=$sid" method="post">"; echo "choose: <select name="hmany">"; 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 "<option value="200">200</option>"; echo "<option value="300">300</option>"; echo "<option value="500">500</option>"; echo "<option value="1000">1000</option>"; echo "<option value="2000">2000</option>"; echo "<option value="5000">5000</option>";

arg0s12 Developer · 144 posts #7

echo "<option value="10000">10000</option>"; echo "</select>"; echo "<input name="hmany" size="5" maxlength="5" format="*N"/>"; echo "<input type="submit" value="convert"/>"; echo "</form>";

echo " "; echo "<a href=\chat.php?action=chat&sid=$sid">Chatroom</a>"; echo "<a href="index.php?action=main&sid=$sid">Home</a>";

} else if ($action=="cptop") { $hmany = $_POST["hmany"] addonline(getuid_sid($sid), "xhtml - converter",""; echo "<title>Converter</title>

$noi = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); if($noi[0]>=$hmany) { echo "Converted Succesfully :)"; $convert = $hmany/5; mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$hmany' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_users SET plusses=plusses+'$convert' WHERE id='".$uid."'"); }else{ echo "You have insufficient Chatpost go to chat and flood 🙂!"; } echo "


";

huwad Developer · 215 posts #8

usage:

echo "<a href=\"c2p.php?action=c2p&sid=$sid\">Link Name</a><br/>";

hacking is like sex. you get in, you get out and you pray you left nothing behind.

Attachments: c2p.zip
arg0s12 Developer · 144 posts #9

echo "<a href="index.php?action=main&sid=$sid&browse?">"; echo "main menu</a>";

echo "

"; echo "</body>"; }

here's all the code, thanks, huwad, i'll try this, by the way, have your code for online stat, i have a code in core, but in profile, nothing, ,

huwad Developer · 215 posts #10

arg0s12 wrote: echo "<a href="index.php?action=main&sid=$sid&browse?">"; echo "main menu</a>";

echo "

"; echo "</body>"; }

here's all the code, thanks, huwad, i'll try this, by the way, have your code for online stat, i have a code in core, but in profile, nothing, ,

what do you mean?? please clarify??

hacking is like sex. you get in, you get out and you pray you left nothing behind.

arg0s12 Developer · 144 posts #11

O.K bro, i have code for 5 hours online stat, like pwap later, but my problem is what code that i put in users profile, e.g 5 hrs stat: 2 hrs, 39 mins, 50 sec.

arg0s12 Developer · 144 posts #12

Here's the code:

//////////////////////Function add user to online list 😛

function addonline($uid,$place,$plclink) { if($hidden[0]==0) { /////delete inactive users $tm = time(); $timeout = $tm - 420; //time out = 5 minutes $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'"); ///now try to add user to online list $lastactive2 = mysql_fetch_array(mysql_query("SELECT resetime FROM ibwf_users WHERE id='".$uid."'")); $tolsla2 = time() - $lastactive2[0]; $totaltimeonline2 = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'")); $totaltimeonline2 = $totaltimeonline2[0] + $tolsla2; $onlinetime = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'")); $num = $onlinetime[0]/86400; $days = intval($num); $num2 = ($num - $days)*24; $hours = intval($num2); $num3 = ($num2 - $hours)*60; $mins = intval($num3); $num4 = ($num3 - $mins)*60; $secs = intval($num4); if(!onlinetime($uid)) { if($hours==5) { $text =

arg0s12 Developer · 144 posts #13

"Congratulations you have reach the 5 hours online. You received 100 Plusses. Note: This is an automatic pm"; mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='332', touid='".$uid."', timesent='".time()."'"); $res = mysql_query("UPDATE ibwf_users SET plusses=plusses+100 WHERE id='".$uid."'"); $res = mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'"); $res = mysql_query("UPDATE ibwf_users SET onlinetime='0' WHERE id='".$uid."'"); $res = mysql_query("UPDATE ibwf_users SET onlinedone='0' WHERE id='".$uid."'"); } }

$ttime = time(); $res = mysql_query("UPDATE ibwf_users SET resetime='".$ttime."' WHERE id='".$uid."'");

$lastactive = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$uid."'")); $tolsla = time() - $lastactive[0]; $totaltimeonline = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'"));
$totaltimeonline = $totaltimeonline[0] + $tolsla;

arg0s12 Developer · 144 posts #14

$res = mysql_query("UPDATE ibwf_users SET onlinetime='".$totaltimeonline."' WHERE id='".$uid."'");

$res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$uid."'"); $res = mysql_query("UPDATE ibwf_users SET lastseen='".$place."' WHERE id='".$uid."'"); $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); if(!$res) { //most probably userid already in the online list //so just update the place and time $res = mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'");

} } $maxmem=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));

        $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));

      if($result[0]>=$maxmem[0])
      {
        $tnow = date("D d M Y - H:i");
arg0s12 Developer · 144 posts #15

mysql_query("UPDATE ibwf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='2'"); } $maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'")); if($maxtoday[0]==0||$maxtoday=="") { mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'"); $maxtoday[0]=1; } if($result[0]>=$maxtoday[0]) { mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'"); } } what code that i put in profile? Thanks bro!

huwad Developer · 215 posts #16

arg0s12 wrote: O.K bro, i have code for 5 hours online stat, like pwap later, but my problem is what code that i put in users profile, e.g 5 hrs stat: 2 hrs, 39 mins, 50 sec.

to index.php in $action=="viewuser"

  $noi = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
  $var1 = date("His",$noi[0]);
  $var2 = time();
  $var21 = date("His",$var2);
  $var3 = $var21 - $var1;
  $var4 = date("s",$var3);
  echo "Idle: ";
  $remain = time() - $noi[0];
  $idle = gettimemsg($remain);
  echo "$idle<br/>";

check this function in core.php

function gettimemsg($sec)
{
  $ds = floor($sec/60/60/24);
  if($ds > 0)
  {
    return "$ds days";
  }
  $hs = floor($sec/60/60);
  if($hs > 0)
  {
    return "$hs hours";
  }
  $ms = floor($sec/60);
  if($ms > 0)
  {
    return "$ms minutes";
  }
  return "$sec Seconds";
}

hacking is like sex. you get in, you get out and you pray you left nothing behind.

arg0s12 Developer · 144 posts #17

Thanks, bro, after a long time, your the only one who post this code, thanks, by the way, im visiting at zyclone, and thinking to use the script, a lot of stuff, ,

arg0s12 Developer · 144 posts #18

Not working bro? . . Only article's sql working to my script? Any idea?

huwad Developer · 215 posts #19

arg0s12 wrote: Not working bro? . . Only article's sql working to my script? Any idea?

i thought it was idle time,, uhhm.. try this.. 5hrs status..

  $totaltimeonline = mysql_fetch_array(mysql_query("SELECT onlinetime FROM [COLOR="Red"]tableprefix(ibwf)[/COLOR]_users WHERE id='".$who."'"));  
  $num = $totaltimeonline[0]/86400;
  $days = intval($num);
  $num2 = ($num - $days)*24;
  $hours = intval($num2);
  $num3 = ($num2 - $hours)*60;
  $mins = intval($num3);
  $num4 = ($num3 - $mins)*60;
  $secs = intval($num4);
  echo "5 hrs: ";
  if(($days==0) and ($hours==0) and ($mins==0))
  {
  echo $secs."s.<br/>";
  }else if(($days==0) and ($hours==0))
  {
  echo $mins."m, ";
  echo $secs."s.<br/>";
  }else if(($days==0))
  {
  echo $hours."h, ";
  echo $mins."m, ";
  echo $secs."s.<br/>";
  }else{
  echo $days."d, ";
  echo $hours."h, ";
  echo $mins."m, ";
  echo $secs."s.<br/>";
  }

hacking is like sex. you get in, you get out and you pray you left nothing behind.

arg0s12 Developer · 144 posts #20

the idle time alwys 0s ,,, ill try to fix..

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