當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Variable::set方法代碼示例

本文整理匯總了PHP中Variable::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP Variable::set方法的具體用法?PHP Variable::set怎麽用?PHP Variable::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Variable的用法示例。


在下文中一共展示了Variable::set方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: install

 public function install()
 {
     $ret = DB::CreateTable('user_password', "user_login_id I KEY, password C(256) NOTNULL, mail C(255) NOTNULL", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_password table install';
         return false;
     }
     $ret = DB::CreateTable('user_autologin', "user_login_id I NOTNULL, autologin_id C(32) NOTNULL, last_log T, description C(64)", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_autologin table install';
         return false;
     }
     $ret = DB::CreateTable('user_login_ban', "failed_on I4, from_addr C(32)");
     if ($ret === false) {
         print 'Invalid SQL query - user_login_ban table install';
         return false;
     }
     $ret = DB::CreateTable('user_reset_pass', "user_login_id I NOTNULL, hash_id C(32) NOTNULL, created_on T DEFTIMESTAMP", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_autologin table install';
         return false;
     }
     Variable::set('host_ban_time', 300);
     Variable::set('host_ban_nr_of_tries', 3);
     Variable::set('host_ban_by_login', 0);
     Base_ThemeCommon::install_default_theme(Base_User_LoginInstall::module_name());
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:28,代碼來源:LoginInstall.php

示例2: install

 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Variable::set('error_mail', '');
     $this->create_data_dir();
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:7,代碼來源:ErrorInstall.php

示例3: install

 public function install()
 {
     $ret = true;
     if ($ret) {
         $ret = Variable::set('mail_from_addr', 'admin@example.com');
     }
     if ($ret) {
         $ret = Variable::set('mail_from_name', 'Administrator');
     }
     if ($ret) {
         $ret = Variable::set('mail_use_replyto', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_method', 'mail');
     }
     if ($ret) {
         $ret = Variable::set('mail_user', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_password', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_host', 'smtp.example.com:25');
     }
     if ($ret) {
         $ret = Variable::set('mail_security', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_auth', false);
     }
     Base_ThemeCommon::install_default_theme($this->get_type());
     return $ret;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:33,代碼來源:MailInstall.php

示例4: submit_admin

 public function submit_admin($data)
 {
     Variable::set('default_theme', $data['theme']);
     Base_ThemeCommon::create_cache();
     Base_StatusBarCommon::message('Theme changed - reloading page');
     eval_js('setTimeout(\'document.location=\\\'index.php\\\'\',\'3000\')');
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:8,代碼來源:Administrator_0.php

示例5: install

 public function install()
 {
     Variable::set('base_page_title', 'EPESI');
     Variable::set('show_caption_in_title', '1');
     Variable::set('show_module_indicator', '1');
     Variable::set('logo_file', '');
     Variable::set('login_logo_file', '');
     Base_ThemeCommon::install_default_theme(Base_MainModuleIndicatorInstall::module_name());
     $this->create_data_dir();
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:11,代碼來源:MainModuleIndicatorInstall.php

示例6: install

 public function install()
 {
     $this->create_data_dir();
     mkdir(DATA_DIR . '/Base_Theme/templates');
     mkdir(DATA_DIR . '/Base_Theme/templates/default');
     mkdir(DATA_DIR . '/Base_Theme/compiled');
     mkdir(DATA_DIR . '/Base_Theme/cache');
     mkdir(DATA_DIR . '/Base_Theme/config');
     $this->install_default_theme_common_files('modules/Base/Theme/', 'images');
     Variable::set('default_theme', 'default');
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:12,代碼來源:ThemeInstall.php

示例7: install

 public function install()
 {
     $this->create_data_dir();
     if (!is_dir(DATA_DIR . '/Base_Lang/base')) {
         mkdir(DATA_DIR . '/Base_Lang/base');
     }
     if (!is_dir(DATA_DIR . '/Base_Lang/custom')) {
         mkdir(DATA_DIR . '/Base_Lang/custom');
     }
     ModuleManager::include_common('Base_Lang', 0);
     Base_LangCommon::install_translations(Base_LangInstall::module_name());
     return Variable::set('default_lang', 'en');
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:13,代碼來源:LangInstall.php

示例8: admin

	public function admin() {
		if ($this->is_back()) {
			$this->parent->reset();
		}
		Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());

		$google_login = Variable::get('utils_attachments_google_user', false);
		$google_pass = Variable::get('utils_attachments_google_pass', false);

		$form = $this->init_module('Libs_QuickForm');
		$theme = $this->init_module('Base_Theme');

		$form->addElement('header', 'header', __('Google Username and Password'));

		$form->addElement('text', 'google_user', __('Username'));
		$form->addElement('password', 'google_pass', __('Password'));

		$form->setDefaults(array('google_user'=>$google_login));
		$form->setDefaults(array('google_pass'=>$google_pass));

		if ($form->validate()) {
			$vals = $form->exportValues();

			$ok = true;
			if ($vals['google_user']) {
				$g_auth = Utils_AttachmentCommon::get_google_auth($vals['google_user'], $vals['google_pass']);
				if (!$g_auth) $ok = false;
			}

			if ($ok) {
				Variable::set('utils_attachments_google_user', $vals['google_user']);
				Variable::set('utils_attachments_google_pass', $vals['google_pass']);

				Base_StatusBarCommon::message(__('Settings saved'));
			} else {
				Base_StatusBarCommon::message(__('Unable to authenticate'), 'error');
			}
			location(array());
			return;
		}

		$form->assign_theme('form', $theme);

		Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
		Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
		
		Base_ThemeCommon::load_css('Utils_RecordBrowser','View_entry');
		$theme->display('admin');
	}
開發者ID:62BRAINS,項目名稱:EPESI,代碼行數:49,代碼來源:Attachment_0.php

示例9: setDefault

 /**
  *
  * The default may be set to NULL (Text datatype does this) in case default
  * should not be listed
  * @param type $value
  */
 public function setDefault($value)
 {
     if (is_null($value)) {
         if ($this->default instanceof \Variable) {
             $this->default->set(null);
         } else {
             $this->default = null;
         }
     } elseif ($this->default instanceof \Variable) {
         $this->default->set($value);
     } else {
         $this->default = new \Variable\String((string) $value);
     }
     return $this;
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:21,代碼來源:Datatype.php

示例10: admin_signature

 public function admin_signature()
 {
     $f = $this->init_module('Libs/QuickForm');
     $f->addElement('header', null, __('Outgoing mail global signature'));
     $fck =& $f->addElement('ckeditor', 'content', __('Content'));
     $fck->setFCKProps('800', '300', true);
     $f->setDefaults(array('content' => Variable::get('crm_roundcube_global_signature', false)));
     Base_ActionBarCommon::add('save', __('Save'), $f->get_submit_form_href());
     if ($f->validate()) {
         $ret = $f->exportValues();
         $content = $ret['content'];
         Variable::set('crm_roundcube_global_signature', $content);
         Base_StatusBarCommon::message(__('Signature saved'));
         $this->parent->reset();
         return;
     }
     $f->display();
 }
開發者ID:62BRAINS,項目名稱:EPESI,代碼行數:18,代碼來源:Roundcube_0.php

示例11: admin

 public function admin()
 {
     if ($this->is_back()) {
         $this->parent->reset();
     }
     $form = $this->init_module('Libs/QuickForm', 'Errors to mail');
     $form->addElement('text', 'mail', __('Send bugs to'));
     $form->addRule('mail', __('Invalid e-mail address'), 'email');
     $form->addElement('static', '', '', __('Leave empty to disable bug reports.'));
     Base_ActionBarCommon::add('back', __('Cancel'), $this->create_back_href());
     Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
     $form->setDefaults(array('mail' => Variable::get('error_mail')));
     if ($form->validate()) {
         Variable::set('error_mail', $form->exportValue('mail'));
         $this->parent->reset();
     } else {
         $form->display();
     }
 }
開發者ID:62BRAINS,項目名稱:EPESI,代碼行數:19,代碼來源:Error_0.php

示例12: install

 public function install()
 {
     $ret = DB::CreateTable('available_modules', 'name C(128), vkey I NOTNULL, version C(64) NOTNULL', array('constraints' => ', PRIMARY KEY(name, vkey)'));
     if ($ret === false) {
         die('Invalid SQL query - Setup module (modules table)');
     }
     $ret = Variable::set('anonymous_setup', true);
     if ($ret === false) {
         print 'Invalid SQL query - Setup module (populating variables)';
         return false;
     }
     $ret = Variable::set('simple_setup', 1);
     if ($ret === false) {
         print 'Invalid SQL query - Setup module (populating variables)';
         return false;
     }
     $this->create_data_dir();
     Base_ThemeCommon::install_default_theme($this->get_type());
     return true;
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:20,代碼來源:SetupInstall.php

示例13: perform_update_end

    protected function perform_update_end()
    {
        $this->turn_on_maintenance_mode();

        Base_ThemeCommon::themeup();
        Base_LangCommon::update_translations();
        ModuleManager::create_load_priority_array();

        Variable::set('version', EPESI_VERSION);
        MaintenanceMode::turn_off();
    }
開發者ID:62BRAINS,項目名稱:EPESI,代碼行數:11,代碼來源:update.php

示例14: is_update_available

 public static function is_update_available($force_check = false)
 {
     $esu = Variable::get('epesi_store_updates', false);
     $today = date('Ymd');
     if ($force_check || !is_array($esu) || $esu['check_day'] != $today) {
         $updates = self::_count_updates_of_downloaded_modules();
         $esu = array('check_day' => $today, 'updates' => $updates);
         Variable::set('epesi_store_updates', $esu);
     }
     return $esu['updates'];
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:11,代碼來源:EpesiStoreCommon_0.php

示例15: set_store_visibility

 public static function set_store_visibility($enabled)
 {
     Variable::set('base_setup_store_enabled', $enabled ? true : false);
 }
開發者ID:cretzu89,項目名稱:EPESI,代碼行數:4,代碼來源:SetupCommon_0.php


注:本文中的Variable::set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。