Example #1
0
            exit;
        }
    }
    if ($notify) {
        $notify_message = "{$notify_message}\n\n\n========================================================\n{$subject}\n\n\n{$story}\n\n{$storyext}\n\n{$name}";
        mail($notify_email, $notify_subject, $notify_message, "From: {$notify_from}\nX-Mailer: PHP/" . phpversion());
    }
    include "header.php";
    OpenTable();
    $waiting = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_queue"));
    echo "<center><font class=\"title\">" . _SUBSENT . "</font><br><br>" . "<font class=\"content\"><b>" . _THANKSSUB . "</b><br><br>" . "" . _SUBTEXT . "" . "<br>" . _WEHAVESUB . " {$waiting} " . _WAITING . "";
    CloseTable();
    include "footer.php";
}
if (!isset($address)) {
    $address = "";
}
if (!isset($alanguage)) {
    $alanguage = "";
}
switch ($op) {
    case "" . _PREVIEW . "":
        PreviewStory($name, $address, $subject, $story, $storyext, $topic, $alanguage);
        break;
    case "" . _OK . "":
        SubmitStory($name, $address, $subject, $story, $storyext, $topic, $alanguage);
        break;
    default:
        defaultDisplay();
        break;
}
Example #2
0
        }
        include 'header.php';
        echo '<h2>' . translate("Submit News") . '</h2>';
        echo '<p class="lead text-info">' . translate("Thanks for your submission.") . '</p>';
        include 'footer.php';
    } else {
        include 'header.php';
        echo sql_error();
        include 'footer.php';
    }
}
settype($op, 'string');
switch ($op) {
    case "Preview":
    case translate("Preview"):
        PreviewStory($name, $subject, $story, $bodytext, $topic, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
        break;
    case "Ok":
        settype($date_debval, 'string');
        if (!$date_debval) {
            if (strlen($deb_day) == 1) {
                $deb_day = "0{$deb_day}";
            }
            if (strlen($deb_month) == 1) {
                $deb_month = "0{$deb_month}";
            }
            $date_debval = "{$deb_year}-{$deb_month}-{$deb_day} {$deb_hour}:{$deb_min}:00";
        }
        settype($date_finval, 'string');
        if (!$date_finval) {
            if (strlen($fin_day) == 1) {