示例#1
0
include "config.php";
// Classes
include "class/synchro.class.php";
include "class/version.class.php";
include "class/login.class.php";
login::check();
// Check if there are change-requests
if (isset($_POST["changepass"])) {
    Synchro::settingSet("password.txt", $_POST["changepass"]);
    sndmail("Password changed", "We just wanted to quickly inform you, that somebody just changed your Synchro password. If you are this person you can relax, otherwise change save your files!");
    echo "Changed Password.";
}
if (isset($_POST["changeuser"])) {
    Synchro::settingSet("username.txt", $_POST["changeuser"]);
    sndmail("Username changed", "We just wanted to quickly inform you, that somebody just changed your Synchro username. If you are this person you can relax, otherwise change save your files!");
    echo "Changed Username.";
}
if (isset($_POST["changemail"])) {
    Synchro::settingSet("mail.txt", $_POST["changemail"]);
    sndmail("Mail changed", "Hello! If you got this mail, you have successfully changed your mail in synchro.");
    echo "Changed Mail.";
}
if (isset($_POST["changedomain"])) {
    Synchro::settingSet("domain.txt", $_POST["changedomain"]);
    sndmail("Domain changed", "We just wanted to quickly inform you, that somebody just changed your Synchro domain.");
    echo "Changed Domain.";
}
$user = Synchro::getSettingValue("username.txt");
$domain = Synchro::getSettingValue("domain.txt");
$mail = Synchro::getSettingValue("mail.txt");
示例#2
0
// Basic
include "config.php";
// Classes
include "class/synchro.class.php";
include "class/version.class.php";
include "class/login.class.php";
login::check();
$version["local"] = version::getVersion();
$version["global"] = version::getGlobalVersion();
if (version::updateExists($version["local"])) {
    $isupdate = "You can now upgrade from version " . $version["local"] . " to version " . $version["global"] . ".";
} else {
    $isupdate = "There is no new update.";
}
$domain = Synchro::getSettingValue("domain.txt");
if (isset($_POST["delete"])) {
    $number = 0;
    $files = glob('files/');
    // get all file names
    foreach ($files as $file) {
        // iterate files
        if (is_file($file)) {
            unlink($file);
        }
        // delete file
        $number = $number + 1;
    }
    echo "Deleted " . $number . " Files.";
    write2logfile("Deleted all files (total number: {$number})", "settings.php");
}