コード例 #1
0
#The full software license can be found here:
#http://www.accounting-123.com/a.php?a=153/GPLv3
#
#
#
#
#
#
#
#
#
#
#
require "settings.php";
# show current stock
$OUTPUT = printClass();
require "template.php";
# show stock
function printClass()
{
    # Set up table to display in
    $printClass = "\r\n\t\t\t\t\t<h3>Classifications</h3>\r\n\t\t\t\t\t<table " . TMPL_tblDflts . ">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th>Classification Code</th>\r\n\t\t\t\t\t\t\t<th>Classification</th>\r\n\t\t\t\t\t\t\t<th colspan='2'>Options</th>\r\n\t\t\t\t\t\t</tr>";
    # connect to database
    db_connect();
    # Query server
    $i = 0;
    $sql = "SELECT * FROM stockclass WHERE div = '" . USER_DIV . "' ORDER BY classname ASC";
    $classRslt = db_exec($sql) or errDie("Unable to retrieve Classifications from cubit.");
    if (pg_numrows($classRslt) < 1) {
        return "<li class='err'>There are no Classifications in Cubit.</li>";
    }
コード例 #2
0
<?php

session_start();
include "mysql/server.php";
include 'inc/functions.php';
$link = mysqli_connect($server, $username, $passw, $username);
include 'inc/header.php';
?>
<div class="panel"> 
	<h2><?php 
$row = getClasses($link);
if (hasClass($row, 1)) {
    printClass($row, 1);
} else {
    echo "Save class";
}
?>
</h2>
	
</div>


<?

include('inc/footer.php');

?>