-<? require_once("inc/header.php"); ?>
-<?
+<?
+require_once("inc/header.php");
+
$dat_dir = '/var/www/testimonials';
$upload_dir = '/var/www/bacula';
$password='';
$form['visible']=0;
save_formul($form);
- send_email($form['id'], $form['email_address']);
+ send_email($form['id'], $form['contact_name'], $form['email_address']);
echo "You can modify your profile <a href='?page=testimonial&action=Modify&id=" . $form['id'] . "'>here</a> (keep this link as bookmark)<br><br>";
print_formul($form);
}
$form = load_formul($filename);
if ($form['org_logo'] && file_exists($form['org_logo'])) {
- unlink($upload_dir + $form['org_logo']);
+ rename($upload_dir + $form['org_logo'], $upload_dir + $form['org_logo'] + '.remove');
}
if (file_exists($filename)) {
- unlink($filename);
+ rename($filename, "$filename.remove");
echo "Profile deleted";
}
return $filename;
}
-function send_email($id, $email)
+function send_email($id, $name, $email)
{
// Your email address
// $from = 'kern@sibbald.com';
";
mail($email, $subject, $message, "From: Bacula WebMaster <$from>");
- mail($from, $subject, $message, "From: Bacula WebMaster <$from>");
- mail('eric@eb.homelinux.org', $subject, $message, "From: Bacula WebMaster <$from>");
+
+ $message = "Hello,
+You can review this testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id
+
+Best regards.
+";
+
+
+ mail('testimonials@rt.baculasystems.com', $subject, $message, "From: $name <$email>");
echo "The email has been sent for approval.<br/>";
}
function is_admin()
{
global $dat_dir;
- $id = $_REQUEST['passwd'];
+ $id = $_REQUEST['p'];
if (!$id) {
return(false);
{
global $password;
if (is_admin()) {
- $pass = $_REQUEST['passwd'];
+ $pass = $_REQUEST['p'];
$waiting = $_REQUEST['waiting'];
- $password = "&passwd=$pass";
+ $password = "&p=$pass";
print "Admin: ";
if ($waiting) {
print "<a href='?page=testimonial&action=Admin$password'> View all</a><br>";
<? if ($formul['publish_contact']) { ?>
<tr align='right'><td></td><td><i><? echo $formul['contact_name'] ?> </i></td></tr>
<? } ?>
+<!--
</table>
</td>
- <td align='center' valign='center'>
+-->
+ <tr><td></td>
+ <td>
<? if ($formul['org_logo']) { ?>
<a href="<? echo $formul['org_logo'] ?>" ><img width='150' src="<? echo $formul['org_logo'] ?>"></a>
<? } ?>
</td>
+ </tr> <!-- added -->
</table>
<?
return 1;