Removed some dowuery calls in deprecated code. Updated labels Updated requirements & types for ore miner Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
109 lines
3.7 KiB
PHP
109 lines
3.7 KiB
PHP
<?php
|
|
/**
|
|
* This file is part of Wootook
|
|
*
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
|
* @see http://wootook.org/
|
|
*
|
|
* Copyright (c) 2009-Present, Wootook Support Team <http://wootook.org>
|
|
* All rights reserved.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* --> NOTICE <--
|
|
* This file is part of the core development branch, changing its contents will
|
|
* make you unable to use the automatic updates manager. Please refer to the
|
|
* documentation for further information about customizing Wootook.
|
|
*
|
|
*/
|
|
|
|
define('INSIDE' , true);
|
|
define('INSTALL' , false);
|
|
require_once dirname(__FILE__) .'/application/bootstrap.php';
|
|
|
|
$readAdapter = Wootook_Core_Database_ConnectionManager::getSingleton()->getConnection('core_read');
|
|
$writeAdapter = Wootook_Core_Database_ConnectionManager::getSingleton()->getConnection('core_write');
|
|
|
|
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
|
|
|
if ($action == 5) {
|
|
$writeAdapter->insert()
|
|
->into($writeAdapter->getTable('annonce'))
|
|
->set('user', $user->getUsername())
|
|
->set('galaxie', $planet->getGalaxy())
|
|
->set('systeme', $planet->getSystem())
|
|
->set('metala', Wootook::getRequest()->getParam('metalvendre'))
|
|
->set('cristala', Wootook::getRequest()->getParam('cristalvendre'))
|
|
->set('deuta', Wootook::getRequest()->getParam('deutvendre'))
|
|
->set('metals', Wootook::getRequest()->getParam('metalsouhait'))
|
|
->set('cristals', Wootook::getRequest()->getParam('cristalsouhait'))
|
|
->set('deuts', Wootook::getRequest()->getParam('deutsouhait'))
|
|
->execute()
|
|
;
|
|
|
|
$page2 .= <<<HTML
|
|
<center>
|
|
<br>
|
|
<p>Votre Annonce a bien été enregistrée !</p>
|
|
<br><p><a href="annonce.php">Retour aux annonces</a></p>
|
|
|
|
HTML;
|
|
|
|
display($page2);
|
|
}
|
|
|
|
if ($action != 5) {
|
|
$statement = $readAdapter->select()->from(array('annonce' => $readAdapter->getTable('annonce')))->order('id', 'DESC')->prepare();
|
|
|
|
$page2 = "<HTML>
|
|
<center>
|
|
<br>
|
|
<table width=\"600\">
|
|
<td class=\"c\" colspan=\"10\"><font color=\"#FFFFFF\">Petites Annonces</font></td></tr>
|
|
<tr><th colspan=\"3\">Infos de livraison</th><th colspan=\"3\">Ressources à vendre</th><th colspan=\"3\">Ressources souhaitées</th><th>Action</th></tr>
|
|
<tr><th>Vendeur</th><th>Galaxie</th><th>Système</th><th>Métal</th><th>Cristal</th><th>Deuterium</th><th>Métal</th><th>Cristal</th><th>Deuterium</th><th>Delet</th></tr>
|
|
";
|
|
|
|
foreach ($statement as $b) {
|
|
$page2 .= '<tr><th> ';
|
|
$page2 .= $b["user"] ;
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["galaxie"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["systeme"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["metala"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["gcristala"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["deuta"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["metals"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["cristals"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= $b["deuts"];
|
|
$page2 .= '</th><th>';
|
|
$page2 .= "</th></tr>";
|
|
}
|
|
|
|
$page2 .= "
|
|
<tr><th colspan=\"10\" align=\"center\"><a href=\"annonce2.php?action=2\">Ajouter une Annonce</a></th></tr>
|
|
</td>
|
|
</table>
|
|
</HTML>";
|
|
|
|
display($page2);
|
|
}
|
|
|