|
@@ -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+'\')"></i><i class="insert layui-icon" title="删除图片" onclick="del_productpic(' + file_data.file_id + ')"></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>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|