示例#1
0
 function test_cocode_allowed()
 {
     $allowed = cobrand_cocode_allowed('mysite', 'cocode');
     $this->assertEqual(false, $allowed, 'Should return the value returned by the cobrand if the cobrand defines a cocode_allowed function');
     $allowed = cobrand_cocode_allowed('nosite', 'cocode');
     $this->assertEqual(true, $allowed, 'Should return true if there is no cobrand cocode_allowed function');
 }
示例#2
0
    $syn = $_GET['syn'];
}
$cobrand_allowed = cobrand_allowed();
global $cobrand;
$cobrand = false;
if (array_key_exists($syn, $cobrand_allowed)) {
    if (is_dir("../templates/{$syn}")) {
        template_set_style("../templates/{$syn}", true);
    }
    $cobrand = $syn;
}
global $cocode;
$cocode = false;
$cocode = get_http_var('cocode');
if ($cobrand) {
    if (!cobrand_cocode_allowed($cobrand, $cocode)) {
        $cocode = false;
    }
}
/* fyr_display_error NUMBER MESSAGE
 * Display an error message to the user. */
function fyr_display_error($num, $message, $file, $line, $context)
{
    /* Nuke any existing page output to display the error message. */
    if (OPTION_PHP_DEBUG_LEVEL == 0) {
        ob_clean();
    }
    if (OPTION_FYR_REFLECT_EMAILS) {
        template_show_error("<strong>{$message}</strong> in {$file}:{$line}");
    } else {
        /* Message will be in log file, don't display it for cleanliness */