Example #1
0
 $building_level = $planetrow[$resource[$i]];
 //Muestra el nivel actual de la mina
 $parse['nivel'] = $building_level == 0 ? "" : " ({$lang['level']} {$building_level})";
 $parse['n'] = $n;
 $parse['descriptions'] = $lang['res']['descriptions'][$i];
 /*
   Calculo del tiempo de produccion
   [(Cris+Met)/2500]*[1/(Nivel f.robots+1)]* 0,5^NivelFabrica Nanos.
 */
 $time = get_building_time($user, $planetrow, $i);
 //informacion del precio, etc
 $parse['time'] = building_time($time);
 $parse['price'] = price($user, $planetrow, $i);
 $parse['rest_price'] = rest_price($user, $planetrow, $i);
 //Comprobacion si es posible comprarlo
 $is_buyeable = is_buyeable($user, $planetrow, $i);
 $parse['click'] = '';
 if (!$planetrow["b_building_id"] || $features['buildList'] < time()) {
     if (!$building) {
         if ($user["b_tech_planet"] != 0 && $i == 31 && $game_config['allow_invetigate_while_lab_is_update'] != 1) {
             //en caso de que sea el laboratorio y se este investigando algo.
             $parse['click'] = "<font color=#FF0000>{$lang['Teching']}</font>";
             //Muestra la opcion a elegir para construir o ampliar un edificio
         } elseif ($planetrow[$resource[$i]] == 0 && LWCore::getPlanet()->checkFields() && $is_buyeable && $user['urlaubs_modus'] == 0) {
             $parse['click'] = "<a href=\"?bau={$i}\"><font color=#00FF00>{$lang['Build']}</font></a>";
         } elseif (LWCore::getPlanet()->checkFields() && $is_buyeable && $user['urlaubs_modus'] == 0) {
             $nplus = $planetrow[$resource[$i]] + 1;
             $parse['click'] = "<a href=\"?bau={$i}\"><font color=#00FF00>" . str_replace('%n', $nplus, $lang['Update_to_n']) . "</font></a>";
         } elseif (LWCore::getPlanet()->checkFields() && !$is_buyeable || $user['urlaubs_modus'] != 0) {
             if ($planetrow[$resource[$i]] == 0) {
                 $parse['click'] = "<font color=#FF0000>{$lang['Build']}</font>";
Example #2
0
 foreach ($lang['tech'] as $i => $n) {
     //Defensa
     if ($i > 400 && $i <= 599) {
         if (!is_tech_available($user, $planetrow, $i)) {
             $buildinglist .= "</tr>\n";
         } else {
             //Funciona ^_^
             $buildinglist .= "<tr><td class=l><a href=infos?gid={$i}><img border='0' src=\"" . $dpath . "gebaeude/{$i}.gif\" align='top' width='120' height='120'></a></td>";
             //obtenemos la cantidad de unidades que hay en el planeta
             $building_level = $planetrow[$resource[$i]];
             //Muestra la cantidad de unidades que se encuentran en el planeta
             //die($planetrow[$resource[$i]]);
             $nivel = $building_level == 0 ? "" : "(cantidad {$building_level})";
             //Descripcion
             $buildinglist .= "<td class=l><a href=infos?gid={$i}>{$n}</a> {$nivel}<br>{$lang['res']['descriptions'][$i]}<br>";
             $is_buyeable = is_buyeable($user, $planetrow, $i, false);
             $buildinglist .= price($user, $planetrow, $i, false);
             /*
               Calculo del tiempo de produccion
               [(Cris+Met)/2500]*[1/(Nivel f.robots+1)]* 0,5^NivelFabrica Nanos. 
             */
             $time = get_building_time($user, $planetrow, $i);
             //metodo temporal para mostrar el formato tiempo...
             $buildinglist .= building_time($time);
             $buildinglist .= "<td class=k>";
             //Muestra la opcion a elegir para construir o ampliar un edificio
             if ($is_buyeable) {
                 $tabindex++;
                 $buildinglist .= "<input type=text name=fmenge[{$i}] alt='{$tech[$i]}' size=6 maxlength=6 value=0 tabindex={$tabindex}>";
             }
         }