47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
$rnum = db_escape_string($_GET['rnum']);
|
|
if (intval($rnum) == 0) {
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
|
$action = '';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
|
|
// Get page content
|
|
$results = db_query("SELECT * FROM formatted_content WHERE school_num = $school_num AND record_num = $rnum");
|
|
if (db_num_rows($results) == 0) {
|
|
$error_message = getLanguageText('ERRORMSG-INVALID-ACCESS');
|
|
header("Location: /?error_message=".urlencode($error_message));
|
|
exit();
|
|
}
|
|
else {
|
|
$row = db_fetch_array($results);
|
|
|
|
// Start the template and output buffering
|
|
startTemplate();
|
|
$templatePageTitle = $row['content_id'];
|
|
|
|
?>
|
|
<table width='100%'>
|
|
<tr>
|
|
<td align='left'>
|
|
<?php echo(htmlspecialchars_decode($row['content'],ENT_QUOTES)); ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
|
|
endTemplate();
|
|
}
|
|
|
|
?>
|