<%@ Page Language="C#" Inherits="Caicai.Jingpin.UI.Plugins.Data" %>
<!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 runat="server">
<link href="css.css" rel="stylesheet" type="text/css" />
<title><%= Caicai.Framework.Utils.CAppSettings.ConfigGet("Page.SiteCopyright") %>共享资料系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="../style.css" rel="stylesheet" rev="stylesheet" media="all" />
<meta name="author" content="guqiu.com" />
<meta name="keywords" content="谷秋精品课程系统,精品课程,谷秋精品课程,精品课程软件,谷秋精品工具" />
<meta name="description" content="谷秋精品课程系统网站由《谷秋精品课程软件》生成，谷秋精品课程软件官方网站http://www.guqiu.com。" />
<script type="text/javascript" src="../../files/common/jquery.js"></script>
<script type="text/javascript" src="../../files/xheditor/xheditor-zh-cn.min.js"></script>
<script type="text/javascript">
var editor;
$(pageInit);
function pageInit()
{
	var sitepath = "<%= Caicai.Framework.Utils.CAppSettings.SitePath %>";
	var url = sitepath + "files/xheditor/xheditor_plugins/multiupload/multiupload.aspx?type=image&tag=hide&uploadurl="+ sitepath +"files/xheditor/xheditor_plugins/multiupload/upload.aspx%3Fformat%3Ddata&immediate%3D1&ext=图片文件(*.zip;*.rar;*.jpg;*.jpeg;*.gif;*.png;*.bmp)";
	var allPlugin={
		upload:{c:'testClassName',t:'测试7：showIframeModal (Ctrl+7)',s:'ctrl+7',e:function(){
			var _this=this;
			_this.showIframeModal('上传文件',url,function(v){_this.loadBookmark();$('#TB_Content').val(v[0].url)},320,200);
		}}
	};
	editor = $('.Editor').xheditor({plugins:allPlugin,width:'1000',height:'100',tools:'upload,|,About'});
	$('.upload').click(function(){editor.exec('upload')});
}
</script>
<script type="text/javascript">
$(function()
{
	$("#ButtonInsert").click(function()
	{
		//TB_TaskClass验证
		if ($("#TB_Title").val()=='')
		{
			alert("请填写标题！");
			$("#TB_Title").focus(); 
			return false;
		} 

		//TB_Content验证
		if($("#TB_Content").val()=='')
		{
			alert("请填写内容！");
			$("#TB_Content").focus(); 
			return false;
		}
	})


	//删除数据的提示
	$("a[title=delete]").click(function()
    {
        return confirm("你确定要删除这一项吗？");
    })
})
</script>
</head>
<body>
<form id="form1" runat="server">
<table class="table menu">
  <tr>
    <td width="135">
	<a href="default.aspx">查看共享资料列表</a>
	</td>
	<td align="right">
	<asp:placeholder runat="server" Visible='<%# IsLogin %>'><a href="default.aspx?action=upload">上传共享资料</a><a href="../user.aspx?action=show&id=<%= LoginKey("UserID") %>"><%= LoginKey("Name") %>的用户中心</a><asp:LinkButton ID="LinkButton1" runat="server" onclick="Loginout_Click"  Text="退出系统" /></asp:placeholder>
	<asp:placeholder runat="server" Visible='<%# !IsLogin %>'><a href="../login.aspx?url=<%=Server.UrlEncode("data/default.aspx")%>&table=C_Data&islog=yes">用户登陆</a></asp:placeholder>
	</td>	
  </tr>
</table>

<asp:Panel ID="PanelDefault" runat="server">
<table class="table">
<thead>
<tr>
    <td style="width:25px; text-align:center;"></td>
    <td style="width:100px;">提交会员</td>
    <td>标题</td>
    <td style="width:120px;">提交时间</td>
</tr>
</thead>
<asp:Repeater ID="RepeaterDefault" runat="server">
<ItemTemplate>
<tr>
    <td><img src="images/ico_file.gif" /></td>
    <td><a href="../user.aspx?action=show&id=<%# Eval("UserID")%>"><%# UserName(Eval("UserID").ToString())%></a></td>
    <td><a href="<%# Eval("Content")%>" target="_blank"><%# Caicai.Framework.Utils.CText.HtmlEncode(Eval("Title").ToString()) %></a><asp:Panel ID="Panel2" runat="server" CssClass="inline" Visible="<%# IsAdmin %>"><a href="?action=delete&id=<%# Eval("ID") %>"  title="delete" class="button">删除</a>
    </asp:Panel></td>
    <td class="time"><%# Eval("InputDate") %></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<table class="table">
<tr>
    <td><Caicai:CPageSql ID="PageDefault" runat="server" PageSize="10" /></td>
</tr>
</table>
<table class="table">
<tr>
    <td align="right"><a href="javascript:history.back()" class="button">返回上一页</a></td>
</tr>
</table>
</asp:Panel>

<asp:Panel ID="PanelUpload" runat="server">
<asp:placeholder runat="server" ID="PlaceHolderInsert" Visible='<%# IsLogin %>'>
<div style="display:none;"><textarea class="Editor"></textarea></div>
<table class="table">
<thead>
<tr>
    <td colspan="2">上传共享资料</td>
</tr>
</thead>
<tr>
    <td style="background:#f1f1f1; width:100px; text-align:right;">标题</td>
    <td><Cai:CTextBox runat="server" ID="TB_Title" Style="width:50%;" /></td>
</tr>
<tr>
    <td style="background:#f1f1f1; width:100px; text-align:right;">上传文件</td>
    <td><Cai:CTextBox runat="server" ID="TB_Content" Style="width:50%;" /><a href="#" class="upload">上传</a></td>
</tr>
<tr>
    <td colspan="2" align="center"><asp:Button ID="ButtonInsert" runat="server" onclick="Insert_Click"  Text=" 提 交 " />&nbsp;&nbsp;<input type="reset" value=" 重 置 " /></td>
</tr>
</table>
</asp:placeholder>
</asp:Panel>
</form>
</body>
</html>
