コード例 #1
0
ファイル: form.php プロジェクト: e-WAR/vaLt3T
function printCat($arr, $id, $level = 0)
{
    echo "<div class='CategoryOptions'><div class='checkbox' style='margin-left:" . strval($level * 10) . "px'><label><input type=checkbox value=" . $id . " name=category[] class=checkbox-inline " . (isset($arr[$id]['Selected']) ? $arr[$id]['Selected'] == 1 ? "checked" : "" : (in_array($id, explode(',', $_POST['category'])) ? "checked" : "")) . ">" . $arr[$id]['name'] . '</label></div>';
    if (isset($arr[$id]['childCategory'])) {
        foreach ($arr[$id]['childCategory'] as $who) {
            if (isset($arr[$who])) {
                printCat($arr, $who, $level + 1);
            }
        }
    }
    echo "</div>";
    // exit();
    // exit();
}
コード例 #2
0
#
#
#
#
#
#
#
#
#
#
#
require "../settings.php";
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "view":
            $OUTPUT = printCat($_POST);
            break;
        default:
            $OUTPUT = "Invalid.";
    }
}
$OUTPUT = "<center>\r\n<table border=0 width='90%'><tr>\r\n<td valign=top width='33%'><table width='90%'>\r\n<tr><td align=center><h3>Document Management</h3></td></tr>\r\n<tr ><th colspan=2>Document Details</th></tr>\r\n<tr class='bg-odd'><td nowrap><a href ='docadd.php' class=nav><b>Add New Document</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href ='docview.php' class=nav><b>View Documents</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href='doctypeadd.php' class=nav><b>Add Document Type</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href ='doctypeview.php' class=nav><b>View Document Type</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href='foladd.php' class=nav><b>Add New Folder</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href='usradd.php' class=nav><b> User Management</b></a></td></tr>\r\n\t\t<tr class='bg-odd'><td nowrap><a href='grpadd.php' class=nav><b> Group Management</b></a></td></tr>\r\n</table></td>";
function OUTPUT($_POST)
{
    extract($_POST);
    $typeid = remval($typeid);
    # Set up table to display in
    $OUTPUT .= "<td valign=top width='33%'>\r\n<table border=0 width='90%'>\r\n<tr><td align=center nowrap><h3>Document Data</h3></td></tr>\r\n<tr><th>Type</th><th>Ref</th><th>Document</th><th>Date</th><th>Description</th><th>Filename</th></tr>";
    if ($typeid != '0') {
        $whe = "AND typeid='{$typeid}' ";
    } else {
コード例 #3
0
#http://www.accounting-123.com/a.php?a=153/GPLv3
#
#
#
#
#
#
#
#
#
#
#
require "../settings.php";
require "../core-settings.php";
# show current stock
$OUTPUT = printCat();
require "../template.php";
# show stock
function printCat()
{
    # Set up table to display in
    $printTyp = "\r\n    <h3>Document types</h3>\r\n    <table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\r\n    <tr><th>Ref</th><th>Document type</th></tr>";
    # connect to database
    db_conn("yr2");
    # Query server
    $i = 0;
    $sql = "SELECT * FROM doctypes WHERE div = '" . USER_DIV . "' ORDER BY typename ASC";
    $typRslt = db_exec($sql) or errDie("Unable to retrieve Document types from database.");
    if (pg_numrows($typRslt) < 1) {
        return "<li>There are no Document types in Cubit.";
    }