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 #1

I will Share My bought Script lol pls Lucky9 Text twist Quiz manager Quiz Trivia!!! next Tamagochi, Fun voting, Smile generator and rest of my script code lol !!!!

CREATE TABLE IF NOT EXISTS `ph_bazzztord_lucky9` (
  `id` int(100) NOT NULL auto_increment,
  `bet` int(100) NOT NULL default '0',
  `who` int(100) NOT NULL,
  `chatter` int(100) NOT NULL,
  `time` int(100) NOT NULL default '0',
  `time2` int(100) NOT NULL default '0',
  `accepted` int(2) NOT NULL,
  `card1` int(3) NOT NULL default '0',
  `card2` int(3) NOT NULL,
  `card3` int(3) NOT NULL,
  `msgtext` varchar(250) NOT NULL,
  `rid` int(50) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1393 ;

--
-- Dumping data for table `ph_bazzztord_lucky9`

--
-- Table structure for table `ph_bazzztord_quiz`
--

CREATE TABLE IF NOT EXISTS `ph_bazzztord_quiz` (
  `id` int(100) NOT NULL auto_increment,
  `question` varchar(255) NOT NULL default '',
  `answer` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=279 ;

--
-- Dumping data for table `ph_bazzztord_quiz`
--
INSERT INTO `ph_bazzztord_quiz` (`id`, `question`, `answer`) VALUES
(185, 'Cnu Hacker sa Crazy Chat Ask me ahehehehe?', 'Secret!!!');

--
-- Table structure for table `ph_bazzztord_quizrooms`
--

CREATE TABLE IF NOT EXISTS `ph_bazzztord_quizrooms` (
  `id` int(100) NOT NULL auto_increment,
  `question` varchar(255) NOT NULL default '',
  `answer` varchar(100) NOT NULL default '',
  `displaytime` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15345 ;

--
-- Dumping data for table `ph_bazzztord_quizrooms`
--

--
-- Table structure for table `ph_bazzztord_rooms`
--

CREATE TABLE IF NOT EXISTS `ph_bazzztord_rooms` (
  `id` int(10) NOT NULL auto_increment,
  `extra` int(1) NOT NULL default '0',
  `adult` int(1) NOT NULL default '0',
  `name` varchar(30) NOT NULL default '',
  `pass` varchar(100) NOT NULL default '',
  `static` char(1) NOT NULL default '',
  `mage` int(10) NOT NULL default '0',
  `maxage` int(10) NOT NULL default '0',
  `chposts` int(100) NOT NULL default '0',
  `perms` int(10) NOT NULL default '0',
  `censord` char(1) NOT NULL default '1',
  `freaky` char(1) NOT NULL default '0',
  `lastmsg` int(100) NOT NULL default '0',
  `clubid` int(100) NOT NULL default '0',
  `locked` char(1) NOT NULL default '',
  `owner` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=357 ;

--
-- Dumping data for table `ph_bazzztord_rooms`
--

INSERT INTO `ph_bazzztord_rooms` (`id`, `extra`, `adult`, `name`, `pass`, `static`, `mage`, `maxage`, `chposts`, `perms`, `censord`, `freaky`, `lastmsg`, `clubid`, `locked`, `owner`) VALUES
(1, 0, 0, 'spin the wheel', '', '1', 0, 0, 0, 0, '1', '0', 1255496988, 0, '0', ''),
(2, 0, 0, 'quiz board', '', '1', 0, 0, 0, 0, '1', '0', 1255273792, 0, '', ''),
(173, 0, 0, 'text twist', '', '1', 0, 0, 0, 0, '1', '0', 1255499208, 0, '0', ''),
(24, 0, 0, 'lucky9 room :)', '', '1', 0, 0, 0, 0, '1', '0', 1255179742, 0, '', ''),
(3, 0, 0, 'jack en poy', '', '1', 0, 0, 0, 0, '1', '0', 1255179672, 0, '', ''),
(4, 0, 0, 'newbie area :)', '', '1', 0, 0, 0, 0, '1', '0', 1255509516, 0, '0', ''),
(11, 0, 0, 'rpg arena', '', '1', 0, 0, 0, 0, '1', '0', 1255179700, 0, '', ''),
(12, 0, 0, 'music room', '', '1', 0, 0, 0, 0, '1', '0', 1255329904, 0, '0', ''),
(13, 0, 0, 'patatagan room', '', '1', 0, 0, 0, 0, '1', '0', 1255179728, 0, '0', ''),
(300, 1, 0, '+ Baguio', '', '1', 0, 0, 0, 0, '1', '0', 1255180042, 0, '', ''),
(301, 1, 0, '+ Batangas', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(302, 1, 0, '+ Bulacan', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(303, 1, 0, '+ Cavite', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(304, 1, 0, '+ Laguna', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(305, 1, 0, '+ Libis', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(306, 1, 0, '+ Manila', '', '1', 0, 0, 0, 0, '1', '0', 1255280581, 0, '0', ''),
(307, 1, 0, '+ Nueva Ecija', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(308, 1, 0, '+ Pampanga', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(309, 1, 0, '+ Pangasinan', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(310, 1, 0, '+ Tarlac', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(321, 0, 1, '+ Straight', '', '1', 0, 0, 0, 0, '1', '0', 0, 0, '', ''),
(322, 0, 1, '+ Naughty', '', '1', 0, 0, 0, 0, '1', '0', 1255200350, 0, '', ''),
(323, 0, 1, '+ Flirt', '', '1', 0, 0, 0, 0, '1', '0', 1254768124, 0, '0', ''),
(325, 0, 0, 'Wapista avenue', '', '1', 0, 0, 0, 0, '0', '0', 1255280918, 1, '1', ''),
(356, 0, 0, 'staff chat room', '', '1', 30, 30, 10, 1, '1', '0', 1255438116, 0, '', '');

CREATE TABLE IF NOT EXISTS `ph_bazzztord_settings` (
  `id` int(10) NOT NULL auto_increment,
  `name` varchar(30) NOT NULL default '',
  `value` text NOT NULL,
  `value2` varchar(50) NOT NULL,
  `value3` varchar(50) NOT NULL,
  `title` varchar(250) NOT NULL,
  `sino` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;

--
-- Dumping data for table `ph_bazzztord_settings`
--

INSERT INTO `ph_bazzztord_settings` (`id`, `name`, `value`, `value2`, `value3`, `title`, `sino`) VALUES
(1, 'sesexp', '20', '', '', '', 0),
(2, 'Sat 12 Sep 2009 - 22:02', '38', '', '', '', 0),
(3, '4ummsg', '-atn- + all staff,tuloy natin maya ang meeting 8pm..Enjoy lang mga Adik fb ngaun c globe. Admin i wanna say na magpapalit n ako ng script and sa crazy chat na tatambay thanks bazz + -atn- ', '', '', '', 0),
(16, 'texttwist', '', '', '', '', 166),
(4, 'Counter', '174840', '', '', '', 0),
(5, 'pmaf', '30', '', '', '', 0),
(6, 'reg', '0', '', '', '', 0),
(7, 'fview', '0', '', '', '', 0),
(8, 'lastbpm', '2009-10-14', '', '', '', 0),
(9, 'sitename', 'WapAdik.NeT', '', '', '', 0),
(10, 'vldtn', '0', '', '', '', 0),
(11, 'online', '0', '', '', '', 0),
(12, 'qmsg', '', '', '', '', 152),
(13, 'chaf', '20', '', '', '', 0),
(14, 'resetsht', '1251276469', '', '', '', 0),
(15, 'votefor', 'Fun Sign', '0', '**** Nahack Site ko God Bless You haist haist haist napag uusapan naman ang problema kapwa pinoy tinitira p ninyo haist', '', 0);

CREATE TABLE IF NOT EXISTS `ph_bazzztord_chat` (
  `id` int(99) NOT NULL auto_increment,
  `chatter` int(100) NOT NULL default '0',
  `who` int(100) NOT NULL default '0',
  `timesent` int(50) NOT NULL default '0',
  `msgtext` varchar(255) NOT NULL default '',
  `perm` char(1) NOT NULL default '',
  `rid` int(99) NOT NULL default '0',
  `exposed` char(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=24467 ;

CREATE TABLE IF NOT EXISTS `ph_bazzztord_getcards` (
  `id` int(100) NOT NULL,
  `no` varchar(30) collate latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `ph_bazzztord_getcards`
--

INSERT INTO `ph_bazzztord_getcards` (`id`, `no`) VALUES
(1, '1'),
(2, '2'),
(3, '3'),
(4, '4'),
(5, '5'),
(6, '6'),
(7, '7'),
(8, '8'),
(9, '9'),
(10, '10'),
(11, '11'),
(13, '13'),
(14, '14'),
(15, '15'),
(16, '16'),
(17, '17'),
(18, '18');
CREATE TABLE IF NOT EXISTS `ph_bazzztord_kick` (
  `id` int(100) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `kick` int(1) NOT NULL default '0',
  `rid` int(100) NOT NULL default '0',
  `actime` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=24 ;

CREATE TABLE IF NOT EXISTS `ph_bazzztord_spincard` (
  `cards` varchar(60) character set latin1 collate latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ph_bazzztord_spincard`
--

INSERT INTO `ph_bazzztord_spincard` (`cards`) VALUES
('500');

/*Dapat may insertion sa table ng spincard para lumabas ung Chatroom Spin tnt*/

SA ibwf_user Add this table tNt ok!!

  `spinned` int(100) NOT NULL default '0',
  `spintime` int(100) NOT NULL default '0',
  `cards` int(100) NOT NULL default '0',
  `spinlimit` int(20) NOT NULL default '0',
  `qms` int(1) NOT NULL default '0',
  
  
  

Next Tamogochi include Sql Table 😳8)

kabooms Developer · 80 posts #2

Heres tamagochi script tnt

In core.php

function getbbcode($text, $sid="", $filtered)
{
  $text=preg_replace("/\[b\](.*?)\[\/b\]/i","<b>\\1</b>", $text);

  $text=preg_replace("/\[small\](.*?)\[\/small\]/i","<small>\\1</small>", $text);
  //$text = preg_replace("/\[lnkurl\=(.*?)\](.*?)\[\/lnkurl\]/is","<a href=\"$1\">$2</a>",$text);
  $text = preg_replace("/\[topic\=(.*?)\](.*?)\[\/topic\]/is","<a href=\"forum.php?action=viewtpc&tid=$1&sid=$sid\">$2</a>",$text);
  $text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is","<a href=\"index.php?action=gocl&clid=$1&sid=$sid\">$2</a>",$text);
  $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\]/is","<a href=\"index.php?action=viewblog&bid=$1&sid=$sid\">$2</a>",$text);
  $text = preg_replace("/\[kapet](.*?)\[\/kapet\]/is","<a href=\"tamagotchi.php?action=prof&pid=$1&sid=$sid\">Feed My Pet!</a>",$text);
  //$text = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href=\"\\0\">\\0</a>", $text);
  if(substr_count($text,"[br/]")<=3){
    $text = str_replace("[br/]","<br/>",$text);
  }
  $sml = mysql_fetch_array(mysql_query("SELECT hvia FROM ph_bazzztord_users WHERE id='".getuid_sid($sid)."'"));
  if ($sml[0]=="1")
  {
  $text = getsmilies($text);
  }
if($filtered=="1"){
 $text = str_replace("$","*",$text);
  $text = str_replace("pinoyster","spam",$text);
  $text = str_replace("pinoypark","2crapforwap",$text);
  $text = str_replace("budschat","2crapforwap",$text);
  $text = str_replace("bobo","what",$text);
  $text = str_replace("co.cc","2crapforwap",$text);
  $text = str_replace("2ks","2crapforwap",$text);
$text = str_replace("tanga","haist",$text);
  $text = str_replace("HIPHOP4U","britneyspears",$text);
  $text = str_replace("HiPhOp4U","britneyspears",$text);
  $text = str_replace("hIpHoP4u","britneyspears",$text);
  $text = str_replace("Hiphop4U","britneyspears",$text);
  $text = str_replace("Hiphop4u","britneyspears",$text);
$text = str_replace("HipHop4u","britneyspears",$text);
 $text = str_replace("hh4u","britneyspears",$text);
  $text = str_replace("HH4U","britneyspears",$text);
  $text = str_replace("Hh4u","britneyspears",$text);
 $text = str_replace("hH4U","britneyspears",$text);
  $text = str_replace("HH4u","britneyspears",$text);
  $text = str_replace("hh4U","britneyspears",$text);
  
}
  return $text;
}

/////////////////////no pet?

function nopet($uid)
{
    $nopet = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_tamagotchi WHERE uid='".$uid."'"));
    if($nopet[0]=='0')
    { 
    return false;
    }else{
    return true;
    }
}
//////////////////////////////////
function petexist($name)
{
$checkpet = mysql_fetch_array(mysql_query("SELECT COUNT(*) from ph_bazzztord_tamagotchi where name='".$name."'"));
if($checkpet[0]>0)
{
return true;
}else{
return false;
}
}
/////////////////////Get Challenge

function battling($uid)
{
    $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_duel WHERE touid='".$uid."' AND accept='1'"));
    return $nopop[0];
}

//////////////////////is in game?

function battle($uid)
{
  $unick = mysql_fetch_array(mysql_query("SELECT uid FROM ph_bazzztord_battle WHERE uid='".$uid."'"));
  return $unick[0];
}

/////////////////////Challenge Not yet Accepted

function is3($uid)
{
  $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_duel WHERE byuid='".$uid."' AND accept='1'"));
  return $nopop[0];
}

/////////////////////Challenge Accepted

function is2($uid)
{
  $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_duel WHERE byuid='".$uid."' AND accept='2'"));
  return $nopop[0];
}

/////////////////////////////////////////GET PENDING GAME
function pend($uid)
{
    $res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_battle WHERE uid='".$uid."'"));
    if($res[0]>0)
    {
      return true;
    }
    return false;
}

///////////////////////////////////////////RPG turn

function tiranako($uid)
{
  $not = mysql_fetch_array(mysql_query("SELECT hitter FROM ph_bazzztord_users WHERE id='".$uid."'"));
  if($not[0]=='1')
  { 
    return true;
  }else{
    return false;
  }
}

/////////////////////turn for RPG

function tirana($uid)
{
    $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_users WHERE id='".$uid."' AND hitter='0'"));
    return $nopop[0];
}

//////////////////////////////////////////can hit?

function ewan($uid)
{
  $not = mysql_fetch_array(mysql_query("SELECT hitter FROM ph_bazzztord_users WHERE id='".$uid."'"));
  if($not[0]=='3')
  { 
    return true;
  }else{
    return false;
  }
}
/////////////////////Get pops

function petinfo()
{
   $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_duel"));
   return $nopop[0];
}
/////////////////////Get pops

function petinfo2($id)
{
   $nopop = mysql_fetch_array(mysql_query("SELECT hit FROM ph_bazzztord_battle WHERE id='".$id."'"));
  if($nopop=='1')
  {
    return true;
  }else{
    return false;
  }
}

Sql of tamagochi

CREATE TABLE IF NOT EXISTS `ph_bazzztord_faqs` (
  `id` int(100) NOT NULL auto_increment,
  `category` varchar(10) NOT NULL default '',
  `question` varchar(100) NOT NULL default '',
  `answer` varchar(250) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

--
-- Dumping data for table `ph_bazzztord_faqs`
--

INSERT INTO `ph_bazzztord_faqs` (`id`, `category`, `question`, `answer`) VALUES
(2, '', 'What are those stats?', 'If one of parameters will exceed 150% or becomes below 0% the kapet will die.'),
(3, '', 'How to feed my KAPet?', 'Just tell your friends to feed your pet and 300 plusses will be deducted from their account per feed.'),
(4, '', 'No Feeding Limitation?', 'KAPet can only be feed once a day.'),
(5, '', 'How to challenge other masters?', 'You can make a challenge if you reached level 10.'),
(6, '', 'How does my pet level up?', 'Other members need to feed your pet by clicking the link Feed My Pet!'),
(7, '', 'What are levels for?', 'Levels are just a fun thing for our kapet. If your pet gets a high enough level it will be placed in the top.'),
(8, '', 'How to Challenge?', 'Ur level should be 10 as well as ur opponent. View the profile of the pet then click send challenge. Place your bet and send the challenge. ur health shud be 100 as well as ur opponents health.'),
(9, '', 'What is the max level?', 'Max level is 500.'),
(10, '', 'Where to find my ID?', 'View your profile and find Member ID: number.'),
(11, '', 'What if I''m inactive?', 'If you''re inactive for 5 days. Your kapet will die automatically.'),
(12, '', 'INFO 1:', 'In you''re inactive for 24hrs 3% will be deducted to your PET stats % rate. So take care of your pet so that it will not die.'),
(13, '', 'INFO 2:', 'Promote your KAPET by posting in forums, shoutbox, pms, chatrums, ur profile, this code [kapet]Members ID[/kapet].'),
(1, '', 'How does my kapet grow?', 'Your pet will evolve when level up.');

CREATE TABLE IF NOT EXISTS `ph_bazzztord_feedpet` (
  `id` int(100) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `who` int(100) NOT NULL default '0',
  `actime` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=64 ;

CREATE TABLE IF NOT EXISTS `ph_bazzztord_tamagotchi` (
  `id` int(10) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL default '',
  `kind` varchar(20) NOT NULL default '',
  `temper` varchar(20) NOT NULL default '',
  `sex` char(2) NOT NULL default 'M',
  `birthday` varchar(20) NOT NULL default '',
  `birth_lx` varchar(20) NOT NULL default '',
  `feed` varchar(20) NOT NULL default '',
  `play` varchar(20) NOT NULL default '',
  `learn` varchar(20) NOT NULL default '',
  `health` varchar(20) NOT NULL default '',
  `clean` varchar(20) NOT NULL default '',
  `vanna` varchar(20) NOT NULL default '',
  `uid` int(10) NOT NULL default '0',
  `tamagotchi` int(2) NOT NULL default '0',
  `lastfeed` int(100) NOT NULL default '0',
  `level` int(25) NOT NULL default '0',
  `lastplay` int(100) NOT NULL default '0',
  `lastlearn` int(100) NOT NULL default '0',
  `lasthealth` int(100) NOT NULL default '0',
  `lastclean` int(100) NOT NULL default '0',
  `lastvanna` int(100) NOT NULL default '0',
  `lastactive` int(100) NOT NULL default '0',
  `wins` int(100) NOT NULL default '0',
  `loss` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;

CREATE TABLE IF NOT EXISTS `ph_bazzztord_duel` (
  `id` int(100) NOT NULL auto_increment,
  `byuid` int(100) NOT NULL default '0',
  `touid` int(100) NOT NULL default '0',
  `accept` int(100) NOT NULL default '0',
  `bet` int(10) NOT NULL default '0',
  `time` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `byuid` (`byuid`),
  UNIQUE KEY `touid` (`touid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

CREATE TABLE IF NOT EXISTS `ph_bazzztord_battle` (
  `id` int(100) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `who` int(100) NOT NULL default '0',
  `bet` int(10) NOT NULL default '0',
  `owner` int(100) NOT NULL default '0',
  `hit` int(2) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `uid` (`uid`),
  UNIQUE KEY `who` (`who`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

kung kulang ung sql pm me hirap maghanap eh ahe

Attachments: tamagochi.zip
joseg Junior · 34 posts #3

Nice share tanks

kabooms Developer · 80 posts #6

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;
kabooms Developer · 80 posts #7

Country Flags

adding flags at online list my online list

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

$uid =getuid_sid($sid);
if($uid>0)
{
addonline(getuid_sid($sid),"Online List","index.php?action=$action");
$onli =  mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ph_bazzztord_online"));
}
echo "<card id=\"chat\" title=\"Online list $onli[0]\" ontimer=\"index.php?action=online&time=";
echo date('dmHis');
echo "&sid=$sid&page=$page";
echo "\">";
echo "<timer value=\"200\"/>";
//////ALL LISTS SCRIPT <<

if($page=="" || $page<=0)$page=1;
$num_items = getnumonline(); //changable
$items_per_page= 15;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
/////////changable sql
$sql = "SELECT
a.name, a.perm, b.userid FROM ph_bazzztord_users a
INNER JOIN ph_bazzztord_online b ON a.id = b.userid
ORDER BY a.perm DESC, a.plusses DESC, a.name
LIMIT $limit_start, $items_per_page
";

echo "<p align=\"center\">";

$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid&browse?\">$item[0]</a>";
if($item[1]==1)
{
$item[1] = "<b><a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid&browse?\">• $item[0] • </a></b>";
}else if($item[1]==2)
{
$item[1] = "<b><a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid&browse?\">* $item[0] *</a></b>";
}else if($item[1]==3)
{
$item[1] = "<b><a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid&browse?\">» $item[0] «</a></b>";
}else if($item[1]==4)
{
$item[1] = "<b><a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid&browse?\">» $item[0] «</a></b>";
}else if($item[1]==0)
{
$item[1] = "$lnk";
}
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ph_bazzztord_users WHERE id='".$item[2]."'"));
$IPaddress=$uipadd[0];
$two_letter_country_code=iptocountry($IPaddress);
echo "<img src=\"../flags/$two_letter_country_code.png\" alt=\"*\"/>";
echo "$item[1] <br/>";

}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid&browse?\">prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"index.php?action=online&page=$npage&sid=$sid&browse?\">next</a>";
}

echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
echo getjumper($action, $sid,"index");
}
echo "</p>";
////// UNTILL HERE >>

echo "<p align=\"center\">";
$uid =getuid_sid($sid);
if($uid>0)
{
  echo "<a href=\"index.php?action=main&sid=$sid\">main menu</a>";
}else{

  echo "<a href=\"index.php\">main menu</a>";
}
echo "</p>";
echo "</card>";

}

in core.php add this code

//////////////////////Country 

function iptocountry($ip) {
    $numbers = preg_split( "/\./", $ip);
    include("ip_files/".$numbers[0].".php");
    $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);
    foreach($ranges as $key => $value){
        if($key<=$code){
            if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;}
            }
    }
    if ($two_letter_country_code==""){$two_letter_country_code="unkown";}
    return $two_letter_country_code;
}
function country_name($two_letter_country_code)
    {
     include("ip_files/countries.php");
    $country_name=$countries[$two_letter_country_code][0];
   return $country_name;
    }
function show_flag($two_letter_country_code)
      {
     $file_to_check='./flags/'.strtolower($two_letter_country_code).'.png';
     if (file_exists($file_to_check)){
                $FLAG= '<img src="'.$file_to_check.'" alt="'.$two_letter_country_code.'"/>';
                }else{
                $FLAG= '<img src="./flags/noflag.png" alt="'.$two_letter_country_code.'"/>';
                }
       return $FLAG;
       }
	   
	   
	   

Usage poh ito

Adding Country Name and Flags in User profile under action="viewuser"

  $uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
  echo "Ip: $uipadd[0]<br/>";

$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
$IPaddress=$uipadd[0];
$two_letter_country_code=iptocountry($IPaddress);
echo "Country: <img src=\"flags/$two_letter_country_code.png\" alt=\"*\" /> ";
     include("countries.php");
$country_name=$countries[$two_letter_country_code][1];
echo "$country_name <br/>";

Detect Visitor Country name and Flags

$hulikanyahaha=$_SERVER['HTTP_USER_AGENT'];
$two_letter_country_code=iptocountry($hulikanyahaha);
echo "<img src=\"flags/$two_letter_country_code.png\" alt=\"*\" />";
     include("countries.php");
$country_name=$countries[$two_letter_country_code][1];
echo "$country_name ";
Attachments: flags.zip
kabooms Developer · 80 posts #8

Image Resize

first Create Folder, name it "cute" with out qoutes okey!! timthumb.php usage example random photo in lavalair

usage

w= Width h= Hight zc= zoom crop

$randomm = mysql_fetch_array(mysql_query("SELECT itemurl, sex FROM ph_bazzztord_gallery WHERE id ORDER BY RAND() LIMIT 1")); 
echo "<p align=\"center\">";
echo "Random Photo<br/>";
echo "<img src=\"timthumb.php?src=$randomm[0]&w=45&h=45&zc=1\" alt=\"$randomm[1]\"/>";
echo "</p>";

next is img.php usage example random photo in lavalair r = Width and Hight

$randomm = mysql_fetch_array(mysql_query("SELECT itemurl, sex FROM ph_bazzztord_gallery WHERE id ORDER BY RAND() LIMIT 1")); 
echo "<p align=\"center\">";
echo "Random Photo<br/>";
echo "<img src=\"img.php?src=$randomm[0]&r=50\" alt=\"$randomm[1]\"/>";
echo "</p>";
Attachments: img.zip timthumb.zip
wapmaster2 Developer · 114 posts #10

kabooms wrote: Country Flags

Usage poh ito

Adding Country Name and Flags in User profile under action="viewuser"





  $uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
  echo "Ip: $uipadd[0]<br/>";


$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
$IPaddress=$uipadd[0];
$two_letter_country_code=iptocountry($IPaddress);
echo "Country: <img src=\"flags/$two_letter_country_code.png\" alt=\"*\" /> ";
     include("countries.php");
$country_name=$countries[$two_letter_country_code][1];
echo "$country_name <br/>";


Detect Visitor Country name and Flags


$hulikanyahaha=$_SERVER['HTTP_USER_AGENT'];
$two_letter_country_code=iptocountry($hulikanyahaha);
echo "<img src=\"flags/$two_letter_country_code.png\" alt=\"*\" />";
     include("countries.php");
$country_name=$countries[$two_letter_country_code][1];
echo "$country_name ";

where is countries.php ????? 🙁

🌹 JUST JOIN FOR FUN ! **[url]http://wapmaster2.com**

kabooms Developer · 80 posts #13

use english on forums

CREATE TABLE IF NOT EXISTS `ibwf_settings` (
  `id` int(10) NOT NULL auto_increment,
  `name` varchar(30) NOT NULL default '',
  `value` text NOT NULL,
  `value2` varchar(50) NOT NULL,
  `value3` varchar(50) NOT NULL,
  `title` varchar(250) NOT NULL,
  `sino` int(100) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;

--
-- Dumping data for table `ibwf_settings`
--

INSERT INTO `ibwf_settings` (`id`, `name`, `value`, `value2`, `value3`, `title`, `sino`) VALUES
(1, 'sesexp', '20', '', '', '', 0),
(2, 'Sat 12 Sep 2009 - 22:02', '38', '', '', '', 0),
(3, '4ummsg', 'welcome', '', '', '', 0),
(16, 'texttwist', '', '', '', '', 166),
(4, 'Counter', '174840', '', '', '', 0),
(5, 'pmaf', '30', '', '', '', 0),
(6, 'reg', '0', '', '', '', 0),
(7, 'fview', '0', '', '', '', 0),
(8, 'lastbpm', '2009-10-14', '', '', '', 0),
(9, 'sitename', 'WapAdik.NeT', '', '', '', 0),
(10, 'vldtn', '0', '', '', '', 0),
(11, 'online', '0', '', '', '', 0),
(12, 'qmsg', '', '', '', '', 152),
(13, 'chaf', '20', '', '', '', 0),
(14, 'resetsht', '1251276469', '', '', '', 0),
(15, 'votefor', 'Fun Sign', '0', 'hehehehe', '', 0);
wapmaster2 Developer · 114 posts #14

Warning: include(ip_files/117.php) [function.include]: failed to open stream: No such file or directory in /home/........../public_html/web/core.php on line 319

Warning: include() [function.include]: Failed opening 'ip_files/117.php' for inclusion (include_path='.:/usr/lib/php') in /home/........./public_html/web/core.php on line 319

Warning: Invalid argument supplied for foreach() in /home/........./public_html/web/core.php on line 321

plzzz help somthing missing like ip_files ?????

🌹 JUST JOIN FOR FUN ! **[url]http://wapmaster2.com**

NoObCodeR Junior · 27 posts #15

All of the stuffs were given...its time for you to do your job.,....solve it on your own

subzero Super moderator Fellow · 3,954 posts #16

with that reply you need anger management class's lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

kabooms Developer · 80 posts #17

Sory subzero. I forgot to upload ip_files/ i will upload later or search here. All code of lucky9 is in chat.php simple read the script given sql already posted.

kabooms Developer · 80 posts #18

@ wapmaster to solve that error create a flag in flag folder unknown.png or unknown.gif o kaya Find ip_files script here.

arg0s12 Developer · 144 posts #19

Ok. Kaboom, i found that, sorry! Hehehe, thanx dudes, im trying to make wap community. .

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