Пример #1
0
 function codeToDisplay($code, $beautify = true, $linenumbers = true)
 {
     $code = htmlentities($code);
     $lines = General::str2array($code);
     $final_code = "";
     $ii = 1;
     foreach ($lines as $l) {
         $l = trim($spaces . $l);
         if ($l == "") {
             $l = " ";
         }
         if ($linenumbers) {
             $final_code .= "<li>{$l}</li>\n";
         } else {
             $final_code .= "{$l}\n";
         }
         $ii++;
     }
     if ($linenumbers) {
         return "<ol>\n{$final_code}\n</ol>";
     } else {
         return "{$final_code}\n";
     }
 }
Пример #2
0
$Site->addHeaderToPage("Content-Type", "text/html; charset=UTF-8");
## We dont want to see error messages if in debug mode
$Site->setVerbose(__IN_DEBUG_MODE__ ? false : true);
#Render the page
$Site->display();
if (!__IN_DEBUG_MODE__) {
    print $Site->getTransformed();
} else {
    $active = 'xml';
    $xml = General::sanitize($Site->getXML());
    $xsl = str_replace("\r\n", "\n", trim($Site->getXSL()));
    $xsl = General::sanitize($xsl);
    $output = General::sanitize($Site->getTransformed());
    $xml = $xml != "" ? General::str2array($xml, false) : NULL;
    $xsl = $xsl != "" ? General::str2array($xsl) : NULL;
    $output = $output != "" ? General::str2array($output, false) : NULL;
    $page_name = $db->fetchVar("title", 0, "SELECT `title` FROM `tbl_pages` WHERE `handle` = '" . $Site->_page . "'");
    $page_id = $db->fetchVar("id", 0, "SELECT `id` FROM `tbl_pages` WHERE `handle` = '" . $Site->_page . "'");
    $type = $_GET['line_numbers'] == 'false' ? 'ul' : 'ol';
    $result = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

	<head>
		<title>Symphony | Debug > ' . $page_name . '</title>
		<link rel="stylesheet" type="text/css" media="screen" href="' . URL . '/symphony/assets/debug.css" />
		<script type="text/javascript" src="' . URL . '/symphony/assets/main.js"></script>
	</head>

	<body id="view">
		<h1><a href="' . URL . '/symphony/?page=/blueprint/pages/edit/&amp;id=' . $page_id . '" title="Edit this page.">' . $page_name . '</a></h1>
 *
 * Symphony web publishing system
 *
 * Copyright 2004–2006 Twenty One Degrees Pty. Ltd.
 *
 * @version 1.7
 * @licence https://github.com/symphonycms/symphony-1.7/blob/master/LICENCE
 *
 ***/
print '<?xml version="1.0" encoding="utf-8"?>';
$date = new SymDate($Admin->getConfigVar("time_zone", "region"), $Admin->getConfigVar("date_format", "region"));
$GLOBALS['pageTitle'] = "Activity Logs";
$date = new SymDate($Admin->getConfigVar("time_zone", "region"), $Admin->getConfigVar("date_format", "region"));
$log = array();
if (@is_file(LOGS . "/" . $_REQUEST["_l"] . ".log")) {
    $log = General::str2array(@file_get_contents(LOGS . "/" . $_REQUEST["_l"] . ".log"), false);
} else {
    General::redirect("?page=/settings/logs/");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
	<title>Symphony &ndash; <?php 
print $GLOBALS['pageTitle'];
?>
</title>
	<link rel="stylesheet" type="text/css" media="screen" href="assets/debug.css" />
	<script type="text/javascript" src="assets/main.js"></script>