123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565 |
- <?php /* Smarty version 2.6.17, created on 2018-05-27 09:57:50
- compiled from admin/platform/list.html */ ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery-1.7.2.min.js"></script>
- <link rel="stylesheet" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.css" />
- <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.js"></script>
- <style>
- .set-nav {
- margin: 0 auto;
- }
- .set-nav-hr {
- background-color: #ddd;
- height: 1px;
- position: relative;
- }
- .form-group label {
- font-weight: 600;
- }
- .checkbox-inline, .radio-inline {
- font-weight: 400!important;
- }
- .rowlabel {
- font-weight: 300!important;
- }
- .music_play_hide {
- display:none;
- }
- </style>
- <div class="panel panel-default col-md-7">
- <div class="panel-body">
- <table class="table">
- <thead>
- <tr>
- <th>序号</th>
- <th>描述</th>
- <th>名称</th>
- <th>色值</th>
- <th>地址</th>
- <th>编辑</th>
- </tr>
- </thead>
- <tbody>
- <?php if (! $this->_tpl_vars['platformData']): ?>
- <tr><td colspan="5" align="center">暂无平台信息</td></tr>
- <?php endif; ?>
- <?php $_from = $this->_tpl_vars['platformData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['item']):
- ?>
- <tr>
- <td><?php echo $this->_tpl_vars['item']['id']; ?>
- </td>
- <td><?php echo $this->_tpl_vars['item']['desc']; ?>
- </td>
- <td><?php echo $this->_tpl_vars['item']['name']; ?>
- </td>
- <td><div style="background-color: <?php echo $this->_tpl_vars['item']['color']; ?>
- ; display: inline-block; padding: 8px;"></div></td>
- <td><?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /list/<?php echo $this->_tpl_vars['item']['url']; ?>
- </td>
- <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=Admin_Platform_index&a=PageShow&id=<?php echo $this->_tpl_vars['item']['id']; ?>
- ">编辑</a></td>
- </tr>
- <?php endforeach; endif; unset($_from); ?>
- </tbody>
- </table>
- <div class="page"><?php echo $this->_tpl_vars['page_html']; ?>
- </div>
- </div>
- </div>
- <form id="add_platform_form">
- <div class="col-md-5" style="padding-left: 30px;">
- <div class="form-group">
- <label class="control-label">添加新列表</label>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">描述</label>
- <input name="desc" type="text" class="form-control" >
- <span class="note">平台的描述信息</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">名称</label>
- <input name="name" type="text" class="form-control" >
- <span class="note">页面标题使用</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">URL短地址</label>
- <input name="url" type="text" class="form-control" >
- <span class="note">URL短地址使用</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">色值</label>
- <input name="color" type="text" class="form-control" >
- <span class="note">页面统一颜色</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">关注地址</label>
- <input name="follow_url" type="text" class="form-control" value="">
- <span class="note">导航栏“关注”链接地址</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“活动”按钮图片</label>
- <div>
- <img id="home_image_tag" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="home_image_input" name='home_img_url' type="hidden" value="">
- <input id="home_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="home_image_tag_hover" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="home_image_input_hover" name='home_img_url_hover' type="hidden" value="">
- <input id="home_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='home_img_text' value="活动">
- <span class="note">导航活动按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“关注”按钮图片</label>
- <div>
- <img id="follow_image_tag" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="follow_image_input" name='follow_img_url' type="hidden" value="">
- <input id="follow_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="follow_image_tag_hover" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="follow_image_input_hover" name='follow_img_url_hover' type="hidden" value="">
- <input id="follow_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='follow_img_text' value="关注">
- <span class="note">导航关注按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“奖品”按钮图片</label>
- <div>
- <img id="gift_image_tag" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="gift_image_input" name='gift_img_url' type="hidden" value="">
- <input id="gift_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="gift_image_tag_hover" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="gift_image_input_hover" name='gift_img_url_hover' type="hidden" value="">
- <input id="gift_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='gift_img_text' value="奖品">
- <span class="note">导航奖品按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“分享”按钮图片</label>
- <div>
- <img id="share_image_tag" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="share_image_input" name='share_img_url' type="hidden" value="">
- <input id="share_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="share_image_tag_hover" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="share_image_input_hover" name='share_img_url_hover' type="hidden" value="">
- <input id="share_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='share_img_text' value="分享">
- <span class="note">导航分享按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“招商”按钮图片</label>
- <div>
- <img id="zs_image_tag" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="zs_image_input" name='zs_img_url' type="hidden" value="">
- <input id="zs_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="zs_image_tag_hover" src="http://placehold.it/36&text=36x36" style="width:30px;" class="img-thumbnail">
- <input id="zs_image_input_hover" name='zs_img_url_hover' type="hidden" value="">
- <input id="zs_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='zs_img_text' value="<?php if ($this->_tpl_vars['platformData']['zs_img_text']): ?><?php echo $this->_tpl_vars['platformData']['zs_img_text']; ?>
- <?php else: ?>招商<?php endif; ?>">
- <br />
- <label class="control-label rowlabel">招商地址</label><input type="text" class="form-control" name='zs_img_link' value="<?php if ($this->_tpl_vars['platformData']['zs_img_link']): ?><?php echo $this->_tpl_vars['platformData']['zs_img_link']; ?>
- <?php endif; ?>">
- <span class="note">导航招商按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享图:</label>
- <div>
- <img id="weixinShare_image_tag" src="http://placehold.it/200&text=200x200" style="width:150px;" class="img-thumbnail">
- <input id="weixinShare_image_input" name='weixinShare_img_url' type="hidden" value="">
- <input id="weixinShare_image_upload" type="button" value="选择图片" >
- </div>
- <span class="note">默认微信分享的图片 JPG、PNG,200*200,小于20k</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享标题:</label>
- <input name="weixinShare_title" type="text" class="form-control" value="">
- <span class="note">少于24个字</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享内容:</label>
- <input name="weixinShare_content" type="text" class="form-control" value="">
- <span class="note">少于36个字</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">广告代码:</label>
- <textarea name="ad" class="form-control" placeholder="<?php echo $this->_tpl_vars['platformData']['ad']; ?>
- "></textarea>
- </div>
- <div>
- <a id="add_platform_btn" href="javascript:;" class="button button-primary button-small">添加新列表</a>
- </div>
- </div>
- </form>
- <script>
- KISSY.use('node, io', function (S, Node, IO) {
- var $ = S.all;
-
- $("#add_platform_btn").on('click', function () {
- var desc = $("input[name=desc]").val();
- if (!desc) {
- alert('请填写描述信息');
- return false;
- }
-
- var name = $("input[name=name]").val();
- if (!name) {
- alert('请填写名称');
- return false;
- }
-
- var url = $("input[name=url]").val();
- if (!url) {
- alert('请填短地址');
- return false;
- }
-
- var color = $("input[name=color]").val();
- if (!color) {
- alert('请填写颜色');
- return false;
- }
-
- var home_img_url = $("input[name=home_img_url]").val();
- if (!home_img_url) {
- alert('请选择“活动”按钮图片');
- return false;
- }
- var gift_img_url = $("input[name=gift_img_url]").val();
- if (!gift_img_url) {
- alert('请选择“奖品”按钮图片');
- return false;
- }
-
- var data = IO.serialize("#add_platform_form");
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Platform_index&a=PageList&a=ReqCreate'
- , data: data
- , success: function (data) {
- if (data.ok) { //ok
- var url = data.msg;
- location.href = VG.conf.url;
- } else {
- alert('操作失败,原因:'+data.msg);
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
- });
- //取色器
- $(document).ready( function() {
- $("input[name=color]").minicolors({
- defaultValue: '#FFFFFF'
- });
- });
- //home image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#home_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#home_image_input').val(data.url);
- K('#home_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#home_image_upload_hover')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#home_image_input_hover').val(data.url);
- K('#home_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //follow image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#follow_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#follow_image_input').val(data.url);
- K('#follow_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#follow_image_upload_hover')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#follow_image_input_hover').val(data.url);
- K('#follow_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //share image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#share_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#share_image_input').val(data.url);
- K('#share_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#share_image_upload_hover')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#share_image_input_hover').val(data.url);
- K('#share_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#zs_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#zs_image_input').val(data.url);
- K('#zs_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#zs_image_upload_hover')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#zs_image_input_hover').val(data.url);
- K('#zs_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //gift image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#gift_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#gift_image_input').val(data.url);
- K('#gift_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#gift_image_upload_hover')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#gift_image_input_hover').val(data.url);
- K('#gift_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //weixin share
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#weixinShare_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#weixinShare_image_input').val(data.url);
- K('#weixinShare_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- </script>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
|