Ejemplo n.º 1
0
function getAmount($authMethod)
{
    global $amount, $amountPremium;
    if (isPremium($authMethod)) {
        return modAmount($amountPremium);
    } else {
        return modAmount($amount);
    }
}
Ejemplo n.º 2
0
    $houses_info = $SQL->query("SELECT * FROM `houses` WHERE `world_id` = " . $world_id . " and `town` = " . $town_id . " " . $stat . " ORDER BY `name`");
}
$players_info = $SQL->query("SELECT `houses`.`id` AS `houseid` , `players`.`name` AS `ownername` , `accounts`.`premdays` AS `premdays` , `accounts`.`lastday` AS `lastlogin` FROM `houses` , `players` , `accounts` WHERE `players`.`id` = `houses`.`owner` AND `accounts`.`id` = `players`.`account_id`");
$players = array();
foreach ($players_info->fetchAll() as $player) {
    $players[$player['houseid']] = array('name' => $player['ownername'], 'days' => $player['premdays'], 'last' => $player['lastlogin']);
}
foreach ($houses_info->fetchAll() as $house) {
    $owner = $players[$house['id']];
    if (is_int($number_of_rows / 2)) {
        $bgcolor = $config['site']['darkborder'];
    } else {
        $bgcolor = $config['site']['lightborder'];
    }
    $number_of_rows++;
    $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>' . $house['name'] . '</td><td align="right" width="35">' . $house['size'] . '</td><td align="right" width="65">' . $house['price'] / 1000 . 'k gp</td><td>' . $towns_list[(int) $house['world_id']][(int) $house['town']] . '</td><td>';
    if (!empty($owner['name'])) {
        if ($owner['deleted'] > 0) {
            $status = '<font color=red><b>[DELETED]</b></font>';
        }
        if (isPremium($owner['days'], $owner['last'])) {
            $main_content .= 'Rented by <a href="?subtopic=characters&name=' . urlencode($owner['name']) . '">' . $owner['name'] . '</a>' . $status . '';
        } else {
            $main_content .= 'Rented by <a href="?subtopic=characters&name=' . urlencode($owner['name']) . '">' . $owner['name'] . '</a>' . $status . ' (FACC)';
        }
    } else {
        $main_content .= 'Empty';
    }
    $main_content .= '</td></tr>';
}
$main_content .= '</TABLE>';
 if (!isset($_GET['to'])) {
     afficherMembres();
 } else {
     if (isset($_GET['to']) && $_GET['to'] == 'listeGroupe' && !hasGroupe()) {
         listeGroupe();
     } else {
         if (isset($_GET['to']) && $_GET['to'] == 'creerGroupe') {
             if (hasGroupe()) {
                 header("Location:../");
             } else {
                 creerGroupe();
                 formCreerGroupe();
             }
         } else {
             if (isset($_GET['to']) && $_GET['to'] == 'ajouter' && isset($_GET['membre']) && membreExistant() && !isInGroupe($_GET['membre']) && $_GET['membre'] != $_SESSION['User']->getId()) {
                 if (isPremium() && sameActivity($_GET['membre']) && hasGroupe()) {
                     envoiInvitation();
                     formAjouter();
                 } else {
                     header("Location:groupe.page.php");
                 }
             } else {
                 if (isset($_GET['to']) && $_GET['to'] == 'rejoindre' && isset($_GET['groupe']) && !hasGroupe() && groupeExiste() && groupeSameActivity()) {
                     if (isset($_POST['AccepterRejoindre']) || isset($_POST['RefuserRejoindre'])) {
                         rejoindreGroupe();
                     } else {
                         formRejoindreGroupe();
                     }
                 } else {
                     if (isset($_GET['to']) && $_GET['to'] == 'voirGroupe' && isset($_GET['action']) && $_GET['action'] == 'mod') {
                         gererActionGroupe();