Пример #1
0
 function settings()
 {
     global $config, $language;
     // Define language
     $this->esoTalk->addLanguage("List of filtered words", "List of filtered words");
     $this->esoTalk->addLanguage("Enter each word on a new line", "Enter each word on a new line");
     $this->esoTalk->addLanguage("Make filter case sensitive?", "Make filter case sensitive?");
     $this->esoTalk->addLanguage("Replace each letter with this", "Replace each letter with");
     // Update captcha settings
     if (isset($_POST["Wordfilter"])) {
         $config["Wordfilter"]["Wordlist"] = $_POST["Wordfilter"]["Wordlist"];
         if ($_POST["Wordfilter"]["Case"] == "True") {
             $WordfilterCase = True;
         } else {
             $WordfilterCase = False;
         }
         $config["Wordfilter"]["Case"] = $WordfilterCase;
         $config["Wordfilter"]["Replace"] = $_POST["Wordfilter"]["Replace"];
         writeConfigFile("config/Wordfilter.php", '$config["Wordfilter"]', $config["Wordfilter"]);
         $this->esoTalk->message("changesSaved");
     }
     // Generate settings html
     if ($config["Wordfilter"]["Case"]) {
         $CaseValue = " checked";
     } else {
         $CaseValue = "";
     }
     $settingsHtml = "<form action='" . curLink() . "' method='post'>\n\t<ul class='form'>\n\t<li><label>{$language["List of filtered words"]}</label> <textarea name='Wordfilter[Wordlist]' class='textarea' rows=10 cols=40>{$config["Wordfilter"]["Wordlist"]}</textarea></li>\n\t<li><label></label><font style='color:#666666;size=6pt;'>{$language["Enter each word on a new line"]}</font></li>\t\n\t<li><label>{$language["Make filter case sensitive?"]}</label> <input name='Wordfilter[Case]' type='checkbox' class='checkbox' value='True'" . $CaseValue . "/></li>\n\t<li><label>{$language["Replace each letter with this"]}</label> <input type='text' name='Wordfilter[Replace]' class='text' value='{$config["Wordfilter"]["Replace"]}' size='1' maxlength='1'/></li>\t\n\t<li><label></label> " . $this->esoTalk->skin->button(array("value" => $language["Save changes"], "name" => "Wordfilter[submit]")) . "</li>\n\t</ul>\n\t</form>";
     return $settingsHtml;
 }
Пример #2
0
 function changeSkin($skin)
 {
     // Initial checks
     if (!array_key_exists($skin, $this->skins)) {
         return false;
     }
     // Write the skin file
     writeConfigFile("config/skin.php", '$config["skin"]', $skin);
     redirect("skins");
 }
Пример #3
0
 function init()
 {
     // Make sure the versions file is writable.
     if (!is_writeable("../config/versions.php")) {
         $this->fatalError("<code>config/versions.php</code> is not writeable. Try <code>chmod</code>ing it to <code>777</code>, or if it doesn't exist, <code>chmod</code> the folder it is contained within.");
     }
     // Connect to the database.
     global $config;
     if (!$this->connect($config["mysqlHost"], $config["mysqlUser"], $config["mysqlPass"], $config["mysqlDB"])) {
         $this->fatalError($this->error());
     }
     // Perform the upgrade, depending on what version the user is currently at.
     global $versions;
     // 1.0.0 alpha 5 -> 1.0.0 beta 1
     if ($versions["esoTalk"] == "1.0.0a5") {
         $this->upgrade_100b1();
         $versions["esoTalk"] = "1.0.0b1";
         writeConfigFile("../config/versions.php", '$versions', $versions);
     }
     // Finish the upgrade
     if ($versions["esoTalk"] != ESOTALK_VERSION) {
         $versions["esoTalk"] = ESOTALK_VERSION;
         writeConfigFile("../config/versions.php", '$versions', $versions);
     }
     // Display a success message.
     $messageTitle = "You're good to go!";
     $messageBody = "<p>esoTalk has successfully been upgraded. Here's some stuff you should do now:</p>\n\t<ul>\n\t<li><strong>Delete the <code>upgrade</code> directory</strong> to prevent your forum from being hacked!</li>\n\t<li><a href='{$config["baseURL"]}'>Visit your forum</a> and make sure everything is working - if not, get help at the <a href='http://forum.esotalk.com'>esoTalk support forum</a>.</li>\n\t<li>If you're interested, <a href='javascript:toggleAdvanced()'>see advanced information</a> about what happened during the upgrade process.</li>\n\t</ul>\n\t<div id='advanced'>";
     // Advanced information...
     // Warnings.
     if (isset($_SESSION["warnings"]) and is_array($_SESSION["warnings"])) {
         $messageBody .= "<strong>Warnings</strong><ul>";
         foreach ($_SESSION["warnings"] as $msg) {
             $messageBody .= "<li>{$msg}</li>";
         }
         $_SESSION["warnings"] = array();
         $messageBody .= "</ul>";
     }
     // Queries run.
     if (isset($_SESSION["queries"]) and is_array($_SESSION["queries"])) {
         $messageBody .= "<strong>Queries run</strong><pre style='overflow:auto'>";
         foreach ($_SESSION["queries"] as $query) {
             $messageBody .= sanitize($query) . ";<br/><br/>";
         }
         $_SESSION["queries"] = array();
         $messageBody .= "</pre>";
     }
     $messageBody .= "</div>\n\t<script type='text/javascript'>\n\tfunction toggleAdvanced() {\n\t\tdocument.getElementById(\"advanced\").style.display = document.getElementById(\"advanced\").style.display == \"none\" ? \"\" : \"none\";\n\t}\n\ttoggleAdvanced();\n\t</script>";
     include "../views/message.php";
     exit;
 }
Пример #4
0
<?php

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('allowBlogVisibility' => array('bool'), 'requireLogin' => array('bool'), 'encoding' => array('string'), 'faviconDailyTraffic' => array('int'), 'flashClipboardPoter' => array('bool'), 'flashUploader' => array('bool'), 'language' => array('string'), 'serviceurl' => array('string'), 'cookieprefix' => array('string', 'mandatory' => false, 'default' => ''), 'skin' => array('string'), 'timeout' => array('int'), 'autologinTimeout' => array('int'), 'timezone' => array('string'), 'useDebugMode' => array('bool'), 'useEncodedURL' => array('bool'), 'useNumericRSS' => array('bool'), 'usePageCache' => array('bool'), 'useCodeCache' => array('bool'), 'useReader' => array('bool'), 'useRewriteDebugMode' => array('bool'), 'useSessionDebugMode' => array('bool'), 'useSkinCache' => array('bool'), 'useMemcached' => array('bool'), 'useExternalResource' => array('bool'), 'externalResourceURL' => array('string', 'mandatory' => false, 'default' => '')));
require ROOT . '/library/preprocessor.php';
importlib('model.blog.service');
requireStrictRoute();
$matchTable = array('timeout' => 'timeout', 'autologinTimeout' => 'autologinTimeout', 'skin' => 'skin', 'language' => 'language', 'timezone' => 'timezone', 'encoding' => 'encoding', 'serviceurl' => 'serviceURL', 'cookieprefix' => 'cookie_prefix', 'usePageCache' => 'pagecache', 'useCodeCache' => 'codecache', 'useSkinCache' => 'skincache', 'useMemcached' => 'memcached', 'useReader' => 'reader', 'useNumericRSS' => 'useNumericRSS', 'useEncodedURL' => 'useEncodedURL', 'useExternalResource' => 'externalresources', 'externalResourceURL' => 'resourcepath', 'allowBlogVisibility' => 'allowBlogVisibilitySetting', 'requireLogin' => 'requirelogin', 'flashClipboardPoter' => 'flashclipboardpoter', 'flashUploader' => 'flashuploader', 'useDebugMode' => 'debugmode', 'useSessionDebugMode' => 'debug_session_dump', 'useRewriteDebugMode' => 'debug_rewrite_module', 'faviconDailyTraffic' => 'favicon_daily_traffic');
$description = array('server' => 'Database server location. Can be socket or address.', 'database' => 'Database name.', 'username' => 'Database username.', 'password' => 'Database password.', 'dbms' => 'Database engine.', 'prefix' => 'Table prefix in database.', 'type' => 'Service type. [single|path|domain] e.g. [http://www.example.com/blog | http://www.example.com/blog/blog1 | http://blog1.example.com].', 'domain' => 'Service domain. (http://www.example.com)', 'path' => 'Service path. (e.g. /blog)', 'timeout' => 'Session timeout limit (sec.)', 'autologinTimeout' => 'Automatic login timeout (sec.)', 'skin' => 'Default blog skin name.', 'language' => 'Server language', 'timezone' => 'Server timezone', 'encoding' => 'Character encoding', 'serviceURL' => 'Specify the default service URL. Useful if using other web program under the same domain.', 'cookie_prefix' => 'Service cookie prefix. Default cookie prefix is Textcube_[VERSION_NUMBER].', 'pagecache' => 'Use pagecache function.', 'codecache' => 'Use codecache function.', 'skincache' => 'Use skin pre-fetching.', 'memcached' => 'Use memcache to handle session and cache', 'reader' => 'Use Textcube reader. You can set it to false if you do not use Textcube reader, and want to decrease DB load.', 'useNumericRSS' => 'Can force permalink to numeric format on RSS output.', 'useEncodedURL' => 'URL encoding using RFC1738', 'externalresources' => 'Loads resources from external CDN from resourceURL.', 'resourcepath' => 'Specify the full URI of external resource.', 'useSSL' => 'Use SSL connection. Every http:// will be replaced with https://', 'allowBlogVisibilitySetting' => 'Allow service users to change blog visibility.', 'requirelogin' => 'Force log-in process to every blogs. (for private blog service)', 'flashclipboardpoter' => 'Use Flash clipboard copy to support one-click trackback address copy.', 'flashuploader' => 'Use Flash uploader to upload multiple files.', 'debugmode' => 'Textcube debug mode. (for core / plugin debug or optimization)', 'debug_session_dump' => 'session info debuging.', 'debug_rewrite_module' => 'rewrite handling module info debuging.', 'favicon_daily_traffic' => 'Set favicon traffic limitation. default is 10MB.');
/* Exception handling */
$config = array();
foreach ($matchTable as $abs => $real) {
    if ($_POST[$abs] === 1) {
        $config[$real] = true;
    } else {
        if ($_POST[$abs] === 0) {
            $config[$real] = false;
        } else {
            $config[$real] = $_POST[$abs];
        }
    }
}
$result = writeConfigFile($config, $description);
if ($result === true) {
    Respond::PrintResult(array('error' => 0));
} else {
    Respond::PrintResult(array('error' => 1, 'msg' => $result));
}
Пример #5
0
function installMain(&$s)
{
    global $lll;
    global $hostName, $dbUser, $dbUserPw, $dbName, $dbPort, $dbSocket;
    global $scriptName;
    global $cookiePath;
    global $phpVersionMin, $mySqlVersionMin;
    $s = "";
    showInstallHeader($s1);
    $s .= $s1;
    // Ezt azert kommentezem ki, mert gyakran ujrainstallalok ugy hogy elozoleg
    // john-kent be voltam jelentkezve. Ilyen esetben mindig john
    // id-jevel hozta letre eloszor az admint, majd amikor john
    // letrehozasara kerult a sor, akkor hibat adott az install mondvan,
    // hogy ilyen id-ju juzer mar letezik:
    //if (!isset($_COOKIE["globalUserId"]))
    //{
    mt_srand((double) microtime() * 1000000);
    global $randIdMax, $randIdMin;
    if (!isset($randIdMin)) {
        $randIdMin = 0;
    }
    if (!isset($randIdMax)) {
        $randIdMax = getrandmax();
    }
    $randomId = (int) mt_rand($randIdMin, $randIdMax);
    setcookie("globalUserId", $randomId, Loginlib_ExpirationDate, $cookiePath);
    $_COOKIE["globalUserId"] = $randomId;
    //}
    if (isset($_POST["edit"])) {
        $s .= showEditForm(TRUE);
        return;
    }
    //if( isset($_POST["submit"]) &&
    //    $_POST["submit"]==$lll["install"] )
    //{
    //check file creation
    $ret = checkFileCreate();
    if ($ret == ok) {
        iPrint($lll["create_file_ok"], "ok", $sp);
        $s .= $sp;
        $createconf = TRUE;
    } else {
        if (!isset($_POST["confirm"])) {
            iPrint($lll["create_file_nok_ext"], "warn", $sp);
        } else {
            iPrint($lll["create_file_nok"], "warn", $sp);
        }
        $s .= $sp;
        $createconf = FALSE;
    }
    //check mysql connection
    $db->hostName = $hostName;
    $db->user = $dbUser;
    $db->password = $dbUserPw;
    $db->port = $dbPort;
    $db->socket = $dbSocket;
    $connectRet = checkMysql($db, $s1);
    $s .= $s1;
    if ($connectRet == ok) {
        iPrint($lll["mysql_found"], "ok", $sp);
        $s .= $sp;
        $connectok = TRUE;
        $pwok = TRUE;
    } elseif ($connectRet == mysql_access_denied) {
        iPrint($lll["mysql_found"], "ok", $sp);
        $s .= $sp;
        if ($dbUserPw == "") {
            iPrint(sprintf($lll["need_pw"], $dbUser), "warn", $sp);
            $s .= $sp;
            $s .= showEditForm(TRUE);
            return ok;
        } else {
            iPrint(sprintf($lll["incorr_pw"], $dbUser), "warn", $sp);
            $s .= $sp;
            $s .= showEditForm(TRUE);
            return ok;
        }
    } else {
        iPrint($lll["mysql_not_found"] . " (" . mysql_error() . ")", "warn", $sp);
        $s .= $sp;
        $s .= showEditForm(TRUE);
        return ok;
    }
    if (!DbInstall::checkComponentVersions($mySqlVersion, $phpVersion)) {
        iPrint(sprintf($lll["versionTooLow"], $mySqlVersionMin, $mySqlVersion, $phpVersionMin, $phpVersion), "err", $sp);
        $s .= $sp;
        return ok;
    }
    if (!isset($_POST["confirm"])) {
        $s .= showAskConfirm();
        return ok;
    }
    if (isset($_COOKIE["globalUserId"])) {
        iPrint($lll["cookieok"], "ok", $sp);
        $s .= $sp;
    } else {
        iPrint($lll["cookienok"], "err", $sp);
        $s .= $sp;
        return;
    }
    //check if db exists
    $ret = mysql_select_db($dbName);
    if ($ret) {
        iPrint(sprintf($lll["db_installed"], $dbName), "ok", $sp);
        $s .= $sp;
    } else {
        $ret = createDb();
        if ($ret != ok) {
            $s1 = sprintf($lll["cantcreatedb"], $dbUser);
            iPrint($s1, "warn", $sp);
            $s .= $sp;
            return ok;
        } else {
            iPrint(sprintf($lll["db_created"], $dbName), "ok", $sp);
            $s .= $sp;
            //select db
            $ret = mysql_select_db($dbName);
        }
    }
    $ret = DbInstall::installCreateTables();
    if ($ret != ok) {
        iPrint($lll["inst_create_table_err"], "err", $sp);
        $s .= $sp;
        return $ret;
    } else {
        iPrint($lll["tables_installed"], "ok", $sp);
        $s .= $sp;
    }
    createFirstAdmin();
    appFillTables();
    iPrint($lll["tables_filled"], "ok", $sp);
    $s .= $sp;
    if ($createconf) {
        //config file can be generated
        $ret = writeConfigFile($s1);
        if ($ret != ok) {
            $s .= $s1;
            return;
        }
    } else {
        //config can't be created
        iPrint($lll["compare_conf"], "warn", $sp);
        $s .= $sp;
        showConfFileHtml($s1);
        $s .= $s1;
        iPrint($lll["afterwrconf"], "warn", $s1);
        $s .= $s1;
    }
    iPrint($lll["move_inst_file"], "warn", $s1);
    $s .= $s1;
    iPrint(sprintf($lll["congrat"], "Noah's Classifieds"), "hurra", $s1);
    $s .= $s1;
    iPrint($lll["inst_ch_pw"], "warn", $s1);
    $s .= $s1;
    //send him to the application:
    $s .= "<a href='{$scriptName}'>" . sprintf($lll["inst_click"], "Noah's Classifieds") . "</a>";
    return ok;
}
Пример #6
0
                $errmsg = $GLOBALS["I18N"]->get($GLOBALS["strConfigNotWritable"]);
            } else {
                copy($configfile, $configfile . ".ori");
                $stat = writeConfigFile($configfile);
                if (!$stat) {
                    $errno = 1;
                    $errmsg = $GLOBALS["I18N"]->get($GLOBALS["strConfigRewriteError"]);
                } else {
                    $errno = 0;
                    $link_o = "<a href=?>";
                    $link_c = "</a>";
                    $okmsg = $GLOBALS["I18N"]->get($GLOBALS["strConfigRewrited"]);
                }
            }
        } else {
            $stat = writeConfigFile($configfile);
            if (!$stat) {
                $errno = 1;
                $errmsg = $GLOBALS["I18N"]->get($GLOBALS["strConfigRewriteError"]);
            } else {
                $errno = 0;
                $link_o = "<a href=?>";
                $link_c = "</a>";
                $okmsg = $GLOBALS["I18N"]->get($GLOBALS["strConfigWrited"]);
                //header("Location:?");
            }
        }
    }
}
include "installer/lib/js_nextPage.inc";
?>
Пример #7
0
 function doInstall()
 {
     // Make sure the base url has a trailing slash.
     if (substr($_SESSION["install"]["baseURL"], -1) != "/") {
         $_SESSION["install"]["baseURL"] .= "/";
     }
     global $config;
     // Prepare the config settings
     $config = array("mysqlHost" => desanitize($_SESSION["install"]["mysqlHost"]), "mysqlUser" => desanitize($_SESSION["install"]["mysqlUser"]), "mysqlPass" => desanitize($_SESSION["install"]["mysqlPass"]), "mysqlDB" => desanitize($_SESSION["install"]["mysqlDB"]), "tablePrefix" => desanitize($_SESSION["install"]["tablePrefix"]), "forumTitle" => $_SESSION["install"]["forumTitle"], "baseURL" => $_SESSION["install"]["baseURL"], "salt" => generateRandomString(rand(32, 64)), "emailFrom" => "do_not_reply@{$_SERVER["HTTP_HOST"]}", "cookieName" => preg_replace(array("/\\s+/", "/[^\\w]/"), array("_", ""), desanitize($_SESSION["install"]["forumTitle"])), "useFriendlyURLs" => !empty($_SESSION["install"]["friendlyURLs"]), "useModRewrite" => !empty($_SESSION["install"]["friendlyURLs"]) and function_exists("apache_get_modules") and in_array("mod_rewrite", apache_get_modules()));
     $this->connect($config["mysqlHost"], $config["mysqlUser"], $config["mysqlPass"], $config["mysqlDB"]);
     // Get the list of queries that we need to run and run them
     include "queries.php";
     foreach ($queries as $query) {
         if (!$this->query($query)) {
             return array(1 => "<code>" . sanitize($this->error()) . "</code><p><strong>The query that caused this error was</strong></p><pre>" . sanitize($query) . "</pre>");
         }
     }
     // Write the config file
     writeConfigFile("../config/config.php", '$config', $config);
     // Write the versions.php file
     include "../config.default.php";
     writeConfigFile("../config/versions.php", '$versions', array("esoTalk" => ESOTALK_VERSION));
     // Write a .htaccess file
     if ($config["useModRewrite"]) {
         $handle = fopen("../.htaccess", "w");
         fwrite($handle, "# Generated by esoTalk\n<IfModule mod_rewrite.c>\nRewriteEngine On\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^(.*)\$ index.php/\$1 [QSA,L]\n</IfModule>");
         fclose($handle);
     }
     // Write a robots.txt file
     $handle = fopen("../robots.txt", "w");
     fwrite($handle, "User-agent: *\nDisallow: /search/\nDisallow: /online/\nDisallow: /join/\nDisallow: /forgotPassword/\nDisallow: /conversation/new/\nSitemap: {$config["baseURL"]}sitemap.php");
     fclose($handle);
     // Prepare to log in the administrator
     // This won't actually log them in due to different session names. But we do that later.
     $_SESSION["user"] = array("memberId" => 1, "name" => $_SESSION["install"]["adminUser"], "account" => "Administrator", "color" => $color, "emailOnPrivateAdd" => false, "emailOnStar" => false, "language" => "English", "avatarAlignment" => "alternate", "avatarFormat" => "", "disableJSEffects" => false);
 }
Пример #8
0
<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('allowBlogVisibility' => array('int'), 'requireLogin' => array('int', 0, 1), 'disableEolinSuggestion' => array('int', 0, 1), 'encoding' => array('string'), 'faviconDailyTraffic' => array('int'), 'flashClipboardPoter' => array('int', 0, 1), 'flashUploader' => array('int', 0, 1), 'language' => array('string'), 'serviceurl' => array('string'), 'skin' => array('string'), 'timeout' => array('int'), 'autologinTimeout' => array('int'), 'timezone' => array('string'), 'useDebugMode' => array('int', 0, 1), 'useEncodedURL' => array('int', 0, 1), 'useNumericRSS' => array('int', 0, 1), 'usePageCache' => array('int', 0, 1), 'useReader' => array('int', 0, 1), 'useRewriteDebugMode' => array('int', 0, 1), 'useSessionDebugMode' => array('int', 0, 1), 'useSkinCache' => array('int', 0, 1), 'useMemcached' => array('int', 0, 1), 'useExternalResource' => array('int', 0, 1), 'externalResourceURL' => array('string', 'mandatory' => false, 'default' => '')));
require ROOT . '/library/preprocessor.php';
requireModel('blog.service');
requireStrictRoute();
$matchTable = array('timeout' => 'timeout', 'autologinTimeout' => 'autologinTimeout', 'skin' => 'skin', 'language' => 'language', 'timezone' => 'timezone', 'encoding' => 'encoding', 'serviceurl' => 'serviceURL', 'usePageCache' => 'pagecache', 'useSkinCache' => 'skincache', 'useMemcached' => 'memcached', 'useReader' => 'reader', 'useNumericRSS' => 'useNumericRSS', 'useEncodedURL' => 'useEncodedURL', 'useExternalResource' => 'externalresources', 'externalResourceURL' => 'resourceURL', 'disableEolinSuggestion' => 'disableEolinSuggestion', 'allowBlogVisibility' => 'allowBlogVisibilitySetting', 'requireLogin' => 'requirelogin', 'flashClipboardPoter' => 'flashclipboardpoter', 'flashUploader' => 'flashuploader', 'useDebugMode' => 'debugmode', 'useSessionDebugMode' => 'debug_session_dump', 'useRewriteDebugMode' => 'debug_rewrite_module', 'faviconDailyTraffic' => 'favicon_daily_traffic');
/* Exceptional handling */
$config = array();
foreach ($matchTable as $abs => $real) {
    if ($_POST[$abs] === 1) {
        $config[$real] = true;
    } else {
        if ($_POST[$abs] === 0) {
            $config[$real] = false;
        } else {
            $config[$real] = $_POST[$abs];
        }
    }
}
$result = writeConfigFile($config);
if ($result === true) {
    Respond::PrintResult(array('error' => 0));
} else {
    Respond::PrintResult(array('error' => 1, 'msg' => $result));
}
Пример #9
0
 function init()
 {
     // Compare the version of the code ($this->version) to the installed one (config/versions.php)
     // If it's different, run the upgrade() function, and write the new version to config/versions.php
     global $versions;
     if (!isset($versions[$this->id]) or $versions[$this->id] != $this->version) {
         $this->upgrade(@$versions[$this->id]);
         $versions[$this->id] = $this->version;
         writeConfigFile("config/versions.php", '$versions', $versions);
     }
 }
Пример #10
0
        $mailValues = "NONE";
        break;
    case "VALUES":
        $mailValues = "VALUES";
        break;
    case "IFRAME":
        $mailValues = "IFRAME";
        break;
    default:
        $mailValues = "IFRAME";
        break;
}
//Substitute Person vars
$strMySP_Unit = $_REQUEST['strIN_Subtitute_Person_Unit'];
$nMySP_Hours = $_REQUEST['strIN_Subtitute_Person_Value'];
if ($_REQUEST["IN_UnencryptedRequest"]) {
    $_REQUEST["IN_UnencryptedRequest"] = 1;
} else {
    $_REQUEST["IN_UnencryptedRequest"] = 0;
}
$strQuery = "UPDATE `cf_config` SET \t`strCF_Server` \t\t\t\t= '" . $_REQUEST["strIN_CF_Server"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSMTP_use_auth` \t\t\t= '" . $_REQUEST["bRB_SMTP_use_auth"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSMTP_server` \t\t\t= '" . $_REQUEST["strIN_SMTP_Server"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSMTP_port` \t\t\t\t= '" . $_REQUEST["strIN_SMTP_port"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSMTP_userid` \t\t\t= '" . $_REQUEST["strIN_SMTP_userid"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSMTP_pwd` \t\t\t\t= '" . $_REQUEST["strIN_SMTP_pwd"] . "',\n\t\t\t\t\t\t\t\t\t\t`strDefLang` \t\t\t\t= '" . $_REQUEST['strIN_DefLang'] . "',\n\t\t\t\t\t\t\t\t\t\t`strSysReplyAddr` \t\t\t= '" . $_REQUEST["strIN_SysReplyAddr"] . "',\n\t\t\t\t\t\t\t\t\t\t`strMailAddTextDef` \t\t= '" . $_REQUEST["strIN_MailAddTextDef"] . "',\n\t\t\t\t\t\t\t\t\t\t`bDetailSeperateWindow` \t= '" . $_REQUEST["bOpenInSeperateWin"] . "',\n\t\t\t\t\t\t\t\t\t\t`bShowPosMail` \t\t\t\t= '" . $_REQUEST["bShowPosInMail"] . "',\n\t\t\t\t\t\t\t\t\t\t`bFilter_AR_Wordstart` \t\t= '" . $_REQUEST["bAutoRegWordStart"] . "',\n\t\t\t\t\t\t\t\t\t\t`strEmail_Values` \t\t\t= '{$mailValues}',\n\t\t\t\t\t\t\t\t\t\t`strEmail_Format` \t\t\t= '{$mailFormat}',\n\t\t\t\t\t\t\t\t\t\t`nDelay_norm` \t\t\t\t= '" . $_REQUEST["nIN_Delay_norm"] . "',\n\t\t\t\t\t\t\t\t\t\t`nDelay_interm` \t\t\t= '" . $_REQUEST["nIN_Delay_interm"] . "',\n\t\t\t\t\t\t\t\t\t\t`nDelay_late` \t\t\t\t= '" . $_REQUEST["nIN_Delay_late"] . "',\n\t\t\t\t\t\t\t\t\t\t`nSubstitutePerson_Hours` \t= '{$nMySP_Hours}',\n\t\t\t\t\t\t\t\t\t\t`strSubstitutePerson_Unit` \t= '{$strMySP_Unit}',\n\t\t\t\t\t\t\t\t\t\t`strDefSortCol` \t\t\t= '{$mySort}',\n\t\t\t\t\t\t\t\t\t\t`strCirculation_cols` \t\t= '{$myOrder}',\n\t\t\t\t\t\t\t\t\t\t`strSortDirection`\t\t\t= '" . $_REQUEST["strIN_SortDirection"] . "',\n\t\t\t\t\t\t\t\t\t\t`nShowRows`\t\t\t\t\t= '" . $_REQUEST["IN_strShowRows"] . "',\n\t\t\t\t\t\t\t\t\t\t`nAutoReload`\t\t\t\t= '" . $_REQUEST["strIN_AutoReload"] . "',\n\t\t\t\t\t\t\t\t\t\t`bAllowUnencryptedRequest`\t= '" . $_REQUEST["IN_UnencryptedRequest"] . "',\n\t\t\t\t\t\t\t\t\t\t`UserDefined1_Title`\t\t= '" . $_REQUEST["IN_userdefined1_title"] . "',\n\t\t\t\t\t\t\t\t\t\t`UserDefined2_Title`\t\t= '" . $_REQUEST["IN_userdefined2_title"] . "',\n\t\t\t\t\t\t\t\t\t\t`strDateFormat`\t\t\t\t= '" . $_REQUEST["IN_Date_Format"] . "',\n\t\t\t\t\t\t\t\t\t\t`strMailSendType`\t\t\t= '" . $_REQUEST["mail_send_type"] . "',\n\t\t\t\t\t\t\t\t\t\t`strMtaPath`\t\t\t\t= '" . $_REQUEST["mta_path"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSlotVisibility` \t\t= '" . $_REQUEST["slot_visibility"] . "',\n\t\t\t\t\t\t\t\t\t\t`strSmtpEncryption`\t\t\t= '" . $_REQUEST["SMTP_encryption"] . "',\n\t\t\t\t\t\t\t\t\t\t`bSendWorkflowMail`\t\t\t= '" . ($_REQUEST["IN_SendWorkflowMail"] ? 1 : 0) . "',\n\t\t\t\t\t\t\t\t\t\t`bSendReminderMail`\t\t\t= '" . ($_REQUEST["IN_SendReminderMail"] ? 1 : 0) . "'\n\t\t\t\t\t\t\t\t\t\tWHERE `nConfigID` = 1 LIMIT 1 ;";
mysql_query($strQuery, $nConnection);
//Get all LDAP Values and write them to the config file
//$passedArray = $_POST;
$passedArray = array('auth_method' => $_POST["auth_method"], "ldap_host" => $_POST["ldap_host"], "ldap_domain" => $_POST["ldap_domain"], "ldap_binddn" => $_POST["ldap_binddn"], "ldap_bindpwd" => $_POST["ldap_bindpwd"], "ldap_rootdn" => $_POST["ldap_rootdn"], "ldap_searchattr" => $_POST["ldap_searchattr"], "ldap_fname" => $_POST["ldap_fname"], "ldap_lname" => $_POST["ldap_lname"], "ldap_uname" => $_POST["ldap_uname"], "ldap_email_add" => $_POST["ldap_email_add"], "ldap_office" => $_POST["ldap_office"], "ldap_phone" => $_POST["ldap_phone"], "ldap_context" => $_POST["ldap_context"], "default_level" => $_POST["default_level"]);
writeConfigFile($passedArray, "../config/");
?>
</div>

</body>
</html>
Пример #11
0
 function checkForUpdates()
 {
     if ($this->ajax) {
         return;
     }
     writeConfigFile("config/lastUpdateCheck.php", '$lastUpdateCheck', time());
     if (($handle = @fopen("http://get.esotalk.com/latestVersion.txt", "r")) === false) {
         return;
     }
     $latestVersion = fread($handle, 8192);
     fclose($handle);
     if (version_compare(ESOTALK_VERSION, $latestVersion) == -1) {
         $this->message("updatesAvailable", false, $latestVersion);
     }
 }