示例#1
0
function print_plataformas()
{
    $plataformas = get_mysql_model("SELECT name FROM platform   ");
    foreach ($plataformas as $plataforma) {
        $nombre = $plataforma["name"];
        echo "<option value=\"{$nombre}\" >{$nombre}</option>\n";
    }
}
示例#2
0
function print_model_select()
{
    $modelos = get_mysql_model("SELECT modelo_id, nombre FROM modelo  order by modelo_id asc ");
    foreach ($modelos as $modelo) {
        $modelo_id = $modelo["modelo_id"];
        $nombre = $modelo["nombre"];
        echo "<option value=\"{$modelo_id}\" >{$nombre}</option>\n";
    }
    echo "<option value=\"99\" selected>None Yet</option>\n";
}
示例#3
0
require_once "../inc/db_ops.inc";
db_init();
admin_page_head(tra("Simulation Model Creation/Deletion"));
echo " <script src=\"http://code.jquery.com/jquery-latest.js\"></script> ";
echo "\n  <style>\n  </style>\n\n<script> \n\n\n</script>";
echo "<form method=get action=emLanzaFormModelo.php>";
start_table();
row1("CREATE / DELETE", '9');
row2(tra("MODEL NUMBER %1 to Create OR Delete %2", "<br><span class=note>", "</span>"), "<input name=modelNumber type=text size=10 >");
row2("", "<input type=submit value='Go!'>");
row1("List of Actual Models ", '9');
echo "<tr><td>Model ID</td>";
echo "<td width=\"15\">" . "Model Name     " . "</td>\n";
echo "</tr>";
row1("", '9');
$models = get_mysql_model("SELECT modelo_id, nombre FROM modelo order by modelo_id ASC ");
foreach ($models as $model) {
    $model_id = $model["modelo_id"];
    $model_name = $model["nombre"];
    echo "<tr><td>" . $model_id . "</td>";
    echo "<td>\n\t\t\t<a href=\"emListModeloDetail.php?model=" . $model_id . "\">" . $model_name . "</a>\n\t\t\t</td>\n\t\t\t";
    echo " </tr>";
}
end_table();
echo "</form>\n";
/*
echo "<label for=\"tra\" id=\"tra\">Traza</label>";
echo "<td>
<a href=\"emLanzaForm.php\">". "Create Task" ."</a>
<a href=\"home.php\">". "Back Home " ."</a>
</td>
示例#4
0
 $salida = shell_exec('ls -l /tmp/newTaskExplain.txt >> /tmp/php.out');
 if (flock($fp, LOCK_SH | LOCK_NB)) {
     // do an exclusive lock
     ftruncate($fp, 0);
     // truncate file
     ftruncate($fpe, 0);
     // truncate file
     ///////////////////////////////
     ////INI   CREATE FILE  ////////
     ///////////////////////////////
     $linea = "#MODEL\n";
     fwrite($fp, $linea);
     fwrite($fpe, $linea);
     $linea = $model . "\n";
     fwrite($fp, $linea);
     $result = get_mysql_model("select nombre from modelo where modelo_id=" . $model);
     foreach ($result as $res) {
         $linea = $res["nombre"];
     }
     fwrite($fpe, $linea . "\n");
     $linea = "#PARAMETERS\n";
     fwrite($fp, $linea);
     fwrite($fpe, $linea);
     $parametrosAFicheroCnt = (string) count($parametros);
     $parametrosAFicheroNum = "";
     $parametrosAFicheroVal = "";
     $linea = " ";
     foreach ($parametros as $id => $val) {
         $parametrosAFicheroNum = $parametrosAFicheroNum . " " . $id;
         $parametrosAFicheroVal = $parametrosAFicheroVal . " " . $val;
         $linea = $linea . " " . dameNombreParametro($model, $id);