// display opening text insert($w, heading(3, "{$title}.")); insert($w, textbrbr(my_("Complete the details below to request an IP address. An administrator will need to action the request before an address will be allocated."))); // create list of customers to display based on REQUESTCUST variable $sql = ""; $lst = split(",", REQUESTCUST); if (REQUESTCUST != "" and !empty($lst)) { foreach ($lst as $value) { $i = (int) $value; // force to int $sql .= "{$i},"; } $sql = substr($sql, 0, -1); $sql = " customer IN ({$sql}) "; } $result = $ds->GetCustomer($sql); $lst = array(); $custset = 0; while ($row = $result->FetchRow()) { if (strtolower($row["custdescrip"]) == "all") { continue; } // strip out customers user may not see due to not being member // of customers admin group. $grps array could be empty if anonymous // access is allowed! if (!empty($grps)) { if (!in_array($row["admingrp"], $grps)) { continue; } } $col = $row["customer"];
} $action = "reqindex"; } if ($action == "deleteaudit") { $ds->DbfTransactionStart(); $result =& $ds->ds->Execute("DELETE FROM auditlog"); $ds->AuditLog(my_("Audit log cleared")); if ($result) { $ds->DbfTransactionEnd(); insert($w, text(my_("Audit log cleared!"))); } else { insert($w, text(my_("Audit log could not be cleared."))); } } if ($action == "custindex") { $result = $ds->GetCustomer(); $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, "&action=custindex", "custdescrip"); $totcnt++; } // create a table insert($w, $t = table(array("cols" => "4", "class" => "outputtable"))); // draw heading setdefault("cell", array("class" => "heading")); insert($t, $c = cell()); if (!empty($vars)) { insert($c, anchor($vars, "<<")); }