<!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ -->
<!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ -->
<?php
<?php
require_once__DIR__.'/../logging.php';
require_once__DIR__.'/../logging.php';
require_once__DIR__.'/../config.php';
$log=newLogging();
$log=newLogging();
$log->lfile(__DIR__.$log_dir.'/add.log');
$log->lfile(__DIR__.'/../'.$log_dir.'/add.log');
if(!($_domain=$_POST['domain']??null)){
if(!($_domain=$_POST['domain']??null)){
$log->lwrite('no domain given');
$log->lwrite('no domain given');
die('no pod domain given');
die('no pod domain given');
...
@@ -25,7 +25,6 @@ if (strlen($_url) < 14) {
...
@@ -25,7 +25,6 @@ if (strlen($_url) < 14) {
die('API key bad needs to be like m58978-80abdb799f6ccf15e3e3787ee');
die('API key bad needs to be like m58978-80abdb799f6ccf15e3e3787ee');
@@ -28,8 +28,8 @@ while ($row = pg_fetch_array($result)) {
...
@@ -28,8 +28,8 @@ while ($row = pg_fetch_array($result)) {
if($row['email']){
if($row['email']){
$to=$row['email'];
$to=$row['email'];
$subject='Pod deleted from poduptime ';
$subject='Pod deleted from '.$_SERVER['HTTP_HOST'];
$message='Pod '.$_domain.' was deleted from podupti.me as it was dead on the list. '.$_comments." Feel free to add back at any time. \n\n";
$message='Pod '.$_domain.' was deleted from '.$_SERVER['HTTP_HOST'].' as it was dead on the list. '.$_comments." Feel free to add back at any time. \n\n";
@@ -37,7 +37,7 @@ while ($row = pg_fetch_array($result)) {
...
@@ -37,7 +37,7 @@ while ($row = pg_fetch_array($result)) {
}elseif($_action==='warn'){
}elseif($_action==='warn'){
if($row['email']){
if($row['email']){
$to=$row['email'];
$to=$row['email'];
$subject='Pod removal warning from poduptime ';
$subject='Pod removal warning from '.$_SERVER['HTTP_HOST'];
$message='Pod '.$_domain.' is on the list to be deleted now because: '.$_comments.". \n\n Please let me know if you need help fixing before it is removed. \n\n";
$message='Pod '.$_domain.' is on the list to be deleted now because: '.$_comments.". \n\n Please let me know if you need help fixing before it is removed. \n\n";
<label>Monitor API Key: <inputtype="text"name="url"class="xlarge span8"placeholder="m58978-80abdb799f6ccf15e3e4ttwe"> (don't copy the period on the end)</label><br>
<label>Monitor API Key: <inputtype="text"name="url"class="xlarge span8"placeholder="m58978-80abdb799f6ccf15e3e4ttwe"> (don't copy the period on the end)</label><br>