790. File Comparison Report

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

790.1 Files compared

# Location File Last Modified
1 Mon May 12 13:07:07 2008 UTC
2 Dolphin-v.6.1.0 join.php Mon Apr 28 06:54:42 2008 UTC

790.2 Comparison summary

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

790.3 Comparison options

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

790.4 Active regular expressions

No regular expressions were active.

790.5 Comparison detail

    1   <?php
    2  
    3   require_on ce( './inc /header.in c.php' );
    4   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'admin.i nc.php' );
    5   require_on ce( BX_DIR ECTORY_PAT H_INC      . 'db.inc. php' );
    6   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileField s.php' );
    7   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofilesCont roller.php ' );
    8   require_on ce( BX_DIR ECTORY_PAT H_ROOT     . "templat es/tmpl_{$ tmpl}/scri pts/BxTemp lFormView. php" );
    9  
    10   //aa blya  join nah!
    11  
    12   $_page['na me_index']  = 3;
    13   $_page['cs s_name']    = 'join.c ss';
    14   $_page['ex tra_js']   .= '<scrip t type="te xt/javascr ipt" langu age="JavaS cript" src ="' . $sit e['plugins '] . 'jque ry/ui.date picker.js" ></script> ';
    15   $_page['ex tra_js']   .= '<scrip t type="te xt/javascr ipt" langu age="JavaS cript" src ="' . $sit e['plugins '] . 'jque ry/jquery. form.js">< /script>';
    16   $_page['ex tra_js']   .= '<scrip t type="te xt/javascr ipt" langu age="JavaS cript" src ="inc/js/j oin.js"></ script>';
    17  
    18   //init dat epicker
    19   $iMinAge   = (int)get Param( 'se arch_start _age' );
    20   $iMaxAge   = (int)get Param( 'se arch_end_a ge'   );
    21   $iCurYear  = (int)dat e('Y');
    22   $iMinYear  = $iCurYea r - $iMaxA ge - 1;
    23   $iMaxYear  = $iCurYea r - $iMinA ge;
    24  
    25   $iSelected Rel = ceil ( $iMinAge  * 365.25  ); //get r elative da ys number  for defaul t date
    26  
    27   $sDatepick erInit = $ oTemplConf ig -> cust omize['joi n']['datep ickerInit' ];
    28  
    29   $sDatepick erInit = s tr_replace ( '{min_ye ar}', $iMi nYear,      $sDatepic kerInit );
    30   $sDatepick erInit = s tr_replace ( '{max_ye ar}', $iMa xYear,      $sDatepic kerInit );
    31   $sDatepick erInit = s tr_replace ( '{dfl_da ys}', $iSe lectedRel,  $sDatepic kerInit );
    32  
    33   $_page['ex tra_js']   .= '
    34       <scrip t type="te xt/javascr ipt" langu age="JavaS cript">
    35           $(  document  ).ready( f unction(){
    36                ' . $sDa tepickerIn it . '
    37           }  );
    38       </scri pt>';
    39  
    40   check_logg ed();
    41  
    42   $_page['he ader'] = _ t( "_JOIN_ H" );
    43   $_page['he ader_text' ] = _t( "_ JOIN_H" );
    44  
    45   if( $logge d['member' ] )
    46   {
    47       $_page ['name_ind ex'] = 0;
    48       $_page _cont[0][' page_main_ code'] = _ t( '_Sorry , you\'re  already jo ined' );
    49       PageCo de();
    50       exit;
    51   }
    52  
    53   if ( getPa ram('reg_b y_inv_only ') == 'on'  && getID( $_COOKIE[' idFriend'] )==0 ) {
    54       $_page ['name_ind ex'] = 0;
    55       $_page _cont[0][' page_main_ code'] = M sgBox(_t(' registrati on by invi tation onl y'));
    56       PageCo de();
    57       exit;
    58   }
    59  
    60   $oJoinProc  = new BxD olJoinProc essor();
    61  
    62   $_ni = $_p age['name_ index'];
    63   $_page_con t[$_ni]['p age_main_c ode'] = $o JoinProc - > process( );
    64  
    65  
    66   PageCode() ;
    67  
    68  
    69  
    70  
    71   class BxDo lJoinProce ssor {
    72       
    73       var $o PF; //prof ile fields
    74       var $i Page; //cu rrently sh own page
    75       var $a Pages; //a vailable p ages
    76       var $a Values; // inputted v alues
    77       var $a Errors; // errors gen erated on  page
    78       var $b AjaxMode;  // defines  if the sc ript were  requested  by ajax
    79       
    80       var $b CoupleEnab led;
    81       var $a CoupleMutu alItems;
    82       var $b Couple;
    83       
    84       functi on BxDolJo inProcesso r() {
    85           $t his -> aVa lues = arr ay( 0 => a rray(), 1  => array()  ); // dou ble arrays  (for coup les)
    86           $t his -> aEr rors = arr ay( 0 => a rray(), 1  => array()  ); 
    87           
    88           /*  @var $thi s->oPF BxD olProfileF ields */
    89           $t his -> oPF  = new BxD olProfileF ields(1);
    90           
    91           $t his -> bAj axMode = (  isset( $_ SERVER['HT TP_X_REQUE STED_WITH' ] ) and $_ SERVER['HT TP_X_REQUE STED_WITH' ] == 'XMLH ttpRequest ' );
    92       }
    93       
    94       functi on process () {
    95           if ( !$this - > oPF -> a Area )
    96                return ' Profile Fi elds cache  not loade d. Cannot  continue.' ;
    97           
    98           $t his -> aPa ges = arra y_keys( $t his -> oPF  -> aArea  );
    99           
    100           $t his -> iPa ge = ( iss et( $_POST ['join_pag e'] ) ) ?  $_POST['jo in_page']  : 0; // ge t current  working pa ge from PO ST
    101           
    102           if ( $this ->  iPage !==  'done' )
    103                $this ->  iPage = ( int)$this  -> iPage;
    104           
    105           $t his -> get CoupleOpti ons();
    106           
    107           $t his -> pro cessPostVa lues();
    108           
    109           if ( $this ->  bAjaxMode  ) {
    110                $this ->  showError sJson();
    111                exit;
    112           }  else {
    113                ob_start ();
    114                
    115                if( $thi s -> iPage  === 'done ' ) { //if  all pages  are finis hed and no  errors fo und
    116                    list ( $iMemID,  $sStatus  ) = $this  -> registe rMember();
    117                    
    118                    if(  !$iMemID )
    119                         $this -> s howFailPag e();
    120                    else
    121                         $this -> s howFinishP age( $iMem ID, $sStat us );
    122                } else
    123                    $thi s -> showJ oinForm();
    124                
    125                return o b_get_clea n();
    126           }
    127       }
    128       
    129       functi on getCoup leOptions( ) {
    130           // find Coupl e item
    131           $a CoupleItem  = false;
    132           fo reach ($th is -> aPag es as $iPa geInd => $ iPage) { / /cycle pag es
    133                $aBlocks  = $this - > oPF -> a Area[ $iPa ge ];
    134                foreach  ($aBlocks  as $iBlock ID => $aBl ock) {   / /cycle blo cks
    135                    $aIt ems = $aBl ock['Items '];
    136                    fore ach ($aIte ms as $iIt emID => $a Item) {  / /cycle ite ms
    137                         if( $aItem ['Name'] = = 'Couple'  ) { // we  found it!
    138                             $aCoup leItem = $ aItem;
    139                             break;
    140                         }
    141                    }
    142                    
    143                    if(  $aCoupleIt em ) // we  already f ound it
    144                         break;
    145                }
    146                
    147                if( $aCo upleItem )  // we alr eady found  it
    148                    brea k;
    149           }
    150           
    151           if ( $aCouple Item ) {
    152                $this ->  bCoupleEn abled       = true;
    153                $this ->  bCouple               = ( isset ( $_REQUES T['Couple' ] ) and $_ REQUEST['C ouple'] ==  'yes' ) ?  true : fa lse;
    154           }  else {
    155                $this ->  bCoupleEn abled       = false;
    156                $this ->  bCouple               = false;
    157           }
    158           
    159           $t his -> aCo upleMutual Items = $t his -> oPF  -> getCou pleMutualF ields();
    160       }
    161       
    162       functi on process PostValues () {
    163           
    164           fo reach ($th is -> aPag es as $iPa ge) { //cy cle pages
    165                
    166                if( $thi s -> iPage  !== 'done ' and $iPa ge >= $thi s -> iPage  ) {
    167                    $thi s -> iPage  = $iPage;  // we are  on the cu rrent page . dont pro cess these  values, d ont go fur ther, just  show form .
    168                    brea k;
    169                }
    170                
    171                // proce ss post va lues by Pr ofile Fiel ds class
    172                $this ->  oPF -> pr ocessPostV alues( $th is -> bCou ple, $this  -> aValue s, $this - >aErrors,  $iPage );
    173                
    174                if( !emp ty( $this  -> aErrors [0] ) or (  $this ->  bCouple an d !empty(  $this -> a Errors[1]  ) ) ) { // we found e rrors on p revious pa ge
    175                    // d o not proc ess furthe r values,  just go to  erroneous  page.
    176                    $thi s -> iPage  = $iPage;
    177                    brea k;
    178                }
    179           }
    180       }
    181       
    182       functi on showErr orsJson()  {
    183           he ader('Cont ent-Type:t ext/javasc ript');
    184           
    185           ec ho $this - > oPF -> g enJsonErro rs( $this  -> aErrors , $this ->  bCouple ) ;
    186       }
    187       
    188       functi on showJoi nForm() {
    189           
    190           // echoDbg( $ this -> aV alues );ex it;
    191           
    192           $a FormAttrs  = array(
    193                'id' =>  'join_form ',
    194                'onsubmi t' => 'ret urn valida teJoinForm (this);'
    195           );
    196           
    197           $a TableAttrs  = array(
    198                'id' =>  'join_form _table'
    199           );
    200           
    201           $a FormParams  = array(
    202                'hidden'  => $this  -> genHidd enFieldsAr ray()
    203           );
    204           
    205           $a TableParam s = array(
    206                'double'  => $this  ->bCoupleE nabled,
    207                'second_ enabled' = > $this ->  bCouple
    208           );
    209           
    210           $a TableParam s['headers ']     = a rray( '',  _t( '_Firs t Person'  ), _t( '_S econd Pers on' ) );
    211           $a TableParam s['headers _add'] = ' class="hea der form_s econd_col" ' . ( $thi s -> bCoup le ? '' :  ' style="d isplay: no ne;"' );
    212           
    213           $a Buttons =  array(
    214                array(
    215                    'typ e' => 'sub mit',
    216                    'val ue' => _t(  '_Submit'  ),
    217                    'cla ss' => 'in put_submit '
    218                )
    219           );
    220           
    221           /*  @var $oFo rm BxTempl FormView * /
    222           $o Form = new  BxTemplFo rmView( 'j oin_form'  );
    223           $o Form -> be gin( $aFor mAttrs, $a TableAttrs , $aFormPa rams, $aTa bleParams  );
    224           
    225           $a Blocks = $ this -> oP F -> aArea [ $this ->  iPage ];
    226           fo reach( $aB locks as $ aBlock ) {
    227                $oForm - > beginBlo ck( _t( $a Block['Cap tion'] ) ) ;
    228                
    229                foreach(  $aBlock[' Items'] as  $aItem )  {
    230                    
    231                    $aCo l0 = array ();
    232                    
    233                    $aCo l0['Type']       = $a Item['Type '];
    234                    $aCo l0['Name']       = (  $aItem['Ty pe'] == 's ystem' ) ?  $aItem['N ame'] : (  $aItem['Na me'] . '[0 ]' );
    235                    $aCo l0['Mandat ory'] = $a Item['Mand atory'];
    236                    $aCo l0['Contro l']   = $a Item['Cont rol'];
    237                    $aCo l0['Values ']    = $a Item['Valu es'];
    238                    $aCo l0['UseLKe y']   = $a Item['UseL Key'];
    239                    
    240                    $aCo l0['Captio n']   = _t ( $aItem[' Caption']  );
    241                    $aCo l0['Desc']       = _t ( $aItem[' Desc'], $a Item['Min' ], $aItem[ 'Max'] );
    242                    if(  $aCol0['De sc'] == $a Item['Desc '] )
    243                         $aCol0['De sc'] = '';
    244                    
    245                    // s et value
    246                    if(  isset( $th is -> aVal ues[0][ $a Item['Name '] ] ) )
    247                         $aCol0['Va lue']   =  $this -> a Values[0][  $aItem['N ame'] ];
    248                    else if ( $aIte m['Name']  == 'Couple ' )
    249                         $aCol0['Va lue'] = $t his -> bCo uple;
    250                    
    251                    // s et error
    252                    if(  isset( $th is -> aErr ors[0][ $a Item['Name '] ] ) )
    253                         $aCol0['Er ror']   =  $this -> a Errors[0][  $aItem['N ame'] ];
    254                    
    255                    // c heck secon d person's  field
    256                    if(  $this -> b CoupleEnab led and !i n_array( $ aItem['Nam e'], $this  -> aCoupl eMutualIte ms ) ) {
    257                         $aCol1 = a rray();
    258                        
    259                         $aCol1['Ty pe']    =  $aItem['Ty pe'];
    260                         $aCol1['Na me']    =  $aItem['Na me'] . '[1 ]';
    261                         $aCol1['Co ntrol'] =  $aItem['Co ntrol'];
    262                         $aCol1['Va lues']  =  $aItem['Va lues'];
    263                         $aCol1['Us eLKey'] =  $aItem['Us eLKey'];
    264                        
    265                         // set val ue
    266                         if( isset(  $this ->  aValues[1] [ $aItem[' Name'] ] )  )
    267                             $aCol1 ['Value']    = $this  -> aValues [1][ $aIte m['Name']  ];
    268                        
    269                         // set err or
    270                         if( isset(  $this ->  aErrors[1] [ $aItem[' Name'] ] )  )
    271                             $aCol1 ['Error']    = $this  -> aValues [1][ $aIte m['Name']  ];
    272                        
    273                         $oForm ->  addRow( $a Col0, $aCo l1 );
    274                    } el se
    275                         $oForm ->  addRow( $a Col0 );
    276                } 
    277                
    278                $oForm - > endBlock ();
    279           }
    280           
    281           $o Form -> en d( $aButto ns );
    282           
    283           ec ho $oForm  -> getCode ();
    284           
    285           // boonex id
    286           /*  if( getPa ram( 'enab le_get_boo nex_id' )  )
    287           {
    288                global $ tmpl;
    289                
    290                echo "<d iv class=\ "import_bo onex_id\"> ";
    291                $action  = "boonex" ;
    292                $text =  '<div clas s="boonex_ id">' . _t ( '_Import  BoonEx ID ' ) . '</d iv>';
    293                $table        = "Pr ofiles";
    294                $login_p age  = "{$ site['url' ]}member.p hp";
    295                $join_pa ge   = "{$ site['url' ]}join_for m.php";
    296                $forgot_ page = '';
    297                $templat e    = "{$ dir['root' ]}template s/tmpl_{$t mpl}/join_ login_form .html";
    298  
    299                echo Log inForm( $t ext,$actio n,$table,$ login_page ,$forgot_p age,$templ ate );
    300  
    301                echo "</ div>";
    302           }  */
    303       }
    304       
    305       functi on genHidd enFieldsAr ray() {
    306           $a HiddenFiel ds = array ();
    307           
    308           // retrieve n ext page
    309           $i PageInd =  (int)array _search( $ this -> iP age, $this  -> aPages  );
    310           $i NextInd =  $iPageInd  + 1;
    311           
    312           if ( array_ke y_exists(  $iNextInd,  $this ->  aPages ) )
    313                $sNextPa ge = $this  -> aPages [ $iNextIn d ];
    314           el se
    315                $sNextPa ge = 'done ';
    316           
    317           //  insert ne xt page
    318           $a HiddenFiel ds['join_p age'] = $s NextPage;
    319           
    320           // echoDbg( $ this -> aV alues );
    321           
    322           //  insert en tered valu es
    323           $i Humans = $ this -> bC ouple ? 2  : 1;
    324           fo r( $iHuman  = 0; $iHu man < $iHu mans; $iHu man ++ ) {
    325                foreach(  $this ->  aPages as  $iPage ) {
    326                    if(  $iPage ==  $this -> i Page )
    327                         break; //  we are on  this page
    328                    
    329                    $aBl ocks = $th is -> oPF  -> aArea[  $iPage ];
    330                    fore ach( $aBlo cks as $aB lock ) {
    331                         foreach( $ aBlock['It ems'] as $ aItem ) {
    332                             $sItem Name = $aI tem['Name' ];
    333                             
    334                             if( is set( $this  -> aValue s[$iHuman] [ $sItemNa me ] ) ) {
    335                                 $m Value = $t his -> aVa lues[$iHum an][ $sIte mName ];
    336                                 
    337                                 sw itch( $aIt em['Type']  ) {
    338                                      case 'pa ss':
    339                                          $aHi ddenFields [ $sItemNa me . '_con firm[' . $ iHuman . ' ]' ] = $mV alue;
    340                                      case 'te xt':
    341                                      case 'ar ea':
    342                                      case 'da te':
    343                                      case 'se lect_one':
    344                                      case 'nu m':
    345                                          $aHi ddenFields [ $sItemNa me . '[' .  $iHuman .  ']' ] = $ mValue;
    346                                      break;
    347                                      
    348                                      case 'se lect_set':
    349                                          fore ach( $mVal ue as $iIn d => $sVal ue )
    350                                               $aHiddenFi elds[ $sIt emName . ' [' . $iHum an . ']['  . $iInd .  ']' ] = $s Value;
    351                                      break;
    352                                      
    353                                      case 'ra nge':
    354                                          $aHi ddenFields [ $sItemNa me . '[' .  $iHuman .  '][0]' ]  = $mValue[ 0];
    355                                          $aHi ddenFields [ $sItemNa me . '[' .  $iHuman .  '][1]' ]  = $mValue[ 1];
    356                                      break;
    357                                      
    358                                      case 'bo ol':
    359                                          $aHi ddenFields [ $sItemNa me . '[' .  $iHuman .  ']' ] = $ mValue ? ' yes' : '';
    360                                      break;
    361                                      
    362                                      case 'sy stem':
    363                                          swit ch( $aItem ['Name'] )  {
    364                                               case 'Coup le':
    365                                               case 'Term sOfUse':
    366                                                   $aHidd enFields[  $sItemName  ] = $mVal ue ? 'yes'  : '';
    367                                               break;
    368                                              
    369                                               case 'Capt cha':
    370                                                   $aHidd enFields[  $sItemName  ] = $mVal ue;
    371                                               break;
    372                                          }
    373                                      break;
    374                                 }
    375                             }
    376                         }
    377                    }
    378                }
    379           }
    380           re turn $aHid denFields;
    381       }
    382       
    383       functi on registe rMember()  {
    384           $b EnAff = (  getParam(' en_aff') = = 'on' );
    385  
    386           $o PC = new B xDolProfil esControll er();
    387           
    388           // convert to  profile
    389           $a Profile =  $this -> o PF -> getP rofileFrom Values( $t his -> aVa lues[0] );
    390           // create it
    391           li st( $iMemI D, $sStatu s ) = $oPC  -> create Profile( $ aProfile ) ;
    392           
    393           if ( !$iMemID  )
    394                return a rray( fals e, 'Fail'  );
    395           
    396           if ( $this ->  bCouple )  {
    397                //conver t
    398                $aProfil e = $this  -> oPF ->  getProfile FromValues ( $this ->  aValues[1 ] );
    399                //create
    400                list( $i Mem1ID, $s Status1 )  = $oPC ->  createProf ile( $aPro file, fals e, $iMemID  );
    401                
    402                if( !$iM em1ID ) {
    403                    $oPC  -> delete Profile( $ iMemID );
    404                    retu rn array(  false, 'Fa il' );
    405                }
    406           }
    407           
    408           // send new u ser notifi cation
    409           if ( getParam ('newusern otify') ==  'on' )
    410                $oPC ->  sendNewUse rNotify( $ iMemID );
    411  
    412           //  Affiliate  and frien d checking
    413           if  ( $bEnAff  && $_COOK IE['idAff' ] ) {
    414                $vRes =  db_res("SE LECT `ID`  FROM `aff`  WHERE `ID ` = {$_COO KIE['idAff ']} AND `S tatus` = ' active'");
    415                if ( mys ql_num_row s( $vRes )  ) {
    416                    $vRe s = db_res ("INSERT I NTO `aff_m embers` (` idAff`,`id Profile`)  VALUES ('{ $_COOKIE[' idAff']}',  '{$iMemID }')");
    417                }
    418           }
    419           
    420           if  ( $bEnAff  && $_COOK IE['idFrie nd'] ) {
    421                $iFriend ID = getID ( $_COOKIE ['idFriend '] );
    422                if ( $iF riendID )  {
    423                    $vRe s = db_res ( "UPDATE  `Profiles`  SET `aff_ num` = `af f_num` + 1  WHERE `ID ` = '{$iFr iendID}'"  );
    424                    crea teUserData File( $iFr iendID );
    425                }
    426           }
    427           
    428           re parseObjTa gs( 'profi le', $iMem ID );
    429  
    430           re turn array ( $iMemID,  $sStatus  );
    431       }
    432       
    433       functi on showFai lPage() {
    434           ec ho _t( '_J oin failed ' );
    435       }
    436       
    437       functi on showFin ishPage( $ iMemID, $s Status ) {
    438           sw itch( $sSt atus ) {
    439                case 'Ac tive':       $sStatus Text = ('_ USER_ACTIV ATION_SUCC EEDED'); b reak; //ac tivated au tomaticall y
    440                case 'Ap proval':     $sStatus Text = ('_ USER_CONF_ SUCCEEDED' );       b reak; //au tomaticall y confirme d
    441                case 'Un confirmed' : $sStatus Text = ('_ EMAIL_CONF _SENT');            b reak; //co nf mail su ccesfully  sent
    442                case 'No tSent':      $sStatus Text = ('_ EMAIL_CONF _NOT_SENT' );       b reak; //fa iled to se nd conf ma il
    443           }
    444           
    445           ec ho _t( '_J oin comple te' );
    446           ec ho '<br /> ';
    447           ec ho _t( $sS tatusText  );
    448       }
    449       
    450   }
    451  
    452   function L oginForm(  $text, $ac tion, $tab le, $login _page, $fo rgot_page,  $template  = '' )
    453   {
    454       global  $site;
    455       global  $dir;
    456       global  $tmpl;
    457  
    458       $aForm Replace =  array();
    459       
    460       $name_ label = _t ("_Nicknam e");
    461       
    462       $aForm Replace['h eader_text ']    = $s ite['title '] . ' ' .  $mem . '  Login';
    463       if( $a ction == " login" )
    464       {
    465           $a FormReplac e['warning _text']    = $text;
    466           $a FormReplac e['submit_ label']    = _t("_Log  In");
    467           $a FormReplac e['form_on submit']   = 'return  true;';
    468       }
    469       elseif ( $action  == 'boonex ' )
    470       {
    471           $a FormReplac e['warning _text']    = $text .
    472                '<div cl ass="id">'  .
    473                    '<a  href="java script:voi d(0);"
    474                      on click="win dow.open(\ 'http://ww w.boonex.c om/unity/e xpress/XML .php?modul e=form&amp ;action=jo inForm&amp ;community =3\', \'Bo onex_Sign_ Up\', \'wi dth=400,he ight=593,t oolbar=0,d irectories =0,menubar =0,status= 0,location =0,scrollb ars=0,resi zable=0\') ;">' .
    475                         _t( '_Get  BoonEx ID'  ) .
    476                    '</a >'.
    477                '</div>' ;
    478           
    479           $a FormReplac e['submit_ label']    = _t("_Imp ort");
    480           
    481           $a FormReplac e['form_on submit']   = 'getBoon exId( this , document .forms.joi n_form );  return fal se;';
    482       }
    483       $aForm Replace['a ction_url' ]     = $l ogin_page;
    484       $aForm Replace['r elocate_ur l']   = $_ SERVER['PH P_SELF'];
    485       $aForm Replace['n ame_label' ]     = $n ame_label;
    486       $aForm Replace['p assword_la bel'] = _t ("_Passwor d");
    487       
    488       if( $f orgot_page  )
    489       {
    490           $a FormReplac e['forgot_ page_url']  = $forgot _page;
    491           $a FormReplac e['forgot_ label']     = _t("_fo rgot_your_ password")  . '?';
    492       }
    493       else
    494       {
    495           $a FormReplac e['forgot_ page_url']  = '';
    496           $a FormReplac e['forgot_ label']     = '';
    497       }
    498       
    499       if( !s trlen( $te mplate ) )
    500           $t emplate =  "{$dir['ro ot']}templ ates/tmpl_ {$tmpl}/jo in_login_f orm.html";
    501       
    502       $ret =  file_get_ contents(  $template  );
    503       
    504       foreac h( $aFormR eplace as  $key => $v al )
    505           $r et = str_r eplace( "_ _{$key}__" , $val, $r et );
    506       
    507       return  $ret;
    508   }