7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
214 lines
6.4 KiB
PHP
214 lines
6.4 KiB
PHP
<?php
|
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
|
date_default_timezone_set('Asia/Shanghai');
|
|
function deel_0($num){
|
|
if($num<10)
|
|
return "0".$num;
|
|
else
|
|
return $num;
|
|
}
|
|
$t=$_GET["t"];
|
|
// $p=$_GET["p"];
|
|
$rurl=$_GET["rurl"];
|
|
$title=$_GET["title"];
|
|
$max_p=array("1"=>13);//图片目录=>图片数量
|
|
//$max_p=array("1"=>13,"2"=>5);
|
|
//$arr_menu=array("1"=>"订货手册","2"=>"客户须知");
|
|
$arr_menu=array("1"=>"订货手册","2"=>"客户须知");//图片目录=>标题
|
|
$t=$t?$t:1;
|
|
// $p=$p?$p:"1";
|
|
//echo $max_p[$t]."--<Br>";
|
|
// if($p>$max_p[$t])
|
|
// echo "<script> alert('wrong number!'); history.back(); </script>";
|
|
// $menu="";
|
|
// foreach($arr_menu as $k => $v){
|
|
// $menu.="<td height=\"25\"";
|
|
// if($t==$k)
|
|
// $menu.=" class=\"tab_click\"";
|
|
// else
|
|
// $menu.=" class=\"tab_normal\"";
|
|
// $menu.=" onclick=\"location.href='".$_SERVER[PHP_SELF]."?t=".$k."&rurl=".urlencode($rurl)."'\">".$v."</td>";
|
|
// }
|
|
//pre_page
|
|
// $pre_page=$p-1;
|
|
// if($pre_page==0)
|
|
// $button_pre_page="<input type=\"button\" value=\" 上一页 \" class=\"button1\" onclick=\"alert('已经是第一页了!')\">";
|
|
// else
|
|
// $button_pre_page="<input type=\"button\" value=\" 上一页 \" class=\"button1\" onclick=\"location.href='".$_SERVER[PHP_SELF]."?t=".$t."&p=".$pre_page."&rurl=".urlencode($rurl)."'\">";
|
|
//next_page
|
|
// $next_page=$p+1;
|
|
// if($next_page>$max_p[$t])
|
|
// $button_next_page="<input type=\"button\" value=\" 下一页 \" class=\"button1\" onclick=\"alert('已经是最后一页了!')\">";
|
|
// else
|
|
// $button_next_page="<input type=\"button\" value=\" 下一页 \" class=\"button1\" onclick=\"location.href='".$_SERVER[PHP_SELF]."?t=".$t."&p=".$next_page."&rurl=".urlencode($rurl)."'\">";
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=yes,initial-scale=1,maximum-scale=3.0,minimum-scale=1" />
|
|
<title>PPT文稿</title>
|
|
<link rel="stylesheet" media="all" href="index.css" />
|
|
<style>
|
|
.tab_normal{
|
|
border:1px solid #cccccc;cursor:pointer;font-weight:normal;background-color:#ffffff;font-size:14px;
|
|
}
|
|
.tab_click{
|
|
border:1px solid #000000;cursor:pointer;font-weight:bold;background-color:#cccccc;font-size:14px;
|
|
}
|
|
.viewer-container {background-color: white !important;}
|
|
.state_bar {
|
|
height: 45px;
|
|
line-height: 45px;
|
|
background-color: #f8f8f8;
|
|
border: 1px solid #eee;
|
|
margin-bottom: 10px;
|
|
}
|
|
.state_bar .text_title {
|
|
width: 100px;
|
|
float: left;
|
|
font-size: 16px;
|
|
text-align: center;
|
|
}
|
|
.state_bar .btn_close {
|
|
width: 40px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
float: right;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
<link rel="stylesheet" href="../../ipad/layuiadmin/layui/css/layui.css">
|
|
<script src="../../ipad/layuiadmin/layui/layui.js"></script>
|
|
<link rel="stylesheet" href="../../ipad/js/viewer/viewer.min.css">
|
|
<script src="../../ipad/js/viewer/viewer.min.js"></script>
|
|
<!-- <link href="../jquery-mobile/jquery.mobile-1.1.0.css" rel="stylesheet" type="text/css"/>
|
|
<script src="../jquery-mobile/jquery.js" type="text/javascript"></script>
|
|
<script src="../jquery-mobile/jquery.mobile-1.1.0.min.js" type="text/javascript"></script> -->
|
|
<script>
|
|
// layui.use(["jquery"], function() {
|
|
// var $ = layui.jquery
|
|
|
|
// $(document).ready(function() {
|
|
// $("#home").live("swipeleft",function(){
|
|
// go_next();
|
|
// });
|
|
// $("#home").live("swiperight",function(){
|
|
// go_pre();
|
|
// });
|
|
// });
|
|
|
|
// var p=<?php echo $p; ?>;
|
|
// var max_p=<?php echo $max_p[$t]; ?>;
|
|
|
|
// function go_pre(){
|
|
// var p_pre=p-1;
|
|
// if(p_pre==0)
|
|
// p_pre=max_p;
|
|
// window.location.href='<?php echo $_SERVER[PHP_SELF]."?rurl=".urlencode($rurl)."&t=".$t; ?>&p='+p_pre;
|
|
// }
|
|
// function go_next(){
|
|
// var p_next=p+1;
|
|
// if(p_next>max_p)
|
|
// p_next=1;
|
|
// window.location.href='<?php echo $_SERVER[PHP_SELF]."?rurl=".urlencode($rurl)."&t=".$t; ?>&p='+p_next;
|
|
// }
|
|
// })
|
|
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="home">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td>
|
|
<?php
|
|
$menu = '<div class="layui-btn-group" style="padding: 16px;">';
|
|
foreach($arr_menu as $k => $v){
|
|
$menu .= '';
|
|
if($t==$k)
|
|
$menu .= '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm">'.$v.'</button>';
|
|
else
|
|
$menu .= '<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="location.href=\''.$_SERVER[PHP_SELF].'?t='.$k.'&rurl='.urlencode($rurl).'&title='.$title.'\'">'.$v.'</button>';
|
|
}
|
|
$menu .= '</div>';
|
|
echo $menu;
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="pic" align="center">
|
|
<?php
|
|
for ($i = 1; $i <= $max_p[$t]; $i++) {
|
|
echo '<img id="pic-'.$i.'" src="images/'.$t.'/'.deel_0($i).'.jpg'.'" data-origina="images/'.$t.'/'.deel_0($i).'.jpg'.'" width="90%" '.($i == 1 ? 'class="pic-active layui-anim layui-anim-scale"' : 'class="layui-anim layui-anim-scale" style="display: none;"').'/>';
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" height="50" valign="middle">
|
|
<div id="page"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<script>
|
|
layui.use(["laypage", "jquery"], function() {
|
|
var laypage = layui.laypage
|
|
,$ = layui.jquery
|
|
|
|
new Viewer(document.getElementById("pic"), {
|
|
url: "data-original"
|
|
,toolbar: false
|
|
,title: false
|
|
,rotatable: false
|
|
,backdrop: false // 点击非图片层关闭
|
|
,container: $("body", top.document)[0]
|
|
})
|
|
|
|
laypage.render({
|
|
elem: 'page'
|
|
,count: <?php echo $max_p[$t]?$max_p[$t]:0; ?>
|
|
,limit: 1
|
|
,curr: 1
|
|
,layout: ['prev', 'page', 'next', 'skip']
|
|
,theme: '#1E9FFF'
|
|
,jump: function(obj, first){
|
|
if(!first){
|
|
$("#pic .pic-active").removeClass("pic-active").hide()
|
|
$("#pic-"+obj.curr).addClass("pic-active").show()
|
|
}
|
|
}
|
|
})
|
|
|
|
$(".layui-layer-iframe", parent.document).css({
|
|
top: 0
|
|
,left: 0
|
|
,width: "100%"
|
|
,height: "100%"
|
|
})
|
|
$(".layui-layer-iframe .layui-layer-content", parent.document).css({
|
|
top: 0
|
|
,left: 0
|
|
,width: "100%"
|
|
,height: "100%"
|
|
})
|
|
$(".layui-layer-iframe .layui-layer-content iframe", parent.document).css({
|
|
height: "100%"
|
|
})
|
|
|
|
})
|
|
function u_close_this_div(){
|
|
layui.use('layer', function(){
|
|
var index = parent.layer.getFrameIndex(window.name)
|
|
parent.layer.close(index)
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|