61. File Comparison Report

Produced on Thu Jul 17 07:17:33 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

61.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2 search.php Sun May 11 13:17:04 2008 UTC
2 Dolphin-v.6.1.3 search.php Wed Jul 16 09:51:23 2008 UTC

61.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 4 1080
Changed 1 2
Inserted 1 1
Removed 1 1

61.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

61.4 Active regular expressions

No regular expressions were active.

61.5 Comparison detail

1   <?php   1   <?php
2     2  
3   require_on ce( './inc /header.in c.php' );   3   require_on ce( './inc /header.in c.php' );
4   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'admin.i nc.php' );   4   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'admin.i nc.php' );
5   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'db.inc. php' );   5   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'db.inc. php' );
6   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'members .inc.php'  );   6   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'members .inc.php'  );
7   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileField s.php' );   7   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileField s.php' );
8   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofilesCont roller.php ' );   8   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofilesCont roller.php ' );
9     9  
10   $bEnZipSea rch = getP aram("enab le_zip_loc ") == "on"  ? 1 : 0;   10   $bEnZipSea rch = getP aram("enab le_zip_loc ") == "on"  ? 1 : 0;
11   if ( $bEnZ ipSearch )   11   if ( $bEnZ ipSearch )
12       requir e_once( BX _DIRECTORY _PATH_INC  . 'RadiusA ssistant.i nc' );   12       requir e_once( BX _DIRECTORY _PATH_INC  . 'RadiusA ssistant.i nc' );
13     13  
14   $_page['na me_index']  = 4;   14   $_page['na me_index']  = 4;
15   $_page['cs s_name']    = 'search .css';   15   $_page['cs s_name']    = 'search .css';
16     16  
17   check_logg ed();   17   check_logg ed();
18     18  
19     19  
20   // get sea rch mode   20   // get sea rch mode
21   if( $_REQU EST['searc h_mode'] )   21   if( $_REQU EST['searc h_mode'] )
22       $sSear chMode = $ _REQUEST[' search_mod e'];   22       $sSear chMode = $ _REQUEST[' search_mod e'];
23   else   23   else
24       $sSear chMode = ' simple';   24       $sSear chMode = ' simple';
25     25  
26   switch( $_ REQUEST['s earch_mode '] ) {   26   switch( $_ REQUEST['s earch_mode '] ) {
27       case ' quick':   27       case ' quick':
28           $i PFArea = 1 0;   28           $i PFArea = 1 0;
29           $_ page['head er_text']  = $sPageHe ader = _t(  '_Quick S earch' );   29           $_ page['head er_text']  = $sPageHe ader = _t(  '_Quick S earch' );
30       break;   30       break;
31          31       
32       case ' adv':   32       case ' adv':
33           $i PFArea = 1 1;   33           $i PFArea = 1 1;
34           $_ page['head er_text']  = $sPageHe ader = _t(  '_Advance d Search'  );   34           $_ page['head er_text']  = $sPageHe ader = _t(  '_Advance d Search'  );
35       break;   35       break;
36          36       
37       defaul t:   37       defaul t:
38           $i PFArea = 9 ;   38           $i PFArea = 9 ;
39           $s SearchMode  = 'simple ';   39           $s SearchMode  = 'simple ';
40           $_ page['head er_text']  = $sPageHe ader = _t(  '_Simple  Search' );   40           $_ page['head er_text']  = $sPageHe ader = _t(  '_Simple  Search' );
41   }   41   }
42     42  
43     43  
44   //collect  inputs   44   //collect  inputs
45   $oPF = new  BxDolProf ileFields( $iPFArea);   45   $oPF = new  BxDolProf ileFields( $iPFArea);
46   $aRequestP arams = $o PF -> coll ectSearchR equestPara ms();   46   $aRequestP arams = $o PF -> coll ectSearchR equestPara ms();
47     47  
48   if( isset(  $_REQUEST ['ID'] ) a nd (int)$_ REQUEST['I D'] )   48   if( isset(  $_REQUEST ['ID'] ) a nd (int)$_ REQUEST['I D'] )
49       $aRequ estParams[ 'ID'] = (i nt)$_REQUE ST['ID'];   49       $aRequ estParams[ 'ID'] = (i nt)$_REQUE ST['ID'];
50     50  
51   if( isset(  $_REQUEST ['NickName '] ) and t rim( $_REQ UEST['Nick Name'] ) )   51   if( isset(  $_REQUEST ['NickName '] ) and t rim( $_REQ UEST['Nick Name'] ) )
52       $aRequ estParams[ 'NickName' ] = trim(  process_pa ss_data( $ _REQUEST[' NickName']  ) );   52       $aRequ estParams[ 'NickName' ] = trim(  process_pa ss_data( $ _REQUEST[' NickName']  ) );
53     53  
54   if( isset(  $_REQUEST ['Tags'] )  and trim(  $_REQUEST ['Tags'] )  )   54   if( isset(  $_REQUEST ['Tags'] )  and trim(  $_REQUEST ['Tags'] )  )
55       $aRequ estParams[ 'Tags'] =  trim( proc ess_pass_d ata( $_REQ UEST['Tags '] ) );   55       $aRequ estParams[ 'Tags'] =  trim( proc ess_pass_d ata( $_REQ UEST['Tags '] ) );
56     56  
57   if( isset(  $_REQUEST ['distance '] ) and ( int)$_REQU EST['dista nce'] )   57   if( isset(  $_REQUEST ['distance '] ) and ( int)$_REQU EST['dista nce'] )
58       $aRequ estParams[ 'distance' ] = (int)$ _REQUEST[' distance'] ;   58       $aRequ estParams[ 'distance' ] = (int)$ _REQUEST[' distance'] ;
59     59  
60   // start p age genera tion   60   // start p age genera tion
61   ob_start() ;   61   ob_start() ;
62     62  
63   $bShowForm s = false;   63   $bShowForm s = false;
64   //echoDbg( $aRequestP arams);   64   //echoDbg( $aRequestP arams);
65   if( !empty ( $aReques tParams )  or $_REQUE ST['online _only'] )   65   if( !empty ( $aReques tParams )  or $_REQUE ST['online _only'] )
66       PageCo deSearchRe sult( $aRe questParam s );   66       PageCo deSearchRe sult( $aRe questParam s );
67   else {   67   else {
68       PageCo deSearchFo rm();   68       PageCo deSearchFo rm();
69       $bShow Forms = tr ue;   69       $bShow Forms = tr ue;
70   }   70   }
71     71  
72     72  
73   $_ni = $_p age['name_ index'];   73   $_ni = $_p age['name_ index'];
74     74  
75   $_page_con t[$_ni]['p age_main_c ode']   =  ob_get_cle an();   75   $_page_con t[$_ni]['p age_main_c ode']   =  ob_get_cle an();
76     76  
77   $_page_con t[$_ni]['s earch_by_i d']     =  $bShowForm s ? PageCo deSearchBy ID()   : ' ';   77   $_page_con t[$_ni]['s earch_by_i d']     =  $bShowForm s ? PageCo deSearchBy ID()   : ' ';
78   $_page_con t[$_ni]['s earch_by_n ick']   =  $bShowForm s ? PageCo deSearchBy Nick() : ' ';   78   $_page_con t[$_ni]['s earch_by_n ick']   =  $bShowForm s ? PageCo deSearchBy Nick() : ' ';
79   $_page_con t[$_ni]['s earch_by_t ag']    =  $bShowForm s ? PageCo deSearchBy Tag()  : ' ';   79   $_page_con t[$_ni]['s earch_by_t ag']    =  $bShowForm s ? PageCo deSearchBy Tag()  : ' ';
80     80  
81   PageCode() ;   81   PageCode() ;
82     82  
83     83  
84   function P ageCodeSea rchForm()  {   84   function P ageCodeSea rchForm()  {
85       global  $oPF;   85       global  $oPF;
86       global  $sPageHea der;   86       global  $sPageHea der;
87       global  $sSearchM ode;   87       global  $sSearchM ode;
88          88       
89       ob_sta rt();   89       ob_sta rt();
90       ?>   90       ?>
91   <form meth od="GET" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>">   91   <form meth od="GET" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>">
92       <table  class="se arch_form"  cellspaci ng="0">   92       <table  class="se arch_form"  cellspaci ng="0">
93       <?   93       <?
94          94       
95       foreac h( $oPF ->  aBlocks a s $aBlock  ) {   95       foreac h( $oPF ->  aBlocks a s $aBlock  ) {
96           ?>   96           ?>
97           <t r class="s earch_form _block">   97           <t r class="s earch_form _block">
98                <th cols pan="2"><? = _t( $aBl ock['Capti on'] ) ?>< /th>   98                <th cols pan="2"><? = _t( $aBl ock['Capti on'] ) ?>< /th>
99           </ tr>   99           </ tr>
100           <?   100           <?
101              101           
102           fo reach( $aB lock['Item s'] as $aI tem ) {   102           fo reach( $aB lock['Item s'] as $aI tem ) {
103                ?>   103                ?>
104           <t r class="s earch_form _row">   104           <t r class="s earch_form _row">
105                <td clas s="search_ form_capti on"><?= _t ( $aItem[' Caption']  ) ?>:</td>   105                <td clas s="search_ form_capti on"><?= _t ( $aItem[' Caption']  ) ?>:</td>
106                <td clas s="search_ form_value ">   106                <td clas s="search_ form_value ">
107                <?   107                <?
108              108           
109                   109                
110                //draw t he control   110                //draw t he control
111                switch(  $aItem['Ty pe'] ) {   111                switch(  $aItem['Ty pe'] ) {
112                    case  'text':   112                    case  'text':
113                    case  'area':   113                    case  'area':
114                         ?>   114                         ?>
115                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>" cl ass="input _text" />   115                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>" cl ass="input _text" />
116                         <?   116                         <?
117                    brea k;   117                    brea k;
118                       118                    
119                    case  'date':   119                    case  'date':
120                    case  'range':   120                    case  'range':
121                    case  'num':   121                    case  'num':
122                         echo _t( ' _From' );   122                         echo _t( ' _From' );
123                         ?>   123                         ?>
124                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>[0]"  class="in put_date"  />   124                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>[0]"  class="in put_date"  />
125                         <?   125                         <?
126                         echo _t( ' _To' );   126                         echo _t( ' _To' );
127                         ?>   127                         ?>
128                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>[1]"  class="in put_date"  />   128                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>[1]"  class="in put_date"  />
129                         <?   129                         <?
130                    brea k;   130                    brea k;
131                       131                    
132                    case  'select_o ne':   132                    case  'select_o ne':
133                    case  'select_s et':   133                    case  'select_s et':
134                         switch ( $ aItem['Con trol'] ) {   134                         switch ( $ aItem['Con trol'] ) {
135                             case ' select':   135                             case ' select':
136                                 ?>   136                                 ?>
137                         <select na me="<?= $a Item['Name '] ?>[]" m ultiple="m ultiple" c lass="inpu t_select">   137                         <select na me="<?= $a Item['Name '] ?>[]" m ultiple="m ultiple" c lass="inpu t_select">
138                             <?= Se lectOption s( $aItem[ 'Name'] )  ?>   138                             <?= Se lectOption s( $aItem[ 'Name'] )  ?>
139                         </select>   139                         </select>
140                                 <?   140                                 <?
141                             break;   141                             break;
142                                142                             
143                             case ' radio':   143                             case ' radio':
144                             case ' checkbox':   144                             case ' checkbox':
145                                 $a Values = g etFieldVal ues( $aIte m['Name']  );   145                                 $a Values = g etFieldVal ues( $aIte m['Name']  );
146                                    146                                 
147                                 fo reach( $aV alues as $ sKey => $s Value ) {   147                                 fo reach( $aV alues as $ sKey => $s Value ) {
148                                      ?>   148                                      ?>
149                         <input typ e="checkbo x" name="< ?= $aItem[ 'Name'] ?> []" value= "<?= $sKey  ?>" id="< ?= $aItem[ 'Name'] ?> _<?= $sKey  ?>" />   149                         <input typ e="checkbo x" name="< ?= $aItem[ 'Name'] ?> []" value= "<?= $sKey  ?>" id="< ?= $aItem[ 'Name'] ?> _<?= $sKey  ?>" />
150                         <label for ="<?= $aIt em['Name']  ?>_<?= $s Key ?>"><? = _t( $sVa lue ) ?></ label>   150                         <label for ="<?= $aIt em['Name']  ?>_<?= $s Key ?>"><? = _t( $sVa lue ) ?></ label>
151                                      <?   151                                      <?
152                                 }   152                                 }
153                             break;   153                             break;
154                         }   154                         }
155                    brea k;   155                    brea k;
156                       156                    
157                    case  'bool':   157                    case  'bool':
158                         ?>   158                         ?>
159                         <input typ e="checkbo x" name="< ? $aItem[' Name'] ?>"  value="1"  />   159                         <input typ e="checkbo x" name="< ? $aItem[' Name'] ?>"  value="1"  />
160                         <?   160                         <?
161                    brea k;   161                    brea k;
162                       162                    
163                    case  'system':   163                    case  'system':
164                         switch( $a Item['Name '] ) {   164                         switch( $a Item['Name '] ) {
165                             case ' Couple':   165                             case ' Couple':
166                                 ?>   166                                 ?>
167                         <input typ e="checkbo x" name="C ouple[0]"  value="1"  id="Couple _0" />   167                         <input typ e="checkbo x" name="C ouple[0]"  value="1"  id="Couple _0" />
168                         <label for ="Couple_0 "><?= _t(  '_Single'  ) ?></labe l>   168                         <label for ="Couple_0 "><?= _t(  '_Single'  ) ?></labe l>
169                         <input typ e="checkbo x" name="C ouple[1]"  value="1"  id="Couple _1" />   169                         <input typ e="checkbo x" name="C ouple[1]"  value="1"  id="Couple _1" />
170                         <label for ="Couple_1 "><?= _t(  '_Couple'  ) ?></labe l>   170                         <label for ="Couple_1 "><?= _t(  '_Couple'  ) ?></labe l>
171                                 <?   171                                 <?
172                             break;   172                             break;
173                                173                             
174                             case ' Keyword':   174                             case ' Keyword':
175                                 ?>   175                                 ?>
176                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>" cl ass="input _text" />   176                         <input typ e="text" n ame="<?= $ aItem['Nam e'] ?>" cl ass="input _text" />
177                                 <?   177                                 <?
178                             break;   178                             break;
179                                179                             
180                             case ' Location':   180                             case ' Location':
181                                 // echo 'Not  implemente d yet';   181                                 // echo 'Not  implemente d yet';
182                                 $s LivingWith inC = _t(" _living wi thin");   182                                 $s LivingWith inC = _t(" _living wi thin");
183                                 $s MilesC = _ t("_miles" );   183                                 $s MilesC = _ t("_miles" );
184                                 $s KmC = _t(" _kilometer s");   184                                 $s KmC = _t(" _kilometer s");
185                                 $s FromZipC =  _t("_from  zip/posta l code");   185                                 $s FromZipC =  _t("_from  zip/posta l code");
186     186  
187                                 $s Ret = <<<E OF   187                                 $s Ret = <<<E OF
188   <table cla ss=small c ellspacing =3 cellpad ding=0 bor der="0">   188   <table cla ss=small c ellspacing =3 cellpad ding=0 bor der="0">
189   <tr>   189   <tr>
190   <td>   190   <td>
191       &nbsp; {$sLivingW ithinC}&nb sp;   191       &nbsp; {$sLivingW ithinC}&nb sp;
192       <input  class=no  type=text  name="dist ance"  siz e=12 />   192       <input  class=no  type=text  name="dist ance"  siz e=12 />
193   <select na me="metric ">   193   <select na me="metric ">
194       <optio n selected ="selected " value="m iles">{$sM ilesC}</op tion>   194       <optio n selected ="selected " value="m iles">{$sM ilesC}</op tion>
195       <optio n value="k m">{$sKmC} </option>   195       <optio n value="k m">{$sKmC} </option>
196   </select>   196   </select>
197       &nbsp; {$sFromZip C}&nbsp;   197       &nbsp; {$sFromZip C}&nbsp;
198       <input  class=no  type=text  name=zip s ize=12 />   198       <input  class=no  type=text  name=zip s ize=12 />
199   </td>   199   </td>
200   </tr>   200   </tr>
201   </table>   201   </table>
202   EOF;   202   EOF;
203                             echo $ sRet;   203                             echo $ sRet;
204     204  
205                             break;   205                             break;
206                         }   206                         }
207                    brea k;   207                    brea k;
208                       208                    
209                }   209                }
210     210  
211                   211                
212                ?>   212                ?>
213                </td>   213                </td>
214           </ tr>   214           </ tr>
215                <?   215                <?
216           }   216           }
217       }   217       }
218          218       
219       ?>   219       ?>
220           <t r>   220           <t r>
221                <td clas s="search_ form_submi t_row" col span="2">   221                <td clas s="search_ form_submi t_row" col span="2">
222                    <inp ut type="c heckbox" n ame="onlin e_only" id ="online_o nly" />   222                    <inp ut type="c heckbox" n ame="onlin e_only" id ="online_o nly" />
223                    <lab el for="on line_only" ><?= _t( ' _online on ly' ) ?></ label>   223                    <lab el for="on line_only" ><?= _t( ' _online on ly' ) ?></ label>
224                    <inp ut type="c heckbox" n ame="photo s_only" id ="photos_o nly" />   224                    <inp ut type="c heckbox" n ame="photo s_only" id ="photos_o nly" />
225                    <lab el for="ph otos_only" ><?= _t( ' _With phot os only' )  ?></label >   225                    <lab el for="ph otos_only" ><?= _t( ' _With phot os only' )  ?></label >
226                    <inp ut type="s ubmit" val ue="<?= _t ( '_Fetch'  ) ?>" />   226                    <inp ut type="s ubmit" val ue="<?= _t ( '_Fetch'  ) ?>" />
227                </td>   227                </td>
228           </ tr>   228           </ tr>
229       </tabl e>   229       </tabl e>
230   </form>   230   </form>
231       <?   231       <?
232          232       
233       echo D esignBoxCo ntentBorde r( $sPageH eader, ob_ get_clean( ) );   233       echo D esignBoxCo ntentBorde r( $sPageH eader, ob_ get_clean( ) );
234   }   234   }
235     235  
236   function P ageCodeSea rchByID()   236   function P ageCodeSea rchByID()
237   {   237   {
238       ob_sta rt();   238       ob_sta rt();
239       ?>   239       ?>
240       <div c lass="sear ch_by_id">   240       <div c lass="sear ch_by_id">
241           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">   241           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">
242                <input t ype="text"  class="in put_by_id"  name="ID"  />   242                <input t ype="text"  class="in put_by_id"  name="ID"  />
243                <br />   243                <br />
244                <input t ype="submi t" class=" input_subm it" value= "<?= _t( ' _Fetch' )  ?>" />   244                <input t ype="submi t" class=" input_subm it" value= "<?= _t( ' _Fetch' )  ?>" />
245           </ form>   245           </ form>
246       </div>   246       </div>
247       <?php   247       <?php
248     248  
249       return  DesignBox ContentBor der( _t( ' _Search by  ID' ), ob _get_clean () );   249       return  DesignBox ContentBor der( _t( ' _Search by  ID' ), ob _get_clean () );
250   }   250   }
251     251  
252   function P ageCodeSea rchByNick( )   252   function P ageCodeSea rchByNick( )
253   {   253   {
254       ob_sta rt();   254       ob_sta rt();
255       ?>   255       ?>
256       <div c lass="sear ch_by_nick ">   256       <div c lass="sear ch_by_nick ">
257           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">   257           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">
258                <input t ype="text"  class="in put_by_nic k" name="N ickName" / >   258                <input t ype="text"  class="in put_by_nic k" name="N ickName" / >
259                <br />   259                <br />
260                <input t ype="submi t" value=" <?= _t( '_ Fetch' ) ? >" />   260                <input t ype="submi t" value=" <?= _t( '_ Fetch' ) ? >" />
261           </ form>   261           </ form>
262       </div>   262       </div>
263       <?php   263       <?php
264     264  
265       return  DesignBox ContentBor der( _t( ' _Search by  Nickname'  ), ob_get _clean() ) ;   265       return  DesignBox ContentBor der( _t( ' _Search by  Nickname'  ), ob_get _clean() ) ;
266   }   266   }
267     267  
268   function P ageCodeSea rchByTag()   268   function P ageCodeSea rchByTag()
269   {   269   {
270       ob_sta rt();   270       ob_sta rt();
271       ?>   271       ?>
272       <div c lass="sear ch_by_tag" >   272       <div c lass="sear ch_by_tag" >
273           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">   273           <f orm method ="GET" act ion="<?= $ _SERVER['P HP_SELF']  ?>">
274                <input t ype="text"  class="in put_by_tag " name="Ta gs" />   274                <input t ype="text"  class="in put_by_tag " name="Ta gs" />
275                <br />   275                <br />
276                <input t ype="submi t" value=" <?= _t( '_ Fetch' ) ? >" />   276                <input t ype="submi t" value=" <?= _t( '_ Fetch' ) ? >" />
277           </ form>   277           </ form>
278       </div>   278       </div>
279       <?php   279       <?php
280     280  
281       return  DesignBox ContentBor der( _t( ' _Search by  Tag' ), o b_get_clea n() );   281       return  DesignBox ContentBor der( _t( ' _Search by  Tag' ), o b_get_clea n() );
282   }   282   }
283     283  
284   function P ageCodeSea rchResult(  $aParams  ) {   284   function P ageCodeSea rchResult(  $aParams  ) {
285       global  $oPF;   285       global  $oPF;
286       global  $dir;    
287       global  $tmpl;   286       global  $tmpl;
288       global  $bEnZipSe arch;   287       global  $bEnZipSe arch;
289     288  
290       $sQuer y = 'SELEC T DISTINCT  IF( `Prof iles`.`Cou ple`=0, `P rofiles`.` ID`, IF( ` Profiles`. `Couple`>` Profiles`. `ID`, `Pro files`.`ID `, `Profil es`.`Coupl e` ) ) AS  `ID` FROM  `Profiles`  ';   289       $sQuer y = 'SELEC T DISTINCT  IF( `Prof iles`.`Cou ple`=0, `P rofiles`.` ID`, IF( ` Profiles`. `Couple`>` Profiles`. `ID`, `Pro files`.`ID `, `Profil es`.`Coupl e` ) ) AS  `ID` FROM  `Profiles`  ';
291       $sJoin   = '';   290       $sJoin   = '';
292       $aWher e = array( );   291       $aWher e = array( );
293          292       
294          293       
295       $aMyBl ocks = $oP F -> aBloc ks;   294       $aMyBl ocks = $oP F -> aBloc ks;
296       $aMyBl ocks['addS pecial'] =  array( 'I tems' => a rray(   295       $aMyBl ocks['addS pecial'] =  array( 'I tems' => a rray(
297           $o PF -> aCac he[100][0] ['Items'][ 1], //add  id   296           $o PF -> aCac he[100][0] ['Items'][ 1], //add  id
298           $o PF -> aCac he[100][0] ['Items'][ 2], //add  nickname   297           $o PF -> aCac he[100][0] ['Items'][ 2], //add  nickname
299           $o PF -> aCac he[100][0] ['Items'][ 38] //add  tags   298           $o PF -> aCac he[100][0] ['Items'][ 38] //add  tags
300       ) );   299       ) );
301          300       
302       //coll ect where  request ar ray   301       //coll ect where  request ar ray
303       foreac h( $aMyBlo cks as $iB lockID =>  $aBlock )  {   302       foreac h( $aMyBlo cks as $iB lockID =>  $aBlock )  {
304           fo reach( $aB lock['Item s'] as $aI tem ) {   303           fo reach( $aB lock['Item s'] as $aI tem ) {
305                if( !iss et( $aPara ms[ $aItem ['Name'] ]  ) )   304                if( !iss et( $aPara ms[ $aItem ['Name'] ]  ) )
306                    cont inue;   305                    cont inue;
307                   306                
308                if( $iBl ockID != ' addSpecial ' and ( $a Item['Name '] == 'ID'  or $aItem ['Name'] = = 'NickNam e' or $aIt em['Name']  == 'Tags'  ) )   307                if( $iBl ockID != ' addSpecial ' and ( $a Item['Name '] == 'ID'  or $aItem ['Name'] = = 'NickNam e' or $aIt em['Name']  == 'Tags'  ) )
309                    cont inue; // s kip collec ting id, n ick and ta gs for reg ular block s, only in  special   308                    cont inue; // s kip collec ting id, n ick and ta gs for reg ular block s, only in  special
310                   309                
311                $sItemNa me = $aIte m['Name'];   310                $sItemNa me = $aIte m['Name'];
312                $mValue     = $aPar ams[$sItem Name];   311                $mValue     = $aPar ams[$sItem Name];
313                   312                
314                switch(  $aItem['Ty pe'] ) {   313                switch(  $aItem['Ty pe'] ) {
315                    case  'text':   314                    case  'text':
316                    case  'area':   315                    case  'area':
317                         if( $sItem Name == 'T ags' ) {   316                         if( $sItem Name == 'T ags' ) {
318                             $sJoin  .= " INNE R JOIN `Ta gs` ON (`T ags`.`Type ` = 'profi le' AND `T ags`.`ID`  = `Profile s`.`ID`) " ;   317                             $sJoin  .= " INNE R JOIN `Ta gs` ON (`T ags`.`Type ` = 'profi le' AND `T ags`.`ID`  = `Profile s`.`ID`) " ;
319                             $aWher e[] = "`Ta gs`.`Tag`  = '" . add slashes($m Value) . " '";   318                             $aWher e[] = "`Ta gs`.`Tag`  = '" . add slashes($m Value) . " '";
320                         } else   319                         } else
321                             $aWher e[] = "`Pr ofiles`.`$ sItemName`  LIKE '%"  . addslash es($mValue ) . "%'";   320                             $aWher e[] = "`Pr ofiles`.`$ sItemName`  LIKE '%"  . addslash es($mValue ) . "%'";
322                    brea k;   321                    brea k;
323                       322                    
324                    case  'num':   323                    case  'num':
325                         $aWhere[]  = "`Profil es`.`$sIte mName` >=  {$mValue[0 ]} AND `Pr ofiles`.`$ sItemName`  <= {$mVal ue[1]}";   324                         $aWhere[]  = "`Profil es`.`$sIte mName` >=  {$mValue[0 ]} AND `Pr ofiles`.`$ sItemName`  <= {$mVal ue[1]}";
326                    brea k;   325                    brea k;
327                       326                    
328                    case  'date':   327                    case  'date':
329                         $iMin = fl oor( $mVal ue[0] * 36 5.25 ); // for leap y ears   328                         $iMin = fl oor( $mVal ue[0] * 36 5.25 ); // for leap y ears
330                         $iMax = fl oor( $mVal ue[1] * 36 5.25 );   329                         $iMax = fl oor( $mVal ue[1] * 36 5.25 );
331                           330                        
332                         $aWhere[]  = "DATEDIF F( NOW(),  `Profiles` .`$sItemNa me` ) >= $ iMin AND D ATEDIFF( N OW(), `Pro files`.`$s ItemName`  ) <= $iMax ";   331                         $aWhere[]  = "DATEDIF F( NOW(),  `Profiles` .`$sItemNa me` ) >= $ iMin AND D ATEDIFF( N OW(), `Pro files`.`$s ItemName`  ) <= $iMax ";
333                           332                        
334                         //$aWhere[ ] = "DATE_ ADD( `$sIt emName`, I NTERVAL {$ mValue[0]}  YEAR ) <=  NOW() AND  DATE_ADD(  `$sItemNa me`, INTER VAL {$mVal ue[1]} YEA R ) >= NOW ()"; //is  it correct  statement ?   333                         //$aWhere[ ] = "DATE_ ADD( `$sIt emName`, I NTERVAL {$ mValue[0]}  YEAR ) <=  NOW() AND  DATE_ADD(  `$sItemNa me`, INTER VAL {$mVal ue[1]} YEA R ) >= NOW ()"; //is  it correct  statement ?
335                    brea k;   334                    brea k;
336                       335                    
337                    case  'select_o ne':   336                    case  'select_o ne':
338                         $sValue =  implode( ' ,', $mValu e );   337                         $sValue =  implode( ' ,', $mValu e );
339                         $aWhere[]  = "FIND_IN _SET( `Pro files`.`$s ItemName`,  '" . adds lashes($sV alue) . "'  )";   338                         $aWhere[]  = "FIND_IN _SET( `Pro files`.`$s ItemName`,  '" . adds lashes($sV alue) . "'  )";
340                    brea k;   339                    brea k;
341                       340                    
342                    case  'select_s et':   341                    case  'select_s et':
343                         $aSet = ar ray();   342                         $aSet = ar ray();
344                           343                        
345                         foreach( $ mValue as  $sValue )  {   344                         foreach( $ mValue as  $sValue )  {
346                             $sValu e = addsla shes( $sVa lue );   345                             $sValu e = addsla shes( $sVa lue );
347                             $aSet[ ] = "FIND_ IN_SET( '$ sValue', ` Profiles`. `$sItemNam e` )";   346                             $aSet[ ] = "FIND_ IN_SET( '$ sValue', ` Profiles`. `$sItemNam e` )";
348                         }   347                         }
349                           348                        
350                         $aWhere[]  = '( ' . i mplode( '  OR ', $aSe t ) . ' )' ;   349                         $aWhere[]  = '( ' . i mplode( '  OR ', $aSe t ) . ' )' ;
351                    brea k;   350                    brea k;
352                       351                    
353                    case  'range':   352                    case  'range':
354                         //impl   353                         //impl
355                    brea k;   354                    brea k;
356                       355                    
357                    case  'bool':   356                    case  'bool':
358                         $aWhere[]  = "`Profil es`.`$sIte mName'";   357                         $aWhere[]  = "`Profil es`.`$sIte mName'";
359                    brea k;   358                    brea k;
360                       359                    
361                    case  'system':   360                    case  'system':
362                         switch( $a Item['Name '] ) {   361                         switch( $a Item['Name '] ) {
363                             case ' Couple':   362                             case ' Couple':
364                                 if ($mValue = = '-1') {   363                                 if ($mValue = = '-1') {
365                                 }   364                                 }
366                                 el seif( $mVa lue )   365                                 el seif( $mVa lue )
367                                      $aWhere[ ] = "`Prof iles`.`Cou ple` > `Pr ofiles`.`I D`";   366                                      $aWhere[ ] = "`Prof iles`.`Cou ple` > `Pr ofiles`.`I D`";
368                                 el se   367                                 el se
369                                      $aWhere[ ] = "`Prof iles`.`Cou ple` = 0";   368                                      $aWhere[ ] = "`Prof iles`.`Cou ple` = 0";
370                             break;   369                             break;
371                                370                             
    371                             case ' Keyword':
372                             case ' Location':   372                             case ' Location':
373                                 $a Fields = e xplode( "\ n", $aItem ['Extra']  );   373                                 $a Fields = e xplode( "\ n", $aItem ['Extra']  );
374                                 $a Keyw = arr ay();   374                                 $a Keyw = arr ay();
375                                 $s Value = ad dslashes(  $mValue );   375                                 $s Value = ad dslashes(  $mValue );
376                                    376                                 
377                                 fo reach( $aF ields as $ sField )   377                                 fo reach( $aF ields as $ sField )
378                                      $aKeyw[]  = "`Profi les`.`$sFi eld` LIKE  '%$sValue% '";   378                                      $aKeyw[]  = "`Profi les`.`$sFi eld` LIKE  '%$sValue% '";
379                                    379                                 
380                                 $a Where[] =  '( ' . imp lode( ' OR  ', $aKeyw  ) . ')';   380                                 $a Where[] =  '( ' . imp lode( ' OR  ', $aKeyw  ) . ')';
381                             break;   381                             break;
382                                382                             
383                             case ' ID':   383                             case ' ID':
384                                 $a Where[] =  "`ID` = $m Value";   384                                 $a Where[] =  "`ID` = $m Value";
385                             break;   385                             break;
386                         }   386                         }
387                    brea k;   387                    brea k;
388                }   388                }
389           }   389           }
390       }   390       }
391     391  
392       if ($b EnZipSearc h && $aPar ams['dista nce'] > 0)  {   392       if ($b EnZipSearc h && $aPar ams['dista nce'] > 0)  {
393           $s Zip = html specialcha rs_adv($_R EQUEST['zi p']);   393           $s Zip = html specialcha rs_adv($_R EQUEST['zi p']);
394           $i Distance =  (int)$aPa rams['dist ance'];   394           $i Distance =  (int)$aPa rams['dist ance'];
395           $s Metric = h tmlspecial chars_adv( $_REQUEST[ 'metric']) ;   395           $s Metric = h tmlspecial chars_adv( $_REQUEST[ 'metric']) ;
396     396  
397           $z ip = proce ss_db_inpu t( strtoup per( str_r eplace(' ' , '', $zip ) ), 1);   397           $z ip = proce ss_db_inpu t( strtoup per( str_r eplace(' ' , '', $zip ) ), 1);
398           $a ZipInfo =  db_arr("SE LECT `Lati tude`, `Lo ngitude` F ROM `ZIPCo des` WHERE  REPLACE(` ZIPCode`,'  ','') = ' {$sZip}'") ;   398           $a ZipInfo =  db_arr("SE LECT `Lati tude`, `Lo ngitude` F ROM `ZIPCo des` WHERE  REPLACE(` ZIPCode`,'  ','') = ' {$sZip}'") ;
399           // echoDbg($a ZipInfo);   399           // echoDbg($a ZipInfo);
400           if  ( $aZipIn fo ) {   400           if  ( $aZipIn fo ) {
401                // ZIP c ode exists   401                // ZIP c ode exists
402                $miles2k m = 0.7; / / miles/ki lometers r atio   402                $miles2k m = 0.7; / / miles/ki lometers r atio
403     403  
404                $Miles =  $sMetric  == "km" ?  $iDistance  * $miles2 km : $iDis tance;   404                $Miles =  $sMetric  == "km" ?  $iDistance  * $miles2 km : $iDis tance;
405                $Latitud e = $aZipI nfo["Latit ude"];   405                $Latitud e = $aZipI nfo["Latit ude"];
406                $Longitu de = $aZip Info["Long itude"];   406                $Longitu de = $aZip Info["Long itude"];
407     407  
408                $zcdRadi us = new R adiusAssis tant( $Lat itude, $Lo ngitude, $ Miles );   408                $zcdRadi us = new R adiusAssis tant( $Lat itude, $Lo ngitude, $ Miles );
409                //echoDb g($zcdRadi us);   409                //echoDb g($zcdRadi us);
410                $minLat  = $zcdRadi us->MinLat itude();   410                $minLat  = $zcdRadi us->MinLat itude();
411                $maxLat  = $zcdRadi us->MaxLat itude();   411                $maxLat  = $zcdRadi us->MaxLat itude();
412                $minLong  = $zcdRad ius->MinLo ngitude();   412                $minLong  = $zcdRad ius->MinLo ngitude();
413                $maxLong  = $zcdRad ius->MaxLo ngitude();   413                $maxLong  = $zcdRad ius->MaxLo ngitude();
414     414  
415                $sJoin . = " LEFT J OIN `ZIPCo des` ON UP PER( REPLA CE(`Profil es`.`zip`,  ' ', '')  ) = REPLAC E(`ZIPCode s`.`ZIPCod e`,' ', '' ) ";   415                $sJoin . = " LEFT J OIN `ZIPCo des` ON UP PER( REPLA CE(`Profil es`.`zip`,  ' ', '')  ) = REPLAC E(`ZIPCode s`.`ZIPCod e`,' ', '' ) ";
416                $aWhere[ ] = "`ZIPC odes`.`ZIP Code` IS N OT NULL AN D `ZIPCode s`.`Latitu de` >= {$m inLat} AND  `ZIPCodes `.`Latitud e` <= {$ma xLat} AND  `ZIPCodes` .`Longitud e` >= {$mi nLong} AND  `ZIPCodes `.`Longitu de` <= {$m axLong} ";   416                $aWhere[ ] = "`ZIPC odes`.`ZIP Code` IS N OT NULL AN D `ZIPCode s`.`Latitu de` >= {$m inLat} AND  `ZIPCodes `.`Latitud e` <= {$ma xLat} AND  `ZIPCodes` .`Longitud e` >= {$mi nLong} AND  `ZIPCodes `.`Longitu de` <= {$m axLong} ";
417           }   417           }
418       }   418       }
419     419  
420       // col lect query  string   420       // col lect query  string
421       $aWher e[] = "`Pr ofiles`.`S tatus` = ' Active'";   421       $aWher e[] = "`Pr ofiles`.`S tatus` = ' Active'";
422          422       
423       // add  online on ly   423       // add  online on ly
424       if( $_ REQUEST['o nline_only '] ) {   424       if( $_ REQUEST['o nline_only '] ) {
425           $i OnlineTime  = getPara m( 'member _online_ti me' );   425           $i OnlineTime  = getPara m( 'member _online_ti me' );
426           $a Where[] =  "DATE_ADD(  `DateLast Nav`, INTE RVAL $iOnl ineTime MI NUTE ) >=  NOW()";   426           $a Where[] =  "DATE_ADD(  `DateLast Nav`, INTE RVAL $iOnl ineTime MI NUTE ) >=  NOW()";
427       }   427       }
428          428       
429       if( $_ REQUEST['p hotos_only '] )   429       if( $_ REQUEST['p hotos_only '] )
430           $a Where[] =  "`Profiles `.`PrimPho to`";   430           $a Where[] =  "`Profiles `.`PrimPho to`";
431     431  
432       $aWher e[] = "(`P rofiles`.` Couple`='0 ' OR `Prof iles`.`Cou ple`>`Prof iles`.`ID` )";   432       $aWher e[] = "(`P rofiles`.` Couple`='0 ' OR `Prof iles`.`Cou ple`>`Prof iles`.`ID` )";
433          433       
434       $sWher e = ' WHER E ' . impl ode( ' AND  ', $aWher e );   434       $sWher e = ' WHER E ' . impl ode( ' AND  ', $aWher e );
435          435       
436       //coll ect the wh ole query  string   436       //coll ect the wh ole query  string
437       $sQuer y = $sQuer y . $sJoin  . $sWhere ;   437       $sQuer y = $sQuer y . $sJoin  . $sWhere ;
438          438       
439       //echo  $sQuery;   439       //echo  $sQuery;
440          440       
441       //make  search   441       //make  search
442       $rProf iles = db_ res( $sQue ry );   442       $rProf iles = db_ res( $sQue ry );
443          443       
444       $aProf iles = arr ay();   444       $aProf iles = arr ay();
445       while  ($aProfile  = mysql_f etch_assoc ($rProfile s)) {   445       while  ($aProfile  = mysql_f etch_assoc ($rProfile s)) {
446           $a Profiles[]  = $aProfi le['ID'];   446           $a Profiles[]  = $aProfi le['ID'];
447       }   447       }
448          448       
449       $iCoun tProfiles  = count( $ aProfiles  );   449       $iCoun tProfiles  = count( $ aProfiles  );
450          450       
451       if( !$ iCountProf iles ) {   451       if( !$ iCountProf iles ) {
452           ec ho '<div c lass="no_r esult"><di v>' .  _t( "_NO_RESUL TS") . '</ div></div> ';   452           ec ho '<div c lass="no_r esult"><di v>' .  _t( "_NO_RESUL TS") . '</ div></div> ';
453       } else  {   453       } else  {
454           // collect pa gination   454           // collect pa gination
455           $i CurrentPag e    = iss et( $_GET[ 'page']          ) ?  (int)$_GET ['page']          : 1 ;   455           $i CurrentPag e    = iss et( $_GET[ 'page']          ) ?  (int)$_GET ['page']          : 1 ;
456           $i ResultsPer Page = iss et( $_GET[ 'res_per_p age'] ) ?  (int)$_GET ['res_per_ page'] : 1 0;   456           $i ResultsPer Page = iss et( $_GET[ 'res_per_p age'] ) ?  (int)$_GET ['res_per_ page'] : 1 0;
457              457           
458           if ( $iCurren tPage < 1  )   458           if ( $iCurren tPage < 1  )
459                $iCurren tPage = 1;   459                $iCurren tPage = 1;
460           if ( $iResult sPerPage <  1 )   460           if ( $iResult sPerPage <  1 )
461                $iResult sPerPage =  10;   461                $iResult sPerPage =  10;
462              462           
463           $i TotalPages  = ceil( $ iCountProf iles / $iR esultsPerP age );   463           $i TotalPages  = ceil( $ iCountProf iles / $iR esultsPerP age );
464              464           
465           if ( $iTotalP ages > 1 )  {   465           if ( $iTotalP ages > 1 )  {
466                if( $iCu rrentPage  > $iTotalP ages )   466                if( $iCu rrentPage  > $iTotalP ages )
467                    $iCu rrentPage  = $iTotalP ages;   467                    $iCu rrentPage  = $iTotalP ages;
468                   468                
469                $aOutput Profiles       = arra y_slice( $ aProfiles,  ( $iCurre ntPage - 1  ) * $iRes ultsPerPag e, $iResul tsPerPage  );   469                $aOutput Profiles       = arra y_slice( $ aProfiles,  ( $iCurre ntPage - 1  ) * $iRes ultsPerPag e, $iResul tsPerPage  );
470                $iCountO utputProfi les = coun t( $aOutpu tProfiles  );   470                $iCountO utputProfi les = coun t( $aOutpu tProfiles  );
471                   471                
472                $iFromRe sults = (  ( $iCurren tPage - 1  ) * $iResu ltsPerPage  ) + 1;   472                $iFromRe sults = (  ( $iCurren tPage - 1  ) * $iResu ltsPerPage  ) + 1;
473                   473                
474                $sPagina tion = gen SearchPagi nation( $i TotalPages , $iCurren tPage, $iR esultsPerP age );   474                $sPagina tion = gen SearchPagi nation( $i TotalPages , $iCurren tPage, $iR esultsPerP age );
475           }  else {   475           }  else {
476                $iFromRe sults = 1;   476                $iFromRe sults = 1;
477                $aOutput Profiles       = $aPr ofiles;   477                $aOutput Profiles       = $aPr ofiles;
478                $iCountO utputProfi les = $iCo untProfile s;   478                $iCountO utputProfi les = $iCo untProfile s;
479                $sPagina tion = '';   479                $sPagina tion = '';
480           }   480           }
481              481           
482           $i ToResults    = ( $iFr omResults  - 1 ) + $i CountOutpu tProfiles;   482           $i ToResults    = ( $iFr omResults  - 1 ) + $i CountOutpu tProfiles;
483              483           
484           $s ShowingRes ults = '<d iv class=" showingRes ults">' .  _t( '_Show ing result s:', $iFro mResults,  $iToResult s, $iCount Profiles )  . '</div> ';   484           $s ShowingRes ults = '<d iv class=" showingRes ults">' .  _t( '_Show ing result s:', $iFro mResults,  $iToResult s, $iCount Profiles )  . '</div> ';
485              485           
486           ec ho $sPagin ation;   486           ec ho $sPagin ation;
487           ec ho $sShowi ngResults;   487           ec ho $sShowi ngResults;
488              488           
489           // output sea rch result s   489           // output sea rch result s
490            $sTemplSea rch   =   file_get_c ontents(  
" {$dir['roo t']} templates/ tmpl_{$tmp l}/searchr ow.html"   );
  490            $sTemplSea rch   =   file_get_c ontents(   BX_DIRECTO RY_PATH_RO OT   .   "
templates/ tmpl_{$tmp l}/searchr ow.html"   );
491              491           
492           fo reach( $aO utputProfi les as $iP rofID ) {   492           fo reach( $aO utputProfi les as $iP rofID ) {
493                $aProfil eInfo = ge tProfileIn fo( $iProf ID );   493                $aProfil eInfo = ge tProfileIn fo( $iProf ID );
494                   494                
495                if ($aPr ofileInfo[ 'Couple']  > 0) {   495                if ($aPr ofileInfo[ 'Couple']  > 0) {
496                    $aPr ofileInfoC  = getProf ileInfo( $ aProfileIn fo['Couple '] );   496                    $aPr ofileInfoC  = getProf ileInfo( $ aProfileIn fo['Couple '] );
497                    echo  PrintSear hResult( $ aProfileIn fo, $sTemp lSearch, 1 , true, $a ProfileInf oC );   497                    echo  PrintSear hResult( $ aProfileIn fo, $sTemp lSearch, 1 , true, $a ProfileInf oC );
498                } else {   498                } else {
499                    echo  PrintSear hResult( $ aProfileIn fo, $sTemp lSearch );   499                    echo  PrintSear hResult( $ aProfileIn fo, $sTemp lSearch );
500                }   500                }
501           }   501           }
502              502           
503           ec ho $sShowi ngResults;   503           ec ho $sShowi ngResults;
504           ec ho $sPagin ation;   504           ec ho $sPagin ation;
505       }   505       }
506   }   506   }
507     507  
508   function g enSearchPa gination(  $iTotalPag es, $iCurr entPage, $ iResultsPe rPage ) {   508   function g enSearchPa gination(  $iTotalPag es, $iCurr entPage, $ iResultsPe rPage ) {
509       $aGetP arams = $_ GET;   509       $aGetP arams = $_ GET;
510       unset(  $aGetPara ms['page']  );   510       unset(  $aGetPara ms['page']  );
511       unset(  $aGetPara ms['res_pe r_page'] ) ;   511       unset(  $aGetPara ms['res_pe r_page'] ) ;
512          512       
513       $sRequ estString  = collectR equestStri ng( $aGetP arams );   513       $sRequ estString  = collectR equestStri ng( $aGetP arams );
514       $sRequ estString  = $_SERVER ['PHP_SELF '] . '?' .  substr( $ sRequestSt ring, 1 );   514       $sRequ estString  = $_SERVER ['PHP_SELF '] . '?' .  substr( $ sRequestSt ring, 1 );
515          515       
516       $sPagi nTmpl       = $sReque stString .  '&res_per _page=' .  $iResultsP erPage . ' &page={pag e}';   516       $sPagi nTmpl       = $sReque stString .  '&res_per _page=' .  $iResultsP erPage . ' &page={pag e}';
517       $sResP erPageTmpl  = $sReque stString .  '&res_per _page={res _per_page} ';   517       $sResP erPageTmpl  = $sReque stString .  '&res_per _page={res _per_page} ';
518          518       
519       $sPagi nation = g enResPerPa ge( array( 10,20,50,1 00), $iRes ultsPerPag e, $sResPe rPageTmpl  );   519       $sPagi nation = g enResPerPa ge( array( 10,20,50,1 00), $iRes ultsPerPag e, $sResPe rPageTmpl  );
520       $sPagi nation .=   genPagina tion( $iTo talPages,  $iCurrentP age, $sPag inTmpl );   520       $sPagi nation .=   genPagina tion( $iTo talPages,  $iCurrentP age, $sPag inTmpl );
521          521       
522       return  $sPaginat ion;   522       return  $sPaginat ion;
523   }   523   }
524     524  
525   function c ollectRequ estString(  $aGetPara ms, $sKeyP ref = '',  $sKeyPostf  = '' ) {   525   function c ollectRequ estString(  $aGetPara ms, $sKeyP ref = '',  $sKeyPostf  = '' ) {
526       if( !i s_array( $ aGetParams  ) )   526       if( !i s_array( $ aGetParams  ) )
527           re turn '';   527           re turn '';
528          528       
529       $sRet  = '';   529       $sRet  = '';
530       foreac h( $aGetPa rams as $s Key => $sV alue ) {   530       foreac h( $aGetPa rams as $s Key => $sV alue ) {
531           if ( $sValue  === '' )   531           if ( $sValue  === '' )
532                continue ;   532                continue ;
533              533           
534           if ( !is_arra y($sValue)  ) {   534           if ( !is_arra y($sValue)  ) {
535                $sRet .=  '&' . url encode( $s KeyPref .  $sKey . $s KeyPostf )  . '=' . u rlencode(  process_pa ss_data( $ sValue ) ) ;   535                $sRet .=  '&' . url encode( $s KeyPref .  $sKey . $s KeyPostf )  . '=' . u rlencode(  process_pa ss_data( $ sValue ) ) ;
536           }  else {   536           }  else {
537                $sRet .=  collectRe questStrin g( $sValue , "{$sKeyP ref}{$sKey }{$sKeyPos tf}[", "]"  ); //recu rsive call   537                $sRet .=  collectRe questStrin g( $sValue , "{$sKeyP ref}{$sKey }{$sKeyPos tf}[", "]"  ); //recu rsive call
538           }   538           }
539       }   539       }
540          540       
541       return  $sRet;   541       return  $sRet;
542   }   542   }