Esempio n. 1
0
meta-status;<?php 
// this status.php file tells publite2 about the number of available freeciv-web servers in the metaserver.
ini_set("include_path", ini_get("include_path") . ":" . $_SERVER["DOCUMENT_ROOT"]);
include_once "php_code/settings.php";
if ($error_msg != NULL) {
    $config_problem = true;
}
if (!$config_problem) {
    include_once "php_code/php_code_find.php";
    // includes for support routines
    include_once php_code_find("fcdb.php");
    include_once php_code_find("versions_file.php");
    include_once php_code_find("img.php");
    include_once php_code_find("html.php");
    fcdb_metaserver_connect();
}
$stmt = "select count(*) as count from servers UNION ALL select count(*) as count from servers where " . "type = 'singleplayer' and state = 'Pregame' and stamp >= DATE_SUB(NOW(), INTERVAL 1 MINUTE) " . "UNION ALL select count(*) as count from servers where type = 'multiplayer' and state = 'Pregame' and stamp >= DATE_SUB(NOW(), INTERVAL 1 MINUTE)";
$res = fcdb_exec($stmt);
$nr = fcdb_num_rows($res);
if ($nr != 3) {
    print "error";
} else {
    $row = fcdb_fetch_array($res, 0);
    print db2html($row["count"]);
    print ";";
    $row = fcdb_fetch_array($res, 1);
    print db2html($row["count"]);
    print ";";
    $row = fcdb_fetch_array($res, 2);
    print db2html($row["count"]);
}
Esempio n. 2
0
 <td><b>Supported</b>
 <td><b>Comment</b>

<?

        $res=pg_exec("select * from version where productid=".$prod["productid"]." order by version");
        $ln=pg_numrows($res);
        for($i=0;$i<$ln;$i++){
                $ar=pg_fetch_array($res,$i);
                print("<tr>");
                print("<td>".db2html($ar["version"]));
                print("<td>".$ar["costs_initial"]);
                print("<td>".$ar["costs_fix"]);
                print("<td>".$ar["costs_bytime"]."/".$ar["costs_timeframe"]);
                print("<td>".($ar["supported"]?"yes":"no"));
                print("<td>".db2html($ar["comment"]));
                print("</tr>\n");
        }
        pg_freeresult($res);

?>

</table><br>

[<? print("<a href=\"version.php?newversion=1&product=".$prod["productid"]."\">New Version</a>"); ?>]<p>

<? if(isset($HTTP_VARS["newversion"])){ ?>

<h2>New Version</h2>

<form action="version.php" method="POST">
Esempio n. 3
0
        }
        $lower_fixed = 1;
    }
    $upper_bound = $lid;
}
?>

<body>


<?php 
// TEXT ____________________
if ($mode != 'nest') {
    $segs = "SELECT * FROM {$table} WHERE audio_file = '{$audio_file}' AND id >= {$lower_bound} AND id <= {$upper_bound}";
    $segs = mysql_query($segs);
    $stringy = db2html($segs);
    print "<div class=\"txt\">" . $stringy . "</div>";
    //print $divs;
}
if ($mode == 'nest') {
    ?>
 <div class="iframe">
      <iframe name="text" frameborder="0" width="525" height="256" scrolling="auto" src=<?php 
    echo "\"?line_key={$id}&corpus={$corpus}&size={$size}&mode=text\"";
    ?>
>
      </iframe>
</div>
 <?php 
}
// !TEXT ____________________
Esempio n. 4
0
<table frame="1" border="1">

<tr>
 <td><b>Product</b>
 <td><b>Version</b>
 <td><b>License</b>
 <td><b>Status</b>

<?
        $res=pg_exec("select * from product,version,license,status where ".
                        "product.productid=version.productid AND ".
                        "version.versionid=license.versionid AND ".
                        "status.statusid=license.statusid AND ".
                        "license.adminid='".$user->getusername()."' ".
                        "ORDER BY product.product,version.version,status.status");
        $ln=pg_numrows($res);
        for($i=0;$i<$ln;$i++){
                $ar=pg_fetch_array($res,$i);
                print("<tr>");
                print("<td>".db2html($ar["product"]));
                print("<td>".db2html($ar["version"]));
                print("<td>".db2html($ar["licensenumber"]));
                print("<td>".db2html($ar["status"]));
                print("</tr>\n");
        }
        pg_freeresult($res);
?>
</table>


<? printfooter() ?>