public static function http($code, $location = null) { self::setStatus($code); if ($location !== null) { header('Location: ' . $location, true, $code); } if (!magic::get('css')) { self::css('body{background:#fff;color:#000;font-family:sans-serif;font-size: 12px;}'); self::css('a{color:#00c}'); self::css('a:visited{color:#551a8b}'); self::css('a:hover{color:#f00}'); } magic::call($code, array('response', 'magic'), $location); exit; }
<?php echo '<!DOCTYPE html>'; echo '<title>' . magic::get('title', 'Untitled page') . '</title>'; $css = magic::get('css', ''); if ($css != '') { echo '<style type="text/css">'; echo $css; echo '</style>'; }