Ejemplo n.º 1
0
function newGame()
{
    start();
    echo "<div class='title'> " . getNumber() . " </div>";
    echo "<div class='sub-title'>Quedan por salir - " . getRest() . "</div>";
    drawBoard();
    fillTable(18);
    showTable();
}
Ejemplo n.º 2
0
function handleSearchPage()
{
    include_once 'login.php';
    include_once 'database_conn.php';
    include_once 'showEventFunction.php';
    $pageHeader = "Result";
    $output = "<h1>{$pageHeader}</h1>";
    $backURL = "<br/><a href = \"searchPage.php\">Back</a>\n\t<br/><a href = \"index.php\">Back to Home</a>\n\t";
    $event = array();
    foreach ($_POST as $field => $value) {
        //echo "$field => $value <br/>";
        if (strcmp($field, "submit") === 0) {
            continue;
        }
        $event[$field] = $value;
        // sanitizeData($value);
    }
    $event = array_filter($event);
    //if any field is not filled, stop user
    //then ask user to enter something
    if (empty($event)) {
        $output .= "Please describe something to search.";
        return $output . $backURL;
    }
    $sql = generateSQL($event);
    $datas = array();
    $datas['venues'] = getFromDb($conn, "SELECT * FROM te_venue");
    $datas['categories'] = getFromDb($conn, "SELECT * FROM te_category");
    $datas['events'] = getFromDb($conn, $sql);
    $datas['events'] = array_filter($datas['events']);
    // if there is record, show in table
    if (!empty($datas['events'])) {
        $output .= showTable($datas, false);
        return $output . $backURL;
    } else {
        //if there is no result, result not found
        $output .= "No record found.";
        return $output . $backURL;
    }
}
Ejemplo n.º 3
0
                mysql_query($sql) or die("<br/>Error" . mysql_error());
                mysql_query("update valuefacts set state = 'A' where type = 'UD'") or die("<br/>Error" . mysql_error());
            }
            requestAction("update-schemacfg", 2, 0, "", $resonse);
            echo "<br/><div class=\"info\"><b><center>Einstellungen gespeichert</center></b></div><br/><br/>";
        }
    }
}
echo "      <form action=" . htmlspecialchars($_SERVER["PHP_SELF"]) . " method=post>\n";
showButtons();
showTable("UD", "Allgemein");
showTable("VA", "Messwerte");
showTable("DI", "Digitale Eingänge");
showTable("DO", "Digitale Ausgänge");
showTable("AO", "Analoge Ausgänge");
showTable("W1", "One Wire Sensoren");
echo "      </form>\n";
mysql_close();
include "footer.php";
//***************************************************************************
// Show Buttons
//***************************************************************************
function showButtons()
{
    echo "        <div>\n";
    echo "          <br/>\n";
    echo "          <button class=\"button3\" type=submit name=action value=init onclick=\"return confirmSubmit('Stammdaten der Messwerte initialisieren')\">Init</button>\n";
    echo "          <button class=\"button3\" type=submit name=action value=store onclick=\"return confirmSubmit('Einstellungen speichern?')\">Speichern</button>\n";
    echo "        </div>\n";
}
//***************************************************************************
Ejemplo n.º 4
0
<?php

require_once 'categorySelection.php';
$data = Translation::getChangedTranslations($translationId);
require_once 'showTable.php';
showTable(array($data));
?>
<script type="application/javascript">
<?php 
require_once 'js/translation.js';
?>
</script>
Ejemplo n.º 5
0
$rows = $parser->rows;
$filters = $parser->filters;
//sort rows
usort($rows, "compareRows");
//filter/search rows
if (!empty($filter) || !empty($search)) {
    $r2 = array();
    foreach ($rows as $r) {
        if ((empty($filter) || $r->rgroup == $filter) && (empty($search) || stripos($r->rname, $search) !== false)) {
            $r2[] = $r;
        }
    }
    $rows = $r2;
}
if (isset($_REQUEST['show'])) {
    showTable();
}
function showTable()
{
    showTableHeader();
    showTableRows();
    showPrevNext();
}
//set up table header
function showTableHeader()
{
    global $colum, $sortBy, $sortDesc, $filter, $search, $theme, ${$theme};
    echo "  <table class='packlist' border='0'>";
    echo "\n         <tr class='tableheader'>";
    if (${$theme}['icons']) {
        echo "\n           <th id='left'></th>\n";
Ejemplo n.º 6
0
echo $_SERVER['PHP_SELF'];
?>
">
							<div class="row">
								<label>Banyak data per halaman :</label> <input type="text" name="n_data_halaman" size="5" value="10" /> <input type="submit" value="Ganti!" />
							</div>
						</form>
					</div>
					<br />
					<div style="width: 550px; border: 1px solid #BFBFBF; overflow-y:none; overflow-x: scroll;">
						<table id="tabel_barang" class="sortable">
							<?php 
$query = "SELECT barang.id AS id, \n\t\t\t\t\t\t\t\t\t\tbarang.nama AS nama, \n\t\t\t\t\t\t\t\t\t\tbarang.kode AS kode, \n\t\t\t\t\t\t\t\t\t\tbarang.harga_beli AS harga_beli,\n\t\t\t\t\t\t\t\t\t\tbarang.persen_markup AS persen_markup,\n\t\t\t\t\t\t\t\t\t\tbarang.stok AS stok,\n\t\t\t\t\t\t\t\t\t\tsatuan.nama AS nama_satuan,\n\t\t\t\t\t\t\t\t\t\tgolongan.nama AS nama_golongan\n\t\t\t\t\t\t\t\t\tFROM barang, satuan, golongan\n\t\t\t\t\t\t\t\t\tWHERE satuan.id = barang.id_satuan AND golongan.id = barang.id_golongan \n\t\t\t\t\t\t\t\t\tLIMIT {$posisi}, {$n_data_halaman}";
//echo $query;
$elemen = array('Kode barang' => 'kode', 'Nama barang' => 'nama', 'Nama golongan' => 'nama_golongan', 'Harga beli' => 'harga_beli', 'Persen Markup' => 'persen_markup', 'Satuan' => 'nama_satuan', 'Jumlah stok' => 'stok');
showTable($query, $elemen, 'row_click');
?>
						</table>
					</div>
					<p>Halaman: |<?php 
showPagingLink($halaman, $n_data_halaman, $n_halaman);
?>
</p>
					<p>Keterangan: klik pada judul tabel untuk mengurutkan data.</p>
				</div>
			</div>
			<script language="Javascript">
			function row_click(val) {
				window.location = '<?php 
echo $_SERVER['PHP_SELF'];
?>
    while ($rowTest = oci_fetch_array($columnNamesArray, OCI_ASSOC + OCI_RETURN_NULLS)) {
        foreach ($rowTest as $itemTest) {
            echo "    <td>" . ($itemTest !== null ? htmlentities($itemTest, ENT_QUOTES) : "&nbsp;") . "</td>\n";
        }
    }
    echo "</tr>\n";
    while ($row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) {
        echo "<tr>\n";
        foreach ($row as $item) {
            echo "    <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;") . "</td>\n";
        }
        echo "</tr>\n";
    }
    echo "</table>\n";
}
showTable($conn);
//END OF SUPPLIER TABLE
?>
<br>
                        <br>


                        <div class="form-group">
                            <label class="control-label col-sm-4">Pick supplier
                            column to modify :</label> <select name=
                            "tableType">
                                <?php 
// RETRIVE COLUMN INFORMATION FROM SUPPLIER TABLE
$columnNames = 'SELECT column_name FROM all_tab_cols WHERE  table_name = \'SUPPLIER\'';
$columnNamesArray = oci_parse($conn, $columnNames);
oci_execute($columnNamesArray);
Ejemplo n.º 8
0
                    $harga = $hasil[harga_beli] * (100 + $hasil[persen_markup]) / 100;
                    echo "</td><td>{$hasil['kode']}</td><td>{$hasil['nama']}</td><td>{$harga}</td><td>{$hasil['jumlah']}</td><td>" . $harga * $hasil[jumlah] . "</td></tr>";
                    $total += $harga * $hasil[jumlah];
                }
                //hitung total yg kelewat
                echo "<tr class=\"last_row\"><td colspan=\"6\" style=\"text-align: right\">Total :</td><td>{$total}</td></tr>";
            }
            echo "</table>";
            break;
        case 'pengguna_all':
            echo "<h1>DAFTAR SELURUH PENGGUNA</h1>";
            echo "<div class=\"box\">Tanggal Cetak: " . $tanggal . "</div>";
            $query = "\tSELECT pengguna.nama_lengkap AS nama,\n\t\t\t\t\t\t\t\t\tpengguna.username AS username,\n\t\t\t\t\t\t\t\t\tstatus.nama AS nama_status\n\t\t\t\t\t\t\t\tFROM pengguna, status\n\t\t\t\t\t\t\t\tWHERE pengguna.id_status = status.id";
            $elemen = array('Nama Pengguna' => 'nama', 'User Name' => 'username', 'Status' => 'nama_status');
            echo "<table>";
            showTable($query, $elemen);
            echo "</table>";
            break;
    }
    // <<< ATUR ALERT >>>
    if (strlen($pesan) > 0) {
        $pesan = '<div class="box">' . $pesan . '</div>';
    }
    $tampil_baru = true;
} else {
    if (empty($_GET[id])) {
        $tampil_baru = true;
    }
}
?>
		</div>
Ejemplo n.º 9
0
<?php

include "header.php";
printHeader();
// -------------------------
// establish db connection
mysql_connect($mysqlhost, $mysqluser, $mysqlpass);
mysql_select_db($mysqldb);
mysql_query("set names 'utf8'");
mysql_query("SET lc_time_names = 'de_DE'");
showTable("Fehlerspeicher");
//***************************************************************************
// Show Table
//***************************************************************************
function showTable($tableTitle)
{
    $i = 0;
    echo "      <br/>\n";
    echo "      <table class=\"tableTitle\" cellspacing=0 rules=rows>\n";
    echo "        <tr>\n";
    echo "          <td><center><b>{$tableTitle}</b></center></td>\n";
    echo "        </tr>\n";
    echo "      </table>\n";
    echo "      <br/>\n";
    echo "      <table  class=\"tableLight\" border=1 cellspacing=0 rules=rows>\n        <tr class=\"tableHead1\">\n          <td> Zeit </td>\n          <td> Nr </td>\n          <td> Status </td>\n          <td> Fehler </td>\n        </tr>\n";
    $result = mysql_query("select * from errors order by time desc") or die("<br/>Error" . mysql_error());
    $num = mysql_numrows($result);
    while ($i < $num) {
        $time = mysql_result($result, $i, "time");
        $nr = mysql_result($result, $i, "number");
        $state = mysql_result($result, $i, "state");
Ejemplo n.º 10
0
    $data = array();
    if (!$dependsOnStudy) {
        $data = Translation::pageAll($pGroups[$providerGroup], '', $translationId);
    } else {
        foreach (Translation::studies() as $s) {
            $data[$s] = Translation::pageAll($pGroups[$providerGroup], $s, $translationId);
        }
    }
    require_once 'showTable.php';
    //Below output only if $data contains something:
    if (count($data) !== 0) {
        echo '<legend>Data to translate:</legend>';
        if ($dependsOnStudy) {
            foreach ($data as $study => $tdata) {
                echo "<h4>{$study}:</h4>";
                showTable($tdata);
            }
        } else {
            showTable($data);
        }
    } else {
        echo '<p class="well">Sorry, no data was found.</p>';
    }
}
?>
<script type="application/javascript">
<?php 
require_once 'js/translation.js';
?>
</script>
Ejemplo n.º 11
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Event List</title>
<link rel="stylesheet" type="text/css" href="bookEvent.css"/>
</head> 
<body>
<?php 
include_once 'login.php';
include_once 'showEventFunction.php';
include 'database_conn.php';
$pageHeader = "Event List";
$output = "<h1>{$pageHeader}</h1>";
$backURL = "<br/><a href = \"index.php\">Back to Home</a>";
echo $output . $backURL;
$datas = array();
$datas['venues'] = getFromDb($conn, "SELECT * FROM te_venue");
$datas['categories'] = getFromDb($conn, "SELECT * FROM te_category");
$datas['events'] = getFromDb($conn, "SELECT * FROM te_events ORDER BY eventTitle ASC");
$formEdible = false;
if (isset($_SESSION['logged-in'])) {
    $formEdible = true;
} else {
    $formEdible = false;
}
echo showTable($datas, $formEdible);
mysqli_close($conn);
?>
</body>
</html>
<?php

require_once 'categorySelection.php';
require_once 'query/translationTableProjection.php';
if (array_key_exists('tId', $_GET)) {
    $tId = intval($_GET['tId']);
} else {
    $tId = 1;
}
if (array_key_exists('tables', $_GET)) {
    $tables = explode(',', $_GET['tables']);
    $projection = TranslationTableProjection::projectTables($tables);
} else {
    $projection = TranslationTableProjection::projectAll();
}
if ($projection instanceof Exception) {
    Config::error($projection->getMessage(), true, true);
} else {
    $changed = $projection->translationNotOriginal($tId);
    require_once 'showTable.php';
    showTable(array('projection' => $changed));
}
?>
<script type="application/javascript">
<?php 
require_once 'js/translation.js';
?>
</script>
Ejemplo n.º 13
0
         header("Location: DTTadmin.php?a=admin");
     } else {
         if ($action == "admin") {
             if (!isset($_SESSION["name"])) {
                 header("Location: DTTadmin.php?a=login");
             } else {
                 //var_dump($_SESSION["name"]);
                 $admin = file_get_contents("widgetAdmin.html");
                 echo setTitle($template, "", $admin);
                 require_once "adminArt.html";
                 $query = $pdo->prepare("SELECT * FROM articleTable");
                 $count = 0;
                 if ($query->execute()) {
                     while ($row = $query->fetch()) {
                         $count += 1;
                         echo showTable($row, $count);
                     }
                 }
                 $link = '</table> <br/>' . $count . ' articles in total<br/><br/><a href = "article.php?a=admin&b=add">Add a New Article</a>';
                 echo setFoot($link);
             }
         } else {
             if ($action == "logout") {
                 logout();
                 header("Location: index.php");
             } else {
                 header("Location: DTTadmin.php?a=login");
             }
         }
     }
 }