行 1: <!--#include file=../global.aspx-->
行 2: <script language=C# runat=server>
行 3: String ID,Name,SectionID,ProTypeID,BuildType,MetroType,isMetroType,Virescence,rjl,Area,MinPrice,AvePrice,MaxPrice,PriceUnit,PriceInfo,Address,slc,Tel,Url,SaleDate,DeliverDate,Developer,Sale,PMName,Intro,lpdp,zbpt,lczk,jtzk,KFSInfo,xkz,bmrs,LetterID,BBSID,OutsideImage,Park,Fettle,UpdateTime,HitCount,Tags,Map_X,Map_Y,isSigns,Signs,isPrice,Title,RegionID,ISSell,SellTel,ShortTel,newMap_x,newMap_y,zonghushu,TotalPrice,ProPrice,isYFYJ,WXHouseID,TelGroupGUID,HouseGuid,SchoolID,SchoolName,NickName,DefaultImg,SectionIDs;
行 4: String s,bimg,btitle,Price;
行 5: String isHousePrice,PicTypeID;
行 6: void get_info(){
行 7: try{
行 8: ID = Request["nhid"];
行 9: if(!chkstr(ID,"^[0-9]+$")) throw new Exception("$参数错误!$");
行 10:
行 11: sqls(" select * from NewHouse where id=@id and city=@city ",newhouseconn);
行 12: sqlreplaces("@id",ID);
行 13: sqlreplaces("@city",efwcity);
行 14: SqlDataReader dr1 = sqlgets();
行 15: SqlConnection conn1 = xconn;
行 16:
行 17: if(dr1.Read()){
行 18: ID = tostr(dr1["ID"]);
行 19: SectionID = tostr(dr1["SectionID"]);
行 20:
行 21: sqls(" select child,label from NewHouse_Class where parent=9 and isdel=0 and label=@label order by seqid ", newhouseconn);
行 22: sqlreplaces("@label", tostr(SectionID));
行 23: SqlDataReader drs = sqlgets();
行 24: SqlConnection conns = xconn;
行 25: if (drs.Read())
行 26: {
行 27: SectionIDs= tostr(drs["child"]);
行 28: }
行 29:
行 30: RegionID = tostr(dr1["RegionID"]);
行 31: OutsideImage = tostr(dr1["OutsideImage"]);
行 32: if(!chkstr(OutsideImage,"^.+$")){
行 33: OutsideImage = "/image/defaultimg168_112.gif";
行 34: }
行 35: Name = tostr(dr1["Name"]);
行 36: Name=Name.Replace("·","");
行 37: if (Name.IndexOf(efwcity) > -1){
行 38: Name=Name.Replace(efwcity,"");
行 39:
行 40: }
行 41:
行 42: Tel = tostr(dr1["Tel"]);
行 43: ShortTel = tostr(dr1["ShortTel"]);
行 44: //if(chkstr(ShortTel,"^[0-9]+$")){
行 45: // Tel = "400-811-4005 转 " + ShortTel;
行 46: //}
行 47: NickName = tostr(dr1["NickName"]);
行 48: if(!chkstr(NickName,"^.+$")){
行 49: NickName = Name;
行 50: }
行 51: Tags = tostr(dr1["Tags"]);
行 52: if (chkstr(Tags, "^[0-9,]+$")){
行 53: String[] iTags = Tags.Split(',');
行 54: for (int ib=0; ib<iTags.Length; ib++){
行 55: s += "<a href=\"/s-------"+iTags[ib]+"----.html\" title=\""+efwcity+Name+tostr(get_label(iTags[ib]))+"\" target=\"_blank\"><div class=\"biaoqian biaoqian4\">"+tostr(get_label(iTags[ib]))+"</div></a>";
行 56: }
行 57:
行 58: }
行 59: SchoolID = tostr(dr1["SchoolID"]);
行 60: if(toInt(SchoolID)>0){
行 61: SchoolName = "<div class=\"biaoqian biaoqian2 biaoqian_green\">学区</div><a href=\"/xuexiao/"+tostr(SchoolID)+".html\" title=\""+tostr(dr1["SchoolName"])+"\" target=\"_blank\"><div class=\"biaoqian biaoqian4 \">"+tostr(dr1["SchoolName"])+"</div></a>";
行 62: }
行 63: bmrs = tostr(dr1["bmrs"]);
行 64: BBSID = tostr(dr1["BBSID"]);
行 65: if (toInt(BBSID)<=0){
行 66: BBSID = "281";
行 67: }
行 68: Title = tostr(dr1["Title"]);
行 69: MaxPrice = tostr(dr1["MaxPrice"]);
行 70: AvePrice = tostr(dr1["AvePrice"]);
行 71: MinPrice = tostr(dr1["MinPrice"]);
行 72: TotalPrice = tostr(dr1["TotalPrice"]);
行 73: PriceUnit = tostr(dr1["PriceUnit"]);
行 74: if(AvePrice !="0"){
行 75: Price ="均价:"+AvePrice+PriceUnit;
行 76: }
行 77: else if(MinPrice !="0"){
行 78: Price = "最低价:"+MinPrice+PriceUnit;
行 79: }
行 80: else if(MaxPrice!="0"){
行 81: Price = "最高价:"+MaxPrice+PriceUnit;
行 82: }
行 83: else if(TotalPrice!="0" && tostr(dr1["TotalPrice"])!=""){
行 84: Price = "价格:"+TotalPrice+PriceUnit;
行 85: }
行 86: else{
行 87: Price = "待定";
行 88: }
行 89: PriceInfo = tostr(dr1["PriceInfo"]);
行 90: if (chkstr(PriceInfo, "^.+$")){
行 91: PriceInfo = "<div class=\"price\"><span class=\"fb color065fb9\">价格描述:</span>"+PriceInfo+"</div>";
行 92: }
行 93: String strProType = tostr(dr1["ProTypeID"]);
行 94: if (chkstr(strProType, "^.+$")){
行 95: String[] strF = strProType.Split(',');
行 96: for (int ia=0; ia<strF.Length; ia++){
行 97: ProTypeID += "<a href=\"/s---"+strF[ia]+"--------.html\" title=\""+efwcity+Name+tostr(strF[ia])+"\" target=\"_blank\">"+tostr(strF[ia])+"</a> ";
行 98: }
行 99: }
行 100: BuildType = tostr(dr1["BuildType"]);
行 101: Area = tostr(dr1["Area"]);
行 102: Virescence = tostr(dr1["Virescence"]);
行 103: SaleDate = tostr(dr1["SaleDate"]);
行 104: rjl = tostr(dr1["rjl"]);
行 105: zonghushu = tostr(dr1["zonghushu"]);
行 106: Park = tostr(dr1["Park"]);
行 107: DeliverDate = tostr(dr1["DeliverDate"]);
行 108: PMName = tostr(dr1["PMName"]);
行 109: ProPrice = tostr(dr1["ProPrice"]);
行 110: Address = tostr(dr1["Address"]);
行 111: slc = tostr(dr1["slc"]);
行 112: Fettle = tostr(dr1["Fettle"]);
行 113: Developer = tostr(dr1["Developer"]);
行 114: Sale = tostr(dr1["Sale"]);
行 115: Url = tostr(dr1["Url"]);
行 116: WXHouseID = tostr(dr1["WXHouseID"]);
行 117: isYFYJ = tostr(dr1["isYFYJ"]);
行 118: UpdateTime = dateformat(tostr(dr1["UpdateTime"]), "yyyy-MM-dd");
行 119:
行 120: Intro = tostr(dr1["Intro"]);
行 121: lpdp = tostr(dr1["lpdp"]);
行 122: zbpt = tostr(dr1["zbpt"]);
行 123: lczk = tostr(dr1["lczk"]);
行 124: jtzk = tostr(dr1["jtzk"]);
行 125: KFSInfo = tostr(dr1["KFSInfo"]);
行 126: MetroType = tostr(dr1["MetroType"]);
行 127:
行 128: }
行 129: sqlcloses(dr1,conn1);
行 130:
行 131: sqls(" select top 4 NHType,FileName from NewHouse_wjt where NHID=@NHID and city=@city and isSlidesImg=1 order by sortid desc,AddDate desc ",newhouseconn);
行 132: sqlreplaces("@NHID",ID);
行 133: sqlreplaces("@city",efwcity);
行 134: SqlDataReader dr2 = sqlgets();
行 135: SqlConnection conn2 = xconn;
行 136: StringBuilder sb = new StringBuilder();
行 137: StringBuilder sbs = new StringBuilder();
行 138: int i = 0;
行 139:
行 140: while(dr2.Read()){
行 141: i++;
行 142: bimg += "<li><a href=\"javascript:void(0)\"><img src=\""+tostr(dr2["FileName"])+"@1e_500w_333h_0c_0i_1o_100Q_1x.jpg|watermark=2&text=5bm_5ZGK&type=d3F5LXplbmhlaQ&size=10&t=100&s=100&color=I2ZmZmZmZg&p=3&y=10&x=10\"></a></li>";
行 143: btitle += "<li><a href=\"javascript:void(0)\">"+get_label(tostr(dr2["NHType"]))+"</a></li>";
行 144:
行 145: }
行 146: sqlcloses(dr2,conn2);
行 147:
行 148: for (int n = i; n < 4; n++)
行 149: {
行 150: bimg += "<li><a href=\"javascript:void(0)\"><img width=\"500\" height=\"333\" src=\"images/nopic_b.jpg\"></a></li>";
行 151: }
行 152:
行 153: for (int j = i; j < 4; j++)
行 154: {
行 155: btitle += "<li><a href=\"javascript:void(0)\">"+Name+"</a></li>";
行 156: }
行 157:
行 158: sqls(" SELECT strTypeID,isHousePrice,isMetroType FROM newhouse_WebConfig where city=@city ",newhouseconn);
行 159: sqlreplaces("@city",efwcity);
行 160: SqlDataReader dr3 = sqlgets();
行 161: SqlConnection conn3 = xconn;
行 162: if (dr3.Read()){
行 163: String strTypeID = tostr(dr3["strTypeID"]);
行 164: isHousePrice = tostr(dr3["isHousePrice"]);
行 165: if( chkstr(strTypeID,"^[0-9|]+$") ){
行 166: String[] pr = strTypeID.Split('|');
行 167: PicTypeID = pr[10];
行 168: }
行 169: }
行 170: sqlcloses(dr3,conn3);
行 171:
行 172: }
行 173: catch(Exception e){
行 174: cserr(e);
行 175: }
行 176: }
行 177: //许可证
行 178: String get_xkz()
行 179: {
行 180: try
行 181: {
行 182:
行 183: sqls("select top 2 id,NHID,LicenceNo,Developer,ProjectName from NewHouse_Licence where nhid=@nhid and deleted=0 and city=@city order by id desc ",newhouseconn);
行 184: sqlreplaces("@nhid", ID);
行 185: sqlreplaces("@city", efwcity);
行 186: SqlDataReader dr1 = sqlgets();
行 187: SqlConnection conn1 = xconn;
行 188: StringBuilder sb = new StringBuilder();
行 189: while (dr1.Read())
行 190: {
行 191: String mod = " <a href='/yxsxkz_show_{id}.html' title=\""+efwcity+Name+"{LicenceNo}\" target='_blank'>{LicenceNo}</a>";
行 192: mod = mod.Replace("{LicenceNo}", tostr(dr1["LicenceNo"]));
行 193: mod = mod.Replace("{id}", tostr(dr1["id"]));
行 194: mod = mod.Replace("{LicenceNo}", tostr(dr1["LicenceNo"]));
行 195:
行 196: sb.Append(mod);
行 197: }
行 198: sqlcloses(dr1, conn1);
行 199: return tostr(sb);
行 200: }
行 201: catch (Exception ex)
行 202: {
行 203: return tostr(ex);
行 204: }
行 205: }
行 206: //本月入住
行 207: String get_month_ruzhu(){
行 208: try
行 209: {
行 210: sqls(" SELECT top 10 b.id,b.name,b.MinPrice,b.AvePrice,b.MaxPrice,b.TotalPrice,b.SectionID,b.priceunit FROM NewHouse_Month_State as a left join NewHouse as b on a.NHID=b.ID WHERE a.Deleted = 0 AND a.Passed='1' and a.city = @city and a.MonthState='本月入住' ORDER BY a.yearmonth desc",newhouseconn);
行 211: sqlreplaces("@city", efwcity);
行 212: SqlDataReader dr1 = sqlgets();
行 213: SqlConnection conn1 = xconn;
行 214: StringBuilder sb = new StringBuilder();
行 215: while (dr1.Read())
行 216: {
行 217: String m = "<li>\n<div class=\"text2 bubg1\"><a href=\"/house/nh-{ID}-list.html\" title=\"{efwcity}{Name}\" target=\"_blank\">{Name}</a></div>\n<div class=\"text3 bubg1\">{SectionID}</div>\n<div class=\"date3\">{jiage}</div>\n</li>\n";
行 218: m = m.Replace("{ID}", tostr(dr1["ID"]));
行 219: m = m.Replace("{Name}", tostr(dr1["Name"]));
行 220: m = m.Replace("{efwcity}", tostr(efwcity));
行 221: m = m.Replace("{SectionID}", tostr(dr1["SectionID"]));
行 222: if(tostr(dr1["AvePrice"])!="0"){
行 223: m = m.Replace("{jiage}",tostr(dr1["AvePrice"])+tostr(dr1["priceunit"]));
行 224: }
行 225: else if(tostr(dr1["MinPrice"])!="0"){
行 226: m = m.Replace("{jiage}",tostr(dr1["MinPrice"])+tostr(dr1["priceunit"]));
行 227: }
行 228: else if(tostr(dr1["MaxPrice"])!="0"){
行 229: m = m.Replace("{jiage}",tostr(dr1["MaxPrice"])+tostr(dr1["priceunit"]));
行 230: }
行 231: else if(tostr(dr1["TotalPrice"])!="0"){
行 232: m = m.Replace("{jiage}",tostr(dr1["TotalPrice"]));
行 233: }
行 234: else{
行 235: m = m.Replace("{jiage}","价格待定");
行 236: }
行 237:
行 238: sb.Append(m);
行 239: }
行 240: sqlcloses(dr1, conn1);
行 241:
行 242: return tostr(sb);
行 243: }
行 244: catch (Exception ex)
行 245: {
行 246: println(tostr(ex));
行 247: return "";
行 248: }
行 249: }
行 250: //外景图分类统计
行 251: String get_pic_count(String NHType)
行 252: {
行 253: try
行 254: {
行 255: sqls("select count(id) from newhouse_wjt where NHID=@NHID and NHType=@NHType and city=@city and deleted=0",newhouseconn);
行 256: sqlreplaces("@NHID", tostr(ID));
行 257: sqlreplaces("@NHType", tostr(NHType));
行 258: sqlreplaces("@city", tostr(efwcity));
行 259: //println(sqlprint());
行 260: SqlDataReader dr1 = sqlgets();
行 261: SqlConnection conn1 = xconn;
行 262: StringBuilder sb = new StringBuilder();
行 263: while (dr1.Read())
行 264: {
行 265: String m = "{num}";
行 266: m = m.Replace("{num}", tostr(dr1[0]));
行 267:
行 268: sb.Append(m);
行 269: }
行 270: sqlcloses(dr1, conn1);
行 271: return tostr(sb);
行 272:
行 273: }
行 274: catch (Exception ex)
行 275: {
行 276:
行 277: return tostr(ex);
行 278: }
行 279: }
行 280: //室总数统计
行 281: String get_hxt_count(String Room)
行 282: {
行 283: try
行 284: {
行 285: sqls("select count(id) from NewHouse_HouseType where NHID=@NHID and Room=@Room and city=@city and deleted=0",newhouseconn);
行 286: sqlreplaces("@NHID", tostr(ID));
行 287: sqlreplaces("@Room", tostr(Room));
行 288: sqlreplaces("@city", tostr(efwcity));
行 289: //println(sqlprint());
行 290: SqlDataReader dr1 = sqlgets();
行 291: SqlConnection conn1 = xconn;
行 292: StringBuilder sb = new StringBuilder();
行 293: while (dr1.Read())
行 294: {
行 295: String m = "{num}";
行 296: m = m.Replace("{num}", tostr(dr1[0]));
行 297:
行 298: sb.Append(m);
行 299: }
行 300: sqlcloses(dr1, conn1);
行 301: return tostr(sb);
行 302:
行 303: }
行 304: catch (Exception ex)
行 305: {
行 306:
行 307: return tostr(ex);
行 308: }
行 309: }
行 310: //户型总数统计
行 311: String get_HouseType_count()
行 312: {
行 313: try
行 314: {
行 315: sqls("select count(id) from NewHouse_HouseType where NHID=@NHID and city=@city and deleted=0",newhouseconn);
行 316: sqlreplaces("@NHID", tostr(ID));
行 317: sqlreplaces("@city", tostr(efwcity));
行 318: //println(sqlprint());
行 319: SqlDataReader dr1 = sqlgets();
行 320: SqlConnection conn1 = xconn;
行 321: StringBuilder sb = new StringBuilder();
行 322: while (dr1.Read())
行 323: {
行 324: String m = "{num}";
行 325: m = m.Replace("{num}", tostr(dr1[0]));
行 326:
行 327: sb.Append(m);
行 328: }
行 329: sqlcloses(dr1, conn1);
行 330: return tostr(sb);
行 331:
行 332: }
行 333: catch (Exception ex)
行 334: {
行 335:
行 336: return tostr(ex);
行 337: }
行 338: }
行 339: //外景分类列表
行 340: String get_photo_typelist()
行 341: {
行 342: try
行 343: {
行 344: sqls("select child,Label from newhouse_class where Parent=@Parent and isDel=0 order by seqid asc",newhouseconn);
行 345: sqlreplaces("@Parent", tostr(PicTypeID));
行 346: //println(sqlprint());
行 347: SqlDataReader dr1 = sqlgets();
行 348: SqlConnection conn1 = xconn;
行 349: StringBuilder sb = new StringBuilder();
行 350: int i=2;
行 351: while (dr1.Read())
行 352: {
行 353: i++;
行 354: if(get_pic_count(tostr(dr1["child"])) != "0"){
行 355: String m = "<a href=\"/house/nh-xgt-{nhid}-{child}.html\" title=\"{name}{Label}\"><li>\n";
行 356: m += "<div class=\"text1 bg bg{i}\">{Label}</div>\n";
行 357: m += "<div class=\"text2\">{num}</div>\n";
行 358: m += "</li></a>\n";
行 359: m = m.Replace("{Label}", tostr(dr1["Label"]));
行 360: m = m.Replace("{nhid}", tostr(ID));
行 361: m = m.Replace("{name}", tostr(Name));
行 362: m = m.Replace("{child}", tostr(dr1["child"]));
行 363: m = m.Replace("{i}", tostr(i));
行 364: m = m.Replace("{num}", get_pic_count(tostr(dr1["child"])));
行 365: sb.Append(m);
行 366: }
行 367: }
行 368: sqlcloses(dr1, conn1);
行 369: return tostr(sb);
行 370:
行 371: }
行 372: catch (Exception ex)
行 373: {
行 374:
行 375: return tostr(ex);
行 376: }
行 377: }
行 378: //样板房总数统计
行 379: String get_ExampleRoom_count()
行 380: {
行 381: try
行 382: {
行 383: sqls("select count(id) from NewHouse_ExampleRoom where NHID=@NHID and city=@city and deleted=0",newhouseconn);
行 384: sqlreplaces("@NHID", tostr(ID));
行 385: sqlreplaces("@city", tostr(efwcity));
行 386: //println(sqlprint());
行 387: SqlDataReader dr1 = sqlgets();
行 388: SqlConnection conn1 = xconn;
行 389: StringBuilder sb = new StringBuilder();
行 390: while (dr1.Read())
行 391: {
行 392: String m = "{num}";
行 393: m = m.Replace("{num}", tostr(dr1[0]));
行 394:
行 395: sb.Append(m);
行 396: }
行 397: sqlcloses(dr1, conn1);
行 398: return tostr(sb);
行 399:
行 400: }
行 401: catch (Exception ex)
行 402: {
行 403:
行 404: return tostr(ex);
行 405: }
行 406: }
行 407:
行 408: //视频房总数统计
行 409: String get_vod_count()
行 410: {
行 411: try
行 412: {
行 413: sqls("select count(id) from NewHouse_vod where NHID=@NHID and city=@city and deleted=0",newhouseconn);
行 414: sqlreplaces("@NHID", tostr(ID));
行 415: sqlreplaces("@city", tostr(efwcity));
行 416: //println(sqlprint());
行 417: SqlDataReader dr1 = sqlgets();
行 418: SqlConnection conn1 = xconn;
行 419: StringBuilder sb = new StringBuilder();
行 420: while (dr1.Read())
行 421: {
行 422: String m = "{num}";
行 423: m = m.Replace("{num}", tostr(dr1[0]));
行 424:
行 425: sb.Append(m);
行 426: }
行 427: sqlcloses(dr1, conn1);
行 428: return tostr(sb);
行 429:
行 430: }
行 431: catch (Exception ex)
行 432: {
行 433:
行 434: return tostr(ex);
行 435: }
行 436: }
行 437: </script>
行 438: <% get_info();%>
|