• 大小: 2.12MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-26
  • 语言: C#
  • 标签: 源码  ASP.net  

资源简介

新闻发布系统源码(ASP.net C#源码),课程设计不用求人了

资源截图

代码片段和文件信息

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;

namespace Xkzi
{
    public partial class Ajax : BasicPage
    {
        protected string operType = string.Empty;
        protected string response = string.Empty;

        protected void Page_Load(object sender EventArgs e)
        {
            operType = q(“oper“);
            switch (operType)
            {
                case “chkAdmin“:
                    ChkAdmin();
                    break;
                case “addVote“:
                    AddVote();
                    break;
                case “getVote“:
                    GetVote();
                    break;
                case “getViewCount“:
                    GetViewCount();
                    break;
                case “getCommentCount“:
                    GetCommentCount();
                    break;
                case “addFav“:
                    AddFav();
                    break;
                case “addReview“:
                    AddReview();
                    break;
                case “login“:
                    GetLoginBar();
                    break;
                default:
                    DefaultResponse();
                    break;
            }

            Response.Write(response);
        }

        private void ChkAdmin()
        {
            string name = SafeRequest(q(“name“));
            string pass = FormsAuthentication.HashPasswordForStoringInConfigFile(SafeRequest(q(“pass“)) “MD5“).ToString().ToLower().Substring(8 16);
            string userCookies = new Random().Next(10000000 99999999).ToString();
            DataTable dt = GetDataTable(“select master_passwordstate from [xk_master] where master_name=‘“ + name + “‘“);
            if (dt.Rows.Count == 0)
            {
                response = “noname“;
                return;
            }
            else
            {
                if (dt.Rows[0][0].ToString() == pass)
                {
                    if (dt.Rows[0][1].ToString() != “0“)
                    {
                        HttpCookie userCookie = new HttpCookie(“userInfo“);
                        userCookie[“master_cookies“] = userCookies;
                        userCookie[“master_regname“] = name;
                        userCookie.Expires = DateTime.Now.AddDays(1d);
                        Response.Cookies.Add(userCookie);
                        Session.Add(“master_id“ userCookies);
                        Session.Add(“master_name“ name);

                        ExecuteSql(“update [xk_master] Set cookiess=‘“ + userCookies + “‘[lastime]=‘“ + DateTime.Now.ToString() + “‘[lastip]=‘“ + GetUserIp() + “‘ where master_name=‘“ + name + “‘“);
                     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1473  2007-04-01 07:46  新闻系统2.0(全部C#源码版)\51aspx源码必读.txt

     文件       1452  2007-03-31 08:50  新闻系统2.0(全部C#源码版)\project\51aspx源码必读.txt

     文件         98  2007-03-15 01:09  新闻系统2.0(全部C#源码版)\project\Ajax.aspx

     文件      14347  2007-03-29 01:11  新闻系统2.0(全部C#源码版)\project\Ajax.aspx.cs

     文件       4025  2007-03-29 02:06  新闻系统2.0(全部C#源码版)\project\Appear.aspx

     文件       3647  2007-03-29 02:30  新闻系统2.0(全部C#源码版)\project\Appear.aspx.cs

     文件       7403  2007-03-17 03:48  新闻系统2.0(全部C#源码版)\project\App_Code\Admin.cs

     文件       2524  2007-03-30 21:57  新闻系统2.0(全部C#源码版)\project\App_Code\BasicPage.cs

     文件      23498  2007-03-24 17:02  新闻系统2.0(全部C#源码版)\project\App_Code\MakeHtml.cs

     文件      21950  2007-03-30 21:15  新闻系统2.0(全部C#源码版)\project\App_Code\MyPage.cs

     文件    1683456  2007-12-15 19:36  新闻系统2.0(全部C#源码版)\project\App_Data\XKArticle.mdb

     文件       4590  2007-03-30 22:30  新闻系统2.0(全部C#源码版)\project\ArticleList.aspx

     文件       5936  2007-03-30 22:33  新闻系统2.0(全部C#源码版)\project\ArticleList.aspx.cs

     文件       6484  2007-03-30 22:30  新闻系统2.0(全部C#源码版)\project\ArticleView.aspx

     文件       3638  2007-03-30 22:36  新闻系统2.0(全部C#源码版)\project\ArticleView.aspx.cs

     文件      36864  2005-10-07 17:20  新闻系统2.0(全部C#源码版)\project\Bin\FredCK.FCKeditorV2.dll

     文件       6798  2007-03-30 22:21  新闻系统2.0(全部C#源码版)\project\Default.aspx

     文件       2402  2007-03-30 22:28  新闻系统2.0(全部C#源码版)\project\Default.aspx.cs

     文件      21678  2007-03-31 17:39  新闻系统2.0(全部C#源码版)\project\default.htm

     文件       2929  2007-03-29 02:46  新闻系统2.0(全部C#源码版)\project\FavList.aspx

     文件       2231  2007-03-29 02:51  新闻系统2.0(全部C#源码版)\project\FavList.aspx.cs

     文件        236  2005-05-31 12:57  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\behaviors\disablehandles.htc

     文件        111  2004-03-25 15:34  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\behaviors\hiddenfield.gif

     文件        691  2005-02-09 17:35  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\behaviors\hiddenfield.htc

     文件        822  2006-05-30 12:54  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\behaviors\showtableborders.htc

    ..A.S..        10  2006-12-30 02:18  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\behaviors\_desktop.ini

     文件       1944  2006-09-26 14:59  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\fck_editorarea.css

     文件       1889  2006-06-05 23:09  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\fck_internal.css

     文件       1404  2006-10-07 17:43  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\fck_showtableborders_gecko.css

     文件        184  2005-01-23 01:28  新闻系统2.0(全部C#源码版)\project\fckEditor\editor\css\images\fck_anchor.gif

............此处省略944个文件信息

评论

共有 条评论