Exemplo n.º 1
0
require 'src/controller.php';
# Route the request.
$uri = $_SERVER['PHP_SELF'];
#Control the request base on uri.
if ($uri === "/swiftmailer/") {
    index();
} else {
    if ($uri === "/swiftmailer/index.php") {
        index();
    } else {
        if ($uri === "/swiftmailer/index.php/smtp") {
            $id = null;
            if (isset($_GET['id']) === true) {
                $id = $_GET['id'];
            }
            smtpList($id);
        } else {
            if ($uri === "/swiftmailer/index.php/smtp/new") {
                smtpNew();
            } else {
                if ($uri === "/swiftmailer/index.php/smtp/save" and isset($_POST['username']) === true and isset($_POST['password']) === true and isset($_POST['host']) === true and isset($_POST['port']) === true and isset($_POST['security']) === true) {
                    smtpSave($_POST['username'], $_POST['password'], $_POST['host'], $_POST['port'], $_POST['security']);
                } else {
                    if ($uri === "/swiftmailer/index.php/document") {
                        documentList();
                    } else {
                        if ($uri === "/swiftmailer/index.php/document/new") {
                            documentNew();
                        } else {
                            if ($uri === "/swiftmailer/index.php/document/save" and isset($_FILES['document']) === true) {
                                documentSave($_FILES['document']);
Exemplo n.º 2
0
function index()
{
    smtpList();
}