Пример #1
0
    function formulaire($r = array())
    {
        set_values_db('Caranille_Items', 'Item_Type', array('Parchment'));
        ?>
	        
            <form method="POST" action="<?php 
        echo get_link("Parchments", "Admin");
        ?>
">
            <?php 
        echo forumulaire_db('Caranille_Items', $r);
        ?>
			    <br/>
			<?php 
        echo line_db('Caranille_Craftings', 'Crafting_Fragment_ID');
        ?>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
        if (isset($r["Item_ID"])) {
            $loots = list_db('foreign_list', array('table' => 'Caranille_Craftings', 'ID' => 'Crafting_Item_ID', 'value' => $r["Item_ID"]));
            list_html($loots, "Caranille_Craftings", "Crafts", array('Crafting_Fragment_ID'), true, false);
        }
    }
Пример #2
0
function get_roaster()
{
    global $connect_marge, $roaster_max_membres;
    if (user_data('Account_Roaster_ID') != 0) {
        $Marge = time() - $connect_marge;
        $d = date("Y-m-d H:i:s", $Marge);
        $recrus = list_db("list_roaster", array('Roaster_ID' => user_data('Account_Roaster_ID'), 'timeout' => $d, 'Account_ID' => user_data('Account_ID'), 'limit' => $roaster_max_membres));
        return $recrus;
    }
    return null;
}
Пример #3
0
function ajout_forum_form($map_cat)
{
    $list_rank = list_db('guild_list_rank', array('Guild_ID' => user_data('Account_Guild_ID')));
    foreach ($list_rank as $l) {
        $values[$l['Rank_ID']] = $l['Rank_Name'];
    }
    set_values_db("Caranille_Forums", "Auth_View", $values);
    set_values_db("Caranille_Forums", "Auth_Post", $values);
    set_values_db("Caranille_Forums", "Auth_Topic", $values);
    set_values_db("Caranille_Forums", "Auth_Annonce", $values);
    set_values_db("Caranille_Forums", "Auth_Modo", $values);
    if (has_guild_acces('forum')) {
        $form = '<form method="POST" action="' . get_link("Main", "Guild") . '">';
        $form .= '<h2>Ajout de Forum</h2>';
        $form .= '<input type="hidden" name="Forum_Guild_ID" value="' . user_data('Account_Guild_ID') . '"/>';
        $form .= '<table style="width:100%">';
        $form .= '<tr>';
        $form .= '<td style="width:50%">';
        $form .= line_db("Caranille_Forums", "Forum_Name");
        $form .= 'Catégorie : <select name="Forum_Cat_ID">';
        foreach ($map_cat as $ID => $nom) {
            $form .= '<option value="' . $ID . '">' . $nom . '</option>';
        }
        $form .= '</select>';
        $form .= line_db("Caranille_Forums", "Auth_View");
        $form .= line_db("Caranille_Forums", "Auth_Post");
        $form .= line_db("Caranille_Forums", "Auth_Topic");
        $form .= line_db("Caranille_Forums", "Auth_Annonce");
        $form .= line_db("Caranille_Forums", "Auth_Modo");
        $form .= '</td>';
        $form .= '<td style="width:50%">' . call_bbcode_editor("Forum_Desc", "", "guild-forum") . '</td>';
        $form .= '</tr>';
        $form .= '<tr>';
        $form .= '<td><input type="submit" name="End_Add_Forum" value="Terminer"/></td>';
        $form .= '</tr>';
        $form .= '</table>';
        $form .= '</form>';
        return $form;
    }
}
Пример #4
0
    function get_formulaire($equipment = array())
    {
        global $array_accessory_type;
        //extract(stripslashes_r($equipment));
        set_values_db('Caranille_Items', 'Item_Type', $array_accessory_type);
        ?>
			
			<form method="POST" action="<?php 
        echo get_link("Equipment", "Admin");
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 d'Equipement</h2>
			 <?php 
        echo forumulaire_db('Caranille_Items', $equipment);
        ?>
			    <br/>
			<?php 
        echo line_db('Caranille_Craftings', 'Crafting_Fragment_ID');
        ?>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
        if (isset($r["Item_ID"])) {
            $loots = list_db('foreign_list', array('table' => 'Caranille_Craftings', 'ID' => 'Crafting_Item_ID', 'value' => $r["Item_ID"]));
            list_html($loots, "Caranille_Craftings", "Crafts", array('Crafting_Fragment_ID'), true, false);
        }
    }
Пример #5
0
    function get_formulaire($monster = array())
    {
        ?>
			<form method="POST" action="<?php 
        echo get_link("Monsters", "Admin");
        ?>
">
			 <?php 
        echo forumulaire_db('Caranille_Monsters', $monster);
        ?>
			    <br/>
			
			<?php 
        echo line_db('Caranille_Monster_Loot', 'Loot_Item_ID');
        echo line_db('Caranille_Monster_Loot', 'Loot_Rate');
        ?>
				<input type="submit" name="Back" value="Annuler" />
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
			
			
			
<?php 
        if (isset($monster["Monster_ID"])) {
            $loots = list_db('foreign_list', array('table' => 'Caranille_Monster_Loot', 'ID' => 'Loot_Monster_ID', 'value' => $monster["Monster_ID"]));
            list_html($loots, "Caranille_Monster_Loot", "Loots", array('Loot_Item_ID', 'Loot_Rate'), true, false);
            ?>

<?php 
        }
    }
Пример #6
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Edit')) {
        echo 'Voici la liste des ordres du MMORPG<br /><br />';
        $Orders_List = list_db("exclude_list_t", array('table' => 'Caranille_Orders', 'ID' => 'Order_Name', 'value' => 'Neutre'));
        echo '<table class="Admin list">';
        echo '<tr>';
        echo '<th>Nom</th>';
        echo '<th>Desc</th>';
        echo '<th></th>';
        echo '</tr>';
        foreach ($Orders_List as $Orders) {
            $Order_ID = stripslashes($Orders['Order_ID']);
            echo '<tr>';
            echo '<td>' . stripslashes($Orders['Order_Name']) . "</td>";
            echo '<td>' . stripslashes($Orders['Order_Description']) . "</td>";
            echo '<td><form method="POST" action="' . get_link("Orders", "Admin") . '">';
            echo "<input type=\"hidden\" name=\"Order_ID\" value=\"{$Order_ID}\">";
            echo '<input type="submit" name="Second_Edit" value="Modifier l\'Ordre">';
            //echo '<input type="submit" name="Second_Delete" value="supprimer">';
            echo '</form></td>';
            echo '</tr>';
        }
        echo '</table>';
    } else {
        if (request_confirm('Second_Edit')) {
            $Order_ID = $_POST['Order_ID'];
            $Order = get_db("edit_admin", array('table' => 'Caranille_Orders', 'ID' => 'Order_ID', 'value' => $Order_ID));
            if (!empty($Order)) {
                echo '<form method="POST" action="' . get_link("Orders", "Admin") . '">';
Пример #7
0
$topic = intval(request_get('t'));
//Nombre de pages
$numpage = request_confirm('page') ? intval(request_get('page')) : 1;
/**A partir d'ici, on va compter le nombre de messages pour n'afficher que les 15 premiers
$query=get_db('request_topic',array('topic'=> $topic));**/
extract(stripslashes_r($query));
$forum = $Forum_ID;
$totalDesMessages = $Topic_Post;
$nombreDeMessagesParPage = 15;
$nombreDePages = ceil($totalDesMessages / $nombreDeMessagesParPage);
$premierMessageAafficher = ($numpage - 1) * $nombreDeMessagesParPage;
debug_log("topic->totalDesMessages::{$totalDesMessages}");
debug_log("topic->nombreDeMessagesParPage::{$nombreDeMessagesParPage}");
debug_log("topic->nombreDePages::{$nombreDePages} (ceil({$totalDesMessages} / {$nombreDeMessagesParPage})) ");
debug_log("topic->premierMessageAafficher::{$premierMessageAafficher}( ({$numpage} - 1) * {$nombreDeMessagesParPage} )");
$query = list_db('request_topic_post', array('topic' => $topic, 'premierMessageAafficher' => intval($premierMessageAafficher), 'nombreDeMessagesParPage' => intval($nombreDeMessagesParPage)));
echo '<h1>' . $Topic_Titre . '</h1>';
if (verif_access($Auth_View)) {
    //On affiche les pages 1-2-3 etc...
    echo '<p>Page : ';
    for ($i = 1; $i <= $nombreDePages; $i++) {
        echo $i == $numpage ? $i : '<a href="' . get_link('Topic', 'Forum', array('t' => $topic, 'page' => $i)) . '">' . $i . '</a> ';
    }
    echo '</p>';
    if (verif_access($Auth_Post, true)) {
        //On affiche l'image répondre
        echo '<a href="' . get_link('Poster', 'Forum', array('action' => 'repondre', 't' => $topic)) . '">&diams;&nbsp;&nbsp;Répondre</a>';
    }
    if (verif_access($Auth_Topic, true)) {
        //On affiche l'image nouveau topic
        echo '<a href="' . get_link('Poster', 'Forum', array('action' => 'nouveautopic', 'f' => $Forum_ID)) . '">&plusmn;&nbsp;&nbsp;Nouveau Topic</a>';
Пример #8
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Edit')) {
        $Account_List = list_db("list_t", array('table' => "Caranille_Accounts"));
        list_html_db('Caranille_Accounts', 'Accounts', array('Account_Pseudo', 'Account_Email', 'Account_Access'));
        /**			
        			echo '<table class="Admin list">' ;
        				echo '<tr>' ;
        				echo '<th>Name</th>';
        				echo '<th>Email</th>';
        				echo '<th>Access</th>';
        				echo '<th></th>';
        				echo '</tr>' ;
        				echo '<tr><td class="none" colspan="2" ></td></tr>';
        				
        			foreach($Account_List as $Account)
        			{				
        				$Account_ID = htmlspecialchars(addslashes($Account['Account_ID']));
        ?>				
        				<tr>
        				<td><?php echo htmlspecialchars(addslashes($Account['Account_Pseudo']))?></td>
        				<td><?php echo htmlspecialchars(addslashes($Account['Account_Email']))?></td>
        				<td><?php echo htmlspecialchars(addslashes($Account['Account_Access']))?></td>
        				<td><form method="POST" action="<?php echo get_link("Accounts","Admin") ?>">
        				<input type="hidden" name="Account_ID" value="<?php echo $Account_ID ?>"/>
        				<input type="submit" name="Second_Edit" value="modifier"/>
        				<input type="submit" name="Second_Delete" value="supprimer" />
        				</form></td>
        				</tr>
        				<tr><td class="none" colspan="2" ></td></tr>
Пример #9
0
<?php

if (isset($order) && $order == true) {
    extract($_POST);
    $Order_list = list_db('list_ordres');
    $token = generer_token("Register-step-order");
    if (!empty($Order_list)) {
        foreach ($Order_list as $Order) {
            extract(stripslashes_r($Order));
            $html_order[$Order_ID] = '<h2>' . $Order_Name . '</h2>';
            $html_order[$Order_ID] .= '<p>' . nl2br($Order_Description) . '</p>';
            $html_order[$Order_ID] .= '<form method="POST" action="' . get_link('Order', 'Register') . '">';
            $html_order[$Order_ID] .= "<input type='hidden' name='Order_ID' value='{$Order_ID}' />";
            $html_order[$Order_ID] .= "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
            //$html_order[$Order_ID] .=  '<input type="submit" name="Confirm" value="Rejoindre" />';
            $html_order[$Order_ID] .= '<input type="hidden" name="token" value="' . $token . '"/>';
            $html_order[$Order_ID] .= '<input type="submit" name="Order" value="' . LanguageValidation::nMsg("btn.register.order") . '"/>' . LanguageValidation::eMsg("btn.register.order");
            $html_order[$Order_ID] .= '</form>';
        }
        echo "<div id='Ange' class='Ordre'>" . $html_order[2] . "</div>";
        echo "<div id='Demon' class='Ordre'>" . $html_order[3] . "</div>";
        echo '<p>Bienvenue sur la page des ordres</p>';
        echo '<p>Vous êtes actuellement neutre. Pour participer au PVP dans le champs de batailles vous devez choisir un odre à servir</p>';
        echo '<p>ATTENTION, ce choix est irréversible, choisissez donc bien</p>';
    } else {
        echo '<form method="POST" action="' . get_link('Order', 'Register') . '">';
        echo "<input type='hidden' name='Order_ID' value='0' />";
        echo "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
        //echo '<input type="submit" name="Confirm" value="Rejoindre" />';
        echo '<input type="hidden" name="token" value="' . $token . '"/>';
        echo '<input type="submit" name="Race" value="' . LanguageValidation::nMsg("btn.register.pass") . '"/>' . LanguageValidation::eMsg("btn.register.pass");
Пример #10
0
<?php

if (verif_connect()) {
    menu_arena();
    echo '<table class="newsboard">';
    echo '<tr>';
    echo '<th>' . LanguageValidation::iMsg("label.top.level") . '</th>';
    echo '<th>' . LanguageValidation::iMsg("label.top.xp") . '</th>';
    echo '<th>' . LanguageValidation::iMsg("label.top.notoriety") . '</th>';
    echo '<th>' . LanguageValidation::iMsg("label.top.order") . '</th>';
    echo '<th>' . LanguageValidation::iMsg("label.top.pseudo") . '</th>';
    echo '</tr>';
    $Account_Query = list_db('top_list', array("top_members_limit" => $top_members_limit));
    foreach ($Account_Query as $Account) {
        $xp_purcent = $Account['Account_Experience'] / $Account['Level_Experience_Required'] * 100;
        echo '<tr>';
        echo '<td>' . stripslashes($Account['Level_Number']) . '</td>';
        echo '<td>';
        echo '<div title="' . stripslashes($Account['Account_Experience']) . '/' . stripslashes($Account['Level_Experience_Required']) . '" class="barre" id="xp" >';
        echo '<div style="width:' . $xp_purcent . 'px;" >&nbsp;</div>';
        echo '</div>';
        echo '</td>';
        echo '<td><div class="gain notoriety">' . stripslashes($Account['Account_Notoriety']) . '</div></td>';
        echo '<td>' . stripslashes($Account['Order_Name']) . '</td>';
        echo '<td>';
        echo '<a href="' . get_link('Account', 'Forum', array('m' => $Account['Account_ID'], 'action' => 'consulter')) . '">';
        echo stripslashes($Account['Account_Pseudo']);
        echo '</a>';
        echo '</td>';
        echo '<td>' . (isConnected($Account) ? LanguageValidation::iMsg("global.logged.in") : LanguageValidation::iMsg("global.logged.out")) . '</td>';
        echo '</tr>';
Пример #11
0
function dump_db()
{
    //le mot clé "global" permet d'ouvrir la portée des variables
    global $db_mapping, $_path;
    // création d'un fichier affichant en boucle le contenu des tuples de la base :
    foreach ($db_mapping as $table => $r) {
        $dumpsql[] = get_create_req($table, $r);
        $req_table = list_db("list_t", array("table" => $table));
        if (!empty($req_table)) {
            foreach ($req_table as $record) {
                $dumpsql[] = get_insert_req($table, $record);
            }
        }
    }
    // création du fichier de dump
    $exec = log_files("dump", "sqldump_" . date("Y-m-d-h-i-s") . ".sql", implode("\r\r", $dumpsql));
    return $exec !== false ? true : false;
}
Пример #12
0
            foreach ($_SESSION['CRAFT']['crafting'] as $craft) {
                insert_db('Caranille_Craftings', array('Crafting_Fragment_ID' => $craft, 'Crafting_Item_ID' => $id_item));
            }
        }
        insert_db('Caranille_Inventory', array('Inventory_Account_ID' => user_data('Account_ID'), 'Inventory_Item_ID' => $id_item, 'Inventory_Item_Quantity' => 1, 'Inventory_Item_Equipped' => 'No'));
        unset($_SESSION['CRAFT']);
    } elseif (request_confirm('choose-name')) {
        // saisir un nom et valider les resultats
        // seulement si le craft contient les 5 element requis...
        if (request_confirm('item-frag')) {
            $_SESSION['CRAFT']['crafting'] = $_POST['item-frag'];
            foreach (request_post('item-frag') as $k => $_frag) {
                if ($k >= 0 && $k <= 4) {
                    $frag = get_db("edit_admin", array('table' => 'Caranille_Fragments', 'ID' => 'Fragment_ID', 'value' => $_frag));
                    foreach ($array_character_type as $char) {
                        if (isset($frag['Fragment_' . ucfirst($char) . '_Effect'])) {
                            $_SESSION['CRAFT']['item']['Item_' . ucfirst($char) . '_Effect'] += stripslashes($frag['Fragment_' . ucfirst($char) . '_Effect']);
                        }
                    }
                }
            }
        }
        // 3 pieces et 2 bonus
        // sinon on invite à recommencer ou abandonner
    } elseif (request_confirm('select-frag')) {
        //print_r($_POST);
        $_SESSION['CRAFT']['item']['Item_Type'] = request_post('item-type');
        $_SESSION['CRAFT']['item']['Item_Level_Required'] = user_data('Account_Level');
        $Fragment_Query = list_db('craftable_list', array('Account_ID' => user_data('Account_ID'), "Item_Type" => $_SESSION['CRAFT']['item']['Item_Type']));
    }
}
Пример #13
0
         echo "" . stripslashes(nl2br($monstre['Monster_Description'])) . "<br />";
         echo "HP: ???<br />";
         echo "MP: ???<br />";
         echo '<form method="POST" action="' . get_link("Battle", "Battle") . '">';
         echo '<input type="submit" name="Continue" value="Lancer le combat"/>';
         echo '</form>';
     }
 }
 //else
 if (empty($_POST['Battle'])) {
     echo '<p>' . LanguageValidation::iMsg("intro.battle.dungeon") . '</p>';
     echo '<p>' . LanguageValidation::iMsg("label.choose.monster") . '</p>';
     //	echo '<p>Dans ce lieu vous allez pouvoir combattre des monstres pour vous entrainer</p>';
     //echo '<p>Voici la liste des monstres:</p>';
     $ville_actuel = htmlspecialchars(addslashes($_SESSION['Town_ID']));
     $recherche_monstre = list_db('monster_dungeon', array('ville_actuel' => $ville_actuel));
     if (!empty($recherche_monstre)) {
         foreach ($recherche_monstre as $monstre) {
             $Monster_Image = stripslashes($monstre['Monster_Image']);
             $Monster_ID = stripslashes($monstre['Monster_ID']);
             echo "<img title='" . $monstre['Image_Name'] . "' height='50px' src='data:" . $monstre['Image_Type'] . ";base64," . $monstre['Image_Base64'] . "' /><br/>";
             echo "" . stripslashes($monstre['Monster_Name']) . "<br />";
             echo "" . stripslashes(nl2br($monstre['Monster_Description'])) . "<br />";
             //echo "HP: " .stripslashes($monstre['Monster_HP']). "<br />";
             //echo "MP: " .stripslashes($monstre['Monster_MP']). "<br />";
             echo '<form method="POST" action="' . get_link("Dungeon", "Battle") . '">';
             echo "<input type=\"hidden\" name=\"Monster_ID\" value=\"{$Monster_ID}\">";
             echo '<input type="submit" name="Battle" value="combattre">';
             echo '</form><br />';
         }
     } else {
Пример #14
0
function get_list_option_user()
{
    $Players_List = list_db('list_account');
    $options = "";
    foreach ($Players_List as $Player) {
        $options .= '<option value="' . $Player['Account_ID'] . '">' . $Player['Account_Pseudo'] . '</option>';
    }
    return $options;
}
Пример #15
0
             echo '</tr>';
         }
     }
     echo '</table>';
 }
 if (request_confirm('Craft')) {
     echo 'Voici vos Fragments<br /><br />';
     echo '<table class="inventory">';
     echo '<tr>';
     echo '<th>' . LanguageValidation::iMsg("label.inventory.name") . '</th>';
     echo '<th>' . LanguageValidation::iMsg("label.inventory.image") . '</th>';
     echo '<th>' . LanguageValidation::iMsg("label.inventory.quantite") . '</th>';
     echo '<th>' . LanguageValidation::iMsg("label.inventory.price") . '</th>';
     echo '<th>' . LanguageValidation::iMsg("label.inventory.action") . '</th>';
     echo '</tr>';
     $Fragment_Query = list_db('list_inventaire_fragment', array('Account_ID' => user_data('Account_ID')));
     if (!empty($Fragment_Query)) {
         foreach ($Fragment_Query as $Fragment) {
             extract(stripslashes_r($Fragment));
             $desc = $Fragment_Description . "\r\n\r\n";
             $desc .= '' . LanguageValidation::iMsg("label.level.required") . ' : ' . $Fragment_Level_Required . "\r\n\r\n";
             foreach ($array_character_type as $char) {
                 $desc .= '+' . eval("return \$Fragment_" . $char . "_Effect ;") . ' ' . LanguageValidation::iMsg("label." . strtolower($char) . ".card") . '' . "\r\n";
             }
             //<br />';
             /**					
             					$desc .= '+' .$Fragment_HP_Effect. ' HP'."\r\n";//<br />';
             					$desc .= '+' .$Fragment_MP_Effect. ' MP'."\r\n";//<br />';
             					$desc .= '+' .$Fragment_Strength_Effect. ' Force'."\r\n";//<br />';
             					$desc .= '+' .$Fragment_Magic_Effect. ' Magie'."\r\n";//<br />';
             					$desc .= '+' .$Fragment_Agility_Effect. ' Agilité'."\r\n";//<br />';
Пример #16
0
?>
				</ul>						
			</td>
			<td class="right_panel" valign="top" width="30%" align="left" >
				<table width="90%" border="0" cellpadding="0" cellspacing="0">
					<tbody class="more_panel" >
						<tr>
							<td colspan="2" valign="top" align="left">
								<img src="<?php 
echo $_url . "Design/xakar/images/homepage/informations.gif";
?>
" alt="Informations" class="information_heading" title="Informations" width="164" height="27">
							</td>
						</tr>
						<?php 
$list_news = list_db('limit_list_news', array('limit' => 2));
if (!empty($list_news)) {
    foreach ($list_news as $e => $News) {
        $pl = $e + 1;
        ?>
						 <tr>
							<td valign="top" width="58" align="left">
								<img src="<?php 
        echo $_url . "Design/xakar/images/homepage/no" . $pl . ".gif";
        ?>
" alt="No1" class="no_padding" title="No1" width="52" height="38"></td>
							<td valign="top" align="left"><p class="information_text">
								<?php 
        echo "News publiée le " . news_date($News) . " Par " . $News['News_Account_Pseudo'] . "";
        ?>
<br/>
Пример #17
0
<?php

$_Buildings = list_db('town_building', $array_town);
if (!empty($_Buildings)) {
    foreach ($_Buildings as $b) {
        $x = $b['Building_PosX'];
        $y = $b['Building_PosY'];
        $l_Buildings[$x][$y] = $b;
    }
}
//echo $req_joueurs ;
$l_joueurs = list_db('town_account', $array_town);
if (!empty($l_joueurs)) {
    foreach ($l_joueurs as $joueur) {
        //print_r($joueur);
        $x = $joueur['Position_PosX'];
        $y = $joueur['Position_PosY'];
        $l_joueur[$x][$y] = $joueur['Account_Pseudo'];
    }
}
$posx = 0;
//$recup['posx'];
$posy = 0;
//$recup['posy'];
echo "\t\t\t\t\t" . '<div id="Map" class="city">' . "\n";
$compteurX = $posx - $rayon_city;
$compteurY = $posy + $rayon_city;
$finX = $posx + $rayon_city;
$finY = $posy - $rayon_city;
$debutX = $posx - $rayon_city;
echo "\t\t\t\t\t\t" . '<div class="header ligneMap">' . "\n";
Пример #18
0
<?php

if (isset($race) && $race == true) {
    $Race_list = list_db('list_races');
    $token = generer_token("Register-step-race");
    if (!empty($Race_list)) {
        foreach ($Race_list as $Race) {
            extract(stripslashes_r($Race));
            echo '<h2>' . $Race_Name . '</h2>';
            echo '<p>' . nl2br($Race_Description) . '</p>';
            echo '<form method="POST" action="' . get_link('Race', 'Register') . '">';
            echo "<input type='hidden' name='Race_ID' value='{$Race_ID}' />";
            echo "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
            echo '<input type="hidden" name="token" value="' . $token . '"/>';
            echo '<input type="submit" name="Race" value="' . LanguageValidation::nMsg("btn.register.race") . '"/>' . LanguageValidation::eMsg("btn.register.race");
            echo '</form>';
        }
        echo '<p>ATTENTION, ce choix est irréversible, choisissez donc bien</p>';
    } else {
        echo '<form method="POST" action="' . get_link('Race', 'Register') . '">';
        echo "<input type='hidden' name='Race_ID' value='0' />";
        echo "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
        echo '<input type="hidden" name="token" value="' . $token . '"/>';
        echo '<input type="submit" name="Race" value="' . LanguageValidation::nMsg("btn.register.pass") . '"/>' . LanguageValidation::eMsg("btn.register.pass");
        echo '</form>';
    }
}
Пример #19
0
                delete_db('Caranille_Styles', array('Style_ID' => $id));
            } elseif ($id == 0 && request_confirm('rajout')) {
                insert_db('Caranille_Styles', array('Style_Code' => $Style_Code, 'Style_Commentaire' => $Style_Commentaire));
            }
        }
        // -------------------------------------------
        // On écrit dans le fichier
        // -------------------------------------------
        $retour = list_db("list_t", array('table' => "Caranille_Styles"));
        $fichier = fopen("{$_path}/Design/{$MMORPG_Template}/style.css", "w");
        // On l'ouvre en mode « w »
        $message = '';
        if (!empty($retour)) {
            foreach ($retour as $donnees) {
                $message .= "\n\r";
                // Retour à la ligne
                $message .= "/** " . $donnees['Style_Commentaire'] . " **/";
                // Retour à la ligne
                $message .= "\n\r";
                // Retour à la ligne
                $message .= $donnees['Style_Code'];
                $message .= "\n\r";
                // Retour à la ligne
            }
        }
        fputs($fichier, $message);
        fclose($fichier);
    } else {
        $retour = list_db("list_t", array('table' => "Caranille_Styles"));
    }
}
Пример #20
0
<?php

if (isset($classe) && $classe == true) {
    $classe_list = list_db('list_classes');
    $token = generer_token("Register-step-classe");
    if (!empty($classe_list)) {
        foreach ($classe_list as $class) {
            extract(stripslashes_r($class));
            echo '<h2>' . $Classe_Name . '</h2>';
            echo '<p>' . nl2br($Classe_Description) . '</p>';
            echo '<form method="POST" action="' . get_link('Classe', 'Register') . '">';
            echo "<input type='hidden' name='Classe_ID' value='{$Classe_ID}' />";
            echo "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
            echo '<input type="hidden" name="token" value="' . $token . '"/>';
            echo '<input type="submit" name="Classe" value="' . LanguageValidation::nMsg("btn.register.classe") . '"/>' . LanguageValidation::eMsg("btn.register.classe");
            echo '</form>';
        }
        echo '<p>ATTENTION, ce choix est irréversible, choisissez donc bien</p>';
    } else {
        echo '<form method="POST" action="' . get_link('Classe', 'Register') . '">';
        echo "<input type='hidden' name='Classe_ID' value='0' />";
        echo "<input type='hidden' name='Account_ID' value='" . $user_record['Account_ID'] . "' />";
        //echo '<input type="submit" name="Confirm" value="Rejoindre" />';
        echo '<input type="hidden" name="token" value="' . $token . '"/>';
        echo '<input type="submit" name="Race" value="' . LanguageValidation::nMsg("btn.register.pass") . '"/>' . LanguageValidation::eMsg("btn.register.pass");
        echo '</form>';
    }
}
Пример #21
0
function load_image_config()
{
    $avatar_maxsize = 100;
    $avatar_maxh = 1;
    $avatar_maxl = 1;
    if (!isInstalling()) {
        $conf = list_db('image_config');
        if (!empty($conf)) {
            foreach ($conf as $donnees_jeu) {
                if ($donnees_jeu['Configuration_Name'] === 'avatar_maxsize') {
                    $avatar_maxsize = stripslashes($donnees_jeu['Configuration_Value']);
                }
                if ($donnees_jeu['Configuration_Name'] === 'avatar_maxh') {
                    $avatar_maxh = stripslashes($donnees_jeu['Configuration_Value']);
                }
                if ($donnees_jeu['Configuration_Name'] === 'avatar_maxl') {
                    $avatar_maxl = stripslashes($donnees_jeu['Configuration_Value']);
                }
            }
        }
    }
    return array($avatar_maxsize, $avatar_maxh, $avatar_maxl);
}
Пример #22
0
<?php

if (verif_connect()) {
    if (request_confirm('Write')) {
        echo LanguageValidation::iMsg("intro.message.write");
        $Player_List = list_db('list_account_friends', array('Account_ID' => logged_data('Account_ID')));
        foreach ($Player_List as $Player) {
            $Receiver = strip_tags(stripslashes($Player['Account_Pseudo']));
            $Players[$Receiver] = $Receiver;
        }
        echo formulaire_input(array(select_input("label.message.destinataire", "Receiver", $Players, null, null, "Receiver"), text_input("label.message.subject", "Message_Subject", null, null, null, "placeholder.message.subject"), call_bbcode_editor("Message"), submit_input("Send", "btn.message.send")), "Mailbox-Send", get_link('Mailbox', 'User'), "post", null);
    } else {
        if (request_confirm('Read')) {
            $Messages = list_db('request_mailbox', user_data());
            echo "<table class='newsboard email' >";
            echo "<tr><th><div class='important'>" . LanguageValidation::iMsg("label.message.emetteur") . "</div></th>";
            echo "<th><div class='important'>" . LanguageValidation::iMsg("label.message.subject") . "</div></th>";
            echo "<th>" . LanguageValidation::iMsg("label.message.content") . "</th>";
            echo '<th></th></tr>';
            echo '<tr>';
            echo '<td class="none" colspan="4" >';
            echo '</td>';
            echo '</tr>';
            if (!empty($Messages)) {
                foreach ($Messages as $Message) {
                    extract(stripslashes_r($Message));
                    $ID = get_db('request_mail', $Message);
                    if (!empty($ID)) {
                        $Transmitter = $ID['Account_Pseudo'];
                        echo "<tr><td>{$Transmitter}</td>";
                        echo "<td>{$Private_Message_Subject}</td>";
Пример #23
0
		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
		    </form>
<?php 
    }
    if (request_confirm('Auto_Add')) {
        $max = get_db("level_max");
        $confs = list_db("config_curve");
        foreach ($confs as $c) {
            $curve[$c['Configuration_Name']] = $c['Configuration_Value'];
        }
        $Level = $max['Level_Number'];
        $Experience = $max['Level_Experience_Required'];
        $HP = $max['Level_HP'];
        $MP = $max['Level_MP'];
        $Strength = $max['Level_Strength'];
        $Magic = $max['Level_Magic'];
        $Agility = $max['Level_Agility'];
        $Defense = $max['Level_Defense'];
        $limit = $max['Level_Number'] + $_POST['count_level'];
        while ($Level <= $limit) {
            $HP += $curve['curve-HP'];
            $MP += $curve['curve-MP'];
Пример #24
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Second_Edit')) {
        $Town_ID = request_data('Town_ID');
        $Towns_List = get_db("edit_admin", array('table' => 'Caranille_Towns', 'ID' => 'Town_ID', 'value' => $Town_ID));
        get_formulaire_town($Towns_List);
    } else {
        if (request_confirm('Add')) {
            get_formulaire_town();
        } else {
            echo 'Voici la liste des villes du MMORPG<br /><br />';
            $Towns_List = list_db("list_t", array('table' => "Caranille_Towns"));
            $Landings_List = list_db("list_t", array('table' => "Caranille_Landings"));
            if (!empty($Towns_List)) {
                foreach ($Towns_List as $Towns) {
                    echo "" . stripslashes($Towns['Town_Name']) . "<br />";
                    $Town_ID = stripslashes($Towns['Town_ID']);
                    echo '<form method="POST" action="' . get_link("Towns", "Admin") . '">';
                    echo "<input type=\"hidden\" name=\"Town_ID\" value=\"{$Town_ID}\">";
                    echo '<input type="submit" name="Second_Edit" value="entrer">';
                    echo '</form><br />';
                    $x = $Towns['Town_PosX'];
                    $y = $Towns['Town_PosY'];
                    $l_Twons[$x][$y] = $Towns;
                }
            }
            if (!empty($Landings_List)) {
                foreach ($Landings_List as $Landings) {
                    $x = $Landings['Landing_PosX'];
                    $y = $Landings['Landing_PosY'];
Пример #25
0
 }
 if ($_SESSION['Chapter_Battle'] == 1) {
     $Chapter_Level = get_db("chapter_account", array('Chapter_Number' => user_data('Account_Chapter')));
 }
 //Si la HP du monstre est inférieur ou égale à zero le joueur à gagné le combat
 if (monster_data('HP') <= 0) {
     $end_battle = true;
     $Gold_Gained = monster_data('Golds');
     $_final .= "Vous avez remporté le combat !!!<br /><br />";
     $_final .= "Pièces d'or (PO) + {$Gold_Gained} <br /><br />";
     user_set('Account_Golds', user_data('Account_Golds') + $Gold_Gained);
     if ($_SESSION['Arena_Battle'] !== 1) {
         $Experience_Gained = monster_data('Experience');
         $_final .= "Experience (XP) + {$Experience_Gained} <br />";
         user_set('Account_Experience', user_data('Account_Experience') + $Experience_Gained);
         $loots = list_db('foreign_list', array('table' => 'Caranille_Monster_Loot', 'ID' => 'Loot_Monster_ID', 'value' => monster_data("ID")));
         if (!empty($loots)) {
             foreach ($loots as $loot) {
                 $Monster_Item_Rate = mt_rand(0, 100);
                 if ($Monster_Item_Rate <= $loot['Loot_Rate']) {
                     $Item = gain_item($loot['Loot_Item_ID']);
                     if ($Item != null) {
                         $Item_Name = stripslashes($Item['Item_Name']);
                         $_final .= "Vous avez gagné l'objet suivant: {$Item_Name}<br />";
                     }
                 }
             }
         }
     }
     if ($_SESSION['Arena_Battle'] == 1) {
         $message = "Votre victoire dans l'arène vous rapporte 1 points de notoriete<br />";
Пример #26
0
<?php

$membre = intval(request_get('m'));
$Resultat = list_db('public_diary_list', array('Account_ID' => $membre));
$query = get_db('account_forum', array('membre' => $membre));
extract($query);
Пример #27
0
        WHERE Topic_ID = '$Topic_ID' 
        	and Topic_Guild_ID = '".guild_data('Guild_ID')."'
        limit 1; ";
        //A partir d'ici, on va compter le nombre de messages pour n'afficher que les 15 premiers
        $query=get_db($r);
        
        extract(stripslashes_r($query));
        $Forum_ID=$Forum_ID; 
        
        **/
        $totalDesMessages = $Topic_Post + 1;
        $nombreDeMessagesParPage = 15;
        $nombreDePages = ceil($totalDesMessages / $nombreDeMessagesParPage);
        $premierMessageAafficher = ($numpage - 1) * $nombreDeMessagesParPage;
        //echo $r;
        $query = list_db('request_guild_topic_post', array('Guild_ID' => guild_data('Guild_ID'), 'Topic_ID' => $Topic_ID, 'premierMessageAafficher' => intval($premierMessageAafficher), 'nombreDeMessagesParPage' => intval($nombreDeMessagesParPage)));
        ?>

<?php 
        echo '<h1>' . $Topic_Titre . '</h1>';
        if (verif_access($Auth_view)) {
            //On affiche les pages 1-2-3 etc...
            echo '<p>Page : ';
            for ($i = 1; $i <= $nombreDePages; $i++) {
                echo $i == $numpage ? $i : '<a href="' . get_link('Topic', 'Guild', array('t' => $Topic_ID, 'page' => $i)) . '">' . $i . '</a> ';
            }
            echo '</p>';
            if (verif_access($Auth_Post, true)) {
                //On affiche l'image répondre
                echo '<a href="' . get_link('Poster', 'Guild', array('action' => 'repondre', 't' => $Topic_ID)) . '">&diams;&nbsp;&nbsp;Répondre</a>';
            }
Пример #28
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Edit')) {
        $Weapon_List = list_db("ref_list_t", array('table' => 'Caranille_Items', 'ID' => 'Item_Type', 'ref' => implode("','", $array_weapon_type)));
        list_html($Weapon_List, "Caranille_Items", "Weapons", array('Item_Level', 'Item_Name', 'Item_Type', 'Item_HP_Effect', 'Item_MP_Effect', 'Item_Strength_Effect', 'Item_Magic_Effect', 'Item_Agility_Effect', 'Item_Defense_Effect'));
    } else {
        if (request_confirm('Second_Edit')) {
            $Item_ID = request_data('Item_ID');
            $Weapon = get_db("edit_admin", array('table' => 'Caranille_Items', 'ID' => 'Item_ID', 'value' => $Item_ID));
            get_formulaire($Weapon);
        } else {
            if (request_confirm('Add')) {
                get_formulaire();
            } else {
                if (request_confirm('Second_Delete')) {
                    $Item_ID = request_data('Item_ID');
                    ?>
            <p>Supprimer definitivement ?</p>
                <form method="POST" action="<?php 
                    echo get_link("Weapons", "Admin");
                    ?>
">
				<input type="hidden" name="Item_ID" value="<?php 
                    echo $Item_ID;
                    ?>
"/>
				<input type="submit" name="Back" value="Annuler" />
				<input type="submit" name="Delete" value="supprimer" />
				</form>
<?php 
Пример #29
0
<?php

$Messages_Q = list_db('public_chatroom');
echo '<meta http-equiv="refresh" content="5;URL=' . get_link('list', 'chat') . '">';
if (!empty($Messages_Q)) {
    echo '<table class="newsboard chatroom" >';
    foreach ($Messages_Q as $Messages) {
        $Pseudo = stripslashes($Messages['Account_Pseudo']);
        $ID_message = stripslashes($Messages['Chat_Message_ID']);
        echo '<tr>';
        echo '<td>';
        echo '<a href="' . get_link('Account', 'Forum', array('m' => $Account['Account_ID'], 'action' => 'consulter')) . '">';
        echo stripslashes($Pseudo);
        echo '</a>';
        echo '</td>';
        echo '<td class="message">';
        echo stripslashes($Messages['Chat_Message']);
        echo '</td>';
        if (verif_access("Admin", true)) {
            //echo '<td>'.time().'</td>';
            echo '<td>';
            echo '<form method="POST" action="' . get_link('list', 'chat') . '">';
            echo "<input type=\"hidden\" name=\"ID_message\" value=\"{$ID_message}\">";
            echo '<input type="submit" name="Delete" value="X">';
            echo '</form>';
            echo '</td>';
        }
        echo '</tr>';
    }
    echo '</table>';
}
Пример #30
0
    function formulaire($Account)
    {
        global $prefixe_salt, $suffixe_salt, $array_access_type;
        extract($Account);
        ?>
				<form method="POST" action="<?php 
        echo get_link("Accounts", "Admin");
        ?>
">
				<table>
				<tr><th colspan="3" >Identifiants</th></tr>
				<tr><td colspan="3" ><?php 
        echo line_db("Caranille_Accounts", "Account_Pseudo", $Account_Pseudo);
        echo line_db("Caranille_Accounts", "Account_Email", $Account_Email);
        echo line_db("Caranille_Accounts", "Account_Password", password_decode($prefixe_salt . $Account_Salt . $suffixe_salt, $Account_Password));
        echo line_db("Caranille_Accounts", "Account_Access", $Account_Access);
        echo line_db("Caranille_Accounts", "Account_Valid", $Account_Valid);
        ?>
</td></tr>
			    <tr><td class="none" colspan="3" ></td></tr>
				
				<tr><th colspan="3" >Connection</th></tr>
				<tr><td colspan="3" ><?php 
        echo line_db("Caranille_Accounts", "Account_Last_Connection", $Account_Last_Connection);
        echo line_db("Caranille_Accounts", "Account_Last_IP", $Account_Last_IP);
        echo line_db("Caranille_Accounts", "Account_Last_Connected", $Account_Last_Connected);
        ?>
</td></tr>
				
				<tr><td class="none" colspan="3" ></td></tr>

				<tr><th colspan="3" >Stats</th></tr>
				<tr><th></th><th>Restant</th><th>Bonus</th></tr>
				<tr><td>HP</td>
					<td><input type="text" name="Account_HP_Remaining" value="<?php 
        echo $Account_HP_Remaining;
        ?>
"/></td>
					<td><input type="text" name="Account_HP_Bonus" value="<?php 
        echo $Account_HP_Bonus;
        ?>
"/></td>
				</tr>
				<tr><td>MP</td>
					<td><input type="text" name="Account_MP_Remaining" value="<?php 
        echo $Account_MP_Remaining;
        ?>
"/></td>
					<td><input type="text" name="Account_MP_Bonus" value="<?php 
        echo $Account_MP_Bonus;
        ?>
"/></td>
				</tr>
				<tr><td>Force</td><td></td><td><input type="text" name="Account_Strength_Bonus" value="<?php 
        echo $Account_Strength_Bonus;
        ?>
"/></td></tr>
				<tr><td>Magie</td><td></td><td><input type="text" name="Account_Magic_Bonus" value="<?php 
        echo $Account_Magic_Bonus;
        ?>
"/></td></tr>
				<tr><td>Agility</td><td></td><td><input type="text" name="Account_Agility_Bonus" value="<?php 
        echo $Account_Agility_Bonus;
        ?>
"/></td></tr>
				<tr><td>Defense</td><td></td><td><input type="text" name="Account_Defense_Bonus" value="<?php 
        echo $Account_Defense_Bonus;
        ?>
"/></td></tr>
				
				<tr><td class="none" colspan="3" ></td></tr>
				
				<tr><th colspan="3" >Progression</th></tr>
				<tr><td colspan="3" ><?php 
        echo line_db("Caranille_Accounts", "Account_Level", $Account_Level);
        echo line_db("Caranille_Accounts", "Account_Experience", $Account_Experience);
        echo line_db("Caranille_Accounts", "Account_Golds", $Account_Golds);
        echo line_db("Caranille_Accounts", "Account_Notoriety", $Account_Notoriety);
        echo line_db("Caranille_Accounts", "Account_Chapter", $Account_Chapter);
        echo line_db("Caranille_Accounts", "Account_Mission", $Account_Mission);
        echo line_db("Caranille_Accounts", "Account_Order", $Account_Order);
        echo line_db("Caranille_Accounts", "Account_Guild_ID", $Account_Guild_ID);
        ?>
</td></tr>
				
				<tr><td class="none" colspan="3" ></td></tr>
				
				<tr><th colspan="3" >Infos complémentaires</th></tr>
				<tr><td colspan="3" ><?php 
        echo line_db("Caranille_Accounts", "Account_siteweb", $Account_siteweb);
        echo line_db("Caranille_Accounts", "Account_Avatar", $Account_Avatar);
        echo line_db("Caranille_Accounts", "Account_Signature", $Account_Signature);
        echo line_db("Caranille_Accounts", "Account_localisation", $Account_localisation);
        ?>
</td></tr>
				
				<tr><td class="none" colspan="3" ></td></tr>
				
				<tr><th colspan="3" >Banissement</th></tr>
				<tr><td colspan="3" ><?php 
        echo line_db("Caranille_Accounts", "Account_Status", $Account_Status);
        echo line_db("Caranille_Accounts", "Account_Reason", $Account_Reason);
        ?>
</td></tr>
				
				<tr><td class="none" colspan="3" ></td></tr>
				
				<tr>
					<td class="none" colspan="3" >
						<input type="submit" name="Back" value="Annuler" />
						<input type="submit" name="End_Edit" value="Terminer"/>
				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
					</td>
				</tr>				
				</table>
    			<?php 
        echo line_db("Caranille_Accounts", "Account_ID", $Account_ID);
        ?>
			</form>
<?php 
        if (isset($Account["Account_ID"])) {
            $loots = list_db('foreign_list', array('table' => 'Caranille_Inventory', 'ID' => 'Inventory_Account_ID', 'value' => $Account["Account_ID"]));
            if (!empty($loots)) {
                list_html($loots, "Caranille_Inventory", "Accounts", array('Inventory_Item_ID', 'Inventory_Item_Quantity', 'Inventory_Item_Equipped'), false, false);
            }
            $loots = list_db('foreign_list', array('table' => 'Caranille_Inventory_Invocations', 'ID' => 'Inventory_Invocation_Account_ID', 'value' => $Account["Account_ID"]));
            if (!empty($loots)) {
                list_html($loots, "Caranille_Inventory_Invocations", "Accounts", array('Inventory_Invocation_Invocation_ID'), false, false);
            }
            $loots = list_db('foreign_list', array('table' => 'Caranille_Inventory_Magics', 'ID' => 'Inventory_Magic_Account_ID', 'value' => $Account["Account_ID"]));
            if (!empty($loots)) {
                list_html($loots, "Caranille_Inventory_Magics", "Accounts", array('Inventory_Magic_Magic_ID'), false, false);
            }
        }
    }