Exemple #1
0
 /**
  * Check content file to see if it exists, if not, create it. Open it and return data.
  * @param string $name Content area name.
  * @return $data Data found in storage.
  */
 function ContentLoad($name)
 {
     // Load content if file exists
     $path = NC_BASEPATH . '/../content/' . $name;
     $this->ContentCheck($path, 'Edit me! (' . $name . ')');
     // Make sure content file exists.
     $fh = fopen($path, 'r') or die(NCCms::Error("Could not find file: " . $path));
     $data = fread($fh, filesize($path)) or die(NCUtility::Error("Could not read file: " . $path . ". Make sure that this server has read and write permissions to the /nc-cms/content folder."));
     fclose($fh);
     return $data;
 }
Exemple #2
0
<?php

// Log in page and CMS management. Access by visiting this directory.
require 'system/start.php';
$cms = new NCCms();
$cms->Manage();
Exemple #3
0
<?php

require 'nc-cms/system/start.php';
$cms = new NCCms();
?>
 <!-- #1 Include CMS header. -->
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><?php 
$cms->Title('home_title');
?>
</title> <!-- #2 Allow website title editing. -->
		<link rel="stylesheet" type="text/css" media="screen" href="<?php 
$cms->CSS();
?>
" /> <!-- #3 Include CSS. -->
	</head>
	<body>
		<?php 
$cms->ControlPanel();
?>
 <!-- #4 Include CMS control panel. -->
		<div class="content">
			<?php 
$cms->ContentHTML('home_content');
?>
 <!-- #5 Add editable content area. -->
		</div>
		<div class="footer">