📄 showphoto.aspx.cs
字号:
//======================================================
//== (c)2008 aspxcms inc by NeTCMS v1.0 ==
//== Forum:bbs.aspxcms.com ==
//== Website:www.aspxcms.com ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;
using NetCMS.Model;
public partial class user_show_showphoto : NetCMS.Web.UI.BasePage
{
Photo pho = new Photo();
Discuss dis = new Discuss();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string PhotoalbumID = Request.QueryString["PhotoalbumID"];
string uid = Request.QueryString["uid"];
if (PhotoalbumID == "" && PhotoalbumID == null)
{
PageError("错误参数", "");
}
DataTable dt_phopwd = pho.sel_getUserInfo(PhotoalbumID.ToString());
if (dt_phopwd.Rows[0][0].ToString() != "" && NetCMS.Global.Current.UserNum != dt_phopwd.Rows[0][1].ToString())
{
this.Panel1.Visible = true;
this.Panel2.Visible = false;
}
else
{
this.Panel1.Visible = false;
this.Panel2.Visible = true;
}
Show_cjlist(1);
if (this.Panel2.Visible == true)
{
sc.InnerHtml = Show_scs(PhotoalbumID.ToString(), uid.ToString());
}
}
}
protected void PageNavigator2_PageChange(object sender, int PageIndex2)
{
Show_cjlist(PageIndex2);
}
protected void Show_cjlist(int PageIndex2)
{
string PhotoalbumID = Request.QueryString["PhotoalbumID"];
int ib, jb;
SQLConditionInfo st = new SQLConditionInfo("@PhotoalbumID", PhotoalbumID);
DataTable cjlistdts = NetCMS.Content.Pagination.GetPage(this.GetType().Name, PageIndex2, 10, out ib, out jb, st);
this.PageNavigator2.PageCount = jb;
this.PageNavigator2.PageIndex = PageIndex2;
this.PageNavigator2.RecordCount = ib;
if (cjlistdts.Rows.Count > 0)
{
cjlistdts.Columns.Add("UserNamess", typeof(string));
cjlistdts.Columns.Add("PhotoalbumName", typeof(string));
cjlistdts.Columns.Add("PhotoUrls", typeof(string));
string _dirDumm = NetCMS.Config.UIConfig.dirDumm;
if (_dirDumm.Trim() != ""){_dirDumm = _dirDumm + "/";}
foreach (DataRow r in cjlistdts.Rows)
{
r["UserNamess"] = dis.sel_discussInfo(r["UserNum"].ToString(),0).Rows[0]["UserName"].ToString();
r["PhotoalbumName"] = dis.sel_discussInfo(r["PhotoalbumID"].ToString(), 11).Rows[0]["PhotoalbumName"].ToString();
r["PhotoUrls"] = r["PhotoUrl"].ToString().ToLower().Replace("{@userdirfile}", _dirDumm + NetCMS.Config.UIConfig.UserdirFile);
}
DataList1.DataSource = cjlistdts;
DataList1.DataBind();
}
else
{
no.InnerHtml = Show_no();
this.PageNavigator2.Visible = false;
}
}
protected void open_Click(object sender, EventArgs e)
{
string PhotoalbumIDs =Request.QueryString["PhotoalbumID"];
string pwd =Request.Form["pwd"].ToString();
DataTable dt = pho.sel_getUserInfo(PhotoalbumIDs);
if (dt.Rows[0][0].ToString() != NetCMS.Common.Input.MD5(pwd, true))
{
PageError("密码错误", "Photoalbumlist.aspx");
}
else
{
this.Panel1.Visible = false;
this.Panel2.Visible = true;
}
}
string Show_no()
{
string nos = "<table border=0 width='98%' cellpadding=\"5\" cellspacing=\"1\" class=\"table\" align=\"center\">";
nos = nos + "<tr class='TR_BG_list'>";
nos = nos + "<td class='navi_link'>没有数据</td>";
nos = nos + "</tr>";
nos = nos + "</table>";
return nos;
}
protected string Show_scs(string PhotoalbumIDs,string uID)
{
string scs = "<a href=\"showphotofilt.aspx?PhotoalbumID=" + PhotoalbumIDs + "&uid=" + uID + "\" class=\"menulist\">幻灯播放</a>";
return scs;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -