コード例 #1
0
ファイル: Menu.php プロジェクト: galadie/Caranille-RPG
function call_menu_player()
{
    global $secteur_module, $Total_Private_Message;
    if (verif_connect(true) && ($secteur_module !== 'Admin' && $secteur_module !== 'Moderator')) {
        html_menu('MMORPG', array(array('Main', 'Public', 'L\'actualité'), array('Story', 'Battle', 'L\'histoire'), array('Map', 'Map', 'La carte')));
        html_menu('Mon Compte', array(array('Profil', 'User', 'Profil'), array('Character', 'Game', 'Avatar'), array('Guild', 'Guild', 'Guilde')));
        html_menu('La Communauté', array(array('Arena', 'Game', 'Arène'), array('Private_Message', 'User', 'Messagerie(' . count_message() . ')'), array('Chat', 'User', 'Chat'), array('Main', 'Forum', 'Forum')));
        html_menu('jeu', array(array('Logout', 'User', 'Déconnexion')));
    }
}
コード例 #2
0
ファイル: Comments.php プロジェクト: galadie/Caranille-RPG
 function news_comment_record($News)
 {
     if (verif_connect(true)) {
         if (verifier_token(600, get_link('Comments', 'Public'), 'Comment-' . $News['News_ID'])) {
             if (request_confirm('End_Add')) {
                 if (request_confirm('Comment_Message')) {
                     insert_db('Caranille_Comments', addslashes_r($_POST));
                 }
             }
         }
     }
 }
コード例 #3
0
ファイル: index.php プロジェクト: galadie/Caranille-RPG
function news_comment_record($News)
{
    if (verif_connect(true)) {
        if (verifier_token(600, get_link('Comments', 'Public'), 'Comment-' . $News['News_ID'])) {
            if (request_confirm('End_Add')) {
                if (request_confirm('Comment_Message')) {
                    echo "vous ne devriez pas pouvoir faire ça...";
                }
            }
        }
    }
}
コード例 #4
0
ファイル: perso.php プロジェクト: galadie/Caranille-RPG
<?php

if (!$installing) {
    if (verif_connect(true) && ($secteur_module !== 'Admin' && $secteur_module !== 'Moderator' && $secteur_module !== 'Forum')) {
        if (isset($Next_Level)) {
            $hp_purcent = user_data('Account_HP_Remaining') / perso_data('HP_Total') * 100;
            $mp_purcent = user_data('Account_MP_Remaining') / perso_data('MP_Total') * 100;
            $xp_purcent = user_data('Account_Experience') / user_data('Level_Experience_Required') * 100;
            ?>
			<span class="important">Pseudo :</span> <?php 
            echo user_data('Account_Pseudo');
            ?>
 <br />
			<span class="important">Guilde :</span> <?php 
            echo guild_data('Guild_Name');
            ?>
 <br />
			<span class="important">Ordre :</span> <?php 
            echo user_data('Order_Name');
            ?>
 <br /><br />
			
			<span class="important">Niveau</span> : <?php 
            echo user_data('Level_Number');
            ?>
 <br />
			
			<span class="important">HP</span> : <div title='<?php 
            echo user_data('Account_HP_Remaining') . "/" . perso_data('HP_Total');
            ?>
' class='barre' id='hp' >
コード例 #5
0
ファイル: Calendar.php プロジェクト: galadie/Caranille-RPG
<?php

if (verif_connect()) {
    function get_months($year = '2000', $month = '01')
    {
        $_m = str_pad($month, 2, "0", STR_PAD_LEFT);
        $_y = str_pad($year, 4, "0", STR_PAD_LEFT);
        debug_log("period=>({$_y},{$_m})=>" . $_y . "-" . $_m . "-01");
        $period = new DateTime($_y . "-" . $_m . "-01");
        //strtotime($_y."-".$_m."-01");//
        $t = intval($period->format('t'));
        //intval(date('t',$period));//
        debug_log("period=>({$_y},{$_m})=>" . $t);
        $r = array();
        for ($i = 1; $i <= $t; $i++) {
            $_i = str_pad($i, 2, "0", STR_PAD_LEFT);
            $r[$_i] = str_replace(0, 7, intval($period->format('w')));
            //str_replace(0,7,intval(date('w',$period)));//
            $period->modify('+ 1 day');
            //add(new DateInterval('P1D'));//+=(24*60*60);//
        }
        unset($period);
        return $r;
    }
    function get_opens_days($year = '2000')
    {
        // Liste des jours feriés
        $arr_bank_holidays[] = mktime(0, 0, 0, 1, 1, $year);
        // Jour de l'an
        $arr_bank_holidays[] = mktime(0, 0, 0, 5, 1, $year);
        // Fete du travail
コード例 #6
0
ファイル: Left.php プロジェクト: galadie/Caranille-RPG
    }
}
?>


<div id="h_menu"><?php 
echo menu_profil();
?>
</div>
   
    <div id="left">
    <?php 
if (verif_access("Admin", true) && $secteur_module === 'Admin') {
    call_menu_admin();
} elseif (verif_access("Modo", true) && $secteur_module === 'Moderator') {
    call_menu_modo();
} elseif (verif_connect(true) && ($secteur_module !== 'Admin' && $secteur_module !== 'Moderator')) {
    call_menu_player();
} elseif (!verif_connect(true)) {
    call_menu_visitor();
}
if (!empty($_menu_)) {
    $ok = array();
    foreach ($_menu_ as $slug => $title) {
        $ok[] = array($slug, 'Contenu', $title);
    }
    html_menu('Informations', $ok, count_connect());
}
?>
    
    </div>
コード例 #7
0
ファイル: Comments.php プロジェクト: galadie/Caranille-RPG
echo '<th>';
echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['News_Account_Pseudo']);
//"News publiée le " .. " Par " .. "";
//echo "News publiée le " . news_date($News). " Par " .$News['News_Account_Pseudo']. "";
echo '</th>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<h4>' . $News['News_Title'] . '</h4>';
echo '<p>' . news_intro($News) . '</p>';
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>';
コード例 #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
ファイル: Functions.php プロジェクト: galadie/Caranille-RPG
 function add_diary($message = "", $Account_ID = null)
 {
     if (verif_connect(true)) {
         $message = addslashes_r($message);
         $ID = $Account_ID != null ? $Account_ID : user_data('Account_ID');
         insert_db('Caranille_Diaries', array('Diary_Account_ID' => $ID, 'Diary_Message' => $message, 'Diary_Date' => date("Y-m-d H:i:s")));
     }
 }
コード例 #10
0
ファイル: Left.php プロジェクト: galadie/Caranille-RPG
        		<ul>
        		    <li><a href="<?php 
        echo get_link('topics', 'Moderator');
        ?>
">Topic</a></li>
        		    <li><a href="<?php 
        echo get_link('posts', 'Moderator');
        ?>
">posts</a></li>
        	    </ul>
			</li>
        </ul>
		
<?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 />
		<a href="<?php 
            echo get_Link('Story', 'Battle');
            ?>
">L'histoire</a><br />
		<a href="<?php 
            echo get_Link('Map', 'Map');
            ?>
">La carte</a><br />
		<br />
コード例 #11
0
ファイル: Right.php プロジェクト: galadie/Caranille-RPG
<?php

if (!$installing) {
    ?>
<aside>
<?php 
    if (verif_connect(true) && $secteur_module === 'Forum') {
        ?>
<h2>Qui est en ligne ?</h2>
<?php 
        //Le pied de page ici :
        $totaldesmessages = count_db('all_posts');
        //On compte les membres
        $TotalDesMembres = count_db('all_accounts');
        $query = get_db('last_account');
        echo '<p>Le total des messages du forum est <strong>' . $totaldesmessages . '</strong>.<br />';
        echo 'Le site et le forum comptent <strong>' . $TotalDesMembres . '</strong> membres.<br />';
        echo 'Le dernier membre est <a href="' . get_link('Account', 'Forum', array('m' => $query['Account_ID'], 'action' => 'consulter')) . '">' . stripslashes_r($query['Account_Pseudo']) . '</a>.</p>';
        ?>
        <a href="<?php 
        echo get_link('Main', 'Public');
        ?>
"><div class="important">Retour au jeu</div></a>

<?php 
    } elseif ($secteur_module === 'Guild') {
        echo "<br/><br/><p>";
        include_once $_path . "Sources/Guild/Chat.php";
        echo "</p>";
    } elseif ($secteur_module === 'Public') {
        echo "<br/><br/><p>";
コード例 #12
0
ファイル: Debug.php プロジェクト: galadie/Caranille-RPG
function debug_screen()
{
    global $debug_log_array, $debug_warning_array, $debug_notice_array, $debug_unknow_array, $debug_sql_array, $debug_sql_error, $_path, $Account_Data, $Stats_Data, $installing, $active_debug;
    if ($installing || verif_access("Admin", true) && $active_debug) {
        $html = "";
        $corrig_path = str_replace("/", '\\', $_path);
        if (!empty($debug_log_array)) {
            $content = "";
            $content .= "<table border='1'>";
            if (isset($debug_log_array)) {
                foreach ($debug_log_array as $x => $req) {
                    foreach ($req['trace'] as $n => $t) {
                        if ($n != 0 && $t['function'] !== 'debug_log') {
                            $content .= "<tr>";
                            if ($n == 1) {
                                $content .= "<th rowspan='" . (count($req['trace']) - 1) . "'>{$x}</th><td rowspan='" . (count($req['trace']) - 1) . "' >" . $req['message'] . "</td>";
                            }
                            $content .= "<td>" . (isset($t['file']) ? str_replace($corrig_path, "", $t['file']) : "") . "</td>\n\t\t\t\t\t\t\t\t<td>" . (isset($t['line']) ? $t['line'] : '') . "</td>\n\t\t\t\t\t\t\t\t<td>" . $t['function'] . "</td>\n\t\t\t\t\t\t\t\t<td>" . print_r($t['args'], 1) . "</td>";
                            $content .= "</tr>";
                        }
                    }
                }
            }
            $content .= "</table>";
            $html .= show_debug("log", "Log", $content);
        }
        if (!empty($Account_Data) && verif_connect(true)) {
            $content = "";
            $content .= debug_array($Stats_Data);
            $content .= debug_array($Account_Data);
            $html .= show_debug("perso", "Avatar", $content);
        }
        if (!empty($_SESSION)) {
            $html .= show_debug("session", "Session", debug_array($_SESSION));
        }
        if (!empty($debug_sql_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_sql_array as $x => $req) {
                $content .= "<tr><th>{$x}</th><td>{$req}</td>";
                if (isset($debug_sql_error[$x])) {
                    $content .= "<td>" . $debug_sql_error[$x][0] . "</td>";
                    $content .= "<td>" . $debug_sql_error[$x][1] . "</td>";
                    $content .= "<td>" . $debug_sql_error[$x][2] . "</td>";
                }
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("sql", "Requetes", $content);
        }
        if (!empty($_SERVER)) {
            $content = "";
            $content .= "<table border='1'>";
            $content .= debug_array($_SERVER);
            $content .= "</table>";
            $html .= show_debug("server", "Serveur", $content);
        }
        if (!empty($debug_warning_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_warning_array as $x => $req) {
                $content .= "<tr>";
                $content .= "<th>{$x}</th><td>" . $req['code'] . "</td><td>" . $req['message'] . "</td>";
                $content .= "<td>" . str_replace($corrig_path, "", $req['file']) . "</td>\n\t\t\t\t\t<td>" . $req['line'] . "</td>";
                if (isset($req['trace'])) {
                    $content .= "<td><table>";
                    foreach ($req['trace'] as $n => $t) {
                        if ($n != 0 && $t['function'] !== 'debug_log') {
                            $content .= "<tr>";
                            $content .= "<td>" . (isset($t['file']) ? str_replace($corrig_path, "", $t['file']) : "") . "</td>\n\t\t\t\t\t\t\t\t<td>" . (isset($t['line']) ? $t['line'] : '') . "</td>\n\t\t\t\t\t\t\t\t<td>" . $t['function'] . "</td>\n\t\t\t\t\t\t\t\t<td>" . print_r($t['args'], 1) . "</td>";
                            $content .= "</tr>";
                        }
                    }
                    $content .= "</table></td>";
                }
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("warning", "Alertes", $content, 2);
        }
        if (!empty($debug_notice_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_notice_array as $x => $req) {
                $content .= "<tr>";
                $content .= "<th>{$x}</th>";
                $content .= "<td>" . $req['code'] . "</td>";
                $content .= "<td>" . $req['message'] . "</td>";
                $content .= "<td>" . str_replace($corrig_path, "", $req['file']) . "</td>";
                $content .= "<td>" . $req['line'] . "</td>";
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("notice", "Avertissement", $content, 2);
        }
        if (!empty($debug_unknow_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_unknow_array as $x => $req) {
                $content .= "<tr>";
                $content .= "<th>{$x}</th><td>" . $req['code'] . "</td><td>" . $req['message'] . "</td>";
                $content .= "<td>" . str_replace($corrig_path, "", $req['file']) . "</td>\n\t\t\t\t\t<td>" . $req['line'] . "</td>";
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("unknow", "Inconnu", $content, 2);
        }
        if (!empty($_FILES)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($_FILES as $x => $req) {
                $content .= "<tr><th>{$x}</th><td>{$req}</td></tr>";
            }
            $content .= "</table>";
            $html .= show_debug("file", "Fichier", $content, 2);
        }
        if (!empty($_POST) || !empty($_GET)) {
            $content = "";
            if (!empty($_POST)) {
                $content .= "<table border='1'>";
                foreach ($_POST as $x => $req) {
                    $content .= "<tr><th>{$x}</th><td>{$req}</td></tr>";
                }
                $content .= "</table>";
            }
            if (!empty($_GET)) {
                $content .= "<table border='1'>";
                foreach ($_GET as $x => $req) {
                    $content .= "<tr><th>{$x}</th><td>{$req}</td></tr>";
                }
                $content .= "</table>";
            }
            $html .= show_debug("request", "Formulaire", $content, 2);
        }
        /**        	$content = "";
        			$content .= "<table border='1'>";
        			$content .= debug_array(get_defined_functions());
        			$content .= "</table>";
        			
        			$html .= show_debug("function","Fonctions",$content);
        
                    $content = "";
        			$content .= "<table border='1'>";
        			$content .= debug_array(get_defined_constants(true));
        			$content .= "</table>";
        			
        			$html .= show_debug("constants","Constantes",$content,2);
        			
        			$content = "";
        			$content .= "<table border='1'>";
        			$content .= debug_array(get_defined_vars());
        			$content .= "</table>";
        			
        			$html .= show_debug("vars","Variables",$content);
        **/
        return $html;
    }
}