LavaSCRIPT L9 Tamagochi, smile generator

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

65 replies · 9,023 views · started 17 years ago · 6 min read

TL;DR · summary of 65 replies
  • kabooms forgot to upload ip_files/ folder which caused warnings and errors.
  • wapmaster2 encountered issues with IP address country detection and needed help locating the missing files.
  • The error was resolved by creating a flag file named "unknown.png" or "unknown.gif" in the flag folder, as suggested by kabooms.
  • kei_ki7 faced an issue with the cleardata() function not being properly closed, which was fixed by adding a closing brace at line 5 of their code.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

26 participants
kabooms Developer · 80 posts #23

Ahe welcome al,l n0w i work for lava in my off line server editing full script and sql will be edit and add some function like (int)

$who = (int) $_GET["who"];  

to avoid Test sql inject in index.php?action=viewuser&sid=$sid&who=1 Test injection index.php?action=viewuser&sid=$sid&who=1 OR 2 now in $who = (int) $_GET["who"]; and other one in sql statement .intval($uid). Sql query ahehe.. My problem is the Cookies i dont kn0w how to create cookies in login.php i hope somebody will post tutorial in how to create cookies ahehe..

friend Developer · 112 posts #26

any example abt joses script?

Thanks in advance

arg0s12 Developer · 144 posts #27

Hello again everyone! Will anyone have an sql of chapel? Coz, when im trying to put the link of chapel.php in my mainpage, then when im trying to click the link, blank page appear, help me pls. Thanks in advance,

wapmetal Lead · 609 posts #28

add @ the top of yah page

<?php
    session_start();

    if (isset($_SESSION['xuser_id']))
     {
        $xuser_id=$_SESSION['xuser_id'];
     }
    else 
     {
        $xuser_id=False;
     }

    $sid=session_id();
?>

////////////////////
usage in page to place the cookie 

if ($xuser_id) {
        
////true

        }
    else {
       ////// false
        }

something like that

wapmetal Lead · 609 posts #29
if ($_POST['submit']) {
        $username = trim($_POST['username']);
        $password = trim($_POST['password']);
        $legalchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        $datetime = date('Y-m-d h:i:s');

        if (strlen($username) > 3 | strlen($username) < 17 | strlen($password) != 0) {
            if (strspn($username,$legalchars) != 0) {
                $password = sha1($password);

                $select_user = "SELECT * FROM keanpogi_vampires WHERE username='$username' and password='$password'";
                $select_user = mysql_query($select_user);
                $user_found = mysql_num_rows($select_user);
                $user_data = mysql_fetch_array($select_user);

if ($user_found > 0 && $select_user) {

                    kill_user_session($sid,$xuser_id);
                    $_SESSION['xuser_id'] = $user_data['id'];
                    $xuser_id=$_SESSION['xuser_id'];

                    $update_user_login="UPDATE keanpogi_vampires SET udatetime='$datetime' WHERE id='$xuser_id'";
                    $result_update_user_login=mysql_query($update_user_login);

echo "hey vampire your'e now login !<br/>";
                    
                    
                }

} when you login

kabooms Developer · 80 posts #31

wapmetal wrote:

if ($_POST['submit']) {
        $username = trim($_POST['username']);
        $password = trim($_POST['password']);
        $legalchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        $datetime = date('Y-m-d h:i:s');

        if (strlen($username) > 3 | strlen($username) < 17 | strlen($password) != 0) {
            if (strspn($username,$legalchars) != 0) {
                $password = sha1($password);

                $select_user = "SELECT * FROM ph_bazzztord_users WHERE username='$username' and password='$password'";
                $select_user = mysql_query($select_user);
                $user_found = mysql_num_rows($select_user);
                $user_data = mysql_fetch_array($select_user);


if ($user_found > 0 && $select_user) {

                    kill_user_session($sid,udatetime);
                    $_SESSION['xuser_id'] = $user_data['id'];
                    $xuser_id=$_SESSION['xuser_id'];

                    $update_user_login="UPDATE ph_bazzztord_users  SET lastact='$datetime' WHERE id='$xuser_id'";

//changes "udatetime" to "lastact"


// change $uid to $xuser_id global
                    $result_update_user_login=mysql_query($update_user_login);

echo "<a href=\"index.php?action=main\">Enter Wapworld</a><br/>";
                    
                    
                }

} when you login

nyaheheheh thanks dude 8)

kabooms Developer · 80 posts #33

Heres my chapel http://wapadik.net/chapel.zip sorry i cant upload file,, error when i upload i dont know why .

Usage

echo "<a href="chapel.php?action=chapel&sid=$sid">Chapel Menu</a>";

CREATE TABLE IF NOT EXISTS `couple` (
  `id` int(100) NOT NULL auto_increment,
  `who` int(100) NOT NULL default '0',
  `partner` int(100) NOT NULL default '0',
  `req` int(100) NOT NULL default '0',
  `accept` int(100) NOT NULL default '0',
  `joined` int(100) NOT NULL default '0',
  `time` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
jedskiter Junior · 14 posts #34

the gsm.pinoy3g.info script is corrupted??

riderz Lead · 975 posts #35

kabooms wrote: demo script of <#> create your own sql okey

its working for me kabooms thanx for all the shares


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

kei_ki7 Senior · 431 posts #36

kabooms wrote: Wap Jueteng Games for lavalair 7am and 7pm Draw auto update plusses for winner lol

In core.php

/////////////////jueteng draw
function drawnow()
{
   $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
   return $nopop[0];
}

function win($attack, $attack1)
{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng WHERE no1 LIKE '%".$attack."%' AND no2 LIKE '%".$attack1."%'"));
   return $noi[0];
}
///end jueteng draw

///////////////////clear data


function cleardata()
{

         ////jueteng
$now = time();
$start=date("Y-m-d")." 07:00:00";
$end=date("Y-m-d")." 07:00:10";
$tstamp1=strtotime($start);
$tstamp2=strtotime($end);
if($now>$tstamp1 && $now<$tstamp2)
{
    if(drawnow())
 {
    $rand = mysql_query("SELECT no1 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack1 =$rands[0];
    }
    $rand = mysql_query("SELECT no2 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack =$rands[0];
    }
    if(win($attack, $attack1))
    {
$ilan = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noil = $ilan[0]*90;
$noi2 = $noil*0.10;
$noi = mysql_fetch_array(mysql_query("SELECT uid FROM ph_bazzztord_jueteng WHERE no1 LIKE '%".$attack."%' AND no2 LIKE '%".$attack1."%'"));
$res = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res)
{
$noi2plus = $noi2+500;
$unick4 = getnick_uid($noi[0]);
$msg = "You won $noi2plus plusses in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $noi[0]);
mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='Congratulations! $unick4 your wap jueteng numbers matched to our winning numbers $attack and $attack1. $noi2plus plusses has been added!', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noi2plus' WHERE id='".$noi[0]."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value='".$noi[0]."', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }else{
    $random = mysql_query("SELECT uid FROM ph_bazzztord_jueteng ORDER by RAND() LIMIT 1");
    while($randsom=mysql_fetch_array($random))
    {
    $attack3 =$randsom[0];
    }
$non = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noin = $non[0]*60;
$noen = $noin*0.40;
$res2 = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res2)
{
$unick3 = getnick_uid($attack3);
$msg = "You won $noen plusses. Consolation prize in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $attack3);
$res = mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='WAP Jueteng winning number combinations are $attack and $attack1. Consolation Prize goes to $unick3, You will received $noen plusses. congratulations -yay-', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noen' WHERE id='".$attack3."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value=' ', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }
 }
}

  $nw = time(); 
  $strt=date("Y-m-d")." 12:00:00";
  $nd=date("Y-m-d")." 12:00:10";
  $stamp1=strtotime($strt);
  $stamp2=strtotime($nd);
  if($nw>$stamp1 && $nw<$stamp2) 
  {
if(drawnow())
 {
    $rand = mysql_query("SELECT no1 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack1 =$rands[0];
    }
    $rand = mysql_query("SELECT no2 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack =$rands[0];
    }
    if(win($attack, $attack1))
    {
$ilan = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noil = $ilan[0]*90;
$noi2 = $noil*0.10;
$noi = mysql_fetch_array(mysql_query("SELECT uid FROM ph_bazzztord_jueteng WHERE no1 LIKE '%".$attack."%' AND no2 LIKE '%".$attack1."%'"));
$res = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res)
{
$noi2plus = $noi2+500;
$unick4 = getnick_uid($noi[0]);
$msg = "You won $noi2plus plusses in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $noi[0]);
mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='Congratulations! $unick4 your wap jueteng numbers matched in our winning numbers $attack and $attack1. $noi2plus plusses has been added!', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noi2plus' WHERE id='".$noi[0]."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value='".$noi[0]."', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }else{
    $random = mysql_query("SELECT uid FROM ph_bazzztord_jueteng ORDER by RAND() LIMIT 1");
    while($randsom=mysql_fetch_array($random))
    {
    $attack3 =$randsom[0];
    }
$non = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noin = $non[0]*60;
$noen = $noin*0.40;
$res2 = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res2)
{
$unick3 = getnick_uid($attack3);
$msg = "You won $noen plusses. Consolation prize in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $attack3);
$res = mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='WAP Jueteng winning number combinations are $attack and $attack1. Consolation Prize goes to $unick3, You will received $noen plusses. congratulations -yay-', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noen' WHERE id='".$attack3."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value=' ', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }
 }
}

  $nw = time(); 
  $strt=date("Y-m-d")." 19:00:00";
  $nd=date("Y-m-d")." 19:00:10";
  $stamp1=strtotime($strt);
  $stamp2=strtotime($nd);
  if($nw>$stamp1 && $nw<$stamp2) 
  {
if(drawnow())
 {
    $rand = mysql_query("SELECT no1 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack1 =$rands[0];
    }
    $rand = mysql_query("SELECT no2 FROM ph_bazzztord_juetengnum ORDER by RAND() LIMIT 1");
    while($rands=mysql_fetch_array($rand))
    {
    $attack =$rands[0];
    }
    if(win($attack, $attack1))
    {
$ilan = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noil = $ilan[0]*90;
$noi2 = $noil*0.10;
$noi = mysql_fetch_array(mysql_query("SELECT uid FROM ph_bazzztord_jueteng WHERE no1 LIKE '%".$attack."%' AND no2 LIKE '%".$attack1."%'"));
$res = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res)
{
$noi2plus = $noi2+500;
$unick4 = getnick_uid($noi[0]);
$msg = "You won $noi2plus plusses in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $noi[0]);
mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='Congratulations! $unick4 your wap jueteng numbers matched to our winning numbers $attack and $attack1. $noi2plus plusses has been added!', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noi2plus' WHERE id='".$noi[0]."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value='".$noi[0]."', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }else{
    $random = mysql_query("SELECT uid FROM ph_bazzztord_jueteng ORDER by RAND() LIMIT 1");
    while($randsom=mysql_fetch_array($random))
    {
    $attack3 =$randsom[0];
    }
$non = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_jueteng"));
$noin = $non[0]*60;
$noen = $noin*0.40;
$res2 = mysql_query("DELETE FROM ph_bazzztord_jueteng");
if($res2)
{
$unick3 = getnick_uid($attack3);
$msg = "You won $noen plusses. Consolation prize in wap jueteng draw!"."[br/][small]Note: This is an automatic PM[/small]";
autopm($msg, $attack3);
$res = mysql_query("INSERT INTO ph_bazzztord_shouts SET shout='WAP Jueteng winning number combinations are $attack and $attack1. Consolation Prize goes to $unick3, You will received $noen plusses. congratulations -yay-', shouter='332', shtime='".time()."'");
mysql_query("UPDATE ph_bazzztord_users SET plusses=plusses+'$noen' WHERE id='".$attack3."'");
mysql_query("UPDATE ph_bazzztord_juetengset SET value=' ', no1='".$attack."', no2='".$attack1."', time='".time()."' WHERE name='lottonum'");
}
   }
 }
}    

jueteng Sql

CREATE TABLE IF NOT EXISTS `ph_bazzztord_jueteng` (
  `uid` int(100) NOT NULL default '0',
  `no1` int(60) NOT NULL default '0',
  `no2` int(60) NOT NULL default '0',
  `actime` int(100) NOT NULL,
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE IF NOT EXISTS `ph_bazzztord_juetengnum` (
  `no1` int(50) NOT NULL,
  `no2` int(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ph_bazzztord_juetengnum`
--

INSERT INTO `ph_bazzztord_juetengnum` (`no1`, `no2`) VALUES
(1, 1),
(2, 2),
(3, 3),
(4, 4),
(5, 5),
(6, 6),
(7, 7),
(8, 8),
(9, 9),
(10, 10),
(11, 11),
(12, 12),
(13, 13),
(14, 14),
(15, 15),
(16, 16),
(17, 17),
(18, 18),
(19, 19),
(20, 20),
(21, 21),
(22, 22),
(23, 23),
(24, 24),
(25, 5),
(26, 26),
(27, 27),
(28, 28),
(29, 29),
(30, 30),
(31, 31),
(32, 32),
(33, 33),
(34, 34),
(35, 35),
(36, 36),
(37, 37);


CREATE TABLE IF NOT EXISTS `ph_bazzztord_juetengset` (
  `no1` varchar(50) NOT NULL,
  `no2` varchar(50) NOT NULL,
  `value` int(100) NOT NULL default '0',
  `time` int(100) NOT NULL default '0',
  `lottonum` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

core.php code not working, i saw that the function cleardata() is not close then i close by using } at the bottom, but still not working

Did I help you? You can help me too Your donations will help me finance my studies.

metulj Super moderator Principal · 1,726 posts #37

kei_ki7 wrote: core.php code not working, i saw that the function cleardata() is not close then i close by using } at the bottom, but still not working

you could at least post what kind a error you get...?😐

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

jedskiter Junior · 14 posts #38

ok. got it now. needing its sql. lol. kiddin

arg0s12 Developer · 144 posts #39

Me too, my jueteng not work, why? But other script working at my site, thanks kaBoom, , your such great, ,

arg0s12 Developer · 144 posts #40

I forgot, , the error is blank page when i enter at the page. . And the tamagochi bbcode, ,

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