Пример #1
0
}
// Check for messages
$message = Synchro::getMessage();
if (empty($message)) {
    unset($message);
}
// Check, if updates are ignored
if (Synchro::settingSet("ignoreupdates")) {
    $ignoreupdate = true;
}
// Check if Synchro has enough file permissions
if (!is_writable("data/password.txt") || !is_writable("index.php")) {
    $wrongfilepermissions = TRUE;
    write2logfile("Synchro has not enough file permissions", "index.php");
}
Synchro::clearLog();
// Check if the log.txt is over 550 KB big
if (filesize("data/log.txt") > 563200) {
    $biglog = true;
    write2logfile("Log file is over 550 KB", "index.php");
}
// Check for missing files
include "scripts/files_exist.php";
// Check needed time
$diff = time() - $start;
write2logfile("Needed {$diff} seconds to run PHP", "index.php");
if ($diff > 4) {
    $longscript = true;
    write2logfile("Needed over 4 seconds to run PHP.", "index.php");
}
// Include plugin hooks
Пример #2
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");
Пример #3
0
        unlink("./php.ini");
    }
    $myfile = fopen("./php.ini", "w") or die("Unable to open file! (4)");
    $txt = "upload_max_filesize = " . $_GET["filesize"] . "M";
    $txt .= "\npost_max_size = " . $_GET["filesize"] . "M";
    $txt .= "\nmax_execution_time = 0";
    fwrite($myfile, $txt);
    fclose($myfile);
    ini_set('upload_max_filesize', $_GET["filesize"] . "M");
    ini_set('post_max_size', $_GET["filesize"] . "M");
    echo '<div class="alert alert-info">
                  <strong>Chagned max. upload size to ' . $_GET["filesize"] . ' MB</strong>
              </div>';
    write2logfile("Changed max. filesize", "settings.php");
}
if (isset($_POST["guestuser"])) {
    if ($_POST["guestuser"] == "on") {
        Synchro::settingSet("enableguestuser", "ENABLED");
    } else {
        Synchro::deleteSetting("enableguestuser");
    }
    echo '<div class="alert alert-info">
                  <strong>Changed setting "Guest User"</strong>
              </div>';
    write2logfile("Changed settings 'Guest User'", "settings.php");
}
if (file_exists("data/disablerndmcolors")) {
    $btnclasses = ["primary"];
} else {
    $btnclasses = ["primary", "info", "success", "danger"];
}