123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802 |
- <?php /* Smarty version Smarty-3.1.7, created on 2016-12-20 18:11:06
- compiled from "D:/phpStudy/WWW_krpano100/template\default\member\project.lbi" */ ?>
- <?php /*%%SmartyHeaderCode:11522585903ba6098a2-78607873%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
- $_valid = $_smarty_tpl->decodeProperties(array (
- 'file_dependency' =>
- array (
- 'ee31cf41f6c34566dede3e407b4a465457b7de77' =>
- array (
- 0 => 'D:/phpStudy/WWW_krpano100/template\\default\\member\\project.lbi',
- 1 => 1482227915,
- 2 => 'file',
- ),
- ),
- 'nocache_hash' => '11522585903ba6098a2-78607873',
- 'function' =>
- array (
- ),
- 'variables' =>
- array (
- '_lang' => 0,
- 'act' => 0,
- 'total' => 0,
- 'atlas' => 0,
- 'v' => 0,
- ),
- 'has_nocache_code' => false,
- 'version' => 'Smarty-3.1.7',
- 'unifunc' => 'content_585903ba818ea',
- ),false); /*/%%SmartyHeaderCode%%*/?>
- <?php if ($_valid && !is_callable('content_585903ba818ea')) {function content_585903ba818ea($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate (($_smarty_tpl->tpl_vars['_lang']->value['moban'])."/library/member_paths.lbi", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
- <div class="container" style="margin-bottom: 20px;">
- <?php if ($_smarty_tpl->tpl_vars['act']->value=='list'){?>
- <style>
- .table td{
- line-height: 40px;
- }
- </style>
- <div class="main_wrap" id="pic_wrap">
- <div class="row">
- <div class="col-md-3">
- 共 <strong style="font-size:18px;"><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
- </strong> 个作品
- </div>
- <div class="col-md-3">
- <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
- <input class="form-control" size="16" id="time_s" type="text" value="" readonly="" placeholder="开始时间" >
- <span class="input-group-addon"><span class="icon-remove"></span></span>
- <span class="input-group-addon"><span class="icon-calendar"></span></span>
- </div>
- </div>
- <div class="col-md-3">
- <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
- <input class="form-control" size="16" id="time_e" type="text" value="" readonly="" placeholder="结束时间" >
- <span class="input-group-addon"><span class="icon-remove"></span></span>
- <span class="input-group-addon"><span class="icon-calendar"></span></span>
- </div>
- </div>
- <div class="col-md-2">
- <input type="text" id="name" class="form-control" placeholder="作品名">
- </div>
- <div class="col-md-1">
- <button class="btn btn-info" onclick="list(1)">搜索</button>
- </div>
- </div>
- <div class="row">
- <div class="col-md-3">
- <nav class="menu" data-toggle="menu" style="width: 200px">
- <button class="btn btn-primary" data-toggle="modal" data-target="#atlas_modal"><i class="icon-plus-sign"></i> 新建图册 </button>
-
- <ul class="nav nav-primary" id="atlas_nav">
- <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
- $_from = $_smarty_tpl->tpl_vars['atlas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
- foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
- $_smarty_tpl->tpl_vars['v']->_loop = true;
- ?>
- <?php if ($_smarty_tpl->tpl_vars['v']->value['atlas_type']==0){?>
- <li class="atlas_active" data-atlasid="<?php echo $_smarty_tpl->tpl_vars['v']->value['pk_atlas_main'];?>
- "><a href="javascript:;">
- <span class="altlas_name"><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
- (<?php echo $_smarty_tpl->tpl_vars['v']->value['num'];?>
- )</span></a></li>
- <?php }else{ ?>
- <li data-atlasid="<?php echo $_smarty_tpl->tpl_vars['v']->value['pk_atlas_main'];?>
- ">
- <a href="javascript:;" style="padding-right:2px" >
- <span class="altlas_name" <?php if (mb_strlen($_smarty_tpl->tpl_vars['v']->value['name'])>10){?>title="<?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
- (<?php echo $_smarty_tpl->tpl_vars['v']->value['num'];?>
- )"<?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
- (<?php echo $_smarty_tpl->tpl_vars['v']->value['num'];?>
- )</span>
- <span class="pull-right">
- <i class="icon-edit" onclick="atlas_edit('<?php echo $_smarty_tpl->tpl_vars['v']->value['pk_atlas_main'];?>
- ','<?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
- ')"></i> <i class="icon-trash" onclick="atlas_del('<?php echo $_smarty_tpl->tpl_vars['v']->value['pk_atlas_main'];?>
- ')"></i>
- </span>
- </a>
- </li>
- <?php }?>
- <?php } ?>
- </ul>
- </nav>
- </div>
- <div class="col-md-9">
- <div class="row" style="margin-top:20px;">
- <div class="col-md-2">
- <div class="checkbox">
- <label>
- <input type="checkbox" onclick="setCheck(this,'project_checkbox')">全选
- </label>
- </div>
- </div>
- <div class="col-md-3" style="margin-left: -75px;">
- <select class="form-control" id="atlas_select">
- <option value="0">移动到其他图册</option>
- <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
- $_from = $_smarty_tpl->tpl_vars['atlas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
- foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
- $_smarty_tpl->tpl_vars['v']->_loop = true;
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['pk_atlas_main'];?>
- "><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
- </option>
- <?php } ?>
- </select>
- </div>
- </div>
- <div class="list_wrap">
- <div id="list_wrap_content"></div>
- <div id="pager_wrap"></div>
- </div>
- </div>
- </div>
- </div>
- <!--评论框-->
- <div class="main_wrap" id="comment_wrap" style="display:none">
- <div class="row">
- <div class="col-md-1">
- <strong style="font-size:18px;cursor:pointer;" class="text-primary" onclick="hidecomment()"><i class="icon-reply"></i> 返回</strong>
- </div>
- <div class="col-md-3">
- 共 <strong style="font-size:18px;" id="comment_count"></strong> 条评论
- </div>
- <div class="col-md-2 col-md-offset-5">
- <input type="text" id="content" class="form-control" placeholder="内容">
- </div>
- <div class="col-md-1 ">
- <button class="btn btn-info" onclick="list_comments(1,false)">搜索</button>
- </div>
- </div>
- <div class="row" style="margin-top:30px;">
- <div class="col-md-12">
- <table class="table table-hover">
- <thead>
- <tr>
- <th>#</th>
- <th >头像</th>
- <th>昵称</th>
- <th>内容</th>
- <th>评论时间</th>
- <th>性别</th>
- <th>省份</th>
- <th>城市</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- <div id="comment_pager_wrap" style="text-align:center"></div>
- </div>
- <!--评论框end-->
- <!--新建图册弹框-->
- <div class="modal fade" id="atlas_modal">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
- <h4 class="modal-title">新增图册</h4>
- </div>
- <div class="modal-body">
- <input type="hidden" id="atlas_id" value="0">
- <input class="form-control form-focus" autofocus type="text" placeholder="请输入名称" id="atlas_name">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" id="atlas_save">保存</button>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function(){
- list(1,true);
- })
- </script>
- <?php }elseif($_smarty_tpl->tpl_vars['act']->value=='videos'){?>
- <div class="main_wrap">
- <div class="row">
- <div class="col-md-3">
- 共 <strong style="font-size:18px;"><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
- </strong> 个作品
- </div>
- <div class="col-md-3">
- <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
- <input class="form-control" size="16" id="time_s" type="text" value="" readonly="" placeholder="开始时间" >
- <span class="input-group-addon"><span class="icon-remove"></span></span>
- <span class="input-group-addon"><span class="icon-calendar"></span></span>
- </div>
- </div>
- <div class="col-md-3">
- <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
- <input class="form-control" size="16" id="time_e" type="text" value="" readonly="" placeholder="结束时间" >
- <span class="input-group-addon"><span class="icon-remove"></span></span>
- <span class="input-group-addon"><span class="icon-calendar"></span></span>
- </div>
- </div>
- <div class="col-md-2">
- <input type="text" id="vname" class="form-control" placeholder="作品名">
- </div>
- <div class="col-md-1">
- <button class="btn btn-info" onclick="list_videos(1)">搜索</button>
- </div>
- </div>
- <div class="row" style="margin-top:30px;">
- <div class="col-md-12">
- <div class="list_wrap">
- <div id="list_wrap_content"></div>
- <div id="pager_wrap"></div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function(){
- list_videos(1);
- })
- </script>
- <?php }?>
- <!--分享框-->
- <div class="modal fade" id="fx_modal">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
- <h4 class="modal-title">手机扫描二维码分享给朋友:</h4>
- </div>
- <div class="modal-body" style="text-align:center">
- <img id="fx_img" src="" width="200" height="200">
- <div class="row" style="margin-top: 15px">
- <label class="col-md-2 control-label">作品地址</label>
- <div class="col-md-10">
- <input type="text" class="form-control" id="workslocation" name="videoname" value="">
- </div>
-
- </div>
- <div class="row" style="margin-top: 15px">
- <label class="col-md-2 control-label">嵌入到网站</label>
- <div class="col-md-10">
- <input type="text" class="form-control" id="web_site" name="web_site" frameborder="no" border="0" >
- </div>
- </div>
- <div class="row" style="margin-top: 15px">
- <label class="col-md-2 control-label">嵌入到论坛</label>
- <div class="col-md-10">
- <input type="text" class="form-control" id="forum" name="forum" frameborder="no" border="0" >
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="/static/js/jquery.zclip.min.js"></script>
- <script>
- var cdn_host = "<?php echo $_smarty_tpl->tpl_vars['_lang']->value['cdn_host'];?>
- ";
- var host = "<?php echo $_smarty_tpl->tpl_vars['_lang']->value['host'];?>
- ";
- var pageSize = 10;
- var comment_c_pid;
- $(function(){
- $(".form-date").datetimepicker({
- language: "zh-CN",
- weekStart: 1,
- todayBtn: 1,
- autoclose: 1,
- todayHighlight: 1,
- startView: 2,
- minView: 2,
- forceParse: 0,
- format: "yyyy-mm-dd"
- });
- $("#atlas_nav .altlas_name").click(function(){
- var $li = $(this).parents('li');
- if(!$li.hasClass("atlas_active")){
- $li.siblings().removeClass("atlas_active");
- $li.addClass("atlas_active");
- }
- list(1,true);
- })
- $("#atlas_save").click(function(){
- $(this).attr("disabled", true);
- var name = $.trim($("#atlas_name").val());
- if(name.length<=0||name.length>200){
- alert_notice("请输入0到200长度的名称!");
- return false;
- }
- $.post("/member/project",{
- 'act':'atlas_update',
- 'name':name,
- 'atlas_id':$("#atlas_id").val()
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- setTimeout(function(){
- window.location.reload();
- },1000);
- }else{
- alert_notice(result.msg);
- $("#atlas_modal").modal('hide');
- }
- })
- $("#atlas_save").removeAttr('disabled');
- });
- $("#atlas_select").change(function(){
- var atlas_id = $(this).val();
- if (atlas_id<=0) {
- return false;
- }
- var pids =new Array;
- $("input[name='project_checkbox']").each(function(){
- if($(this).is(':checked')){
- pids.push($(this).data("pid"));
- }
- });
- if(pids.length==0){
- alert_notice("请先勾选要移动的项目");
- return false;
- }
- $.post("/member/project",{
- "act":"move_project",
- "atlas_id":atlas_id,
- "pids":JSON.stringify(pids)
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- window.location.reload();
- }else{
- alert_notice(result.msg);
- }
- })
- });
- });
- function list(currentPage,reset){
- var obj = alert_notice("页面加载中...",'success');
- var atlas_id = $("#atlas_nav .atlas_active").data("atlasid");
- var name , time_s,time_e;
- if(!reset){
- name = $.trim($("#name").val());
- time_s = $("#time_s").val();
- time_e = $("#time_e").val();
- if(time_s!=""&&time_e==""){
- alert_notice("请选择结束时间");
- return false;
- }
- if(time_s==""&&time_e!=""){
- alert_notice("请选择开始时间");
- return false;
- }
- }else{
- $("#name").val("");
- $("#time_s").val("");
- $("#time_e").val("");
- }
- $("#list_wrap_content").html("");
- $.post("/member/project",{
- "act":"list_data",
- "pageSize":pageSize,
- "page":currentPage,
- "name":name,
- "atlas":atlas_id,
- "time_s":time_s,
- "time_e":time_e
- },function(res){
- var res = eval("("+res+")");
- var h = "",data = res.list;
- if (data.length==0) {
- h='<span style="width:100px;text-align:center;margin-left:40%;margin-top:50px;font-size:16px;display:inline-block">没有结果!</span>';
- $("#pager_wrap").html("");
- }else{
- for (var i = 0; i <data.length; i++) {
- var o = data[i];
- h+='<div class="items">'+
- '<div class="item">'+
- '<div class="item-content">'+
- '<div class=pull-left><input type="checkbox" style="margin:20px 10px 0 0" name="project_checkbox" data-pid="'+o.pk_works_main+'"></div>'+
- '<div class="pull-left">'+
- '<img src="'+o.thumb_path+'" width="60" height="60" class="img-rounded" >'+
- '</div>'+
- '<div class="pull-left works_intro" >'+
- '<a href="/tour/'+o.view_uuid+'" class="works_name" target="_blank">'+o.name+'</a>'+
- '<a href="/tour/'+o.view_uuid+'" class="works_preview" target="_blank">预览</a>'+
- '<div class="text-muted">'+
- '<span>'+o.create_time+'</span>'+
- ' '+
- '<span><i class="icon icon-thumbs-o-up"></i> '+o.praised_num+'</span> '+
- '<span><i class="icon icon-eye-open"></i> '+o.browsing_num+'</span>'+
- '</div>'+
- '</div>'+
- '<div class="pull-right works_edit">'+
- '<span><a onclick="fenxiang(\''+o.view_uuid+'\')">分享</a></span>'+
- '<span><a onclick="showcomment('+o.pk_works_main+')">说一说</a></span>'+
- '<span><a href="/edit/pic?pid='+o.pk_works_main+'">编辑</a></span>'+
- '<span><a onclick="works_del('+o.pk_works_main+')">删除</a></span>'+
- '</div>'+
- ' </div>'+
- ' </div>'+
- '</div>';
- }
- var pg = new Page('list',res.pageCount,res.currentPage);
- $("#pager_wrap").html(pg.printHtml());
- }
- $("#list_wrap_content").html(h);
- pageSize = res.pageSize;
- obj.hide();
- })
- }
- function list_comments(currentPage,reset){
- var obj = alert_notice("评论加载中...",'success');
- var content;
- if (!reset) {
- content = $("#content").val();
- }else{
- $("#content").val("");
- }
- $.post("/member/comment",{
- "act":"list",
- "pageSize":pageSize,
- "currentPage":currentPage,
- "pid":comment_c_pid,
- "content":content
- },function(res){
- var res = eval("("+res+")");
- var h = "",data = res.list;
- $("#comment_count").html(res.total);
- if (data.length==0) {
- //TODO
- }else{
- for(var i=0 ; i<data.length;i++){
- var o = data[i];
- h+='<tr>'+
- '<td><input type="checkbox" name="comment_checkbox"></td>'+
- '<td><img src="'+o.head_img+'" width="40"></td>'+
- '<td>'+o.nickname+'</td>'+
- '<td>'+o.content+'</td>'+
- '<td>'+o.add_time+'</td>'+
- '<td>'+o.sex+'</td>'+
- '<td>'+o.province+'</td>'+
- '<td>'+o.city+'</td>'+
- '<td><span class="text-danger" style="cursor:pointer" onclick="comment_del_one('+o.id+')"><i class="icon-trash"></i></span></td>'+
- '</tr>';
- }
- var pg = new Page('list_comments',res.pageCount,res.currentPage);
- $("#comment_pager_wrap").html(pg.printHtml());
- }
- $("#comment_wrap table tbody").html(h);
- pageSize = res.pageSize;
- obj.hide();
- })
- }
- function showcomment(pid){
- comment_c_pid = pid;
- list_comments(1,true);
- $("#pic_wrap").hide();
- $("#comment_wrap").show();
- }
- function hidecomment(){
- $("#pic_wrap").show();
- $("#comment_wrap").hide();
- }
- function list_videos(currentPage,reset){
- var obj = alert_notice("页面加载中...",'success');
- var vname , time_s,time_e;
- if(!reset){
- vname = $.trim($("#vname").val());
- time_s = $("#time_s").val();
- time_e = $("#time_e").val();
- if(time_s!=""&&time_e==""){
- alert_notice("请选择结束时间");
- return false;
- }
- if(time_s==""&&time_e!=""){
- alert_notice("请选择开始时间");
- return false;
- }
- }else{
- $("#vname").val("");
- $("#time_s").val("");
- $("#time_e").val("");
- }
- $("#list_wrap_content").html("");
- $.post("/member/project",{
- "act":"list_videos",
- "pageSize":pageSize,
- "page":currentPage,
- "vname":vname,
- "time_s":time_s,
- "time_e":time_e
- },function(res){
- var res = eval("("+res+")");
- var h = "",data = res.list;
- if (data.length==0) {
- h='<span style="width:100px;text-align:center;margin-left:40%;margin-top:50px;font-size:16px;display:inline-block">没有结果!</span>';
- $("#pager_wrap").html("");
- }else{
- for (var i = 0; i <data.length; i++) {
- var o = data[i];
- h+='<div class="items">'+
- '<div class="item">'+
- '<div class="item-content">'+
- '<div class=pull-left><input type="checkbox" style="margin:20px 10px 0 0" name="project_checkbox" data-pid="'+o.id+'"></div>'+
- '<div class="pull-left">'+
- '<img src="'+(o.thumb_path?o.thumb_path:"/static/images/play.png")+'" width="60" height="60" class="img-rounded" >'+
- '</div>'+
- '<div class="pull-left works_intro" >'+
- '<a href="'+cdn_host+'video/play.html?vid='+o.id+'" class="works_name" target="_blank">'+o.vname+'</a> '+
- (o.state==0?'<span class="text-warning">等待编辑</span>':
- (o.flag_publish==0?'<span class="text-danger">未发布</span>':'<span class="text-success">已发布</span>'))+
- '<a href="'+cdn_host+'video/play.html?vid='+o.id+'" class="works_preview" target="_blank">预览</a>'+
- '<div class="text-muted">'+
- '<span>'+o.create_time+'</span>'+
- ' '+
- '<span><i class="icon icon-thumbs-o-up"></i> '+o.praised_num+'</span> '+
- '<span><i class="icon icon-eye-open"></i> '+o.browsing_num+'</span>'+
- '</div>'+
- '</div>'+
- '<div class="pull-right works_edit">'+
- '<span>排序:<a id="sort_2_'+o.id+'" onclick="sort('+o.id+','+o.user_sort+',2)">'+o.user_sort+'</a></span>'+
- '<span>是否推荐:<a id="recommend_2_'+o.id+'" onclick="tuijian('+o.id+',2)" data-recommend="'+o.user_recommend+'">'+(o.user_recommend==0?"<i class=\"icon-times\"></i>":"<i class=\"icon-check\" style=\"color:#c40000\"></i>")+'</a></span>'+
- '<span><a onclick="fenxiang(\''+o.id+'\',\''+(o.cdn_host ? o.cdn_host : host)+'\')">分享</a></span>'+
- '<span><a href="/edit/video?vid='+o.id+'">编辑</a></span>'+
- '<span><a onclick="video_del('+o.id+')">删除</a></span>'+
- '</div>'+
- ' </div>'+
- ' </div>'+
- '</div>';
- }
- var pg = new Page('list_videos',res.pageCount,res.currentPage);
- $("#pager_wrap").html(pg.printHtml());
- }
- $("#list_wrap_content").html(h);
- pageSize = res.pageSize;
- obj.hide();
- })
- }
- function atlas_edit(atlas_id,name){
- $("#atlas_id").val(atlas_id);
- $("#atlas_name").val(name);
- $("#atlas_modal").modal('show');
- }
- function atlas_del(atlas_id){
- bootbox.confirm({
- message:"确定要删除一个分类吗?",
- buttons: {
- confirm: {
- label: '确认',
- className: 'btn-primary'
- },
- cancel: {
- label: '取消',
- className: 'btn-default'
- }
- },
- title:"提示:",
- callback:function(result) {
- if(result){
- alert_notice("等待执行...","success",'top',5000);
- $.post("/member/project",{
- 'act':'atlas_del',
- 'atlas_id':atlas_id
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- window.location.reload();
- }else{
- alert_notice(result.msg);
- }
- })
- }
- }
- });
- }
- function sort(id,value,type){
- bootbox.prompt({
- buttons: {
- confirm: {
- label: '确认',
- className: 'btn-primary'
- },
- cancel: {
- label: '取消',
- className: 'btn-default'
- }
- },
- value: value?value:"",
- title:"排序默认为999,越小越靠前",
- callback:function(result) {
- if (result!=null) {
- result = parseInt(result);
- if (result<1||result>999) {
- alert_notice("请输入1到999之间的值");
- return false;
- }else{
- $.post("/member/project",{
- "id":id,
- "type":type,
- "user_sort":result,
- "edit":1,
- 'act':"edit_sort_recommend"
- },function(res){
- res = eval("("+res+")");
- if (res.status==1) {
- alert_notice("修改成功","success");
- $("#sort_"+type+"_"+id).text(result);
- }else{
- alert_notice(res.msg);
- }
- })
- }
- }
- }
- })
- }
- function tuijian(id,type){
- $.post("/member/project",{
- "id":id,
- "type":type,
- "edit":2,
- 'act':"edit_sort_recommend"
- },function(res){
- res = eval("("+res+")");
- if (res.status==1) {
- alert_notice("修改成功","success");
- var html = res.recommend==0?'<i class="icon-times"></i>':'<i class="icon-check" style="color:#c40000;"></i>';
- $("#recommend_"+type+"_"+id).html(html);
- }else{
- alert_notice(res.msg);
- }
- })
- }
- function comment_del_one(oid){
- var params = new Array();
- params.push(oid);
- do_comment_del(params);
- }
- function do_comment_del(params){
- bootbox.confirm({
- message:"确定要删除该评论吗?",
- buttons: {
- confirm: {
- label: '确认',
- className: 'btn-primary'
- },
- cancel: {
- label: '取消',
- className: 'btn-default'
- }
- },
- title:"提示:",
- callback:function(result) {
- if(result){
- alert_notice("等待执行...","success",'top',5000);
- $.post("/member/comment",{
- "act":"delete",
- "params":JSON.stringify(params)
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- list_comments(1);
- }else{
- alert_notice(result.msg);
- }
- })
- }
- }
- });
- }
- function works_del(pid){
- bootbox.confirm({
- message:"确定要删除该项目吗?",
- buttons: {
- confirm: {
- label: '确认',
- className: 'btn-primary'
- },
- cancel: {
- label: '取消',
- className: 'btn-default'
- }
- },
- title:"提示:",
- callback:function(result) {
- if(result){
- alert_notice("等待执行...","success",'top',5000);
- $.post("/member/project",{
- "act":"works_del",
- "pid":pid
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- window.location.reload();
- }else{
- alert_notice(result.msg);
- }
- })
- }
- }
- });
- }
- function video_del(vid){
- bootbox.confirm({
- message:"确定要删除该项目吗?",
- buttons: {
- confirm: {
- label: '确认',
- className: 'btn-primary'
- },
- cancel: {
- label: '取消',
- className: 'btn-default'
- }
- },
- title:"提示:",
- callback:function(result) {
- if(result){
- alert_notice("等待执行...","success",'top',5000);
- $.post("/member/project",{
- "act":"video_del",
- "vid":vid
- },function(result){
- result = eval("("+result+")");
- if (result.flag) {
- alert_notice("操作成功","success");
- window.location.reload();
- }
- else{
- alert_notice(result.msg);
- }
- })
- }
- }
- });
- }
- function fenxiang(data_id,data_host){
- var text;
- var qrcode_src;
- if(data_host){
- text = data_host+"video/play.html?vid="+data_id;
- qrcode_src = "/qrcode.php?act=video&vid="+data_id;
- }
- else{
- text = host+"/tour/"+data_id;
- qrcode_src = "/qrcode.php?viewid="+data_id;
- }
- $("#fx_img").attr("src",qrcode_src);
- $("#fx_modal").modal("show");
- $("#workslocation").val(text);
- $("#web_site").val('<iframe src="' + text + '" frameborder="no" border="0" style="width: 1000px;height: 600px;" allowfullscreen="true"></iframe>');
- $("#forum").val('<iframe src="' + text + '" frameborder="no" border="0" style="width: 1000px;height: 600px;"></iframe>');
- }
- </script>
- <?php }} ?>
|