Пример #1
0
	version			: 1.0 build 1 (Beta)
	released		: Sunday September 7 2003
	copyright		: Copyright © 2001-2009 Jeremy Hubert
	email			: support@illanti.com
	website			: http://www.illanti.com

    Modifies the preferences of the system. DO NOT EDIT unless you know
    what you are doing.

***************************************************************************/
define('SITE_ROOT', '../');
require_once SITE_ROOT . 'includes/common.php';
require_once SITE_ROOT . 'includes/lib/class.TypicalConfig.php';
$step = isset($_REQUEST['step']) ? $_REQUEST['step'] : 1;
$configwrite = isset($_REQUEST['configwrite']) ? $_REQUEST['configwrite'] : false;
$TC = new TypicalConfig(SITE_ROOT . 'includes/config.php');
$TC->loadConfig();
$welcome_msg = "";
if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
    $TC->clearValue('array', 'regional');
    $TC->clearValue('array', 'email');
    $TC->addConstant('HTTP_ROOT', $_REQUEST['httproot']);
    $TC->addConstant('EMAIL_ERR', $_REQUEST['email_err']);
    $TC->addConstant('DIR_ERR', $_REQUEST['dir_error']);
    $TC->addConstant('DIR_EMAIL', $_REQUEST['dir_email']);
    $TC->setArray('regional.shortdate', $_REQUEST['shortdate']);
    $TC->setArray('regional.longdate', $_REQUEST['longdate']);
    $TC->setArray('regional.invoicedate', $_REQUEST['invoicedate']);
    $TC->setArray('regional.datetime', $_REQUEST['datetime']);
    $TC->setArray('regional.timeoffset', $_REQUEST['timeoffset']);
    $TC->setArray('regional.currency_sym', $_REQUEST['currencysymbol']);
Пример #2
0
	product			: PHP Invoice
	version			: 1.0 build 1 (Beta)
	released		: Sunday September 7 2003
	copyright		: Copyright © 2001-2009 Jeremy Hubert
	email			: support@illanti.com
	website			: http://www.illanti.com

    Modifies the preferences of the system. DO NOT EDIT unless you know
    what you are doing.

***************************************************************************/
define('SITE_ROOT', '../');
require_once SITE_ROOT . 'includes/common.php';
require_once SITE_ROOT . 'includes/lib/class.TypicalConfig.php';
$message = '';
$TC = new TypicalConfig(SITE_ROOT . 'includes/config.php');
$TC->loadConfig();
$paygates = $ISL->FetchPaygates();
if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
    $TC->clearValue('array', 'paygate');
    foreach ($paygates as $key => $paygate) {
        if (isset($_POST[$paygate['paygateid'] . '_enabled'])) {
            if ($paygate['enabled'] == 'no') {
                $ISL->EnablePaygate($paygate['paygateid'], true);
                $paygates[$key]['enabled'] = 'yes';
            }
        } else {
            if ($paygate['enabled'] == 'yes') {
                $ISL->EnablePaygate($paygate['paygateid'], false);
                $paygates[$key]['enabled'] = 'no';
            }
Пример #3
0
    $TC->setArrayName('lang');
    foreach ($_POST as $key => $val) {
        if (strpos($_POST['skip'], $key) === false) {
            $TC->setArray($key, $val);
        }
    }
    $TC->saveConfig();
    $msg .= sprintf($lang['language_updated'], SITE_ROOT . 'admin/editor/index.php');
    $tpl =& new TemplateSystem();
    $tpl->set('msg', $msg);
    $tpl->set('page_title', $lang['editor']);
    $tpl->set('message', $msg);
    $tpl->set('tbody', 'action_complete.tpl');
    $tpl->display();
    exit;
}
$message = '';
$TC = new TypicalConfig(SITE_ROOT . 'languages/lang.' . $sel_language . '.php');
$TC->loadConfig();
$topComment = $TC->topinfo;
$langVars = $TC->getVars('arr');
unset($TC);
$tpl =& new TemplateSystem();
$tpl->set('page_title', $lang['edit_language']);
$tpl->set('topinfo', $topComment);
$tpl->set('language', $sel_language);
$tpl->set('langVars', $langVars);
$tpl->set('message', $message);
$tpl->set('tbody', 'admin/editor/editlang.tpl');
$tpl->display();
exit;
Пример #4
0
function addAdminAccount()
{
    require_once 'DB.php';
    $TC = new TypicalConfig(SITE_ROOT . 'includes/config.php');
    $TC->loadConfig();
    $config = $TC->getVars('var');
    unset($TC);
    $dsn = $config['db_type'] . "://" . $config['db_user'] . ":" . $config['db_pass'] . "@" . $config['db_host'] . "/" . $config['db_name'];
    $check = acquireConnection($db, $dsn);
    if (!$check) {
        $db_prefix = $config['db_prefix'];
        include 'sql_admin.php';
        echo "<p>Inserting Admin Account...";
        $error = array();
        $result = $db->query($sql);
        $err = checkDBError($result);
        if ($err) {
            $error[] = $err . " ::> " . $sql;
            echo '<span class="check_fail">FAILED!</span></p><p>The error message was:<b> ' . $err . '</b><br>on the query:<br>' . $sql;
            die;
        }
        echo '<span class="check_pass">DONE!</span></p>';
        releaseConnection($db);
        return true;
    }
    return false;
}