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


PHP headers::self方法代码示例

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


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

 function save()
 {
     $array = file(ROOT . '/config.php');
     $content = '';
     foreach ($array as $k => $v) {
         if (strstr($v, '#system_style')) {
             $array[$k] = "define('SYS_STYLE', '" . params::get('system_style') . "'); #system_style\r\n";
         }
         if (strstr($v, '#system_lang')) {
             $array[$k] = "define('LANG_INDEX', '" . params::get('system_lang') . "'); #system_lang\r\n";
         }
         if (strstr($v, '#global_cache')) {
             if (params::get('global_cache')) {
                 $array[$k] = "define('GLOBAL_CACHE', true); #global_cache\r\n";
             } else {
                 $array[$k] = "define('GLOBAL_CACHE', false); #global_cache\r\n";
             }
         }
         if (strstr($v, '#global_time')) {
             $array[$k] = "define('GLOBAL_CACHE_TIME', " . params::get('global_cache_time') . "); #global_time\r\n";
         }
         $content .= $array[$k];
     }
     files::write(ROOT . '/config.php', $content);
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:26,代码来源:settings.module.php

示例3: saveMail

 function saveMail()
 {
     db::table('mails');
     db::where('mail_id', admin::get('id'));
     db::update(array('mail_name' => params::get('mail_name'), 'mail_subject' => params::get('mail_subject'), 'mail_content' => params::get('mail_content')));
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:7,代码来源:main.module.php

示例4: save

 function save()
 {
     $array = array('news_title' => params::get('news_title'), 'news_content' => params::get('news_content'), 'news_desc' => params::get('news_desc'));
     db::table('news');
     db::where('news_id', params::get('news_id'));
     db::update($array);
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:8,代码来源:main.module.php

示例5: 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

示例6: upload

 function upload()
 {
     $dir = IMAGES_ROOT . 'index/';
     @mkdir(IMAGES_ROOT);
     @mkdir($dir);
     if (!empty($_FILES['file']['name'])) {
         $img_id = md5(date('YmdHis'));
         $file = $dir . $img_id . '.jpg';
         $file_m = $dir . $img_id . '_m.jpg';
         copy($_FILES['file']['tmp_name'], $file);
         images::src($file);
         images::thumb($file_m);
         images::setWidth(150);
         images::resize();
         $array = array('img_id' => $img_id, 'img_set' => '0');
         db::table('images');
         db::smartInsert($array);
     }
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:20,代码来源:main.module.php

示例7: observerMemory

 function observerMemory()
 {
     $cookie = cookie::get(self::$auth_cookie_name);
     if ($cookie) {
         $err = false;
         list($username, $userid, $hash) = explode(',', $cookie);
         $userid = intval($userid);
         db::table('admin_users');
         db::where('user_id', $userid);
         $row = db::assoc();
         $word = 'legenda';
         if (md5($row['user_login'] . $word) != $hash) {
             $err = true;
         }
         if (db::rows() == 0) {
             $err = true;
         }
         if ($err) {
             self::logout();
         } else {
             $_SESSION['ADMIN_AUTH'] = 1;
             $_SESSION['ADMIN_USER_ID'] = $userid;
             headers::self();
         }
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:26,代码来源:admin.php

示例8: _edit

 function _edit()
 {
     self::_save();
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:5,代码来源:main.module.php

示例9: _savesection

 function _savesection()
 {
     $array = array('section_name' => strip_tags(params::get('section_name')), 'section_year' => params::get('section_year'), 'section_view' => params::isCheck('section_view'));
     $section_id = params::get('section_id');
     db::table('info_sections');
     db::where('section_id', $section_id);
     db::update($array);
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:9,代码来源:main.module.php

示例10: _save

 function _save()
 {
     $menu_id = params::get('menu_id');
     db::table('menus');
     db::where('menu_id', $menu_id);
     db::update(array('menu_pub' => '1', 'menu_name' => params::get('menu_name'), 'menu_title' => params::get('menu_title'), 'menu_tmpl' => params::get('menu_tmpl'), 'menu_tmpl_link' => params::get('menu_tmpl_link'), 'menu_tmpl_act' => params::get('menu_tmpl_act'), 'menu_tmpl_inact' => params::get('menu_tmpl_inact')));
     $allPages = params::isCheck('allPages');
     $allPagesOut = params::isCheck('allPagesOut');
     $pages = params::get('pages');
     if ($allPages == 1) {
         conf::deleteAll('menus', $menu_id, 'in');
         conf::addPageIn('menus', $menu_id, 0);
         conf::deleteAll('menus', $menu_id, 'out');
         conf::addPageOut('menus', $menu_id, 0);
     } else {
         if ($allPagesOut == 1 && $pages) {
             conf::deleteAll('menus', $menu_id, 'in');
             conf::addPageIn('menus', $menu_id, 0);
             conf::deleteAll('menus', $menu_id, 'out');
             foreach ($pages as $v) {
                 conf::addPageOut('menus', $menu_id, $v);
             }
         } else {
             if ($pages) {
                 conf::deleteAll('menus', $menu_id, 'out');
                 conf::addPageOut('menus', $menu_id, 0);
                 conf::deleteAll('menus', $menu_id, 'in');
                 foreach ($pages as $v) {
                     conf::addPageIn('menus', $menu_id, $v);
                 }
             } else {
                 conf::deleteAll('menus', $menu_id, 'in');
                 conf::addPageIn('menus', $menu_id, 0);
                 conf::deleteAll('menus', $menu_id, 'out');
                 conf::addPageOut('menus', $menu_id, 0);
             }
         }
     }
     if (events::detect('add')) {
         headers::app('menus');
     } else {
         headers::self();
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:44,代码来源:main.module.php

示例11: _save

 function _save()
 {
     $block_id = params::get('block_id');
     db::table('blocks');
     db::where('block_id', $block_id);
     db::update(array('block_pub' => '1', 'block_code' => params::get('block_code'), 'block_title' => params::get('block_title'), 'block_name' => params::get('block_name')));
     $allPages = params::isCheck('allPages');
     $allPagesOut = params::isCheck('allPagesOut');
     $pages = params::get('pages');
     if ($allPages == 1) {
         conf::deleteAll('blocks', $block_id, 'in');
         conf::addPageIn('blocks', $block_id, 0);
         conf::deleteAll('blocks', $block_id, 'out');
         conf::addPageOut('blocks', $block_id, 0);
     } else {
         if ($allPagesOut == 1 && $pages) {
             conf::deleteAll('blocks', $block_id, 'in');
             conf::addPageIn('blocks', $block_id, 0);
             conf::deleteAll('blocks', $block_id, 'out');
             foreach ($pages as $v) {
                 conf::addPageOut('blocks', $block_id, $v);
             }
         } else {
             if ($pages) {
                 conf::deleteAll('blocks', $block_id, 'out');
                 conf::addPageOut('blocks', $block_id, 0);
                 conf::deleteAll('blocks', $block_id, 'in');
                 foreach ($pages as $v) {
                     conf::addPageIn('blocks', $block_id, $v);
                 }
             } else {
                 conf::deleteAll('blocks', $block_id, 'in');
                 conf::addPageIn('blocks', $block_id, 0);
                 conf::deleteAll('blocks', $block_id, 'out');
                 conf::addPageOut('blocks', $block_id, 0);
             }
         }
     }
     if (events::detect('add')) {
         headers::app('blocks');
     } else {
         if (params::isCheck('go_structure')) {
             headers::app('blocks');
         } else {
             headers::self();
         }
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:48,代码来源:main.module.php

示例12: _savesection

 function _savesection()
 {
     $array = array('section_name' => strip_tags(params::get('section_name')), 'section_desc' => params::get('section_desc'));
     $section_id = params::get('section_id');
     db::table('catalog_sections');
     db::where('section_id', $section_id);
     db::update($array);
     $dir = IMAGES_ROOT . 'sections/';
     @mkdir(IMAGES_ROOT);
     @mkdir($dir);
     if (!empty($_FILES['section_photo']['name'])) {
         $file = $dir . $section_id . '.jpg';
         copy($_FILES['section_photo']['tmp_name'], $file);
         images::src($file);
         images::thumb($file);
         images::square(78);
     }
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:19,代码来源:main.module.php

示例13: restoreVersion

 function restoreVersion($version_date)
 {
     $page_id = admin::get('id');
     db::table('pages_versions');
     db::where('version_date', $version_date);
     db::where('page_id', $page_id);
     $res = db::select();
     $rows = db::rows();
     while ($row = mysql_fetch_assoc($res)) {
         if ($row['content_id'] == 0) {
             db::table('pages');
             db::where('page_id', $page_id);
             db::update('page_content', $row['version_content']);
         } else {
             db::table('pages_content');
             db::where('page_id', $page_id);
             db::where('content_id', $row['content_id']);
             db::update('content', $row['version_content']);
             if (mysql_affected_rows() == 0) {
                 db::table('pages_content');
                 db::insert('', $row['version_content'], '1', $page_id, ADMIN_USER_ID);
             }
         }
     }
     if ($rows != 0) {
         self::deleteVersion($version_date, $page_id);
     }
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:29,代码来源:main.module.php

示例14: observerMemory

 function observerMemory()
 {
     $cookie = cookie::get(md5(SERVER));
     if ($cookie) {
         $err = false;
         list($username, $userid, $hash) = explode(',', $cookie);
         $userid = intval($userid);
         db::table('users');
         db::where('user_id', $userid);
         $row = db::assoc();
         $word = 'legenda';
         if (md5($row['user_login'] . $word) != $hash) {
             $err = true;
         }
         if (db::rows() == 0) {
             $err = true;
         }
         if ($err) {
             unset($_SESSION['WEB_AUTH']);
             $_SESSION['WEB_NO_AUTH'] = 1;
             headers::self();
         } else {
             webUser::setAuth($userid);
             headers::self();
         }
     } else {
         $_SESSION['WEB_NO_AUTH'] = 1;
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:29,代码来源:web.php

示例15: _saveGroup

 function _saveGroup()
 {
     ini::parse(SYS_ROOT . 'conf/admin/groups.ini');
     $group_id = params::get('group_id');
     ini::delete($group_id);
     self::addGroupForce($group_id);
     headers::self();
 }
开发者ID:rigidus,项目名称:ea,代码行数:8,代码来源:users.module.php


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