vue [Erreur]leftmenu.php
Kommunauty
Connexion
Inscription

[Erreur]leftmenu.php


léo Messages : 46

Bonjour à tous,

bon voilà j'ai essayé de faire une modification, et sa a planté (comme d'hab)...

J'ai modifié un quelques chose dans mon leftmenu.php sa n'a pas marché et sa m'a affiché comme message:

Parse error: syntax error, unexpected T_DEC, expecting T_STRING or T_VARIABLE or '$' in /home/a4441376/public_html/The Last Empire/leftmenu.php on line 92

J'ai supprimé la modif, mais rien à faire...

Donc je poste mon leftmenu.php

<?php

/**
* leftmenu&#46;php
*
* @version 1&#46;2
* @copyright 2008 By Dr&#46;Isaacs for XNova-Germany
* Darf nicht entfernt werden, für das entfernen der Copyright berechne ich eine Arbeits Pauschale von 1€  pro mod
*/

define('INSIDE'  , true);
define('INSTALL' , false);

$xnova_root_path = '&#46;/';
include($xnova_root_path &#46; 'extension&#46;inc');
include($xnova_root_path &#46; 'common&#46;'&#46;$phpEx);

function ShowLeftMenu ( $Level , $Template = 'left_menu') {
    global $lang, $dpath, $game_config;

    includeLang('leftmenu');

    $MenuTPL                  = gettemplate( $Template );
    $InfoTPL                  = gettemplate( 'serv_infos' );
    $parse                    = $lang;
    $parse&#91;'lm_tx_serv'&#93;      = $game_config&#91;'resource_multiplier'&#93;;
    $parse&#91;'lm_tx_game'&#93;      = $game_config&#91;'game_speed'&#93; / 2500;
    $parse&#91;'lm_tx_fleet'&#93;     = $game_config&#91;'fleet_speed'&#93; / 2500;
    $parse&#91;'lm_tx_queue'&#93;     = MAX_FLEET_OR_DEFS_PER_ROW;
    $SubFrame                 = parsetemplate( $InfoTPL, $parse );
    $parse&#91;'server_info'&#93;     = $SubFrame;
    $parse&#91;'XNovaRelease'&#93;    = VERSION;
    $parse&#91;'dpath'&#93;           = $dpath;
    $parse&#91;'forum_url'&#93;       = $game_config&#91;'forum_url'&#93;;
    $parse&#91;'mf'&#93;              = "Hauptframe";
    $rank                     = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '"&#46; $user&#91;'id'&#93; &#46;"';",'statpoints',true);
    $parse&#91;'user_rank'&#93;       = $rank&#91;'total_rank'&#93;;
    if ($Level > 0) {
        $parse&#91;'ADMIN_LINK'&#93;  = "
        <tr>
            <td colspan="2"><div><a href="admin/leftmenu&#46;php"><font color="lime">"&#46;$lang&#91;'user_level'&#93;&#91;$Level&#93;&#46;"</font></a></div></td>
        </tr>";
    } else {
        $parse&#91;'ADMIN_LINK'&#93;  = "";
    }
    //Lien supplémentaire déterminé dans le panel admin
    if ($game_config&#91;'link_enable'&#93; == 1) {
        $parse&#91;'added_link'&#93;  = "
        <tr>
            <td colspan="2"><div><a href=""&#46;$game_config&#91;'link_url'&#93;&#46;"" target="_blank">"&#46;stripslashes($game_config&#91;'link_name'&#93;)&#46;"</a></div></td>
        </tr>";
    } else {
        $parse&#91;'added_link'&#93;  = "";
    }
    
    //Maintenant on vérifie si les annonces sont activées ou non
    if ($game_config&#91;'enable_announces'&#93; == 1) {
        $parse&#91;'announce_link'&#93;  = "
        <tr>
            <td colspan="2"><div><a href="annonces&#46;php" target="Hauptframe">Annonces</a></div></td>
        </tr>";
    } else {
        $parse&#91;'announce_link'&#93;  = "";
    }
    
        //Maintenant le marchand
    if ($game_config&#91;'enable_marchand'&#93; == 1) {
        $parse&#91;'marchand_link'&#93;  = "
        <tr>
            <td colspan="2"><div><a href="marchand&#46;php" target="Hauptframe">Marchand</a></div></td>
        </tr>";
    } else {
        $parse&#91;'marchand_link'&#93;  = "";
    }
            //Maintenant les notes
    if ($game_config&#91;'enable_notes'&#93; == 1) {
        $parse&#91;'notes_link'&#93;  = "
        <tr>
            <td colspan="2"><div><a href="#" onClick="f('notes&#46;php', 'Report');" accesskey="n">Notes</a></div></td>
        </tr>";
    } else {
        $parse&#91;'notes_link'&#93;  = "";
    }
    $parse&#91;'servername'&#93;   = $game_config&#91;'game_name'&#93;;
    $Menu                  = parsetemplate( $MenuTPL, $parse);

    return $Menu;
}
    $Menu = ShowLeftMenu ( $user&#91;'authlevel'&#93; );
    display ( $Menu, "Menu", '', false );
//                         
-----------------------------------------------------------------------------------------------------------
// History version
// 1&#46;0 - Passage en fonction pour XNova version future
// 1&#46;1 - Modification pour gestion Admin / Game OP / Modo
// 1&#46;2 - Modification 1&#46;2&#46;3 menü by dr&#46;isaacs&#46;    
?>

Merci de m'aider

mardi 6 avril 2010

SiMax Messages : 7572

Tu as dé-commenté une ligne de code (ligne 92). Il faut juste rajouter des "//" devant la ligne et ça devrait aller

Voilà le code corrigé :

    <?php

    /**
    * leftmenu&#46;php
    *
    * @version 1&#46;2
    * @copyright 2008 By Dr&#46;Isaacs for XNova-Germany
    * Darf nicht entfernt werden, für das entfernen der Copyright berechne ich eine Arbeits Pauschale von 1€  pro mod
    */

    define('INSIDE'  , true);
    define('INSTALL' , false);

    $xnova_root_path = '&#46;/';
    include($xnova_root_path &#46; 'extension&#46;inc');
    include($xnova_root_path &#46; 'common&#46;'&#46;$phpEx);

    function ShowLeftMenu ( $Level , $Template = 'left_menu') {
        global $lang, $dpath, $game_config;

        includeLang('leftmenu');

        $MenuTPL                  = gettemplate( $Template );
        $InfoTPL                  = gettemplate( 'serv_infos' );
        $parse                    = $lang;
        $parse&#91;'lm_tx_serv'&#93;      = $game_config&#91;'resource_multiplier'&#93;;
        $parse&#91;'lm_tx_game'&#93;      = $game_config&#91;'game_speed'&#93; / 2500;
        $parse&#91;'lm_tx_fleet'&#93;     = $game_config&#91;'fleet_speed'&#93; / 2500;
        $parse&#91;'lm_tx_queue'&#93;     = MAX_FLEET_OR_DEFS_PER_ROW;
        $SubFrame                 = parsetemplate( $InfoTPL, $parse );
        $parse&#91;'server_info'&#93;     = $SubFrame;
        $parse&#91;'XNovaRelease'&#93;    = VERSION;
        $parse&#91;'dpath'&#93;           = $dpath;
        $parse&#91;'forum_url'&#93;       = $game_config&#91;'forum_url'&#93;;
        $parse&#91;'mf'&#93;              = "Hauptframe";
        $rank                     = doquery("SELECT `total_rank` FROM {{table}} WHERE `stat_code` = '1' AND `stat_type` = '1' AND `id_owner` = '"&#46; $user&#91;'id'&#93; &#46;"';",'statpoints',true);
        $parse&#91;'user_rank'&#93;       = $rank&#91;'total_rank'&#93;;
        if ($Level > 0) {
            $parse&#91;'ADMIN_LINK'&#93;  = "
            <tr>
                <td colspan="2"><div><a href="admin/leftmenu&#46;php"><font color="lime">"&#46;$lang&#91;'user_level'&#93;&#91;$Level&#93;&#46;"</font></a></div></td>
            </tr>";
        } else {
            $parse&#91;'ADMIN_LINK'&#93;  = "";
        }
        //Lien supplémentaire déterminé dans le panel admin
        if ($game_config&#91;'link_enable'&#93; == 1) {
            $parse&#91;'added_link'&#93;  = "
            <tr>
                <td colspan="2"><div><a href=""&#46;$game_config&#91;'link_url'&#93;&#46;"" target="_blank">"&#46;stripslashes($game_config&#91;'link_name'&#93;)&#46;"</a></div></td>
            </tr>";
        } else {
            $parse&#91;'added_link'&#93;  = "";
        }
       
        //Maintenant on vérifie si les annonces sont activées ou non
        if ($game_config&#91;'enable_announces'&#93; == 1) {
            $parse&#91;'announce_link'&#93;  = "
            <tr>
                <td colspan="2"><div><a href="annonces&#46;php" target="Hauptframe">Annonces</a></div></td>
            </tr>";
        } else {
            $parse&#91;'announce_link'&#93;  = "";
        }
       
            //Maintenant le marchand
        if ($game_config&#91;'enable_marchand'&#93; == 1) {
            $parse&#91;'marchand_link'&#93;  = "
            <tr>
                <td colspan="2"><div><a href="marchand&#46;php" target="Hauptframe">Marchand</a></div></td>
            </tr>";
        } else {
            $parse&#91;'marchand_link'&#93;  = "";
        }
                //Maintenant les notes
        if ($game_config&#91;'enable_notes'&#93; == 1) {
            $parse&#91;'notes_link'&#93;  = "
            <tr>
                <td colspan="2"><div><a href="#" onClick="f('notes&#46;php', 'Report');" accesskey="n">Notes</a></div></td>
            </tr>";
        } else {
            $parse&#91;'notes_link'&#93;  = "";
        }
        $parse&#91;'servername'&#93;   = $game_config&#91;'game_name'&#93;;
        $Menu                  = parsetemplate( $MenuTPL, $parse);

        return $Menu;
    }
        $Menu = ShowLeftMenu ( $user&#91;'authlevel'&#93; );
        display ( $Menu, "Menu", '', false );
    //                         
    //-----------------------------------------------------------------------------------------------------------
    // History version
    // 1&#46;0 - Passage en fonction pour XNova version future
    // 1&#46;1 - Modification pour gestion Admin / Game OP / Modo
    // 1&#46;2 - Modification 1&#46;2&#46;3 menü by dr&#46;isaacs&#46;   
    ?>
mardi 6 avril 2010

léo Messages : 46

Super merci sa marche...

Mais regarde ce que sa me donne:

http&#58;//www&#46;casimages&#46;com/img&#46;php?i=100406061214474513&#46;jpg

Voilà mon leftmenu.tpl

<style type="text/css">
<!--
&#46;Stil1 {color&#58; #FF8000}
-->
</style>
<body  class="style" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">


<table width="140" id="table2">
<tbody>
      <th>
      <table width="140" id="table3">
        <tbody>
<tr>
            <td class="c">
            <p align="center"><font color="#00CCCC">{servername}</a></font></td>
          </tr>

</tbody>
</table>
</table>

<div align="center">
<table width="140" id="table1">
<tbody>
<tr>
<td class="c" width="33%" align="center"><b><a href="leftmenu&#46;php">
<font color="#00FF00">Menu</font></a></b></div></td>
<td class="c" width="33%" align="center">
<p align="center"><b><a href="leftmenu1&#46;php">Suite</a></b></td>
</tr>
      <th colspan="3">
      <table width="140">
        <tbody>
<tr>
            <td class="c" colspan="2">
            <p align="center"><font color="#00CCCC">{navig}</a></font></td>
          </tr>
<tr>
            <th width="140"><a href="overview&#46;php" accesskey="g" target="{mf}">{Overview}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="imperium&#46;php" accesskey="i" target="{mf}">{Imperium}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="galaxy&#46;php" accesskey="s" target="{mf}">{Galaxy}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="fleet&#46;php" accesskey="t" target="{mf}">{Fleet}</a></th>
                  </tr>
<tr>
            <th width="140"><a href="simulator&#46;php" accesskey="t" target="{mf}">{simulator}</a></th>
                  </tr>                                            
<tr>
</tbody>
</table>
</table>

<comment></comment>
<div align="center">

<table width="140" id="table1">
<tbody>
</tr>
      <th colspan="3">
      <table width="140">
        <tbody>
<tr>
            <td class="c" colspan="2">
            <p align="center"><font color="#00CCCC">{Building}</a></font></td>
          </tr>
<tr>
            <th width="140"><a href="buildings&#46;php" accesskey="b" target="{mf}">{Buildings}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="buildings&#46;php?mode=research" accesskey="r" target="{mf}">{Research}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="buildings&#46;php?mode=fleet" accesskey="f" target="{mf}">{Shipyard}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="buildings&#46;php?mode=defense" accesskey="d" target="{mf}">{Defense}</a></th>
                      </tr>

<tr>
</tbody>
</table>
</table>


<comment></comment>

<div align="center">

<table width="140" id="table1">
<tbody>
</tr>
      <th colspan="3">
      <table width="140">
        <tbody>
<tr>
            <td class="c" colspan="2">
            <p align="center"><font color="#00CCCC">{Wirt}</a></font></td>
          </tr>
<tr>
            <th width="140"><a href="resources&#46;php" accesskey="r" target="{mf}">{Resources}</a></th>
                      </tr>
<tr>
          <th width="140"><a href="officier&#46;php" accesskey="o" target="{mf}">{Officiers}</a></th>
                      </tr>
<tr>
            <th width="140"><a href="marchand&#46;php" accesskey="m" target="{mf}">{Marchand}</a></th>
                      </tr>
<tr>
<th width="140"><a href="schrotti&#46;php" accesskey="d" target="{mf}">{schrotti}</a></th>
</tr><tr>
            <th width="140"><a href="techtree&#46;php" accesskey="g" target="{mf}">{Technology}</a></th>
                      </tr>
                <th width="140"><a href="bank&#46;php?mode=0" accesskey="s" target="{mf}">Banque</a></th>
                      </tr>
<th width="140"><a href="loterie&#46;php" accesskey="3" target="{mf}">Loterie</a></th>
                      </tr>
<th width="140"><a href="converto&#46;php" accesskey="d" target="{mf}">Convertisseur</a></th>


</table>
<th colspan="2">
      <table width="140">
        <tbody>
<tr>
            <td class="c">
            <p align="center"><font color="#00CCCC">Rates</a></font></td>
          </tr>
<tr>
{server_info}





<comment></comment>

<div align="center">

<table width="140" id="table1">
<tbody>
</tr>
</tbody>
</table>
</table>


<table width="140" id="table2">
<tbody>
      <th>
      <table width="140" id="table3">
        <tbody>
<tr>

{ADMIN_LINK}
</table>

</center>
</body>
mardi 6 avril 2010

SiMax Messages : 7572

Ah, ça après c'est un autre problème, je sais pas d'où ça vient

Sûrement d'une erreur de code dans un tableau

mardi 6 avril 2010

léo Messages : 46

Oui mais pourtant avant sa marchais...

mardi 6 avril 2010

Anonyme Messages : 0

j pourrait être modérateur de ton jeu stp pliz

EDIT MODO: jujude67, HS + flood + fautes d'orthographe + demande digne d'un kikoo de bas niveau, surtout si vous en aviez deja parlé

Jujude67, tu froles l'avertissement officiel

mardi 6 avril 2010

SiMax Messages : 7572

Ca dépend de ce que t'as modifié après. Essaye de regarder si t'as pas supprimé ou ajouté un <tr> ou un <td>

Heu sinon jujude ce genre d'intervention on évite >.<

Modérateur c'est pas juste pour se la péter déjà (je dis ça au cas où hein). Et ensuite si jamais tu veux être modérateur parce que t'as envie de t'investir, d'apprendre, et je sais pas quoi d'autre, essaye de voir ça par MP

mardi 6 avril 2010

léo Messages : 46

Jujude on en a déjà parler

Sinon, merci beaucoup simax

Pour mon problème c'est réglé...

J'ai complètement supprimer les rates, de toutes façon il figure déjà dans la suite du menu (leftmenu1), sa encombrais le jeu...

mardi 6 avril 2010

Alias Messages : 2

Bonjour léo,

Pour ton problème avec les rates, normalement en remplaçant

{server_info}

par

<tr>{server_info}</tr>

ça devrait s'afficher correctement, si ça ne le fait pas peux tu copier et nous mettre le code se trouvant dans "serv_infos.tpl" ?

lundi 19 avril 2010

Répondre Pour répondre, tu dois d'abord t'inscrire rapidement sur Kommunauty. Rejoins-nous vite !