Cheetah
ChWsbSearch.php
Go to the documentation of this file.
1 <?php
2 
8 require_once(CH_DIRECTORY_PATH_INC . 'db.inc.php');
9 require_once(CH_DIRECTORY_PATH_INC . 'utils.inc.php');
10 require_once(CH_DIRECTORY_PATH_INC . 'design.inc.php');
11 ch_import('ChTemplVotingView');
12 
39 {
40  var $aClasses = array(); // array of all search classes
41  var $aChoice = array(); // array of current search classes which were choosen in search area
42 
48  function __construct ($aChoice = '')
49  {
50  $this->aClasses = $GLOBALS['MySQL']->fromCache('sys_objects_search', 'getAllWithKey',
51  'SELECT `ID` as `id`,
52  `Title` as `title`,
53  `ClassName` as `class`,
54  `ClassPath` as `file`,
55  `ObjectName`
56  FROM `sys_objects_search`', 'ObjectName'
57  );
58 
59  if (is_array($aChoice) && !empty($aChoice)) {
60  foreach ($aChoice as $sValue) {
61  if (isset($this->aClasses[$sValue]))
62  $this->aChoice[$sValue] = $this->aClasses[$sValue];
63  }
64  } else {
65  $this->aChoice = $this->aClasses;
66  }
67  }
68 
69  /*
70  * create units for all classes and calling their processing methods
71  */
72 
73  function response ()
74  {
75  foreach ($this->aChoice as $sKey => $aValue) {
76  if (!class_exists($aValue['class'])) {
77  $sClassPath = str_replace('{tmpl}', $GLOBALS['oSysTemplate']->getCode(), $aValue['file']);
78  require_once(CH_DIRECTORY_PATH_ROOT . $sClassPath);
79  }
80  $oEx = new $aValue['class']();
81  $oEx->id = $aValue['id'];
82  $sCode .= $oEx->processing();
83  }
84  return $sCode;
85  }
86 
87  function getEmptyResult ()
88  {
89  $sKey = _t('_Empty');
90  return DesignBoxContent($sKey, MsgBox($sKey), 1);
91  }
92 
93 }
94 
95 /*
96  * Search class for processing search requests and displaying search results
97  *
98  * Allows present content from modules on search params or internal (via fields of class) conditions
99  *
100  * Example of usage (you can see example in any of default Dolhpin's modules):
101  *
102  * 1. Extends your own search class from this one (or from ChBaseSearchResult or ChBaseSearchResultSharedMedia classes)
103  * 2. Set necessary fields of class (using as example ChFilesSearch):
104  // main field of search class
105  * $this->aCurrent = array(
106  *
107  // name of module
108  'name' => 'ch_files',
109 
110  // language key with name of module
111  'title' => '_ch_files',
112 
113  // main content table
114  'table' => 'ch_files_main',
115 
116  // array of all fields which can be choosen for select in result query
117  'ownFields' => array('ID', 'Title', 'Uri', 'Desc', 'Date', 'Size', 'Ext', 'Views', 'Rate', 'RateCount', 'Type'),
118 
119  // array of fields which take a part in search by keyword (global search and related words only - in other cases leave it blank)
120  'searchFields' => array('Title', 'Tags', 'Desc', 'Categories'),
121 
122  //array of join tables
123  'type' - type of join
124  'table' - join table
125  'mainField' - field from main table for 'on' condition
126  'onField' - field from joining table for 'on' condition
127  'joinFields' - array of fields from joining table
128  'join' => array(
129  'profile' => array(
130  'type' => 'left',
131  'table' => 'Profiles',
132  'mainField' => 'Owner',
133  'onField' => 'ID',
134  'joinFields' => array('NickName')
135  ), ...
136  ),
137 
138  // array of search parameters
139  'value' - value of search parameter (can be number, string or array)
140  'field' - field which will take value of search, may be lefy as blank then in search query will be pasted to WHERE conditon via operator AGAINST
141  'operator' - operator between field and value (can be 'in', 'not in', '>', '<', 'against', 'like' and '=' by default),
142  'paramName' - GET param which will keep 'value' for pagianation
143  'restriction' => array(
144  'activeStatus' => array('value'=>'approved', 'field'=>'Status', 'operator'=>'=', 'paramName' => 'status'),
145  'albumType' => array('value'=>'', 'field'=>'Type', 'operator'=>'=', 'paramName'=>'albumType', 'table'=>'sys_albums'),
146  ),
147  // array of pagination
148  'perPage' - units per page
149  'page' - numer of current page
150  'totalNum' - total number of found results
151  'totalPages' - number of total pages with search results
152  'paginate' => array('perPage' => 10, 'page' => 1, 'totalNum' => 10, 'totalPages' => 1),
153  // sort mode - by default it was last (DESC by date)
154  'sorting' => 'last',
155 
156  // mode of units presentation in search result, can be 'short' or 'full' view
157  'view' => 'full',
158 
159  // field of id
160  'ident' => 'ID',
161 
162  // rss feed array
163  'rss' => array(
164  'title' => '',
165  'link' => '',
166  'image' => '',
167  'profile' => 0,
168  'fields' => array (
169  'Link' => '',
170  'Title' => 'Title',
171  'DateTimeUTS' => 'Date',
172  'Desc' => 'Desc',
173  'Photo' => '',
174  ),
175  ),
176  );
177 
178  // array of fields renamings
179  var $aPseud - filling in costructor by function _getPseud
180 
181  // unique identificator from `sys_objects_search` table
182  var $id;
183 
184  // indicator of rate connection
185  var $iRate
186 
187  // rate object field
188  var $oRate;
189 
190  // indicator of connection parts in display search data (for function addCustomParts)
191  var $bCustomParts;
192 
193  *
194  * Memberships/ACL:
195  * Doesn't depend on user's membership.
196  *
197  * Alerts:
198  * no alerts available
199 
200  */
201 
203 {
205  var $aPseud;
206  var $id;
207 
208  var $iRate = 1;
209  var $oRate = null;
210 
211  var $bCustomParts = false;
212 
213  /*
214  * constructor
215  * filling identificator field
216  */
217 
218  function __construct ()
219  {
220  if (isset($this->aPseud['id']))
221  $this->aCurrent['ident'] = $this->aPseud['id'];
222  }
223 
224  /*
225  * Get html box of search results (usually used in grlobal search)
226  * @return html code
227  */
228 
229  function processing ()
230  {
231  $sCode = $this->displayResultBlock();
232  if ($this->aCurrent['paginate']['totalNum'] > 0) {
233  $sPaginate = $this->showPagination();
234  $sCode = $this->displaySearchBox($sCode, $sPaginate);
235  } else
236  $sCode = '';
237  return $sCode;
238  }
239 
240  /*
241  * Get html output of search result
242  * @return html code
243  */
244 
245  function displayResultBlock ()
246  {
247  $aData = $this->getSearchData();
248  if (count($aData) > 0) {
249  $sCode .= $this->addCustomParts();
250  foreach ($aData as $iKey => $aValue) {
251  $sCode .= $this->displaySearchUnit($aValue);
252  }
253  }
254  return $sCode;
255  }
256 
257  /*
258  * Add different code before html output (usually redeclared)
259  * no return result
260  */
261 
262  function addCustomParts ()
263  {
264  }
265 
266  /*
267  * Get array for rss output
268  */
269 
270  function rss ()
271  {
272  if (!isset($this->aCurrent['rss']['fields']) || !isset($this->aCurrent['rss']['link']))
273  return '';
274 
275  $aData = $this->getSearchData();
276  $f = &$this->aCurrent['rss']['fields'];
277  if ($aData) {
278  foreach ($aData as $k => $a) {
279  $aData[$k][$f['Link']] = $this->getRssUnitLink ($a);
280 
281  if(isset($f['Image']))
282  $aData[$k][$f['Image']] = $this->getRssUnitImage ($a, $f['Image']);
283  }
284  }
285 
286  require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbRssFactory.php');
287  $oRss = new ChWsbRssFactory();
288  $oRss->SetRssHeader();
289  return $oRss->GenRssByCustomData(
290  $aData,
291  $this->aCurrent['rss']['title'] ? $this->aCurrent['rss']['title'] : $this->aCurrent['title'],
292  $this->aCurrent['rss']['link'],
293  $this->aCurrent['rss']['fields'],
294  isset($this->aCurrent['rss']['image']) ? $this->aCurrent['rss']['image'] : '',
295  isset($this->aCurrent['rss']['profile']) ? $this->aCurrent['rss']['profile'] : 0
296  );
297  }
298 
299  /*
300  * Return rss unit link (redeclared)
301  */
302 
303  function getRssUnitLink (&$a)
304  {
305  // override this functions to return permalink to rss unit
306  }
307 
311  function getRssUnitImage (&$a, $sField)
312  {
313  // override this functions to return image for rss unit
314  }
315 
316  /*
317  * Naming fields in query's body
318  * @param string $sFieldName name of field
319  * @param string $sTableName name of field's table
320  * $param string $sOperator of field's calculation (like MAX)
321  * @param boolean $bRenameMode indicator for renaming and unsetting fields from field of class $this->aPseud
322  * return $sqlUnit sql code and unsetting elements from aPseud field
323  */
324 
325  function setFieldUnit ($sFieldName, $sTableName, $sOperator = '', $bRenameMode = true)
326  {
327  if (strlen($sOperator) > 0) {
328  $sqlUnit = "$sOperator(`$sTableName`.`$sFieldName`)";
329  } else
330  $sqlUnit = "`$sTableName`.`$sFieldName`";
331 
332  if (isset($this->aPseud) && $bRenameMode !== false) {
333  $sKey = array_search($sFieldName, $this->aPseud);
334  if ($sKey !== false) {
335  $sqlUnit .= " as `$sKey`";
336  unset($this->aPseud[$sKey]);
337  }
338  }
339  return $sqlUnit . ', ';
340  }
341 
342  /*
343  * Get html code of of every search unit
344  * @param array $aData array of every search unit
345  * return html code
346  */
347 
348  function displaySearchUnit ($aData)
349  {
350  }
351 
352  /*
353  * Get html code of search box with search results
354  * @param string $sCode html code of search results
355  * $param $sPaginate html code of paginate
356  * return html code
357  */
358 
359  function displaySearchBox ($sCode, $sPaginate = '')
360  {
361  }
362 
363  /*
364  * Get html code of pagination
365  */
366 
367  function showPagination ($aParams = array())
368  {
369  }
370 
371  /*
372  * Get array of data with search results
373  * return array with data
374  */
375 
376  function getSearchData ()
377  {
378  $this->aPseud = $this->_getPseud();
379  $this->setConditionParams();
380  if ($this->aCurrent['paginate']['totalNum'] > 0) {
381  $aData = $this->getSearchDataByParams();
382  return $aData;
383  }
384  }
385 
386  /*
387  * Get array with code for sql elements
388  * @param boolean #bREnameMode indicator of renmaing fields
389  * return array with joinFields, ownFields, groupBy and join elements
390  */
391 
392  function getJoins ($bRenameMode = true)
393  {
394  $aSql = array();
395  // joinFields & join
396  if (isset($this->aCurrent['join']) && is_array($this->aCurrent['join'])) {
397  $aSql = array('join'=>'', 'ownFields'=>'', 'joinFields'=>'', 'groupBy'=>'');
398  foreach ($this->aCurrent['join'] as $sKey => $aValue) {
399  if (is_array($aValue['joinFields'])) {
400  foreach ($aValue['joinFields'] as $sValue) {
401  $aSql['joinFields'] .= $this->setFieldUnit($sValue, $aValue['table'], isset($aValue['operator']) ? $aValue['operator'] : null, $bRenameMode);
402  }
403  }
404  // group by
405  if (isset($aValue['groupTable']))
406  $aSql['groupBy'] = "GROUP BY `{$aValue['groupTable']}`.`{$aValue['groupField']}`, ";
407  $sOn = isset($aValue['mainTable']) ? $aValue['mainTable'] : $this->aCurrent['table'];
408  $aSql['join'] .= " {$aValue['type']} JOIN `{$aValue['table']}` ON `{$aValue['table']}`.`{$aValue['onField']}`=`$sOn`.`{$aValue['mainField']}`";
409  $aSql['ownFields'] .= $this->setFieldUnit($aValue['mainField'], $sOn, '', $bRenameMode);
410  }
411  $aSql['joinFields'] = trim($aSql['joinFields'], ', ');
412  $aSql['groupBy'] = trim($aSql['groupBy'], ', ');
413  }
414  return $aSql;
415  }
416 
417  /*
418  * Concat sql parts of query, run it and return result array
419  * @param $aParams addon param
420  * return $aData multivariate array
421  */
422 
423  function getSearchDataByParams ($aParams = '')
424  {
425  $aSql = array('ownFields'=>'', 'joinFields'=>'', 'order'=>'');
426 
427  // searchFields
428  foreach ($this->aCurrent['ownFields'] as $sValue) {
429  $aSql['ownFields'] .= $this->setFieldUnit($sValue, $this->aCurrent['table']);
430  }
431  // joinFields & join
432  $aJoins = $this->getJoins();
433  if (!empty($aJoins)) {
434  $aSql['ownFields'] .= $aJoins['ownFields'];
435  $aSql['joinFields'] .= $aJoins['joinFields'];
436  $aSql['join'] = $aJoins['join'];
437  $aSql['groupBy'] = $aJoins['groupBy'];
438  } else
439  $aSql['ownFields'] = trim($aSql['ownFields'], ', ');
440  // from
441  $aSql['from'] = " FROM `{$this->aCurrent['table']}`";
442 
443  // where
444  $aSql['where'] = $this->getRestriction();
445 
446  // limit
447  $aSql['limit'] = $this->getLimit();
448 
449  // sorting
450  $this->setSorting();
451 
452  $aSort = $this->getSorting($this->aCurrent['sorting']);
453  foreach ($aSort as $sKey => $sValue)
454  $aSql[$sKey] .= $sValue;
455 
456  // rate part
457  $aRate = $this->getRatePart();
458  if (is_array($aRate)) {
459  foreach ($aRate as $sKey => $sValue)
460  $aSql[$sKey] .= $sValue;
461  }
462 
463  // execution
464  $sqlQuery = "SELECT {$aSql['ownFields']} {$aSql['joinFields']} {$aSql['from']} {$aSql['join']} {$aSql['where']} {$aSql['groupBy']} {$aSql['order']} {$aSql['limit']}";
465  //echoDbg($sqlQuery);
466  $aRes = db_res_assoc_arr($sqlQuery);
467  return $aRes;
468  }
469 
470  /*
471  * Set class fields condition params and paginate array
472  */
473 
475  {
476  $aWhere = array();
477  $aWhere[] = '1';
478 
479  $sKeyword = ch_get('keyword');
480  if ($sKeyword !== false)
481  $this->aCurrent['restriction']['keyword'] = array(
482  'value' => process_db_input($sKeyword, CH_TAGS_STRIP),
483  'field' => '',
484  'operator' => 'against'
485  );
486 
487  if (isset($_GET['ownerName'])) {
488  $sName = process_db_input($_GET['ownerName'], CH_TAGS_STRIP);
489  $iUser = (int)db_value("SELECT `ID` FROM `Profiles` WHERE `NickName`='$sName'");
490  $GLOBALS['oTopMenu']->setCurrentProfileID($iUser);
491  } elseif (isset($_GET['userID']))
492  $iUser = (int)$_GET['userID'];
493 
494  if (!empty($iUser))
495  $this->aCurrent['restriction']['owner']['value'] = $iUser;
496 
497  $iTotalNum = $this->getCount();
498  if ($iTotalNum > 0) {
499  $this->aCurrent['paginate']['totalNum'] = $iTotalNum;
500  $this->setPaginate();
501  $this->aCurrent['paginate']['totalPages'] = ceil( $iTotalNum / $this->aCurrent['paginate']['perPage'] );
502  } else {
503  $this->aCurrent['paginate']['totalNum'] = 0;
504  $this->aCurrent['paginate']['totalPages'] = 0;
505  }
506  }
507 
508  /*
509  * Count all found elements
510  * return number of all found records
511  */
512 
513  function getCount ()
514  {
515  $aJoins = $this->getJoins(false);
516  $sqlQuery = "SELECT COUNT(*) FROM `{$this->aCurrent['table']}` {$aJoins['join']} " . $this->getRestriction() . " {$aJoins['groupBy']}";
517  return (int)db_value($sqlQuery);
518  }
519 
520  /*
521  * Check restriction params and make condition part of query
522  * return $sqlWhere sql code of query for WHERE part
523  */
524 
525  function getRestriction ()
526  {
527  $sqlWhere = '';
528  if (isset($this->aCurrent['restriction'])) {
529  $aWhere[] = '1';
530  foreach ($this->aCurrent['restriction'] as $sKey => $aValue) {
531  $sqlCondition = '';
532  if (isset($aValue['operator']) && !empty($aValue['value'])) {
533  $sFieldTable = isset($aValue['table']) ? $aValue['table'] : $this->aCurrent['table'];
534  $sqlCondition = "`{$sFieldTable}`.`{$aValue['field']}` ";
535  if (!isset($aValue['no_quote_value']))
536  $aValue['value'] = process_db_input($aValue['value'], CH_TAGS_STRIP);
537  switch ($aValue['operator']) {
538  case 'against':
539  $aCond = isset($aValue['field']) && strlen($aValue['field']) > 0 ? $aValue['field'] : $this->aCurrent['searchFields'];
540  $sqlCondition = !empty($aCond) ? $this->getSearchFieldsCond($aCond, $aValue['value']) : "";
541  break;
542  case 'like':
543  $sqlCondition .= "LIKE '%" . $aValue['value'] . "%'";
544  break;
545  case 'in':
546  case 'not in':
547  $sValuesString = $this->getMultiValues($aValue['value']);
548  $sqlCondition .= strtoupper($aValue['operator']) . '('.$sValuesString.')';
549  break;
550  default:
551  $sqlCondition .= $aValue['operator'] . (isset($aValue['no_quote_value']) && $aValue['no_quote_value'] ? $aValue['value'] : "'" . $aValue['value'] . "'");
552  break;
553  }
554  }
555  if (strlen($sqlCondition) > 0)
556  $aWhere[] = $sqlCondition;
557  }
558  $sqlWhere .= "WHERE ". implode(' AND ', $aWhere);
559  }
560  return $sqlWhere;
561  }
562 
563  /*
564  * Get limit part of query
565  * return $sqlFrom code for limit part pf query
566  */
567 
568  function getLimit ()
569  {
570  if (isset($this->aCurrent['paginate'])) {
571  $sqlFrom = ( $this->aCurrent['paginate']['page'] - 1 ) * $this->aCurrent['paginate']['perPage'];
572  $sqlTo = $this->aCurrent['paginate']['perPage'];
573  if ($sqlTo > 0)
574  return 'LIMIT ' . $sqlFrom .', '.$sqlTo;
575  }
576  }
577 
578  /*
579  * Set sorting field of class
580  */
581 
582  function setSorting ()
583  {
584  $this->aCurrent['sorting'] = isset($_GET[$this->aCurrent['name'] . '_mode']) ? $_GET[$this->aCurrent['name'] . '_mode'] : $this->aCurrent['sorting'];
585  }
586 
587  /*
588  * Get sorting part of query according current sorting mode
589  * @param string $sSortType sorting type
590  * return array with sql elements order and ownFields
591  */
592  function getSorting ($sSortType = 'last')
593  {
594  $aOverride = $this->getAlterOrder();
595  if (is_array($aOverride) && !empty($aOverride))
596  return $aOverride;
597 
598  $aSql = array();
599  switch ($sSortType) {
600  case 'rand':
601  $aSql['order'] = "ORDER BY RAND()";
602  break;
603  case 'top':
604  $sHow = "DESC";
605  $aSql['order'] = "ORDER BY `Rate` $sHow, `RateCount` $sHow, `date` $sHow";
606  break;
607  case 'score':
608  if (is_array($this->aCurrent['restriction']['keyword'])) {
609  $aSql['order'] = "ORDER BY `score` DESC";
610  $aSql['ownFields'] .= $this->getSearchFieldsCond($this->aCurrent['searchFields'], $this->aCurrent['restriction']['keyword']['value'], 'score'). ', ';
611  }
612  break;
613  case 'voteTime':
614  $aSql['order'] = "ORDER BY `voteTime` DESC";
615  break;
616  case 'none':
617  $aSql['order'] = "";
618  break;
619  default:
620  $aSql['order'] = "ORDER BY `date` DESC";
621  }
622  return $aSql;
623  }
624 
625  /*
626  * Return own varaint for sorting (redeclare if necessary)
627  * return array of sql elements
628  */
629 
630  function getAlterOrder ()
631  {
632  return array();
633  }
634 
635  /*
636  * Set paginate fields of class according GET params 'page' and 'per_page'
637  * forcePage is need for setting most important number of current page
638  */
639 
640  function setPaginate ()
641  {
642  $this->aCurrent['paginate']['perPage'] = (isset($_GET['per_page']) && (int)$_GET['per_page'] != 0) ? (int)$_GET['per_page'] : $this->aCurrent['paginate']['perPage'];
643  if (empty($this->aCurrent['paginate']['perPage']))
644  $this->aCurrent['paginate']['perPage'] = 10;
645 
646  $this->aCurrent['paginate']['page'] = isset($this->aCurrent['paginate']['forcePage'])
647  ? (int)$this->aCurrent['paginate']['forcePage']
648  : (empty($_GET['page']) ? 1 : (int)$_GET['page']);
649 
650  if ($this->aCurrent['paginate']['page'] < 1)
651  $this->aCurrent['paginate']['page'] = 1;
652  }
653 
654  /*
655  * Get sql where condition for search fields
656  * @param array of search fields
657  * @param string $sKeyword keyword value for search
658  * @param string sPseud for setting new name for generated set of fields in query
659  * return sql code of WHERE part in query
660  */
661 
662  function getSearchFieldsCond ($aFields, $sKeyword, $sPseud = '')
663  {
664  if (strlen($sKeyword) > 0) {
665  $bLike = getParam('useLikeOperator');
666  $aSql = array(
667  'function' => 'MATCH',
668  'operator' => 'AGAINST',
669  'word' => $sKeyword
670  );
671  if ($bLike == 'on') {
672  $aSql = array(
673  'function' => 'CONCAT',
674  'operator' => 'LIKE',
675  'word' => '%' . preg_replace('/\s+/', '%', $sKeyword) . '%'
676  );
677  }
678  $sqlWhere = " {$aSql['function']}(";
679  if (is_array($aFields)) {
680  foreach ($aFields as $sValue)
681  $sqlWhere .= "`{$this->aCurrent['table']}`.`$sValue`, ";
682  } else
683  $sqlWhere .= "`{$this->aCurrent['table']}`.`$aFields`";
684  $sqlWhere = trim($sqlWhere, ', ') . ") {$aSql['operator']} ('{$aSql['word']}')";
685 
686  if (strlen($sPseud) > 0)
687  $sqlWhere .= " as `$sPseud`";
688 
689  return $sqlWhere;
690  }
691  }
692 
693  /*
694  * Get set from several values for 'in' and 'not in' operators
695  * @param $aVlues array of values
696  * return sql code for field with operator IN (NOT IN)
697  */
698 
699  function getMultiValues ($aValues)
700  {
701  $sqlPart = is_array($aValues) ? implode("','", $aValues) : $aValues;
702  return "'".$sqlPart."'";
703  }
704 
705  /*
706  * Generate rate object if it wasn't created yet
707  */
708 
709  function getRatePart ()
710  {
711  if ($this->iRate == 1)
712  $this->oRate = new ChTemplVotingView($this->aCurrent['name'], 0, 0);
713  }
714 
715  /*
716  * Fill field aPseud for current class (if you will use own getSearchUnit methods then not necessary to redeclare)
717  */
718 
719  // system method for filling aPseud array
720  function _getPseud ()
721  {
722  }
723 }
ChWsbSearch\response
response()
Definition: ChWsbSearch.php:73
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
ChWsbSearchResult\rss
rss()
Definition: ChWsbSearch.php:270
ChWsbSearchResult\getAlterOrder
getAlterOrder()
Definition: ChWsbSearch.php:630
ChWsbSearchResult
Definition: ChWsbSearch.php:203
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
$f
global $f
Definition: callback.php:13
ChWsbSearchResult\$iRate
$iRate
Definition: ChWsbSearch.php:208
ChWsbSearch\$aClasses
$aClasses
Definition: ChWsbSearch.php:40
ChWsbSearchResult\__construct
__construct()
Definition: ChWsbSearch.php:218
$sCode
$sCode
Definition: explanation.php:19
db_res_assoc_arr
db_res_assoc_arr($query, $bindings=[])
Definition: db.inc.php:66
ChWsbSearchResult\processing
processing()
Definition: ChWsbSearch.php:229
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ch_get
ch_get($sName)
Definition: utils.inc.php:1664
php
ChWsbSearchResult\getLimit
getLimit()
Definition: ChWsbSearch.php:568
ChWsbSearchResult\_getPseud
_getPseud()
Definition: ChWsbSearch.php:720
ChWsbSearchResult\setConditionParams
setConditionParams()
Definition: ChWsbSearch.php:474
ChWsbSearchResult\$aCurrent
$aCurrent
Definition: ChWsbSearch.php:204
ChWsbSearch\__construct
__construct($aChoice='')
Definition: ChWsbSearch.php:48
ChWsbSearchResult\$aPseud
$aPseud
Definition: ChWsbSearch.php:205
ChWsbSearchResult\addCustomParts
addCustomParts()
Definition: ChWsbSearch.php:262
$_GET
$_GET['debug']
Definition: index.php:67
ChWsbSearchResult\setPaginate
setPaginate()
Definition: ChWsbSearch.php:640
ChWsbSearchResult\getRatePart
getRatePart()
Definition: ChWsbSearch.php:709
$aFields
$aFields
Definition: preValues.php:19
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
ChWsbSearch\$aChoice
$aChoice
Definition: ChWsbSearch.php:41
ChWsbSearchResult\displayResultBlock
displayResultBlock()
Definition: ChWsbSearch.php:245
ChWsbRssFactory
Definition: ChWsbRssFactory.php:9
ChWsbSearchResult\displaySearchUnit
displaySearchUnit($aData)
Definition: ChWsbSearch.php:348
ChWsbSearchResult\getRssUnitLink
getRssUnitLink(&$a)
Definition: ChWsbSearch.php:303
ChWsbSearchResult\getCount
getCount()
Definition: ChWsbSearch.php:513
ChWsbSearchResult\getSearchData
getSearchData()
Definition: ChWsbSearch.php:376
ChWsbSearch\getEmptyResult
getEmptyResult()
Definition: ChWsbSearch.php:87
ChWsbSearchResult\getSorting
getSorting($sSortType='last')
Definition: ChWsbSearch.php:592
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChWsbSearchResult\getSearchDataByParams
getSearchDataByParams($aParams='')
Definition: ChWsbSearch.php:423
ChWsbSearchResult\$id
$id
Definition: ChWsbSearch.php:206
CH_TAGS_STRIP
const CH_TAGS_STRIP
Definition: utils.inc.php:22
ChWsbSearchResult\showPagination
showPagination($aParams=array())
Definition: ChWsbSearch.php:367
ChWsbSearchResult\getRestriction
getRestriction()
Definition: ChWsbSearch.php:525
ChWsbSearchResult\setFieldUnit
setFieldUnit($sFieldName, $sTableName, $sOperator='', $bRenameMode=true)
Definition: ChWsbSearch.php:325
ChWsbSearchResult\getSearchFieldsCond
getSearchFieldsCond($aFields, $sKeyword, $sPseud='')
Definition: ChWsbSearch.php:662
ChWsbSearchResult\getMultiValues
getMultiValues($aValues)
Definition: ChWsbSearch.php:699
db_value
db_value($query, $bindings=[], $error_checking=true, $index=0)
Definition: db.inc.php:98
ChWsbSearchResult\$oRate
$oRate
Definition: ChWsbSearch.php:209
ChWsbSearchResult\$bCustomParts
$bCustomParts
Definition: ChWsbSearch.php:211
$iTotalNum
if(isset($_POST['crsss']) &&is_array($_POST['crsss'])) $iTotalNum
Definition: post_mod_crss.php:40
DesignBoxContent
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
Definition: design.inc.php:78
ChWsbSearch
Definition: ChWsbSearch.php:39
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbSearchResult\setSorting
setSorting()
Definition: ChWsbSearch.php:582
$sName
$sName
Definition: ChWsbAdminTools.php:853
ChTemplVotingView
Definition: ChTemplVotingView.php:14
ChWsbSearchResult\getJoins
getJoins($bRenameMode=true)
Definition: ChWsbSearch.php:392
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
ChWsbSearchResult\getRssUnitImage
getRssUnitImage(&$a, $sField)
Definition: ChWsbSearch.php:311
ChWsbSearchResult\displaySearchBox
displaySearchBox($sCode, $sPaginate='')
Definition: ChWsbSearch.php:359