<!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">
<title>{echo: lp{m_u_center};/}</title>

<link rel="stylesheet" type="text/css" href="skin/{echo: $SYSINFO['templates'];/}/css/style.css">
<script type="text/javascript" src="skin/{echo: $SYSINFO['templates'];/}/js/changeStyle.js"></script>
<script type="text/javascript" src="skin/{echo: $SYSINFO['templates'];/}/js/userchangeStyle.js"></script>

<script type="text/javascript" src="servtools/jquery-1.3.2.min.js?v=1.3.2"></script>
<script type="text/javascript" src="servtools/xheditor/xheditor.min.js?v=1.0.0-final"></script>

<script type="text/javascript" src="servtools/swfupload/swfupload.js"></script>
<script type="text/javascript" src="servtools/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="servtools/swfupload/fileprogress.js"></script>
<script type="text/javascript" src="servtools/swfupload/handlers.js"></script>
<script type="text/javascript">
		var swfu;

	 function winload() {
			var settings = {
				flash_url : "servtools/swfupload/swfupload.swf",
				upload_url: "swfupload.php",
				post_params: {"ps" : "<?php echo session_id(); ?>","gcv":"{echo: get_session('goodsvercode');/}"},
				file_size_limit : "1 MB",
				file_types : "*.jpg;*.jpge;*.png;*.gif",
				file_types_description : "images Files",
				file_upload_limit : 30,
				file_queue_limit : 30,
				file_post_name:"Filedata[]",
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel"
				},
				debug: false,

				
				button_image_url: "servtools/swfupload/images/TestImageNoText_65x29.png",
				button_width: "65",
				button_height: "29",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_text: '<span class="theFont">上传图片</span>',
				button_text_style: ".theFont { font-size: 12; }",
				button_text_left_padding: 5,
				button_text_top_padding: 3,
				button_window_mode : SWFUpload.WINDOW_MODE.OPAQUE,
				button_cursor : SWFUpload.CURSOR.HAND,
				
				
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadGoodsSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
	     };
		  if (document.all){
			window.attachEvent('onload',winload)//IE中
			}
		else{
			window.addEventListener('load',winload,false);//firefox
			}
</script>
<script type="text/javascript">
var introeditor;
$(function(){
	introeditor=$("#protect_content").xheditor({skin:'vista',tools:"Cut,Copy,Paste,Pastetext,Separator,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Separator,Align,List,Outdent,Indent,Separator,Link,Unlink,Img,Table,Separator,Fullscreen,About"});

});
function checkeck(){
	var protect_content1 = $.trim($("#protect_content").val());
	if(protect_content1==""){
		alert("维权内容不能为空！");
		return false;
	}
}
function introimage(id,imagepath){
	var imagestr="<li id='imgli'><p class='photo'><img src="+imagepath+" width='100' height='100' /></p><p><a href='javascript:;'  onclick='return addIntroImg(this)' >插入</a><a href='javascript:;' name='"+id+"' onclick='return delIntroImg(this)'>删除</a></p></li>";
	$("#introimage").append(imagestr);

}
function delIntroImg(obj){
	if(!confirm('你真的要删除这张图片吗?')){
       return;
		}
	var path=$(obj).parent().parent().children(".photo").children("img").attr("src");
	var iid=$(obj).attr('name');
    var param={
          iid:iid,
          path:path
    	  };
    $.post("do.php?act=del_goodsImage",param,function(data){
        if(data=='1'){
          		$(obj).parent().parent().remove();
             }else{
                alert('删除失败');
              }
        });
}
function addIntroImg(obj){
    var li=$(obj).parent().parent().children(".photo").children("img").attr("src");
    var str=li.substring(li.indexOf("uploadfiles"));
	introeditor.appendHTML("<img src="+str+"/>");
	return false;
}
</script>
<style type="text/css">
.list .master{
	background-color:#FFEFE8}
.list .ttls{
	font-weight:bolder;
	border-bottom:2px solid #FF6600}
.list .txt{
	padding:5px 0  0 15px}	
.list .master,.list .customer{
	padding:10px 15px}	
</style>
</head>
<body onload="menu_style_change('user_my_order');changeMenu();">
{inc: require("shop/index_header.php");/}
<div class="site_map"> {echo:lp{m_current_position};/}<A href="index.php">{echo:$SYSINFO['sys_name'];/}</A>/<a href="modules.php">{echo:lp{m_u_center};/}</a>/&nbsp;&nbsp;维权信息 </div>
<div class="clear"></div>
{inc: require("modules/left_menu.php");/}
<div class="main_right">
	<div class="right_top"></div>
	<div class="cont">
		<div ><h3 class="cont_title">维权信息</h3></div>
   <hr />
		<form action="do.php?act=user_protect_rights&id={echo:$order_id;/}" method="post" onsubmit="return checkeck();">
		<table class="form_table_02">
			<tr>
				<th width="12%">维权项目:</th>
				<td>
					<select name="protect_item">
						<option value='1'>退货</option>
					</select>
				</td>
			</tr>
			<tr>
				<th>维权内容:</th>
				<td>
				<textarea id="protect_content" name="protect_content"  cols="70" rows="15" ></textarea>
					<div id="img_select2" style="width:600px;">
			            <div id="img_list2" class="imgPan">
							<ul id="introimage" class="clearfix">
							</ul>
			            </div>
					</div>
			
					<div id="fsUploadProgress"></div>
					<div id="divStatus"></div>
					<div>
						<span id="spanButtonPlaceHolder"></span>
						<input id="btnCancel" type="button" value="取消" onclick="swfu.cancelQueue();" disabled="disabled" style="display:none" />
					</div>
					<span >按ctrl键选择多个文件</span>
				</td>
			</tr>
			<tr>
		        <td ><input type="submit" value="{echo: lp{m_send};/}"/></td>
				<td>
				{sta:if($is_allow_service) [exc]}
					<input type="submit" value="{echo: lp{m_ask_service};/}" name="ask_service" />
				{end:if/}
				</td>
				
		    </tr>
		</table>
	</form>
	
	<ul class="list">
		{sta:if(!empty($result)) {
			foreach($result as $v) [loop]}
			<li {sta:if($v['user_type']==0) [exc]} class="customer" {sta:} else [exc]} class="master" {end:if/}>
				<p class="ttls">
					 {sta:if($v['user_type']==0) [exc]}
				我
			{sta:} else [exc]}
				商家
			{end:if/}
				于 {echo:$v['protect_date'];/}
				 {sta:if($v['status']==1) [exc]}
				 <font color="red">同意你的维权</font>并且
				 {end:if/}
				说：
				</p>
				<p class="txt">{echo:$v['content'];/}</p>
			</li>
		 {end:foreach/}
          {sta:} else [exc]}
		  <li class="customer"><p class="txt">{echo: lp{m_nolist_record};/}</p></li>
		{end:if/}
	 </ul>	

	</div>
</div>
<div class="clear"></div>
{inc: require("shop/index_footer.php");/}

</body>
</html>