<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LayoutSettings.aspx.cs" Inherits="Admin_LayoutSettings" %>

<%@ Import Namespace="Spaces" %>
<!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=gb2312">
    <title><%=Globals.Text["GuestLimits_Title"]%></title>
    <link href="Admin.css" rel="stylesheet" type="text/css">
 

    <script src="<%=Globals.ApplicationPath %>/Include/js/dialog.js" type="text/javascript"></script>

    <script src="<%=Globals.ApplicationPath %>/Include/js/base.js" type="text/javascript"></script>

    <script src="<%=Globals.ApplicationPath %>/Include/js/dl_settings.js" type="text/javascript"></script>

    <script src="<%=Globals.ApplicationPath %>/Include/LayoutData.js" type="text/javascript"></script>

</head>
<body>
    <table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="black333333_red_noline">
        <tr>
            <td>&nbsp;
                
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="3" height="3">
                            <img src="img/O_angle_up_left.gif" width="3" height="3"></td>
                        <td bgcolor="#ACD373" width="100%">
                        </td>
                        <td width="3">
                            <img src="img/O_angle_up_right.gif" width="3" height="3"></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td bgcolor="#acd373" height="30">
                &nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffffff"><b><%=Globals.Text["GuestLimits_PageSet"]%> </b></font>
            </td>
        </tr>
        <tr>
            <td class="form_border">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="20">&nbsp;
                            </td>
                        <td>&nbsp;
                            </td>
                        <td width="20">&nbsp;
                            </td>
                    </tr>
                    <tr>
                        <td>&nbsp;
                            </td>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="black333333_red_noline">
                                <tr>
                                    <td align="right">
                                        <font color="#FF6600"><a href="editPost.aspx"><%=Globals.Text["GuestLimits_PublishArtical"]%></a></font>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <fieldset>
                                            <legend>&nbsp;<%=Globals.Text["GuestLimits_PageSet"]%>&nbsp;</legend>
                                            <div align="right">
                                                <%=Globals.Text["GuestLimits_PageInterface"]%><br>
                                                <%=Globals.Text["GuestLimits_PageManage"]%><br>
                                                <br>
                                            </div>
                                        </fieldset>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="5">
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>&nbsp;
                            </td>
                    </tr>
                    <tr>
                        <td>&nbsp;
                            </td>
                        <td>
                            <table width="100%" border="0" cellspacing="8" bgcolor="#FFFFFF" class="mainBody">
                                <tr>
                                    <td valign="top" width="568">
                                        <div id="ModuleHeader_MainPanel">
                                            <table cellspacing="0" class="pheader" border="0" style="" height="22">
                                                <tr>
                                                    <td class="mod_tlc" width="6" nowrap>&nbsp;
                                                        
                                                    </td>
                                                    <td width="100%" class="modhead">
                                                        <table cellspacing="0" width="100%" class="fixedTable partheader" style="">
                                                            <tr>
                                                                <td id="Td1" class="bold ellipse partDetail" nowrap>
                                                                    <div class='ellipse'>
                                                                        <table>
                                                                            <tr>
                                                                                <td>
                                                                                    <a href="LayoutSettings.aspx"><%=Globals.Text["GuestLimits_OrderPlant"]%></a></td>
                                                                                <td>
                                                                                    <a href="UserList.aspx"><%=Globals.Text["GuestLimits_OrderTemp"]%></a></td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </td>
                                                                <td class="partBuffer" align="right" nowrap>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td class="mod_trc" width="6" nowrap>&nbsp;
                                                        
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="opaquePartMain">
                                            <div class="SUWizContent">
                                                &nbsp;</div>
                                            <br>
                                            <div class="SULayoutArea">
                                                <span class="bold"><%=Globals.Text["GuestLimits_Temp"]%></span></div>
                                            <div class="SUWizContent">
                                                <%=Globals.Text["GuestLimits_AddTemp"]%><br>
                                                <br>
                                                <table border="0" width="500">
                                                    <tr>
                                                        <td width="200" style="padding-right: 10px;">
                                                            <div id="PartsBucket" style="overflow: auto; overflow-x: hidden; overflow-y: scroll;
                                                                width: 200px; height: 125px; border: solid 1px #698AAA;">
                                                                <form>
                                                                    <asp:Literal ID="modules" runat="server"></asp:Literal>
                                                                </form>
                                                            </div>
                                                        </td>
                                                        <td class="SUWizContent" width="*" valign="top">
                                                            <strong><%=Globals.Text["GuestLimits_Delete"]%> </strong>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="SULayoutArea">
                                                <a name="layoutSection"></a><font class="bold"><%=Globals.Text["GuestLimits_ShareTemp"]%></font></div>
                                            <div class="SUWizContent">
                                                <%=Globals.Text["GuestLimits_ChoiceSpace"]%></div>
                                            <form name="layoutType">
                                                <div id="dlayoutType">
                                                </div>
                                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                    <tr id="LayoutContainer">
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO1" value="OneCol" onclick="redoLayout(this.value)" /><label
                                                                for="LO1"><%=Globals.Text["GuestLimits_OneColum"]%><br />
                                                                <img src="../Images/Layouts/layout0.gif" id="LOI1"></label></td>
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO2" value="SymmetricTwoCol" onclick="redoLayout(this.value)"><label
                                                                for="LO2"><%=Globals.Text["GuestLimits_TwoColum"]%><br />
                                                                <img src="../Images/Layouts/layout4.gif" id="LOI2"></label></td>
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO3" value="ClassicThreeCol" onclick="redoLayout(this.value)" /><label
                                                                for="LO3"><%=Globals.Text["GuestLimits_ThreeColum"]%><br />
                                                                <img alt="" src="../Images/Layouts/layout3.gif" id="LOI3" /></label></td>
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO4" value="ClassicTwoCol" onclick="redoLayout(this.value)" /><label
                                                                for="LO4"><%=Globals.Text["GuestLimits_TwoRow"]%><br />
                                                                <img src="../Images/Layouts/layout1.gif" id="LOI4"></label></td>
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO5" value="BackwardsTwoCol" onclick="redoLayout(this.value)"><label
                                                                for="LO5"><%=Globals.Text["GuestLimits_RightTwoRow"]%><br />
                                                                <img src="../Images/Layouts/layout2.gif" id="LOI5" alt=""></label></td>
                                                        <td align="center" valign="top">
                                                            <input type="radio" name="rLayout" id="LO6" checked value="RightHeavyThreeCol" onclick="redoLayout(this.value)"><label
                                                                for="LO6"><%=Globals.Text["GuestLimits_LeftThreeRow"]%><br />
                                                                <img src="../Images/Layouts/layout5.gif" id="LOI6"></label></td>
                                                    </tr>
                                                </table>
                                            </form>
                                            <br />
                                            <form name="layoutType">
                                            </form>
                                            <br>
                                            <div class="SULayoutArea">
                                                <font class="bold"><%=Globals.Text["GuestLimits_ParallTemp"]%></font></div>
                                            <div class="SUWizContent">
                                                <%=Globals.Text["GuestLimits_DisplayContent"]%>
                                            </div>
                                            <div align="center">
                                                <form id="dlEditor" name="layout">
                                                    <asp:Table Visible="false" HorizontalAlign="center" CellSpacing="3" Width="100%"
                                                        runat="server" ID="tbModules">
                                                        <asp:TableRow>
                                                        </asp:TableRow>
                                                    </asp:Table>
                                                    <div id="dlEditor1">
                                                    </div>
                                                    <table align="center" cellspacing="3" class="SetupClassicThreeCol">
                                                        <tr>
                                                            <td colspan="3" align="center">
                                                                <input type="Button" name="column" value="<" onclick="moveColumn(this,true)">&nbsp;<input
                                                                    type="Button" value="A" onclick="moveItem(true,this)">&nbsp;<input type="Button"
                                                                        value="V" onclick="moveItem(false,this)">&nbsp;<input type="Button" name="column"
                                                                            value=">" onclick="moveColumn(this,false)"></td>
                                                        </tr>
                                                    </table>
                                                </form>
                                            </div>
                                            <br>
                                            <div class="SaveRow" align="center">
                                                <input type="submit" id="subButton" value=" <%=Globals.Text["GuestLimits_SaveLayout"] %> " onclick="saveLayout();" />
                                                &nbsp;<input type="button" id="cancelButton" name="cancelButton" value="取消" onclick=''
                                                    style="display: none"  />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                          </table>
                        </td>
                        <td>&nbsp;
                            </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="30" bgcolor="#E3F0D0" align="center">
            </td>
        </tr>
    </table>
    <form name="SUForm" method="post" action="dllayoutsettings.aspx" onsubmit="return false">
        <input type="hidden" name="UserURL" value="windinwing" />
        <input type="hidden" name="homePageLayout">
        <input type="hidden" name="rLayout">
        <input type="hidden" name="rColor" value="reipurdtdesign_sleepingpuppies">
        <input type="hidden" name="actionType">
    </form>
    <asp:Literal runat="server" ID="layoutJs"></asp:Literal>

    <script>
function resetItems(row) //row重设的行长度
{ 
if(row>=PartItems.length)return;
  var newItems=new Array();
  newItems[0]=new PartRows();
  for(var i=0;i<PartItems.length;i++)
  {
   for(var j=0;j<PartItems[i].Items.length;j++)
   newItems[0].Add(PartItems[i].Items[j]);
  }
  PartItems.length=1;
  PartItems[0]=newItems[0];
}
function tests()
{
//document.getElementById('LayoutContainer').t

}

    </script>

    <script type="text/javascript" language="JavaScript">
 var oForm = document.forms["SUForm"];
 //oForm.target="_blank";
oForm.target="iframe_data";
 var UILayoutTypeName = "ClassicThreeCol";
 function createSelect(items,l)
 {
 var str='<select name="ThemeRow'+l+'" id="ThemeRow'+l+'" size="10" width="26" onchange ="deselectColumn(this)">';
 
  for(var i=0;items!=null&&i<items.length;i++)
   {  
     str+='<option value="'+items[i].Name+'">'+items[i].Title+'</option>';
   }
   str+='</select>';
   return str;
 }
 function redoLayout(v)
 { 

// alert(v);
 oForm.rLayout.value=v;
 UILayoutTypeName=v;
  var rowCount=getRowCount(v);
   resetItems(rowCount); 
  var str='<table id="tbModules" cellspacing="3" align="Center" border="0" style="width:100%;">\r\n<tr>';
  for(var i=0;i<rowCount;i++)
  {
  if(PartItems[i])
   str+='<td>'+createSelect(PartItems[i].Items,i)+'</td>';//创建选择项
   else
   str+='<td>'+createSelect(null,i)+'</td>';
  }
  str+='</tr></table>';

 // alert(str);
  $('dlEditor1').innerHTML=str;
  
  if(parent)
  {
   parent.iframeResize();
  }
 }
 
 function initLayout()
 {
 
  redoLayout(defLayout.toLowerCase());
  var f=$("layoutType").rLayout;
  for(var i=0;i<f.length;i++)
  {
   f[i].checked=false;
   if(f[i].value.toLowerCase()==defLayout.toLowerCase())
   {
  
    f[i].checked=true;
   }else
   {
    if(!enableSelectLayout)
   f[i].disabled ='disabled ';
   }
  }
  
 }
 initLayout();
    </script>

    <iframe name="iframe_data" id="iframe_data" style="display: none;"></iframe>
</body>
</html>
