本文整理汇总了PHP中list_db函数的典型用法代码示例。如果您正苦于以下问题:PHP list_db函数的具体用法?PHP list_db怎么用?PHP list_db使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了list_db函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formulaire
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: get_roaster
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: ajout_forum_form
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: get_formulaire
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: get_formulaire
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: list_db
<?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: intval
$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)) . '">♦ 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)) . '">± Nouveau Topic</a>';
示例8: list_db
<?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: extract
<?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: menu_arena
<?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;" > </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: dump_db
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: foreach
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: stripslashes
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: get_list_option_user
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: list_db
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 />';