Example #1
0
        writeWarning($lang['renameError']);
    }
}
if ($HTTP_POST_VARS['remail'] != "") {
    sendMail($HTTP_POST_VARS['mailAdresses'], "/" . $config['fileDir'] . $HTTP_POST_VARS['name'], $config, $lang);
}
if ($HTTP_POST_VARS['delete'] == $lang['yes']) {
    writeOngoing($lang['deleting']);
    # first we have to be aware that some evil guy trys to delete files
    # outside of our directory by deleting ".." and "/" in filename
    $deleteFile = $HTTP_POST_VARS['name'];
    //$deleteFile=ereg_replace("\/","",$HTTP_POST_VARS['name']);
    //$deleteFile=(ereg_replace("\.\.","",$deleteFile));
    if (@unlink($config['fileDir'] . $deleteFile)) {
        showNotification("File has been deleted", $config['appName'], $lang['deleteSuccess'], $iconPath);
        writeSuccess($lang['deleteSuccess']);
    } else {
        showNotification("Delete failed", $config['appName'], $lang['deleteError'], $iconPath);
        writeWarning($lang['deleteError']);
    }
}
?>
    
    </div>
    <?php 
if ($HTTP_POST_VARS['expandUploadSubmit']) {
    ?>
    <div id="uploadForm">      
      <h2><?php 
    echo $lang['uploadHeading'];
    ?>
Example #2
0
function sendMail($receipient, $fileName, $conf, $lang)
{
    // *************************************************
    // function sendMail
    // Parameters:
    //   $receipient: e-mail adress of receipient
    //   $fileName: name of file to send the link of
    //   $conf: the general configuration of SiFiEx
    //   $lang: to be used language
    // Return value: TRUE if mail was send, otherwise FALSE
    //
    // Sends an e-mail to the named e-mail-adress to notify
    // someone of a file on the SiFiEx-server
    // *************************************************
    $header = "";
    $header .= "From: " . $conf['mailSenderName'] . " <" . $conf['mailSenderEmail'] . ">\r\n";
    ini_set("sendmail_from", $conf['mailSenderEmail']);
    $body = "";
    $body .= $lang['mailStart'] . " ";
    $pathFull = explode("/", $_SERVER['PHP_SELF']);
    array_pop($pathFull);
    $pathToScript = implode("/", $pathFull);
    $body .= detectSSL() . "://" . $_SERVER['HTTP_HOST'] . $pathToScript . $fileName . "\n\n";
    if ($conf['mailInfoPassword']) {
        $body .= $lang['mailPassword'] . "\n\n";
    }
    $body .= "\n\n" . $lang['mailEnd'];
    if (!mail($receipient, $lang['mailSubject'], $body, $header)) {
        showNotification("Mail send error", $config['appName'], $lang['mailError'], $iconPath);
        writeWarning($lang['mailError']);
        return FALSE;
    } else {
        showNotification("Mail has been sent", $config['appName'], $lang['mailSuccess'] . $receipient, $iconPath);
        writeSuccess($lang['mailSuccess'] . $receipient);
        return TRUE;
    }
    if ($conf['debug']) {
        echo "<pre>" . $header . "\n\n" . $body . "</pre>\n";
    }
}
Example #3
0
echo "<hr />";
writeLine("<h1>Step 5: Setting up initial data.</h1>");
$adminPassword = createRandomPassword();
$result = loadBasicData('ringside', $adminPassword, $database);
if ($result == true) {
    writeLine(" Basic setup information and some sample data was written to the database.");
    //   writeLine( " Admin user name is <b>admin</b> and password is <b>$adminPassword</b>" );
    writeLine(" The following example users were created as well, all with password <b>ringside</b>");
    echo "<table cellpadding='4' width='80%'> ";
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 1);
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 2);
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 3);
    echo "</table>";
} else {
    writeError(" While everything seems to be setup we could not add the data to the database. <br />" . "<b>Maybe do some clean up of an old install/version first?</b>");
    writeLink("drop.php", "Drop Schema, Start Again");
    return;
}
$href = "";
if (isset($_SERVER['PATH_INFO'])) {
    $href = "../" . $href;
}
echo "<hr />";
$successMessage = "You are configured <br />";
$successMessage .= "Login as administrator: <b>username</b> : admin <b>password</b>: {$adminPassword} <br />";
$successMessage .= "OR<br />";
$successMessage .= "Login with user <b>username</b> : joe@goringside.net <b>password</b>: ringside <br />";
$successMessage .= '<a href="' . $href . 'login.php">Go to Login Page </a> ';
$successMessage .= ' or <a href="' . $href . 'register.php">Register a new user!</a>';
writeSuccess($successMessage);
writeLink("drop.php", "Or Start again and Drop Schema");