当前位置: 首页>>代码示例>>PHP>>正文


PHP tools::saveConfig方法代码示例

本文整理汇总了PHP中tools::saveConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP tools::saveConfig方法的具体用法?PHP tools::saveConfig怎么用?PHP tools::saveConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tools的用法示例。


在下文中一共展示了tools::saveConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

} elseif ($arrActions['saveLog'] && !empty($_GET['file'])) {
    if (file_exists($_GET['file'])) {
        header('Content-type: application/octet-stream');
        header('Content-Disposition: attachment; filename=' . basename($_GET['file']));
        readfile($_GET['file']);
        exit;
    } else {
        $arrErrors[] = ERROR_FILE_NOT_EXISTS;
    }
} else {
    // необходимо устанавливать действиям фолс, т.к. у них есть доп. условия
    $arrActions['backup'] = false;
    $arrActions['setup'] = false;
    // получаем форму обновления
    if (!empty($_POST['login']) && !empty($_POST['password']) && !empty($_POST['file']) && !empty($_POST['revision'])) {
        $resUpdate = $updates->getUpdate($_POST);
        if (!$resUpdate['status']) {
            $arrErrors[] = $resUpdate['error'];
        } else {
            // ставим сайт на тех обслуживание
            $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_SERVICE_ADMINISTRATION_MAINTENANCE", true);' . "\n";
            tools::saveConfig('core/conf/const.config.service.php', $data, false);
            messages::messageChangeSaved(MESSAGE_UPDATE_SUCCESSFULLY_DOWNLOADED, false, CONF_ADMIN_FILE . '?m=system&s=updates&action=backup&file=' . $_POST['file']);
        }
    }
    $smarty->assignByRef('arrUpdates', $updates->getUpdatesInfo());
}
// адресная строка
$smarty->assignByRef('qString', $qString);
$smarty->assignByRef('errors', $arrErrors);
$smarty->assignByRef('action', $arrActions);
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.system.updates.php

示例2: Group

<?php

/********************************************************
	JobExpert v1.0
	powered by Script Developers Group (SD-Group)
	email: info@sd-group.org.ua
	url: http://sd-group.org.ua/
	Copyright 2010-2015 (c) SD-Group
	All rights reserved
=========================================================
	Настройки - Регтстрации и пользователи
********************************************************/
/**
* @package
* @todo
*/
!defined('SDG') ? die('Triple protection!') : null;
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_CONFIG, 'link' => false), array('name' => MENU_CONFIG_REGISTER, 'link' => false));
// сохраняем данные, переданные из формы
if (isset($_POST['save'])) {
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_USER_REGISTER", "' . (!isset($_POST['user_register']) ? false : true) . '");' . "\n\n" . 'define("CONF_USER_ACTIVATE", "' . (!isset($_POST['user_activate']) ? false : true) . '");' . "\n\n" . 'define("CONF_USER_ACTIVATE_DELETE", "' . ((int) $_POST['user_activate_delete'] ? (int) $_POST['user_activate_delete'] : 24) . '");' . "\n\n" . 'define("CONF_MAIL_ADMIN_USER_REGISTER", "' . (!isset($_POST['admin_user_register']) ? false : true) . '");' . "\n\n" . 'define("CONF_REGISTER_USER_PASSWORD", "' . ((int) $_POST['user_password'] ? (int) $_POST['user_password'] : 6) . '");' . "\n";
    if (!tools::saveConfig('core/conf/const.config.register.php', $data, CONF_ADMIN_FILE . '?m=config&s=register')) {
        $arrErrors[] = ERROR_FILES_MISSING_FILE;
    }
}
$group = new group();
$smarty->assign('arrGroups', $group->getAllGroups("token IN ('active')", array('id' => 'ASC'), array('id')));
$smarty->assignByRef('errors', $arrErrors);
开发者ID:innova-market,项目名称:JobExpert,代码行数:29,代码来源:adm.config.register.php

示例3: array

    }
}
/**
* Добавление, редактирование, настройки пользователей
*/
if (isset($_GET['action'])) {
    /**
     * Настройки пользователей
     */
    if ('config' === $_GET['action']) {
        // инициируем "Наименование страницы" отображаемое в форме
        $arrNamePage[] = array('name' => MENU_CONFIG, 'link' => false);
        // сохраняем данные, переданные из формы
        if (isset($_POST['save'])) {
            $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_USERS_STRINGS_PERPAGE_ADMIN_PANEL", "' . ((int) $_POST['perpage'] ? (int) abs($_POST['perpage']) : 30) . '");' . "\n\n" . 'define("CONF_USER_NOT_TYPE_DELETE", "' . ((int) $_POST['not_type'] ? (int) abs($_POST['not_type']) : 24) . '");' . "\n\n" . 'define("CONF_USER_PAYMENT_DELETE", "' . ((int) $_POST['payment'] ? (int) abs($_POST['payment']) : 24) . '");' . "\n\n" . 'define("CONF_USER_CHANGE_NAME", "' . (!isset($_POST['name']) ? false : true) . '");' . "\n";
            if (!tools::saveConfig('core/conf/const.config.users.php', $data, CONF_ADMIN_FILE . '?m=users&s=manager&action=config')) {
                $arrErrors[] = ERROR_FILES_MISSING_FILE;
            }
        }
        $arrActions['config'] = true;
    } elseif ('detail' === $_GET['action']) {
        if ($user->issetUser("id IN (" . secure::escQuoteData($_GET['id']) . ") AND token IN ('active','archived','moderate','new')")) {
            // удаление пользователя
            if (isset($_POST['delete'])) {
                $delNews = isset($_POST['news']) ? true : false;
                $delArticles = isset($_POST['articles']) ? true : false;
                $user->deleteUsers(array($_GET['id']), true, true, true, $delArticles, $delNews);
                messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=users&s=manager');
            } elseif (isset($_POST['saveUserData'])) {
                if (!empty($_POST['conf']['user_type']) && !empty($_POST['conf']['user_group']) && !empty($_POST['user']['first_name']) && !empty($_POST['user']['last_name']) && !empty($_POST['user']['phone'])) {
                    $strWhere = "id IN (" . secure::escQuoteData($_GET['id']) . ")";
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.users.manager.php

示例4: die

<?php

/**
 * JobExpert v1.0
 * powered by Script Developers Group (SD-Group)
 * email: info@sd-group.org.ua
 * url: http://sd-group.org.ua/
 * Copyright 2010-2015 (c) SD-Group
 * All rights reserved
 * =========================================================
 * Настройки - YVL
 * =========================================================
 */
!defined('SDG') ? die('Triple protection!') : null;
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_CONFIG, 'link' => false), array('name' => MENU_CONFIG_YVL, 'link' => false));
// сохраняем данные, переданные из формы
if (isset($_POST['save'])) {
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_YVL_EXPORT_PERIOD", "' . ((int) $_POST['period'] ? (int) $_POST['period'] : 10) . '");' . "\n";
    if (!tools::saveConfig('core/conf/const.config.yvl.php', $data, CONF_ADMIN_FILE . '?m=config&s=yvl')) {
        $arrErrors[] = ERROR_FILES_MISSING_FILE;
    }
}
$smarty->assignByRef('errors', $arrErrors);
开发者ID:innova-market,项目名称:JobExpert,代码行数:24,代码来源:adm.config.yvl.php

示例5: implode

                    $arrActData[] = "\t\t\t\t\t\t\t\t\t\t\t\t'{$actionKey}' => {$actionVal}";
                }
                $data .= implode(",\n", $arrActData) . "\n\t\t\t\t\t\t\t\t\t\t  )\n\t\t\t\t\t );\n";
                if (!tools::saveConfig($fileName, $data, CONF_ADMIN_FILE . '?m=service&s=robot&action=config')) {
                    $arrErrors[] = ERROR_FILES_MISSING_FILE;
                }
            } elseif (isset($_POST['ctrl_save'])) {
                $arrCtrl = array('updateCounters' => isset($_POST['arrCtrl']['updateCounters']) ? 'true' : 'false', 'delNonverifyUsers' => isset($_POST['arrCtrl']['delNonverifyUsers']) ? 'true' : 'false', 'delNontypeUsers' => isset($_POST['arrCtrl']['delNontypeUsers']) ? 'true' : 'false', 'delUnpaidUsers' => isset($_POST['arrCtrl']['delUnpaidUsers']) ? 'true' : 'false', 'delUnpaidSubscr' => isset($_POST['arrCtrl']['delUnpaidSubscr']) ? 'true' : 'false', 'vacActionSlo' => isset($_POST['arrCtrl']['vacActionSlo']) && ('deleted' === $_POST['arrCtrl']['vacActionSlo'] || 'archived' === $_POST['arrCtrl']['vacActionSlo']) ? secure::escQuoteData($_POST['arrCtrl']['vacActionSlo']) : 'false', 'resActionSlo' => isset($_POST['arrCtrl']['resActionSlo']) && ('deleted' === $_POST['arrCtrl']['resActionSlo'] || 'archived' === $_POST['arrCtrl']['resActionSlo']) ? secure::escQuoteData($_POST['arrCtrl']['resActionSlo']) : 'false', 'vacDelNonverify' => isset($_POST['arrCtrl']['vacDelNonverify']) ? 'true' : 'false', 'resDelNonverify' => isset($_POST['arrCtrl']['resDelNonverify']) ? 'true' : 'false', 'vacDelUnpaid' => isset($_POST['arrCtrl']['vacDelUnpaid']) ? 'true' : 'false', 'resDelUnpaid' => isset($_POST['arrCtrl']['resDelUnpaid']) ? 'true' : 'false', 'vacVipResetSlo' => isset($_POST['arrCtrl']['vacVipResetSlo']) ? 'true' : 'false', 'resVipResetSlo' => isset($_POST['arrCtrl']['resVipResetSlo']) ? 'true' : 'false', 'vacHotResetSlo' => isset($_POST['arrCtrl']['vacHotResetSlo']) ? 'true' : 'false', 'resHotResetSlo' => isset($_POST['arrCtrl']['resHotResetSlo']) ? 'true' : 'false');
                $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . '$arrRobotConf = array(' . "\n\t'configs' => array(\n";
                foreach ($arrRobotConf['configs'] as $configKey => $configVal) {
                    $configVal = false === $configVal ? 'false' : (true === $configVal ? 'true' : $configVal);
                    $arrConfData[] = "\t\t'{$configKey}' => {$configVal}";
                }
                $data .= implode(",\n", $arrConfData) . "\n\t),\n\n\t'actions' => array(\n";
                foreach ($arrCtrl as $ctrlKey => $ctrlVal) {
                    $arrActData[] = "\t\t'{$ctrlKey}' => {$ctrlVal}";
                }
                $data .= implode(",\n", $arrActData) . "\n\t)\n);\n";
                if (!tools::saveConfig($fileName, $data, CONF_ADMIN_FILE . '?m=service&s=robot&action=config')) {
                    $arrErrors[] = ERROR_FILES_MISSING_FILE;
                }
            }
        } else {
            messages::printDie(ERROR_CRITICAL_FILE_NOT_EXISTS);
        }
    }
} else {
    messages::error404();
}
$smarty->assignByRef('errors', $arrErrors);
$smarty->assignByRef('action', $arrActions);
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.service.robot.php

示例6: array

$arrImagesData = array();
$fm = new fm();
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_MANAGER, 'link' => false));
// определяем шаблон для отображения
isset($_GET['action']) && isset($arrActions[$_GET['action']]) ? $arrActions[$_GET['action']] = true : null;
// настройки
if ($arrActions['config']) {
    // инициируем "Наименование страницы" отображаемое в форме
    $arrNamePage[] = array('name' => MENU_MANAGER_FILE, 'link' => CONF_ADMIN_FILE . '?m=manager&amp;s=file');
    $arrNamePage[] = array('name' => MENU_CONFIG, 'link' => false);
    if (isset($_POST['save'])) {
        $max_width = (int) $_POST['max_width'] ? (int) abs($_POST['max_width']) : 200;
        $max_height = (int) $_POST['max_height'] ? (int) abs($_POST['max_height']) : 200;
        $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_FILEMANAGER_PATH_TO_FILES", "uploads/filemanager/files/");' . "\n\n" . 'define("CONF_FILEMANAGER_PATH_TO_IMAGES", "uploads/filemanager/images/");' . "\n\n" . 'define("CONF_FILEMANAGER_THUMBNAIL_PREFIX", "thumb_");' . "\n\n" . 'define("CONF_FILEMANAGER_THUMBNAIL_WIDTH", "' . $max_width . '");' . "\n\n" . 'define("CONF_FILEMANAGER_THUMBNAIL_HEIGHT", "' . $max_height . '");' . "\n";
        if (!tools::saveConfig('core/conf/const.config.file.manager.php', $data, CONF_ADMIN_FILE . '?m=manager&s=file&action=config')) {
            $arrErrors[] = ERROR_FILES_MISSING_FILE;
        }
    }
} elseif ($arrActions['images']) {
    // инициируем "Наименование страницы" отображаемое в форме
    $arrNamePage[] = array('name' => MENU_MANAGER_FILE, 'link' => CONF_ADMIN_FILE . '?m=manager&amp;s=file');
    $arrNamePage[] = array('name' => MENU_MANAGER_IMAGES, 'link' => false);
    // Удаление изображений
    if (!empty($_POST['images'])) {
        !$fm->deleteFiles(CONF_FILEMANAGER_PATH_TO_IMAGES, $_POST['images']) ? $arrErrors[] = ERROR_FILES_NOT_DELETE : messages::messageChangeSaved(MESSAGE_FILE_DELETE_SUCCESS, false, CONF_ADMIN_FILE . '?m=manager&s=file&action=images');
    }
    $arrImages = $fm->getFilesProperties(CONF_FILEMANAGER_PATH_TO_IMAGES . 'mda/uploads.mda');
    $smarty->assignByRef('arrImages', $arrImages);
    $smarty->assign('count', count($arrImages));
} elseif ($arrActions['files']) {
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.manager.file.php

示例7: array

 * для подключения шаблона, необходимо установить значение - true
 * шаблоны подключаются в порядке установленном в файле головного шаблона
 */
$arrActions = array('maintenance' => false);
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_SERVICE, 'link' => false), array('name' => MENU_ADMINISTRATION, 'link' => false));
/**
 * Действия
 */
if (isset($_GET['action']) && !empty($_GET['action']) && isset($arrActions[$_GET['action']])) {
    // инициируем вызываемый шаблон
    $arrActions[$_GET['action']] = true;
    // инициируем "Наименование страницы" отображаемое в форме
    $arrNamePage[] = array('name' => MENU_MAINTENANCE, 'link' => false);
    if ($arrActions['maintenance']) {
        if (isset($_POST['save'])) {
            // сохраняем данные, переданные из формы
            $maintenance = isset($_POST['maintenance']) ? 'true' : 'false';
            $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_SERVICE_ADMINISTRATION_MAINTENANCE", ' . $maintenance . ');' . "\n";
            if (!tools::saveConfig('core/conf/const.config.service.php', $data, CONF_ADMIN_FILE . '?m=service&s=administration&action=maintenance')) {
                $arrErrors[] = ERROR_FILES_MISSING_FILE;
            }
        } elseif (isset($_POST['mcontrol'])) {
            !control::actionsControl($_POST) ? messages::messageChangeSaved(ERROR_NOT_SAVE_CHANGE, false, CONF_ADMIN_FILE . '?m=service&s=administration&action=maintenance') : messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=service&s=administration&action=maintenance');
        }
    }
} else {
    messages::error404();
}
$smarty->assignByRef('errors', $arrErrors);
$smarty->assignByRef('action', $arrActions);
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.service.administration.php

示例8: Group

/********************************************************
	JobExpert v1.0
	powered by Script Developers Group (SD-Group)
	email: info@sd-group.org.ua
	url: http://sd-group.org.ua/
	Copyright 2010-2015 (c) SD-Group
	All rights reserved
=========================================================
	Настройки - Оплаты
********************************************************/
/**
* @package
* @todo
*/
!defined('SDG') ? die('Triple protection!') : null;
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_CONFIG, 'link' => false), array('name' => MENU_CONFIG_PAYMENTS, 'link' => false));
// сохраняем данные, переданные из формы
if (isset($_POST['save'])) {
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . '$arrPayments = array(' . "\n";
    foreach (array_keys($arrPayments) as $payment) {
        $arrData[] = "\t'{$payment}' => " . (!isset($_POST['paymentOn'][$payment]) ? 0 : 1);
    }
    $data .= implode(",\n", $arrData) . "\n);\n";
    if (!tools::saveConfig('core/conf/config.payments.php', $data, CONF_ADMIN_FILE . '?m=config&s=payments')) {
        $arrErrors[] = ERROR_FILES_MISSING_FILE;
    }
}
$smarty->assignByRef('arrPayments', $arrPayments);
$smarty->assignByRef('errors', $arrErrors);
开发者ID:innova-market,项目名称:JobExpert,代码行数:30,代码来源:adm.config.payments.php

示例9: die

!defined('SDG') ? die('Triple protection!') : null;
/**
 * иницализация массива подключаемых шаблонов: по умолчанию все значения - false
 * для подключения шаблона, необходимо установить значение - true
 * шаблоны подключаются в порядке установленном в файле головного шаблона
 */
$arrActions = array('htaccess' => false);
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_SERVICE, 'link' => false), array('name' => MENU_SERVICES, 'link' => CONF_ADMIN_FILE . '?m=service&amp;s=service'));
// определяем шаблон для отображения
isset($_GET['action']) && isset($arrActions[$_GET['action']]) ? $arrActions[$_GET['action']] = true : null;
if ($arrActions['htaccess']) {
    $arrNamePage[] = array('name' => MENU_SERVICES_HTACCESS, 'link' => false);
    if (isset($_POST['save']) && !empty($_POST['htaccess'])) {
        // сохраняем изменения
        if (!tools::saveConfig('.htaccess', $_POST['htaccess'], CONF_ADMIN_FILE . '?m=service&amp;s=service&amp;action=htaccess')) {
            $arrErrors[] = ERROR_FILE_NOT_SAVED;
        }
    }
    $htaccess = file_get_contents('.htaccess');
    $smarty->assignByRef('htaccess', $htaccess);
}
/*
if ($arrActions['deleteDBCache']) {
	$arrNamePage[] = array('name' => MENU_SERVICES_DELETE_DB_CACHE, 'link' => false);
	/* @var $smarty Smarty */
/*	$smarty->assign('deleteDBCache', caching::dropCache());
} elseif ($arrActions['deleteTmplCache']) {
	$arrNamePage[] = array('name' => MENU_SERVICES_DELETE_TMPL_CACHE, 'link' => false);;
	$smarty->assign('deleteTmplCache', caching::dropTmplCache());
}
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.service.service.php

示例10: Group

<?php

/********************************************************
	JobExpert v1.0
	powered by Script Developers Group (SD-Group)
	email: info@sd-group.org.ua
	url: http://sd-group.org.ua/
	Copyright 2010-2015 (c) SD-Group
	All rights reserved
=========================================================
	Настройки - Безопасность
********************************************************/
/**
* @package
* @todo
*/
!defined('SDG') ? die('Triple protection!') : null;
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_CONFIG, 'link' => false), array('name' => MENU_CONFIG_SECURE, 'link' => false));
if (isset($_POST['save'])) {
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("SECURE_CAPTCHA", "' . (!isset($_POST['captcha']) ? false : true) . '");' . "\n\n" . 'define("SECURE_SQLERR_LOG", "' . (!isset($_POST['sqlerr_log']) ? false : true) . '");' . "\n\n" . 'define("SECURE_SQLERR_PRINT", "' . (!isset($_POST['sqlerr_print']) ? false : true) . '");' . "\n\n" . 'define("SECURE_SQLERR_SEND_MESS", "' . (!isset($_POST['sqlerr_send_mess']) ? false : true) . '");' . "\n\n" . 'define("SECURE_SQLERR_EMAIL", "' . $_POST['sqlerr_email'] . '");' . "\n\n" . 'define("SECURE_SQLERR_HEADERS", "Content-Type: text/html; charset=utf-8\\r\\nFrom: ' . htmlspecialchars($_POST['sqlerr_email'], ENT_QUOTES, CONF_DEFAULT_CHARSET) . '\\r\\n");' . "\n\n" . 'define("SECURE_ADMIN_ACCESS_IP_LIST", "' . SECURE_ADMIN_ACCESS_IP_LIST . '");' . "\n";
    if (!tools::saveConfig('core/conf/const.config.secure.php', $data, CONF_ADMIN_FILE . '?m=config&s=secure')) {
        $arrErrors[] = ERROR_FILES_MISSING_FILE;
    }
}
$smarty->assignByRef('errors', $arrErrors);
开发者ID:innova-market,项目名称:JobExpert,代码行数:26,代码来源:adm.config.secure.php

示例11: rename

            // Переименовываем файл логов, вкючая в его имя номер сборки
            $logFile = CONF_UPDATES_PATH_TO_LOG_FILES . terms::currentDate() . '_update.log';
            if (file_exists($logFile)) {
                rename($logFile, CONF_UPDATES_PATH_TO_LOG_FILES . terms::currentDate() . '_' . CONF_INFO_PRODUCT_ID . '_' . CONF_INFO_SCRIPT_REVISION . '_update.log');
            }
            // отключаем техобслуживание сайта
            $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_SERVICE_ADMINISTRATION_MAINTENANCE", false);' . "\n";
            tools::saveConfig('core/conf/const.config.service.php', $data, false);
        }
    } else {
        echo ajax::sdgJSONencode(array('error' => ERROR_UPDATES_REQUEST_UNDEFINED_ACTION));
    }
} elseif (!empty($_POST['maintenance'])) {
    $maintenance = $_POST['maintenance'] == 'on' ? 'true' : 'false';
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_SERVICE_ADMINISTRATION_MAINTENANCE", ' . $maintenance . ');' . "\n";
    echo !tools::saveConfig('core/conf/const.config.service.php', $data, false) ? 'false' : 'true';
} elseif (!empty($_POST['mailFile']) && !empty($_POST['mailText']) && !empty($_POST['pathMailTemplates'])) {
    $_POST['mailFile'] = $_POST['pathMailTemplates'] . str_replace('_', '.', $_POST['mailFile']) . '.txt';
    // формируем имя файла
    echo tools::saveMailTemplateFile($_POST['mailFile'], $_POST['mailText']);
} elseif (!empty($_POST['uID']) && !empty($_POST['userType']) && !empty($_POST['userGroup'])) {
    $user = new user();
    $user->changeTable('conf_users');
    $response = !$user->updateUser(array('user_type' => $_POST['userType'], 'user_group' => $_POST['userGroup']), "id IN (" . secure::escQuoteData($_POST['uID']) . ")") ? db::$message_error : 'true';
    $user->changeTable('users', USR_PREFIX);
    echo $response;
} elseif (!empty($_POST['getArticleDetail']) && !empty($_POST['strQuery'])) {
    $articles = new articles();
    $arrArticle = $articles->getArticle("id IN (" . secure::escQuoteData($_POST['getArticleDetail']) . ")");
    $aComments = new articlesComments();
    $arrOrder = array('datetime' => 'DESC');
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:admajax.php

示例12: array

    $arrNamePage[] = array('name' => MENU_CONFIG, 'link' => false);
    // сохраняем данные, переданные из формы
    if (isset($_POST['save'])) {
        $perpage = !empty($_POST['news_perpage']) && validate::checkNaturalNumber($_POST['news_perpage']) ? validate::checkNaturalNumber($_POST['news_perpage']) : 30;
        $newsesLastShow = !empty($_POST['newses_last_show']) ? 1 : 0;
        $newsesLastShowPerPage = !empty($_POST['newses_last_show_perpage']) && validate::checkNaturalNumber($_POST['newses_last_show_perpage']) ? validate::checkNaturalNumber($_POST['newses_last_show_perpage']) : 5;
        $correctionTerm = isset($_POST['correctionTerm']) && validate::checkNaturalNumber($_POST['correctionTerm']) ? validate::checkNaturalNumber($_POST['correctionTerm']) : 72;
        $newsesComments = !empty($_POST['newses_comments']) ? 1 : 0;
        $newsesCommentsRegister = !empty($_POST['newses_comments_register']) ? 1 : 0;
        $commentsNameUnregister = !empty($_POST['name_unregister']) ? htmlspecialchars($_POST['name_unregister'], ENT_QUOTES, CONF_DEFAULT_CHARSET) : 'Guest';
        $titleNewsName = !empty($_POST['titleNewsName']) ? 1 : 0;
        $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_NEWS_PERPAGE", "' . $perpage . '");' . "\n\n" . 'define("CONF_NEWSES_LAST_SHOW", "' . $newsesLastShow . '");' . "\n\n" . 'define("CONF_NEWSES_LAST_SHOW_PERPAGE", "' . $newsesLastShowPerPage . '");' . "\n\n" . 'define("CONF_NEWSES_CORRECTION_THERM", "' . $correctionTerm . '");' . "\n\n" . 'define("CONF_NEWSES_COMMENTS", ' . $newsesComments . ');' . "\n\n" . 'define("CONF_NEWSES_COMMENTS_REGISTER", ' . $newsesCommentsRegister . ');' . "\n\n" . 'define("CONF_NEWSES_COMMENTS_NAME_UNREGISTER", "' . $commentsNameUnregister . '");' . "\n\n" . 'define("CONF_NEWSES_DISPLAY_ON_TITLE_ONLY_NEWS_NAME", ' . $titleNewsName . ');' . "\n";
        // чистим кеш
        caching::clearCache('newses.last');
        // сохраняем изменения
        if (!tools::saveConfig('core/conf/const.config.news.php', $data, CONF_ADMIN_FILE . '?' . $qString)) {
            $arrErrors[] = ERROR_FILES_MISSING_FILE;
        }
    }
} elseif ($arrActions['add']) {
    // инициируем "Наименование страницы" отображаемое в форме
    $arrNamePage[] = array('name' => MENU_MANAGER_NEWS_ADD, 'link' => false);
    if (isset($_POST['save'])) {
        // получаем из формы поля обязательные для заполнения
        $arrBindFields = $_POST['arrBindFields'];
        $arrBindFields['author'] = 'Administrator';
        // получаем из формы поля не обязательные для заполнения
        $arrNoBindFields = $_POST['arrNoBindFields'];
        $arrNoBindFields['noComments'] = !empty($_POST['arrNoBindFields']['noComments']) ? 1 : 0;
        // устанавливаем состояние новости
        $arrBindFields['token'] = isset($arrBindFields['token']) ? 'active' : 'archived';
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.manager.news.php

示例13: array

$modMenu[] = array('id' => 'hand', 'action' => 'lt', 'icon' => 'langManager.png', 'text' => MENU_LANGUAGE_MANAGER);
$modMenu[] = array('id' => 'hand', 'action' => 'payments', 'icon' => 'wait_payment.png', 'text' => MENU_ACTION_PAYMENTS);
if ($arrActions['config']) {
    $smarty->assignByRef('paymentTypes', $handPaymentTypes);
    /**
     * Сохраняем настройки самого мода
     */
    if (isset($_POST['config'])) {
        $arrPayTypes = array_combine($_POST['arrPayTypes']['index'], $_POST['arrPayTypes']['value']);
        $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . '$handPaymentTypes = array(' . "\n";
        foreach ($arrPayTypes as $key => $value) {
            !empty($key) && !empty($value) ? $arrData[] = "\t'" . $key . "'\t=> '" . $value . "'" : null;
        }
        $data .= implode(",\n", $arrData) . "\n);\n\n";
        $data .= !empty($_POST['currency']) ? 'define("HAND_CONF_CURRENCY", "' . $_POST['currency'] . '");' : 'define("HAND_CONF_CURRENCY", "USD");';
        if (!tools::saveConfig('core/mods/payments/hand/conf/hand.conf.php', $data, CONF_ADMIN_FILE . '?m=mods&s=payments&action=config&id=hand')) {
            $arrErrors[] = ERROR_FILES_MISSING_FILE;
        }
    }
} elseif ($arrActions['payments']) {
    // создаем объект
    $hand = new hand();
    $retFields = array('order_id' => false);
    // Filter
    if (isset($_GET['do']) && $_GET['do'] === 'filter' && !empty($_GET['order_id'])) {
        $_GET['order_id'] = urldecode($_GET['order_id']);
        if (is_int($_GET['order_id'])) {
            $strWhereOrderId = " AND order_id IN (" . secure::escQuoteData($_GET['order_id']) . ")";
        } else {
            $orderId = str_replace(array('*', '?'), array('%', '_'), $_GET['order_id']);
            $strWhereOrderId = " AND order_id LIKE " . secure::escQuoteData($orderId);
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:admin.php

示例14: Group

<?php

/********************************************************
	JobExpert v1.0
	powered by Script Developers Group (SD-Group)
	email: info@sd-group.org.ua
	url: http://sd-group.org.ua/
	Copyright 2010-2015 (c) SD-Group
	All rights reserved
=========================================================
	Настройки - Файлы
********************************************************/
/**
* @package
* @todo
*/
!defined('SDG') ? die('Triple protection!') : null;
// инициируем "Наименование страницы" отображаемое в форме
$arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_CONFIG, 'link' => false), array('name' => MENU_CONFIG_FILES, 'link' => false));
// сохраняем данные, переданные из формы
if (isset($_POST['save'])) {
    $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_FILES_MAX_SIZE", "' . ((int) $_POST['max_size'] ? (int) $_POST['max_size'] : 10000) . '");' . "\n\n" . 'define("CONF_FILES_IMG_CREATE_WATERMARK", "' . (isset($_POST['create_watermark']) ? true : false) . '");' . "\n\n" . 'define("CONF_FILES_IMG_CREATE_WATERMARK_ON", "' . $_POST['watermark_on'] . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_ALIGNMENT", "' . strtoupper($_POST['watermark_alignment']) . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_TYPE", "' . $_POST['watermark_type'] . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_IMAGE", "' . htmlspecialchars($_POST['watermark_image'], ENT_QUOTES, CONF_DEFAULT_CHARSET) . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_TEXT", "' . htmlspecialchars($_POST['watermark_text'], ENT_QUOTES, CONF_DEFAULT_CHARSET) . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_FONT", "' . $_POST['font'] . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_FONT_SIZE", "' . ((int) $_POST['font_size'] ? (int) $_POST['font_size'] : 17) . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_FONT_COLOR", "' . htmlspecialchars($_POST['font_color'], ENT_QUOTES, CONF_DEFAULT_CHARSET) . '");' . "\n\n" . 'define("CONF_FILES_IMG_WATERMARK_TRANSPARENT", "' . ((int) $_POST['transparent'] ? (int) $_POST['transparent'] : 0) . '");' . "\n";
    if (!tools::saveConfig('core/conf/const.config.files.php', $data, CONF_ADMIN_FILE . '?m=config&s=files')) {
        $arrErrors[] = ERROR_FILES_MISSING_FILE;
    }
}
$smarty->assign('fonts', filesys::getFilesInDir('core/fonts/'));
// получаем список доступных дирректорий шаблонов
$smarty->assignByRef('errors', $arrErrors);
开发者ID:innova-market,项目名称:JobExpert,代码行数:29,代码来源:adm.config.files.php

示例15: isset

     $crvipt = isset($_POST['crvipt']) && (int) $_POST['crvipt'] ? (int) abs($_POST['crvipt']) : 0;
     $crvips = isset($_POST['crvips']) ? 1 : 0;
     $crvipsp = isset($_POST['crvipsp']) && (int) $_POST['crvipsp'] ? (int) abs($_POST['crvipsp']) : 5;
     $crhott = isset($_POST['crhott']) && (int) $_POST['crhott'] ? (int) abs($_POST['crhott']) : 0;
     $crhotsp = isset($_POST['crhotsp']) && (int) $_POST['crhotsp'] ? (int) abs($_POST['crhotsp']) : 5;
     $crls = isset($_POST['crls']) ? 1 : 0;
     $crlsp = isset($_POST['crlsp']) && (int) $_POST['crlsp'] ? (int) abs($_POST['crlsp']) : 5;
     $crap = isset($_POST['crap']) ? 1 : 0;
     $crapmw = isset($_POST['crapmw']) && (int) $_POST['crapmw'] ? (int) abs($_POST['crapmw']) : 150;
     $crapmh = isset($_POST['crapmh']) && (int) $_POST['crapmh'] ? (int) abs($_POST['crapmh']) : 150;
     $crapfms = isset($_POST['crapfms']) && (int) $_POST['crapfms'] ? (int) abs($_POST['crapfms']) : 1024;
     $data = "<?php\n\n" . "(!defined('SDG')) ? die ('Triple protection!') : null;\n\n" . 'define("CONF_ANNOUNCE_USER_AGREEMENT_NOMEMBERS_REQUIRED", ' . CONF_ANNOUNCE_USER_AGREEMENT_NOMEMBERS_REQUIRED . ');' . "\n\n" . 'define("CONF_ANNOUNCE_ADD_SUCCESS_ADMIN_INFORM", ' . CONF_ANNOUNCE_ADD_SUCCESS_ADMIN_INFORM . ');' . "\n\n" . 'define("CONF_ANNOUNCE_ADD_SUCCESS_USER_INFORM", ' . CONF_ANNOUNCE_ADD_SUCCESS_USER_INFORM . ');' . "\n\n" . 'define("CONF_ANNOUNCE_USE_VISUAL_EDITOR", ' . CONF_ANNOUNCE_USE_VISUAL_EDITOR . ');' . "\n\n" . 'define("CONF_ANNOUNCE_PREVIEW", ' . CONF_ANNOUNCE_PREVIEW . ');' . "\n\n" . 'define("CONF_ANNOUNCE_PERPAGE_SITE", ' . CONF_ANNOUNCE_PERPAGE_SITE . ');' . "\n\n" . 'define("CONF_ANNOUNCE_PERPAGE_ADMIN_PANEL", ' . CONF_ANNOUNCE_PERPAGE_ADMIN_PANEL . ');' . "\n\n" . 'define("CONF_CATEGORY_PERLINE", ' . CONF_CATEGORY_PERLINE . ');' . "\n\n" . 'define("CONF_EMAIL_ATTACHMENT_FILES_ALLOW", ' . CONF_EMAIL_ATTACHMENT_FILES_ALLOW . ');' . "\n\n" . 'define("CONF_EMAIL_ATTACHMENT_MAX_FILES", ' . CONF_EMAIL_ATTACHMENT_MAX_FILES . ');' . "\n\n" . 'define("CONF_EMAIL_ATTACHMENT_FILE_MAX_SIZE", ' . CONF_EMAIL_ATTACHMENT_FILE_MAX_SIZE . ');' . "\n\n" . 'define("CONF_VACANCY_ACTIVATE_THERM", ' . CONF_VACANCY_ACTIVATE_THERM . ');' . "\n\n" . 'define("CONF_VACANCY_CORRECTION_THERM", ' . CONF_VACANCY_CORRECTION_THERM . ');' . "\n\n" . 'define("CONF_VACANCY_PAYMENT_THERM", ' . CONF_VACANCY_PAYMENT_THERM . ');' . "\n\n" . 'define("CONF_VACANCY_VIP_THERM", ' . CONF_VACANCY_VIP_THERM . ');' . "\n\n" . 'define("CONF_VACANCY_VIP_SHOW", ' . CONF_VACANCY_VIP_SHOW . ');' . "\n\n" . 'define("CONF_VACANCY_VIP_SHOW_PERPAGE", ' . CONF_VACANCY_VIP_SHOW_PERPAGE . ');' . "\n\n" . 'define("CONF_VACANCY_HOT_THERM", ' . CONF_VACANCY_HOT_THERM . ');' . "\n\n" . 'define("CONF_VACANCY_HOT_SHOW_PERPAGE", ' . CONF_VACANCY_HOT_SHOW_PERPAGE . ');' . "\n\n" . 'define("CONF_VACANCY_LAST_SHOW", ' . CONF_VACANCY_LAST_SHOW . ');' . "\n\n" . 'define("CONF_VACANCY_LAST_SHOW_PERPAGE", ' . CONF_VACANCY_LAST_SHOW_PERPAGE . ');' . "\n\n" . 'define("CONF_RESUME_ACTIVATE_THERM", ' . $crat . ');' . "\n\n" . 'define("CONF_RESUME_CORRECTION_THERM", ' . $crct . ');' . "\n\n" . 'define("CONF_RESUME_PAYMENT_THERM", ' . $crpt . ');' . "\n\n" . 'define("CONF_RESUME_VIP_THERM", ' . $crvipt . ');' . "\n\n" . 'define("CONF_RESUME_VIP_SHOW", ' . $crvips . ');' . "\n\n" . 'define("CONF_RESUME_VIP_SHOW_PERPAGE", ' . $crvipsp . ');' . "\n\n" . 'define("CONF_RESUME_HOT_THERM", ' . $crhott . ');' . "\n\n" . 'define("CONF_RESUME_HOT_SHOW_PERPAGE", ' . $crhotsp . ');' . "\n\n" . 'define("CONF_RESUME_LAST_SHOW", ' . $crls . ');' . "\n\n" . 'define("CONF_RESUME_LAST_SHOW_PERPAGE", ' . $crlsp . ');' . "\n\n" . 'define("CONF_RESUME_ADD_PHOTO", ' . $crap . ');' . "\n\n" . 'define("CONF_RESUME_ADD_PHOTO_MAXWIDTH", ' . $crapmw . ');' . "\n\n" . 'define("CONF_RESUME_ADD_PHOTO_MAXHEIGHT", ' . $crapmh . ');' . "\n\n" . 'define("CONF_RESUME_ADD_PHOTO_FILE_MAXSIZE", ' . $crapfms . ');' . "\n";
     // чистим кеш
     caching::clearCache('resume.last');
     // сохраняем изменения
     if (!tools::saveConfig('core/conf/const.config.announces.php', $data, CONF_ADMIN_FILE . '?m=announces&s=common&action=confResume')) {
         $arrErrors[] = ERROR_FILES_MISSING_FILE;
     }
 } elseif (isset($_POST['sort']) && isset($_POST['arrSortList'])) {
     // сохраняем данные сортировки, переданные из формы
     !$resume->putSortFields($_POST['arrSortList']) ? messages::printDie(ERROR_FILE_NOT_WRITE) : messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=announces&s=common&action=confResume');
 } elseif (isset($_POST['pTitle']) && !empty($_POST['title']) && is_array($_POST['title'])) {
     // сохраняем данные, переданные из формы
     $arrTitle = array();
     foreach ($_POST['title'] as &$value) {
         $arrTitle[] = "\tarray('name' => " . stripcslashes($value) . ')';
     }
     $data = "<?php\n" . '$arrTitle = array(' . "\n" . implode(",\n", $arrTitle) . "\n);\n";
     !file_put_contents('core/data/resume.pagetitle.pda', $data) ? messages::printDie(ERROR_FILE_NOT_WRITE) : messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=announces&s=common&action=confResume');
 }
 // данные сортировки Резюме в списках отображения
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:adm.announces.common.php


注:本文中的tools::saveConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。