3. Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon May 18 06:28:21 2009 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

3.1 Files compared

# Location File Last Modified
1 D:\Dolphin-v.6.1.5\admin sdating_admin.php Fri May 1 05:23:59 2009 UTC
2 D:\Dolphin-v.6.1.6\admin sdating_admin.php Wed May 13 05:15:32 2009 UTC

3.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 21 4108
Changed 13 119
Inserted 2 10
Removed 5 25

3.3 Comparison options

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

3.4 Active regular expressions

No regular expressions were active.

3.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( '../in c/header.i nc.php' );   21   require_on ce( '../in c/header.i nc.php' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );
27   require_on ce( BX_DIR ECTORY_PAT H_INC . 'i mages.inc. php' );   27   require_on ce( BX_DIR ECTORY_PAT H_INC . 'i mages.inc. php' );
28   require_on ce( BX_DIR ECTORY_PAT H_INC . 's dating.inc .php' );   28   require_on ce( BX_DIR ECTORY_PAT H_INC . 's dating.inc .php' );
29     29  
30   $logged['a dmin'] = m ember_auth ( 1, true,  true );   30   $logged['a dmin'] = m ember_auth ( 1, true,  true );
31     31  
32   $navigatio nStep = 10 ; // count  of events  to show p er page   32   $navigatio nStep = 10 ; // count  of events  to show p er page
33     33  
34   $_page['he ader'] = " Events";   34   $_page['he ader'] = " Events";
35   $_page['he ader_text' ] = "Manag e Events";   35   $_page['he ader_text' ] = "Manag e Events";
36   $_page['cs s_name'] =  'sdating_ admin.css' ;   36   $_page['cs s_name'] =  'sdating_ admin.css' ;
37     37  
38   /**   38   /**
39    * Adds ne w event in to the dat abase   39    * Adds ne w event in to the dat abase
40    *   40    *
41    * @return  int                                                       - zero  on succes s, non-zer o on fail   41    * @return  int                                                       - zero  on succes s, non-zer o on fail
42    *   42    *
43    *   43    *
44    */   44    */
45   function S DAddEvent( )   45   function S DAddEvent( )
46   {   46   {
47           gl obal $dir;   47           gl obal $dir;
48           gl obal $sdat ingThumbWi dth;   48           gl obal $sdat ingThumbWi dth;
49           gl obal $sdat ingThumbHe ight;   49           gl obal $sdat ingThumbHe ight;
50     50  
51           //  common   51           //  common
52           $e ventTitle  = process_ db_input(  $_POST['ev ent_title' ] );   52           $e ventTitle  = process_ db_input(  $_POST['ev ent_title' ] );
53           $e ventDesc =  process_d b_input( $ _POST['eve nt_desc']  );   53           $e ventDesc =  process_d b_input( $ _POST['eve nt_desc']  );
54           sw itch ( $_P OST['event _status']  )   54           sw itch ( $_P OST['event _status']  )
55           {   55           {
56                    case  'active':   56                    case  'active':
57                             $event Status = ' Active';   57                             $event Status = ' Active';
58                             break;   58                             break;
59                    case  'inactive ':   59                    case  'inactive ':
60                             $event Status = ' Inactive';   60                             $event Status = ' Inactive';
61                             break;   61                             break;
62                    case  'canceled ':   62                    case  'canceled ':
63                             $event Status = ' Canceled';   63                             $event Status = ' Canceled';
64                             break;   64                             break;
65                    defa ult:   65                    defa ult:
66                             $event Status = ' Active';   66                             $event Status = ' Active';
67           }   67           }
68           $e ventStatus Message =  process_db _input( $_ POST['even t_statusms g'] );   68           $e ventStatus Message =  process_db _input( $_ POST['even t_statusms g'] );
69     69  
70           //  event pla ce   70           //  event pla ce
71           $e ventCountr y = proces s_db_input ( $_POST[' event_coun try'] );   71           $e ventCountr y = proces s_db_input ( $_POST[' event_coun try'] );
72           $e ventCity =  process_d b_input( $ _POST['eve nt_city']  );   72           $e ventCity =  process_d b_input( $ _POST['eve nt_city']  );
73           $e ventPlace  = process_ db_input(  $_POST['ev ent_place' ] );   73           $e ventPlace  = process_ db_input(  $_POST['ev ent_place' ] );
74     74  
75           
$pictureNa me   =   $_FILES['e vent_photo ']['name'] ;
  75            //   $pictureNa me   =   $_FILES['e vent_photo ']['name'] ;
76           
$thumbName   =   getThumbNa meByPictur eName(   $pictureNa me   );
  76            //   $thumbName   =   getThumbNa meByPictur eName(   $pictureNa me   );
77     77  
78           $s can = geti magesize(  $_FILES['e vent_photo ']['tmp_na me'] );   78           re quire_once ( BX_DIREC TORY_PATH_ CLASSES .  'BxDolEven ts.php' );
    79           $o Events = n ew BxDolEv ents();
    80  
    81           $s EventPhoto Filename =  '';
    82  
    83           if  ($_FILES[ 'event_pho to']) {
    84                    $sPi ctureName  = $sBaseNa me;
    85                    $aSc an = getim agesize($_ FILES['eve nt_photo'] ['tmp_name ']);
    86  
    87                    if (  in_array( $aScan[2],  array(1,2 ,3,6)) &&  0 < strlen ( $_FILES[ 'event_pho to']['name ']) ) {
    88  
    89                             $sCurr entTime =  time();
    90                             if ($i EventID ==  -1) {
    91                                      $sBaseNa me = 'g_'.  $sCurrent Time .'_1' ;
    92                             } else  {
    93                                      $sBaseNa me = db_va lue("SELEC T `PhotoFi lename` FR OM `SDatin gEvents` W HERE `ID`= '{$iEventI D}' LIMIT  1");
    94                                      if ($sBa seName!="" ) {
    95                                               if (ereg ( "([a-z0-9_ ]+)\.", $s BaseName,  $aRegs)) {
    96                                                       $s BaseName =  $aRegs[1] ;
    97                                               }
    98                                      } else {
    99                                               $sBaseName  = ($sBase Name!="")  ? $sBaseNa me : 'g_'.  $sCurrent Time .'_1' ;
    100                                      }
    101                             }
    102  
    103                             $sExt  = moveUplo adedImage(  $_FILES,  'event_pho to', $dir[ 'tmp'] . $ sBaseName,  '', false  );
    104  
    105                             $sBase Name .= $s Ext;
    106  
    107                             $sPict ureName =  $sBaseName ;
    108                             $sThum bName   =  'thumb_'.$ sBaseName;
    109                             $sIcon Name         = 'icon_ '.$sBaseNa me;
79     110  
80           if  ( ( 1 ==  $scan[2] | | 2 == $sc an[2] || 3  == $scan[ 2] || 6 ==  $scan[2]  )    
81                && move_ uploaded_f ile( $_FIL ES['event_ photo']['t mp_name'],  $dir['tmp '] . $pict ureName )  )    
82           {    
83                    $res izeWidth =  (int)$_PO ST['event_ photo_widt h'];    
84                    $res izeHeight  = (int)$_P OST['event _photo_hei ght'];    
85                    // r esize for  thumbnail   111                             // res ize for th umbnail
86                     $
res   =   imageResiz e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $
thumbName,   $ sda t
i ng Thumb W i dth ,   $ sda t
i ng Thumb He i ght   );
  112                              $ v Res   =   imageResiz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s ThumbName,   $ oEven t s-> i
Thumb S i ze ,   $ oEven t s-> i
Thumb S i ze   );
87                     if   (   $
res   !=   IMAGE_ERRO R_SUCCESS   )
  113                              if   (   $ v Res   !=   IMAGE_ERRO R_SUCCESS   )
88                             return  SDATING_E RROR_PHOTO _PROCESS;   114                                      return S DATING_ERR OR_PHOTO_P ROCESS;
89                    // i f width an d height s pecified t hen resize  picture   115                              $ v Res   =   imageResiz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s PictureNam e,   $ oEv e nts->iImg Size
,   $ oEv e nts->iImg Size  
);
90                    if (  $resizeWi dth && $re sizeHeight  )   116                              if   (   $ v Res   !=   IMAGE_ERRO R_SUCCESS   )
91                    {    
92                              $
res   =   imageResiz e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $
pictureNam e,   $ r e
size Width ,   $ r e
size Height   );
   
93                              if   (   $
res   !=   IMAGE_ERRO R_SUCCESS   )
   
94                                      return S DATING_ERR OR_PHOTO_P ROCESS;   117                                      return S DATING_ERR OR_PHOTO_P ROCESS;
95                             unlink ( $dir['tm p'] . $pic tureName ) ;   118                              $ v Res   =   image Re siz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s Ic on Name ,   $oEvents-> iIconSize,   $oEvents-> iIconSize   );
96                    }   119                             if ( $ vRes != IM AGE_ERROR_ SUCCESS )
97                    else    
98                    {    
99                              $
res   =  
re nam e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $ p ic ture Name  
);
   
100                             if ( ! $res )    
101                                      return S DATING_ERR OR_PHOTO_P ROCESS;   120                                      return S DATING_ERR OR_PHOTO_P ROCESS;
    121                             @unlin k( $dir['t mp'] . $sB aseName );
    122                             chmod(  $dir['sda tingImage' ] . $sPict ureName, 0 644 );
    123                             chmod(  $dir['sda tingImage' ] . $sThum bName, 064 4 );
    124                             chmod(  $dir['sda tingImage' ] . $sIcon Name, 0644  );
    125                             $sEven tPhotoFile name = pro cess_db_in put( $sPic tureName ) ;
102                    }   126                    }
103                    chmo d( $dir['s datingImag e'] . $pic tureName,  0644 );    
104                    $eve ntPhotoFil ename = pr ocess_db_i nput( $pic tureName ) ;    
105           }    
106           el se    
107           {    
108                    $eve ntPhotoFil ename = '' ;    
109           }   127           }
110     128  
111           //  event dat e   129           //  event dat e
112           $e ventStart  = strtotim e( $_POST[ 'event_sta rt'] );   130           $e ventStart  = strtotim e( $_POST[ 'event_sta rt'] );
113           if  ( $eventS tart == -1  )   131           if  ( $eventS tart == -1  )
114                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   132                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
115           $e ventEnd =  strtotime(  $_POST['e vent_end']  );   133           $e ventEnd =  strtotime(  $_POST['e vent_end']  );
116           if  ( $eventE nd == -1 )   134           if  ( $eventE nd == -1 )
117                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   135                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
118           $e ventSaleSt art = strt otime( $_P OST['event _sale_star t'] );   136           $e ventSaleSt art = strt otime( $_P OST['event _sale_star t'] );
119           if  ( $eventS aleStart = = -1 )   137           if  ( $eventS aleStart = = -1 )
120                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   138                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
121           $e ventSaleEn d = strtot ime( $_POS T['event_s ale_end']  );   139           $e ventSaleEn d = strtot ime( $_POS T['event_s ale_end']  );
122           if  ( $eventS aleEnd ==  -1 )   140           if  ( $eventS aleEnd ==  -1 )
123                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   141                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
124           if  ( $eventE nd < $even tStart ||  $eventSale End < $eve ntSaleStar t || $even tStart < $ eventSaleS tart )   142           if  ( $eventE nd < $even tStart ||  $eventSale End < $eve ntSaleStar t || $even tStart < $ eventSaleS tart )
125                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   143                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
126     144  
127           //  event res ponsible   145           //  event res ponsible
128           $e ventRespNa me = proce ss_db_inpu t( $_POST[ 'event_res p_name'] ) ;   146           $e ventRespNa me = proce ss_db_inpu t( $_POST[ 'event_res p_name'] ) ;
129           $e ventRespEm ail = proc ess_db_inp ut( $_POST ['event_re sp_email']  );   147           $e ventRespEm ail = proc ess_db_inp ut( $_POST ['event_re sp_email']  );
130           $e ventRespPh one = proc ess_db_inp ut( $_POST ['event_re sp_phone']  );   148           $e ventRespPh one = proc ess_db_inp ut( $_POST ['event_re sp_phone']  );
131     149  
132           //  event par ticipants   150           //  event par ticipants
133           $e ventSexFil ter = '';   151           $e ventSexFil ter = '';
134           if  ( $_POST[ 'event_sex _female']  == 'on' )   152           if  ( $_POST[ 'event_sex _female']  == 'on' )
135                    $eve ntSexFilte r .= 'fema le';   153                    $eve ntSexFilte r .= 'fema le';
136           if  ( $_POST[ 'event_sex _male'] ==  'on' )   154           if  ( $_POST[ 'event_sex _male'] ==  'on' )
137                    $eve ntSexFilte r .= strle n($eventSe xFilter) ?  ',male' :  'male';   155                    $eve ntSexFilte r .= strle n($eventSe xFilter) ?  ',male' :  'male';
138     156  
139           $e ventAgeLow erFilter =  (int)$_PO ST['event_ age_start' ];   157           $e ventAgeLow erFilter =  (int)$_PO ST['event_ age_start' ];
140           $e ventAgeUpp erFilter =  (int)$_PO ST['event_ age_end'];   158           $e ventAgeUpp erFilter =  (int)$_PO ST['event_ age_end'];
141     159  
142           $e ventMember shipFilter  = '';   160           $e ventMember shipFilter  = '';
143           fo reach ( $_ POST['even t_membersh ip'] as $m embershipI D )   161           fo reach ( $_ POST['even t_membersh ip'] as $m embershipI D )
144           {   162           {
145                    $eve ntMembersh ipFilter . = strlen($ eventMembe rshipFilte r) ? ",\'{ $membershi pID}\'" :  "\'{$membe rshipID}\' ";   163                    $eve ntMembersh ipFilter . = strlen($ eventMembe rshipFilte r) ? ",\'{ $membershi pID}\'" :  "\'{$membe rshipID}\' ";
146           }   164           }
147     165  
148           $e ventCountF  = (int)$_ POST['even t_count_fe male'];   166           $e ventCountF  = (int)$_ POST['even t_count_fe male'];
149           $e ventCountM  = (int)$_ POST['even t_count_ma le'];   167           $e ventCountM  = (int)$_ POST['even t_count_ma le'];
150     168  
151           //  ticket pr ices   169           //  ticket pr ices
152           if  ( isset($ _POST['eve nt_price_f ree']) &&  $_POST['ev ent_price_ free'] ==  'on' )   170           if  ( isset($ _POST['eve nt_price_f ree']) &&  $_POST['ev ent_price_ free'] ==  'on' )
153           {   171           {
154                    $eve ntPriceF =  '0.00';   172                    $eve ntPriceF =  '0.00';
155                    $eve ntPriceM =  '0.00';   173                    $eve ntPriceM =  '0.00';
156                    $eve ntPriceC =  '0.00';   174                    $eve ntPriceC =  '0.00';
157           }   175           }
158           el se   176           el se
159           {   177           {
160                    $eve ntPriceF =  (float)$_ POST['even t_price_fe male'];   178                    $eve ntPriceF =  (float)$_ POST['even t_price_fe male'];
161                    $eve ntPriceM =  (float)$_ POST['even t_price_ma le'];   179                    $eve ntPriceM =  (float)$_ POST['even t_price_ma le'];
162           }   180           }
163     181  
164           //  choose op tions   182           //  choose op tions
165           $e ventChoose Period = ( int)$_POST ['event_ch oose_perio d'];   183           $e ventChoose Period = ( int)$_POST ['event_ch oose_perio d'];
166     184  
167           //  allow to  view parti cipants   185           //  allow to  view parti cipants
168           $e ventAllowV iew = $_PO ST['event_ allow_view '] == 'on'  ? '1' : ' 0';   186           $e ventAllowV iew = $_PO ST['event_ allow_view '] == 'on'  ? '1' : ' 0';
169     187  
170           $s NewUri = u riGenerate ($eventTit le, 'SDati ngEvents',  'EntryUri ', 100);   188           $s NewUri = u riGenerate ($eventTit le, 'SDati ngEvents',  'EntryUri ', 100);
171     189  
172           $r es = db_re s( "INSERT  INTO `SDa tingEvents ` SET   190           $r es = db_re s( "INSERT  INTO `SDa tingEvents ` SET
173                                               `Title` =  '$eventTit le',   191                                               `Title` =  '$eventTit le',
174                                               `EntryUri`  = '{$sNew Uri}',   192                                               `EntryUri`  = '{$sNew Uri}',
175                                               `Descripti on` = '$ev entDesc',   193                                               `Descripti on` = '$ev entDesc',
176                                               `Status` =  '$eventSt atus',   194                                               `Status` =  '$eventSt atus',
177                                               `StatusMes sage` = '$ eventStatu sMessage',   195                                               `StatusMes sage` = '$ eventStatu sMessage',
178                                               `Country`  = '$eventC ountry',   196                                               `Country`  = '$eventC ountry',
179                                               `City` = ' $eventCity ',   197                                               `City` = ' $eventCity ',
180                                               `Place` =  '$eventPla ce',   198                                               `Place` =  '$eventPla ce',
181                                               `PhotoFile name`   =   '
$
eventPhoto Filename
',
  199                                               `PhotoFile name`   =   ' { $ s EventPhoto Filename } ',
182                                               `EventStar t` = FROM_ UNIXTIME(  $eventStar t ),   200                                               `EventStar t` = FROM_ UNIXTIME(  $eventStar t ),
183                                               `EventEnd`  = FROM_UN IXTIME( $e ventEnd ),   201                                               `EventEnd`  = FROM_UN IXTIME( $e ventEnd ),
184                                               `TicketSal eStart` =  FROM_UNIXT IME( $even tSaleStart  ),   202                                               `TicketSal eStart` =  FROM_UNIXT IME( $even tSaleStart  ),
185                                               `TicketSal eEnd` = FR OM_UNIXTIM E( $eventS aleEnd ),   203                                               `TicketSal eEnd` = FR OM_UNIXTIM E( $eventS aleEnd ),
186                                               `Responsib leName` =  '$eventRes pName',   204                                               `Responsib leName` =  '$eventRes pName',
187                                               `Responsib leEmail` =  '$eventRe spEmail',   205                                               `Responsib leEmail` =  '$eventRe spEmail',
188                                               `Responsib lePhone` =  '$eventRe spPhone',   206                                               `Responsib lePhone` =  '$eventRe spPhone',
189                                               `EventSexF ilter` = ' $eventSexF ilter',   207                                               `EventSexF ilter` = ' $eventSexF ilter',
190                                               `EventAgeL owerFilter ` = $event AgeLowerFi lter,   208                                               `EventAgeL owerFilter ` = $event AgeLowerFi lter,
191                                               `EventAgeU pperFilter ` = $event AgeUpperFi lter,   209                                               `EventAgeU pperFilter ` = $event AgeUpperFi lter,
192                                               `EventMemb ershipFilt er` = '$ev entMembers hipFilter' ,   210                                               `EventMemb ershipFilt er` = '$ev entMembers hipFilter' ,
193                                               `TicketCou ntFemale`  = $eventCo untF,   211                                               `TicketCou ntFemale`  = $eventCo untF,
194                                               `TicketCou ntMale` =  $eventCoun tM,   212                                               `TicketCou ntMale` =  $eventCoun tM,
195                                               `TicketPri ceFemale`  = $eventPr iceF,   213                                               `TicketPri ceFemale`  = $eventPr iceF,
196                                               `TicketPri ceMale` =  $eventPric eM,   214                                               `TicketPri ceMale` =  $eventPric eM,
197                                               `ChoosePer iod` = $ev entChooseP eriod,   215                                               `ChoosePer iod` = $ev entChooseP eriod,
198                                               `AllowView Participan ts` = $eve ntAllowVie w" );   216                                               `AllowView Participan ts` = $eve ntAllowVie w" );
199           if  ( !$res )   217           if  ( !$res )
200                    retu rn SDATING _ERROR_QUE RY_ERROR;   218                    retu rn SDATING _ERROR_QUE RY_ERROR;
201           if  ( mysql_a ffected_ro ws($GLOBAL S['MySQL'] ->link) ==  0 )   219           if  ( mysql_a ffected_ro ws($GLOBAL S['MySQL'] ->link) ==  0 )
202                    retu rn SDATING _ERROR_NOT _AFFECTED;   220                    retu rn SDATING _ERROR_NOT _AFFECTED;
203           re turn SDATI NG_ERROR_S UCCESS;   221           re turn SDATI NG_ERROR_S UCCESS;
204   }   222   }
205     223  
206   /**   224   /**
207    * Updates  event inf ormation i n the data base   225    * Updates  event inf ormation i n the data base
208    *   226    *
209    * @param  int $event Id                                     - up date event  ID   227    * @param  int $event Id                                     - up date event  ID
210    *   228    *
211    * @return  int                                                       - zero  on succes s, non-zer o on fail   229    * @return  int                                                       - zero  on succes s, non-zer o on fail
212    *   230    *
213    *   231    *
214    */   232    */
215   function S DUpdateEve nt( $event Id )   233   function S DUpdateEve nt( $event Id )
216   {   234   {
217           gl obal $dir;   235           gl obal $dir;
218           gl obal $sdat ingThumbWi dth;   236           gl obal $sdat ingThumbWi dth;
219           gl obal $sdat ingThumbHe ight;   237           gl obal $sdat ingThumbHe ight;
220     238  
221           $e ventExistA rr = db_ar r( "SELECT  `ID`, `Ti tle`, `Des cription`,  `Status`,  `StatusMe ssage`, `C ountry`, ` City`, `Pl ace`, `Pho toFilename `, `EventS tart`, `Ev entEnd`, ` TicketSale Start`, `T icketSaleE nd`, `Resp onsibleNam e`, `Respo nsibleEmai l`, `Respo nsiblePhon e`, `Event SexFilter` , `EventAg eLowerFilt er`, `Even tAgeUpperF ilter`, `E ventMember shipFilter `, `Ticket CountFemal e`, `Ticke tCountMale `, `Ticket PriceFemal e`, `Ticke tPriceMale `, `Choose Period`, ` AllowViewP articipant s` FROM `S DatingEven ts` WHERE  `ID` = $ev entId" );   239           $e ventExistA rr = db_ar r( "SELECT  `ID`, `Ti tle`, `Des cription`,  `Status`,  `StatusMe ssage`, `C ountry`, ` City`, `Pl ace`, `Pho toFilename `, `EventS tart`, `Ev entEnd`, ` TicketSale Start`, `T icketSaleE nd`, `Resp onsibleNam e`, `Respo nsibleEmai l`, `Respo nsiblePhon e`, `Event SexFilter` , `EventAg eLowerFilt er`, `Even tAgeUpperF ilter`, `E ventMember shipFilter `, `Ticket CountFemal e`, `Ticke tCountMale `, `Ticket PriceFemal e`, `Ticke tPriceMale `, `Choose Period`, ` AllowViewP articipant s` FROM `S DatingEven ts` WHERE  `ID` = $ev entId" );
222     240  
223           //  common   241           //  common
224           $e ventTitle  = process_ db_input(  $_POST['ev ent_title' ] );   242           $e ventTitle  = process_ db_input(  $_POST['ev ent_title' ] );
225           $e ventDesc =  process_d b_input( $ _POST['eve nt_desc']  );   243           $e ventDesc =  process_d b_input( $ _POST['eve nt_desc']  );
226           sw itch ( $_P OST['event _status']  )   244           sw itch ( $_P OST['event _status']  )
227           {   245           {
228                    case  'active':   246                    case  'active':
229                             $event Status = ' Active';   247                             $event Status = ' Active';
230                             break;   248                             break;
231                    case  'inactive ':   249                    case  'inactive ':
232                             $event Status = ' Inactive';   250                             $event Status = ' Inactive';
233                             break;   251                             break;
234                    case  'canceled ':   252                    case  'canceled ':
235                             $event Status = ' Canceled';   253                             $event Status = ' Canceled';
236                             break;   254                             break;
237                    defa ult:   255                    defa ult:
238                             $event Status = ' Active';   256                             $event Status = ' Active';
239           }   257           }
240           $e ventStatus Message =  process_db _input( $_ POST['even t_statusms g'] );   258           $e ventStatus Message =  process_db _input( $_ POST['even t_statusms g'] );
241     259  
242           //  event pla ce   260           //  event pla ce
243           $e ventCountr y = proces s_db_input ( $_POST[' event_coun try'] );   261           $e ventCountr y = proces s_db_input ( $_POST[' event_coun try'] );
244           $e ventCity =  process_d b_input( $ _POST['eve nt_city']  );   262           $e ventCity =  process_d b_input( $ _POST['eve nt_city']  );
245           $e ventPlace  = process_ db_input(  $_POST['ev ent_place' ] );   263           $e ventPlace  = process_ db_input(  $_POST['ev ent_place' ] );
246     264  
247           $p ictureName  = $_FILES ['event_ph oto']['nam e'];    
248           $t humbName =  getThumbN ameByPictu reName( $p ictureName  );    
249     265  
250           $s can = geti magesize(  $_FILES['e vent_photo ']['tmp_na me'] );   266           re quire_once ( BX_DIREC TORY_PATH_ CLASSES .  'BxDolEven ts.php' );
    267           $o Events = n ew BxDolEv ents();
251     268  
252           if  ( ( 1 ==  $scan[2] | | 2 == $sc an[2] || 3  == $scan[ 2] || 6 ==  $scan[2]  )   269           $s EventPhoto Filename =  '';
253                     &&   mov e _uplo a d e d_f i l e(   $_FILES['e vent_photo ']['tmp_na me'] ,   $dir['tmp' ]   .   $pictureNa me   )   )
  270  
254            {   271           if  ($_FILES[ 'event_pho to']) {
255                    if (  strlen( $ eventExist Arr['Photo Filename']  ) && file _exists( $ dir['sdati ngImage']  . $eventEx istArr['Ph otoFilenam e'] ) )   272                    $sPi ctureName  = $sBaseNa me;
256                     {   273                     $aScan   =   g e tim a g e s i z e($_FILES[ 'event_pho to']['tmp_ name']
) ;
257                             unlink ( $dir['sd atingImage '] . $even tExistArr[ 'PhotoFile name'] );   274  
    275                    if (  in_array( $aScan[2],  array(1,2 ,3,6)) &&  0 < strlen ( $_FILES[ 'event_pho to']['name ']) ) {
    276  
    277                             $sCurr entTime =  time();
    278                             if ($i EventID ==  -1) {
    279                                      $sBaseNa me = 'g_'.  $sCurrent Time .'_1' ;
    280                             } else  {
    281                                      $sBaseNa me = db_va lue("SELEC T `PhotoFi lename` FR OM `SDatin gEvents` W HERE `ID`= '{$iEventI D}' LIMIT  1");
    282                                      if ($sBa seName!="" ) {
    283                                               if (ereg ( "([a-z0-9_ ]+)\.", $s BaseName,  $aRegs)) {
    284                                                       $s BaseName =  $aRegs[1] ;
258                    }   285                                               }
259                    $res izeWidth =  (int)$_PO ST['event_ photo_widt h'];   286                                      } else {
260                    $res izeHeight  = (int)$_P OST['event _photo_hei ght'];   287                                               $sBaseName  = ($sBase Name!="")  ? $sBaseNa me : 'g_'.  $sCurrent Time .'_1' ;
    288                                      }
    289                             }
    290  
    291                             $sExt  = moveUplo adedImage(  $_FILES,  'event_pho to', $dir[ 'tmp'] . $ sBaseName,  '', false  );
    292  
    293                             $sBase Name .= $s Ext;
    294  
    295                             $sPict ureName =  $sBaseName ;
    296                             $sThum bName   =  'thumb_'.$ sBaseName;
    297                             $sIcon Name         = 'icon_ '.$sBaseNa me;
    298  
261                    // r esize for  thumbnail   299                             // res ize for th umbnail
262                     $
res   =   imageResiz e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $
thumbName,   $ sda t
i ng Thumb W i dth ,   $ sda t
i ng Thumb He i ght   );
  300                              $ v Res   =   imageResiz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s ThumbName,   $ oEven t s-> i
Thumb S i ze ,   $ oEven t s-> i
Thumb S i ze   );
263                     if   (   $
res   !=   IMAGE_ERRO R_SUCCESS   )
  301                              if   (   $ v Res   !=   IMAGE_ERRO R_SUCCESS   )
264                             return  SDATING_E RROR_PHOTO _PROCESS;   302                                      return S DATING_ERR OR_PHOTO_P ROCESS;
265                    // i f width an d height s pecified t hen resize  picture   303                              $ v Res   =   imageResiz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s PictureNam e,   $ oEv e nts->iImg Size
,   $ oEv e nts->iImg Size  
);
266                    if (  $resizeWi dth && $re sizeHeight  )   304                              if   (   $ v Res   !=   IMAGE_ERRO R_SUCCESS   )
267                    {    
268                              $
res   =   imageResiz e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $
pictureNam e,   $ r e
size Width ,   $ r e
size Height   );
   
269                              if   (   $
res   !=   IMAGE_ERRO R_SUCCESS   )
   
270                                      return S DATING_ERR OR_PHOTO_P ROCESS;   305                                      return S DATING_ERR OR_PHOTO_P ROCESS;
271                             unlink ( $dir['tm p'] . $pic tureName ) ;   306                              $ v Res   =   image Re siz e(   $dir['tmp' ]   .   $ sBas eName,   $dir['sdat ingImage']   .   $ s Ic on Name ,   $oEvents-> iIconSize,   $oEvents-> iIconSize   );
272                    }   307                             if ( $ vRes != IM AGE_ERROR_ SUCCESS )
273                    else    
274                    {    
275                              $
res   =  
re nam e(   $dir['tmp' ]   .   $ pictur eName,   $dir['sdat ingImage']   .   $ p ic ture Name  
);
   
276                             if ( ! $res )    
277                                      return S DATING_ERR OR_PHOTO_P ROCESS;   308                                      return S DATING_ERR OR_PHOTO_P ROCESS;
    309                             @unlin k( $dir['t mp'] . $sB aseName );
    310                             chmod(  $dir['sda tingImage' ] . $sPict ureName, 0 644 );
    311                             chmod(  $dir['sda tingImage' ] . $sThum bName, 064 4 );
    312                             chmod(  $dir['sda tingImage' ] . $sIcon Name, 0644  );
    313                             $sEven tPhotoFile name = pro cess_db_in put( $sPic tureName ) ;
278                    }   314                    }
279                    chmo d( $dir['s datingImag e'] . $pic tureName,  0644 );    
280                    $eve ntPhotoFil ename = pr ocess_db_i nput( $pic tureName ) ;    
281           }    
282           el se    
283           {    
284                    $eve ntPhotoFil ename = $e ventExistA rr['PhotoF ilename'];    
285           }   315           }
286     316  
287           //  event dat e   317           //  event dat e
288           $e ventStart  = strtotim e( $_POST[ 'event_sta rt'] );   318           $e ventStart  = strtotim e( $_POST[ 'event_sta rt'] );
289           if  ( $eventS tart == -1  )   319           if  ( $eventS tart == -1  )
290                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   320                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
291           $e ventEnd =  strtotime(  $_POST['e vent_end']  );   321           $e ventEnd =  strtotime(  $_POST['e vent_end']  );
292           if  ( $eventE nd == -1 )   322           if  ( $eventE nd == -1 )
293                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   323                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
294           $e ventSaleSt art = strt otime( $_P OST['event _sale_star t'] );   324           $e ventSaleSt art = strt otime( $_P OST['event _sale_star t'] );
295           if  ( $eventS aleStart = = -1 )   325           if  ( $eventS aleStart = = -1 )
296                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   326                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
297           $e ventSaleEn d = strtot ime( $_POS T['event_s ale_end']  );   327           $e ventSaleEn d = strtot ime( $_POS T['event_s ale_end']  );
298           if  ( $eventS aleEnd ==  -1 )   328           if  ( $eventS aleEnd ==  -1 )
299                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   329                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
300           if  ( $eventE nd < $even tStart ||  $eventSale End < $eve ntSaleStar t || $even tStart < $ eventSaleS tart )   330           if  ( $eventE nd < $even tStart ||  $eventSale End < $eve ntSaleStar t || $even tStart < $ eventSaleS tart )
301                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;   331                    retu rn SDATING _ERROR_WRO NG_DATE_FO RMAT;
302     332  
303           //  event res ponsible   333           //  event res ponsible
304           $e ventRespNa me = proce ss_db_inpu t( $_POST[ 'event_res p_name'] ) ;   334           $e ventRespNa me = proce ss_db_inpu t( $_POST[ 'event_res p_name'] ) ;
305           $e ventRespEm ail = proc ess_db_inp ut( $_POST ['event_re sp_email']  );   335           $e ventRespEm ail = proc ess_db_inp ut( $_POST ['event_re sp_email']  );
306           $e ventRespPh one = proc ess_db_inp ut( $_POST ['event_re sp_phone']  );   336           $e ventRespPh one = proc ess_db_inp ut( $_POST ['event_re sp_phone']  );
307     337  
308           //  event par ticipants   338           //  event par ticipants
309           $e ventSexFil ter = '';   339           $e ventSexFil ter = '';
310           if  ( $_POST[ 'event_sex _female']  == 'on' )   340           if  ( $_POST[ 'event_sex _female']  == 'on' )
311                    $eve ntSexFilte r .= 'fema le';   341                    $eve ntSexFilte r .= 'fema le';
312           if  ( $_POST[ 'event_sex _male'] ==  'on' )   342           if  ( $_POST[ 'event_sex _male'] ==  'on' )
313                    $eve ntSexFilte r .= strle n($eventSe xFilter) ?  ',male' :  'male';   343                    $eve ntSexFilte r .= strle n($eventSe xFilter) ?  ',male' :  'male';
314     344  
315           $e ventAgeLow erFilter =  (int)$_PO ST['event_ age_start' ];   345           $e ventAgeLow erFilter =  (int)$_PO ST['event_ age_start' ];
316           $e ventAgeUpp erFilter =  (int)$_PO ST['event_ age_end'];   346           $e ventAgeUpp erFilter =  (int)$_PO ST['event_ age_end'];
317     347  
318           $e ventMember shipFilter  = '';   348           $e ventMember shipFilter  = '';
319           fo reach ( $_ POST['even t_membersh ip'] as $m embershipI D )   349           fo reach ( $_ POST['even t_membersh ip'] as $m embershipI D )
320           {   350           {
321                    $eve ntMembersh ipFilter . = strlen($ eventMembe rshipFilte r) ? ",\'{ $membershi pID}\'" :  "\'{$membe rshipID}\' ";   351                    $eve ntMembersh ipFilter . = strlen($ eventMembe rshipFilte r) ? ",\'{ $membershi pID}\'" :  "\'{$membe rshipID}\' ";
322           }   352           }
323     353  
324           $e ventCountF  = (int)$_ POST['even t_count_fe male'];   354           $e ventCountF  = (int)$_ POST['even t_count_fe male'];
325           $e ventCountM  = (int)$_ POST['even t_count_ma le'];   355           $e ventCountM  = (int)$_ POST['even t_count_ma le'];
326     356  
327           //  ticket pr ices   357           //  ticket pr ices
328           if  ( isset($ _POST['eve nt_price_f ree']) &&  $_POST['ev ent_price_ free'] ==  'on' )   358           if  ( isset($ _POST['eve nt_price_f ree']) &&  $_POST['ev ent_price_ free'] ==  'on' )
329           {   359           {
330                    $eve ntPriceF =  '0.00';   360                    $eve ntPriceF =  '0.00';
331                    $eve ntPriceM =  '0.00';   361                    $eve ntPriceM =  '0.00';
332                    $eve ntPriceC =  '0.00';   362                    $eve ntPriceC =  '0.00';
333           }   363           }
334           el se   364           el se
335           {   365           {
336                    $eve ntPriceF =  (float)$_ POST['even t_price_fe male'];   366                    $eve ntPriceF =  (float)$_ POST['even t_price_fe male'];
337                    $eve ntPriceM =  (float)$_ POST['even t_price_ma le'];   367                    $eve ntPriceM =  (float)$_ POST['even t_price_ma le'];
338           }   368           }
339     369  
340           //  choose op tions   370           //  choose op tions
341           $e ventChoose Period = ( int)$_POST ['event_ch oose_perio d'];   371           $e ventChoose Period = ( int)$_POST ['event_ch oose_perio d'];
342     372  
343           //  allow to  view parti cipants   373           //  allow to  view parti cipants
344           $e ventAllowV iew = $_PO ST['event_ allow_view '] == 'on'  ? '1' : ' 0';   374           $e ventAllowV iew = $_PO ST['event_ allow_view '] == 'on'  ? '1' : ' 0';
345     375  
346           $r es = db_re s( "UPDATE  `SDatingE vents` SET   376           $r es = db_re s( "UPDATE  `SDatingE vents` SET
347                                               `Title` =  '$eventTit le',   377                                               `Title` =  '$eventTit le',
348                                               `Descripti on` = '$ev entDesc',   378                                               `Descripti on` = '$ev entDesc',
349                                               `Status` =  '$eventSt atus',   379                                               `Status` =  '$eventSt atus',
350                                               `StatusMes sage` = '$ eventStatu sMessage',   380                                               `StatusMes sage` = '$ eventStatu sMessage',
351                                               `Country`  = '$eventC ountry',   381                                               `Country`  = '$eventC ountry',
352                                               `City` = ' $eventCity ',   382                                               `City` = ' $eventCity ',
353                                               `Place` =  '$eventPla ce',   383                                               `Place` =  '$eventPla ce',
354                                               `PhotoFile name`   =   '
$
eventPhoto Filename
',
  384                                               `PhotoFile name`   =   ' { $ s EventPhoto Filename } ',
355                                               `EventStar t` = FROM_ UNIXTIME(  $eventStar t ),   385                                               `EventStar t` = FROM_ UNIXTIME(  $eventStar t ),
356                                               `EventEnd`  = FROM_UN IXTIME( $e ventEnd ),   386                                               `EventEnd`  = FROM_UN IXTIME( $e ventEnd ),
357                                               `TicketSal eStart` =  FROM_UNIXT IME( $even tSaleStart  ),   387                                               `TicketSal eStart` =  FROM_UNIXT IME( $even tSaleStart  ),
358                                               `TicketSal eEnd` = FR OM_UNIXTIM E( $eventS aleEnd ),   388                                               `TicketSal eEnd` = FR OM_UNIXTIM E( $eventS aleEnd ),
359                                               `Responsib leName` =  '$eventRes pName',   389                                               `Responsib leName` =  '$eventRes pName',
360                                               `Responsib leEmail` =  '$eventRe spEmail',   390                                               `Responsib leEmail` =  '$eventRe spEmail',
361                                               `Responsib lePhone` =  '$eventRe spPhone',   391                                               `Responsib lePhone` =  '$eventRe spPhone',
362                                               `EventSexF ilter` = ' $eventSexF ilter',   392                                               `EventSexF ilter` = ' $eventSexF ilter',
363                                               `EventAgeL owerFilter ` = $event AgeLowerFi lter,   393                                               `EventAgeL owerFilter ` = $event AgeLowerFi lter,
364                                               `EventAgeU pperFilter ` = $event AgeUpperFi lter,   394                                               `EventAgeU pperFilter ` = $event AgeUpperFi lter,
365                                               `EventMemb ershipFilt er` = '$ev entMembers hipFilter' ,   395                                               `EventMemb ershipFilt er` = '$ev entMembers hipFilter' ,
366                                               `TicketCou ntFemale`  = $eventCo untF,   396                                               `TicketCou ntFemale`  = $eventCo untF,
367                                               `TicketCou ntMale` =  $eventCoun tM,   397                                               `TicketCou ntMale` =  $eventCoun tM,
368                                               `TicketPri ceFemale`  = $eventPr iceF,   398                                               `TicketPri ceFemale`  = $eventPr iceF,
369                                               `TicketPri ceMale` =  $eventPric eM,   399                                               `TicketPri ceMale` =  $eventPric eM,
370                                               `ChoosePer iod` = $ev entChooseP eriod,   400                                               `ChoosePer iod` = $ev entChooseP eriod,
371                                               `AllowView Participan ts` = $eve ntAllowVie w   401                                               `AllowView Participan ts` = $eve ntAllowVie w
372                                               WHERE `ID`  = $eventI d" );   402                                               WHERE `ID`  = $eventI d" );
373           if  ( !$res )   403           if  ( !$res )
374                    retu rn SDATING _ERROR_QUE RY_ERROR;   404                    retu rn SDATING _ERROR_QUE RY_ERROR;
375           if  ( mysql_a ffected_ro ws($GLOBAL S['MySQL'] ->link) ==  0 )   405           if  ( mysql_a ffected_ro ws($GLOBAL S['MySQL'] ->link) ==  0 )
376                    retu rn SDATING _ERROR_NOT _AFFECTED;   406                    retu rn SDATING _ERROR_NOT _AFFECTED;
377           re turn SDATI NG_ERROR_S UCCESS;   407           re turn SDATI NG_ERROR_S UCCESS;
378   }   408   }
379     409  
380   /**   410   /**
381    * Deletes  event fro m the data base   411    * Deletes  event fro m the data base
382    *   412    *
383    * @param  int $event Id                                     - de lete event  ID   413    * @param  int $event Id                                     - de lete event  ID
384    *   414    *
385    * @return  bool                                                      - true  on succes s, false o n fail   415    * @return  bool                                                      - true  on succes s, false o n fail
386    *   416    *
387    *   417    *
388    */   418    */
389   function S DDeleteEve nt( $event Id )   419   function S DDeleteEve nt( $event Id )
390   {   420   {
391           re turn db_re s( "DELETE  FROM `SDa tingEvents ` WHERE `I D` = $even tId" );   421           re turn db_re s( "DELETE  FROM `SDa tingEvents ` WHERE `I D` = $even tId" );
392   }   422   }
393     423  
394   /**   424   /**
395    * Prints  brief info rmation fo r specifie d event. U ses for pr inting eve nts lists   425    * Prints  brief info rmation fo r specifie d event. U ses for pr inting eve nts lists
396    *   426    *
397    * @param  array $eve ntArr                                           - arra y with eve nt data ob tained fro m the data base   427    * @param  array $eve ntArr                                           - arra y with eve nt data ob tained fro m the data base
398    *   428    *
399    *   429    *
400    */   430    */
401   function S DPrintEven tRow( $eve ntArr )   431   function S DPrintEven tRow( $eve ntArr )
402   {   432   {
403           gl obal $dir;   433           gl obal $dir;
404           gl obal $site ;   434           gl obal $site ;
405           gl obal $aPre Values;   435           gl obal $aPre Values;
406     436  
407           $a PostedBy =  getProfil eInfo($eve ntArr['Res ponsibleID ']);   437           $a PostedBy =  getProfil eInfo($eve ntArr['Res ponsibleID ']);
408           $s PostedBy =  $aPostedB y['NickNam e'];   438           $s PostedBy =  $aPostedB y['NickNam e'];
409   ?>   439   ?>
410   <div style ="padding:  2px; widt h: 540px;  overflow:  auto;">   440   <div style ="padding:  2px; widt h: 540px;  overflow:  auto;">
411           <t able cellp adding="2"  cellspaci ng="2" bor der="0" cl ass="text"  width="10 0%">   441           <t able cellp adding="2"  cellspaci ng="2" bor der="0" cl ass="text"  width="10 0%">
412                    <tr>   442                    <tr>
413                             <td al ign="cente r" rowspan ="2" width ="208">   443                             <td al ign="cente r" rowspan ="2" width ="208">
414   <?   444   <?
415           if  ( strlen( trim($even tArr['Phot oFilename' ])) && fil e_exists($ dir['sdati ngImage']  . $eventAr r['PhotoFi lename'])  )   445           if  ( strlen( trim($even tArr['Phot oFilename' ])) && fil e_exists($ dir['sdati ngImage']  . $eventAr r['PhotoFi lename'])  )
416           {   446           {
417                    echo  "   447                    echo  "
418                                      <img src =\"{$site[ 'sdatingIm age']}{$ev entArr['Ph otoFilenam e']}\" bor der=\"0\"  alt=\"{$ev entArr['Ti tle']} pho to\" />";   448                                      <img src =\"{$site[ 'sdatingIm age']}{$ev entArr['Ph otoFilenam e']}\" bor der=\"0\"  alt=\"{$ev entArr['Ti tle']} pho to\" />";
419           }   449           }
420           el se   450           el se
421           {   451           {
422                    echo  "   452                    echo  "
423                                      <div ali gn=\"cente r\" class= \"text\" s tyle=\"wid th: 200px;  height: 1 50px; vert ical-align : middle;  line-heigh t: 150px;  border: 1p x solid si lver;\">No  photo</di v>";   453                                      <div ali gn=\"cente r\" class= \"text\" s tyle=\"wid th: 200px;  height: 1 50px; vert ical-align : middle;  line-heigh t: 150px;  border: 1p x solid si lver;\">No  photo</di v>";
424           }   454           }
425   ?>   455   ?>
426                             </td>   456                             </td>
427                             <td al ign="cente r" class=" section_he ader" styl e="height:  6px; line -height: 1 0px; font- weight: bo ld;"><?= p rocess_lin e_output($ eventArr[' Title']) ? ></td>   457                             <td al ign="cente r" class=" section_he ader" styl e="height:  6px; line -height: 1 0px; font- weight: bo ld;"><?= p rocess_lin e_output($ eventArr[' Title']) ? ></td>
428                    </tr >   458                    </tr >
429                    <tr>   459                    <tr>
430                             <td cl ass="secti on_row" st yle="text- align: lef t; vertica l-align: t op;">   460                             <td cl ass="secti on_row" st yle="text- align: lef t; vertica l-align: t op;">
431                                      <div sty le="text-a lign: righ t;"><a hre f="<?= "{$ _SERVER['P HP_SELF']} ?action=sh ow_edit_fo rm&amp;eve nt_id={$ev entArr['ID ']}" ?>">E dit</a>&nb sp;|&nbsp; <a href="j avascript: void(null) ;" onClick ="javascri pt: if ( c onfirm('Ar e you sure  you want  to delete  this event ?') ) { lo cation.hre f = '<?= " {$_SERVER[ 'PHP_SELF' ]}?action= delete&amp ;event_id= {$eventArr ['ID']}" ? >'; } retu rn false;  ">Delete</ a>&nbsp;|& nbsp;<a hr ef="<?= "{ $_SERVER[' PHP_SELF'] }?action=s how_part&a mp;event_i d={$eventA rr['ID']}"  ?>">Parti cipants</a >&nbsp;|&n bsp;<a hre f="<?= "{$ _SERVER['P HP_SELF']} ?action=sh ow_match&a mp;event_i d={$eventA rr['ID']}"  ?>">Match es</a></di v>   461                                      <div sty le="text-a lign: righ t;"><a hre f="<?= "{$ _SERVER['P HP_SELF']} ?action=sh ow_edit_fo rm&amp;eve nt_id={$ev entArr['ID ']}" ?>">E dit</a>&nb sp;|&nbsp; <a href="j avascript: void(null) ;" onClick ="javascri pt: if ( c onfirm('Ar e you sure  you want  to delete  this event ?') ) { lo cation.hre f = '<?= " {$_SERVER[ 'PHP_SELF' ]}?action= delete&amp ;event_id= {$eventArr ['ID']}" ? >'; } retu rn false;  ">Delete</ a>&nbsp;|& nbsp;<a hr ef="<?= "{ $_SERVER[' PHP_SELF'] }?action=s how_part&a mp;event_i d={$eventA rr['ID']}"  ?>">Parti cipants</a >&nbsp;|&n bsp;<a hre f="<?= "{$ _SERVER['P HP_SELF']} ?action=sh ow_match&a mp;event_i d={$eventA rr['ID']}"  ?>">Match es</a></di v>
432                                      <b>Statu s:</b> <?=  $eventArr ['Status']  ?><br />   462                                      <b>Statu s:</b> <?=  $eventArr ['Status']  ?><br />
433                                      <b>Statu s message: </b> <?= p rocess_lin e_output($ eventArr[' StatusMess age']) ?>< br />   463                                      <b>Statu s message: </b> <?= p rocess_lin e_output($ eventArr[' StatusMess age']) ?>< br />
434                                      <b>Appoi nted date/ time:</b>  <?= $event Arr['Event Start'] ?> <br />   464                                      <b>Appoi nted date/ time:</b>  <?= $event Arr['Event Start'] ?> <br />
435                                      <b>Poste d By:</b>  <?= '<a hr ef='.$site ['url'].$s PostedBy.' >'.$sPoste dBy.'</a>'  ?><br />   465                                      <b>Poste d By:</b>  <?= '<a hr ef='.$site ['url'].$s PostedBy.' >'.$sPoste dBy.'</a>'  ?><br />
436                                      <b>Place :</b> <?=  _t($aPreVa lues['Coun try'][$eve ntArr['Cou ntry']]['L Key']) .',  '. proces s_line_out put($event Arr['City' ]) .', '.  process_li ne_output( $eventArr[ 'Place'])  ?><br />   466                                      <b>Place :</b> <?=  _t($aPreVa lues['Coun try'][$eve ntArr['Cou ntry']]['L Key']) .',  '. proces s_line_out put($event Arr['City' ]) .', '.  process_li ne_output( $eventArr[ 'Place'])  ?><br />
437                                      <b>Descr iption:</b > <?= $eve ntArr['Des cription']  ?><br />   467                                      <b>Descr iption:</b > <?= $eve ntArr['Des cription']  ?><br />
438                             </td>   468                             </td>
439                    </tr >   469                    </tr >
440           </ table>   470           </ table>
441   </div>   471   </div>
442   <?   472   <?
443   }   473   }
444     474  
445   /**   475   /**
446    * Prints  page navig ation cont rols   476    * Prints  page navig ation cont rols
447    *   477    *
448    * @param  int $fromE vent                                            - zero -based eve nt index w hich shows  current n avigation  position   478    * @param  int $fromE vent                                            - zero -based eve nt index w hich shows  current n avigation  position
449    * @param  int $total Events                                          - tota l count of  events in  query   479    * @param  int $total Events                                          - tota l count of  events in  query
450    * @param  bool $topN avigation                              - is  navigatio n bar loca ted in the  top (in t he bottom  otherwise)   480    * @param  bool $topN avigation                              - is  navigatio n bar loca ted in the  top (in t he bottom  otherwise)
451    *   481    *
452    *   482    *
453    */   483    */
454   function S DPrintNavi gation( $f romEvent,  $totalEven ts, $topNa vigation =  true )   484   function S DPrintNavi gation( $f romEvent,  $totalEven ts, $topNa vigation =  true )
455   {   485   {
456           gl obal $navi gationStep ;   486           gl obal $navi gationStep ;
457     487  
458           $f romEvent =  (int)$fro mEvent;   488           $f romEvent =  (int)$fro mEvent;
459           $t otalEvents  = (int)$t otalEvents ;   489           $t otalEvents  = (int)$t otalEvents ;
460           $r et = 'Page s:&nbsp;';   490           $r et = 'Page s:&nbsp;';
461     491  
462           //  if count  of events  less than  page step,  then page  navigatio n isn't sh own   492           //  if count  of events  less than  page step,  then page  navigatio n isn't sh own
463           if  ( $totalE vents <= $ navigation Step )   493           if  ( $totalE vents <= $ navigation Step )
464                    retu rn '';   494                    retu rn '';
465     495  
466           //  if it's n ot first p age then s how 'Prev'  link   496           //  if it's n ot first p age then s how 'Prev'  link
467           if  ( $fromEv ent >= $na vigationSt ep )   497           if  ( $fromEv ent >= $na vigationSt ep )
468           {   498           {
469                    $pre vFrom = (0  < ($fromE vent - $na vigationSt ep)) ? ($f romEvent -  $navigati onStep) :  0;   499                    $pre vFrom = (0  < ($fromE vent - $na vigationSt ep)) ? ($f romEvent -  $navigati onStep) :  0;
470                    $ret  .= "<a hr ef=\"javas cript:void (null);\"  onClick=\" javascript : navigati onSubmit({ $prevFrom} ); return  false;\">P rev</a>&nb sp;";   500                    $ret  .= "<a hr ef=\"javas cript:void (null);\"  onClick=\" javascript : navigati onSubmit({ $prevFrom} ); return  false;\">P rev</a>&nb sp;";
471           }   501           }
472     502  
473           //  show page  links   503           //  show page  links
474           $c urrentEven t = 0;   504           $c urrentEven t = 0;
475           $c urrentPage  = 1;   505           $c urrentPage  = 1;
476           wh ile ( $cur rentEvent  < $totalEv ents )   506           wh ile ( $cur rentEvent  < $totalEv ents )
477           {   507           {
478                    if (  $currentE vent == $f romEvent )   508                    if (  $currentE vent == $f romEvent )
479                             $ret . = "[{$curr entPage}]& nbsp;";   509                             $ret . = "[{$curr entPage}]& nbsp;";
480                    else   510                    else
481                             $ret . = "<a href =\"javascr ipt:void(n ull);\" on Click=\"ja vascript:  navigation Submit({$c urrentEven t}); retur n false;\" >{$current Page}</a>& nbsp;";   511                             $ret . = "<a href =\"javascr ipt:void(n ull);\" on Click=\"ja vascript:  navigation Submit({$c urrentEven t}); retur n false;\" >{$current Page}</a>& nbsp;";
482                    $cur rentEvent  += $naviga tionStep;   512                    $cur rentEvent  += $naviga tionStep;
483                    $cur rentPage++ ;   513                    $cur rentPage++ ;
484           }   514           }
485     515  
486           //  if it's n ot last pa ge then sh ow 'Next'  link   516           //  if it's n ot last pa ge then sh ow 'Next'  link
487           if  ( $totalE vents > $f romEvent +  $navigati onStep )   517           if  ( $totalE vents > $f romEvent +  $navigati onStep )
488           {   518           {
489                    $nex tFrom = $f romEvent +  $navigati onStep;   519                    $nex tFrom = $f romEvent +  $navigati onStep;
490                    $ret  .= "<a hr ef=\"javas cript:void (null);\"  onClick=\" javascript : navigati onSubmit({ $nextFrom} ); return  false;\">N ext</a>";   520                    $ret  .= "<a hr ef=\"javas cript:void (null);\"  onClick=\" javascript : navigati onSubmit({ $nextFrom} ); return  false;\">N ext</a>";
491           }   521           }
492     522  
493           //  put navig ation elem ents into  the div   523           //  put navig ation elem ents into  the div
494           $d ivMargin =  $topNavig ation ? 'm argin-bott om: 4px;'  : 'margin- top: 4px;' ;   524           $d ivMargin =  $topNavig ation ? 'm argin-bott om: 4px;'  : 'margin- top: 4px;' ;
495           re turn "<div  style=\"t ext-align:  center; { $divMargin }\">{$ret} </div>";   525           re turn "<div  style=\"t ext-align:  center; { $divMargin }\">{$ret} </div>";
496   }   526   }
497     527  
498   /**   528   /**
499    * Prints  edit form  for event  editing   529    * Prints  edit form  for event  editing
500    *   530    *
501    * @param  bool $newE vent                                   - if  event alr eady exist s - then e dit, creat e new othe rwise   531    * @param  bool $newE vent                                   - if  event alr eady exist s - then e dit, creat e new othe rwise
502    * @param  array $eve ntArr                                  - if  event exi sts then t his parame ter should  contain a ll event d ata   532    * @param  array $eve ntArr                                  - if  event exi sts then t his parame ter should  contain a ll event d ata
503    *   533    *
504    *   534    *
505    */   535    */
506   function S DShowEditF orm( $newE vent, $eve ntArr = ar ray() )   536   function S DShowEditF orm( $newE vent, $eve ntArr = ar ray() )
507   {   537   {
508           gl obal $aPre Values;   538           gl obal $aPre Values;
509           gl obal $dir;   539           gl obal $dir;
510           gl obal $site ;   540           gl obal $site ;
511     541  
512           if  ( $newEve nt )   542           if  ( $newEve nt )
513           {   543           {
514                    $eve ntTitle =  '';   544                    $eve ntTitle =  '';
515                    $eve ntDesc = ' ';   545                    $eve ntDesc = ' ';
516                    $eve ntStatusAc tiveSel =  '';   546                    $eve ntStatusAc tiveSel =  '';
517                    $eve ntStatusIn activeSel  = '';   547                    $eve ntStatusIn activeSel  = '';
518                    $eve ntStatusCa nceledSel  = '';   548                    $eve ntStatusCa nceledSel  = '';
519                    $eve ntStatusMs g = '';   549                    $eve ntStatusMs g = '';
520                    $eve ntCity = ' ';   550                    $eve ntCity = ' ';
521                    $eve ntPlace =  '';   551                    $eve ntPlace =  '';
522                    $eve ntStart =  '';   552                    $eve ntStart =  '';
523                    $eve ntEnd = '' ;   553                    $eve ntEnd = '' ;
524                    $eve ntSaleStar t = '';   554                    $eve ntSaleStar t = '';
525                    $eve ntSaleEnd  = '';   555                    $eve ntSaleEnd  = '';
526                    $eve ntRespName  = '';   556                    $eve ntRespName  = '';
527                    $eve ntRespEmai l = '';   557                    $eve ntRespEmai l = '';
528                    $eve ntRespPhon e = '';   558                    $eve ntRespPhon e = '';
529                    $eve ntSexFemal e = 'check ed="checke d"';   559                    $eve ntSexFemal e = 'check ed="checke d"';
530                    $eve ntSexMale  = 'checked ="checked" ';   560                    $eve ntSexMale  = 'checked ="checked" ';
531                    $eve ntCountFem ale = '';   561                    $eve ntCountFem ale = '';
532                    $eve ntCountMal e = '';   562                    $eve ntCountMal e = '';
533                    $eve ntPriceFem ale = '';   563                    $eve ntPriceFem ale = '';
534                    $eve ntPriceMal e = '';   564                    $eve ntPriceMal e = '';
535                    $eve ntPriceFre e = '';   565                    $eve ntPriceFre e = '';
536                    $eve ntPriceFem aleDisable d = '';   566                    $eve ntPriceFem aleDisable d = '';
537                    $eve ntPriceMal eDisabled  = '';   567                    $eve ntPriceMal eDisabled  = '';
538                    $eve ntChoosePe riod = '';   568                    $eve ntChoosePe riod = '';
539                    $eve ntAllowVie w = '';   569                    $eve ntAllowVie w = '';
540           }   570           }
541           el se   571           el se
542           {   572           {
543                    $eve ntTitle =  htmlspecia lchars($ev entArr['Ti tle']);   573                    $eve ntTitle =  htmlspecia lchars($ev entArr['Ti tle']);
544                    $eve ntDesc = h tmlspecial chars($eve ntArr['Des cription'] );   574                    $eve ntDesc = h tmlspecial chars($eve ntArr['Des cription'] );
545                    $eve ntStatusAc tiveSel =  '';   575                    $eve ntStatusAc tiveSel =  '';
546                    $eve ntStatusIn activeSel  = '';   576                    $eve ntStatusIn activeSel  = '';
547                    $eve ntStatusCa nceledSel  = '';   577                    $eve ntStatusCa nceledSel  = '';
548                    swit ch ( $even tArr['Stat us'] )   578                    swit ch ( $even tArr['Stat us'] )
549                    {   579                    {
550                             case ' Active':   580                             case ' Active':
551                                      $eventSt atusActive Sel = 'sel ected="sel ected"';   581                                      $eventSt atusActive Sel = 'sel ected="sel ected"';
552                                      break;   582                                      break;
553                             case ' Inactive':   583                             case ' Inactive':
554                                      $eventSt atusInacti veSel = 's elected="s elected"';   584                                      $eventSt atusInacti veSel = 's elected="s elected"';
555                                      break;   585                                      break;
556                             case ' Canceled':   586                             case ' Canceled':
557                                      $eventSt atusCancel edSel = 's elected="s elected"';   587                                      $eventSt atusCancel edSel = 's elected="s elected"';
558                                      break;   588                                      break;
559                    }   589                    }
560                    $eve ntStatusMs g = htmlsp ecialchars ($eventArr ['StatusMe ssage']);   590                    $eve ntStatusMs g = htmlsp ecialchars ($eventArr ['StatusMe ssage']);
561                    $eve ntCity = h tmlspecial chars($eve ntArr['Cit y']);   591                    $eve ntCity = h tmlspecial chars($eve ntArr['Cit y']);
562                    $eve ntPlace =  htmlspecia lchars($ev entArr['Pl ace']);   592                    $eve ntPlace =  htmlspecia lchars($ev entArr['Pl ace']);
563                    $eve ntStart =  $eventArr[ 'EventStar t'];   593                    $eve ntStart =  $eventArr[ 'EventStar t'];
564                    $eve ntEnd = $e ventArr['E ventEnd'];   594                    $eve ntEnd = $e ventArr['E ventEnd'];
565                    $eve ntSaleStar t = $event Arr['Ticke tSaleStart '];   595                    $eve ntSaleStar t = $event Arr['Ticke tSaleStart '];
566                    $eve ntSaleEnd  = $eventAr r['TicketS aleEnd'];   596                    $eve ntSaleEnd  = $eventAr r['TicketS aleEnd'];
567                    $eve ntRespName  = htmlspe cialchars( $eventArr[ 'Responsib leName']);   597                    $eve ntRespName  = htmlspe cialchars( $eventArr[ 'Responsib leName']);
568                    $eve ntRespEmai l = htmlsp ecialchars ($eventArr ['Responsi bleEmail'] );   598                    $eve ntRespEmai l = htmlsp ecialchars ($eventArr ['Responsi bleEmail'] );
569                    $eve ntRespPhon e = htmlsp ecialchars ($eventArr ['Responsi blePhone'] );   599                    $eve ntRespPhon e = htmlsp ecialchars ($eventArr ['Responsi blePhone'] );
570                    $eve ntSexFemal e = strstr ($eventArr ['EventSex Filter'],  'female')  ? 'checked ="checked" ' : '';   600                    $eve ntSexFemal e = strstr ($eventArr ['EventSex Filter'],  'female')  ? 'checked ="checked" ' : '';
571                    $eve ntSexMale  = strstr($ eventArr[' EventSexFi lter'], 'm ale') ? 'c hecked="ch ecked"' :  '';   601                    $eve ntSexMale  = strstr($ eventArr[' EventSexFi lter'], 'm ale') ? 'c hecked="ch ecked"' :  '';
572                    $eve ntCountFem ale = $eve ntArr['Tic ketCountFe male'];   602                    $eve ntCountFem ale = $eve ntArr['Tic ketCountFe male'];
573                    $eve ntCountMal e = $event Arr['Ticke tCountMale '];   603                    $eve ntCountMal e = $event Arr['Ticke tCountMale '];
574                    $eve ntPriceFem ale = spri ntf("%.2f" , (float)$ eventArr[' TicketPric eFemale']) ;   604                    $eve ntPriceFem ale = spri ntf("%.2f" , (float)$ eventArr[' TicketPric eFemale']) ;
575                    $eve ntPriceMal e = sprint f("%.2f",  (float)$ev entArr['Ti cketPriceM ale']);   605                    $eve ntPriceMal e = sprint f("%.2f",  (float)$ev entArr['Ti cketPriceM ale']);
576                    $eve ntPriceFre e = ( $eve ntPriceFem ale == '0. 00' && $ev entPriceMa le == '0.0 0' ? 'chec ked="check ed"' : ''  );   606                    $eve ntPriceFre e = ( $eve ntPriceFem ale == '0. 00' && $ev entPriceMa le == '0.0 0' ? 'chec ked="check ed"' : ''  );
577                    $eve ntPriceFem aleDisable d = ( strl en($eventP riceFree)  ? 'disable d="disable d"' : '' ) ;   607                    $eve ntPriceFem aleDisable d = ( strl en($eventP riceFree)  ? 'disable d="disable d"' : '' ) ;
578                    $eve ntPriceMal eDisabled  = ( strlen ($eventPri ceFree) ?  'disabled= "disabled" ' : '' );   608                    $eve ntPriceMal eDisabled  = ( strlen ($eventPri ceFree) ?  'disabled= "disabled" ' : '' );
579                    $eve ntChoosePe riod = $ev entArr['Ch oosePeriod '];   609                    $eve ntChoosePe riod = $ev entArr['Ch oosePeriod '];
580                    $eve ntAllowVie w = $event Arr['Allow ViewPartic ipants'] = = 1 ? 'che cked="chec ked"' : '' ;   610                    $eve ntAllowVie w = $event Arr['Allow ViewPartic ipants'] = = 1 ? 'che cked="chec ked"' : '' ;
581           }   611           }
582   ?>   612   ?>
583     613  
584   <script la nguage="Ja vaScript"  type="text /javascrip t">   614   <script la nguage="Ja vaScript"  type="text /javascrip t">
585   <!--   615   <!--
586     616  
587           fu nction tri m(inputStr ing)   617           fu nction tri m(inputStr ing)
588           {   618           {
589                    if ( typeof inp utString ! = "string" )   619                    if ( typeof inp utString ! = "string" )
590                    {   620                    {
591                             return  inputStri ng;   621                             return  inputStri ng;
592                    }   622                    }
593     623  
594                    var  retValue =  inputStri ng;   624                    var  retValue =  inputStri ng;
595     625  
596                    // C heck for s paces at t he beginni ng of the  string   626                    // C heck for s paces at t he beginni ng of the  string
597                    var  ch = retVa lue.substr ing(0, 1);   627                    var  ch = retVa lue.substr ing(0, 1);
598                    whil e (ch == "  ")   628                    whil e (ch == "  ")
599                    {   629                    {
600                             retVal ue = retVa lue.substr ing(1, ret Value.leng th);   630                             retVal ue = retVa lue.substr ing(1, ret Value.leng th);
601                             ch = r etValue.su bstring(0,  1);   631                             ch = r etValue.su bstring(0,  1);
602                    }   632                    }
603     633  
604                    // C heck for s paces at t he end of  the string   634                    // C heck for s paces at t he end of  the string
605                    ch =  retValue. substring( retValue.l ength-1, r etValue.le ngth);   635                    ch =  retValue. substring( retValue.l ength-1, r etValue.le ngth);
606                    whil e (ch == "  ")   636                    whil e (ch == "  ")
607                    {   637                    {
608                             retVal ue = retVa lue.substr ing(0, ret Value.leng th-1);   638                             retVal ue = retVa lue.substr ing(0, ret Value.leng th-1);
609                             ch = r etValue.su bstring(re tValue.len gth-1, ret Value.leng th);   639                             ch = r etValue.su bstring(re tValue.len gth-1, ret Value.leng th);
610                    }   640                    }
611     641  
612                    // N ote that t here are t wo spaces  in the str ing - look  for multi ple spaces  within th e string   642                    // N ote that t here are t wo spaces  in the str ing - look  for multi ple spaces  within th e string
613                    whil e (retValu e.indexOf( "  ") != - 1)   643                    whil e (retValu e.indexOf( "  ") != - 1)
614                    {   644                    {
615                             // Aga in, there  are two sp aces in ea ch of the  strings   645                             // Aga in, there  are two sp aces in ea ch of the  strings
616                             retVal ue = retVa lue.substr ing(0, ret Value.inde xOf("  "))  + retValu e.substrin g(retValue .indexOf("   ")+1, re tValue.len gth);   646                             retVal ue = retVa lue.substr ing(0, ret Value.inde xOf("  "))  + retValu e.substrin g(retValue .indexOf("   ")+1, re tValue.len gth);
617                    }   647                    }
618     648  
619                    retu rn retValu e;   649                    retu rn retValu e;
620           }   650           }
621     651  
622           fu nction val idateEditF orm()   652           fu nction val idateEditF orm()
623           {   653           {
624                    // c heck title   654                    // c heck title
625                    if (  trim(docu ment.getEl ementById( 'event_tit le_id').va lue).lengt h == 0 )   655                    if (  trim(docu ment.getEl ementById( 'event_tit le_id').va lue).lengt h == 0 )
626                    {   656                    {
627                             alert( 'Please en ter event  title');   657                             alert( 'Please en ter event  title');
628                             return  false;   658                             return  false;
629                    }   659                    }
630                    // c heck descr iption   660                    // c heck descr iption
631                    if (  trim(docu ment.getEl ementById( 'event_des c_id').val ue).length  == 0 )   661                    if (  trim(docu ment.getEl ementById( 'event_des c_id').val ue).length  == 0 )
632                    {   662                    {
633                             alert( 'Please en ter event  descriptio n');   663                             alert( 'Please en ter event  descriptio n');
634                             return  false;   664                             return  false;
635                    }   665                    }
636                    // c heck statu s message   666                    // c heck statu s message
637                    if (  trim(docu ment.getEl ementById( 'event_sta tusmsg_id' ).value).l ength == 0  )   667                    if (  trim(docu ment.getEl ementById( 'event_sta tusmsg_id' ).value).l ength == 0  )
638                    {   668                    {
639                             alert( 'Please en ter event  status mes sage');   669                             alert( 'Please en ter event  status mes sage');
640                             return  false;   670                             return  false;
641                    }   671                    }
642                    // c heck city   672                    // c heck city
643                    if (  trim(docu ment.getEl ementById( 'event_cit y_id').val ue).length  == 0 )   673                    if (  trim(docu ment.getEl ementById( 'event_cit y_id').val ue).length  == 0 )
644                    {   674                    {
645                             alert( 'Please en ter event  city');   675                             alert( 'Please en ter event  city');
646                             return  false;   676                             return  false;
647                    }   677                    }
648                    // c heck place   678                    // c heck place
649                    if (  trim(docu ment.getEl ementById( 'event_pla ce_id').va lue).lengt h == 0 )   679                    if (  trim(docu ment.getEl ementById( 'event_pla ce_id').va lue).lengt h == 0 )
650                    {   680                    {
651                             alert( 'Please en ter event  place');   681                             alert( 'Please en ter event  place');
652                             return  false;   682                             return  false;
653                    }   683                    }
654                    // c heck start  date   684                    // c heck start  date
655                    if (  trim(docu ment.getEl ementById( 'event_sta rt_id').va lue).lengt h == 0 )   685                    if (  trim(docu ment.getEl ementById( 'event_sta rt_id').va lue).lengt h == 0 )
656                    {   686                    {
657                             alert( 'Please en ter event  start date ');   687                             alert( 'Please en ter event  start date ');
658                             return  false;   688                             return  false;
659                    }   689                    }
660                    // c heck end d ate   690                    // c heck end d ate
661                    if (  trim(docu ment.getEl ementById( 'event_end _id').valu e).length  == 0 )   691                    if (  trim(docu ment.getEl ementById( 'event_end _id').valu e).length  == 0 )
662                    {   692                    {
663                             alert( 'Please en ter event  end date') ;   693                             alert( 'Please en ter event  end date') ;
664                             return  false;   694                             return  false;
665                    }   695                    }
666                    // c heck sale  start date   696                    // c heck sale  start date
667                    if (  trim(docu ment.getEl ementById( 'event_sal e_start_id ').value). length ==  0 )   697                    if (  trim(docu ment.getEl ementById( 'event_sal e_start_id ').value). length ==  0 )
668                    {   698                    {
669                             alert( 'Please en ter event  sale start  date');   699                             alert( 'Please en ter event  sale start  date');
670                             return  false;   700                             return  false;
671                    }   701                    }
672                    // c heck sale  end date   702                    // c heck sale  end date
673                    if (  trim(docu ment.getEl ementById( 'event_sal e_end_id') .value).le ngth == 0  )   703                    if (  trim(docu ment.getEl ementById( 'event_sal e_end_id') .value).le ngth == 0  )
674                    {   704                    {
675                             alert( 'Please en ter event  sale end d ate');   705                             alert( 'Please en ter event  sale end d ate');
676                             return  false;   706                             return  false;
677                    }   707                    }
678                    // c heck if an y of sex c heckboxes  checked   708                    // c heck if an y of sex c heckboxes  checked
679                    if (  !document .getElemen tById('eve nt_sex_fem ale_id').c hecked   709                    if (  !document .getElemen tById('eve nt_sex_fem ale_id').c hecked
680                             && !do cument.get ElementByI d('event_s ex_male_id ').checked  )   710                             && !do cument.get ElementByI d('event_s ex_male_id ').checked  )
681                    {   711                    {
682                             alert( 'At least  one sex sh ould be ch osen');   712                             alert( 'At least  one sex sh ould be ch osen');
683                             return  false;   713                             return  false;
684                    }   714                    }
685                    // c heck if ag e range is  correct   715                    // c heck if ag e range is  correct
686                    var  ageStart =  parseInt(  document. getElement ById('even t_age_star t_id').val ue );   716                    var  ageStart =  parseInt(  document. getElement ById('even t_age_star t_id').val ue );
687                    var  ageEnd = p arseInt( d ocument.ge tElementBy Id('event_ age_end_id ').value ) ;   717                    var  ageEnd = p arseInt( d ocument.ge tElementBy Id('event_ age_end_id ').value ) ;
688                    if (  isNaN(age Start) ||  isNaN(ageE nd) || age End < ageS tart )   718                    if (  isNaN(age Start) ||  isNaN(ageE nd) || age End < ageS tart )
689                    {   719                    {
690                             alert( 'Please sp ecify corr ect partic ipants age  range');   720                             alert( 'Please sp ecify corr ect partic ipants age  range');
691                             return  false;   721                             return  false;
692                    }   722                    }
693                    // c heck if an y membersh ip level s elected   723                    // c heck if an y membersh ip level s elected
694                    var  anySelecte d = false;   724                    var  anySelecte d = false;
695                    var  selectOpti ons = docu ment.getEl ementById( 'event_mem bership_id ').options ;   725                    var  selectOpti ons = docu ment.getEl ementById( 'event_mem bership_id ').options ;
696                    for  ( i = 0; i  < selectO ptions.len gth; i++ )   726                    for  ( i = 0; i  < selectO ptions.len gth; i++ )
697                    {   727                    {
698                             if ( s electOptio ns[i].sele cted )   728                             if ( s electOptio ns[i].sele cted )
699                             {   729                             {
700                                      anySelec ted = true ;   730                                      anySelec ted = true ;
701                                      break;   731                                      break;
702                             }   732                             }
703                    }   733                    }
704                    if (  !anySelec ted )   734                    if (  !anySelec ted )
705                    {   735                    {
706                             alert( 'Select me mbership l evel(s) of  participa nts');   736                             alert( 'Select me mbership l evel(s) of  participa nts');
707                             return  false;   737                             return  false;
708                    }   738                    }
709                    // c heck femal e ticket c ount   739                    // c heck femal e ticket c ount
710                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_co unt_female _id').valu e) ) )   740                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_co unt_female _id').valu e) ) )
711                    {   741                    {
712                             alert( 'Please en ter correc t female t icket coun t');   742                             alert( 'Please en ter correc t female t icket coun t');
713                             return  false;   743                             return  false;
714                    }   744                    }
715                    // c heck male  ticket cou nt   745                    // c heck male  ticket cou nt
716                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_co unt_male_i d').value)  ) )   746                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_co unt_male_i d').value)  ) )
717                    {   747                    {
718                             alert( 'Please en ter correc t male tic ket count' );   748                             alert( 'Please en ter correc t male tic ket count' );
719                             return  false;   749                             return  false;
720                    }   750                    }
721                    // c heck if ev ent is fre e   751                    // c heck if ev ent is fre e
722                    var  isFree = d ocument.ge tElementBy Id('event_ price_free _id').chec ked;   752                    var  isFree = d ocument.ge tElementBy Id('event_ price_free _id').chec ked;
723                    // c heck femal e ticket p rice   753                    // c heck femal e ticket p rice
724                    if (  !isFree & & isNaN( p arseFloat( document.g etElementB yId('event _price_fem ale_id').v alue) ) )   754                    if (  !isFree & & isNaN( p arseFloat( document.g etElementB yId('event _price_fem ale_id').v alue) ) )
725                    {   755                    {
726                             alert( 'Please en ter correc t female t icket pric e');   756                             alert( 'Please en ter correc t female t icket pric e');
727                             return  false;   757                             return  false;
728                    }   758                    }
729                    // c heck male  ticket pri ce   759                    // c heck male  ticket pri ce
730                    if (  !isFree & & isNaN( p arseFloat( document.g etElementB yId('event _price_mal e_id').val ue) ) )   760                    if (  !isFree & & isNaN( p arseFloat( document.g etElementB yId('event _price_mal e_id').val ue) ) )
731                    {   761                    {
732                             alert( 'Please en ter correc t male tic ket price' );   762                             alert( 'Please en ter correc t male tic ket price' );
733                             return  false;   763                             return  false;
734                    }   764                    }
735                    // c heck choos e period   765                    // c heck choos e period
736                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_ch oose_perio d_id').val ue) ) )   766                    if (  isNaN( pa rseInt(doc ument.getE lementById ('event_ch oose_perio d_id').val ue) ) )
737                    {   767                    {
738                             alert( 'Please en ter correc t choose p eriod days ');   768                             alert( 'Please en ter correc t choose p eriod days ');
739                             return  false;   769                             return  false;
740                    }   770                    }
741                    retu rn true;   771                    retu rn true;
742           }   772           }
743     773  
744           fu nction upd atePriceCo ntrols()   774           fu nction upd atePriceCo ntrols()
745           {   775           {
746                    var  isFree = d ocument.ge tElementBy Id('event_ price_free _id').chec ked;   776                    var  isFree = d ocument.ge tElementBy Id('event_ price_free _id').chec ked;
747                    docu ment.getEl ementById( 'event_pri ce_female_ id').disab led = isFr ee;   777                    docu ment.getEl ementById( 'event_pri ce_female_ id').disab led = isFr ee;
748                    docu ment.getEl ementById( 'event_pri ce_male_id ').disable d = isFree ;   778                    docu ment.getEl ementById( 'event_pri ce_male_id ').disable d = isFree ;
749           }   779           }
750     780  
751   -->   781   -->
752   </script>   782   </script>
753     783  
754   <form id=" editEventF orm" actio n="<?= $_S ERVER['PHP _SELF'] ?> " method=" post" enct ype="multi part/form- data" styl e="margin:  0px;">   784   <form id=" editEventF orm" actio n="<?= $_S ERVER['PHP _SELF'] ?> " method=" post" enct ype="multi part/form- data" styl e="margin:  0px;">
755   <table cel lpadding=" 4" cellspa cing="2" b order="0"  width="540 " class="t ext">   785   <table cel lpadding=" 4" cellspa cing="2" b order="0"  width="540 " class="t ext">
756           <t r>   786           <t r>
757                    <td  class="sec tion_heade r">Common< /td>   787                    <td  class="sec tion_heade r">Common< /td>
758           </ tr>   788           </ tr>
759           <t r>   789           <t r>
760                    <td  class="sec tion_row">   790                    <td  class="sec tion_row">
761                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   791                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
762                                      <tr>   792                                      <tr>
763                                               <td align= "left" wid th="120">T itle <font  color="re d">*</font ></td>   793                                               <td align= "left" wid th="120">T itle <font  color="re d">*</font ></td>
764                                               <td align= "left">   794                                               <td align= "left">
765                                                       <i nput type= "text" cla ss="no" na me="event_ title" id= "event_tit le_id" siz e="50" val ue="<?= $e ventTitle  ?>" />   795                                                       <i nput type= "text" cla ss="no" na me="event_ title" id= "event_tit le_id" siz e="50" val ue="<?= $e ventTitle  ?>" />
766                                               </td>   796                                               </td>
767                                      </tr>   797                                      </tr>
768                                      <tr>   798                                      <tr>
769                                               <td align= "left" wid th="120" v align="top ">Descript ion <font  color="red ">*</font> </td>   799                                               <td align= "left" wid th="120" v align="top ">Descript ion <font  color="red ">*</font> </td>
770                                               <td align= "left">   800                                               <td align= "left">
771                                                       <t extarea cl ass="no" n ame="event _desc" id= "event_des c_id" cols ="60" rows ="10"><?=  $eventDesc  ?></texta rea>   801                                                       <t extarea cl ass="no" n ame="event _desc" id= "event_des c_id" cols ="60" rows ="10"><?=  $eventDesc  ?></texta rea>
772                                               </td>   802                                               </td>
773                                      </tr>   803                                      </tr>
774                                      <tr>   804                                      <tr>
775                                               <td align= "left" wid th="120">S tatus</td>   805                                               <td align= "left" wid th="120">S tatus</td>
776                                               <td align= "left">   806                                               <td align= "left">
777                                                       <s elect clas s="no" nam e="event_s tatus" id= "event_sta tus_id" st yle="width : 100px;">   807                                                       <s elect clas s="no" nam e="event_s tatus" id= "event_sta tus_id" st yle="width : 100px;">
778                                                                <opt ion value= "active" < ?= $eventS tatusActiv eSel ?> >A ctive</opt ion>   808                                                                <opt ion value= "active" < ?= $eventS tatusActiv eSel ?> >A ctive</opt ion>
779                                                                <opt ion value= "inactive"  <?= $even tStatusIna ctiveSel ? > >Inactiv e</option>   809                                                                <opt ion value= "inactive"  <?= $even tStatusIna ctiveSel ? > >Inactiv e</option>
780                                                                <opt ion value= "canceled"  <?= $even tStatusCan celedSel ? > >Cancele d</option>   810                                                                <opt ion value= "canceled"  <?= $even tStatusCan celedSel ? > >Cancele d</option>
781                                                       </ select>   811                                                       </ select>
782                                               </td>   812                                               </td>
783                                      </tr>   813                                      </tr>
784                                      <tr>   814                                      <tr>
785                                               <td align= "left" wid th="120">S tatus mess age <font  color="red ">*</font> </td>   815                                               <td align= "left" wid th="120">S tatus mess age <font  color="red ">*</font> </td>
786                                               <td align= "left">   816                                               <td align= "left">
787                                                       <i nput type= "text" cla ss="no" na me="event_ statusmsg"  id="event _statusmsg _id" size= "60" value ="<?= $eve ntStatusMs g ?>" />   817                                                       <i nput type= "text" cla ss="no" na me="event_ statusmsg"  id="event _statusmsg _id" size= "60" value ="<?= $eve ntStatusMs g ?>" />
788                                               </td>   818                                               </td>
789                                      </tr>   819                                      </tr>
790                             </tabl e>   820                             </tabl e>
791                    </td >   821                    </td >
792           </ tr>   822           </ tr>
793           <t r>   823           <t r>
794                    <td  class="sec tion_heade r">Event p lace</td>   824                    <td  class="sec tion_heade r">Event p lace</td>
795           </ tr>   825           </ tr>
796           <t r>   826           <t r>
797                    <td  class="sec tion_row">   827                    <td  class="sec tion_row">
798                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   828                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
799                                      <tr>   829                                      <tr>
800                                               <td align= "left" wid th="120">C ountry <fo nt color=" red">*</fo nt></td>   830                                               <td align= "left" wid th="120">C ountry <fo nt color=" red">*</fo nt></td>
801                                               <td align= "left">   831                                               <td align= "left">
802                                                       <s elect clas s="no" nam e="event_c ountry" id ="event_co untry_id">   832                                                       <s elect clas s="no" nam e="event_c ountry" id ="event_co untry_id">
803   <?   833   <?
804           $s electedCou ntry = $ne wEvent ? g etParam( ' default_co untry' ) :  $eventArr ['Country' ];   834           $s electedCou ntry = $ne wEvent ? g etParam( ' default_co untry' ) :  $eventArr ['Country' ];
805           fo reach ( $a PreValues[ 'Country']  as $key = > $value )   835           fo reach ( $a PreValues[ 'Country']  as $key = > $value )
806           {   836           {
807                    echo  "   837                    echo  "
808                                                                <opt ion value= \"{$key}\"  ". ( $sel ectedCount ry == $key  ? 'select ed="select ed"' : ''  ) ." >". _ t($value[' LKey']) ." </option>" ;   838                                                                <opt ion value= \"{$key}\"  ". ( $sel ectedCount ry == $key  ? 'select ed="select ed"' : ''  ) ." >". _ t($value[' LKey']) ." </option>" ;
809           }   839           }
810   ?>   840   ?>
811                                                       </ select>   841                                                       </ select>
812                                               </td>   842                                               </td>
813                                      </tr>   843                                      </tr>
814                                      <tr>   844                                      <tr>
815                                               <td align= "left" wid th="120">C ity <font  color="red ">*</font> </td>   845                                               <td align= "left" wid th="120">C ity <font  color="red ">*</font> </td>
816                                               <td align= "left">   846                                               <td align= "left">
817                                                       <i nput type= "text" cla ss="no" na me="event_ city" id=" event_city _id" size= "24" value ="<?= $eve ntCity ?>"  />   847                                                       <i nput type= "text" cla ss="no" na me="event_ city" id=" event_city _id" size= "24" value ="<?= $eve ntCity ?>"  />
818                                               </td>   848                                               </td>
819                                      </tr>   849                                      </tr>
820                                      <tr>   850                                      <tr>
821                                               <td align= "left" wid th="120">P lace <font  color="re d">*</font ></td>   851                                               <td align= "left" wid th="120">P lace <font  color="re d">*</font ></td>
822                                               <td align= "left">   852                                               <td align= "left">
823                                                       <i nput type= "text" cla ss="no" na me="event_ place" id= "event_pla ce_id" siz e="60" val ue="<?= $e ventPlace  ?>" />   853                                                       <i nput type= "text" cla ss="no" na me="event_ place" id= "event_pla ce_id" siz e="60" val ue="<?= $e ventPlace  ?>" />
824                                               </td>   854                                               </td>
825                                      </tr>   855                                      </tr>
826   <?   856   <?
827           if  ( !$newEv ent && str len( $even tArr['Phot oFilename' ] ) && fil e_exists(  $dir['sdat ingImage']  . $eventA rr['PhotoF ilename']  ) )   857           if  ( !$newEv ent && str len( $even tArr['Phot oFilename' ] ) && fil e_exists(  $dir['sdat ingImage']  . $eventA rr['PhotoF ilename']  ) )
828           {   858           {
829   ?>   859   ?>
830                                      <tr>   860                                      <tr>
831                                               <td align= "left" val ign="top"  width="120 ">Venue ph oto</td>   861                                               <td align= "left" val ign="top"  width="120 ">Venue ph oto</td>
832                                               <td align= "left">   862                                               <td align= "left">
833                                                       <i mg src="<? = $site['s datingImag e'] . $eve ntArr['Pho toFilename '] ?>" bor der="0" al t="Event p hoto" />   863                                                       <i mg src="<? = $site['s datingImag e'] . $eve ntArr['Pho toFilename '] ?>" bor der="0" al t="Event p hoto" />
834                                               </td>   864                                               </td>
835                                      </tr>   865                                      </tr>
836                                      <tr>   866                                      <tr>
837                                               <td align= "right" wi dth="120"  nowrap>upl oad new ph oto</td>   867                                               <td align= "right" wi dth="120"  nowrap>upl oad new ph oto</td>
838   <?   868   <?
839           }   869           }
840           el se   870           el se
841           {   871           {
842   ?>   872   ?>
843                                      <tr>   873                                      <tr>
844                                               <td align= "left" val ign="middl e" width=" 120">Venue  photo</td >   874                                               <td align= "left" val ign="middl e" width=" 120">Venue  photo</td >
845   <?   875   <?
846           }   876           }
847   ?>   877   ?>
848                                               <td align= "left">   878                                               <td align= "left">
849                                                       <i nput type= "file" cla ss="no" na me="event_ photo" id= "event_pho to_id" siz e="40" />   879                                                       <i nput type= "file" cla ss="no" na me="event_ photo" id= "event_pho to_id" siz e="40" />
850                                               </td>   880                                               </td>
851                                      </tr>   881                                      </tr>
852                                      <tr>    
853                                               <td align= "right" wi dth="120"  nowrap>res ize photo  to</td>    
854                                               <td align= "left">    
855                                                       <i nput type= "text" cla ss="no" na me="event_ photo_widt h" id="eve nt_photo_w idth_id" s ize="4" va lue="200"  style="ver tical-alig n: middle; " />&nbsp; x&nbsp;<in put type=" text" clas s="no" nam e="event_p hoto_heigh t" id="eve nt_photo_h eight_id"  size="4" v alue="150"  style="ve rtical-ali gn: middle ;" />&nbsp ;pixels    
856                                               </td>    
857                                      </tr>    
858                             </tabl e>   882                             </tabl e>
859                    </td >   883                    </td >
860           </ tr>   884           </ tr>
861           <t r>   885           <t r>
862                    <td  class="sec tion_heade r">Event d ate</td>   886                    <td  class="sec tion_heade r">Event d ate</td>
863           </ tr>   887           </ tr>
864           <t r>   888           <t r>
865                    <td  class="sec tion_row">   889                    <td  class="sec tion_row">
866                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   890                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
867                                      <tr>   891                                      <tr>
868                                               <td align= "left" wid th="120">E vent start  <font col or="red">* </font></t d>   892                                               <td align= "left" wid th="120">E vent start  <font col or="red">* </font></t d>
869                                               <td align= "left">   893                                               <td align= "left">
870                                                       <i nput type= "text" cla ss="no" na me="event_ start" id= "event_sta rt_id" siz e="20" val ue="<?= $e ventStart  ?>" />   894                                                       <i nput type= "text" cla ss="no" na me="event_ start" id= "event_sta rt_id" siz e="20" val ue="<?= $e ventStart  ?>" />
871                                                       &n bsp;<input  type="but ton" id="s tart_choos e_id" valu e="Choose"  />   895                                                       &n bsp;<input  type="but ton" id="s tart_choos e_id" valu e="Choose"  />
872                                                       &n bsp;<input  type="but ton" id="s tart_clear _id" onCli ck="docume nt.getElem entById('e vent_start _id').valu e = ''; "  value="Cle ar" />   896                                                       &n bsp;<input  type="but ton" id="s tart_clear _id" onCli ck="docume nt.getElem entById('e vent_start _id').valu e = ''; "  value="Cle ar" />
873                                               </td>   897                                               </td>
874                                      </tr>   898                                      </tr>
875                                      <tr>   899                                      <tr>
876                                               <td align= "left" wid th="120">E vent end < font color ="red">*</ font></td>   900                                               <td align= "left" wid th="120">E vent end < font color ="red">*</ font></td>
877                                               <td align= "left">   901                                               <td align= "left">
878                                                       <i nput type= "text" cla ss="no" na me="event_ end" id="e vent_end_i d" size="2 0" value=" <?= $event End ?>" />   902                                                       <i nput type= "text" cla ss="no" na me="event_ end" id="e vent_end_i d" size="2 0" value=" <?= $event End ?>" />
879                                                       &n bsp;<input  type="but ton" id="e nd_choose_ id" value= "Choose" / >   903                                                       &n bsp;<input  type="but ton" id="e nd_choose_ id" value= "Choose" / >
880                                                       &n bsp;<input  type="but ton" id="e nd_clear_i d" onClick ="document .getElemen tById('eve nt_end_id' ).value =  ''; " valu e="Clear"  />   904                                                       &n bsp;<input  type="but ton" id="e nd_clear_i d" onClick ="document .getElemen tById('eve nt_end_id' ).value =  ''; " valu e="Clear"  />
881                                               </td>   905                                               </td>
882                                      </tr>   906                                      </tr>
883                                      <tr>   907                                      <tr>
884                                               <td align= "left" wid th="120">T icket sale  start <fo nt color=" red">*</fo nt></td>   908                                               <td align= "left" wid th="120">T icket sale  start <fo nt color=" red">*</fo nt></td>
885                                               <td align= "left">   909                                               <td align= "left">
886                                                       <i nput type= "text" cla ss="no" na me="event_ sale_start " id="even t_sale_sta rt_id" siz e="20" val ue="<?= $e ventSaleSt art ?>" />   910                                                       <i nput type= "text" cla ss="no" na me="event_ sale_start " id="even t_sale_sta rt_id" siz e="20" val ue="<?= $e ventSaleSt art ?>" />
887                                                       &n bsp;<input  type="but ton" id="s ale_start_ choose_id"  value="Ch oose" />   911                                                       &n bsp;<input  type="but ton" id="s ale_start_ choose_id"  value="Ch oose" />
888                                                       &n bsp;<input  type="but ton" id="s ale_start_ clear_id"  onClick="d ocument.ge tElementBy Id('event_ sale_start _id').valu e = ''; "  value="Cle ar" />   912                                                       &n bsp;<input  type="but ton" id="s ale_start_ clear_id"  onClick="d ocument.ge tElementBy Id('event_ sale_start _id').valu e = ''; "  value="Cle ar" />
889                                               </td>   913                                               </td>
890                                      </tr>   914                                      </tr>
891                                      <tr>   915                                      <tr>
892                                               <td align= "left" wid th="120">T icket sale  end <font  color="re d">*</font ></td>   916                                               <td align= "left" wid th="120">T icket sale  end <font  color="re d">*</font ></td>
893                                               <td align= "left">   917                                               <td align= "left">
894                                                       <i nput type= "text" cla ss="no" na me="event_ sale_end"  id="event_ sale_end_i d" size="2 0" value=" <?= $event SaleEnd ?> " />   918                                                       <i nput type= "text" cla ss="no" na me="event_ sale_end"  id="event_ sale_end_i d" size="2 0" value=" <?= $event SaleEnd ?> " />
895                                                       &n bsp;<input  type="but ton" id="s ale_end_ch oose_id" v alue="Choo se" />   919                                                       &n bsp;<input  type="but ton" id="s ale_end_ch oose_id" v alue="Choo se" />
896                                                       &n bsp;<input  type="but ton" id="s ale_end_cl ear_id" on Click="doc ument.getE lementById ('event_sa le_end_id' ).value =  ''; " valu e="Clear"  />   920                                                       &n bsp;<input  type="but ton" id="s ale_end_cl ear_id" on Click="doc ument.getE lementById ('event_sa le_end_id' ).value =  ''; " valu e="Clear"  />
897                                               </td>   921                                               </td>
898                                      </tr>   922                                      </tr>
899                             </tabl e>   923                             </tabl e>
900                    </td >   924                    </td >
901           </ tr>   925           </ tr>
902           <t r>   926           <t r>
903                    <td  class="sec tion_heade r">Respons ible perso n or compa ny</td>   927                    <td  class="sec tion_heade r">Respons ible perso n or compa ny</td>
904           </ tr>   928           </ tr>
905           <t r>   929           <t r>
906                    <td  class="sec tion_row">   930                    <td  class="sec tion_row">
907                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   931                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
908                                      <tr>   932                                      <tr>
909                                               <td align= "left" wid th="120">N ame</td>   933                                               <td align= "left" wid th="120">N ame</td>
910                                               <td align= "left">   934                                               <td align= "left">
911                                                       <i nput type= "text" cla ss="no" na me="event_ resp_name"  id="event _resp_name _id" size= "40" value ="<?= $eve ntRespName  ?>" />   935                                                       <i nput type= "text" cla ss="no" na me="event_ resp_name"  id="event _resp_name _id" size= "40" value ="<?= $eve ntRespName  ?>" />
912                                               </td>   936                                               </td>
913                                      </tr>   937                                      </tr>
914                                      <tr>   938                                      <tr>
915                                               <td align= "left" wid th="120">E -mail</td>   939                                               <td align= "left" wid th="120">E -mail</td>
916                                               <td align= "left">   940                                               <td align= "left">
917                                                       <i nput type= "text" cla ss="no" na me="event_ resp_email " id="even t_resp_ema il_id" siz e="40" val ue="<?= $e ventRespEm ail ?>" />   941                                                       <i nput type= "text" cla ss="no" na me="event_ resp_email " id="even t_resp_ema il_id" siz e="40" val ue="<?= $e ventRespEm ail ?>" />
918                                               </td>   942                                               </td>
919                                      </tr>   943                                      </tr>
920                                      <tr>   944                                      <tr>
921                                               <td align= "left" wid th="120">P hone</td>   945                                               <td align= "left" wid th="120">P hone</td>
922                                               <td align= "left">   946                                               <td align= "left">
923                                                       <i nput type= "text" cla ss="no" na me="event_ resp_phone " id="even t_resp_pho ne_id" siz e="16" val ue="<?= $e ventRespPh one ?>" />   947                                                       <i nput type= "text" cla ss="no" na me="event_ resp_phone " id="even t_resp_pho ne_id" siz e="16" val ue="<?= $e ventRespPh one ?>" />
924                                               </td>   948                                               </td>
925                                      </tr>   949                                      </tr>
926                             </tabl e>   950                             </tabl e>
927                    </td >   951                    </td >
928           </ tr>   952           </ tr>
929           <t r>   953           <t r>
930                    <td  class="sec tion_heade r">Event p articipant s</td>   954                    <td  class="sec tion_heade r">Event p articipant s</td>
931           </ tr>   955           </ tr>
932           <t r>   956           <t r>
933                    <td  class="sec tion_row">   957                    <td  class="sec tion_row">
934                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   958                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
935                                      <tr>   959                                      <tr>
936                                               <td align= "left" wid th="120">S ex</td>   960                                               <td align= "left" wid th="120">S ex</td>
937                                               <td align= "left">   961                                               <td align= "left">
938                                                       <i nput type= "checkbox"  class="no " name="ev ent_sex_fe male" id=" event_sex_ female_id"  style="ve rtical-ali gn: middle ;" <?= $ev entSexFema le ?> />   962                                                       <i nput type= "checkbox"  class="no " name="ev ent_sex_fe male" id=" event_sex_ female_id"  style="ve rtical-ali gn: middle ;" <?= $ev entSexFema le ?> />
939                                                       &n bsp;<label  for="even t_sex_fema le_id">fem ale</label >   963                                                       &n bsp;<label  for="even t_sex_fema le_id">fem ale</label >
940                                                       &n bsp;<input  type="che ckbox" cla ss="no" na me="event_ sex_male"  id="event_ sex_male_i d" style=" vertical-a lign: midd le;" <?= $ eventSexMa le ?> />   964                                                       &n bsp;<input  type="che ckbox" cla ss="no" na me="event_ sex_male"  id="event_ sex_male_i d" style=" vertical-a lign: midd le;" <?= $ eventSexMa le ?> />
941                                                       &n bsp;<label  for="even t_sex_male _id">male< /label>   965                                                       &n bsp;<label  for="even t_sex_male _id">male< /label>
942                                               </td>   966                                               </td>
943                                      </tr>   967                                      </tr>
944                                      <tr>   968                                      <tr>
945                                               <td align= "left" wid th="120">A ge</td>   969                                               <td align= "left" wid th="120">A ge</td>
946                                               <td align= "left">   970                                               <td align= "left">
947                                                       fr om&nbsp;<s elect clas s="no" nam e="event_a ge_start"  id="event_ age_start_ id" style= "vertical- align: mid dle;">   971                                                       fr om&nbsp;<s elect clas s="no" nam e="event_a ge_start"  id="event_ age_start_ id" style= "vertical- align: mid dle;">
948   <?   972   <?
949           //  if it's n ew event t hen show d efault val ues and sh ow values  from datab ase otherw ise   973           //  if it's n ew event t hen show d efault val ues and sh ow values  from datab ase otherw ise
950           $g l_search_s tart_age =  (int)getP aram( 'sea rch_start_ age' );   974           $g l_search_s tart_age =  (int)getP aram( 'sea rch_start_ age' );
951           $g l_search_e nd_age = ( int)getPar am( 'searc h_end_age'  );   975           $g l_search_e nd_age = ( int)getPar am( 'searc h_end_age'  );
952           $a geStartSel  = $newEve nt ? $gl_s earch_star t_age : $e ventArr['E ventAgeLow erFilter'] ;   976           $a geStartSel  = $newEve nt ? $gl_s earch_star t_age : $e ventArr['E ventAgeLow erFilter'] ;
953           $a geEndSel =  $newEvent  ? $gl_sea rch_end_ag e : $event Arr['Event AgeUpperFi lter'];   977           $a geEndSel =  $newEvent  ? $gl_sea rch_end_ag e : $event Arr['Event AgeUpperFi lter'];
954           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )   978           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )
955           {   979           {
956                    $sel  = ($i ==  $ageStartS el ? 'sele cted="sele cted"' : ' ');   980                    $sel  = ($i ==  $ageStartS el ? 'sele cted="sele cted"' : ' ');
957                    echo  "   981                    echo  "
958                                                                <opt ion value= \"$i\" $se l>$i</opti on>";   982                                                                <opt ion value= \"$i\" $se l>$i</opti on>";
959           }   983           }
960   ?>   984   ?>
961                                                                                  </select >   985                                                                                  </select >
962                                                       to &nbsp;<sel ect class= "no" name= "event_age _end" id=" event_age_ end_id" st yle="verti cal-align:  middle;">   986                                                       to &nbsp;<sel ect class= "no" name= "event_age _end" id=" event_age_ end_id" st yle="verti cal-align:  middle;">
963   <?   987   <?
964           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )   988           fo r ( $i = $ gl_search_ start_age  ; $i <= $g l_search_e nd_age ; $ i++ )
965           {   989           {
966                    $sel  = ($i ==  $ageEndSel  ? 'select ed="select ed"' : '') ;   990                    $sel  = ($i ==  $ageEndSel  ? 'select ed="select ed"' : '') ;
967                    echo  "   991                    echo  "
968                                                                <opt ion value= \"$i\" $se l>$i</opti on>";   992                                                                <opt ion value= \"$i\" $se l>$i</opti on>";
969           }   993           }
970   ?>   994   ?>
971                                                       </ select>   995                                                       </ select>
972                                               </td>   996                                               </td>
973                                      </tr>   997                                      </tr>
974                                      <tr>   998                                      <tr>
975                                               <td align= "left" val ign="top"  width="120 ">Membersh ip</td>   999                                               <td align= "left" val ign="top"  width="120 ">Membersh ip</td>
976                                               <td align= "left">   1000                                               <td align= "left">
977                                                       <s elect clas s="no" nam e="event_m embership[ ]" id="eve nt_members hip_id" si ze="6" mul tiple styl e="width:  150px;">   1001                                                       <s elect clas s="no" nam e="event_m embership[ ]" id="eve nt_members hip_id" si ze="6" mul tiple styl e="width:  150px;">
978                                                                <opt ion value= "all" <?=  $newEvent  || strstr( $eventArr[ 'EventMemb ershipFilt er'], '\'a ll\'') ? ' selected=" selected"'  : '' ?> > All</optio n>   1002                                                                <opt ion value= "all" <?=  $newEvent  || strstr( $eventArr[ 'EventMemb ershipFilt er'], '\'a ll\'') ? ' selected=" selected"'  : '' ?> > All</optio n>
979   <?   1003   <?
980           //  show all  membership  levels ex cept non-m ember   1004           //  show all  membership  levels ex cept non-m ember
981           $m emberships _arr = get Membership s();   1005           $m emberships _arr = get Membership s();
982           fo reach ( $m emberships _arr as $m embershipI D => $memb ershipName  )   1006           fo reach ( $m emberships _arr as $m embershipI D => $memb ershipName  )
983           {   1007           {
984                    if (  $membersh ipID == ME MBERSHIP_I D_NON_MEMB ER )   1008                    if (  $membersh ipID == ME MBERSHIP_I D_NON_MEMB ER )
985                             contin ue;   1009                             contin ue;
986                    echo  "   1010                    echo  "
987                                                                <opt ion value= \"{$member shipID}\"  ". (!$newE vent && st rstr($even tArr['Even tMembershi pFilter'],  "'{$membe rshipID}'" ) ? 'selec ted="selec ted"' : '' ) ." >{$me mbershipNa me}</optio n>";   1011                                                                <opt ion value= \"{$member shipID}\"  ". (!$newE vent && st rstr($even tArr['Even tMembershi pFilter'],  "'{$membe rshipID}'" ) ? 'selec ted="selec ted"' : '' ) ." >{$me mbershipNa me}</optio n>";
988           }   1012           }
989   ?>   1013   ?>
990                                                       </ select>   1014                                                       </ select>
991                                               </td>   1015                                               </td>
992                                      </tr>   1016                                      </tr>
993                                      <tr>   1017                                      <tr>
994                                               <td align= "left" wid th="120">F emale tick et count < font color ="red">*</ font></td>   1018                                               <td align= "left" wid th="120">F emale tick et count < font color ="red">*</ font></td>
995                                               <td align= "left">   1019                                               <td align= "left">
996                                                       <i nput type= "text" cla ss="no" na me="event_ count_fema le" id="ev ent_count_ female_id"  size="6"  value="<?=  $eventCou ntFemale ? >" />   1020                                                       <i nput type= "text" cla ss="no" na me="event_ count_fema le" id="ev ent_count_ female_id"  size="6"  value="<?=  $eventCou ntFemale ? >" />
997                                               </td>   1021                                               </td>
998                                      </tr>   1022                                      </tr>
999                                      <tr>   1023                                      <tr>
1000                                               <td align= "left" wid th="120">M ale ticket  count <fo nt color=" red">*</fo nt></td>   1024                                               <td align= "left" wid th="120">M ale ticket  count <fo nt color=" red">*</fo nt></td>
1001                                               <td align= "left">   1025                                               <td align= "left">
1002                                                       <i nput type= "text" cla ss="no" na me="event_ count_male " id="even t_count_ma le_id" siz e="6" valu e="<?= $ev entCountMa le ?>" />   1026                                                       <i nput type= "text" cla ss="no" na me="event_ count_male " id="even t_count_ma le_id" siz e="6" valu e="<?= $ev entCountMa le ?>" />
1003                                               </td>   1027                                               </td>
1004                                      </tr>   1028                                      </tr>
1005                             </tabl e>   1029                             </tabl e>
1006                    </td >   1030                    </td >
1007           </ tr>   1031           </ tr>
1008           <t r>   1032           <t r>
1009                    <td  class="sec tion_heade r">Ticket  prices</td >   1033                    <td  class="sec tion_heade r">Ticket  prices</td >
1010           </ tr>   1034           </ tr>
1011           <t r>   1035           <t r>
1012                    <td  class="sec tion_row">   1036                    <td  class="sec tion_row">
1013                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   1037                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
1014                                      <tr>   1038                                      <tr>
1015                                               <td align= "left" wid th="120">E vent is fr ee</td>   1039                                               <td align= "left" wid th="120">E vent is fr ee</td>
1016                                               <td align= "left">   1040                                               <td align= "left">
1017                                                       <i nput type= "checkbox"  class="no " name="ev ent_price_ free" id=" event_pric e_free_id"  style="ve rtical-ali gn: middle ;" onClick ="javascri pt: update PriceContr ols();" <? = $eventPr iceFree ?>  />   1041                                                       <i nput type= "checkbox"  class="no " name="ev ent_price_ free" id=" event_pric e_free_id"  style="ve rtical-ali gn: middle ;" onClick ="javascri pt: update PriceContr ols();" <? = $eventPr iceFree ?>  />
1018                                               </td>   1042                                               </td>
1019                                      </tr>   1043                                      </tr>
1020                                      <tr>   1044                                      <tr>
1021                                               <td align= "left" wid th="120">F emale tick et price < font color ="red">*</ font></td>   1045                                               <td align= "left" wid th="120">F emale tick et price < font color ="red">*</ font></td>
1022                                               <td align= "left">   1046                                               <td align= "left">
1023                                                       <i nput type= "text" cla ss="no" na me="event_ price_fema le" id="ev ent_price_ female_id"  size="8"  value="<?=  $eventPri ceFemale ? >" <?= $ev entPriceFe maleDisabl ed ?> />   1047                                                       <i nput type= "text" cla ss="no" na me="event_ price_fema le" id="ev ent_price_ female_id"  size="8"  value="<?=  $eventPri ceFemale ? >" <?= $ev entPriceFe maleDisabl ed ?> />
1024                                               </td>   1048                                               </td>
1025                                      </tr>   1049                                      </tr>
1026                                      <tr>   1050                                      <tr>
1027                                               <td align= "left" wid th="120">M ale ticket  price <fo nt color=" red">*</fo nt></td>   1051                                               <td align= "left" wid th="120">M ale ticket  price <fo nt color=" red">*</fo nt></td>
1028                                               <td align= "left">   1052                                               <td align= "left">
1029                                                       <i nput type= "text" cla ss="no" na me="event_ price_male " id="even t_price_ma le_id" siz e="8" valu e="<?= $ev entPriceMa le ?>" <?=  $eventPri ceMaleDisa bled ?> />   1053                                                       <i nput type= "text" cla ss="no" na me="event_ price_male " id="even t_price_ma le_id" siz e="8" valu e="<?= $ev entPriceMa le ?>" <?=  $eventPri ceMaleDisa bled ?> />
1030                                               </td>   1054                                               </td>
1031                                      </tr>   1055                                      </tr>
1032                             </tabl e>   1056                             </tabl e>
1033                    </td >   1057                    </td >
1034           </ tr>   1058           </ tr>
1035           <t r>   1059           <t r>
1036                    <td  class="sec tion_heade r">Member  side optio ns</td>   1060                    <td  class="sec tion_heade r">Member  side optio ns</td>
1037           </ tr>   1061           </ tr>
1038           <t r>   1062           <t r>
1039                    <td  class="sec tion_row">   1063                    <td  class="sec tion_row">
1040                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">   1064                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="100%">
1041                                      <tr>   1065                                      <tr>
1042                                               <td align= "left" wid th="120">C hoose peri od <font c olor="red" >*</font>< br />(in d ays)</td>   1066                                               <td align= "left" wid th="120">C hoose peri od <font c olor="red" >*</font>< br />(in d ays)</td>
1043                                               <td align= "left">   1067                                               <td align= "left">
1044                                                       <i nput type= "text" cla ss="no" na me="event_ choose_per iod" id="e vent_choos e_period_i d" size="6 " value="< ?= $eventC hoosePerio d ?>" />   1068                                                       <i nput type= "text" cla ss="no" na me="event_ choose_per iod" id="e vent_choos e_period_i d" size="6 " value="< ?= $eventC hoosePerio d ?>" />
1045                                               </td>   1069                                               </td>
1046                                      </tr>   1070                                      </tr>
1047                                      <tr>   1071                                      <tr>
1048                                               <td align= "left" wid th="120">A llow membe rs to view  participa nts list</ td>   1072                                               <td align= "left" wid th="120">A llow membe rs to view  participa nts list</ td>
1049                                               <td align= "left">   1073                                               <td align= "left">
1050                                                       <i nput type= "checkbox"  class="no " name="ev ent_allow_ view" id=" event_allo w_view_id"  <?= $even tAllowView  ?> />   1074                                                       <i nput type= "checkbox"  class="no " name="ev ent_allow_ view" id=" event_allo w_view_id"  <?= $even tAllowView  ?> />
1051                                               </td>   1075                                               </td>
1052                                      </tr>   1076                                      </tr>
1053                             </tabl e>   1077                             </tabl e>
1054                    </td >   1078                    </td >
1055           </ tr>   1079           </ tr>
1056           <t r>   1080           <t r>
1057                    <td  align="cen ter" valig n="middle"  style="pa dding-top:  8px;">   1081                    <td  align="cen ter" valig n="middle"  style="pa dding-top:  8px;">
1058                             <input  type="sub mit" class ="no" name ="event_sa ve" value= "Save" sty le="width:  60px; ver tical-alig n: middle; " onClick= "javascrip t: return  validateEd itForm();"  />   1082                             <input  type="sub mit" class ="no" name ="event_sa ve" value= "Save" sty le="width:  60px; ver tical-alig n: middle; " onClick= "javascrip t: return  validateEd itForm();"  />
1059   <?   1083   <?
1060           if  ( !$newEv ent )   1084           if  ( !$newEv ent )
1061           {   1085           {
1062   ?>   1086   ?>
1063                             &nbsp; <input typ e="checkbo x" class=" no" name=" event_as_n ew" id="ev ent_as_new _id" style ="vertical -align: mi ddle;" />   1087                             &nbsp; <input typ e="checkbo x" class=" no" name=" event_as_n ew" id="ev ent_as_new _id" style ="vertical -align: mi ddle;" />
1064                             &nbsp; <label for ="event_as _new_id">a s new</lab el>   1088                             &nbsp; <label for ="event_as _new_id">a s new</lab el>
1065                             <input  type="hid den" name= "event_id"  value="<? = $eventAr r['ID'] ?> " />   1089                             <input  type="hid den" name= "event_id"  value="<? = $eventAr r['ID'] ?> " />
1066                             <input  type="hid den" name= "action" v alue="edit " />   1090                             <input  type="hid den" name= "action" v alue="edit " />
1067   <?   1091   <?
1068           }   1092           }
1069           el se   1093           el se
1070           {   1094           {
1071   ?>   1095   ?>
1072                             <input  type="hid den" name= "action" v alue="new"  />   1096                             <input  type="hid den" name= "action" v alue="new"  />
1073   <?   1097   <?
1074           }   1098           }
1075   ?>   1099   ?>
1076                    </td >   1100                    </td >
1077           </ tr>   1101           </ tr>
1078   </table>   1102   </table>
1079   </form>   1103   </form>
1080   <?   1104   <?
1081   }   1105   }
1082     1106  
1083   $show_quer y = '';   1107   $show_quer y = '';
1084   $show = ar ray();   1108   $show = ar ray();
1085   $show_matc h = array( );   1109   $show_matc h = array( );
1086   $between_d isabled =  'disabled= "disabled" ';   1110   $between_d isabled =  'disabled= "disabled" ';
1087   $country_d isabled =  'disabled= "disabled" ';   1111   $country_d isabled =  'disabled= "disabled" ';
1088     1112  
1089   switch ( $ _REQUEST[' action'] )   1113   switch ( $ _REQUEST[' action'] )
1090   {   1114   {
1091           //  show list  of events  according  selected  filter   1115           //  show list  of events  according  selected  filter
1092           ca se 'show':   1116           ca se 'show':
1093                    $sho w_from = ( int)$_REQU EST['from' ];   1117                    $sho w_from = ( int)$_REQU EST['from' ];
1094                    swit ch ( $_REQ UEST['show _events']  )   1118                    swit ch ( $_REQ UEST['show _events']  )
1095                    {   1119                    {
1096                             // sho w events b etween spe cified dat es   1120                             // sho w events b etween spe cified dat es
1097                             case ' date':   1121                             case ' date':
1098                                      // First  date pars e   1122                                      // First  date pars e
1099                                      if ( $_R EQUEST['sh ow_events_ between1']  == 'start ' )   1123                                      if ( $_R EQUEST['sh ow_events_ between1']  == 'start ' )
1100                                               $between_d ate1 = 0;   1124                                               $between_d ate1 = 0;
1101                                      elseif (  $_REQUEST ['show_eve nts_betwee n1'] == 'n ow' )   1125                                      elseif (  $_REQUEST ['show_eve nts_betwee n1'] == 'n ow' )
1102                                               $between_d ate1 = tim e();   1126                                               $between_d ate1 = tim e();
1103                                      else   1127                                      else
1104                                               $between_d ate1 = str totime( $_ REQUEST['s how_events _between1' ] );   1128                                               $between_d ate1 = str totime( $_ REQUEST['s how_events _between1' ] );
1105                                      // Secon d date par se   1129                                      // Secon d date par se
1106                                      if ( $_R EQUEST['sh ow_events_ between2']  == 'start ' )   1130                                      if ( $_R EQUEST['sh ow_events_ between2']  == 'start ' )
1107                                               $between_d ate2 = 0;   1131                                               $between_d ate2 = 0;
1108                                      elseif (  $_REQUEST ['show_eve nts_betwee n2'] == 'n ow' )   1132                                      elseif (  $_REQUEST ['show_eve nts_betwee n2'] == 'n ow' )
1109                                               $between_d ate2 = tim e();   1133                                               $between_d ate2 = tim e();
1110                                      else   1134                                      else
1111                                               $between_d ate2 = str totime( $_ REQUEST['s how_events _between2' ] );   1135                                               $between_d ate2 = str totime( $_ REQUEST['s how_events _between2' ] );
1112                                      $show['b etween_dat e1'] = pro cess_pass_ data( $_RE QUEST['sho w_events_b etween1']  );   1136                                      $show['b etween_dat e1'] = pro cess_pass_ data( $_RE QUEST['sho w_events_b etween1']  );
1113                                      $show['b etween_dat e2'] = pro cess_pass_ data( $_RE QUEST['sho w_events_b etween2']  );   1137                                      $show['b etween_dat e2'] = pro cess_pass_ data( $_RE QUEST['sho w_events_b etween2']  );
1114                                      if ( $be tween_date 1 != -1 &&  $between_ date2 != - 1 )   1138                                      if ( $be tween_date 1 != -1 &&  $between_ date2 != - 1 )
1115                                      {   1139                                      {
1116                                               $show_quer y = "SELEC T `ID`, `T itle`, `De scription` , `Status` , `StatusM essage`, ` Country`,  `City`, `P lace`, `Ph otoFilenam e`, `Event Start`, `R esponsible ID`   1140                                               $show_quer y = "SELEC T `ID`, `T itle`, `De scription` , `Status` , `StatusM essage`, ` Country`,  `City`, `P lace`, `Ph otoFilenam e`, `Event Start`, `R esponsible ID`
1117                                                                                  FROM `SD atingEvent s`   1141                                                                                  FROM `SD atingEvent s`
1118                                                                                  WHERE (  FROM_UNIXT IME($betwe en_date1)  <= `EventS tart`   1142                                                                                  WHERE (  FROM_UNIXT IME($betwe en_date1)  <= `EventS tart`
1119                                                                                           AND FROM_U NIXTIME($b etween_dat e2) >= `Ev entStart`  )   1143                                                                                           AND FROM_U NIXTIME($b etween_dat e2) >= `Ev entStart`  )
1120                                                                                  ORDER BY  `EventSta rt` DESC   1144                                                                                  ORDER BY  `EventSta rt` DESC
1121                                                                                  LIMIT {$ show_from} , {$naviga tionStep}" ;   1145                                                                                  LIMIT {$ show_from} , {$naviga tionStep}" ;
1122                                               $total_que ry = "SELE CT COUNT(* )   1146                                               $total_que ry = "SELE CT COUNT(* )
1123                                                                                  FROM `SD atingEvent s`   1147                                                                                  FROM `SD atingEvent s`
1124                                                                                  WHERE (  FROM_UNIXT IME($betwe en_date1)  <= `EventS tart`   1148                                                                                  WHERE (  FROM_UNIXT IME($betwe en_date1)  <= `EventS tart`
1125                                                                                           AND FROM_U NIXTIME($b etween_dat e2) >= `Ev entStart`  )";   1149                                                                                           AND FROM_U NIXTIME($b etween_dat e2) >= `Ev entStart`  )";
1126                                      }   1150                                      }
1127                                      else   1151                                      else
1128                                      {   1152                                      {
1129                                               $show['err or_text']  = "Please  specify co rrect date s";   1153                                               $show['err or_text']  = "Please  specify co rrect date s";
1130                                      }   1154                                      }
1131                                      $between _disabled  = '';   1155                                      $between _disabled  = '';
1132                                      break;   1156                                      break;
1133                             // sho w events i n specifie d country   1157                             // sho w events i n specifie d country
1134                             case ' country':   1158                             case ' country':
1135                                      $show_qu ery = "SEL ECT `ID`,  `Title`, ` Descriptio n`, `Statu s`, `Statu sMessage`,  `Country` , `City`,  `Place`, ` PhotoFilen ame`, `Eve ntStart`,  `Responsib leID`   1159                                      $show_qu ery = "SEL ECT `ID`,  `Title`, ` Descriptio n`, `Statu s`, `Statu sMessage`,  `Country` , `City`,  `Place`, ` PhotoFilen ame`, `Eve ntStart`,  `Responsib leID`
1136                                                                         FROM ` SDatingEve nts`   1160                                                                         FROM ` SDatingEve nts`
1137                                                                         WHERE  `Country`  = '". proc ess_db_inp ut($_REQUE ST['show_e vents_coun try']) ."'   1161                                                                         WHERE  `Country`  = '". proc ess_db_inp ut($_REQUE ST['show_e vents_coun try']) ."'
1138                                                                         ORDER  BY `EventS tart` DESC   1162                                                                         ORDER  BY `EventS tart` DESC
1139                                                                         LIMIT  {$show_fro m}, {$navi gationStep }";   1163                                                                         LIMIT  {$show_fro m}, {$navi gationStep }";
1140                                      $total_q uery = "SE LECT COUNT (*)   1164                                      $total_q uery = "SE LECT COUNT (*)
1141                                                                                  FROM `SD atingEvent s`   1165                                                                                  FROM `SD atingEvent s`
1142                                                                                  WHERE `C ountry` =  '". proces s_db_input ($_REQUEST ['show_eve nts_countr y']) ."'";   1166                                                                                  WHERE `C ountry` =  '". proces s_db_input ($_REQUEST ['show_eve nts_countr y']) ."'";
1143                                      $show['c ountry'] =  process_p ass_data($ _REQUEST[' show_event s_country' ]);   1167                                      $show['c ountry'] =  process_p ass_data($ _REQUEST[' show_event s_country' ]);
1144                                      $country _disabled  = '';   1168                                      $country _disabled  = '';
1145                                      break;   1169                                      break;
1146                             // sho w all even ts   1170                             // sho w all even ts
1147                             case ' all':   1171                             case ' all':
1148                             defaul t:   1172                             defaul t:
1149                                      $show_qu ery = "SEL ECT `ID`,  `Title`, ` Descriptio n`, `Statu s`, `Statu sMessage`,  `Country` , `City`,  `Place`, ` PhotoFilen ame`, `Eve ntStart`,  `Responsib leID`   1173                                      $show_qu ery = "SEL ECT `ID`,  `Title`, ` Descriptio n`, `Statu s`, `Statu sMessage`,  `Country` , `City`,  `Place`, ` PhotoFilen ame`, `Eve ntStart`,  `Responsib leID`
1150                                                                         FROM ` SDatingEve nts`   1174                                                                         FROM ` SDatingEve nts`
1151                                                                         ORDER  BY `EventS tart` DESC   1175                                                                         ORDER  BY `EventS tart` DESC
1152                                                                         LIMIT  {$show_fro m}, {$navi gationStep }";   1176                                                                         LIMIT  {$show_fro m}, {$navi gationStep }";
1153                                      $total_q uery = "SE LECT COUNT (*)   1177                                      $total_q uery = "SE LECT COUNT (*)
1154                                                                                  FROM `SD atingEvent s`";   1178                                                                                  FROM `SD atingEvent s`";
1155                    }   1179                    }
1156     1180  
1157                    brea k;   1181                    brea k;
1158     1182  
1159           //  update ex isting eve nt or add  new one   1183           //  update ex isting eve nt or add  new one
1160           ca se 'edit':   1184           ca se 'edit':
1161                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];   1185                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];
1162                    if (  $event_id  )   1186                    if (  $event_id  )
1163                    {   1187                    {
1164                             if ( $ _POST['eve nt_as_new' ] == 'on'  )   1188                             if ( $ _POST['eve nt_as_new' ] == 'on'  )
1165                                      $edit_re s = SDAddE vent();   1189                                      $edit_re s = SDAddE vent();
1166                             else   1190                             else
1167                                      $edit_re s = SDUpda teEvent( $ event_id ) ;   1191                                      $edit_re s = SDUpda teEvent( $ event_id ) ;
1168                             switch  ( $edit_r es )   1192                             switch  ( $edit_r es )
1169                             {   1193                             {
1170                                      case SDA TING_ERROR _SUCCESS:   1194                                      case SDA TING_ERROR _SUCCESS:
1171                                               if ( $_POS T['event_a s_new'] ==  'on' )   1195                                               if ( $_POS T['event_a s_new'] ==  'on' )
1172                                                       $s how['error _text'] =  'Event was  successfu lly added' ;   1196                                                       $s how['error _text'] =  'Event was  successfu lly added' ;
1173                                               else   1197                                               else
1174                                                       $s how['error _text'] =  'Event was  successfu lly update d';   1198                                                       $s how['error _text'] =  'Event was  successfu lly update d';
1175                                               break;   1199                                               break;
1176                                      case SDA TING_ERROR _QUERY_ERR OR:   1200                                      case SDA TING_ERROR _QUERY_ERR OR:
1177                                               if ( $_POS T['event_a s_new'] ==  'on' )   1201                                               if ( $_POS T['event_a s_new'] ==  'on' )
1178                                                       $s how['error _text'] =  'Insert qu ery error' ;   1202                                                       $s how['error _text'] =  'Insert qu ery error' ;
1179                                               else   1203                                               else
1180                                                       $s how['error _text'] =  'Update qu ery error' ;   1204                                                       $s how['error _text'] =  'Update qu ery error' ;
1181                                               break;   1205                                               break;
1182                                      case SDA TING_ERROR _NOT_AFFEC TED:   1206                                      case SDA TING_ERROR _NOT_AFFEC TED:
1183                                               if ( $_POS T['event_a s_new'] ==  'on' )   1207                                               if ( $_POS T['event_a s_new'] ==  'on' )
1184                                                       $s how['error _text'] =  'Event was n\'t added ';   1208                                                       $s how['error _text'] =  'Event was n\'t added ';
1185                                               else   1209                                               else
1186                                                       $s how['error _text'] =  'Event was n\'t updat ed';   1210                                                       $s how['error _text'] =  'Event was n\'t updat ed';
1187                                               break;   1211                                               break;
1188                                      case SDA TING_ERROR _WRONG_DAT E_FORMAT:   1212                                      case SDA TING_ERROR _WRONG_DAT E_FORMAT:
1189                                               $show['err or_text']  = 'Wrong d ate format  or wrong  date order ';   1213                                               $show['err or_text']  = 'Wrong d ate format  or wrong  date order ';
1190                                               break;   1214                                               break;
1191                                      case SDA TING_ERROR _PHOTO_PRO CESS:   1215                                      case SDA TING_ERROR _PHOTO_PRO CESS:
1192                                               $show['err or_text']  = 'Error d uring phot o resizing ';   1216                                               $show['err or_text']  = 'Error d uring phot o resizing ';
1193                                               break;   1217                                               break;
1194                             }   1218                             }
1195                    }   1219                    }
1196                    brea k;   1220                    brea k;
1197     1221  
1198           //  delete ev ent   1222           //  delete ev ent
1199           ca se 'delete ':   1223           ca se 'delete ':
1200                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];   1224                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];
1201                    if (  $event_id  )   1225                    if (  $event_id  )
1202                    {   1226                    {
1203                             $delet e_res = SD DeleteEven t( $event_ id );   1227                             $delet e_res = SD DeleteEven t( $event_ id );
1204                             if ( $ delete_res  )   1228                             if ( $ delete_res  )
1205                                      $show['e rror_text' ] = 'Event  was succe ssfully de leted';   1229                                      $show['e rror_text' ] = 'Event  was succe ssfully de leted';
1206                             else   1230                             else
1207                                      $show['e rror_text' ] = 'Delet e query er ror';   1231                                      $show['e rror_text' ] = 'Delet e query er ror';
1208                    }   1232                    }
1209                    brea k;   1233                    brea k;
1210     1234  
1211           //  add new e vent   1235           //  add new e vent
1212           ca se 'new':   1236           ca se 'new':
1213                    $add _res = SDA ddEvent();   1237                    $add _res = SDA ddEvent();
1214                    swit ch ( $add_ res )   1238                    swit ch ( $add_ res )
1215                    {   1239                    {
1216                             case S DATING_ERR OR_SUCCESS :   1240                             case S DATING_ERR OR_SUCCESS :
1217                                      $show['e rror_text' ] = 'Event  was succe ssfully ad ded';   1241                                      $show['e rror_text' ] = 'Event  was succe ssfully ad ded';
1218                                      break;   1242                                      break;
1219                             case S DATING_ERR OR_QUERY_E RROR:   1243                             case S DATING_ERR OR_QUERY_E RROR:
1220                                      $show['e rror_text' ] = 'Inser t query er ror';   1244                                      $show['e rror_text' ] = 'Inser t query er ror';
1221                                      break;   1245                                      break;
1222                             case S DATING_ERR OR_NOT_AFF ECTED:   1246                             case S DATING_ERR OR_NOT_AFF ECTED:
1223                                      $show['e rror_text' ] = 'Event  wasn\'t a dded';   1247                                      $show['e rror_text' ] = 'Event  wasn\'t a dded';
1224                                      break;   1248                                      break;
1225                             case S DATING_ERR OR_WRONG_D ATE_FORMAT :   1249                             case S DATING_ERR OR_WRONG_D ATE_FORMAT :
1226                                      $show['e rror_text' ] = 'Wrong  date form at or wron g date ord er';   1250                                      $show['e rror_text' ] = 'Wrong  date form at or wron g date ord er';
1227                                      break;   1251                                      break;
1228                             case S DATING_ERR OR_PHOTO_P ROCESS:   1252                             case S DATING_ERR OR_PHOTO_P ROCESS:
1229                                      $show['e rror_text' ] = 'Error  during ph oto resizi ng';   1253                                      $show['e rror_text' ] = 'Error  during ph oto resizi ng';
1230                                      break;   1254                                      break;
1231                    }   1255                    }
1232                    brea k;   1256                    brea k;
1233     1257  
1234           //  show part icipants o f specifie d event   1258           //  show part icipants o f specifie d event
1235           ca se 'show_p art':   1259           ca se 'show_p art':
1236                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];   1260                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];
1237                    if (  $event_id  )   1261                    if (  $event_id  )
1238                    {   1262                    {
1239                             // del ete member s from eve nt   1263                             // del ete member s from eve nt
1240                             if ( $ _POST['par ticipant_c ancel'] ==  'Remove f rom event'  )   1264                             if ( $ _POST['par ticipant_c ancel'] ==  'Remove f rom event'  )
1241                             {   1265                             {
1242                                      $delete_ participan ts = '';   1266                                      $delete_ participan ts = '';
1243                                      foreach  ( $_POST a s $key =>  $value )   1267                                      foreach  ( $_POST a s $key =>  $value )
1244                                      {   1268                                      {
1245                                               if ( (int) $key && $v alue == 'o n' )   1269                                               if ( (int) $key && $v alue == 'o n' )
1246                                               {   1270                                               {
1247                                                       $d elete_part icipants . = strlen($ delete_par ticipants)  ? ','. (i nt)$key :  (int)$key;   1271                                                       $d elete_part icipants . = strlen($ delete_par ticipants)  ? ','. (i nt)$key :  (int)$key;
1248                                               }   1272                                               }
1249                                      }   1273                                      }
1250                                      if ( str len($delet e_particip ants) )   1274                                      if ( str len($delet e_particip ants) )
1251                                      {   1275                                      {
1252                                               db_res( "D ELETE FROM  `SDatingP articipant s` WHERE ` ID` IN ($d elete_part icipants)"  );   1276                                               db_res( "D ELETE FROM  `SDatingP articipant s` WHERE ` ID` IN ($d elete_part icipants)"  );
1253                                               db_res( "D ELETE FROM  `SDatingM atches` WH ERE `IDCho oser` IN ( $delete_pa rticipants ) OR `IDCh osen` IN ( $delete_pa rticipants )" );   1277                                               db_res( "D ELETE FROM  `SDatingM atches` WH ERE `IDCho oser` IN ( $delete_pa rticipants ) OR `IDCh osen` IN ( $delete_pa rticipants )" );
1254                                      }   1278                                      }
1255                             }   1279                             }
1256     1280  
1257                             // sen d email to  members   1281                             // sen d email to  members
1258                             if ( $ _POST['sen d_message' ] == 'Send  message'  )   1282                             if ( $ _POST['sen d_message' ] == 'Send  message'  )
1259                             {   1283                             {
1260                                      $subject  = getPara m( 't_SDat ingAdminEm ail_subjec t' );   1284                                      $subject  = getPara m( 't_SDat ingAdminEm ail_subjec t' );
1261                                      $text =  getParam(  't_SDating AdminEmail ' );   1285                                      $text =  getParam(  't_SDating AdminEmail ' );
1262     1286  
1263                                      $failed_ count = 0;   1287                                      $failed_ count = 0;
1264                                      foreach  ( $_POST a s $key =>  $value )   1288                                      foreach  ( $_POST a s $key =>  $value )
1265                                      {   1289                                      {
1266                                               if ( (int) $key && $v alue == 'o n' )   1290                                               if ( (int) $key && $v alue == 'o n' )
1267                                               {   1291                                               {
1268                                                       $p art_arr =  db_arr( "S ELECT `Pro files`.`ID `, `Profil es`.`NickN ame`, `Pro files`.`Em ail`, `SDa tingPartic ipants`.`P articipant UID`, `SDa tingEvents `.`Title`,  `SDatingE vents`.`Pl ace`, `SDa tingEvents `.`EventSt art` FROM  `SDatingPa rticipants `   1292                                                       $p art_arr =  db_arr( "S ELECT `Pro files`.`ID `, `Profil es`.`NickN ame`, `Pro files`.`Em ail`, `SDa tingPartic ipants`.`P articipant UID`, `SDa tingEvents `.`Title`,  `SDatingE vents`.`Pl ace`, `SDa tingEvents `.`EventSt art` FROM  `SDatingPa rticipants `
1269                                                                                                            LEFT  JOIN `Pro files` ON  `SDatingPa rticipants `.`IDMembe r` = `Prof iles`.`ID`   1293                                                                                                            LEFT  JOIN `Pro files` ON  `SDatingPa rticipants `.`IDMembe r` = `Prof iles`.`ID`
1270                                                                                                            LEFT  JOIN `SDa tingEvents ` ON `SDat ingEvents` .`ID` = `S DatingPart icipants`. `IDEvent`   1294                                                                                                            LEFT  JOIN `SDa tingEvents ` ON `SDat ingEvents` .`ID` = `S DatingPart icipants`. `IDEvent`
1271                                                                                                            WHER E `SDating Participan ts`.`ID` =  ". (int)$ key );   1295                                                                                                            WHER E `SDating Participan ts`.`ID` =  ". (int)$ key );
1272     1296  
1273                                                       $a Plus = arr ay();   1297                                                       $a Plus = arr ay();
1274                                                       $a Plus['Name SDating']  = $part_ar r['Title'] ;   1298                                                       $a Plus['Name SDating']  = $part_ar r['Title'] ;
1275                                                       $a Plus['Plac eSDating']  = $part_a rr['Place' ];   1299                                                       $a Plus['Plac eSDating']  = $part_a rr['Place' ];
1276                                                       $a Plus['When StarSDatin g'] = $par t_arr['Eve ntStart'];   1300                                                       $a Plus['When StarSDatin g'] = $par t_arr['Eve ntStart'];
1277                                                       $a Plus['Pers onalUID']  = $part_ar r['Partici pantUID'];   1301                                                       $a Plus['Pers onalUID']  = $part_ar r['Partici pantUID'];
1278                                                       $a Plus['Link SDatingEve nt'] = $si te['url']  . 'events. php?action =show_info &amp;event _id=' . $e vent_id;   1302                                                       $a Plus['Link SDatingEve nt'] = $si te['url']  . 'events. php?action =show_info &amp;event _id=' . $e vent_id;
1279                                                       $a Plus['Mess ageText']  = process_ pass_data( $_POST['me ssage']);   1303                                                       $a Plus['Mess ageText']  = process_ pass_data( $_POST['me ssage']);
1280     1304  
1281                                                       $m ail_res =  sendMail(  $part_arr[ 'Email'],  $subject,  $text, $pa rt_arr['ID '], $aPlus  );   1305                                                       $m ail_res =  sendMail(  $part_arr[ 'Email'],  $subject,  $text, $pa rt_arr['ID '], $aPlus  );
1282     1306  
1283                                                       if  ( !$mail_ res )   1307                                                       if  ( !$mail_ res )
1284                                                                $fai led_count+ +;   1308                                                                $fai led_count+ +;
1285                                               }   1309                                               }
1286                                      }   1310                                      }
1287                                      if ( $fa iled_count  > 0 )   1311                                      if ( $fa iled_count  > 0 )
1288                                               $show_part ['error_te xt'] = "Fa iled to se nd {$faile d_count} m essages";   1312                                               $show_part ['error_te xt'] = "Fa iled to se nd {$faile d_count} m essages";
1289                                      else   1313                                      else
1290                                               $show_part ['error_te xt'] = 'Al l messages  were succ essfully s ent';   1314                                               $show_part ['error_te xt'] = 'Al l messages  were succ essfully s ent';
1291                             }   1315                             }
1292     1316  
1293                             // lis t of parti cipants   1317                             // lis t of parti cipants
1294                             $part_ page = iss et($_REQUE ST['part_p age']) ? ( int)$_REQU EST['part_ page'] : 1 ;   1318                             $part_ page = iss et($_REQUE ST['part_p age']) ? ( int)$_REQU EST['part_ page'] : 1 ;
1295                             $part_ p_per_page  = isset($ _REQUEST[' part_p_per _page']) ?  (int)$_RE QUEST['par t_p_per_pa ge'] : 30;   1319                             $part_ p_per_page  = isset($ _REQUEST[' part_p_per _page']) ?  (int)$_RE QUEST['par t_p_per_pa ge'] : 30;
1296                             $limit _first = ( int)($part _page - 1)  * $part_p _per_page;   1320                             $limit _first = ( int)($part _page - 1)  * $part_p _per_page;
1297                             $part_ sortby = i sset($_REQ UEST['sort by']) ? pr ocess_db_i nput($_REQ UEST['sort by']) : 'P rofiles.ID ';   1321                             $part_ sortby = i sset($_REQ UEST['sort by']) ? pr ocess_db_i nput($_REQ UEST['sort by']) : 'P rofiles.ID ';
1298                             $part_ sortorder  = isset($_ REQUEST['s ortorder'] ) && $_REQ UEST['sort order'] ==  'DESC' ?  'DESC' : ' ASC';   1322                             $part_ sortorder  = isset($_ REQUEST['s ortorder'] ) && $_REQ UEST['sort order'] ==  'DESC' ?  'DESC' : ' ASC';
1299                             $searc h_filter =  '';   1323                             $searc h_filter =  '';
1300                             // add  search fi lter if ne eded   1324                             // add  search fi lter if ne eded
1301                             if ( $ _REQUEST[' search_ema il'] )   1325                             if ( $ _REQUEST[' search_ema il'] )
1302                                      $search_ filter = ' AND `Profi les`.`Emai l` LIKE \' %'. proces s_db_input ($_REQUEST ['search_f ilter']) . '%\'';   1326                                      $search_ filter = ' AND `Profi les`.`Emai l` LIKE \' %'. proces s_db_input ($_REQUEST ['search_f ilter']) . '%\'';
1303                             elseif  ( $_REQUE ST['search _nick'] )   1327                             elseif  ( $_REQUE ST['search _nick'] )
1304                                      $search_ filter = ' AND `Profi les`.`Nick Name` LIKE  \'%'. pro cess_db_in put($_REQU EST['searc h_filter'] ) .'%\'';   1328                                      $search_ filter = ' AND `Profi les`.`Nick Name` LIKE  \'%'. pro cess_db_in put($_REQU EST['searc h_filter'] ) .'%\'';
1305                             elseif  ( $_REQUE ST['search _id'] )   1329                             elseif  ( $_REQUE ST['search _id'] )
1306                                      $search_ filter = ' AND `Profi les`.`ID`  = '. (int) $_REQUEST[ 'search_fi lter'];   1330                                      $search_ filter = ' AND `Profi les`.`ID`  = '. (int) $_REQUEST[ 'search_fi lter'];
1307                             $part_ profiles_r es = db_re s( "SELECT  `Profiles `.*, `SDat ingPartici pants`.`ID ` AS `Part ID`, `SDat ingPartici pants`.`Pa rticipantU ID` AS `UI D` FROM `S DatingPart icipants`   1331                             $part_ profiles_r es = db_re s( "SELECT  `Profiles `.*, `SDat ingPartici pants`.`ID ` AS `Part ID`, `SDat ingPartici pants`.`Pa rticipantU ID` AS `UI D` FROM `S DatingPart icipants`
1308                                                                                                   LE FT JOIN `P rofiles` O N `SDating Participan ts`.`IDMem ber` = `Pr ofiles`.`I D`   1332                                                                                                   LE FT JOIN `P rofiles` O N `SDating Participan ts`.`IDMem ber` = `Pr ofiles`.`I D`
1309                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id $s earch_filt er   1333                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id $s earch_filt er
1310                                                                                                   OR DER BY $pa rt_sortby  $part_sort order   1334                                                                                                   OR DER BY $pa rt_sortby  $part_sort order
1311                                                                                                   LI MIT $limit _first, $p art_p_per_ page" );   1335                                                                                                   LI MIT $limit _first, $p art_p_per_ page" );
1312                             $total _arr = db_ arr( "SELE CT COUNT(* ) FROM `SD atingParti cipants`   1336                             $total _arr = db_ arr( "SELE CT COUNT(* ) FROM `SD atingParti cipants`
1313                                                                                           LEFT JOIN  `Profiles`  ON `SDati ngParticip ants`.`IDM ember` = ` Profiles`. `ID`   1337                                                                                           LEFT JOIN  `Profiles`  ON `SDati ngParticip ants`.`IDM ember` = ` Profiles`. `ID`
1314                                                                                           WHERE `SDa tingPartic ipants`.`I DEvent` =  $event_id  $search_fi lter" );   1338                                                                                           WHERE `SDa tingPartic ipants`.`I DEvent` =  $event_id  $search_fi lter" );
1315                             $part_ profiles_t otal = (in t)$total_a rr[0];   1339                             $part_ profiles_t otal = (in t)$total_a rr[0];
1316                             $pages _num = cei l( $part_p rofiles_to tal / $par t_p_per_pa ge );   1340                             $pages _num = cei l( $part_p rofiles_to tal / $par t_p_per_pa ge );
1317                             $part_ get_url =  "{$_SERVER ['PHP_SELF ']}?action =show_part &amp;event _id={$even t_id}". (i sset($_REQ UEST['part _p_per_pag e']) ? '&a mp;part_p_ per_page=' . (int)$_R EQUEST['pa rt_p_per_p age'] : '' );   1341                             $part_ get_url =  "{$_SERVER ['PHP_SELF ']}?action =show_part &amp;event _id={$even t_id}". (i sset($_REQ UEST['part _p_per_pag e']) ? '&a mp;part_p_ per_page=' . (int)$_R EQUEST['pa rt_p_per_p age'] : '' );
1318                             $part_ per_page_a rray = arr ay(10, 15,  20, 30, 5 0, 100);   1342                             $part_ per_page_a rray = arr ay(10, 15,  20, 30, 5 0, 100);
1319                             $part_ query = "S ELECT `ID` , `Title`,  `Descript ion`, `Sta tus`, `Sta tusMessage `, `Countr y`, `City` , `Place`,  `PhotoFil ename`, `E ventStart` , `EventEn d`, `Ticke tSaleStart `, `Ticket SaleEnd`,  `Responsib leName`, ` Responsibl eEmail`, ` Responsibl ePhone`, ` EventSexFi lter`, `Ev entAgeLowe rFilter`,  `EventAgeU pperFilter `, `EventM embershipF ilter`, `T icketCount Female`, ` TicketCoun tMale`, `T icketPrice Female`, ` TicketPric eMale`, `C hoosePerio d`, `Allow ViewPartic ipants` FR OM `SDatin gEvents` W HERE `ID`  = $event_i d";   1343                             $part_ query = "S ELECT `ID` , `Title`,  `Descript ion`, `Sta tus`, `Sta tusMessage `, `Countr y`, `City` , `Place`,  `PhotoFil ename`, `E ventStart` , `EventEn d`, `Ticke tSaleStart `, `Ticket SaleEnd`,  `Responsib leName`, ` Responsibl eEmail`, ` Responsibl ePhone`, ` EventSexFi lter`, `Ev entAgeLowe rFilter`,  `EventAgeU pperFilter `, `EventM embershipF ilter`, `T icketCount Female`, ` TicketCoun tMale`, `T icketPrice Female`, ` TicketPric eMale`, `C hoosePerio d`, `Allow ViewPartic ipants` FR OM `SDatin gEvents` W HERE `ID`  = $event_i d";
1320                    }   1344                    }
1321                    brea k;   1345                    brea k;
1322     1346  
1323           //  show matc hes of spe cified eve nt   1347           //  show matc hes of spe cified eve nt
1324           ca se 'show_m atch':   1348           ca se 'show_m atch':
1325                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];   1349                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];
1326                    if (  $event_id  )   1350                    if (  $event_id  )
1327                    {   1351                    {
1328                             // del ete member  from chos en list   1352                             // del ete member  from chos en list
1329                             if ( $ _POST['cho ose_cancel '] == 'Rem ove from c hoose list ' )   1353                             if ( $ _POST['cho ose_cancel '] == 'Rem ove from c hoose list ' )
1330                             {   1354                             {
1331                                      $delete_ chosen = ' ';   1355                                      $delete_ chosen = ' ';
1332                                      $delete_ chooser =  (int)$_POS T['part_id '];   1356                                      $delete_ chooser =  (int)$_POS T['part_id '];
1333                                      foreach  ( $_POST a s $key =>  $value )   1357                                      foreach  ( $_POST a s $key =>  $value )
1334                                      {   1358                                      {
1335                                               if ( (int) $key && $v alue == 'o n' )   1359                                               if ( (int) $key && $v alue == 'o n' )
1336                                               {   1360                                               {
1337                                                       $d elete_chos en .= strl en($delete _chosen) ?  ','. (int )$key : (i nt)$key;   1361                                                       $d elete_chos en .= strl en($delete _chosen) ?  ','. (int )$key : (i nt)$key;
1338                                               }   1362                                               }
1339                                      }   1363                                      }
1340                                      if ( str len($delet e_chosen)  )   1364                                      if ( str len($delet e_chosen)  )
1341                                      {   1365                                      {
1342                                               db_res( "D ELETE FROM  `SDatingM atches` WH ERE `IDCho oser` = $d elete_choo ser AND `I DChosen` I N ($delete _chosen)"  );   1366                                               db_res( "D ELETE FROM  `SDatingM atches` WH ERE `IDCho oser` = $d elete_choo ser AND `I DChosen` I N ($delete _chosen)"  );
1343                                      }   1367                                      }
1344                             }   1368                             }
1345     1369  
1346                             // sen d matchmak ing emails   1370                             // sen d matchmak ing emails
1347                             if ( $ _POST['sen d_match_em ails'] ==  'on' )   1371                             if ( $ _POST['sen d_match_em ails'] ==  'on' )
1348                             {   1372                             {
1349                                      $match_e mail_res =  db_res( " SELECT `Pa rticipantT able1`.`ID Member` AS  `ChooserM emberID`,  `Participa ntTable2`. `IDMember`  AS `Chose nMemberID` , `SDating Events`.`I D` AS `Eve ntID`, `SD atingEvent s`.`Title` , `SDating Events`.`P lace`, `SD atingEvent s`.`EventS tart`   1373                                      $match_e mail_res =  db_res( " SELECT `Pa rticipantT able1`.`ID Member` AS  `ChooserM emberID`,  `Participa ntTable2`. `IDMember`  AS `Chose nMemberID` , `SDating Events`.`I D` AS `Eve ntID`, `SD atingEvent s`.`Title` , `SDating Events`.`P lace`, `SD atingEvent s`.`EventS tart`
1350                                                                                                   FR OM `SDatin gMatches`  AS `MatchT able1`   1374                                                                                                   FR OM `SDatin gMatches`  AS `MatchT able1`
1351                                                                                                   LE FT JOIN `S DatingMatc hes` AS `M atchTable2 ` ON `Matc hTable2`.` IDChooser`  = `MatchT able1`.`ID Chosen` AN D `MatchTa ble2`.`IDC hosen` = ` MatchTable 1`.`IDChoo ser`   1375                                                                                                   LE FT JOIN `S DatingMatc hes` AS `M atchTable2 ` ON `Matc hTable2`.` IDChooser`  = `MatchT able1`.`ID Chosen` AN D `MatchTa ble2`.`IDC hosen` = ` MatchTable 1`.`IDChoo ser`
1352                                                                                                   LE FT JOIN `S DatingPart icipants`  AS `Partic ipantTable 1` ON `Par ticipantTa ble1`.`ID`  = `MatchT able1`.`ID Chooser`   1376                                                                                                   LE FT JOIN `S DatingPart icipants`  AS `Partic ipantTable 1` ON `Par ticipantTa ble1`.`ID`  = `MatchT able1`.`ID Chooser`
1353                                                                                                   LE FT JOIN `S DatingPart icipants`  AS `Partic ipantTable 2` ON `Par ticipantTa ble2`.`ID`  = `MatchT able1`.`ID Chosen`   1377                                                                                                   LE FT JOIN `S DatingPart icipants`  AS `Partic ipantTable 2` ON `Par ticipantTa ble2`.`ID`  = `MatchT able1`.`ID Chosen`
1354                                                                                                   LE FT JOIN `S DatingEven ts` ON `SD atingEvent s`.`ID` =  `Participa ntTable1`. `IDEvent`   1378                                                                                                   LE FT JOIN `S DatingEven ts` ON `SD atingEvent s`.`ID` =  `Participa ntTable1`. `IDEvent`
1355                                                                                                   WH ERE `Parti cipantTabl e1`.`IDEve nt` = $eve nt_id   1379                                                                                                   WH ERE `Parti cipantTabl e1`.`IDEve nt` = $eve nt_id
1356                                                                                                   AN D `Partici pantTable2 `.`IDEvent ` = $event _id   1380                                                                                                   AN D `Partici pantTable2 `.`IDEvent ` = $event _id
1357                                                                                                   AN D `MatchTa ble2`.`IDC hooser` IS  NOT NULL"  );   1381                                                                                                   AN D `MatchTa ble2`.`IDC hooser` IS  NOT NULL"  );
1358     1382  
1359                                      $subject  = getPara m( 't_SDat ingMatch_s ubject' );   1383                                      $subject  = getPara m( 't_SDat ingMatch_s ubject' );
1360     1384  
1361                                      $text =  getParam(  't_SDating Match' );   1385                                      $text =  getParam(  't_SDating Match' );
1362     1386  
1363                                      $failed_ count = 0;   1387                                      $failed_ count = 0;
1364                                      while (  $match_ema il_arr = m ysql_fetch _assoc($ma tch_email_ res) )   1388                                      while (  $match_ema il_arr = m ysql_fetch _assoc($ma tch_email_ res) )
1365                                      {   1389                                      {
1366     1390  
1367                                               $chooser_a rr = getPr ofileInfo(  $match_em ail_arr['C hooserMemb erID'] );   1391                                               $chooser_a rr = getPr ofileInfo(  $match_em ail_arr['C hooserMemb erID'] );
1368     1392  
1369     1393  
1370                                               $aPlus = a rray();   1394                                               $aPlus = a rray();
1371                                               $aPlus['Na meSDating' ] = $match _email_arr ['Title'];   1395                                               $aPlus['Na meSDating' ] = $match _email_arr ['Title'];
1372                                               $aPlus['Pl aceSDating '] = $matc h_email_ar r['Place'] ;   1396                                               $aPlus['Pl aceSDating '] = $matc h_email_ar r['Place'] ;
1373                                               $aPlus['Wh enStarSDat ing'] = $m atch_email _arr['Even tStart'];   1397                                               $aPlus['Wh enStarSDat ing'] = $m atch_email _arr['Even tStart'];
1374                                               $aPlus['Ma tchLink']  = $site['u rl'] . 'pr ofile.php? ID=' . $ma tch_email_ arr['Chose nMemberID' ];   1398                                               $aPlus['Ma tchLink']  = $site['u rl'] . 'pr ofile.php? ID=' . $ma tch_email_ arr['Chose nMemberID' ];
1375                                               $aPlus['Li nkSDatingE vent'] = $ site['url' ] . 'event s.php?acti on=show_in fo&amp;eve nt_id=' .  $match_ema il_arr['Ev entID'];   1399                                               $aPlus['Li nkSDatingE vent'] = $ site['url' ] . 'event s.php?acti on=show_in fo&amp;eve nt_id=' .  $match_ema il_arr['Ev entID'];
1376     1400  
1377     1401  
1378                                               $mail_res  = sendMail ( $chooser _arr['Emai l'], $subj ect, $text , $chooser _arr['ID'] , $aPlus ) ;   1402                                               $mail_res  = sendMail ( $chooser _arr['Emai l'], $subj ect, $text , $chooser _arr['ID'] , $aPlus ) ;
1379     1403  
1380                                               if ( !$mai l_res )   1404                                               if ( !$mai l_res )
1381                                                       $f ailed_coun t++;   1405                                                       $f ailed_coun t++;
1382                                      }   1406                                      }
1383                                      if ( $fa iled_count  > 0 )   1407                                      if ( $fa iled_count  > 0 )
1384                                               $show_matc h['error_t ext'] = "F ailed to s end {$fail ed_count}  notificati ons";   1408                                               $show_matc h['error_t ext'] = "F ailed to s end {$fail ed_count}  notificati ons";
1385                                      else   1409                                      else
1386                                               $show_matc h['error_t ext'] = 'A ll notific ations wer e successf ully sent' ;   1410                                               $show_matc h['error_t ext'] = 'A ll notific ations wer e successf ully sent' ;
1387                             }   1411                             }
1388     1412  
1389                             $match _page = is set($_REQU EST['match _page']) ?  (int)$_RE QUEST['mat ch_page']  : 1;   1413                             $match _page = is set($_REQU EST['match _page']) ?  (int)$_RE QUEST['mat ch_page']  : 1;
1390                             $match _p_per_pag e = isset( $_REQUEST[ 'match_p_p er_page'])  ? (int)$_ REQUEST['m atch_p_per _page'] :  30;   1414                             $match _p_per_pag e = isset( $_REQUEST[ 'match_p_p er_page'])  ? (int)$_ REQUEST['m atch_p_per _page'] :  30;
1391                             $limit _first = ( int)($matc h_page - 1 ) * $match _p_per_pag e;   1415                             $limit _first = ( int)($matc h_page - 1 ) * $match _p_per_pag e;
1392                             $match _profiles_ res = db_r es( "SELEC T `Profile s`.*, `SDa tingPartic ipants`.`I D` AS `Par tID`, `SDa tingPartic ipants`.`P articipant UID` AS `U ID` FROM ` SDatingPar ticipants`   1416                             $match _profiles_ res = db_r es( "SELEC T `Profile s`.*, `SDa tingPartic ipants`.`I D` AS `Par tID`, `SDa tingPartic ipants`.`P articipant UID` AS `U ID` FROM ` SDatingPar ticipants`
1393                                                                                                   LE FT JOIN `P rofiles` O N `SDating Participan ts`.`IDMem ber` = `Pr ofiles`.`I D`   1417                                                                                                   LE FT JOIN `P rofiles` O N `SDating Participan ts`.`IDMem ber` = `Pr ofiles`.`I D`
1394                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id   1418                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id
1395                                                                                                   OR DER BY `SD atingParti cipants`.` Participan tUID` ASC   1419                                                                                                   OR DER BY `SD atingParti cipants`.` Participan tUID` ASC
1396                                                                                                   LI MIT $limit _first, $m atch_p_per _page" );   1420                                                                                                   LI MIT $limit _first, $m atch_p_per _page" );
1397                             $total _arr = db_ arr( "SELE CT COUNT(* ) FROM `SD atingParti cipants`   1421                             $total _arr = db_ arr( "SELE CT COUNT(* ) FROM `SD atingParti cipants`
1398                                                                                           WHERE `SDa tingPartic ipants`.`I DEvent` =  $event_id"  );   1422                                                                                           WHERE `SDa tingPartic ipants`.`I DEvent` =  $event_id"  );
1399                             $match _count_arr  = db_arr(  "SELECT C OUNT(*) /  2 FROM `SD atingMatch es` AS `Ma tchTable1`   1423                             $match _count_arr  = db_arr(  "SELECT C OUNT(*) /  2 FROM `SD atingMatch es` AS `Ma tchTable1`
1400                                                                                                   LE FT JOIN `S DatingMatc hes` AS `M atchTable2 ` ON `Matc hTable2`.` IDChooser`  = `MatchT able1`.`ID Chosen` AN D `MatchTa ble2`.`IDC hosen` = ` MatchTable 1`.`IDChoo ser`   1424                                                                                                   LE FT JOIN `S DatingMatc hes` AS `M atchTable2 ` ON `Matc hTable2`.` IDChooser`  = `MatchT able1`.`ID Chosen` AN D `MatchTa ble2`.`IDC hosen` = ` MatchTable 1`.`IDChoo ser`
1401                                                                                                   LE FT JOIN `S DatingPart icipants`  ON `SDatin gParticipa nts`.`ID`  = `MatchTa ble1`.`IDC hosen`   1425                                                                                                   LE FT JOIN `S DatingPart icipants`  ON `SDatin gParticipa nts`.`ID`  = `MatchTa ble1`.`IDC hosen`
1402                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id   1426                                                                                                   WH ERE `SDati ngParticip ants`.`IDE vent` = $e vent_id
1403                                                                                                   AN D `MatchTa ble2`.`IDC hooser` IS  NOT NULL"  );   1427                                                                                                   AN D `MatchTa ble2`.`IDC hooser` IS  NOT NULL"  );
1404                             $match _profiles_ total = (i nt)$total_ arr[0];   1428                             $match _profiles_ total = (i nt)$total_ arr[0];
1405                             $match _count_tot al = (int) $match_cou nt_arr[0];   1429                             $match _count_tot al = (int) $match_cou nt_arr[0];
1406                             $pages _num = cei l( $match_ profiles_t otal / $ma tch_p_per_ page );   1430                             $pages _num = cei l( $match_ profiles_t otal / $ma tch_p_per_ page );
1407                             $match _get_url =  "{$_SERVE R['PHP_SEL F']}?actio n=show_mat ch&amp;eve nt_id={$ev ent_id}".  (isset($_R EQUEST['ma tch_p_per_ page']) ?  '&amp;matc h_p_per_pa ge='. (int )$_REQUEST ['match_p_ per_page']  : '');   1431                             $match _get_url =  "{$_SERVE R['PHP_SEL F']}?actio n=show_mat ch&amp;eve nt_id={$ev ent_id}".  (isset($_R EQUEST['ma tch_p_per_ page']) ?  '&amp;matc h_p_per_pa ge='. (int )$_REQUEST ['match_p_ per_page']  : '');
1408                             $match _per_page_ array = ar ray(10, 15 , 20, 30,  50, 100);   1432                             $match _per_page_ array = ar ray(10, 15 , 20, 30,  50, 100);
1409                    }   1433                    }
1410                    brea k;   1434                    brea k;
1411   }   1435   }
1412     1436  
1413   // if acti on is 'sho w' then se lect event s from the  database   1437   // if acti on is 'sho w' then se lect event s from the  database
1414   if ( strle n($show_qu ery) )   1438   if ( strle n($show_qu ery) )
1415   {   1439   {
1416           $s how_result  = db_res(  $show_que ry );   1440           $s how_result  = db_res(  $show_que ry );
1417           $s how_num =  mysql_num_ rows( $sho w_result ) ;   1441           $s how_num =  mysql_num_ rows( $sho w_result ) ;
1418           $t otal_num_a rr = db_ar r( $total_ query );   1442           $t otal_num_a rr = db_ar r( $total_ query );
1419           $t otal_num =  (int)$tot al_num_arr [0];   1443           $t otal_num =  (int)$tot al_num_arr [0];
1420   }   1444   }
1421     1445  
1422   TopCodeAdm in();   1446   TopCodeAdm in();
1423   ContentBlo ckHead("Ma nage event s");   1447   ContentBlo ckHead("Ma nage event s");
1424     1448  
1425   if ( strle n($show['e rror_text' ]) )   1449   if ( strle n($show['e rror_text' ]) )
1426           ec ho "   1450           ec ho "
1427   <center>   1451   <center>
1428           <d iv class=\ "err\">{$s how['error _text']}</ div>   1452           <d iv class=\ "err\">{$s how['error _text']}</ div>
1429   </center>" ;   1453   </center>" ;
1430   ?>   1454   ?>
1431     1455  
1432   <center>   1456   <center>
1433     1457  
1434   <script la nguage="Ja vaScript"  type="text /javascrip t">   1458   <script la nguage="Ja vaScript"  type="text /javascrip t">
1435   <!--   1459   <!--
1436           fu nction upd ateShowCon trols()   1460           fu nction upd ateShowCon trols()
1437           {   1461           {
1438                    docu ment.forms ['showEven tsForm'].e lements['s how_events _between1' ].disabled  = !(docum ent.getEle mentById(' show_event s_date_id' ).checked) ;   1462                    docu ment.forms ['showEven tsForm'].e lements['s how_events _between1' ].disabled  = !(docum ent.getEle mentById(' show_event s_date_id' ).checked) ;
1439                    docu ment.getEl ementById( 'show_even ts_between 1_choose_i d').disabl ed = !(doc ument.getE lementById ('show_eve nts_date_i d').checke d);   1463                    docu ment.getEl ementById( 'show_even ts_between 1_choose_i d').disabl ed = !(doc ument.getE lementById ('show_eve nts_date_i d').checke d);
1440                    docu ment.getEl ementById( 'show_even ts_between 1_clear_id ').disable d = !(docu ment.getEl ementById( 'show_even ts_date_id ').checked );   1464                    docu ment.getEl ementById( 'show_even ts_between 1_clear_id ').disable d = !(docu ment.getEl ementById( 'show_even ts_date_id ').checked );
1441                    docu ment.forms ['showEven tsForm'].e lements['s how_events _between2' ].disabled  = !(docum ent.getEle mentById(' show_event s_date_id' ).checked) ;   1465                    docu ment.forms ['showEven tsForm'].e lements['s how_events _between2' ].disabled  = !(docum ent.getEle mentById(' show_event s_date_id' ).checked) ;
1442                    docu ment.getEl ementById( 'show_even ts_between 2_choose_i d').disabl ed = !(doc ument.getE lementById ('show_eve nts_date_i d').checke d);   1466                    docu ment.getEl ementById( 'show_even ts_between 2_choose_i d').disabl ed = !(doc ument.getE lementById ('show_eve nts_date_i d').checke d);
1443                    docu ment.getEl ementById( 'show_even ts_between 2_clear_id ').disable d = !(docu ment.getEl ementById( 'show_even ts_date_id ').checked );   1467                    docu ment.getEl ementById( 'show_even ts_between 2_clear_id ').disable d = !(docu ment.getEl ementById( 'show_even ts_date_id ').checked );
1444                    docu ment.getEl ementById( 'show_even ts_select_ id').disab led = !(do cument.get ElementByI d('show_ev ents_count ry_id').ch ecked);   1468                    docu ment.getEl ementById( 'show_even ts_select_ id').disab led = !(do cument.get ElementByI d('show_ev ents_count ry_id').ch ecked);
1445           }   1469           }
1446   -->   1470   -->
1447   </script>   1471   </script>
1448     1472  
1449   <div style ="text-ali gn: right;  padding-r ight: 45px ; padding- bottom: 2p x;">   1473   <div style ="text-ali gn: right;  padding-r ight: 45px ; padding- bottom: 2p x;">
1450           <a  href="<?=  "{$_SERVE R['PHP_SEL F']}?actio n=show_edi t_form" ?> ">Add new  event</a>   1474           <a  href="<?=  "{$_SERVE R['PHP_SEL F']}?actio n=show_edi t_form" ?> ">Add new  event</a>
1451   </div>   1475   </div>
1452     1476  
1453   <form id=" showEvents Form" acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "get" styl e="margin:  0px;">   1477   <form id=" showEvents Form" acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "get" styl e="margin:  0px;">
1454   <table cla ss="text"  cellspacin g="2" cell padding="4 " width="5 00" border ="0">   1478   <table cla ss="text"  cellspacin g="2" cell padding="4 " width="5 00" border ="0">
1455           <t r>   1479           <t r>
1456                    <td  class="sec tion_heade r" nowrap> Select eve nts to sho w</td>   1480                    <td  class="sec tion_heade r" nowrap> Select eve nts to sho w</td>
1457           </ tr>   1481           </ tr>
1458           <t r>   1482           <t r>
1459                    <td  class="sec tion_row">   1483                    <td  class="sec tion_row">
1460                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="480" a lign="cent er">   1484                             <table  cellpaddi ng="4" cel lspacing=" 0" border= "0" class= "text" wid th="480" a lign="cent er">
1461                                      <tr>   1485                                      <tr>
1462                                               <td align= "left" wid th="160" c olspan="2" >   1486                                               <td align= "left" wid th="160" c olspan="2" >
1463                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_all_id"  class="no " value="a ll" style= "vertical- align: mid dle;" onCl ick="javas cript: upd ateShowCon trols();"  <?= $_REQU EST['show_ events'] = = 'all' ?  'checked=" checked"'  : '' ?> />   1487                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_all_id"  class="no " value="a ll" style= "vertical- align: mid dle;" onCl ick="javas cript: upd ateShowCon trols();"  <?= $_REQU EST['show_ events'] = = 'all' ?  'checked=" checked"'  : '' ?> />
1464                                                       &n bsp;<label  for="show _events_al l_id">Show  all event s</label>   1488                                                       &n bsp;<label  for="show _events_al l_id">Show  all event s</label>
1465                                               </td>   1489                                               </td>
1466                                      </tr>   1490                                      </tr>
1467                                      <tr>   1491                                      <tr>
1468                                               <td align= "left" wid th="160">   1492                                               <td align= "left" wid th="160">
1469                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_date_id " class="n o" value=" date" styl e="vertica l-align: m iddle;" on Click="jav ascript: u pdateShowC ontrols(); " <?= $_RE QUEST['sho w_events']  == 'date'  ? 'checke d="checked "' : '' ?>  />   1493                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_date_id " class="n o" value=" date" styl e="vertica l-align: m iddle;" on Click="jav ascript: u pdateShowC ontrols(); " <?= $_RE QUEST['sho w_events']  == 'date'  ? 'checke d="checked "' : '' ?>  />
1470                                                       &n bsp;<label  for="show _events_da te_id">Sho w events b etween</la bel>   1494                                                       &n bsp;<label  for="show _events_da te_id">Sho w events b etween</la bel>
1471                                               </td>   1495                                               </td>
1472                                               <td align= "left">   1496                                               <td align= "left">
1473                                                       <i nput type= "text" cla ss="no" na me="show_e vents_betw een1" id=" show_event s_between1 _id" size= "20" value ="<?= isse t($show['b etween_dat e1']) ? ht mlspecialc hars($show ['between_ date1']) :  '' ?>" <? = $between _disabled  ?> />   1497                                                       <i nput type= "text" cla ss="no" na me="show_e vents_betw een1" id=" show_event s_between1 _id" size= "20" value ="<?= isse t($show['b etween_dat e1']) ? ht mlspecialc hars($show ['between_ date1']) :  '' ?>" <? = $between _disabled  ?> />
1474                                                       &n bsp;<input  type="but ton" id="s how_events _between1_ choose_id"  value="Ch oose" <?=  $between_d isabled ?>  />   1498                                                       &n bsp;<input  type="but ton" id="s how_events _between1_ choose_id"  value="Ch oose" <?=  $between_d isabled ?>  />
1475                                                       &n bsp;<input  type="but ton" id="s how_events _between1_ clear_id"  onClick="j avascript:  document. getElement ById('show _events_be tween1_id' ).value =  ''; " valu e="Clear"  <?= $betwe en_disable d ?> />   1499                                                       &n bsp;<input  type="but ton" id="s how_events _between1_ clear_id"  onClick="j avascript:  document. getElement ById('show _events_be tween1_id' ).value =  ''; " valu e="Clear"  <?= $betwe en_disable d ?> />
1476                                               </td>   1500                                               </td>
1477                                      </tr>   1501                                      </tr>
1478                                      <tr>   1502                                      <tr>
1479                                               <td align= "right" wi dth="160"> and</td>   1503                                               <td align= "right" wi dth="160"> and</td>
1480                                               <td align= "left">   1504                                               <td align= "left">
1481                                                       <i nput type= "text" cla ss="no" na me="show_e vents_betw een2" id=" show_event s_between2 _id" size= "20" value ="<?= isse t($show['b etween_dat e2']) ? ht mlspecialc hars($show ['between_ date2']) :  '' ?>" <? = $between _disabled  ?> />   1505                                                       <i nput type= "text" cla ss="no" na me="show_e vents_betw een2" id=" show_event s_between2 _id" size= "20" value ="<?= isse t($show['b etween_dat e2']) ? ht mlspecialc hars($show ['between_ date2']) :  '' ?>" <? = $between _disabled  ?> />
1482                                                       &n bsp;<input  type="but ton" id="s how_events _between2_ choose_id"  value="Ch oose" <?=  $between_d isabled ?>  />   1506                                                       &n bsp;<input  type="but ton" id="s how_events _between2_ choose_id"  value="Ch oose" <?=  $between_d isabled ?>  />
1483                                                       &n bsp;<input  type="but ton" id="s how_events _between2_ clear_id"  onClick="j avascript:  document. getElement ById('show _events_be tween2_id' ).value =  ''; " valu e="Clear"  <?= $betwe en_disable d ?> />   1507                                                       &n bsp;<input  type="but ton" id="s how_events _between2_ clear_id"  onClick="j avascript:  document. getElement ById('show _events_be tween2_id' ).value =  ''; " valu e="Clear"  <?= $betwe en_disable d ?> />
1484                                               </td>   1508                                               </td>
1485                                      </tr>   1509                                      </tr>
1486                                      <tr>   1510                                      <tr>
1487                                               <td align= "left" wid th="160">   1511                                               <td align= "left" wid th="160">
1488                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_country _id" class ="no" valu e="country " style="v ertical-al ign: middl e;" onClic k="javascr ipt: updat eShowContr ols();"  < ?= $_REQUE ST['show_e vents'] ==  'country'  ? 'checke d="checked "' : '' ?>  />   1512                                                       <i nput type= "radio" na me="show_e vents" id= "show_even ts_country _id" class ="no" valu e="country " style="v ertical-al ign: middl e;" onClic k="javascr ipt: updat eShowContr ols();"  < ?= $_REQUE ST['show_e vents'] ==  'country'  ? 'checke d="checked "' : '' ?>  />
1489                                                       &n bsp;<label  for="show _events_co untry_id"> Show event s by count ry</label>   1513                                                       &n bsp;<label  for="show _events_co untry_id"> Show event s by count ry</label>
1490                                               </td>   1514                                               </td>
1491                                               <td align= "left">   1515                                               <td align= "left">
1492                                                       <s elect clas s="no" nam e="show_ev ents_count ry" id="sh ow_events_ select_id"  <?= $coun try_disabl ed ?> >   1516                                                       <s elect clas s="no" nam e="show_ev ents_count ry" id="sh ow_events_ select_id"  <?= $coun try_disabl ed ?> >
1493   <?   1517   <?
1494           $s el_country  = isset($ show['coun try']) ? $ show['coun try'] : ge tParam( 'd efault_cou ntry' );   1518           $s el_country  = isset($ show['coun try']) ? $ show['coun try'] : ge tParam( 'd efault_cou ntry' );
1495           fo reach ( $a PreValues[ 'Country']  as $key = > $value )   1519           fo reach ( $a PreValues[ 'Country']  as $key = > $value )
1496           {   1520           {
1497                    echo  "   1521                    echo  "
1498                                                                <opt ion value= \"{$key}\"  ". ( $sel _country = = $key ? ' selected=" selected"'  : '') ."  >". _t($va lue['LKey' ]) ."</opt ion>";   1522                                                                <opt ion value= \"{$key}\"  ". ( $sel _country = = $key ? ' selected=" selected"'  : '') ."  >". _t($va lue['LKey' ]) ."</opt ion>";
1499           }   1523           }
1500   ?>   1524   ?>
1501                                                       </ select>   1525                                                       </ select>
1502                                               </td>   1526                                               </td>
1503                                      </tr>   1527                                      </tr>
1504                             </tabl e>   1528                             </tabl e>
1505                    </td >   1529                    </td >
1506           </ tr>   1530           </ tr>
1507   </table>   1531   </table>
1508   <br />   1532   <br />
1509   <input typ e="submit"  class="no " value="S how" />   1533   <input typ e="submit"  class="no " value="S how" />
1510   <input typ e="hidden"  name="act ion" value ="show" />   1534   <input typ e="hidden"  name="act ion" value ="show" />
1511   <input typ e="hidden"  name="fro m" value=" 0" />   1535   <input typ e="hidden"  name="fro m" value=" 0" />
1512   </form>   1536   </form>
1513     1537  
1514   </center>   1538   </center>
1515   <?   1539   <?
1516   ContentBlo ckFoot();   1540   ContentBlo ckFoot();
1517   /**   1541   /**
1518    * Shows d iv with re sults of e vent searc h form   1542    * Shows d iv with re sults of e vent searc h form
1519    */   1543    */
1520   if ( strle n($show_qu ery) )   1544   if ( strle n($show_qu ery) )
1521   {   1545   {
1522     1546  
1523   ContentBlo ckHead("Ev ents");   1547   ContentBlo ckHead("Ev ents");
1524   ?>   1548   ?>
1525     1549  
1526   <center>   1550   <center>
1527     1551  
1528   <script la nguage="Ja vaScript"  type="text /javascrip t">   1552   <script la nguage="Ja vaScript"  type="text /javascrip t">
1529   <!--   1553   <!--
1530           fu nction nav igationSub mit( fromP aram )   1554           fu nction nav igationSub mit( fromP aram )
1531           {   1555           {
1532                    docu ment.forms ['showEven tsForm'].e lements['f rom'].valu e = fromPa ram;   1556                    docu ment.forms ['showEven tsForm'].e lements['f rom'].valu e = fromPa ram;
1533                    docu ment.forms ['showEven tsForm'].s ubmit();   1557                    docu ment.forms ['showEven tsForm'].s ubmit();
1534           }   1558           }
1535   -->   1559   -->
1536   </script>   1560   </script>
1537   <?   1561   <?
1538           if  ( $show_n um == 0 )   1562           if  ( $show_n um == 0 )
1539           {   1563           {
1540                    echo  "No event s availabl e";   1564                    echo  "No event s availabl e";
1541           }   1565           }
1542           el se   1566           el se
1543           {   1567           {
1544                    echo  SDPrintNa vigation(  (int)$_REQ UEST['from '], $total _num, true  );   1568                    echo  SDPrintNa vigation(  (int)$_REQ UEST['from '], $total _num, true  );
1545                    whil e ( $show_ arr = mysq l_fetch_as soc($show_ result) )   1569                    whil e ( $show_ arr = mysq l_fetch_as soc($show_ result) )
1546                    {   1570                    {
1547                             SDPrin tEventRow(  $show_arr  );   1571                             SDPrin tEventRow(  $show_arr  );
1548                    }   1572                    }
1549                    echo  SDPrintNa vigation(  (int)$_REQ UEST['from '], $total _num, fals e );   1573                    echo  SDPrintNa vigation(  (int)$_REQ UEST['from '], $total _num, fals e );
1550           }   1574           }
1551   ?>   1575   ?>
1552     1576  
1553   </center>   1577   </center>
1554   <?   1578   <?
1555     1579  
1556   ContentBlo ckFoot();   1580   ContentBlo ckFoot();
1557   }   1581   }
1558     1582  
1559   /**   1583   /**
1560    * Shows d iv with ev ent partic ipants inf ormation,  pages navi gation, co ntrols for   1584    * Shows d iv with ev ent partic ipants inf ormation,  pages navi gation, co ntrols for
1561    * removin g members  from event   1585    * removin g members  from event
1562    */   1586    */
1563   if ( $_REQ UEST['acti on'] == 's how_part'  && $event_ id )   1587   if ( $_REQ UEST['acti on'] == 's how_part'  && $event_ id )
1564   {   1588   {
1565   ?>   1589   ?>
1566                    <div  class="bl ock_head"> Event part icipants</ div>   1590                    <div  class="bl ock_head"> Event part icipants</ div>
1567                    <div  class="bl ock_outer" >   1591                    <div  class="bl ock_outer" >
1568                             <div c lass="bloc k_inner">   1592                             <div c lass="bloc k_inner">
1569     1593  
1570   <?   1594   <?
1571   if ( strle n($show_pa rt['error_ text']) )   1595   if ( strle n($show_pa rt['error_ text']) )
1572           ec ho "   1596           ec ho "
1573   <center>   1597   <center>
1574           <d iv class=\ "err\">{$s how_part[' error_text ']}</div>   1598           <d iv class=\ "err\">{$s how_part[' error_text ']}</div>
1575   </center>   1599   </center>
1576   <br />";   1600   <br />";
1577   ?>   1601   ?>
1578     1602  
1579   <center>   1603   <center>
1580     1604  
1581   <form id=" searchProf ilesForm"  action="<? = $_SERVER ['PHP_SELF '] ?>" met hod="get"  style="mar gin: 0px;" >   1605   <form id=" searchProf ilesForm"  action="<? = $_SERVER ['PHP_SELF '] ?>" met hod="get"  style="mar gin: 0px;" >
1582   <table cel lpadding=" 2" cellspa cing="2" c lass="pane l" border= "0" width= "540">   1606   <table cel lpadding=" 2" cellspa cing="2" c lass="pane l" border= "0" width= "540">
1583           <t r>   1607           <t r>
1584                    <td  colspan="3 " align="c enter">   1608                    <td  colspan="3 " align="c enter">
1585                             <input  type="tex t" class=" no" name=" search_fil ter" size= "60" />   1609                             <input  type="tex t" class=" no" name=" search_fil ter" size= "60" />
1586                    </td >   1610                    </td >
1587           </ tr>   1611           </ tr>
1588           <t r>   1612           <t r>
1589                    <td  align="rig ht">   1613                    <td  align="rig ht">
1590                             <input  type="sub mit" class ="no" name ="search_e mail" valu e="Search  by Email"  style="wid th: 150px; " />   1614                             <input  type="sub mit" class ="no" name ="search_e mail" valu e="Search  by Email"  style="wid th: 150px; " />
1591                    </td >   1615                    </td >
1592                    <td  align="cen ter">   1616                    <td  align="cen ter">
1593                             <input  type="sub mit" class ="no" name ="search_n ick" value ="Search b y Nickname " style="w idth: 150p x;" />   1617                             <input  type="sub mit" class ="no" name ="search_n ick" value ="Search b y Nickname " style="w idth: 150p x;" />
1594                    </td >   1618                    </td >
1595                    <td  align="lef t">   1619                    <td  align="lef t">
1596                             <input  type="sub mit" class ="no" name ="search_i d" value=" Search by  ID" style= "width: 15 0px;" />   1620                             <input  type="sub mit" class ="no" name ="search_i d" value=" Search by  ID" style= "width: 15 0px;" />
1597                    </td >   1621                    </td >
1598           </ tr>   1622           </ tr>
1599   </table>   1623   </table>
1600   <input typ e="hidden"  name="act ion" value ="show_par t" />   1624   <input typ e="hidden"  name="act ion" value ="show_par t" />
1601   <input typ e="hidden"  name="eve nt_id" val ue="<?= $e vent_id ?> " />   1625   <input typ e="hidden"  name="eve nt_id" val ue="<?= $e vent_id ?> " />
1602   </form>   1626   </form>
1603     1627  
1604   <br />   1628   <br />
1605     1629  
1606   <div style ="align: c enter;">   1630   <div style ="align: c enter;">
1607           <f orm id="up perNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">   1631           <f orm id="up perNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">
1608                    <inp ut type="h idden" nam e="action"  value="sh ow_part" / >   1632                    <inp ut type="h idden" nam e="action"  value="sh ow_part" / >
1609                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />   1633                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />
1610                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ part_p_per _page, $pa rt_profile s_total) ? ></b>&nbsp ;|&nbsp;To tal:&nbsp; <b><?= $pa rt_profile s_total ?> </b>&nbsp; |&nbsp;Res ults per p age:&nbsp;   1634                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ part_p_per _page, $pa rt_profile s_total) ? ></b>&nbsp ;|&nbsp;To tal:&nbsp; <b><?= $pa rt_profile s_total ?> </b>&nbsp; |&nbsp;Res ults per p age:&nbsp;
1611                    <sel ect name=" part_p_per _page" cla ss="no" on change="ja vascript:  document.f orms['uppe rNavigatio nForm'].su bmit();" s tyle="vert ical-align : middle;" >   1635                    <sel ect name=" part_p_per _page" cla ss="no" on change="ja vascript:  document.f orms['uppe rNavigatio nForm'].su bmit();" s tyle="vert ical-align : middle;" >
1612   <?   1636   <?
1613           fo reach ( $p art_per_pa ge_array a s $per_pag e_elem )   1637           fo reach ( $p art_per_pa ge_array a s $per_pag e_elem )
1614           {   1638           {
1615                    echo  "   1639                    echo  "
1616                             <optio n value=\" {$per_page _elem}\" " . ($part_p _per_page  == $per_pa ge_elem ?  'selected= "selected" ' : '') ." >{$per_pag e_elem}</o ption>";   1640                             <optio n value=\" {$per_page _elem}\" " . ($part_p _per_page  == $per_pa ge_elem ?  'selected= "selected" ' : '') ." >{$per_pag e_elem}</o ption>";
1617           }   1641           }
1618   ?>   1642   ?>
1619                    </se lect>   1643                    </se lect>
1620                    <br  />   1644                    <br  />
1621                    Page s:&nbsp;   1645                    Page s:&nbsp;
1622   <?   1646   <?
1623           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )   1647           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )
1624           {   1648           {
1625                    if (  $i == $pa rt_page )   1649                    if (  $i == $pa rt_page )
1626                             echo " [{$i}]&nbs p;";   1650                             echo " [{$i}]&nbs p;";
1627                    else   1651                    else
1628                             echo " <a href=\" {$part_get _url}&amp; part_page= {$i}\">{$i }</a>&nbsp ;";   1652                             echo " <a href=\" {$part_get _url}&amp; part_page= {$i}\">{$i }</a>&nbsp ;";
1629           }   1653           }
1630   ?>   1654   ?>
1631           </ form>   1655           </ form>
1632   </div>   1656   </div>
1633     1657  
1634   <br />   1658   <br />
1635     1659  
1636   <form id=" profilesFo rm" action ="<?= $_SE RVER['PHP_ SELF'] ?>? action=sho w_part&amp ;event_id= <?= $event _id ?>" me thod="post " style="m argin: 0px ;">   1660   <form id=" profilesFo rm" action ="<?= $_SE RVER['PHP_ SELF'] ?>? action=sho w_part&amp ;event_id= <?= $event _id ?>" me thod="post " style="m argin: 0px ;">
1637   <table cel lpadding=" 2" cellspa cing="1" b order="0"  width="540 " bgcolor= "#EEEEEE"  class="sma ll">   1661   <table cel lpadding=" 2" cellspa cing="1" b order="0"  width="540 " bgcolor= "#EEEEEE"  class="sma ll">
1638   <?   1662   <?
1639           if  ( $part_p rofiles_to tal == 0 )   1663           if  ( $part_p rofiles_to tal == 0 )
1640           {   1664           {
1641   ?>   1665   ?>
1642           <t r>   1666           <t r>
1643                    <td  align="cen ter" class ="panel">N o particip ants for t his event< /td>   1667                    <td  align="cen ter" class ="panel">N o particip ants for t his event< /td>
1644           </ tr>   1668           </ tr>
1645   <?   1669   <?
1646           }   1670           }
1647           el se   1671           el se
1648           {   1672           {
1649   ?>   1673   ?>
1650           <t r class="p anel">   1674           <t r class="p anel">
1651                    <td  align="cen ter">&nbsp ;</td>   1675                    <td  align="cen ter">&nbsp ;</td>
1652                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=Profil es.ID<?= $ part_sortb y == 'Prof iles.ID' ?  ($part_so rtorder ==  'ASC' ? ' &amp;sorto rder=DESC'  : '&amp;s ortorder=A SC') : ''  ?>">ID</a> </td>   1676                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=Profil es.ID<?= $ part_sortb y == 'Prof iles.ID' ?  ($part_so rtorder ==  'ASC' ? ' &amp;sorto rder=DESC'  : '&amp;s ortorder=A SC') : ''  ?>">ID</a> </td>
1653                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=NickNa me<?= $par t_sortby = = 'NickNam e' ? ($par t_sortorde r == 'ASC'  ? '&amp;s ortorder=D ESC' : '&a mp;sortord er=ASC') :  '' ?>">Ni ckname</a> </td>   1677                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=NickNa me<?= $par t_sortby = = 'NickNam e' ? ($par t_sortorde r == 'ASC'  ? '&amp;s ortorder=D ESC' : '&a mp;sortord er=ASC') :  '' ?>">Ni ckname</a> </td>
1654                    <td  align="cen ter"><a hr ef="<?= $p art_get_ur l ?>&amp;s ortby=Sex< ?= $part_s ortby == ' Sex' ? ($p art_sortor der == 'AS C' ? '&amp ;sortorder =DESC' : ' &amp;sorto rder=ASC')  : '' ?>"> Sex</a></t d>   1678                    <td  align="cen ter"><a hr ef="<?= $p art_get_ur l ?>&amp;s ortby=Sex< ?= $part_s ortby == ' Sex' ? ($p art_sortor der == 'AS C' ? '&amp ;sortorder =DESC' : ' &amp;sorto rder=ASC')  : '' ?>"> Sex</a></t d>
1655                    <td  align="lef t">E-Mail< /td>   1679                    <td  align="lef t">E-Mail< /td>
1656                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=SDatin gParticipa nts.Partic ipantUID<? = $part_so rtby == 'S DatingPart icipants.P articipant UID' ? ($p art_sortor der == 'AS C' ? '&amp ;sortorder =DESC' : ' &amp;sorto rder=ASC')  : '' ?>"> UID</a></t d>   1680                    <td  align="lef t"><a href ="<?= $par t_get_url  ?>&amp;sor tby=SDatin gParticipa nts.Partic ipantUID<? = $part_so rtby == 'S DatingPart icipants.P articipant UID' ? ($p art_sortor der == 'AS C' ? '&amp ;sortorder =DESC' : ' &amp;sorto rder=ASC')  : '' ?>"> UID</a></t d>
1657           </ tr>   1681           </ tr>
1658   <?   1682   <?
1659                    whil e ( $part_ profiles_a rr = mysql _fetch_ass oc($part_p rofiles_re s) )   1683                    whil e ( $part_ profiles_a rr = mysql _fetch_ass oc($part_p rofiles_re s) )
1660                    {   1684                    {
1661                             switch  ( $part_p rofiles_ar r['Status' ] )   1685                             switch  ( $part_p rofiles_ar r['Status' ] )
1662                             {   1686                             {
1663                                      case 'Un confirmed' :   1687                                      case 'Un confirmed' :
1664                                      case 'Ap proval':   1688                                      case 'Ap proval':
1665                                      case 'Re jected':   1689                                      case 'Re jected':
1666                                      case 'Su spended':   1690                                      case 'Su spended':
1667                                               $row_class  = "prof_s tat_{$part _profiles_ arr['Statu s']}";   1691                                               $row_class  = "prof_s tat_{$part _profiles_ arr['Statu s']}";
1668                                               break;   1692                                               break;
1669                                      case 'Ac tive':   1693                                      case 'Ac tive':
1670                                      default:   1694                                      default:
1671                                               $row_class  = 'table' ;   1695                                               $row_class  = 'table' ;
1672                             }   1696                             }
1673   ?>   1697   ?>
1674           <t r class="< ?= $row_cl ass ?>" bg color="#FF FFFF">   1698           <t r class="< ?= $row_cl ass ?>" bg color="#FF FFFF">
1675                    <td  align="cen ter" width ="20"><inp ut type="c heckbox" n ame="<?= $ part_profi les_arr['P artID'] ?> " onclick= "UpdateSub mit('profi lesForm'); " /></td>   1699                    <td  align="cen ter" width ="20"><inp ut type="c heckbox" n ame="<?= $ part_profi les_arr['P artID'] ?> " onclick= "UpdateSub mit('profi lesForm'); " /></td>
1676                    <td  align="lef t" width=" 30"><a hre f="<?= $si te['url']  ?>profile. php?ID=<?=  $part_pro files_arr[ 'ID'] ?>"> <?= $part_ profiles_a rr['ID'] ? ></a></td>   1700                    <td  align="lef t" width=" 30"><a hre f="<?= $si te['url']  ?>profile. php?ID=<?=  $part_pro files_arr[ 'ID'] ?>"> <?= $part_ profiles_a rr['ID'] ? ></a></td>
1677                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['Nic kName']) ? ></td>   1701                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['Nic kName']) ? ></td>
1678                    <td  align="cen ter" width ="20"><?=  _t('_a_'.$ part_profi les_arr['S ex']) ?></ td>   1702                    <td  align="cen ter" width ="20"><?=  _t('_a_'.$ part_profi les_arr['S ex']) ?></ td>
1679                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['Ema il']) ?></ td>   1703                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['Ema il']) ?></ td>
1680                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['UID ']) ?></td >   1704                    <td  align="lef t"><?= pro cess_line_ output($pa rt_profile s_arr['UID ']) ?></td >
1681           </ tr>   1705           </ tr>
1682   <?   1706   <?
1683                    }   1707                    }
1684           }   1708           }
1685   ?>   1709   ?>
1686   </table>   1710   </table>
1687     1711  
1688   <table cel lpadding=" 4" cellspa cing="0" c lass="text " border=" 0">   1712   <table cel lpadding=" 4" cellspa cing="0" c lass="text " border=" 0">
1689           <t r>   1713           <t r>
1690                    <td>   1714                    <td>
1691                             <a hre f="javascr ipt:void(n ull);" onc lick="java script: se tCheckboxe s( 'profil esForm', t rue ); ret urn false; ">Check al l</a>&nbsp ;/&nbsp;<a  href="jav ascript:vo id(null);"  onclick=" javascript : setCheck boxes( 'pr ofilesForm ', false ) ; return f alse;">Unc heck all</ a>   1715                             <a hre f="javascr ipt:void(n ull);" onc lick="java script: se tCheckboxe s( 'profil esForm', t rue ); ret urn false; ">Check al l</a>&nbsp ;/&nbsp;<a  href="jav ascript:vo id(null);"  onclick=" javascript : setCheck boxes( 'pr ofilesForm ', false ) ; return f alse;">Unc heck all</ a>
1692                    </td >   1716                    </td >
1693                    <td> With selec ted:</td>   1717                    <td> With selec ted:</td>
1694                    <td>   1718                    <td>
1695                             <input  type="sub mit" class ="no" name ="particip ant_cancel " value="R emove from  event" st yle="width : 150px;"  />   1719                             <input  type="sub mit" class ="no" name ="particip ant_cancel " value="R emove from  event" st yle="width : 150px;"  />
1696                    </td >   1720                    </td >
1697           </ tr>   1721           </ tr>
1698           <t r>   1722           <t r>
1699                    <td  align="cen ter" colsp an="3"><te xtarea nam e="message " class="n o" rows="7 " cols="50 "></textar ea></td>   1723                    <td  align="cen ter" colsp an="3"><te xtarea nam e="message " class="n o" rows="7 " cols="50 "></textar ea></td>
1700           </ tr>   1724           </ tr>
1701           <t r>   1725           <t r>
1702                    <td  align="cen ter" colsp an="3">   1726                    <td  align="cen ter" colsp an="3">
1703                             <input  type="sub mit" class ="no" name ="send_mes sage" valu e="Send me ssage" />   1727                             <input  type="sub mit" class ="no" name ="send_mes sage" valu e="Send me ssage" />
1704                    </td >   1728                    </td >
1705           </ tr>   1729           </ tr>
1706   </table>   1730   </table>
1707   <?   1731   <?
1708           if  ( isset($ _REQUEST[' part_page' ]) )   1732           if  ( isset($ _REQUEST[' part_page' ]) )
1709                    echo  "   1733                    echo  "
1710   <input typ e=\"hidden \" name=\" part_page\ " value=\" {$_REQUEST ['part_pag e']}\" />" ;   1734   <input typ e=\"hidden \" name=\" part_page\ " value=\" {$_REQUEST ['part_pag e']}\" />" ;
1711           if  ( isset($ _REQUEST[' part_p_per _page']) )   1735           if  ( isset($ _REQUEST[' part_p_per _page']) )
1712                    echo  "   1736                    echo  "
1713   <input typ e=\"hidden \" name=\" part_p_per _page\" va lue=\"{$_R EQUEST['pa rt_p_per_p age']}\" / >";   1737   <input typ e=\"hidden \" name=\" part_p_per _page\" va lue=\"{$_R EQUEST['pa rt_p_per_p age']}\" / >";
1714   ?>   1738   ?>
1715   </form>   1739   </form>
1716     1740  
1717   <div style ="align: c enter;">   1741   <div style ="align: c enter;">
1718           <f orm id="lo werNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">   1742           <f orm id="lo werNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">
1719                    <inp ut type="h idden" nam e="action"  value="sh ow_part" / >   1743                    <inp ut type="h idden" nam e="action"  value="sh ow_part" / >
1720                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />   1744                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />
1721                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ part_p_per _page, $pa rt_profile s_total) ? ></b>&nbsp ;|&nbsp;To tal:&nbsp; <b><?= $pa rt_profile s_total ?> </b>&nbsp; |&nbsp;Res ults per p age:&nbsp;   1745                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ part_p_per _page, $pa rt_profile s_total) ? ></b>&nbsp ;|&nbsp;To tal:&nbsp; <b><?= $pa rt_profile s_total ?> </b>&nbsp; |&nbsp;Res ults per p age:&nbsp;
1722                    <sel ect name=" part_p_per _page" cla ss="no" on change="ja vascript:  document.f orms['lowe rNavigatio nForm'].su bmit();" s tyle="vert ical-align : middle;" >   1746                    <sel ect name=" part_p_per _page" cla ss="no" on change="ja vascript:  document.f orms['lowe rNavigatio nForm'].su bmit();" s tyle="vert ical-align : middle;" >
1723   <?   1747   <?
1724           fo reach ( $p art_per_pa ge_array a s $per_pag e_elem )   1748           fo reach ( $p art_per_pa ge_array a s $per_pag e_elem )
1725           {   1749           {
1726                    echo  "   1750                    echo  "
1727                             <optio n value=\" {$per_page _elem}\" " . ($part_p _per_page  == $per_pa ge_elem ?  'selected= "selected" ' : '') ." >{$per_pag e_elem}</o ption>";   1751                             <optio n value=\" {$per_page _elem}\" " . ($part_p _per_page  == $per_pa ge_elem ?  'selected= "selected" ' : '') ." >{$per_pag e_elem}</o ption>";
1728           }   1752           }
1729   ?>   1753   ?>
1730                    </se lect>   1754                    </se lect>
1731                    <br  />   1755                    <br  />
1732                    Page s:&nbsp;   1756                    Page s:&nbsp;
1733   <?   1757   <?
1734           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )   1758           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )
1735           {   1759           {
1736                    if (  $i == $pa rt_page )   1760                    if (  $i == $pa rt_page )
1737                             echo " [{$i}]&nbs p;";   1761                             echo " [{$i}]&nbs p;";
1738                    else   1762                    else
1739                             echo " <a href=\" {$part_get _url}&amp; part_page= {$i}\">{$i }</a>&nbsp ;";   1763                             echo " <a href=\" {$part_get _url}&amp; part_page= {$i}\">{$i }</a>&nbsp ;";
1740           }   1764           }
1741   ?>   1765   ?>
1742           </ form>   1766           </ form>
1743   </div>   1767   </div>
1744     1768  
1745   </center>   1769   </center>
1746     1770  
1747                             </div>   1771                             </div>
1748                    </di v>   1772                    </di v>
1749                    <div  class="bl ock_foot"> </div>   1773                    <div  class="bl ock_foot"> </div>
1750   <?   1774   <?
1751   }   1775   }
1752     1776  
1753   /**   1777   /**
1754    * Shows d iv with ev ent match  informatio n, pages n avigation,  controls  for matchm aking emai l   1778    * Shows d iv with ev ent match  informatio n, pages n avigation,  controls  for matchm aking emai l
1755    * sending   1779    * sending
1756    */   1780    */
1757   if ( $_REQ UEST['acti on'] == 's how_match'  && $event _id )   1781   if ( $_REQ UEST['acti on'] == 's how_match'  && $event _id )
1758   {   1782   {
1759   ?>   1783   ?>
1760                    <div  class="bl ock_head"> Event matc hes</div>   1784                    <div  class="bl ock_head"> Event matc hes</div>
1761                    <div  class="bl ock_outer" >   1785                    <div  class="bl ock_outer" >
1762                             <div c lass="bloc k_inner">   1786                             <div c lass="bloc k_inner">
1763     1787  
1764   <?   1788   <?
1765   if ( strle n($show_ma tch['error _text']) )   1789   if ( strle n($show_ma tch['error _text']) )
1766           ec ho "   1790           ec ho "
1767   <center>   1791   <center>
1768           <d iv class=\ "err\">{$s how_match[ 'error_tex t']}</div>   1792           <d iv class=\ "err\">{$s how_match[ 'error_tex t']}</div>
1769   </center>   1793   </center>
1770   <br />";   1794   <br />";
1771   ?>   1795   ?>
1772     1796  
1773   <center>   1797   <center>
1774     1798  
1775   <div class ="SDInfoBo x">   1799   <div class ="SDInfoBo x">
1776           To tal matche s: <?= $ma tch_count_ total ?>   1800           To tal matche s: <?= $ma tch_count_ total ?>
1777   </div>   1801   </div>
1778   <br />   1802   <br />
1779   <form id=" sendMatchE mailsForm"  action="< ?= $_SERVE R['PHP_SEL F'] ?>?act ion=show_m atch&amp;e vent_id=<? = $event_i d ?>" meth od="post"  style="mar gin: 0px;" >   1803   <form id=" sendMatchE mailsForm"  action="< ?= $_SERVE R['PHP_SEL F'] ?>?act ion=show_m atch&amp;e vent_id=<? = $event_i d ?>" meth od="post"  style="mar gin: 0px;" >
1780           <i nput type= "hidden" n ame="send_ match_emai ls" value= "on" />   1804           <i nput type= "hidden" n ame="send_ match_emai ls" value= "on" />
1781   <?   1805   <?
1782           if  ( isset($ _REQUEST[' match_page ']) )   1806           if  ( isset($ _REQUEST[' match_page ']) )
1783                    echo  "   1807                    echo  "
1784           <i nput type= \"hidden\"  name=\"ma tch_page\"  value=\"{ $_REQUEST[ 'match_pag e']}\" />" ;   1808           <i nput type= \"hidden\"  name=\"ma tch_page\"  value=\"{ $_REQUEST[ 'match_pag e']}\" />" ;
1785           if  ( isset($ _REQUEST[' match_p_pe r_page'])  )   1809           if  ( isset($ _REQUEST[' match_p_pe r_page'])  )
1786                    echo  "   1810                    echo  "
1787           <i nput type= \"hidden\"  name=\"ma tch_p_per_ page\" val ue=\"{$_RE QUEST['mat ch_p_per_p age']}\" / >";   1811           <i nput type= \"hidden\"  name=\"ma tch_p_per_ page\" val ue=\"{$_RE QUEST['mat ch_p_per_p age']}\" / >";
1788   ?>   1812   ?>
1789           <i nput type= "submit" c lass="no"  value="Sen d matchmak ing emails " style="w idth: 200p x" />   1813           <i nput type= "submit" c lass="no"  value="Sen d matchmak ing emails " style="w idth: 200p x" />
1790   </form>   1814   </form>
1791     1815  
1792   <br />   1816   <br />
1793     1817  
1794   <div style ="align: c enter;">   1818   <div style ="align: c enter;">
1795           <f orm id="up perNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">   1819           <f orm id="up perNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">
1796                    <inp ut type="h idden" nam e="action"  value="sh ow_match"  />   1820                    <inp ut type="h idden" nam e="action"  value="sh ow_match"  />
1797                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />   1821                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />
1798                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ match_p_pe r_page, $m atch_profi les_total)  ?></b>&nb sp;|&nbsp; Total:&nbs p;<b><?= $ match_prof iles_total  ?></b>&nb sp;|&nbsp; Results pe r page:&nb sp;   1822                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ match_p_pe r_page, $m atch_profi les_total)  ?></b>&nb sp;|&nbsp; Total:&nbs p;<b><?= $ match_prof iles_total  ?></b>&nb sp;|&nbsp; Results pe r page:&nb sp;
1799                    <sel ect name=" match_p_pe r_page" cl ass="no" o nchange="j avascript:  document. forms['upp erNavigati onForm'].s ubmit();"  style="ver tical-alig n: middle; ">   1823                    <sel ect name=" match_p_pe r_page" cl ass="no" o nchange="j avascript:  document. forms['upp erNavigati onForm'].s ubmit();"  style="ver tical-alig n: middle; ">
1800   <?   1824   <?
1801           fo reach ( $m atch_per_p age_array  as $per_pa ge_elem )   1825           fo reach ( $m atch_per_p age_array  as $per_pa ge_elem )
1802           {   1826           {
1803                    echo  "   1827                    echo  "
1804                             <optio n value=\" {$per_page _elem}\" " . ($match_ p_per_page  == $per_p age_elem ?  'selected ="selected "' : '') . ">{$per_pa ge_elem}</ option>";   1828                             <optio n value=\" {$per_page _elem}\" " . ($match_ p_per_page  == $per_p age_elem ?  'selected ="selected "' : '') . ">{$per_pa ge_elem}</ option>";
1805           }   1829           }
1806   ?>   1830   ?>
1807                    </se lect>   1831                    </se lect>
1808                    <br  />   1832                    <br  />
1809                    Page s:&nbsp;   1833                    Page s:&nbsp;
1810   <?   1834   <?
1811           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )   1835           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )
1812           {   1836           {
1813                    if (  $i == $ma tch_page )   1837                    if (  $i == $ma tch_page )
1814                             echo " [{$i}]&nbs p;";   1838                             echo " [{$i}]&nbs p;";
1815                    else   1839                    else
1816                             echo " <a href=\" {$match_ge t_url}&mat ch_page={$ i}\">{$i}< /a>&nbsp;" ;   1840                             echo " <a href=\" {$match_ge t_url}&mat ch_page={$ i}\">{$i}< /a>&nbsp;" ;
1817           }   1841           }
1818   ?>   1842   ?>
1819           </ form>   1843           </ form>
1820   </div>   1844   </div>
1821     1845  
1822   <br />   1846   <br />
1823     1847  
1824   <script ty pe="text/j avascript"  language= "JavaScrip t">   1848   <script ty pe="text/j avascript"  language= "JavaScrip t">
1825   <!--   1849   <!--
1826           fu nction mak eShowHideS witch( sho wFlag, sho wLabel, hi deLabel, s witchDiv )   1850           fu nction mak eShowHideS witch( sho wFlag, sho wLabel, hi deLabel, s witchDiv )
1827           {   1851           {
1828                    if (  showFlag  )   1852                    if (  showFlag  )
1829                    {   1853                    {
1830                             if ( s howLabel )   1854                             if ( s howLabel )
1831                                      showLabe l.style.di splay = 'n one';   1855                                      showLabe l.style.di splay = 'n one';
1832                             if ( h ideLabel )   1856                             if ( h ideLabel )
1833                                      hideLabe l.style.di splay = 'i nline';   1857                                      hideLabe l.style.di splay = 'i nline';
1834                             if ( s witchDiv )   1858                             if ( s witchDiv )
1835                                      switchDi v.style.di splay = 'b lock';   1859                                      switchDi v.style.di splay = 'b lock';
1836                    }   1860                    }
1837                    else   1861                    else
1838                    {   1862                    {
1839                             if ( s howLabel )   1863                             if ( s howLabel )
1840                                      showLabe l.style.di splay = 'i nline';   1864                                      showLabe l.style.di splay = 'i nline';
1841                             if ( h ideLabel )   1865                             if ( h ideLabel )
1842                                      hideLabe l.style.di splay = 'n one';   1866                                      hideLabe l.style.di splay = 'n one';
1843                             if ( s witchDiv )   1867                             if ( s witchDiv )
1844                                      switchDi v.style.di splay = 'n one';   1868                                      switchDi v.style.di splay = 'n one';
1845                    }   1869                    }
1846           }   1870           }
1847   -->   1871   -->
1848   </script>   1872   </script>
1849     1873  
1850   <table cel lpadding=" 2" cellspa cing="1" b order="0"  width="540 " class="t ext">   1874   <table cel lpadding=" 2" cellspa cing="1" b order="0"  width="540 " class="t ext">
1851   <?   1875   <?
1852           wh ile ( $mat ch_profile s_arr = my sql_fetch_ assoc($mat ch_profile s_res) )   1876           wh ile ( $mat ch_profile s_arr = my sql_fetch_ assoc($mat ch_profile s_res) )
1853           {   1877           {
1854                    $cho sen_res =  db_res( "S ELECT `Pro files`.`Ni ckName`, ` SDatingPar ticipants` .`Particip antUID` AS  `UID`, `S DatingPart icipants`. `ID` AS `P artID`,  ( `MatchTabl e2`.`IDCho oser` IS N OT NULL) A S `ChooseM atches` FR OM `SDatin gMatches`  AS `MatchT able1`   1878                    $cho sen_res =  db_res( "S ELECT `Pro files`.`Ni ckName`, ` SDatingPar ticipants` .`Particip antUID` AS  `UID`, `S DatingPart icipants`. `ID` AS `P artID`,  ( `MatchTabl e2`.`IDCho oser` IS N OT NULL) A S `ChooseM atches` FR OM `SDatin gMatches`  AS `MatchT able1`
1855                                                                         LEFT J OIN `SDati ngMatches`  AS `Match Table2` ON  `MatchTab le2`.`IDCh ooser` = ` MatchTable 1`.`IDChos en` AND `M atchTable2 `.`IDChose n` = `Matc hTable1`.` IDChooser`   1879                                                                         LEFT J OIN `SDati ngMatches`  AS `Match Table2` ON  `MatchTab le2`.`IDCh ooser` = ` MatchTable 1`.`IDChos en` AND `M atchTable2 `.`IDChose n` = `Matc hTable1`.` IDChooser`
1856                                                                         LEFT J OIN `SDati ngParticip ants` ON ` SDatingPar ticipants` .`ID` = `M atchTable1 `.`IDChose n`   1880                                                                         LEFT J OIN `SDati ngParticip ants` ON ` SDatingPar ticipants` .`ID` = `M atchTable1 `.`IDChose n`
1857                                                                         LEFT J OIN `Profi les` ON `P rofiles`.` ID` = `SDa tingPartic ipants`.`I DMember`   1881                                                                         LEFT J OIN `Profi les` ON `P rofiles`.` ID` = `SDa tingPartic ipants`.`I DMember`
1858                                                                         WHERE  `MatchTabl e1`.`IDCho oser` = {$ match_prof iles_arr[' PartID']}"  );   1882                                                                         WHERE  `MatchTabl e1`.`IDCho oser` = {$ match_prof iles_arr[' PartID']}"  );
1859                    $cho sen_num =  mysql_num_ rows($chos en_res);   1883                    $cho sen_num =  mysql_num_ rows($chos en_res);
1860   ?>   1884   ?>
1861           <t r>   1885           <t r>
1862                    <td  class="tab le" align= "left" bgc olor="#FFF FFF">   1886                    <td  class="tab le" align= "left" bgc olor="#FFF FFF">
1863                             <table  cellspaci ng="0" cel lpadding=" 4" border= "0" width= "100%" cla ss="text">   1887                             <table  cellspaci ng="0" cel lpadding=" 4" border= "0" width= "100%" cla ss="text">
1864                                      <tr clas s="SDMatch MemberHead Row">   1888                                      <tr clas s="SDMatch MemberHead Row">
1865                                               <td align= "left" val ign="middl e"><b><?=  $match_pro files_arr[ 'UID'] ?>  (Nickname:  <?= $matc h_profiles _arr['Nick Name'] ?>) </b></td>   1889                                               <td align= "left" val ign="middl e"><b><?=  $match_pro files_arr[ 'UID'] ?>  (Nickname:  <?= $matc h_profiles _arr['Nick Name'] ?>) </b></td>
1866                                               <td align= "right" wi dth="150"  valign="mi ddle">   1890                                               <td align= "right" wi dth="150"  valign="mi ddle">
1867   <?   1891   <?
1868                    if (  $chosen_n um > 0 )   1892                    if (  $chosen_n um > 0 )
1869                    {   1893                    {
1870   ?>   1894   ?>
1871                                                       <a  href="jav ascript:vo id(null);"  id="show< ?= $match_ profiles_a rr['PartID '] ?>_labe l_id" onCl ick="javas cript: mak eShowHideS witch( tru e, this, d ocument.ge tElementBy Id('hide<? = $match_p rofiles_ar r['PartID' ] ?>_label _id'), doc ument.getE lementById ('match<?=  $match_pr ofiles_arr ['PartID']  ?>_box_id ') );" sty le="displa y: inline; ">Show cho sen member s</a>   1895                                                       <a  href="jav ascript:vo id(null);"  id="show< ?= $match_ profiles_a rr['PartID '] ?>_labe l_id" onCl ick="javas cript: mak eShowHideS witch( tru e, this, d ocument.ge tElementBy Id('hide<? = $match_p rofiles_ar r['PartID' ] ?>_label _id'), doc ument.getE lementById ('match<?=  $match_pr ofiles_arr ['PartID']  ?>_box_id ') );" sty le="displa y: inline; ">Show cho sen member s</a>
1872                                                       <a  href="jav ascript:vo id(null);"  id="hide< ?= $match_ profiles_a rr['PartID '] ?>_labe l_id" onCl ick="javas cript: mak eShowHideS witch( fal se, docume nt.getElem entById('s how<?= $ma tch_profil es_arr['Pa rtID'] ?>_ label_id') , this, do cument.get ElementByI d('match<? = $match_p rofiles_ar r['PartID' ] ?>_box_i d') );" st yle="displ ay: none;" >Hide chos en members </a>   1896                                                       <a  href="jav ascript:vo id(null);"  id="hide< ?= $match_ profiles_a rr['PartID '] ?>_labe l_id" onCl ick="javas cript: mak eShowHideS witch( fal se, docume nt.getElem entById('s how<?= $ma tch_profil es_arr['Pa rtID'] ?>_ label_id') , this, do cument.get ElementByI d('match<? = $match_p rofiles_ar r['PartID' ] ?>_box_i d') );" st yle="displ ay: none;" >Hide chos en members </a>
1873   <?   1897   <?
1874                    }   1898                    }
1875   ?>   1899   ?>
1876                                               </td>   1900                                               </td>
1877                                      </tr>   1901                                      </tr>
1878                             </tabl e>   1902                             </tabl e>
1879                             <div i d="match<? = $match_p rofiles_ar r['PartID' ] ?>_box_i d" class=" SDMatchBox " style="d isplay: no ne;">   1903                             <div i d="match<? = $match_p rofiles_ar r['PartID' ] ?>_box_i d" class=" SDMatchBox " style="d isplay: no ne;">
1880                                      <form id ="match<?=  $match_pr ofiles_arr ['PartID']  ?>Form" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>?actio n=show_mat ch&amp;eve nt_id=<?=  $event_id  ?>" method ="post" st yle="margi n: 0px;">   1904                                      <form id ="match<?=  $match_pr ofiles_arr ['PartID']  ?>Form" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>?actio n=show_mat ch&amp;eve nt_id=<?=  $event_id  ?>" method ="post" st yle="margi n: 0px;">
1881                                      <table c ellpadding ="0" cells pacing="0"  border="0 " width="1 00%">   1905                                      <table c ellpadding ="0" cells pacing="0"  border="0 " width="1 00%">
1882   <?   1906   <?
1883                    if (  $chosen_n um > 0 )   1907                    if (  $chosen_n um > 0 )
1884                    {   1908                    {
1885                             while  ( $chosen_ arr = mysq l_fetch_as soc($chose n_res) )   1909                             while  ( $chosen_ arr = mysq l_fetch_as soc($chose n_res) )
1886                             {   1910                             {
1887   ?>   1911   ?>
1888                                               <tr class= "<?= $chos en_arr['Ch ooseMatche s'] ? 'SDM atchMember MatchRow'  : 'SDMatch MemberNotM atchRow' ? >">   1912                                               <tr class= "<?= $chos en_arr['Ch ooseMatche s'] ? 'SDM atchMember MatchRow'  : 'SDMatch MemberNotM atchRow' ? >">
1889                                                       <t d align="c enter" wid th="20" va lign="midd le"><input  type="che ckbox" nam e="<?= $ch osen_arr[' PartID'] ? >" id="cho ose_<?= $m atch_profi les_arr['P artID'] ?> _<?= $chos en_arr['Pa rtID'] ?>_ id" /></td >   1913                                                       <t d align="c enter" wid th="20" va lign="midd le"><input  type="che ckbox" nam e="<?= $ch osen_arr[' PartID'] ? >" id="cho ose_<?= $m atch_profi les_arr['P artID'] ?> _<?= $chos en_arr['Pa rtID'] ?>_ id" /></td >
1890                                                       <t d align="l eft" valig n="middle" ><label fo r="choose_ <?= $match _profiles_ arr['PartI D'] ?>_<?=  $chosen_a rr['PartID '] ?>_id"> <?= $chose n_arr['UID '] ?> (Nic kname: <?=  $chosen_a rr['NickNa me'] ?>)</ label></td >   1914                                                       <t d align="l eft" valig n="middle" ><label fo r="choose_ <?= $match _profiles_ arr['PartI D'] ?>_<?=  $chosen_a rr['PartID '] ?>_id"> <?= $chose n_arr['UID '] ?> (Nic kname: <?=  $chosen_a rr['NickNa me'] ?>)</ label></td >
1891                                               </tr>   1915                                               </tr>
1892   <?   1916   <?
1893                             }   1917                             }
1894                    }   1918                    }
1895                    else   1919                    else
1896                    {   1920                    {
1897   ?>   1921   ?>
1898                                      <tr>   1922                                      <tr>
1899                                               <td>&nbsp; </td>   1923                                               <td>&nbsp; </td>
1900                                      </tr>   1924                                      </tr>
1901   <?   1925   <?
1902                    }   1926                    }
1903   ?>   1927   ?>
1904                                      </table>   1928                                      </table>
1905                                      <center>   1929                                      <center>
1906                                      <table c ellpadding ="0" cells pacing="0"  border="0 " class="t ext" style ="padding:  0px 4px;" >   1930                                      <table c ellpadding ="0" cells pacing="0"  border="0 " class="t ext" style ="padding:  0px 4px;" >
1907                                               <tr>   1931                                               <tr>
1908                                                       <t d>   1932                                                       <t d>
1909                                                                <a h ref="javas cript:void (null);" o nclick="ja vascript:  setCheckbo xes( 'matc h<?= $matc h_profiles _arr['Part ID'] ?>For m', true ) ; return f alse;">Che ck all</a> &nbsp;/&nb sp;<a href ="javascri pt:void(nu ll);" oncl ick="javas cript: set Checkboxes ( 'match<? = $match_p rofiles_ar r['PartID' ] ?>Form',  false );  return fal se;">Unche ck all</a>   1933                                                                <a h ref="javas cript:void (null);" o nclick="ja vascript:  setCheckbo xes( 'matc h<?= $matc h_profiles _arr['Part ID'] ?>For m', true ) ; return f alse;">Che ck all</a> &nbsp;/&nb sp;<a href ="javascri pt:void(nu ll);" oncl ick="javas cript: set Checkboxes ( 'match<? = $match_p rofiles_ar r['PartID' ] ?>Form',  false );  return fal se;">Unche ck all</a>
1910                                                       </ td>   1934                                                       </ td>
1911                                                       <t d>With sel ected:</td >   1935                                                       <t d>With sel ected:</td >
1912                                                       <t d>   1936                                                       <t d>
1913                                                                <inp ut type="s ubmit" cla ss="no" na me="choose _cancel" v alue="Remo ve from ch oose list"  style="wi dth: 180px ;" />   1937                                                                <inp ut type="s ubmit" cla ss="no" na me="choose _cancel" v alue="Remo ve from ch oose list"  style="wi dth: 180px ;" />
1914                                                       </ td>   1938                                                       </ td>
1915                                               </tr>   1939                                               </tr>
1916                                      </table>   1940                                      </table>
1917                                      </center >   1941                                      </center >
1918                                      <input t ype="hidde n" name="p art_id" va lue="<?= $ match_prof iles_arr[' PartID'] ? >" />   1942                                      <input t ype="hidde n" name="p art_id" va lue="<?= $ match_prof iles_arr[' PartID'] ? >" />
1919                                      </form>   1943                                      </form>
1920                             </div>   1944                             </div>
1921                    </td >   1945                    </td >
1922           </ tr>   1946           </ tr>
1923   <?   1947   <?
1924           }   1948           }
1925   ?>   1949   ?>
1926   </table>   1950   </table>
1927     1951  
1928   <br />   1952   <br />
1929     1953  
1930   <div style ="align: c enter;">   1954   <div style ="align: c enter;">
1931           <f orm id="lo werNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">   1955           <f orm id="lo werNavigat ionForm" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="get" s tyle="marg in: 0px;">
1932                    <inp ut type="h idden" nam e="action"  value="sh ow_match"  />   1956                    <inp ut type="h idden" nam e="action"  value="sh ow_match"  />
1933                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />   1957                    <inp ut type="h idden" nam e="event_i d" value=" <?= $event _id ?>" />
1934                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ match_p_pe r_page, $m atch_profi les_total)  ?></b>&nb sp;|&nbsp; Total:&nbs p;<b><?= $ match_prof iles_total  ?></b>&nb sp;|&nbsp; Results pe r page:&nb sp;   1958                    Resu lts:&nbsp; <b><?= ($l imit_first  + 1) ?></ b>-<b><?=  min($limit _first + $ match_p_pe r_page, $m atch_profi les_total)  ?></b>&nb sp;|&nbsp; Total:&nbs p;<b><?= $ match_prof iles_total  ?></b>&nb sp;|&nbsp; Results pe r page:&nb sp;
1935                    <sel ect name=" match_p_pe r_page" cl ass="no" o nchange="j avascript:  document. forms['low erNavigati onForm'].s ubmit();"  style="ver tical-alig n: middle; ">   1959                    <sel ect name=" match_p_pe r_page" cl ass="no" o nchange="j avascript:  document. forms['low erNavigati onForm'].s ubmit();"  style="ver tical-alig n: middle; ">
1936   <?   1960   <?
1937           fo reach ( $m atch_per_p age_array  as $per_pa ge_elem )   1961           fo reach ( $m atch_per_p age_array  as $per_pa ge_elem )
1938           {   1962           {
1939                    echo  "   1963                    echo  "
1940                             <optio n value=\" {$per_page _elem}\" " . ($match_ p_per_page  == $per_p age_elem ?  'selected ="selected "' : '') . ">{$per_pa ge_elem}</ option>";   1964                             <optio n value=\" {$per_page _elem}\" " . ($match_ p_per_page  == $per_p age_elem ?  'selected ="selected "' : '') . ">{$per_pa ge_elem}</ option>";
1941           }   1965           }
1942   ?>   1966   ?>
1943                    </se lect>   1967                    </se lect>
1944                    <br  />   1968                    <br  />
1945                    Page s:&nbsp;   1969                    Page s:&nbsp;
1946   <?   1970   <?
1947           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )   1971           fo r ( $i = 1 ; $i <= $p ages_num;  $i++ )
1948           {   1972           {
1949                    if (  $i == $ma tch_page )   1973                    if (  $i == $ma tch_page )
1950                             echo " [{$i}]&nbs p;";   1974                             echo " [{$i}]&nbs p;";
1951                    else   1975                    else
1952                             echo " <a href=\" {$match_ge t_url}&mat ch_page={$ i}\">{$i}< /a>&nbsp;" ;   1976                             echo " <a href=\" {$match_ge t_url}&mat ch_page={$ i}\">{$i}< /a>&nbsp;" ;
1953           }   1977           }
1954   ?>   1978   ?>
1955           </ form>   1979           </ form>
1956   </div>   1980   </div>
1957     1981  
1958   </center>   1982   </center>
1959     1983  
1960                             </div>   1984                             </div>
1961                    </di v>   1985                    </di v>
1962                    <div  class="bl ock_foot"> </div>   1986                    <div  class="bl ock_foot"> </div>
1963   <?   1987   <?
1964   }   1988   }
1965     1989  
1966   /**   1990   /**
1967    * Shows d iv with ev ent edit f orm   1991    * Shows d iv with ev ent edit f orm
1968    */   1992    */
1969   if ( $_REQ UEST['acti on'] == 's how_edit_f orm' )   1993   if ( $_REQ UEST['acti on'] == 's how_edit_f orm' )
1970   {   1994   {
1971   ?>   1995   ?>
1972                    <div  class="bl ock_head"> Edit Event </div>   1996                    <div  class="bl ock_head"> Edit Event </div>
1973                    <div  class="bl ock_outer" >   1997                    <div  class="bl ock_outer" >
1974                             <div c lass="bloc k_inner">   1998                             <div c lass="bloc k_inner">
1975     1999  
1976   <center>   2000   <center>
1977     2001  
1978   <?   2002   <?
1979           if  ( isset(  $_REQUEST[ 'event_id' ] ) )   2003           if  ( isset(  $_REQUEST[ 'event_id' ] ) )
1980           {   2004           {
1981                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];   2005                    $eve nt_id = (i nt)$_REQUE ST['event_ id'];
1982                    $eve nt_res = d b_res( "SE LECT `ID`,  `Title`,  `Descripti on`, `Stat us`, `Stat usMessage` , `Country `, `City`,  `Place`,  `PhotoFile name`, `Ev entStart`,  `EventEnd `, `Ticket SaleStart` , `TicketS aleEnd`, ` Responsibl eName`, `R esponsible Email`, `R esponsible Phone`, `E ventSexFil ter`, `Eve ntAgeLower Filter`, ` EventAgeUp perFilter` , `EventMe mbershipFi lter`, `Ti cketCountF emale`, `T icketCount Male`, `Ti cketPriceF emale`, `T icketPrice Male`, `Ch oosePeriod `, `AllowV iewPartici pants` FRO M `SDating Events` WH ERE `ID` =  $event_id " );   2006                    $eve nt_res = d b_res( "SE LECT `ID`,  `Title`,  `Descripti on`, `Stat us`, `Stat usMessage` , `Country `, `City`,  `Place`,  `PhotoFile name`, `Ev entStart`,  `EventEnd `, `Ticket SaleStart` , `TicketS aleEnd`, ` Responsibl eName`, `R esponsible Email`, `R esponsible Phone`, `E ventSexFil ter`, `Eve ntAgeLower Filter`, ` EventAgeUp perFilter` , `EventMe mbershipFi lter`, `Ti cketCountF emale`, `T icketCount Male`, `Ti cketPriceF emale`, `T icketPrice Male`, `Ch oosePeriod `, `AllowV iewPartici pants` FRO M `SDating Events` WH ERE `ID` =  $event_id " );
1983                    $eve nt_arr = m ysql_fetch _assoc( $e vent_res ) ;   2007                    $eve nt_arr = m ysql_fetch _assoc( $e vent_res ) ;
1984                    SDSh owEditForm ( false, $ event_arr  );   2008                    SDSh owEditForm ( false, $ event_arr  );
1985           }   2009           }
1986           el se   2010           el se
1987           {   2011           {
1988                    SDSh owEditForm ( true );   2012                    SDSh owEditForm ( true );
1989           }   2013           }
1990   ?>   2014   ?>
1991     2015  
1992   </center>   2016   </center>
1993     2017  
1994                             </div>   2018                             </div>
1995                    </di v>   2019                    </di v>
1996                    <div  class="bl ock_foot"> </div>   2020                    <div  class="bl ock_foot"> </div>
1997   <?   2021   <?
1998   }   2022   }
1999     2023  
2000   ?>   2024   ?>
2001   <!-- Loadi ng Calenda r JavaScri pt files - ->   2025   <!-- Loadi ng Calenda r JavaScri pt files - ->
2002       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/utils .js"></scr ipt>   2026       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/utils .js"></scr ipt>
2003       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar.js"></ script>   2027       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar.js"></ script>
2004       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar-setup. js"></scri pt>   2028       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar-setup. js"></scri pt>
2005     2029  
2006   <!-- Loadi ng languag e definiti on file -- >   2030   <!-- Loadi ng languag e definiti on file -- >
2007       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _lang/cale ndar-en.js "></script >   2031       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _lang/cale ndar-en.js "></script >
2008     2032  
2009   <script ty pe="text/j avascript" >   2033   <script ty pe="text/j avascript" >
2010   //<![CDATA [   2034   //<![CDATA [
2011         Zapa tec.Calend ar.setup({   2035         Zapa tec.Calend ar.setup({
2012           fi rstDay           : 1,   2036           fi rstDay           : 1,
2013           we ekNumbers        : tr ue,   2037           we ekNumbers        : tr ue,
2014           sh owOthers         : tr ue,   2038           sh owOthers         : tr ue,
2015           sh owsTime          : tr ue,   2039           sh owsTime          : tr ue,
2016           ti meFormat         : "2 4",   2040           ti meFormat         : "2 4",
2017           st ep               : 2,   2041           st ep               : 2,
2018           ra nge              : [1 900.01, 20 99.12],   2042           ra nge              : [1 900.01, 20 99.12],
2019           el ectric           : fa lse,   2043           el ectric           : fa lse,
2020           si ngleClick        : tr ue,   2044           si ngleClick        : tr ue,
2021           in putField         : "s how_events _between1_ id",   2045           in putField         : "s how_events _between1_ id",
2022           bu tton             : "s how_events _between1_ choose_id" ,   2046           bu tton             : "s how_events _between1_ choose_id" ,
2023           if Format           : "% Y-%m-%d %H :%M:%S",   2047           if Format           : "% Y-%m-%d %H :%M:%S",
2024           da Format           : "% Y/%m/%d",   2048           da Format           : "% Y/%m/%d",
2025           al ign              : "B r"   2049           al ign              : "B r"
2026         });   2050         });
2027         Zapa tec.Calend ar.setup({   2051         Zapa tec.Calend ar.setup({
2028           fi rstDay           : 1,   2052           fi rstDay           : 1,
2029           we ekNumbers        : tr ue,   2053           we ekNumbers        : tr ue,
2030           sh owOthers         : tr ue,   2054           sh owOthers         : tr ue,
2031           sh owsTime          : tr ue,   2055           sh owsTime          : tr ue,
2032           ti meFormat         : "2 4",   2056           ti meFormat         : "2 4",
2033           st ep               : 2,   2057           st ep               : 2,
2034           ra nge              : [1 900.01, 20 99.12],   2058           ra nge              : [1 900.01, 20 99.12],
2035           el ectric           : fa lse,   2059           el ectric           : fa lse,
2036           si ngleClick        : tr ue,   2060           si ngleClick        : tr ue,
2037           in putField         : "s how_events _between2_ id",   2061           in putField         : "s how_events _between2_ id",
2038           bu tton             : "s how_events _between2_ choose_id" ,   2062           bu tton             : "s how_events _between2_ choose_id" ,
2039           if Format           : "% Y-%m-%d %H :%M:%S",   2063           if Format           : "% Y-%m-%d %H :%M:%S",
2040           da Format           : "% Y/%m/%d",   2064           da Format           : "% Y/%m/%d",
2041           al ign              : "B r"   2065           al ign              : "B r"
2042         });   2066         });
2043   <?   2067   <?
2044     2068  
2045   if ( $_REQ UEST['acti on'] == 's how_edit_f orm' )   2069   if ( $_REQ UEST['acti on'] == 's how_edit_f orm' )
2046   {   2070   {
2047   ?>   2071   ?>
2048         Zapa tec.Calend ar.setup({   2072         Zapa tec.Calend ar.setup({
2049           fi rstDay           : 1,   2073           fi rstDay           : 1,
2050           we ekNumbers        : tr ue,   2074           we ekNumbers        : tr ue,
2051           sh owOthers         : tr ue,   2075           sh owOthers         : tr ue,
2052           sh owsTime          : tr ue,   2076           sh owsTime          : tr ue,
2053           ti meFormat         : "2 4",   2077           ti meFormat         : "2 4",
2054           st ep               : 2,   2078           st ep               : 2,
2055           ra nge              : [1 900.01, 20 99.12],   2079           ra nge              : [1 900.01, 20 99.12],
2056           el ectric           : fa lse,   2080           el ectric           : fa lse,
2057           si ngleClick        : tr ue,   2081           si ngleClick        : tr ue,
2058           in putField         : "e vent_start _id",   2082           in putField         : "e vent_start _id",
2059           bu tton             : "s tart_choos e_id",   2083           bu tton             : "s tart_choos e_id",
2060           if Format           : "% Y-%m-%d %H :%M:%S",   2084           if Format           : "% Y-%m-%d %H :%M:%S",
2061           da Format           : "% Y/%m/%d",   2085           da Format           : "% Y/%m/%d",
2062           al ign              : "B r"   2086           al ign              : "B r"
2063         });   2087         });
2064         Zapa tec.Calend ar.setup({   2088         Zapa tec.Calend ar.setup({
2065           fi rstDay           : 1,   2089           fi rstDay           : 1,
2066           we ekNumbers        : tr ue,   2090           we ekNumbers        : tr ue,
2067           sh owOthers         : tr ue,   2091           sh owOthers         : tr ue,
2068           sh owsTime          : tr ue,   2092           sh owsTime          : tr ue,
2069           ti meFormat         : "2 4",   2093           ti meFormat         : "2 4",
2070           st ep               : 2,   2094           st ep               : 2,
2071           ra nge              : [1 900.01, 20 99.12],   2095           ra nge              : [1 900.01, 20 99.12],
2072           el ectric           : fa lse,   2096           el ectric           : fa lse,
2073           si ngleClick        : tr ue,   2097           si ngleClick        : tr ue,
2074           in putField         : "e vent_end_i d",   2098           in putField         : "e vent_end_i d",
2075           bu tton             : "e nd_choose_ id",   2099           bu tton             : "e nd_choose_ id",
2076           if Format           : "% Y-%m-%d %H :%M:%S",   2100           if Format           : "% Y-%m-%d %H :%M:%S",
2077           da Format           : "% Y/%m/%d",   2101           da Format           : "% Y/%m/%d",
2078           al ign              : "B r"   2102           al ign              : "B r"
2079         });   2103         });
2080         Zapa tec.Calend ar.setup({   2104         Zapa tec.Calend ar.setup({
2081           fi rstDay           : 1,   2105           fi rstDay           : 1,
2082           we ekNumbers        : tr ue,   2106           we ekNumbers        : tr ue,
2083           sh owOthers         : tr ue,   2107           sh owOthers         : tr ue,
2084           sh owsTime          : tr ue,   2108           sh owsTime          : tr ue,
2085           ti meFormat         : "2 4",   2109           ti meFormat         : "2 4",
2086           st ep               : 2,   2110           st ep               : 2,
2087           ra nge              : [1 900.01, 20 99.12],   2111           ra nge              : [1 900.01, 20 99.12],
2088           el ectric           : fa lse,   2112           el ectric           : fa lse,
2089           si ngleClick        : tr ue,   2113           si ngleClick        : tr ue,
2090           in putField         : "e vent_sale_ start_id",   2114           in putField         : "e vent_sale_ start_id",
2091           bu tton             : "s ale_start_ choose_id" ,   2115           bu tton             : "s ale_start_ choose_id" ,
2092           if Format           : "% Y-%m-%d %H :%M:%S",   2116           if Format           : "% Y-%m-%d %H :%M:%S",
2093           da Format           : "% Y/%m/%d",   2117           da Format           : "% Y/%m/%d",
2094           al ign              : "B r"   2118           al ign              : "B r"
2095         });   2119         });
2096         Zapa tec.Calend ar.setup({   2120         Zapa tec.Calend ar.setup({
2097           fi rstDay           : 1,   2121           fi rstDay           : 1,
2098           we ekNumbers        : tr ue,   2122           we ekNumbers        : tr ue,
2099           sh owOthers         : tr ue,   2123           sh owOthers         : tr ue,
2100           sh owsTime          : tr ue,   2124           sh owsTime          : tr ue,
2101           ti meFormat         : "2 4",   2125           ti meFormat         : "2 4",
2102           st ep               : 2,   2126           st ep               : 2,
2103           ra nge              : [1 900.01, 20 99.12],   2127           ra nge              : [1 900.01, 20 99.12],
2104           el ectric           : fa lse,   2128           el ectric           : fa lse,
2105           si ngleClick        : tr ue,   2129           si ngleClick        : tr ue,
2106           in putField         : "e vent_sale_ end_id",   2130           in putField         : "e vent_sale_ end_id",
2107           bu tton             : "s ale_end_ch oose_id",   2131           bu tton             : "s ale_end_ch oose_id",
2108           if Format           : "% Y-%m-%d %H :%M:%S",   2132           if Format           : "% Y-%m-%d %H :%M:%S",
2109           da Format           : "% Y/%m/%d",   2133           da Format           : "% Y/%m/%d",
2110           al ign              : "B r"   2134           al ign              : "B r"
2111         });   2135         });
2112   <?   2136   <?
2113   }   2137   }
2114   ?>   2138   ?>
2115   //]]>   2139   //]]>
2116   </script>   2140   </script>
2117   <?   2141   <?
2118   BottomCode ();   2142   BottomCode ();
2119   ?>   2143   ?>