Example #1
0
//
if ($action == 'none') {
    $cond = "";
    if (isset($argtype)) {
        $cond .= " `type`='" . $argtype . "'";
    }
    if (isset($argtype) && isset($argoriginal)) {
        $cond .= " AND ";
    }
    if (isset($argoriginal)) {
        $cond .= " `original`='" . $argoriginal . "'";
    }
    if ($debug) {
        dbg("cond", $cond);
    }
    $found = db_loadTransCats($cond);
    if ($debug) {
        dbg("found", $found);
    }
}
switch ($action) {
    case 'none':
    case 'new':
        transcatform($found[0]);
        break;
    case 'add':
        if ($found && !strcasecmp($found['id'], $catpost['id'])) {
            print "<h1>Category with ID " . $catpost['id'] . " exists</h1>\n";
            reloadUrl('Continue', 'transcat.php');
            print "<script language=\"javascript\">\n";
            print "  url = 'showtranscat.php?name=" . $found[name] . "';\n";
Example #2
0
<html>
<head>
<title>Categories</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/nonametv.css" rel=stylesheet>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<h1>Categories</h1>

<?php 
//
// main
//
$trdb = db_loadTransCats("");
if ($debug) {
    dbg("transcats", $trdb);
}
if ($trdb) {
    $trdb = array_sort($trdb, "type");
    print "<table width=\"75%\">\n";
    print "<tr class=\"tableTitle\">\n";
    print "  <td>Type</td>\n";
    print "  <td>Original</td>\n";
    print "  <td>Category</td>\n";
    print "  <td>Program Type</td>\n";
    print "</tr>\n";
    listTransCats($trdb);
    print "</table>\n";
}