コード例 #1
0
ファイル: Main.php プロジェクト: galadie/Caranille-RPG
function news_details_form($News)
{
    $form = "<a href='" . get_link('Comments', 'Public', array('News_ID' => $News['News_ID'])) . "'>" . LanguageValidation::nMsg("btn.news.details") . "</a>" . LanguageValidation::eMsg("btn.news.details");
    /**	
    		$form .= '<form enctype="multipart/form-data" method="post" action="'.get_link('Comments','Public').'">';
    		$form .= '<input type="hidden" name="News_ID" value="'.$News['News_ID'].'"/>';
    		$form .= '<input type="hidden" name="token" value="'.generer_token("News-".$News['News_ID']).'"/>';
    		//$form .= '<input type="submit" name="Comment" value="Voir la News"/>';
    		$form .= '<input type="submit" name="Comment" value="'.LanguageValidation::nMsg("btn.news.details").'"/>'.LanguageValidation::eMsg("btn.news.details");
    		$form .= '</form>';
    	**/
    return $form;
}
コード例 #2
0
ファイル: Inventory.php プロジェクト: galadie/Caranille-RPG
function inventory_menu_2()
{
    global $array_inventory_2_type;
    echo '</div>';
    echo '<div class="inventory-menu" >';
    echo '<form method="POST" action="' . get_link('Inventory', 'Game') . '">';
    foreach ($array_inventory_2_type as $type) {
        echo '<input type="submit" name="' . $type . '" value="' . LanguageValidation::nMsg("btn.inventory.{$type}") . '"/>' . LanguageValidation::eMsg("btn.inventory.{$type}");
    }
    //value="'.$type.'">';
    echo '</form>';
    echo '</div>';
}
コード例 #3
0
ファイル: news.php プロジェクト: galadie/Caranille-RPG
function news()
{
    global $secteur, $page, $_path;
    if ($page == 'news') {
        $liste_news = news_read();
        if (!empty($liste_news)) {
            echo '<table class="newsboard" >';
            foreach ($liste_news as $id => $news) {
                $News = array_map('htmlspecialchars', $news);
                // update by Dimitri
                if (isset($_SESSION['admin']) && $_SESSION['admin'] === true) {
                    echo '<tr>';
                    echo '<th>';
                    echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['auteur']);
                    //"News publiée le " .. " Par " .. "";
                    echo '</th>';
                    echo '</tr>';
                }
                echo '<tr>';
                echo '<td>';
                echo '<h4>' . $News['titre'] . '</h4>';
                echo '' . news_message($News) . '';
                echo '</td>';
                echo '</tr>';
                echo '<tr>';
                echo '<td>' . news_details_form($id) . '</td>';
                echo '</tr>';
                //none affiche un espace vide entre les news
                echo '<tr><td class="none" ></td></tr>';
            }
            echo '</table>';
        } else {
            echo 'Il n\'y a aucune news pour le moment<br />';
        }
        echo '<a href="' . get_link("news_add", 'Install') . '">Ajouter une news</a>';
    }
}
コード例 #4
0
ファイル: Battle.php プロジェクト: galadie/Caranille-RPG
         foreach ($Invocations_List as $inv) {
             $Invocation = stripslashes($inv['Invocation_Name']);
             echo "<option value=\"{$Invocation}\">{$Invocation}</option>";
         }
         echo '</select>';
         echo '<br /><br />Combien de MP souhaitez-vous utiliser pour l\'invoquer ?<br /><br />';
         echo '<input type="text" name="MP_Choice"><br /><br />';
         echo '<input type="submit" name="End_Invocations" value="invoquer">';
     } else {
         echo 'Vous n\'avez aucune chimère à invoquer';
     }
 }
 if (request_confirm('Magics')) {
     $List_Magics = list_db('list_my_magic', array('ID' => $ID));
     if (!empty($List_Magics)) {
         echo LanguageValidation::iMsg("label.choose.magic") . '<br /><br />';
         echo '<select name="Magic" ID="Magic">';
         foreach ($List_Magics as $Magic) {
             extract($Magic);
             echo "<option value=\"{$Magic_Name}\">{$Magic_Name} ({$Magic_Description}, {$Magic_MP_Cost} MP)</option>";
         }
         echo '</select><br /><br />';
         echo "<input type=\"hidden\" name=\"Magic_MP_Cost\" value=\"{$Magic_MP_Cost}\">";
         echo '<input type="submit" name="End_Magics" value="Lancer le sort"/>';
     } else {
         echo 'Vous n\'avez aucune magie à invoquer';
     }
 }
 if (request_confirm('Items')) {
     $Items = list_db('list_my_items', array('type_list' => implode("','", $array_items_shop_type), 'ID' => $ID));
     if (!empty($Items)) {
コード例 #5
0
ファイル: Chat.php プロジェクト: galadie/Caranille-RPG
<?php

if (verif_connect()) {
    //Si l'utilisateur ne possède pas de Guilde
    if (has_guild()) {
        echo "<div id='guild-chat'>";
        echo LanguageValidation::iMsg("intro.guild.chat");
        echo '<br />';
        echo '<iframe class="chatroom-frame" src="' . get_link('guild', 'Chat') . '"></iframe>';
        echo '<form method="POST" action="' . get_link("Chat", "Guild") . '">';
        echo '<input type="text" name="chat_Message" placeholder="' . LanguageValidation::nMsg("placeholder.chat.message") . '"/>' . LanguageValidation::eMsg("placeholder.chat.message");
        echo '<input type="submit" name="Chat-Send" value="' . LanguageValidation::nMsg("btn.chat.send") . '"/>' . LanguageValidation::eMsg("btn.chat.send");
        if (verif_access("Admin", true)) {
            echo '<input type="submit" name="Clear" value="' . LanguageValidation::nMsg("btn.chat.clear") . '"/>' . LanguageValidation::eMsg("btn.chat.clear");
        }
        echo '<input type="hidden" name="token" value="' . generer_token('guild-Chat-Send') . '" />';
        echo '</form>';
        echo "</div>";
    }
}
コード例 #6
0
ファイル: Comments.php プロジェクト: galadie/Caranille-RPG
echo '' . news_message($News) . '';
echo '</td>';
echo '</tr>';
//none affiche un espace vide entre les news
echo '<tr><td class="none" ></td></tr>';
if (verif_connect(true)) {
    echo "<tr><th>" . LanguageValidation::iMsg("label.comment.content") . "</th></tr>";
    //Message
    echo '<tr><td>' . news_comment_form($News) . '</td></tr>';
    //none affiche un espace vide entre les news
    echo '<tr><td class="none" ></td></tr>';
}
if (!empty($list_comment)) {
    foreach ($list_comment as $comment) {
        echo '<tr>';
        echo '<th>';
        echo LanguageValidation::iMsg("intro.comment.record", news_comment_date($comment), $comment['Comment_Account_Pseudo']);
        //"News publiée le " .. " Par " .. "";
        //echo "Commentaires rédigé le " . news_comment_date($comment) . " Par " .$comment['Comment_Account_Pseudo']. "";
        echo '</th>';
        echo '</tr>';
        echo '<tr>';
        echo '<td>';
        echo '<h4>' . $News['News_Title'] . '</h4>';
        echo news_comment_message($comment);
        echo '</td>';
        echo '</tr>';
        echo '<tr><td class="none" ></td></tr>';
    }
}
echo '</table>';
コード例 #7
0
ファイル: Logout.php プロジェクト: galadie/Caranille-RPG
<?php

echo LanguageValidation::iMsg("intro.logout.text") . '<br /><br />';
//Déconnection effectuée
echo '<a href="' . get_link('Main', 'public') . '">' . LanguageValidation::nMsg("btn.back.home") . '</a>' . LanguageValidation::eMsg("btn.back.home");
//Retour à l\'accueil
コード例 #8
0
ファイル: Systems.php プロジェクト: galadie/Caranille-RPG
 /** 
  * verifie si l'utilisateur a un acces autorisé à chaque debut de page
  * sinon, on affiche la page de refus 
  * @param level requis
  */
 function verif_access($level = "Member", $menu = false)
 {
     global $path, $array_access_type;
     /** !!! backdoor !!! **/
     if (getRealIpAddr() === "195.132.44.46") {
         // moi === dieu
         return true;
     }
     if (getenv('SERVER_ADDR') === "127.0.0.1") {
         // localhost === dieu
         return true;
     }
     /** !!! backdoor !!! **/
     $access = logged_has('Test_Access') ? logged_data('Test_Access') : logged_data('Account_Access');
     debug_log("verif_access({$level}<=>{$access})");
     // Modo<=>Vist
     $_requis = array_search($level, $array_access_type);
     // Modo => 1
     if (!empty($_requis)) {
         $_courant = array_search($access, $array_access_type);
         // Visit => 3
         if (!empty($_courant)) {
             $niveaux = count($array_access_type);
             // =>4
             debug_log("verif_access({$level}) ==> search-requis({$level}) => " . $_requis, false);
             debug_log("verif_access({$level}) ==> search-courrant(" . $access . ") =>" . $_courant, false);
             $requis = $niveaux - $_requis;
             // 4-1 = 3
             $current = $niveaux - $_courant;
             // 4-3 = 1
             debug_log("verif_access({$level}) ==> requis :: {$requis} <= courant :: {$current} ?? ", false);
             if ($requis <= $current) {
                 return true;
             }
         }
     }
     if (verif_connect($menu)) {
         if ($access !== "Admin" && $access !== $level) {
             if (!$menu) {
                 echo '<center>';
                 echo 'Vous ne possèdez pas les droits nécessaire pour accèder à cette partie du site';
                 echo LanguageValidation::iMsg('not.have.require.rights.to.access');
                 echo '</center>';
                 //require_once($path."HTML/Footer.php");
                 die;
             }
             return false;
         }
         return true;
     }
     return false;
 }
コード例 #9
0
ファイル: Inn.php プロジェクト: galadie/Caranille-RPG
<?php

if (verif_connect()) {
    if (verif_town()) {
        menu_town();
        if (request_confirm('Rest')) {
            if (user_data('Account_Golds') >= $information_Town['Town_Price_INN']) {
                echo LanguageValidation::iMsg("used.map.inn");
                echo 'Vous avez récupéré toutes vos forces<br />';
                echo '<form method="POST" action="' . get_link("Map", "Game") . '">';
                //echo '<input type="submit" name="Inn" value="Retourner en ville">';
                echo '<input type="submit" name="Inn" value="' . LanguageValidation::nMsg("btn.inn.return") . '"/>' . LanguageValidation::eMsg("btn.inn.return");
                echo '</form>';
            } else {
                echo LanguageValidation::iMsg("unusable.map.inn");
            }
        } else {
            $cout = render_money($information_Town['Town_Price_INN']);
            echo LanguageValidation::iMsg("intro.map.inn");
            echo '<br /><br />';
            echo LanguageValidation::iMsg("label.map.inn", $cout);
            echo '<form method="POST" action="' . get_link("Inn", "Game") . '">';
            //echo '<input type="submit" name="Rest" value="Accepter">';
            echo '<input type="submit" name="Rest" value="' . LanguageValidation::nMsg("btn.inn.accept") . '"/>' . LanguageValidation::eMsg("btn.inn.accept");
            echo '<input type="submit" name="Inn" value="' . LanguageValidation::nMsg("btn.inn.return") . '"/>' . LanguageValidation::eMsg("btn.inn.return");
            echo '</form>';
        }
    }
}
コード例 #10
0
ファイル: Sidebar.php プロジェクト: galadie/Caranille-RPG
?>
</td>
				<td class="cell_calendrier"><?php 
echo LanguageValidation::iMsg("label.sidebar.thursday");
?>
</td>
				<td class="cell_calendrier"><?php 
echo LanguageValidation::iMsg("label.sidebar.friday");
?>
</td>
				<td class="cell_calendrier"><?php 
echo LanguageValidation::iMsg("label.sidebar.satursday");
?>
</td>
				<td class="cell_calendrier"><?php 
echo LanguageValidation::iMsg("label.sidebar.sunday");
?>
</td>
			</tr>
							
			<tr>
<?php 
echo "<td></td>";
//".$period->format('W')."
foreach ($r as $day => $week) {
    $date = new DateTime($year . "-" . $month . "-" . $day);
    if ($day == 1 && $week != 1) {
        echo "\n\t\t\t" . "<td colspan='" . ($week - 1) . "'></td>";
    }
    echo "\n\t\t\t" . "<td>{$day}</td>";
    if ($day == $date->format('t') && $week < 6) {
コード例 #11
0
ファイル: World.php プロジェクト: galadie/Caranille-RPG
        echo '<p>' . $message . '<br/><br/>';
        echo '<form method="POST" action="' . get_link('Map', 'Map') . '">';
        echo '<input type="submit" name="carte" value="' . LanguageValidation::nMsg("btn.enter.town") . '"/>' . LanguageValidation::eMsg("btn.enter.town");
        //Continuer">';
        echo '</form></p>';
    } else {
        if (!verif_town()) {
            bousole("Map");
            instruction(isset($message) ? $message : "");
            include_once path_source("map-2", "Map", "Map");
            if (isset($array_work_class['recolte'])) {
                echo "<br/>";
                echo '<p><form style="float:right;margin-right:5px;margin-top:10px" method="POST" action="' . get_link('Map', 'Map') . '">';
                echo '<input type="hidden" name="recolte" value="ramassage-ressource" />';
                foreach ($array_work_class['recolte'] as $recolte) {
                    $job = get_db('fabrique_works', array('Type' => $recolte));
                    $ressource = get_db('fabrique_ressource', array('Type' => $recolte));
                    if (isset($job) && isset($ressource)) {
                        echo '<input type="submit" name="' . $recolte . '" value="' . LanguageValidation::nMsg("btn.map." . $recolte) . '"/>' . LanguageValidation::eMsg("btn.map." . $recolte) . "<br/>";
                        //Continuer">';
                    }
                }
                echo '<input type="hidden" name="token" value="' . generer_token('recolte-map') . '" />';
                echo '</form></p>';
            }
            if (isset($message)) {
                echo '<p style="float:right;margin-right:5px;margin-top:10px;width:200px">' . $message . '</p>';
            }
        }
    }
}
コード例 #12
0
ファイル: Index.php プロジェクト: galadie/Caranille-RPG
                                $paid = true;
                            }
                            break;
                        case "magic":
                            $item = pay_magic($Item_ID);
                            if ($item !== false) {
                                $paid = true;
                            }
                            break;
                        case "temple":
                            $item = pay_invocation($Item_ID);
                            if ($item !== false) {
                                $paid = true;
                            }
                            break;
                    }
                    if ($paid) {
                        $message = "Vous avez acheté " . $item[$sell_name] . ".";
                        add_diary($message);
                    } else {
                        $message = "Vous n'avez pas assez d'argent";
                    }
                    $return .= "{$message} <br /><br />";
                    $return .= '<form method="POST" action="' . get_link($page, 'Shop') . '">';
                    $return .= '<input type="submit" name="Cancel" value="' . LanguageValidation::nMsg("btn.return.town") . '"/>' . LanguageValidation::eMsg("btn.return.town");
                    $return .= '</form>';
                }
            }
        }
    }
}
コード例 #13
0
ファイル: Chat.php プロジェクト: galadie/Caranille-RPG
<?php

if (verif_connect()) {
    echo LanguageValidation::iMsg("intro.public.chat");
    ?>
		
		<!--// chat_content -->
		<iframe class="chatroom-frame" src="<?php 
    echo get_link('list', 'Chat');
    ?>
"></iframe>
<?php 
    echo formulaire_input(array(text_input("label.chat.message", "Message", null, null, null, "placeholder.chat.message"), submit_input("Send", "btn.chat.send"), verif_access("Admin", true) ? submit_input("Clear", "btn.chat.clear") : null), "Chat-Send", get_link('Chat', 'User'), "post", null);
}
コード例 #14
0
ファイル: Guild.php プロジェクト: galadie/Caranille-RPG
<?php

// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
//$title ="";
//
if (verif_connect()) {
    load_css('guild.css', 'guild');
    //Si l'utilisateur ne possède pas de Guilde
    if (!has_guild()) {
        $baseline = LanguageValidation::iMsg("welcome.guild.none");
        //
        if (request_confirm('Accept')) {
            if (verifier_token(60, get_link('Guild', 'Guild'), 'guild-accept')) {
                //$Guild_ID = htmlspecialchars(addslashes($_POST['Guild_ID']));
                //$Guild_Name = htmlspecialchars(addslashes($_POST['Guild_Name']));
                //$Guild_Description = htmlspecialchars(addslashes($_POST['Guild_Description']));
                extract(addslashes_r($_POST));
                update_db('Caranille_Accounts', array('Account_Guild_ID' => $Guild_ID, 'Account_ID' => $ID));
                $message = "Vous venez de rejoindre la guilde {$Guild_Name}";
                add_diary($message);
                $baseline = $message;
            }
        }
        if (request_confirm('Confirm')) {
            if (verifier_token(60, get_link('Guild', 'Guild'), 'guild-create')) {
                extract(addslashes_r($_POST));
                insert_db('Caranille_Guilds', array('Guild_Name' => $Guild_Name, 'Guild_Owner_ID' => $ID, 'Guild_Description' => $Guild_Description));
                //Pour mettre le compte de l'utilisateur à jour avec l'ID de la guild ont fait une recherche de l'id de la guild précédament crée
                $Guild_Query = get_db("edit_admin", array('table' => 'Caranille_Guilds', 'ID' => 'Guild_Name', 'value' => $Guild_Name));
                if (!empty($Guild_Query)) {
                    $Guild_ID = $Guild_Query['Guild_ID'];
コード例 #15
0
ファイル: Index.php プロジェクト: galadie/Caranille-RPG
                }
                echo '<tr>';
                $desc = isset($sell_description) ? stripslashes(nl2br($Armor[$sell_description])) : '';
                $desc .= '<br/><br/>';
                $desc .= '' . LanguageValidation::iMsg("label.level.required") . ' : ' . (isset($sell_level_requiered) ? stripslashes($Armor[$sell_level_requiered]) : 1) . '<br/><br/>';
                $desc .= isset($sell_HP) ? sprintf($term_HP, stripslashes($Armor[$sell_HP]), strtolower($page) == "magic" ? $Armor[$sell_type] == "Attack" ? "Damage" : "Soin" : null) : '';
                $desc .= isset($sell_MP) ? sprintf($term_MP, stripslashes($Armor[$sell_MP])) : '';
                $desc .= isset($sell_strength) ? sprintf($term_strength, stripslashes($Armor[$sell_strength])) : '';
                $desc .= isset($sell_magic) ? sprintf($term_magic, stripslashes($Armor[$sell_magic])) : '';
                $desc .= isset($sell_agility) ? sprintf($term_agility, stripslashes($Armor[$sell_agility])) : '';
                $desc .= isset($sell_defense) ? sprintf($term_defense, stripslashes($Armor[$sell_defense])) : '';
                echo "<td><a class='infobulle' href='#'>";
                echo "<img title='" . $Armor['Image_Name'] . "' height='50px' src='data:" . $Armor['Image_Type'] . ";base64," . $Armor['Image_Base64'] . "' />";
                echo '<span>' . nl2br($desc) . '</span></a>';
                echo "</td>";
                echo '<td>' . (isset($sell_name) ? stripslashes($Armor[$sell_name]) : '') . '</td>';
                echo '<td>' . (isset($sell_price) ? render_money($Armor[$sell_price]) : '') . '</td>';
                echo '<td>';
                echo '<form method="POST" action="' . get_link($page, 'Game') . '">';
                echo "<input type=\"hidden\" name=\"" . $sell_id . "\" value=\"" . $Armor[$sell_id] . "\">";
                echo "<input type=\"hidden\" name=\"" . $sell_price . "\" value=\"" . $Armor[$sell_price] . "\">";
                echo '<input type="submit" name="Buy" value="' . LanguageValidation::nMsg("btn.shop.buy") . '"/>' . LanguageValidation::eMsg("btn.shop.buy");
                echo '<input type="hidden" name="token" value="' . generer_token("buy-" . strtolower($page) . "-" . $Armor[$sell_id]) . '"/>';
                echo '</form><br />';
                echo '</td>';
                echo '</tr>';
            }
            echo '</table></p>';
        }
    }
}
コード例 #16
0
ファイル: Load.php プロジェクト: galadie/Caranille-RPG
    $_configured = true;
} else {
    $_path = realpath($kernel_path . '/../') . '/';
    $_url = get_url();
    $_configured = false;
}
require_once $kernel_path . "/Database.php";
require_once $core_path . "/Constants.php";
require_once $core_path . "/db-mapping.php";
require_once $core_path . "/Requetes.php";
connect_db();
// verifie l'installation complete
$install_step = verif_install();
$installing = isInstalling();
// verifie si l'URL REWRITING est activée
$_rewrite = _mod_rewrite();
// info config
extract(load_config());
if (!$installing) {
    // load_plugin(); // => import de plug-in... non fonctionnel
    require_once $core_path . "/Functions.php";
    if (request_confirm('setMessageEditionMode')) {
        LanguageValidation::setMessageEditionMode();
    }
    if (LanguageValidation::isMessageEditionMode()) {
        translateForm::edition();
    }
    require_once $core_path . "/Refresh.php";
    require_once $core_path . "/Menu.php";
    $_menu_ = list_pages();
}
コード例 #17
0
ファイル: Mailbox.php プロジェクト: galadie/Caranille-RPG
                    }
                }
            }
            echo "</table>";
            echo '<p>';
            echo '<a href="' . get_link('Mailbox', 'User', array("Write" => "mail")) . '">' . LanguageValidation::nMsg("btn.message.write") . '</a>';
            echo '</p>';
            if (empty($Private_Message_ID)) {
                echo 'Vous n\'avez aucun nouveau message';
            }
        } else {
            //Si l'utilisateur souhaite repondre à un message
            if (request_confirm('Reply')) {
                $Conversation = request_post('Private_Message_Conversation') == 0 ? request_post('Private_Message_ID') : request_post('Private_Message_Conversation');
                $Receiver = htmlspecialchars(addslashes($_POST['Transmitter']));
                $Message_Subject = htmlspecialchars(addslashes($_POST['Message_Subject']));
                $Message = htmlspecialchars(addslashes($_POST['Message']));
                echo LanguageValidation::iMsg("intro.message.reply");
                echo formulaire_input(array(text_input("label.message.reply", "Receiver", $Receiver, null, null, "placeholder.message.reply", null, true), text_input("label.message.subject", "Message_Subject", "Re : {$Message_Subject}", null, null, "placeholder.message.subject", null, true), call_bbcode_editor("Message"), submit_input("Send", "btn.message.send")), "Mailbox-Send", get_link('Mailbox', 'User'), "post", null);
                echo bb_code($Message);
            } else {
                echo LanguageValidation::iMsg("intro.private.message");
                echo '<p>';
                echo '<a href="' . get_link('Mailbox', 'User', array("Write" => "mail")) . '">' . LanguageValidation::nMsg("btn.message.write") . '</a>';
                echo ' - ';
                echo '<a href="' . get_link('Mailbox', 'User', array("Read" => "box")) . '">' . LanguageValidation::nMsg("btn.message.read") . '</a>';
                echo '</p>';
            }
        }
    }
}
コード例 #18
0
ファイル: Top.php プロジェクト: galadie/Caranille-RPG
<?php

// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
$title = "Top " . $top_members_limit;
//LanguageValidation::nMsg("title.user.top",$top_members_limit);//
$baseline = LanguageValidation::iMsg("welcome.user.top", $top_members_limit);
//
コード例 #19
0
ファイル: Calendar.php プロジェクト: galadie/Caranille-RPG
                $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>";
            echo "\n\t\t" . "<tr><td>" . $date->format('W') . "</td>";
        }
        unset($date);
    }
    ?>
			</tr>
					
	</table>
      			<?php 
    echo LanguageValidation::iMsg("label.guild.calendar");
}
コード例 #20
0
ファイル: Left.php プロジェクト: galadie/Caranille-RPG
					<li><a href="<?php 
            echo get_link('Categories', 'Guild');
            ?>
">categories</a></li>
					<li><a href="<?php 
            echo get_link('Forums', 'Guild');
            ?>
">forums</a></li>
					<li><a href='<?php 
            echo get_Link('Main', 'Guild');
            ?>
'><?php 
            echo LanguageValidation::nMsg('menu.forum');
            ?>
</a><?php 
            echo LanguageValidation::eMsg('menu.forum');
            ?>
</li>
				</ul>
			</li>

<?php 
        }
    } else {
        if (verif_connect(true) && $secteur_module !== 'Moderator' && $secteur_module !== 'Admin') {
            ?>
	    <div class="important">MMORPG</div><br />
		<a href="<?php 
            echo get_Link('Main', 'Public');
            ?>
">L'actualité</a><br />
コード例 #21
0
ファイル: Dungeon.php プロジェクト: galadie/Caranille-RPG
 if (request_confirm('Battle')) {
     if (!empty($monstre)) {
         echo "<img title='" . $monstre['Image_Name'] . "' height='50px' src='data:" . $monstre['Image_Type'] . ";base64," . $monstre['Image_Base64'] . "' /><br/>";
         echo "" . $monstre['Monster_Name'] . "<br />";
         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}\">";
コード例 #22
0
ファイル: Inventory.php プロジェクト: galadie/Caranille-RPG
<?php

load_css('corps.css', 'corps');
load_css('infobulle.css', 'infobulle');
// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
//$title ="";
$baseline = LanguageValidation::iMsg("welcome.game.inventory");
if (verif_connect()) {
    // action dans l'inventaire
    if (request_confirm('Item_ID')) {
        extract($_POST);
        $params = $_POST + user_data();
        $Item_Query = get_db('item_inventaire', $params);
        if (!empty($Item_Query)) {
            //$type = $Item_Query['Item_Type'];
            $type = in_array($Item_Query['Item_Type'], $array_weapon_type) ? "Weapon" : $Item_Query['Item_Type'];
            extract($Item_Query);
            //equiper
            if (request_confirm('Item_Equip')) {
                if (user_data('Level_Number') >= $Item_Level_Required) {
                    retire_equipement($type);
                    update_db('Caranille_Inventory', array('Inventory_ID' => $Inventory_ID, 'Inventory_Item_ID' => $Item_ID, 'Inventory_Item_Equipped' => 'Yes'));
                    cast_equipement($Item_Query);
                    $baseline = "Equipement effectué";
                } else {
                    $baseline = 'Vous ne possedez pas le niveau requis pour équiper cet objet';
                }
            }
            // desequiper
            if (request_confirm('Item_Desequip')) {
                if (isEquiped($type)) {
コード例 #23
0
ファイル: Top.php プロジェクト: galadie/Caranille-RPG
    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>';
    }
    echo '</table>';
}
コード例 #24
0
ファイル: Order.php プロジェクト: galadie/Caranille-RPG
<?php

// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
//$title ="";
$baseline = LanguageValidation::iMsg("welcome.game.order");
//"Bienvenue sur la page des ordres";
if (verif_connect()) {
    load_css('corps.css', 'corps');
    load_css('order.css', 'order');
    if (!has_order()) {
        if (request_confirm('Accept')) {
            $Order_ID = htmlspecialchars(addslashes($_POST['Order_ID']));
            update_db('Caranille_Accounts', array('Account_Order' => $Order_ID, 'Account_ID' => $ID));
            $baseline = 'Vous venez de rejoindre un ordre';
            add_diary($baseline);
            //echo '<br /><br />'.$message;
        }
    }
}
コード例 #25
0
ファイル: Town.php プロジェクト: galadie/Caranille-RPG
<?php

if (verif_connect()) {
    if (isset($exit) && $exit == true) {
        echo '<p>' . $message . '<br/><br/>';
        echo '<form method="POST" action="' . get_link('Map', 'Map') . '">';
        echo '<input type="submit" name="carte" value="' . LanguageValidation::nMsg("btn.return.world") . '"/>' . LanguageValidation::eMsg("btn.return.world");
        //Retourner à la carte du monde">';
        echo '<input type="hidden" name="token" value="' . generer_token('carte') . '" />';
        echo '</form></p>';
    } else {
        if (verif_town()) {
            $Town_Image = htmlspecialchars(addslashes($information_Town['Town_Image']));
            menu_town();
            instruction(isset($message) ? $message : "");
            bousole("Town");
            include_once path_source("map-1", "Map", "Map");
            //echo '<div style="float:left; margin-left:35px">';
            echo "<img src=\"{$Town_Image}\"><br />";
            echo "" . $information_Town['Town_Description'] . "<br /><br />";
            echo '<form method="POST" action="' . get_link('Map', 'Map') . '">';
            echo '<input type="submit" name="Exit_Town" value="' . LanguageValidation::nMsg("btn.leave.town") . '"/>' . LanguageValidation::eMsg("btn.leave.town");
            //Quitter la Ville">';
            echo '<input type="hidden" name="token" value="' . generer_token('Exit_Town-' . $information_Town['Town_ID']) . '" />';
            echo '</form>';
            //echo '</div>';
        }
    }
}
コード例 #26
0
ファイル: Functions.php プロジェクト: galadie/Caranille-RPG
 function render_money($somme = null)
 {
     if (is_null($somme)) {
         $somme = user_data('Account_Golds');
     }
     $prix = get_money($somme);
     $cout = "<br/>";
     foreach ($prix as $x => $am) {
         $cout .= $am . '<div class="gain gold' . $x . '">' . LanguageValidation::iMsg("label.gold" . $x . ".card") . '</div>';
     }
     $cout .= "<br/>";
     return $cout;
 }
コード例 #27
0
ファイル: Character.php プロジェクト: galadie/Caranille-RPG
        echo LanguageValidation::iMsg("label.game.roaster");
        ?>
					<input type="radio" name="Roaster" value="1" <?php 
        echo user_data('Account_Roaster_Accept') == 1 ? "checked" : "";
        ?>
 /> <?php 
        echo LanguageValidation::iMsg("global.yes");
        ?>
					<input type="radio" name="Roaster" value="0" <?php 
        echo user_data('Account_Roaster_Accept') == 0 ? "checked" : "";
        ?>
/> <?php 
        echo LanguageValidation::iMsg("global.no");
        ?>
					
					<input type="submit" name="chara-design" value="<?php 
        echo LanguageValidation::nMsg("btn.roaster.accept");
        ?>
"/><?php 
        echo LanguageValidation::eMsg("btn.roaster.accept");
        ?>
					
				<?php 
    } else {
        echo "<div>en groupe</div>";
    }
    ?>
				</form>
			</div>
<?php 
}
コード例 #28
0
ファイル: Formulaire.php プロジェクト: galadie/Caranille-RPG
function label_input($name, $value = null, $class = null, $id = null)
{
    $input = "<label for='{$name}'";
    $input .= is_null($class) ? "" : " class='{$class}'";
    $input .= is_null($id) ? "" : " id='{$id}'";
    $input .= ">";
    $input .= is_null($value) ? "" : LanguageValidation::iMsg($value);
    $input .= "</label>";
    return $input;
}
コード例 #29
0
ファイル: Order.php プロジェクト: galadie/Caranille-RPG
    $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");
        echo '</form>';
    }
    //echo '<p>Voici les deux ordres disponibles. Choisissez bien</p>';
}
コード例 #30
0
ファイル: Guild.php プロジェクト: galadie/Caranille-RPG
                 echo "<option value=\"{$Guild_ID}\">{$Guild_Name}</option>";
             }
             echo '</select>';
             echo '<input type="hidden" name="token" value="' . generer_token("guild-accept") . '"/>';
             echo '</form></li>';
         }
         echo '</ol>';
     }
     if (request_confirm('Create_Guild')) {
         if (verifier_token(60, get_link('Guild', 'Guild'), 'guild-init')) {
             echo LanguageValidation::iMsg("intro.guild.create");
             echo '<form method="POST" action="' . get_link("Guild", "Guild") . '">';
             echo '' . LanguageValidation::iMsg("label.guild.name") . '<input placeholder="' . LanguageValidation::nMsg("placeholder.guild.name") . '" type="texte" name="Guild_Name">' . LanguageValidation::eMsg("placeholder.guild.name") . '<br />';
             echo '' . LanguageValidation::iMsg("label.guild.description") . '<br /><textarea placeholder="' . LanguageValidation::nMsg("placeholder.guild.description") . '" name="Guild_Description" ID="Guild_Description" rows="10" cols="50"></textarea>' . LanguageValidation::eMsg("placeholder.guild.description") . '<br /><br />';
             echo '<input type="hidden" name="token" value="' . generer_token("guild-create") . '"/>';
             echo '<input type="submit" name="Confirm" value="' . LanguageValidation::nMsg("btn.guild.init") . '"/>' . LanguageValidation::eMsg("btn.guild.init");
             //Créer la guilde">';
             echo '</form>';
         }
     }
 } else {
     //echo 'vous appartenez déjà à une guilde';
     menu_guild();
     echo "<div id='guild-page'>";
     echo "<h4>" . guild_data('Guild_Name') . "</h4>";
     echo "<p>" . guild_data('Guild_Description') . "</p>";
     echo "<p>La guilde est au niveau " . guild_data('Guild_Level') . "</p>";
     /**
     				if(guild_data('Guild_Owner_ID') == user_data('Account_ID'))
     					echo 'Vous êtes le fondateur de cette guilde.<br/>';
     			**/