Exemple #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);
        }
    }
Exemple #2
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);
        }
    }
Exemple #3
0
        function get_formulaire_Landing($Landings = array())
        {
            global $rayon_city, $array_landing_type, $_path;
            extract(stripslashes_r($Landings));
            ?>
				
					<form method="POST" action="<?php 
            echo get_link("Landing", "Admin");
            ?>
">
					<table>
									<tr><th colspan="2">Coordonnées de la terrain</th></tr>
					<tr><td><?php 
            echo line_db("Caranille_Landings", "Landing_PosX", isset($Landing_PosX) ? $Landing_PosX : $_POST['PosX']);
            echo line_db("Caranille_Landings", "Landing_PosY", isset($Landing_PosX) ? $Landing_PosY : $_POST['PosY']);
            echo line_db("Caranille_Landings", "Landing_Type", isset($Landing_Type) ? $Landing_Type : 0);
            ?>
</td></tr>
					
				<tr><td class="none" colspan="2">
					<input type="hidden" name="Landing_ID" value="<?php 
            echo isset($Landing_ID) ? $Landing_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 
            }
            ?>
				</td></tr>
					</table>
					</form>		
	<?php 
        }
Exemple #4
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;
    }
}
Exemple #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 
        }
    }
Exemple #6
0
/**
 * genere à la volée le formulaire de la table en parametre
 */
function forumulaire_db($table, $data = array())
{
    //le mot clé "global" permet d'ouvrir la portée des variables
    global $bdd, $db_mapping;
    //debut de la requete
    $form = "<div class='form'>";
    // on recupere le mapping de la table en parametres
    $table_mapping = $db_mapping[$table];
    // pour chaque champs defini dans la table
    foreach ($table_mapping['champs'] as $champs => $prop) {
        //if(isset($table_mapping['key'][$champs])) $key = $table_mapping['key'][$champs];
        //if(!isset($prop['increment']))
        $form .= line_db($table, $champs, isset($data[$champs]) ? $data[$champs] : null);
        //	if(isset($prop['length'])) $length = $prop['length']; 	// longueur du champs
    }
    $form .= "</div>";
    return $form;
}
Exemple #7
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);
            }
        }
    }
Exemple #8
0
         $content .= '</table>';
         $content .= '<input type="submit" name="End_Edit_Event" value="Terminer"/>';
         $content .= '</form>';
     } else {
         $content = '<h4>' . $events[$day]['Event_Name'] . '</h4>';
         $content .= '<p>' . $events[$day]['Event_Description'] . '</p>';
     }
     echo init_popIn('event-' . $events[$day]['Event_ID'] . '-form', "Ev: " . $events[$day]['Event_Name'], $content, 'event-link');
 } else {
     if (has_guild_acces('evenement')) {
         $content = '<form method="POST" action="' . get_link("Calendar", "Guild", array('m' => $month, 'y' => $year)) . '">';
         $content .= '<input type="hidden" name="Event_Guild_ID" value="' . user_data('Account_Guild_ID') . '"/>';
         $content .= '<input type="hidden" name="Event_Date" value="' . "{$year}-{$month}-{$day}" . '"/>';
         $content .= '<table style="width:100%">';
         $content .= '<tr><td>';
         $content .= line_db("Caranille_Events", "Event_Name");
         $content .= call_bbcode_editor("Event_Description");
         //line_db("Caranille_Events","Event_Description");
         $content .= '</td></tr>';
         $content .= '</table>';
         $content .= '<input type="submit" name="End_Add_Event" value="Terminer"/>';
         $content .= '</form>';
         echo init_popIn('event-' . $day . '-form', "Nouvel Evenement", $content, 'event-link');
     }
 }
 echo "<br/>{$day}</td>";
 if ($day == $date->format('t') && $week < 6) {
     echo "\n\t\t\t" . "<td colspan='" . (7 - $week) . "'></td>";
 }
 if ($week == 7 && $day != $date->format('t')) {
     echo "\n\t\t" . "</tr>";
Exemple #9
0
    function get_formulaire_town($Towns = array())
    {
        global $rayon_city, $array_landing_type, $_path;
        extract(stripslashes_r($Towns));
        $_Buildings = list_db('foreign_list', array('table' => 'Caranille_Building', 'ID' => 'Building_Town_ID', 'value' => $Town_ID));
        $l_Buildings = array();
        if (!empty($_Buildings)) {
            foreach ($_Buildings as $b) {
                $x = $b['Building_PosX'];
                $y = $b['Building_PosY'];
                $l_Buildings[$x][$y] = $b;
            }
        }
        ?>
				
				<form method="POST" action="<?php 
        echo get_link("Towns", "Admin");
        ?>
">
				<table>
				<tr><td><?php 
        echo line_db("Caranille_Towns", "Town_Image", isset($Town_Image) ? $Town_Image : '');
        echo line_db("Caranille_Towns", "Town_Name", isset($Town_Name) ? $Town_Name : '');
        echo line_db("Caranille_Towns", "Town_Description", isset($Town_Description) ? $Town_Description : '');
        echo line_db("Caranille_Towns", "Town_Price_INN", isset($Town_Price_INN) ? $Town_Price_INN : '');
        echo line_db("Caranille_Towns", "Town_Chapter", isset($Town_Chapter) ? $Town_Chapter : 0);
        ?>
</td></tr>
								<tr><th colspan="2">Coordonnées de la ville</th></tr>
				<tr><td><?php 
        echo line_db("Caranille_Towns", "Town_PosX", isset($Town_PosX) ? $Town_PosX : $_POST['PosX']);
        echo line_db("Caranille_Towns", "Town_PosY", isset($Town_PosX) ? $Town_PosY : $_POST['PosY']);
        echo line_db("Caranille_Towns", "Town_Landing", isset($Town_Landing) ? $Town_Landing : 0);
        ?>
</td></tr>
				<tr><th colspan="2">Carte de la ville</th></tr>
				
					<tr><td colspan="2"><?php 
        if (file_exists("{$_path}/Sources/Admin/Modules/Towns/Map-2.php")) {
            include_once "{$_path}/Sources/Admin/Modules/Towns/Map-2.php";
        } else {
            echo 'carte indisponible';
        }
        ?>
</td></tr>
			   
		    <tr><td class="none" colspan="2">
				<input type="hidden" name="Town_ID" value="<?php 
        echo isset($Town_ID) ? $Town_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 
        }
        ?>
		    </td></tr>
				</table>
				</form>		
<?php 
    }