<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// edit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - New Log Entry");
if (!isset($_REQUEST['serno']) || $_REQUEST['serno'] == '') {
    die("serial number not specified or invalid!");
}
$serno = intval($_REQUEST['serno']);
if (isset($_REQUEST['logno'])) {
    $logno = $_REQUEST['logno'];
    die("log number must not be specified when adding! ({$logno})");
}
?>
<form action=donewlog.php method=POST>
<p></p>
<?php 
echo "<input type=hidden name=serno value={$serno}>\n";
begin_table(3);
// date date
print_field("date", array('date' => date("Y-m-d")));
// who char(20)
print_field("who", array());
// details text
print_field_multiline("details", array(), 60, 10, 'text_filter');
end_table();
?>
Beispiel #2
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// dodelete page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Delete Log Entry Results");
if (!($serno = intval($serno))) {
    die("the board serial number was not specified");
}
if (!isset($logno) || $logno == 0) {
    die("the log entry number not specified!");
}
mysql_query("delete from log where serno={$serno} and logno={$logno}");
if (mysql_errno()) {
    $errstr = mysql_error();
    echo "\t<font size=+4>\n";
    echo "\t\t<p>\n";
    echo "\t\t\tThe following error was encountered:\n";
    echo "\t\t</p>\n";
    echo "\t\t<center>\n";
    printf("\t\t\t<b>%s</b>\n", $errstr);
    echo "\t\t</center>\n";
    echo "\t</font>\n";
} else {
    echo "\t<font size=+2>\n";
    echo "\t\t<p>\n";
    echo "\t\t\tThe log entry with log number <b>{$logno}</b>\n";
    echo "\t\t\tand serial number <b>{$serno}</b> ";
Beispiel #3
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// doedit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Edit Board Results");
if ($serno == 0) {
    die("the board serial number was not specified");
}
$query = "update boards set";
if (isset($ethaddr)) {
    if (!eth_addr_is_valid($ethaddr)) {
        die("ethaddr is invalid ('{$ethaddr}')");
    }
    $query .= " ethaddr='{$ethaddr}',";
}
if (isset($date)) {
    list($y, $m, $d) = split("-", $date);
    if (!checkdate($m, $d, $y) || $y < 1999) {
        die("date is invalid (input '{$date}', " . "yyyy-mm-dd '{$y}-{$m}-{$d}')");
    }
    $query .= " date='{$date}'";
}
if (isset($batch)) {
    if (strlen($batch) > 32) {
        die("batch field too long (>32)");
    }
    $query .= ", batch='{$batch}'";
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// doedit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Board Registration Results");
if (isset($_REQUEST['serno'])) {
    $serno = $_REQUEST['serno'];
    die("serial number must not be set ({$serno}) when Creating!");
}
$query = "update boards set";
list($y, $m, $d) = split("-", $date);
if (!checkdate($m, $d, $y) || $y < 1999) {
    die("date is invalid (input '{$date}', yyyy-mm-dd '{$y}-{$m}-{$d}')");
}
$query .= " date='{$date}'";
if ($batch != '') {
    if (strlen($batch) > 32) {
        die("batch field too long (>32)");
    }
    $query .= ", batch='{$batch}'";
}
if (!in_array($type, $type_vals)) {
    die("Invalid type ({$type}) specified");
}
$query .= ", type='{$type}'";
if (($rev = intval($rev)) <= 0 || $rev > 255) {
    die("Revision number is invalid ({$rev})");
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
require "defs.php";
pg_head("{$bddb_label}");
?>
<font size="+4">
  <form action=execute.php method=POST>
    <table width="100%" cellspacing=10 cellpadding=10>
      <tr>
	<td align=center>
	  <input type=submit name=submit value="New"></input>
	</td>
	<td align=center>
	  <input type=submit name=submit value="Edit"></input>
	</td>
	<td align=center>
	  <input type=submit name=submit value="Browse"></input>
	</td>
	<td align=center>
	  <input type=submit name=submit value="Log"></input>
	</td>
      </tr>
      <tr>
	<td align=center colspan=4>
	  <b>Serial Number:</b>
	  <input type=text name=serno size=10 maxsize=10 value=""></input>
	</td>
Beispiel #6
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
require "defs.php";
pg_head("{$bddb_label} - Unknown Submit Type");
?>
<center>
  <font size="+4">
    <b>
      The <?php 
echo "{$bddb_label}";
?>
 form was submitted with an
      unknown SUBMIT type <?php 
echo "(value was '{$submit}')";
?>
.
      <br></br>
      Perhaps you typed the URL in directly? Click here to go to the
      home page of the <a href="index.php"><?php 
echo "{$bddb_label}";
?>
</a>.
    </b>
  </font>
</center>
<?php 
pg_foot();
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// edit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Edit Board Registration");
if ($serno == 0) {
    die("serial number not specified or invalid!");
}
$pserno = sprintf("%010d", $serno);
echo "<center><b><font size=+2>";
echo "Board Serial Number: {$pserno}";
echo "</font></b></center>\n";
?>
<p>
<form action=doedit.php method=POST>
<?php 
echo "<input type=hidden name=serno value={$serno}>\n";
$r = mysql_query("select * from boards where serno={$serno}");
$row = mysql_fetch_array($r);
if (!$row) {
    die("no record of serial number '{$serno}' in database");
}
begin_table(5);
// ethaddr char(17)
print_field("ethaddr", $row, 17);
// date date
print_field("date", $row);
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// list page (hymod_bddb / boards)
require "defs.php";
$serno = isset($_REQUEST['serno']) ? $_REQUEST['serno'] : '';
$verbose = isset($_REQUEST['verbose']) ? intval($_REQUEST['verbose']) : 0;
pg_head("{$bddb_label} - Browse database" . ($verbose ? " (verbose)" : ""));
?>
<p></p>
<?php 
$limit = isset($_REQUEST['limit']) ? abs(intval($_REQUEST['limit'])) : 20;
$offset = isset($_REQUEST['offset']) ? abs(intval($_REQUEST['offset'])) : 0;
if ($serno == '') {
    $lr = mysql_query("select count(*) as n from boards");
    $lrow = mysql_fetch_array($lr);
    if ($lrow['n'] > $limit) {
        $preoffset = max(0, $offset - $limit);
        $postoffset = $offset + $limit;
        echo "<table width=\"100%\">\n<tr>\n";
        printf("<td align=left><%sa href=\"%s?submit=Browse&offset=%d&verbose=%d\"><img border=0 alt=\"&lt;\" src=\"/icons/left.gif\"></a></td>\n", $offset > 0 ? "" : "no", $PHP_SELF, $preoffset, $verbose);
        printf("<td align=right><%sa href=\"%s?submit=Browse&offset=%d&verbose=%d\"><img border=0 alt=\"&gt;\" src=\"/icons/right.gif\"></a></td>\n", $postoffset < $lrow['n'] ? "" : "no", $PHP_SELF, $postoffset, $offset);
        echo "</tr>\n</table>\n";
    }
    mysql_free_result($lr);
}
?>
<table align=center border=1 cellpadding=10>
Beispiel #9
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// list page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Browse Board Log");
$serno = intval($serno);
if ($serno == 0) {
    die("serial number not specified or invalid!");
}
function print_cell($str)
{
    if ($str == '') {
        $str = '&nbsp;';
    }
    echo "\t<td>{$str}</td>\n";
}
?>
<table align=center border=1 cellpadding=10>
<tr>
<th>serno / edit</th>
<th>ethaddr</th>
<th>date</th>
<th>batch</th>
<th>type</th>
<th>rev</th>
<th>location</th>
</tr>
Beispiel #10
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// edit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - New Board Registration");
?>
<form action=donew.php method=POST>
<p></p>
<?php 
// if a serial number was supplied, fetch the record
// and use its contents as defaults
if ($serno != 0) {
    $r = mysql_query("select * from boards where serno={$serno}");
    $row = mysql_fetch_array($r);
    if (!$row) {
        die("no record of serial number '{$serno}' in database");
    }
} else {
    $row = array();
}
echo "<input type=hidden name=serno value=0>\n";
begin_table(5);
// date date
print_field("date", array('date' => date("Y-m-d")));
// batch char(32)
print_field("batch", $row, 32);
// type enum('IO','CLP','DSP','INPUT','ALT-INPUT','DISPLAY')
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// doedit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Edit Log Entry Results");
if (!isset($_REQUEST['serno']) || $_REQUEST['serno'] == '') {
    die("the board serial number was not specified");
}
$serno = intval($_REQUEST['serno']);
if (!isset($_REQUEST['logno']) || $_REQUEST['logno'] == '') {
    die("log number not specified!");
}
$logno = intval($_REQUEST['logno']);
$query = "update log set";
if (isset($_REQUEST['date'])) {
    $date = $_REQUEST['date'];
    list($y, $m, $d) = split("-", $date);
    if (!checkdate($m, $d, $y) || $y < 1999) {
        die("date is invalid (input '{$date}', " . "yyyy-mm-dd '{$y}-{$m}-{$d}')");
    }
    $query .= " date='{$date}'";
}
if (isset($_REQUEST['who'])) {
    $who = $_REQUEST['who'];
    $query .= ", who='" . $who . "'";
}
if (isset($_REQUEST['details'])) {
Beispiel #12
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// doedit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Add Log Entry Results");
if ($serno == 0) {
    die("serial number not specified!");
}
if (isset($logno)) {
    die("log number must not be set ({$logno}) when Creating!");
}
$query = "update log set serno={$serno}";
list($y, $m, $d) = split("-", $date);
if (!checkdate($m, $d, $y) || $y < 1999) {
    die("date is invalid (input '{$date}', yyyy-mm-dd '{$y}-{$m}-{$d}')");
}
$query .= ", date='{$date}'";
if (isset($who)) {
    $query .= ", who='" . $who . "'";
}
if (isset($details)) {
    $query .= ", details='" . rawurlencode($details) . "'";
}
// echo "final query = '$query'<br>\n";
$sqlerr = '';
mysql_query("insert into log (logno) values (null)");
if (mysql_errno()) {
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// edit page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Edit Board Log Entry");
if (!isset($_REQUEST['serno']) || $_REQUEST['serno'] == '') {
    die("serial number not specified!");
}
$serno = intval($_REQUEST['serno']);
if (!isset($_REQUEST['logno']) || $_REQUEST['logno'] == '') {
    die("log number not specified!");
}
$logno = intval($_REQUEST['logno']);
$pserno = sprintf("%010d", $serno);
$plogno = sprintf("%010d", $logno);
echo "<center><b><font size=+2>";
echo "Board Serial Number: {$pserno}, Log Number: {$plogno}";
echo "</font></b></center>\n";
?>
<p>
<form action=doedlog.php method=POST>
<?php 
echo "<input type=hidden name=serno value={$serno}>\n";
echo "<input type=hidden name=logno value={$logno}>\n";
$r = mysql_query("select * from log where serno={$serno} and logno={$logno}");
$row = mysql_fetch_array($r);
if (!$row) {
Beispiel #14
0
wp_head();
?>
</head>
<?php 
flush();
?>
<body <?php 
body_class();
?>
>

	<div id="wrap" class="wrap clr container">
		
		<?php 
if (get_theme_mod('pg_nav_below', '1')) {
} else {
    pg_nav();
}
?>
		
		<?php 
pg_head();
?>

		<?php 
if (get_theme_mod('pg_nav_below', '1')) {
    pg_nav();
}
?>
		
		<div id="main" class="site-main clr">
Beispiel #15
0
<?php

// php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder>
// (C) Copyright 2001
// Murray Jensen <*****@*****.**>
// CSIRO Manufacturing Science and Technology, Preston Lab
// dodelete page (hymod_bddb / boards)
require "defs.php";
pg_head("{$bddb_label} - Delete Board Results");
if (!($serno = intval($serno))) {
    die("the board serial number was not specified");
}
mysql_query("delete from boards where serno={$serno}");
if (mysql_errno()) {
    $errstr = mysql_error();
    echo "\t<font size=+4>\n";
    echo "\t\t<p>\n";
    echo "\t\t\tThe following error was encountered:\n";
    echo "\t\t</p>\n";
    echo "\t\t<center>\n";
    printf("\t\t\t<b>%s</b>\n", $errstr);
    echo "\t\t</center>\n";
    echo "\t</font>\n";
} else {
    echo "\t<font size=+2>\n";
    echo "\t\t<p>\n";
    echo "\t\t\tThe board with serial number <b>{$serno}</b> was" . " successfully deleted\n";
    mysql_query("delete from log where serno={$serno}");
    if (mysql_errno()) {
        $errstr = mysql_error();
        echo "\t\t\t<font size=+4>\n";