⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cgi

📁 嵌入式无线路由系统openwrt的web配置工具
💻 CGI
字号:
#!/usr/bin/haserl# Copyright (C) 2008 OpenRB.comcontent-type: text/html(function(){  var moduleId = 'backup';  var elems = FlashSYS.getCache( moduleId );  if (!elems) {    var window = FlashSYS.newWindow({      id: moduleId,      title: $TR( moduleId ),      padding: 5,      width: 300,      height: 180    });        var table = new FlashSYS.Table(window.contentEl, {      click: function(params) {        if (params.file) {          document.window.open('/backups/' + params.file);        }      },      trPrefix: 'backup_',      tableHead: {        'filename': { width: 80 },        'restore': { width: 10, blank: true, confirm: 'backup_restore_confirm', params: { module: moduleId, action: 'restore' } },        'delete': { width: 10, blank: true, confirm: 'del_confirm', params: { module: moduleId, action: 'delete', reload: moduleId } }      }    });    FlashSYS.Control.addButton(window.footerEl, {      'params': { 'module': moduleId, 'action': 'form' },      'cls': 'Add',      'title': $TR('backup_create')    });    FlashSYS.Control.addButton(window.footerEl, {      'params': { 'module': moduleId, 'action': 'formupload' },      'cls': 'Upload',      'title': $TR('backup_upload')    });    elems = FlashSYS.setCache( moduleId, {      window: window,      table: table    });  }    var tableValues = {}, tableData = <? /lib/flashsys/modules/backup/main.lua ?>,      downTitle = $TR('title_download'), resTitle = $TR('title_restore'), delTitle = $TR('title_delete');  if ($type(tableData) != 'array') {    return;  }  for (var i = 0, j = tableData.length; i < j; i++) {    var id = 'entry' + i, value = tableData[i];    tableValues[ id ] = {      'params': { 'file': value },      'cells': [        { 'cls': 'DLoad', 'value': value, 'title': downTitle },        { 'cls': 'Icon Restore', 'data': value, 'title': resTitle },        { 'cls': 'Icon Delete', 'data': value, 'title': delTitle }      ]    };  }  elems.table.loadValues(tableValues);})();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -