47. File Comparison Report

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

47.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.1\inc design.inc.php Sun May 11 13:17:00 2008 UTC
2 Dolphin-v.6.1.2\inc design.inc.php Wed May 28 09:31:21 2008 UTC

47.2 Comparison summary

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

47.3 Comparison options

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

47.4 Active regular expressions

No regular expressions were active.

47.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 . 'a dmin.inc.p hp' );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php'  );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php'  );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'b anners.inc .php' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'b anners.inc .php' );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embership_ levels.inc .php' );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embership_ levels.inc .php' );
27   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p arams.inc. php' );   27   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p arams.inc. php' );
28   require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php');   28   require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php');
29   require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php');   29   require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php');
30   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxRSS.p hp');   30   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxRSS.p hp');
31     31  
32   require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /functions .php" );   32   require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /functions .php" );
33   require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /BxTemplMe nu.php" );   33   require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /BxTemplMe nu.php" );
34     34  
35   //require_ once( 'mod ules/heade r.inc.php'  );   35   //require_ once( 'mod ules/heade r.inc.php'  );
36     36  
37     37  
38     38  
39   $db_color_ index = 0;   39   $db_color_ index = 0;
40     40  
41   $_page['js '] = 1;   41   $_page['js '] = 1;
42     42  
43   /**   43   /**
44    * Put spa cer code   44    * Put spa cer code
45    *  $width   - width  if spacer  in pixels   45    *  $width   - width  if spacer  in pixels
46    *  $heigh t - height  of spacer  in pixels   46    *  $heigh t - height  of spacer  in pixels
47    **/   47    **/
48     48  
49   function s pacer( $wi dth, $heig ht )   49   function s pacer( $wi dth, $heig ht )
50   {   50   {
51       global  $site;   51       global  $site;
52     52  
53       return  '<img src ="' . $sit e['images' ] . 'space r.gif" wid th="' . $w idth . '"  height="'  . $height  . '" alt=" " />';   53       return  '<img src ="' . $sit e['images' ] . 'space r.gif" wid th="' . $w idth . '"  height="'  . $height  . '" alt=" " />';
54   }   54   }
55     55  
56   /**   56   /**
57    * Put att ention cod e   57    * Put att ention cod e
58    *  $str -  attention  text   58    *  $str -  attention  text
59    **/   59    **/
60   function a ttention(  $str )   60   function a ttention(  $str )
61   {   61   {
62       global  $site;   62       global  $site;
63   ?>   63   ?>
64   <table cel lspacing=" 2" cellpad ding="1">   64   <table cel lspacing=" 2" cellpad ding="1">
65       <tr>   65       <tr>
66           <t d valign=" top">   66           <t d valign=" top">
67                <img src ="<?= $sit e['icons']  ?>sign.gi f" alt=""  />   67                <img src ="<?= $sit e['icons']  ?>sign.gi f" alt=""  />
68           </ td>   68           </ td>
69           <t d valign=" top">   69           <t d valign=" top">
70                <table c ellspacing ="0" cellp adding="2"  class="te xt">   70                <table c ellspacing ="0" cellp adding="2"  class="te xt">
71                    <tr>   71                    <tr>
72                         <td valign ="top" ali gn="justif y"><?= $st r ?></td>   72                         <td valign ="top" ali gn="justif y"><?= $st r ?></td>
73                    </tr >   73                    </tr >
74                </table>   74                </table>
75           </ td>   75           </ td>
76       </tr>   76       </tr>
77   </table>   77   </table>
78   <?   78   <?
79   }   79   }
80     80  
81   /**   81   /**
82    * Put des ign progre ss bar cod e   82    * Put des ign progre ss bar cod e
83    *  $text      - prog ress bar t ext   83    *  $text      - prog ress bar t ext
84    *  $width     - widt h of progr ess bar in  pixels   84    *  $width     - widt h of progr ess bar in  pixels
85    *  $max_p os  - maxi mal positi on of prog ress bar   85    *  $max_p os  - maxi mal positi on of prog ress bar
86    *  $curr_ pos - curr ent positi on of prog ress bar   86    *  $curr_ pos - curr ent positi on of prog ress bar
87    **/   87    **/
88   function D esignProgr essPos ( $ text, $wid th, $max_p os, $curr_ pos, $prog ress_num =  '1' )   88   function D esignProgr essPos ( $ text, $wid th, $max_p os, $curr_ pos, $prog ress_num =  '1' )
89   {   89   {
90       if( $m ax_pos )   90       if( $m ax_pos )
91           $p ercent = $ curr_pos *  100 / $ma x_pos;   91           $p ercent = $ curr_pos *  100 / $ma x_pos;
92       else   92       else
93           $p ercent = 0 ;   93           $p ercent = 0 ;
94          94       
95       return  DesignPro gress( $te xt, $width , $percent , $progres s_num );   95       return  DesignPro gress( $te xt, $width , $percent , $progres s_num );
96   }   96   }
97     97  
98   /**   98   /**
99    * Put des ign progre ss bar cod e   99    * Put des ign progre ss bar cod e
100    *  $text      - prog ress bar t ext   100    *  $text      - prog ress bar t ext
101    *  $width     - widt h of progr ess bar in  pixels   101    *  $width     - widt h of progr ess bar in  pixels
102    *  $perce nt  - curr ent positi on of prog ress bar i n percents   102    *  $perce nt  - curr ent positi on of prog ress bar i n percents
103    **/   103    **/
104   function D esignProgr ess ( $tex t, $width,  $percent,  $progress _num, $id  = ''  )   104   function D esignProgr ess ( $tex t, $width,  $percent,  $progress _num, $id  = ''  )
105   {   105   {
106       global  $site;   106       global  $site;
107          107       
108       $ret =  "";   108       $ret =  "";
109       $ret . = '<div cl ass="rate_ block" sty le="width: ' . $width  . 'px;">' ;   109       $ret . = '<div cl ass="rate_ block" sty le="width: ' . $width  . 'px;">' ;
110           $r et .= '<di v class="r ate_text"'  . ( $id ?  " id=\"{$ id}_text\" " : '' ) .  '>';   110           $r et .= '<di v class="r ate_text"'  . ( $id ?  " id=\"{$ id}_text\" " : '' ) .  '>';
111                $ret .=  $text;   111                $ret .=  $text;
112           $r et .= '</d iv>';   112           $r et .= '</d iv>';
113           $r et .= '<di v class="r ate_scale" ' . ( $id  ? " id=\"{ $id}_scale \"" : '' )  . '>';   113           $r et .= '<di v class="r ate_scale" ' . ( $id  ? " id=\"{ $id}_scale \"" : '' )  . '>';
114                $ret .=  '<div' . (  $id ? " i d=\"{$id}_ bar\"" : ' ' ) . ' st yle="posit ion:relati ve; height :10px; fon t-size:1px ; width:'  . round($p ercent) .  '%; backgr ound-image :url(' . g etTemplate Icon("scal e_index_{$ progress_n um}.gif")  . '); back ground-rep eat:repeat -x;"></div >';   114                $ret .=  '<div' . (  $id ? " i d=\"{$id}_ bar\"" : ' ' ) . ' st yle="posit ion:relati ve; height :10px; fon t-size:1px ; width:'  . round($p ercent) .  '%; backgr ound-image :url(' . g etTemplate Icon("scal e_index_{$ progress_n um}.gif")  . '); back ground-rep eat:repeat -x;"></div >';
115           $r et .= '</d iv>';   115           $r et .= '</d iv>';
116       $ret . = '</div>' ;   116       $ret . = '</div>' ;
117     117  
118       return  $ret;   118       return  $ret;
119   }   119   }
120     120  
121     121  
122   // design  box   122   // design  box
123   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_0.htm l" );   123   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_0.htm l" );
124   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _0.html",  "r" );   124   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _0.html",  "r" );
125   $templ_des ignbox0 =  fread ( $f , $fs );   125   $templ_des ignbox0 =  fread ( $f , $fs );
126   fclose ( $ f );   126   fclose ( $ f );
127     127  
128   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_1.htm l" );   128   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_1.htm l" );
129   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _1.html",  "r" );   129   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _1.html",  "r" );
130   $templ_des ignbox1 =  fread ( $f , $fs );   130   $templ_des ignbox1 =  fread ( $f , $fs );
131   fclose ( $ f );   131   fclose ( $ f );
132     132  
133   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_2.htm l" );   133   $fs = file size ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_2.htm l" );
134   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _2.html",  "r" );   134   $f = fopen  ( "{$dir[ 'root']}te mplates/tm pl_{$tmpl} /designbox _2.html",  "r" );
135   $templ_des ignbox2 =  fread ( $f , $fs );   135   $templ_des ignbox2 =  fread ( $f , $fs );
136   fclose ( $ f );   136   fclose ( $ f );
137     137  
138     138  
139   /**   139   /**
140    * Put "de sign box"  HTML code   140    * Put "de sign box"  HTML code
141    *  $title         -  title text   141    *  $title         -  title text
142    *  $width         -  width in p ixels   142    *  $width         -  width in p ixels
143    *  $heigh t       -  height in  pixels   143    *  $heigh t       -  height in  pixels
144    *  $align         -  align or o ther <td>  formatter   144    *  $align         -  align or o ther <td>  formatter
145    *                    for exampl e: "align= center"   145    *                    for exampl e: "align= center"
146    * $db_num         -  number of  design box  template  (for "act"  skin only )   146    * $db_num         -  number of  design box  template  (for "act"  skin only )
147    **/   147    **/
148   function D esignBoxCo ntent ( $t itle, $con tent, $db_ num = 0, $ caption_it em = '' )   148   function D esignBoxCo ntent ( $t itle, $con tent, $db_ num = 0, $ caption_it em = '' )
149   {   149   {
150       global  $site;   150       global  $site;
151       global  $templ_de signbox0;   151       global  $templ_de signbox0;
152       global  $templ_de signbox1;   152       global  $templ_de signbox1;
153       global  $templ_de signbox2;   153       global  $templ_de signbox2;
154       global  $dbh_lett ers;   154       global  $dbh_lett ers;
155       global  $tmpl;   155       global  $tmpl;
156     156  
157       switch  ($dbh_let ters)   157       switch  ($dbh_let ters)
158       {   158       {
159           ca se "upper" : $f = "st rtoupper";  break;   159           ca se "upper" : $f = "st rtoupper";  break;
160           ca se "lower" : $f = "st rtolower";  break;   160           ca se "lower" : $f = "st rtolower";  break;
161           ca se "fupper ": $f = "u cfirst"; b reak;   161           ca se "fupper ": $f = "u cfirst"; b reak;
162           ca se "aupper ": $f = "u cwords"; b reak;   162           ca se "aupper ": $f = "u cwords"; b reak;
163           de fault: $f  = "sprintf ";   163           de fault: $f  = "sprintf ";
164       }   164       }
165     165  
166     166  
167       if ( s trlen($hei ght) ) $he ight = " h eight=\"$h eight\" ";   167       if ( s trlen($hei ght) ) $he ight = " h eight=\"$h eight\" ";
168     168  
169       if ($d b_num == 2 ) // && !$ templ_desi gnbox2 )   169       if ($d b_num == 2 ) // && !$ templ_desi gnbox2 )
170       {   170       {
171           $t empl = $te mpl_design box2;   171           $t empl = $te mpl_design box2;
172       }   172       }
173       elseif ( $db_num  == 1) // & & !$templ_ designbox1  )   173       elseif ( $db_num  == 1) // & & !$templ_ designbox1  )
174       {   174       {
175           $t empl = $te mpl_design box1;   175           $t empl = $te mpl_design box1;
176       }   176       }
177       else// if( !$temp l_designbo x0 )   177       else// if( !$temp l_designbo x0 )
178       {   178       {
179           $t empl = $te mpl_design box0;   179           $t empl = $te mpl_design box0;
180       }   180       }
181     181  
182       // rep lace path  to the ima ges   182       // rep lace path  to the ima ges
183       $s = $ site['imag es'];   183       $s = $ site['imag es'];
184       $s = s tr_replace  ( $site[' url'], "",  $site['im ages'] );   184       $s = s tr_replace  ( $site[' url'], "",  $site['im ages'] );
185       $templ  = str_rep lace ( $s,  $site['im ages'], $t empl );   185       $templ  = str_rep lace ( $s,  $site['im ages'], $t empl );
186     186  
187       // rep lace templ ate variab les   187       // rep lace templ ate variab les
188       $templ  = str_rep lace ( "__ title__",  $f($title) , $templ ) ;   188       $templ  = str_rep lace ( "__ title__",  $f($title) , $templ ) ;
189       $templ  = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ;   189       $templ  = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ;
190       $templ  = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ;   190       $templ  = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ;
191       $templ  = str_rep lace ( "__ images__",  $site['im ages'], $t empl );   191       $templ  = str_rep lace ( "__ images__",  $site['im ages'], $t empl );
192       if ( f unction_ex ists( 'col ors_select ' ) )   192       if ( f unction_ex ists( 'col ors_select ' ) )
193           $t empl = str _replace (  "__design BoxColor__ ", colors_ select(),  $templ );   193           $t empl = str _replace (  "__design BoxColor__ ", colors_ select(),  $templ );
194     194  
195       if ($t mpl == 'ac t')   195       if ($t mpl == 'ac t')
196       {   196       {
197           if  ($index_d b_color_ra ndomize ==  1)   197           if  ($index_d b_color_ra ndomize ==  1)
198           {   198           {
199                $templ =  str_repla ce ( "__db _color__",  get_activ e_color(),  $templ );   199                $templ =  str_repla ce ( "__db _color__",  get_activ e_color(),  $templ );
200           }   200           }
201           el se   201           el se
202           {   202           {
203                 $templ  = str_repl ace ( "__d b_color__" , $index_d b_color, $ templ );   203                 $templ  = str_repl ace ( "__d b_color__" , $index_d b_color, $ templ );
204           }   204           }
205       }   205       }
206     206  
207       return   $templ;   207       return   $templ;
208   }   208   }
209     209  
210     210  
211   /**   211   /**
212    * Put "de sign box"  with borde r HTML cod e   212    * Put "de sign box"  with borde r HTML cod e
213    *  $title         -  title text   213    *  $title         -  title text
214    *  $width         -  width in p ixels   214    *  $width         -  width in p ixels
215    *  $heigh t       -  height in  pixels   215    *  $heigh t       -  height in  pixels
216    *  $align         -  align or o ther <td>  formatter   216    *  $align         -  align or o ther <td>  formatter
217    *                    for exampl e: "align= center"   217    *                    for exampl e: "align= center"
218    **/   218    **/
219   function D esignBoxCo ntentBorde r ( $title , $content , $caption _item='' )   219   function D esignBoxCo ntentBorde r ( $title , $content , $caption _item='' )
220   {   220   {
221       global  $site;   221       global  $site;
222       global  $dir;   222       global  $dir;
223       global  $tmpl;   223       global  $tmpl;
224       global  $service_ db_color;   224       global  $service_ db_color;
225     225  
226       global  $dbh_lett ers;   226       global  $dbh_lett ers;
227     227  
228       switch  ($dbh_let ters)   228       switch  ($dbh_let ters)
229       {   229       {
230           ca se "upper" : $f_case  = "strtoup per"; brea k;   230           ca se "upper" : $f_case  = "strtoup per"; brea k;
231           ca se "lower" : $f_case  = "strtolo wer"; brea k;   231           ca se "lower" : $f_case  = "strtolo wer"; brea k;
232           ca se "fupper ": $f_case  = "ucfirs t"; break;   232           ca se "fupper ": $f_case  = "ucfirs t"; break;
233           ca se "aupper ": $f_case  = "ucword s"; break;   233           ca se "aupper ": $f_case  = "ucword s"; break;
234           de fault: $f_ case = "sp rintf";   234           de fault: $f_ case = "sp rintf";
235       }   235       }
236     236  
237       // des ign box wi th border:  reading t emplate   237       // des ign box wi th border:  reading t emplate
238       $fs =  filesize (  "{$dir['r oot']}temp lates/tmpl _{$tmpl}/d esignbox_b order.html " );   238       $fs =  filesize (  "{$dir['r oot']}temp lates/tmpl _{$tmpl}/d esignbox_b order.html " );
239       $f = f open ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_borde r.html", " r" );   239       $f = f open ( "{$ dir['root' ]}template s/tmpl_{$t mpl}/desig nbox_borde r.html", " r" );
240       $templ _designbox _border =  fread ( $f , $fs );   240       $templ _designbox _border =  fread ( $f , $fs );
241       fclose  ( $f );   241       fclose  ( $f );
242     242  
243     243  
244       $templ  = $templ_ designbox_ border;   244       $templ  = $templ_ designbox_ border;
245     245  
246       // rep lace templ ate variab les   246       // rep lace templ ate variab les
247       $templ  = str_rep lace ( "__ title__",  $f_case($t itle), $te mpl );   247       $templ  = str_rep lace ( "__ title__",  $f_case($t itle), $te mpl );
248       $templ  = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ;   248       $templ  = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ;
249       $templ  = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ;   249       $templ  = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ;
250     250  
251       return   $templ;   251       return   $templ;
252   }   252   }
253     253  
254     254  
255   // array o f top and  bottom lin ks   255   // array o f top and  bottom lin ks
256   $aMainLink s = array(   256   $aMainLink s = array(
257       'Home'          = > array( ' href' => ' index.php' ,        ' Title' =>  '_Home' ),   257       'Home'          = > array( ' href' => ' index.php' ,        ' Title' =>  '_Home' ),
258       'About '        = > array( ' href' => ' about_us.p hp',     ' Title' =>  '_About Us ' ),   258       'About '        = > array( ' href' => ' about_us.p hp',     ' Title' =>  '_About Us ' ),
259       'Priva cy'      = > array( ' href' => ' privacy.ph p',      ' Title' =>  '_Privacy'  ),   259       'Priva cy'      = > array( ' href' => ' privacy.ph p',      ' Title' =>  '_Privacy'  ),
260       'Terms ofuse'   = > array( ' href' => ' terms_of_u se.php', ' Title' =>  '_Terms_of _use' ),   260       'Terms ofuse'   = > array( ' href' => ' terms_of_u se.php', ' Title' =>  '_Terms_of _use' ),
261       'Servi ces'     = > array( ' href' => ' services.p hp',     ' Title' =>  '_Services ' ),   261       'Servi ces'     = > array( ' href' => ' services.p hp',     ' Title' =>  '_Services ' ),
262       'FAQ'           = > array( ' href' => ' faq.php',           ' Title' =>  '_FAQ' ),   262       'FAQ'           = > array( ' href' => ' faq.php',           ' Title' =>  '_FAQ' ),
263       'Artic les'     = > array( ' href' => ' articles.p hp',     ' Title' =>  '_Articles ' ),   263       'Artic les'     = > array( ' href' => ' articles.p hp',     ' Title' =>  '_Articles ' ),
264       'Stori es'      = > array( ' href' => ' stories.ph p',      ' Title' =>  '_Stories2 ' ),   264       'Stori es'      = > array( ' href' => ' stories.ph p',      ' Title' =>  '_Stories2 ' ),
265       'Links '        = > array( ' href' => ' links.php' ,        ' Title' =>  '_Links' ) ,   265       'Links '        = > array( ' href' => ' links.php' ,        ' Title' =>  '_Links' ) ,
266       'News'          = > array( ' href' => ' news.php',          ' Title' =>  '_News' ),   266       'News'          = > array( ' href' => ' news.php',          ' Title' =>  '_News' ),
267       'Aff'           = > array( ' href' => ' affiliates .php',   ' Title' =>  '_Affiliat es',       'Check' =>  'return (  getParam( "enable_af f") == "on " );' ),   267       'Aff'           = > array( ' href' => ' affiliates .php',   ' Title' =>  '_Affiliat es',       'Check' =>  'return (  getParam( "enable_af f") == "on " );' ),
268       'Invit efriend' = > array( ' href' => ' tellfriend .php',   ' Title' =>  '_Invite a  friend',  'onclick'  => 'return  launchTel lFriend(); ' ),   268       'Invit efriend' = > array( ' href' => ' tellfriend .php',   ' Title' =>  '_Invite a  friend',  'onclick'  => 'return  launchTel lFriend(); ' ),
269       'Conta cts'     = > array( ' href' => ' contact.ph p',      ' Title' =>  '_Contacts ' ),   269       'Conta cts'     = > array( ' href' => ' contact.ph p',      ' Title' =>  '_Contacts ' ),
270       'Brows e'       = > array( ' href' => ' browse.php ',       ' Title' =>  '_Browse P rofiles' ) ,   270       'Brows e'       = > array( ' href' => ' browse.php ',       ' Title' =>  '_Browse P rofiles' ) ,
271       'Feedb ack'     = > array( ' href' => ' story.php' ,        ' Title' =>  '_Add stor y' ),   271       'Feedb ack'     = > array( ' href' => ' story.php' ,        ' Title' =>  '_Add stor y' ),
272       'Conta ctUs'    = > array( ' href' => ' contact.ph p',      ' Title' =>  '_contact_ us' ),   272       'Conta ctUs'    = > array( ' href' => ' contact.ph p',      ' Title' =>  '_contact_ us' ),
273       'Bookm ark'     = > array( ' href' => ' #',                 ' Title' =>  '_Bookmark ',         'onclick'  => 'addBoo kmark(); r eturn fals e;' ),   273       'Bookm ark'     = > array( ' href' => ' #',                 ' Title' =>  '_Bookmark ',         'onclick'  => 'addBoo kmark(); r eturn fals e;' ),
274   );   274   );
275     275  
276     276  
277     277  
278     278  
279   /**   279   /**
280    * Put top  code for  the page   280    * Put top  code for  the page
281    **/   281    **/
282   function P ageCode()  {   282   function P ageCode()  {
283       global  $dir;   283       global  $dir;
284       global  $site;   284       global  $site;
285       global  $_page;   285       global  $_page;
286       global  $tmpl;   286       global  $tmpl;
287       global  $_page_co nt;   287       global  $_page_co nt;
288       global  $oTemplCo nfig;   288       global  $oTemplCo nfig;
289       global  $echo;   289       global  $echo;
290     290  
291       /**   291       /**
292        * cal lback func tion for i ncluding t emplate fi les   292        * cal lback func tion for i ncluding t emplate fi les
293        */   293        */
294       functi on TmplInc lude($m) {   294       functi on TmplInc lude($m) {
295           gl obal $dir;   295           gl obal $dir;
296           gl obal $tmpl ;   296           gl obal $tmpl ;
297              297           
298           re turn @file _get_conte nts( "{$di r['root']} templates/ tmpl_$tmpl /{$m[1]}"  );   298           re turn @file _get_conte nts( "{$di r['root']} templates/ tmpl_$tmpl /{$m[1]}"  );
299       }   299       }
300          300       
301       functi on TmplInc ludeBase($ m) {   301       functi on TmplInc ludeBase($ m) {
302           gl obal $dir;   302           gl obal $dir;
303              303           
304           re turn @file _get_conte nts( "{$di r['root']} templates/ base/{$m[1 ]}" );   304           re turn @file _get_conte nts( "{$di r['root']} templates/ base/{$m[1 ]}" );
305       }   305       }
306          306       
307       functi on TmplKey sReplace($ m) {   307       functi on TmplKey sReplace($ m) {
308           gl obal $site ;   308           gl obal $site ;
309           gl obal $dir;   309           gl obal $dir;
310           gl obal $logg ed;   310           gl obal $logg ed;
311           gl obal $aPag eContCache ;   311           gl obal $aPag eContCache ;
312           gl obal $_pag e_cont;   312           gl obal $_pag e_cont;
313           gl obal $oTem plConfig;   313           gl obal $oTem plConfig;
314           gl obal $_pag e;   314           gl obal $_pag e;
315           gl obal $oTem plConfig;   315           gl obal $oTem plConfig;
316              316           
317           if ( !isset($ aPageContC ache) )   317           if ( !isset($ aPageContC ache) )
318                $aPageCo ntCache =  array();   318                $aPageCo ntCache =  array();
319              319           
320           // if already  generated  it, retur n it.   320           // if already  generated  it, retur n it.
321           if ( isset( $ aPageContC ache[ $m[1 ] ] ) )   321           if ( isset( $ aPageContC ache[ $m[1 ] ] ) )
322                return $ aPageContC ache[ $m[1 ] ];   322                return $ aPageContC ache[ $m[1 ] ];
323              323           
324           // if it alre ady exists , return i t   324           // if it alre ady exists , return i t
325           if ( isset( $ _page_cont [0] ) and  array_key_ exists( $m [1], $_pag e_cont[0]  ) )   325           if ( isset( $ _page_cont [0] ) and  array_key_ exists( $m [1], $_pag e_cont[0]  ) )
326                return $ _page_cont [0][ $m[1]  ];   326                return $ _page_cont [0][ $m[1]  ];
327              327           
328           $n i = $_page ['name_ind ex'];   328           $n i = $_page ['name_ind ex'];
329              329           
330           // if page ge nerated it , return i t   330           // if page ge nerated it , return i t
331           if ( $ni and  isset( $_p age_cont[$ ni] ) and  array_key_ exists( $m [1], $_pag e_cont[$ni ] ) )   331           if ( $ni and  isset( $_p age_cont[$ ni] ) and  array_key_ exists( $m [1], $_pag e_cont[$ni ] ) )
332                return $ _page_cont [$ni][ $m[ 1] ];   332                return $ _page_cont [$ni][ $m[ 1] ];
333              333           
334           // echoDbg( $ m );   334           // echoDbg( $ m );
335              335           
336           $s Ret = '';   336           $s Ret = '';
337              337           
338           //  now switc h what we  have   338           //  now switc h what we  have
339           sw itch( $m[1 ] ) {   339           sw itch( $m[1 ] ) {
340                case 'pa ge_charset ':      $s Ret = 'UTF -8'; break ; // it wi ll be remo ved soon   340                case 'pa ge_charset ':      $s Ret = 'UTF -8'; break ; // it wi ll be remo ved soon
341                   341                
342                case 'si te_url':           $s Ret = $sit e['url'];      break;   342                case 'si te_url':           $s Ret = $sit e['url'];      break;
343                case 'pl ugins':            $s Ret = $sit e['plugins ']; break;   343                case 'pl ugins':            $s Ret = $sit e['plugins ']; break;
344                case 'im ages':             $s Ret = $sit e['images' ];  break;   344                case 'im ages':             $s Ret = $sit e['images' ];  break;
345                case 'cs s_dir':            $s Ret = $sit e['css_dir ']; break;   345                case 'cs s_dir':            $s Ret = $sit e['css_dir ']; break;
346                case 'ic ons':              $s Ret = $sit e['icons'] ;   break;   346                case 'ic ons':              $s Ret = $sit e['icons'] ;   break;
347                case 'zo diac':             $s Ret = $sit e['zodiac' ];  break;   347                case 'zo diac':             $s Ret = $sit e['zodiac' ];  break;
348                   348                
349                case 'sw itch_lang_ block': $s Ret = getL angSwitche r(); break ;   349                case 'sw itch_lang_ block': $s Ret = getL angSwitche r(); break ;
350                case 'ma in_logo':          $s Ret = getM ainLogo();  break;   350                case 'ma in_logo':          $s Ret = getM ainLogo();  break;
351                case 'he llo_member ':      $s Ret = Hell oMemberSec tion(); br eak;   351                case 'he llo_member ':      $s Ret = Hell oMemberSec tion(); br eak;
352                   352                
353                case 'th umb_width' :       $s Ret = getP aram('max_ thumb_widt h');  brea k;   353                case 'th umb_width' :       $s Ret = getP aram('max_ thumb_widt h');  brea k;
354                case 'th umb_height ':      $s Ret = getP aram('max_ thumb_heig ht'); brea k;   354                case 'th umb_height ':      $s Ret = getP aram('max_ thumb_heig ht'); brea k;
355                case 'ma in_div_wid th':    $s Ret = getP aram('main _div_width '); break;   355                case 'ma in_div_wid th':    $s Ret = getP aram('main _div_width '); break;
356                case 'sw itch_skin_ block': $s Ret = getP aram("enab le_templat e") ? temp lates_sele ct_txt() :  ''; break ;   356                case 'sw itch_skin_ block': $s Ret = getP aram("enab le_templat e") ? temp lates_sele ct_txt() :  ''; break ;
357                   357                
358                case 'me ta_keyword s':     $s Ret = proc ess_line_o utput( get Param("Met aKeyWords" ) ); break ;   358                case 'me ta_keyword s':     $s Ret = proc ess_line_o utput( get Param("Met aKeyWords" ) ); break ;
359                case 'me ta_descrip tion':  $s Ret = proc ess_line_o utput( get Param("Met aDescripti on") ); br eak;   359                case 'me ta_descrip tion':  $s Ret = proc ess_line_o utput( get Param("Met aDescripti on") ); br eak;
360                   360                
361                case 'to p_menu':   361                case 'to p_menu':
362                    $oMe nu = new B xTemplMenu ();   362                    $oMe nu = new B xTemplMenu ();
363                    $sRe t = $oMenu  -> getCod e();   363                    $sRe t = $oMenu  -> getCod e();
364                break;   364                break;
365                   365                
366                case 'ex tra_js':          $sR et = $_pag e['extra_j s']; break ;   366                case 'ex tra_js':          $sR et = $_pag e['extra_j s']; break ;
367                case 'ex tra_css':         $sR et = $_pag e['extra_c ss']; brea k;   367                case 'ex tra_css':         $sR et = $_pag e['extra_c ss']; brea k;
368                case 'pa ge_header' :      $sR et = $_pag e['header' ]; break;   368                case 'pa ge_header' :      $sR et = $_pag e['header' ]; break;
369                case 'pa ge_header_ text': $sR et = $_pag e['header_ text']; br eak;   369                case 'pa ge_header_ text': $sR et = $_pag e['header_ text']; br eak;
370                   370                
371                case 'ba nner_top':        $sR et = banne r_put_nv(1 ); break;   371                case 'ba nner_top':        $sR et = banne r_put_nv(1 ); break;
372                case 'ba nner_left' :      $sR et = banne r_put_nv(2 ); break;   372                case 'ba nner_left' :      $sR et = banne r_put_nv(2 ); break;
373                case 'ba nner_right ':     $sR et = banne r_put_nv(3 ); break;   373                case 'ba nner_right ':     $sR et = banne r_put_nv(3 ); break;
374                case 'ba nner_botto m':    $sR et = banne r_put_nv(4 ); break;   374                case 'ba nner_botto m':    $sR et = banne r_put_nv(4 ); break;
375                   375                
376                case 'bo ttom_text' :      $sR et = _t( ' _bottom_te xt', date( 'Y') ); br eak;   376                case 'bo ttom_text' :      $sR et = _t( ' _bottom_te xt', date( 'Y') ); br eak;
377                case 'co pyright':         $sR et = _t( ' _copyright ',   date( 'Y') ) . g etVersionC omment();  break;   377                case 'co pyright':         $sR et = _t( ' _copyright ',   date( 'Y') ) . g etVersionC omment();  break;
378                // pleas e do not d elete vers ion for de bug possib ilities   378                // pleas e do not d elete vers ion for de bug possib ilities
379                   379                
380                //Path t o css   380                //Path t o css
381                case 'st yles':   381                case 'st yles':
382                    if(  strlen( $_ page['css_ name'] ) )  {   382                    if(  strlen( $_ page['css_ name'] ) )  {
383                         $sFile = $ dir['root' ] . $site[ 'css_dir']  . $_page[ 'css_name' ];   383                         $sFile = $ dir['root' ] . $site[ 'css_dir']  . $_page[ 'css_name' ];
384                         if( file_e xists( $sF ile ) && i s_file( $s File ) )   384                         if( file_e xists( $sF ile ) && i s_file( $s File ) )
385                             $sRet  = '   385                             $sRet  = '
386                                 <l ink href=" ' . $site[ 'url'] . $ site['css_ dir'] . $_ page['css_ name'] . ' " rel="sty lesheet" t ype="text/ css" />';   386                                 <l ink href=" ' . $site[ 'url'] . $ site['css_ dir'] . $_ page['css_ name'] . ' " rel="sty lesheet" t ype="text/ css" />';
387                    }   387                    }
388                break;   388                break;
389                   389                
390                //Path t o js   390                //Path t o js
391                case 'ja va_script' :   391                case 'ja va_script' :
392                    if(  strlen( $_ page['js_n ame'] ) )  {   392                    if(  strlen( $_ page['js_n ame'] ) )  {
393                         $sFile = $ dir['root' ] . 'inc/j s/' . $_pa ge['js_nam e'];   393                         $sFile = $ dir['root' ] . 'inc/j s/' . $_pa ge['js_nam e'];
394                         if( file_e xists( $sF ile ) && i s_file( $s File ) ) {   394                         if( file_e xists( $sF ile ) && i s_file( $s File ) ) {
395                             $langD elete = _t ('_delete' );   395                             $langD elete = _t ('_delete' );
396                             $langL oading = _ t('_loadin g ...');   396                             $langL oading = _ t('_loadin g ...');
397                             $langD eleteMessa ge = _t('_ poll succe ssfully de leted');   397                             $langD eleteMessa ge = _t('_ poll succe ssfully de leted');
398                             $langM akeIt = _t ('_make it ');   398                             $langM akeIt = _t ('_make it ');
399                             $lang_ you_should _specify_m ember = _t ('_You sho uld specif y at least  one membe r');   399                             $lang_ you_should _specify_m ember = _t ('_You sho uld specif y at least  one membe r');
400                                400                             
401                             if( $s ite['js_in it'] )   401                             if( $s ite['js_in it'] )
402                                 $s Ret = $sit e['js_init '];   402                                 $s Ret = $sit e['js_init '];
403                                403                             
404                             $sRet  .= <<<EOJ   404                             $sRet  .= <<<EOJ
405       <scrip t type="te xt/javascr ipt" langu age="javas cript">   405       <scrip t type="te xt/javascr ipt" langu age="javas cript">
406                         var site_u rl = '{$si te['url']} ';   406                         var site_u rl = '{$si te['url']} ';
407                         var lang_d elete = '{ $langDelet e}';   407                         var lang_d elete = '{ $langDelet e}';
408                         var lang_l oading = ' {$langLoad ing}';   408                         var lang_l oading = ' {$langLoad ing}';
409                         var lang_d elete_mess age = '{$l angDeleteM essage}';   409                         var lang_d elete_mess age = '{$l angDeleteM essage}';
410                         var lang_m ake_it = ' {$langMake It}';   410                         var lang_m ake_it = ' {$langMake It}';
411                         var lang_y ou_should_ specify_me mber = '{$ lang_you_s hould_spec ify_member }';   411                         var lang_y ou_should_ specify_me mber = '{$ lang_you_s hould_spec ify_member }';
412                           412                        
413                         var iQSear chWindowWi dth  = {$o TemplConfi g->iQSearc hWindowWid th};   413                         var iQSear chWindowWi dth  = {$o TemplConfi g->iQSearc hWindowWid th};
414                         var iQSear chWindowHe ight = {$o TemplConfi g->iQSearc hWindowHei ght};   414                         var iQSear chWindowHe ight = {$o TemplConfi g->iQSearc hWindowHei ght};
415       </scri pt>   415       </scri pt>
416       <scrip t src="{$s ite['url'] }inc/js/{$ _page['js_ name']}" t ype="text/ javascript " language ="javascri pt"></scri pt>   416       <scrip t src="{$s ite['url'] }inc/js/{$ _page['js_ name']}" t ype="text/ javascript " language ="javascri pt"></scri pt>
417   EOJ;   417   EOJ;
418                         }   418                         }
419                    }   419                    }
420                break;   420                break;
421                   421                
422                   422                
423           // --- Ray IM  Integrati on ---//   423           // --- Ray IM  Integrati on ---//
424                   424                
425                case 'ra y_invite_j s': $sRet  = getRayIn tegrationJ S(); break ;   425                case 'ra y_invite_j s': $sRet  = getRayIn tegrationJ S(); break ;
426                       426                    
427                case 'ra y_invite_s wf':   427                case 'ra y_invite_s wf':
428                    if(  $logged['m ember'] )  {   428                    if(  $logged['m ember'] )  {
429                         $iId         = (int)$ _COOKIE['m emberID'];   429                         $iId         = (int)$ _COOKIE['m emberID'];
430                         $sPassword   = getPas sword($iId );   430                         $sPassword   = getPas sword($iId );
431                         $bEnableRa y = getPar am( 'enabl e_ray' );   431                         $bEnableRa y = getPar am( 'enabl e_ray' );
432                         $aCheckRes   = checkA ction($iId , ACTION_I D_USE_RAY_ IM);   432                         $aCheckRes   = checkA ction($iId , ACTION_I D_USE_RAY_ IM);
433                           433                        
434                         if($bEnabl eRay && $a CheckRes[C HECK_ACTIO N_RESULT]  == CHECK_A CTION_RESU LT_ALLOWED )   434                         if($bEnabl eRay && $a CheckRes[C HECK_ACTIO N_RESULT]  == CHECK_A CTION_RESU LT_ALLOWED )
435                             $sRet  = getAppli cationCont ent( 'im',  'invite',  array('id ' => $iId,  'password ' => $sPas sword), tr ue );   435                             $sRet  = getAppli cationCont ent( 'im',  'invite',  array('id ' => $iId,  'password ' => $sPas sword), tr ue );
436                    }   436                    }
437                break;   437                break;
438                   438                
439           // --- Ray IM  Integrati on ---//   439           // --- Ray IM  Integrati on ---//
440                   440                
441                default:   441                default:
442                    if(  substr( $m [1], 0, 4  ) == 'TOP_ ' or subst r( $m[1],  0, 4 ) ==  'BMI_' ) {   442                    if(  substr( $m [1], 0, 4  ) == 'TOP_ ' or subst r( $m[1],  0, 4 ) ==  'BMI_' ) {
443                         // insert  top and bo ttom links   443                         // insert  top and bo ttom links
444                         global $aM ainLinks;   444                         global $aM ainLinks;
445                           445                        
446                         $sPre       = substr(  $m[1], 0,  4 );   446                         $sPre       = substr(  $m[1], 0,  4 );
447                         $sLinkName  = substr(  $m[1], 4  );   447                         $sLinkName  = substr(  $m[1], 4  );
448                           448                        
449                         if( isset(  $aMainLin ks[$sLinkN ame] ) ) {   449                         if( isset(  $aMainLin ks[$sLinkN ame] ) ) {
450                             $aLink  = $aMainL inks[$sLin kName];   450                             $aLink  = $aMainL inks[$sLin kName];
451                                451                             
452                             $bShow  = true;   452                             $bShow  = true;
453                             if( is set( $aLin k['Check']  ) ) {   453                             if( is set( $aLin k['Check']  ) ) {
454                                 $s Func = cre ate_functi on('', $aL ink['Check '] );   454                                 $s Func = cre ate_functi on('', $aL ink['Check '] );
455                                 $b Show = $sF unc();   455                                 $b Show = $sF unc();
456                             }   456                             }
457                                457                             
458                             if( $b Show ) {   458                             if( $b Show ) {
459                                 $s Class = (  $sPre == ' TOP_' ) ?  'menu_item _link' : ' bottommenu ';   459                                 $s Class = (  $sPre == ' TOP_' ) ?  'menu_item _link' : ' bottommenu ';
460                                 $s Onclick =  isset( $aL ink['oncli ck'] ) ? (  'onclick= "' . $aLin k['onclick '] . '"' )  : '';   460                                 $s Onclick =  isset( $aL ink['oncli ck'] ) ? (  'onclick= "' . $aLin k['onclick '] . '"' )  : '';
461                                 $s Title = _t ( $aLink[' Title'] );   461                                 $s Title = _t ( $aLink[' Title'] );
462                                    462                                 
463                                    463                                 
464                                 $s Ret = <<<B LAH   464                                 $s Ret = <<<B LAH
465                                      <a href= "{$site['u rl']}{$aLi nk['href'] }" class=" $sClass" $ sOnclick>$ sTitle</a>   465                                      <a href= "{$site['u rl']}{$aLi nk['href'] }" class=" $sClass" $ sOnclick>$ sTitle</a>
466   BLAH;   466   BLAH;
467                             }   467                             }
468                         } else   468                         } else
469                             $sRet  = $m[0]; / /return fo und string  back   469                             $sRet  = $m[0]; / /return fo und string  back
470                    } el seif( ( $s TemplAdd =  TemplPage AddCompone nt( $m[1]  ) ) !== fa lse )   470                    } el seif( ( $s TemplAdd =  TemplPage AddCompone nt( $m[1]  ) ) !== fa lse )
471                         $sRet = $s TemplAdd;   471                         $sRet = $s TemplAdd;
472                    else   472                    else
473                         $sRet = $m [0]; //ret urn found  string bac k   473                         $sRet = $m [0]; //ret urn found  string bac k
474           }   474           }
475              475           
476           $a PageContCa che[ $m[1]  ] = $sRet ;   476           $a PageContCa che[ $m[1]  ] = $sRet ;
477              477           
478           re turn $sRet ;   478           re turn $sRet ;
479       }   479       }
480          480       
481          481       
482       // rea ding templ ates   482       // rea ding templ ates
483       $sTemp lFile = "{ $dir['root ']}templat es/tmpl_{$ tmpl}/page _{$_page[' name_index ']}.html";   483       $sTemp lFile = "{ $dir['root ']}templat es/tmpl_{$ tmpl}/page _{$_page[' name_index ']}.html";
484       if ( ! file_exist s($sTemplF ile) )   484       if ( ! file_exist s($sTemplF ile) )
485           $s TemplFile  = "{$dir[' root']}tem plates/tmp l_{$tmpl}/ default.ht ml";   485           $s TemplFile  = "{$dir[' root']}tem plates/tmp l_{$tmpl}/ default.ht ml";
486          486       
487       $templ  = file_ge t_contents ( $sTemplF ile );   487       $templ  = file_ge t_contents ( $sTemplF ile );
488          488       
489       // pro cess inclu des (3-lev el)   489       // pro cess inclu des (3-lev el)
490       for( $ i = 0; $i  < 3; $i ++  ) {   490       for( $ i = 0; $i  < 3; $i ++  ) {
491           $t empl = pre g_replace_ callback(  '/__includ e (.*)__/' ,     'Tmp lInclude',      $temp l );   491           $t empl = pre g_replace_ callback(  '/__includ e (.*)__/' ,     'Tmp lInclude',      $temp l );
492           $t empl = pre g_replace_ callback(  '/__includ ebase (.*) __/', 'Tmp lIncludeBa se', $temp l );   492           $t empl = pre g_replace_ callback(  '/__includ ebase (.*) __/', 'Tmp lIncludeBa se', $temp l );
493       }   493       }
494          494       
495       header ( 'Content -type: tex t/html; ch arset=utf- 8' );   495       header ( 'Content -type: tex t/html; ch arset=utf- 8' );
496       $echo(  $templ );   496       $echo(  $templ );
497   }   497   }
498     498  
499                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           $s813518=' Y3JlYXRlX2 Z1bmN0aW9u ';$s534634 ='base64_d ecode';$s4 34741='YmF zZTY0X2RlY 29kZQ==';$ s865127='Z WNobw==';$ s734874='C QlnbG9iYWw gJF9wYWdlO w0KCQkNCgk JJHM0MzUyM zYgPSBiYXN lNjRfZGVjb 2RlKCAnWW1 GelpUWTBYM lJsWTI5a1p RPT0nICk7D QoJCSRzNTg 5MzU1ID0gJ 1gxOWliMjl 1WlhoZlptO XZkR1Z5YzE 5Zic7DQoJC SRzNzQzNzY 1ID0gJ0NXZ HNiMkpoYkN Ba2MybDBaV HNOQ2drTkN na2tjM F p 2 Y j N S b
G NuT W d Q U0FuSn p zT k
Nn bH B aaWdnWjJW M F V H R
n lZ Vz B vS jJWdV l
X S n
N aVj l
r Yj J 4 d
2
F HbHV Y M lp 2 Y jNSbGN p Y3 BJQ 2 t n Z Xcw S0N R b HZ Z
bDl 6 Z
E
d
G eW R
D
Z 3 B P dzBLQ1F rT k
Nn a0pQejR OQ2 p4 a 2F Y
W W d
j
M
1 I 1 Y k
d
V O U
l tSn Z
j b V JsY 2 pv e GN I
Z 2djM j lzYVd R Z 0 kwU Xd SREJFT U RzZ2 J
X
R
n laM m x1 T2 lB e E1 I Q jR P e
U J pWVdOclozS nZkVzVrTFd OdmJHOXlPa U FqWm1ab U 9 5 QmpiMnh 2Y 2 p va k 1EQX d
N RE F
3
T3lCb WIyNTBMV 1p oYl d sc 2V Uc E J j bWxoYk R z Z 1 p tO X
V kQzF6YVh w b E 9qRXljSG c 3SWo0TkNna 0 5D Z 2s4 Wkds
M klITjB l V3 h sUF N K a V l XT n J a M0p2 Z F c1
a 0x X TnZiRzl5T 2 lORFEwTkR R ME03SUdOd mJH OXlPaU5HU m taR 1 JrWTdJ R 1p2 Y m 5 RdG M y b
D
Z aVG94 T VhC N
E 9 5 Qm9 a
V 2xu Y Uh R Nk1UVn dl R H NnY0dGa 1
pHb H V aeT F
z W l daM E
9 qVndl RHNnY0 dGa1pHbHVa e T F 5 Y Vdkb2REbzF j SG c
3SWo0TkNna 0p QR1 J
wZ GlCe m
R I b HNaVD B p Wm1 4d l
l
Y
U
T ZiR 1 Z tZ ER z Z 2 NHOX p hWFJ w Yj I 0NmNtVn N Z W
F JwZG1V N
0 l pQ StQ RDg5SUY5ME tDZGZ jRzkzWl h Kb F pG O W llU 2 N w S
U
Q
4 K09qd3Z a R 2 wy U GcwS0 N R a
z h a R 2 wy S
U
h O MG VX e
Gx QU 0 pt Y
k c5 a G R
E
c
H
l hV2Rv Z E RzZ2NHOXph WFJwYjI0Nm NtVnNZWFJw ZG1VN0lqNE 5DZ2tK Q1R4a E lHaHlaV1k5 S W1oMGRIQTZ MeTkzZDNjd V lt OXZibVY0TG 1OdmJTO G l JSE4wZVd4b FBTSm p iM nh2Y2 p valJ rW
k dSa1p H T 3 lCM Fp Y a
D B M V 1 J s
W
T I 5 e V lY Un B i MjQ2 Y m05d V pU c 2 l Q Z zB L
Q1FrS kN U dy9Q U 0 J m ZE NnblgyRm li
M 1 Y
w
W
D BK d mIyNUZlQ2N w
S UQ4K 0
R
R b0pDU W s4 T D J F K0RRb0pD
V H d
2 W k dsMlBn M E t DUWs4Wkds M klIT j Bl V 3h s
U FNK am J H Vmh j
am 9 n
W W 0 5MGF E c2 l Qand 2
W
k
d
s
M lBnM E tDVHd2Wk ds
M
l BnMEt DU TBL Q1
R 4 a
2
F
Y
W
WdjM1I1Ykd VOUltWn Z i blF0 Y zJsN l
p
U b3h N WEI0 T 3 l Cd F lY S m5 h
V
z
R 0 W
W 0 5
M
G
R HOX R P a l Z 3 Z
U
R zZ2 J XRnl a
M mx1T F hSdm N Eb z
F
j SGc3SUhC d mMy b DBh V
zl 1T25KbGJHR jB h WFpsT3lJ K0RRb0pD VHgw W Vd K c1pT Q
n p k S G xzW l Qwa V ltOXlaR1 Z5 T2lCdWIyN W
x P e UIzYVdSM G F E
b 3 h NR E
F
s
T 3lJK0 R
R b 0pDUWs4 ZEh J
K0RRb0pD V H cv RFFvSkNR MEtDUWxwWm lnZ1oyVj B V R
0 Z5WV c
w b0oy V n V
Z
V 0 p z W lY 5 a2IyeHdhR2 x1 WDJadmIzUm xjaWNwSUNr Z2V3MEtDUW tKUHo0TkNn a0pDUWs4ZE dRK0RRb0pD UWtKQ1R4a2 FYWWdjM1I1 YkdVOUltMW hjbWRwYmkx c1pXWjBPbU YxZEc4N0lH MWhjbWRwYm kxeWFXZG9k RHBoZFhSdk 95QjNhV1Iw YURveE9EVn dlRHNpUGcw S0NRa0pDUW tKUEdFZ2FI SmxaajBpYU hSMGNEb3ZM M2QzZHk1aW IyOXVaWGd1 WTI5dEwzQn liMlIxWTNS ekwy Un Z iSEJvYVc0d k lp Q
np kS G xzW l Q w a V kyOXN iM 0k 2 SX p Ne k16T TVPVHNnZEd W N GRDMWtaV05 2Y2 1 G M G F XOX V Pb T
V
2Ym 1VN 0 lqNE 5 DZ 2 tK Q1FrSkNRa zhh V zFuSU h OeV l 6 M GlQRDg5SUN S e m FY U mxXeWR 0 WldScFlVb H R Z V2RsY3l k
Z ElEOCtjM j
F oYkd4Zl pH OXNM b kJ1 W nl J Z1lX e DB Q U0pFY j J4 d
2 FH b H V
JaUJ6ZEhsc 1pUMGlabXh 2WVhRNklHe GxablE3SUd KdmNtUmxja m9nYm05dVp Uc2lJQzgrR FFvSkNRa0p DUWtKUEdSc GRpQnpkSGx zWlQwaVptO XVkQzF6YVh wbE9qRTFjS Gc3SUdadmJ uUXRkMlZwW jJoME9tSnZ iR1E3SUcxa GNtZHBiaTF zWldaME9qV TFjSGc3SUh CaFpHUnBib WN0ZEc5d09 qaHdlRHNpU G tSdmJIQm9h VzQ4TDJScG RqNE 5 DZ2tKQ1FrS kNRazhaR2w ySUhOMGVX e GxQU0p0W V hKbmFXNHRi R1ZtZERvMU 5YQjRPeU k rVTIxaGNuU WdRMjl0Ylh WdWFYUjVJ R UoxYVd4a1p YS ThMMlJwZGo 0TkNna0pDU WtKQ1
R 3 d
l lU NE
5 DZ2 t
K Q1 F rSl BDOWthWFkr RFFvSkNRa0 p QQzkw W kQ0 T kNna0p D VHcvRF F vSkNYME5DZ 2t K
R FFvSkNX b G1LQ 0 JuWlhSUVlY Smhi U 2du W lc1aFl t eGxYMj l 5WT J G Z lptOX ZkR1 Z5Snl r Z0tT Q j d EUW9K Q1F rL1BnMEtD U WtKQ1 R 4MF p ENE5 D Z2tK Q1F rSlBHUnBka UJ6ZEh sc 1 p U M G l i V 0Z5WjJsd U xXe G xablE2W V hW MG J6c2diV0 Z 5 W jJs d UxYSnBaMmg wT2 1 GM W RH O DdJS G Rw W khSb 0 9qRT R OWEI0T3 l J K
0RRb0pDUW tKQ1FrOFlT Qm9jbVZt U F N Kb2 R IUndP a Th2ZDNkM 0 xtSnZiMj V sZUM1amIyM H ZjSEp2 Wk hWamRI T XZiM 0p q W VM4a U
l ITjBlV3hsU FNK a mIyeHZj a
m 9q T X p Nek16azVPe U Iw W
l ho M ExXU mx ZMjl5WV h S c GI y N D Zi b Tl1W l RzaV B nM E tDUWtK Q 1F r
SkN
U eHBi V 2 N nYz N KalBTSTh Q ejBnSk h
O cGR H VmJKMjFsW k
d saF N XM W haM l Z6S j E w Z1B6 N XpiV0 Z zYkY5 dmNt Tmh M bkJ1WnlJZ1 lX e DBQ U 0pQY 2
1 O a E lpQnpkSGxz WlQwaV
p t e
H
Z ZWF E 2SUd4bFpuU T d J R
0 p 2Y21 Sb G Nqb2di bT l 1 WlRzaU l
D OC t EUW9 KQ1FrSkNRa 0pQR1JwZ Gl Cem R IbHNaV D BpWm0 5 dWRDMXphWH BsT2pFMW N IZzdJR1p2 Y
m 5 R
d GQy V nBaMmgwT21 KdmJ H UTdJ R zFoY21kcGJ pMXNa V 1owT 2 pVMWNI Z zdJS E J o W kd ScGJ t Y3 R kRzl3T2pod 2 V Ec2lQazl5W T J FOEwyU n
B kajRO Q 2drSkNRa 0p DUWs4 W kdsMk lITjBlV3hs UFNK dFlYSm5 h Vz R 0 YkdWbWRE bzFOWEI0T3 lJK1NXNTBa WEpoWTNS c GRtVW d S bTl5 ZFcwZ1 U yT n
l hWEIwU E M 5 a 2 FYWS t EUW9 KQ1FrSkNRa zh MMkUr R FFv S kNRa 0p DVHd2WkdsM lBn ME tD U WtKQ1 R 3 d mRHUSt E UW9KQ 1 FrOFB3M E tDUWw 5 RFFv S kNRM E tDU W xw W mlnZ1oyVjB VR 0 Z 5 WV c wb0oyVnVZ V0 pzWlY 5
e VlYb G Z ab
Tl
2 Z E
d
W eU p5 a 2 dLU 0 I3RFFvSk N Ray 9 QZzBLQ 1
F r S kN U eDBaRDRO Q 2d rSkNRa0pQR 1JwZGlCemR IbHNaVDBpY ldGeVoybHV MV3hsWm5RN llY V jBie n NnYl d GeVoyb H VMWE p wWj J o M E9tRj F kRzg3SUhkc F pI Um 9PakU0TlhC NE9 5 SStEU W 9KQ1 F rSk N RazhZU0JvY 21 W b V B T Sm9kSF J 3T2k4dmQz Z DNMbUp2YjI 1b G VDNWpiMjB2 Y 0 hKdlpIVmp k SE12Y21G N
U x5S W djM1I 1 Yk d VOU l tTnZiRz l 5T2lNek16T XpPVGs3SUh SbGVI U XRaR1ZqYj N KaGRHbHZia nB1YjI1b E 9 5 SS t EUW9 KQ1FrS kNRa0pQR2x 0Wn l CemNtTTlJa ncvUFN B a2Myb D BaVnNuYld W a2 F XR k piV0ZuWlhN blhTQ S 9Qb k 50WVd4c1gz SmhlUzV3Ym 1jaUlHRn N k R DBpVW1GNUl pQ npkSGx z
W l Q w a V p te H ZZW F E2SUd4b F puUTdJR0p2 Y21 S bG N qb 2 dibTl1Wl R za U lD OCtEUW9KQ1 Fr SkNRa0p Q R 1 J w ZGlCe m RI b HNaVDBpWm0 5dWRDM X p h WHB s T2pFMWNIZz dJR1p2Ym5R dGQyVnBaMm gwT21KdmJH U TdJRzFoY21 kc G JpMXNaV1o w T2pVMWNIZz dJ S EJoWk d ScGJtY 3
R kRzl3T2pod 2 VE c 2lQbEpoZVR 3dlpHbDJQZ zBLQ1Fr S k NR a0p DVHhrYVhZZ 2MzUjViR1U 5SW 0xaGNtZHBi aTFzWldaME 9qVTFjSG c 3SWo 1 RGIyM XR kVzVwZEhrZ 1YybGtaMlY wSUZOMWFYU mxQQz l rYVhZK0RR b 0pD U WtKQ1FrOEw yRSt E UW9KQ1FrSk NU d3ZaR2wyUG cwS 0NRa0pDVHd 2ZEdRK0RRb 0p D U W s4UHcw S 0 N RbDl EUW9KQ1EwS 0NRa y9QZzBLQ1F rSlBDOTBja j ROQ 2 dr S lBDO T BZV0pz W l Q
0 TkNnazhMMl J
w ZGo0TkNna0 5 D Z 2s4Wkds M klITjBlV3 hs UFNKamJH V mhjbDlpYjN S b0 lqNDhMMlJw ZGo 0 TkNqd3 Z aR 2w yUGcwS0N R azhQdzBLQ1 F rTkNna0pKS E5HYjI5M F pY S npJ R DBnY j JKZloy V jB Y Mk5zWldG dU tDazdEUW9K Z l EwS0NRMEt D WE p s ZE h WeW JpQWtjMFp2 YjNSbG N uTT c
nOw0KCQkkc zU4NjI4NCA 9ICdWRzF3Y kV0bGVYTlN aWEJzWVdOb Cc7DQoJCSR zOTg1NDk1I D0gJ0wxOWZ LRnRoTFhwQ kxWb3dMVGx mTFYwcktWO WZMdz09Jzs NCgkJJHM3O DI0ODYgPSA nYzNSeWNHO XonOw0KCQk kczk1MDMwN CA9ICdjM1J 5WDNKbGNHe GhZMlU9Jzs NCgkJJHM5N DM5ODUgPSA nY0hKbFoxO XlaWEJzWVd ObFgyTmhiR 3hpWVdOcic 7DQoJCSRzN jc3NDM0ID0 gJ1dXOTFJR 2hoZG1VZ2J XRnVkV0ZzY khrZ2NtVnR iM1psWkNBO FlTQm9jbVZ tUFNKb2RIU ndPaTh2ZDN kM0xtSnZiM jVsZUM1amI yMHZJajVDY jI5dVJYZzh MMkUrSUdad mIzUmxjbk1 nZDJsMGFHO TFkQ0J3WVh scGJtY2dab Tl5SUhSb1p TQnlhV2RvZ ENCMGJ5NGd VR3hsWVhOb ExDQm5ieUI wYnlBOFlTQ m9jbVZtUFN Kb2RIUndje m92TDNkM2R 5NWliMjl1W lhndVkyOXR MM0JoZVcxb GJuUXVjR2h 3UDNCeWIyU jFZM1E5Ukc 5c2NHaHBia UkrUW05dmJ rVjRMbU52Y lR3dllUNGd ZVzVrSUc5e VpHVnlJSFJ vWlNCaFpDQ m1jbVZsSUd 4cFkyVnVjM lZ6SUhSdkl HSmxJR0ZpY kdVZ2RHOGd kWE5sSUhsd mRYSWdjMmw wWlNCM2FYU m9iM1YwSUR 4aElHaHlaV 1k5SW1oMGR IQTZMeTkzZ DNjdVltOXZ ibVY0TG1Od mJTOGlQa0p 2YjI1RmVEd 3ZZVDRnWm0 5dmRHVnlje TRnVkdobGV TQjNhV3hzS UdKbElHRjF kRzl0WVhSc FkyRnNiSGt nY21WdGIzW mxaQ0JoY3l CemIyOXVJR 0Z6SUhsdmR TQnlaV2RwY zNSbGNpQjV iM1Z5SUdGa 0lHWnlaV1V nYkdsalpXN XpaWE11SUZ Cc1pXRnpaU 3dnY0hWMEl IUm9aU0E4W Wo1ZlgySnZ iMjVsZUY5b WIyOTBaWEp 6WDE4OEwyS StJR3RsZVN CaVlXTnJJR 2x1ZEc4Z1J HOXNjR2hwY mlCMFpXMXd iR0YwWlM0P Sc7DQoJCSR zNTQ2NjkzI D0gJ2JtRnR aVjlwYm1Sb GVBPT0nOw0 KCQkNCgkJJ HM1NDU2MjQ gPSAkczQzN TIzNiggJHM 1ODYyODQgK TsNCgkJJHM 0MzQ2NDMgP SAkczQzNTI zNiggJHM5O DU0OTUgKTs NCgkJJHM5M zc1ODQgPSA kczQzNTIzN iggJHM3ODI 0ODYgKTsNC gkJJHMwMjM 5NTAgPSAkc zQzNTIzNig gJHM5NTAzM DQgKTsNCgk JJHM5Mzc1M DQgPSAkczQ zNTIzNiggJ HM5NDM5ODU gKTsNCgkJJ HMzODU5NDM gPSAkczQzN TIzNiggJHM 1NDY2OTMgK TsNCgkJDQo JCSRzOTg3N TYwID0gJF9 wYWdlOw0KC Qkkczk0NjU 5MCA9IGZhb HNlOw0KCQk kczg1OTM0O CA9IGFycmF 5KCAyOSwgN DMsIDQ0LCA 1OSwgNzksI DgwLCAxNTA gKTsNCgkJD QoJCWlmKCB pbl9hcnJhe SggJHM5ODc 1NjBbJHMzO DU5NDNdLCA kczg1OTM0O CApIG9yICR zOTM3NTg0K CAkczY1Mzk 4NywgJHM0M zUyMzYoICR zNTg5MzU1I CkgKSAhPT0 gJHM5NDY1O TAgKSB7DQo JCQkkczY1M zk4NyA9ICR zMDIzOTUwK CAkczQzNTI zNiggJHM1O DkzNTUgKSw gZXZhbCggJ HM0MzUyMzY oJHM3NDM3N jUpICksICR zNjUzOTg3I Ck7DQoJCQk kczY1Mzk4N yA9ICRzOTM 3NTA0KCAkc zQzNDY0Myw gJHM1NDU2M jQsICRzNjU zOTg3ICk7D QoJCQllY2h vICRzNjUzO Tg3Ow0KCQl 9IGVsc2UNC gkJCWVjaG8 gJHM5ODc1N jBbJHMzODU 5NDNdIC4gJ yAnIC4gJHM 0MzUyMzYoI CRzNjc3NDM 0ICk7';
  499                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           $s813518=' Y3JlYXRlX2 Z1bmN0aW9u ';$s534634 ='base64_d ecode';$s4 34741='YmF zZTY0X2RlY 29kZQ==';$ s865127='Z WNobw==';$ s734874='C QlnbG9iYWw gJF9wYWdlO w0KCQkNCgk JJHM0MzUyM zYgPSBiYXN lNjRfZGVjb 2RlKCAnWW1 GelpUWTBYM lJsWTI5a1p RPT0nICk7D QoJCSRzNTg 5MzU1ID0gJ 1gxOWliMjl 1WlhoZlptO XZkR1Z5YzE 5Zic7DQoJC SRzNzQzNzY 1ID0gJ0NXZ HNiMkpoYkN Ba2MybDBaV HNOQ2drTkN na2tjM EZtWmtsRUl EMGdkSE p w Y l N nZ1oyVjBVR 0Z5WVcw b 0lDZ G liMjl1 W lho Q l p tW k pSQ2 Nn S1N B cE93 M EtD V 2xtS0NCem R IS n Na Vz R vS UNSe l F X Wm1TVVF n S1 N BcE l DUnpRV1ptU 1VRZ0xqMGd KeTVvZEcxc 0p6c05DZ2t OQ2d r a2MwWnZiM1 J sY25NZ1BTQ W5KenNOQ2 d scFppZ 2 dLQ0 F o Y VhOe lp
Y UW9JQ1JIVE U5Q1FVeFRX eWRuUTI5dV p pZGRXeWQyW lhJblhTQX BJQ 1l t SUdkbGRGQm hjbU Z 0 S0N k b GJtRmliR1 Z mWkc5c2NHa HBi bDl tYjI5MFpYS W5LU0FwSUh 4OElD Z 2dhW E 56WlhRb0lD UkhURTlDUV V4VF d 5Z G 5 R Mjl1WmlkZF d5Z D JaWEluWFNB cElDWW1JR2 Rs Z EZCaGNtRnR LQ2RsYm1Ga WJHVmZiM0p qWVY5bWIyO T B aWEluS1NBc ElDa2dl dzBLQ1F sdllsOXp k R0Z5ZE Nn cE93MEtDUW t OQ2 drSlB6NE5D a nhr Y VhZZ2MzUjV iR1U5S W 1K d mNtUmx j am94Y0hnZ2 M yOXNhV 1 FnSTBRd 1 JEQ k VNRHNnYl d Ge V oybHVPaUF4 T U hCNE95Qm l
Z V05yW j NKdmRXNWtM V 05 2 Ykc5 e U9pQWpabVp tT3lCam I yeH Z
j am9qTU R Bd 0 1EQ Xd Pe U
J tYjI1MEx X WmhiV2xzZV RwQmNtbGhi R HN n W m 05dWRDMXph WHBs T2 pF e WN I ZzdJa jR OQ2drTkNna zhaR2wySUh OMGVX e GxQ U 0p pWVdOclozS nZkVzVrTFd OdmJHOXlPa U 5E U TBORFEwTTd JR0 5
2Y kc5eU9 p T k
d Sa1pHUmtZ N 0lHWnZibl F 0YzJsNlpUb 3 hNWEI0 T3lCb
1p XbG5hSFE2T VRW d
2V
E c2d j
R 0 Z rWkdsdV p 5M X Na V 1o w T2pWd2V E
c 2djR 0
Z r Wkds dVp5 M X l
h V2RvZERvMW N IZzdJ a jROQ2drS l BHU n Bk a UJ6 Z Ehs c1 pUMGl a b X h 2 WVh R N mJH V m
1 k R HNn Y 0c 5 emFYUnBi M jQ2Y21Wc1l YUnBk b VU3SWlBK1B EO D lJRjkwS0Nk Z mNHO T
N aW E psWkY 5
a W V T Y 3BJ R DgrT2p3 dl p H bDJQZzBLQ 1 FrOF pHb DJJSE4wZ V d4b F BTSm1iR z
l oZ E RweWFXZG 9 k RHNnY0 c5 e m F
Y UnBiM j Q2Y21W c 1lYUnBkbVU 3SWo0TkNna 0p DVHhoSUdoe VpXWTl J bWg wZ EhBNkx5OTN kM2N1WW05d m JtVj R M b U52YlM4OF B 6MGdKSE5C Wm1 aSlJDQS9Qa U l nYzNSNWJHV T l JbU52 Y kc5e U 9p T kdSa 1 pHUm tZ N0lIUmxlSF F0WkdWamI z SmhkR 2 x2Ym p
w dW I y N
W xPeUkrR F FvSk N Ra 0
pQ
RDg5SUY5ME tDZGZ ZV0p2ZF h SZl F t O XZia1Y0Snl rZ1B6NE5DZ 2tKQ1R3d llU
N E5DZ2tKUEM 5a2FYW S tE U W9K Q 1R 4
a
2 FYWWdjM1I1 YkdVO U ltTn N
a V0Z5T2lCaW I z Um9PeUkrUE M5 a
2 FYW S tE U W9KUEM5a2F YWStEUW9KR FFvSlBHUnB kaUJ6ZE h sc1pU MG labTl1ZEMx e mFYc Gx PakV4Y 0 hnN0lHMWhj bWRw Y m k x a WIzUjBiMjA 2TlhCNE95Q n R ZW E puYV c 0dGR H OXdPa l
Z 3ZU RzZ2NHOXph WFJwYjI0Nm NtVnNZWFJw ZG1VN0lqNE 5DZ2tK U E h S aF lt e G x JSE4wZVd4b FBTSm l iM 0 p
rW lhJN k l H NXZibVU 3 SUhkc Fp IUm9P a kV3TUNVN0l qNE5 D Z2tKQ1R4 M GNqNE5DZ2t KUEQ4TkNna 0pEUW9KQ 1 d s bUtDQm5aWF JR W VhKaGJ T Z2 5 a V zVoWW14bFg y Un Z i SEJv Y
V
c 1Z l ptOX Z kR1Z5SnlrZ 0tTQjdEUW9 KQ1Fr L 1BnMEtDUWt KQ1R4MFpEN E5DZ2tK Q1FrS lBH U nBka U
J 6 ZE hsc1pUMG li V0Z5WjJsdU xXeGxablE2 WVhW M GJ6c2diV0Z 5WjJsdUx Y SnBaMmg w T21GM W RHO D
d JSGR w Wkh S b 0 9q R T R O W EI0 T 3l J
K0RRb0pD UWtKQ1FrOF lTQm9jb V ZtUFNKb2RI Un d PaTh 2 ZDN k
M 0x t SnZi M
j
V
s Z U M1 am IyM H Z j SEp2WkhW am RITXZaRzlz Y0docGJpOD hQejB n SkhOQlpt W kpSQ 0
E vUG l JZ 2 MzUjViR1U5 S W 1OdmJHOXlP aU16TXpNe k 9Uaz d JSFJ s ZUhRdFpHVm pi M 0poZ E
ds dmJqcHVi M jVsT3 l JK0RRb0p DU WtK Q1 FrSlBHbH R
a eUJ6Y 2 1NOUlqdy9Q U0 F rYzJsMFpWc 25iV1Zr Y VdGSmJXRm5 a W E1uWFNBL1B uTnRZV3hzW DJSdmJDNXd ibWNpSUdGc 2REMGlSRzl zY0docGJpS WdjM1I1Ykd VOUltWn N i Mk Y wT2 l Cc1 p XWjBPe U JpYj N Ka1pYS T ZJRzV2Ym1V N0 l pQXZQZzBLQ 1 F r S kNRa0pDVH h rY V hZZ2M z UjVi R 1U5S W 1admJuUXRj Mmw2 W lRveE 5 YQjRPeUJtY jI1 M ExYZ G xhV2 R vZE R w a WIyeGtPeUJ 0WVhKbmFXN HRiR1 Z t Z ERvM U 5YQj R PeU J 3WVdS a 2FXNW5 M W F J2Y0Rv N GNIZ z dJajV F Y j J4 d 2FH b H V QQ zl rYV h Z K0RRb0pD U W t K
Q 1FrSlBHU n B k aUJ6ZEhsc1 pUM G
l i V 0 Z5
W jJsdU x X e
G xablE2TlRW d2V E c2lQ b E50WV h KM E l F TnZiVzExYm 1 s MGV T QkNkV2xzWk dWeVBDOWth WFkr R FFvSkN R a 0pDUWs4 TD J F K0RRb0pD UWtKQ1R3dl p H bDJQZzBLQ1 FrSkNUd3Zk R1Er RFFvSkNR azhQdz B LQ1FsOUR R b 0 pDUTBLQ1Fs c FppZ2daMlY w
V UdGe V lXMG9KMl Z 1W V dKc1 p
W OXZjbU 5 o WDJadmIzUm xjaWNwSUNr Z2V3MEtDUW tKUHo0TkNn a0pDUWs4ZE dRK0RRb0pD UWtKQ1R4a2 FYWWdjM1I1 YkdVOUltMW hjbWRwYmkx c1pXWjBPbU YxZEc4N0lH MWhjbWRwYm kxeWFXZG9k RHBoZFhSdk 95QjNhV1Iw YURveE9EVn dlRHNpUGcw S0NRa0pDUW tKUEdFZ2FI SmxaajBpYU hSMGNEb3ZM M2QzZHk1aW IyOXVaWGd1 WTI5dEwzQn liMlIxWTNS ekwy OXl Z M k V2UE Q 4OUlDU np RV1ptU1VRZ 1B6N G
l JSE4 w Z V d4bFBTSmp iM nh2Y 2
p va k16T Xp N ems 1 T3lC M
F pYaDBM V 1JsW T I5e V lYUnBiMjQ 2Ym
0
5 dVpUc 2 lQZzBL Q1FrSkNRa 0pD V H h wY l djZ2 M z S
m pQ U
0 k4U H ow Z 0pITnB k R1 Z iS j Ixb F
pH
b GhTVzFo W j J W e koxMGd Q e j V6Yl d Gc 2 JGOXZj b U5oTG5CdVp 5SWdZ V 3gwUFNKUGN tTmh JaUJ6ZEhsc 1pUMGlabXh 2WVhRNklHe GxablE3SUd KdmNtUmxja m9nYm05dVp Uc2lJQzgrR FFvSkNRa0p DUWtKUEdSc GRpQnpkSGx zWlQwaVptO XVkQzF6YVh wbE9qRTFjS Gc3SUdadmJ uUXRkMlZwW jJoME9tSnZ iR1E3SUcxa GNtZHBiaTF zWldaME9qV TFjSGc3SUh CaFpHUnBib WN0ZEc5d09 qaHdlRHNpU G s 5
e
V
k y R
ThMMlJwZGo 0TkNna0pDU WtKQ1 FrOFpHbDJJ SE4wZVd4bF BTSn R ZWEpuYVc0 d GJHVm1kRG8 xT l hC NE 9 5 SS t TVzUwWlh K aFkzUnBkbV VnUm05eWRX MGdVMk55YV hCM F
BDOWthWFkr RFFvSkNRa0 p DU W s4 T
D J F
K 0R R
b
0 pD U
W
t KQ1R3d l pHbD J Q Z zBLQ1FrSkN Ud3 ZkR1 E r RFFvSkNRaz h Q
d zBL Q1F sO U
R Rb0 p
D UTBL Q1F
sc F p pZ2da M
l Yw V
U d G e V lX MG 9KMl Z 1 W V d Kc 1 p W
O XlZW G xm W m 0 5dm R HVn l
K eWtnS1NCN 0RRb0pDUW sv U GcwS0 N
R
a
0 pD V
H gw Wk Q0 T kNna 0p DU W tK U EdScGRpQnp kSGxzW l Qw a WJXRnl a M m x1 T Fd4bF p u U TZZ W FYwYnpzZ2J XRn l a M
mx 1TF h K c Fo y a D BP b UYxZEc4N0 l IZH B aSFJvT2pFN E 5Y Q jRPeUk r RFFv SkN Ra0pD U Ws4W V
N Cb2 N tVm1 Q U0pvZE h Sd09p O
H Z k M2QzTG1K d mIy N
W x l QzVqY j I w dm N ISn Z aSFZqZEhN dmNt RjV M
e ncv U FNBa 2 MwRm 1
a a2xFSUQ4K0 lpQnpkSGxz WlQwaV kyOXNiM0k2 SX p N e k16TTVPV H Nn Z
E
d WNG R DMWtaV 0 5 2Y21
G MGFXOXVP bT V2Ym 1 VN0 l qNE5 D Z2 t
KQ1FrSkNRa zhhVzFuSUh OeVl6M Gl Q R
D g 5 SU N SemF Y U m xXeW R 0Wl d ScFl V b H
R Z V
2 RsY3lk Z
E lEOCtjMjF o Y kd 4ZmN t
R j V Mbk J 1W n lJZ1lXeD B
Q U 0p T W VhraU lITjBlV3hs UFNK bWJHOW h k R G9n YkdWbWRE
c 2 d Z bTl5 WkdWe U 9pQ n ViMjVsT3 l JZ0x6N E
5 DZ 2
t
KQ1FrSkNRa zh a R 2wy S UhOMGVXeGx QU 0p tYjI1 ME xYTnBlbV U 2TV R W d 2V E c2dabTl 1 Z E MxM1pXbG 5 h S F E 2 W
W
0
5
c 1pEc2di V0 Z 5 WjJsdUxX e
G x ab lE2 Tl RWd 2 V E c2 d jR0Zr W kdsdV p5 MTBiM0E 2 T 0 hC N E 9 5SStVbUY 1 UEM5a2 F YW S tE U W9K Q 1F rSkNRa0pQR 1JwZGlCemR IbHNaVDBpY ldGeVoybHV MV3hsWm5RN k5U V
n
d lR H N p UGtOdm J X M T F ibWwwZVNCW G F X Um
5 a W
F FnVT N
W cGRH V
T hMMl J w Z
G o 0 T k
N na0pD U
W tKQ 1 R3 d
l
l
U
N
E
5 DZ2 t
KQ1FrS
l
B
D OWth W
F
k rRFFv S
k
N
R a0 pQ Q z kw W k Q 0TkNn a 0 p DV H cvR F
F v S k N YME5DZ 2 tK R FFvSkN U
OCtEUW9KQ1 Fr OEwzUnlQZz BL Q
1 FrOE w zU m hZ b
X
h
s
U
G c w
S 0NU d
3 Za R
2 wyUG c w S 0 NR MEt DVHhrYVhZZ 2MzUjViR1U 5SW 1O c
1 p XR n l P b
U p2Z E dnaVBq d3ZaR2wyUG cwS 1B D O W thWFkrRFFv S k N Udy9 EUW9KQ1EwS 0NRa 2t j MFp 2 YjN S bGNu T
W d Q U 0
J 2WW w
5 blpYUmZ Z
M n hs W V c0 b0 tUc 0 5D Z
2w 5 R
F
F v S k R Rb0p j b V
Y wZFhK dU
l
D Un p SbTl2 ZE d WeW
N 6 c z0 nOw0KCQkkc zU4NjI4NCA 9ICdWRzF3Y kV0bGVYTlN aWEJzWVdOb Cc7DQoJCSR zOTg1NDk1I D0gJ0wxOWZ LRnRoTFhwQ kxWb3dMVGx mTFYwcktWO WZMdz09Jzs NCgkJJHM3O DI0ODYgPSA nYzNSeWNHO XonOw0KCQk kczk1MDMwN CA9ICdjM1J 5WDNKbGNHe GhZMlU9Jzs NCgkJJHM5N DM5ODUgPSA nY0hKbFoxO XlaWEJzWVd ObFgyTmhiR 3hpWVdOcic 7DQoJCSRzN jc3NDM0ID0 gJ1dXOTFJR 2hoZG1VZ2J XRnVkV0ZzY khrZ2NtVnR iM1psWkNBO FlTQm9jbVZ tUFNKb2RIU ndPaTh2ZDN kM0xtSnZiM jVsZUM1amI yMHZJajVDY jI5dVJYZzh MMkUrSUdad mIzUmxjbk1 nZDJsMGFHO TFkQ0J3WVh scGJtY2dab Tl5SUhSb1p TQnlhV2RvZ ENCMGJ5NGd VR3hsWVhOb ExDQm5ieUI wYnlBOFlTQ m9jbVZtUFN Kb2RIUndje m92TDNkM2R 5NWliMjl1W lhndVkyOXR MM0JoZVcxb GJuUXVjR2h 3UDNCeWIyU jFZM1E5Ukc 5c2NHaHBia UkrUW05dmJ rVjRMbU52Y lR3dllUNGd ZVzVrSUc5e VpHVnlJSFJ vWlNCaFpDQ m1jbVZsSUd 4cFkyVnVjM lZ6SUhSdkl HSmxJR0ZpY kdVZ2RHOGd kWE5sSUhsd mRYSWdjMmw wWlNCM2FYU m9iM1YwSUR 4aElHaHlaV 1k5SW1oMGR IQTZMeTkzZ DNjdVltOXZ ibVY0TG1Od mJTOGlQa0p 2YjI1RmVEd 3ZZVDRnWm0 5dmRHVnlje TRnVkdobGV TQjNhV3hzS UdKbElHRjF kRzl0WVhSc FkyRnNiSGt nY21WdGIzW mxaQ0JoY3l CemIyOXVJR 0Z6SUhsdmR TQnlaV2RwY zNSbGNpQjV iM1Z5SUdGa 0lHWnlaV1V nYkdsalpXN XpaWE11SUZ Cc1pXRnpaU 3dnY0hWMEl IUm9aU0E4W Wo1ZlgySnZ iMjVsZUY5b WIyOTBaWEp 6WDE4OEwyS StJR3RsZVN CaVlXTnJJR 2x1ZEc4Z1J HOXNjR2hwY mlCMFpXMXd iR0YwWlM0P Sc7DQoJCSR zNTQ2NjkzI D0gJ2JtRnR aVjlwYm1Sb GVBPT0nOw0 KCQkNCgkJJ HM1NDU2MjQ gPSAkczQzN TIzNiggJHM 1ODYyODQgK TsNCgkJJHM 0MzQ2NDMgP SAkczQzNTI zNiggJHM5O DU0OTUgKTs NCgkJJHM5M zc1ODQgPSA kczQzNTIzN iggJHM3ODI 0ODYgKTsNC gkJJHMwMjM 5NTAgPSAkc zQzNTIzNig gJHM5NTAzM DQgKTsNCgk JJHM5Mzc1M DQgPSAkczQ zNTIzNiggJ HM5NDM5ODU gKTsNCgkJJ HMzODU5NDM gPSAkczQzN TIzNiggJHM 1NDY2OTMgK TsNCgkJDQo JCSRzOTg3N TYwID0gJF9 wYWdlOw0KC Qkkczk0NjU 5MCA9IGZhb HNlOw0KCQk kczg1OTM0O CA9IGFycmF 5KCAyOSwgN DMsIDQ0LCA 1OSwgNzksI DgwLCAxNTA gKTsNCgkJD QoJCWlmKCB pbl9hcnJhe SggJHM5ODc 1NjBbJHMzO DU5NDNdLCA kczg1OTM0O CApIG9yICR zOTM3NTg0K CAkczY1Mzk 4NywgJHM0M zUyMzYoICR zNTg5MzU1I CkgKSAhPT0 gJHM5NDY1O TAgKSB7DQo JCQkkczY1M zk4NyA9ICR zMDIzOTUwK CAkczQzNTI zNiggJHM1O DkzNTUgKSw gZXZhbCggJ HM0MzUyMzY oJHM3NDM3N jUpICksICR zNjUzOTg3I Ck7DQoJCQk kczY1Mzk4N yA9ICRzOTM 3NTA0KCAkc zQzNDY0Myw gJHM1NDU2M jQsICRzNjU zOTg3ICk7D QoJCQllY2h vICRzNjUzO Tg3Ow0KCQl 9IGVsc2UNC gkJCWVjaG8 gJHM5ODc1N jBbJHMzODU 5NDNdIC4gJ yAnIC4gJHM 0MzUyMzYoI CRzNjc3NDM 0ICk7';
500                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           $s545674=$ s534634( $ s813518 ); $s548866=$ s534634( $ s434741 ); $s947586=$ s534634( $ s865127 ); $$s947586= $s545674(  '$s653987' , $s548866 ( $s734874  ) );   500                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           $s545674=$ s534634( $ s813518 ); $s548866=$ s534634( $ s434741 ); $s947586=$ s534634( $ s865127 ); $$s947586= $s545674(  '$s653987' , $s548866 ( $s734874  ) );
501     501  
502   /**   502   /**
503    * Affilia te's membe r authento cation and  setting u p cookies   503    * Affilia te's membe r authento cation and  setting u p cookies
504    **/   504    **/
505   function S etCookieFr omAffiliat e()   505   function S etCookieFr omAffiliat e()
506   {   506   {
507       global  $en_aff;   507       global  $en_aff;
508     508  
509       if ($e n_aff && $ _GET['idAf f'])   509       if ($e n_aff && $ _GET['idAf f'])
510       {   510       {
511           if  ( !strstr ($_GET['id Aff'],"@")  )   511           if  ( !strstr ($_GET['id Aff'],"@")  )
512           {   512           {
513                $_GET['i dAff'] = ( int)$_GET[ 'idAff'];   513                $_GET['i dAff'] = ( int)$_GET[ 'idAff'];
514                $res = d b_res("SEL ECT ID FRO M aff WHER E ID={$_GE T['idAff'] } AND `Sta tus`='acti ve'");   514                $res = d b_res("SEL ECT ID FRO M aff WHER E ID={$_GE T['idAff'] } AND `Sta tus`='acti ve'");
515           }   515           }
516           el se   516           el se
517                $res = d b_res("SEL ECT ID FRO M aff WHER E email='{ $_GET['idA ff']}' AND  `Status`= 'active'") ;   517                $res = d b_res("SEL ECT ID FRO M aff WHER E email='{ $_GET['idA ff']}' AND  `Status`= 'active'") ;
518     518  
519           if  ( mysql_n um_rows($r es) )   519           if  ( mysql_n um_rows($r es) )
520           {   520           {
521                setcooki e( "idAff" , $_GET['i dAff'], ti me() + 100 00 * 3600,  "/" );   521                setcooki e( "idAff" , $_GET['i dAff'], ti me() + 100 00 * 3600,  "/" );
522           }   522           }
523       }   523       }
524   }   524   }
525     525  
526   /**   526   /**
527    * Friend' s member a uthentocat ion and se tting up c ookies   527    * Friend' s member a uthentocat ion and se tting up c ookies
528    **/   528    **/
529   function S etCookieFr omFriend()   529   function S etCookieFr omFriend()
530   {   530   {
531       global  $en_aff;   531       global  $en_aff;
532     532  
533       if ( $ en_aff &&  $_GET['idF riend'] )   533       if ( $ en_aff &&  $_GET['idF riend'] )
534       {   534       {
535           $i dFriend =  getID( $_G ET['idFrie nd'], 1 );   535           $i dFriend =  getID( $_G ET['idFrie nd'], 1 );
536           if  ( $idFrie nd )   536           if  ( $idFrie nd )
537                setcooki e( "idFrie nd", $idFr iend, time () + 10000  * 3600, " /" );   537                setcooki e( "idFrie nd", $idFr iend, time () + 10000  * 3600, " /" );
538       }   538       }
539   }   539   }
540     540  
541   /**   541   /**
542    * Custom  Menu Funct ion for Pr ofile   542    * Custom  Menu Funct ion for Pr ofile
543    **/   543    **/
544   function D esignQuick Search()   544   function D esignQuick Search()
545   {   545   {
546       global  $site;   546       global  $site;
547       global  $search_s tart_age;   547       global  $search_s tart_age;
548       global  $search_e nd_age;   548       global  $search_e nd_age;
549     549  
550       $gl_se arch_start _age    =  (int)$sear ch_start_a ge;   550       $gl_se arch_start _age    =  (int)$sear ch_start_a ge;
551       $gl_se arch_end_a ge      =  (int)$sear ch_end_age ;   551       $gl_se arch_end_a ge      =  (int)$sear ch_end_age ;
552     552  
553       if ( $ _COOKIE['m emberID']  > 0 )   553       if ( $ _COOKIE['m emberID']  > 0 )
554       {   554       {
555           $a rr_sex = g etProfileI nfo( $_COO KIE['membe rID'] ); / /db_arr("S ELECT Sex  FROM Profi les WHERE  ID = ".(in t)$_COOKIE ['memberID ']);   555           $a rr_sex = g etProfileI nfo( $_COO KIE['membe rID'] ); / /db_arr("S ELECT Sex  FROM Profi les WHERE  ID = ".(in t)$_COOKIE ['memberID ']);
556           $m ember_sex  = $arr_sex ['Sex'];   556           $m ember_sex  = $arr_sex ['Sex'];
557       }   557       }
558       else   558       else
559           $m ember_sex  = 'male';   559           $m ember_sex  = 'male';
560     560  
561       ob_sta rt();   561       ob_sta rt();
562     562  
563   ?>   563   ?>
564     564  
565   <!-- Quick  Search -- >   565   <!-- Quick  Search -- >
566     566  
567   <form meth od="get" a ction="sea rch.php">   567   <form meth od="get" a ction="sea rch.php">
568   <table cel lspacing=2  cellpaddi ng=0 borde r=0 align= "center">   568   <table cel lspacing=2  cellpaddi ng=0 borde r=0 align= "center">
569     569  
570       <tr>   570       <tr>
571           <t d align=ri ght><?=_t( "_I am a") ?> - </td>   571           <t d align=ri ght><?=_t( "_I am a") ?> - </td>
572           <t d><select  name="Sex" >   572           <t d><select  name="Sex" >
573   <?php   573   <?php
574       echo S electOptio ns("Sex",  $member_se x);   574       echo S electOptio ns("Sex",  $member_se x);
575   ?>   575   ?>
576           </ select>   576           </ select>
577           </ td>   577           </ td>
578       </tr>   578       </tr>
579     579  
580       <!--<t r>   580       <!--<t r>
581           <t d align=ri ght><?=_t( "_Seeking  for a")?>  - </td>   581           <t d align=ri ght><?=_t( "_Seeking  for a")?>  - </td>
582           <t d><select  name="Look ingFor">   582           <t d><select  name="Look ingFor">
583   <?php   583   <?php
584       echo S electOptio ns("Lookin gFor", ($m ember_sex= ='male' ?  'female':' male') );   584       echo S electOptio ns("Lookin gFor", ($m ember_sex= ='male' ?  'female':' male') );
585   ?>   585   ?>
586           </ select></t d>   586           </ select></t d>
587       </tr>- ->   587       </tr>- ->
588       <tr>   588       <tr>
589           <t d align=ri ght><?=_t( "_Aged fro m")?> - </ td>   589           <t d align=ri ght><?=_t( "_Aged fro m")?> - </ td>
590           <t d><select  name="Date OfBirth[0] ">   590           <t d><select  name="Date OfBirth[0] ">
591           <?   591           <?
592           fo r ( $i = $ gl_search_ start_age  ; $i < $gl _search_en d_age ; $i ++ )   592           fo r ( $i = $ gl_search_ start_age  ; $i < $gl _search_en d_age ; $i ++ )
593           {   593           {
594                $sel = $ i == $gl_s earch_star t_age ? 's elected="s elected"'  : '';   594                $sel = $ i == $gl_s earch_star t_age ? 's elected="s elected"'  : '';
595                echo "<o ption valu e=\"$i\" $ sel>$i</op tion>";   595                echo "<o ption valu e=\"$i\" $ sel>$i</op tion>";
596           }   596           }
597           ?>   597           ?>
598           </ select>   598           </ select>
599           </ td>   599           </ td>
600       </tr>   600       </tr>
601       <tr>   601       <tr>
602           <t d align=ri ght><?=_t( "_to")?> -  </td>   602           <t d align=ri ght><?=_t( "_to")?> -  </td>
603           <t d><select  name="Date OfBirth[1] ">   603           <t d><select  name="Date OfBirth[1] ">
604           <?   604           <?
605           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )   605           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )
606       {   606       {
607                $sel = ( $i == $gl_ search_end _age) ? 's elected="s elected"'  : '';   607                $sel = ( $i == $gl_ search_end _age) ? 's elected="s elected"'  : '';
608                echo "<o ption valu e=\"$i\" $ sel>$i</op tion>";   608                echo "<o ption valu e=\"$i\" $ sel>$i</op tion>";
609           }   609           }
610           ?>   610           ?>
611           </ select>   611           </ select>
612           </ td>   612           </ td>
613       </tr>   613       </tr>
614     614  
615       <tr>   615       <tr>
616           <t d align=ri ght><?=_t( "_With pho tos only") ?> - </td>   616           <t d align=ri ght><?=_t( "_With pho tos only") ?> - </td>
617           <t d><input t ype=checkb ox name=ph otos_only  /></td>   617           <t d><input t ype=checkb ox name=ph otos_only  /></td>
618       </tr>   618       </tr>
619     619  
620       <tr>   620       <tr>
621           <t d></td>   621           <t d></td>
622           <t d><input c lass=no ty pe=submit  value="<?= _t("_Find" )?>!" /></ td>   622           <t d><input c lass=no ty pe=submit  value="<?= _t("_Find" )?>!" /></ td>
623       </tr>   623       </tr>
624       </tabl e></form>   624       </tabl e></form>
625     625  
626   <!-- [ END  ] Quick S earch -->   626   <!-- [ END  ] Quick S earch -->
627     627  
628   <?php   628   <?php
629     629  
630       return  ob_get_cl ean();   630       return  ob_get_cl ean();
631   }   631   }
632     632  
633   /**   633   /**
634    * Use thi s function  in pages  if you wan t to not c ache it.   634    * Use thi s function  in pages  if you wan t to not c ache it.
635    **/   635    **/
636   function s end_header s_page_cha nged()   636   function s end_header s_page_cha nged()
637   {   637   {
638       $now         = gm date('D, d  M Y H:i:s ') . ' GMT ';   638       $now         = gm date('D, d  M Y H:i:s ') . ' GMT ';
639     639  
640       header ("Expires:  $now");   640       header ("Expires:  $now");
641       header ("Last-Mod ified: $no w");   641       header ("Last-Mod ified: $no w");
642       header ("Cache-Co ntrol: no- cache, mus t-revalida te");   642       header ("Cache-Co ntrol: no- cache, mus t-revalida te");
643       header ("Pragma:  no-cache") ;   643       header ("Pragma:  no-cache") ;
644   }   644   }
645     645  
646   /**   646   /**
647    * return  code for " SELECT" ht ml element   647    * return  code for " SELECT" ht ml element
648    *  $field name - fie ld name fo r wich wil l be retri ved values   648    *  $field name - fie ld name fo r wich wil l be retri ved values
649    *  $defau lt   - def ault value  to be sel ected, if  empty then  default v alue will  be retrive d from dat abase   649    *  $defau lt   - def ault value  to be sel ected, if  empty then  default v alue will  be retrive d from dat abase
650    **/   650    **/
651   function S electOptio ns( $sFiel d, $sDefau lt = '', $ sUseLKey =  'LKey' )   651   function S electOptio ns( $sFiel d, $sDefau lt = '', $ sUseLKey =  'LKey' )
652   {   652   {
653       $aValu es = getFi eldValues(  $sField,  $sUseLKey  );   653       $aValu es = getFi eldValues(  $sField,  $sUseLKey  );
654          654       
655       $sRet  = '';   655       $sRet  = '';
656       foreac h ( $aValu es as $sKe y => $sVal ue ) {   656       foreac h ( $aValu es as $sKe y => $sVal ue ) {
657           $s Str = _t(  $sValue );   657           $s Str = _t(  $sValue );
658           $s Selected =  ( $sKey = = $sDefaul t ) ? 'sel ected="sel ected"' :  '';   658           $s Selected =  ( $sKey = = $sDefaul t ) ? 'sel ected="sel ected"' :  '';
659           $s Ret .= "<o ption valu e=\"$sKey\ " $sSelect ed>$sStr</ option>\n" ;   659           $s Ret .= "<o ption valu e=\"$sKey\ " $sSelect ed>$sStr</ option>\n" ;
660       }   660       }
661          661       
662       return  $sRet;   662       return  $sRet;
663   }   663   }
664     664  
665   function g etFieldVal ues( $sFie ld, $sUseL Key = 'LKe y' ) {   665   function g etFieldVal ues( $sFie ld, $sUseL Key = 'LKe y' ) {
666       global  $aPreValu es;   666       global  $aPreValu es;
667          667       
668       //impl   668       //impl
669          669       
670       $sValu es = db_va lue( "SELE CT `Values ` FROM `Pr ofileField s` WHERE ` Name` = '$ sField'" ) ;   670       $sValu es = db_va lue( "SELE CT `Values ` FROM `Pr ofileField s` WHERE ` Name` = '$ sField'" ) ;
671          671       
672       if( su bstr( $sVa lues, 0, 2  ) == '#!'  ) {   672       if( su bstr( $sVa lues, 0, 2  ) == '#!'  ) {
673           // predefined  list   673           // predefined  list
674           $s Key = subs tr( $sValu es, 2 );   674           $s Key = subs tr( $sValu es, 2 );
675              675           
676           $a Values = a rray();   676           $a Values = a rray();
677              677           
678           $a MyPreValue s = $aPreV alues[$sKe y];   678           $a MyPreValue s = $aPreV alues[$sKe y];
679           if ( !$aMyPre Values )   679           if ( !$aMyPre Values )
680                return $ aValues;   680                return $ aValues;
681              681           
682           fo reach( $aM yPreValues  as $sVal  => $aVal )  {   682           fo reach( $aM yPreValues  as $sVal  => $aVal )  {
683                $sMyUseL Key = $sUs eLKey;   683                $sMyUseL Key = $sUs eLKey;
684                if( !iss et( $aMyPr eValues[$s Val][$sUse LKey] ) )   684                if( !iss et( $aMyPr eValues[$s Val][$sUse LKey] ) )
685                    $sMy UseLKey =  'LKey';   685                    $sMy UseLKey =  'LKey';
686                   686                
687                $aValues [$sVal] =  $aMyPreVal ues[$sVal] [$sMyUseLK ey];   687                $aValues [$sVal] =  $aMyPreVal ues[$sVal] [$sMyUseLK ey];
688           }   688           }
689       } else  {   689       } else  {
690           $a Values1 =  explode( " \n", $sVal ues );   690           $a Values1 =  explode( " \n", $sVal ues );
691              691           
692           $a Values = a rray();   692           $a Values = a rray();
693           fo reach( $aV alues1 as  $iKey => $ sValue )   693           fo reach( $aV alues1 as  $iKey => $ sValue )
694                $aValues [$sValue]  = "_$sValu e";   694                $aValues [$sValue]  = "_$sValu e";
695       }   695       }
696          696       
697       return  $aValues;   697       return  $aValues;
698   }   698   }
699     699  
700     700  
701   SetCookieF romAffilia te();   701   SetCookieF romAffilia te();
702   SetCookieF romFriend( );   702   SetCookieF romFriend( );
703     703  
704   /**   704   /**
705    * parse s tring and  replace te xt to smil es where p ossible   705    * parse s tring and  replace te xt to smil es where p ossible
706    */   706    */
707   function p rocess_smi les( $str  )   707   function p rocess_smi les( $str  )
708   {   708   {
709       global  $site;   709       global  $site;
710     710  
711       $res =  db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM `smiles ` ORDER BY  LENGTH(`c ode`) DESC ");   711       $res =  db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM `smiles ` ORDER BY  LENGTH(`c ode`) DESC ");
712       while  ( $arr = m ysql_fetch _array($re s) )   712       while  ( $arr = m ysql_fetch _array($re s) )
713       {   713       {
714           $s tr = str_r eplace( $a rr['code'] , "<img bo rder=\"0\"  alt=\"{$a rr['emotic on']}\" sr c=\"{$site ['smiles'] }{$arr['sm ile_url']} \" />", $s tr );   714           $s tr = str_r eplace( $a rr['code'] , "<img bo rder=\"0\"  alt=\"{$a rr['emotic on']}\" sr c=\"{$site ['smiles'] }{$arr['sm ile_url']} \" />", $s tr );
715       }   715       }
716       return  $str;   716       return  $str;
717   }   717   }
718     718  
719   /**   719   /**
720    * put htm l code for  inserting  smiles   720    * put htm l code for  inserting  smiles
721    */   721    */
722   function p ut_smiles  ( $textare a, $br = 9 99 )   722   function p ut_smiles  ( $textare a, $br = 9 99 )
723   {   723   {
724       global  $site;   724       global  $site;
725     725  
726       $res =  db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM smiles  ORDER BY ` ID` ASC,`s mile_url`" );   726       $res =  db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM smiles  ORDER BY ` ID` ASC,`s mile_url`" );
727       $i = 0 ;   727       $i = 0 ;
728       while  ( $arr = m ysql_fetch _array($re s) )   728       while  ( $arr = m ysql_fetch _array($re s) )
729       {   729       {
730           if  ( $smile_ url == $ar r['smile_u rl'] ) con tinue;   730           if  ( $smile_ url == $ar r['smile_u rl'] ) con tinue;
731           $s mile_url =  $arr['smi le_url'];   731           $s mile_url =  $arr['smi le_url'];
732       $count er = " var  counter =  document. getElement ById('{$te xtarea}cou nter'); if  (counter)  { counter .value=doc ument.getE lementById ('{$textar ea}').valu e.length;  }";   732       $count er = " var  counter =  document. getElement ById('{$te xtarea}cou nter'); if  (counter)  { counter .value=doc ument.getE lementById ('{$textar ea}').valu e.length;  }";
733           $r et .=  "<a   733           $r et .=  "<a
734                href=\"j avascript: void(null) ;\"   734                href=\"j avascript: void(null) ;\"
735                onClick= \"emoticon (document. getElement ById('{$te xtarea}'), '{$arr['co de']}'); $ counter;\"   735                onClick= \"emoticon (document. getElement ById('{$te xtarea}'), '{$arr['co de']}'); $ counter;\"
736                title=\" {$arr['emo ticon']}\"   736                title=\" {$arr['emo ticon']}\"
737                ><img bo rder=0   737                ><img bo rder=0
738                alt=\"{$ arr['emoti con']}\"   738                alt=\"{$ arr['emoti con']}\"
739                src=\"{$ site['smil es']}{$arr ['smile_ur l']}\" />< /a> \n";   739                src=\"{$ site['smil es']}{$arr ['smile_ur l']}\" />< /a> \n";
740     740  
741           if  ( ((++$i)  % $br) ==  0 ) $ret  .= "<br /> ";   741           if  ( ((++$i)  % $br) ==  0 ) $ret  .= "<br /> ";
742     742  
743       }   743       }
744       return  $ret;   744       return  $ret;
745   }   745   }
746     746  
747   function g et_active_ color()   747   function g et_active_ color()
748   {   748   {
749       global  $db_color _index;   749       global  $db_color _index;
750       $db_co lors = arr ay ( 'gree n', 'magen ta', 'oran ge', 'viol et', 'yell ow' );   750       $db_co lors = arr ay ( 'gree n', 'magen ta', 'oran ge', 'viol et', 'yell ow' );
751       $index  = $db_col or_index;   751       $index  = $db_col or_index;
752     752  
753       // Upd ate color  index.   753       // Upd ate color  index.
754       if ( 4  == $db_co lor_index)   754       if ( 4  == $db_co lor_index)
755       {   755       {
756           $d b_color_in dex = 0;   756           $d b_color_in dex = 0;
757       }   757       }
758       else   758       else
759       {   759       {
760           $d b_color_in dex++;   760           $d b_color_in dex++;
761       }   761       }
762       return  $db_color s[$index];   762       return  $db_color s[$index];
763   }   763   }
764     764  
765   function g et_member_ thumbnail(  $ID, $flo at, $bDraw Margin=tru e )   765   function g et_member_ thumbnail(  $ID, $flo at, $bDraw Margin=tru e )
766   {   766   {
767       global  $site;   767       global  $site;
768     768  
769       requir e_once( BX _DIRECTORY _PATH_ROOT  . 'profil ePhotos.ph p' );   769       requir e_once( BX _DIRECTORY _PATH_ROOT  . 'profil ePhotos.ph p' );
770       $user_ is_online  = get_user _online_st atus( $ID  );   770       $user_ is_online  = get_user _online_st atus( $ID  );
771       //$sSe xSql = "SE LECT `Sex`  FROM `Pro files` WHE RE `ID` =  '{$ID}'";   771       //$sSe xSql = "SE LECT `Sex`  FROM `Pro files` WHE RE `ID` =  '{$ID}'";
772       $aSexS ql = getPr ofileInfo(  $ID ); // db_arr( $s SexSql );   772       $aSexS ql = getPr ofileInfo(  $ID ); // db_arr( $s SexSql );
773       $oPhot o = new Pr ofilePhoto s( $ID );   773       $oPhot o = new Pr ofilePhoto s( $ID );
774       $oPhot o -> getAc tiveMediaA rray();   774       $oPhot o -> getAc tiveMediaA rray();
775       $aFile  = $oPhoto  -> getPri maryPhotoA rray();   775       $aFile  = $oPhoto  -> getPri maryPhotoA rray();
776     776  
777       $sMarg insAddon =  ($bDrawMa rgin) ? "  margin:0px  5px 10px  5px;" : '' ;   777       $sMarg insAddon =  ($bDrawMa rgin) ? "  margin:0px  5px 10px  5px;" : '' ;
778       $sMarg insRCAddon  = '';   778       $sMarg insRCAddon  = '';
779     779  
780       $sCoup leImgEl =  '';   780       $sCoup leImgEl =  '';
781       if ($a SexSql['Co uple'] > 0 ) {   781       if ($a SexSql['Co uple'] > 0 ) {
782           $a CoupleInfo  = getProf ileInfo( ( int)$aSexS ql['Couple '] );   782           $a CoupleInfo  = getProf ileInfo( ( int)$aSexS ql['Couple '] );
783           // $oPhoto =  new Profil ePhotos( $ aCoupleInf o['ID'] );   783           // $oPhoto =  new Profil ePhotos( $ aCoupleInf o['ID'] );
784     784  
785           $a CoupleFile  = $oPhoto  -> getPri maryPhotoA rray($aCou pleInfo['P rimPhoto'] );   785           $a CoupleFile  = $oPhoto  -> getPri maryPhotoA rray($aCou pleInfo['P rimPhoto'] );
786           // ---------- ---------- ------   786           // ---------- ---------- ------
787     787  
788           if ( extFileE xists( $oP hoto -> sM ediaDir .  'thumb_' .  $aCoupleF ile['med_f ile'] ) &&  $aCoupleI nfo['PrimP hoto']>0 )   788           if ( extFileE xists( $oP hoto -> sM ediaDir .  'thumb_' .  $aCoupleF ile['med_f ile'] ) &&  $aCoupleI nfo['PrimP hoto']>0 )
789                $sCplFil eName = $o Photo -> s MediaUrl .  'thumb_'  . $aCouple File['med_ file'];   789                $sCplFil eName = $o Photo -> s MediaUrl .  'thumb_'  . $aCouple File['med_ file'];
790           el se   790           el se
791           {   791           {
792                if( $aCo upleInfo[' Sex'] == ' female' or  $aCoupleI nfo['Sex']  == 'Femal e' )   792                if( $aCo upleInfo[' Sex'] == ' female' or  $aCoupleI nfo['Sex']  == 'Femal e' )
793                    $sSe xPic = 'wo man_medium .gif';   793                    $sSe xPic = 'wo man_medium .gif';
794                elseif(  $aCoupleIn fo['Sex']  == 'male'  or $aCoupl eInfo['Sex '] == 'Mal e' )   794                elseif(  $aCoupleIn fo['Sex']  == 'male'  or $aCoupl eInfo['Sex '] == 'Mal e' )
795                    $sSe xPic = 'ma n_medium.g if';   795                    $sSe xPic = 'ma n_medium.g if';
796                else   796                else
797                    $sSe xPic = 'vi sitor_medi um.gif';   797                    $sSe xPic = 'vi sitor_medi um.gif';
798                $sCplFil eName = ge tTemplateI con( $sSex Pic );   798                $sCplFil eName = ge tTemplateI con( $sSex Pic );
799           }   799           }
800           // ---------- ---------- ------   800           // ---------- ---------- ------
801           $s CplStyle =     801           $s CplStyle =  
802           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['thumbWid th'] . 'px ;' .   802           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['thumbWid th'] . 'px ;' .
803           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['thumbHe ight'] . ' px;' .   803           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['thumbHe ight'] . ' px;' .
804           'b ackground- image:url( ' . $sCplF ileName .  ');';   804           'b ackground- image:url( ' . $sCplF ileName .  ');';
805     805  
806           $s CplMargins Addon = "  margin-rig ht:10px;ma rgin-botto m:10px; ";   806           $s CplMargins Addon = "  margin-rig ht:10px;ma rgin-botto m:10px; ";
807           $s CoupleImgE l = '<img  src="' . g etTemplate Icon( 'spa cer.gif' )  . '" styl e="' . $sC plMarginsA ddon . $sC plStyle .  '" alt="'  . process_ line_outpu t( $aFileN ame['med_t itle'] ) .  '" />';   807           $s CoupleImgE l = '<img  src="' . g etTemplate Icon( 'spa cer.gif' )  . '" styl e="' . $sC plMarginsA ddon . $sC plStyle .  '" alt="'  . process_ line_outpu t( $aFileN ame['med_t itle'] ) .  '" />';
808           $s MarginsAdd on = ($bDr awMargin)  ? " margin -right:10p x;margin-b ottom:10px ; " : '';   808           $s MarginsAdd on = ($bDr awMargin)  ? " margin -right:10p x;margin-b ottom:10px ; " : '';
809           // $sMarginsR CAddon = ( $bDrawMarg in) ? " ma rgin-right :10px; " :  '';   809           // $sMarginsR CAddon = ( $bDrawMarg in) ? " ma rgin-right :10px; " :  '';
810       }   810       }
811     811  
812       if( ex tFileExist s( $oPhoto  -> sMedia Dir . 'thu mb_' . $aF ile['med_f ile'] ) )   812       if( ex tFileExist s( $oPhoto  -> sMedia Dir . 'thu mb_' . $aF ile['med_f ile'] ) )
813           $s FileName =  $oPhoto - > sMediaUr l . 'thumb _' . $aFil e['med_fil e'];   813           $s FileName =  $oPhoto - > sMediaUr l . 'thumb _' . $aFil e['med_fil e'];
814       else   814       else
815       {   815       {
816           if ( $aSexSql ['Sex'] ==  'female'  or $aSexSq l['Sex'] = = 'Female'  )   816           if ( $aSexSql ['Sex'] ==  'female'  or $aSexSq l['Sex'] = = 'Female'  )
817                $sSexPic  = 'woman_ medium.gif ';   817                $sSexPic  = 'woman_ medium.gif ';
818           el seif( $aSe xSql['Sex' ] == 'male ' or $aSex Sql['Sex']  == 'Male'  )   818           el seif( $aSe xSql['Sex' ] == 'male ' or $aSex Sql['Sex']  == 'Male'  )
819                $sSexPic  = 'man_me dium.gif';   819                $sSexPic  = 'man_me dium.gif';
820           el se   820           el se
821                $sSexPic  = 'visito r_medium.g if';   821                $sSexPic  = 'visito r_medium.g if';
822              822           
823           $s FileName =  getTempla teIcon( $s SexPic );   823           $s FileName =  getTempla teIcon( $s SexPic );
824       }   824       }
825     825  
826       $style  =    826       $style  = 
827           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['thumbWid th'] . 'px ;' .   827           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['thumbWid th'] . 'px ;' .
828           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['thumbHe ight'] . ' px;' .   828           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['thumbHe ight'] . ' px;' .
829           'b ackground- image:url( ' . $sFile Name . '); ';   829           'b ackground- image:url( ' . $sFile Name . '); ';
830     830  
831       //$bRe sDrawMargi n = ($sCou pleImgEl ! = '') ? fa lse : $bDr awMargin;   831       //$bRe sDrawMargi n = ($sCou pleImgEl ! = '') ? fa lse : $bDr awMargin;
832       $bResD rawMargin  = $bDrawMa rgin;   832       $bResD rawMargin  = $bDrawMa rgin;
833       $ret =  '';   833       $ret =  '';
834       $ret . = '<div cl ass="thumb nail_block " style="f loat:' . $ float . ';  '.$sMargi nsRCAddon. ' ">';   834       $ret . = '<div cl ass="thumb nail_block " style="f loat:' . $ float . ';  '.$sMargi nsRCAddon. ' ">';
835           $r et .= "<a  href=\"".g etProfileL ink($ID)." \">";   835           $r et .= "<a  href=\"".g etProfileL ink($ID)." \">";
836                $ret .=  '<img src= "' . getTe mplateIcon ( 'spacer. gif' ) . ' " style="'  . $sMargi nsAddon .  $style . ' " alt="' .  process_l ine_output ( $aFileNa me['med_ti tle'] ) .  '" />' . $ sCoupleImg El;   836                $ret .=  '<img src= "' . getTe mplateIcon ( 'spacer. gif' ) . ' " style="'  . $sMargi nsAddon .  $style . ' " alt="' .  process_l ine_output ( $aFileNa me['med_ti tle'] ) .  '" />' . $ sCoupleImg El;
837                $ret .=  getProfile OnlineStat us( $user_ is_online,  $bResDraw Margin, ($ sCoupleImg El!='') );   837                $ret .=  getProfile OnlineStat us( $user_ is_online,  $bResDraw Margin, ($ sCoupleImg El!='') );
838           $r et .= '</a >';   838           $r et .= '</a >';
839       $ret . = '</div>' ;   839       $ret . = '</div>' ;
840     840  
841       return  $ret;   841       return  $ret;
842   }   842   }
843     843  
844   function g et_member_ icon( $ID,  $float =  'none', $b DrawMargin =FALSE )   844   function g et_member_ icon( $ID,  $float =  'none', $b DrawMargin =FALSE )
845   {   845   {
846       global  $site;   846       global  $site;
847       requir e_once( BX _DIRECTORY _PATH_ROOT  . 'profil ePhotos.ph p' );   847       requir e_once( BX _DIRECTORY _PATH_ROOT  . 'profil ePhotos.ph p' );
848       //$sSe xSql = "SE LECT `Sex`  FROM `Pro files` WHE RE `ID` =  '{$ID}'";   848       //$sSe xSql = "SE LECT `Sex`  FROM `Pro files` WHE RE `ID` =  '{$ID}'";
849       $aSexS ql = getPr ofileInfo(  $ID ); // db_arr( $s SexSql );   849       $aSexS ql = getPr ofileInfo(  $ID ); // db_arr( $s SexSql );
850       $oPhot o = new Pr ofilePhoto s( $ID );   850       $oPhot o = new Pr ofilePhoto s( $ID );
851       $oPhot o -> getAc tiveMediaA rray();   851       $oPhot o -> getAc tiveMediaA rray();
852       $aFile  = $oPhoto  -> getPri maryPhotoA rray();   852       $aFile  = $oPhoto  -> getPri maryPhotoA rray();
853     853  
854       if( ex tFileExist s( $oPhoto  -> sMedia Dir . 'ico n_' . $aFi le['med_fi le'] ) )   854       if( ex tFileExist s( $oPhoto  -> sMedia Dir . 'ico n_' . $aFi le['med_fi le'] ) )
855           $s FileName =  $oPhoto - > sMediaUr l . 'icon_ ' . $aFile ['med_file '];   855           $s FileName =  $oPhoto - > sMediaUr l . 'icon_ ' . $aFile ['med_file '];
856       else   856       else
857       {   857       {
858           if ( $aSexSql ['Sex'] ==  'female'  or $aSexSq l['Sex'] = = 'Female'  )   858           if ( $aSexSql ['Sex'] ==  'female'  or $aSexSq l['Sex'] = = 'Female'  )
859                $sSexPic  = 'woman_ small.gif' ;   859                $sSexPic  = 'woman_ small.gif' ;
860           el seif( $aSe xSql['Sex' ] == 'male ' or $aSex Sql['Sex']  == 'Male'  )   860           el seif( $aSe xSql['Sex' ] == 'male ' or $aSex Sql['Sex']  == 'Male'  )
861                $sSexPic  = 'man_sm all.gif';   861                $sSexPic  = 'man_sm all.gif';
862           el se   862           el se
863                $sSexPic  = 'visito r_small.gi f';   863                $sSexPic  = 'visito r_small.gi f';
864              864           
865           $s FileName =  getTempla teIcon( $s SexPic );   865           $s FileName =  getTempla teIcon( $s SexPic );
866       }   866       }
867     867  
868       $sMarg insAddon =  ($bDrawMa rgin) ? "  margin-rig ht:10px;ma rgin-botto m:10px; "  : '';   868       $sMarg insAddon =  ($bDrawMa rgin) ? "  margin-rig ht:10px;ma rgin-botto m:10px; "  : '';
869       $style  =    869       $style  = 
870           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['iconWidt h'] . 'px; ' .   870           'w idth:' . $ oPhoto ->  aMediaConf ig['size'] ['iconWidt h'] . 'px; ' .
871           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x;' .   871           'h eight:' .  $oPhoto ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x;' .
872           'b ackground- image:url( ' . $sFile Name . '); ';   872           'b ackground- image:url( ' . $sFile Name . '); ';
873          873       
874       $ret =  '';   874       $ret =  '';
875       $ret . = '<div cl ass="thumb nail_block " style="f loat:' . $ float . ';  position: relative;  ">';   875       $ret . = '<div cl ass="thumb nail_block " style="f loat:' . $ float . ';  position: relative;  ">';
876           $r et .= "<a  href=\"".g etProfileL ink($ID)." \">";   876           $r et .= "<a  href=\"".g etProfileL ink($ID)." \">";
877                $ret .=  '<img src= "' . getTe mplateIcon ( 'spacer. gif' ) . ' " style="'  . $sMargi nsAddon. $ style . '"  alt="' .  process_li ne_output(  $aFileNam e['med_tit le'] ) . ' " />';   877                $ret .=  '<img src= "' . getTe mplateIcon ( 'spacer. gif' ) . ' " style="'  . $sMargi nsAddon. $ style . '"  alt="' .  process_li ne_output(  $aFileNam e['med_tit le'] ) . ' " />';
878           $r et .= '</a >';   878           $r et .= '</a >';
879       $ret . = '</div>' ;   879       $ret . = '</div>' ;
880     880  
881       return  $ret;   881       return  $ret;
882   }   882   }
883     883  
884   /*   884   /*
885       Genera te Paginat ion functi on.   885       Genera te Paginat ion functi on.
886       Genera tes string  like:   886       Genera tes string  like:
887       << 1 . .. 3 4 [5]  6 7 ... 1 0 >>   887       << 1 . .. 3 4 [5]  6 7 ... 1 0 >>
888       with l inks.   888       with l inks.
889       attrli st:   889       attrli st:
890       $pages Num - tota l number o f pages.   890       $pages Num - tota l number o f pages.
891       $page  - current  page in se t.   891       $page  - current  page in se t.
892       $pages Url - temp late of li nk for all  pages.   892       $pages Url - temp late of li nk for all  pages.
893           Te mplate sho uld contai n {page} i nstruction  which   893           Te mplate sho uld contai n {page} i nstruction  which
894           wi ll be repl aced by re al page nu mber.   894           wi ll be repl aced by re al page nu mber.
895       $oTemp lConfig ->  paginatio nDifferenc e - define s number   895       $oTemp lConfig ->  paginatio nDifferenc e - define s number
896           of  pages sho wn before  and after  current pa ge.   896           of  pages sho wn before  and after  current pa ge.
897           If  paginatio nDifferenc e = 0 then  all pages  numbers w ill be sho wn without  skipping.   897           If  paginatio nDifferenc e = 0 then  all pages  numbers w ill be sho wn without  skipping.
898   */   898   */
899   function g enPaginati on( $pages Num, $page , $pagesUr l, $pagesO nclick = ' ' )   899   function g enPaginati on( $pages Num, $page , $pagesUr l, $pagesO nclick = ' ' )
900   {   900   {
901       global  $oTemplCo nfig;   901       global  $oTemplCo nfig;
902          902       
903       $pagin Diff = $oT emplConfig  -> pagina tionDiffer ence;   903       $pagin Diff = $oT emplConfig  -> pagina tionDiffer ence;
904       $pagin From = ( $ paginDiff  ? ( $page  - $paginDi ff ) : 2 ) ;   904       $pagin From = ( $ paginDiff  ? ( $page  - $paginDi ff ) : 2 ) ;
905       $pagin To   = ( $ paginDiff  ? ( $page  + $paginDi ff ) : ( $ pagesNum -  1 ) );   905       $pagin To   = ( $ paginDiff  ? ( $page  + $paginDi ff ) : ( $ pagesNum -  1 ) );
906       $needD rop1 = $ne edDrop2 =  true;   906       $needD rop1 = $ne edDrop2 =  true;
907          907       
908       if( $p aginFrom < = 2 )   908       if( $p aginFrom < = 2 )
909       {   909       {
910           $p aginFrom =  2;   910           $p aginFrom =  2;
911           $n eedDrop1 =  false;   911           $n eedDrop1 =  false;
912       }   912       }
913          913       
914       if( $p aginTo >=  ( $pagesNu m - 1 ) )   914       if( $p aginTo >=  ( $pagesNu m - 1 ) )
915       {   915       {
916           $p aginTo = $ pagesNum -  1;   916           $p aginTo = $ pagesNum -  1;
917           $n eedDrop2 =  false;   917           $n eedDrop2 =  false;
918       }   918       }
919          919       
920       $ret =  '<div cla ss="pagina te">';   920       $ret =  '<div cla ss="pagina te">';
921          921       
922       if( $p age > 1 )   922       if( $p age > 1 )
923           $r et .= genP ageSwitche r( ( $page  - 1 ), $p agesUrl, $ pagesOncli ck, false,  '&lt;&lt; ', _t('_Pr evious pag e') );   923           $r et .= genP ageSwitche r( ( $page  - 1 ), $p agesUrl, $ pagesOncli ck, false,  '&lt;&lt; ', _t('_Pr evious pag e') );
924       $ret . = genPageS witcher( 1 , $pagesUr l, $pagesO nclick, ($ page == 1)  );   924       $ret . = genPageS witcher( 1 , $pagesUr l, $pagesO nclick, ($ page == 1)  );
925       $ret . = ($needDr op1 ? ' .. . ' : '');   925       $ret . = ($needDr op1 ? ' .. . ' : '');
926       for( $ p = $pagin From; $p < = $paginTo ; $p++ )   926       for( $ p = $pagin From; $p < = $paginTo ; $p++ )
927           $r et .= genP ageSwitche r( $p, $pa gesUrl, $p agesOnclic k, ($page  == $p) );   927           $r et .= genP ageSwitche r( $p, $pa gesUrl, $p agesOnclic k, ($page  == $p) );
928       $ret . = ($needDr op2 ? ' .. . ' : '');   928       $ret . = ($needDr op2 ? ' .. . ' : '');
929       $ret . = genPageS witcher( $ pagesNum,  $pagesUrl,  $pagesOnc lick, ($pa ge == $pag esNum) );   929       $ret . = genPageS witcher( $ pagesNum,  $pagesUrl,  $pagesOnc lick, ($pa ge == $pag esNum) );
930       if( $p age < $pag esNum )   930       if( $p age < $pag esNum )
931           $r et .= genP ageSwitche r( ( $page  + 1 ), $p agesUrl, $ pagesOncli ck, false,  '&gt;&gt; ', _t('_Ne xt page')  );   931           $r et .= genP ageSwitche r( ( $page  + 1 ), $p agesUrl, $ pagesOncli ck, false,  '&gt;&gt; ', _t('_Ne xt page')  );
932          932       
933       $ret . = '</div>' ;   933       $ret . = '</div>' ;
934       return  $ret;   934       return  $ret;
935   }   935   }
936     936  
937   /* This fu nction gen erates pag e link or  just a tex t (if page  is curren t)   937   /* This fu nction gen erates pag e link or  just a tex t (if page  is curren t)
938       attrli st:   938       attrli st:
939       $page  - integer  number of  page (will  be put in stead of { page} inst ruction to  template   939       $page  - integer  number of  page (will  be put in stead of { page} inst ruction to  template
940       $link  - template  of page l ink   940       $link  - template  of page l ink
941       $curre nt - defin es if page  link is a ctive or n ot (curren t page)   941       $curre nt - defin es if page  link is a ctive or n ot (curren t page)
942       $sign  - string w hich is sh own instea d of page  number in  link text  ( Ex.: <<  )   942       $sign  - string w hich is sh own instea d of page  number in  link text  ( Ex.: <<  )
943       $title  - alterna tive link  tip text ( <a title=" ..." ). Ex .: Previou s page   943       $title  - alterna tive link  tip text ( <a title=" ..." ). Ex .: Previou s page
944   */   944   */
945   function g enPageSwit cher( $pag e, $link,  $onclick =  '', $curr ent = fals e, $sign =  null, $ti tle = null  )   945   function g enPageSwit cher( $pag e, $link,  $onclick =  '', $curr ent = fals e, $sign =  null, $ti tle = null  )
946   {   946   {
947       if( !i sset( $sig n ) )   947       if( !i sset( $sig n ) )
948           $s ign = $pag e;   948           $s ign = $pag e;
949          949       
950       if( !i sset( $tit le ) )   950       if( !i sset( $tit le ) )
951           $t itle = $si gn;   951           $t itle = $si gn;
952          952       
953       $link     = htmls pecialchar s( str_rep lace( "{pa ge}", $pag e, $link )  );   953       $link     = htmls pecialchar s( str_rep lace( "{pa ge}", $pag e, $link )  );
954       $oncli ck = htmls pecialchar s( str_rep lace( "{pa ge}", $pag e, $onclic k ) );   954       $oncli ck = htmls pecialchar s( str_rep lace( "{pa ge}", $pag e, $onclic k ) );
955     955  
956       if( $o nclick )   956       if( $o nclick )
957           $a ddOn = " o nclick=\"$ onclick\"" ;   957           $a ddOn = " o nclick=\"$ onclick\"" ;
958          958       
959       $ret =  '';   959       $ret =  '';
960       if( $c urrent )   960       if( $c urrent )
961           $r et = " <i> $sign</i>  ";   961           $r et = " <i> $sign</i>  ";
962       else   962       else
963           $r et = " <a  href=\"$li nk\" title =\"$title\ "{$addOn}> $sign</a>  ";   963           $r et = " <a  href=\"$li nk\" title =\"$title\ "{$addOn}> $sign</a>  ";
964          964       
965       return  $ret;   965       return  $ret;
966   }   966   }
967     967  
968   function g enResPerPa ge( $aValu es, $iCurr entValue,  $sResPerPa geTmpl ) {   968   function g enResPerPa ge( $aValu es, $iCurr entValue,  $sResPerPa geTmpl ) {
969          969       
970       $sUrl  = htmlspec ialchars(  str_replac e( '{res_p er_page}',  "' + this .value + ' ", $sResPe rPageTmpl  ) );   970       $sUrl  = htmlspec ialchars(  str_replac e( '{res_p er_page}',  "' + this .value + ' ", $sResPe rPageTmpl  ) );
971          971       
972       if( !i n_array( $ iCurrentVa lue, $aVal ues ) )   972       if( !i n_array( $ iCurrentVa lue, $aVal ues ) )
973           $a Values[] =  $iCurrent Value;   973           $a Values[] =  $iCurrent Value;
974          974       
975       sort(  $aValues ) ;   975       sort(  $aValues ) ;
976          976       
977       $sRet  = '<div cl ass="searc hResPerPag e">';   977       $sRet  = '<div cl ass="searc hResPerPag e">';
978          978       
979       $sRet  .= _t( '_R esults per  page' ) .  ': ';   979       $sRet  .= _t( '_R esults per  page' ) .  ': ';
980          980       
981       $sRet  .= "<selec t onchange =\"window. location =  '{$sUrl}' ;\">";   981       $sRet  .= "<selec t onchange =\"window. location =  '{$sUrl}' ;\">";
982          982       
983       foreac h( $aValue s as $iVal ue ) {   983       foreac h( $aValue s as $iVal ue ) {
984           $s Selected =  ( $iCurre ntValue ==  $iValue )  ? ' selec ted="selec ted"' : '' ;   984           $s Selected =  ( $iCurre ntValue ==  $iValue )  ? ' selec ted="selec ted"' : '' ;
985              985           
986           $s Ret .= '<o ption valu e="' . $iV alue . '"'  . $sSelec ted . '>'  . $iValue  . '</optio n>';   986           $s Ret .= '<o ption valu e="' . $iV alue . '"'  . $sSelec ted . '>'  . $iValue  . '</optio n>';
987       }   987       }
988          988       
989       $sRet  .= '</sele ct>';   989       $sRet  .= '</sele ct>';
990          990       
991       $sRet  .= '</div> ';   991       $sRet  .= '</div> ';
992          992       
993       return  $sRet;   993       return  $sRet;
994   }   994   }
995     995  
996     996  
997   function g etMainLogo ()   997   function g etMainLogo ()
998   {   998   {
999       global  $dir;   999       global  $dir;
1000       global  $site;   1000       global  $site;
1001          1001       
1002       $ret =  '';   1002       $ret =  '';
1003          1003       
1004       foreac h( array(  'gif', 'jp g', 'png'  ) as $ext  )   1004       foreac h( array(  'gif', 'jp g', 'png'  ) as $ext  )
1005           if ( file_exi sts( $dir[ 'mediaImag es']."logo .$ext" ) )   1005           if ( file_exi sts( $dir[ 'mediaImag es']."logo .$ext" ) )
1006           {   1006           {
1007                $ret .=  '<a href=" ' . $site[ 'url'] . ' ">';   1007                $ret .=  '<a href=" ' . $site[ 'url'] . ' ">';
1008                    $ret  .= "<img  src=\"{$si te['mediaI mages']}lo go.$ext\"  class=\"ma inLogo\" a lt=\"logo\ " />";   1008                    $ret  .= "<img  src=\"{$si te['mediaI mages']}lo go.$ext\"  class=\"ma inLogo\" a lt=\"logo\ " />";
1009                $ret .=  '</a>';   1009                $ret .=  '</a>';
1010                break;   1010                break;
1011           }   1011           }
1012       return  $ret;   1012       return  $ret;
1013   }   1013   }
1014     1014  
1015   function g etPromoIma gesArray()   1015   function g etPromoIma gesArray()
1016   {   1016   {
1017       global  $dir;   1017       global  $dir;
1018          1018       
1019       $aFile s = array( );   1019       $aFile s = array( );
1020          1020       
1021       $rDir  = opendir(  $dir['ima gesPromo']  );   1021       $rDir  = opendir(  $dir['ima gesPromo']  );
1022          1022       
1023       if( $r Dir ) {   1023       if( $r Dir ) {
1024           wh ile( $sFil e = readdi r( $rDir )  ) {   1024           wh ile( $sFil e = readdi r( $rDir )  ) {
1025                if( $sFi le == '.'  or $sFile  == '..' or  !is_file(  $dir['ima gesPromo']  . $sFile  ) )   1025                if( $sFi le == '.'  or $sFile  == '..' or  !is_file(  $dir['ima gesPromo']  . $sFile  ) )
1026                    cont inue;   1026                    cont inue;
1027                   1027                
1028                $aFiles[ ] = $sFile ;   1028                $aFiles[ ] = $sFile ;
1029           }   1029           }
1030           cl osedir( $r Dir );   1030           cl osedir( $r Dir );
1031       }   1031       }
1032          1032       
1033       shuffl e( $aFiles  );   1033       shuffl e( $aFiles  );
1034          1034       
1035       return  $aFiles;   1035       return  $aFiles;
1036   }   1036   }
1037     1037  
1038   function g etPromoCod e()   1038   function g etPromoCod e()
1039   {   1039   {
1040       global  $site;   1040       global  $site;
1041       global  $logged;   1041       global  $logged;
1042          1042       
1043       if( ge tParam( 'e nable_flas h_promo' )  != 'on' )   1043       if( ge tParam( 'e nable_flas h_promo' )  != 'on' )
1044           $s Code = '<d iv class=" promo_code _wrapper"> ' . getPar am( 'custo m_promo_co de' ) . '< /div>';   1044           $s Code = '<d iv class=" promo_code _wrapper"> ' . getPar am( 'custo m_promo_co de' ) . '< /div>';
1045       else {   1045       else {
1046           $a Images = g etPromoIma gesArray() ;   1046           $a Images = g etPromoIma gesArray() ;
1047              1047           
1048           $s ImagesEls  = '';   1048           $s ImagesEls  = '';
1049           fo reach ($aI mages as $ sImg)   1049           fo reach ($aI mages as $ sImg)
1050                $sImages Els .= '<i mg src="'. $site['ima gesPromo'] .$sImg.'"  />';   1050                $sImages Els .= '<i mg src="'. $site['ima gesPromo'] .$sImg.'"  />';
1051              1051           
1052           $s PromoLink  = $site['u rl'] . ( $ logged['me mber'] ? ' member.php ' : 'join. php' );   1052           $s PromoLink  = $site['u rl'] . ( $ logged['me mber'] ? ' member.php ' : 'join. php' );
1053           $s Code = <<< EOF   1053           $s Code = <<< EOF
1054                <script  type="text /javascrip t" src="{$ site['url' ]}inc/js/j query.dolP romo.js">< /script>   1054                <script  type="text /javascrip t" src="{$ site['url' ]}inc/js/j query.dolP romo.js">< /script>
1055                <script  type="text /javascrip t">   1055                <script  type="text /javascrip t">
1056                    $(do cument).re ady( funct ion() {   1056                    $(do cument).re ady( funct ion() {
1057                         $( '#index Photo' ).d olPromo( 6 000, 0.281 25 );   1057                         $( '#index Photo' ).d olPromo( 6 000, 0.281 25 );
1058                    } );   1058                    } );
1059                </script >   1059                </script >
1060                <div id= "indexPhot o" onclick ="location ='$sPromoL ink'">   1060                <div id= "indexPhot o" onclick ="location ='$sPromoL ink'">
1061                    {$sI magesEls}   1061                    {$sI magesEls}
1062                </div>   1062                </div>
1063   EOF;   1063   EOF;
1064     1064  
1065       }   1065       }
1066          1066       
1067       return  $sCode;   1067       return  $sCode;
1068   }   1068   }
1069     1069  
1070   function g etTemplate Icon( $sFi leName )   1070   function g etTemplate Icon( $sFi leName )
1071   {   1071   {
1072       global  $site;   1072       global  $site;
1073       global  $dir;   1073       global  $dir;
1074       global  $tmpl;   1074       global  $tmpl;
1075     1075  
1076       $sBase  = $dir['r oot'] . 't emplates/b ase/images /icons/' .  $sFileNam e;   1076       $sBase  = $dir['r oot'] . 't emplates/b ase/images /icons/' .  $sFileNam e;
1077       $sTemp late = $di r['root']  . 'templat es/tmpl_'  . $tmpl .  '/images/i cons/' . $ sFileName;   1077       $sTemp late = $di r['root']  . 'templat es/tmpl_'  . $tmpl .  '/images/i cons/' . $ sFileName;
1078     1078  
1079       if( ex tFileExist s( $sTempl ate ) )   1079       if( ex tFileExist s( $sTempl ate ) )
1080       {   1080       {
1081           $i conUrl = $ site['icon s'] . $sFi leName;   1081           $i conUrl = $ site['icon s'] . $sFi leName;
1082       }   1082       }
1083       else   1083       else
1084       {   1084       {
1085           if ( extFileE xists( $di r['base']  . 'images/ icons/' .  $sFileName  ) )   1085           if ( extFileE xists( $di r['base']  . 'images/ icons/' .  $sFileName  ) )
1086           {   1086           {
1087                $iconUrl  = $site[' base'] . ' images/ico ns/' . $sF ileName;   1087                $iconUrl  = $site[' base'] . ' images/ico ns/' . $sF ileName;
1088           }   1088           }
1089           el se   1089           el se
1090           {   1090           {
1091                $iconUrl  = getTemp lateIcon(  'spacer.gi f' );   1091                $iconUrl  = getTemp lateIcon(  'spacer.gi f' );
1092           }   1092           }
1093       }   1093       }
1094     1094  
1095       return  $iconUrl;   1095       return  $iconUrl;
1096   }   1096   }
1097     1097  
1098   function g etVersionC omment()   1098   function g etVersionC omment()
1099   {   1099   {
1100       global  $site;   1100       global  $site;
1101       $aVer  = explode(  '.', $sit e['ver'] ) ;   1101       $aVer  = explode(  '.', $sit e['ver'] ) ;
1102          1102       
1103       // ver sion outpu t made for  debug pos sibilities .   1103       // ver sion outpu t made for  debug pos sibilities .
1104       // ran domizing m ade for se curity iss ues. do no t change i t...   1104       // ran domizing m ade for se curity iss ues. do no t change i t...
1105       $aVerR [0] = $aVe r[0];   1105       $aVerR [0] = $aVe r[0];
1106       $aVerR [1] = rand ( 0, 100 ) ;   1106       $aVerR [1] = rand ( 0, 100 ) ;
1107       $aVerR [2] = $aVe r[1];   1107       $aVerR [2] = $aVe r[1];
1108       $aVerR [3] = rand ( 0, 100 ) ;   1108       $aVerR [3] = rand ( 0, 100 ) ;
1109       $aVerR [4] = $sit e['build'] ;   1109       $aVerR [4] = $sit e['build'] ;
1110          1110       
1111       //remo ve leading  zeros   1111       //remo ve leading  zeros
1112       while(  $aVerR[4] [0] === '0 ' )   1112       while(  $aVerR[4] [0] === '0 ' )
1113           $a VerR[4] =  substr( $a VerR[4], 1  );   1113           $a VerR[4] =  substr( $a VerR[4], 1  );
1114          1114       
1115       return  '<!-- ' .  implode(  ' ', $aVer R ) . ' -- >';   1115       return  '<!-- ' .  implode(  ' ', $aVer R ) . ' -- >';
1116   }   1116   }
1117     1117  
1118   // ------- ---------- ---------- -------- s ite statis tick funct ions ----- ---------- ---------- ---------- ---//   1118   // ------- ---------- ---------- -------- s ite statis tick funct ions ----- ---------- ---------- ---------- ---//
1119     1119  
1120   function g etSiteStat Body($aVal , $sMode =  '')   1120   function g etSiteStat Body($aVal , $sMode =  '')
1121   {   1121   {
1122       global  $site;   1122       global  $site;
1123          1123       
1124       $sLink  = strlen( $aVal['lin k']) > 0 ?  '<a href= "'.$site[' url'].$aVa l['link']. '">'._t('_ '.$aVal['c apt']).'</ a>' : _t(' _'.$aVal[' capt']) ;   1124       $sLink  = strlen( $aVal['lin k']) > 0 ?  '<a href= "'.$site[' url'].$aVa l['link']. '">'._t('_ '.$aVal['c apt']).'</ a>' : _t(' _'.$aVal[' capt']) ;
1125       if ( $ sMode != ' admin' )   1125       if ( $ sMode != ' admin' )
1126       {   1126       {
1127           $s BlockId =  '';   1127           $s BlockId =  '';
1128           $i Num = strl en($aVal[' query']) >  0 ? db_va lue($aVal[ 'query'])  : 0;   1128           $i Num = strl en($aVal[' query']) >  0 ? db_va lue($aVal[ 'query'])  : 0;
1129           if  ($aVal['n ame'] == ' pls')   1129           if  ($aVal['n ame'] == ' pls')
1130           {   1130           {
1131                $iNum =  $iNum + db _value("SE LECT COUNT (`ID`) FRO M `polls_q ` WHERE `A ctive`='on '");   1131                $iNum =  $iNum + db _value("SE LECT COUNT (`ID`) FRO M `polls_q ` WHERE `A ctive`='on '");
1132           }   1132           }
1133       }   1133       }
1134       else   1134       else
1135       {   1135       {
1136           $s BlockId =  "id='{$aVa l['name']} '";   1136           $s BlockId =  "id='{$aVa l['name']} '";
1137           $i Num  = str len($aVal[ 'adm_query ']) > 0 ?  db_value($ aVal['adm_ query']) :  0;   1137           $i Num  = str len($aVal[ 'adm_query ']) > 0 ?  db_value($ aVal['adm_ query']) :  0;
1138           if  ( strlen( $aVal['adm _link']) >  0 )   1138           if  ( strlen( $aVal['adm _link']) >  0 )
1139           {   1139           {
1140                if( subs tr( $aVal[ 'adm_link' ], 0, strl en( 'javas cript:' )  ) == 'java script:' )  // smile  :))   1140                if( subs tr( $aVal[ 'adm_link' ], 0, strl en( 'javas cript:' )  ) == 'java script:' )  // smile  :))
1141                {   1141                {
1142                    $sHr ef = 'java script:voi d(0);';   1142                    $sHr ef = 'java script:voi d(0);';
1143                    $sOn click = 'o nclick="'  . $aVal['a dm_link']  . '"';   1143                    $sOn click = 'o nclick="'  . $aVal['a dm_link']  . '"';
1144                           1144                        
1145                    $aAd min = db_a rr( "SELEC T * FROM ` Admins` LI MIT 1" );   1145                    $aAd min = db_a rr( "SELEC T * FROM ` Admins` LI MIT 1" );
1146                    $sOn click = st r_replace(  '{adminLo gin}', $aA dmin['Name '], $sOncl ick );   1146                    $sOn click = st r_replace(  '{adminLo gin}', $aA dmin['Name '], $sOncl ick );
1147                    $sOn click = st r_replace(  '{adminPa ss}',  $aA dmin['Pass word'], $s Onclick );   1147                    $sOn click = st r_replace(  '{adminPa ss}',  $aA dmin['Pass word'], $s Onclick );
1148                }   1148                }
1149                else   1149                else
1150                {   1150                {
1151                    $sHr ef = $aVal ['adm_link '];   1151                    $sHr ef = $aVal ['adm_link '];
1152                    $sOn click = '' ;   1152                    $sOn click = '' ;
1153                }   1153                }
1154                $sLink =  '<a href= "'.$sHref. '" '.$sOnc lick.'>'._ t('_'.$aVa l['capt']) .'</a>';   1154                $sLink =  '<a href= "'.$sHref. '" '.$sOnc lick.'>'._ t('_'.$aVa l['capt']) .'</a>';
1155           }   1155           }
1156           el se   1156           el se
1157           {   1157           {
1158                $sLink =  _t('_'.$a Val['capt' ]);   1158                $sLink =  _t('_'.$a Val['capt' ]);
1159           }   1159           }
1160           if  ($sKey ==  'pls')   1160           if  ($sKey ==  'pls')
1161           {   1161           {
1162                $iNum =  $iNum + db _value("SE LECT COUNT (`ID`) FRO M `polls_q ` WHERE `A ctive`<>'o n'");   1162                $iNum =  $iNum + db _value("SE LECT COUNT (`ID`) FRO M `polls_q ` WHERE `A ctive`<>'o n'");
1163           }   1163           }
1164       }   1164       }
1165       $sCode  .= '<div  class="sit eStatUnit"  '. $sBloc kId .'><im g src="'.g etTemplate Icon($aVal ['icon']). '" alt=""  /> '.$iNum .' '.$sLin k.'</div>' ;   1165       $sCode  .= '<div  class="sit eStatUnit"  '. $sBloc kId .'><im g src="'.g etTemplate Icon($aVal ['icon']). '" alt=""  /> '.$iNum .' '.$sLin k.'</div>' ;
1166              1166           
1167       return  $sCode;   1167       return  $sCode;
1168   }   1168   }
1169     1169  
1170   function g etSiteStat Admin()   1170   function g etSiteStat Admin()
1171   {   1171   {
1172       global  $site;   1172       global  $site;
1173       global  $dir;   1173       global  $dir;
1174          1174       
1175       $aAdmi n = '';   1175       $aAdmi n = '';
1176       $sProf Video = '' ;   1176       $sProf Video = '' ;
1177       $sAdd  = '_a';   1177       $sAdd  = '_a';
1178       $sProf Video = ge tApplicati onContent( 'video', ' stat', arr ay(), true );   1178       $sProf Video = ge tApplicati onContent( 'video', ' stat', arr ay(), true );
1179          1179       
1180       $sqlQu ery = "SEL ECT `Name`  as `name` ,   1180       $sqlQu ery = "SEL ECT `Name`  as `name` ,
1181                             `Title ` as `capt `,   1181                             `Title ` as `capt `,
1182                             `UserQ uery` as ` query`,   1182                             `UserQ uery` as ` query`,
1183                             `UserL ink` as `l ink`,   1183                             `UserL ink` as `l ink`,
1184                             `IconN ame` as `i con`,   1184                             `IconN ame` as `i con`,
1185                             `Admin Query` as  `adm_query `,   1185                             `Admin Query` as  `adm_query `,
1186                             `Admin Link` as ` adm_link`   1186                             `Admin Link` as ` adm_link`
1187                             FROM ` SiteStat`" ;   1187                             FROM ` SiteStat`" ;
1188          1188       
1189       $rData  = db_res( $sqlQuery) ;   1189       $rData  = db_res( $sqlQuery) ;
1190          1190       
1191       $sCode   = $sProf Video.'<di v>';   1191       $sCode   = $sProf Video.'<di v>';
1192          1192       
1193       $fStat  = @fopen( BX_DIRECTO RY_PATH_IN C . 'db_ca ched/SiteS tat.inc',  'w');   1193       $fStat  = @fopen( BX_DIRECTO RY_PATH_IN C . 'db_ca ched/SiteS tat.inc',  'w');
1194       if( !$ fStat )   1194       if( !$ fStat )
1195                return f alse;   1195                return f alse;
1196     1196  
1197       fwrite ($fStat, " return arr ay( \n");   1197       fwrite ($fStat, " return arr ay( \n");
1198       $sLine  = '';   1198       $sLine  = '';
1199     1199  
1200       while  ($aVal = m ysql_fetch _assoc($rD ata))   1200       while  ($aVal = m ysql_fetch _assoc($rD ata))
1201       {   1201       {
1202           $s Code .= ge tSiteStatB ody($aVal,  'admin');   1202           $s Code .= ge tSiteStatB ody($aVal,  'admin');
1203           $s Line .= ge nSiteStatF ile($aVal) ;   1203           $s Line .= ge nSiteStatF ile($aVal) ;
1204       }   1204       }
1205          1205       
1206       $sLine  = rtrim($ sLine, ",\ n")."\n);" ;   1206       $sLine  = rtrim($ sLine, ",\ n")."\n);" ;
1207       fwrite ($fStat, $ sLine);   1207       fwrite ($fStat, $ sLine);
1208       fclose ($fStat);   1208       fclose ($fStat);
1209          1209       
1210       $sCode  .= '</div ><div clas s="clear_b oth"></div >';   1210       $sCode  .= '</div ><div clas s="clear_b oth"></div >';
1211          1211       
1212       return  $sCode;   1212       return  $sCode;
1213   }   1213   }
1214     1214  
1215   function g etSiteStat User()   1215   function g etSiteStat User()
1216   {   1216   {
1217       global  $dir;   1217       global  $dir;
1218       global  $aStat;   1218       global  $aStat;
1219          1219       
1220       $aStat  = @eval(  @file_get_ contents(  BX_DIRECTO RY_PATH_IN C . 'db_ca ched/SiteS tat.inc' ) );   1220       $aStat  = @eval(  @file_get_ contents(  BX_DIRECTO RY_PATH_IN C . 'db_ca ched/SiteS tat.inc' ) );
1221          1221       
1222       if( !$ aStat )   1222       if( !$ aStat )
1223           $a Stat = arr ay();   1223           $a Stat = arr ay();
1224     1224  
1225       $sCode   = $sProf Video.'<di v>';   1225       $sCode   = $sProf Video.'<di v>';
1226     1226  
1227       foreac h($aStat a s $aVal)   1227       foreac h($aStat a s $aVal)
1228           $s Code .= ge tSiteStatB ody($aVal) ;   1228           $s Code .= ge tSiteStatB ody($aVal) ;
1229          1229       
1230       $sCode  .= '</div ><div clas s="clear_b oth"></div >';   1230       $sCode  .= '</div ><div clas s="clear_b oth"></div >';
1231          1231       
1232       return  $sCode;   1232       return  $sCode;
1233   }   1233   }
1234     1234  
1235   function g enSiteStat File($aVal )   1235   function g enSiteStat File($aVal )
1236   {   1236   {
1237          1237       
1238       $oMenu  = new BxD olMenu();   1238       $oMenu  = new BxD olMenu();
1239          1239       
1240       $sLink  = $oMenu  -> getCurr Link($aVal ['link']);   1240       $sLink  = $oMenu  -> getCurr Link($aVal ['link']);
1241       $sLine  = "'{$aVa l['name']} '=>array(' capt'=>'{$ aVal['capt ']}', 'que ry'=>'".ad dslashes($ aVal['quer y'])."', ' link'=>'$s Link', 'ic on'=>'{$aV al['icon'] }'),\n";   1241       $sLine  = "'{$aVa l['name']} '=>array(' capt'=>'{$ aVal['capt ']}', 'que ry'=>'".ad dslashes($ aVal['quer y'])."', ' link'=>'$s Link', 'ic on'=>'{$aV al['icon'] }'),\n";
1242          1242       
1243       return  $sLine;   1243       return  $sLine;
1244   }   1244   }
1245     1245  
1246   ?>   1246   ?>