RealSoft
Banned User
Hello. I would like someone to help me!
Rep++ and some other reward will be given!
Ok, this is the deal..
I'm going to start store my quests in database, now I'm not enought PHP Geek to fix a proper table for it.. I tried some but it didn't go well at all <.< hah..
Anyhow..
I want this one to sort out by "name".
it should list all these
Name - Location - level - reward, list everyone with "hidden_id = 0"
table name "world_quest"
I would like it to be samiliar to a house-list,
Here's a Script of the house list, and would love if someone could make it fit for the info I gave above!
Gogo tigers!
Rep++ and some other reward will be given!
Ok, this is the deal..
I'm going to start store my quests in database, now I'm not enought PHP Geek to fix a proper table for it.. I tried some but it didn't go well at all <.< hah..
Anyhow..
I want this one to sort out by "name".
it should list all these
Name - Location - level - reward, list everyone with "hidden_id = 0"
table name "world_quest"
I would like it to be samiliar to a house-list,
Here's a Script of the house list, and would love if someone could make it fit for the info I gave above!
PHP:
<?php
include ("include.inc.php");
$ptitle="Houses - $cfg[server_name]";
include ("header.inc.php");
if (!is_file($cfg['dirdata'].$cfg['house_file']))
throw new Exception('House file not found: '.$cfg['dirdata'].$cfg['house_file']);
?>
<div id="content">
<div class="top">Houses</div>
<div class="mid">
<div style="height: 500px; overflow: auto; margin: 10px;">
<table>
<tr class="color0"><td width="35%"><b>House</b></td><td width="25%"><b>Location</b></td><td width="25%"><b>Owner</b></td><td><b>Size</b></td><td><b>Rent</b></td></tr>
<?php
$HousesXML = simplexml_load_file($cfg['dirdata'].$cfg['house_file']);
$MySQL = new SQL();
$MySQL->myQuery('SELECT `players`.`name`, `houses`.`id` FROM `players`, `houses` WHERE `houses`.`owner` = `players`.`id`;');
if ($MySQL->failed())
throw new Exception('SQL query failed:<br/>'.$SQL->getError());
while ($row = $MySQL->fetch_array()){
$houses[(int)$row['id']] = $row['name'];
}
foreach ($HousesXML->house as $house){
$i++;
$list.= '<tr '.getStyle($i).'><td>'.htmlspecialchars($house['name']).'</td><td>'.htmlspecialchars($cfg['temple'][(int)$house['townid']]['name']).'</td><td>'.$houses[(int)$house['houseid']].'</td><td>'.$house['size'].'</td><td>'.$house['rent'].'</td></tr>'."\r\n";
}
echo $list;
?>
</table>
</div>
</div>
<div class="bot"></div>
</div>
<?php include('footer.inc.php');?>
Gogo tigers!