Exemplo n.º 1
0
function draw_array($array, $nice = false)
{
    global $_josh;
    if (!is_array($array)) {
        return false;
    }
    $return = '<table cellspacing="1" style="background-color:#ccc;color:#333;border:0px;">';
    //if (!$nice) ksort($array);
    foreach ($array as $key => $value) {
        $key = urldecode($key);
        if ($nice && strToLower($key) == 'j') {
            continue;
        }
        //$value = format_quotes($value);
        if (strToLower($key) == 'email') {
            $value = '<a href="mailto:' . $value . '">' . $value . '</a>';
        }
        if (is_array($value)) {
            $value = draw_array($value, $nice);
        }
        $return .= '<tr><td style="background-color:#eee;"><b>';
        $return .= $nice ? format_text_human($key) : $key;
        $return .= '&nbsp;</b></td><td style="background-color:#fff;">';
        $return .= is_object($value) ? 'object value' : $value;
        $return .= '</td></tr>';
    }
    $return .= '</table>';
    return $return;
}
Exemplo n.º 2
0
function email_post($to, $subject = false, $from = false)
{
    global $_POST;
    if (!$subject) {
        $subject = "Form Submission from " . $_josh["domainname"];
    }
    email($to, draw_page($subject, draw_array($_POST), false, true), $subject, $from);
}
Exemplo n.º 3
0
function error_break()
{
    global $_josh;
    unset($_josh["ignored_words"]);
    //too long. gets in the way!
    echo draw_array($_josh);
    exit;
}