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


PHP Functions::page方法代码示例

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


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

示例1: account_login_log

 function account_login_log()
 {
     $this->title = '登录日志 - 账号 - AMH';
     $this->AmysqlModelBase();
     Functions::CheckLogin();
     $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
     $page_sum = 20;
     $login_list = $this->accounts->login_list($page, $page_sum);
     $total_page = ceil($login_list['sum'] / $page_sum);
     $page_list = Functions::page('AccountLog', $login_list['sum'], $total_page, $page);
     // 分页列表
     $this->page = $page;
     $this->total_page = $total_page;
     $this->page_list = $page_list;
     $this->login_list = $login_list;
     $this->_view('account_login_log');
 }
开发者ID:logdns,项目名称:amh-4.2,代码行数:17,代码来源:account.php

示例2: module_list

 function module_list()
 {
     $this->title = 'AMH - Module';
     $this->AmysqlModelBase();
     Functions::CheckLogin();
     if (isset($_GET['action']) && isset($_GET['name'])) {
         $name = $_GET['name'];
         $action = $_GET['action'];
         $action_list = array('install' => '安装', 'uninstall' => '卸载', 'delete' => '删除');
         $result = '';
         if (isset($action_list[$action])) {
             $cmd = "amh module {$name} {$action} y";
             $cmd = Functions::trim_cmd($cmd);
             $result = trim(shell_exec($cmd), "\n");
             $result = Functions::trim_result($result);
         }
         if (strpos($result, '[OK]') !== false && strpos($result, '[Error]') == false) {
             $this->status = 'success';
             $this->notice = "{$name} {$action_list[$action]}成功。";
         } else {
             $this->status = 'error';
             $this->notice = "{$name} {$action_list[$action]}失败。";
         }
     }
     $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
     $page_sum = 5;
     $get_module_list_data = $this->modules->get_module_list_data($page, $page_sum);
     $total_page = ceil($get_module_list_data['sum'] / $page_sum);
     $page_list = Functions::page('ModuleList', $get_module_list_data['sum'], $total_page, $page, 'c=module&a=module_list');
     // 分页列表
     global $Config;
     $Config['XSS'] = false;
     $this->page = $page;
     $this->total_page = $total_page;
     $this->page_list = $page_list;
     $this->module_list_data = $get_module_list_data;
     $this->indexs->log_insert($this->notice);
     $this->_view('module_list');
 }
开发者ID:dudor,项目名称:nginxpanel,代码行数:39,代码来源:module.php

示例3: backup_list

 function backup_list()
 {
     $this->title = '备份列表 - 备份 - AMH';
     $this->AmysqlModelBase();
     Functions::CheckLogin();
     if (isset($_GET['category']) && $_GET['category'] == 'backup_remote') {
         $_GET['a'] = 'backup_remote';
         $this->backup_remote();
         exit;
     }
     $this->status = 'error';
     if (isset($_GET['del'])) {
         $del_id = (int) $_GET['del'];
         $del_info = $this->backups->get_backup($del_id);
         if (isset($del_info['backup_file'])) {
             $file = str_replace('.amh', '', $del_info['backup_file']);
             $cmd = "amh rm_backup {$file}";
             $cmd = Functions::trim_cmd($cmd);
             $result = shell_exec($cmd);
             $this->status = 'success';
             $this->notice = "删除备份文件({$file}.amh)执行完成。";
         }
     }
     $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
     $page_sum = 20;
     $this->backups->backup_list_update();
     $backup_list = $this->backups->get_backup_list($page, $page_sum);
     $total_page = ceil($backup_list['sum'] / $page_sum);
     $page_list = Functions::page('BackupList', $backup_list['sum'], $total_page, $page, 'c=backup&a=backup_list&category=backup_list');
     // 分页列表
     $this->page = $page;
     $this->total_page = $total_page;
     $this->backup_list = $backup_list;
     $this->page_list = $page_list;
     $this->indexs->log_insert($this->notice);
     $this->_view('backup_list');
 }
开发者ID:logdns,项目名称:amh-4.2,代码行数:37,代码来源:backup.php

示例4: backup_list

 function backup_list()
 {
     $this->title = 'AMH - Backup';
     $this->AmysqlModelBase();
     Functions::CheckLogin();
     $this->status = 'error';
     $category = isset($_GET['category']) ? $_GET['category'] : 'backup_list';
     $category_array = array('backup_list', 'backup_remote', 'backup_now', 'backup_revert');
     if (!in_array($category, $category_array)) {
         $category = 'backup_list';
     }
     $input_item = array('remote_type', 'remote_status', 'remote_ip', 'remote_path', 'remote_user', 'remote_password');
     if ($category == 'backup_list') {
         $this->title = 'AMH - Backup - 备份列表';
         if (isset($_GET['del'])) {
             $del_id = (int) $_GET['del'];
             $del_info = $this->backups->get_backup($del_id);
             if (isset($del_info['backup_file'])) {
                 $file = str_replace('.amh', '', $del_info['backup_file']);
                 $cmd = "amh rm_backup {$file}";
                 $cmd = Functions::trim_cmd($cmd);
                 $result = shell_exec($cmd);
                 $this->status = 'success';
                 $this->notice = "删除备份文件({$file}.amh)执行完成。";
             }
         }
         $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
         $page_sum = 20;
         $this->backups->backup_list_update();
         $backup_list = $this->backups->get_backup_list($page, $page_sum);
         $total_page = ceil($backup_list['sum'] / $page_sum);
         $page_list = Functions::page('BackupList', $backup_list['sum'], $total_page, $page, 'c=backup&a=backup_list&category=backup_list');
         // 分页列表
         global $Config;
         $Config['XSS'] = false;
         $this->page = $page;
         $this->total_page = $total_page;
         $this->backup_list = $backup_list;
         $this->page_list = $page_list;
     } elseif ($category == 'backup_remote') {
         $this->title = 'AMH - Backup - 远程设置';
         // 连接测试
         if (isset($_GET['check'])) {
             $id = (int) $_GET['check'];
             $data = $this->backups->get_backup_remote($id);
             if ($data['remote_type'] == 'FTP') {
                 $cmd = "amh BRftp check {$id}";
             } else {
                 $cmd = "amh BRssh check {$id}";
             }
             $cmd = Functions::trim_cmd($cmd);
             $result = shell_exec($cmd);
             $result = trim(Functions::trim_result($result), "\n ");
             echo $result;
             exit;
         }
         // 保存远程配置
         if (isset($_POST['save'])) {
             $save = true;
             foreach ($input_item as $val) {
                 if (empty($_POST[$val])) {
                     $this->notice = '新增远程备份配置失败,请填写完整数据,*号为必填项。';
                     $save = false;
                 }
             }
             if ($save) {
                 $id = $this->backups->backup_remote_insert();
                 if ($id) {
                     $this->status = 'success';
                     $this->notice = 'ID:' . $id . ' 新增远程备份配置成功。';
                     $_POST = array();
                 } else {
                     $this->notice = ' 新增远程备份配置失败。';
                 }
             }
         }
         // 删除远程配置
         if (isset($_GET['del'])) {
             $id = (int) $_GET['del'];
             if (!empty($id)) {
                 $result = $this->backups->backup_remote_del($id);
                 if ($result) {
                     $this->status = 'success';
                     $this->notice = 'ID:' . $id . ' 删除远程备份配置成功。';
                 } else {
                     $this->notice = 'ID:' . $id . ' 删除远程备份配置失败。';
                 }
             }
         }
         // 编辑远程配置
         if (isset($_GET['edit'])) {
             $id = (int) $_GET['edit'];
             $_POST = $this->backups->get_backup_remote($id);
             if ($_POST['remote_id']) {
                 $this->edit_remote = true;
             }
         }
         // 保存编辑远程配置
         if (isset($_POST['save_edit'])) {
             $id = $_POST['remote_id'] = (int) $_POST['save_edit'];
//.........这里部分代码省略.........
开发者ID:dudor,项目名称:nginxpanel,代码行数:101,代码来源:backup.php

示例5: module_down

 function module_down()
 {
     $this->title = '下载模块 - AMH';
     $this->AmysqlModelBase();
     Functions::CheckLogin();
     if (isset($_GET['module_name'])) {
         $module_name = $_GET['module_name'];
         if (!empty($module_name)) {
             $status = $this->modules->module_download($module_name);
             if ($status[0]) {
                 $this->status = 'success';
                 $this->notice = "模块下载成功:{$module_name}";
             } else {
                 $this->status = 'error';
                 if (strpos(serialize($status[1]), 'already exist.') !== false) {
                     $this->notice = "模块已存在下载失败:{$module_name}";
                 } else {
                     $this->notice = "模块下载失败:{$module_name}";
                 }
             }
         } else {
             $this->status = 'error';
             $this->notice = "请输入模块名字。";
         }
     }
     $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
     $page_sum = 5;
     $new_module_list = $this->modules->get_new_module_list($page, $page_sum);
     $total_page = ceil($new_module_list['sum'] / $page_sum);
     $page_list = Functions::page('NewModuleList', $new_module_list['sum'], $total_page, $page, "c=module&a=module_down&search_type={$_GET['search_type']}&m_txt={$_GET['m_txt']}");
     // 分页列表
     $this->page = $page;
     $this->total_page = $total_page;
     $this->page_list = $page_list;
     $this->new_module_list = $new_module_list;
     $this->indexs->log_insert($this->notice);
     $this->_view('module_down');
 }
开发者ID:logdns,项目名称:amh-4.2,代码行数:38,代码来源:module.php


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