. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 87.98.249.37 / Your IP : 216.73.216.208 [ Web Server : Microsoft-IIS/10.0 System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_292(growel19p) ( 0) PHP Version : 8.3.12 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/growel.com/httpdocs/ |
Upload File : |
using BLL;
using BLL.Bo;
using BLL.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace GrowelWeb
{
public partial class Main : System.Web.UI.MasterPage
{
public string pgurl = "";
public string siteurl = "";
public bool isLandingPage = true;
protected void Page_Load(object sender, EventArgs e)
{
siteurl = clsComman.value("SiteUrl");
pgurl = HttpUtility.ParseQueryString(Request.Url.Query).ToString();
if (pgurl.Contains("image") == false)
{
if ( pgurl.Contains("productType"))
{
string tmpurl = (Request.Url.AbsolutePath).ToString();
tmpurl = tmpurl.Replace('=', '/');
tmpurl = tmpurl.Replace('+', ' ');
pgurl = "https://growel.com" + tmpurl;
}
else if (pgurl.Contains("np="))
{
string tmpurl = (Request.Url.AbsolutePath).ToString();
tmpurl = tmpurl.Replace('=', '/');
tmpurl = tmpurl.Replace('+', ' ');
pgurl = "https://growel.com" + tmpurl;
}
else {
pgurl = pgurl.Replace('=', '/');
pgurl = pgurl.Replace('+', ' ');
pgurl = "https://growel.com/" + pgurl;
}
if (pgurl.Contains("landingpage"))
{
isLandingPage = true;
}
else
{
isLandingPage = false;
}
HtmlLink canolink = new HtmlLink();
canolink.Attributes.Add(HtmlTextWriterAttribute.Rel.ToString().ToLower(), "canonical");
canolink.Href = pgurl.ToLower();
FindControl("head").Controls.Add(canolink);
Page.Header.DataBind();
}
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
// Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
if (txtCaptcha.Text.ToLower() == Session["CaptchaVerify"].ToString())
{
SaveData();
}
else
{
lblCaptchaMessage.Text = "Please enter correct captcha !";
lblCaptchaMessage.ForeColor = System.Drawing.Color.Red;
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "ShowPopup();", true); //this.GetType(), "Popup", "ShowPopup();", true);
}
}
protected void ValidateCaptcha(object sender, ServerValidateEventArgs e)
{
// Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
// e.IsValid = Captcha1.UserValidated;
// if (e.IsValid)
// {
// }
}
private void SaveData()
{
EnquiryBo bo = new EnquiryBo();
EnquiryService enquiryService = new EnquiryService();
bo.Type = ddlservies.SelectedValue;
bo.ClientName = txtname.Text;
bo.EmailId = txtemail.Text;
bo.EnquiryType = "Quick Enquiry";
bo.MobileNo = txtmobile.Text;
bo.Country = ddlcountry.SelectedValue;
bo.StateName = txtstate.Text;
bo.CityName = txtCity.Text;
bo.ContactPerson = "";
bo.Address = "";
bo.Description = "";
bo.Vertical = ddlservies.SelectedValue;
Int64 Id = enquiryService.AddEnquiry(bo);
SendMail("Quick Enquiry", txtname.Text, ddlcountry.SelectedValue, txtstate.Text, txtCity.Text, txtmobile.Text, txtemail.Text, "",ddlservies.SelectedValue);
if (Id > 0)
{
Response.Redirect(siteurl + "Thanks-you.aspx");
}
else
{
}
}
protected void btnGetAQuote_Click(object sender, EventArgs e)
{
EnquiryBo bo = new EnquiryBo();
EnquiryService enquiryService = new EnquiryService();
string url = Request.RawUrl;
bo.Type = url.Split('/')[2];
bo.ClientName = txtnameQ.Text;
bo.EmailId = txtemailQ.Text;
bo.EnquiryType = "Get A Quote";
bo.MobileNo = txtmobileQ.Text;
bo.Country = ddlcountryQ.SelectedValue;
bo.StateName = txtstateQ.Text;
bo.CityName = txtcityQ.Text;
bo.ContactPerson = "";
bo.Address = "";
bo.Description = siteurl + url;
bo.Vertical = drpVerticalQ.SelectedValue;
// = siteurl + url;
Int64 Id = enquiryService.AddEnquiry(bo);
SendMail("Get A Quote", txtnameQ.Text, ddlcountryQ.SelectedValue,txtstateQ.Text, txtcityQ.Text, txtmobileQ.Text, txtemailQ.Text, siteurl + url,drpVerticalQ.SelectedValue);
if (Id > 0)
{
Response.Redirect(siteurl + "Thanks-you.aspx");
}
else
{
}
}
private void SendMail(string subject,string Name,string Country,string State, string City, string Mobile,string Email,string Feedback,string vertical)
{
//string subject = "Growel - Downlooad";
string message =
"Dear " + Name + ", <br>" +
"<table width='500' border='0' align='center' cellpadding='10' cellspacing='4' style='font-family:Arial, Helvetica, sans-serif;font-size:12px;border:1px solid #ddd;'><tr><td colspan='2' align='center' valign='top'><p><img src='https://growel.com/Includes/images/logo.png'>" +
"</p></td></tr><tr><td width='200' align='right' valign='top'>" +
"<strong>Name Of The Person </strong></td><td>" + Name + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Country </strong></td><td>" + Country + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>State </strong></td><td>" + State + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>City </strong></td><td>" + City + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Mobile </strong></td><td>" + Mobile + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Email</strong></div></td><td>" + Email + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Vertical</strong></div></td><td>" + vertical + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Feedback Details</strong></td><td>" + Feedback + "</td></tr>";
message += "<tr><td align='right' valign='top'> </td><td> </td></tr></table><p> </p>";
clsComman clsComman = new clsComman();
clsComman.SendMail(subject, message);
}
}
}