Browse Source

会员积分

zhangjinkun@topnet.net.cn 9 years ago
parent
commit
68fe65e38e

+ 31 - 0
common/src/qfw/util/credit/credit.go

@@ -4,6 +4,7 @@ package credit
 import (
 	"fmt"
 	"github.com/go-xweb/xweb"
+	"log"
 	"qfw/util"
 	mogo "qfw/util/mongodb"
 	"qfw/util/rpc"
@@ -118,6 +119,26 @@ func AIsHasDo(code string, num int) bool {
 	return b
 }
 
+//判断A是否完成
+func AAllIsHasDo(num int) bool {
+	b := false
+	var ret uint64
+	for k, v := range CreditA {
+		ret = 1 << (v - 1)
+		if k == "a6" || k == "a7" { //过滤收藏
+			b = true
+			continue
+		}
+		if uint64(num)&ret > 0 {
+			b = true
+		} else {
+			b = false
+			break
+		}
+	}
+	return b
+}
+
 //扣积分
 func OutCreditB(userId, code string, score int, param map[string]interface{}) (bool, int) {
 	b := false
@@ -142,11 +163,21 @@ func UpuserCreditSession(userId, code, dtype string, param map[string]interface{
 		if b {
 			xb.Session().UpdateByCustomField("id", userId, "credit_a", credit_a)
 			xb.Session().UpdateByCustomField("id", userId, "i_credit", util.IntAll(xb.GetSession("i_credit"))+score)
+		} else {
+			log.Println(userId, code, "一次性任务送积分失败")
+		}
+		if AAllIsHasDo(credit_a) {
+			b, _, _, _ := InCreditA(userId, "a64", credit_a)
+			if b {
+				log.Println(userId, "完成所有一次性任务")
+			}
 		}
 	} else {
 		b, score, _ = InCreditB(userId, code, param)
 		if b {
 			xb.Session().UpdateByCustomField("id", userId, "i_credit", util.IntAll(xb.GetSession("i_credit"))+score)
+		} else {
+			log.Println(userId, code, param, "任务送积分失败")
 		}
 	}
 	return b

+ 11 - 8
core/src/qfw/member/bidmanage.go

@@ -202,14 +202,17 @@ func (d *BidManage) ChangeStatus() error {
 				}
 				m.SaveMsg()
 			}
-			//达成交易送积分
-			param := make(map[string]interface{})
-			param["objid"] = wtb["s_userid"].(string)
-			credit_a := util.IntAll(d.GetSession("credit_a"))
-			if credit.AIsHasDo(credit.A_WCJY, credit_a) {
-				credit.UpuserCreditSession(userId, credit.C_JY, "B", param, d.Action)
-			} else {
-				credit.UpuserCreditSession(userId, credit.A_WCJY, "A", param, d.Action)
+			//选标达成交易送积分
+			if status == 3 {
+				param := make(map[string]interface{})
+				param["objid"] = wtb["s_userid"].(string)
+				credit_a := util.IntAll(d.GetSession("credit_a"))
+				if credit.AIsHasDo(credit.A_WCJY, credit_a) {
+					credit.UpuserCreditSession(userId, credit.C_JY, "B", param, d.Action)
+				} else {
+					credit.UpuserCreditSession(userId, credit.A_WCJY, "A", nil, d.Action)
+					credit.UpuserCreditSession(userId, credit.C_JY, "B", param, d.Action)
+				}
 			}
 		}
 	}

+ 3 - 0
core/src/qfw/member/credit/credit.go

@@ -8,6 +8,9 @@ import (
 	"github.com/go-xweb/xweb"
 )
 
+var RedisDB string
+
 func init() {
+	RedisDB = "other"
 	xweb.AddAction(&credit{})
 }

+ 26 - 20
core/src/qfw/member/credit/creditdetail.go

@@ -27,21 +27,27 @@ func (c *credit) MyCredit() error {
 		user := *mongodb.FindById("user", userId, nil)
 		c.T["user"] = user
 		credit_a := util.IntAll(user["credit_a"])
-		c.T["A_RZ"] = cd.AIsHasDo(cd.A_RZ, credit_a)         //认证
-		c.T["A_CJMP"] = cd.AIsHasDo(cd.A_CJMP, credit_a)     //创建名片
-		c.T["A_BYX"] = cd.AIsHasDo(cd.A_BYX, credit_a)       //绑定邮箱
-		c.T["A_BSJ"] = cd.AIsHasDo(cd.A_BSJ, credit_a)       //绑定手机
-		c.T["A_SCMP"] = cd.AIsHasDo(cd.A_SCMP, credit_a)     //收藏名片
-		c.T["A_SCFW"] = cd.AIsHasDo(cd.A_SCFW, credit_a)     //收藏服务
-		c.T["A_SYJY"] = cd.AIsHasDo(cd.A_SYJY, credit_a)     //使用剑鱼
-		c.T["A_QYCX"] = cd.AIsHasDo(cd.A_QYCX, credit_a)     //使用企业查询
-		c.T["A_FFW"] = cd.AIsHasDo(cd.A_FFW, credit_a)       //发服务
-		c.T["A_FXQ"] = cd.AIsHasDo(cd.A_FXQ, credit_a)       //发需求
-		c.T["A_CKGXW"] = cd.AIsHasDo(cd.A_CKGXW, credit_a)   //查看关系网
-		c.T["A_FXFWXQ"] = cd.AIsHasDo(cd.A_FXFWXQ, credit_a) //分享服务需求
-		c.T["A_WCJY"] = cd.AIsHasDo(cd.A_WCJY, credit_a)     //完成交易
-		c.T["A_WCJYPJ"] = cd.AIsHasDo(cd.A_WCJYPJ, credit_a) //完成交易评价
-		if ret := redis.Get("other", cd.B_QD+"_"+userId); ret != nil {
+		b := cd.AAllIsHasDo(credit_a)
+		if b {
+			c.T["AAll"] = true
+		} else {
+			c.T["AAll"] = false
+			c.T["A_RZ"] = cd.AIsHasDo(cd.A_RZ, credit_a)         //认证
+			c.T["A_CJMP"] = cd.AIsHasDo(cd.A_CJMP, credit_a)     //创建名片
+			c.T["A_BYX"] = cd.AIsHasDo(cd.A_BYX, credit_a)       //绑定邮箱
+			c.T["A_BSJ"] = cd.AIsHasDo(cd.A_BSJ, credit_a)       //绑定手机
+			c.T["A_SCMP"] = cd.AIsHasDo(cd.A_SCMP, credit_a)     //收藏名片
+			c.T["A_SCFW"] = cd.AIsHasDo(cd.A_SCFW, credit_a)     //收藏服务
+			c.T["A_SYJY"] = cd.AIsHasDo(cd.A_SYJY, credit_a)     //使用剑鱼
+			c.T["A_QYCX"] = cd.AIsHasDo(cd.A_QYCX, credit_a)     //使用企业查询
+			c.T["A_FFW"] = cd.AIsHasDo(cd.A_FFW, credit_a)       //发服务
+			c.T["A_FXQ"] = cd.AIsHasDo(cd.A_FXQ, credit_a)       //发需求
+			c.T["A_CKGXW"] = cd.AIsHasDo(cd.A_CKGXW, credit_a)   //查看关系网
+			c.T["A_FXFWXQ"] = cd.AIsHasDo(cd.A_FXFWXQ, credit_a) //分享服务需求
+			c.T["A_WCJY"] = cd.AIsHasDo(cd.A_WCJY, credit_a)     //完成交易
+			c.T["A_WCJYPJ"] = cd.AIsHasDo(cd.A_WCJYPJ, credit_a) //完成交易评价
+		}
+		if ret := redis.Get(RedisDB, cd.B_QD+"_"+userId); ret != nil {
 			tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 			qd := false
 			if time.Unix(int64(tmp[0]), 0).Day() == time.Now().Day() {
@@ -51,25 +57,25 @@ func (c *credit) MyCredit() error {
 		} else {
 			c.T["B_QD"] = map[string]interface{}{"B": 1}
 		}
-		if ret := redis.Get("other", cd.B_FFW+"_"+userId); ret != nil {
+		if ret := redis.Get(RedisDB, cd.B_FFW+"_"+userId); ret != nil {
 			tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 			c.T["B_FFW"] = map[string]interface{}{"A": tmp[0], "B": tmp[1], "C": tmp[2]}
 		} else {
 			c.T["B_FFW"] = map[string]interface{}{"A": 0, "B": 0, "C": cd.B_FFW_T}
 		}
-		if ret := redis.Get("other", cd.B_FXQ+"_"+userId); ret != nil {
+		if ret := redis.Get(RedisDB, cd.B_FXQ+"_"+userId); ret != nil {
 			tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 			c.T["B_FXQ"] = map[string]interface{}{"A": tmp[0], "B": tmp[1], "C": tmp[2]}
 		} else {
 			c.T["B_FXQ"] = map[string]interface{}{"A": 0, "B": 0, "C": cd.B_FXQ_T}
 		}
-		if ret := redis.Get("other", cd.B_FXFWXQ+"_"+userId); ret != nil {
+		if ret := redis.Get(RedisDB, cd.B_FXFWXQ+"_"+userId); ret != nil {
 			tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 			c.T["B_FXFWXQ"] = map[string]interface{}{"A": tmp[0], "B": tmp[1], "C": tmp[2]}
 		} else {
 			c.T["B_FXFWXQ"] = map[string]interface{}{"A": 0, "B": 0, "C": cd.B_FXFWXQ_T}
 		}
-		if ret := redis.Get("other", cd.B_QYCX+"_"+userId); ret != nil {
+		if ret := redis.Get(RedisDB, cd.B_QYCX+"_"+userId); ret != nil {
 			tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 			c.T["B_QYCX"] = map[string]interface{}{"A": tmp[0], "B": tmp[1], "C": tmp[2]}
 		} else {
@@ -116,7 +122,7 @@ func (c *credit) SessionQdAjx() error {
 		return nil
 	}
 	userId := util.ObjToString(c.GetSession("userId"))
-	if ret := redis.Get("other", cd.B_QD+"_"+userId); ret != nil {
+	if ret := redis.Get(RedisDB, cd.B_QD+"_"+userId); ret != nil {
 		tmp := util.InterfaceArrTointArr(ret.([]interface{}))
 		if time.Unix(int64(tmp[0]), 0).Day() == time.Now().Day() {
 			c.Session().UpdateByCustomField("id", userId, "credit_qd", "y")

+ 15 - 0
core/src/qfw/member/ordermanage.go

@@ -7,6 +7,7 @@ import (
 	"github.com/go-xweb/xweb"
 	. "gopkg.in/mgo.v2/bson"
 	util "qfw/util"
+	"qfw/util/credit"
 	. "qfw/util/mongodb"
 	msg "qfw/util/msg"
 	"time"
@@ -71,6 +72,20 @@ func (o *OrderManage) ChangeStatus() error {
 			}
 			m.SaveMsg()
 		}
+		//预约成交送积分
+		if flag && status == 3 {
+			param := make(map[string]interface{})
+			param["objid"] = (*r)["s_editorid"]
+			credit_a := util.IntAll(o.GetSession("credit_a"))
+			userId := util.ObjToString(o.GetSession("userId"))
+			if credit.AIsHasDo(credit.A_WCJY, credit_a) {
+				credit.UpuserCreditSession(userId, credit.C_JY, "B", param, o.Action)
+			} else {
+				credit.UpuserCreditSession(userId, credit.A_WCJY, "A", nil, o.Action)
+				credit.UpuserCreditSession(userId, credit.C_JY, "B", param, o.Action)
+			}
+		}
+
 	}
 	o.ServeJson(M{"result": result})
 	return nil

+ 1 - 0
core/src/qfw/member/yellowpage.go

@@ -434,6 +434,7 @@ func (yp *Yellowpage) AddService() error {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.B_FFW, "B", nil, yp.Action)
 			} else {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.A_FFW, "A", nil, yp.Action)
+				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.B_FFW, "B", nil, yp.Action)
 			}
 		}
 	}

+ 1 - 0
core/src/qfw/search/searchService.go

@@ -111,6 +111,7 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 					credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
 				} else {
 					credit.UpuserCreditSession(userId, credit.A_QYCX, "A", nil, n.Action)
+					credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
 				}
 			}
 		}

+ 2 - 0
core/src/qfw/searchmarket/demand.go

@@ -173,12 +173,14 @@ func (d *Demand) AddDemand() error {
 			}
 			rs := mongo.Save("demand", demandInfo)
 			b := UpdateNewDoc("demand", "demand", mongo.FindById("demand", rs, ""))
+			//发布需求送积分
 			if b {
 				credit_a := util.IntAll(d.GetSession("credit_a"))
 				if credit.AIsHasDo(credit.A_FXQ, credit_a) {
 					credit.UpuserCreditSession(util.ObjToString(s_userid), credit.B_FXQ, "B", nil, d.Action)
 				} else {
 					credit.UpuserCreditSession(util.ObjToString(s_userid), credit.A_FXQ, "A", nil, d.Action)
+					credit.UpuserCreditSession(util.ObjToString(s_userid), credit.B_FXQ, "B", nil, d.Action)
 				}
 			}
 			if s_userid == nil {

+ 2 - 1
core/src/qfw/searchmarket/service.go

@@ -275,7 +275,8 @@ func (s *Service) Comment() error {
 						if credit.AIsHasDo(credit.A_WCJYPJ, credit_a) {
 							credit.UpuserCreditSession(s_userid, credit.C_PJ, "B", param, s.Action)
 						} else {
-							credit.UpuserCreditSession(s_userid, credit.A_WCJYPJ, "A", param, s.Action)
+							credit.UpuserCreditSession(s_userid, credit.A_WCJYPJ, "A", nil, s.Action)
+							credit.UpuserCreditSession(s_userid, credit.C_PJ, "B", param, s.Action)
 						}
 						return s.Write("{'success':'true','content':'y'}")
 					} else {

+ 3 - 4
core/src/qfw/swordfish/swordfishmanage.go

@@ -56,10 +56,9 @@ func (s *SwordFish) RsssetAjaxReq() error {
 		flag = "y"
 	}
 	//首次使用剑鱼送积分
-	if flag == "y" && credit.AIsHasDo(credit.A_SYJY, util.IntAll(s.GetSession("credit_a"))) {
-		b, _, score, _ := credit.InCreditA(userId, credit.V_JY, util.IntAll(s.GetSession("credit_a")))
-		if b {
-			s.Session().UpdateByCustomField("id", userId, "i_credit", util.IntAll(s.GetSession("i_credit"))+score)
+	if flag == "y" {
+		if credit.AIsHasDo(credit.A_SYJY, util.IntAll(s.GetSession("credit_a"))) {
+			credit.UpuserCreditSession(userId, credit.A_SYJY, "A", nil, s.Action)
 		}
 	}
 	s.ServeJson(map[string]interface{}{

+ 4 - 4
core/src/web/templates/common/memberleft.html

@@ -93,19 +93,19 @@
 					{{$identType := session "identType"}}
 					{{if eq 1 $identType}}
 						{{if eq 1 $identWay}}
-						<span class="glyphicon qyrz" style="color:#FF5A5F;top:4px;"></span>已认证企业
+						<i class="glyphicon qyrz" style="color:#FF5A5F;top:4px;"></i>已认证企业
 						{{end}}
 					{{else if eq 2 $identType}}
 						{{if eq 1 $identWay}}
-						<span class="glyphicon grrz" style="color:#FF5A5F;top:4px;"></span>已认证个人
+						<i class="glyphicon grrz" style="color:#FF5A5F;top:4px;"></i>已认证个人
 						{{end}}
 					{{else if eq 3 $identType}}
 						{{if eq 1 $identWay}}
-						<span class="glyphicon jgrz" style="color:#FF5A5F;top:4px;"></span>已认证机构
+						<i class="glyphicon jgrz" style="color:#FF5A5F;top:4px;"></i>已认证机构
 						{{end}}
 					{{end}}
 				{{else}}
-					<span class="glyphicon grrz" style="top:4px;"></span>未认证
+					<i class="glyphicon grrz" style="top:4px;"></i>未认证
 				{{end}}
 			</div>
 		</div>

+ 29 - 0
core/src/web/templates/member/credit/creditrule.html

@@ -0,0 +1,29 @@
+<html>
+<head>
+<title>积分规则</title>
+{{include "/common/inc.html"}}
+<style>
+ 
+</style>
+</head>
+<body>
+{{$identType := session "identType"}}
+<!-- 头部 -->
+{{include "/common/head.html"}}
+<!-- 中间 -->
+<div class="a-content member-content">
+	<div class="member-left">
+		{{include "/common/memberleft.html"}}
+	</div>
+	<div class="member-right">
+		积分规则...
+	</div>
+</div>
+ 
+<!-- 底部 -->
+{{include "/common/bottom.html"}}
+<script type="text/javascript">
+ 
+</script>
+</body>
+</html>

+ 25 - 13
core/src/web/templates/member/credit/mycredit.html

@@ -74,6 +74,7 @@
 				<div class="tab-content" id="list_0">
 					<div class="credit-explain">当前积分 <span style="font-size:22;color:red">{{$.T.user.i_credit}}</span><span class="mx" onclick="outoClick('c_1')">查看积分明细</span></div>
 					<div class="credit">
+						<div id="csrw">
 						<div class="btzrw">
 							<div class="btzrw-z">做任务赚积分</div>
 							<div class="btzrw-ms">(完成全部带 * 号的任务,可以额外获得1001积分哦)</div>
@@ -91,7 +92,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">* 完成实名认证,得100积分</td>
-								{{if eq .T.A_RZ true}}
+								{{if or .T.AAll .T.A_RZ}}
 								<td width="10%" align="center">
 								<span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
@@ -104,7 +105,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 绑定邮箱,得50积分</td>
-								{{if .T.A_BYX}}
+								{{if or .T.AAll .T.A_BYX}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -117,7 +118,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">* 绑定手机,得50积分</td>
-								{{if .T.A_BSJ}}
+								{{if or .T.AAll .T.A_BSJ}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -127,7 +128,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 完善你的企业黄页,得50积分(实名认证后才可使用)</td>
-								{{if .T.A_CJMP}}
+								{{if or .T.AAll .T.A_CJMP}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -137,7 +138,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">* 完成一次企业查询,得50积分</td>
-								{{if .T.A_QYCX}}
+								{{if or .T.AAll .T.A_QYCX}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -147,7 +148,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 发布一条服务信息,得50积分(实名认证后才可使用)</td>
-								{{if .T.A_FFW}}
+								{{if or .T.AAll .T.A_FFW}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -157,7 +158,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">*  发布一条需求信息,得50积分</td>
-								{{if .T.A_FXQ}}
+								{{if or .T.AAll .T.A_FXQ}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -167,7 +168,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 去剑鱼订阅一组关键词,得50积分</td>
-								{{if .T.A_SYJY}}
+								{{if or .T.AAll .T.A_SYJY}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -177,7 +178,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">* 查看神奇的关系网,得50积分(实名认证后才可查看)</td>
-								{{if .T.A_CKGXW}}
+								{{if or .T.AAll .T.A_CKGXW}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -187,7 +188,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 分享一条服务/需求信息,得50积分</td>
-								{{if .T.A_FXFWXQ}}
+								{{if or .T.AAll .T.A_FXFWXQ}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -197,7 +198,7 @@
 							</tr>
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">* 完成一次交易,得100积分</td>
-								{{if .T.A_WCJY}}
+								{{if or .T.AAll .T.A_WCJY}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -207,7 +208,7 @@
 							</tr>
 							<tr class="rowone">
 								<td width="60%" style="text-indent: 7em;">* 完成一次交易评价,得80积分</td>
-								{{if .T.A_WCJYPJ}}
+								{{if or .T.AAll .T.A_WCJYPJ}}
 								<td width="10%" align="center"><span class="ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 已完成</td>
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
@@ -216,6 +217,8 @@
 								{{end}}
 							</tr>
 						</table>
+						</div>
+						<div id="rcrw">
 						<div class="btzrw">
 							<div class="btzrw-z">日常任务</div>
 							<div class="btzrw-ms"></div>
@@ -280,7 +283,8 @@
 								<td width="10%" align="center"></td>
 								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('')">邀请</span></td>
 							</tr>
-							</table>
+						</table>
+						</div>
 						</div>
 					</div>
 				</div>
@@ -302,6 +306,14 @@ $(function(){
 		var _v=$(this).attr("value")
 		checkContent("list_"+_v)
 	})
+
+	var AAll="{{.T.AAll}}"
+	if (AAll==true){
+		rcrw=$("#rcrw").html();
+		csrw=$("#csrw").html();
+		$("#rcrw").html(csrw);
+		$("#csrw").html(rcrw);
+	}
 })
 function checkContent(id){
 	$(".tab-content").each(function(){