コード例 #1
0
ファイル: common.inc.php プロジェクト: nilsine/Astra-Vires
function quick_row($name, $value)
{
    $ret_str = "\n<tr align='left'>";
    $ret_str .= "\n<td bgcolor='#555555' nowrap>{$name}</td>";
    if (!is_numeric($value)) {
        $ret_str .= "\n<td bgcolor='#333333'>{$value}</td>";
    } else {
        $value = nombre($value);
        $ret_str .= "\n<td bgcolor='#333333'>{$value}</td>";
    }
    return $ret_str . "\n</tr>";
}
コード例 #2
0
ファイル: earth.php プロジェクト: nilsine/Astra-Vires
            } elseif ($ship_stats['type'] == "Modulaire") {
                $type = "Modulaires";
            } elseif (eregi("Transport", $ship_stats['type'])) {
                $type = "Transport";
            } else {
                $type = "Autres";
                //A special ship
                if (config_check("oo", $ship_stats)) {
                    $buy_many_link = "";
                    //had a brob before, so this one costs more.
                    if ($user['one_brob'] > 0) {
                        $ship_stats['cost'] = $ship_stats['cost'] * $user['one_brob'];
                    }
                }
            }
            $ship_stats['cost'] = nombre($ship_stats['cost'], 0, ',', ' ');
            $array_ships[$type] .= "\n" . make_row(array("<a href='ship_build.php?ship_type={$type_id}'>{$ship_stats['name']}</a>", "{$ship_stats['class_abbr']}", "<b>{$ship_stats['cost']}</b>", "<a href='ship_build.php?ship_type={$type_id}'>" . $cw['buy_one'] . "</a>", $buy_many_link, popup_help("help.php?popup=1&ship_info={$type_id}&db_name={$db_name}", 300, 600) . "<b></b></a>"));
        }
    }
    foreach ($array_ships as $type => $content) {
        if ($type == 'Bataille' || $type == 'Transport') {
            $out .= " Vaisseaux de <b class='b1'>{$type}</b>" . make_table(array($cw['ship_name'], $cw['abbrv'], $cw['cost']));
        } else {
            $out .= " Vaisseaux <b class='b1'>{$type}</b>" . make_table(array($cw['ship_name'], $cw['abbrv'], $cw['cost']));
        }
        $out .= $content . "</table><p />";
    }
    $out .= "<p /><a href='help.php?ship_info=-1' target='_blank'>" . $st[1891] . "</a>";
    //load the default earth page
} else {
    if ($user_options['show_pics']) {
コード例 #3
0
?>
agregar-post.php">Crear post</a></div>

	<?php 
if (isset($_SESSION['MM_Id'])) {
    ?>
  
		    <div id="item_op"><a href="<?php 
    echo $logoutAction;
    ?>
"><img src="<?php 
    echo $urlWeb;
    ?>
img/out.png" width="16" height="16" /></a></div>
		    <div id="item_op" style="margin-top:1px"><?php 
    echo nombre($_SESSION['MM_Id']);
    ?>
</div>  <!-- invocamos la funcion user con la variable de sesion que tiene el id de usuario -->
		    <div id="item_op"><img src="<?php 
    echo $urlWeb;
    ?>
img/fav.png" width="16" height="16" /></div>
		    <div id="item_op"><div id="notifica_msn">3</div><img  src="<?php 
    echo $urlWeb;
    ?>
img/msn.png" width="16" height="16" /></div>
		    <div id="item_op"><div id="notifica_msn">1</div><img src="<?php 
    echo $urlWeb;
    ?>
img/notifica.png" width="16" height="16" /></div>
		<?php 
コード例 #4
0
}
//POSICIONES GENERALES
for ($i = 1; $i < 5; $i++) {
    ?>
  id=<?php 
    printf($i);
    ?>
;
  positionsGeneral[id] = new google.maps.LatLng(<?php 
    printf('%s,%s', getLat($i), getLng($i));
    ?>
);
  markersGeneral[id] = new google.maps.Marker({
    position: positionsGeneral[id],
    title: 'Punto <?php 
    echo nombre($i);
    ?>
',
    map: map,
    draggable: true,
    icon: 'http://www.google.com/intl/en_us/mapfiles/ms/micons/<?php 
    printf(ico($i));
    ?>
.png'
  });
  updateMarkerPosition(positionsGeneral[id]);
  geocodePosition(positionsGeneral[id]);
  google.maps.event.addListener(markersGeneral[id], 'drag', function() {
    updateMarkerPosition(markersGeneral[<?php 
    printf($i);
    ?>
コード例 #5
0
    ?>
</a>
    </div>
    <div id="post_info"><span class="in_txt"><img class="h_img" src="<?php 
    echo $urlWeb;
    ?>
img/date.png" width="14" height="14" />23 Dec, 2011</span>
      <span class="in_txt"><img class="h_img" src="<?php 
    echo $urlWeb;
    ?>
img/category.png" width="14" height="14" /><a href="page/categoria.php">Categoria</a></span>
      <span class="in_txt"><img class="h_img" src="<?php 
    echo $urlWeb;
    ?>
img/author.png" width="14" height="14" /><a href="user/usuario.php"><?php 
    echo nombre($row_DatosListado['autor']);
    ?>
</a></span>
      <span class="in_txt"><img class="h_img" src="<?php 
    echo $urlWeb;
    ?>
img/permalink.png" width="14" height="14" /><a href="ver_post.php">Enlace</a></span>
      <span class="in_txt">Visitas: <?php 
    echo $row_DatosListado['visitas'];
    ?>
</span>
    </div>
  </div>
  <?php 
} while ($row_DatosListado = mysql_fetch_assoc($DatosListado));
mysql_free_result($DatosListado);
コード例 #6
0
echo $row_DatosPost['contenido'];
?>
</div> <!-- por SEO al contenido le llamamos container -->
    <div id="post_info"><span class="in_txt"><img class="h_img" src="<?php 
echo $urlWeb;
?>
img/date.png" width="14" height="14" />23 Dec, 2011</span>
      <span class="in_txt"><img class="h_img" src="<?php 
echo $urlWeb;
?>
img/category.png" width="14" height="14" /><a href="page/categoria.php">Categoria</a></span>
      <span class="in_txt"><img class="h_img" src="<?php 
echo $urlWeb;
?>
img/author.png" width="14" height="14" /><a href="user/usuario.php"><?php 
echo nombre($row_DatosPost['autor']);
?>
</a></span>
      <span class="in_txt"><img class="h_img" src="<?php 
echo $urlWeb;
?>
img/permalink.png" width="14" height="14" /><a href="ver_post.php">Enlace</a></span>
      <span class="in_txt">Visitas: <?php 
echo $row_DatosPost['visitas'];
?>
</span>
    </div>
</div>
  </div>
  <div id="rigthh">
    <?php 
コード例 #7
0
ファイル: cargarvox.php プロジェクト: PabloValor/voxed
}
//comprobamos si ha ocurrido un error.
if ($_FILES['imagen']['error'] > 0) {
    echo "ha ocurrido un error";
} else {
    //ahora vamos a verificar si el tipo de archivo es un tipo de imagen permitido.
    //y que el tamano del archivo no exceda los 100kb
    $permitidos = array("image/jpg", "image/jpeg", "image/gif", "image/png");
    $limite_kb = 10000;
    if (in_array($_FILES['imagen']['type'], $permitidos) && $_FILES['imagen']['size'] <= $limite_kb * 1024) {
        //esta es la ruta donde copiaremos la imagen
        //recuerden que deben crear un directorio con este mismo nombre
        //en el mismo lugar donde se encuentra el archivo subir.php
        $filename = $_FILES['imagen']['name'];
        $ext = substr($filename, strpos($filename, '.'), strlen($filename) - 1);
        $ruta = "../images/" . nombre() . $ext;
        //comprobamos si este archivo existe para no volverlo a copiar.
        //pero si quieren pueden obviar esto si no es necesario.
        //o pueden darle otro nombre para que no sobreescriba el actual.
        if (!file_exists($ruta)) {
            //aqui movemos el archivo desde la ruta temporal a nuestra ruta
            //usamos la variable $resultado para almacenar el resultado del proceso de mover el archivo
            //almacenara true o false
            $resultado = @move_uploaded_file($_FILES['imagen']['tmp_name'], $ruta);
            if ($resultado) {
                $temp = $_FILES['imagen']['tmp_name'];
                $thumb = new Thumbnail($temp);
                if ($thumb->error) {
                    echo $thumb->error;
                } else {
                    $thumb->resize(80);
コード例 #8
0
ファイル: planet.php プロジェクト: nilsine/Astra-Vires
 }
 #show the claim link for clan mates.
 if ($planet['login_id'] != $user['login_id']) {
     $output_str .= quick_row("<a href='planet.php?planet_id={$planet_id}&claim=1'>" . $cw['claim'] . " {$planet['planet_name']}</a>", "");
 }
 $output_str .= "</table><p /><br />" . $st[1681] . "<table><form name=monetary_set_form method=post action=planet.php><input type=hidden name=planet_id value='{$planet_id}' /><input type=hidden name=monetary value='1' />";
 $output_str .= quick_row($st[1682], "<input type=text name=set_cash value={$planet['cash']} size=8 />");
 if ($GAME_VARS['uv_num_bmrkt'] > 0 && $planet['research_fac'] > 0) {
     $output_str .= quick_row($st[1683], "<input type=text name=set_tech value={$planet['tech']} size=8 />");
     //.popup_help("help.php?topic=Blackmarkets&popup=1&sub_topic=Centres_de_recherches_et_Unités_de_Support", 500, 400)
 }
 $output_str .= "</table><input type='submit' value='" . $cw['change'] . "' /></form>";
 $output_str .= "<p /><br />" . $st[1684];
 $output_str .= make_table(array("", $st[1685], $st[1686], $st[1687], $st[1688]));
 $output_str .= make_row(array($cw['fighters'], $planet['fighters'], "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&single_ship_deal=1&type=0'>" . $cw['load/unload'] . "</a>", "<a href='planet.php?planet_id={$planet_id}&do_all=1&type=0'>" . $st[1689] . "</a> - <a href='planet.php?planet_id={$planet_id}&do_all=2&type=0'>" . $st[1690] . "</a> "));
 $output_str .= make_row(array($cw['colonists'], '<b>' . nombre($planet['colon']) . "</b><br />(" . $cw['max'] . ": <b>" . nombre($planet[max_population]) . "</b>)", "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&single_ship_deal=1&type=1'>" . $cw['load/unload'] . "</a>", "<a href='planet.php?planet_id={$planet_id}&do_all=1&type=1'>" . $st[1689] . "</a> - <a href='planet.php?planet_id={$planet_id}&do_all=2&type=1'>" . $st[1690] . "</a> ", "<a href='planet.php?planet_id={$planet_id}&autoshift=1&type=1'>" . $st[1615] . "</a>"));
 $output_str .= make_row(array($cw['metals'], $planet['metal'], "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&single_ship_deal=1&type=2'>" . $cw['load/unload'] . "</a>", "<a href='planet.php?planet_id={$planet_id}&do_all=1&type=2'>" . $st[1689] . "</a> - <a href='planet.php?planet_id={$planet_id}&do_all=2&type=2'>" . $st[1690] . "</a> ", "<a href='planet.php?planet_id={$planet_id}&autoshift=1&type=2'>" . $st[1615] . "</a>"));
 $output_str .= make_row(array($cw['fuels'], $planet['fuel'], "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&single_ship_deal=1&type=3'>" . $cw['load/unload'] . "</a>", "<a href='planet.php?planet_id={$planet_id}&do_all=1&type=3'>" . $st[1689] . "</a> - <a href='planet.php?planet_id={$planet_id}&do_all=2&type=3'>" . $st[1690] . "</a> ", "<a href='planet.php?planet_id={$planet_id}&autoshift=1&type=3'>" . $st[1615] . "</a>"));
 $output_str .= make_row(array($cw['electronics'], $planet['elect'], "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&single_ship_deal=1&type=4'>" . $cw['load/unload'] . "</a>", "<a href='planet.php?planet_id={$planet_id}&do_all=1&type=4'>" . $st[1689] . "</a> - <a href='planet.php?planet_id={$planet_id}&do_all=2&type=4'>" . $st[1690] . "</a> ", "<a href='planet.php?planet_id={$planet_id}&autoshift=1&type=4'>" . $st[1615] . "</a>"));
 $output_str .= "</td></tr></form></table>";
 $output_str .= "<a href='{$_SERVER['PHP_SELF']}?planet_id={$planet_id}&dump_all=1'>" . $st[1691] . "<p /><br /><p />";
 $output_str .= $st[1692] . make_table(array($st[1693], $st[1694], $st[1695], popup_help("help.php?topic=Combat&popup=1&sub_topic=Planet,_and_assisted_fleet_combat", 500, 400, $st[1696])));
 $fleet_def_figs = $planet['fighters'] - $defending_fighters;
 $output_str .= make_row(array($planet['fighters'], $defending_fighters, $fleet_def_figs, "<a href='planet.php?planet_id={$planet_id}&allocate_figs=1'>" . $st[1697] . "</a>"));
 $output_str .= "</table>";
 if (avail_check(4002)) {
     //ensure mining drones have been invented
     $output_str .= "<p /><br />" . $cw['system_mining'] . "<br />";
     if ($planet['mining_drones'] > 0) {
         $unalloc = $planet['mining_drones'] - $planet['drones_alloc_metal'] - $planet['drones_alloc_fuel'];
         get_star();
コード例 #9
0
ファイル: attack.php プロジェクト: nilsine/Astra-Vires
         $msg_txt_1 = $st[291];
         $msg_txt_2 = $st[292];
     } else {
         $msg_txt_1 = $st[293];
         $msg_txt_2 = $st[294];
     }
     //planet lost all it's allocated figs
     if ($p_dam >= $p_details['fighters']) {
         $players_array[$p_details['login_id']]['fighters_lost'] += $target_planets[$p_id]['fighters'];
         $target_planets[$p_id]['fighters'] = 0;
         $planets_beaten++;
         $ships_involved_str[$p_details['login_id']]['lost'] .= "<br /><b class='b1'>{$p_details['planet_name']}</b> {$msg_txt_1} <b>" . nombre($replica_of_planets[$p_id]['fighters']) . "</b>";
     } else {
         $players_array[$p_details['login_id']]['fighters_lost'] += $p_dam;
         $target_planets[$p_id]['fighters'] -= $p_dam;
         $ships_involved_str[$p_details['login_id']]['survived'] .= "<br /><b class='b1'>{$p_details['planet_name']}</b> {$msg_txt_2} <b>" . nombre($p_dam) . "</b>";
     }
     $target_planets[$p_id]['allocated_to_fleet'] = 0;
 }
 //end of planets processing foreach loop
 /*************
  * Misc, pre-user processing.
  *************/
 //do some maths to print pretty percentages.
 $friends_lost_perc = calc_perc($friends_killed, $friendly_details['ship_count']);
 $targets_lost_perc = calc_perc($targets_killed, $target_details['ship_count']);
 $friends_alive_perc = calc_perc($friendly_details['ship_count'] - $friends_killed, $friendly_details['ship_count']);
 $targets_alive_perc = calc_perc($target_details['ship_count'] - $targets_killed, $target_details['ship_count']);
 if ($planet_attack == 1 || count($target_planets) > 0) {
     $temp_planets_1 = "Planets<br />Eliminated";
     $temp_planets_2 = $planets_beaten;
コード例 #10
0
ファイル: listado.php プロジェクト: mikeangeloo/TecnoRollo
"><h3><?php 
        echo $row_DatosPost['titulo'];
        ?>
</h3></a>

<span><?php 
        $cortar = substr($row_DatosPost['mensaje'], 0, 305) . "...";
        echo $cortar;
        ?>
</span><br>





<?php 
        echo "Publicado por: " . nombre($row_DatosPost['autor']);
        ?>


</div>
<?php 
    } while ($row_DatosPost = mysql_fetch_assoc($DatosPost));
} else {
    echo 'No hay anuncios';
}
?>


<?php 
mysql_free_result($DatosPost);
コード例 #11
0
include '../librerias/quitar.php';
$idu = mysql_real_escape_string(quitar($_REQUEST['IDu']));
$nombre = mysql_real_escape_string(quitar($_REQUEST['nombre']));
$nombre = utf8_decode($nombre);
$apPaterno = mysql_real_escape_string(quitar($_REQUEST['ap_paterno']));
$apPaterno = utf8_decode($apPaterno);
$apMaterno = mysql_real_escape_string(quitar($_REQUEST['ap_materno']));
$apMaterno = utf8_decode($apMaterno);
$correo = mysql_real_escape_string(quitar($_REQUEST['correo']));
$usuario = mysql_real_escape_string(quitar($_REQUEST['usuario']));
$tipo = mysql_real_escape_string(quitar($_REQUEST['tipo']));
$activo = mysql_real_escape_string(quitar($_REQUEST['activo']));
$band = 0;
include '../librerias/libreriaauto.php';
if ($nombre != "" && $apPaterno != "" && $apMaterno != "" && $usuario) {
    if (nombre($nombre) == 1) {
        $nombre = utf8_encode($nombre);
        $band = 1;
        echo "<script>alert('Nombre no valido: {$nombre}')</script>";
    }
    if (apPat($apPaterno) == 1) {
        $apPaterno = utf8_encode($apPaterno);
        $band = 1;
        echo "<script>alert('Apellido Paterno no valido: {$apPaterno}')</script>";
    }
    if (apMat($apMaterno) == 1) {
        $apMaterno = utf8_encode($apMaterno);
        $band = 1;
        echo "<script>alert('Apellido Materno no valido: {$apMaterno}')</script>";
    }
    if (email($correo) == 1) {
コード例 #12
0
ファイル: bm_ships.php プロジェクト: nilsine/Astra-Vires
#$text .= make_table(array("Ship Name","Abbrv.","Cash Cost","Tech Cost","Type"));
foreach ($ship_types as $num => $ship_stats) {
    if ($ship_stats['tcost'] == 0) {
        //skip non-tech ships.
        continue;
    } else {
        if (config_check("oo", $ship_stats)) {
            if ($user['one_brob']) {
                $ship_stats['cost'] = $ship_stats['cost'] * $user['one_brob'];
                $ship_stats['tcost'] = $ship_stats['tcost'] * $user['one_brob'];
            }
            $ab_text = "";
        } else {
            $ab_text = "<a href='bm_ships.php?mass={$ship_stats['type_id']}'>" . $cw['buy_many'] . "</a>";
        }
        $ship_stats['cost'] = nombre($ship_stats['cost']);
        if (!isset($ships_for_sale[$ship_stats['type']])) {
            $ships_for_sale[$ship_stats['type']] = "";
        }
        $txt = make_row(array("<a href='bm_ships.php?ship_type={$ship_stats['type_id']}'>{$ship_stats['name']}</a>", "{$ship_stats['class_abbr']}", "<b>{$ship_stats['cost']}</b>", "<b>{$ship_stats['tcost']}</b>", "<a href='bm_ships.php?ship_type={$ship_stats['type_id']}'>" . $cw['buy_one'] . "</a>", $ab_text, popup_help("help.php?popup=1&ship_info={$ship_stats['type_id']}&db_name={$db_name}", 300, 400)));
        $ships_for_sale[$ship_stats['type']] .= $txt;
    }
}
if (empty($ships_for_sale)) {
    $text .= $st[384];
} else {
    foreach ($ships_for_sale as $class => $str) {
        $text .= "<p />{$class}s available:";
        if (empty($str)) {
            $text .= "<br /><b>" . $cw['none'] . "</b>";
        } else {
コード例 #13
0
ファイル: equip_shop.php プロジェクト: nilsine/Astra-Vires
        $error_str .= fill_fleet('armour', 'max_armour', $cw['armour-units'], $armour_cost);
    }
}
db("select * from {$db_name}_ships where ship_id = {$user['ship_id']}");
$vaisseau_controle = dbr(1);
$error_str .= $st[1065];
$error_str .= $st[1066];
$error_str .= "<table class='equip_shop'><tr><th>Type</th><th>Coût</th><th>Vaisseau (" . $vaisseau_controle['ship_name'] . ")</th><th>Flotte complète</th><th></th></tr>";
$error_str .= "<tr><td>" . $cw['fighters'] . "</td><td> <b>{$fighter_cost}</b> / unité</td><td><center><a href='{$filename}?buy=1'>Equiper vaisseau</center></a>  </td><td>  <a href='{$filename}?fill_fleet=1'>" . $cw['fill_fleet'] . "</a></td>  <td>" . popup_help("help.php?topic=Combat&popup=1&sub_topic=-_Chasseurs", 440, 225) . "</td></tr>";
$error_str .= "<tr><td>" . $cw['shields'] . "</td><td> <b>{$shield_cost}</b> / unité</td><td><center><a href='{$filename}?buy=2'>Equiper vaisseau</center></a> </td><td>  <a href='{$filename}?fill_fleet=2'>" . $cw['fill_fleet'] . "</a></td>  <td>" . popup_help("help.php?topic=Combat&popup=1&sub_topic=-_Boucliers", 400, 205) . "</td></tr>";
$error_str .= "<tr><td>" . $cw['armour'] . "</td><td> <b>{$armour_cost} </b> / unité </td><td><center><a href='{$filename}?buy=3'>Equiper vaisseau</center></a></td><td><a href='{$filename}?fill_fleet=3'>" . $cw['fill_fleet'] . "</a></td>  <td>" . popup_help("help.php?topic=Combat&popup=1&sub_topic=-_Coques", 440, 260) . "</td></tr>";
if ($GAME_VARS['alternate_play_1'] == 1) {
    $error_str .= "<tr><td>" . $cw['mining_switcher'] . "</td><td><b>" . nombre($mining_switch_cost) . "</b></td><td><center><a href='{$filename}?switch=1'>Equiper vaisseau</a></center></td><td><a href='{$filename}?mass_switch=1'>" . $cw['switch_fleet'] . "</td></tr></a></table>";
}
$error_str .= "<table class='equip_shop'><tr><th>Type</th><th>Coût</th><th></th></tr>";
if ($user['login_id'] == 1 || avail_check(1000)) {
    $error_str .= $st[1067];
    $error_str .= "<tr><td>" . $cw['genesis_device'] . "</td><td><b>" . nombre($genesis_cost) . "</b></td><td><a href='{$filename}?buy=5'>Acheter</a></td></tr>";
}
if (!$GAME_VARS['bomb_flag'] || $user['login_id'] == 1) {
    if (avail_check(1001)) {
        $error_str .= "<tr><td>" . $cw['alpha_bomb'] . "</td><td><b>" . nombre($bomb_cost) . "</b></td><td><a href='{$filename}?buy=7'>Acheter</a></td></tr> ";
    }
    /*if(avail_check(1002)){
    		$error_str .= "<br /><a href='$filename?buy=6'>Gamma Bomb</a>: $bomb_cost";
    	}*/
}
$error_str .= "</table>";
$error_str .= "<br /><br /><p /><a href='help.php?topic=Equipment' target='_blank'>" . $st[1068] . "</a>";
$rs = "<p /><a href='earth.php'>" . $cw['return_to_earth'] . "</a>";
print_page($cw['equipment_shop'], $error_str);
コード例 #14
0
function captcha()
{
    $mot = nombre(5);
    $_SESSION['captcha'] = $mot;
    image($mot);
}
コード例 #15
0
ファイル: ver_post.php プロジェクト: mikeangeloo/TecnoRollo
<?php 
include 'inc/menu.php';
?>


<div class="cuerpo2">
<h1><?php 
echo $row_DatosVer['titulo'];
?>
</h1>
<?php 
echo $row_DatosVer['mensaje'];
?>
<br>
<?php 
echo nombre($row_DatosVer['autor']);
?>
</div>


<?php 
include 'inc/footer.php';
?>


<?php 
if (!isset($_SESSION['iduser'])) {
    include 'inc/flotante.php';
}
?>