<?php /** * This is an Alex pagecontroller. * */ // Include the essential config-file which also creates the $alex variable // with its defaults. include __DIR__ . '/config.php'; // Stylesheet $alex['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Alex container. $alex['title'] = "Visa källkod"; $alex['main'] = "<h1>Visa källkod</h1>\n" . $source->View(); // Finally, leave it all to the rendering phase of Alex. include ALEX_THEME_PATH;
<?php /** * This is a Web pagecontroller. * */ // Include the essential config-file which also creates the $web variable with its defaults. include __DIR__ . '/config.php'; // Add style for csource $web['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode //$source = new CSource(); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Web container. $web['title'] = "Visa källkod"; $web['main'] = "<h1>Visa källkod</h1>\n" . $source->View(); $web['main'] = <<<EOD <article class="readable"> <h1>Visa källkod</h1> {$source->View()} </article> EOD; // Finally, leave it all to the rendering phase of Web. include WEB_THEME_PATH;
<h1>Visa källkod</h1> <?php // Create the object to display sourcecode $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); echo "<h4>Utforskare:</h4>" . $source->View();
<?php /** * This is a Elf pagecontroller. * */ // Include the essential config-file which also creates the $elf variable with its defaults. // Do it and store it all in variables in the Elf container. $elf['title'] = "Hello World"; $elf['stylesheets'] = array('css/style.css', 'css/source.css'); $elf['stylesheets'] = array('css/style.css', 'css/source.css', 'css/normalize.css', 'css/skeleton.css'); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); $view = $source->View(); $currrentDir = $source->ReadCurrentDir(); $fileContent = $source->GetFileContent(); $breadcrumbFromPath = $source->GetBreadcrumbFromPath() . $source->message; $elf['main'] = <<<EOD <div class="container"> <div class="row"> <div class="two columns"> {$breadcrumbFromPath} {$currrentDir} </div> <div class="ten columns"> {$fileContent} </div> </div> </div> EOD
<div class='src-container'> <div class='src-header'><code>{$i} lines {$this->encoding} {$this->lineendings} {$linkToDisplaySvg}</code></div> <div class='src-rows'>{$rownums}</div> <div class='src-code'>{$text}</div> </div> EOD; } return "<h3 id='file'><code><a href='#file'>{$this->file}</a></code></h3>{$this->content}"; } } /** * Do it. * */ $source = new CSource(); $content = $source->View(); ?> <!doctype html> <html lang='en'> <meta charset='utf-8' /> <title>View sourceode</title> <meta name="robots" content="noindex" /> <meta name="robots" content="noarchive" /> <meta name="robots" content="nofollow" /> <style> /** * Style for source.php */ .src-breadcrumb, .src-filelist { font-family: monospace;
color: #999; border: solid 1px #999; border-right: none; background: #eee; padding: 0.5em 0.5em 0.5em 0.5em; } .src-rows a:link, .src-rows a:visited, .src-rows a:hover, .src-rows a:active { text-decoration: none; color: inherit; } .src-code { white-space: nowrap; border: solid 1px #999; background: #f9f9f9; padding: 0.5em 0.5em 0.5em 0.5em; overflow: auto; } </style> <body> <h1>View sourcecode</h1> <p> The following files exists in this folder. Click to view. </p> <?php echo $source->View();
<?php /** * This is an Osiris pagecontroller. * */ // Include the essential config-file which also creates the $osiris variable with its defaults. include __DIR__ . '/config.php'; // Add style for csource $osiris['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode //$source = new CSource(); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Osiris container. $osiris['title'] = "Källkod"; $osiris['url'] = "source.php"; include 'header.php'; $osiris['main'] = "<h1>Visa källkod</h1>\n" . $source->View(); include 'footer.php'; // Finally, leave it all to the rendering phase of Osiris. include OSIRIS_THEME_PATH;
<?php /** * This is a Korat pagecontroller. * */ // Include the essential config-file which also creates the $Korat variable with its defaults. include __DIR__ . '/config.php'; // Add style for csource $Korat['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode //$source = new CSource(); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Korat container. $Korat['title'] = "Show source"; $Korat['main'] = "<h1>Show source</h1>" . $source->View(); // Finally, leave it all to the rendering phase of Korat. include KORAT_THEME_PATH;
<?php include 'config.php'; $permafrost['title'] = 'Source'; $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); $permafrost['content'] = $source->View(); //Render the page include PERMAFROST_THEME_PATH;
<?php /** * This is a Bohnzo pagecontroller. * */ // Include the essential config-file which also creates the $bohnzo variable with its defaults. include __DIR__ . '/config.php'; // Add style for csource $bohnzo['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode //$source = new CSource(); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Bohnzo container. $bohnzo['title'] = "Visa källkod"; $bohnzo['main'] = "<h1>Kika på min källkod</h1>\n" . $source->View(); // Finally, leave it all to the rendering phase of Bohnzo. include BOHNZO_THEME_PATH;
<?php /** * This is a Orange pagecontroller. * */ // Include the essential config-file which also creates the $Orange variable with its defaults. include __DIR__ . '/config.php'; // Do it and store it all in variables in the Orange container. $Orange['title'] = "Visa källkod"; $Orange['stylesheets'][] = 'css/source.css'; $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); $Orange['main'] = "<h1>Visa källkod</h1>\n" . $source->View(); // Finally, leave it all to the rendering phase of Anax. include Orange_THEME_PATH;
<?php /** * This is a Lupus pagecontroller. * */ // Include the essential config-file which also creates the $lupus variable with its defaults. include __DIR__ . '/config.php'; // Add style for csource $lupus['stylesheets'][] = 'css/source.css'; // Create the object to display sourcecode //$source = new CSource(); $source = new CSource(array('secure_dir' => '..', 'base_dir' => '..')); // Do it and store it all in variables in the Lupus container. $lupus['title'] = "Visa källkod"; $lupus['main'] = "\n\t<main class='content'>\n\t\t<h1>Visa källkod</h1>\n" . $source->View() . "</main>"; // Finally, leave it all to the rendering phase of Lupus. include LUPUS_THEME_PATH;