网站首页:
母版页面:
母版代码:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!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">
<title>心净土净·专题·首页(净土专修,一门深入,不退初愿,愿生极乐;奉行十善,行普贤道,忆念阿弥陀佛诸愿功德,诸佛所行亦应随行,众善奉行,诸恶莫作,是诸佛教!)</title>
<link rel="Shortcut Icon" href="53.ico" />
<link rel="Bookmark" href="53.ico" />
<link rel="stylesheet" href="App_Themes/css/StyleSheet.css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
width: 95%;
text-align :center;
font-size: small;
}
.style2
{
width: 80%;
text-align :center;
font-size: small;
}
.style3
{
width: 20%;
text-align :center;
font-size: small;
}
.style4
{
font-size: small;
text-align :center;
color: #0000FF;
}
.style5
{
width: 100%;
text-align :center;
font-size: small;
}
.style6
{
width: 20%;
text-align :center;
font-size: small;
}
.style7
{
color: #0000FF;
font-size: small;
text-align: left;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table border ="1" cellpadding="0" cellspacing="0" class="style1" align="center">
<tr>
<td bgcolor="#EFF3FB">
<table cellpadding="0" cellspacing="0" class="style5">
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" class="style5">
<tr>
<td class="style3" bgcolor="White">
<asp:Image ID="Image2" runat="server" Height="50px"
ImageUrl="~/FO_XIAN_CE/20077121282.jpg" />
</td>
<td colspan="3" bgcolor="White">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" height="50" width="400">
<param name="movie" value="images/xjtj-1.swf" />
<param name="quality" value="High" /></object>
</td>
<td class="style3" bgcolor="White">
<asp:Image ID="Image1" runat="server" Height="50px"
ImageUrl="~/images/逆水行舟-1.gif" Width="129px" />
</td>
</tr>
<tr>
<td colspan="5" bgcolor="#009900">
<img alt="" src="images/lianhua.bmp" style="width: 1000px; height: 1px" /></td>
</tr>
<tr>
<td class="style6">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000">
</asp:Timer>
<asp:Label ID="DateTimes" runat="server"
style="font-size:small; color: #FF0000;"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td colspan="4">
<table cellpadding="0" cellspacing="0" class="style5">
<tr>
<td class="style3">
<asp:Menu ID="Menu1" runat="server" Font-Bold="True"
Orientation="Horizontal" onmenuitemclick="Menu1_MenuItemClick">
<Items>
<asp:MenuItem ImageUrl="~/images/POST-23-1091277862-1.PNG" Text="首页" Value="首页"
NavigateUrl="~/Default.aspx">
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="同修登陆"
Value="同修登陆">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="修改密码"
Value="修改密码"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="安全退出"
Value="安全退出"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</td>
<td class="style3">
<asp:Menu ID="Menu2" runat="server" Orientation="Horizontal"
onmenuitemclick="Menu2_MenuItemClick">
<Items>
<asp:MenuItem ImageUrl="~/images/POST-23-1091277862-1.PNG" Text="佛像瞻礼"
Value="佛像瞻礼">
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="南無阿弥陀佛!"
Value="南無阿弥陀佛!"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="南無释迦牟尼佛!"
Value="南無释迦牟尼佛!"></asp:MenuItem>
<asp:MenuItem Text="南無观世音菩萨!"
Value="南無观世音菩萨!" ImageUrl="~/images/POST-23-1091413362-1.PNG"></asp:MenuItem>
<asp:MenuItem Text="南無地藏王菩萨!"
Value="南無地藏王菩萨!" ImageUrl="~/images/POST-23-1091413362-1.PNG"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="莲花图片欣赏!"
Value="莲花图片欣赏"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</td>
<td class="style3">
<asp:Menu ID="Menu3" runat="server" Orientation="Horizontal"
onmenuitemclick="Menu3_MenuItemClick">
<Items>
<asp:MenuItem ImageUrl="~/images/POST-23-1091277862-1.PNG" Text="修学计划"
Value="修学计划" Selectable="False">
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="计划日记"
Value="计划日记"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="计划注册"
Value="计划注册"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</td>
<td class="style3">
<asp:Menu ID="Menu4" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem ImageUrl="~/images/POST-23-1091277862-1.PNG" Text="佛学资源"
Value="佛学资源" Selectable="False">
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="影视资源"
Value="影视资源"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="电子书籍"
Value="电子书籍"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</td>
<td class="style3">
<asp:Menu ID="Menu5" runat="server" Orientation="Horizontal"
onmenuitemclick="Menu5_MenuItemClick">
<Items>
<asp:MenuItem ImageUrl="~/images/POST-23-1091277862-1.PNG" Text="站点管理"
Value="站点管理" Selectable="False">
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="佛像管理"
Value="佛像管理"></asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/POST-23-1091413362-1.PNG" Text="资源管理"
Value="资源管理"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="style3" bgcolor="#009900">
</td>
<td class="style3" bgcolor="#009900">
</td>
<td class="style3" bgcolor="#009900">
</td>
<td class="style3" bgcolor="#009900">
</td>
<td class="style3" bgcolor="#009900">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="style3" bgcolor="Red">
<asp:Image ID="Image3" runat="server" ImageUrl="~/images/观世音菩萨2.bmp"
Width="130px" ToolTip="佛像瞻礼!" />
</td>
<td class="style4">
<asp:TextBox ID="TextBox1" runat="server" Height="160px" TextMode="MultiLine"
Width="98%" BackColor="#EFF3FB" BorderStyle="None"
Font-Size="small" ForeColor="Blue"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style3" bgcolor="#009900">
</td>
<td class="style2" bgcolor="#009900">
</td>
</tr>
<tr>
<td class="style6">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td class="style7">
<span> 遵照佛陀教导:以念佛为主修法门,辅以《佛说大乘无量寿庄严清净平等觉经》《地藏菩萨本愿经》《金刚般若波罗蜜经》《六祖法宝坛经》佛经为修学主体,依佛教诫积集福慧资糧,发菩提心,愿生极乐,随佛所行,自利利他,不退初愿;以随缘处理世事之余落实个人修学佛教课程,每日完成修学计划为约,记录个人修学计划日记。</span>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#009900">
</td>
</tr>
<tr>
<td colspan="2">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#009900">
</td>
</tr>
<tr>
<td colspan="2" class="style4">
新浪·聊天室·心净土净·净修专题<br />
[2008年3月15日,需IE7.0支持。]</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
后台代码:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Wuqi.Webdiyer;
public partial class MasterPage : System.Web.UI.MasterPage
{
bool KongZhi = false; string DuQu_QuanXian = "*";
protected void Page_Load(object sender, EventArgs e)
{
string XinQi = DateTime.Now.DayOfWeek.ToString(),XinQis="";
switch (XinQi)
{
case "Friday":
XinQis = "星期五";
break;
case "Thursday":
XinQis = "星期四";
break;
case "Wednesday":
XinQis = "星期三";
break;
case "Tuesday":
XinQis = "星期二";
break;
case "Monday":
XinQis = "星期一";
break;
case "Sunday":
XinQis = "星期日";
break;
case "Saturday":
XinQis = "星期六";
break;
default:
break;
}
DateTimes.Text = DateTime.Now.ToLongDateString() + DateTime.Now.ToLongTimeString() + XinQis;
if (Session["UserName"] != null && Session["UserName"].ToString() != "准备登陆")
{ Label1.ForeColor = System.Drawing.Color.FromName("#FF0000"); }
if (!Page.IsPostBack)
{
CaiDanKZ();
int Zhongcs = 0;
Socut.Reader drs = new Socut.Reader("SELECT * FROM DenLuBiao");
while (drs.Read())
{ Zhongcs += int.Parse(drs["DenLuChiShu"].ToString()); }
drs.Close();
TextBox1.Text += "\n\r网站正在建设中......\n\r推出网络修行日记系统:每天记录修行日记,隔一段时间回过来看看自己修行日记,能够提醒自己以前是如何修行的,将来修行应该怎样计划,看看自己三业是否符合一个学佛人准则;欢迎广大同修使用。\rhttp://foxuejianzuo.eicp.net:808/Default.aspx\nhttp://foxuejianzuo.3322.org:808/Default.aspx";
Label2.Text = "注册同修总访问量:" + Zhongcs.ToString() + "次。";
}
}
protected void CaiDanKZ()
{
MultiView MV = (MultiView)ContentPlaceHolder1.FindControl("MultiView1");
if (Session["UserName"] != null && Session["UserName"].ToString() != "准备登陆")
{
//Menu1.Items[0].ChildItems[1].Enabled = true;
//Menu3.Items[0].ChildItems[0].Enabled = true;
if (MV.ActiveViewIndex == 4)
{
Menu5.Items[0].ChildItems[0].Enabled = true;
Menu5.Items[0].ChildItems[1].Enabled = true;
}
else
{
Menu5.Items[0].ChildItems[0].Enabled = false;
Menu5.Items[0].ChildItems[1].Enabled = false;
}
KongZhi = true;
Label1.Text = "欢迎您" + Session["UserName"].ToString() + "同修!第" + Session["Usercs"].ToString() + "次使用本站!";
}
else
{
Menu1.Items[0].ChildItems[1].Enabled = false;
Menu3.Items[0].ChildItems[0].Enabled = false;
Menu5.Items[0].ChildItems[0].Enabled = false;
Menu5.Items[0].ChildItems[1].Enabled = false;
Label1.Text = "欢迎您光临!请登陆后记录修学计划日记。";
}
}
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
MultiView MV = (MultiView)ContentPlaceHolder1.FindControl("MultiView1");
TextBox TX1 = (TextBox)ContentPlaceHolder1.FindControl("TextBox2");
TextBox TX2 = (TextBox)ContentPlaceHolder1.FindControl("TextBox3");
switch (e.Item.Text)
{
case "同修登陆":
Session.RemoveAll(); TX1.Enabled = true; TX2.Enabled = true;
Session["UserName"] = "准备登陆"; MV.ActiveViewIndex = 0;//Response.Redirect("default.aspx");
break;
case "修改密码":
MV.ActiveViewIndex = 1;
break;
case "安全退出":
Session.Remove("UserName"); Session.Remove("Usercs"); //Session.RemoveAll();
Response.Redirect("default.aspx");
break;
default:
break;
}
}
protected void Menu3_MenuItemClick(object sender, MenuEventArgs e)
{
MultiView MV = (MultiView)ContentPlaceHolder1.FindControl("MultiView1");
switch (e.Item.Text)
{
case "计划日记":
MV.ActiveViewIndex = 3; KongZhi = true; DaKai_RiJi();
break;
case "计划注册":
MV.ActiveViewIndex = 1;
break;
default:
break;
}
}
protected void DaKai_RiJi()
{
AspNetPager NetPage = (AspNetPager)ContentPlaceHolder1.FindControl("AspNetPager1");
DataList DList4 = (DataList)ContentPlaceHolder1.FindControl("DataList4");
if (KongZhi == true)
{
DuQu_QuanXian_SheZhi();
NetPage.RecordCount = (int)Socut.Data.ExecuteScalar("SELECT COUNT(*) FROM WanChenQinKuan where JuShi_MinChen like '" + DuQu_QuanXian + "' ");
DataSet JiHua_RiJi = Socut.Data.ExecuteDataSet("SELECT * FROM WanChenQinKuan where JuShi_MinChen like '" + DuQu_QuanXian + "' order by ZuoYe_id desc", NetPage.PageSize * (NetPage.CurrentPageIndex - 1), NetPage.PageSize);
DList4.DataSource = JiHua_RiJi;
DList4.DataBind();
}
else
{ Response.Redirect("default.aspx"); }
}
protected void DuQu_QuanXian_SheZhi()
{
Label Lb3 = (Label)ContentPlaceHolder1.FindControl("Label3");
if (Lb3 != null && Session["UserName"] != null) { Lb3.Text = Session["UserName"].ToString(); } else { Response.Redirect("default.aspx"); }
Label Lb7 = (Label)ContentPlaceHolder1.FindControl("Label7");
Socut.Reader QuanXian = new Socut.Reader("SELECT * FROM DenLuBiao where DenLuYongHu = '" + Session["UserName"].ToString() + "'");
if (QuanXian.Read())
{
if (QuanXian["QuanXian_all"].ToString() == "yes") { DuQu_QuanXian = "%"; if (Lb7.Text == "") { Lb7.Text = "站主管理"; } }
if (QuanXian["QuanXian"].ToString() == "yes") { DuQu_QuanXian = "%"; if (Lb7.Text == "") { Lb7.Text = "网站管理"; } }
if (DuQu_QuanXian == "*") { DuQu_QuanXian = Session["UserName"].ToString(); Lb7.Text = "同修管理"; }
}
QuanXian.Close();
}
protected void Menu5_MenuItemClick(object sender, MenuEventArgs e)
{
MultiView MV = (MultiView)ContentPlaceHolder1.FindControl("MultiView1");
switch (e.Item.Text)
{
case "佛像管理":
MV.ActiveViewIndex = 4;
break;
case "资源管理":
MV.ActiveViewIndex = 1;
break;
default:
break;
}
}
protected void Menu2_MenuItemClick(object sender, MenuEventArgs e)
{
MultiView MV = (MultiView)ContentPlaceHolder1.FindControl("MultiView1");
switch (e.Item.Text)
{
case "佛像瞻礼":
MV.ActiveViewIndex = 4; CaiDanKZ();
break;
case "南無阿弥陀佛!":
MV.ActiveViewIndex = 1;
break;
default:
break;
}
}
}