예제 #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_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);
        }
    }
예제 #3
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 
        }
    }
예제 #4
0
function list_html_db($table, $page, $header = array())
{
    global $db_mapping;
    // on recupere le mapping de la table en parametres
    $table_mapping = $db_mapping[$table];
    foreach ($table_mapping['champs'] as $champs => $prop) {
        if (isset($prop['increment'])) {
            $primary = $champs;
        }
        if (isset($prop['Ordering'])) {
            $orderer = $champs;
        }
    }
    foreach ($table_mapping['key'] as $champs => $r) {
        if (preg_match('/PRIMARY/i', $r['key'])) {
            //($r['key']=='PRIMARY')
            $primary = $champs;
        }
    }
    $List = list_db("order_list_t", array('table' => $table, 'ordering' => isset($orderer) ? $orderer : $primary));
    //.(isset($orderer) ? "ORDER BY `$orderer` ASC" : "ORDER BY `$primary` ASC") );
    list_html($List, $table, $page, $header);
}
예제 #5
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);
            }
        }
    }
예제 #6
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 
예제 #7
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Edit')) {
        $Parchement_List = list_db("ref_list_t", array('table' => 'Caranille_Items', 'ID' => 'Item_Type', 'ref' => "Parchment"));
        list_html($Parchement_List, "Caranille_Items", "Parchments", 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');
            $Parchement_List_Query = get_db("edit_admin", array('table' => 'Caranille_Items', 'ID' => 'Item_ID', 'value' => $Item_ID));
            formulaire($Parchement_List);
        } else {
            if (request_confirm('Add')) {
                formulaire();
            } else {
                echo 'Que souhaitez-vous faire ?<br />';
                echo '<form method="POST" action="' . get_link("Parchments", "Admin") . '">';
                echo '<input type="submit" name="Add" value="Ajouter un parchemin">';
                echo '<input type="submit" name="Edit" value="Modifier un parchemin">';
                echo '</form>';
            }
        }
    }
}
예제 #8
0
<?php

if (verif_access("Admin")) {
    if (request_confirm('Edit')) {
        $Fragments_List = list_db("list_t", array('table' => "Caranille_Fragments"));
        list_html($Fragments_List, "Caranille_Fragments", "Fragments", array('Fragment_Level', 'Fragment_Name', 'Fragment_HP_Effect', 'Fragment_MP_Effect', 'Fragment_Strength_Effect', 'Fragment_Magic_Effect', 'Fragment_Agility_Effect', 'Fragment_Defense_Effect'));
    } else {
        if (request_confirm('Second_Edit')) {
            $Fragment_ID = request_data('Fragment_ID');
            $Fragments = get_db("edit_admin", array('table' => 'Caranille_Fragments', 'ID' => 'Fragment_ID', 'value' => $Fragment_ID));
            formulaire($Fragments);
        } else {
            if (request_confirm('Second_Delete')) {
                $Fragment_ID = request_data('Fragment_ID');
                ?>
            <p>Supprimer definitivement ?</p>
                <form method="POST" action="<?php 
                echo get_link("Fragments", "Admin");
                ?>
">
				<input type="hidden" name="Fragment_ID" value="<?php 
                echo $Fragment_ID;
                ?>
"/>
				<input type="submit" name="Back" value="Annuler" />
				<input type="submit" name="Delete" value="supprimer" />
				</form>
<?php 
            } else {
                if (request_confirm('Add')) {
                    formulaire();