// $data_where = []; if (isset($_POST['data_where'])) { $data_where = json_decode($_POST['data_where']); } $results = fetch_auth_table_data($data_where); // $json = json_encode($results); if ($json === '') { echo 'JSON Encoding Error: ', json_last_error(), ' - ', json_last_error_msg(); } else { print_r($json); } } // // logic to update the users table if (isset($_POST['update_auth_table'])) { // $form_values = json_decode($_POST['form_values'], true); list($sql_args, $conn) = _update_auth_table($form_values); $sql = gen_prepared_sql($sql_args); // list($msg, $err) = exec_db($sql['statement'], $sql['params'], $conn); $json = json_encode(array('msg' => $msg, 'error' => $err)); // if ($json == '') { echo 'JSON Encoding Error: ', json_last_error(), ' - ', json_last_error_msg(); } else { print_r($json); } }
/** * doit exister un equivalent avec lecture de fichier... */ function list_db($indice = 'list_comments', $data = null) { $requete = get_select_req($indice, $data); $exec = exec_db($requete); $array = array(); if ($exec !== false) { //var_dump($exec); while ($presentation = $exec->fetch(PDO::FETCH_ASSOC)) { foreach ($presentation as $r => $value) { $presentation[$r] = str_replace('<?php', '-nowayman-', $value); $presentation[$r] = str_replace('<script>', '-nowayman2-', $value); } $array[] = $presentation; } $exec->closeCursor(); } if (!empty($array)) { return $array; } return null; }
$end_battle = true; $return = get_link("Main", "Public"); // echec dans un donjon ou une mission, on l'emmene à l'hopital..... if ($_SESSION['Dungeon_Battle'] == 1 || $_SESSION['Mission_Battle'] == 1) { $Town_Price_INN = htmlspecialchars(addslashes($information_Town['Town_Price_INN'])); user_set('Account_Golds', user_data('Account_Golds') - $Town_Price_INN); $HP_recup = $full_life; } if ($_SESSION['Arena_Battle'] == 1) { $message = "Vous avez perdu le combat"; $message .= "Votre défaite dans l'arène vous fait perdre 1 points de notorieté<br />"; $HP_recup = $full_life * ($percent_life_restore_arena / 100); debug_log("HP_recup::{$HP_recup} = {$full_life}*({$percent_life_restore_chapter}/100)<br/>"); user_set('Account_Notoriety', user_data('Account_Notoriety') - 1); $Player_ID = monster_data('ID'); exec_db("UPDATE Caranille_Accounts SET Account_Notoriety= Account_Notoriety + 1 WHERE Account_ID= {$Player_ID}"); } if ($_SESSION['Dungeon_Battle'] == 1) { $Town_Price_INN = htmlspecialchars(addslashes($information_Town['Town_Price_INN'])); $message = 'Vous êtes morts...<br />Vous avez été emmené d\'urgence à l\'auberge et les soins vous ont été facturé ' . $Town_Price_INN . ' Pièce d\'or<br />'; $HP_recup = $full_life; } if ($_SESSION['Chapter_Battle'] == 1) { $HP_recup = $full_life * ($percent_life_restore_chapter / 100); debug_log("HP_recup::{$HP_recup} = {$full_life}*({$percent_life_restore_chapter}/100)"); $_final .= $Chapter_Level['Chapter_Defeate']; } if ($_SESSION['Mission_Battle'] == 1) { $Town_Price_INN = htmlspecialchars(addslashes($information_Town['Town_Price_INN'])); $_final .= $Mission['Mission_Defeate']; $_final .= '<br />Vous avez été emmené d\'urgence à l\'auberge et les soins vous ont été facturé ' . $Town_Price_INN . ' Pièce d\'or<br />';
{ retire_equipement($type); $baseline= "Déséquipement effectué"; } **/ } // jeter if (request_confirm('Drop')) { use_item($Item_ID, $inventory_ID); $baseline = "Item jeté"; } // vente immédiate if (request_confirm('Sale')) { if ($Inventory_ID == $_SESSION['Armor_Inventory_ID'] || $Inventory_ID == $_SESSION['Boots_Inventory_ID'] || $Inventory_ID == $_SESSION['Gloves_Inventory_ID'] || $Inventory_ID == $_SESSION['Helmet_Inventory_ID'] || $Inventory_ID == $_SESSION['Weapon_Inventory_ID']) { $baseline = 'Vous ne pouvez pas vendre cet objet car il est actuellement équipé<br />'; } else { use_item($Item_ID, $inventory_ID); exec_db("UPDATE Caranille_Accounts SET Account_Golds = (Account_Golds + " . intval($Item_Sale_Price) . ") WHERE Account_ID = " . intval($ID) . " limit 1"); $baseline = "Vente effectuée"; } } //Module of Parchement if (request_confirm('Use')) { use_item($Item_ID, $inventory_ID); exec_db("UPDATE Caranille_Accounts\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tAccount_HP_Bonus = Account_HP_Bonus + " . intval($Item_HP_Effect) . "\n\t\t\t\t\t\t, \tAccount_MP_Bonus = Account_MP_Bonus + " . intval($Item_MP_Effect) . "\n\t\t\t\t\t\t, \tAccount_Strength_Bonus = Account_Strength_Bonus + " . intval($Item_Strength_Effect) . "\n\t\t\t\t\t\t, \tAccount_Magic_Bonus = Account_Magic_Bonus + " . intval($Item_Magic_Effect) . "\n\t\t\t\t\t\t, \tAccount_Agility_Bonus = Account_Agility_Bonus + " . intval($Item_Agility_Effect) . "\n\t\t\t\t\t\t, \tAccount_Defense_Bonus = Account_Defense_Bonus + " . intval($Item_Defense_Effect) . "\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tAccount_ID = {$ID}\n\t\t\t\t\t\tLimit 1"); $baseline = "Le parchemin à bien été utilisé "; } } } }