Example #1
0
                }
            }
        }
    }
}
// If nothing else has set this document body yet, and something was posted back
// to this page, then use that to set the doc body.
if ($wp_document === false && isset($_POST['wp_document'])) {
    $wp_document = $_POST['wp_document'];
}
?>
<html>
<head>
<title>webpad: the web-based text editor</title>
<?php 
check_messages();
?>
<script language="JavaScript" type="text/javascript" src="js/tools.js"></script>
<script language="JavaScript" type="text/javascript" src="js/shortcuts.js"></script>
<style type="text/css">
BODY, FORM, TEXTAREA { background: #FFFFFF; border: 0; margin: 0; padding: 0; width: 100%; height: 100%; }
TEXTAREA { font-family: <?php 
echo $config['editor_font_face'] != '' ? $config['editor_font_face'] . ', ' : '';
?>
Fixedsys, Monaco, Andale, Courier, Fixed-width; font-weight: normal; font-size: <?php 
echo $config['editor_font_size'] != '' ? $config['editor_font_size'] : 10;
?>
pt; color: #000000; background: #FFFFFF; padding: 3px; margin: 0; border: 0; position: absolute; top: 0px; left: 0px; right: 0px; }
</style>
</head>
Example #2
0
 public function debug_sql()
 {
     check_messages('ALL');
 }
#
#
require "settings.php";
// remove all '
if (isset($_POST)) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = str_replace("'", "", $value);
    }
}
if (isset($_GET)) {
    foreach ($_GET as $key => $value) {
        $_GET[$key] = str_replace("'", "", $value);
    }
}
# decide what to do
$OUTPUT = check_messages();
require "template.php";
# enter new data
function check_messages()
{
    $qry = new dbSelect("req", "cubit", grp(m("cols", "1"), m("where", "recipient='" . USER_NAME . "' AND alerted IS NULL")));
    $qry->run();
    if ($qry->num_rows() == 0) {
        return "NO MESSAGES";
    } else {
        $cols = grp(m("alerted", "1"));
        $upd = new dbUpdate("req", "cubit", $cols, "recipient='" . USER_NAME . "'");
        $upd->run(DB_UPDATE);
        $qry->setOpt(grp(m("where", "recipient='" . USER_NAME . "' AND viewed='0'")));
        $qry->run();
        return "MSGS: " . $qry->num_rows();