First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
// Ensure that only admin users have access to this module
|
||||
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Communications Administrator');
|
||||
if (checkPermission($AllowedUserTypes) != 1) {
|
||||
echo("<br>\n");
|
||||
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
||||
include "form.messages.php";
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup default values on insert
|
||||
if ($naction == 'add') {
|
||||
$initTableName = "formatted_content";
|
||||
$tarray = initializeTableArray($initTableName);
|
||||
extract($tarray, EXTR_OVERWRITE);
|
||||
}
|
||||
|
||||
|
||||
// Check if there are tabs defined
|
||||
$numTabs = db_getVal("SELECT count(*) FROM content_tabs WHERE school_num = $school_num");
|
||||
|
||||
$content = preg_replace("#<p>#","<p>",$content);
|
||||
$content = preg_replace("#</p>#","</p>",$content);
|
||||
$content = preg_replace("#<br>#","<br>",$content);
|
||||
$content = preg_replace("#"#",'"',$content);
|
||||
$content = str_replace("admin/","",$content);
|
||||
|
||||
?>
|
||||
<link href="summernote/summernote-lite.min.css" rel="stylesheet">
|
||||
<script language="JavaScript" type="text/javascript" src="summernote/summernote-lite.min.js"></script>
|
||||
<center>
|
||||
<form action="/" method="post">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="6">
|
||||
<tr>
|
||||
<td align='left' valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td colspan="2" align="left"><strong><?php displayLanguageText('TEXT-CONTENT-EDITOR'); ?></strong></td>
|
||||
</tr>
|
||||
<?php if ($numTabs > 0) { ?>
|
||||
<tr>
|
||||
<td align="right" width="15%"><?php displayLanguageText('TEXT-MENU-TAB'); ?>: </td>
|
||||
<td align="left" width="85%">
|
||||
<select name='tab_num'>
|
||||
<?php
|
||||
$tabs = db_query("SELECT * FROM content_tabs WHERE school_num = $school_num ORDER BY sequence");
|
||||
while ($row = db_fetch_assoc($tabs)) {
|
||||
$selected = "";
|
||||
if ($tab_num == $row['record_num']) $selected = " selected='selected'";
|
||||
echo(" <option value='" . $row['record_num'] . "'$selected>" . $row['tab_title'] . "</option>\n");
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td align="right" width="15%"><?php displayLanguageText('TEXT-PAGE-NAME'); ?>: </td>
|
||||
<td align="left" width="85%"><input type="text" name="content_id" value="<?php echo($content_id); ?>" size="80"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><?php displayLanguageText('TEXT-PUBLIC-OR-PRIVATE-PAGE'); ?>: </td>
|
||||
<td align="left"><?php BuildFileRadio("yn.txt","public_page",$public_page); ?></td>
|
||||
</tr>
|
||||
<input type="hidden" name="record_num" value="<?php echo($record_num); ?>">
|
||||
<input type="hidden" name="action" value="additional-pages">
|
||||
<input type="hidden" name="naction" value="<?php echo($next_naction); ?>">
|
||||
<input type="hidden" name="content_type" value="C">
|
||||
<tr id='content-row'>
|
||||
<td colspan="2" align="left">
|
||||
<br>
|
||||
<textarea cols='150' rows='10' id='content' name='content'><?php echo($content) ?></textarea>
|
||||
<?php include "summernote.images.php" ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='link-row'>
|
||||
<td valign='top' align="right"><?php displayLanguageText('TEXT-MENU-LINK'); ?>: </td>
|
||||
<td align="left">
|
||||
<input type="text" name="page_link" value="<?php echo("$page_link"); ?>" size="80"><br>
|
||||
<span class='small'><?php displayLanguageText('TEXT-EXTERNAL-LINK'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<table width="450" border="0" cellspacing="0" cellpadding="6" align="center">
|
||||
<tr>
|
||||
<td align="center" valign="top"><input type='submit' class='btn btn--primary' value="<?php displayLanguageText('TEXT-SUBMIT-THIS-CONTENT'); ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
Reference in new issue
Block a user