403Webshell
Server IP : 103.118.17.23  /  Your IP : 216.73.216.101
Web Server : Microsoft-IIS/10.0
System : Windows NT RESELLERPLESK22 10.0 build 20348 (Windows Server 2016) AMD64
User : IWAM_plesk(default) ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  E:/Inetpub/vhosts/mesa.org.in/httpdocs/admission/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/vhosts/mesa.org.in/httpdocs/admission/page_details.aspx.cs
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;

public partial class admission_page_details : System.Web.UI.Page
{
    cnn cn = new cnn();
    DataSet ds;
    string x;

    DataRow drow;
    int record = 0;
    string changeurl;
    public void qry(string x)
    {
        try
        {
            ds = new DataSet();
            cn.da = new System.Data.SqlClient.SqlDataAdapter(x, cn.cn);
            cn.cbd.DataAdapter = cn.da;
            cn.da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
            cn.da.Fill(ds);
        }
        catch (Exception ex)
        {
            //toolStripStatusLabel1.Text = ex.Message.ToString();
        }


    }
    protected void Page_Load(object sender, EventArgs e)
    {
        x = "select * from incr";

        qry(x);

        DataSet cont = new DataSet();
        cn.da.Fill(cont);
        int x1;
        x1 = cont.Tables[0].Rows.Count - 1;

        if (x1 == -1)
        {
            record = 1;
        }
        else
        {

            record = Convert.ToInt32(cont.Tables[0].Rows[x1].ItemArray[1]);
            record += 1;
        }


        lblincr.Text = record.ToString();



        x = "insert visitor_no into incr ='" + lblincr.Text + "'";
        qry(x);

        cn.cmd.CommandType = CommandType.Text;
        cn.cmd.CommandText = "update incr set visitor_no ='" + lblincr.Text + "' where id= 1";
        cn.cn.Open();
        cn.cmd.Connection = cn.cn;
        cn.cmd.ExecuteNonQuery();
        cn.cn.Close();
        if (!IsPostBack)
        {

            changeurl = HttpUtility.UrlPathEncode(Request.Url.ToString());
            if (changeurl.Contains(" "))
            {
                Response.Redirect(changeurl.Replace(" ", "-"));
            }

            GetHMenuData();
            TextBox1.Text = this.Page.RouteData.Values["page_name"].ToString().Trim().Replace("-", " ");
            var tmp = TextBox1.Text;
            var tmp1 = TextBox1.Text;
            var res11 = tmp1.Trim(); // "hello world"
            var res21 = tmp1.Replace("_", " ");
            //string str = TextBox1.Text;
            //string ext = str.Substring(0, str.LastIndexOf("_") + 1);
            this.Page.Title = res21 + ", " + "Admission, MAHADEVRAO WANDRE INSTITUTE OF TECHNOLOGY, TURKEWADI";
            this.Page.MetaDescription = res21 + ", " + "MAHADEVRAO WANDRE INSTITUTE OF TECHNOLOGY, TURKEWADI" + "," + " " + "Most Popular College";
            this.Page.MetaKeywords = res21 + ", " + "Popular College" + "," + " " + "Turkewadi, Popular college";

          datas.DataSource = datass("top 1000");
        datas.DataBind();
            spnews.DataSource = spewss("top 1000");
            spnews.DataBind();
        }
    }
    private DataSet spewss(string top)
    {

        string conString = ConfigurationManager.ConnectionStrings["mesaConnectionString"].ConnectionString;
        string query = "SELECT " + top + " * FROM special_news where enable = 'Yes' ORDER by ID Desc";
        SqlCommand cmd = new SqlCommand(query);
        using (SqlConnection cn = new SqlConnection(conString))
        {
            using (SqlDataAdapter sda = new SqlDataAdapter())
            {
                cmd.Connection = cn;
                sda.SelectCommand = cmd;
                using (DataSet ds = new DataSet())
                {
                    sda.Fill(ds);
                    return ds;
                }
            }
        }
    }
    private DataSet datass(string top)
    {

        string conString = ConfigurationManager.ConnectionStrings["mesaConnectionString"].ConnectionString;
        string query = "SELECT " + top + " * FROM admission where enable = 'Yes' ORDER by sequence Asc";
        SqlCommand cmd = new SqlCommand(query);
        using (SqlConnection cn = new SqlConnection(conString))
        {
            using (SqlDataAdapter sda = new SqlDataAdapter())
            {
                cmd.Connection = cn;
                sda.SelectCommand = cmd;
                using (DataSet ds = new DataSet())
                {
                    sda.Fill(ds);
                    return ds;
                }
            }
        }
    }
    private void GetHMenuData()
    {
        DataTable table = new DataTable();
        x = "select id, menu, parent_id, url from Hmenudetails order by Sequence asc";
        qry(x);
        cn.da.Fill(table);
        DataView view = new DataView(table);
        view.RowFilter = "parent_id is NULL";
        foreach (DataRowView row in view)
        {
            MenuItem menuItem = new MenuItem(row["menu"].ToString(),
            row["id"].ToString());
            menuItem.NavigateUrl = row["url"].ToString();
           MenuBar.Items.Add(menuItem);
            AddChildItems1(table, menuItem);
        }
    }
    private void AddChildItems1(DataTable table, MenuItem menuItem)
    {
        DataView viewItem = new DataView(table);
        viewItem.RowFilter = "parent_id=" + menuItem.Value;
        foreach (DataRowView childView in viewItem)
        {
            MenuItem childItem = new MenuItem(childView["menu"].ToString(),
            childView["id"].ToString());
            childItem.NavigateUrl = childView["url"].ToString();
            menuItem.ChildItems.Add(childItem);
            AddChildItems1(table, childItem);
        }
    }
    protected override void Render(HtmlTextWriter writer)
    {
        StringBuilder sb = new StringBuilder();
        StringWriter sw = new StringWriter(sb);
        HtmlTextWriter hWriter = new HtmlTextWriter(sw);
        base.Render(hWriter);
        string html = sb.ToString();
        html = Regex.Replace(html, "<input[^>]*id=\"(__VIEWSTATE)\"[^>]*>", string.Empty, RegexOptions.IgnoreCase);
        writer.Write(html);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit