温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:WO@BIZ第一季1.2版源码
当前文件:
WOBIZ/admin/AddGroup.aspx[14K,2009-6-12 11:58:35],打开代码结构图
WOBIZ/admin/AddGroup.aspx[14K,2009-6-12 11:58:35],打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddGroup.aspx.cs" Inherits="admin_AddGroup" 2
EnableEventValidation="false" %> 3
4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 5
<html xmlns="http://www.w3.org/1999/xhtml"> 6
<head runat="server"> 7
<title>添加群组</title> 8
<link href="Css/admin.css" rel="stylesheet" type="text/css" /> 9
10
<script language="javascript" type="text/javascript"> 11
function type1_Select() 12
{ 13
var sel_type1 = document.getElementById("ddltype"); 14
var selectIndex = sel_type1.selectedIndex; 15
var selValue = sel_type1.item(selectIndex).value; 16
17
var v=admin_AddGroup.GetType2(selValue); 18
returnType2(v); 19
20
} 21
function returnType2(info) 22
{ 23
var type2 = document.getElementById("ddltype2"); 24
var arrLength; 25
var arrCity = info.value; 26
arrLength = arrCity.length; 27
type2.options.length = 0; 28
type2.options.length = arrLength; 29
for(var i=0;i<arrLength;i++) 30
{ 31
var optionValue = arrCity[i].split('|'); 32
type2.options[i].value = optionValue[0]; 33
type2.options[i].text = optionValue[1]; 34
} 35
} 36
37
function checkgt() 38
{ 39
divurl = document.getElementById("div_url"); 40
divname = document.getElementById("div_name"); 41
42
txtitle = document.getElementById("txttitle"); 43
txurl = document.getElementById("txtgroupurl"); 44
45
var reg2=/^[a-zA-Z\d-]*$/; 46
47
if(txtitle.value==""){ 48
divname.innerHTML = "* 群组名称不能为空!"; 49
txtitle.focus(); 50
return false; 51
} 52
53
if(txurl.value==""){ 54
divurl.innerHTML = "* 群组网址不能为空!"; 55
txurl.focus(); 56
return false; 57
} 58
59
if(!reg2.test(txurl.value)){ 60
divurl.innerHTML = "* 格式不正确!请使用英文 / 数字,或以上混合,可带下划线"; 61
txurl.focus(); 62
return false; 63
} 64
65
return true; 66
} 67
68
function Chk_GroupName() 69
{ 70
divname = document.getElementById("div_name"); 71
txtitle = document.getElementById("txttitle"); 72
73
if(txtitle.value==""){ 74
divname.innerHTML = "* 群组名称不能为空!"; 75
//txtitle.focus(); 76
return false; 77
}else{ 78
divname.innerHTML = "*"; 79
} 80
81
var v = admin_AddGroup.check_GroupName(txtitle.value); 82
returnReslut(v); 83
} 84
85
function returnReslut(info) 86
{ 87
divname = document.getElementById("div_name"); 88
txtitle = document.getElementById("txttitle"); 89
90
if(info.value == "2") 91
{ 92
divname.innerHTML = "* 恭喜您,此群组名称可用!"; 93
} 94
else 95
{ 96
divname.innerHTML = "* 此群组名称已经被使用,请更换个群组名称!"; 97
txtitle.focus(); 98
} 99
} 100
101
function Chk_GroupUrl() 102
{ 103
divurl = document.getElementById("div_url"); 104
txurl = document.getElementById("txtgroupurl"); 105
106
var reg3=/^[a-zA-Z\d-]*$/; 107
108
if(txurl.value==""){ 109
divurl.innerHTML = "* 群组名称不能为空!"; 110
txurl.focus(); 111
return false; 112
} 113
if(!reg3.test(txurl.value)){ 114
divurl.innerHTML = "* 格式不正确!请使用英文 / 数字,或以上混合,可带下划线"; 115
txurl.focus(); 116
return false; 117
} 118
119
var v = admin_AddGroup.check_GroupUrl(txurl.value); 120
returnReslut2(v); 121
} 122
123
function returnReslut2(info) 124
{ 125
divurl = document.getElementById("div_url"); 126
txurl = document.getElementById("txtgroupurl"); 127
128
if(info.value == "2") 129
{ 130
divurl.innerHTML = "* 恭喜您,此群组网址可用!"; 131
} 132
else 133
{ 134
divurl.innerHTML = "* 此群组网址已经被使用,请更换个群组网址!"; 135
txurl.focus(); 136
} 137
} 138
139
function MM_showHideLayers() { //v3.0 140
var i,p,v,obj; 141
args=MM_showHideLayers.arguments; 142
for (i=0; i<(args.length-2); i+=3) 143
if ((obj=MM_findObj(args[i]))!=null) { 144
v=args[i+2]; 145
if (obj.style) { 146
obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } 147
obj.visibility=v; 148
} 149
} 150
function MM_findObj(n, d) { //v4.0 151
var p,i,x; 152
if(!d) d=document; 153
if((p=n.indexOf("?"))>0 && parent.frames.length) { 154
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 155
if(!(x=d[n])&&d.all) x=d.all[n]; 156
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 157
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 158
if(!x && document.getElementById) x=document.getElementById(n); 159
return x; 160
} 161
</script> 162
163
</head> 164
<body> 165
<form id="form1" runat="server"> 166
<div> 167
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 168
<tr> 169
<td width="10"> 170
<img src="Images/z-top_left.gif" width="10" height="33"></td> 171
<td valign="bottom" background="Images/z-center_center.gif"> 172
<table width="100" border="0" cellspacing="0" cellpadding="0"> 173
<tr> 174
<td width="3"> 175
<img src="Images/left1.gif" width="3" height="29"></td> 176
<td background="Images/center1.gif"> 177
<div align="center"> 178
<strong>群组管理</strong></div> 179
</td> 180
<td width="3"> 181
<img src="Images/right1.gif" width="3" height="29"></td> 182
</tr> 183
</table> 184
</td> 185
<td width="5"> 186
<img src="Images/z-top_right.gif" width="13" height="33"></td> 187
</tr> 188
<tr> 189
<td background="Images/z-center_left.gif"> 190
</td> 191
<td height="470" valign="top" bgcolor="#FFFFFF"> 192
<div id="incontent-post"> 193
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 194
<tr> 195
<td width="320" class="postbg"> 196
当前位置:群组管理</td> 197
</tr> 198
<tr> 199
<td> 200
</td> 201
</tr> 202
</table> 203
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 204
<tr> 205
<td height="25" colspan="2" class="Notice"> 206
<div align="center"> 207
<strong> 208
<asp:Label ID="Label1" runat="server" Text="添加新群组"></asp:Label></strong> </div> 209
</td> 210
</tr> 211
<tr class="postbg1"> 212
<td align="right" style="width: 152px"> 213
群组名称:<asp:Label ID="laboldname" runat="server" Visible="false"></asp:Label> 214
</td> 215
<td> 216
<asp:TextBox ID="txttitle" runat="server" Width="319px" onpropertychange="checkStrLen(this.id,this.value,200)"></asp:TextBox><span 217
class="orange" id="div_name">*不要超过200个字符</span></td> 218
</tr> 219
<tr class="postbg1"> 220
<td align="right" style="width: 152px"> 221
个性网址: 222
</td> 223
<td> 224
<asp:Label ID="labweburl" runat="server"></asp:Label> 225
<asp:TextBox ID="txtgroupurl" runat="server" Width="169px"></asp:TextBox><asp:Label ID="Label2" runat="server"></asp:Label><br /> 226
<span class="orange" id="div_url">*请使用英文 / 数字,或以上混合,可带下划线,确定后不能修改</span></td> 227
</tr> 228
<tr> 229
<td align="right" style="width: 152px"> 230
所属类别:</td> 231
<td> 232
<asp:DropDownList ID="ddltype" runat="server"> 233
</asp:DropDownList> 234
<asp:DropDownList ID="ddltype2" runat="server"> 235
</asp:DropDownList></td> 236
</tr> 237
<tr class="postbg1"> 238
<td style="width: 152px"> 239
<div align="right"> 240
群组LOGO:</div> 241
</td> 242
<td> 243
<asp:FileUpload ID="FileUpload1" runat="server" Width="318px" /> 244
<asp:TextBox ID="txtlogo" runat="server" Visible="False"></asp:TextBox> 245
<asp:Panel ID="Panel1" runat="server" Visible="false"> 246
LOGO:<%=logo %> 247
</asp:Panel> 248
</td> 249
</tr> 250
<tr class="postbg1"> 251
<td style="width: 152px"> 252
<div align="right"> 253
描述:</div> 254
</td> 255
<td> 256
<asp:TextBox ID="txtcontent" runat="server" Height="121px" TextMode="MultiLine" Width="579px" 257
onpropertychange="checkStrLen(this.id,this.value,4000)"></asp:TextBox></td> 258
</tr> 259
<tr class="postbg1"> 260
<td style="width: 152px"> 261
<div align="right"> 262
标签:</div> 263
</td> 264
<td> 265
<asp:TextBox ID="txttags" runat="server" Width="373px" onpropertychange="checkStrLen(this.id,this.value,4000)"></asp:TextBox><br /> 266
标签之间请用逗号分隔,如:北京,天安门</td> 267
</tr><asp:Panel ID="pp" runat="server" Visible="false"> 268
<tr class="postbg1"> 269
<td style="height: 24px; width: 152px;"> 270
<div align="right"> 271
发帖是否需要审核:</div> 272
</td> 273
<td style="height: 24px"> 274
<asp:CheckBox ID="CheckBox2" runat="server" Checked="True" ForeColor="Red" Text="通过审核打勾" /></td> 275
</tr> 276
<tr class="postbg1"> 277
<td style="height: 24px; width: 152px;"> 278
<div align="right"> 279
群组是否审核通过:</div> 280
</td> 281
<td style="height: 24px"> 282
<asp:CheckBox ID="CheckBox1" runat="server" Checked="True" ForeColor="Red" Text="通过审核打勾" /></td> 283
</tr></asp:Panel> 284
<tr class="postbg1"> 285
<td style="width: 152px"> 286
<div align="right"> 287
公开状态:</div> 288
</td> 289
<td> 290
<asp:DropDownList ID="ddlopen" runat="server"> 291
<asp:ListItem Value="0">任何人都可以加入群组</asp:ListItem> 292
<asp:ListItem Value="1">任何人都可以申请加入,需要获得管理员批准</asp:ListItem> 293
</asp:DropDownList></td> 294
</tr> 295
<tr> 296
<td height="30" style="width: 152px"> 297
<div align="right"> 298
</div> 299
</td> 300
<td> 301
<asp:Button ID="Button1" runat="server" CssClass="button" Text="添加新类别" OnClientClick="return checkgt();" 302
OnClick="Button1_Click" /> 303
<input class="button" type="reset" name="reset" value="取消" /></td> 304
</tr> 305
</table> 306
</div> 307
</td> 308
<td background="Images/z-center_right.gif"> 309
</td> 310
</tr> 311
</table> 312
</div> 313
</form> 314
</body> 315
</html> 316




EnableEventValidation

}