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


PHP headers::app方法代码示例

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


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

示例1: _add

 function _add()
 {
     $array = array('news_date' => 'NOW()', 'news_pub' => '1', 'news_title' => params::get('news_title'), 'news_content' => params::get('news_content'), 'news_desc' => params::get('news_desc'));
     db::table('news');
     db::smartInsert($array);
     headers::app('news');
 }
开发者ID:rigidus,项目名称:ea,代码行数:7,代码来源:main.module.php

示例2: _add

 function _add()
 {
     $array = array('file_date' => 'NOW()', 'file_name' => params::get('file_name'), 'section_id' => params::get('section_id'));
     db::table('info_files');
     db::smartInsert($array);
     $file_id = mysql_insert_id();
     $dir = FILES_ROOT . 'info/';
     if (!empty($_FILES['file']['name'])) {
         $file_size = $_FILES['file']['size'];
         $file_type = files::info($_FILES['file']['name'], 'type');
         $file_name = str_replace('.' . $file_type, '', $_FILES['file']['name']);
         $file = $dir . $_FILES['file']['name'];
         copy($_FILES['file']['tmp_name'], $file);
         $array = array('file_type' => $file_type, 'file_realname' => $file_name, 'file_size' => $file_size);
         db::table('info_files');
         db::where('file_id', $file_id);
         db::update($array);
     }
     headers::app('info');
 }
开发者ID:rigidus,项目名称:ea,代码行数:20,代码来源:main.module.php

示例3: _add

 function _add()
 {
     $array = array('item_date' => 'NOW()', 'item_name' => params::get('item_name'), 'item_desc' => params::get('item_desc'), 'item_content' => params::get('item_content'), 'section_id' => params::get('section_id'), 'item_pub' => '1');
     db::table('catalog_items');
     db::smartInsert($array);
     $item_id = mysql_insert_id();
     $photos = params::get('photos_id');
     if ($photos) {
         foreach ($photos as $v) {
             db::table('catalog_items_photos');
             db::where('file_id', $v);
             db::update(array('item_id' => $item_id));
         }
     }
     $files = params::get('files_id');
     if ($files) {
         foreach ($files as $v) {
             db::table('catalog_items_files');
             db::where('file_id', $v);
             db::update(array('item_id' => $item_id));
         }
     }
     $part_number = params::get('part_number');
     $part_index = params::get('part_index');
     $part_name = params::get('part_name');
     $part_desc = params::get('part_desc');
     if ($part_number) {
         foreach ($part_number as $k => $v) {
             $v = trim($v);
             if (!empty($v)) {
                 $array = array('part_number' => $v, 'part_index' => trim($part_index[$k]), 'part_name' => trim($part_name[$k]), 'part_desc' => trim($part_desc[$k]), 'item_id' => $item_id);
                 db::table('catalog_items_parts');
                 db::smartInsert($array);
             }
         }
     }
     headers::app('catalog');
 }
开发者ID:rigidus,项目名称:ea,代码行数:38,代码来源:main.module.php

示例4: installApp

 function installApp()
 {
     if ($_FILES['app']['name']) {
         if ($_FILES['app']['type'] != 'application/zip') {
             s::set('ERRORS', '<ul><li>Неверный формат архива приложения.</li></ul>');
         } else {
             $arr = explode('.', $_FILES['app']['name']);
             if (count($arr) < 5) {
                 s::set('ERRORS', '<ul><li>Неверный формат архива приложения.</li></ul>');
             } else {
                 define('INSTALL_APP', $arr[0]);
                 define('INSTALL_APP_VERSION', $arr[1] . '.' . $arr[2] . '.' . $arr[3]);
                 files::fullRemoveDir(SYS_ROOT . 'var/tmp/apps/');
                 $path = SYS_ROOT . 'var/tmp/apps/';
                 zipfile::read($_FILES['app']['tmp_name']);
                 zipfile::extract($path);
                 $install_file = $path . 'install.php';
                 if (!file_exists($install_file)) {
                     s::set('ERRORS', '<ul><li>Не найден инсталляционый файл приложения.</li></ul>');
                 } else {
                     include $install_file;
                     // copy lang files
                     $tmp_lang_dir = SYS_ROOT . 'var/tmp/apps/langs/';
                     $lang_dir = SYS_ROOT . 'langs/admin/';
                     if (file_exists($lang_dir)) {
                         $array = files::getFiles($tmp_lang_dir);
                         foreach ($array as $v) {
                             if (!file_exists($lang_dir . $v)) {
                                 copy($tmp_lang_dir . $v, $lang_dir . $v);
                             } else {
                                 $lang = ini::parse($tmp_lang_dir . $v);
                                 ini::parse($lang_dir . $v);
                                 ini::add($lang);
                                 ini::write();
                             }
                         }
                     }
                     // copy app files
                     $dir = SYS_ROOT . 'var/tmp/apps/' . INSTALL_APP . '/';
                     $new_dir = SYS_ROOT . 'apps/' . INSTALL_APP . '/';
                     files::copyDir($dir, $new_dir);
                     // clear tmp
                     files::fullRemoveDir(SYS_ROOT . 'var/tmp/apps/');
                     headers::app('manage');
                 }
             }
         }
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:49,代码来源:main.module.php

示例5: _add

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

示例6: _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

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

示例8: savePage

 function savePage()
 {
     self::_save();
     params::send();
     if (params::isCheck('go_structure')) {
         headers::app('pages');
     } else {
         headers::self();
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:10,代码来源:main.module.php

示例9: addMail

 function addMail()
 {
     db::table('mails');
     db::insert('', params::get('mail_subject'), params::get('mail_content'), params::get('mail_name'), ADMIN_SITE_ID);
     headers::app('mails');
 }
开发者ID:rigidus,项目名称:ea,代码行数:6,代码来源:main.module.php


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