8. Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon May 18 06:28:26 2009 UTC. See www.araxis.com for information about Merge. 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.

8.1 Files compared

# Location File Last Modified
1 D:\Dolphin-v.6.1.5\inc admin.inc.php Mon May 4 03:14:12 2009 UTC
2 D:\Dolphin-v.6.1.6\inc admin.inc.php Fri May 8 08:29:08 2009 UTC

8.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 2450
Changed 0 0
Inserted 1 1
Removed 1 1

8.3 Comparison options

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

8.4 Active regular expressions

No regular expressions were active.

8.5 Comparison detail

1   <?   1   <?
2     2  
3   /********* ********** ********** ********** ********** ********** ********** ******   3   /********* ********** ********** ********** ********** ********** ********** ******
4   *                              D olphin Sma rt Communi ty Builder   4   *                              D olphin Sma rt Communi ty Builder
5   *                                 --------- --------   5   *                                 --------- --------
6   *     begi n                 : M on Mar 23  2006   6   *     begi n                 : M on Mar 23  2006
7   *     copy right             : ( C) 2006 Bo onEx Group   7   *     copy right             : ( C) 2006 Bo onEx Group
8   *     webs ite               : h ttp://www. boonex.com /   8   *     webs ite               : h ttp://www. boonex.com /
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder   9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder
10   *   10   *
11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.    11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License. 
12   * http://c reativecom mons.org/l icenses/by /3.0/   12   * http://c reativecom mons.org/l icenses/by /3.0/
13   *   13   *
14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin   17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
19   ********** ********** ********** ********** ********** ********** ********** *****/   19   ********** ********** ********** ********** ********** ********** ********** *****/
20     20  
21   require_on ce( 'heade r.inc.php'  );   21   require_on ce( 'heade r.inc.php'  );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm odules.inc .php' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm odules.inc .php' );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php' );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
27     27  
28   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolBl ogs.php' ) ;   28   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolBl ogs.php' ) ;
29   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );   29   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );
30   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolEv ents.php'  );   30   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolEv ents.php'  );
31   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolSh aredMedia. php' );   31   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolSh aredMedia. php' );
32     32  
33   $menu_colo r_0 = "#dd dddd";   33   $menu_colo r_0 = "#dd dddd";
34     34  
35   function l ogin_form(  $text = " ", $member  = 0, $bbA jaxMode =  false )   35   function l ogin_form(  $text = " ", $member  = 0, $bbA jaxMode =  false )
36   {   36   {
37           gl obal $site ;   37           gl obal $site ;
38           gl obal $_pag e_cont;   38           gl obal $_pag e_cont;
39           gl obal $_pag e;   39           gl obal $_pag e;
40           gl obal $admi n_dir;   40           gl obal $admi n_dir;
41           gl obal $logg ed;   41           gl obal $logg ed;
42           gl obal $tmpl ;   42           gl obal $tmpl ;
43           gl obal $l,$d ;   43           gl obal $l,$d ;
44     44  
45           sw itch( $mem ber )   45           sw itch( $mem ber )
46           {   46           {
47                    case  0:   47                    case  0:
48                             $mem          = _ t("_Member ");   48                             $mem          = _ t("_Member ");
49                             $table        = " Profiles";   49                             $table        = " Profiles";
50                             $login _page  = " {$site['ur l']}member .php";   50                             $login _page  = " {$site['ur l']}member .php";
51                             $join_ page   = " {$site['ur l']}join.p hp";   51                             $join_ page   = " {$site['ur l']}join.p hp";
52                             $forgo t_page = " {$site['ur l']}forgot .php";   52                             $forgo t_page = " {$site['ur l']}forgot .php";
53                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "templ ates/tmpl_ {$tmpl}/lo gin_form.h tml";   53                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "templ ates/tmpl_ {$tmpl}/lo gin_form.h tml";
54                    brea k;   54                    brea k;
55                    case  1:   55                    case  1:
56                             $mem          = ' Admin';   56                             $mem          = ' Admin';
57                             $table        = ' Admins';   57                             $table        = ' Admins';
58                             $login _page  = " {$site['ur l_admin']} index.php" ;   58                             $login _page  = " {$site['ur l_admin']} index.php" ;
59                             $join_ page   = ' ';   59                             $join_ page   = ' ';
60                             $forgo t_page = ' ';   60                             $forgo t_page = ' ';
61                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";   61                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";
62                    brea k;   62                    brea k;
63                    case  2:   63                    case  2:
64                             $mem          = " Affiliate" ;   64                             $mem          = " Affiliate" ;
65                             $table        = ' aff';   65                             $table        = ' aff';
66                             $login _page  = " {$site['ur l_aff']}in dex.php";   66                             $login _page  = " {$site['ur l_aff']}in dex.php";
67                             $join_ page   = ' ';   67                             $join_ page   = ' ';
68                             $forgo t_page = ' ';   68                             $forgo t_page = ' ';
69                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";   69                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";
70                    brea k;   70                    brea k;
71                    case  3:   71                    case  3:
72                             $mem          = " Moderator" ;   72                             $mem          = " Moderator" ;
73                             $table        = ' moderators ';   73                             $table        = ' moderators ';
74                             $login _page  = " {$site['ur l']}modera tors/index .php";   74                             $login _page  = " {$site['ur l']}modera tors/index .php";
75                             $join_ page   = ' ';   75                             $join_ page   = ' ';
76                             $forgo t_page = ' ';   76                             $forgo t_page = ' ';
77                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";   77                             $templ ate    = B X_DIRECTOR Y_PATH_ROO T . "{$adm in_dir}/ad min_login. html";
78                    brea k;   78                    brea k;
79           }   79           }
80     80  
81           $_ page['head er'] = "{$ site['titl e']} "._t( "_Member L ogin");   81           $_ page['head er'] = "{$ site['titl e']} "._t( "_Member L ogin");
82           $_ page['head er_text']  = _t("_Mem ber Login" );   82           $_ page['head er_text']  = _t("_Mem ber Login" );
83              83           
84           if  ($bbAjaxM ode && $me mber==0)   84           if  ($bbAjaxM ode && $me mber==0)
85                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/tmpl_{ $tmpl}/log in_form_aj ax.html";   85                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/tmpl_{ $tmpl}/log in_form_aj ax.html";
86           el seif ($bbA jaxMode &&  $member== 1)   86           el seif ($bbA jaxMode &&  $member== 1)
87                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/base/l ogin_form_ ajax_a.htm l";   87                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/base/l ogin_form_ ajax_a.htm l";
88              88           
89           $_ page_cont[ 0]['page_m ain_code']  = PageCom pLoginForm ($text,$me mber,$mem, $table,$lo gin_page,$ join_page, $forgot_pa ge,$templa te);   89           $_ page_cont[ 0]['page_m ain_code']  = PageCom pLoginForm ($text,$me mber,$mem, $table,$lo gin_page,$ join_page, $forgot_pa ge,$templa te);
90     90  
91           if ( $bbAjaxM ode ) {   91           if ( $bbAjaxM ode ) {
92                    if(  $member ==  1 ) {   92                    if(  $member ==  1 ) {
93                             TopCod eAdmin();   93                             TopCod eAdmin();
94                                94                             
95                             echo ' <link href ="'.$site[ 'url_admin '].'styles /login_for m_ajax.css " rel="sty lesheet" t ype="text/ css" />';   95                             echo ' <link href ="'.$site[ 'url_admin '].'styles /login_for m_ajax.css " rel="sty lesheet" t ype="text/ css" />';
96                             echo ' <div class ="login_aj ax_wrap">' ;   96                             echo ' <div class ="login_aj ax_wrap">' ;
97                             echo $ _page_cont [0]['page_ main_code' ];   97                             echo $ _page_cont [0]['page_ main_code' ];
98                             echo ' </div>';   98                             echo ' </div>';
99                                99                             
100                             Bottom Code();   100                             Bottom Code();
101                    } el se {   101                    } el se {
102                             echo ' <div class ="login_aj ax_wrap">' ;   102                             echo ' <div class ="login_aj ax_wrap">' ;
103                             echo $ _page_cont [0]['page_ main_code' ];   103                             echo $ _page_cont [0]['page_ main_code' ];
104                             echo ' </div>';   104                             echo ' </div>';
105                    }   105                    }
106                    exit ;   106                    exit ;
107           }   107           }
108              108           
109           //  get name  of dir of  currently  requested  php file.  Ex.: admin /aff/moder ators etc.   109           //  get name  of dir of  currently  requested  php file.  Ex.: admin /aff/moder ators etc.
110           //  $_SERVER[ 'PHP_SELF' ] contains  [/some/pa th/to/file .php]   110           //  $_SERVER[ 'PHP_SELF' ] contains  [/some/pa th/to/file .php]
111           $s Path = dir name( $_SE RVER['PHP_ SELF'] );  //we got [ /some/path /to]   111           $s Path = dir name( $_SE RVER['PHP_ SELF'] );  //we got [ /some/path /to]
112           $s CDir = bas ename( $sP ath ); //  get [to].   112           $s CDir = bas ename( $sP ath ); //  get [to].
113              113           
114           if ( $sCDir = = $admin_d ir or $sCD ir == 'aff ' or $sCDi r == 'mode rators' )  {   114           if ( $sCDir = = $admin_d ir or $sCD ir == 'aff ' or $sCDi r == 'mode rators' )  {
115                    //re quire_once ( BX_DIREC TORY_PATH_ INC . 'adm in_design. inc.php' ) ;   115                    //re quire_once ( BX_DIREC TORY_PATH_ INC . 'adm in_design. inc.php' ) ;
116                    //$_ page['head er'] = "{$ site['titl e']} $mem  Login";   116                    //$_ page['head er'] = "{$ site['titl e']} $mem  Login";
117                    //To pCodeAdmin ();   117                    //To pCodeAdmin ();
118                    echo  $_page_co nt[0]['pag e_main_cod e'];   118           ec ho $_page_ cont[0]['p age_main_c ode'];
119                    //Bo ttomCode() ;   119                    //Bo ttomCode() ;
120           }  else {   120           }  else {
121                    $_pa ge['name_i ndex'] = 0 ;   121                    $_pa ge['name_i ndex'] = 0 ;
122                    Page Code();   122                    Page Code();
123                    exit ;    
124           }   123           }
    124       exit;
125   }   125   }
126     126  
127   function P ageCompLog inForm( $t ext, $memb er, $mem,  $table, $l ogin_page,  $join_pag e, $forgot _page, $te mplate = ' ' )   127   function P ageCompLog inForm( $t ext, $memb er, $mem,  $table, $l ogin_page,  $join_pag e, $forgot _page, $te mplate = ' ' )
128   {   128   {
129           gl obal $site ;   129           gl obal $site ;
130           gl obal $tmpl ;   130           gl obal $tmpl ;
131     131  
132           $a FormReplac e = array( );   132           $a FormReplac e = array( );
133              133           
134           if  ( $member  == 1 )   134           if  ( $member  == 1 )
135                    $nam e_label =  "Username" ;   135                    $nam e_label =  "Username" ;
136           el se   136           el se
137                    if (  $member = = 2 )   137                    if (  $member = = 2 )
138                             $name_ label = _t ("_ID");   138                             $name_ label = _t ("_ID");
139                    else   139                    else
140                             $name_ label = _t ("_E-mail  or ID");   140                             $name_ label = _t ("_E-mail  or ID");
141              141           
142           $a FormReplac e['header_ text']     = $site['t itle'] . '  ' . $mem  . ' Login' ;   142           $a FormReplac e['header_ text']     = $site['t itle'] . '  ' . $mem  . ' Login' ;
143           $a FormReplac e['warning _text']    = $text;   143           $a FormReplac e['warning _text']    = $text;
144           $a FormReplac e['action_ url']      = $login_p age;   144           $a FormReplac e['action_ url']      = $login_p age;
145     145  
146           if ( !$sUrlRe locate = $ _REQUEST[' relocate']  or basena me( $_REQU EST['reloc ate'] ) ==  'index.ph p' or base name( $_RE QUEST['rel ocate'] )  == 'join.p hp' )   146           if ( !$sUrlRe locate = $ _REQUEST[' relocate']  or basena me( $_REQU EST['reloc ate'] ) ==  'index.ph p' or base name( $_RE QUEST['rel ocate'] )  == 'join.p hp' )
147                    $sUr lRelocate  = $_SERVER ['PHP_SELF '];   147                    $sUr lRelocate  = $_SERVER ['PHP_SELF '];
148     148  
149           $a FormReplac e['site_a_ url']   =  $site['url ']; //$_SE RVER['PHP_ SELF'];   149           $a FormReplac e['site_a_ url']   =  $site['url ']; //$_SE RVER['PHP_ SELF'];
150           $a FormReplac e['relocat e_url']    = htmlspec ialchars(  $sUrlReloc ate ); //$ _SERVER['P HP_SELF'];   150           $a FormReplac e['relocat e_url']    = htmlspec ialchars(  $sUrlReloc ate ); //$ _SERVER['P HP_SELF'];
151           $a FormReplac e['images' ]                  =  $site['ima ges'];   151           $a FormReplac e['images' ]                  =  $site['ima ges'];
152           $a FormReplac e['name_la bel']      = $name_la bel;   152           $a FormReplac e['name_la bel']      = $name_la bel;
153           $a FormReplac e['passwor d_label']  = _t("_Pas sword");   153           $a FormReplac e['passwor d_label']  = _t("_Pas sword");
154           $a FormReplac e['submit_ label']    = _t("_Log  In");   154           $a FormReplac e['submit_ label']    = _t("_Log  In");
155           $a FormReplac e['remeber _label']   = _t("_Rem ember pass word");   155           $a FormReplac e['remeber _label']   = _t("_Rem ember pass word");
156           $a FormReplac e['form_on submit']   = "validat eLoginForm ( this, '{ $site['url ']}', '" .   156           $a FormReplac e['form_on submit']   = "validat eLoginForm ( this, '{ $site['url ']}', '" .
157              addslashes ( htmlspec ialchars(  _t('_PROFI LE_ERR') )  ) .   157              addslashes ( htmlspec ialchars(  _t('_PROFI LE_ERR') )  ) .
158              "'); retur n false;";   158              "'); retur n false;";
159              159           
160           if ( $forgot_ page )   160           if ( $forgot_ page )
161           {   161           {
162                    $aFo rmReplace[ 'forgot_pa ge_url'] =  $forgot_p age;   162                    $aFo rmReplace[ 'forgot_pa ge_url'] =  $forgot_p age;
163                    $aFo rmReplace[ 'forgot_la bel']    =  _t("_forg ot_your_pa ssword") .  '?';   163                    $aFo rmReplace[ 'forgot_la bel']    =  _t("_forg ot_your_pa ssword") .  '?';
164           }   164           }
165           el se   165           el se
166           {   166           {
167                    $aFo rmReplace[ 'forgot_pa ge_url'] =  '';   167                    $aFo rmReplace[ 'forgot_pa ge_url'] =  '';
168                    $aFo rmReplace[ 'forgot_la bel']    =  '';   168                    $aFo rmReplace[ 'forgot_la bel']    =  '';
169           }   169           }
170              170           
171           if ( $join_pa ge )   171           if ( $join_pa ge )
172           {   172           {
173                    $aFo rmReplace[ 'not_a_mem ber']  = _ t('_not_a_ member');   173                    $aFo rmReplace[ 'not_a_mem ber']  = _ t('_not_a_ member');
174                       174                    
175                    $aFo rmReplace[ 'or']             = _ t( '_or' ) ;   175                    $aFo rmReplace[ 'or']             = _ t( '_or' ) ;
176                    $aFo rmReplace[ 'join_labe l']    = _ t( '_Join  now' );   176                    $aFo rmReplace[ 'join_labe l']    = _ t( '_Join  now' );
177                    $aFo rmReplace[ 'join_page _url'] = $ join_page;   177                    $aFo rmReplace[ 'join_page _url'] = $ join_page;
178           }   178           }
179           el se   179           el se
180           {   180           {
181                    $aFo rmReplace[ 'not_a_mem ber']  = ' ';   181                    $aFo rmReplace[ 'not_a_mem ber']  = ' ';
182                    $aFo rmReplace[ 'join_labe l']    = ' ';   182                    $aFo rmReplace[ 'join_labe l']    = ' ';
183                    $aFo rmReplace[ 'join_page _url'] = ' ';   183                    $aFo rmReplace[ 'join_page _url'] = ' ';
184           }   184           }
185              185           
186              186           
187           if ( !strlen(  $template  ) )   187           if ( !strlen(  $template  ) )
188                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/tmpl_{ $tmpl}/log in_form.ht ml";   188                    $tem plate = BX _DIRECTORY _PATH_ROOT  . "templa tes/tmpl_{ $tmpl}/log in_form.ht ml";
189              189           
190           $r et = file_ get_conten ts( $templ ate );   190           $r et = file_ get_conten ts( $templ ate );
191              191           
192           fo reach( $aF ormReplace  as $key = > $val )   192           fo reach( $aF ormReplace  as $key = > $val )
193                    $ret  = str_rep lace( "__{ $key}__",  $val, $ret  );   193                    $ret  = str_rep lace( "__{ $key}__",  $val, $ret  );
194              194           
195           re turn $ret;   195           re turn $ret;
196   }   196   }
197     197  
198   function a ctivation_ mail( $ID,  $text = 1  )   198   function a ctivation_ mail( $ID,  $text = 1  )
199   {   199   {
200           gl obal $site ;   200           gl obal $site ;
201           gl obal $ret;   201           gl obal $ret;
202     202  
203           $I D = (int)$ ID;   203           $I D = (int)$ ID;
204           $p _arr = db_ arr( "SELE CT `Email`  FROM `Pro files` WHE RE `ID` =  '$ID'" );   204           $p _arr = db_ arr( "SELE CT `Email`  FROM `Pro files` WHE RE `ID` =  '$ID'" );
205           if  ( !$p_arr  )   205           if  ( !$p_arr  )
206           {   206           {
207                    $ret ['ErrorCod e'] = 7;   207                    $ret ['ErrorCod e'] = 7;
208                return f alse;   208                return f alse;
209           }   209           }
210     210  
211     211  
212     212  
213           $m essage     = getParam ( 't_Confi rmation' ) ;   213           $m essage     = getParam ( 't_Confi rmation' ) ;
214           $s ubject         = getP aram( 't_C onfirmatio n_subject'  );   214           $s ubject         = getP aram( 't_C onfirmatio n_subject'  );
215           $r ecipient   = $p_arr[' Email'];   215           $r ecipient   = $p_arr[' Email'];
216     216  
217           $s Confirmati onCode       = base64 _encode( b ase64_enco de( crypt(  $recipien t, "secret _confirmat ion_string " ) ) );   217           $s Confirmati onCode       = base64 _encode( b ase64_enco de( crypt(  $recipien t, "secret _confirmat ion_string " ) ) );
218           $s Confirmati onLink       = "{$sit e['url']}p rofile_act ivate.php? ConfID={$I D}&ConfCod e=" . urle ncode( $sC onfirmatio nCode );   218           $s Confirmati onLink       = "{$sit e['url']}p rofile_act ivate.php? ConfID={$I D}&ConfCod e=" . urle ncode( $sC onfirmatio nCode );
219     219  
220           $a Plus = arr ay();   220           $a Plus = arr ay();
221           $a Plus['Conf Code'] = $ sConfirmat ionCode;   221           $a Plus['Conf Code'] = $ sConfirmat ionCode;
222           $a Plus['Conf irmationLi nk'] = $sC onfirmatio nLink;   222           $a Plus['Conf irmationLi nk'] = $sC onfirmatio nLink;
223     223  
224           $m ail_ret =  sendMail(  $recipient , $subject , $message , $ID, $aP lus );   224           $m ail_ret =  sendMail(  $recipient , $subject , $message , $ID, $aP lus );
225     225  
226           if  ( $mail_r et )   226           if  ( $mail_r et )
227           {   227           {
228                    if (  $text )   228                    if (  $text )
229                    {   229                    {
230                             $page_ text .= '< div class= "Notice">'  . _t("_EM AIL_CONF_S ENT") . "< /div>";   230                             $page_ text .= '< div class= "Notice">'  . _t("_EM AIL_CONF_S ENT") . "< /div>";
231                                231                             
232                             $page_ text .= "< center><fo rm method= get action =\"{$site[ 'url']}pro file_activ ate.php\"> ";   232                             $page_ text .= "< center><fo rm method= get action =\"{$site[ 'url']}pro file_activ ate.php\"> ";
233                             $page_ text .= "< table clas s=text2 ce llspacing= 0 cellpadd ing=0><td> <b>"._t("_ ENTER_CONF _CODE").": </b>&nbsp; </td><td>< input type =hidden na me=\"ConfI D\" value= \"{$ID}\"> ";   233                             $page_ text .= "< table clas s=text2 ce llspacing= 0 cellpadd ing=0><td> <b>"._t("_ ENTER_CONF _CODE").": </b>&nbsp; </td><td>< input type =hidden na me=\"ConfI D\" value= \"{$ID}\"> ";
234                             $page_ text .= '< input clas s=no type= "text" nam e="ConfCod e" size=30 ></td><td> &nbsp;</td >';   234                             $page_ text .= '< input clas s=no type= "text" nam e="ConfCod e" size=30 ></td><td> &nbsp;</td >';
235                             $page_ text .= '< td><input  class=no t ype="submi t" value=" '._t("_Sub mit").'">< /td></tabl e>';   235                             $page_ text .= '< td><input  class=no t ype="submi t" value=" '._t("_Sub mit").'">< /td></tabl e>';
236                             $page_ text .= '< /form></ce nter><br / >';   236                             $page_ text .= '< /form></ce nter><br / >';
237                }   237                }
238                else   238                else
239                             return  true;   239                             return  true;
240           }   240           }
241           el se   241           el se
242           {   242           {
243                if ( $te xt )   243                if ( $te xt )
244                             $page_ text .= "< br /><br / >"._t("_EM AIL_CONF_N OT_SENT");   244                             $page_ text .= "< br /><br / >"._t("_EM AIL_CONF_N OT_SENT");
245                else   245                else
246                    {   246                    {
247                             $ret[' ErrorCode' ] = 10;   247                             $ret[' ErrorCode' ] = 10;
248                             return  false;   248                             return  false;
249                    }   249                    }
250           }   250           }
251     251  
252           if  ( $text )   252           if  ( $text )
253                    retu rn $page_t ext;   253                    retu rn $page_t ext;
254           el se   254           el se
255                    retu rn true;   255                    retu rn true;
256   }   256   }
257     257  
258     258  
259   function m em_expirat ion_letter ( $ID, $me mbership_n ame, $expi re_days )   259   function m em_expirat ion_letter ( $ID, $me mbership_n ame, $expi re_days )
260   {   260   {
261           gl obal $site ;   261           gl obal $site ;
262     262  
263           $I D = (int)$ ID;   263           $I D = (int)$ ID;
264     264  
265           if  ( !$ID )   265           if  ( !$ID )
266                    retu rn false;   266                    retu rn false;
267     267  
268           $p _arr = db_ arr( "SELE CT `Email`  FROM `Pro files` WHE RE `ID` =  $ID", 0 );   268           $p _arr = db_ arr( "SELE CT `Email`  FROM `Pro files` WHE RE `ID` =  $ID", 0 );
269           if  ( !$p_arr  )   269           if  ( !$p_arr  )
270                    retu rn false;   270                    retu rn false;
271     271  
272           //  Get notif ication me ssage body  and subje ct from gl obal setti ngs.   272           //  Get notif ication me ssage body  and subje ct from gl obal setti ngs.
273           $m essage     = getParam ('t_MemExp iration');   273           $m essage     = getParam ('t_MemExp iration');
274           $s ubject     = getParam ('t_MemExp iration_su bject');   274           $s ubject     = getParam ('t_MemExp iration_su bject');
275     275  
276           $r ecipient   = $p_arr[' Email'];   276           $r ecipient   = $p_arr[' Email'];
277     277  
278           $a Plus = arr ay();   278           $a Plus = arr ay();
279           $a Plus['Memb ershipName '] = $memb ership_nam e;   279           $a Plus['Memb ershipName '] = $memb ership_nam e;
280           $a Plus['Expi reDays'] =  $expire_d ays;   280           $a Plus['Expi reDays'] =  $expire_d ays;
281     281  
282           $m ail_ret =  sendMail(  $recipient , $subject , $message , $ID, $aP lus  );   282           $m ail_ret =  sendMail(  $recipient , $subject , $message , $ID, $aP lus  );
283     283  
284           if  ($mail_re t)   284           if  ($mail_re t)
285                    retu rn true;   285                    retu rn true;
286           el se   286           el se
287                    retu rn false;   287                    retu rn false;
288   }   288   }
289     289  
290   function g et_vars($w ith_page =  1, $with_ per_page =  1, $with_ sort_by =  1, $with_s ort_order  = 1, $with _gallery_v iew = 1)   290   function g et_vars($w ith_page =  1, $with_ per_page =  1, $with_ sort_by =  1, $with_s ort_order  = 1, $with _gallery_v iew = 1)
291   {   291   {
292           gl obal $affI D;   292           gl obal $affI D;
293     293  
294           $g et_paramet ers = "?";   294           $g et_paramet ers = "?";
295     295  
296           //  common pa rameters   296           //  common pa rameters
297           if  ( isset($ _REQUEST[' ID']) && ( int)$_REQU EST['ID']  > 0 )   297           if  ( isset($ _REQUEST[' ID']) && ( int)$_REQU EST['ID']  > 0 )
298                    $get _parameter s .= 'ID=' . (int)$_R EQUEST['ID '] .'&amp; ';   298                    $get _parameter s .= 'ID=' . (int)$_R EQUEST['ID '] .'&amp; ';
299           if  ( isset($ _REQUEST[' NickName'] ) && strle n($_REQUES T['NickNam e']) > 0 )   299           if  ( isset($ _REQUEST[' NickName'] ) && strle n($_REQUES T['NickNam e']) > 0 )
300                    $get _parameter s .= 'Nick Name='. pr ocess_pass _data($_RE QUEST['Nic kName']) . '&amp;';   300                    $get _parameter s .= 'Nick Name='. pr ocess_pass _data($_RE QUEST['Nic kName']) . '&amp;';
301           if  ( isset($ _REQUEST[' gallery_vi ew']) && ( int)$_REQU EST['galle ry_view']  > 0 && $wi th_gallery _view )   301           if  ( isset($ _REQUEST[' gallery_vi ew']) && ( int)$_REQU EST['galle ry_view']  > 0 && $wi th_gallery _view )
302                    $get _parameter s .= 'gall ery_view=' . (int)$_R EQUEST['ga llery_view '] .'&amp; ';   302                    $get _parameter s .= 'gall ery_view=' . (int)$_R EQUEST['ga llery_view '] .'&amp; ';
303           if  ( isset($ _REQUEST[' photos_onl y']) && st rlen($_REQ UEST['phot os_only'])  > 0 )   303           if  ( isset($ _REQUEST[' photos_onl y']) && st rlen($_REQ UEST['phot os_only'])  > 0 )
304                    $get _parameter s .= ($_RE QUEST['pho tos_only']  == 'on' ?  'photos_o nly=on&amp ;' : '');   304                    $get _parameter s .= ($_RE QUEST['pho tos_only']  == 'on' ?  'photos_o nly=on&amp ;' : '');
305           if  ( isset($ _REQUEST[' online_onl y']) && st rlen($_REQ UEST['onli ne_only'])  > 0 )   305           if  ( isset($ _REQUEST[' online_onl y']) && st rlen($_REQ UEST['onli ne_only'])  > 0 )
306           {   306           {
307                    $get _parameter s .= 'onli ne_only=on &amp;';   307                    $get _parameter s .= 'onli ne_only=on &amp;';
308           }   308           }
309           //  navigatio n paramete rs   309           //  navigatio n paramete rs
310           if  ( isset($ _REQUEST[' page']) &&  (int)$_RE QUEST['pag e'] > 0 &&  $with_pag e )   310           if  ( isset($ _REQUEST[' page']) &&  (int)$_RE QUEST['pag e'] > 0 &&  $with_pag e )
311                    $get _parameter s .= 'page ='. (int)$ _REQUEST[' page'] .'& amp;';   311                    $get _parameter s .= 'page ='. (int)$ _REQUEST[' page'] .'& amp;';
312           if  ( isset($ _REQUEST[' p_per_page ']) && (in t)$_REQUES T['p_per_p age'] > 0  && $with_p er_page )   312           if  ( isset($ _REQUEST[' p_per_page ']) && (in t)$_REQUES T['p_per_p age'] > 0  && $with_p er_page )
313                    $get _parameter s .= 'p_pe r_page='.  (int)$_REQ UEST['p_pe r_page'] . '&amp;';   313                    $get _parameter s .= 'p_pe r_page='.  (int)$_REQ UEST['p_pe r_page'] . '&amp;';
314           if  ( isset($ _REQUEST[' sortby'])  && strlen( $_REQUEST[ 'sortby'])  > 0 && $w ith_sort_b y )   314           if  ( isset($ _REQUEST[' sortby'])  && strlen( $_REQUEST[ 'sortby'])  > 0 && $w ith_sort_b y )
315                    $get _parameter s .= 'sort by='. proc ess_pass_d ata($_REQU EST['sortb y']) .'&am p;';   315                    $get _parameter s .= 'sort by='. proc ess_pass_d ata($_REQU EST['sortb y']) .'&am p;';
316           if  ( isset($ _REQUEST[' sortorder' ]) && strl en($_REQUE ST['sortor der']) > 0  && $with_ sort_order  )   316           if  ( isset($ _REQUEST[' sortorder' ]) && strl en($_REQUE ST['sortor der']) > 0  && $with_ sort_order  )
317                    $get _parameter s .= ($_RE QUEST['sor torder'] = = 'ASC' ?  'sortorder =ASC&amp;'  : 'sortor der=DESC&a mp;');   317                    $get _parameter s .= ($_RE QUEST['sor torder'] = = 'ASC' ?  'sortorder =ASC&amp;'  : 'sortor der=DESC&a mp;');
318     318  
319           //  ZIP searc h paramete rs   319           //  ZIP searc h paramete rs
320           if  ( isset($ _REQUEST[' zip']) &&  strlen($_R EQUEST['zi p']) > 0 )   320           if  ( isset($ _REQUEST[' zip']) &&  strlen($_R EQUEST['zi p']) > 0 )
321                    $get _parameter s .= 'zip= '. process _pass_data ($_REQUEST ['zip']) . '&amp;';   321                    $get _parameter s .= 'zip= '. process _pass_data ($_REQUEST ['zip']) . '&amp;';
322           if  ( isset($ _REQUEST[' metric'])  && strlen( $_REQUEST[ 'metric'])  > 0 )   322           if  ( isset($ _REQUEST[' metric'])  && strlen( $_REQUEST[ 'metric'])  > 0 )
323                    $get _parameter s .= ($_RE QUEST['met ric'] == ' miles' ? ' metric=mil es&amp;' :  'metric=k m&amp;');   323                    $get _parameter s .= ($_RE QUEST['met ric'] == ' miles' ? ' metric=mil es&amp;' :  'metric=k m&amp;');
324           if  ( isset($ _REQUEST[' distance'] ) )   324           if  ( isset($ _REQUEST[' distance'] ) )
325                    $get _parameter s .= 'dist ance='. (i nt)$_REQUE ST['distan ce'] .'&am p;';   325                    $get _parameter s .= 'dist ance='. (i nt)$_REQUE ST['distan ce'] .'&am p;';
326     326  
327           //  extra par ameters   327           //  extra par ameters
328           if  ( isset($ _REQUEST[' profiles'] ) && strle n($_REQUES T['profile s']) > 0 )   328           if  ( isset($ _REQUEST[' profiles'] ) && strle n($_REQUES T['profile s']) > 0 )
329                    $get _parameter s .= 'prof iles='. pr ocess_pass _data($_RE QUEST['pro files']) . '&amp;';   329                    $get _parameter s .= 'prof iles='. pr ocess_pass _data($_RE QUEST['pro files']) . '&amp;';
330           if  ( isset($ _REQUEST[' status'])  && strlen( $_REQUEST[ 'status'])  > 0 )   330           if  ( isset($ _REQUEST[' status'])  && strlen( $_REQUEST[ 'status'])  > 0 )
331                    $get _parameter s .= 'stat us='. proc ess_pass_d ata($_REQU EST['statu s']) .'&am p;';   331                    $get _parameter s .= 'stat us='. proc ess_pass_d ata($_REQU EST['statu s']) .'&am p;';
332     332  
333           //  admin par ameters   333           //  admin par ameters
334           if  ( isset($ _REQUEST[' search'])  && strlen( $_REQUEST[ 'search'])  > 0 )   334           if  ( isset($ _REQUEST[' search'])  && strlen( $_REQUEST[ 'search'])  > 0 )
335                    $get _parameter s .= 'sear ch='. proc ess_pass_d ata($_REQU EST['searc h']) .'&am p;';   335                    $get _parameter s .= 'sear ch='. proc ess_pass_d ata($_REQU EST['searc h']) .'&am p;';
336           if  ( isset($ _REQUEST[' s_nickname ']) && str len($_REQU EST['s_nic kname']) >  0 )   336           if  ( isset($ _REQUEST[' s_nickname ']) && str len($_REQU EST['s_nic kname']) >  0 )
337                    $get _parameter s .= 's_ni ckname='.  process_pa ss_data($_ REQUEST['s _nickname' ]) .'&amp; ';   337                    $get _parameter s .= 's_ni ckname='.  process_pa ss_data($_ REQUEST['s _nickname' ]) .'&amp; ';
338     338  
339           //  affiliate  parameter s   339           //  affiliate  parameter s
340           if  ( isset($ affID) &&  (int)$affI D > 0 )   340           if  ( isset($ affID) &&  (int)$affI D > 0 )
341                    $get _parameter s .= 'affI D='. (int) $affID .'& amp;';   341                    $get _parameter s .= 'affI D='. (int) $affID .'& amp;';
342     342  
343           $r espd = db_ res("SELEC T * FROM ` ProfileFie lds` WHERE  `Type` <>  'none' OR DER BY `Ty pe` ASC");   343           $r espd = db_ res("SELEC T * FROM ` ProfileFie lds` WHERE  `Type` <>  'none' OR DER BY `Ty pe` ASC");
344           wh ile ( $arr pd = mysql _fetch_arr ay($respd)  )   344           wh ile ( $arr pd = mysql _fetch_arr ay($respd)  )
345           {   345           {
346                    //$f name = get _field_nam e ( $arrpd  );   346                    //$f name = get _field_nam e ( $arrpd  );
347                    $fna me = $arrp d['Name'];   347                    $fna me = $arrp d['Name'];
348                    swit ch ($arrpd ['search_t ype'])   348                    swit ch ($arrpd ['search_t ype'])
349                    {   349                    {
350                             case ' select_one ':   350                             case ' select_one ':
351                             case ' text':   351                             case ' text':
352                             case ' area':   352                             case ' area':
353                                      $fval =  process_pa ss_data($_ REQUEST[$f name]);   353                                      $fval =  process_pa ss_data($_ REQUEST[$f name]);
354                                      if ( iss et($_REQUE ST[$fname] ) && strle n($fval) )   354                                      if ( iss et($_REQUE ST[$fname] ) && strle n($fval) )
355                                      {   355                                      {
356                                               $get_param eters .= " {$fname}={ $fval}&amp ;";   356                                               $get_param eters .= " {$fname}={ $fval}&amp ;";
357                                      }   357                                      }
358                                      break;   358                                      break;
359     359  
360                             /*case  'list':   360                             /*case  'list':
361                                      $fval =  $_REQUEST[ $fname];   361                                      $fval =  $_REQUEST[ $fname];
362                                      if ( is_ array($fva l) && coun t($fval) >  0 )   362                                      if ( is_ array($fva l) && coun t($fval) >  0 )
363                                      {   363                                      {
364                                               while ( li st( $key,  $val ) = e ach( $fval  ) )   364                                               while ( li st( $key,  $val ) = e ach( $fval  ) )
365                                                       $g et_paramet ers .= "{$ fname}[]=" . process_ pass_data( $val) ."&a mp;";   365                                                       $g et_paramet ers .= "{$ fname}[]=" . process_ pass_data( $val) ."&a mp;";
366                                      }   366                                      }
367                                      break;*/   367                                      break;*/
368     368  
369                             /*case  'check':   369                             /*case  'check':
370                                      if (  $a rrpd['type '] == 'r'  )   370                                      if (  $a rrpd['type '] == 'r'  )
371                                      {   371                                      {
372                                               $findok =  0;   372                                               $findok =  0;
373                                               $funcbody  = $arrpd[' extra'];   373                                               $funcbody  = $arrpd[' extra'];
374                                               $func = cr eate_funct ion("", $f uncbody);   374                                               $func = cr eate_funct ion("", $f uncbody);
375                                               $ar = $fun c();   375                                               $ar = $fun c();
376     376  
377                                               foreach (  $ar as $ke y => $valu e )   377                                               foreach (  $ar as $ke y => $valu e )
378                                               {   378                                               {
379                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )   379                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )
380                                                       {   380                                                       {
381                                                                $fin dok = 1;   381                                                                $fin dok = 1;
382                                                                brea k;   382                                                                brea k;
383                                                       }   383                                                       }
384                                               }   384                                               }
385     385  
386                                               if ( is_ar ray($ar) & & $findok  )   386                                               if ( is_ar ray($ar) & & $findok  )
387                                               {   387                                               {
388                                                       fo reach ( $a r as $key  => $value  )   388                                                       fo reach ( $a r as $key  => $value  )
389                                                       {   389                                                       {
390                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )   390                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )
391                                                                         $get_p arameters  .= "{$fnam e}_{$key}= on&amp;";   391                                                                         $get_p arameters  .= "{$fnam e}_{$key}= on&amp;";
392                                                       }   392                                                       }
393                                               }   393                                               }
394                                      }   394                                      }
395                                      elseif (  $arrpd['t ype'] == ' e' )   395                                      elseif (  $arrpd['t ype'] == ' e' )
396                                      {   396                                      {
397                                               $findok =  0;   397                                               $findok =  0;
398     398  
399                                               $vals = pr eg_split ( "/[,\']+/" , $arr['ex tra'], -1,  PREG_SPLI T_NO_EMPTY );   399                                               $vals = pr eg_split ( "/[,\']+/" , $arr['ex tra'], -1,  PREG_SPLI T_NO_EMPTY );
400     400  
401                                               foreach (  $vals as $ key )   401                                               foreach (  $vals as $ key )
402                                               {   402                                               {
403                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )   403                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )
404                                                       {   404                                                       {
405                                                                $fin dok = 1;   405                                                                $fin dok = 1;
406                                                                brea k;   406                                                                brea k;
407                                                       }   407                                                       }
408                                               }   408                                               }
409     409  
410                                               if ( $find ok )   410                                               if ( $find ok )
411                                               {   411                                               {
412                                                       fo reach ( $v als as $ke y )   412                                                       fo reach ( $v als as $ke y )
413                                                       {   413                                                       {
414                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )   414                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )
415                                                                         $get_p arameters  .= "{$fnam e}_{$key}= on&amp;";   415                                                                         $get_p arameters  .= "{$fnam e}_{$key}= on&amp;";
416                                                       }   416                                                       }
417                                               }   417                                               }
418                                      }   418                                      }
419                                      break;*/   419                                      break;*/
420     420  
421                             /*case  'check_se t':   421                             /*case  'check_se t':
422                                      $vals =  preg_split  ("/[,\']+ /", $arrpd ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);   422                                      $vals =  preg_split  ("/[,\']+ /", $arrpd ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);
423                                      $offset  = 0;   423                                      $offset  = 0;
424     424  
425                                      foreach  ( $vals as  $v )   425                                      foreach  ( $vals as  $v )
426                                      {   426                                      {
427                                               if ( $_REQ UEST["{$fn ame}_{$off set}"] ==  "on" )   427                                               if ( $_REQ UEST["{$fn ame}_{$off set}"] ==  "on" )
428                                                       $g et_paramet ers .= "{$ fname}_{$o ffset}=on& amp;";   428                                                       $g et_paramet ers .= "{$ fname}_{$o ffset}=on& amp;";
429                                               $offset++;   429                                               $offset++;
430                                      }   430                                      }
431     431  
432                                      break;*/   432                                      break;*/
433     433  
434                             case ' date':   434                             case ' date':
435                                      $fval_s  = process_ pass_data( $_REQUEST[ "{$fname}_ start"]);   435                                      $fval_s  = process_ pass_data( $_REQUEST[ "{$fname}_ start"]);
436                                      $fval_e  = process_ pass_data( $_REQUEST[ "{$fname}_ end"]);   436                                      $fval_e  = process_ pass_data( $_REQUEST[ "{$fname}_ end"]);
437     437  
438                                      if ( str len($fval_ s) )   438                                      if ( str len($fval_ s) )
439                                      {   439                                      {
440                                               $get_param eters .= " {$fname}_s tart={$fva l_s}&amp;" ;   440                                               $get_param eters .= " {$fname}_s tart={$fva l_s}&amp;" ;
441                                      }   441                                      }
442                                      if ( str len($fval_ e) )   442                                      if ( str len($fval_ e) )
443                                      {   443                                      {
444                                               $get_param eters .= " {$fname}_e nd={$fval_ e}&amp;";   444                                               $get_param eters .= " {$fname}_e nd={$fval_ e}&amp;";
445                                      }   445                                      }
446                                      break;   446                                      break;
447                    }   447                    }
448           }   448           }
449     449  
450           //  exclude l ast charac ter from t he string   450           //  exclude l ast charac ter from t he string
451           re turn $get_ parameters ;   451           re turn $get_ parameters ;
452   }   452   }
453     453  
454   function g et_vars_co ntrols($wi th_page =  1, $with_p er_page =  1, $with_s ort_by = 1 , $with_so rt_order =  1, $with_ gallery_vi ew = 1)   454   function g et_vars_co ntrols($wi th_page =  1, $with_p er_page =  1, $with_s ort_by = 1 , $with_so rt_order =  1, $with_ gallery_vi ew = 1)
455   {   455   {
456           gl obal $affI D;   456           gl obal $affI D;
457     457  
458           $g et_inputs  = "";   458           $g et_inputs  = "";
459     459  
460           //  common pa rameters   460           //  common pa rameters
461           if  ( isset($ _REQUEST[' ID']) && ( int)$_REQU EST['ID']  > 0 )   461           if  ( isset($ _REQUEST[' ID']) && ( int)$_REQU EST['ID']  > 0 )
462                    $get _inputs .=  '<input t ype="hidde n" name="I D" value=" '. (int)$_ REQUEST['I D'] .'" /> ';   462                    $get _inputs .=  '<input t ype="hidde n" name="I D" value=" '. (int)$_ REQUEST['I D'] .'" /> ';
463           if  ( isset($ _REQUEST[' NickName'] ) && strle n($_REQUES T['NickNam e']) > 0 )   463           if  ( isset($ _REQUEST[' NickName'] ) && strle n($_REQUES T['NickNam e']) > 0 )
464                    $get _inputs .=  '<input t ype="hidde n" name="N ickName" v alue="'. p rocess_pas s_data($_R EQUEST['Ni ckName'])  .'" />';   464                    $get _inputs .=  '<input t ype="hidde n" name="N ickName" v alue="'. p rocess_pas s_data($_R EQUEST['Ni ckName'])  .'" />';
465           if  ( isset($ _REQUEST[' gallery_vi ew']) && ( int)$_REQU EST['galle ry_view']  > 0 && $wi th_gallery _view )   465           if  ( isset($ _REQUEST[' gallery_vi ew']) && ( int)$_REQU EST['galle ry_view']  > 0 && $wi th_gallery _view )
466                    $get _inputs .=  '<input t ype="hidde n" name="g allery_vie w" value=" '. (int)$_ REQUEST['g allery_vie w'] .'" /> ';   466                    $get _inputs .=  '<input t ype="hidde n" name="g allery_vie w" value=" '. (int)$_ REQUEST['g allery_vie w'] .'" /> ';
467           if  ( isset($ _REQUEST[' photos_onl y']) && st rlen($_REQ UEST['phot os_only'])  > 0 )   467           if  ( isset($ _REQUEST[' photos_onl y']) && st rlen($_REQ UEST['phot os_only'])  > 0 )
468                    $get _inputs .=  ($_REQUES T['photos_ only'] ==  'on' ? '<i nput type= "hidden" n ame="photo s_only" va lue="on" / >' : '');   468                    $get _inputs .=  ($_REQUES T['photos_ only'] ==  'on' ? '<i nput type= "hidden" n ame="photo s_only" va lue="on" / >' : '');
469           if  ( isset($ _REQUEST[' online_onl y']) && st rlen($_REQ UEST['onli ne_only'])  > 0 )   469           if  ( isset($ _REQUEST[' online_onl y']) && st rlen($_REQ UEST['onli ne_only'])  > 0 )
470           {   470           {
471                    $get _inputs .=  '<input t ype="hidde n" name="o nline_only " value="o n" />';   471                    $get _inputs .=  '<input t ype="hidde n" name="o nline_only " value="o n" />';
472           }   472           }
473           //  navigatio n paramete rs   473           //  navigatio n paramete rs
474           if  ( isset($ _REQUEST[' page']) &&  (int)$_RE QUEST['pag e'] > 0 &&  $with_pag e )   474           if  ( isset($ _REQUEST[' page']) &&  (int)$_RE QUEST['pag e'] > 0 &&  $with_pag e )
475                    $get _inputs .=  '<input t ype="hidde n" name="p age" value ="'. (int) $_REQUEST[ 'page'] .' " />';   475                    $get _inputs .=  '<input t ype="hidde n" name="p age" value ="'. (int) $_REQUEST[ 'page'] .' " />';
476           if  ( isset($ _REQUEST[' p_per_page ']) && (in t)$_REQUES T['p_per_p age'] > 0  && $with_p er_page )   476           if  ( isset($ _REQUEST[' p_per_page ']) && (in t)$_REQUES T['p_per_p age'] > 0  && $with_p er_page )
477                    $get _inputs .=  '<input t ype="hidde n" name="p _per_page"  value="'.  (int)$_RE QUEST['p_p er_page']  .'" />';   477                    $get _inputs .=  '<input t ype="hidde n" name="p _per_page"  value="'.  (int)$_RE QUEST['p_p er_page']  .'" />';
478           if  ( isset($ _REQUEST[' sortby'])  && strlen( $_REQUEST[ 'sortby'])  > 0 && $w ith_sort_b y )   478           if  ( isset($ _REQUEST[' sortby'])  && strlen( $_REQUEST[ 'sortby'])  > 0 && $w ith_sort_b y )
479                    $get _inputs .=  '<input t ype="hidde n" name="s ortby" val ue="'. pro cess_pass_ data($_REQ UEST['sort by']) .'"  />';   479                    $get _inputs .=  '<input t ype="hidde n" name="s ortby" val ue="'. pro cess_pass_ data($_REQ UEST['sort by']) .'"  />';
480           if  ( isset($ _REQUEST[' sortorder' ]) && strl en($_REQUE ST['sortor der']) > 0  && $with_ sort_order  )   480           if  ( isset($ _REQUEST[' sortorder' ]) && strl en($_REQUE ST['sortor der']) > 0  && $with_ sort_order  )
481                    $get _inputs .=  ($_REQUES T['sortord er'] == 'A SC' ? '<in put type=" hidden" na me="sortor der" value ="ASC" />'  : '<input  type="hid den" name= "sortorder " value="D ESC" />');   481                    $get _inputs .=  ($_REQUES T['sortord er'] == 'A SC' ? '<in put type=" hidden" na me="sortor der" value ="ASC" />'  : '<input  type="hid den" name= "sortorder " value="D ESC" />');
482     482  
483           //  ZIP searc h paramete rs   483           //  ZIP searc h paramete rs
484           if  ( isset($ _REQUEST[' zip']) &&  strlen($_R EQUEST['zi p']) > 0 )   484           if  ( isset($ _REQUEST[' zip']) &&  strlen($_R EQUEST['zi p']) > 0 )
485                    $get _inputs .=  '<input t ype="hidde n" name="z ip" value= "'. proces s_pass_dat a($_REQUES T['zip'])  .'" />';   485                    $get _inputs .=  '<input t ype="hidde n" name="z ip" value= "'. proces s_pass_dat a($_REQUES T['zip'])  .'" />';
486           if  ( isset($ _REQUEST[' metric'])  && strlen( $_REQUEST[ 'metric'])  > 0 )   486           if  ( isset($ _REQUEST[' metric'])  && strlen( $_REQUEST[ 'metric'])  > 0 )
487                    $get _inputs .=  ($_REQUES T['metric' ] == 'mile s' ? '<inp ut type="h idden" nam e="metric"  value="mi les" />' :  '<input t ype="hidde n" name="m etric" val ue="km" /> ');   487                    $get _inputs .=  ($_REQUES T['metric' ] == 'mile s' ? '<inp ut type="h idden" nam e="metric"  value="mi les" />' :  '<input t ype="hidde n" name="m etric" val ue="km" /> ');
488           if  ( isset($ _REQUEST[' distance'] ) )   488           if  ( isset($ _REQUEST[' distance'] ) )
489                    $get _inputs .=  '<input t ype="hidde n" name="d istance" v alue="'. ( int)$_REQU EST['dista nce'] .'"  />';   489                    $get _inputs .=  '<input t ype="hidde n" name="d istance" v alue="'. ( int)$_REQU EST['dista nce'] .'"  />';
490     490  
491           //  extra par ameters   491           //  extra par ameters
492           if  ( isset($ _REQUEST[' profiles'] ) && strle n($_REQUES T['profile s']) > 0 )   492           if  ( isset($ _REQUEST[' profiles'] ) && strle n($_REQUES T['profile s']) > 0 )
493                    $get _inputs .=  '<input t ype="hidde n" name="p rofiles" v alue="'. p rocess_pas s_data($_R EQUEST['pr ofiles'])  .'" />';   493                    $get _inputs .=  '<input t ype="hidde n" name="p rofiles" v alue="'. p rocess_pas s_data($_R EQUEST['pr ofiles'])  .'" />';
494           if  ( isset($ _REQUEST[' status'])  && strlen( $_REQUEST[ 'status'])  > 0 )   494           if  ( isset($ _REQUEST[' status'])  && strlen( $_REQUEST[ 'status'])  > 0 )
495                    $get _inputs .=  '<input t ype="hidde n" name="s tatus" val ue="'. pro cess_pass_ data($_REQ UEST['stat us']) .'"  />';   495                    $get _inputs .=  '<input t ype="hidde n" name="s tatus" val ue="'. pro cess_pass_ data($_REQ UEST['stat us']) .'"  />';
496     496  
497           //  admin par ameters   497           //  admin par ameters
498           if  ( isset($ _REQUEST[' search'])  && strlen( $_REQUEST[ 'search'])  > 0 )   498           if  ( isset($ _REQUEST[' search'])  && strlen( $_REQUEST[ 'search'])  > 0 )
499                    $get _inputs .=  '<input t ype="hidde n" name="s earch" val ue="'. pro cess_pass_ data($_REQ UEST['sear ch']) .'"  />';   499                    $get _inputs .=  '<input t ype="hidde n" name="s earch" val ue="'. pro cess_pass_ data($_REQ UEST['sear ch']) .'"  />';
500           if  ( isset($ _REQUEST[' s_nickname ']) && str len($_REQU EST['s_nic kname']) >  0 )   500           if  ( isset($ _REQUEST[' s_nickname ']) && str len($_REQU EST['s_nic kname']) >  0 )
501                    $get _inputs .=  '<input t ype="hidde n" name="s _nickname"  value="'.  process_p ass_data($ _REQUEST[' s_nickname ']) .'" /> ';   501                    $get _inputs .=  '<input t ype="hidde n" name="s _nickname"  value="'.  process_p ass_data($ _REQUEST[' s_nickname ']) .'" /> ';
502     502  
503           //  affiliate  parameter s   503           //  affiliate  parameter s
504           if  ( isset($ affID) &&  (int)$affI D > 0 )   504           if  ( isset($ affID) &&  (int)$affI D > 0 )
505                    $get _inputs .=  '<input t ype="hidde n" name="a ffID" valu e="'. (int )$affID .' " />';   505                    $get _inputs .=  '<input t ype="hidde n" name="a ffID" valu e="'. (int )$affID .' " />';
506     506  
507           $r espd = db_ res("SELEC T * FROM ` ProfileFie lds` WHERE  `Type` <>  'none' OR DER BY `Ty pe` ASC");   507           $r espd = db_ res("SELEC T * FROM ` ProfileFie lds` WHERE  `Type` <>  'none' OR DER BY `Ty pe` ASC");
508           wh ile ( $arr pd = mysql _fetch_arr ay($respd)  )   508           wh ile ( $arr pd = mysql _fetch_arr ay($respd)  )
509           {   509           {
510                    //$f name = get _field_nam e( $arrpd  );   510                    //$f name = get _field_nam e( $arrpd  );
511                    $fna me = $arrp d['Name'];   511                    $fna me = $arrp d['Name'];
512                    swit ch ($arrpd ['Type'])   512                    swit ch ($arrpd ['Type'])
513                    {   513                    {
514                             case ' select_one ':   514                             case ' select_one ':
515                             case ' text':   515                             case ' text':
516                             case ' area':   516                             case ' area':
517                                      $fval =  process_pa ss_data($_ REQUEST[$f name]);   517                                      $fval =  process_pa ss_data($_ REQUEST[$f name]);
518                                      if ( iss et($_REQUE ST[$fname] ) && strle n($fval) )   518                                      if ( iss et($_REQUE ST[$fname] ) && strle n($fval) )
519                                      {   519                                      {
520                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"$fna me\" value =\"$fval\"  />";   520                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"$fna me\" value =\"$fval\"  />";
521                                      }   521                                      }
522                                      break;   522                                      break;
523     523  
524                             /*case  'list':   524                             /*case  'list':
525                                      $fval =  $_REQUEST[ $fname];   525                                      $fval =  $_REQUEST[ $fname];
526                                      if ( is_ array($fva l) && coun t($fval) >  0 )   526                                      if ( is_ array($fva l) && coun t($fval) >  0 )
527                                      {   527                                      {
528                                               while ( li st( $key,  $val ) = e ach( $fval  ) )   528                                               while ( li st( $key,  $val ) = e ach( $fval  ) )
529                                                       $g et_inputs  .= "<input  type=\"hi dden\" nam e=\"{$fnam e}[]\" val ue=\"". pr ocess_pass _data($val ) ."\" />" ;   529                                                       $g et_inputs  .= "<input  type=\"hi dden\" nam e=\"{$fnam e}[]\" val ue=\"". pr ocess_pass _data($val ) ."\" />" ;
530                                      }   530                                      }
531                                      break;*/   531                                      break;*/
532     532  
533                             /*case  'check':   533                             /*case  'check':
534                                      if ($arr pd['type']  == 'r')   534                                      if ($arr pd['type']  == 'r')
535                                      {   535                                      {
536                                               $findok =  0;   536                                               $findok =  0;
537                                               $funcbody  = $arrpd[' extra'];   537                                               $funcbody  = $arrpd[' extra'];
538                                               $func = cr eate_funct ion("", $f uncbody);   538                                               $func = cr eate_funct ion("", $f uncbody);
539                                               $ar = $fun c();   539                                               $ar = $fun c();
540     540  
541                                               foreach (  $ar as $ke y => $valu e )   541                                               foreach (  $ar as $ke y => $valu e )
542                                               {   542                                               {
543                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )   543                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )
544                                                       {   544                                                       {
545                                                                $fin dok = 1;   545                                                                $fin dok = 1;
546                                                                brea k;   546                                                                brea k;
547                                                       }   547                                                       }
548                                               }   548                                               }
549     549  
550                                               if ( $find ok )   550                                               if ( $find ok )
551                                               {   551                                               {
552                                                       fo reach ( $a r as $key  => $value  )   552                                                       fo reach ( $a r as $key  => $value  )
553                                                       {   553                                                       {
554                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )   554                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )
555                                                                         $get_i nputs .= " <input typ e=\"hidden \" name=\" {$fname}_{ $key}\" va lue=\"on\"  />";   555                                                                         $get_i nputs .= " <input typ e=\"hidden \" name=\" {$fname}_{ $key}\" va lue=\"on\"  />";
556                                                       }   556                                                       }
557                                               }   557                                               }
558                                      }   558                                      }
559                                      elseif ( $arrpd['ty pe'] == 'e ')   559                                      elseif ( $arrpd['ty pe'] == 'e ')
560                                      {   560                                      {
561                                               $findok =  0;   561                                               $findok =  0;
562     562  
563                                               $vals = pr eg_split ( "/[,\']+/" , $arr['ex tra'], -1,  PREG_SPLI T_NO_EMPTY );   563                                               $vals = pr eg_split ( "/[,\']+/" , $arr['ex tra'], -1,  PREG_SPLI T_NO_EMPTY );
564     564  
565                                               foreach (  $vals as $ key )   565                                               foreach (  $vals as $ key )
566                                               {   566                                               {
567                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )   567                                                       if  ( $_REQUE ST["{$fnam e}_{$key}" ] == "on"  )
568                                                       {   568                                                       {
569                                                                $fin dok = 1;   569                                                                $fin dok = 1;
570                                                                brea k;   570                                                                brea k;
571                                                       }   571                                                       }
572                                               }   572                                               }
573     573  
574                                               if ( $find ok )   574                                               if ( $find ok )
575                                               {   575                                               {
576                                                       fo reach ( $v als as $ke y )   576                                                       fo reach ( $v als as $ke y )
577                                                       {   577                                                       {
578                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )   578                                                                if (  $_REQUEST ["{$fname} _{$key}"]  == "on" )
579                                                                         $get_i nputs .= " <input typ e=\"hidden \" name=\" {$fname}_{ $key}\" va lue=\"on\"  />";   579                                                                         $get_i nputs .= " <input typ e=\"hidden \" name=\" {$fname}_{ $key}\" va lue=\"on\"  />";
580                                                       }   580                                                       }
581                                               }   581                                               }
582                                      }   582                                      }
583                                      break;*/   583                                      break;*/
584     584  
585                             /*case  'check_se t':   585                             /*case  'check_se t':
586                                      $vals =  preg_split  ("/[,\']+ /", $arrpd ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);   586                                      $vals =  preg_split  ("/[,\']+ /", $arrpd ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);
587                                      $offset  = 0;   587                                      $offset  = 0;
588     588  
589                                      foreach  ( $vals as  $v )   589                                      foreach  ( $vals as  $v )
590                                      {   590                                      {
591                                               if ( $_REQ UEST["{$fn ame}_{$off set}"] ==  "on" )   591                                               if ( $_REQ UEST["{$fn ame}_{$off set}"] ==  "on" )
592                                                       $g et_inputs  .= "<input  type=\"hi dden\" nam e=\"{$fnam e}_{$offse t}\" value =\"on\" /> ";   592                                                       $g et_inputs  .= "<input  type=\"hi dden\" nam e=\"{$fnam e}_{$offse t}\" value =\"on\" /> ";
593                                               $offset++;   593                                               $offset++;
594                                      }   594                                      }
595                                      break;*/   595                                      break;*/
596     596  
597                             case ' date':   597                             case ' date':
598                                      $fval_s  = process_ pass_data( $_REQUEST[ "{$fname}_ start"]);   598                                      $fval_s  = process_ pass_data( $_REQUEST[ "{$fname}_ start"]);
599                                      $fval_e  = process_ pass_data( $_REQUEST[ "{$fname}_ end"]);   599                                      $fval_e  = process_ pass_data( $_REQUEST[ "{$fname}_ end"]);
600     600  
601                                      if ( iss et($_REQUE ST["{$fnam e}_start"] ) && strle n($fval_s)  )   601                                      if ( iss et($_REQUE ST["{$fnam e}_start"] ) && strle n($fval_s)  )
602                                      {   602                                      {
603                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"{$fn ame}_start \" value=\ "$fval_s\"  />";   603                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"{$fn ame}_start \" value=\ "$fval_s\"  />";
604                                      }   604                                      }
605                                      if ( iss et($_REQUE ST["{$fnam e}_end"])  && strlen( $fval_e) )   605                                      if ( iss et($_REQUE ST["{$fnam e}_end"])  && strlen( $fval_e) )
606                                      {   606                                      {
607                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"{$fn ame}_end\"  value=\"$ fval_e\" / >";   607                                               $get_input s .= "<inp ut type=\" hidden\" n ame=\"{$fn ame}_end\"  value=\"$ fval_e\" / >";
608                                      }   608                                      }
609                                      break;   609                                      break;
610                    }   610                    }
611           }   611           }
612     612  
613           re turn $get_ inputs;   613           re turn $get_ inputs;
614   }   614   }
615     615  
616   function R esNavigati onRet( $fo rm_name, $ short = 0,  $function ='', $aVar  = '' )   616   function R esNavigati onRet( $fo rm_name, $ short = 0,  $function ='', $aVar  = '' )
617   {   617   {
618           gl obal $p_nu m;   618           gl obal $p_nu m;
619           gl obal $page ;   619           gl obal $page ;
620           gl obal $_pag e;   620           gl obal $_pag e;
621           gl obal $p_pe r_page;   621           gl obal $p_pe r_page;
622           gl obal $page _first_p;   622           gl obal $page _first_p;
623           gl obal $page s_num;   623           gl obal $page s_num;
624           gl obal $logg ed;   624           gl obal $logg ed;
625           gl obal $oTem plConfig;   625           gl obal $oTem plConfig;
626           gl obal $gall ery_view;   626           gl obal $gall ery_view;
627     627  
628           $p ages_aroun d = 5;   628           $p ages_aroun d = 5;
629           if  ( !is_arr ay($aVar)  )   629           if  ( !is_arr ay($aVar)  )
630           {   630           {
631                    $per _page_arra y = array( 10, 15, 20 , 30, 50);   631                    $per _page_arra y = array( 10, 15, 20 , 30, 50);
632           }   632           }
633           el se   633           el se
634           {   634           {
635                    $per _page_arra y = $aVar;   635                    $per _page_arra y = $aVar;
636           }   636           }
637              637           
638           if  ( $logged ['admin']  )   638           if  ( $logged ['admin']  )
639                    arra y_push($pe r_page_arr ay, 100);   639                    arra y_push($pe r_page_arr ay, 100);
640     640  
641           if  ( !$funct ion )   641           if  ( !$funct ion )
642           {   642           {
643                $get_var s_controls  = get_var s_controls (1, 0, 1,  1, 1);   643                $get_var s_controls  = get_var s_controls (1, 0, 1,  1, 1);
644                $get_var s = get_va rs(0, 1, 1 , 1, 0);   644                $get_var s = get_va rs(0, 1, 1 , 1, 0);
645           }   645           }
646           el se   646           el se
647           {   647           {
648                $func =  create_fun ction( '',  $function  );   648                $func =  create_fun ction( '',  $function  );
649                $get_var s = $func( );   649                $get_var s = $func( );
650           }   650           }
651     651  
652           $g allery_vie w = (int)$ gallery_vi ew;   652           $g allery_vie w = (int)$ gallery_vi ew;
653     653  
654           ob _start();   654           ob _start();
655     655  
656           if  ( $p_num  )   656           if  ( $p_num  )
657           {   657           {
658   ?>   658   ?>
659                    <for m name="<? = 'NavForm ' . $form_ name ?>" i d="<?= 'Na vForm' . $ form_name  ?>" method ="get" act ion="<?= $ _SERVER['P HP_SELF']  ?>" style= "margin: 0 px;">   659                    <for m name="<? = 'NavForm ' . $form_ name ?>" i d="<?= 'Na vForm' . $ form_name  ?>" method ="get" act ion="<?= $ _SERVER['P HP_SELF']  ?>" style= "margin: 0 px;">
660                             <?= $g et_vars_co ntrols ?>   660                             <?= $g et_vars_co ntrols ?>
661                             <table  class="te xt2" cellp adding="0"  cellspaci ng="0" bor der="0">   661                             <table  class="te xt2" cellp adding="0"  cellspaci ng="0" bor der="0">
662   <?   662   <?
663                    if (  !$short )   663                    if (  !$short )
664                    {   664                    {
665   ?>   665   ?>
666                                      <tr>   666                                      <tr>
667                                               <td><?= _t ("_Results ") ?>:&nbs p;<b><?= ( int)$page_ first_p ?> </b>-<b><? = min((int )($page_fi rst_p + $p _per_page  - 1), (int )$p_num) ? ></b>&nbsp ;|&nbsp;<? = _t("_Tot al") ?>:&n bsp;<b><?=  (int)$p_n um ?></b>< /td>   667                                               <td><?= _t ("_Results ") ?>:&nbs p;<b><?= ( int)$page_ first_p ?> </b>-<b><? = min((int )($page_fi rst_p + $p _per_page  - 1), (int )$p_num) ? ></b>&nbsp ;|&nbsp;<? = _t("_Tot al") ?>:&n bsp;<b><?=  (int)$p_n um ?></b>< /td>
668                                               <td>&nbsp; |&nbsp;<?=  _t("_Resu lts per pa ge") ?>:&n bsp;</td>   668                                               <td>&nbsp; |&nbsp;<?=  _t("_Resu lts per pa ge") ?>:&n bsp;</td>
669                                               <td>   669                                               <td>
670                                                       <s elect name ="p_per_pa ge" onchan ge="javasc ript: docu ment.forms ['<?= 'Nav Form' . $f orm_name ? >'].submit ();">   670                                                       <s elect name ="p_per_pa ge" onchan ge="javasc ript: docu ment.forms ['<?= 'Nav Form' . $f orm_name ? >'].submit ();">
671   <?   671   <?
672                             foreac h ( $per_p age_array  as $per_pa ge_elem )   672                             foreac h ( $per_p age_array  as $per_pa ge_elem )
673                             {   673                             {
674                                      echo "<o ption valu e=\"{$per_ page_elem} \" ". ($p_ per_page = = $per_pag e_elem ? ' selected=" selected"'  : '') ."> {$per_page _elem}</op tion>";   674                                      echo "<o ption valu e=\"{$per_ page_elem} \" ". ($p_ per_page = = $per_pag e_elem ? ' selected=" selected"'  : '') ."> {$per_page _elem}</op tion>";
675                             }   675                             }
676   ?>   676   ?>
677                                                       </ select>   677                                                       </ select>
678                                               </td>   678                                               </td>
679                                               <td>&nbsp; </td>   679                                               <td>&nbsp; </td>
680                                      </tr>   680                                      </tr>
681   <?   681   <?
682                    }   682                    }
683   ?>   683   ?>
684                                      <tr>   684                                      <tr>
685                                               <td align= "center" c olspan="3" >   685                                               <td align= "center" c olspan="3" >
686                                                       <? = _t('_Pag es') ?>:&n bsp;   686                                                       <? = _t('_Pag es') ?>:&n bsp;
687   <?   687   <?
688                    if (  $page > 1  )   688                    if (  $page > 1  )
689                    {   689                    {
690                             echo "   690                             echo "
691                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=1&am p;gallery_ view={$gal lery_view} \">". _t(" _First") . "</a>&nbsp ;|&nbsp;   691                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=1&am p;gallery_ view={$gal lery_view} \">". _t(" _First") . "</a>&nbsp ;|&nbsp;
692                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=". ( int)($page  - 1) ."&a mp;gallery _view={$ga llery_view }\">". _t( "_Prev") . "</a>&nbsp ;|&nbsp;";   692                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=". ( int)($page  - 1) ."&a mp;gallery _view={$ga llery_view }\">". _t( "_Prev") . "</a>&nbsp ;|&nbsp;";
693                    }   693                    }
694     694  
695                    // p rint all p revious pa ges   695                    // p rint all p revious pa ges
696                    for  ( $i = max ($page - $ pages_arou nd, 1); $i  < $page ;  $i++ )   696                    for  ( $i = max ($page - $ pages_arou nd, 1); $i  < $page ;  $i++ )
697                    {   697                    {
698                             echo "   698                             echo "
699                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$i} &amp;galle ry_view={$ gallery_vi ew}\">{$i} </a>&nbsp; ";   699                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$i} &amp;galle ry_view={$ gallery_vi ew}\">{$i} </a>&nbsp; ";
700                    }   700                    }
701                    // p rint curre nt page   701                    // p rint curre nt page
702                    echo  "   702                    echo  "
703                                                       [{ $page}]&nb sp;";   703                                                       [{ $page}]&nb sp;";
704                    // p rint all n ext pages   704                    // p rint all n ext pages
705                    for  ( $i = $pa ge + 1; $i  <= min($p age + $pag es_around,  $pages_nu m); $i++ )   705                    for  ( $i = $pa ge + 1; $i  <= min($p age + $pag es_around,  $pages_nu m); $i++ )
706                    {   706                    {
707                             echo "   707                             echo "
708                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$i} &amp;galle ry_view={$ gallery_vi ew}\">{$i} </a>&nbsp; ";   708                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$i} &amp;galle ry_view={$ gallery_vi ew}\">{$i} </a>&nbsp; ";
709                    }   709                    }
710     710  
711                    if (  $page < $ pages_num  )   711                    if (  $page < $ pages_num  )
712                    {   712                    {
713                             echo "   713                             echo "
714                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=". ( int)($page  + 1) ."&a mp;gallery _view={$ga llery_view }\">". _t( "_Next") . "</a>&nbsp ;|&nbsp;   714                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page=". ( int)($page  + 1) ."&a mp;gallery _view={$ga llery_view }\">". _t( "_Next") . "</a>&nbsp ;|&nbsp;
715                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$pa ges_num}&a mp;gallery _view={$ga llery_view }\">". _t( "_Last") . "</a>";   715                                                       <a  href=\"{$ _SERVER['P HP_SELF']} {$get_vars }page={$pa ges_num}&a mp;gallery _view={$ga llery_view }\">". _t( "_Last") . "</a>";
716                    }   716                    }
717   ?>   717   ?>
718                                               </td>   718                                               </td>
719   <?   719   <?
720                    // p rint galle ry option  for search  page   720                    // p rint galle ry option  for search  page
721                    if (  $_page['n ame_index' ] == 32 &&  $oTemplCo nfig -> sh ow_gallery _link_in_p age_naviga tion )   721                    if (  $_page['n ame_index' ] == 32 &&  $oTemplCo nfig -> sh ow_gallery _link_in_p age_naviga tion )
722                    {   722                    {
723                             if ( $ gallery_vi ew )   723                             if ( $ gallery_vi ew )
724                             {   724                             {
725                                      echo "   725                                      echo "
726                                               <td style= \"padding- left: 10px ;\"><a hre f=\"{$_SER VER['PHP_S ELF']}{$ge t_vars}pag e={$page}& amp;galler y_view=0\" >". _t("_v iew as pro file detai ls") ."</a ></td>";   726                                               <td style= \"padding- left: 10px ;\"><a hre f=\"{$_SER VER['PHP_S ELF']}{$ge t_vars}pag e={$page}& amp;galler y_view=0\" >". _t("_v iew as pro file detai ls") ."</a ></td>";
727                             }   727                             }
728                             else   728                             else
729                             {   729                             {
730                                      echo "   730                                      echo "
731                                               <td style= \"padding- left: 10px ;\"><a hre f=\"{$_SER VER['PHP_S ELF']}{$ge t_vars}pag e={$page}& amp;galler y_view=1\" >". _t("_v iew as pho to gallery ") ."</a>< /td>";   731                                               <td style= \"padding- left: 10px ;\"><a hre f=\"{$_SER VER['PHP_S ELF']}{$ge t_vars}pag e={$page}& amp;galler y_view=1\" >". _t("_v iew as pho to gallery ") ."</a>< /td>";
732                             }   732                             }
733                    }   733                    }
734                    else   734                    else
735                    {   735                    {
736                             echo "   736                             echo "
737                                               <td>&nbsp; </td>";   737                                               <td>&nbsp; </td>";
738                    }   738                    }
739   ?>   739   ?>
740                                      </tr>   740                                      </tr>
741                             </tabl e>   741                             </tabl e>
742                    </fo rm>   742                    </fo rm>
743   <?   743   <?
744           }   744           }
745     745  
746           $r et = ob_ge t_contents ();   746           $r et = ob_ge t_contents ();
747           ob _end_clean ();   747           ob _end_clean ();
748     748  
749           re turn $ret;   749           re turn $ret;
750   }   750   }
751     751  
752   function g etID( $str , $with_em ail = 1 )   752   function g etID( $str , $with_em ail = 1 )
753   {   753   {
754           if  ( $with_e mail )   754           if  ( $with_e mail )
755           {   755           {
756                    if (  eregi("^[ _.0-9a-z-] +@([0-9a-z ][0-9a-z-] +.)+[a-z]{ 2,4}$", $s tr) )   756                    if (  eregi("^[ _.0-9a-z-] +@([0-9a-z ][0-9a-z-] +.)+[a-z]{ 2,4}$", $s tr) )
757                    {   757                    {
758                             $str =  process_d b_input($s tr);   758                             $str =  process_d b_input($s tr);
759                    $mai l_arr = db _arr( "SEL ECT `ID` F ROM `Profi les` WHERE  `Email` =  '$str'" ) ;   759                    $mai l_arr = db _arr( "SEL ECT `ID` F ROM `Profi les` WHERE  `Email` =  '$str'" ) ;
760                             if ( ( int)$mail_ arr['ID']  )   760                             if ( ( int)$mail_ arr['ID']  )
761                             {   761                             {
762                                      return ( int)$mail_ arr['ID'];   762                                      return ( int)$mail_ arr['ID'];
763                             }   763                             }
764                    }   764                    }
765           }   765           }
766     766  
767       if ( i s_numeric( $str) ) {   767       if ( i s_numeric( $str) ) {
768                    $iID  = (int)db _value( "S ELECT `ID`  FROM `Pro files` WHE RE `ID` =  $str" );   768                    $iID  = (int)db _value( "S ELECT `ID`  FROM `Pro files` WHE RE `ID` =  $str" );
769           }  else {   769           }  else {
770                    $str  = process _db_input( $str);   770                    $str  = process _db_input( $str);
771                    $iID  = (int)db _value( "S ELECT `ID`  FROM `Pro files` WHE RE `NickNa me` = '$st r'" );   771                    $iID  = (int)db _value( "S ELECT `ID`  FROM `Pro files` WHE RE `NickNa me` = '$st r'" );
772           }   772           }
773              773           
774           re turn $iID;   774           re turn $iID;
775   }   775   }
776     776  
777   function c heck_login ( $ID, $pa sswd, $db  = 'Profile s', $error _handle =  true )   777   function c heck_login ( $ID, $pa sswd, $db  = 'Profile s', $error _handle =  true )
778   {   778   {
779           gl obal $site ;   779           gl obal $site ;
780           gl obal $logg ed;   780           gl obal $logg ed;
781           gl obal $_pag e;   781           gl obal $_pag e;
782     782  
783           sw itch( $db  )   783           sw itch( $db  )
784           {   784           {
785                    case  'Profiles ': $member  = 0; brea k;   785                    case  'Profiles ': $member  = 0; brea k;
786                    case  'Admins':  $member =  1; break;   786                    case  'Admins':  $member =  1; break;
787                    case  'aff': $m ember = 2;  break;   787                    case  'aff': $m ember = 2;  break;
788                    case  'moderato rs': $memb er = 3; br eak;   788                    case  'moderato rs': $memb er = 3; br eak;
789           }   789           }
790     790  
791           if  ( 0 == st rcmp( $db,  'Profiles ' ) && !(i nt)$ID )   791           if  ( 0 == st rcmp( $db,  'Profiles ' ) && !(i nt)$ID )
792           {   792           {
793                    if (  $error_ha ndle )   793                    if (  $error_ha ndle )
794                             login_ form( _t(" _PROFILE_E RR"), $mem ber );   794                             login_ form( _t(" _PROFILE_E RR"), $mem ber );
795                    retu rn false;   795                    retu rn false;
796           }   796           }
797     797  
798           if  ( strcmp(  $db, 'Adm ins' ) ==  0 )   798           if  ( strcmp(  $db, 'Adm ins' ) ==  0 )
799           {   799           {
800                    $ID  = process_ db_input(  $ID );   800                    $ID  = process_ db_input(  $ID );
801                    $con d = "`Name ` = '$ID'" ;   801                    $con d = "`Name ` = '$ID'" ;
802           }   802           }
803           el seif ( str cmp( $db,  'Profiles'  ) == 0 )   803           el seif ( str cmp( $db,  'Profiles'  ) == 0 )
804           {   804           {
805                    $ID  = (int)$ID ;   805                    $ID  = (int)$ID ;
806                    $con d = "`ID`  = $ID";   806                    $con d = "`ID`  = $ID";
807           }   807           }
808           el seif ( str cmp( $db,  'moderator s') == 0 )   808           el seif ( str cmp( $db,  'moderator s') == 0 )
809           {   809           {
810                    $ID  = process_ db_input(  $ID );   810                    $ID  = process_ db_input(  $ID );
811                    $con d = "`name ` = '$ID'" ;   811                    $con d = "`name ` = '$ID'" ;
812           }   812           }
813           el se   813           el se
814           {   814           {
815                    if (  is_numeri c($ID) )   815                    if (  is_numeri c($ID) )
816                    {   816                    {
817                             $ID =  (int)$ID;   817                             $ID =  (int)$ID;
818                             $cond  = "`ID` =  " . (int)$ ID;   818                             $cond  = "`ID` =  " . (int)$ ID;
819                    }   819                    }
820                    else if ( strst r($ID, "@" ) )   820                    else if ( strst r($ID, "@" ) )
821                    {   821                    {
822                             $ID =  process_db _input( $I D );   822                             $ID =  process_db _input( $I D );
823                             $cond  = "`email`  = '$ID'";   823                             $cond  = "`email`  = '$ID'";
824                    }   824                    }
825                    else   825                    else
826                    {   826                    {
827                             $ID =  process_db _input( $I D );   827                             $ID =  process_db _input( $I D );
828                             $cond  = "`NickNa me` = '$ID '";   828                             $cond  = "`NickNa me` = '$ID '";
829                    }   829                    }
830           }   830           }
831     831  
832           $q uery = "SE LECT `Pass word` FROM  $db WHERE  $cond";   832           $q uery = "SE LECT `Pass word` FROM  $db WHERE  $cond";
833           $p wd_arr = d b_arr( $qu ery );   833           $p wd_arr = d b_arr( $qu ery );
834     834  
835           //  If no suc h members   835           //  If no suc h members
836           if  ( !$pwd_a rr )   836           if  ( !$pwd_a rr )
837           {   837           {
838                    if (  $error_ha ndle )   838                    if (  $error_ha ndle )
839                             login_ form( _t(" _PROFILE_E RR"), $mem ber );   839                             login_ form( _t(" _PROFILE_E RR"), $mem ber );
840                    retu rn false;   840                    retu rn false;
841           }   841           }
842     842  
843           //  If passwo rd is inco rrect   843           //  If passwo rd is inco rrect
844           $r eal_pwd =  $pwd_arr[' Password'] ;   844           $r eal_pwd =  $pwd_arr[' Password'] ;
845              845           
846           if  ( strcmp(  $real_pwd , $passwd  ) != 0 )   846           if  ( strcmp(  $real_pwd , $passwd  ) != 0 )
847           {   847           {
848                    if (  $error_ha ndle )   848                    if (  $error_ha ndle )
849                             login_ form( _t(" _INVALID_P ASSWD"), $ member );   849                             login_ form( _t(" _INVALID_P ASSWD"), $ member );
850                    retu rn false;   850                    retu rn false;
851           }   851           }
852     852  
853           //  Update la st navigat ion time   853           //  Update la st navigat ion time
854           if  ( !$membe r ) {   854           if  ( !$membe r ) {
855                    $que ry = "UPDA TE $db SET  `DateLast Nav` = NOW () WHERE ` ID` = $ID" ;   855                    $que ry = "UPDA TE $db SET  `DateLast Nav` = NOW () WHERE ` ID` = $ID" ;
856                    retu rn db_res(  $query );   856                    retu rn db_res(  $query );
857           }   857           }
858     858  
859           re turn true;   859           re turn true;
860   }   860   }
861     861  
862   function c heck_logge d(){   862   function c heck_logge d(){
863           gl obal $logg ed;   863           gl obal $logg ed;
864           $a AccTypes =  array(1 = > 'admin',  0 => 'mem ber', 2 =>  'aff', 3  => 'modera tor');   864           $a AccTypes =  array(1 = > 'admin',  0 => 'mem ber', 2 =>  'aff', 3  => 'modera tor');
865           fo reach ($aA ccTypes as  $key => $ value) {   865           fo reach ($aA ccTypes as  $key => $ value) {
866                    if ( $logged[$v alue] = me mber_auth(  $key, fal se )) brea k;   866                    if ( $logged[$v alue] = me mber_auth(  $key, fal se )) brea k;
867           }   867           }
868   }   868   }
869     869  
870   // 0 - mem ber, 1 - a dmin   870   // 0 - mem ber, 1 - a dmin
871   function m ember_auth  ( $member  = 0, $err or_handle  = true, $b Ajx = fals e )   871   function m ember_auth  ( $member  = 0, $err or_handle  = true, $b Ajx = fals e )
872   {   872   {
873           gl obal $site ;   873           gl obal $site ;
874           gl obal $tab;   874           gl obal $tab;
875           gl obal $logg ed;   875           gl obal $logg ed;
876     876  
877           sw itch( $mem ber )   877           sw itch( $mem ber )
878           {   878           {
879                case 0:   879                case 0:
880                             $mem         = 'm ember';   880                             $mem         = 'm ember';
881                             $table       = 'P rofiles';   881                             $table       = 'P rofiles';
882                             $login _page = "{ $site['url ']}member. php";   882                             $login _page = "{ $site['url ']}member. php";
883                break;   883                break;
884                case 1:   884                case 1:
885                             $mem         = 'a dmin';   885                             $mem         = 'a dmin';
886                             $table       = 'A dmins';   886                             $table       = 'A dmins';
887                             $login _page = "{ $site['url _admin']}i ndex.php";   887                             $login _page = "{ $site['url _admin']}i ndex.php";
888                break;   888                break;
889                case 2:   889                case 2:
890                    $mem         =  'aff';   890                    $mem         =  'aff';
891                    $tab le      =  'aff';   891                    $tab le      =  'aff';
892                    $log in_page =  "{$site['u rl_aff']}i ndex.php";   892                    $log in_page =  "{$site['u rl_aff']}i ndex.php";
893                break;   893                break;
894                //   894                //
895                case 3:   895                case 3:
896                    $mem  = 'modera tor';   896                    $mem  = 'modera tor';
897                    $tab le = 'mode rators';   897                    $tab le = 'mode rators';
898                    $log in_page =  "{$site['u rl']}moder ators/inde x.php";   898                    $log in_page =  "{$site['u rl']}moder ators/inde x.php";
899                    brea k;   899                    brea k;
900       }   900       }
901     901  
902       if ( ! $_COOKIE[  $mem . "ID " ] || !$_ COOKIE[ $m em . "Pass word" ] )   902       if ( ! $_COOKIE[  $mem . "ID " ] || !$_ COOKIE[ $m em . "Pass word" ] )
903       {   903       {
904     904  
905           if  ( $error_ handle )   905           if  ( $error_ handle )
906           {   906           {
907               $text = _ t("_LOGIN_ REQUIRED_A E1");   907               $text = _ t("_LOGIN_ REQUIRED_A E1");
908               if ( !$me mber )   908               if ( !$me mber )
909                   $text  .= "<br / >"._t("_LO GIN_REQUIR ED_AE2", $ site['imag es'], $sit e['url'],  $site['tit le']);   909                   $text  .= "<br / >"._t("_LO GIN_REQUIR ED_AE2", $ site['imag es'], $sit e['url'],  $site['tit le']);
910                             $bAjxM ode = ( is set( $_SER VER['HTTP_ X_REQUESTE D_WITH'] )  and $_SER VER['HTTP_ X_REQUESTE D_WITH'] = = 'XMLHttp Request' )  ? true :  false;   910                             $bAjxM ode = ( is set( $_SER VER['HTTP_ X_REQUESTE D_WITH'] )  and $_SER VER['HTTP_ X_REQUESTE D_WITH'] = = 'XMLHttp Request' )  ? true :  false;
911                             if ($m ember=1 &&  $bAjx==tr ue) $bAjxM ode = true ;   911                             if ($m ember=1 &&  $bAjx==tr ue) $bAjxM ode = true ;
912               login_for m( $text,  $member, $ bAjxMode ) ;   912               login_for m( $text,  $member, $ bAjxMode ) ;
913           }   913           }
914           re turn false ;   914           re turn false ;
915       }   915       }
916     916  
917       return  check_log in( $_COOK IE[ $mem .  'ID' ], $ _COOKIE[ $ mem . 'Pas sword' ],  $table, $e rror_handl e );   917       return  check_log in( $_COOK IE[ $mem .  'ID' ], $ _COOKIE[ $ mem . 'Pas sword' ],  $table, $e rror_handl e );
918   }   918   }
919     919  
920   function M emberConta cted( $ID  )   920   function M emberConta cted( $ID  )
921   {   921   {
922           $I D = (int)$ ID;   922           $I D = (int)$ ID;
923           if  ( !$ID )   923           if  ( !$ID )
924                return;   924                return;
925     925  
926           $c _arr = db_ arr( "SELE CT COUNT(* ) FROM `Bo ughtContac ts` WHERE  `IDBuyer`  = $ID" );   926           $c _arr = db_ arr( "SELE CT COUNT(* ) FROM `Bo ughtContac ts` WHERE  `IDBuyer`  = $ID" );
927           re turn $c_ar r[0];   927           re turn $c_ar r[0];
928   }   928   }
929     929  
930   function M emberWasCo ntacted( $ ID )   930   function M emberWasCo ntacted( $ ID )
931   {   931   {
932           $I D = (int)$ ID;   932           $I D = (int)$ ID;
933           if  ( !$ID )   933           if  ( !$ID )
934                return;   934                return;
935     935  
936           $c _arr = db_ arr( "SELE CT COUNT(* ) FROM `Bo ughtContac ts` WHERE  `IDContact ` = $ID" ) ;   936           $c _arr = db_ arr( "SELE CT COUNT(* ) FROM `Bo ughtContac ts` WHERE  `IDContact ` = $ID" ) ;
937           re turn $c_ar r[0];   937           re turn $c_ar r[0];
938   }   938   }
939     939  
940     940  
941   function p rofile_del ete( $ID )   941   function p rofile_del ete( $ID )
942   {   942   {
943           gl obal $MySQ L;   943           gl obal $MySQ L;
944           gl obal $dir;   944           gl obal $dir;
945           gl obal $site ;   945           gl obal $site ;
946           gl obal $logg ed;   946           gl obal $logg ed;
947              947           
948           $I D = (int)$ ID;   948           $I D = (int)$ ID;
949              949           
950           if  ( !$ID )   950           if  ( !$ID )
951                return f alse;   951                return f alse;
952              952           
953           if  ( !getPro fileInfo(  $ID ) )   953           if  ( !getPro fileInfo(  $ID ) )
954                return f alse;   954                return f alse;
955     955  
956           mo dules_del( $ID);   956           mo dules_del( $ID);
957     957  
958           db _res( "DEL ETE FROM ` VKisses` W HERE `ID`  = '{$ID}'  OR `Member ` = '{$ID} '" );   958           db _res( "DEL ETE FROM ` VKisses` W HERE `ID`  = '{$ID}'  OR `Member ` = '{$ID} '" );
959     959  
960           $i PossibleCo upleID = ( int)db_val ue( "SELEC T `ID` FRO M `Profile s` WHERE ` Couple` =  '{$ID}'" ) ;   960           $i PossibleCo upleID = ( int)db_val ue( "SELEC T `ID` FRO M `Profile s` WHERE ` Couple` =  '{$ID}'" ) ;
961           if  ($iPossib leCoupleID )   961           if  ($iPossib leCoupleID )
962                    db_r es( "DELET E FROM `Pr ofiles` WH ERE `ID` =  '{$iPossi bleCoupleI D}'" );   962                    db_r es( "DELET E FROM `Pr ofiles` WH ERE `ID` =  '{$iPossi bleCoupleI D}'" );
963     963  
964           db _res( "DEL ETE FROM ` Profiles`  WHERE `ID`  = '{$ID}' " );   964           db _res( "DEL ETE FROM ` Profiles`  WHERE `ID`  = '{$ID}' " );
965              965           
966           if  ( !mysql_ affected_r ows($GLOBA LS['MySQL' ]->link) )   966           if  ( !mysql_ affected_r ows($GLOBA LS['MySQL' ]->link) )
967                    retu rn false;   967                    retu rn false;
968              968           
969       db_res ( "DELETE  FROM `Bloc kList` WHE RE `ID` =  '{$ID}' OR  `Profile`  = '{$ID}' " );   969       db_res ( "DELETE  FROM `Bloc kList` WHE RE `ID` =  '{$ID}' OR  `Profile`  = '{$ID}' " );
970           db _res( "DEL ETE FROM ` ProfilesTr ack` WHERE  `Member`  = '{$ID}'  OR `Profil e` = '{$ID }'" );   970           db _res( "DEL ETE FROM ` ProfilesTr ack` WHERE  `Member`  = '{$ID}'  OR `Profil e` = '{$ID }'" );
971           db _res( "DEL ETE FROM ` Messages`  WHERE Reci pient = {$ ID} " );   971           db _res( "DEL ETE FROM ` Messages`  WHERE Reci pient = {$ ID} " );
972           db _res( "DEL ETE FROM ` Guestbook`  WHERE Rec ipient = { $ID} " );   972           db _res( "DEL ETE FROM ` Guestbook`  WHERE Rec ipient = { $ID} " );
973           db _res( "DEL ETE FROM ` aff_member s` WHERE i dProfile =  {$ID}" );   973           db _res( "DEL ETE FROM ` aff_member s` WHERE i dProfile =  {$ID}" );
974           db _res( "DEL ETE FROM ` HotList` W HERE ID =  {$ID} OR P rofile = { $ID}" );   974           db _res( "DEL ETE FROM ` HotList` W HERE ID =  {$ID} OR P rofile = { $ID}" );
975           db _res( "DEL ETE FROM ` FriendList ` WHERE ID  = {$ID} O R Profile  = {$ID}" ) ;   975           db _res( "DEL ETE FROM ` FriendList ` WHERE ID  = {$ID} O R Profile  = {$ID}" ) ;
976           db _res( "DEL ETE FROM ` BlockList`  WHERE ID  = {$ID} OR  Profile =  {$ID}" );   976           db _res( "DEL ETE FROM ` BlockList`  WHERE ID  = {$ID} OR  Profile =  {$ID}" );
977           db _res( "DEL ETE FROM ` BoughtCont acts` WHER E `IDBuyer ` = {$ID}  OR `IDCont act` = {$I D}" );   977           db _res( "DEL ETE FROM ` BoughtCont acts` WHER E `IDBuyer ` = {$ID}  OR `IDCont act` = {$I D}" );
978           db _res( "DEL ETE FROM ` ProfileMem Levels` WH ERE `IDMem ber` = {$I D}" );   978           db _res( "DEL ETE FROM ` ProfileMem Levels` WH ERE `IDMem ber` = {$I D}" );
979           db _res( "DEL ETE FROM ` ProfilesPo lls` WHERE  `id_profi le` = {$ID }" );   979           db _res( "DEL ETE FROM ` ProfilesPo lls` WHERE  `id_profi le` = {$ID }" );
980           db _res( "DEL ETE FROM ` Tags` WHER E `ID` = { $ID} AND ` Type` = 'p rofile'" ) ;   980           db _res( "DEL ETE FROM ` Tags` WHER E `ID` = { $ID} AND ` Type` = 'p rofile'" ) ;
981       db_res ( "DELETE  FROM `Grou psMembers`  WHERE `me mberID` =  {$ID}" );   981       db_res ( "DELETE  FROM `Grou psMembers`  WHERE `me mberID` =  {$ID}" );
982     982  
983       // del ete profil e votings   983       // del ete profil e votings
984       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );    984       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' ); 
985       $oVoti ngProfile  = new BxDo lVoting (' profile',  0, 0);   985       $oVoti ngProfile  = new BxDo lVoting (' profile',  0, 0);
986       $oVoti ngProfile- >deleteVot ings ($ID) ;   986       $oVoti ngProfile- >deleteVot ings ($ID) ;
987     987  
988       // del ete profil e comments     988       // del ete profil e comments  
989       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olCmts.php ' );    989       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olCmts.php ' ); 
990       $oCmts  = new BxD olCmts ('p rofile', $ ID);   990       $oCmts  = new BxD olCmts ('p rofile', $ ID);
991       $oCmts ->onObject Delete ();   991       $oCmts ->onObject Delete ();
992       // del ete all co mments in  all commen ts' system s, this us er posted   992       // del ete all co mments in  all commen ts' system s, this us er posted
993       $oCmts ->onAuthor Delete ($I D);   993       $oCmts ->onAuthor Delete ($I D);
994     994  
995           //  Clean cus tomization s   995           //  Clean cus tomization s
996           $c ustomArr =  db_arr( " SELECT `Ba ckgroundFi lename` FR OM `Profil esSettings ` WHERE `I DMember` =  {$ID}" );   996           $c ustomArr =  db_arr( " SELECT `Ba ckgroundFi lename` FR OM `Profil esSettings ` WHERE `I DMember` =  {$ID}" );
997           if  ( strlen( $customArr ['Backgrou ndFilename ']) && fil e_exists($ dir['profi leImage']  . $customA rr['Backgr oundFilena me']) && i s_file($di r['profile Image'] .  $customArr ['Backgrou ndFilename ']) )   997           if  ( strlen( $customArr ['Backgrou ndFilename ']) && fil e_exists($ dir['profi leImage']  . $customA rr['Backgr oundFilena me']) && i s_file($di r['profile Image'] .  $customArr ['Backgrou ndFilename ']) )
998                    unli nk( $dir[' profileIma ge'] . $cu stomArr['B ackgroundF ilename']  );   998                    unli nk( $dir[' profileIma ge'] . $cu stomArr['B ackgroundF ilename']  );
999           db _res( "DEL ETE FROM ` ProfilesSe ttings` WH ERE `IDMem ber` = {$I D}" );   999           db _res( "DEL ETE FROM ` ProfilesSe ttings` WH ERE `IDMem ber` = {$I D}" );
1000              1000           
1001           //  delete me dia   1001           //  delete me dia
1002           $r Media = db _res( "SEL ECT `med_i d`, `med_f ile`, `med _type` FRO M `media`  WHERE `med _prof_id`  = {$ID}" ) ;   1002           $r Media = db _res( "SEL ECT `med_i d`, `med_f ile`, `med _type` FRO M `media`  WHERE `med _prof_id`  = {$ID}" ) ;
1003     1003  
1004       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );   1004       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );
1005           wh ile( $aMed ia = mysql _fetch_ass oc( $rMedi a ) )   1005           wh ile( $aMed ia = mysql _fetch_ass oc( $rMedi a ) )
1006           {   1006           {
1007                    swit ch( $aMedi a['med_typ e'] )   1007                    swit ch( $aMedi a['med_typ e'] )
1008                    {   1008                    {
1009                             case ' photo':   1009                             case ' photo':
1010                                      $medDir  = $dir['pr ofileImage '] . $ID .  "/";   1010                                      $medDir  = $dir['pr ofileImage '] . $ID .  "/";
1011                                      @unlink(  $medDir .  'icon_' .  $aMedia[' med_file']  );   1011                                      @unlink(  $medDir .  'icon_' .  $aMedia[' med_file']  );
1012                                      @unlink(  $medDir .  'photo_'  . $aMedia[ 'med_file' ] );   1012                                      @unlink(  $medDir .  'photo_'  . $aMedia[ 'med_file' ] );
1013                                      @unlink(  $medDir .  'thumb_'  . $aMedia[ 'med_file' ] );   1013                                      @unlink(  $medDir .  'thumb_'  . $aMedia[ 'med_file' ] );
1014                             break;   1014                             break;
1015                             case ' audio':   1015                             case ' audio':
1016                                      $medDir  = $dir['pr ofileSound '] . $ID .  "/";   1016                                      $medDir  = $dir['pr ofileSound '] . $ID .  "/";
1017                                      @unlink(  $medDir .  $aMedia[' med_file']  );   1017                                      @unlink(  $medDir .  $aMedia[' med_file']  );
1018                             break;   1018                             break;
1019                             case ' video':   1019                             case ' video':
1020                                      $medDir  = $dir['pr ofileVideo '] . $ID .  "/";   1020                                      $medDir  = $dir['pr ofileVideo '] . $ID .  "/";
1021                                      @unlink(  $medDir .  $aMedia[' med_file']  );   1021                                      @unlink(  $medDir .  $aMedia[' med_file']  );
1022                             break;   1022                             break;
1023                    }   1023                    }
1024                // delet e media vo ting                  1024                // delet e media vo ting               
1025           $o VotingMedi a->deleteV otings ($a Media['med _id']);   1025           $o VotingMedi a->deleteV otings ($a Media['med _id']);
1026           }   1026           }
1027           $a Mem = arra y();   1027           $a Mem = arra y();
1028           $a Media = ar ray('photo ','music', 'video');   1028           $a Media = ar ray('photo ','music', 'video');
1029           fo reach ($aM edia as $s Val) {   1029           fo reach ($aM edia as $s Val) {
1030                    $oMe dia = new  BxDolShare dMedia($sV al, $site,  $dir, $aM em);   1030                    $oMe dia = new  BxDolShare dMedia($sV al, $site,  $dir, $aM em);
1031                    $oMe dia->delet eUserGalle ry($ID, $l ogged);   1031                    $oMe dia->delet eUserGalle ry($ID, $l ogged);
1032           }   1032           }
1033              1033           
1034           db _res( "DEL ETE FROM ` media` WHE RE `med_pr of_id` = { $ID}" );   1034           db _res( "DEL ETE FROM ` media` WHE RE `med_pr of_id` = { $ID}" );
1035              1035           
1036           @r mdir( $dir ['profileI mage'] . $ ID );   1036           @r mdir( $dir ['profileI mage'] . $ ID );
1037           @r mdir( $dir ['profileV ideo'] . $ ID );   1037           @r mdir( $dir ['profileV ideo'] . $ ID );
1038           @r mdir( $dir ['profileS ound'] . $ ID );   1038           @r mdir( $dir ['profileS ound'] . $ ID );
1039              1039           
1040              1040           
1041           // Clean blog s   1041           // Clean blog s
1042           $a Blog = db_ arr("SELEC T `ID` FRO M `Blogs`  WHERE `Own erID` = {$ ID}");   1042           $a Blog = db_ arr("SELEC T `ID` FRO M `Blogs`  WHERE `Own erID` = {$ ID}");
1043           $i BlogID = $ aBlog['ID' ];   1043           $i BlogID = $ aBlog['ID' ];
1044           if  ($iBlogID >0) {   1044           if  ($iBlogID >0) {
1045                    //Cl ean blogs   1045                    //Cl ean blogs
1046                    $oBl ogs = new  BxDolBlogs (TRUE);   1046                    $oBl ogs = new  BxDolBlogs (TRUE);
1047                    $oBl ogs->bAdmi nMode = TR UE;   1047                    $oBl ogs->bAdmi nMode = TR UE;
1048                    (int )$_REQUEST ['DeleteBl ogID'] = $ iBlogID;   1048                    (int )$_REQUEST ['DeleteBl ogID'] = $ iBlogID;
1049                    $oBl ogs->Actio nDeleteBlo gSQL();   1049                    $oBl ogs->Actio nDeleteBlo gSQL();
1050           }   1050           }
1051     1051  
1052           // delete use r classifi eds   1052           // delete use r classifi eds
1053           $o Classified s = new Bx DolClassif ieds();   1053           $o Classified s = new Bx DolClassif ieds();
1054           $o Classified s->bAdminM ode = TRUE ;   1054           $o Classified s->bAdminM ode = TRUE ;
1055           $o Classified s->DeleteP rofileAdve rtisement( $ID);   1055           $o Classified s->DeleteP rofileAdve rtisement( $ID);
1056     1056  
1057           // delete use r events   1057           // delete use r events
1058           $o Events = n ew BxDolEv ents();   1058           $o Events = n ew BxDolEv ents();
1059           $o Events->bA dminMode =  TRUE;   1059           $o Events->bA dminMode =  TRUE;
1060           $o Events->De leteProfil eEvents($I D);   1060           $o Events->De leteProfil eEvents($I D);
1061     1061  
1062           // delete cac he file   1062           // delete cac he file
1063           $s CacheFile  = BX_DIREC TORY_PATH_ CACHE . 'u ser' . $ID  . '.php';   1063           $s CacheFile  = BX_DIREC TORY_PATH_ CACHE . 'u ser' . $ID  . '.php';
1064           @u nlink( $sC acheFile ) ;   1064           @u nlink( $sC acheFile ) ;
1065           re parseObjTa gs( 'profi le', $ID ) ;   1065           re parseObjTa gs( 'profi le', $ID ) ;
1066   }   1066   }
1067     1067  
1068   function p rofile_sen d_message(  $ID, $mes sage )   1068   function p rofile_sen d_message(  $ID, $mes sage )
1069   {   1069   {
1070           gl obal $site ;   1070           gl obal $site ;
1071     1071  
1072           if  ( !(int)$ ID )   1072           if  ( !(int)$ ID )
1073                return f alse;   1073                return f alse;
1074     1074  
1075           if  ( !strlen ( $message  ) )   1075           if  ( !strlen ( $message  ) )
1076                return f alse;   1076                return f alse;
1077     1077  
1078           $p _arr = get ProfileInf o( $ID );  //db_arr(  "SELECT `I D`, `Email ` FROM `Pr ofiles` WH ERE `ID` =  '$ID'" );   1078           $p _arr = get ProfileInf o( $ID );  //db_arr(  "SELECT `I D`, `Email ` FROM `Pr ofiles` WH ERE `ID` =  '$ID'" );
1079     1079  
1080           if  ( !$p_arr  )   1080           if  ( !$p_arr  )
1081                return f alse;   1081                return f alse;
1082     1082  
1083           $t ext = getP aram("t_Ad minEmail") ;   1083           $t ext = getP aram("t_Ad minEmail") ;
1084           $s ubject = g etParam("t _AdminEmai l_subject" );   1084           $s ubject = g etParam("t _AdminEmai l_subject" );
1085     1085  
1086           $r ecipient =  $p_arr['E mail'];   1086           $r ecipient =  $p_arr['E mail'];
1087     1087  
1088           $a Plus = arr ay();   1088           $a Plus = arr ay();
1089           $a Plus['Mess ageText']  = "\r\n$me ssage\r\n" ;   1089           $a Plus['Mess ageText']  = "\r\n$me ssage\r\n" ;
1090     1090  
1091           $m ail_ret =  sendMail(  $recipient , $subject , $text, $ p_arr['ID' ], $aPlus  );   1091           $m ail_ret =  sendMail(  $recipient , $subject , $text, $ p_arr['ID' ], $aPlus  );
1092     1092  
1093           if  ( !$mail_ ret )   1093           if  ( !$mail_ ret )
1094                return f alse;   1094                return f alse;
1095           re turn true;   1095           re turn true;
1096   }   1096   }
1097     1097  
1098   function g et_user_on line_statu s ($ID)   1098   function g et_user_on line_statu s ($ID)
1099   {   1099   {
1100           $I D = (int)$ ID;   1100           $I D = (int)$ ID;
1101           $m in = getPa ram( "memb er_online_ time" );   1101           $m in = getPa ram( "memb er_online_ time" );
1102           $o nl_arr = d b_arr("SEL ECT count( ID) as cou nt_id FROM  Profiles  WHERE Date LastNav >  SUBDATE(NO W(), INTER VAL $min M INUTE) AND  ID=$ID");   1102           $o nl_arr = d b_arr("SEL ECT count( ID) as cou nt_id FROM  Profiles  WHERE Date LastNav >  SUBDATE(NO W(), INTER VAL $min M INUTE) AND  ID=$ID");
1103           re turn (int) ( $onl_arr [count_id]  == 1 );   1103           re turn (int) ( $onl_arr [count_id]  == 1 );
1104   }   1104   }
1105     1105  
1106     1106  
1107   /**   1107   /**
1108     * who   1108     * who
1109     *   0 -  all   1109     *   0 -  all
1110     *   1 -  man   1110     *   1 -  man
1111     *   2 -  woman   1111     *   2 -  woman
1112     **/   1112     **/
1113   function g et_users_o nline_numb er ( $who  = 0, $coun try = "")   1113   function g et_users_o nline_numb er ( $who  = 0, $coun try = "")
1114   {   1114   {
1115           if  ( !$who )  $who = '' ;   1115           if  ( !$who )  $who = '' ;
1116     1116  
1117           $m in = getPa ram( "memb er_online_ time" );   1117           $m in = getPa ram( "memb er_online_ time" );
1118           sw itch ( $wh o )   1118           sw itch ( $wh o )
1119           {   1119           {
1120                    // c hatting   1120                    // c hatting
1121                    case  't':   1121                    case  't':
1122                    case  'T':   1122                    case  'T':
1123                             $onl_a rr = db_ar r("SELECT   count(DIS TINCTROW I DFrom) AS  count_onl  FROM IMess ages  WHER E `When` >  SUBDATE(N OW(), INTE RVAL $min  MINUTE)");   1123                             $onl_a rr = db_ar r("SELECT   count(DIS TINCTROW I DFrom) AS  count_onl  FROM IMess ages  WHER E `When` >  SUBDATE(N OW(), INTE RVAL $min  MINUTE)");
1124                             break;   1124                             break;
1125                    // M embers wit h non stan dart membe rship   1125                    // M embers wit h non stan dart membe rship
1126                    case  'g':   1126                    case  'g':
1127                    case  'G':   1127                    case  'G':
1128                             $onl_a rr = db_ar r( "SELECT       COUN T(DISTINCT  IDMember)  AS count_ onl   1128                             $onl_a rr = db_ar r( "SELECT       COUN T(DISTINCT  IDMember)  AS count_ onl
1129                                                                         FROM     ProfileM emLevels   1129                                                                         FROM     ProfileM emLevels
1130                                                                         INNER  JOIN Profi les ON Pro files.ID =  ProfileMe mLevels.ID Member   1130                                                                         INNER  JOIN Profi les ON Pro files.ID =  ProfileMe mLevels.ID Member
1131                                                                         WHERE   1131                                                                         WHERE
1132                                                                                  (DateExp ires IS NU LL OR Date Expires >  NOW()) AND   1132                                                                                  (DateExp ires IS NU LL OR Date Expires >  NOW()) AND
1133                                                                                  (DateSta rts IS NUL L OR DateS tarts <= N OW()) AND   1133                                                                                  (DateSta rts IS NUL L OR DateS tarts <= N OW()) AND
1134                                                                                  (Profile s.Status =  'Active')  AND   1134                                                                                  (Profile s.Status =  'Active')  AND
1135                                                                                  (DateLas tNav > SUB DATE(NOW() , INTERVAL  $min MINU TE))" );   1135                                                                                  (DateLas tNav > SUB DATE(NOW() , INTERVAL  $min MINU TE))" );
1136                             break;   1136                             break;
1137                    // f rom countr y   1137                    // f rom countr y
1138                    case  'c':   1138                    case  'c':
1139                    case  'C':   1139                    case  'C':
1140                             $count ry = proce ss_db_inpu t($country );   1140                             $count ry = proce ss_db_inpu t($country );
1141                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND `Countr y` = '$cou ntry' AND  DateLastNa v > SUBDAT E(NOW(), I NTERVAL $m in MINUTE) ");   1141                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND `Countr y` = '$cou ntry' AND  DateLastNa v > SUBDAT E(NOW(), I NTERVAL $m in MINUTE) ");
1142                             break;   1142                             break;
1143                    // m en   1143                    // m en
1144                    case  'm':   1144                    case  'm':
1145                    case  'M':   1145                    case  'M':
1146                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND Sex='ma le' AND Da teLastNave  > SUBDATE (NOW(), IN TERVAL $mi n MINUTE)" );   1146                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND Sex='ma le' AND Da teLastNave  > SUBDATE (NOW(), IN TERVAL $mi n MINUTE)" );
1147                             break;   1147                             break;
1148                    // m omen   1148                    // m omen
1149                    case  'w':   1149                    case  'w':
1150                    case  'W':   1150                    case  'W':
1151                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND Sex='fe male' AND  DateLastNa ve > SUBDA TE(NOW(),  INTERVAL $ min MINUTE )");   1151                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND Sex='fe male' AND  DateLastNa ve > SUBDA TE(NOW(),  INTERVAL $ min MINUTE )");
1152                             break;   1152                             break;
1153                    // a ll   1153                    // a ll
1154                    defa ult:   1154                    defa ult:
1155                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND DateLas tNave > SU BDATE(NOW( ), INTERVA L $min MIN UTE)");   1155                             $onl_a rr = db_ar r("SELECT  count(ID)  as count_o nl FROM Pr ofiles WHE RE Status= 'Active' A ND DateLas tNave > SU BDATE(NOW( ), INTERVA L $min MIN UTE)");
1156                             break;   1156                             break;
1157           }   1157           }
1158           re turn (int) $onl_arr[' count_onl' ];   1158           re turn (int) $onl_arr[' count_onl' ];
1159   }   1159   }
1160     1160  
1161   function g et_users_o nline_res  ( $lim = 0  )   1161   function g et_users_o nline_res  ( $lim = 0  )
1162   {   1162   {
1163           if  ( !$lim )   1163           if  ( !$lim )
1164                    $lim  = getPara m( "defaul t_online_u sers_num"  );   1164                    $lim  = getPara m( "defaul t_online_u sers_num"  );
1165           $m in = getPa ram( "memb er_online_ time" );   1165           $m in = getPa ram( "memb er_online_ time" );
1166     1166  
1167           re turn db_re s("SELECT  ID, NickNa me FROM Pr ofiles WHE RE Status= 'Active' A ND DateLas tNave > SU BDATE(NOW( ), INTERVA L $min MIN UTE) ORDER  BY DateLa stNave DES C LIMIT $l im");   1167           re turn db_re s("SELECT  ID, NickNa me FROM Pr ofiles WHE RE Status= 'Active' A ND DateLas tNave > SU BDATE(NOW( ), INTERVA L $min MIN UTE) ORDER  BY DateLa stNave DES C LIMIT $l im");
1168   }   1168   }
1169     1169  
1170   function A ddNotifyEm ail ( $ema il,  $Name  = "", $Em ailFlag =  "NotifyMe" , $EmailTe xt = "HTML " )   1170   function A ddNotifyEm ail ( $ema il,  $Name  = "", $Em ailFlag =  "NotifyMe" , $EmailTe xt = "HTML " )
1171   {   1171   {
1172           $e mail = pro cess_db_in put(trim($ email));   1172           $e mail = pro cess_db_in put(trim($ email));
1173           $N ame = proc ess_db_inp ut($Name);   1173           $N ame = proc ess_db_inp ut($Name);
1174     1174  
1175           if  ( !strlen ($email) | | !strstr( $email,"@" ) || !strs tr($email, ".") )   1175           if  ( !strlen ($email) | | !strstr( $email,"@" ) || !strs tr($email, ".") )
1176                    retu rn 0;   1176                    retu rn 0;
1177     1177  
1178           $a rr = db_ar r("SELECT  ID FROM Pr ofiles WHE RE Email L IKE '$emai l' LIMIT 1 ");   1178           $a rr = db_ar r("SELECT  ID FROM Pr ofiles WHE RE Email L IKE '$emai l' LIMIT 1 ");
1179           if  ( $arr['I D'] )   1179           if  ( $arr['I D'] )
1180                    retu rn 0;   1180                    retu rn 0;
1181     1181  
1182           $a rr = db_ar r("SELECT  ID FROM No tifyEmails  WHERE Ema il LIKE '$ email' LIM IT 1");   1182           $a rr = db_ar r("SELECT  ID FROM No tifyEmails  WHERE Ema il LIKE '$ email' LIM IT 1");
1183           if  ( $arr['I D'] )   1183           if  ( $arr['I D'] )
1184                    retu rn 0;   1184                    retu rn 0;
1185     1185  
1186           re turn db_re s("INSERT  INTO Notif yEmails SE T Email =  '$email',  Name = '$N ame', Emai lFlag = '$ EmailFlag' , EmailTex t = '$Emai lText'");   1186           re turn db_re s("INSERT  INTO Notif yEmails SE T Email =  '$email',  Name = '$N ame', Emai lFlag = '$ EmailFlag' , EmailTex t = '$Emai lText'");
1187   }   1187   }
1188     1188  
1189   function R eplace_Var s( $path,  $target, $ value )   1189   function R eplace_Var s( $path,  $target, $ value )
1190   {   1190   {
1191     1191  
1192       $conte nt = array ();   1192       $conte nt = array ();
1193     1193  
1194       $f = f open ( $pa th, "r" );   1194       $f = f open ( $pa th, "r" );
1195     1195  
1196       while  (!feof ($f )) { $temp l .= fgets ($f, 4096) ; }   1196       while  (!feof ($f )) { $temp l .= fgets ($f, 4096) ; }
1197     1197  
1198       fclose  ( $f );   1198       fclose  ( $f );
1199     1199  
1200       $conte nt = explo de("\n", $ templ);   1200       $conte nt = explo de("\n", $ templ);
1201     1201  
1202   //------ R EPLACEMENT  ========= ========== ========== ========== =========   1202   //------ R EPLACEMENT  ========= ========== ========== ========== =========
1203       for ($ i = 0; $i  < count($c ontent); $ i++ )   1203       for ($ i = 0; $i  < count($c ontent); $ i++ )
1204       {   1204       {
1205           $t  = $conten t[$i];   1205           $t  = $conten t[$i];
1206           if  ( preg_ma tch("/^\\" .$target." \s/", $t)  )   1206           if  ( preg_ma tch("/^\\" .$target." \s/", $t)  )
1207           {   1207           {
1208                $content [$i] = $ta rget . $va lue;   1208                $content [$i] = $ta rget . $va lue;
1209           }   1209           }
1210       }   1210       }
1211     1211  
1212   //------ R ECORD ==== ========== ========== ========== ========== =========   1212   //------ R ECORD ==== ========== ========== ========== ========== =========
1213       $f = f open ( $pa th, "w" );   1213       $f = f open ( $pa th, "w" );
1214       for ($ i = 0; $i  < count($c ontent)-1;  $i++ )   1214       for ($ i = 0; $i  < count($c ontent)-1;  $i++ )
1215       {   1215       {
1216           fw rite($f,"$ content[$i ]"."\n");   1216           fw rite($f,"$ content[$i ]"."\n");
1217       }   1217       }
1218     1218  
1219       fwrite ($f,"$cont ent[$i]");   1219       fwrite ($f,"$cont ent[$i]");
1220     1220  
1221       fclose  ( $f );   1221       fclose  ( $f );
1222     1222  
1223       return  true;   1223       return  true;
1224   }   1224   }
1225     1225  
1226   ?>   1226   ?>