196. File Comparison Report

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

196.1 Files compared

# Location File Last Modified
1 Mon May 12 13:05:07 2008 UTC
2 Dolphin-v.6.1.0\inc\classes BxDolMenu.php Mon Apr 14 11:47:20 2008 UTC

196.2 Comparison summary

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

196.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

196.4 Active regular expressions

No regular expressions were active.

196.5 Comparison detail

    1   <?php
    2  
    3   class BxDo lMenu {
    4       var $a TopMenu;
    5       var $s CacheFile;
    6       var $a MenuInfo =  array();
    7       var $o TemplConfi g;
    8       var $s Code = '';
    9       var $i Divide; // divider or  top items
    10       var $s RequestUri File;
    11       var $s SelfFile;
    12       var $a NotShowSub sFor = arr ay( 'index .php' );
    13       
    14       var $a PLinks = a rray(
    15           'a rticles.ph p'   =>      array('c heck'=>'pe rmalinks_a rticles',  'link'=>'a rticles'),
    16           
    17           'b rowseMusic .php'=>      array('c heck'=>'pe rmalinks_g allery_mus ic', 'link '=>'music/ all/10/1') ,
    18           'b rowseMusic .php?rate= top'=> arr ay('check' =>'permali nks_galler y_music',  'link'=>'m usic/galle ry_top'),
    19           'b rowseMusic .php?userI D={profile ID}'=> arr ay('check' =>'permali nks_galler y_music',  'link'=>'m usic/galle ry/all/{pr ofileNick} '),
    20           'b rowseMusic .php?userI D={memberI D}'=> arra y('check'= >'permalin ks_gallery _music', ' link'=>'mu sic/galler y/all/{mem berNick}') ,
    21           
    22           'b rowsePhoto .php'=>      array('c heck'=>'pe rmalinks_g allery_pho tos', 'lin k'=>'photo /all/10/1' ),
    23           'b rowsePhoto .php?rate= top'=> arr ay('check' =>'permali nks_galler y_photos',  'link'=>' photo/gall ery_top'),
    24           'b rowsePhoto .php?userI D={profile ID}'=> arr ay('check' =>'permali nks_galler y_photos',  'link'=>' photo/gall ery/all/{p rofileNick }'),
    25           'b rowsePhoto .php?userI D={memberI D}'=> arra y('check'= >'permalin ks_gallery _photos',  'link'=>'p hoto/galle ry/all/{me mberNick}' ),
    26           
    27           'b rowseVideo .php'=>      array('c heck'=>'pe rmalinks_g allery_vid eos', 'lin k'=>'video /all/10/1' ),
    28           'b rowseVideo .php?rate= top'=> arr ay('check' =>'permali nks_galler y_videos',  'link'=>' video/gall ery_top'),
    29           'b rowseVideo .php?userI D={profile ID}'=> arr ay('check' =>'permali nks_galler y_videos',  'link'=>' video/gall ery/all/{p rofileNick }'),
    30           'b rowseVideo .php?userI D={memberI D}'=> arra y('check'= >'permalin ks_gallery _videos',  'link'=>'v ideo/galle ry/all/{me mberNick}' ),
    31           
    32           'e vents.php? show_event s=all&acti on=show'=> array('che ck'=>'perm alinks_eve nts', 'lin k'=>'event s'),
    33           'e vents.php? action=sho w&show_eve nts=my'=>a rray('chec k'=>'perma links_even ts', 'link '=>'events /my'),
    34           'e vents.php? action=sea rch'=>arra y('check'= >'permalin ks_events' , 'link'=> 'events/se arch'),
    35           
    36           'c lassifieds .php?Brows e=1'=>arra y('check'= >'permalin ks_classif ieds', 'li nk'=>'ads' ),
    37           'c lassifieds .php?Searc hForm=1'=> array('che ck'=>'perm alinks_cla ssifieds',  'link'=>' ads/search '),
    38           'c lassifieds my.php?MyA ds=1'=>arr ay('check' =>'permali nks_classi fieds', 'l ink'=>'ads /my'),
    39           
    40           'b logs.php'       =>            ar ray('check '=>'permal inks_blogs ', 'link'= >'blogs'),
    41           'b logs.php?a ction=top_ blogs'=>ar ray('check '=>'permal inks_blogs ', 'link'= >'blogs/to p'),
    42           'b logs.php?a ction=top_ posts'=>ar ray('check '=>'permal inks_blogs ', 'link'= >'blogs/to p_posts'),
    43           'b logs.php?a ction=show _member_bl og&ownerID ={memberID }'=>array( 'check'=>' permalinks _blogs', ' link'=>'bl ogs/posts/ {memberNic k}'),
    44           'b logs.php?a ction=show _member_bl og&ownerID ={profileI D}'=>array ('check'=> 'permalink s_blogs',  'link'=>'b logs/posts /{profileN ick}'),
    45           
    46           'g roups_home .php'=>          arra y('check'= >'permalin ks_groups' , 'link'=> 'groups/al l')
    47       );
    48  
    49       functi on BxDolMe nu() {
    50           gl obal $oTem plConfig;
    51           
    52           $t his -> sCa cheFile =  BX_DIRECTO RY_PATH_IN C . 'db_ca ched/MenuC ontent.inc ';
    53           $t his -> oTe mplConfig  = &$oTempl Config;
    54           
    55           $t his -> iDi vide = (in t)getParam ( 'topmenu _items_per line' );
    56           
    57           if ( !$this - > load() )
    58                $this ->  aTopMenu  = array();
    59           
    60           $t his -> get MenuInfo() ;
    61       }
    62       
    63       functi on load()  {
    64           if ( !file_ex ists( $thi s -> sCach eFile ) )  {
    65                echo '<b >Warning!< /b> Cannot  find Menu  Cache fil e (' . $th is -> sCac heFile . ' ).';
    66                return f alse;
    67           }
    68           
    69           $s Cache = @f ile_get_co ntents( $t his -> sCa cheFile );
    70           if ( !$sCache  ) {
    71                echo '<b >Warning!< /b> Cannot  read Menu  Cache fil e (' . $th is -> sCac heFile . ' ).';
    72                return f alse;
    73           }
    74           
    75           $t his -> aTo pMenu = @e val( $sCac he );
    76           if ( !$this - > aTopMenu  or !is_ar ray( $this  -> aTopMe nu ) ) {
    77                echo '<b >Warning!< /b> Cannot  evaluate  Menu Cache  file (' .  $this ->  sCacheFile  . ').';
    78                return f alse;
    79           }
    80           
    81           re turn true;
    82       }
    83       
    84       functi on getMenu Info() {
    85           gl obal $logg ed;
    86           gl obal $p_ar r;
    87           
    88           $a SiteUrl =  parse_url(  $this ->  oTemplConf ig -> aSit e['url'] ) ;
    89           $t his -> sRe questUriFi le = htmls pecialchar s_adv( sub str( $_SER VER['REQUE ST_URI'],  strlen( $a SiteUrl['p ath'] ) )  );
    90           $t his -> sSe lfFile        = htmls pecialchar s_adv( sub str( $_SER VER['PHP_S ELF'],     strlen( $a SiteUrl['p ath'] ) )  );
    91           
    92           if ( $logged[ 'member']  ) {
    93                $this ->  aMenuInfo ['memberID ']   = (in t)$_COOKIE ['memberID '];
    94                $this ->  aMenuInfo ['memberNi ck'] = get NickName(  $this -> a MenuInfo[' memberID']  );
    95                $this ->  aMenuInfo ['memberLi nk'] = get ProfileLin k( $this - > aMenuInf o['memberI D'] );
    96                $this ->  aMenuInfo ['visible' ]    = 'me mb';
    97           }  else {
    98                $this ->  aMenuInfo ['memberID '] = 0;
    99                $this ->  aMenuInfo ['memberNi ck'] = '';
    100                $this ->  aMenuInfo ['memberLi nk'] = '';
    101                $this ->  aMenuInfo ['visible' ]  = 'non' ;
    102           }
    103           
    104           $s elfFile =  basename(  $_SERVER[' PHP_SELF']  );
    105           
    106           // get viewed  profile I D
    107           if ( $p_arr a nd $p_arr[ 'ID'] ) {
    108                $this ->  aMenuInfo ['profileI D']   = (i nt)$p_arr[ 'ID'];
    109                $this ->  aMenuInfo ['profileN ick'] = $p _arr['Nick Name'];
    110                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    111           
    112           }  elseif( $s elfFile ==  'browseVi deo.php' o r $selfFil e == 'brow sePhoto.ph p' or $sel fFile == ' browseMusi c.php' ) {
    113                $this ->  aMenuInfo ['profileI D']   = (i nt)$_GET[' userID'];
    114                $this ->  aMenuInfo ['profileN ick'] = ge tNickName(     $this  -> aMenuIn fo['profil eID'] );
    115                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    116           
    117           }  elseif( $s elfFile ==  'guestboo k.php' ) {
    118                $this ->  aMenuInfo ['profileI D']   = $_ REQUEST['o wner'] ? ( int)$_REQU EST['owner '] : $this  -> aMenuI nfo['profi leID'];
    119                $this ->  aMenuInfo ['profileN ick'] = ge tNickName(     $this  -> aMenuIn fo['profil eID'] );
    120                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    121           
    122           }  elseif( $s elfFile ==  'blogs.ph p' ) {
    123                $this ->  aMenuInfo ['profileI D']   = $_ REQUEST['o wnerID'] ?  (int)$_RE QUEST['own erID'] : $ this -> aM enuInfo['p rofileID'] ;
    124                $this ->  aMenuInfo ['profileN ick'] = ge tNickName(     $this  -> aMenuIn fo['profil eID'] );
    125                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    126           
    127           }  elseif( $s elfFile ==  'viewFrie nds.php' )  {
    128                $this ->  aMenuInfo ['profileI D']   = (i nt)$_GET[' iUser'];
    129                $this ->  aMenuInfo ['profileN ick'] = ge tNickName(     $this  -> aMenuIn fo['profil eID'] );
    130                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    131           
    132           }  elseif( $s elfFile ==  'photos_g allery.php ' ) {
    133                $this ->  aMenuInfo ['profileI D']   = (i nt)$_GET[' ID'];
    134                $this ->  aMenuInfo ['profileN ick'] = ge tNickName(     $this  -> aMenuIn fo['profil eID'] );
    135                $this ->  aMenuInfo ['profileL ink'] = ge tProfileLi nk( $this  -> aMenuIn fo['profil eID'] );
    136           
    137           }  else {
    138                $this ->  aMenuInfo ['profileI D']   = 0;
    139                $this ->  aMenuInfo ['profileN ick'] = '' ;
    140                $this ->  aMenuInfo ['profileL ink'] = '' ;
    141           }
    142           
    143           //  detect cu rrent menu
    144           $t his -> aMe nuInfo['cu rrentCusto m'] = 0;
    145           $t his -> aMe nuInfo['cu rrentTop']     = 0;
    146           
    147           fo reach( $th is -> aTop Menu as $i ItemID =>  $aItem ) {
    148                if( $aIt em['Type']  == 'top'  and $this  -> aMenuIn fo['curren tTop'] and  $this ->  aMenuInfo[ 'currentTo p'] != $iI temID )
    149                    brea k;
    150                    
    151                $aItemUr is = explo de( '|', $ aItem['Lin k'] );
    152                foreach(  $aItemUri s as $sIte mUri ) {
    153                    if(  $this -> a MenuInfo[' memberID']  ) {
    154                         $sItemUri  = str_repl ace( "{mem berID}",     $this ->  aMenuInfo ['memberID '],    $sI temUri );
    155                         $sItemUri  = str_repl ace( "{mem berNick}",   $this ->  aMenuInfo ['memberNi ck'],  $sI temUri );
    156                         $sItemUri  = str_repl ace( "{mem berLink}",   $this ->  aMenuInfo ['memberLi nk'],  $sI temUri );
    157                    }
    158                    
    159                    if(  $this -> a MenuInfo[' profileID' ] ) {
    160                         $sItemUri  = str_repl ace( "{pro fileID}",    $this ->  aMenuInfo ['profileI D'],   $sI temUri );
    161                         $sItemUri  = str_repl ace( "{pro fileNick}" , $this ->  aMenuInfo ['profileN ick'], $sI temUri );
    162                         $sItemUri  = str_repl ace( "{pro fileLink}" , $this ->  aMenuInfo ['profileL ink'], $sI temUri );
    163                    }
    164                    
    165                    if(  $sItemUri  == $this - > sRequest UriFile or
    166                      (  substr( $t his -> sRe questUriFi le, 0, str len( $sIte mUri ) ) = = $sItemUr i and !(in t)$aItem[' Strict'] )  ) {
    167                         if( $aItem ['Type'] = = 'custom'  ) {
    168                             $this  -> aMenuIn fo['curren tCustom']  = $iItemID ;
    169                             $this  -> aMenuIn fo['curren tTop']     = (int)$aI tem['Paren t'];
    170                             break;
    171                         } else { / /top or sy stem
    172                             if( $t his -> aMe nuInfo['cu rrentTop']  and $this  -> aMenuI nfo['curre ntTop'] !=  $iItemID  )
    173                                 br eak;
    174                             else
    175                                 $t his -> aMe nuInfo['cu rrentTop']  = $iItemI D;
    176                         }
    177                    }
    178                }
    179                
    180                if( $thi s -> aMenu Info['curr entCustom' ] )
    181                    brea k;
    182           }
    183       
    184           // echoDbg( $ this -> aM enuInfo );
    185       }
    186       
    187       functi on getCode () {
    188           $t his -> gen TopHeader( );
    189           $t his -> gen TopItems() ;
    190           $t his -> gen TopFooter( );
    191           
    192           $t his -> gen SubContHea der();
    193           $t his -> gen SubMenus() ;
    194           $t his -> gen SubContFoo ter();
    195           
    196           re turn $this  -> sCode;
    197       }
    198       
    199       functi on genTopI tems() {
    200           $i Count = 0;
    201           
    202           fo reach( $th is -> aTop Menu as $i ItemID =>  $aItem ) {
    203                if( $aIt em['Type']  != 'top'  )
    204                    cont inue;
    205                
    206                if( !$th is -> chec kToShow( $ aItem ) )
    207                    cont inue;
    208                
    209                //genera te
    210                list( $a Item['Link '] ) = exp lode( '|',  $aItem['L ink'] );
    211                
    212                $aItem[' Link']     = $this ->  replaceMe tas( $aIte m['Link']  );
    213                $aItem[' Onclick']  = $this ->  replaceMe tas( $aIte m['Onclick '] );
    214                
    215                $bActive  = ( $iIte mID == $th is -> aMen uInfo['cur rentTop']  );
    216                $this ->  genTopIte m( _t( $aI tem['Capti on'] ), $a Item['Link '], $aItem ['Target'] , $aItem[' Onclick'],  $bActive,  $iItemID  );
    217                
    218                if( $thi s -> iDivi de > 0 and  ( ++$iCou nt % $this  -> iDivid e ) == 0 )  {
    219                    $thi s -> genTo pDivider() ;
    220                    $iCo unt = 0;
    221                }
    222           }
    223       }
    224       
    225       functi on genSubM enus() {
    226           fo reach( $th is -> aTop Menu as $i TItemID =>  $aTItem )  {
    227                if( $aTI tem['Type' ] != 'top'  && $aTIte m['Type']  !='system' )
    228                    cont inue;
    229                
    230                if( !$th is -> chec kToShow( $ aTItem ) )
    231                    cont inue;
    232                
    233                if( $thi s -> aMenu Info['curr entTop'] = = $iTItemI D && $this  -> checkS howCurSub( ) )
    234                    $sDi splay = 'b lock';
    235                else
    236                    $sDi splay = 'n one';
    237                
    238                $sCaptio n = _t( $a TItem['Cap tion'] );
    239                
    240                $sCaptio n = $this  -> replace Metas( $sC aption );
    241                
    242                //genera te
    243                $this ->  genSubHea der( $iTIt emID, $sCa ption, $sD isplay );
    244                $this ->  genSubIte ms( $iTIte mID );
    245                $this ->  genSubFoo ter();
    246                
    247                /*$ret . = '
    248                    <div  class="hi ddenMenu"  style="dis play:' . $ sDisplay .  ';" id="h iddenMenu_ ' . $iTIte mID . '"
    249                      on mouseover= "holdHidde nMenu = '  . $iTItemI D . ';"
    250                      on mouseout=" holdHidden Menu = cur rentTopIte m; hideHid denMenu( '  . $iTItem ID . ' )">
    251                         <div class ="hiddenMe nuBgCont">
    252                             <div c lass="hidd enMenuCont ">
    253                                 <d iv class=" topPageHea der">' . $ sCaption .  '</div>'  .
    254                                 $t his -> get CustomMenu ( $iTItemI D ) . '
    255                             </div>
    256                         </div>
    257                         <div class ="clear_bo th"></div>
    258                    </di v>';*/
    259           }
    260       }
    261       
    262       // che ck if to s how curren t sub menu
    263       functi on checkSh owCurSub()  {
    264           fo reach( $th is -> aNot ShowSubsFo r as $sExc ep )
    265                if( $thi s -> sSelf File == $s Excep )
    266                    retu rn false;
    267           
    268           re turn true;
    269       }
    270       
    271       functi on checkTo Show( $aIt em ) {
    272           if ( !$this - > checkVis ible( $aIt em['Visibl e'] ) )
    273                return f alse;
    274           
    275           if ( !$this - > checkCon d( $aItem[ 'Check'] )  )
    276                return f alse;        
    277           
    278           re turn true;
    279       }
    280       
    281       functi on checkVi sible( $sV isible ) {
    282           re turn ( str pos( $sVis ible, $thi s -> aMenu Info['visi ble'] ) != = false );
    283       }
    284       
    285       functi on checkCo nd( $sChec k ) {
    286           if ( !$sCheck  )
    287                return t rue;
    288           
    289           $s Check = st r_replace(  '\$', '$' , $sCheck  );
    290           $f Func = cre ate_functi on('', $sC heck );
    291           
    292           re turn $fFun c();
    293       }
    294       
    295       functi on genSubI tems( $iTI temID = 0  ) {
    296           if ( !$iTItem ID )
    297                $iTItemI D = $this  -> aMenuIn fo['curren tTop'];
    298           
    299           fo reach( $th is -> aTop Menu as $i ItemID =>  $aItem ) {
    300                if( $aIt em['Type']  != 'custo m' )
    301                    cont inue;
    302                
    303                if( $aIt em['Parent '] != $iTI temID )
    304                    cont inue;
    305                
    306                if( !$th is -> chec kToShow( $ aItem ) )
    307                    cont inue;
    308                
    309                //genera te
    310                list( $a Item['Link '] ) = exp lode( '|',  $aItem['L ink'] );
    311                
    312                $aItem[' Link']     = $this ->  replaceMe tas( $aIte m['Link']  );
    313                $aItem[' Onclick']  = $this ->  replaceMe tas( $aIte m['Onclick '] );
    314                
    315                $bActive  = ( $iIte mID == $th is -> aMen uInfo['cur rentCustom '] );
    316                
    317                $this ->  genSubIte m( _t( $aI tem['Capti on'] ), $a Item['Link '], $aItem ['Target'] , $aItem[' Onclick'],  $bActive  );
    318           }
    319       }
    320       
    321       functi on replace Metas( $sL ink ) {
    322           $s Link = str _replace(  '{memberID }',    $th is -> aMen uInfo['mem berID'],     $sLink ) ;
    323           $s Link = str _replace(  '{memberNi ck}',  $th is -> aMen uInfo['mem berNick'],   $sLink ) ;
    324           $s Link = str _replace(  '{memberLi nk}',  $th is -> aMen uInfo['mem berLink'],   $sLink ) ;
    325           $s Link = str _replace(  '{memberPa ss}',  get Password(  $this -> a MenuInfo[' memberID']  ),  $sLin k );
    326           
    327           $s Link = str _replace(  '{profileI D}',   $th is -> aMen uInfo['pro fileID'],    $sLink ) ;
    328           $s Link = str _replace(  '{profileN ick}', $th is -> aMen uInfo['pro fileNick'] , $sLink ) ;
    329           $s Link = str _replace(  '{profileL ink}', $th is -> aMen uInfo['pro fileLink'] , $sLink ) ;
    330           
    331           re turn $sLin k;
    332       }
    333  
    334       functi on compile () {
    335           $f Menu = @fo pen( $this  -> sCache File , 'w'  );
    336           if ( !$fMenu  )
    337                return f alse;
    338           
    339           fw rite( $fMe nu, "retur n array(\n " );
    340           $a Fields = a rray( 'Typ e','Captio n','Link', 'Visible', 'Target',' Onclick',' Check','St rict','Par ent' );
    341                
    342           $s Query = "
    343                SELECT
    344                    `ID` ,
    345                    `" .  implode(' `,
    346                    `',  $aFields )  . "`
    347                FROM `To pMenu`
    348                WHERE
    349                    `Act ive` = 1 A ND
    350                    ( `T ype` = 'sy stem' OR ` Type` = 't op' )
    351                ORDER BY  `Type`,`O rder`
    352                ";
    353       
    354           $r Menu = db_ res( $sQue ry );
    355           wh ile( $aMen uItem = my sql_fetch_ assoc( $rM enu ) ) {
    356                fwrite(  $fMenu, "   " . str_p ad( $aMenu Item['ID'] , 2 ) . "  => array(\ n" );
    357                
    358                foreach(  $aFields  as $sKey = > $sField  ) {
    359                    $sCo nt = $aMen uItem[$sFi eld];
    360                    
    361                    if(  $sField ==  'Link' )
    362                         $sCont = $ this -> ge tCurrLink( $sCont);
    363                    
    364                    $sCo nt = str_r eplace( '\ \', '\\\\' , $sCont ) ;
    365                    $sCo nt = str_r eplace( '" ', '\\"',    $sCont ) ;
    366                    $sCo nt = str_r eplace( '$ ', '\\$',    $sCont ) ;
    367                    
    368                    $sCo nt = str_r eplace( "\ n", '',      $sCont ) ;
    369                    $sCo nt = str_r eplace( "\ r", '',      $sCont ) ;
    370                    $sCo nt = str_r eplace( "\ t", '',      $sCont ) ;
    371                    
    372                    fwri te( $fMenu , "    " .  str_pad(  "'$sField' ", 11 ) .  " => \"$sC ont\",\n"  );
    373                }
    374                
    375                fwrite(  $fMenu, "   ),\n" );
    376                
    377                // write  it's chil dren
    378                $sQuery  = "
    379                    SELE CT
    380                         `ID`,
    381                         `" . implo de('`,
    382                         `', $aFiel ds ) . "`
    383                    FROM  `TopMenu`
    384                    WHER E
    385                         `Active` =  1 AND
    386                         `Type` = ' custom' AN D
    387                         `Parent` =  {$aMenuIt em['ID']}
    388                    ORDE R BY `Orde r`
    389                    ";
    390                
    391                $rCMenu  = db_res(  $sQuery );
    392                while( $ aMenuItem  = mysql_fe tch_assoc(  $rCMenu )  ) {
    393                    fwri te( $fMenu , "  " . s tr_pad( $a MenuItem[' ID'], 2 )  . " => arr ay(\n" );
    394                    
    395                    fore ach( $aFie lds as $sK ey => $sFi eld ) {
    396                         $sCont = $ aMenuItem[ $sField];
    397                        
    398                         if( $sFiel d == 'Link ' )
    399                             $sCont  = $this - > getCurrL ink($sCont );
    400                        
    401                         $sCont = s tr_replace ( '\\', '\ \\\', $sCo nt );
    402                         $sCont = s tr_replace ( '"', '\\ "',   $sCo nt );
    403                         $sCont = s tr_replace ( '$', '\\ $',   $sCo nt );
    404                        
    405                         $sCont = s tr_replace ( "\n", '' ,     $sCo nt );
    406                         $sCont = s tr_replace ( "\r", '' ,     $sCo nt );
    407                         $sCont = s tr_replace ( "\t", '' ,     $sCo nt );
    408                        
    409                         fwrite( $f Menu, "     " . str_p ad( "'$sFi eld'", 11  ) . " => \ "$sCont\", \n" );
    410                    }
    411                    
    412                    fwri te( $fMenu , "  ),\n"  );
    413                }
    414           }
    415           
    416           fw rite( $fMe nu, ");\n"  );
    417           
    418           fc lose( $fMe nu );
    419           re turn true;
    420       }
    421       
    422       // ret urns link  according  permalink  settings
    423       functi on getCurr Link($sCon t)
    424       {
    425           $a CurrLink =  explode(' |', $sCont );
    426           if  ( array_k ey_exists(  $aCurrLin k[0], $thi s -> aPLin ks ) ){
    427                $aCheck  = $this ->  aPLinks[$ aCurrLink[ 0]];
    428                if (getP aram($aChe ck['check' ]) == 'on' ){
    429                    $aCu rrLink[0]  = $aCheck[ 'link'];
    430                    $sCo nt = implo de( '|', $ aCurrLink  );
    431                }   
    432           }
    433           
    434           re turn htmls pecialchar s_adv($sCo nt);
    435       }
    436  
    437   }