uyeler tablosu:
CREATE TABLE IF NOT EXISTS `webwhitelister` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`USERNAME` varchar(16) NOT NULL,
`WHITELISTED` tinyint(1) NOT NULL,
`password` varchar(255) NOT NULL,
`ip` varchar(40) NOT NULL,
`lastlogin` bigint(20) DEFAULT NULL,
`x` smallint(6) NOT NULL DEFAULT '0',
`y` smallint(6) NOT NULL DEFAULT '0',
`z` smallint(6) NOT NULL DEFAULT '0',
`email` varchar(255) NOT NULL DEFAULT 'your@email.com',
`rank` tinyint(5) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Tablo döküm verisi `webwhitelister`
--
INSERT INTO `webwhitelister` (`ID`, `USERNAME`, `WHITELISTED`, `password`, `ip`, `lastlogin`, `x`, `y`, `z`, `email`, `rank`) VALUES
(1, 'HuniliDeli', 1, 'e10adc3949ba59abbe56e057f20f883e', '192.168.2.7', 1364996287750, 0, 0, 0, 'your@email.com', 1);
Envanter tablosu:
CREATE TABLE IF NOT EXISTS `sqlinv` (
`user_id` varchar(50) DEFAULT NULL,
`inventory` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Tablo döküm verisi `sqlinv`
--
INSERT INTO `sqlinv` (`user_id`, `inventory`) VALUES
('HuniliDeli', '[0(3:0:0)x64];[1(89:0:0)x4];[2(0:0:0)x1];[3(0:0:0)x1];[4(0:0:0)x1];[5(0:0:0)x1];[6(0:0:0)x1];[7(0:0:0)x1];[8(0:0:0)x1];[9(0:0:0)x1];[10(0:0:0)x1];[11(0:0:0)x1];[12(0:0:0)x1];[13(0:0:0)x1];[14(0:0:0)x1];[15(0:0:0)x1];[16(0:0:0)x1];[17(0:0:0)x1];[18(0:0:0)x1];[19(0:0:0)x1];[20(0:0:0)x1];[21(0:0:0)x1];[22(0:0:0)x1];[23(0:0:0)x1];[24(0:0:0)x1];[25(0:0:0)x1];[26(0:0:0)x1];[27(0:0:0)x1];[28(0:0:0)x1];[29(0:0:0)x1];[30(0:0:0)x1];[31(0:0:0)x1];[32(0:0:0)x1];[33(0:0:0)x1];[34(0:0:0)x1];[35(0:0:0)x1];[103(0:0:0)x1];[102(0:0:0)x1];[101(0:0:0)x1];[100(0:0:0)x1];');Dediğinizi deniyorum..
edit:
şu hatayı veriyor:
Parse error: syntax error, unexpected end of file in D:\wamp\www\SpartaCMSv1\pages\hesabim.php on line 41
hesabim.php'nin içeriğide şöyle:
<h2><?php echo uyeler('USERNAME'); ?></h2>
<img src="3d.php?&abg=0&ratio=8&format=png&displayHairs=true&headOnly=false&login=<?php echo uyeler('USERNAME'); ?>"
<?php
$user_id = $uyeler['USERNAME'];
$sql = mysql_query("select envanter from uyeler where user_id=$user_id");
$sonuc = mysql_fetch_assoc($sql);
$envanter = envanterAl($sonuc['envanter']);
echo $envanter[0]['place'];
function envanterAl($inventory){
$invArr = explode(';', $inventory);
$invFinalArr = array();
$i = 0;
foreach($invArr as $row){
$row = str_replace('[', '', str_replace(']', '', $row));
$count = explode(')x', $row);
@$count = $count[1];
$id = explode(':', $row);
@$index = $id[1];
$id = explode('(', $id[0]);
@$id = $id[1];
$place = explode('(', $row);
$invFinalArr[$i]['count'] = $count;
$invFinalArr[$i]['id'] = $id;
$invFinalArr[$i]['place'] = trim($place[0]);
$i++;
}
return $invFinalArr;
?>
</br>
</br>
<hr>