{include file="templates/html_header.html"}
		<!-- /section:basics/navbar.layout -->
		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
			{literal}
				try{ace.settings.loadState('main-container')}catch(e){}
			{/literal}
			</script>
			<!-- #section:basics/sidebar -->
			{include file="templates/html_sidebar.html"}
			<!-- /section:basics/sidebar -->
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="index.php">首页</a>
							</li>

							<li class="active">{$title}</li>
						</ul><!-- /.breadcrumb -->
						<!-- /section:basics/content.searchbox -->
					</div>

					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
					<h3 class="header smaller lighter blue">
						{$title}
						<small>配置一个摇一摇主题</small>
					</h3>
						<div class="row">
							<div class="col-xs-12">
                                    {$diyad}
                                <!-- PAGE CONTENT BEGINS -->
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <form method="post" action="doshakethemes.php?action=themename" role="form" id="themename">
                                                <div class="form-group" >
                                                    <div class="input-group col-sm-6" >
                                                        <label class="input-group-addon">主题名称</label>
                                                        <input name="themename" class="form-control" type="text"/>
                                                        <span class="input-group-btn">
                                                        <button type="button" class="btn btn-sm btn-primary btn-themename">保存</button>
                                                        </span>
                                                    </div>
                                                    <div class="hr hr-12 dotted"></div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <form method="post" action="doshakethemes.php?action=horizontal" role="form" id="sethorizontal">
                                                <div class="form-group" >
                                                    <div class="col-sm-6">
                                                        <label class="col-sm-2" style="font-weight: 700;">显示方向</label>
                                                        <label class="radio-inline">
                                                          <input type="radio" class="ace input-lg" name="ishorizontal" value="1"> <span class="lbl bigger-120">横向</span>
                                                        </label>
                                                        <label class="radio-inline">
                                                          <input type="radio" class="ace input-lg" name="ishorizontal" value="2"> <span class="lbl bigger-120">纵向</span>
                                                        </label>
                                                    </div>
                                                    
                                                </div>
                                            </form>
                                             
                                        </div>
                                        <div class="col-xs-12">
                                            <div class="hr hr-12 dotted"></div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
											<form method="post" action="doshakethemes.php?action=tips" role="form" id="settips">
												<div class="form-group" >
													<label style="font-weight: 700;">顶部提示文字</label>
													<div class="col-sm-12">
														<textarea  class="form-control" name="tips" rows="5"></textarea>
														<div class="hr hr-12 dotted"></div>
														<button type="button" class="btn btn-sm btn-primary btn-settips">保存</button>
													</div>
												</div>
											</form>
										</div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <h1>摇一摇背景</h1>
                                            <div class="hr hr-12 dotted"></div>
                                        </div>
                                        <div class="col-xs-12">
                                            <div  class="bg-uploader">
                                                <!--用来存放文件信息-->
                                                <div  class="uploader-list">
                                                    <div  class="item">
                                                        <!-- {if $item['bgtype']==1}
                                                        <img src="" style="max-width: 200px;max-height:150px;"/>
                                                        {else}
                                                        <span>不能预览</span>
                                                        {/if} -->
                                                        <h4 class="info"></h4>
                                                        <p class="state"></p>
                                                    </div>
                                                </div>
                                                <div class="btns">
                                                    <div id="setbg" class="selectfile">选择文件</div>
                                                    <input type="hidden" name="bg" value=""/>
                                                    <button  class="btn btn-default upload-btn">开始上传</button>
                                                    <button  class="btn btn-default reset-btn">重置</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
									<div class="row">
                                        <div class="col-xs-12">
                                            <h1>游戏人物</h1>
                                            <div class="hr hr-12 dotted"></div>
                                        </div>
                                        <div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物1</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_1"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_1">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物2</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_2"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_2">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物3</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_3"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_3">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物4</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_4"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_4">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物5</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_5"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_5">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物6</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_6"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_6">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物7</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_7"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_7">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物8</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_8"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_8">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物9</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_9"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_9">保存</button>
                                                    </div>
                                                </div>
                                            </form>
										</div>
										<div class="col-xs-6 col-lg-4">
                                            <form method="post" action="doshakethemes.php?action=avatar" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">人物10</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="avatar_10"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-avatar" data="avatar_10">保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-xs-12">
                                            <h1>其他图片素材</h1>
                                            <div class="hr hr-12 dotted"></div>
                                        </div>
                                        <div class="col-xs-6 col-lg-4">
                                            <form id="startlineform" method="post" action="doshakethemes.php?action=startline" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">起点线</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="startline"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-startline" >保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        <div class="col-xs-6 col-lg-4">
                                            <form id="endlineform" method="post" action="doshakethemes.php?action=endline" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">终点线</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="endline"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-endline" >保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        <div  class="col-xs-6 col-lg-4">
                                            <form id="trackoddform" method="post" action="doshakethemes.php?action=trackodd" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">跑道奇数</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="trackodd"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-trackodd">保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        <div class="col-xs-6 col-lg-4">
                                            <form id="trackevenform" method="post" action="doshakethemes.php?action=trackeven" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">跑道偶数</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="trackeven"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-trackeven" >保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <h1>手机端图片素材</h1>
                                            <div class="hr hr-12 dotted"></div>
                                        </div>
                                        <div class="col-xs-6 col-lg-4">
                                            <form id="mobileimgform" method="post" action="doshakethemes.php?action=mobileimg" role="form" enctype="multipart/form-data">
                                                <div class="form-group" >
                                                    <label style="font-weight: 700;">手机图</label>
                                                    <div class="col-sm-12">
                                                        <input multiple="" type="file"  class="imageuploader" name="mobileimg"/>
                                                        <div class="hr hr-12 dotted"></div>
                                                        <button type="button" class="btn btn-sm btn-primary btn-save-mobileimg" >保存</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->
{include file="templates/html_footercontent.html"}
<script type="text/javascript" src="assets/js/jquery.form.js"></script>
<!-- 写每个页面自定的js -->
<!--引入CSS-->
<link rel="stylesheet" type="text/css" href="assets/webuploader-0.1.5/webuploader.css">
<!--引入JS-->
<script type="text/javascript" src="assets/webuploader-0.1.5/webuploader.js"></script>
<script type="text/javascript">
var THEMEDATA={$themeinfo};
{literal}
$(function(){
    var id=0;
    if(THEMEDATA.id!=undefined){
        id=THEMEDATA.id;
    }
    var uploader=[];
    var thumbnailWidth=100;
    var thumbnailHeight=100;
    $('.bg-uploader').each(function(i){
        var self=$(this);
        uploader[i]=WebUploader.create({
            swf:'assets/webuploader-0.1.5/Uploader.swf',
            server:'doshakethemes.php?action=bg',
            pick:'#'+self.find('.selectfile').attr('id'),
            resize: false,
            fileNumLimit:1,
            formData:{"bg":self.find('input[name=bg]').val(),"themeid":id},
            duplicate:true,
            accept:{
                mimeTypes:'image/jpg,image/jpeg,image/png,video/mp4',
            }
        });
        uploader[i].on( 'fileQueued', function( file ) {
            var li=$('<div id="' + file.id + '" class="item">' +
                '<img/>'+
                '<h4 class="info">' + file.name + '</h4>' +
                '<p class="state">等待上传...</p>' +'</div>');
            var img=li.find('img');
            self.find('.uploader-list').append(li);
            this.makeThumb(file,function(error,src){
                if ( error ) {
                    img.replaceWith('<span>不能预览</span>');
                    return;
                }
                img.attr( 'src', src );
                img.css({'max-width':'300px','width':'300px'});
            },thumbnailWidth, thumbnailHeight);
        });
        //加入队列前 先清空队列中的内容
        uploader[i].on('beforeFileQueued',function(file){
            this.reset();
            self.find('.uploader-list').html('');
        });
        uploader[i].on('uploadSuccess',function(file){
            self.find('.state').html('上传完成');
            alert('上传完成');
        });
        self.find('.upload-btn').on('click',function(){
            uploader[i].upload();
        });
    });

    
    if(THEMEDATA.themedata!=undefined && THEMEDATA.themedata.bg>0){
        var point = THEMEDATA.themedata.bg_path.lastIndexOf("."); 
        var type = THEMEDATA.themedata.bg_path.substr(point); 
        var html='';
        if(type=='.mp4'){
            html='<video src="'+THEMEDATA.themedata.bg_path+'" style="object-fit:fill;width:300px;height:auto;" autoplay="autoplay" autobuffer autoloop loop controls="controls"  ></video>';
        }else{
            html='<img src="'+THEMEDATA.themedata.bg_path+'" style="max-width:300px;"/>';
        }
        
        $(html).prependTo('.uploader-list .item');
        
    }
    
    $('.reset-btn').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $.ajax({
            "url":"doshakethemes.php?action=bg",
            "data":{"themeid":id},
            "type":'post',
            "dataType":"json",
            "success":function(json){
                if(json.code>0){
                    $('.uploader-list .item img').remove();
                }
            }
        })
        
    });
    // $('.uploader-list .item').
})
$(function(){
    $('.imageuploader').ace_file_input({
        style: 'well',
        btn_choose: '点击此处选择图片',
        btn_change: null,
        no_icon: 'ace-icon fa fa-cloud-upload',
        droppable: true,
        maxSize: 550000,
        allowExt: ["jpeg", "jpg", "png", "gif"],
        allowMime: ["image/jpg", "image/jpeg", "image/png", "image/gif"],
        thumbnail: 'large',//large | fit
        previewHeight:200,
        preview_error : function(filename, error_code) {
        }

    }).on('change', function(){
    });
    initpage();
    $('.btn-themename').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#themename').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                if(json.code>0){
                    THEMEDATA=json.data;
                }
                alert(json.msg);
            }
        });
    })
    $('input[name=ishorizontal]').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#sethorizontal').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                if(json.code>0){
                    THEMEDATA=json.data;
                }
                alert(json.msg);
            }
        });
    });
	$('.btn-settips').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
		$('#settips').ajaxSubmit({
            "data":{"id":id},
			"dataType":"json",
			"success":function(json){
                alert(json.msg);
			}
		});
	});
    //保存
    $('.btn-save-avatar').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        var form=$(this).parent().parent().parent();
        var avatar_index=$(this).attr('data');
        $(form).ajaxSubmit({
            "data":{"id":id,'avatar_index':avatar_index},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });

	$('.btn-save-startline').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#startlineform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });

    });
    $('.btn-save-endline').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#endlineform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });
    $('.btn-save-trackodd').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#trackoddform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });
    $('.btn-save-trackeven').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#trackevenform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });

    $('.btn-save-bg').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#bgform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });
    $('.btn-save-mobileimg').on('click',function(){
        var id=0;
        if(THEMEDATA.id!=undefined){
            id=THEMEDATA.id;
        }
        $('#mobileimgform').ajaxSubmit({
            "data":{"id":id},
            "dataType":"json",
            "success":function(json){
                alert(json.msg);
            }
        });
    });
});
function initpage(){
    //标题
    if(THEMEDATA.themename!=undefined){
        $('input[name=themename]').val(THEMEDATA.themename);
    }
    //显示方向
    if(THEMEDATA.themedata!=undefined && THEMEDATA.themedata.ishorizontal!=undefined){
        var ishorizontal_radio=$('input[name=ishorizontal]');
        for(var i=0,l=ishorizontal_radio.length ;i<l;i++){
            if($(ishorizontal_radio[i]).val()==THEMEDATA.themedata.ishorizontal){
                $(ishorizontal_radio[i]).attr('checked',true);
            }
        }
    }else{
        $($('input[name=ishorizontal]')[0]).attr('checked',true);
    }
    if(THEMEDATA.themedata==undefined){
        return false;
    }
    //游戏顶部的提示
    if( THEMEDATA.themedata.tips!=undefined){
        var tips='';
        for(var i=0,l=THEMEDATA.themedata.tips.length;i<l;i++){
            tips+=THEMEDATA.themedata.tips[i]+"\n";
        }
        $('textarea[name=tips]').val(tips);
    }
    //设置头像
    for(var i=0,l=10;i<l;i++){
        var index=i+1;
        if(THEMEDATA.themedata['avatar_'+index]!=undefined){
            var path=THEMEDATA.themedata['avatar_'+index]>0?'/imageproxy.php?id='+THEMEDATA.themedata['avatar_'+index]:THEMEDATA.themedata['avatar_'+index+'_path'];
            $('input[name=avatar_'+index+']').ace_file_input('show_file_list', [
                {type: 'image', name: '', path:path},
            ]);
        }
    }
    if(THEMEDATA.themedata['startline']!=undefined){
        var path=THEMEDATA.themedata['startline']>0?'/imageproxy.php?id='+THEMEDATA.themedata['startline']:THEMEDATA.themedata['startline_path'];
        $('input[name=startline]').ace_file_input('show_file_list', [
            {type: 'image', name: '', path:path},
        ]);
    }
    if(THEMEDATA.themedata['endline']!=undefined){
        var path=THEMEDATA.themedata['endline']>0?'/imageproxy.php?id='+THEMEDATA.themedata['endline']:THEMEDATA.themedata['endline_path'];
        $('input[name=endline]').ace_file_input('show_file_list', [
            {type: 'image', name: '', path:path},
        ]);
    }
    if(THEMEDATA.themedata['trackodd']!=undefined){
        var path=THEMEDATA.themedata['trackodd']>0?'/imageproxy.php?id='+THEMEDATA.themedata['trackodd']:THEMEDATA.themedata['trackodd_path'];
        $('input[name=trackodd]').ace_file_input('show_file_list', [
            {type: 'image', name: '', path:path},
        ]);
    }
    if(THEMEDATA.themedata['trackeven']!=undefined){
        var path=THEMEDATA.themedata['trackeven']>0?'/imageproxy.php?id='+THEMEDATA.themedata['trackeven']:THEMEDATA.themedata['trackeven_path'];
        $('input[name=trackeven]').ace_file_input('show_file_list', [
            {type: 'image', name: '', path:path},
        ]);
    }
    if(THEMEDATA.themedata['mobileimg']!=undefined){
        var path=THEMEDATA.themedata['mobileimg']>0?'/imageproxy.php?id='+THEMEDATA.themedata['mobileimg']:THEMEDATA.themedata['mobileimg_path'];
        $('input[name=mobileimg]').ace_file_input('show_file_list', [
            {type: 'image', name: '', path:path},
        ]);
    }
}
{/literal}
</script>
{include file="templates/html_footer.html"}