136 lines
4.7 KiB
Plaintext
136 lines
4.7 KiB
Plaintext
<?php
|
|
require_once("include/globals.php");
|
|
include("phpdir.php");
|
|
|
|
// Ensure that only admin users have access to this module
|
|
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Volunteer Administrator','Communications Administrator','Financial','Financial Team');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
echo("<br>\n");
|
|
$error_message = "You are not permitted access to this module";
|
|
include "form.messages.php";
|
|
return;
|
|
}
|
|
|
|
|
|
switch ($naction) {
|
|
case 'edit':
|
|
$naction = "update";
|
|
$title = "Edit Message";
|
|
break;
|
|
|
|
case 'copy':
|
|
$naction = "insert";
|
|
$title = "Copy Message";
|
|
break;
|
|
|
|
case 'add':
|
|
$naction = "insert";
|
|
$title = "Create New Message";
|
|
include "email-message-templates.php";
|
|
break;
|
|
}
|
|
|
|
if (!isset($post_from_date)) $post_from_date = date("Y-m-d",time());
|
|
if (!isset($post_to_date)) $post_to_date = date("Y-m-d",time());
|
|
|
|
?>
|
|
<script language="JavaScript" type="text/javascript" src="ckeditor430/ckeditor.js"></script>
|
|
<center>
|
|
<form action="<?php echo($FormTarget) ?>" method="post">
|
|
<table width="800" border="0" cellspacing="0" cellpadding="6">
|
|
<tr>
|
|
<td valign="top">
|
|
<h2><?php echo($title) ?></h2>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<table width="750" border="0" cellspacing="0" cellpadding="4">
|
|
<tr>
|
|
<td colspan="2" align="left"><strong>CONTENT EDITOR</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" width="23%">Email Subject Line: </td>
|
|
<td align="left" width="77%"><input type="text" name="content_id" value="<?php echo(str_replace('"',""",$content_id)); ?>" size="80"></td>
|
|
</tr>
|
|
<?php if ($_SESSION['UserInfo']['type'] == 'SuperUser' && $school_num = 3) { ?>
|
|
<tr>
|
|
<td align="left" width="23%">Post From Date: </td>
|
|
<td align="left" width="77%"><input type="text" name="post_from_date" value="<?php echo($post_from_date) ?>" size="15" class='date-field'></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" width="23%">Post To Date: </td>
|
|
<td align="left" width="77%"><input type="text" name="post_to_date" value="<?php echo($post_to_date) ?>" size="15" class='date-field'></td>
|
|
</tr>
|
|
<?php } ?>
|
|
<input type="hidden" name="record_num" value="<?php echo("$record_num"); ?>">
|
|
<input type="hidden" name="action" value="email-messages">
|
|
<input type="hidden" name="naction" value="<?php echo("$naction"); ?>">
|
|
<input type="hidden" name="content_type" value="<?php echo($content_type) ?>">
|
|
<tr>
|
|
<td colspan="2" align="left">
|
|
<br>
|
|
<textarea cols='150' rows='10' id='content' name='content'><?php echo($content) ?></textarea>
|
|
</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="formButton" value="Submit This Content"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align=left>
|
|
You can use the following fields to insert details for users (names are the parent's name on the account). The field must include the "{}" in order to replace the values.:
|
|
<ul>
|
|
<?php
|
|
$query = "show columns from users";
|
|
$columns = db_query($query);
|
|
while ($row = mysql_fetch_array($columns)) {
|
|
$field = $row['Field'];
|
|
if ($field == 'school_num') continue;
|
|
if ($field == 'record_num') continue;
|
|
if ($field == 'source') continue;
|
|
if ($field == 'ordered') continue;
|
|
if ($field == 'paid') continue;
|
|
if ($field == 'enable_translation') continue;
|
|
if ($field == 'additional1') continue;
|
|
if ($field == 'additional2') continue;
|
|
if ($field == 'linked_to_student') continue;
|
|
if ($field == 'linked_to_num') continue;
|
|
if ($field == 'linked_to_type') continue;
|
|
if ($field == 'user_notes') continue;
|
|
if ($field == 'trx_status') continue;
|
|
if ($field == 'posted_date') continue;
|
|
if ($field == 'supplier_num') continue;
|
|
if ($field == 'email1_verified') continue;
|
|
if ($field == 'email2_verified') continue;
|
|
if ($field == 'email3_verified') continue;
|
|
|
|
echo("<li>{" . $field . "}</li>\n");
|
|
}
|
|
?>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</form>
|
|
</center>
|
|
<script>
|
|
CKEDITOR.replace( 'content', {
|
|
filebrowserBrowseUrl : '/admin/FileManager.orig/index.html',
|
|
filebrowserImageBrowseUrl : '/admin/FileManager.orig/index.html',
|
|
filebrowserFlashBrowseUrl : '/admin/FileManager.orig/index.html',
|
|
}
|
|
);
|
|
</script>
|
|
|