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


PHP settings::save方法代码示例

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


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

示例1: save

 function save()
 {
     settings::set('feedback', 'feedback_email', params::get('feedback_email'));
     settings::set('feedback', 'feedback_subject', params::get('feedback_subject'));
     settings::save('feedback');
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:7,代码来源:main.module.php

示例2: __construct

 public function __construct()
 {
     /*if (!template_session::is_admin() and !template_session::is_editor())
     		{
     			if (get('ajax'))
     			{
     				exit(RUDE_AJAX_ACCESS_VIOLATION);
     			}
     
     			return false;
     		}*/
     switch (get('task')) {
         case 'save':
             $status = settings::save(get('popup_id'), get('popup'), get('rector_id'), get('rector'));
             template_session::set_use_popup(get('popup'));
             break;
         default:
             $status = false;
             break;
     }
     if (get('ajax')) {
         if ($status) {
             exit(RUDE_AJAX_OK);
         } else {
             exit(RUDE_AJAX_ERROR);
         }
     }
     return true;
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:29,代码来源:rude-template-settings.php

示例3: save

 function save()
 {
     settings::set('pages', 'global_page_keywords', params::get('global_page_keywords'));
     settings::set('pages', 'global_page_description', params::get('global_page_description'));
     settings::set('pages', 'global_page_keywords_check', params::isCheck('global_page_keywords_check'));
     settings::set('pages', 'global_page_description_check', params::isCheck('global_page_description_check'));
     settings::set('pages', 'redactor', params::isCheck('redactor'));
     settings::set('pages', 'jip', params::isCheck('jip'));
     settings::set('pages', 'global_page_title', params::get('global_page_title'));
     settings::save('pages');
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:12,代码来源:settings.module.php

示例4: settings

 * as-is and without warranty under the MIT License. 
 * See [root]/license.md for more information. This information must remain intact.
 */
error_reporting(0);
require_once '../../common.php';
require_once 'class.settings.php';
checkSession();
switch ($_GET['action']) {
    case 'open':
        $settings = new settings();
        echo $settings->open();
        break;
    case 'save':
        $settings = new settings();
        if (isset($_POST['content'])) {
            echo $settings->save($_POST['content']);
        } else {
            echo '{"status":"error","message":"Missing Parameters!"}';
        }
        break;
    case 'load':
        $settings = new settings();
        echo $settings->load();
        break;
    case 'saveCommands':
        if (isset($_POST['commands'])) {
            $result = file_put_contents("default.commands.json", $_POST['commands']);
            if ($result === false) {
                echo '{"status":"error","message":"Failed to save default commands!"}';
            } else {
                echo '{"status":"success","message":"Commands saved."}';
开发者ID:practico,项目名称:Codiad-CodeSettings,代码行数:31,代码来源:controller.php

示例5: proceed


//.........这里部分代码省略.........
             $this->data['nextStep'] = "1";
         } else {
             $this->data['success'][] = "app/storage/cache";
         }
         if (@file_get_contents("app/storage/logs/test") != $testData) {
             $this->data['perrors'][] = "app/storage/logs";
             $this->data['nextStep'] = "1";
         } else {
             $this->data['success'][] = "app/storage/logs";
         }
         if (@file_get_contents("app/storage/meta/test") != $testData) {
             $this->data['perrors'][] = "app/storage/meta";
             $this->data['nextStep'] = "1";
         } else {
             $this->data['success'][] = "app/storage/meta";
         }
         if (@file_get_contents("app/storage/sessions/test") != $testData) {
             $this->data['perrors'][] = "app/storage/sessions";
             $this->data['nextStep'] = "1";
         } else {
             $this->data['success'][] = "app/storage/sessions";
         }
         if (@file_get_contents("app/storage/views/test") != $testData) {
             $this->data['perrors'][] = "app/storage/views";
             $this->data['nextStep'] = "1";
         } else {
             $this->data['success'][] = "app/storage/views";
         }
     }
     if (Input::get('nextStep') == "2") {
         $this->data['currStep'] = "2";
         $this->data['nextStep'] = "3";
     }
     if (Input::get('nextStep') == "3") {
         $this->data['currStep'] = "3";
         $this->data['nextStep'] = "4";
         if (Input::get('fullName') == "" || Input::get('username') == "" || Input::get('email') == "" || Input::get('password') == "" || Input::get('siteTitle') == "" || Input::get('systemEmail') == "") {
             $this->data['installErrors'][] = "Please fill in all required fields";
             $this->data['currStep'] = "2";
             $this->data['nextStep'] = "3";
         }
         if (Input::get('password') != Input::get('repassword')) {
             $this->data['installErrors'][] = "Password & repassword isn't identical";
             $this->data['currStep'] = "2";
             $this->data['nextStep'] = "3";
         }
         if (!filter_var(Input::get('email'), FILTER_VALIDATE_EMAIL) and Input::get('email') != "") {
             $this->data['installErrors'][] = "invalid e-mail address";
             $this->data['currStep'] = "2";
             $this->data['nextStep'] = "3";
         }
         if (Input::get('cpc') == "") {
             $this->data['installErrors'][] = "Purchase code is missing";
             $this->data['currStep'] = "2";
             $this->data['nextStep'] = "3";
         }
         if (Input::get('yearTitle') == "") {
             $this->data['installErrors'][] = "You must type default academic year";
             $this->data['currStep'] = "2";
             $this->data['nextStep'] = "3";
         }
         if (!isset($this->data['installErrors'])) {
             file_put_contents('app/storage/meta/lc', Input::get('cpc'));
             if ($this->sbApi() == "err") {
                 @unlink('app/storage/meta/lc');
                 $this->data['installErrors'][] = "Purchase code is missing";
                 $this->data['currStep'] = "2";
                 $this->data['nextStep'] = "3";
             }
         }
         if (!isset($this->data['installErrors'])) {
             $check = Schema::hasTable('users');
             if (!$check) {
                 DB::unprepared(file_get_contents('app/storage/dbsql'));
             }
             $User = new User();
             $User->username = Input::get('username');
             $User->email = Input::get('email');
             $User->fullName = Input::get('fullName');
             $User->password = Hash::make(Input::get('password'));
             $User->role = "admin";
             $User->save();
             $settings = settings::where('fieldName', 'siteTitle')->first();
             $settings->fieldValue = Input::get('siteTitle');
             $settings->save();
             $settings = settings::where('fieldName', 'systemEmail')->first();
             $settings->fieldValue = Input::get('systemEmail');
             $settings->save();
             $settings = new settings();
             $settings->fieldName = 'finishInstall';
             $settings->fieldValue = '1';
             $settings->save();
             $academicYear = new academicYear();
             $academicYear->yearTitle = Input::get('yearTitle');
             $academicYear->isDefault = "1";
             $academicYear->save();
         }
     }
     return View::make('install', $this->data);
 }
开发者ID:schoex,项目名称:Campusmate,代码行数:101,代码来源:InstallController.php


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