Selaa lähdekoodia

成功失败跳转提示

Jonlin 6 vuotta sitten
vanhempi
commit
8994f104eb

+ 60 - 0
application/common.php

@@ -629,4 +629,64 @@ function ds_substing($string, $start=0,$length=80) {
 
 function page_mobile($page){
     
+}
+
+function isMobile()
+{
+    if (isset ($_SERVER['HTTP_X_WAP_PROFILE']))
+    {
+        return true;
+    }
+    if (isset ($_SERVER['HTTP_VIA']))
+    {
+        return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
+    }
+    if (isset ($_SERVER['HTTP_USER_AGENT']))
+    {
+        $clientkeywords = array ('nokia',
+            'sony',
+            'ericsson',
+            'mot',
+            'samsung',
+            'htc',
+            'sgh',
+            'lg',
+            'sharp',
+            'sie-',
+            'philips',
+            'panasonic',
+            'alcatel',
+            'lenovo',
+            'iphone',
+            'ipod',
+            'blackberry',
+            'meizu',
+            'android',
+            'netfront',
+            'symbian',
+            'ucweb',
+            'windowsce',
+            'palm',
+            'operamini',
+            'operamobi',
+            'openwave',
+            'nexusone',
+            'cldc',
+            'midp',
+            'wap',
+            'mobile'
+        );
+        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT'])))
+        {
+            return true;
+        }
+    }
+    if (isset ($_SERVER['HTTP_ACCEPT']))
+    {
+        if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html'))))
+        {
+            return true;
+        }
+    }
+    return false;
 }

+ 52 - 34
runtime/temp/a110d949b0dc53ec8bd6210a8df6a198.php

@@ -1,47 +1,65 @@
-<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:66:"C:\phpStudy\PHPTutorial\WWW\aqm-web\thinkphp\tpl\dispatch_jump.tpl";i:1557480235;}*/ ?>
+<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:66:"C:\phpStudy\PHPTutorial\WWW\aqm-web\thinkphp\tpl\dispatch_jump.tpl";i:1558060512;}*/ ?>
 <!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 name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
     <title>跳转提示</title>
+    <?php if(isMobile()==true){?>
     <style type="text/css">
-        *{ padding: 0; margin: 0; }
-        body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
-        .system-message{ padding: 24px 48px; }
-        .system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 12px; }
-        .system-message .jump{ padding-top: 10px; }
-        .system-message .jump a{ color: #333; }
-        .system-message .success,.system-message .error{ line-height: 1.8em; font-size: 36px; }
-        .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
+    body, h1, h2, p,dl,dd,dt{margin: 0;padding: 0;font: 15px/1.5 微软雅黑,tahoma,arial;}
+    body{background:#efefef;}
+    h1, h2, h3, h4, h5, h6 {font-size: 100%;cursor:default;}
+    ul, ol {list-style: none outside none;}
+    a {text-decoration: none;color:#447BC4}
+    a:hover {text-decoration: underline;}
+    .ip-attack{width:100%; margin:200px auto 0;}
+    .ip-attack dl{ background:#fff; padding:30px; border-radius:10px;border: 1px solid #CDCDCD;-webkit-box-shadow: 0 0 8px #CDCDCD;-moz-box-shadow: 0 0 8px #cdcdcd;box-shadow: 0 0 8px #CDCDCD;}
+        .ip-attack dt{text-align:center;}
+        .ip-attack dd{font-size:16px; color:#333; text-align:center;}
+        .tips{text-align:center; font-size:14px; line-height:50px; color:#999;}
     </style>
+    <?php }else{ ?>
+    <style type="text/css">
+        body, h1, h2, p,dl,dd,dt{margin: 0;padding: 0;font: 12px/1.5 微软雅黑,tahoma,arial;}
+        body{background:#efefef;}
+        h1, h2, h3, h4, h5, h6 {font-size: 100%;cursor:default;}
+        ul, ol {list-style: none outside none;}
+        a {text-decoration: none;color:#447BC4}
+        a:hover {text-decoration: underline;}
+        .ip-attack{width:400px; margin:150px auto 0;}
+        .ip-attack dl{ background:#fff; padding:30px; border-radius:5px;border: 1px solid #CDCDCD;-webkit-box-shadow: 0 0 8px #CDCDCD;-moz-box-shadow: 0 0 8px #cdcdcd;box-shadow: 0 0 8px #CDCDCD;}
+        .ip-attack dt{text-align:center;}
+        .ip-attack dd{font-size:16px; color:#333; text-align:center;}
+        .tips{text-align:center; font-size:14px; line-height:50px; color:#999;}
+    </style>
+    <?php }?>
+
 </head>
 <body>
-    <div class="system-message">
+<div class="ip-attack"><dl>
         <?php switch ($code) {case 1:?>
-            <h1>:)</h1>
-            <p class="success"><?php echo(strip_tags($msg));?></p>
-            <?php break;case 0:?>
-            <h1>:(</h1>
-            <p class="error"><?php echo(strip_tags($msg));?></p>
-            <?php break;} ?>
-        <p class="detail"></p>
-        <p class="jump">
+        <dt style="color: green"><?php echo(strip_tags($msg));?></dt>
+        <?php break;case 0:?>
+        <dt style="color: red"><?php echo(strip_tags($msg));?></dt>
+        <?php break;} ?>
+        <br>
+        <dt>
             页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间: <b id="wait"><?php echo($wait);?></b>
-        </p>
-    </div>
-    <script type="text/javascript">
-        (function(){
-            var wait = document.getElementById('wait'),
+        </dt></dl>
+</div>
+<script type="text/javascript">
+    (function(){
+        var wait = document.getElementById('wait'),
                 href = document.getElementById('href').href;
-            var interval = setInterval(function(){
-                var time = --wait.innerHTML;
-                if(time <= 0) {
-                    location.href = href;
-                    clearInterval(interval);
-                };
-            }, 1000);
-        })();
-    </script>
+        var interval = setInterval(function(){
+            var time = --wait.innerHTML;
+            if(time <= 0) {
+                location.href = href;
+                clearInterval(interval);
+            };
+        }, 1000);
+    })();
+</script>
 </body>
-</html>
+</html>

+ 173 - 0
runtime/temp/c80b058476b11dadc4e45a830a90f302.php

@@ -0,0 +1,173 @@
+<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:97:"C:\phpStudy\PHPTutorial\WWW\aqm-web\public/../application/admin\view\development_server\form.html";i:1557907476;s:75:"C:\phpStudy\PHPTutorial\WWW\aqm-web\application\admin\view\layout\home.html";i:1557480234;s:82:"C:\phpStudy\PHPTutorial\WWW\aqm-web\application\admin\view\layout\admin_items.html";i:1557480234;}*/ ?>
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <title>安全猫官网</title>
+        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+        <!-- Bootstrap 3.3.7 -->
+        <link rel="stylesheet" href="<?php echo PLUGINS_SITE_ROOT; ?>/layui/css/layui.css">
+        <link rel="stylesheet" href="<?php echo ADMIN_SITE_ROOT; ?>/css/admin.css">
+        <link rel="stylesheet" href="<?php echo ADMIN_SITE_ROOT; ?>/iconfont/iconfont.css">
+        <script src="<?php echo PLUGINS_SITE_ROOT; ?>/jquery-2.1.4.min.js"></script>
+        <script src="<?php echo ADMIN_SITE_ROOT; ?>/js/admin.js"></script>
+        <script type="text/javascript" src="<?php echo PLUGINS_SITE_ROOT; ?>/layui/layui.js"></script>
+        <script type="text/javascript">
+            var BASESITEROOT = "<?php echo BASE_SITE_ROOT; ?>";
+            var ADMINSITEROOT = "<?php echo ADMIN_SITE_ROOT; ?>";
+            var BASESITEURL = "<?php echo BASE_SITE_URL; ?>";
+            var HOMESITEURL = "<?php echo HOME_SITE_URL; ?>";
+            var ADMINSITEURL = "<?php echo ADMIN_SITE_URL; ?>";
+            layui.use('layer', function () {
+                var layer = layui.layer;
+            });
+        </script>
+    </head>
+    <body>
+        
+<form class="layui-form" method="post" enctype="multipart/form-data" >
+    <div class="layui-tab layui-tab-card">
+        <?php if($admin_item): ?>
+<ul class="layui-tab-title">
+    <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): if(array_intersect(explode(" ",str_replace("/", ".",substr($item['url'],7,-5))),$allpower) || array_intersect(explode(" ",str_replace("/", ".",substr($item['url'],31,-16))),$allpower)): ?>
+    <li <?php if($item['name'] == $curitem): ?>class="layui-this" <?php endif; ?>>
+    <a href="<?php echo $item['url']; ?>"><?php echo $item['text']; ?></a>
+    <?php endif; ?>
+    </li>
+    <?php endforeach; endif; else: echo "" ;endif; ?>
+    <div class="tool-btns">
+        <a href="javascript:location.reload();" title="刷新当前页面" class="iconfont icon-reload"></i></a>
+    </div>
+</ul>
+<?php endif; ?>
+        <div class="layui-tab-content page-tab-content">
+            <div class="layui-tab-item layui-show ">
+
+                <div class="layui-collapse">
+                    <div class="layui-colla-item">
+                        <h2 class="layui-colla-title">基本设置</h2>
+                        <div class="layui-colla-content layui-show">
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">开发服务名称</label>
+                                <div class="layui-input-inline">
+                                    <input type="text" class="layui-input field-name" name="name" id="name" value="<?php echo (isset($server['name']) && ($server['name'] !== '')?$server['name']:''); ?>" lay-verify="name" autocomplete="off" placeholder="<?php echo \think\Lang::get('ds_please_enter'); ?>开发服务名称" required />
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">图片</label>
+                                <div class="layui-input-inline">
+                                    <input type="file" name="image" />
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">排序</label>
+                                <div class="layui-input-inline">
+                                    <input type="text" class="layui-input field-name" name="sort" id="sort" value="<?php echo (isset($server['sort']) && ($server['sort'] !== '')?$server['sort']:''); ?>" lay-verify="sort" autocomplete="off" placeholder="<?php echo \think\Lang::get('ds_please_enter'); ?>排序" required />
+                                </div>
+                            </div>
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">详情</label>
+                                <div class="layui-input-inline">
+                                    <input type="text" class="layui-input field-name" name="detail" id="detail" value="<?php echo (isset($server['detail']) && ($server['detail'] !== '')?$server['detail']:''); ?>" lay-verify="detail" autocomplete="off" placeholder="<?php echo \think\Lang::get('ds_please_enter'); ?>详情" required />
+                                </div>
+                            </div>
+
+                            <div class="layui-form-item">
+                                <label class="layui-form-label">状态</label>
+                                <div class="layui-input-inline">
+                                    <input type="checkbox" name="status" lay-skin="switch" lay-text="<?php echo \think\Lang::get('ds_yes'); ?>|<?php echo \think\Lang::get('ds_no'); ?>" value="1" <?php if($server['status'] == '1'): ?>checked<?php endif; ?>>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+
+                <div class="layui-form-item mt20">
+                    <div class="layui-input-inline">
+                        <input type="submit" class="layui-btn layui-btn-normal" lay-submit value="<?php echo lang('ds_submit'); ?>" />
+                        <a class="layui-btn layui-btn-sm lay-btn-diy" href="javascript:history.go(-1)" style="background-color:#1E9FFF;height: 38px;line-height: 38px;padding: 0 18px;">返回</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</form>
+<script>
+    layui.use('form', function () {
+        var form = layui.form;
+    });
+    layui.use('element', function () {
+        var element = layui.element;
+    });
+    layui.use('laydate', function(){
+        var laydate = layui.laydate;
+        laydate.render({
+            elem: '#product_addtime'
+        });
+    });
+
+    function add_uploadedfile(file_data)
+    {
+        var newImg = '<li id="' + file_data.file_id + '"><img src="' + file_data.file_url + '"/><i class="delect layui-icon" title="插入编辑器" onclick="insert_editor(\''+file_data.file_url+'\')">&#xe654;</i><i class="insert layui-icon" title="删除图片" onclick="del_productpic(' + file_data.file_id + ')">&#xe640;</i></li>'
+        $('.selected_pic ul').prepend(newImg);
+    }
+
+
+    /**
+     * 插入编辑器
+     */
+    function insert_editor(file_path){
+        ue.execCommand('insertimage', {src:file_path});
+    }
+
+    function del_productpic(file_id)
+    {
+        layer.open({
+            content: '<?php echo \think\Lang::get('ds_confirm_cancel'); ?>',
+            yes: function(index, layero){
+                $.getJSON("<?php echo url('pic/del'); ?>",{file_id: + file_id,pic_type:'product'}, function(result){
+                    if(result){
+                        $('#' + file_id).remove();
+                        layer.msg('<?php echo \think\Lang::get('del_succ'); ?>');
+                        layer.close(index);
+                        return;
+                    }else{
+                        layer.msg('<?php echo \think\Lang::get('del_fail'); ?>');
+                        layer.close(index);
+                        return;
+                    }
+                });
+            }
+        });
+    }
+</script>
+<script type="text/javascript">
+    $("input#image").change(function () {
+        //console.log($(this).val());
+        if($(this).val() !=''){
+            $("form#upForm").ajaxSubmit({
+                url:"imgUp.php",
+                type:"post",
+                dataType:"json",
+                data:$(this).serialize(),
+                success:function (backData) {
+                    var $path=backData.uploaded_path;
+                    //console.log(backData);
+                    $("div.imgUp").css("backgroundImage","url("+$path+")");
+
+                },
+                error:function (e) {
+                    console.log(e);
+                }
+            })
+        }
+    })
+</script>
+
+    </body>
+</html>
+
+
+

+ 49 - 0
thinkphp/tpl/dispatch_jump - 副本.tpl

@@ -0,0 +1,49 @@
+{__NOLAYOUT__}<!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,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <title>跳转提示</title>
+    <style type="text/css">
+        *{ padding: 0; margin: 0; }
+        body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
+        .system-message{ padding: 24px 48px; }
+        .system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 12px; }
+        .system-message .jump{ padding-top: 10px; }
+        .system-message .jump a{ color: #333; }
+        .system-message .success,.system-message .error{ line-height: 1.8em; font-size: 36px; }
+        .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
+    </style>
+</head>
+<body>
+    <div class="system-message">
+        <?php switch ($code) {?>
+            <?php case 1:?>
+            <h1>:)</h1>
+            <p class="success"><?php echo(strip_tags($msg));?></p>
+            <?php break;?>
+            <?php case 0:?>
+            <h1>:(</h1>
+            <p class="error"><?php echo(strip_tags($msg));?></p>
+            <?php break;?>
+        <?php } ?>
+        <p class="detail"></p>
+        <p class="jump">
+            页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间: <b id="wait"><?php echo($wait);?></b>
+        </p>
+    </div>
+    <script type="text/javascript">
+        (function(){
+            var wait = document.getElementById('wait'),
+                href = document.getElementById('href').href;
+            var interval = setInterval(function(){
+                var time = --wait.innerHTML;
+                if(time <= 0) {
+                    location.href = href;
+                    clearInterval(interval);
+                };
+            }, 1000);
+        })();
+    </script>
+</body>
+</html>

+ 53 - 35
thinkphp/tpl/dispatch_jump.tpl

@@ -1,49 +1,67 @@
 {__NOLAYOUT__}<!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 name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
     <title>跳转提示</title>
+    <?php if(isMobile()==true){?>
     <style type="text/css">
-        *{ padding: 0; margin: 0; }
-        body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
-        .system-message{ padding: 24px 48px; }
-        .system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 12px; }
-        .system-message .jump{ padding-top: 10px; }
-        .system-message .jump a{ color: #333; }
-        .system-message .success,.system-message .error{ line-height: 1.8em; font-size: 36px; }
-        .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
+    body, h1, h2, p,dl,dd,dt{margin: 0;padding: 0;font: 15px/1.5 微软雅黑,tahoma,arial;}
+    body{background:#efefef;}
+    h1, h2, h3, h4, h5, h6 {font-size: 100%;cursor:default;}
+    ul, ol {list-style: none outside none;}
+    a {text-decoration: none;color:#447BC4}
+    a:hover {text-decoration: underline;}
+    .ip-attack{width:100%; margin:200px auto 0;}
+    .ip-attack dl{ background:#fff; padding:30px; border-radius:10px;border: 1px solid #CDCDCD;-webkit-box-shadow: 0 0 8px #CDCDCD;-moz-box-shadow: 0 0 8px #cdcdcd;box-shadow: 0 0 8px #CDCDCD;}
+        .ip-attack dt{text-align:center;}
+        .ip-attack dd{font-size:16px; color:#333; text-align:center;}
+        .tips{text-align:center; font-size:14px; line-height:50px; color:#999;}
     </style>
+    <?php }else{ ?>
+    <style type="text/css">
+        body, h1, h2, p,dl,dd,dt{margin: 0;padding: 0;font: 12px/1.5 微软雅黑,tahoma,arial;}
+        body{background:#efefef;}
+        h1, h2, h3, h4, h5, h6 {font-size: 100%;cursor:default;}
+        ul, ol {list-style: none outside none;}
+        a {text-decoration: none;color:#447BC4}
+        a:hover {text-decoration: underline;}
+        .ip-attack{width:400px; margin:150px auto 0;}
+        .ip-attack dl{ background:#fff; padding:30px; border-radius:5px;border: 1px solid #CDCDCD;-webkit-box-shadow: 0 0 8px #CDCDCD;-moz-box-shadow: 0 0 8px #cdcdcd;box-shadow: 0 0 8px #CDCDCD;}
+        .ip-attack dt{text-align:center;}
+        .ip-attack dd{font-size:16px; color:#333; text-align:center;}
+        .tips{text-align:center; font-size:14px; line-height:50px; color:#999;}
+    </style>
+    <?php }?>
+
 </head>
 <body>
-    <div class="system-message">
+<div class="ip-attack"><dl>
         <?php switch ($code) {?>
-            <?php case 1:?>
-            <h1>:)</h1>
-            <p class="success"><?php echo(strip_tags($msg));?></p>
-            <?php break;?>
-            <?php case 0:?>
-            <h1>:(</h1>
-            <p class="error"><?php echo(strip_tags($msg));?></p>
-            <?php break;?>
+        <?php case 1:?>
+        <dt style="color: green"><?php echo(strip_tags($msg));?></dt>
+        <?php break;?>
+        <?php case 0:?>
+        <dt style="color: red"><?php echo(strip_tags($msg));?></dt>
+        <?php break;?>
         <?php } ?>
-        <p class="detail"></p>
-        <p class="jump">
+        <br>
+        <dt>
             页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间: <b id="wait"><?php echo($wait);?></b>
-        </p>
-    </div>
-    <script type="text/javascript">
-        (function(){
-            var wait = document.getElementById('wait'),
+        </dt></dl>
+</div>
+<script type="text/javascript">
+    (function(){
+        var wait = document.getElementById('wait'),
                 href = document.getElementById('href').href;
-            var interval = setInterval(function(){
-                var time = --wait.innerHTML;
-                if(time <= 0) {
-                    location.href = href;
-                    clearInterval(interval);
-                };
-            }, 1000);
-        })();
-    </script>
+        var interval = setInterval(function(){
+            var time = --wait.innerHTML;
+            if(time <= 0) {
+                location.href = href;
+                clearInterval(interval);
+            };
+        }, 1000);
+    })();
+</script>
 </body>
-</html>
+</html>