public static string gettabcontentadmin(string value) { string html = ""; LBR_LINKS obj = new LBR_LINKS(); DataTable dt_con = new DataTable(); try { string[] arraylinks = value.Split('_'); if (arraylinks.Length == 3) { obj.LINK_TABID = Int32.Parse(arraylinks[1]); obj.LINK_SIGNUPID = Int32.Parse(arraylinks[0]); string newcontent = ""; //if (Array.IndexOf(arraylinks[2].Split(','), "" + obj.LINK_TABID + "") >= 0) //{ // //newcontent = activetabadmin(obj.LINK_TABID); //} //else //{ newcontent = loadhtml(obj); newcontent = newcontent + "@!~&*" + "tabadmin" + obj.LINK_TABID + "default" + "@!~&*" + "invalid" + "@!~&*" + "invalid"; // totalcontent = totalcontent + "@!~&*" + innerhtml + remainingtabs + "@!~&*" + tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>" + "@!~&*" + remtabs; //} if (newcontent != "" || newcontent != null) { html = newcontent; } else { html = ""; } } } catch (Exception ex) { } return html; }
public static bool formatnewcopy(DataTable dt, string emailnewid, string lbrid) { string email = emailnewid; bool status = false; try { string htmlcontent = ""; LBR_LINKS obj = new LBR_LINKS(); obj.LINK_CREATEDDBY = Int32.Parse(dt.Rows[0]["LINK_CREATEDBY"].ToString()); obj.LINK_MODIFIEDBY = Int32.Parse(dt.Rows[0]["LINK_MODIFIEDBY"].ToString()); obj.LINK_DESCRIPTION = dt.Rows[0]["LINK_DESCRIPTION"].ToString().Replace("{", "").Replace("}", "").Trim(); obj.LINK_ID = Int32.Parse(dt.Rows[0]["LINK_ID"].ToString()); obj.LINK_IMAGEPATH = dt.Rows[0]["LINK_IMAGEPATH"].ToString(); obj.LINK_PATH = dt.Rows[0]["LINK_PATH"].ToString(); obj.LINK_SIGNUPID = Int32.Parse(dt.Rows[0]["LINK_SIGNUPID"].ToString()); obj.LINK_STATUS = 1; obj.LINK_TABID = Int32.Parse(dt.Rows[0]["LINK_TABID"].ToString()); // obj.LINK_SIGNUPID = Int32.Parse(array[1]); obj.LINK_TYPE = Int32.Parse(dt.Rows[0]["LINK_TYPE"].ToString()); obj.LINK_TITLE = dt.Rows[0]["LINK_TITLE"].ToString().Replace("{", "").Replace("}", "").Trim(); string id = dt.Rows[0]["link_id"].ToString(); if (obj.LINK_TYPE == 1) { Match regexMatch = Regex.Match(dt.Rows[0]["LINK_PATH"].ToString(), @"youtu(?:\.be|be\.com)/(?:.*v(?:/|=)|(?:.*/)?)([a-zA-Z0-9-_]+)", RegexOptions.IgnoreCase); Match vimeoMatch = Regex.Match(dt.Rows[0]["LINK_PATH"].ToString(), @"vimeo\.com/(?:.*#|.*/videos/)?([0-9]+)", RegexOptions.IgnoreCase); if (regexMatch.Success || vimeoMatch.Success) { if (regexMatch.Success) { obj.LINK_TYPE = 1; } else if (vimeoMatch.Success) { obj.LINK_TYPE = 2; } } else { obj.LINK_TYPE = 3; } if (obj.LINK_TYPE.ToString() == "1" || obj.LINK_TYPE.ToString() == "2") { string value = ""; if (obj.LINK_TYPE.ToString() == "1") { value = regexMatch.Groups[1].Value; //htmlcontent = "1"; if (lbrid != "22") { htmlcontent = "<div class=\"box\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','none')\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"http://www.youtube.com/embed/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } else { htmlcontent = "<div class=\"box\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','none')\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" class=\"deleteadmin\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span><iframe class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"http://www.youtube.com/embed/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } } else if (obj.LINK_TYPE.ToString() == "2") { value = vimeoMatch.Groups[1].Value; // htmlcontent = "2"; // htmlcontent = htmlcontent + "!@#" + value + "!@#" + obj.LINK_TITLE + "!@#" + obj.LINK_DESCRIPTION; if (lbrid != "22") { htmlcontent = "<div class=\"box\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','none')\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a></span><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"//player.vimeo.com/video/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } else { htmlcontent = "<div class=\"box\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','none')\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" class=\"deleteadmin\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a></span><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><iframe class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"//player.vimeo.com/video/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } } } else if (obj.LINK_TYPE.ToString() == "3") { if (obj.LINK_IMAGEPATH != null && obj.LINK_IMAGEPATH != "0") { if (lbrid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><div class=\"boximage\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" style=\"background-image:url('" + obj.LINK_IMAGEPATH + "');\"><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + string.Format(obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "")) + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span></div><div class=\"boxtext\" ><a href='#' onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\">" + string.Format(dt.Rows[0]["link_title"].ToString().Replace("'", "")) + "</a></div></div>"; } else { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><div class=\"boximage\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" style=\"background-image:url('" + obj.LINK_IMAGEPATH + "');\"><span class=\"delete\"><a href=\"#\" class=\"deleteadmin\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + string.Format(obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "")) + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span></div><div class=\"boxtext\" ><a href='#' onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\">" + string.Format(dt.Rows[0]["link_title"].ToString().Replace("'", "")) + "</a></div></div>"; } } else { if (lbrid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span>" + dt.Rows[0]["link_title"].ToString().Replace("{", "").Replace("}", "") + "<br/>" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", "") + "" + "</div>"; } else { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" class=\"deleteadmin\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a href=\"#\" title=\"Move or Copy\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a><a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a></span>" + dt.Rows[0]["link_title"].ToString().Replace("{", "").Replace("}", "") + "<br/>" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", "") + "" + "</div>"; } } } } else { htmlcontent = htmlformcopy(obj, emailnewid, lbrid); } //if(htmlcontent!="") //{ status = BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); //} } catch (Exception ex) { status = false; } return status; }
public static string gettabcontent(string value) { string html = ""; LBR_LINKS obj = new LBR_LINKS(); DataTable dt_con = new DataTable(); try { string[] arraylinks = value.Split('_'); if (arraylinks.Length == 2) { obj.LINK_TABID = Int32.Parse(arraylinks[1]); obj.LINK_SIGNUPID = Int32.Parse(arraylinks[0]); string newcontent = ""; { DataTable dt_links = BLL.get_links(obj); newcontent = System.Text.RegularExpressions.Regex.Replace(LoadlinksStatic(dt_links), @"\s+", " "); // newcontent = newcontent + "@!~&*" + "tab" + obj.LINK_TABID + "default" + "@!~&*" + "invalid" + "@!~&*" + "invalid"; // totalcontent = totalcontent + "@!~&*" + innerhtml + remainingtabs + "@!~&*" + tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>" + "@!~&*" + remtabs; newcontent = newcontent + "@!~&*" + value; } if (newcontent != "" || newcontent != null) { html = newcontent; } else { html = "" + "@!~&*" + value; } } bool st = BLL.ExecuteNonQuery("update lbr_links set link_sharedbystatus=1 where link_tabid=" + obj.LINK_TABID + ""); } catch (Exception ex) { } return html; }
public void loadtabs(string lbrid,string imageurl,string name) { LBR_SIGNUP obj = new LBR_SIGNUP(); obj.LBR_ID = Int32.Parse(lbrid); // DataSet dt_set = BLL.get_tabs(obj); DataTable dt_atab = BLL.get_tabs(obj); DataTable dt_tabs = BLL.ExecuteQuery("exec USP_LBR_SIGNUP @OPERATION='LOADANONYMOUSTAB', @LBR_ID='" + obj.LBR_ID + "'"); dt_tabs.Merge(dt_atab); string innerhtml = ""; string tabcontent = ""; string remainingtabs = ""; string remainintabscontent = ""; int sharedcount = 0; int anonyshared = 0; //int k = 0; if (dt_tabs.Rows.Count > 0) { if(imageurl!=null && imageurl!="") { innerhtml = " <li class='nav-header'><div class='dropdown profile-element'><span><img id='img_user' alt='profile pic' class='img-circle' src='"+ imageurl +"' /></span><a href='#'><span class='clear'><span class='block m-t-xs'><strong id='lbl_name' class='font-bold'>"+ name +"</strong></span></span></a></div></li><li class='nav-header' style='padding-top: 0px !important;padding-bottom: 0px;padding-left: 0px;'><div class='dropdown profile-element' style='padding:13px 25px'><a data-toggle='modal' data-target='#mynewtab'><span class='clear'>Create a new tab</span></a></div></li>"; } else { innerhtml = " <li class='nav-header'><div class='dropdown profile-element'><span><img id='img_user' alt='profile pic' class='img-circle' src='Images/Dummy.jpg' /></span><a href='#'><span class='clear'><span class='block m-t-xs'><strong id='lbl_name' class='font-bold'>"+ name +"</strong></span></span></a></div></li><li class='nav-header' style='padding-top: 0px !important;padding-bottom: 0px;padding-left: 0px;'><div class='dropdown profile-element' style='padding:13px 25px'><a data-toggle='modal' data-target='#mynewtab'><span class='clear'>Create a new tab</span></a></div></li>"; } for (int i = 0; i < dt_tabs.Rows.Count; i++) { sharedcount = 0; anonyshared = 0; sharedcount = Int32.Parse(dt_tabs.Rows[i]["sharedcount"].ToString()); if (sharedcount == 0) { if(i==0) { innerhtml = innerhtml + "<li class='pull-left leftwidth active'><a title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\" id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href='#' onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" ><span class='nav-label block'>" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</span></a><ul></ul></li><li class='pull-left '> <a class='rightpadding'><span class='block m-t-xs'><b class='caret'></b></span><ul class='dropdown-menu animated fadeInRight m-t-xs'><li><a onclick=\"Sharetotaltableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Share</a></li><li><a onclick=\"opentabnameleft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Rename</a></li><li><a onclick=\"deletetableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Delete</a></li></ul></a></li>"; } else { // innerhtml = "<li class=\"active\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; innerhtml = innerhtml + "<li class='pull-left leftwidth'><a title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\" id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href='#' onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" ><span class='nav-label block'>" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</span></a><ul></ul></li><li class='pull-left '> <a class='rightpadding'><span class='block m-t-xs'><b class='caret'></b></span><ul class='dropdown-menu animated fadeInRight m-t-xs'><li><a onclick=\"Sharetotaltableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Share</a></li><li><a onclick=\"opentabnameleft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Rename</a></li><li><a onclick=\"deletetableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Delete</a></li></ul></a></li>"; } } else { if(i==0) { innerhtml = innerhtml + "<li class='pull-left leftwidth active'><a title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\" id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href='#' onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" ><span class='nav-label block'>" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "<span class='label label-warning pull-right' id=\"lbn_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\">" + sharedcount + "</span></span></a><ul></ul></li><li class='pull-left '> <a class='rightpadding'><span class='block m-t-xs'><b class='caret'></b></span><ul class='dropdown-menu animated fadeInRight m-t-xs'><li><a onclick=\"Sharetotaltableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Share</a></li><li><a onclick=\"opentabnameleft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Rename</a></li><li><a onclick=\"deletetableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Delete</a></li></ul></a></li>"; } else { innerhtml = innerhtml + "<li class='pull-left leftwidth'><a title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\" id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href='#' onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" ><span class='nav-label block'>" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "<span class='label label-warning pull-right' id=\"lbn_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\">" + sharedcount + "</span></span></a><ul></ul></li><li class='pull-left '> <a class='rightpadding'><span class='block m-t-xs'><b class='caret'></b></span><ul class='dropdown-menu animated fadeInRight m-t-xs'><li><a onclick=\"Sharetotaltableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Share</a></li><li><a onclick=\"opentabnameleft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\">Rename</a></li><li><a onclick=\"deletetableft('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "');\" >Delete</a></li></ul></a></li>"; } } if(i==0) { LBR_LINKS objlinks = new LBR_LINKS(); objlinks.LINK_TABID = Int32.Parse(dt_tabs.Rows[i]["TAB_ID"].ToString()); objlinks.LINK_SIGNUPID = Int32.Parse(lbrid); DataTable dt_links = BLL.get_links(objlinks); string content = System.Text.RegularExpressions.Regex.Replace(Loadlinks(dt_links), @"\s+", " "); //if (content != string.Empty) //{ tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + content + "</div>"; //} //else //{ // tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</div>"; //} hid_tab.Value = lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); div_tabcontent.InnerHtml = tabcontent; } } //ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "myJsFn", "loadmenus("++")", true); div_menus.InnerHtml = innerhtml; } }
public static string buttonsaveNewclick(List<string> array) { string htmlcontent = ""; DataTable dt = new DataTable(); LinkDetails link = new LinkDetails(); LBR_LINKS obj = new LBR_LINKS(); string id = ""; try { if (array.Count == 4) { string[] arraylinks = array[3].Split(new string[] { "!@#" }, StringSplitOptions.None); if (arraylinks.Length == 6) { obj.LINK_CREATEDDBY = Int32.Parse(array[1]); obj.LINK_MODIFIEDBY = Int32.Parse(array[1]); obj.LINK_DESCRIPTION = arraylinks[3].Replace("{", "").Replace("}", "").Trim(); if (arraylinks[0] == "3") { obj.LINK_IMAGEPATH = arraylinks[1]; } else { obj.LINK_IMAGEPATH = arraylinks[5]; } obj.LINK_PATH = arraylinks[4]; obj.LINK_SIGNUPID = Int32.Parse(array[1]); obj.LINK_STATUS = 1; obj.LINK_TABID = Int32.Parse(array[2]); obj.LINK_SIGNUPID = Int32.Parse(array[1]); obj.LINK_TYPE = 1; obj.LINK_TITLE = arraylinks[2].Replace("{", "").Replace("}", "").Trim(); dt = BLL.set_link(obj); if (dt.Rows.Count > 0) { htmlcontent=LoadlinksStatic(dt); } } } } catch (Exception ex) { throw ex; } return htmlcontent; }
public void loadadmintabs() { LBR_SIGNUP obj = new LBR_SIGNUP(); obj.LBR_ID = 22; DataTable dt_tabs = BLL.get_tabs(obj); string innerhtml = ""; string tabcontent = ""; string remainingtabs = ""; string remainintabscontent = ""; //int k = 0; if (dt_tabs.Rows.Count > 0) { for (int i = 0; i < dt_tabs.Rows.Count; i++) { if (i <= 2) { if (i == 0) { innerhtml = "<li class=\"admintabs\" class=\"active\"><a class=\"admintabsa\" id=\"aadmin_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttabadmin('22_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; LBR_LINKS objlinks = new LBR_LINKS(); objlinks.LINK_TABID = Int32.Parse(dt_tabs.Rows[i]["TAB_ID"].ToString()); objlinks.LINK_SIGNUPID = 22; string content = loadhtml(objlinks); //if (content != string.Empty) //{ tabcontent = "<div class=\"tab-pane fade active in\" id=\"tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + content + "</div>"; //} //else //{ // tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</div>"; //} hid_tabadmin.Value = "22" + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); } else { innerhtml = innerhtml + "<li class=\"admintabs\"><a class=\"admintabsa\" id=\"aadmin_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttabadmin('22_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; tabcontent = tabcontent + "<div class=\"tab-pane fade\" id=\"tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; } } else { remainingtabs = remainingtabs + "<li class=\"\"><a id=\"aadmin_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttabadmin('22_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; remainintabscontent = remainintabscontent + "<div class=\"tab-pane fade\" id=\"tabadmin" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; if (hid_remainingtabsadmin.Value != "") { hid_remainingtabsadmin.Value = hid_remainingtabsadmin.Value + "," + dt_tabs.Rows[i]["TAB_ID"].ToString(); } else { hid_remainingtabsadmin.Value = dt_tabs.Rows[i]["TAB_ID"].ToString(); } } } remainingtabs = "<li class=\"dropdown\" style=\"width:10px !important;\" title=\"Click Here more Tabs\"><a href=\"#\" data-toggle=\"dropdown\" class=\"alltabs\"><i class=\"fa fa-ellipsis-v\"></i></a><ul id='div_remainingtabsadmin' class=\"dropdown-menu dropdown__menu1\" role=\"menu\">" + remainingtabs + "</ul></li>"; //u_admintabs.InnerHtml = innerhtml + remainingtabs; //div_admintabs.InnerHtml = tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>"; } }
public static string refreshloadtabsnew(string lbrid) { string totalcontent = ""; try { LBR_SIGNUP obj = new LBR_SIGNUP(); obj.LBR_ID = Int32.Parse(lbrid); DataTable dt_tabs = BLL.get_tabs(obj); DataTable dt_atab = BLL.ExecuteQuery("exec USP_LBR_SIGNUP @OPERATION='LOADANONYMOUSTAB', @LBR_ID='" + obj.LBR_ID + "'"); string innerhtml = ""; string tabcontent = ""; string remainingtabs = ""; string remainintabscontent = ""; //int k = 0; if (dt_tabs.Rows.Count > 0) { if (dt_tabs.Rows.Count > 5) { for (int i = 0; i < dt_tabs.Rows.Count; i++) { if (i <= 4) { if (i == 0) { innerhtml = "<li class=\"active\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; LBR_LINKS objlinks = new LBR_LINKS(); objlinks.LINK_TABID = Int32.Parse(dt_tabs.Rows[i]["TAB_ID"].ToString()); objlinks.LINK_SIGNUPID = Int32.Parse(lbrid); // string content = loadhtml(objlinks); //if (content != string.Empty) //{ tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + loadhtml(objlinks) + "</div>"; //} //else //{ // tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</div>"; //} // hid_tab.Value = dt_user.Rows[0]["lbr_id"].ToString() + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); totalcontent = lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); } else { if ((i + 1) == dt_tabs.Rows.Count) { if (dt_atab.Rows.Count > 0) { innerhtml = innerhtml + "<li class=\"\"><a id=\"a_" + dt_atab.Rows[0]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_atab.Rows[0]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_atab.Rows[0]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_atab.Rows[0]["TAB_NAME"].ToString() + "\">" + dt_atab.Rows[0]["TAB_NAME"].ToString() + "</a></li>"; tabcontent = tabcontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_atab.Rows[0]["TAB_ID"].ToString() + "default\"></div>"; } } else { innerhtml = innerhtml + "<li class=\"\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; tabcontent = tabcontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; } } } else { if (i == 5) { if (dt_atab.Rows.Count > 0) { innerhtml = innerhtml + "<li class=\"\"><a id=\"a_" + dt_atab.Rows[0]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_atab.Rows[0]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_atab.Rows[0]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_atab.Rows[0]["TAB_NAME"].ToString() + "\">" + dt_atab.Rows[0]["TAB_NAME"].ToString() + "</a></li>"; tabcontent = tabcontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_atab.Rows[0]["TAB_ID"].ToString() + "default\"></div>"; } } remainingtabs = remainingtabs + "<li class=\"\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; remainintabscontent = remainintabscontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; } } remainingtabs = "<li class=\"dropdown\" title=\"Click Here more Tabs\"><a href=\"#\" data-toggle=\"dropdown\" class=\"smalltab\"><i class=\"fa fa-chevron-down\"></i></a><ul id='div_remainingtabs' class=\"dropdown-menu dropdown__menu\" role=\"menu\">" + remainingtabs + "<li class=\"\"> <a href=\"#\" class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#mynewtab\">Create new tab</a></li></ul></li>"; remainintabscontent = remainintabscontent + "<div class=\"tab-pane fade\" id=\"tabnewdefault\">Newtab</div>"; totalcontent = totalcontent + "!@#" + innerhtml + remainingtabs + "!@#" + tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>"; } else { dt_tabs.Merge(dt_atab); for (int i = 0; i < dt_tabs.Rows.Count; i++) { if (i <= 5) { if (i == 0) { innerhtml = "<li class=\"active\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; LBR_LINKS objlinks = new LBR_LINKS(); objlinks.LINK_TABID = Int32.Parse(dt_tabs.Rows[i]["TAB_ID"].ToString()); objlinks.LINK_SIGNUPID = Int32.Parse(lbrid); // string content = loadhtml(objlinks); //if (content != string.Empty) //{ tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + loadhtml(objlinks) + "</div>"; //} //else //{ // tabcontent = "<div class=\"tab-pane fade active in\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</div>"; //} // hid_tab.Value = dt_user.Rows[0]["lbr_id"].ToString() + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); totalcontent = lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString(); } else { innerhtml = innerhtml + "<li class=\"\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\" title=\"" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; tabcontent = tabcontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; } } else { remainingtabs = remainingtabs + "<li class=\"\"><a id=\"a_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "\" href=\"#tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\" onclick=\"selecttab('" + lbrid + "_" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "')\" data-toggle=\"tab\">" + dt_tabs.Rows[i]["TAB_NAME"].ToString() + "</a></li>"; remainintabscontent = remainintabscontent + "<div class=\"tab-pane fade\" id=\"tab" + dt_tabs.Rows[i]["TAB_ID"].ToString() + "default\"></div>"; } } remainingtabs = "<li class=\"dropdown\" title=\"Click Here more Tabs\"><a href=\"#\" data-toggle=\"dropdown\" class=\"smalltab\"><i class=\"fa fa-chevron-down\"></i></a><ul id='div_remainingtabs' class=\"dropdown-menu dropdown__menu\" role=\"menu\">" + remainingtabs + "<li class=\"\"> <a href=\"#\" class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#mynewtab\">Create new tab</a></li></ul></li>"; remainintabscontent = remainintabscontent + "<div class=\"tab-pane fade\" id=\"tabnewdefault\">Newtab</div>"; totalcontent = totalcontent + "!@#" + innerhtml + remainingtabs + "!@#" + tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>"; } //tabs.InnerHtml = innerhtml + remainingtabs; // div_tabcontent.InnerHtml = tabcontent + remainintabscontent + "<div class=\"clearfix\"></div>"; } } catch (Exception ex) { } return totalcontent; }
public static string buttonsaveclick(List<string> arraylinks) { string htmlcontent = ""; DataTable dt = new DataTable(); LinkDetails link = new LinkDetails(); LBR_LINKS obj = new LBR_LINKS(); string id = ""; try { string linknew = arraylinks[0]; if (linknew != string.Empty) { if (!linknew.Trim().Contains("http://") && !linknew.Trim().Contains("https://")) { linknew = "http://" + linknew; } link.Url = linknew; link = getlinkdetailsnew(link); Match regx = Regex.Match(link.Url, @"http://([\\w+?\\.\\w+])+([a-zA-Z0-9\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)_\\-\\=\\+\\\\\\/\\?\\.\\:\\;\\'\\,]*)?", RegexOptions.IgnoreCase); //Regex regx = new Regex("http://([\\w+?\\.\\w+])+([a-zA-Z0-9\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)_\\-\\=\\+\\\\\\/\\?\\.\\:\\;\\'\\,]*)?", RegexOptions.IgnoreCase); //HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("" + link.Url + ""); //request.Proxy = null; //request.Method = "HEAD"; //bool exists; //try //{ // request.GetResponse(); // exists = true; //} //catch //{ // exists = false; //} if (link.status != false) { if (link.Description != null) { obj.LINK_DESCRIPTION = (link.Description.ToString().Replace("{", "").Replace("}", "")).Trim().Replace("'", ""); } if (link.Image != null) { obj.LINK_IMAGEPATH = link.Image.Url.ToString(); } // if (dt_user.Rows.Count > 0) { obj.LINK_MODIFIEDBY = Int32.Parse(arraylinks[1]); obj.CREATEDBY = Int32.Parse(arraylinks[1]); } obj.LINK_PATH = link.Url; obj.LINK_STATUS = 1; if (link.Title != null) { obj.LINK_TITLE = (link.Title.ToString()).Replace("{", "").Replace("}", "").Trim().Replace("'", ""); } obj.LINK_TYPE = 1; //string[] values = hid_tab.Value.Split('_'); if (arraylinks.Count == 3) { obj.LINK_TABID = Int32.Parse(arraylinks[2]); obj.LINK_SIGNUPID = Int32.Parse(arraylinks[1]); if (link.Title == null || link.Title == "") { obj.LINK_TITLE = link.Url.Replace("{", "").Replace("}", "").Trim().Replace("'", ""); } if (link.Url.Contains("fb.com") || link.Url.Contains("facebook.com")) { obj.LINK_TITLE = "Facebook<br/>" + link.Url.Replace("{", "").Replace("}", "") + ""; obj.LINK_IMAGEPATH = "../images/fb_icon_325x325.png"; } // dt = BLL.set_link(obj); // id = dt.Rows[0]["link_id"].ToString(); // if (dt.Rows.Count > 0) { obj.LINK_PATH = linknew; string url = ""; Match regexMatch = Regex.Match(obj.LINK_PATH, @"youtu(?:\.be|be\.com)/(?:.*v(?:/|=)|(?:.*/)?)([a-zA-Z0-9-_]+)", RegexOptions.IgnoreCase); Match vimeoMatch = Regex.Match(obj.LINK_PATH, @"vimeo\.com/(?:.*#|.*/videos/)?([0-9]+)", RegexOptions.IgnoreCase); if (regexMatch.Success || vimeoMatch.Success) { string value = ""; if (regexMatch.Success) { value = regexMatch.Groups[1].Value; htmlcontent = "1"; htmlcontent = htmlcontent + "!@#" + value + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", "") + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"http://www.youtube.com/embed/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } else if (vimeoMatch.Success) { value = vimeoMatch.Groups[1].Value; htmlcontent = "2"; htmlcontent = htmlcontent + "!@#" + value + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", "") + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"//player.vimeo.com/video/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } htmlcontent = htmlcontent + "!@#" + obj.LINK_PATH + "!@#" + obj.LINK_IMAGEPATH; } else { htmlcontent = "3"; if (obj.LINK_IMAGEPATH != "" && obj.LINK_IMAGEPATH != null) { if (obj.LINK_TITLE != null && obj.LINK_TITLE != "") { htmlcontent = htmlcontent + "!@#" + obj.LINK_IMAGEPATH + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", ""); if (obj.LINK_DESCRIPTION != null && obj.LINK_DESCRIPTION != "") { htmlcontent = htmlcontent + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); } else { htmlcontent = htmlcontent + "!@#" + "0"; } } else { htmlcontent = htmlcontent + "!@#" + obj.LINK_IMAGEPATH + "!@#" + "0"; if (obj.LINK_DESCRIPTION != null && obj.LINK_DESCRIPTION != "") { htmlcontent = htmlcontent + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); } else { htmlcontent = htmlcontent + "!@#" + "0"; } } // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><div class=\"boximage\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" style=\"background-image:url('" + obj.LINK_IMAGEPATH + "');\"><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span></div><div class=\"boxtext\" ><a href='#' onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\">" + dt.Rows[0]["link_title"].ToString() + "</a></div></div>"; //// htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span>" + dt.Rows[0]["link_title"].ToString() + "</div>"; } else { if (obj.LINK_TITLE != null && obj.LINK_TITLE != "") { htmlcontent = htmlcontent + "!@#" + "0" + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", ""); if (obj.LINK_DESCRIPTION != null && obj.LINK_DESCRIPTION != "") { htmlcontent = htmlcontent + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); } else { htmlcontent = htmlcontent + "!@#" + "0"; } } else { htmlcontent = htmlcontent + "!@#" + "0" + "!@#" + "0"; if (obj.LINK_DESCRIPTION != null && obj.LINK_DESCRIPTION != "") { htmlcontent = htmlcontent + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); } else { htmlcontent = htmlcontent + "!@#" + "0"; } } // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span>" + new Uri("" + link.Url + "").GetLeftPart(UriPartial.Path) + "<br/>" + dt.Rows[0]["link_title"].ToString() + "</div>"; } Uri myUri = new Uri(obj.LINK_PATH); string host = myUri.Host; // HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority); htmlcontent = htmlcontent + "!@#" + obj.LINK_PATH + "!@#" + host; } if (htmlcontent != "") { //bool status = BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); //txt_url.Text = string.Empty; //hid_html.Value = htmlcontent; //ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "myJsFn", "saveurl();return false;", true); } } } //} } else { //BLL.ShowMessage(this, "Please enter a valid URL"); //txt_url.Focus(); htmlcontent = "invalid"; } } else { //BLL.ShowMessage(this, "Please enter URL"); //txt_url.Focus(); } } catch (Exception ex) { } return htmlcontent; }
public static string loadhtml(LBR_LINKS obj) { string html = ""; try { DataTable dt = BLL.get_links(obj); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["link_type"].ToString() == "1") { Match regexMatch = Regex.Match(dt.Rows[i]["link_path"].ToString(), @"youtu(?:\.be|be\.com)/(?:.*v(?:/|=)|(?:.*/)?)([a-zA-Z0-9-_]+)", RegexOptions.IgnoreCase); Match vimeoMatch = Regex.Match(dt.Rows[i]["link_path"].ToString(), @"vimeo\.com/(?:.*#|.*/videos/)?([0-9]+)", RegexOptions.IgnoreCase); if (regexMatch.Success || vimeoMatch.Success) { string value = ""; if (regexMatch.Success) { value = regexMatch.Groups[1].Value; // htmlcontent = htmlcontent + "!@#" + value + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", "") + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"http://www.youtube.com/embed/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } else if (vimeoMatch.Success) { value = vimeoMatch.Groups[1].Value; //htmlcontent = "2"; // htmlcontent = htmlcontent + "!@#" + value + "!@#" + obj.LINK_TITLE.Replace("{", "").Replace("}", "") + "!@#" + obj.LINK_DESCRIPTION.Replace("{", "").Replace("}", ""); // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" onclick=\"OpenInNewTab('" + obj.LINK_PATH + "','divbox_" + id + "')\" ><span class=\"delete\"><a href=\"#\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a></span><iframe class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"//player.vimeo.com/video/" + value + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>"; } //htmlcontent = htmlcontent + "!@#" + obj.LINK_PATH + "!@#" + obj.LINK_IMAGEPATH; } } } } catch (Exception ex) { } return html; }
public static string htmlformcopy(LBR_LINKS obj, string emailnewid, string lbrid) { string htmlcontent = ""; string userid = obj.LINK_SIGNUPID.ToString(); string id = obj.LINK_ID.ToString(); string email = emailnewid; try { if (IsImageFile(obj.LINK_TITLE)) { { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><img onclick=\"onclickimage('" + obj.LINK_PATH + "','none')\" class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"" + obj.LINK_PATH + "\"/></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a class='deleteadmin' href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><img onclick=\"onclickimage('" + obj.LINK_PATH + "','none')\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"" + obj.LINK_PATH + "\"/></div>"; //htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><img onclick=\"onclickimage('" + obj.LINK_PATH + "','none')\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" src=\"" + obj.LINK_PATH + "\"/></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } //else //{ //} } else if (IstextFile(obj.LINK_TITLE)) { string text = ""; //try //{ // text = System.IO.File.ReadAllText(obj.LINK_PATH); //} //catch (Exception ex) //{ text = obj.LINK_DESCRIPTION; //} string title = ""; if (text.Length >= 250) { title = (text.Substring(0, 250)); } else { title = (text); } obj.LINK_TYPE = 3; DataTable dt = BLL.set_link(obj); { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div onclick=\"$('#modalopen_" + id + "').modal('show')\" class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'>" + title + "<span class='wrap-indicator' title='" + obj.LINK_TITLE + "' onclick=\"$('#modalopen_" + id + "').modal('show')\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100% ;height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a class='deleteadmin' href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div onclick=\"$('#modalopen_" + id + "').modal('show')\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='adminh4class'>" + obj.LINK_TITLE + "</h4>" + title + "<span class='wrap-indicator' title='" + obj.LINK_TITLE + "' onclick=\"$('#modalopen_" + id + "').modal('show')\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='adminh4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } else if (IspdfFile(obj.LINK_TITLE)) { // System.Text.StringBuilder text = new System.Text.StringBuilder(); string text = ""; //try //{ // //text = System.IO.File.ReadAllText(obj.LINK_PATH); // using (PdfReader reader = new PdfReader(obj.LINK_PATH)) // { // if (reader.NumberOfPages >= 1) // { // for (int k = 1; k <= reader.NumberOfPages; k++) // { // text = text + PdfTextExtractor.GetTextFromPage(reader, k); // } // } // } //} //catch (Exception ex) //{ text = obj.LINK_DESCRIPTION; //} string title = ""; if (text.Length >= 250) { title = (text.Substring(0, 250)); } else { title = (text); } obj.LINK_TYPE = 3; { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div onclick=\"$('#modalopen_" + id + "').modal('show')\" class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'>" + title + "<span class='wrap-indicator' title='" + obj.LINK_TITLE + "' onclick=\"$('#modalopen_" + id + "').modal('show')\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100% ;height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div onclick=\"$('#modalopen_" + id + "').modal('show')\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='adminh4class'>" + obj.LINK_TITLE + "</h4>" + title + "<span class='wrap-indicator' title='" + obj.LINK_TITLE + "' onclick=\"$('#modalopen_" + id + "').modal('show')\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='adminh4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div onclick=\"$('#modalopen_" + id + "').modal('show')\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'>" + title + "<span class='wrap-indicator' title='" + obj.LINK_TITLE + "' onclick=\"$('#modalopen_" + id + "').modal('show')\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } else if (IswordFile(obj.LINK_TITLE) || IsexcelFile(obj.LINK_TITLE)) { // System.Text.StringBuilder text = new System.Text.StringBuilder(); string text = ""; string path = obj.LINK_PATH; // text = BLL.loadword(path); if (text == "") { text = obj.LINK_TITLE; } string title = ""; if (text.Length >= 250) { title = (text.Substring(0, 250)); } else { title = (text); } obj.LINK_TYPE = 3; { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><span class='wrap-indicator' title='" + obj.LINK_TITLE + "' download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100% ;height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" class='deleteadmin' title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='adminh4class'>" + obj.LINK_TITLE + "</h4><span class='wrap-indicator' title='" + obj.LINK_TITLE + "' download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='adminh4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><span class='wrap-indicator' title='" + obj.LINK_TITLE + "' download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\">[…]</span></div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } else if (IssongFile(obj.LINK_TITLE)) { // System.Text.StringBuilder text = new System.Text.StringBuilder(); string text = ""; string path = obj.LINK_PATH; // text = BLL.loadword(path); if (text == "") { text = obj.LINK_TITLE; } string title = ""; if (text.Length >= 250) { title = (text.Substring(0, 250)); } else { title = (text); } obj.LINK_TYPE = 3; { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><audio controls><source src='" + obj.LINK_PATH + "' type='audio/ogg'><source src='" + obj.LINK_PATH + "' type='audio/mpeg'<source src='" + obj.LINK_PATH + "' type='audio/wav'>Your browser does not support the audio element.</audio></div></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" class='deleteadmin' title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='adminh4class'>" + obj.LINK_TITLE + "</h4><audio controls><source src='" + obj.LINK_PATH + "' type='audio/ogg'><source src='" + obj.LINK_PATH + "' type='audio/mpeg'><source src='" + obj.LINK_PATH + "' type='audio/wav'>Your browser does not support the audio element.</audio></div></div>"; // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><audio controls><source src='" + obj.LINK_PATH + "' type='audio/ogg'><source src='" + obj.LINK_PATH + "' type='audio/mpeg'><source src='" + obj.LINK_PATH + "' type='audio/wav'>Your browser does not support the audio element.</audio></div></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } else if (IsvideoFile(obj.LINK_TITLE)) { // System.Text.StringBuilder text = new System.Text.StringBuilder(); string text = ""; string path = obj.LINK_PATH; // text = BLL.loadword(path); if (text == "") { text = obj.LINK_TITLE; } string title = ""; if (text.Length >= 250) { title = (text.Substring(0, 250)); } else { title = (text); } obj.LINK_TYPE = 3; { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><video class='boxvideo' style=\"height:auto;max-height: 140px;max-width:236px;\" controls><source src='" + obj.LINK_PATH + "' type='video/mp4'><source src='" + obj.LINK_PATH + "' type='video/ogg'><source src='" + obj.LINK_PATH + "' type='video/WebM'>Your browser does not support the video tag.</video><h4 class='h4class'>" + obj.LINK_TITLE + "</h4></div>"; } else { htmlcontent = "<div class=\"adminbox\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" class='deleteadmin' title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><video class='adminboxvideo' style=\"height:auto;max-height: 140px;max-width:236px;\" controls><source src='" + obj.LINK_PATH + "' type='video/mp4'><source src='" + obj.LINK_PATH + "' type='video/ogg'><source src='" + obj.LINK_PATH + "' type='video/WebM'>Your browser does not support the video tag.</video><h4 class='adminh4class'>" + obj.LINK_TITLE + "</h4></div>"; // htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><video class='adminboxvideo' style=\"height:auto;max-height: 140px;max-width:236px;\" controls><source src='" + obj.LINK_PATH + "' type='video/mp4'><source src='" + obj.LINK_PATH + "' type='video/ogg'><source src='" + obj.LINK_PATH + "' type='video/WebM'>Your browser does not support the video tag.</video><h4 class='h4class'>" + obj.LINK_TITLE + "</h4></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } else { // System.Text.StringBuilder text = new System.Text.StringBuilder(); string text = ""; string path = obj.LINK_PATH; // text = BLL.loadword(path); if (text == "") { text = obj.LINK_TITLE; } string title = ""; if (text.Length >= 250) { title = HttpUtility.HtmlEncode(text.Substring(0, 250)); } else { title = HttpUtility.HtmlEncode(text); } obj.LINK_TYPE = 3; { // BLL.ExecuteNonQuery("update lbr_links set link_data='" + BLL.ReplaceQuote(htmlcontent) + "' where link_id='" + id + "'"); if (userid != "22") { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"delete\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" class=\"boxvideo\" style=\"margin-left:-6px;margin-top:-6px;\" ><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><span class='wrap-indicator' title='" + obj.LINK_TITLE + "' download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\">[…]</span></div><div class='sharedby'>Sent by " + email + "</div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100% ;height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } else { htmlcontent = "<div class=\"box\" id=\"divbox_" + id + "\" style=\"cursor:pointer\" ><span class=\"deleteadmin\"><a href=\"#\" title=\"Delete\" onclick=\"deletebox('divbox_" + id + "')\"><i class=\"fa fa-trash\"></i></a><a title=\"Move or Copy\" href=\"#\" onclick=\"movelinks(" + id + ")\"><i class=\"fa fa-edit\"></i></a><a title=\"Share With Linkskart\" onclick=\"openkartshare(" + id + ")\" href=\"#\"><i class=\"fa fa-share\"></i></a> <a title=\"Share With Facebook\" onclick='" + String.Format("share(\"" + obj.LINK_TITLE.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"http://linkskart.com?redirectid=" + id + "\",\"\",\"" + obj.LINK_DESCRIPTION.Replace("'", "").Replace("{", "").Replace("}", "") + "\",\"" + obj.LINK_IMAGEPATH.Replace("'", "") + "\"); return false;") + "' href=\"#\"><i class=\"fa fa-facebook\"></i></a><a title=\"Share With Twitter\" onclick='opentwitter(" + id + ")' href=\"#\"><i class=\"fa fa-twitter\"></i></a><a title=\"Download\" download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" ><i class=\"fa fa-download\"></i></a></span><div download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\" class=\"adminboxvideo\" style=\"margin-left:-6px;margin-top:-6px;\"><h4 class='h4class'>" + obj.LINK_TITLE + "</h4 class='h4class'><span class='wrap-indicator' title='" + obj.LINK_TITLE + "' download=\"" + obj.LINK_TITLE + "\" target='_blank' href=\"" + obj.LINK_PATH + "\">[…]</span></div><div class='sharedby'>Sent by Linkskart</div></div><div id='modalopen_" + id + "' class='modal fade' aria-hidden='true' style='display: none;'><div class='modal-dialog modal-lg'><div class='modal-content'><div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button><h4 class='h4class' class='modal-title'>Detailed Preview <small>" + obj.LINK_TITLE + "</small></h4 class='h4class'></div><div class='modal-body'><textarea class='form-control' style='font-family:Monaco,Consolas,monospace;width:100%; height: 500.25px;' readonly=''>" + obj.LINK_DESCRIPTION + "</textarea></div></div></div></div>"; } bool stat = BLL.updatedata(htmlcontent, id); } } } catch (Exception ex) { } return htmlcontent; }