Subversion Repositories SmartDukaan

Rev

Rev 15582 | Rev 15621 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15582 Rev 15607
Line 120... Line 120...
120
		}
120
		}
121
		$agentActivations = $this->User->query($otherSql);
121
		$agentActivations = $this->User->query($otherSql);
122
		$this->set('agentActivations',$agentActivations);
122
		$this->set('agentActivations',$agentActivations);
123
		$this->set(compact('activations','date'));
123
		$this->set(compact('activations','date'));
124
	}
124
	}
-
 
125
 
-
 
126
	public function admin_brandpreferences_report() {
-
 
127
		$sql = "SELECT DATE( created ) date, brand, COUNT( id ) count FROM  `brand_preferences` WHERE STATUS =  'show' AND DATEDIFF( NOW( ) , created ) <= 7 GROUP BY  `brand_preferences`.`brand` , DATE( created ) ORDER BY DATE( created ) DESC,count desc";
-
 
128
		$this->loadModel('BrandPreference');
-
 
129
		$brand_preferences = $this->BrandPreference->query($sql);
-
 
130
		$this->set(compact('brand_preferences'));
-
 
131
	}
-
 
132
 
-
 
133
	public function admin_brandfilters_report() {
-
 
134
		$sql = "select date(created) date,group_concat(filters separator '|') brands from user_filters where type = 'brand' group by date(created)";
-
 
135
		$this->loadModel('UserFilter');
-
 
136
		$brand_filters = $this->UserFilter->query($sql);
-
 
137
		$this->set(compact('brand_filters'));
-
 
138
	}
125
}
139
}
126
140