<%@ page language="C#" autoeventwireup="true" inherits="ims.web.home, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!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" id="home">
<head runat="server"><title>首页</title><script src="js/comm.js"></script><script src="js/home.js"></script></head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s1" runat="server">
        <Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/></Scripts>
    </asp:ScriptManager>
    <img id="gear" src="images/gear.png" title="设置我的首页" onclick="ShowPop('set_popup');" />
    <div runat="server" id="main">
    </div>
    <asp:UpdatePanel runat="server" ID="up" ChildrenAsTriggers="false" UpdateMode="Conditional" OnPreRender="UpPreRender">
        <ContentTemplate>
        <div ID="personal" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />个人中心</span><div></div></div>
        <div class="content clear">
            <div class="iconitem"><img src="images/userinfo.png" /><a href="reg.aspx?mode=update" rel="pop">个人资料</a></div>
            <div class="iconitem"><img src="images/theme.png" /><a href="#" onclick="return showProfile();" runat="server" id="aTheme" onserverclick="ShowThemePop">个性化设置</a></div>
            <div class="iconitem"><img src="images/sec.png" /><a href="###" onclick="ShowPop('pwd_popup');">修改密码</a></div>
            <div class="iconitem" runat="server" id="MyCart"><img src="images/cart.png" /><a href="cart.aspx">我的购物车</a></div>
            <div class="iconitem" runat="server" id="MyOrders"><img src="images/myorders.png" /><a href="OrderAdmin.aspx?owner=my">我的订单</a></div>
            <div class="iconitem" runat="server" id="OrderAdmin"><img src="images/orderadmin.png" /><a href="orderAdmin.aspx">订单管理</a></div>
            <div class="iconitem" runat="server" id="msg"><img src="images/msg.png" /><a href="###" onclick="toSend('msg','');">发送消息</a></div>
            <div class="iconitem" runat="server" id="mail"><img src="images/mail.png" /><a href="###" onclick="toSend('mail','');">发送邮件</a></div>
            <div class="iconitem" runat="server" id="sms"><img src="images/sms.png" /><a href="###" onclick="toSend('sms','');">发送短信</a></div>
            <div class="iconitem" runat="server" id="info"><img src="images/info.png" /><a href="#" onclick="return toPopup('infoEdit.aspx');">发布<%= ims.Comm.Vars.InfoType %></a></div>
            <div class="iconitem" runat="server" id="flow"><img src="images/flow.png" /><a href="select.aspx?action=AddFlow">发起流程</a></div>
        </div>
        </div>
        <div ID="memo" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />我的备忘</span><div></div></div>
        <div class="content">
            <asp:TextBox runat="server" ToolTip="在此处输入备忘内容（自动保存）" ID="tbMemo" contenteditable="true" TextMode="MultiLine" Rows="8" AutoPostBack="true" OnTextChanged="UpdateMemo"></asp:TextBox>
        </div>
        </div>
        <div ID="infos" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />最新<%= ims.Comm.Vars.InfoType %><a href='infoList.aspx' class="more"></a></span><div></div></div>
        <div class="content" id="infoItems" runat="server">
        </div>
        </div>
        <div ID="lastMsgs" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />最近的消息<a href='msgs.aspx' class="more"></a></span><div></div></div>
        <div class="content" id="msgItems" runat="server">
        </div>
        </div>
        <div ID="shortcuts" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />快捷方式<a href='dataHome.aspx?Area=shortcuts' class="more"></a></span><div></div></div>
        <div class="content" id="scItems" runat="server">
        </div>
        </div>
        <div ID="favs" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />我的收藏<a href='dataHome.aspx?Area=favs' class="more"></a></span><div></div></div>
        <div class="content" id="favItems" runat="server">
        </div>
        </div>
        <div ID="adminTools" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />管理工具<a href='adminHome.aspx' class="more"></a></span><div></div></div>
        <div class="content clear">
            <div class="iconitem"><img src="images/setting.png" /><a href="admin.aspx">系统设置</a></div>
            <div class="iconitem"><img src="images/maint.png" /><a href="maint.aspx">系统维护</a></div>
            <div class="iconitem"><img src="images/users.png" /><a href="users.aspx">用户管理</a></div>
            <div class="iconitem"><img src="images/roles.png" /><a href="roles.aspx">角色管理</a></div>
            <div class="iconitem" runat="server" id="smsadmin"><img src="images/sms.png" /><a href="smsadmin.aspx">短信设置</a></div>
            <div class="iconitem"><img src="images/guide.png" /><a href="guide.aspx">向 导</a></div>
        </div>
        </div>
        <div ID="navs" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />导 航</span><div></div></div>
        <div class="content clear">
            <div class="btnitem" href="templets.aspx" runat="server" id="design">设计中心</div>
            <div class="btnitem" href="templets.aspx?mode=data"><%= ims.Comm.Vars.DataCenterText %></div>
            <div class="btnitem" href="infolist.aspx"><%= ims.Comm.Vars.InfoCenterText %></div>
            <div class="btnitem" href="msgs.aspx" runat="server" id="msgs">消息中心</div>
            <div class="btnitem" href="dir.aspx"><%= ims.Comm.Vars.RootDirName %></div>
            <div class="btnitem" href="dataHome.aspx">搜 索</div>
            <div class="btnitem" href="adminHome.aspx" runat="server" id="sysAdmin">系统管理</div>
            <div class="btnitem" onclick="return showHelp();">帮 助</div>
        </div>
        </div>
        <div ID="dataOpera" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />数据操作</span><div></div></div>
        <div class="content clear">
            <div class="btnitem" href="select.aspx" runat="server" id="add">添 加</div>
            <div class="btnitem" href="select.aspx?action=View" id="browse">浏 览</div>
            <div class="btnitem" href="select.aspx?action=Search">搜 索</div>
            <div class="btnitem" href="templets.aspx?mode=data">管 理</div>
            <div class="btnitem" href="view.aspx">最近浏览的数据</div>
        </div>
        </div>
        <div ID="dataUpdate" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />数据更新情况：<select runat="server" id="ddlTimeSpan" onchange="return timeSpanChanged();" onserverchange="ShowUpdated">
                    <option value="Today">今天</option>
                    <option value="Yesterday">昨天</option>
                    <option value="ThisWeek">本周</option>
                    <option value="LastWeek">上周</option>
                    <option value="ThisMonth">本月</option>
                    <option value="LastMonth">上月</option>
                </select></span><div></div></div>
        <div class="content clear">
            <asp:UpdatePanel runat="server" ID="upUpdated" ChildrenAsTriggers="false" UpdateMode="Conditional">
                <ContentTemplate>
                    <div runat="server" id="updated"><div class="padcenter"><a href="#" class="u" onclick="return toQuery();">查询更新情况</a></div></div>
                </ContentTemplate>
                <Triggers><asp:AsyncPostBackTrigger ControlID="ddlTimeSpan" EventName="serverchange" /></Triggers>
            </asp:UpdatePanel>
        </div>
        </div>
        <div ID="todo" runat="server" class="area" visible="false">
        <div class="title"><span><img src="images/3.gif" class="random" />待办事项<a href='trans.aspx?tab=pending' class="more"></a></span><div></div></div>
        <div class="content clear" id="todoItems" runat="server">
        </div>
        </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="added" UpdateMode="Conditional" OnPreRender="RegScript">
        <ContentTemplate>
            <asp:PlaceHolder runat="server" ID="phAdded"></asp:PlaceHolder>
            <input type="button" runat="server" id="btnHelper" class="hide" onserverclick="BlockOpera" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="highlight" id="suggest">
    <img src="images/info.gif" align="absMiddle" /> 为了获得更好的操作体验，推荐您使用下列浏览器之一：
    <a href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie" target="_blank">IE 9～11</a>、<a href="http://firefox.com.cn" target="_blank">Firefox</a>、<a href="https://www.google.com/chrome?hl=zh-CN" target="_blank">Chrome</a>。
    </div>
    <ims:Pop runat="server" ID="set" Title="设置我的首页" Width="440" OkButtonText="切换页面布局" CustomButtonA_OnClick="saveDefault();" CustomButtonA_Text="设为默认版式" CustomButtonB_OnClick="resetAsDefault();" CustomButtonB_Text="重置为默认版式" OnOkClick="LayoutOpera" HideOnOkClientClick="false" OnOkClientClick="return showLayouts();" CanelButtonText="关闭" OnClientUpdated="InitUnused();" HelpSubject="HomeLayout" CustomCss="noline" ShowProgress="false">
        <ContentTemplate>
            <fieldset><legend>可用的版块</legend>
                <div class="padbox" runat="server" id="blocks">
                </div>
            </fieldset>
            <fieldset class="mtop_m"><legend>添加版块</legend>
                <div class="padcenter">
                    <input type="button" onclick="return toAddBlock();" value="添加自定义版块" style="width:102px" runat="server" id="btnAdd" onserverclick="ShowAddBlockPop" class="btn" />
                    <input type="button" onclick="return toAddRssBlock();" value="添加RSS版块" style="width:88px" runat="server" id="btnRss" onserverclick="ShowAddRssBlockPop" class="btn" />
                    <input type="button" onclick="return toAddWebBlock();" value="添加网页版块" style="width:90px" runat="server" id="btnWeb" onserverclick="ShowAddWebBlockPop" class="btn" />
                </div>
            </fieldset>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="pwd" Title="修改密码" OnOkClick="ChangePwd" OnOkClientClick="return PreChangePwd();" HideOnOkClientClick="false" ShowProgress="false">
    <ContentTemplate>
        <table cellspacing="2">
            <tr><td class="right">原密码：</td><td><asp:TextBox runat="server" TextMode="Password" ID="tbOldPwd"></asp:TextBox></td></tr>
            <tr><td class="right">新密码：</td><td><asp:TextBox runat="server" TextMode="Password" ID="tbNewPwd"></asp:TextBox></td></tr>
            <tr><td class="right">确认新密码：</td><td><asp:TextBox runat="server" TextMode="Password" ID="tbVerify"></asp:TextBox></td></tr>
        </table>
    </ContentTemplate>
    </ims:Pop>

<asp:UpdatePanel runat="server" ID="pops" UpdateMode="Conditional" ChildrenAsTriggers="false">
    <ContentTemplate>
    <ims:Pop runat="server" ID="myTheme" Title="个性化设置" OnOkClick="ChangeTheme" Width="420" HideOnOkClientClick="false" Visible="false">
    <ContentTemplate>
        <ul class="square notfocus">
            <li>界面风格：<asp:DropDownList ID="ddlThemes" runat="server"></asp:DropDownList></li>
            <li>进入系统后直接打开：<br />
            <asp:RadioButton runat="server" ID="rbCommon" Checked="true" Text="页面：" GroupName="types" /><asp:DropDownList ID="ddlPages" runat="server">
                <asp:ListItem Value="home.aspx" Selected="True">默认首页</asp:ListItem>
                <asp:ListItem Value="msgs.aspx">消息中心</asp:ListItem>
                <asp:ListItem Value="trans.aspx">事务中心</asp:ListItem>
                <asp:ListItem Value="infolist.aspx">信息中心</asp:ListItem>
                <asp:ListItem Value="templets.aspx?mode=data">数据中心</asp:ListItem>
                <asp:ListItem Value="templets.aspx">设计中心</asp:ListItem>
                <asp:ListItem Value="datahome.aspx">搜索</asp:ListItem>
                <asp:ListItem Value="select.aspx?action=Search">高级搜索</asp:ListItem>
                <asp:ListItem Value="adminhome.aspx">系统管理</asp:ListItem>
                <asp:ListItem Value="users.aspx">用户管理</asp:ListItem>
            </asp:DropDownList><br />
            <div runat="server" id="divData"><asp:RadioButton runat="server" ID="rbData" Text="数据：" GroupName="types" /><asp:DropDownList ID="ddlTemplets" runat="server" /></div>
            <div runat="server" id="divDir"><asp:RadioButton runat="server" ID="rbDir" Text="目录：" GroupName="types" /><a id="showdir" title="点击选择目录" runat="server" onclick="return selectDir();" onserverclick="DirChanged"></a></div>
            <asp:RadioButton runat="server" ID="rbCustom" Text="网址：" GroupName="types" /><asp:TextBox runat="server" ID="tbCustom" ToolTip="可填写系统内相对地址，如：info.aspx?id=3&#13;也可填写绝对网址，如：http://www.sina.com" Width="264"></asp:TextBox><br />
            <asp:RadioButton runat="server" ID="rbSc" Text="快捷方式：" GroupName="types" /><asp:DropDownList ID="ddlSc" runat="server" />
            </li>
            <li><a href="sidebar.aspx?layout=true" target="_self" class="u">自定义左侧栏</a></li>
            <li><a href="#" onclick="return toLayout();" class="u">自定义首页</a></li>
        </ul>
    </ContentTemplate>
    </ims:Pop>    
    <ims:Pop runat="server" ID="cus" Title="添加自定义版块" Width="500" OnOkClick="AddFreeBlock" OnOkClientClick="return PreAddBlock();" HideOnOkClientClick="false" Visible="false" CustomCss="noline">
        <ContentTemplate>
            <div ID="newBlock" runat="server" class="area">
            <div class="title"><span><img src="images/3.gif" class="random" />标题：<asp:TextBox runat="server" ID="tbTitle" Width="90"></asp:TextBox></span><div></div></div>
            <div class="content" id="newContent" runat="server">
                <ul runat="server" id="ulEles" class="ulCustom"></ul>
                <div class="padcenter gray" id="noEle" runat="server">请添加元素</div>
                <asp:TextBox runat="server" ID="htmlContent" Width="100%" Height="200" TextMode="MultiLine" Visible="false"></asp:TextBox>
            </div>
            </div>
            <div class="right" runat="server" id="eleManage"><a href="#" class="u" onclick="return toAddEle();">添加元素</a>&nbsp;&nbsp;<asp:LinkButton runat="server" ID="lbClear" CssClass="u" OnClick="ClearElements" Text="清空元素"></asp:LinkButton></div>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="addEle" Title="添加元素" OkButtonText="添加" HideOnOkClientClick="false" OnOkClick="AddElement" Width="530" OnOkClientClick="return PreAddEle();" OnClientUpdated="InitAddPop();" Visible="false">
        <ContentTemplate>
            <div id="divEles" runat="server" visible="false">
            <asp:DropDownList runat="server" ID="ddlTypes" onchange="typesChanged();" ToolTip="选择要添加的元素的类型">
                <asp:ListItem Selected="True" Value="">-选择类型-</asp:ListItem>
                <asp:ListItem Value="Browse">浏览</asp:ListItem>
                <asp:ListItem Value="Add">添加</asp:ListItem>
                <asp:ListItem Value="Start">发起</asp:ListItem>
                <asp:ListItem Value="Search">搜索</asp:ListItem>
                <asp:ListItem Value="Dir">目录</asp:ListItem>
                <asp:ListItem Value="Page">页面</asp:ListItem>
                <asp:ListItem Value="Table">表格视图</asp:ListItem>
                <asp:ListItem Value="Thumb">缩略视图</asp:ListItem>
                <asp:ListItem Value="Summary">概要视图</asp:ListItem>
                <asp:ListItem Value="Detail">详情视图</asp:ListItem>
                <asp:ListItem Value="Chart">图表视图</asp:ListItem>
                <asp:ListItem Value="Report">报表视图</asp:ListItem>
                <asp:ListItem Value="Favorite">我的收藏</asp:ListItem>
                <asp:ListItem Value="Shortcut">快捷方式</asp:ListItem>
                <asp:ListItem Value="Html">自由编辑内容</asp:ListItem>
            </asp:DropDownList><span>：</span>
            <span class="hide" for="Browse Table Thumb Summary Detail Chart Report">
            <asp:UpdatePanel ID="upFilters" runat="server" RenderMode="Inline">
                <ContentTemplate>
                    <asp:DropDownList runat="server" ID="ddlBrowse" OnDataBound="FillFilters" ToolTip="选择要浏览的数据" AutoPostBack="true" OnSelectedIndexChanged="FillFilters"></asp:DropDownList>&nbsp;<asp:DropDownList runat="server" ToolTip="可在此选择过滤器" onchange="setUrl();" ID="ddlFilters"></asp:DropDownList>
                </ContentTemplate>
            </asp:UpdatePanel>
            </span>
            <asp:DropDownList runat="server" ID="ddlStart" for="Start" CssClass="hide" ToolTip="选择要发起的流程"></asp:DropDownList>
            <asp:DropDownList runat="server" ID="ddlSearch" for="Search" CssClass="hide" ToolTip="选择搜索的对象"></asp:DropDownList>
            <asp:DropDownList runat="server" ID="ddlAdd" for="Add" CssClass="hide" ToolTip="选择模板"></asp:DropDownList>
            <asp:DropDownList runat="server" ID="ddlFav" for="Favorite" CssClass="hide" ToolTip="选择收藏的项目"></asp:DropDownList>
            <asp:DropDownList runat="server" ID="ddlShortcut" for="Shortcut" CssClass="hide" ToolTip="选择快捷方式"></asp:DropDownList>
            <asp:DropDownList runat="server" ID="ddlPage" for="Page" CssClass="hide" ToolTip="选择页面">
                <asp:ListItem Value="infolist.aspx">信息中心</asp:ListItem>
                <asp:ListItem Value="infoEdit.aspx">发布信息</asp:ListItem>
                <asp:ListItem Value="templets.aspx?mode=data">数据中心</asp:ListItem>
                <asp:ListItem Value="templets.aspx">设计中心</asp:ListItem>
                <asp:ListItem Value="msgs.aspx">消息中心</asp:ListItem>
                <asp:ListItem Value="trans.aspx">事务中心</asp:ListItem>
                <asp:ListItem Value="datahome.aspx">搜索</asp:ListItem>
                <asp:ListItem Value="select.aspx?action=Search">高级搜索</asp:ListItem>
                <asp:ListItem Value="adminhome.aspx">系统管理</asp:ListItem>
            </asp:DropDownList>
            <a id="selectDir" for="Dir" class="hide" title="点击选择目录" runat="server" onclick="return toSelectDir();" onserverclick="DirChanged"></a>
            <span class="hide" for="Table Thumb Summary Detail Dir" style="margin-left:6px"><asp:CheckBox runat="server" onclick="setUrl();" ID="cbDisCache" Text="禁止缓存" /><img src="images/what.gif" title="说明" onclick="What('DisCache')" class="what" /></span>
            <div for="Html" class="hide">
            <asp:TextBox runat="server" ID="tbHtml" TextMode="MultiLine" Width="98%"></asp:TextBox>
            </div>
            </div>
            <div id="innerUrl" class="hide">元素链接地址：<a href='#' id="aUrl"></a></div>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="web" Title="添加网页版块" Width="422" OnOkClick="AddWebBlock" OnOkClientClick="return PreAddWebBlock();" HideOnOkClientClick="false" Visible="false" CustomCss="noline">
        <ContentTemplate>
            <div ID="webBlock" runat="server" class="area">
            <div class="title"><span><img src="images/3.gif" class="random" />标题：<asp:TextBox runat="server" ID="webTitle" Width="120"></asp:TextBox></span><div></div></div>
            <div class="content">
                网址：<asp:TextBox runat="server" ID="tbUrl" Width="340" ToolTip="可输入互联网网址，或内部页面地址"></asp:TextBox><br />
                内容区高度：<asp:TextBox runat="server" ID="tbHeight" Width="40"></asp:TextBox> 像素，<asp:CheckBox runat="server" ID="cbAuto" Text="尝试自适应高度" /> <asp:CheckBox runat="server" ID="cbScroll" Text="隐藏滚动条" />
            </div>
            <div class="right mtop_m"><a href="#" class="u" onclick="return toGetUrl();">获取内部页面地址</a></div>
            </div>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="rss" Title="添加RSS版块" Width="444" OnOkClick="AddRssBlock" OnOkClientClick="return PreAddRssBlock();" HideOnOkClientClick="false" Visible="false" CustomCss="noline">
        <ContentTemplate>
            <div ID="rssBlock" runat="server" class="area">
            <div class="title"><span><img src="images/3.gif" class="random" />标题：<asp:TextBox runat="server" ID="rssTitle" Width="90"></asp:TextBox></span><div></div></div>
            <div class="content">
                RSS源：<asp:TextBox runat="server" ID="tbRss" Width="265"></asp:TextBox> <asp:DropDownList runat="server" ID="ddlRss" onchange="ddlRssChanged();"></asp:DropDownList><br />
                显示的条目数量：<asp:TextBox runat="server" ID="tbRssCount" Width="40"></asp:TextBox>
            </div>
            </div>
            <div class="right"><a href="###" class="u" onclick="What('rss');">RSS是什么？</a></div>
        </ContentTemplate>
    </ims:Pop>
    </ContentTemplate>
</asp:UpdatePanel>
<asp:Button runat="server" ID="btnSave" OnClick="SaveLayout" CssClass="hide" />
</form>
</body>
</html>