197. File Comparison Report

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

197.1 Files compared

# Location File Last Modified
1 Mon May 12 13:05:08 2008 UTC
2 Dolphin-v.6.1.0\inc\classes BxDolPageView.php Tue Apr 22 10:33:06 2008 UTC

197.2 Comparison summary

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

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

197.4 Active regular expressions

No regular expressions were active.

197.5 Comparison detail

    1   <?
    2  
    3   class BxDo lPageView  {
    4       var $s PageName;
    5       var $a Page; // c ache of th is page
    6       var $s Code = '';
    7       var $s WhoViews =  'non';
    8       var $i MemberID =  0;
    9       var $b AjaxMode =  false;
    10       
    11       functi on BxDolPa geView( $s PageName )  {
    12           $t his -> sPa geName = $ sPageName;
    13           
    14           if ( !$this - > load() )
    15                return f alse;
    16           
    17           $t his -> get ViewerInfo ();
    18           
    19           $t his -> che ckAjaxMode ();
    20       }
    21       
    22       functi on checkAj axMode() {
    23           if ( isset( $ _SERVER['H TTP_X_REQU ESTED_WITH '] ) and $ _SERVER['H TTP_X_REQU ESTED_WITH '] == 'XML HttpReques t' )
    24                $this ->  bAjaxMode  = true;
    25       }
    26  
    27       functi on load()  {
    28           $s CacheFile  = BX_DIREC TORY_PATH_ INC . 'db_ cached/Pag eView.inc' ;
    29           
    30           if ( !file_ex ists( $sCa cheFile )  ) {
    31                echo '<b r /><b>War ning</b> P ageView ca che not fo und';
    32                return f alse;
    33           }
    34           
    35           $s Cache = @f ile_get_co ntents( $s CacheFile  );
    36           if ( !strlen(  $sCache )  ) {
    37                echo '<b r /><b>War ning!</b>  PageView c ache canno t be loade d. Please  recompile. ';
    38                return f alse;
    39           }
    40           
    41           $a Cache = @e val( $sCac he );
    42           if ( !$aCache  ) {
    43                echo '<b r /><b>War ning!</b>  PageView c ache canno t be evalu ated. Plea se recompi le.';
    44                return f alse;
    45           }
    46           
    47           if ( !array_k ey_exists(  $this ->  sPageName,  $aCache )  ) {
    48                echo '<b r /><b>War ning!</b>  The page n ot found i n PageView  cache.';
    49                return f alse;
    50           }
    51           
    52           $t his -> aPa ge = $aCac he[ $this- >sPageName  ];
    53           
    54           // echoDbg( $ this -> aP age );
    55           
    56           re turn true;
    57       }
    58       
    59       functi on getView erInfo() {
    60           gl obal $logg ed;
    61           
    62           if ( $logged[ 'member']  ) {
    63                $this ->  sWhoViews  = 'memb';
    64                $this ->  iMemberID  = (int)$_ COOKIE['me mberID'];
    65           }
    66       }
    67       
    68       functi on gen() {
    69           gl obal $_pag e_cont, $_ ni;
    70           
    71           if ( !$this - > aPage )
    72                return f alse;
    73           $t his -> gen ColumnsHea der();
    74           
    75           $_ page_cont[ $_ni]['mai n_div_widt h'] = $thi s -> aPage ['Width'];
    76           
    77           fo reach( arr ay_keys( $ this -> aP age['Colum ns'] ) as  $iColumn )
    78                $this ->  genColumn ( $iColumn  );
    79           
    80           $t his -> gen ColumnsFoo ter();
    81       }
    82       
    83       functi on genOnly Block( $iB lockID ) {
    84           if ( !$iBlock ID )
    85                return f alse;
    86  
    87           //  search bl ock
    88           fo reach( arr ay_keys( $ this -> aP age['Colum ns'] ) as  $iColumn )  {
    89                $aColumn  = $this - > aPage['C olumns'][  $iColumn ] ;
    90                if( !$aC olumn )
    91                    retu rn false;
    92                
    93                foreach(  $aColumn[ 'Blocks']  as $iMyBlo ckID => $a Block )
    94                    if(  $iBlockID  == $iMyBlo ckID ) {
    95                         $this -> g enBlock( $ iMyBlockID , $aBlock,  false );
    96                         return tru e;
    97                    }
    98           }
    99           re turn false ;
    100       }
    101       
    102       functi on getCode () {
    103           
    104           if ( !$this - > bAjaxMod e )
    105                $this ->  gen();
    106           el se {
    107                $this ->  genOnlyBl ock( (int) $_REQUEST[ 'pageBlock '] );
    108                echo $th is -> sCod e;
    109                exit;
    110           }
    111           
    112           re turn $this  -> sCode;
    113       }
    114       
    115       //for  customizab ility
    116       functi on genColu mnsHeader( ) {
    117       }
    118       
    119       //for  customizab ility
    120       functi on genColu mnsFooter( ) {
    121           
    122       }
    123       
    124       functi on genColu mn( $iColu mn ) {
    125           $a Column = $ this -> aP age['Colum ns'][ $iCo lumn ];
    126           if ( !$aColum n )
    127                return f alse;
    128           
    129           $t his -> gen ColumnHead er( $iColu mn, $aColu mn['Width' ] );
    130           
    131           fo reach( $aC olumn['Blo cks'] as $ iBlockID = > $aBlock  )
    132                $this ->  genBlock(  $iBlockID , $aBlock  );
    133           
    134           $t his -> gen ColumnFoot er( $iColu mn );
    135       }
    136  
    137       functi on getBloc kCode_Tope st($iColum n) {
    138           re turn '';
    139       }
    140  
    141       functi on genColu mnHeader(  $iColumn,  $iColumnWi dth ) {
    142           if ( $iColumn  == 1 )
    143                $sAddCla ss = ' pag e_column_f irst';
    144           el seif( $iCo lumn == co unt( $this  -> aPage[ 'Columns']  ) )
    145                $sAddCla ss = ' pag e_column_l ast';
    146           el se
    147                $sAddCla ss = '';
    148           
    149           $t his -> sCo de .= '<di v class="p age_column ' . $sAddC lass . '"  id="page_c olumn_' .  $iColumn .  '" style= "width: '  . $iColumn Width . '% ;">';
    150  
    151           $s BlockFunct ion = 'get BlockCode_ Topest';
    152           $t his -> sCo de .=  $th is -> $sBl ockFunctio n($iColumn );
    153       }
    154       
    155       functi on genColu mnFooter(  $iColumn )  {
    156           $t his -> sCo de .= '</d iv>';
    157       }
    158       
    159       functi on genBloc k( $iBlock ID, $aBloc k, $bAddWr apper = tr ue ) {
    160           if ( !$this - > isBlockV isible( $a Block['Vis ible'] ) )
    161                return f alse;
    162           
    163           $s BlockFunct ion = 'get BlockCode_ ' . $aBloc k['Func'];
    164           
    165           $m BlockCode  = '';
    166           if ( method_e xists( $th is, $sBloc kFunction  ) )
    167                $mBlockC ode = $thi s -> $sBlo ckFunction ( $iBlockI D, $aBlock ['Content' ] );
    168           //  $sBlockFu nction can  return si mple strin g or array  with two  values:
    169           //  0 - conte nt, 1 - ar ray of cap tion links , 2 - bott om links
    170           
    171           $s CaptionCod e  = '';
    172           $s BottomCode  = '';
    173           
    174           if ( is_array ( $mBlockC ode ) ) {
    175                $sBlockC ode    = $ mBlockCode [0];
    176                $sCaptio nCode  = $ this -> ge tBlockCapt ionItemCod e( $iBlock ID, $mBloc kCode[1] ) ;
    177                if( is_a rray( $mBl ockCode[2]  ) )
    178                    $sBo ttomCode =  $this ->  getBlockBo ttomCode(  $iBlockID,  $mBlockCo de[2] );
    179           }  elseif( is _string( $ mBlockCode  ) ) {
    180                $sBlockC ode    = $ mBlockCode ;
    181           }  else
    182                $sBlockC ode    = f alse;
    183           
    184           if ( !$sBlock Code )
    185                return f alse;
    186           
    187           $t his -> sCo de .=
    188                ( $bAddW rapper ? ' <div class ="page_blo ck_contain er" id="pa ge_block_'  . $iBlock ID . '">'  : '' ) .
    189                    Desi gnBoxConte nt( _t( $a Block['Cap tion'] ),  $sBlockCod e . $sBott omCode, $a Block['Des ignBox'],  $sCaptionC ode ) .
    190                ( $bAddW rapper ? ' </div>' :  '' );
    191       }
    192       
    193       functi on isBlock Visible( $ sVisible )  {
    194           if ( strpos(  $sVisible,  $this ->  sWhoViews  ) === fals e )
    195                return f alse;
    196           el se
    197                return t rue;
    198       }
    199       
    200       functi on getBloc kCaptionIt emCode( $i BlockID, $ aLinks ) {
    201           
    202           $s Code = '
    203                <div cla ss="dbTopM enu">';
    204           
    205           fo reach( $aL inks as $s Title => $ aLink ) {
    206                $sTitle  = htmlspec ialchars_a dv( _t( $s Title ) );
    207                
    208                if( $aLi nk['active '] ) {
    209                    $sCo de .= '
    210                    <div  class="ac tive">' .  $sTitle .' </div>
    211                    ';
    212                } else {
    213                    $sTa rget  = $a Link['targ et']  ? (  ' target=" ' . $aLink ['target']  . '"' ) :  '';
    214                    $sOn click = $a Link['dyna mic'] ? (  ' onclick= "return !l oadDynamic Block(' .  $iBlockID  . ', this. href);"' )  : '';
    215                    
    216                    $sCo de .= '
    217                    <div  class="no tActive">
    218                         <a href="'  . htmlspe cialchars_ adv($aLink ['href'])  . '" class ="top_memb ers_menu"'  .
    219                           $sTarget  . $sOncli ck . '>' .
    220                             $sTitl e .
    221                         '</a>
    222                    </di v>
    223                    ';
    224                }
    225           }
    226           
    227           $s Code .= '
    228                </div>';
    229           
    230           re turn $sCod e;
    231       }
    232       
    233       functi on getBloc kBottomCod e( $iBlock ID, $aLink s ) {
    234           $s Code = '
    235                <div cla ss="dbBott omMenu">';
    236           
    237           fo reach( $aL inks as $s Title => $ aLink ) {
    238                $sTitle  = htmlspec ialchars_a dv( $sTitl e );
    239                $sClass  = $aLink[' class'] ?  $aLink['cl ass'] : 'm oreMembers ';
    240                
    241                if( $aLi nk['active '] ) {
    242                    $sCo de .= <<<B LAH
    243                    <spa n class="$ sClass">$s Title</spa n>
    244   BLAH;
    245                } else {
    246                    $sTa rget  = $a Link['targ et']  ? (  'target="'  . $aLink[ 'target']  . '"' ) :  '';
    247                    $sOn click = $a Link['dyna mic'] ? (  'onclick=" return !lo adDynamicB lock(' . $ iBlockID .  ', this.h ref);"' )  : '';
    248                    
    249                    $sCo de .= <<<B LAH
    250                    <a h ref="{$aLi nk['href'] }" class=" $sClass" $ sTarget $s Onclick>$s Title</a>
    251   BLAH;
    252                }
    253           }
    254           
    255           $s Code .= '
    256                </div>';
    257           
    258           re turn $sCod e;
    259       }
    260  
    261  
    262  
    263       /* * *  * Page Bl ocks * * *  */
    264       
    265       
    266  
    267       /**
    268        * mem bers stati stic block
    269        */
    270       functi on getBloc kCode_Memb erStat() {
    271           re turn getSi teStatUser ();
    272       }
    273       
    274       
    275       functi on getBloc kCode_Echo ( $iBlockI D, $sConte nt ) {
    276           re turn $sCon tent;
    277       }
    278  
    279  
    280       functi on getBloc kCode_RSS(  $iBlockID , $sConten t ) {
    281           gl obal $tmpl ;
    282           gl obal $logg ed;
    283           
    284           // echoDbg( $ this );
    285           
    286           li st( $sUrl,  $iNum ) =  explode(  '#', $sCon tent );
    287           $i Num = (int )$iNum;
    288           
    289           // echo $this  -> oProfi leV -> _iP rofileID .  'zzzz ';
    290           
    291           if ( isset( $ this -> oP rofileV ->  _iProfile ID ) )
    292                $iAddID  = $this ->  oProfileV  -> _iProf ileID;
    293           el seif( $log ged['membe r'] )
    294                $iAddID  = $_COOKIE ['memberID '];
    295           el se
    296                $iAddID  = 0;
    297           
    298           $s Code = '
    299                <div cla ss="RSSAgg rCont" rss id="' . $i BlockID .  '" rssnum= "' . $iNum  . '" memb er="' . $i AddID . '" >
    300                    <div  style="te xt-align:  center;">
    301                         <img src=" templates/ tmpl_' . $ tmpl . '/i mages/load ing.gif" a lt="' . _t ( '_loadin g ...' ) .  '" />
    302                    </di v>
    303                </div>';
    304           
    305           re turn $sCod e;
    306       }
    307       
    308       functi on getBloc kCode_Shou tbox() {
    309           $s Password =  getPasswo rd( $this  -> iMember ID );
    310           re turn getAp plicationC ontent('sh outbox', ' user', arr ay('id' =>  $this ->  iMemberID,  'password ' => $sPas sword), tr ue);
    311       }
    312       
    313       functi on getBloc kCode_Site Stats() {
    314           re turn getSi teStatUser ();
    315       }
    316   }