Lines Matching defs:queries
208 $queries = unserialize(io_readFile($this->qs_file,false));
209 if(!$queries) $queries = array('words'=>array(), 'ns'=>array(), 'extern'=>array() );
240 $this->set_queries($queries,$word,'words');
246 $this->set_queries($queries,$ns,'ns');
269 $this->set_queries($queries['extern'],urldecode($name),'name');
271 $this->set_queries($queries['extern'],urldecode($val),'val');
272 $this->set_named_values($queries['extern']['name'][urldecode($name)],urldecode($val));
277 io_saveFile($this->qs_file,serialize($queries));
282 function set_named_values(&$queries,$val="_empty_") {
284 if(!isset($queries['values'])) {
285 $queries['values'] = array();
287 if(!isset($queries['values'][$this->ipaddr])) {
288 $queries['values'][$this->ipaddr] = array();
290 if(!in_array($val, $queries['values'][$this->ipaddr])) {
291 $queries['values'][$this->ipaddr][] = $val;
295 function set_queries(&$queries,$word,$which) {
296 if(!isset($queries[$which][$word])) {
297 $queries[$which][$word]['count'] = 1;
300 $queries[$which][$word]['count'] += 1;
302 if(!isset($queries[$which][$word][$this->ipaddr])) {
303 $queries[$which][$word][$this->ipaddr] = 1;
305 else $queries[$which][$word][$this->ipaddr] += 1;