Esempio n. 1
0
function buildUrlMenu($values, $navbar_menu_links, $template)
{
    global $langage;
    if ($navbar_menu_links != null) {
        $bloc["navbar_menu_links"] = $navbar_menu_links;
    }
    $bloc["menuValue"] = utf8_encode(TranslationDAO::translate($langage->id_language, $values->denomination)->value);
    $bloc["menuUrl"] = $values->url;
    return Page::construirePagePartielle($template, $bloc);
}
<?php

$ressources = RessourceDAO::selectAll();
$ressource = "";
foreach ($ressources as $ress) {
    $ressource_lang = TranslationDAO::translate($langage->id_language, $ress->name);
    $ressName = $ressource_lang->name;
    $ressValue = utf8_encode($ressource_lang->value);
    $batimentlevel = 2;
    $prod = array();
    $prod[$ressName] = Formuleressource($ress->coef_prod, $batimentlevel);
    $bloc["nameress"] = $ressName;
    $bloc["prodress"] = $prod[$ressName];
    $bloc["textress"] = $ressValue;
    $ressource .= Page::construirePagePartielle('part_game_barre_ressources', $bloc);
}
$parse['resources_game'] = $ressource;