加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hyang.class.php 4.90 KB
一键复制 编辑 原始数据 按行查看 历史
Joshua Conero 提交于 2016-05-15 22:56 . no commit message
<?
require_once('upmklog.php');
require_once('hyang.function.php');
require_once('hyang.model.php');
require_once('file.model.php');
require_once('file.class.php');
require_once dirname(__FILE__).'./hyang/ControllerAbstract.php';
header('Content-type: text/html; charset=GBK');
class hyang extends ControllerAbstract
{
public function test()
{
htmlHead('测试学习页面');
echo plugin('markup');
improt('js','test');
improt('css','test');
echo '</head><body>';
view('test.html');//include './public/view/test.html';
}
public function excel()//Excel数据导出
{
header('Content-type: text/html; charset=GBK');
$action = isset($_GET['action'])? $_GET['action'] : '';
if($action == crypt('down','hyang'))
{
$outfile=date('YmdHis',time()).'.xls';
header('Content-type: application/octet-stream; charset=GBK');//下载动作的关键
Header("Accept-Ranges: bytes");
header('Content-Disposition: attachment; filename='.$outfile);
//echo $wrstr;//这里是需下载的php文件中的内容
print_dir_table('./files');
$date = date('Y-m-d H:i:s',time());
$content = "\r\n\r\n(Excel DOWNLOAD FILES=》".getRealIpAddr()." [".$date."] .(".$outfile.")被下载!"."\r\n-----------------------------------";
mklog('act',$content,'close');
exit();
}
htmlHead('Excel 导出');
echo '<p align="right"><a href="index.php">BACK</a> <a href="javascript:void(0);">多文件下载</a> <a href="hyang.php?action='.crypt('down','hyang').'">Excel导出</a></p>';
echo '</head><body>';
echo '<h3 align="center">文件一览表</h3>';
print_dir_table('./files');
echo '</body></html>';
}
public function excelimgs()
{
header('Content-type: text/html; charset=GBK');
$action = isset($_GET['action'])? $_GET['action'] : '';
if($action == crypt('downimg','hyang'))
{
$outfile=date('YmdHis',time()).'.xls';
header('Content-type: application/octet-stream; charset=GBK');//下载动作的关键
Header("Accept-Ranges: bytes");
header('Content-Disposition: attachment; filename='.$outfile);
//echo $wrstr;//这里是需下载的php文件中的内容
print_dir_table('./images');
$date = date('Y-m-d H:i:s',time());
$content = "\r\n\r\n(Excel DOWNLOAD IMAGES=》".getRealIpAddr()." [".$date."] .(".$outfile.")被下载!"."\r\n-----------------------------------";
mklog('act',$content,'close');
exit();
}
htmlHead('图片一览表');
echo '<p align="right"><a href="index.php">BACK</a> <a href="hyang.php?action='.crypt('downimg','hyang').'">Excel导出</a></p>';
echo '</head><body>';
echo '<h3 align="center">文件一览表</h3>';
print_dir_table('./images');
echo '</body></html>';
}
public function admin()
{
htmlHead('管理员登入');
echo '</head><body>';
view('admin.html');
echo '</body></html>';
}
public function delfile()
{
htmlHead('删除文件 ');
echo '</head><body>';
echo '<p><a href="index.php">Quit Out</a></p>';
echo '<h3>建议删除文件!</h3>';
print_deltbale('./del');
if(isset($_GET['file']))
{
if($_GET['file'] == 'ALL')
{
deleteAll('./del');
header('Location:hyang.php?all=ok');
}
else
{
if(unlink($_GET['file']))
{
header('Location:hyang.php?ok=ok');
//echo '<script> alert("文件已经删除!");</script>';
}
else
{
echo '<p>文件删除失败!</p>';
}
}
}
view('delete.html');
echo '</body></html>';
}
public function Email()
{
htmlHead('邮件发送 ');
improt('css','email.css');
improt('js','email.js');
echo '</head><body>';
echo '<p><a href="index.php">I WANT COME BACK</a></p>';
improt('view','email.html');
echo '</body></html>';
}
public function Zone()
{
htmlHead('时区一览 ');
echo'<style>tr:hover{background:#00cc00;}
</style>
</head><body>';
echo '<p><a href="index.php">BACK</a></p>';
$array = array(
'Asia/Tokyo' => '东京',
'Asia/Pyongyang' => '平壤',
'' => '北京',
'Asia/Harbin' => '哈尔滨',
'Asia/Chongqing' => '重庆',
'Asia/Taipei' => '台北',
'Asia/Jakarta' => '雅加达',
'Asia/Urumqi' => '乌鲁木齐',
'Asia/Kabul' => '喀布尔',
'Europe/Moscow' => '莫斯科',
'Asia/Qatar' => '卡塔尔',
'Asia/Istanbul' => '伊斯坦布尔',
'Asia/Jerusalem' => '耶路撒冷',
'Africa/Johannesburg' => '约翰内斯堡',
'Europe/Paris' => '巴黎',
'Europe/Berlin' => '柏林',
'Europe/Vienna' => '维也纳',
'Europe/Rome' => '罗马',
'Europe/London' => '伦敦',
'America/New_York' => '纽约',
'America/Havana' => '哈瓦那',
'America/Panama' => '巴拿马',
'America/Mexico_City' => '墨西哥',
'America/Los_Angeles' => '洛杉矶'
);
echo '<table><tr><th>序号</th><th>时区</th><th>时间</th></tr>';
$i = 1;
foreach($array as $key => $value)
{
echo '<tr><td>'.($i++).'</td><td>'.$value.'</td><td>'.Zonetime($key).'</td></tr>';
}
echo '</table>';
echo '</body></html>';
}
public function newSys()
{
header('Location:file.php');
}
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化