View Single Post
  #3  
Old 03-21-2011, 03:24 PM
ChibiMaestro ChibiMaestro is offline
bruh
 
Join Date: Nov 2010
Location: United Kingdom
Posts: 300
Gender: Female
Credits: 72,367
ChibiMaestro is on a distinguished road
Default

I think the inventory script was for 1.1.X and I think you're using 1.2.0
And the furthest editing I got for the inventory script was:
Code:
<?php

include("inc/functions.php");
include("inc/config.php");

//***************//
//  START SCRIPT //
//***************//

$themeurl = grabanysetting("themeurl");
$links = getlinks();
$ads = getads("any");
$pagecontent = getsitecontent("index");
$article_title = $pagecontent[title];
$article_content = $pagecontent[content];
$article_content = nl2br($article_content);

$article_title = "Your Inventory";

if ($isloggedin == "yes") {
$article_content = "Here you can see a list of items that you have collected.<table width='500' border='2'>
<tr>
    <td width='200'><strong>Picture:</strong></td>
    <td width='230'><strong>Item Type: </strong></td>
    <td width='70'><strong>ID Number:</strong></td>
</tr>";
 
$query = "SELECT * FROM ".$prefix."useritems WHERE Owner = '$loggedinname'";
$result = mysql_query($query);
$num = mysql_numrows($result);

$i=0;
while ($i < $num) {

$iid=@mysql_result($result,$i,"ID");
$object=@mysql_result($result,$i,"Item");
$url=@mysql_result($result,$i,"imageurl");


$article_content = $article_content."<tr>
    <td><center><img src='".$url."'></center></td>
    <td><center>".$object."</center></td>
    <td><center>".$iid."</center></td>
  </tr>";

unset($iid);
unset($object);

$i = $i + 1;
}
$article_content = $article_content."</table>";

}
else {

$article_content = "You must be logged in to view items.";

}
//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
I couldn't continue because I have no idea how to insert a new table, and it's required to insert a table which is:
Code:
id, int(11), not null, auto_increment 
owner, varchar(40), latin1_general_ci, yes (NULL)	
itemtype, varchar(40), latin1_general_ci, yes (NULL)
imgurl, varchar(120), latin1_general_ci, yes (NULL)
But yeah :P
__________________
Regards,
...the CSS lovin' cookie monster...

~C.Maestro
___________________
I'd like to think I'm good at CSS&HTML, so if you need help with designing templates and stuff, feel free to 'come at me bro' with the questions. Haha, also if you need help with installing the Mysidia Adoptables Script, please check out my guide here!
Reply With Quote