Hello.
I have a problem adding a new page that would include php.
I am trying to make an "Auction system", after creating the page it crashes into it
Here is the code that I am trying to use
Php code is added directly when creating a new page, no matter what code I add, always the same error.
Ver Myacc 0.8.2
Thanks !
I have a problem adding a new page that would include php.
I am trying to make an "Auction system", after creating the page it crashes into it
Here is the code that I am trying to use
PHP:
<!--?php require_once 'engine/init.php'; include 'layout/overall/header.php';
$cache = new Cache('engine/cache/ingmarket');
if ($cache->hasExpired()) {
$inGameAuctions = mysql_select_multi('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC');
$cache->setContent($inGameAuctions);
$cache->save();
} else {
$inGameAuctions = $cache->load();
}
$players = 0;
if (isset($_POST)) {
if (isset($_POST['player']) && ! empty($_POST['player'])) {
$name = getValue($_POST['player']);
$player_id = user_character_exist($name);
$inGameAuctions = array_filter($inGameAuctions, function($auction) use($player_id) {
return $player_id == $auction['player'];
});
}
if (isset($_POST['item']) && ! empty($_POST['item'])) {
$item = getValue($_POST['item']);
$inGameAuctions = array_filter($inGameAuctions, function($auction) use($item) {
return strtolower($item) == strtolower($auction['item_name']);
});
}
}
?-->
<table style="height: 291px;" border="0" width="100%" cellspacing="1" cellpadding="4">
<tbody>
<tr style="height: 18px;">
<th style="height: 18px;"><strong>Instruction </strong></th>
</tr>
<tr style="height: 273px;">
<td style="height: 273px;" align="center">
<h2>Commands</h2>
<strong>!offer add, itemName, itemPrice, itemCount</strong><br /> <small>example: !offer add, plate armor, 500, 1</small><br /><br /> <strong>!offer buy, AuctionID</strong><br /><small>example: !offer buy, 1943</small><br /><br /> <strong>!offer remove, AuctionID</strong><br /><small>example: !offer remove, 1943</small><br /><br /> <strong>!offer withdraw</strong><br /><small>Use this command to get money for sold items.</small></td>
</tr>
</tbody>
</table>
<p> </p>
<form action="" method="POST"><input name="player" type="text" placeholder="Player.." /> <input name="item" type="text" placeholder="Item.." /> <input type="submit" value="Search" /></form>
<table class="table table-striped table-bordered table-condensed" width="100%">
<tbody>
<tr>
<th align="center">AuctionID</th>
<th class="white">Image</th>
<th class="white">Item Name</th>
<th class="white">Player</th>
<th class="white">Count</th>
<th class="white">Price</th>
<th class="white">Buy Command</th>
</tr>
<!--?php
if ($inGameAuctions) {
foreach($inGameAuctions as $auction) {
$players++;
if(is_int($players / 2)) {
$bgcolor = "black";
} else {
$bgcolor = "grey";
}
$cost = round($auction['cost']/1000, 2);
?-->
<tr>
<td> </td>
<td><img src="http://185.242.133.156/"http:/items.************/<?php" />.gif"/></td>
<td> </td>
<td><a href="http://185.242.133.156/characterprofile?name=<?php echo $auction[" name="">'> <!--?php echo $auction['name']; ?--> </a></td>
<td> </td>
<td><!--?php echo $cost;?-->k<br /><small><!--?php echo $auction['cost']; ?-->gp</small></td>
<td>!offer buy, <!--?php echo $auction['id']; ?--></td>
</tr>
<!--?php
}
} else {
echo '<tr><td colspan="7">Currently no auctions exists..</td></tr>';
}
echo '</table>';
echo '<p align="right"><span style="font-size: 9px;">System originally created by <a href="https://otland.net/members/vdk.1553/">vDk</a>. | Converted to ZnoteAAC and edited by <a href="https://otland.net/members/halfaway.142275/">HalfAway</a>.</span></p>';
include 'layout/overall/footer.php'; ?--></tbody>
</table>
Php code is added directly when creating a new page, no matter what code I add, always the same error.
Ver Myacc 0.8.2
Thanks !