Example #1
0
function da($a, $h = false)
{
    // alias of debugging array
    debugArray($a, $h);
}
Example #2
0
        }
        $msg .= "{$key}={$val}";
    }
    return str_replace(array("\r", "\n"), array('<\\r>', '<\\n>'), $msg);
}
// temp debug (menotume 2006-05-22)
//if (strncasecmp ($_REQUEST['callsign'], "dutch", 5) == 0){
//  debug ("\n***** GLOBALS:\n");
//  debug (  print_r ($GLOBALS, true), 1 );
//}
if ($debugLevel > 1) {
    if (count($GLOBALS['_POST'])) {
        debug("POST ARGS: " . debugArray($GLOBALS['_POST'], 0));
    }
    if (count($GLOBALS['_GET'])) {
        debug("GET ARGS: " . debugArray($GLOBALS['_GET'], 0));
    }
}
// Query helper. This should be used instead of mysql_query()
function sqlQuery($qry)
{
    if (!($set = mysql_query($qry))) {
        debug("*** QUERY FAILED:\n{$qry}\n*** ERROR: " . mysql_error(), 1);
        die("Invalid query: " . mysql_error());
    } else {
        debug("SUCCESS: {$qry}", 3);
    }
    return $set;
}
function validate_string($string, $valid_chars, $return_invalid_chars)
{