242. File Comparison Report

Produced on Mon May 12 13:05:24 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.

242.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\inc profile_disp.inc.php Mon Dec 24 09:44:18 2007 UTC
2 Mon May 12 13:05:24 2008 UTC

242.2 Comparison summary

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

242.3 Comparison options

Whitespace
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

242.4 Active regular expressions

No regular expressions were active.

242.5 Comparison detail

1   <?    
2      
3   /********* ********** ********** ********** ********** ********** ********** ******    
4   *                              D olphin Sma rt Communi ty Builder    
5   *                                 --------- --------    
6   *     begi n                 : M on Mar 23  2006    
7   *     copy right             : ( C) 2006 Bo onEx Group    
8   *     webs ite               : h ttp://www. boonex.com /    
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder    
10   *    
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/    
13   *    
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.    
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    
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m    
19   ********** ********** ********** ********** ********** ********** ********** *****/    
20      
21   require_on ce('header .inc.php') ;    
22   require_on ce(BX_DIRE CTORY_PATH _INC . 'ad min.inc.ph p');    
23   require_on ce(BX_DIRE CTORY_PATH _INC . 'pa rams.inc.p hp');    
24   require_on ce(BX_DIRE CTORY_PATH _INC . 'pr ofiles.inc .php');    
25      
26   $c_search_ table = "# d7d3fa";    
27      
28   function g et_input_n ame (  $ar r )    
29   {    
30       $vals  = split (" ,", $arr[' name']);    
31       if ( s trlen($val s[1]) )    
32           re turn $vals [1];    
33       else    
34           re turn $vals [0];    
35   }    
36      
37   function g et_field_n ame (  $ar r )    
38   {    
39       $vals  = split (" ,", $arr[' name']);    
40       return  $vals[0];    
41   }    
42      
43   function g et_user_na me( $id )    
44   {    
45       $arr =  getProfil eInfo( $id  );    
46       return  $arr['Nic kName'];    
47   }    
48      
49   function g et_user_st atus( $id  )    
50   {    
51       $arr =  getProfil eInfo( $id  );    
52       return  $arr['Sta tus'];    
53   }    
54      
55   function i s_in_set (  $vv, $set  )    
56   {    
57       $vals  = preg_spl it ("/[,\' ]+/", $set , -1, PREG _SPLIT_NO_ EMPTY);    
58       foreac h ( $vals  as $v )    
59           if  ( $v == $ vv ) retur n 1;    
60       return  0;    
61   }    
62      
63   function p rint_row_c ontent( $f irst_row,  $arr, $con tent, $tr_ class = "" , $columns  = 3, $wid th_first =  "" )    
64   {    
65       global  $_page;    
66      
67       $ret =  "";    
68       $is_ed it_form =  $_page['na me_index']  != 7 ? tr ue : false ;    
69      
70       if ( ! $is_edit_f orm ) {    
71           if  ( $first_ row ) {    
72                $class1  = "class=\ "profile_t d_1_first\ "";    
73                $class2  = "class=\ "profile_t d_2_first\ "";    
74           }  else {    
75                $class1  = "class=\ "profile_t d_1\"";    
76                $class2  = "class=\ "profile_t d_2\"";    
77           }    
78       } else  {    
79           if  ( $first_ row ) {    
80                $class1  = "class=\ "join_td_1 _first\"";    
81                $class2  = "class=\ "join_td_2 _first\"";    
82           }  else {    
83                $class1  = "class=\ "join_td_1 \"";    
84                $class2  = "class=\ "join_td_2 \"";    
85           }    
86       }    
87      
88       if ( (  $arr['gro up_mark']  == "" || $ arr['group _mark'] ==  "b" ) &&  $columns >  1 )    
89       {    
90           if  ( strlen( $width_fir st) ) $w =  "width='$ width_firs t'";    
91           $r et .= "<tr ><td $w $c lass1>";    
92           if  ( $is_edi t_form &&  strlen(tri m($arr['ch eck'])) )    
93                $ret .=  '<font col or="red">* </font>&nb sp;';    
94           if  ( strlen( $arr['name disp']) >  0 ) $ret . = _t( $arr ['namedisp '] ) . ':  ';    
95                                           els e $ret .=  "&nbsp;";    
96           $r et .= "</t d><td $cla ss2>\n";    
97       }    
98      
99       if ( $ arr['group _mark'] ==  "b" || $a rr['group_ mark'] ==  "c"   || $ arr['group _mark'] ==  "e" )    
100       {    
101           $r et .= $arr ['group_te xt_b'];    
102       }    
103       $ret . = $content ;    
104      
105       if ( $ arr['group _mark'] ==  "c" || $a rr['group_ mark'] ==  "e" || $ar r['group_m ark'] == " b")    
106       {    
107           $r et .= $arr ['group_te xt_a'];    
108       }    
109      
110       if ( ( $arr['grou p_mark'] = = "" || $a rr['group_ mark'] ==  "e")  && $ columns >  2 )    
111       {    
112           $r et .= "</t d><td $cla ss2>";    
113           if  ( strlen( $arr['name note']) >  0 ) $ret . = _t( $arr ['namenote '], $arr[' min_length '], $arr[' max_length '] );    
114                                           els e $ret .=  "&nbsp;";    
115           $r et .= "</t d></tr>\n" ;    
116       }    
117       elseif  ( $arr['g roup_mark' ] == '' &&  $columns  > 2 && ($a rr['type']  == 'r' ||  $arr['typ e'] == 'rb ' || $arr[ 'type'] ==  'set') )    
118       {    
119           $r et .= "</t d><td $cla ss2>&nbsp; </td></tr> \n";    
120       }    
121       elseif  ( $arr['g roup_mark' ] == "e" | | $arr['gr oup_mark']  == "" )    
122       {    
123           $r et .= "</t d></tr>\n" ;    
124       }    
125      
126       return  $ret;    
127   }    
128      
129   function p rint_row_e num( $firs t_row, $ar r, $val =  "", $tr_cl ass = "",   $javascri pt = "", $ rd = 0, $c olumns = 3 , $width_f irst = "",  $read_onl y = 0 )    
130   {    
131       $fname  = get_inp ut_name (  $arr );    
132      
133       $ret =  "";    
134      
135       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
136      
137       if ( ! $rd )    
138       {    
139           if  ( !$read_ only )    
140           {    
141                $ret .=  "<select n ame=\"$fna me\" id=\" $fname\" $ javascript >\n";    
142                foreach  ( $vals as  $v )    
143                {    
144                    if (  strlen(tr im($v)) <=  0 ) conti nue;    
145                    if (  $v == $va l ) $sel =  " selecte d=\"select ed\" ";    
146                                  e lse $sel =  "";    
147                    $ret  .= "<opti on value=\ "$v\" $sel >"._t("_". $v)."</opt ion>\n";    
148                }    
149                $ret .=  "</select> \n";    
150           }    
151           el se    
152           {    
153                $ret .=  "<input ty pe=\"text\ " name=\"$ fname\" id =\"$fname\ " $javascr ipt value= \"". _t("_ ".$val) ." \" readonl y=\"readon ly\" />\n" ;    
154           }    
155       }    
156       else    
157       {    
158           fo reach ( $v als as $v  )    
159           {    
160                if ( str len(trim($ v)) <= 0 )  continue;    
161                if ( $v  == $val )    
162                {    
163                    $ret  .= _t("_" .$v);    
164                    brea k;    
165                }    
166           }    
167       }    
168      
169       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
170   }    
171      
172   function p rint_row_r adio_butto n($first_r ow,$arr, $ val = "",  $tr_class  = "", $rd  = 0, $colu mns = 3, $ width_firs t = "", $r ead_only =  0 )    
173   {    
174       $fname  = get_inp ut_name (  $arr );    
175           
176       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
177       $ret =  "";    
178       $disab led = ($re ad_only ?  " disabled =\"disable d\" " : "" );    
179      
180       if ( ! $rd )    
181       {    
182           fo reach ( $v als as $v  )    
183           {    
184                if ( str len(trim($ v)) <= 0 )  continue;    
185                if ( str len($val)  ) {    
186                    if (  $v == $va l ) $sel =  " checked =\"checked \" ";    
187                                  e lse $sel =  "";    
188                } else {    
189                    if (  !$bfirst  )    
190                    {    
191                         $sel = " c hecked=\"c hecked\" " ;    
192                         $bfirst =  1;    
193                    }    
194                    else    
195                         $sel = "";    
196                }    
197      
198                $ret .=  "<input ty pe=\"radio \" name=\" $fname\" v alue=\"$v\ " $sel $di sabled />" ._t("_".$v )."&nbsp;  &nbsp;\n";    
199           }    
200       }    
201       else    
202       {    
203           fo reach ( $v als as $v  )    
204           {    
205                if ( str len(trim($ v)) <= 0 )  continue;    
206                if ( str len($val)  )    
207                {    
208                    if (  $v == $va l )    
209                    {    
210                         $ret .= _t ("_".$v);    
211                         break;    
212                    }    
213                }    
214           }    
215       }    
216      
217       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
218   }    
219      
220      
221   function p rint_row_s et( $first _row, $arr , $val = " ", $tr_cla ss = "", $ rd = 0, $c olumns = 3 , $width_f irst = "",  $read_onl y = 0 )    
222   {    
223       $fname  = get_inp ut_name (  $arr );    
224      
225       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
226       $disab led = ($re ad_only ?  " disabled =\"disable d\" " : "" );    
227       $ret =  "";    
228      
229       if ( ! $rd )    
230       {    
231           $r et .= "<ta ble cellsp acing=\"0\ " cellpadd ing=\"1\"  border=\"0 \" align=\ "left\">\n ";    
232           fo reach ( $v als as $v  )    
233           {    
234                if ( str len(trim($ v)) <= 0 )  continue;    
235                if ( is_ in_set( $v , $val ) )    
236                    $sel  = " check ed=\"check ed\" ";    
237                else    
238                    $sel  = "";    
239                $ret .=  "<tr><td>< input type =\"checkbo x\" name=\ "{$fname}_ {$v}\" id= \"{$fname} _{$v}\" $s el $disabl ed /></td> <td>&nbsp; <label for =\"{$fname }_{$v}\">" ._t("_".$v )."</label ></td></tr >\n";    
240           }    
241           $r et .= "</t able>\n";    
242       }    
243       else    
244       {    
245           $s el_vals =  preg_split  ("/[,\']+ /", $val,  -1, PREG_S PLIT_NO_EM PTY);    
246           fo reach ( $s el_vals as  $v )    
247           {    
248                if ( str len($ret)  )    
249                    $ret  .= ", ".  _t("_".$v) ;    
250                else    
251                    $ret  = _t("_". $v);    
252           }    
253       }    
254      
255       if ( ! strlen($re t) ) $ret  = "&nbsp;" ;    
256       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
257   }    
258      
259   function p rint_row_e num_years(  $first_ro w, $arr, $ val = "",  $tr_class  = "", $rd  = 0, $colu mns = 3, $ width_firs t = "", $r ead_only =  0,  $sRea lFName=''  )    
260   {    
261       global  $short_da te_format;    
262       global  $p_arr;    
263      
264       $fname  = get_inp ut_name (  $arr );    
265      
266       $ret =  "";    
267      
268       if ( ! $rd )    
269       {    
270           if  ( !$read_ only )    
271           {    
272                $ret .=  "<select n ame=\"$fna me\" class =\"select_ years\">\n ";    
273                $vals =  preg_split  ("/[,\']+ /", $arr[e xtra], -1,  PREG_SPLI T_NO_EMPTY );    
274      
275                $vals[0]  = date('Y ') - $vals [0];    
276                $vals[1]  = date('Y ') - $vals [1];    
277      
278                for ( $v =$vals[1]  ; $v >= $v als[0] ; $ v-- )    
279                {    
280                    if (  strlen(tr im($v)) <=  0 ) conti nue;    
281                    if (  $v == $va l ) $sel =  ' selecte d="selecte d" ';    
282                         else $sel  = "";    
283                        
284                    $ret  .= "<opti on value=\ "$v\" $sel >$v</optio n>\n";    
285                }    
286                $ret .=  "</select> \n";    
287           }    
288           el se    
289           {    
290                $ret .=  "<input ty pe=\"text\ " name=\"$ fname\" id =\"$fname\ " value=\" $val\" rea donly=\"re adonly\" c lass=\"inp ut_years_r eadonly\"  />\n";    
291           }    
292       }    
293       else    
294       {    
295           $Y earOfBirth  = $val;    
296      
297           if  ( $sRealF Name )    
298           {    
299                $res = d b_res('SEL ECT * FROM  ProfilesD esc WHERE  `name` LIK E "' . $sR ealFName .  ',%" AND  `name` !=  "' . $arr[ name] . '"  ORDER BY  `ID`;');    
300      
301                while (  $aArr = my sql_fetch_ array($res ) )    
302                {    
303      
304                    if (  $aArr['ge t_value_db '] )    
305                    {    
306                         $funcbody  = $aArr['g et_value_d b'];    
307                         $func = cr eate_funct ion('$arg0 ',$funcbod y);    
308                         $val = $fu nc($p_arr) ;    
309                    }    
310      
311                    $ite m = get_in put_name (  $aArr );  // get_inp ut_name re turns Mont hOfBirth a nd DayOfBi rth    
312                    $$it em = $val;  // create  variable  $MonthOfBi rth and $D ayOfBirth    
313                }    
314                    
315                $ret = $ short_date _format;    
316                $ret = s tr_replace ( '%m', $M onthOfBirt h, $ret );    
317                $ret = s tr_replace ( '%d', $D ayOfBirth,  $ret );    
318                $ret = s tr_replace ( '%y', $Y earOfBirth , $ret );    
319                    
320                $arr['gr oup_mark']  = '';    
321                    
322                return p rint_row_c ontent($fi rst_row, $ arr, $ret,  $tr_class , 2, $widt h_first);    
323           }    
324       }    
325      
326   //======== ========== ========== ========== ========== ========== ===    
327   //======== ========== ========== ========== ========== ========== ===    
328      
329       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
330   }    
331      
332      
333   function p rint_row_d ate( $firs t_row, $ar r, $val =  "", $tr_cl ass = "",  $rd = 0, $ columns =  3, $width_ first = "" , $read_on ly = 0 )    
334   {    
335       $fname  = get_inp ut_name( $ arr );    
336       $php_d ate_format  = getPara m( 'php_da te_format'  );    
337           
338       list(  $sYear, $s Month, $sD ay ) = exp lode( '-',  $val );    
339           
340       $ret =  '';    
341       if ( ! $rd )    
342       {    
343           if  ( !$read_ only )    
344           {    
345                $aYears  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
346                    
347                $sYearSt art = (int )( date('Y ') - $aYea rs[0] );    
348                $sYearEn d   = (int )( date('Y ') - $aYea rs[1] );    
349                    
350                $aMonthe s = preg_s plit ("/[, \']+/", '0 1,02,03,04 ,05,06,07, 08,09,10,1 1,12', -1,  PREG_SPLI T_NO_EMPTY );    
351                    
352                //monthe s    
353                $ret .=  "<select n ame=\"{$fn ame}_month \" id=\"{$ fname}_mon th\">\n";    
354                foreach  ( $aMonthe s as $v )    
355                {    
356                    if (  $v == $sM onth )    
357                         $sel = " s elected=\" selected\"  ";    
358                    else    
359                         $sel = "";    
360                        
361                    $ret  .= "<opti on value=\ "$v\" $sel >"._t("_". $v)."</opt ion>\n";    
362                }    
363                $ret .=  "</select> \n";    
364                    
365                //days    
366                $ret .=  "<select n ame=\"{$fn ame}_day\"  class=\"s elect_num\ ">\n";    
367                for ( $v  = 1; $v < = 31; $v++  )    
368                {    
369                    if (  $v == $sD ay )    
370                         $sel = ' s elected="s elected"';    
371                    else    
372                         $sel = "";    
373                    $ret  .= "<opti on value=\ "$v\" $sel >$v</optio n>\n";    
374                }    
375                $ret .=  "</select> \n";    
376                    
377                    
378                //years    
379                $ret .=  "<select n ame=\"{$fn ame}_year\ " class=\" select_yea rs\">\n";    
380                for ( $v  = $sYearE nd; $v >=  $sYearStar t ; $v-- )    
381                {    
382                    if (  strlen(tr im($v)) <=  0 ) conti nue;    
383                    if (  $v == $sY ear )    
384                         $sel = ' s elected="s elected" ' ;    
385                    else    
386                         $sel = "";    
387                        
388                    $ret  .= "<opti on value=\ "$v\" $sel >$v</optio n>\n";    
389                }    
390                $ret .=  "</select> \n";    
391                    
392           }    
393           el se    
394           {    
395                $ret .=  "<input ty pe=\"text\ " name=\"{ $fname}\"  id=\"$fnam e\" value= \"{$val}\"  readonly= \"readonly \" class=\ "input_dat e_readonly \" />\n";    
396           }    
397       }    
398       else    
399       {    
400           $a Date = exp lode( '-',  $val, 2 ) ;    
401           $i Year = (in t)$aDate[0 ];    
402               
403           if ( $iYear <  1970 ) // cannot app ly timesta mp    
404           {    
405                $sMyDate  = ( (stri ng)($iYear  + 65) ) .  '-' . $aD ate[1]; // plus 65 ye ars    
406                $iTime =  strtotime ( $sMyDate  ); //max  understand able date  by strtoti me is 2038 -01-19    
407                $sConvDa te = date(  $php_date _format, $ iTime );    
408                $sConvDa te = str_r eplace( (s tring)($iY ear + 65),  (string)$ iYear, $sC onvDate );  //then mi nus 100 ye ars    
409           }    
410           el se    
411                $sConvDa te = date(  $php_date _format, s trtotime(  $val ) );  //can appl y timestam p    
412               
413           $r et .= $sCo nvDate;    
414       }    
415       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
416   }    
417      
418      
419   function p rint_row_e num_n( $fi rst_row, $ arr, $val  = "", $tr_ class = "" , $rd = 0,  $columns  = 3, $widt h_first =  "", $read_ only = 0 )    
420   {    
421       $fname  = get_inp ut_name( $ arr );    
422       $val_a rray = spl it('-', $v al);    
423       $val =  $val_arra y[0];    
424      
425       $ret =  "";    
426      
427       if ( ! $rd )    
428       {    
429           if  ( !$read_ only )    
430           {    
431                $ret .=  "<select n ame=\"$fna me\" class =\"select_ num\">\n";    
432                $vals =  preg_split  ("/[,\']+ /", $arr[' extra'], - 1, PREG_SP LIT_NO_EMP TY);    
433      
434                for ( $v =$vals[0]  ; $v <= $v als[1] ; + +$v )    
435                {    
436                    if (  strlen(tr im($v)) <=  0 ) conti nue;    
437                    if (  $v == $va l ) $sel =  ' selecte d="selecte d"';    
438                                  e lse $sel =  "";    
439                    $ret  .= "<opti on value=\ "$v\" $sel >$v</optio n>\n";    
440                }    
441                $ret .=  "</select> \n";    
442           }    
443           el se    
444           {    
445                $ret .=  "<input ty pe=\"text\ " name=\"$ fname\" id =\"$fname\ " value=\" $val\" rea donly=\"re adonly\" c lass=\"sel ect_input_ num_readon ly\" />\n" ;    
446           }    
447       }    
448       else    
449       {    
450           $v als = preg _split ("/ [,\']+/",  $arr['extr a'], -1, P REG_SPLIT_ NO_EMPTY);    
451      
452           fo r ( $v=$va ls[0] ; $v  <= $vals[ 1] ; ++$v  )    
453           {    
454                if ( str len(trim($ v)) <= 0 )  continue;    
455                if ( $v  == $val )  {    
456                    $ret  .= $v;    
457                    brea k;    
458                }    
459           }    
460       }    
461      
462       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
463   }    
464      
465   function p rint_row_e dit( $firs t_row, $ar r, $val =  "", $tr_cl ass = "",  $rd = 0, $ columns =  3, $width_ first = "" , $read_on ly = 0 )    
466   {    
467       $fname  = get_inp ut_name (  $arr );    
468       $disab led = ($re ad_only ?  "readonly= \"readolny \"" : "");    
469      
470       if ( ! strlen($ar r['extra'] ) ) $arr[' extra'] =  10;    
471      
472       if ( s trlen($arr ['max_leng th']) ) {$ ml = "maxl ength='$ar r[max_leng th]'"; }el se $ml="";    
473      
474       if ($a rr['name']  == 'Passw ord')    
475       {    
476           $v al = "";    
477       }    
478       if ( ! $rd )    
479           $r et =  "<in put type=\ "text\" si ze=\"{$arr ['extra']} \" $ml nam e=\"$fname \" value=\ "". htmlsp ecialchars ($val) ."\ " $disable d class=\" input_text _edit\" /> \n";    
480       else    
481           $r et = "$val \n";    
482      
483       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
484   }    
485      
486   function p rint_row_a rea( $firs t_row, $ar r, $val =  "", $tr_cl ass = "",  $rd = 0, $ columns =  3, $width_ first = "" , $read_on ly = 0 )    
487   {    
488       $fname  = get_inp ut_name (  $arr );    
489       $disab led = ($re ad_only ?  "readonly= \"readonly \"" : "");    
490      
491       $vals  = split (" x", $arr[' extra']);    
492   // at seco nd page of  joinform  hidden inp ut with na me $fname  already ex ist !!!! t hats why i  need name  different  from $fna me.    
493   //    $fna me .= 'ori ginal';    
494      
495       if ( ! $rd )    
496       {    
497      
498           $r et  = '<ta ble cellsp acing="0"  cellpaddin g="0">';    
499                $ret .=  "<tr><td>< textarea c lass=\"tex tarea_edit \" id=\"$f name\" nam e=\"$fname \" cols=\" $vals[0]\"  rows=\"$v als[1]\"    
500                onKeyDow n=\"javasc ript: docu ment.getEl ementById( '{$fname}c ounter').v alue = doc ument.getE lementById ('{$fname} ').value.l ength;\"    
501                onKeyUp= \"javascri pt: docume nt.getElem entById('{ $fname}cou nter').val ue = docum ent.getEle mentById(' {$fname}') .value.len gth;\" $di sabled>".  htmlspecia lchars($va l) ."</tex tarea>\n";    
502                $ret .=  "</td></tr >";    
503                $ret .=  '<tr>';    
504                    $ret  .= '<td a lign="righ t">';    
505                            
506                         $ret  .= ' <table cel lpadding=" 0" cellspa cing="2" b order="0"  align="rig ht">';    
507                             $ret . = '<tr>';    
508                                 $r et .= '<td  align="ri ght" valig n="middle" >';    
509                                      $ret .=  _t("_Chara cter count er");    
510                                 $r et .= '</t d>';    
511                                 $r et .= '<td  width="30 ">';    
512                                      $ret .=  "<input ty pe=\"text\ " readonly =\"readonl y\" id=\"{ $fname}cou nter\" nam e=\"{$fnam e}counter\ " size=\"3 \" value="  . strlen( $val) . "  class=\"in put_textar ea_counter \" />";    
513                                 $r et .= '</t d>';    
514                             $ret . = '</tr>';    
515                         $ret .= '< /table>';    
516                            
517                    $ret  .= '</td> ';    
518                $ret .=  '</tr>';    
519                $ret .=  "<tr><td s tyle=\"tex t-align:ce nter;\">". put_smiles ($fname, 1 1);    
520                $ret .=  "</td></tr ></table>" ;    
521      
522       }    
523       else    
524           $r et = proce ss_smiles(  "$val\n"  );    
525      
526       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
527   }    
528      
529      
530   function p rint_row_a rea2( $arr , $val = " ", $tr_cla ss = "", $ rd = 0, $c olumns = 3 , $width_f irst = "",  $read_onl y = 0 )    
531   {    
532       global  $profile_ view_color ;    
533      
534       $fname  = get_inp ut_name (  $arr );    
535       $disab led = ($re ad_only ?  "readonly= \"readonly \"" : "");    
536      
537       $vals  = split (" x", $arr[' extra']);    
538      
539       $ret =  "";    
540      
541       if ( ! $rd )    
542          $re t .= "<tex tarea name =\"$fname\ " cols=\"$ vals[0]\"  rows=\"$va ls[1]\" $d isabled>".  htmlspeci alchars($v al) ."</te xtarea>\n" ;    
543       else    
544       {    
545           $r et .= "<ta ble width= \"100%\" c ellspacing =\"0\" cel lpadding=\ "0\">\n";    
546           $r et .= "<tr ><td align =left clas s=profile_ desc_heade r>"._t( $a rr['namedi sp'] ).":  </td></tr> ";    
547           $r et .= "<tr ><td class =profile_d esc_text>\ n";    
548           $r et .= "<di v style=\" width:100% ; overflow : hidden;  text-align : left; pa dding: 2px ;\">$val</ div><br /> <br />\n";    
549           $r et .= "</t d></tr>\n" ;    
550           $r et .= "</t able>\n";    
551       }    
552      
553       return  $ret;    
554   }    
555      
556      
557   function p rint_row_p wd( $first _row, $arr , $val = " ", $tr_cla ss = "", $ rd = 0, $c olumns = 3 , $width_f irst = "",  $read_onl y = 0 )    
558   {    
559       $fname  = get_inp ut_name (  $arr );    
560       $disab led = ($re ad_only ?  "readonly= \"readonly \"" : "");    
561      
562       if ( s trlen($arr ['max_leng th']) )    
563       {    
564           $m l = "maxle ngth='$arr [max_lengt h]'";    
565       }    
566       else    
567           $m l = "";    
568      
569       if ( ! $rd )    
570           $r et = "<inp ut type=\" password\"  size=\"$a rr[extra]\ " $ml name =\"$fname\ " $disable d class=\" input_type _password\ " />\n";    
571      
572       return  print_row _content($ first_row,  $arr, $re t, $tr_cla ss, $colum ns, $width _first);    
573   }    
574      
575      
576   function p rint_row_d elim( $fir st_row, $a rr, $tr_cl ass = "",  $colspan =  "", $rd =  0 )    
577   {    
578       global  $_page;    
579      
580       $str_c olspan = " ";    
581       if ( s trlen($col span) > 0  ) $str_col span = " c olspan='$c olspan' ";    
582      
583       if ( $ _page['nam e_index']  == 7 ) {    
584           if  ( $first_ row ) {    
585                $class1  = "class=\ "profile_h eader_firs t\"";    
586           }  else {    
587                $class1  = "class=\ "profile_h eader\"";    
588           }    
589       } else  {    
590           if  ( $first_ row ) {    
591                $class1  = "class=\ "join_head er_first\" ";    
592           }  else {    
593                $class1  = "class=\ "join_head er\"";    
594           }    
595       }    
596      
597      
598       return  "<tr clas s=$tr_clas s><td alig n=center $ str_colspa n $class1> <b>"._t($a rr['namedi sp'])."</b ></td></tr >";    
599   }    
600      
601   function p rint_row_r ef( $first _row, $arr , $val = " ", $tr_cla ss = "", $ rd = 0, $c olumns = 3 , $width_f irst = "",  $read_onl y = 0, $on change = ' ', $imagec ode = '')    
602   {    
603       $fname  = get_inp ut_name (  $arr );    
604      
605       $funcb ody = $arr [extra];    
606       $func  = create_f unction("" , $funcbod y);    
607       $ar =  $func();    
608      
609       $ret =  "";    
610       // if  user did n ot specifi ed this fi eld, then  hide it    
611       if ( " I prefer n ot to say"  == $ar[$v al] && $rd  ) return  '';    
612      
613       if ( ! $rd )    
614       {    
615           if  ( !$read_ only )    
616           {    
617                if ( str len($oncha nge) )    
618                    $onc hange = "o nchange=\" javascript : {$onchan ge}\"";    
619                $ret .=  "<select n ame=\"{$fn ame}\" {$o nchange} c lass=\"sel ect_prof\" >\n";    
620                foreach  ( $ar as $ key => $va lue )    
621                {    
622                    $sel  = "";    
623                    if (  $val == $ key ) $sel  = " selec ted=\"sele cted\" ";    
624                                     else $sel  = "";    
625                    $ret  .= "<opti on value=\ "$key\" $s el>"._t("_ _".$value) ."</option >\n";    
626                }    
627                $ret .=  "</select> \n";    
628                if ( str len($image code) )    
629                    $ret  .= "&nbsp ;{$imageco de}\n";    
630           }    
631           el se    
632           {    
633                $ret .=  "<input ty pe=\"text\ " name=\"$ fname\" id =\"$fname\ " value=\" ". _t("__" .$ar[$val] ) ."\" rea donly=\"re adonly\" c lass=\"inp ut_select_ prof_reado nly\" />\n ";    
634                if ( str len($image code) )    
635                    $ret  .= "&nbsp ;{$imageco de}\n";    
636           }    
637       } else  {    
638           fo reach ( $a r as $key  => $value  )    
639           {    
640                $sel = " ";    
641                if ( $va l == $key  ) {    
642                    $ret  .= _t("__ ".$value);    
643                    brea k;    
644                }    
645           }    
646           if  ( strlen( $imagecode ) )    
647                $ret .=  "&nbsp;{$i magecode}\ n";    
648       }    
649      
650       return  print_row _content(  $first_row , $arr, $r et, $tr_cl ass, $colu mns, $widt h_first);    
651   }    
652      
653   function p rint_rows_ set_member ship ( $fi rst_row, $ membership s_arr, $me mbership_i nfo, $colu mns, $tr_c lass, $del im_class,  $width_fir st = "" )    
654   {    
655       $ret =  "";    
656       if ( s trlen($wid th_first)  )    
657           $w  = "width= '$width_fi rst'";    
658      
659       // Pri nt delimit er    
660       if ( $ first_row  )    
661       {    
662           $c lass1 = "c lass=join_ header_fir st";    
663       }    
664       else    
665       {    
666           $c lass1 = "c lass=join_ header";    
667       }    
668       $ret . = "    
669           <t r class=$d elim_class >    
670                <td alig n=center c olspan=$co lumns $cla ss1>    
671                    <b>" . _t("_Mem bership2") . "</b>    
672                </td>    
673           </ tr>";    
674      
675       // Pri nt existin g membersh ip informa tion    
676       $first _row = 1;    
677       $class 1 = "class =join_td_1 _first";    
678       $class 2 = "class =join_td_2 _first";    
679      
680       $curre nt_members hip = $mem bership_in fo['Name'] ;    
681       if ( $ membership _info['ID' ] != MEMBE RSHIP_ID_S TANDARD )    
682       {    
683           if  ( is_null ($membersh ip_info['D ateExpires ']) )    
684                $current _membershi p .= ", ".  _t( "_MEM BERSHIP_EX PIRES_NEVE R" );    
685           el se    
686           {    
687                $days_le ft = (int) ( ($member ship_info[ 'DateExpir es'] - tim e()) / (24  * 3600) ) ;    
688                $current _membershi p .= ", ".  _t( "_MEM BERSHIP_EX PIRES_IN_D AYS", $day s_left );    
689           }    
690       }    
691      
692       $ret . = "    
693           <t r>    
694                <td $w $ class1>    
695                    ". _ t("_Curren t membersh ip") ."    
696                </td>    
697                <td $cla ss2 colspa n=". ($col umns - 1)  .">    
698                    $cur rent_membe rship    
699                </td>    
700           </ tr>";    
701      
702       // Pri nt set new  membershi p controls    
703       $first _row = 0;    
704       $class 1 = "class =join_td_1 ";    
705       $class 2 = "class =join_td_2 ";    
706      
707       $ret . = "    
708           <t r>    
709                <td $w $ class1>    
710                    ". _ t("_Set me mbership")  ."    
711                </td>    
712                <td $cla ss2 colspa n=". ($col umns - 1)  .">    
713                <script  type=\"tex t/javascri pt\">    
714                function  checkStan dard()    
715                {    
716                    sele ctMembersh ip = docum ent.getEle mentById(' Membership ID');    
717                    if(s electMembe rship.valu e == ".MEM BERSHIP_ID _STANDARD. ")    
718                    {    
719                         document.g etElementB yId('Membe rshipDays' ).disabled  = true;    
720                         document.g etElementB yId('Membe rshipImmed iately').d isabled =  true;    
721                    }    
722                    else    
723                    {    
724                         document.g etElementB yId('Membe rshipDays' ).disabled  = false;    
725                         document.g etElementB yId('Membe rshipImmed iately').d isabled =  false;    
726                    }    
727                }    
728                </script >    
729                    <sel ect id=\"M embershipI D\" name=\ "Membershi pID\" onch ange=\"che ckStandard ()\" class =\"select_ set_member ship\">";    
730      
731       foreac h ( $membe rships_arr  as $membe rshipID =>  $membersh ipName )    
732       {    
733           if  ( $member shipID ==  MEMBERSHIP _ID_NON_ME MBER )    
734                continue ;    
735           $s elected =  ( $members hip_id ==  $membershi pID ? " se lected=\"s elected\"  " : "" );    
736           $r et .= "    
737                         <option va lue=\"$mem bershipID\ " {$select ed}>$membe rshipName< /option>";    
738       }    
739      
740       $ret . = "    
741                    </se lect>    
742                    &nbs p;". _t("_ for") ."&n bsp;    
743                    <inp ut disable d=\"disabl ed\" id=\" Membership Days\" typ e=\"text\"  class=\"n o\" size=\ "7\" name= \"Membersh ipDays\" v alue=\"unl imited\"    
744                    onFo cus=\"java script: if  (Membersh ipDays.val ue == 'unl imited') {  Membershi pDays.valu e = ''; }\ "    
745                    onBl ur=\"javas cript: if  (Membershi pDays.valu e == '') {  Membershi pDays.valu e = 'unlim ited'; }\" >". _t("_d ays") ."<b r />    
746                    <div  style=\"p adding-lef t: 15px;\" >    
747                         <input dis abled=\"di sabled\" i d=\"Member shipImmedi ately\" ty pe=\"check box\" name =\"Members hipImmedia tely\" sty le=\"verti cal-align:  middle;\"  />&nbsp;< label for= \"Membersh ipImmediat ely\">". _ t("_starts  immediate ly") ."</l abel>    
748                    </di v>    
749                </td>    
750           </ tr>";    
751      
752       return  $ret;    
753   }    
754      
755   // Search  option tab le start    
756   function p rint_row_s earch_cont ent( $name , $content , $search_ hide, $cla ss = "", $ section_hi de = 0, $d isplay_nam e = "" )    
757   {    
758       global  $odd;    
759       global  $c_search _table;    
760      
761      
762       $name2  = $name;    
763       $name  = _t($disp lay_name);    
764      
765       if ($s earch_hide )    
766       {    
767           $d iv_hide =  "none";    
768           $d iv_show =  "block";    
769       }    
770       else    
771       {    
772           $d iv_hide =  "block";    
773           $d iv_show =  "none";    
774       }    
775      
776       if ( $ section_hi de )    
777       {    
778           $s ection_dis play = 'no ne';    
779       }    
780       else    
781       {    
782           $s ection_dis play = 'bl ock';    
783       }    
784      
785       $ret =  "    
786           <d iv class=\ "search_sh ow_hide\">    
787                <div id= \"div_hide _$name2\"  style=\"di splay:$div _hide\">    
788                    <a h ref=\"java script:voi d(0)\" onC lick=\"jav ascript: S howHideHid e(document .getElemen tById('div _show_$nam e2'),docum ent.getEle mentById(' table_hide _$name2'), document.g etElementB yId('div_h ide_$name2 '));\">"._ t("_Hide") ."</a>    
789                </div>    
790      
791                <div id= \"div_show _$name2\"  style=\"di splay:$div _show\">    
792                    <a h ref=\"java script:voi d(0)\" onC lick=\"jav ascript: S howShowHid e(document .getElemen tById('tab le_hide_$n ame2'),doc ument.getE lementById ('div_hide _$name2'), document.g etElementB yId('div_s how_$name2 '));\">"._ t("_Show") ."</a>    
793                </div>    
794           </ div>    
795      
796           <t able id=\" table_hide _$name2\"  cellspacin g=\"1\" ce llpadding= \"0\" styl e=\"displa y:$div_hid e;\" align =\"center\ " width=\" 85%\" bord er=\"0\">    
797                    ". $ content ."    
798           </ table>";    
799      
800       return  "<div id= \"section_ {$name2}\"  style=\"d isplay:{$s ection_dis play}\">".  DesignBox ContentBor der( $name , $ret ) .  "</div>";    
801   }    
802      
803   function p rint_row_s earch_list _ref ( $ar r, $val =  "", $class  = "" )    
804   {    
805       $align ="center";    
806       $fname  = get_fie ld_name (  $arr );    
807       $funcb ody = $arr [extra];    
808       $func  = create_f unction("" , $funcbod y);    
809       $ar =  $func();    
810       $ret =  "";    
811      
812       $ret . = "<tr><td  align=\"$ align\"><s elect name =\"".$fnam e."[]\" si ze=\"8\"   multiple=\ "multiple\ " class=\" select_mul tiple\">";    
813       foreac h ( $ar as  $key => $ value )    
814       {    
815           if  ( $key ==  0 && $val ue == "I p refer not  to say") c ontinue;    
816           $s el = "";    
817           if  ( $val ==  $key ) $s el = "sele cted=\"sel ected\"";    
818                            else $s el = "";    
819           $r et .= "<op tion $sel  value=\"$k ey\">"._t( "__".$valu e)."</opti on>";    
820       }    
821       $ret . = "</selec t></td></t r>";    
822      
823       return  $ret;    
824   }    
825      
826      
827   function p rint_row_s earch_chec k_enum ( $ arr, $val  = "", $cla ss = "" )    
828   {    
829       $align ="center";    
830       $b = 0 ;    
831       $i = 0 ;    
832       $fname  = get_fie ld_name (  $arr );    
833       $ret =  "";    
834      
835       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
836      
837       if ( ! $arr['sear ch_cols']  ) $arr['se arch_cols' ] = 1;    
838       $col_w  = "".spri ntf("%.0f" , 100 / $a rr['search _cols'])." %";    
839      
840       foreac h ( $vals  as $value  )    
841       {    
842           if  ( !strlen (trim($val ue)) ) con tinue;    
843      
844           if  ( !($i %  $arr['sear ch_cols'])  && !$b )  {    
845                $ret .=  "<tr>";    
846                $b = 1;    
847           }    
848           $s el = "";    
849      
850           $r et .= "<td  align=\"$ align\" wi dth=\"$col _w\" style =\"border: 0px solid  red;\"><in put type=\ "checkbox\ " name=\"{ $fname}_{$ value}\" i d=$fname$v alue style =\"border: 0px solid  red;\" />& nbsp;<labe l for=$fna me$value s tyle=\"whi te-space:n owrap;\">" ._t("_".$v alue)."</l abel></td> ";    
851           ++ $i;    
852           if  ( !($i %  $arr['sear ch_cols'])  && $b) {    
853                $ret .=  "</tr>";    
854                $b = 0;    
855           }    
856       }    
857      
858       return  $ret;    
859   }    
860      
861   function p rint_row_s earch_text _text ( $a rr, $val =  "", $clas s = "" )    
862   {    
863       $fname  = get_fie ld_name (  $arr );    
864       return   "<tr><td  align=\"$ align\"><i nput name= \"$fname\"  size=\"12 \"  class= \"no\" />< /td></tr>\ n";    
865   }    
866      
867   function p rint_row_s earch_chec k_ref ( $a rr, $val =  "", $clas s = "" )    
868   {    
869       $align ="left";    
870       $b = 0 ;    
871       $i = 0 ;    
872       $fname  = get_fie ld_name (  $arr );    
873       $funcb ody = $arr ['extra'];    
874       $func  = create_f unction('' , $funcbod y);    
875       $ar =  $func();    
876       if ( ! $arr['sear ch_cols']  ) $arr['se arch_cols' ] = 1;    
877       $col_w  = "".spri ntf("%.0f" , 100 / $a rr['search _cols'])." %";    
878       $ret =  "";    
879      
880       foreac h ( $ar as  $key => $ value )    
881       {    
882           if  ( $key ==  0 && $val ue == "I p refer not  to say") c ontinue;    
883           if  ( !($i %  $arr[searc h_cols]) & & !$b )    
884           {    
885                $ret .=  "<tr>";    
886                $b = 1;    
887           }    
888           $s el = "";    
889           if  ( !strcmp ($val,$key ) ) $sel =  "checked= \"checked\ "";    
890                            else $s el = "";    
891           $r et .= "<td  align=\"$ align\" wi dth=\"$col _w\"><inpu t type=\"c heckbox\"  name=\"{$f name}_{$ke y}\" id=\" $fname$key \" $sel /> &nbsp;<lab el for=$fn ame$key st yle=\"whit e-space:no wrap;\">". _t("__".$v alue)."</l abel></td> ";    
892           ++ $i;    
893           if  ( !($i %  $arr['sear ch_cols'])  && $b)    
894           {    
895                $ret .=  "</tr>";    
896                $b = 0;    
897           }    
898       }    
899      
900       return  $ret;    
901   }    
902      
903   function p rint_row_s earch_text  ( $arr, $ val = "",  $class = " ", $sectio n_hide = 0  )    
904   {    
905       switch  ($arr['ty pe'])    
906       {    
907           ca se 'a': //  text area    
908           ca se 'c': //  input box    
909                $out = p rint_row_s earch_text _text ( $a rr, $val,  $class );    
910                break;    
911       }    
912       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
913   }    
914      
915   function p rint_row_s earch_chec k_set_set  ( $arr, $v al = "", $ class = "" , $input_v alue = "")    
916   {    
917       $align ="left";    
918       $b = 0 ;    
919       $i = 0 ;    
920       $fname  = get_fie ld_name (  $arr );    
921       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
922       $ret =  "";    
923      
924       foreac h ( $vals  as $v )    
925       {    
926           if  ( !($i %  $arr['sear ch_cols'])  && !$b )    
927           {    
928                $ret .=  "<tr>";    
929                $b = 1;    
930           }    
931      
932           if  ( !strlen (trim($v))  ) continu e;    
933           if  ( is_in_s et( $v, $v al ) )    
934                $sel = " checked=\" checked\"" ;    
935           el se    
936                $sel = " ";    
937      
938           if  ( 'captio n' == $inp ut_value )    
939           {    
940                $ret .=  "<td align =\"$align\ "><input n ame=\"{$fn ame}_{$i}\ " id=\"{$f name}_{$i} \" type=\" checkbox\"  style=\"v ertical-al ign: middl e;\" $sel  value=\"". _t("_$v"). "\" />&nbs p;<label f or=\"{$fna me}_{$i}\"  style=\"w hite-space :nowrap;\" >"._t("_$v ")."</labe l></td>";    
941           }    
942           el seif ( ""  != $input_ value )    
943           {    
944                $ret .=  "<td align =$align><i nput name= \"{$fname} _{$i}\" id =\"{$fname }_{$i}\" t ype=\"chec kbox\" sty le=\"verti cal-align: middle;\"  $sel value =\"". $inp ut_value . "\" />&nbs p;<label f or=\"{$fna me}_{$i}\"  style=\"w hite-space :nowrap;\" >"._t("_$v ")."</labe l></td>";    
945           }    
946           el se    
947           {    
948                $ret .=  "<td align =$align><i nput name= \"{$fname} _{$i}\" id =\"{$fname }_{$i}\" t ype=\"chec kbox\" sty le=\"verti cal-align:  middle;\"  $sel />&n bsp;<label  for=\"{$f name}_{$i} \" style=\ "white-spa ce:nowrap; \">"._t("_ $v")."</la bel></td>" ;    
949           }    
950      
951           $i ++;    
952           if  ( !($i %  $arr['sear ch_cols'])  && $b )    
953           {    
954                $ret .=  "</tr>";    
955                $b = 0;    
956           }    
957       }    
958       if ( $ b )    
959       {    
960           $r et .= "</t d>";    
961       }    
962      
963       return  $ret;    
964   }    
965      
966   function p rint_row_s earch_radi o_enum ( $ arr, $val  = "", $cla ss = "", $ javascript  = "" )    
967   {    
968       $align ="left";    
969       $b = 0 ;    
970       $i = 0 ;    
971      
972       $fname  = get_fie ld_name (  $arr );    
973       $vals  = preg_spl it ("/[,\' ]+/", $arr ['extra'],  -1, PREG_ SPLIT_NO_E MPTY);    
974       $ret =  "";    
975      
976       foreac h ( $vals  as $v )    
977       {    
978           if  ( !($i %  $arr['sear ch_cols'])  && !$b )  {    
979                $ret .=  "<tr>";    
980                $b = 1;    
981           }    
982      
983           if  ( strlen( trim($v))  <= 0 ) con tinue;    
984           if  ( $v == $ val ) $sel  = " check ed=\"check ed\"";    
985                          else $sel  = "";    
986           $r et .= "<td  align=\"$ align\" >< input name =\"$fname\ " id=\"{$f name}_{$v} \" type=\" radio\" va lue=\"$v\"  style=\"v ertical-al ign: middl e;\" $sel  $javascrip t />&nbsp; <label for =\"{$fname }_{$v}\"   style=\"wh ite-space: nowrap;\"> "._t("_$v" )."</label ></td>";    
987           ++ $i;    
988           if  ( !($i %  $arr['sear ch_cols'])  && $b) {    
989                $ret .=  "</tr>\n";    
990                $b = 0;    
991           }    
992       }    
993      
994       if ( $ b )    
995       {    
996       $ret . = "</tr>\n ";    
997       }    
998      
999       return  $ret;    
1000      
1001   }    
1002      
1003   function p rint_row_s earch_date range_en (  $arr, $va l = "", $c lass = ""  )    
1004   {    
1005       $align ="center";    
1006       $fname  = get_fie ld_name (  $arr );    
1007       $ret =  "";    
1008      
1009       $ret . = "<tr><td  align=\"$ align\">";    
1010       $vals  = preg_spl it ("/[,\' ]+/", $arr [search_ex tra], -1,  PREG_SPLIT _NO_EMPTY) ;    
1011       $ret . = _t("_fro m")."&nbsp ; <select  name=${fna me}_start> \n";    
1012      
1013       for (  $i = $vals [0] ; $i < = $vals[1]  ; ++$i )    
1014       {    
1015           if  ( $i == $ vals[0] )  $sel = " s elected=\" selected\"  ";    
1016                              else  $sel = "";    
1017           $r et .= "<op tion value =\"$i\" $s el>$i</opt ion>\n";    
1018       }    
1019       $ret . = "</selec t>\n";    
1020       if ( $ arr[search _cols] <=  1 ) {    
1021           $r et .= "</t d></tr><tr ><td align =$align>";    
1022       }    
1023       $ret . = _t("_to" )."&nbsp;  <select na me=${fname }_end>\n";    
1024       for (  $i = $vals [0] ; $i < = $vals[1]  ; ++$i )    
1025       {    
1026           if  ( $i == $ val ) $sel  = " selec ted=\"sele cted\" ";    
1027                              else  $sel = "";    
1028           $r et .= "<op tion value =\"$i\" $s el>$i</opt ion>\n";    
1029       }    
1030       $ret . = "</selec t>\n";    
1031       $ret . = "</td></ tr>";    
1032      
1033       return  $ret;    
1034   }    
1035      
1036   function p rint_row_s earch_chec k ( $arr,  $val = "",  $class =  "", $secti on_hide =  0 )    
1037   {    
1038       switch  ($arr['ty pe'])    
1039       {    
1040           ca se 'r': //  reference  to array    
1041                $out = p rint_row_s earch_chec k_ref ( $a rr, $val,  $class );    
1042                break;    
1043           ca se 'e': //  reference  to array    
1044                $out = p rint_row_s earch_chec k_enum ( $ arr, $val,  $class );    
1045                break;    
1046       }    
1047       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
1048   }    
1049      
1050   function p rint_row_s earch_chec k_set ( $a rr, $val =  "", $clas s = "", $i nput_value  = "", $se ction_hide  = 0 )    
1051   {    
1052      
1053       switch  ($arr['ty pe'])    
1054       {    
1055           ca se 'r': //  reference  to array    
1056                $out = p rint_row_s earch_chec k_ref ( $a rr, $val,  $class );    
1057           br eak;    
1058           ca se 'set':  // referen ce to arra y    
1059                $out = p rint_row_s earch_chec k_set_set  ( $arr, $v al, $class , $input_v alue );    
1060           br eak;    
1061       }    
1062       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
1063   }    
1064      
1065   function p rint_row_s earch_radi o ( $arr,  $val = "",  $class =  "", $javas cript = "" , $section _hide = 0  )    
1066   {    
1067       switch  ($arr['ty pe'])    
1068       {    
1069           ca se 'rb': / / radio bu ttons    
1070           ca se 'e': //  enum    
1071                $out = p rint_row_s earch_radi o_enum ( $ arr, $val,  $class, $ javascript  );    
1072                break;    
1073       }    
1074       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
1075   }    
1076      
1077   function p rint_row_s earch_list _enum($arr , $val="",  $class="" )    
1078   {    
1079       $align ="center";    
1080       $fname  = get_fie ld_name (  $arr );    
1081      
1082       $optio ns = $arr[ 'extra'];    
1083      
1084       $optio ns = trim( $options,  "'");    
1085      
1086       $optio ns = preg_ split("/'\ s*,\s*'/",  $options) ;    
1087      
1088       $ret =  "<tr><td  align=\"$a lign\"><se lect name= \"{$fname} []\" class =\"$class\ " multiple =\"multipl e\">";    
1089       foreac h ($option s as $valu e)    
1090       {    
1091           $r et .= "<op tion value =\"$value\ ">"._t('_' .$value)." </option>" ;    
1092       }    
1093       $ret . = "</selec t></td></t r>";    
1094      
1095       return  $ret;    
1096   }    
1097      
1098   function p rint_row_s earch_list  ( $arr, $ val = "",  $class = " ", $sectio n_hide = 0  )    
1099   {    
1100       switch  ($arr['ty pe'])    
1101       {    
1102           ca se 'r': //  reference  to array    
1103                $out = p rint_row_s earch_list _ref ( $ar r, $val, $ class );    
1104                break;    
1105           ca se 'e': //  enum    
1106                $out = p rint_row_s earch_list _enum($arr , $val, $c lass);    
1107                break;    
1108       }    
1109       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
1110   }    
1111      
1112   function p rint_row_s earch_date range( $ar r, $val =  "", $class  = "", $se ction_hide  = 0 )    
1113   {    
1114       $out =  print_row _search_da terange_en  ( $arr, $ val, $clas s );    
1115      
1116       return  print_row _search_co ntent( get _field_nam e($arr), $ out, $arr[ 'search_hi de'], $cla ss, $secti on_hide, $ arr['named isp'] );    
1117   }    
1118      
1119      
1120   ?>