protected void GetHotRoute() { ClassLibrary.BLL.Routes bll = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteClass rcBll = new ClassLibrary.BLL.RouteClass(); List <ClassLibrary.Model.RouteClass> rcList = rcBll.GetModelList(String.Empty); List <ClassLibrary.Model.Routes> list = bll.GetModelList(6, "isdisplay = 1", "RecommendHot Desc,routeOrder Asc,CreatedTime Desc"); string strHTML = @"<div class='pro'> <a href='{6}/{5}/{3}.html' target='_blank'> <img src='{0}' width='180px' height='120px' alt='{1}' /> </a> <p class='name'><a href='{6}/{5}/{3}.html' title='{1}' target='_blank'>{2}</a></p> <p class='price'>{4}</p> </div>"; StringBuilder sb = new StringBuilder(); foreach (ClassLibrary.Model.Routes model in list) { //int classId = Convert.ToInt32(model.routesClassID.Split(',')[1]); sb.AppendFormat(strHTML, SysConfig.GetRoutePhoto(model.Image), model.Title, Function.Clip(model.Title, 14, true), model.ID, (model.Price == 0 ? "价格电询" : "¥" + Convert.ToInt32(model.Price) + "起"), rcList.Find(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ID == model.LocationID); }).ClassNamePY, SysConfig.webSite); } hotRouteList = sb.ToString(); }
public void loadMoreSearch(HttpContext context) { string skey = context.Request.QueryString["skey"]; int pageIndex = Convert.ToInt32(context.Request.QueryString["page"]); ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteClass routeClassBLL = new ClassLibrary.BLL.RouteClass(); string routewhere = " isdisplay=1 and CHARINDEX('" + skey + "',Title) > 0 "; DataSet mySet = routeBLL.GetPageData(10, pageIndex, routewhere, "RouteOrder Asc, CreatedTime Desc"); DataTable myTable = mySet.Tables["Data"]; List <ClassLibrary.Model.RouteClass> glClass = routeClassBLL.GetModelList(string.Empty); StringBuilder sb = new StringBuilder(); List <ClassLibrary.Model.Routes> pgRouteList = routeBLL.GetModelList(myTable); foreach (ClassLibrary.Model.Routes model in pgRouteList) { //string[] images = model.Image.Split(','); //int tmpClassId = Convert.ToInt32(model.routesClassID.Split(',')[1]); string tmpPy = glClass.Find(delegate(ClassLibrary.Model.RouteClass tm) { return(tm.ID == model.LocationID); }).ClassNamePY; sb.AppendLine("<li>"); sb.AppendFormat("<a href='{0}/{1}/{2}.html'>", SysConfig.webSiteApp, tmpPy, model.ID); sb.AppendFormat("<div class='hot_img' style='background-image:url({0}{1})'></div>", SysConfig.webSite, SysConfig.UploadFilePathRoutesImg + model.AppImg); sb.AppendFormat("<div class='hot_price'>¥<em>{0}</em>起</div>", Convert.ToInt32(model.Price)); sb.AppendFormat("<div class='hot_title'>{0}</div>", Function.Clip(model.Title, 18, true)); sb.AppendLine("</a>"); sb.AppendLine("</li>"); } Print(context, sb.ToString()); }
private void updateRouteImg(HttpContext context) { ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); List <ClassLibrary.Model.Routes> routeList = routeBll.GetModelList(string.Empty); string fileFullPath = context.Server.MapPath(SysConfig.UploadFilePathRoutesImg); foreach (ClassLibrary.Model.Routes model in routeList) { string fileName = model.Image.Split(',')[0]; if (!File.Exists(fileFullPath + fileName)) { continue; } //缩图 Bitmap tmp = new Bitmap(fileFullPath + fileName); Bitmap bmp0 = Function.MakeThumNail(tmp, 100, 64); tmp.Dispose(); //bmp0.Save(fileFullPath + fileName); string ext = Path.GetExtension(fileName); string appfileName = Function.GetRandomTime() + ext; Function.SaveBitmapImg(bmp0, fileFullPath + appfileName, ((long)90)); bmp0.Dispose(); routeBll.Updates("appImg = '" + appfileName + "'", "id = " + model.ID); } Print(context, "success"); }
private void RouteClassDelete(HttpContext context) { string id = context.Request.QueryString["id"]; ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); if (routeBll.GetModelList("CHARINDEX('," + int.Parse(id) + ",',','+routesPrentClassID+',')>0").Count > 0) { Print(context, "existdata"); return; } ClassLibrary.BLL.News newsBll = new ClassLibrary.BLL.News(); if (newsBll.GetModelList("CHARINDEX('," + int.Parse(id) + ",',','+routeClassID+',')>0").Count > 0) { Print(context, "existdata"); return; } ClassLibrary.BLL.RouteClass routeClassBLL = new ClassLibrary.BLL.RouteClass(); if (routeClassBLL.Delete(int.Parse(id)) > 0) { Print(context, "success"); } else { Print(context, "errors"); } }
public void findSanxiaRoute(HttpContext context) { int id = Convert.ToInt32(context.Request.QueryString["where"]); ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteClass routeClassBll = new ClassLibrary.BLL.RouteClass(); List <ClassLibrary.Model.RouteClass> globalList = routeClassBll.GetSubList((int)SysConfig.RouteClass.峡旅游); List <ClassLibrary.Model.Routes> routeList = routeBLL.GetModelList(6, "isdisplay=1 and (CHARINDEX('," + id + ",',','+routesPrentClassID+',') > 0)", "RouteOrder Asc,Createdtime Desc"); StringBuilder sb = new StringBuilder(); sb.AppendLine("<ul>"); foreach (ClassLibrary.Model.Routes model in routeList) { ClassLibrary.Model.RouteClass temModel = globalList.Find(delegate(ClassLibrary.Model.RouteClass tm) { return(tm.ID == model.LocationID); }); sb.AppendLine("<li>"); sb.AppendFormat("<a href='{4}/{2}/{3}.html' title='{1}' class='blk' ><img class='lazy' data-original='{0}' alt='' width='222' height='137' /></a>", SysConfig.UploadFilePathRoutesImg + model.Image.Split(',')[0], model.Title, temModel.ClassNamePY, model.ID, SysConfig.webSite).AppendLine(); sb.AppendFormat("<p class='item_t'><a href='{4}/{2}/{3}.html' title='{1}'>{0}</a></p>", Function.Clip(model.Title, 14, false), model.Title, temModel.ClassNamePY, model.ID, SysConfig.webSite).AppendLine(); sb.AppendFormat("<p class='item_f' title='{0}'>{1}</p>", model.Bright, Function.Clip(model.Bright, 18, false)).AppendLine(); string tp = string.Format("¥{0}<span>起</span>", Convert.ToInt32(model.Price)); if (Convert.ToInt32(model.Price) == 0) { tp = "电询"; } sb.AppendFormat("<p class='item_p'>{0}</p>", tp).AppendLine(); sb.AppendLine("</li>"); } sb.AppendLine("</ul>"); Print(context, sb.ToString()); }
private void RouteCopy(HttpContext context) { string id = context.Request.QueryString["id"]; ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); ClassLibrary.Model.Routes routemodel = routeBll.GetModel(int.Parse(id)); if (routemodel == null || routemodel.Title == "") { Print(context, "error"); return; } string[] oldImgs = routemodel.Image.Split(','); string fileFullPath = context.Server.MapPath(SysConfig.UploadFilePathRoutesImg); string newImgs = ""; for (int i = 0; i < oldImgs.Length; i++) { string ext = Path.GetExtension(oldImgs[i]); string fileName = Function.GetRandomTime() + ext; try { File.Copy(fileFullPath + oldImgs[i], fileFullPath + fileName); } catch (Exception e) { } newImgs += fileName + ","; } if (!string.IsNullOrEmpty(newImgs)) { newImgs = newImgs.Substring(0, newImgs.Length - 1); } routemodel.Image = newImgs; routemodel.Display = false; routemodel.ViewCount = 0; routemodel.Order = 999; routemodel.FirstTime = DateTime.Now.ToString("yyyy-MM-dd"); routemodel.CreatedTime = DateTime.Now; if (routeBll.Add(routemodel) > 0) { if (routemodel.DetailType) { int routeId = routeBll.GetLastId(); ClassLibrary.BLL.RouteDetails rdBll = new ClassLibrary.BLL.RouteDetails(); List <ClassLibrary.Model.RouteDetails> detailList = rdBll.GetModelList("routeId = " + routemodel.ID); foreach (ClassLibrary.Model.RouteDetails model in detailList) { model.RouteID = routeId; rdBll.Add(model); } Print(context, "success"); } } else { Print(context, "error"); } }
//特色旅游 推荐 热门等等 不查三峡旅游 public void FindIndexRoute(HttpContext context) { int sanid = (int)SysConfig.RouteClass.峡旅游; string type = context.Request.QueryString["type"]; ClassLibrary.BLL.Routes routebll = new ClassLibrary.BLL.Routes(); DataSet mySet = routebll.GetPageData(8, 1, " isdisplay=1 and CHARINDEX('," + sanid + ",',','+routesPrentClassID+',') = 0 and CHARINDEX('" + type + "',RecommendIndex) > 0 ", " RouteOrder,CreatedTime desc "); DataTable table = mySet.Tables["Data"]; StringBuilder sb = new StringBuilder(); ClassLibrary.BLL.RouteClass rcBLL = new ClassLibrary.BLL.RouteClass(); List <ClassLibrary.Model.RouteClass> rcList = rcBLL.GetModelList(String.Empty); int q = 0; sb.Append("<div class='main_hot_body'>"); foreach (DataRow dr in table.Rows) { q++; string temClassPy = rcList.Find(delegate(ClassLibrary.Model.RouteClass trc) { return(trc.ID == Convert.ToInt32(dr["LocationID"].ToString())); }).ClassNamePY; if (q <= 4) { sb.Append("<div class='main_hot_body_item'>"); string[] imgs = dr["Image"].ToString().Split(','); sb.AppendFormat("<img alt='{0}' src='{1}' width='230px' height='147px'/>", dr["Title"], ClassLibrary.Common.SysConfig.UploadFilePathRoutesImg + imgs[0]); sb.AppendFormat("<p><span class='c_destin'>{1}</span><span class='c_price'>¥{0}起</span></p>", Convert.ToInt32(dr["Price"]), Function.Clip(dr["Destination"].ToString(), 8, true)); sb.Append("<div class='main_hot_body_font'><ul>"); sb.AppendFormat(" <li><a href='{3}/{2}/{1}.html' style='width:100%;'>{0}</a></li>", ClassLibrary.Common.Function.Clip(dr["Title"].ToString(), 10, true), dr["ID"], temClassPy, SysConfig.webSite); sb.AppendFormat(" <li>{0}</li>", ClassLibrary.Common.Function.Clip(ClassLibrary.Common.Function.ClearHtml(dr["RouteFeature"].ToString()), 18, true)); sb.AppendFormat("<li><a href='{2}/{1}/{0}.html' target='_blank' >查看线路</a></li>", dr["ID"], temClassPy, SysConfig.webSite); sb.Append("</ul></div> </div>"); if (q == 4) { sb.Append("</div><div class='main_hot_bottom'><ul>"); } } else { sb.AppendFormat("<li><a href='{3}/{2}/{1}.html' target='_blank' >{0}</a></li>", ClassLibrary.Common.Function.Clip(dr["Title"].ToString(), 18, true), dr["ID"], temClassPy, SysConfig.webSite); sb.AppendFormat("<li class='hei'>¥<em>{0}</em>元起</li>", Convert.ToInt32(dr["Price"])); } } sb.Append("</ul></div>"); if (q == 0) { Print(context, ""); } else { Print(context, sb.ToString()); } }
private void RouteDelete(HttpContext context) { string id = context.Request.QueryString["id"]; ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); if (routeBLL.Delete(int.Parse(id)) > 0) { Print(context, "success"); } else { Print(context, "errors"); } }
private void DisplayRoutes(HttpContext context) { string id = context.Request.QueryString["ids"]; ClassLibrary.BLL.Routes rbll = new ClassLibrary.BLL.Routes(); if (rbll.Updates("IsDisplay = 1", "id in (" + id + ")") > 0) { Print(context, "success"); } else { Print(context, "errors"); } }
private void UpdateRouteOrder(HttpContext context) { string id = context.Request.QueryString["id"]; string routeOrder = context.Request.QueryString["routeOrder"]; ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); if (routeBLL.UpdateRouteOrder(int.Parse(id), int.Parse(routeOrder)) > 0) { Print(context, "success"); } else { Print(context, "errors"); } }
private void RefreshLinks(HttpContext context) { ClassLibrary.BLL.News newsBll = new ClassLibrary.BLL.News(); ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteDetails rdBll = new ClassLibrary.BLL.RouteDetails(); ClassLibrary.BLL.InternalLink linkBll = new ClassLibrary.BLL.InternalLink(); List <ClassLibrary.Model.InternalLink> linkList = linkBll.GetModelList(string.Empty); List <ClassLibrary.Model.News> newsList = newsBll.GetModelList(""); foreach (ClassLibrary.Model.News model in newsList) { string tmpContent = ClassLibrary.BLL.WebClass.addInternelLink(model.Content, ClassLibrary.Common.SysConfig.linkCount, linkList); if (model.Content != tmpContent) { model.Content = tmpContent; newsBll.Update(model); } } List <ClassLibrary.Model.Routes> routeList = routeBll.GetModelList(""); foreach (ClassLibrary.Model.Routes model in routeList) { model.RouteFeature = ClassLibrary.BLL.WebClass.addInternelLink(model.RouteFeature, 1, linkList); model.DescriptionRoute = ClassLibrary.BLL.WebClass.addInternelLink(model.DescriptionRoute, 3, linkList); model.DescriptionPrice = ClassLibrary.BLL.WebClass.addInternelLink(model.DescriptionPrice, 1, linkList); model.RouteNotice = ClassLibrary.BLL.WebClass.addInternelLink(model.RouteNotice, 1, linkList); routeBll.Update(model); if (model.DetailType) { List <ClassLibrary.Model.RouteDetails> rdList = rdBll.GetModelList("routeid=" + model.ID); foreach (ClassLibrary.Model.RouteDetails model2 in rdList) { string tmpDetail = ClassLibrary.BLL.WebClass.addInternelLink(model2.DayDetail, 1, linkList); if (model2.DayDetail != tmpDetail) { model2.DayDetail = tmpDetail; rdBll.Update(model2); } } } } Print(context, "success"); }
//网站信息 private void GetWebInfo() { webMeta.Title = "重庆青年旅行社_重庆旅行社_重庆中国青年旅行社_重庆中青旅行社"; webMeta.Description = "重庆中国青年旅行社(www.qu17.com)称重庆青旅,旅游热线:400-017-5761.共青团市委直属重庆旅行社,中青旅集团成员单位,优质服务示范重庆旅行社,重庆青年旅行社具有国家旅游局颁证的出境旅游资质的国际旅行社,旅游品质最高的重庆旅行社,重庆十大金牌旅行社,出入境游、国内游、重庆周边游、长江三峡游为主导。"; webMeta.Keyword = "重庆旅行社,重庆青年旅行社,重庆中青旅,重庆中国青年旅行社,重庆旅游网"; string url = HttpContext.Current.Request.CurrentExecutionFilePath.ToLower(); string tmpTitle = "_重庆中国青年旅行社"; if (url.IndexOf("approutesearch.aspx") > -1) { webMeta.Title = "旅游线路搜索结果" + tmpTitle; webMeta.Keyword = ""; webMeta.Description = ""; } else if (url.IndexOf("approutelist.aspx") > -1) { string ping = Function.GetQueryString("py"); ClassLibrary.BLL.RouteClass routeClassBll = new ClassLibrary.BLL.RouteClass(); List <ClassLibrary.Model.RouteClass> rcList = routeClassBll.GetModelList("classNamePy='" + ping + "'"); if (rcList.Count > 0) { ClassLibrary.Model.RouteClass rc = rcList[0]; if (rc.ClassLevel == 4) { webMeta.Title = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName); webMeta.Keyword = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName); webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName); } else if (rc.ClassLevel == 3) { if (rc.ID == (int)SysConfig.RouteClass.重庆) { webMeta.Title = "重庆周边游_重庆周边旅游线路报价_重庆中国青年旅行社"; webMeta.Keyword = "重庆周边旅游,重庆周边旅游线路,重庆周边旅游行程,重庆周边旅游报价"; webMeta.Description = "重庆周边旅游线路、周边旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761."; } else if (rc.ParentID == (int)SysConfig.RouteClass.豪华船) { webMeta.Title = string.Format("重庆三峡{0}旅游_{0}三峡旅游报价", rc.ClassName); webMeta.Keyword = string.Format("重庆三峡{0}旅游,三峡{0}旅游报价,重庆三峡旅游", rc.ClassName); webMeta.Description = string.Format("重庆青年旅行社提供重庆三峡{0}旅游线路报价,重庆三峡{0}旅游费用,长江三峡豪华游船旅游价格,三峡{0}旅游要多少钱,详询中青旅电话400-017-5761.", rc.ClassName); } else { webMeta.Title = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName); webMeta.Keyword = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName); webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName); } } else if (rc.ClassLevel == 2) { if (rc.ParentID == (int)SysConfig.RouteClass.峡旅游) { if (rc.ID == (int)SysConfig.RouteClass.豪华船) { webMeta.Title = "三峡豪华游船_豪华游船航期表_重庆三峡豪华游轮_重庆中国青年旅行社"; webMeta.Keyword = "重庆三峡豪华游船,长江三峡游船,豪华游船航期表,三峡涉外豪华游轮"; webMeta.Description = "重庆中国青年旅行社提供各系列长江三峡豪华游轮,以及三峡涉外豪华游轮旅游品质服务,重庆三峡涉外豪华游轮预定,重庆中青旅热线:400-017-5761"; } else { webMeta.Title = "三峡国内游船_重庆三峡国内船_重庆中国青年旅行社"; webMeta.Keyword = "重庆三峡国内游船,长江三峡游船,三峡国内游轮"; webMeta.Description = "重庆中国青年旅行社提供长江三峡国内游船,长江三峡旅游品质服务,重庆三峡国内游船预定,重庆中青旅热线:400-017-5761"; } } else { webMeta.Title = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName); webMeta.Keyword = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName); webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName); } } else { if (rc.ID == (int)SysConfig.RouteClass.国内旅游) { webMeta.Title = "国内旅游线路行程_重庆出发国内旅游线路_重庆中国青年旅行社"; webMeta.Keyword = "国内游线路,国内游行程,国内游报价,国内游跟团,重庆出发国内游"; webMeta.Description = "重庆出发国内旅游线路、国内旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761."; } else if (rc.ID == (int)SysConfig.RouteClass.出境旅游) { webMeta.Title = "出境旅游线路行程_重庆出发出境旅游线路_重庆中国青年旅行社"; webMeta.Keyword = "出境游线路,出境游行程,出境游报价,出境游跟团,重庆出发出境游"; webMeta.Description = "重庆出发出境旅游线路、出境旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761."; } else if (rc.ID == (int)SysConfig.RouteClass.峡旅游) { webMeta.Title = "重庆长江三峡旅游_重庆三峡旅游行程景点_重庆中国青年旅行社"; webMeta.Keyword = "重庆三峡旅游,长江三峡旅游线路,三峡旅游报价,三峡游景点,三峡游船预定"; webMeta.Description = "重庆三峡旅游行程、三峡游线路、长江三峡旅游报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761."; } } } else { ClassLibrary.BLL.RouteType rtBll = new ClassLibrary.BLL.RouteType(); List <ClassLibrary.Model.RouteType> rtList = rtBll.GetModelList("classNamePy='" + ping + "'"); if (rtList.Count > 0) { ClassLibrary.Model.RouteType rtc = rtList[0]; webMeta.Title = string.Format("{0}旅游线路_重庆出发{0}旅游报价", rtc.ClassName.Replace("游", "")) + tmpTitle; webMeta.Keyword = string.Format("{0}旅游,{0}旅游报价,{0}旅游线路", rtc.ClassName.Replace("游", "")); webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆出发{0}旅游最新报价,{0}跟团游价格,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rtc.ClassName.Replace("游", "")); } } } else if (url.IndexOf("approutedetail.aspx") > -1) { int id = Convert.ToInt32(Function.GetQueryString("id")); ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); ClassLibrary.Model.Routes rModel = routeBll.GetModel(id); webMeta.Title = rModel.Title + tmpTitle; if (rModel.SeoTitle != null && rModel.SeoTitle.Trim() != "") { webMeta.Title = rModel.SeoTitle; } webMeta.Keyword = rModel.SeoKeywords; if (webMeta.Keyword == "") { webMeta.Keyword = rModel.Title; } webMeta.Description = rModel.SeoDescription; if (webMeta.Description == "") { webMeta.Description = Function.Clip(Function.ClearHtml(rModel.RouteFeature + rModel.DescriptionRoute).Replace(" ", "").Replace(" ", ""), 80, false); } } else if (url.IndexOf("appabout.aspx") > -1) { webMeta.Title = "重庆中国青年旅行社简介"; webMeta.Keyword = ""; webMeta.Description = ""; } else if (url.IndexOf("apparticlelist.aspx") > -1) { string strId = Function.GetQueryString("id"); if (strId != "") { int classid = Convert.ToInt32(strId); if (classid == (int)SysConfig.NewsClass.旅游资讯) { webMeta.Title = "重庆旅行社旅游资讯_最新旅游资讯指南" + tmpTitle; webMeta.Description = "重庆旅游资讯,重庆旅游指南,旅游最新资讯,重庆旅行社资讯"; webMeta.Keyword = "重庆青年旅行社旅游资讯大致包含旅行社资讯,旅游相关实时新闻,旅游行业最新资讯消息,重庆以及周边旅游指南,重庆中青旅一如既往的高品质服务游客."; } else if (classid == (int)SysConfig.NewsClass.旅游攻略) { webMeta.Title = "重庆旅行社旅游攻略_最新旅游攻略" + tmpTitle; webMeta.Description = "重庆旅游攻略,重庆旅游指南,旅游最新攻略"; webMeta.Keyword = "重庆青年旅行社旅游攻略大致包含旅游的吃、住、行、游、购、娱方面的介绍以及方式方法,重庆青旅更新的旅游攻略内容板块将更加方便您的出游."; } } else { webMeta.Title = "旅游攻略网_旅游景点网_最新旅游指南_重庆中国青年旅行社"; webMeta.Keyword = "旅游攻略网,旅游景点网,最新旅游指南"; webMeta.Description = "重庆中国青年旅行社旅游攻略网旅游景点网提供各种旅游攻略,旅游景点排行,最新旅游资讯,旅游景点推荐,详情请咨询中青旅400-017-5761"; } } else if (url.IndexOf("apparticledetail.aspx") > -1) { int id = Convert.ToInt32(Function.GetQueryString("id")); ClassLibrary.BLL.News newsBll = new ClassLibrary.BLL.News(); ClassLibrary.Model.News rModel = newsBll.GetModel(id); webMeta.Title = rModel.Title + tmpTitle; webMeta.Keyword = rModel.Keywords; if (webMeta.Keyword == "") { webMeta.Keyword = rModel.Title; } webMeta.Description = rModel.Description; if (webMeta.Description == "") { webMeta.Description = Function.Clip(Function.ClearHtml(rModel.Description).Replace(" ", "").Replace(" ", ""), 80, false); } } else if (url.IndexOf("appnav.aspx") > -1) { webMeta.Title = "旅游目的地导航" + tmpTitle; webMeta.Keyword = ""; webMeta.Description = ""; } else if (url.IndexOf("apporder.aspx") > -1) { webMeta.Title = "订单提交信息" + tmpTitle; webMeta.Keyword = ""; webMeta.Description = ""; } else if (url.IndexOf("appshopcart.aspx") > -1) { webMeta.Title = "旅游订单信息" + tmpTitle; webMeta.Keyword = ""; webMeta.Description = ""; } else if (url.IndexOf("appsaleslist.aspx") > -1) { webMeta.Title = "特价旅游专区_最划算的旅游" + tmpTitle; webMeta.Keyword = "青旅特价旅游,特价旅游旅行社,重庆旅行社特价团"; webMeta.Description = "重庆中国青年旅行社特价旅游专区产品为限时限量旅游线路,由于游客临时退位置或者旅行社原因,导致紧急处理的旅游产品,在整个旅游行业可以说是性价比最高,超级划算的特价旅游产品."; } }
private void updateImgAddress(HttpContext context) { ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteDetails rdBll = new ClassLibrary.BLL.RouteDetails(); List <ClassLibrary.Model.Routes> routeList = routeBll.GetModelList("id > 677"); foreach (ClassLibrary.Model.Routes model in routeList) { bool updated = false; if (model.RouteFeature.IndexOf("www.ytszg.com") > -1) { model.RouteFeature = model.RouteFeature.Replace("www.ytszg.com", "www.qu17.com"); updated = true; } if (model.RouteFeature.IndexOf("file/newsImg/image") > -1) { model.RouteFeature = model.RouteFeature.Replace("file/newsImg/image", "images"); updated = true; } if (model.DescriptionRoute.IndexOf("www.ytszg.com") > -1) { model.DescriptionRoute = model.DescriptionRoute.Replace("www.ytszg.com", "www.qu17.com"); updated = true; } if (model.DescriptionRoute.IndexOf("file/newsImg/image") > -1) { model.DescriptionRoute = model.DescriptionRoute.Replace("file/newsImg/image", "images"); updated = true; } if (model.RouteNotice.IndexOf("www.ytszg.com") > -1) { model.RouteNotice = model.RouteNotice.Replace("www.ytszg.com", "www.qu17.com"); updated = true; } if (model.DescriptionPrice.IndexOf("www.ytszg.com") > -1) { model.DescriptionPrice = model.DescriptionPrice.Replace("www.ytszg.com", "www.qu17.com"); updated = true; } if (updated) { routeBll.Update(model); } } List <ClassLibrary.Model.RouteDetails> routedList = rdBll.GetModelList(" routeid > 677"); foreach (ClassLibrary.Model.RouteDetails model in routedList) { bool updated = false; if (model.DayDetail.IndexOf("www.ytszg.com") > -1) { model.DayDetail = model.DayDetail.Replace("www.ytszg.com", "www.qu17.com"); updated = true; } if (model.DayDetail.IndexOf("file/newsImg/image") > -1) { model.DayDetail = model.DayDetail.Replace("file/newsImg/image", "images"); updated = true; } if (updated) { rdBll.Update(model); } } Print(context, "success"); }
//国内 public void findhomeRoute(HttpContext context) { int id = Convert.ToInt32(context.Request.QueryString["where"]); ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteClass routeClassBLL = new ClassLibrary.BLL.RouteClass(); DataTable mytable = routeBLL.GetData(4, "isdisplay=1 and (CHARINDEX('," + id + ",',','+routesPrentClassID+',') > 0) and RecommendHot = 1", "Createdtime Desc"); mytable.Merge(routeBLL.GetData(16, "isdisplay=1 and (CHARINDEX('," + id + ",',','+routesPrentClassID+',') > 0)", "RouteOrder Asc,Createdtime Desc")); mytable = mytable.AsDataView().ToTable(true); List <ClassLibrary.Model.Routes> routeList = routeBLL.GetModelList(mytable); //List<ClassLibrary.Model.Routes> routeList = routeBLL.GetModelList(8, "(CHARINDEX('," + id + ",',','+routesPrentClassID+',') > 0)", "RouteOrder Asc,Createdtime Desc"); List <ClassLibrary.Model.RouteClass> globalList = routeClassBLL.GetSubList((int)SysConfig.RouteClass.国内旅游); StringBuilder sb = new StringBuilder(); StringBuilder sb2 = new StringBuilder(); int count = 0; sb.AppendLine("<ul class='gnc_down'>"); sb2.AppendLine("<ul class='gnc_up'>"); foreach (ClassLibrary.Model.Routes model in routeList) { if (count >= 16) { break; } ClassLibrary.Model.RouteClass temModel = globalList.Find(delegate(ClassLibrary.Model.RouteClass tm) { return(tm.ID == model.LocationID); }); if (count < 4) { sb2.AppendLine("<li>"); sb2.AppendFormat("<a href='{4}/{2}/{3}.html' title='{1}' class='blk' target='_blank'><img class='lazy' data-original='{0}' alt='' width='222' height='138' /></a>", SysConfig.UploadFilePathRoutesImg + model.Image.Split(',')[0], model.Title, temModel.ClassNamePY, model.ID, SysConfig.webSite).AppendLine(); sb2.AppendFormat("<p class='item_t'><a href='{4}/{2}/{3}.html' title='{1}' target='_blank'>{0}</a></p>", Function.Clip(model.Title, 28, false), model.Title, temModel.ClassNamePY, model.ID, SysConfig.webSite).AppendLine(); sb2.AppendFormat("<p class='item_f' title='{0}'>{1} </p>", model.Bright, Function.Clip(model.Bright, 16, false)).AppendLine(); string tp = string.Format("¥{0}<span>起</span>", Convert.ToInt32(model.Price)); if (Convert.ToInt32(model.Price) == 0) { tp = "电询"; } sb2.AppendFormat("<p class='item_p'>{0}</p>", tp).AppendLine(); sb2.AppendLine("</li>"); } else { sb.AppendLine("<li>"); sb.AppendFormat("<p class='item_title'><a href='{4}/{2}/{3}.html' title='{1}' target='_blank'>{0}</a></p>", Function.Clip(model.Title, 26, false), model.Title, temModel.ClassNamePY, model.ID, SysConfig.webSite).AppendLine(); string tp = string.Format("¥{0}起", Convert.ToInt32(model.Price)); if (Convert.ToInt32(model.Price) == 0) { tp = "电询"; } sb.AppendFormat("<div class='gnc_left_price'>{0}</div>", tp).AppendLine(); sb.AppendLine("</li>"); } count++; } sb.AppendLine("</ul>"); sb2.AppendLine("</ul>"); Print(context, sb2.ToString() + sb.ToString()); }
public void findZhutiRoute(HttpContext context) { int id = Convert.ToInt32(context.Request.QueryString["where"]); string className = context.Request.QueryString["name"]; StringBuilder sbc = new StringBuilder(); ClassLibrary.BLL.Routes routeBLL = new ClassLibrary.BLL.Routes(); ClassLibrary.BLL.RouteClass routeClassBll = new ClassLibrary.BLL.RouteClass(); List <ClassLibrary.Model.RouteClass> globalList = routeClassBll.GetModelList(string.Empty); sbc.AppendLine("<div class='ztc_img'>"); //if (ztAdList.Count > 0) //{ // ztModel = ztAdList[0]; //} //sbc.AppendFormat("<a href='{0}' title='{1}'><img class='lazy' data-original='{2}' alt='' width='222' height='467' /></a>", // ztModel.LinkURL, ztModel.Title, SysConfig.UploadFilePathAdImg + ztModel.Img).AppendLine(); sbc.AppendLine("</div>"); sbc.AppendLine("<ul class='ztc_items'>"); List <ClassLibrary.Model.Routes> ztRouteListm = routeBLL.GetModelList(6, "isdisplay=1 and charindex('," + id + ",',','+ThemeID+',')>0 and CHARINDEX('1',RecommendIndex) > 0", "routeOrder Asc, CreatedTime Desc"); string ztids = ""; foreach (ClassLibrary.Model.Routes rm in ztRouteListm) { ClassLibrary.Model.RouteClass tmpc = globalList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == rm.LocationID); }); sbc.AppendLine("<li>"); sbc.AppendFormat("<a href='{0}/{1}/{2}.html' title='{3}' class='blk' ><img class='lazy' data-original='{4}' alt='' width='222' height='139' /></a>", SysConfig.webSite, tmpc.ClassNamePY, rm.ID, rm.Title, SysConfig.UploadFilePathRoutesImg + rm.Image.Split(',')[0]).AppendLine(); sbc.AppendFormat("<p class='item_t'><a href='{0}/{1}/{2}.html' title='{3}'>{4}</a></p>", SysConfig.webSite, tmpc.ClassNamePY, rm.ID, rm.Title, Function.Clip(rm.Title, 15, false)).AppendLine(); //sbc.AppendFormat("<p class='item_f' title='{0}'>{1}</p>", rm.Bright, Function.Clip(rm.Bright, 19, false)).AppendLine(); string tp = string.Format("¥{0}<span>起</span>", Convert.ToInt32(rm.Price)); if (Convert.ToInt32(rm.Price) == 0) { tp = "电询"; } sbc.AppendFormat("<p class='item_p'>{0}</p>", tp).AppendLine(); sbc.AppendLine("</li>"); ztids += rm.ID + ","; } if (ztids.Length > 0) { ztids = ztids.Substring(0, ztids.Length - 1); } sbc.AppendLine("</ul>"); sbc.AppendLine("<div class='ztc_more'>"); sbc.AppendLine("<dl class='ztc_more_gn'>"); sbc.AppendFormat("<dt>国内热门{0}旅游线路</dt>", className).AppendLine(); if (ztids.Length > 0) { List <ClassLibrary.Model.Routes> ztRouteListg = routeBLL.GetModelList(6, "isdisplay=1 and id not in (" + ztids + ") and charindex('," + id + ",',','+ThemeID+',')>0 and charindex('," + (int)SysConfig.RouteClass.国内旅游 + ",',','+routesPrentClassID+',')>0", "routeOrder Asc, CreatedTime Desc"); foreach (ClassLibrary.Model.Routes rm in ztRouteListg) { ClassLibrary.Model.RouteClass tmpc = globalList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == rm.LocationID); }); string tp = string.Format("¥{0}起", Convert.ToInt32(rm.Price)); if (Convert.ToInt32(rm.Price) == 0) { tp = "电询"; } sbc.AppendFormat("<dd><a href='{0}/{1}/{2}.html' title='{3}'>{4}</a><span>{5}</span></dd>", SysConfig.webSite, tmpc.ClassNamePY, rm.ID, rm.Title, Function.Clip(rm.Title, 10, false), tp).AppendLine(); } } sbc.AppendLine("</dl>"); sbc.AppendLine("<dl class='ztc_more_cj'>"); sbc.AppendFormat("<dt>出境热门{0}旅游线路</dt>", className).AppendLine(); if (ztids.Length > 0) { List <ClassLibrary.Model.Routes> ztRouteListc = routeBLL.GetModelList(6, "isdisplay=1 and id not in (" + ztids + ") and charindex('," + id + ",',','+ThemeID+',')>0 and charindex('," + (int)SysConfig.RouteClass.出境旅游 + ",',','+routesPrentClassID+',')>0", "routeOrder Asc, CreatedTime Desc"); foreach (ClassLibrary.Model.Routes rm in ztRouteListc) { ClassLibrary.Model.RouteClass tmpc = globalList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == rm.LocationID); }); string tp = string.Format("¥{0}起", Convert.ToInt32(rm.Price)); if (Convert.ToInt32(rm.Price) == 0) { tp = "电询"; } sbc.AppendFormat("<dd><a href='{0}/{1}/{2}.html' title='{3}'>{4}</a><span>{5}</span></dd>", SysConfig.webSite, tmpc.ClassNamePY, rm.ID, rm.Title, Function.Clip(rm.Title, 10, false), Convert.ToInt32(rm.Price)).AppendLine(); } } sbc.AppendLine("</dl>"); //sbc.AppendLine("<div class='ztc_more_img'>"); //sbc.AppendFormat("<a href='{0}' title='{1}'><img src='{2}' alt='' width='190' height='111' /></a>", // ztModel.LinkURL, ztModel.Title, SysConfig.UploadFilePathAdImg + ztImgr).AppendLine(); //sbc.AppendLine("</div>"); sbc.AppendLine("<div class='inx_zt_bg_right'></div>"); sbc.AppendLine("</div>"); Print(context, sbc.ToString()); }
private void BindItem() { rcList = classbll.GetModelList(String.Empty); DataTable table = classbll.GetData(" classlevel=1 and id < 6", "createdtime desc"); StringBuilder sb = new StringBuilder(); /*国内旅游*/ sb.Append("<div class='SiteMap_Item'>"); sb.AppendFormat("<p><a href='{2}/{1}/'>{0}</a></p>", "国内旅游", "guonei", SysConfig.webSite); List <ClassLibrary.Model.RouteClass> gnList = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == (int)SysConfig.RouteClass.国内旅游); }); foreach (ClassLibrary.Model.RouteClass model in gnList) { sb.AppendFormat("<p>{0}</p>", model.ClassName); List <ClassLibrary.Model.RouteClass> level3List = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == model.ID); }); foreach (ClassLibrary.Model.RouteClass model3 in level3List) { sb.Append("<div class='SiteMap_Text'>"); sb.AppendFormat("<div class='SiteMap_Text_first'><a href='{2}/{1}/'>{0}旅游</a></div>", model3.ClassName, model3.ClassNamePY, SysConfig.webSite); sb.Append(" <div class='SiteMap_Text_child'>"); List <ClassLibrary.Model.RouteClass> level4List = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == model3.ID); }); foreach (ClassLibrary.Model.RouteClass model4 in level4List) { sb.AppendFormat("<a href='{2}/{1}/'>{0}旅游</a>", model4.ClassName, model4.ClassNamePY, SysConfig.webSite); } sb.Append("</div></div>"); } } sb.Append("</div>"); /*出境旅游*/ sb.Append("<div class='SiteMap_Item'>"); sb.AppendFormat("<p><a href='{2}/{1}/'>{0}</a></p>", "出境旅游", "chujing", SysConfig.webSite); List <ClassLibrary.Model.RouteClass> cjList = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == (int)SysConfig.RouteClass.出境旅游); }); foreach (ClassLibrary.Model.RouteClass model in cjList) { sb.Append("<div class='SiteMap_Text'>"); sb.AppendFormat("<div class='SiteMap_Text_first'><a href='{2}/{1}/'>{0}旅游</a></div>", model.ClassName, model.ClassNamePY, SysConfig.webSite); sb.Append(" <div class='SiteMap_Text_child'>"); List <ClassLibrary.Model.RouteClass> level2List = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == model.ID); }); foreach (ClassLibrary.Model.RouteClass model2 in level2List) { sb.AppendFormat("<a href='{2}/{1}/'>{0}旅游</a>", model2.ClassName, model2.ClassNamePY, SysConfig.webSite); } sb.Append("</div></div>"); } sb.Append("</div>"); /*三峡旅游*/ sb.Append("<div class='SiteMap_Item'>"); sb.AppendFormat("<p><a href='{2}/{1}/'>{0}</a></p>", "三峡旅游", "sanxia", SysConfig.webSite); List <ClassLibrary.Model.RouteClass> sxList = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == (int)SysConfig.RouteClass.峡旅游); }); sb.Append("<div class='SiteMap_Text'>"); sb.AppendFormat("<div class='SiteMap_Text_first'> </div>"); sb.Append("<div class='SiteMap_Text_child'>"); foreach (ClassLibrary.Model.RouteClass model in sxList) { sb.AppendFormat("<a href='{2}/{1}/'>{0}</a>", model.ClassName, model.ClassNamePY, SysConfig.webSite); } sxList = rcList.FindAll(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ParentID == (int)SysConfig.RouteClass.豪华船); }); foreach (ClassLibrary.Model.RouteClass model in sxList) { sb.AppendFormat("<a href='{2}/{1}/'>{0}</a>", model.ClassName, model.ClassNamePY, SysConfig.webSite); } sb.Append("</div></div></div>"); /*主题旅游*/ ClassLibrary.BLL.RouteType rtBll = new ClassLibrary.BLL.RouteType(); sb.Append("<div class='SiteMap_Item'>"); sb.AppendFormat("<p>{0}</p>", "主题旅游"); List <ClassLibrary.Model.RouteType> ztList = rtBll.GetModelList(String.Empty); sb.Append("<div class='SiteMap_Text'>"); sb.AppendFormat("<div class='SiteMap_Text_first'> </div>"); sb.Append("<div class='SiteMap_Text_child'>"); foreach (ClassLibrary.Model.RouteType model in ztList) { sb.AppendFormat("<a href='{2}/{1}/'>{0}</a>", model.ClassName, model.classNamePY, SysConfig.webSite); } sb.Append("</div></div></div>"); DataMap = sb.ToString(); ClassLibrary.BLL.Routes routeBll = new ClassLibrary.BLL.Routes(); List <ClassLibrary.Model.Routes> routeList = routeBll.GetModelList(20, "isdisplay = 1", "CreatedTime Desc"); StringBuilder sb2 = new StringBuilder(); foreach (ClassLibrary.Model.Routes model in routeList) { ClassLibrary.Model.RouteClass temClass = rcList.Find(delegate(ClassLibrary.Model.RouteClass trc) { return(trc.ID == model.LocationID); }); sb2.AppendFormat("<li><a href='{0}/{1}/{2}.html' target='_blank'>{3}</a></li>", SysConfig.webSite, temClass.ClassNamePY, model.ID, model.Title).AppendLine(); } mapRoute = sb2.ToString(); ClassLibrary.BLL.News newsBll = new ClassLibrary.BLL.News(); List <ClassLibrary.Model.News> newsList = newsBll.GetModelList(10, "isdisplay = 1 and newsClassId = 2", "CreatedTime Desc"); StringBuilder sb3 = new StringBuilder(); foreach (ClassLibrary.Model.News model in newsList) { sb3.AppendFormat("<li><a href='{0}/{1}/{2}.html' target='_blank'>{3}</a></li>", SysConfig.webSite, Enum.GetName(typeof(SysConfig.NewsClassPY), model.newsClassID), model.ID, model.Title).AppendLine(); } mapArticle = sb3.ToString(); newsList = newsBll.GetModelList(10, "isdisplay = 1 and newsClassId = 1", "CreatedTime Desc"); StringBuilder sb4 = new StringBuilder(); foreach (ClassLibrary.Model.News model in newsList) { sb4.AppendFormat("<li><a href='{0}/{1}/{2}.html' target='_blank'>{3}</a></li>", SysConfig.webSite, Enum.GetName(typeof(SysConfig.NewsClassPY), model.newsClassID), model.ID, model.Title).AppendLine(); } mapNews = sb4.ToString(); }