Example #1
0
    $from = $configValues['EMAIL_FROM'];
    // set appropriate (html, utf8 and to/from addresses) headers
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
    $headers .= 'To: System Administrator <' . $to . '>' . "\r\n";
    $headers .= 'From: daloRADIUS Node Monitor<' . $from . '>' . "\r\n";
    // mail it
    mail($to, $subject, $message, $headers);
}
/**
 * getHTMLMessage()
 *
 */
function getHTMLMessage($table)
{
    $result = "";
    $result .= "<html><head><title>daloRADIUS Node Monitor";
    $result .= "</title></head>";
    $result .= "<body><table>";
    foreach ($table as $field => $value) {
        $result .= "<tr><td>{$field}</td><td>{$value}</td></tr>";
    }
    $result .= "</table></body></html>";
    return $result;
}
$dbh = databaseConnect();
getHardDelayNodes($dbh);
databaseDisconnect($dbh);
?>

Example #2
0
 * relayed trough this file.
 * 
 * Modified by DIRN on 09/06/2015, changelog 12341	
 */
session_start();
// set serverside cookie
require_once "conf/config.conf.php";
// System configuration also contains other require-statements
// set to the user defined error handler, see : lib/general.lib.php
$new_error_handler = set_error_handler("fcErrorHandler");
$db_conn = databaseConnect();
// Connect to DB
// Since every request or POST is routed via this PHP file
// we may need to process a submitted form. Depending on the action argument
// processCurrentAction does that.
//
// Avoid HTML output before this action. See for mapping of commands processing.lib.php
processCurrentAction();
// Functions that generate content to browser, see general.lib.php
displayHeader();
// Generate HTML header as well as the `top' of the page
displayNavigation();
// Generate navigation bar-menu
displaySearch();
//Generate search input
renderCurrentAction();
// Generate main content, basad upon action argument. See for mapping rendering.lib.php
displayFooter();
// Generate footer and HTML footer as well.
databaseDisconnect($db_conn);
// disconnect from DB