First Commit

This commit is contained in:
mark committed 2026-10-19 15:22:52 -07:00
1 parent 5eb9dd037d
commit 2e62c0e60b
11877 files changed
+2035312

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
<?php
if (array_key_exists('template',$_POST)) {
$template = $_POST['template'];
$filename = "_email.$template.html";
if (is_file($filename)) {
$content = file_get_contents($filename);
}
}
if (!isset($content) || strlen($content) == 0) {
$content = "<p>Enter your message here...</p>";
}
$dir = opendir(".");
$templates = array();
while ($file = readdir($dir)) {
if (strpos($file, "_email.") !== 0) continue;
$templates[] = $file;
}
if (count($templates)) {
sort($templates);
?>
<center>
<form action="/" method="post">
<table width="700" border="0" cellspacing="0" cellpadding="2" bgcolor="#eeeeee" style="border: solid 1px #000000;">
<tr>
<td colspan='2' align='left' valign="top">
<h2>Select Message Template</h2>
</td>
</tr>
<tr>
<td align='right'>Load Template:</td>
<td align='left'>
<select name='template'>
<option value='blank'>blank template</option>
<?php
for ($i = 0; $i < count($templates); $i++) {
$tmpl = str_replace("_email.","",$templates[$i]);
$tmpl = str_replace(".html","",$tmpl);
$selected = "";
if ($tmpl == $template) $selected = " selected='selected'";
echo(" <option value=\"$tmpl\"$selected>$tmpl</option>\n");
}
?>
</td>
</tr>
<tr>
<td colspan='2' align="center" valign="top">
<br>
<input type="hidden" name="action" value="email-messages">
<input type="hidden" name="naction" value="add">
<input type="submit" value="Load Template">
<br>
<br>
</td>
</tr>
</table>
</form>
</center>
<?php
}
?>