$title = my_("Display Audit Log"); newhtml($p); $w = myheading($p, $title); // explicitly cast variables as security measure against SQL injection list($descrip, $block, $expr) = myRegister("S:descrip I:block S:expr"); $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); // display opening text insert($w, heading(3, "{$title}.")); $srch = new mySearch($w, $_GET, $descrip, "descrip"); //$srch->legend=my_("Refine Search on Domain"); $srch->expr = $expr; $srch->expr_disp = TRUE; $srch->Search(); // draw the sucker! // what is the additional search SQL? $where = $ds->mySearchSql("action", $expr, $descrip, FALSE); if ($where) { $where = "WHERE " . $where; } $sqllastmod = $ds->ds->SQLDate("M d Y H:i:s", 'dt'); $result =& $ds->ds->Execute("SELECT action, dt, {$sqllastmod} AS newdt\n FROM auditlog\n {$where}\n ORDER BY dt DESC"); insert($w, textbr()); $totcnt = 0; $vars = ""; // fastforward till first record if not first block of data while ($block and $totcnt < $block * MAXTABLESIZE and $row = $result->FetchRow()) { $vars = DisplayBlock($w, $row, $totcnt, "&descrip=" . urlencode($descrip), "dt"); $totcnt++; } // create a table insert($w, $t = table(array("cols" => "2", "class" => "outputtable")));
$grps = $auth->authenticate(); // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); //setdefault("table",array("cellpadding"=>"0")); //setdefault("text",array("size"=>"2")); $title = my_("Display customer/autonomous system information"); newhtml($p); $w = myheading($p, $title, true); // explicitly cast variables as security measure against SQL injection list($search, $expr, $block, $ipplanParanoid) = myRegister("S:search S:expr I:block I:ipplanParanoid"); // basic sequence is connect, search, interpret search // result, close connection $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); // what is the additional search SQL? $sql = $ds->mySearchSql("custdescrip", $expr, $search, FALSE); $result = $ds->GetCustomer($sql); insert($w, heading(3, my_("All customer/autonomous system info"))); // draw the search box $srch = new mySearch($w, array(), $search, "search"); $srch->legend = my_("Refine Search on Description"); $srch->expr = $expr; $srch->expr_disp = TRUE; $srch->Search(); // draw the sucker! $totcnt = 0; $vars = ""; // fastforward till first record if not first block of data while ($block and $totcnt < $block * MAXTABLESIZE and $row = $result->FetchRow()) { $vars = DisplayBlock($w, $row, $totcnt, "&expr={$expr}&search=" . urlencode($search), "custdescrip"); $totcnt++;