696. File Comparison Report

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

696.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\templates\base\scripts BxBaseProfileView.php Thu Jan 31 09:17:20 2008 UTC
2 Dolphin-v.6.1.0\templates\base\scripts BxBaseProfileView.php Wed Apr 23 09:41:28 2008 UTC

696.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 109 758
Changed 68 797
Inserted 28 172
Removed 12 100

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

696.4 Active regular expressions

No regular expressions were active.

696.5 Comparison detail

1   <?   1   <?
2     2  
    3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . "BxDolPa geView.php " );
    4  
3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileView. php' );   5   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileView. php' );
4   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' profilePho tos.php' ) ;   6   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' profilePho tos.php' ) ;
5     7  
6   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );   8   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );
7   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolEv ents.php'  );   9   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolEv ents.php'  );
    10   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolBl ogs.php' ) ;
    11   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolGr oups.php'  );
    12   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolSh aredMedia. php' );
    13  
    14   class BxDo lProfilePa geView ext ends BxDol PageView {
    15       var $o ProfileV;
    16       
    17       var $a ConfSite;
    18       var $a ConfDir;
    19  
    20       functi on BxDolPr ofilePageV iew(&$oPr,  &$aSite,  &$aDir) {
    21           $t his->oProf ileV = &$o Pr;
    22           $t his->aConf Site = $aS ite;
    23           $t his->aConf Dir  = $aD ir;
    24           pa rent::BxDo lPageView( 'profile') ;
    25       }
    26  
    27       functi on getBloc kCode_Acti onsMenu()  {
    28           re turn $this ->oProfile V->showBlo ckActionsM enu('', tr ue);
    29       }
    30       functi on getBloc kCode_Clas sifieds()  {
    31           re turn $this ->oProfile V->showBlo ckClassifi eds('', tr ue);
    32       }
    33       functi on getBloc kCode_Even ts() {
    34           re turn $this ->oProfile V->showBlo ckEvents(' ', true);
    35       }
    36       functi on getBloc kCode_Grou ps() {
    37           re turn $this ->oProfile V->showBlo ckGroups(' ', true);
    38       }
    39       functi on getBloc kCode_Prof ilePolls()  {
    40           re turn $this ->oProfile V->showBlo ckProfileP olls('', t rue);
    41       }
    42       functi on getBloc kCode_Shar eMusic() {
    43           $a Mem = arra y('ID'=>$t his->_iPro fileID);
    44           $o New = new  BxDolShare dMedia('mu sic', $thi s->aConfSi te, $this- >aConfDir,  $aMem);
    45           $a Res = $oNe w->getBloc kCode_Shar edMedia($t his->oProf ileV->_iPr ofileID);
    46  
    47           re turn $aRes ;
    48       }
    49       functi on getBloc kCode_Shar ePhotos()  {
    50           $a Mem = arra y('ID'=>$t his->_iPro fileID);
    51           $o New = new  BxDolShare dMedia('ph oto', $thi s->aConfSi te, $this- >aConfDir,  $aMem);
    52           $a Res = $oNe w->getBloc kCode_Shar edMedia($t his->oProf ileV->_iPr ofileID);
    53           
    54           re turn $aRes ;
    55       }
    56       functi on getBloc kCode_Shar eVideos()  {
    57           $a Mem = arra y('ID'=>$t his->_iPro fileID);
    58           $o New = new  BxDolShare dMedia('vi deo', $thi s->aConfSi te, $this- >aConfDir,  $aMem);
    59           $a Res = $oNe w->getBloc kCode_Shar edMedia($t his->oProf ileV->_iPr ofileID);
    60           
    61           re turn $aRes ;
    62       }
    63       functi on getBloc kCode_PFBl ock( $iBlo ckID, $sCo ntent ) {
    64           re turn $this ->oProfile V->showBlo ckPFBlock( '', $sCont ent, true) ;
    65       }
    66       functi on getBloc kCode_Rate Profile()  {
    67           re turn $this ->oProfile V->showBlo ckRateProf ile('', tr ue);
    68       }
    69       functi on getBloc kCode_Blog () {
    70           re turn $this ->oProfile V->showBlo ckProfileB log('', tr ue);
    71       }
    72       functi on getBloc kCode_Frie nds() {
    73           re turn $this ->oProfile V->showBlo ckFriends( '', true);
    74       }
    75       functi on getBloc kCode_Mutu alFriends( ) {
    76           re turn $this ->oProfile V->showBlo ckMutualFr iends('',  true);
    77       }
    78       functi on getBloc kCode_Mp3( ) {
    79           re turn $this ->oProfile V->showBlo ckMp3('',  true);
    80       }
    81  
    82       functi on getBloc kCode_Tope st($iColum n) {
    83           re turn '<div  class="pa ge_block_c ontainer"> ' . $this- >oProfileV ->showBloc kPhoto($iC olumn, tru e) . '</di v>';
    84       }
    85  
    86       functi on getBloc kCode_Comm ents() {
    87           re turn $this ->oProfile V->showBlo ckComments ('', true) ;
    88       }
    89  
    90       functi on getBloc kCode_Cmts  () {
    91           re turn $this ->oProfile V->showBlo ckCmts();         
    92       }
    93   }
8     94  
9   class BxBa seProfileV iew extend s BxDolPro fileView   95   class BxBa seProfileV iew extend s BxDolPro fileView
10   {   96   {
    97       functi on BxBaseP rofileView ( $ID )
    98       {
    99           $t his -> aMu tualFriend s = array( );
    100           Bx DolProfile View::BxDo lProfileVi ew( $ID );
    101           $t his -> Fin dMutualFri ends();
    102       }
    103       
11       functi on defineT imeInterva l ($iTime)   104       functi on defineT imeInterva l ($iTime)
12       {   105       {
13           $i Time = tim e() - $iTi me;   106           $i Time = tim e() - $iTi me;
14           if  ( $iTime  < 60 )   107           if  ( $iTime  < 60 )
15                $sCode =  "$iTime " ._t("_seco nds ago");   108                $sCode =  "$iTime " ._t("_seco nds ago");
16           el se   109           el se
17           {   110           {
18                $iTime =  round( $i Time / 60  ); // minu tes   111                $iTime =  round( $i Time / 60  ); // minu tes
19                if ( $iT ime < 60 )   112                if ( $iT ime < 60 )
20                    $sCo de = "$iTi me "._t("_ minutes ag o");   113                    $sCo de = "$iTi me "._t("_ minutes ag o");
21                else   114                else
22                {   115                {
23                    $iTi me = round ( $iTime /  60 ); //h ours   116                    $iTi me = round ( $iTime /  60 ); //h ours
24                    if (  $iTime <  24 )   117                    if (  $iTime <  24 )
25                         $sCode = " $iTime "._ t("_hours  ago");   118                         $sCode = " $iTime "._ t("_hours  ago");
26                    else   119                    else
27                    {   120                    {
28                         $iTime = r ound( $iTi me / 24 );  //days   121                         $iTime = r ound( $iTi me / 24 );  //days
29                         $sCode = " $iTime "._ t("_days a go");   122                         $sCode = " $iTime "._ t("_days a go");
30                    }   123                    }
31                }   124                }
32           }   125           }
33           re turn $sCod e;   126           re turn $sCod e;
34       }   127       }
35     128  
36       functi on BxBaseP rofileView ( $ID )    
37       {    
38           $t his -> aMu tualFriend s = array( );    
39           Bx DolProfile View::BxDo lProfileVi ew( $ID );           
40           $t his -> Fin dMutualFri ends();    
41       }    
42           
43       functi on genProf ileCSS( $I D )   129       functi on genProf ileCSS( $I D )
44       {   130       {
45           gl obal $site ;   131           gl obal $site ;
46     132  
47           $r et = '';   133           $r et = '';
48     134  
49           $q uery = "SE LECT * FRO M `Profile sSettings`  WHERE `ID Member` =  '$ID'";   135           $q uery = "SE LECT * FRO M `Profile sSettings`  WHERE `ID Member` =  '$ID'";
50           $a rr = db_ar r( $query  );   136           $a rr = db_ar r( $query  );
51           if  ( $arr['I DMember']  )   137           if  ( $arr['I DMember']  )
52           $r et =  "<st yle type=\ "text/css\ ">   138           $r et =  "<st yle type=\ "text/css\ ">
53                    body   139                    body
54                    {   140                    {
55                         background -image: ur l( {$site[ 'profileBa ckground'] }{$arr['Ba ckgroundFi lename']}) ;   141                         background -image: ur l( {$site[ 'profileBa ckground'] }{$arr['Ba ckgroundFi lename']}) ;
56                         background -color: {$ arr['Backg roundColor ']};   142                         background -color: {$ arr['Backg roundColor ']};
57                         background -repeat:re peat;   143                         background -repeat:re peat;
58                    }   144                    }
59                    div# right_colu mn_content   145                    div# right_colu mn_content
60                    {   146                    {
61                         color: {$a rr['FontCo lor']};   147                         color: {$a rr['FontCo lor']};
62                         font-size:  {$arr['Fo ntSize']}p x;   148                         font-size:  {$arr['Fo ntSize']}p x;
63                         font-famil y: {$arr[' FontFamily ']};   149                         font-famil y: {$arr[' FontFamily ']};
64                    }   150                    }
65                    div# divUnderCu stomizatio n   151                    div# divUnderCu stomizatio n
66                    {   152                    {
67                         color: {$a rr['FontCo lor']};   153                         color: {$a rr['FontCo lor']};
68                         font-size:  {$arr['Fo ntSize']}p x;   154                         font-size:  {$arr['Fo ntSize']}p x;
69                         font-famil y: {$arr[' FontFamily ']};   155                         font-famil y: {$arr[' FontFamily ']};
70                    }   156                    }
71                    </st yle>";   157                    </st yle>";
72     158  
73           re turn $ret;   159           re turn $ret;
74       }   160       }
75          161       
76        function   genColumns (
)
  162        function   genColumns ( $sOldStyle   =   false )   {
77       {    
78           ob _start();   163           ob _start();
79              164  
80           ?>   165           ?>
81           <d iv id="thi n_column">   166           <d iv id="thi n_column">
82                 <?   $this   ->   showColumn Blocks(   1  
);   ?>
  167                 <?   $this   ->   showColumn Blocks(   1 ,   $sOldStyle   );   ?>
83           </ div>   168           </ div>
84              169  
85           <d iv id="thi ck_column" >   170           <d iv id="thi ck_column" >
86                 <?   $this   ->   showColumn Blocks(   2  
);   ?>
  171                 <?   $this   ->   showColumn Blocks(   2 ,   $sOldStyle   );   ?>
87           </ div>   172           </ div>
88           <?   173           <?
89              174  
90           re turn ob_ge t_clean();   175           re turn ob_ge t_clean();
91       }   176       }
92          177       
93        function   showColumn Blocks(   $column  
)
  178        function   showColumn Blocks(   $column ,   $sOldStyle   =   false   )   {
94       {    
95           gl obal $logg ed;   179           gl obal $logg ed;
96           if ( $logged[ 'member']  )   180           if ( $logged[ 'member']  )
97                $sVisibl e = 'memb' ;   181                $sVisibl e = 'memb' ;
98           el se   182           el se
99                $sVisibl e = 'non';   183                $sVisibl e = 'non';
100              184  
101            $rBlocks   =   db_res(   "SELECT   *   FROM   `P rofil eCompose`   WHERE   `
Column`=$c olumn   AND   FIND_IN_SE T(   '$sVisible ',   `Visible`   )  
ORDER   BY   `Order`"   );
  185           $t his -> sho wBlockPhot o( $column  );
102            while(   $aBlock   =   mysql_fetc h_assoc(   $rBlocks   )   )
  186           // return;
103           {   187           $s AddSQL = ( $sOldStyle  == true)  ? " AND `F unc`='PFBl ock' " : ' ';
    188            $rBlocks   =   db_res(   "SELECT   *   FROM   `P ag eCompose`   WHERE   ` Page`   =   'profile'   AND   ` Column`=$c olumn   AND   FIND_IN_SE T(   '$sVisible ',   `Visible`   )   {$sAddSQL}   ORDER   BY   `Order`"   );
    189            while(   $aBlock   =   mysql_fetc h_assoc(   $rBlocks   )   )   {
    190                if ($aBl ock['Func' ] == 'Shar eMusic' ||  $aBlock[' Func'] ==  'ShareVide os' || $aB lock['Func '] == 'Sha rePhotos')
    191                    cont inue;
104                $func =  'showBlock ' . $aBloc k['Func'];   192                $func =  'showBlock ' . $aBloc k['Func'];
105                $this ->  $func( $a Block['Cap tion'], $a Block['Con tent'] );   193                $this ->  $func( $a Block['Cap tion'], $a Block['Con tent'] );
106           }   194           }
107       }   195       }
108          196  
109        function   showBlockP hoto(   $ sCapt i
o n   )
  197        function   showBlockP hoto(   $
i C o l,   $bNoDB   =   false   )
110       {   198       {
111           gl obal $memb erID;   199           if ( $iCol ==  1 ) {
112           gl obal $p_ar r;   200                $iPID =  $this -> _ iProfileID ;
    201                $sNickNa me = $this  -> _aProf ile['NickN ame'];
    202           }  elseif( $i Col == 2 )  {
    203                if( !$th is -> _aPr ofile['Cou ple'] )
    204                    retu rn;
    205  
    206                $iPID =  $this -> _ iProfileID ;
    207                //$iPID  = (int)$th is -> _aPr ofile['Cou ple'];
    208                $sNickNa me = $this  -> _aProf ile['NickN ame'] . '( 2)';
    209           }
113              210  
114            $oPhotos   =   new   ProfilePho tos(   $ this   ->   _ iP rofile ID   );   211            $oPhotos   =   new   ProfilePho tos(   $
iP
ID   );
115           $o Photos ->  getActiveM ediaArray( );   212           $o Photos ->  getActiveM ediaArray( );
116   /*   213  
117           // perform ph oto voting   214           if ( $this ->  _aProfile ['Couple']  && $iCol  != 1 ) {
118           if ( $_REQUES T['voteSub mit'] && $ _REQUEST[' photoID']  )   215                $aCouple Info = get ProfileInf o($this->_ aProfile[' Couple']);
119            {   216                if ($aCo upleInfo[' Picture']= =0) {
120                $oPhotos  -> setVot ing();   217                    $oPh otos = new  ProfilePh otos( $thi s->_aProfi le['Couple '] );
121                $oPhotos  -> getAct iveMediaAr ray();   218                    $oPh otos -> ge tActiveMed iaArray();
122           }   219                }
123   */   220                 $ret   =   $oPhotos   ->   getMediaBl ock($ aCoupleInf o['Pr i m Photo '],   true );
124           $i PhotoID =  (int)$_REQ UEST['phot oID'];   221           }  else {
125            $ret   =   $oPhotos   ->   getMediaBl ock(   $
i
Photo ID   );
  222                $ret = $ oPhotos ->  getMediaB lock(0);
    223           }
126              224  
127            echo   DesignBoxC ontent(   _t(   $sCap t i o n ,   $ p_arr[' NickName ']   ),   $ret,   1   );   225           if  ($bNoDB)  {
    226                return D esignBoxCo ntent( _t(  '_PROFILE  Photos',  $sNickName  ), $ret,  1 );
    227           }  else {
    228                 echo   DesignBoxC ontent(   _t(   '_PROFILE   Pho t
o s' ,   $ s NickName  
),   $ret,   1   );
    229           }
128       }   230       }
129     231  
130     232  
131        function   showBlockR SS(   $sCaption,   $sContent  
)
  233        function   showBlockR SS(   $sCaption,   $sContent ,   $bNoDB   =   false   )
132       {   234       {
133           gl obal $p_ar r, $site;   235           gl obal $p_ar r, $site;
134     236  
135           li st( $sUrl,  $iNum ) =  explode(  '#', $sCon tent );   237           li st( $sUrl,  $iNum ) =  explode(  '#', $sCon tent );
136           $i Num = (int )$iNum;   238           $i Num = (int )$iNum;
137              239           
138           $s Url = str_ replace(ar ray('{Site Url}', '{N ickName}') ,array($si te['url'],  $p_arr['N ickName']) , $sUrl);   240           $s Url = str_ replace(ar ray('{Site Url}', '{N ickName}') ,array($si te['url'],  $p_arr['N ickName']) , $sUrl);
139     241  
140           $r et = genRS SHtmlOut(  $sUrl, $iN um );   242           $r et = genRS SHtmlOut(  $sUrl, $iN um );
141              243           
    244           if  ($bNoDB)  {
    245                return $ ret;
    246           }  else {
142           ec ho DesignB oxContent(  _t($sCapt ion), $ret , 1 );   247                echo Des ignBoxCont ent( _t($s Caption),  $ret, 1 );
143       }   248           }
    249       }
144          250       
145       functi on showBlo ckEcho( $s Caption, $ sContent )   251       functi on showBlo ckEcho( $s Caption, $ sContent )
146       {   252       {
147           ec ho DesignB oxContent(  _t($sCapt ion), $sCo ntent, 1 ) ;   253           ec ho DesignB oxContent(  _t($sCapt ion), $sCo ntent, 1 ) ;
148       }   254       }
149          255       
150        function   showBlock Looking F orDetai l s (   $sCaption  
)
  256        function   showBlock P F B l ock (   $sCaption ,   $sContent,   $bNoDB   =   false   )   {
151       {   257           $i BlockID =  (int)$sCon tent;
152           $a Fields  =  $this -> c ollectProf ileFieldsB yCateg( 4  );   258           if ( !isset(  $this -> a PFBlocks[$ iBlockID]  ) or empty ( $this ->  aPFBlocks [$iBlockID ]['Items']  ) )
153           $s Details =  $this -> s howProfile Fields( $a Fields );   259                return ' ';
    260           $a Items = $t his -> aPF Blocks[$iB lockID]['I tems'];
154              261  
155           if ( strlen(  $sDetails  ) )   262           $s Ret = '<ta ble class= "profile_i nfo_block"  cellspaci ng="0" cel lpadding=" 1">';
156           {    
157                ob_start ();    
158                ?>    
159                    <div  id="profi le_details _wrapper">    
160                         <div class ="clear_bo th"></div>    
161                         <?= $sDeta ils ?>    
162                         <div class ="clear_bo th"></div>    
163                    </di v>    
164                <?    
165                $ret = o b_get_clea n();    
166                   263           
167                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1  );   264           fo reach( $aI tems as $a Item ) {
    265                $sValue1  = $this - > oPF -> g etViewable Value( $aI tem, $this  -> _aProf ile[ $aIte m['Name']  ] );
    266                if( !$sV alue1 ) // if empty,  do not dra w
    267                    cont inue;
    268                
    269                $sRet .=  '<tr>';
    270                $sRet .=          ' <td class= "profile_i nfo_label" >' . htmls pecialchar s( _t( $aI tem['Capti on'] ) ) .  ':</td>';
    271                
    272                if( $thi s -> bCoup le ) {
    273                    if(  in_array(  $aItem['Na me'], $thi s -> aCoup leMutualIt ems ) ) {
    274                         $sRet .= ' <td class= "profile_i nfo_value"  colspan=" 2">' . $sV alue1 . '< /td>';
    275                    } el se {
    276                         $sValue2 =  $this ->  oPF -> get ViewableVa lue( $aIte m, $this - > _aCouple [ $aItem[' Name'] ] ) ;
    277                        
    278                         $sRet .= ' <td class= "profile_i nfo_value1 ">' . $sVa lue1 . '</ td>';
    279                         $sRet .= ' <td class= "profile_i nfo_value2 ">' . $sVa lue2 . '</ td>';
168           }   280                    }
    281                } else {
    282                    $sRe t .=     ' <td class= "profile_i nfo_value"  >' . $sVa lue1 . '</ td>';
169       }   283                }
170          284                
171       functi on showBlo ckProfileP olls( $sCa ption )   285                $sRet .=  '</tr>';
172        {   286            }
    287           
    288           $s Ret .= '</ table>';
    289           
    290           if  ($bNoDB)  {
    291                return $ sRet;
    292           }  else {
    293                echo Des ignBoxCont ent( _t($s Caption),  $sRet, 1 ) ;
    294           }
    295       }
    296       
    297       functi on showBlo ckProfileP olls( $sCa ption, $bN oDB = fals e ) {
173           $s qlPolls =  "SELECT `i d_poll` FR OM `Profil esPolls` W HERE `id_p rofile` =  {$this ->  _iProfileI D} AND `po ll_status`  = 'active ' AND `pol l_approval `";   298           $s qlPolls =  "SELECT `i d_poll` FR OM `Profil esPolls` W HERE `id_p rofile` =  {$this ->  _iProfileI D} AND `po ll_status`  = 'active ' AND `pol l_approval `";
174           $r Polls = db _res( $sql Polls );   299           $r Polls = db _res( $sql Polls );
175              300  
176           if ( !mysql_n um_rows( $ rPolls ) )   301           if ( !mysql_n um_rows( $ rPolls ) )
177                return ;   302                return ;
178              303  
179           $r et = '<div  id="profi le_poll_wr ap">';   304           $r et = '<div  id="profi le_poll_wr ap">';
180            while(   $aPoll   =   mysql_fetc h_assoc(   $rPolls   )   )
  305            while(   $aPoll   =   mysql_fetc h_assoc(   $rPolls   )   )   {
181           {   306                $ret .=  '<div clas s="blog_wr apper_n" s tyle="widt h:80%;bord er:1px das hed #CCCCC C;">' .  ShowPoll(  $aPoll['i d_poll'] ) ;
182                $ret .=
 ShowPoll(  $aPoll['i d_poll'] ) ;
  307                 $ret   .=   '< /div>< div   class="cle ar_both">< /div>';
183                 $ret   .=   '<
div   class="cle ar_both">< /div>';
   
184           }   308           }
185           $r et .= '</d iv>';   309           $r et .= '</d iv>';
186              310  
187           $s how_hide =  $this ->  genShowHid eItem( 'pr ofile_poll _wrap' );   311           $s how_hide =  $this ->  genShowHid eItem( 'pr ofile_poll _wrap' );
188              312  
    313           if  ($bNoDB)  {
    314                return $ ret;
    315           }  else {
189           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   316                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1,  $show_hid e );
190       }   317           }
    318       }
191          319       
192       functi on genShow HideItem(  $wrapperID , $default  = '' )   320       functi on genShow HideItem(  $wrapperID , $default  = '' )
193       {   321       {
194           if ( !$defaul t )   322           if ( !$defaul t )
195                $default  = _t( '_H ide' );   323                $default  = _t( '_H ide' );
196              324           
197           re turn '   325           re turn '
198           <d iv class=" caption_it em">   326           <d iv class=" caption_it em">
199                <a href= "javascrip t:void(0); "   327                <a href= "javascrip t:void(0); "
200                  onclic k="el = do cument.get ElementByI d(\'' . $w rapperID .  '\'); if(  el.style. display ==  \'none\'  ) {el.styl e.display  = \'block\ '; this.in nerHTML =  \'' . _t(  '_Hide' )  . '\';} el se {el.sty le.display  = \'none\ '; this.in nerHTML =  \'' . _t(  '_Show' )  . '\';}"   328                  onclic k="el = do cument.get ElementByI d(\'' . $w rapperID .  '\'); if(  el.style. display ==  \'none\'  ) {el.styl e.display  = \'block\ '; this.in nerHTML =  \'' . _t(  '_Hide' )  . '\';} el se {el.sty le.display  = \'none\ '; this.in nerHTML =  \'' . _t(  '_Show' )  . '\';}"
201                  >' . $ default .  '</a>   329                  >' . $ default .  '</a>
202           </ div>';   330           </ div>';
203       }   331       }
204          332       
205        function   showBlockA ctionsMenu (   $sCaption  
)
  333        function   showBlockA ctionsMenu (   $sCaption ,   $bNoDB   =   false   )
206       {   334       {
207           gl obal $logg ed;   335           gl obal $logg ed;
208           gl obal $p_ar r;   336           gl obal $p_ar r;
209              337           
210           $o TemplMenu  = new BxTe mplMenu( $ this -> oT emplConfig  );   338           $o TemplMenu  = new BxTe mplMenu( $ this -> oT emplConfig  );
211              339           
212           if ( !$logged ['member']  or !$p_ar r )   340           if ( !$logged ['member']  or !$p_ar r )
213                return ' ';   341                return ' ';
214              342           
215           $m emberID  =  (int)$_CO OKIE['memb erID'];   343           $m emberID  =  (int)$_CO OKIE['memb erID'];
216           $p rofileID =  (int)$p_a rr['ID'];   344           $p rofileID =  (int)$p_a rr['ID'];
217              345           
218           if ( $memberI D == $prof ileID )   346           if ( $memberI D == $prof ileID )
219                return ' ';   347                return ' ';
220              348           
221           /*  * * * Ray  IM Integr ation * *  * */   349           /*  * * * Ray  IM Integr ation * *  * */
222              350           
223           $c heck_res_i m = checkA ction( $me mberID, AC TION_ID_US E_RAY_IM ) ;   351           $c heck_res_i m = checkA ction( $me mberID, AC TION_ID_US E_RAY_IM ) ;
224     352  
225           if ( ( getPar am( 'enabl e_ray' ) = = 'on' ) a nd   353           if ( ( getPar am( 'enabl e_ray' ) = = 'on' ) a nd
226               get_user_ online_sta tus( $prof ileID ) an d   354               get_user_ online_sta tus( $prof ileID ) an d
227               ( $check_ res_im[CHE CK_ACTION_ RESULT] ==  CHECK_ACT ION_RESULT _ALLOWED )  )   355               ( $check_ res_im[CHE CK_ACTION_ RESULT] ==  CHECK_ACT ION_RESULT _ALLOWED )  )
228           {   356           {
229                $sSndPas sword = ge tPassword(  $memberID  );   357                $sSndPas sword = ge tPassword(  $memberID  );
230                   358                
231                 $IMNow   =   $oTemplMen u   ->   get
MenuItem(   'action_im .gif',   _t(   '_ChatNow' ,   $p_arr['Ni ckName']   ),   "javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'im',   'user',   '$memberID ',   '$sSndPass word',   '$profileI D'   );"   );
  359                 $IMNow   =   $oTemplMen u   ->   get Actions MenuItem(   'action_im .gif',   _t(   '_ChatNow' ,   $p_arr['Ni ckName']   ),   "javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'im',   'user',   '$memberID ',   '$sSndPass word',   '$profileI D'   );"   );
232           }   360           }
233           el se   361           el se
234                $IMNow =  '';   362                $IMNow =  '';
235              363           
236           /*  * * * Ray  IM Integr ation [END ]* * * */   364           /*  * * * Ray  IM Integr ation [END ]* * * */
237              365           
238           $r et = '<div  class="me nuBlock">' ;   366           $r et = '<div  class="me nuBlock">' ;
239                $ret .=  '<div clas s="menu_it em_block"> ';   367                $ret .=  '<div clas s="menu_it em_block"> ';
240                $ret .=  '<div clas s="menu_it em_block_l eft">';   368                $ret .=  '<div clas s="menu_it em_block_l eft">';
241                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_se nd.gif',   _t('_SendL etter'),       "compose.p hp?ID=$pro fileID"   );
  369                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_se nd.gif',   _t('_SendL etter'),       "compose.p hp?ID=$pro fileID"   );
242                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_fa ve.gif',   _t('_Fave' ),       "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =hot&amp;I D=$profile ID',      '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  370                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_fa ve.gif',   _t('_Fave' ),       "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =hot&amp;I D=$profile ID',      '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
243                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_fr iends.gif' ,   _t('_Befri end'),"jav ascript:vo id(0);",   '',   '',   "window.op en(   'list_pop. php?action =friend&am p;ID=$prof ileID',   '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  371                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_fr iends.gif' ,   _t('_Befri end'),"jav ascript:vo id(0);",   '',   '',   "window.op en(   'list_pop. php?action =friend&am p;ID=$prof ileID',   '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
244                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_gr eet.gif',   _t('_Greet '),       "javascrip t:void(0); ",   '',   '',   "window.op en(   'greet.php ?sendto=$p rofileID',                     '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  372                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_gr eet.gif',   _t('_Greet '),       "javascrip t:void(0); ",   '',   '',   "window.op en(   'greet.php ?sendto=$p rofileID',                     '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
245                    $ret  .= $IMNow ;   373                    $ret  .= $IMNow ;
246                    if (  !$this ->  oTemplCon fig -> bAn onymousMod e )   374                    if (  !$this ->  oTemplCon fig -> bAn onymousMod e )
247                         $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_em ail.gif',   _t('_Get   E-mail'),     "javascrip t:void(0); ",   '',   '',   "window.op en(   'freemail. php?ID=$pr ofileID',   '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  375                         $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_em ail.gif',   _t('_Get   E-mail'),     "javascrip t:void(0); ",   '',   '',   "window.op en(   'freemail. php?ID=$pr ofileID',   '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
248                    $ret  .= '</div >';   376                    $ret  .= '</div >';
249                    $ret  .= '<div  class="men u_item_blo ck_right"> ';   377                    $ret  .= '<div  class="men u_item_blo ck_right"> ';
250                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_ph otos.gif',  
_t('_Profi lePhotos') ,  
"photos_ga llery.php? ID=$profil eID");
  378                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_ph otos.gif',   $this->get LinkStat(' prPhoto',   _t('_Profi lePhotos') ,   $profileID ),   "photos_ga llery.php? ID=$profil eID");
251                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_vi deos.gif',  
_t('_Profi leVideos') ,    
"javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'video',   'player',   '$profileI D'   );"   );
  379                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_vi deos.gif',   $this->get LinkStat(' prVideo',   _t('_Profi leVideos') ,   $profileID ),   "javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'video',   'player',   '$profileI D'   );"   );
252                     //$ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_vi deos.gif',   _t('_Profi leVideos') ,   " medi a _g a lle r y.ph p ?sh o w= video &ID= $profileID
");
  380                     //                 $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_vi deos.gif',   _t('_Profi leVideos') ,     " j a v a sc r i p t:v o id(0);",   '',   '',   "openRayWi dget(   ' video ',   'player',   ' $profileID '   ); "   );
253                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_mu sic.gif',  
_t('_Profi leMusic'),  
"javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'mp3',   'player',   '$profileI D',   '"   .   getPasswor d(   $memberID   )   .   "',   '$memberID ');");
  381                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_mu sic.gif',   $this->get LinkStat(' prMusic',   _t('_Profi leMusic'),   $profileID ),   "javascrip t:void(0); ",   '',   '',   "openRayWi dget(   'mp3',   'player',   '$profileI D',   '"   .   getPasswor d(   $memberID   )   .   "',   '$memberID ');");
254                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_sh are.gif',   _t('_Share '),     "javascrip t:void(0); ",   '',   '',   "return   launchTell FriendProf ile($profi leID);"   );
  382                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_sh are.gif',   _t('_Share '),     "javascrip t:void(0); ",   '',   '',   "return   launchTell FriendProf ile($profi leID);"   );
255                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_re port.gif',   _t('_Repor t'),     "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =spam&amp; ID=$profil eID',     '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  383                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_re port.gif',   _t('_Repor t'),     "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =spam&amp; ID=$profil eID',     '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
256                     $ret   .=   $oTemplMen u   ->   get
MenuItem(   'action_bl ock.gif',   _t('_Block '),      "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =block&amp ;ID=$profi leID',    '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
  384                     $ret   .=   $oTemplMen u   ->   get Actions MenuItem(   'action_bl ock.gif',   _t('_Block '),      "javascrip t:void(0); ",   '',   '',   "window.op en(   'list_pop. php?action =block&amp ;ID=$profi leID',    '',   'width={$t his   ->   oTemplConf ig   ->   popUpWindo wWidth},he ight={$thi s   ->   oTemplConf ig   ->   popUpWindo wHeight},m enubar=no, status=no, resizable= no,scrollb ars=yes,to olbar=no,l ocation=no '   );"   );
257                $ret .=  '</div>';   385                $ret .=  '</div>';
258                $ret .=  '<div clas s="clear_b oth"></div >';   386                $ret .=  '<div clas s="clear_b oth"></div >';
259                $ret .=  '</div>';   387                $ret .=  '</div>';
260           $r et .= '</d iv>';   388           $r et .= '</d iv>';
    389  
    390           if  ($bNoDB)  {
    391                return $ ret;
    392           }  else {
261           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1 );   393                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1  );
262       }   394           }
    395       }
263          396       
264        function   showBlockR ateProfile (   $sCaption  
)
  397        function   showBlockR ateProfile (   $sCaption ,   $bNoDB   =   false   )
265       {   398       {
266           gl obal $site ;   399           gl obal $site ;
267           gl obal $vote s;   400           gl obal $vote s;
268              401           
269           //  Check if  profile vo tes enable d   402           //  Check if  profile vo tes enable d
270           if  (!$votes  || !$this- >oVotingVi ew->isEnab led()) ret urn;   403           if  (!$votes  || !$this- >oVotingVi ew->isEnab led()) ret urn;
271     404  
272           $r et = $this ->oVotingV iew->getBi gVoting();   405           $r et = $this ->oVotingV iew->getBi gVoting();
273     406  
    407           if  ($bNoDB)  {
    408                return $ ret;
    409           }  else {
274           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1 );   410                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1  );
275       }   411           }
276           
277       functi on showBlo ckProfileD etails( $s Caption )    
278       {    
279           gl obal $prof ;    
280           gl obal $enab le_zodiac;    
281           gl obal $p_ar r;    
282           gl obal $site ;    
283               
284           $a Fields  =  $this -> c ollectProf ileFieldsB yCateg( 0  );    
285           $s Details =  $this -> s howProfile Fields( $a Fields );    
286               
287           $s TagsAddon  = "";    
288           $s TagsQuery  = "SELECT  `Tag` FROM  `Tags` WH ERE `ID`=' {$p_arr['I D']}' AND  `Type` = ' profile'";    
289           $r Tags = db_ res( $sTag sQuery );    
290           wh ile( $aTag s = mysql_ fetch_asso c( $rTags  ) )    
291                $sTagsAd don .= "<a  href='" .  $site['ur l'] . "sea rch_result .php?tag="  . $aTags[ 'Tag'] . " '>" . $aTa gs['Tag']  . "</a>, " ;    
292           $s TagsAddon  = rtrim ($ sTagsAddon , ", ");     
293           $b OnlineStat us = get_u ser_online _status($p _arr['ID'] );    
294           $s OnlineStat us = ($bOn lineStatus  == true)  ? _t('Onli ne') : _t( 'Offline') ;    
295           ob _start();    
296           ?>    
297                <div id= "profile_d etails_wra pper">    
298                    <tab le>    
299                         <?= $sDeta ils ?>    
300                         <tr>    
301                             <td cl ass="profi le_td_1">T ags:</td>    
302                             <td cl ass="profi le_td_2">< ?php echo  $sTagsAddo n ?></td>    
303                         </tr>    
304                         <tr>    
305                             <td cl ass="profi le_td_1">S tatus:</td >    
306                             <td cl ass="profi le_td_2">< div class= "member_st atus"><?ph p echo $sO nlineStatu s ?></div> </td>    
307                         </tr>    
308                    </ta ble>    
309                </div>    
310           <?    
311           $r et = ob_ge t_clean();    
312               
313           ec ho DesignB oxContent(  _t( $sCap tion, $p_a rr['NickNa me'] ), $r et, 1 );    
314       }   412       }
315          413  
316        function   showBlock Descrip t ion s(   $sCaption   )   414        function   showBlock Cm t
s(  
)
317       {   415       {
318           if ( strlen(   $this ->  _aProfile[ 'Descripti onMe'] ) )   416           if  (!$this-> oCmtsView- >isEnabled ()) return  '';
319           {    
320                $text =  '<div clas s="discr"> ' .     
321                    '<di v class="r ss_item_he ader">' .  process_te xt_output(  $this ->  _aProfile[ 'Headline' ] ) . '</d iv>' .    
322                    proc ess_smiles ( process_ text_outpu t( $this - > _aProfil e['Descrip tionMe'] )  ) .    
323                '</div>' ;    
324                echo Des ignBoxCont ent( _t( $ sCaption ) ,  $text,  1 );    
325           }    
326              417  
327           if ( strlen(  $this -> _ aProfile[' Descriptio nYou'] ) )   418           re turn $this ->oCmtsVie w->getComm entsFirst  ();
328           {    
329                $text =  '<div clas s="discr"> ' . proces s_smiles(  process_te xt_output(  $this ->  _aProfile[ 'Descripti onYou'] )  ) . '</div >';    
330                echo Des ignBoxCont ent( _t( ' _Ideal mat ch descrip tion' ), $ text, 1 );    
331           }    
332       }   419       }
333          420  
334        function   showBlockF riends(   $sCaption  
)
  421        function   showBlockF riends(   $sCaption ,   $bNoDB   =   false   )
335       {   422       {
336           gl obal $site ;   423           gl obal $site ;
337              424           
338           $s FriendList  = ShowFri endList( $ this -> _i ProfileID,  $this ->  aMutualFri ends );   425           $s FriendList  = ShowFri endList( $ this -> _i ProfileID,  $this ->  aMutualFri ends );
339           $i FriendNums  = getFrie ndNumber(  $this -> _ iProfileID  );   426           $i FriendNums  = getFrie ndNumber(  $this -> _ iProfileID  );
340              427           
341           if ( $sFriend List )   428           if ( $sFriend List )
342           {   429           {
343                ob_start ();   430                ob_start ();
344                   431                
345                ?>   432                ?>
346                    <div  class="cl ear_both"> </div>   433                    <div  class="cl ear_both"> </div>
347                    <?=  $sFriendLi st ?>   434                    <?=  $sFriendLi st ?>
348                    <div  class="cl ear_both"> </div>   435                    <div  class="cl ear_both"> </div>
349                <?   436                <?
350                   437                
351                $ret = o b_get_clea n();   438                $ret = o b_get_clea n();
352                   439                
353                $sFriend Info = '<d iv class=" caption_it em"><a hre f="'.$site ['url'].'v iewFriends .php?iUser ='.$this - > _iProfil eID.'">'.$ iFriendNum s.' '._t(" _Friends") .'</a></di v>';   440                $sFriend Info = '<d iv class=" caption_it em"><a hre f="'.$site ['url'].'v iewFriends .php?iUser ='.$this - > _iProfil eID.'">'.$ iFriendNum s.' '._t(" _Friends") .'</a></di v>';
354                   441                
    442                if ($bNo DB) {
    443                    $aDb TopMenu =  array(
    444                         _t("_Frien ds") => ar ray( 
    445                             'href'  => "{$sit e['url']}v iewFriends .php?iUser ={$this ->  _iProfile ID}"
    446                         )
    447                    );
    448                    
    449                    retu rn array(  $ret, $aDb TopMenu );
    450                } else {
355                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1,  $sFriendI nfo );   451                    echo  DesignBox Content( _ t( $sCapti on ), $ret , 1, $sFri endInfo );
356           }   452                }
357       }   453           }
    454       }
    455  
    456       functi on showBlo ckProfileB log( $sCap tion, $bNo DB = false  ) {
358     457  
359       functi on showBlo ckProfileB log( $sCap tion )    
360       {    
361           gl obal $site ;   458           gl obal $site ;
362           gl obal $shor t_date_for mat;   459  
363           $p hp_date_fo rmat = get Param( 'ph p_date_for mat ');    
364           $i BlogLimitC hars = (in t)getParam ("max_blog _preview") ;    
365           $I D = $this  -> _iProfi leID;   460           $I D = $this  -> _iProfi leID;
    461  
    462           if  ($ID > 0)  {
366           $s Query = "   463                $sQuery  = "
367                SELECT D ISTINCT   464                SELECT D ISTINCT
368                    
`BlogPosts `.`PostID` ,
  465                     COUNT( `BlogPosts `.`PostID` )
369                    `Blo gPosts`.`C ategoryID` ,    
370                    `Blo gPosts`.`P ostText`,    
371                    UNIX _TIMESTAMP ( `BlogPos ts`.`PostD ate` ) AS  `PostDate` ,    
372                    `Blo gPosts`.`P ostCaption `,    
373                    `Blo gCategorie s`.`Catego ryName`,    
374                    COUN T( `BlogPo stComments `.`Comment ID` ) AS ` CommentsNu m`    
375                FROM `Bl ogCategori es`   466                FROM `Bl ogCategori es`
376                INNER JO IN `BlogPo sts` ON   467                INNER JO IN `BlogPo sts` ON
377                     `Bl ogCategori es`.`Categ oryID` = ` BlogPosts` .`Category ID`   468                     `Bl ogCategori es`.`Categ oryID` = ` BlogPosts` .`Category ID`
378                LEFT JOI N `BlogPos tComments`  ON    
379                    `Blo gPosts`.`P ostID` = ` BlogPostCo mments`.`P ostID`    
380                WHERE   469                WHERE
381                    `Blo gCategorie s`.`OwnerI D`  = {$ID } AND   470                    `Blo gCategorie s`.`OwnerI D`  = {$ID } AND
382                    `Blo gPosts`.`P ostReadPer mission` =  'public'  AND   471                    `Blo gPosts`.`P ostReadPer mission` =  'public'  AND
383                    `Blo gPosts`.`P ostStatus`          =  'approval '   472                    `Blo gPosts`.`P ostStatus`          =  'approval '
384                GROUP BY    
385                    `Blo gPosts`.`P ostID`    
386                ORDER BY    
387                    `Blo gPosts`.`P ostDate` D ESC    
388                LIMIT 5    
389                ";   473                ";
    474                $iBlogs  = db_value ( $sQuery  );
390              475  
391            $ r Blogs   =   db_r e
s(   $sQuery   );
  476                if( $iBl ogs > 0 )  {
392              477                     $ o Blogs   =   n e w   BxDolBlog s(
);
393           if ( !mysql_n um_rows( $ rBlogs ) )   478                    $sBl ocks = $oB logs->GenA nyBlockCon tent('last ', $ID);
394                return ' ';   479                    $ret  = <<<EOF
395               
396           ob _start();    
397           ?>    
398           <d iv id="con tainer_blo gs">   480   <div id="c ontainer_b logs">
399           <?   481       {$sBlo cks}
400               
401           wh ile( $aBlo g = mysql_ fetch_asso c( $rBlogs  ) )    
402           {    
403                $sLinkMo re = '';    
404                if( strl en( $aBlog ['PostText ']) > $iBl ogLimitCha rs )     
405                    //$s LinkMore =  "... <a h ref=\"".$s ite['url'] ."blog.php ?owner=".$ ID."&show= blog&blogI D=".$aBlog ['PostID'] ."\">"._t( '_Read mor e')."</a>" ;    
406                    $sLi nkMore = " ... <a hre f=\"".$sit e['url']." blogs.php? action=sho w_member_p ost&amp;ow nerID=".$I D."&amp;po st_id=".$a Blog['Post ID']."\">" ._t('_Read  more')."< /a>";    
407      
408                $sBlogSn ippet = mb _substr( s trip_tags(  $aBlog['P ostText']  ), 0, $iBl ogLimitCha rs ) . $sL inkMore;    
409                ?>    
410                    <div  class="bl ogBlock">    
411                         <div class ="blogHead ">    
412                             <? ech o '<a href ="' . $sit e['url'] .  'blogs.ph p?action=s how_member _post&amp; ownerID='. $ID.'&amp; post_id='  . $aBlog[' PostID'] .  '" class= "bottom_te xt">' ?>    
413                                 <? = $aBlog[' PostCaptio n'] ?>    
414                             </a>    
415                         </div>    
416                         <div class ="blogInfo ">    
417                             <span> <img src=" <?= getTem plateIcon(  'clock.gi f' ) ?>" / ><?= date(  $php_date _format, $ aBlog['Pos tDate'] )  . ' ' ?></ span>    
418                             <span> <?= _t( '_ in Categor y', getTem plateIcon(  'folder_s mall.png'  ), 'blogs. php?action =show_memb er_blog&ow nerID='.$I D.'&catego ry='.$aBlo g['Categor yID'], $aB log['Categ oryName']  ) . '; ' ? ></span>    
419                             <span> <?= _t( '_ comments N ', getTemp lateIcon(  'add_comme nt.gif' ),  $aBlog['C ommentsNum '] ) ?></s pan>    
420                         </div>    
421                         <div class ="blogSnip pet">    
422                             <?= $s BlogSnippe t ?>    
423                         </div>    
424                    </di v>   482   </div>
425                <?   483   EOF;
426           }            
427           ?>    
428           </ div>    
429           <?    
430           $r et = ob_ge t_clean();    
431              484  
432           $s how_hide =  $this ->  genShowHid eItem( 'co ntainer_bl ogs' );   485                    $sho w_hide = $ this->genS howHideIte m( 'contai ner_blogs'  );
433              486                    if ( $bNoDB) {
    487                         return $re t;
    488                    } el se {
434           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   489                         echo Desig nBoxConten t( _t( $sC aption ),  $ret, 1, $ show_hide  );
435  
        
  490                     }
    491                } else
    492                    retu rn;
    493           }  else {
    494                if ($bNo DB) {
    495                    retu rn MsgBox(  _t('_im_t extNoCurrU ser') );
    496                } else {
    497                    echo  MsgBox( _ t('_im_tex tNoCurrUse r') );
    498                }
    499           }
436       }   500       }
437          501       
438        function   showBlockC lassifieds (   $sCaption  
)
  502        function   showBlockC lassifieds (   $sCaption ,   $bNoDB   =   false   )   {
439       {    
440           gl obal $site ;   503           gl obal $site ;
441           gl obal $shor t_date_for mat;   504  
442           $p hp_date_fo rmat = get Param( 'ph p_date_for mat ');    
443           // $iBlogLimi tChars = ( int)getPar am("max_cl assified_p review");    
444           $i BlogLimitC hars = (in t)getParam ("max_blog _preview") ;    
445           $I D = $this  -> _iProfi leID;   505           $I D = $this  -> _iProfi leID;
    506  
    507           if  ($ID > 0)  {
446           $s Query = "   508                $sQuery  = "
447                SELECT D ISTINCT   509                    SELE CT DISTINC T
448                `Classif iedsAdvert isements`. `ID`,   510                    COUN T(*)
449                `Classif iedsAdvert isements`. `Subject`,    
450                `Classif iedsAdvert isements`. `Media`,    
451                `Profile s`.`NickNa me`,    
452                UNIX_TIM ESTAMP( `C lassifieds Advertisem ents`.`Dat eTime` ) a s `DateTim e_f`,    
453                `Classif iedsAdvert isements`. `DateTime` ,    
454                `Classif ieds`.`Nam e`, `Class ifieds`.`I D` AS `Cat ID`,    
455                `Classif iedsSubs`. `NameSub`,  `Classifi edsSubs`.` ID` AS `Su bCatID`,    
456                `Classif iedsAdvert isements`. `Message`,    
457                COUNT(`C lsAdvComme nts`.`ID`)  AS 'CommC ount'    
458                FROM `Cl assifiedsA dvertiseme nts`   511                    FROM  `Classifi edsAdverti sements`
459                LEFT JOI N `Classif iedsSubs`    
460                ON `Clas sifiedsSub s`.`ID`=`C lassifieds Advertisem ents`.`IDC lassifieds Subs`    
461                LEFT JOI N `Classif ieds`    
462                ON `Clas sifieds`.` ID`=`Class ifiedsSubs `.`IDClass ified`    
463                LEFT JOI N `Profile s` ON `Pro files`.`ID `=`Classif iedsAdvert isements`. `IDProfile `    
464                LEFT JOI N `ClsAdvC omments` O N `ClsAdvC omments`.` IDAdv`=`Cl assifiedsA dvertiseme nts`.`ID`    
465                WHERE   512                    WHER E
466                 `Classifie dsAdvertis ements`.`I DProfile`    =  
{$ID}  
AND
  513                     `Classifie dsAdvertis ements`.`I DProfile`    =   ' {$ID} '   AND   `Classifie dsAdvertis ements`.`S tatus`   =   'active'
467                `Classif iedsAdvert isements`. `Status` =  'active'    
468                GROUP BY  `Classifi edsAdverti sements`.` ID`   514                    GROU P BY `Clas sifiedsAdv ertisement s`.`ID`
469                ORDER BY  `DateTime ` DESC    
470                LIMIT 5    
471           ";   515                ";
    516                $iBlogs  = db_value ( $sQuery  );
472     517  
473           $r Blogs = db _res( $sQu ery );   518                if( $iBl ogs > 0 )  {
474               
475           if ( !mysql_n um_rows( $ rBlogs ) )    
476                return ' ';    
477               
478           ob _start();    
479           ?>    
480           <d iv id="con tainer_cla ssifieds">    
481           <?    
482      
483           $o Classified s = new Bx DolClassif ieds();   519                    $oCl assifieds  = new BxDo lClassifie ds();
484     520                    $sBl ocks = $oC lassifieds ->GenAnyBl ockContent ('last', $ ID);
485           wh ile( $aBlo g = mysql_ fetch_asso c( $rBlogs  ) )   521                    $ret  = <<<EOF
486           {   522   <div id="c ontainer_c lassifieds ">
487                $sPic =  $oClassifi eds->getIm ageCode($a Blog['Medi a'],TRUE);   523       {$sBlo cks}
488      
489                $sLinkMo re = '';    
490                if( strl en( $aBlog ['Message' ]) > $iBlo gLimitChar s )     
491                    //$s LinkMore =  "... <a h ref=\"".$s ite['url'] ."blog.php ?owner=".$ ID."&show= blog&blogI D=".$aBlog ['PostID'] ."\">"._t( '_Read mor e')."</a>" ;    
492                    $sLi nkMore = " ... <a hre f=\"".$sit e['url']." classified s.php?Show Advertisem entID=".$a Blog['ID'] ."\">"._t( '_Read mor e')."</a>" ;    
493      
494                $sBlogSn ippet = mb _substr( s trip_tags(  $aBlog['M essage'] ) , 0, $iBlo gLimitChar s ) . $sLi nkMore;    
495                ?>    
496                    <div  class="th umbnail_bl ock" style ="float:le ft;width:4 5px;height :45px;marg in-right:1 0px;margin -top:10px; position:r elative;">    
497                         <?= $sPic  ?>    
498                    </di v>    
499                    <div  class="bl og_wrapper " style="w idth:290px ;float:lef t;position :relative; ">    
500                         <div class ="blogHead 1" style=" ">    
501                             <? ech o '<a href ="' . $sit e['url'] .  'classifi eds.php?Sh owAdvertis ementID='  . $aBlog[' ID'] . '"  class="bot tom_text"> ' ?>    
502                                 <? = $aBlog[' Subject']  ?>    
503                             </a>    
504                         </div>    
505                         <div class ="blogInfo ">    
506                             <span> <img src=" <?= getTem plateIcon(  'clock.gi f' ) ?>" / ><?= date(  $php_date _format, $ aBlog['Dat eTime_f']  ) . ' ' ?> </span>    
507                             <span> <?= _t( '_ in Categor y', getTem plateIcon(  'folder_s mall.png'  ), 'classi fieds.php? bClassifie dID='.$aBl og['CatID' ], process _line_outp ut($aBlog[ 'Name']) ) .' / '.    
508                             '<a hr ef="classi fieds.php? bSubClassi fiedID=' .  $aBlog['S ubCatID']. '">'.proce ss_line_ou tput($aBlo g['NameSub ']).'</a>'  ?></span>    
509                             <span> <?= _t( '_ comments N ', getTemp lateIcon(  'add_comme nt.gif' ),  $aBlog['C ommCount']  ) ?></spa n>    
510                         </div>    
511                         <div class ="blogSnip pet">    
512                             <?= $s BlogSnippe t ?>    
513                         </div>    
514                    </di v>    
515                    <div  class="cl ear_both"> </div>    
516                <?    
517           }            
518           ?>    
519           </ div>   524   </div>
520           <?   525   EOF;
521           $r et = ob_ge t_clean();    
522              526  
523           $s how_hide =  $this ->  genShowHid eItem( 'co ntainer_cl assifieds'  );   527                    $sho w_hide = $ this->genS howHideIte m( 'contai ner_classi fieds' );
524              528                    if ( $bNoDB) {
    529                         return $re t;
    530                    } el se {
525           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   531                         echo Desig nBoxConten t( _t( $sC aption ),  $ret, 1, $ show_hide  );
526  
        
  532                     }
    533                } else
    534                    retu rn;
    535           }  else {
    536                if ($bNo DB) {
    537                    retu rn MsgBox(  _t('_im_t extNoCurrU ser') );
    538                } else {
    539                    echo  MsgBox( _ t('_im_tex tNoCurrUse r') );
    540                }
    541           }
527       }   542       }
528     543  
529        function   showBlockE vents(   $sCaption  
)
  544        function   showBlockE vents(   $sCaption ,   $bNoDB   =   false   )   {
530       {    
531           gl obal $site ;   545           gl obal $site ;
532           gl obal $shor t_date_for mat;   546  
533           $p hp_date_fo rmat = get Param( 'ph p_date_for mat' );    
534           // $iBlogLimi tChars = ( int)getPar am("max_cl assified_p review");    
535           $i BlogLimitC hars = (in t)getParam ("max_blog _preview") ;    
536           $I D = $this  -> _iProfi leID;   547           $I D = $this  -> _iProfi leID;
    548  
    549           if  ($ID > 0)  {
537           $s Query = "   550                $sQuery  = "
538                 SELECT   DISTIN C
T  
`SDatingEv ents`.   *   ,   `Profiles` . ` NickName ` ,
  551                     SELECT  
C OUN T ( `SDatingEv ents`.
` ID ` )   AS   'Cnt'
539                UNIX_TIM ESTAMP( `S DatingEven ts`.`Event Start` ) a s `DateTim e_f`    
540                FROM `SD atingEvent s`    552                    FROM  `SDatingE vents` 
541                 LEFT   JOIN   `
P
r of i le s`   ON   `
P
r of i le s`.`ID
`   =   `SDatingEv ents`.` Responsibl e ID`  
  553                     LEFT   JOIN   ` SDating P a r t i cipant s`   ON   ` SDating P a r t i cipant s`.`ID Event `   =   `SDatingEv ents`.`
ID`  
542                 WHERE  
`SDatingEv ents`.`Res ponsibleID `   =  
{$ID}   AN D
  554                     WHERE   ( `SDatingEv ents`.`Res ponsibleID `   =   ' {$ID} '   OR   `S D atingParti cipants`.` IDMember`   =   '{$ID}')
543                
`SDatingEv ents`.`Sta tus`   =   'Active'
  555                     AND   `SDatingEv ents`.`Sta tus`   =   'Active'
544                ORDER BY  `EventSta rt` DESC     
545                LIMIT 5    
546           ";   556                ";
    557                $iBlogs  = db_value ( $sQuery  );
547              558  
548           $r Blogs = db _res( $sQu ery );   559                if( $iBl ogs > 0 )  {
549               
550           if ( !mysql_n um_rows( $ rBlogs ) )    
551                return ' ';    
552               
553           ob _start();    
554           ?>    
555           <d iv id="con tainer_eve nts">    
556           <?    
557      
558           $o Events = n ew BxDolEv ents();   560                    $oEv ents = new  BxDolEven ts();
559     561                    $sBl ocks = $oE vents->Gen AnyBlockCo ntent('las t', $ID);
560           wh ile( $aBlo g = mysql_ fetch_asso c( $rBlogs  ) )   562                    $ret  = <<<EOF
561           {   563   <div id="c ontainer_e vents">
562                $sPic =  $oEvents-> GetEventPi cture($aBl og['ID']);   564       {$sBlo cks}
563      
564                $sLinkMo re = '';    
565                if( strl en( $aBlog ['Descript ion']) > $ iBlogLimit Chars )     
566                    //$s LinkMore =  "... <a h ref=\"".$s ite['url'] ."blog.php ?owner=".$ ID."&show= blog&blogI D=".$aBlog ['PostID'] ."\">"._t( '_Read mor e')."</a>" ;    
567                    $sLi nkMore = " ... <a hre f=\"".$sit e['url']." events.php ?action=sh ow_info&am p;event_id =".$aBlog[ 'ID']."\"> "._t('_Rea d more')." </a>";    
568      
569                $sBlogSn ippet = mb _substr( s trip_tags(  $aBlog['D escription '] ), 0, $ iBlogLimit Chars ) .  $sLinkMore ;    
570                ?>    
571                    <div  class="th umbnail_bl ock" style ="float:le ft;width:4 5px;height :45px;marg in-right:1 0px;margin -top:10px; position:r elative;">    
572                         <?= $sPic  ?>    
573                    </di v>    
574                    <div  class="bl og_wrapper " style="w idth:290px ;float:lef t;position :relative; ">    
575                         <div class ="blogHead 1">    
576                             <? ech o '<a href ="' . $sit e['url'] .  'events.p hp?action= show_info& amp;event_ id=' . $aB log['ID']  . '" class ="bottom_t ext">' ?>    
577                                 <? = $aBlog[' Title'] ?>    
578                             </a>    
579                         </div>    
580                         <div class ="blogInfo ">    
581                             <span> <img src=" <?= getTem plateIcon(  'clock.gi f' ) ?>" / ><?= date(  $php_date _format, $ aBlog['Dat eTime_f']  ) . ' ' ?> </span>    
582                         </div>    
583                         <div class ="blogSnip pet">    
584                             <?= $s BlogSnippe t ?>    
585                         </div>    
586                    </di v>    
587                    <div  class="cl ear_both"> </div>    
588                <?    
589           }            
590           ?>    
591           </ div>   565   </div>
592           <?   566   EOF;
593           $r et = ob_ge t_clean();    
594              567  
595           $s how_hide =  $this ->  genShowHid eItem( 'co ntainer_ev ents' );   568                    $sho w_hide = $ this->genS howHideIte m( 'contai ner_events ' );
596              569                    if ( $bNoDB) {
    570                         return $re t;
    571                    } el se {
597           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   572                         echo Desig nBoxConten t( _t( $sC aption ),  $ret, 1, $ show_hide  );
598       }   573                    }
    574                } else
    575                    retu rn;
    576           }  else {
    577                if ($bNo DB) {
    578                    retu rn MsgBox(  _t('_im_t extNoCurrU ser') );
    579                } else {
    580                    echo  MsgBox( _ t('_im_tex tNoCurrUse r') );
    581                }
    582           }
    583       }
599     584  
600        function   showBlockG roups(   $sCaption  
)
  585        function   showBlockG roups(   $sCaption ,   $bNoDB   =   false   )   {
601       {    
602           gl obal $site ;   586           gl obal $site ;
603           gl obal $shor t_date_for mat;   587           
604           $p hp_date_fo rmat = get Param( 'ph p_date_for mat ' );    
605           // $iBlogLimi tChars = ( int)getPar am("max_cl assified_p review");    
606           $i BlogLimitC hars = (in t)getParam ("max_blog _preview") ;    
607           $I D = $this  -> _iProfi leID;   588           $I D = $this  -> _iProfi leID;
    589  
    590           if  ($ID > 0)  {
608           $s Query = "   591                $sQuery  = "
609                SELECT D ISTINCT `G roups`.`ID `, `Groups `.`Name`,  `Groups`.` Desc`,   592                    SELE CT COUNT(` Groups`.`I D`) AS 'Cn t'
610                UNIX_TIM ESTAMP( `G roups`.`cr eated` ) a s `DateTim e_f`,    
611                `Profile s`.`NickNa me`,    
612                `GroupsC ateg`.`Nam e` AS 'Cat egName', ` GroupsCate g`.`ID` AS  `CategID`    
613                FROM `Gr oupsMember s`, `Group s`   593                    FROM  `GroupsMe mbers`, `G roups`
614                LEFT JOI N `GroupsC ateg` ON ` GroupsCate g`.`ID` =  `Groups`.` categID`     
615                LEFT JOI N `Profile s` ON `Pro files`.`ID ` = `Group s`.`creato rID`     
616                WHERE    594                    WHER
617                `Groups` .`status`  = 'Active'  AND   595                    `Gro ups`.`stat us` = 'Act ive' AND
618                `GroupsM embers`.`m emberID` =  {$ID} AND   596                    `Gro upsMembers `.`memberI D` = {$ID}  AND
619                `GroupsM embers`.`g roupID`  =  `Groups`. `ID` AND   597                    `Gro upsMembers `.`groupID `  = `Grou ps`.`ID` A ND
620                `GroupsM embers`.`s tatus`   =  'Active'   598                    `Gro upsMembers `.`status`    = 'Acti ve'
621                ORDER BY  `created`  DESC     
622                LIMIT 5    
623           ";   599                ";
    600                $iBlogs  = db_value ( $sQuery  );
624              601  
625           $r Blogs = db _res( $sQu ery );   602                if( $iBl ogs > 0 )  {
626              603                    $oGr oups = new  BxDolGrou ps();
627           if ( !mysql_n um_rows( $ rBlogs ) )   604                    $sBl ocks = $oG roups->Gen AnyBlockCo ntent('las t', $ID);
628                return ' ';   605                    $ret  = <<<EOF
629               
630           ob _start();    
631           ?>    
632           <d iv id="con tainer_gro ups">   606   <div id="c ontainer_g roups">
633           <?   607       {$sBlo cks}
634      
635           $o Events = n ew BxDolEv ents();    
636      
637           wh ile( $aBlo g = mysql_ fetch_asso c( $rBlogs  ) )    
638           {    
639                $sPic =  $oEvents-> GetGroupPi cture($aBl og['ID']);    
640      
641                $sLinkMo re = '';    
642                if( strl en( $aBlog ['Descript ion']) > $ iBlogLimit Chars )     
643                    //$s LinkMore =  "... <a h ref=\"".$s ite['url'] ."blog.php ?owner=".$ ID."&show= blog&blogI D=".$aBlog ['PostID'] ."\">"._t( '_Read mor e')."</a>" ;    
644                    $sLi nkMore = " ... <a hre f=\"".$sit e['url']." group.php? ID=".$aBlo g['ID']."\ ">"._t('_R ead more') ."</a>";    
645      
646                $sBlogSn ippet = mb _substr( s trip_tags(  $aBlog['D esc'] ), 0 , $iBlogLi mitChars )  . $sLinkM ore;    
647                ?>    
648                    <div  class="th umbnail_bl ock" style ="float:le ft;width:4 5px;height :45px;marg in-right:1 0px;margin -top:10px; position:r elative;">    
649                         <?= $sPic  ?>    
650                    </di v>    
651                    <div  class="bl og_wrapper " style="w idth:290px ;float:lef t;position :relative; ">    
652                         <div class ="blogHead 1">    
653                             <? ech o '<a href ="' . $sit e['url'] .  'group.ph p?ID=' . $ aBlog['ID' ] . '" cla ss="bottom _text">' ? >    
654                                 <? = $aBlog[' Name'] ?>    
655                             </a>    
656                         </div>    
657                         <div class ="blogInfo ">    
658                             <span> <img src=" <?= getTem plateIcon(  'clock.gi f' ) ?>" / ><?= date(  $php_date _format, $ aBlog['Dat eTime_f']  ) . ' ' ?> </span>    
659                             <span> <?= _t( '_ in Categor y', getTem plateIcon(  'folder_s mall.png'  ), 'groups _browse.ph p?categID= '.$aBlog[' CategID'],  process_l ine_output ($aBlog['C ategName'] ) ) ?></sp an>    
660                         </div>   608   </div>
661                         <div class ="blogSnip pet">   609   EOF;
662                             <?= $s BlogSnippe t ?>    
663                         </div>    
664                    </di v>    
665                    <div  class="cl ear_both"> </div>    
666                <?    
667           }            
668           ?>    
669           </ div>    
670           <?    
671           $r et = ob_ge t_clean();    
672              610  
673           $s how_hide =  $this ->  genShowHid eItem( 'co ntainer_gr oups' );   611                    $sho w_hide = $ this->genS howHideIte m( 'contai ner_groups ' );
674     612                    if ( $bNoDB) {
675           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   613                         return $re t;
676       }   614                     } else  {
677      
678       functi on showBlo ckComments ( $sCaptio n )    
679       
{
   
680           ob _start();    
681               
682           ?>    
683           <d iv id="com ments_wrap per">    
684                <?= $thi s -> getCo mments();  ?>    
685                <?= $thi s -> getCo mmentActio ns() ?>    
686                <?= $thi s -> getAd dCommentFo rm() ?>    
687                <!--      navigatio n will be  here soon     -->    
688           </ div>    
689           <?    
690               
691           $r et = ob_ge t_clean();    
692           $s how_hide =  $this ->  genShowHid eItem( 'co mments_wra pper' );    
693               
694           ec ho DesignB oxContent(  _t( $sCap tion ), $r et, 1, $sh ow_hide );   615                         echo Desig nBoxConten t( _t( $sC aption ),  $ret, 1, $ show_hide  );
695       }   616                    }
696          617                } else
697       functi on showBlo ckShareMus ic( $sCapt ion )   618                    retu rn;
698       {   619           }  else {
699           ec ho '<div i d="show_sh areMusic"> ';   620                if ($bNo DB) {
700           ec ho PageCom pShareMusi cContent(  $sCaption,  $this ->  _iProfileI D );   621                    retu rn MsgBox(  _t('_im_t extNoCurrU ser') );
701           ec ho '</div> ';   622                } else {
702       }   623                    echo  MsgBox( _ t('_im_tex tNoCurrUse r') );
703           
704       functi on showBlo ckSharePho tos( $sCap tion )    
705       {    
706           ec ho '<div i d="show_sh arePhotos" >';    
707           ec ho PageCom pSharePhot osContent(  $sCaption , $this ->  _iProfile ID );    
708           ec ho '</div> ';    
709       }    
710           
711       functi on showBlo ckShareVid eos( $sCap tion )    
712       {    
713           ec ho '<div i d="show_sh areVideos" >';    
714           ec ho PageCom pShareVide osContent(  $sCaption , $this ->  _iProfile ID );    
715           ec ho '</div> ';    
716       }    
717      
718       functi on getComm ents( $iRe plyTo = 0  )    
719       {    
720           gl obal $site ;    
721               
722           $i PerPage =  5;    
723               
724           // if( $iRepl yTo )    
725                $sqlLimi t = ''; //  navigatio n will be  here very  very soon    
726           /* else    
727           {    
728                $this ->  comm_page  = (int)$_ GET['comm_ page'];    
729                    
730                if( $thi s -> comm_ page < 1 )    
731                    $thi s -> comm_ page = 1;    
732                    
733                $sqlLimi tFrom = (  $this -> c omm_page -  1 ) * $iP erPage;    
734                    
735                $sqlLimi t = "LIMIT  $sqlLimit From, $iPe rPage";    
736           }* /    
737               
738           if ( $iReplyT o == 0 )    
739                $sOrder  = "ASC";    
740           el se    
741                $sOrder  = "DESC";    
742               
743           $s Query = "    
744                SELECT    
745                    `Pro filesComme nts`.`ID`,    
746                    `Pro filesComme nts`.`Date `,    
747                    UNIX _TIMESTAMP (`Date`) A S `UnixDat e`,    
748                    `Pro filesComme nts`.`IP`,    
749                    `Pro filesComme nts`.`Text `,    
750                    `Pro filesComme nts`.`New` ,    
751                    `Pro filesComme nts`.`Repl yTO`,    
752                    `Pro files`.`ID ` AS `send erID`,    
753                    `Pro files`.`Ni ckName` AS  `senderNi ck`    
754                FROM `Pr ofilesComm ents`    
755                LEFT JOI N `Profile s` ON    
756                    `Pro filesComme nts`.`Send er` = `Pro files`.`ID `    
757                WHERE    
758                    `Pro filesComme nts`.`Reci pient` = { $this -> _ iProfileID } AND    
759                    `Rep lyTO` = $i ReplyTo    
760                ORDER BY  `Date` $s Order    
761                $sqlLimi t    
762                ";    
763           $r Comments =  db_res( $ sQuery );    
764           ob _start();    
765           wh ile( $aCom ment = mys ql_fetch_a ssoc( $rCo mments ) )    
766           {    
767           ?>    
768                <div cla ss="commen t_row">    
769                    <div  class="co mment_auth or">    
770                         <?php echo  get_membe r_icon($aC omment['se nderID'])? >    
771                    </di v>    
772                    <div  class="co mment_view ">    
773                         <a href="< ?= getProf ileLink($a Comment['s enderID'])  ?>">    
774                             <?= tr im (proces s_line_out put($aComm ent['sende rNick']))? >    
775                         </a>    
776                    <?ph p echo '('  . $this - > defineTi meInterval ($aComment ['UnixDate ']) . ')'  ?>    
777                <?    
778                if( $thi s -> owner  && $aComm ent['New']  )    
779                {    
780                    ?>    
781                         <span clas s="comment New"><?= _ t("_new")  ?></span>    
782                    <?    
783                    db_r es( "UPDAT E `Profile sComments`  SET `New`  = '0' WHE RE `ID` =  {$aComment ['ID']}" ) ;    
784                }    
785                    
786                ?>    
787                    </di v>    
788                        
789                    <div  class="co mment_text ">    
790                         <?= proces s_smiles(  $aComment[ 'Text'])   ?>    
791                    </di v>    
792                    
793                <?= $thi s -> getCo mmentActio ns( $aComm ent['ID']  ) ?>    
794                    
795                </div>    
796                <?    
797                echo $th is -> getA ddCommentF orm( $aCom ment['ID']  );    
798                    
799                if( $ans wers = $th is -> getC omments( $ aComment[' ID'] ) )    
800                {    
801                    ?>    
802                <div id= "replies_t o_<?= $aCo mment['ID' ] ?>" clas s="comment _replies">    
803                    <?=  $answers ? >    
804                </div>    
805                    <?    
806                }    
807           }    
808               
809           re turn ob_ge t_clean();    
810       }    
811      
812       functi on getComm entActions ( $ID = 0  )    
813       {    
814           gl obal $logg ed;    
815               
816           ob _start();    
817           ?>    
818                    <div  class="co mment_acti ons" >    
819           <?    
820           if ( $ID )    
821           {    
822                if( $log ged['membe r'] )    
823                {    
824                    ?>    
825                         <a href="j avascript: void(0);"    
826                           onclick= "document. getElement ById('answ er_form_to _<?= $ID ? >').style. display =  'block'; t his.style. display =  'none';"    
827                           ><?= _t(  '_answer'  ) ?></a>    
828                    <?    
829                }    
830                    
831                if( $log ged['admin '] || $thi s -> owner  )    
832                {    
833                    ?>    
834                         <a href="< ?= $_SERVE R['PHP_SEL F'] ?>?ID= <?= $this  -> _iProfi leID ?>&am p;action=c ommentdele te&amp;com mentID=<?=  $ID ?>&am p;comm_pag e=<?= $thi s -> comm_ page ?>"    
835                           onclick= "return co nfirm( '<? = _t( '_ar e you sure ?' ) ?>' ) ;"    
836                           ><?= _t(  '_delete'  ) ?></a>    
837                    <?    
838                }    
839           }    
840           el se    
841           {    
842                if( $log ged['membe r'] )    
843                {    
844                    ?>    
845                         </div>    
846                         <div class ="comment_ add_commen t" >    
847                         <a href="j avascript: void(0);"    
848                           onclick= "document. getElement ById('answ er_form_to _0').style .display =  'block';  this.style .display =  'none';"    
849                           ><?= _t(  '_Post Co mment' ) ? ></a>    
850                    <?    
851                }    
852           }    
853           ?>    
854                    </di v>    
855                    <div  class="cl ear_both"> </div>    
856           <?    
857               
858           re turn ob_ge t_clean();    
859       }    
860      
861       functi on getAddC ommentForm ( $ID = 0  )    
862       {    
863           $r et = '';    
864               
865           if ( $this ->  comm_page  )    
866                $sFormAd d = '&amp; comm_page= ' . $this  -> comm_pa ge;    
867           el se    
868                $sFormAd d = '';    
869               
870           ob _start();    
871           ?>    
872                    <div  style="di splay:none ;margin-le ft:8px; "  class="add comment_te xtarea" id ="answer_f orm_to_<?=  $ID ?>">    
873                         <form meth od="post"  action="<? = $_SERVER ['PHP_SELF '] ?>?ID=< ?= $this - > _iProfil eID . $sFo rmAdd ?>">    
874   <!--                      <form  method="po st" action ="<?= 'pro file.php'  ?>?ID=<?=  $this -> _ iProfileID  . $sFormA dd ?>"> -- >    
875                             <texta rea name=" commenttex t" class=" comment_te xtarea" id ="commentt ext_to_<?=  $ID ?>">< /textarea>    
876                             <div c lass="addc omment_sub mit" style ="text-ali gn:center; ">    
877                                 <i nput type= "hidden" n ame="ID" v alue="<?=  $this -> _ iProfileID  ?>" />    
878                                 <i nput type= "hidden" n ame="reply TO" value= "<?= $ID ? >" />    
879                                 <i nput type= "submit" n ame="comme ntsubmit"  value="add  comment"  />    
880                             </div>    
881                         </form>    
882                    </di v>    
883           <?    
884               
885           re turn ob_ge t_clean();    
886       }    
887      
888       functi on collect ProfileFie ldsByCateg ( $categ )    
889       {    
890           $r Fields = d b_res( "SE LECT * FRO M `Profile sDesc` WHE RE `visibl e` AND ( F IND_IN_SET ('0',show_ on_page) O R FIND_IN_ SET('7',sh ow_on_page ) ) ORDER  BY `order` " );    
891           $a Fields = a rray();    
892           $d oCollect =  false;    
893               
894           wh ile( $aFie ld = mysql _fetch_ass oc( $rFiel ds ) )    
895           {    
896                if( is_n umeric( $a Field['nam e'] ) and  (int)$aFie ld['name']  == $categ  )    
897                {    
898                    $doC ollect = t rue; //beg in collect  fields    
899                    cont inue;    
900                }    
901                    
902                if( !$do Collect )    
903                    cont inue; //do  not colle ct    
904                    
905                if( is_n umeric( $a Field['nam e'] ) )    
906                    brea k; //stop  collect fi elds    
907                    
908                $aFields [] = $aFie ld; //do c ollect    
909           }   624                }
910               
911           re turn $aFie lds;    
912       }   625           }
913           
914       functi on showPro fileFields ( $aFields  )    
915       {    
916           gl obal $p_ar r;    
917           gl obal $site ;    
918               
919               
920           $r d = 1;    
921           $f irst_row =  1;    
922               
923           $a RedundantF ields = ar ray();    
924               
925           $r et = '';    
926               
927           fo reach( $aF ields as $ arrpd )    
928           {    
929                $fname =  get_input _name ( $a rrpd );    
930                $sRealFN ame = get_ field_name  ( $arrpd  );    
931      
932                if ( !in _array( $s RealFName,  $aRedunda ntFields )  )    
933                {    
934                    if (  $arrpd['g et_value_d b'] )    
935                    {    
936                         $funcbody  = $arrpd[' get_value_ db'];    
937                         $func = cr eate_funct ion('$arg0 ',$funcbod y);    
938      
939                         $p_arr[$fn ame] = $fu nc($p_arr) ;    
940                    }   626       }
941     627  
942                    if(  !strlen( $ p_arr[$fna me] ) )    
943                         continue;    
944                        
945                    //if  ( !strlen ($p_arr[$f name]) ) $ p_arr[$fna me] = $p_a rr[$fname] ;    
946                    $not _first_row  = 0;    
947                       628           
948                    swit ch ($arrpd ['type'])   629        function   showBlockM p3(   $sCaption ,   $bNoDB   =   false   )
949                    {    
950                         case 'set' : // set o f checkbox es    
951                             $ret . = print_ro w_set ( $f irst_row,  $arrpd, $p _arr[$fnam e], "table ", $rd, 2,  "50%" );    
952                             break;    
953                         case 'rb':  // radio  buttons    
954                             $ret . = print_ro w_radio_bu tton ( $fi rst_row, $ arrpd, $p_ arr[$fname ], "table" , $rd, 2,  "50%" );    
955                             break;    
956                         case 'r':  // referen ce to arra y for comb o box    
957                             if ( $ fname == ' Country' )    
958                                 $i magecode =  '<img src ="'. ($sit e['flags'] .strtolowe r($p_arr[$ fname])) . '.gif" alt ="flag" /> ';    
959                             else    
960                                 $i magecode =  '';    
961                             $ret . = print_ro w_ref ( $f irst_row,  $arrpd, $p _arr[$fnam e], "table ", $rd, 2,  "50%", 0,  '', $imag ecode );    
962                             break;    
963                         case '0':  // divider    
964                             $ret . = print_ro w_delim( $ first_row,  $arrpd, " panel", 2  );    
965                                 $n ot_first_r ow = 1;    
966                                 $f irst_row =  1;    
967                             break;    
968                         case 'e':  // enum co mbo box    
969                             $ret . = print_ro w_enum( $f irst_row,  $arrpd, $p _arr[$fnam e], "table ", '', $rd , 2, "50%"  );    
970                             break;    
971                         case 'en':  // enum c ombo box w ith number s    
972                             $ret . = print_ro w_enum_n(  $first_row , $arrpd,$ p_arr[$fna me], "tabl e", $rd, 2 , "50%" );    
973                             break;    
974                         case 'eny' : // enum  combo box  with years    
975                             $ret . = print_ro w_enum_yea rs( $first _row, $arr pd, $p_arr [$fname],  "table", $ rd, 2, "50 %", '', $s RealFName  );    
976                             $aRedu ndantField s[] = $sRe alFName;    
977                             break;    
978                         case 'date ':    
979                             $ret . = print_ro w_date( $f irst_row,  $arrpd, $p _arr[$fnam e], "table ", $rd, 2,  "50%", '' , $sRealFN ame );    
980                             break;    
981                         case 'a':  // memo    
982                             $p_arr [$fname] =  process_l ine_output ( $p_arr[$ fname] );    
983                                 
984                             if( st rlen( $p_a rr[$fname]  ) )    
985                                 $r et .= prin t_row_area ( $first_r ow, $arrpd , $p_arr[$ fname], "t able", $rd , 2, "50%"  );    
986                             break;        
987                         case 'c':  // input b ox    
988                             $p_arr [$fname] =  process_l ine_output ( $p_arr[$ fname] );    
989                                 
990                             if( st rlen( $p_a rr[$fname]  ) )    
991                             {    
992                                 if  ( 'HomePa ge' == $fn ame )    
993                                      $p_arr[$ fname] = ' <a href="h ttp://' .  $p_arr[$fn ame] . '"> ' . $p_arr [$fname] .  '</a>';    
994                                 $r et .= prin t_row_edit ( $first_r ow, $arrpd , $p_arr[$ fname], "t able", $rd , 2, "50%"  );    
995                             }    
996                             break;        
997                         case 'p':  // input b ox passwor d    
998                             $p_arr [$fname] =  process_l ine_output ( $p_arr[$ fname] );    
999                             $ret . = print_ro w_pwd( $fi rst_row, $ arrpd, $p_ arr[$fname ], "table" , $rd, 2,  "50%" );    
1000                             break;    
1001                         default:    
1002                             $not_f irst_row =  1;    
1003                    }    
1004                    if (  !$not_fir st_row &&  $first_row  == 1 )    
1005                         $first_row  = 0;    
1006                }    
1007           }    
1008           re turn $ret;    
1009       }    
1010           
1011        function   showBlockM p3(   $sCaption  
)
   
1012       {   630       {
1013           gl obal $logg ed;   631           gl obal $logg ed;
1014              632           
1015           $i MemberId =  (int)$_CO OKIE['memb erID'];   633           $i MemberId =  (int)$_CO OKIE['memb erID'];
1016           $r et = getAp plicationC ontent('mp 3', 'playe r', array( 'id' => $t his -> _iP rofileID,  'password'  => getPas sword($iMe mberId), ' vId' => $i MemberId),  true);   634           $r et = getAp plicationC ontent('mp 3', 'playe r', array( 'id' => $t his -> _iP rofileID,  'password'  => getPas sword($iMe mberId), ' vId' => $i MemberId),  true);
    635           if  ($bNoDB)  {
    636                return $ ret;
    637           }  else {
1017           ec ho DesignB oxContent(  _t( $sCap tion ), '< div align= "center">'  . $ret .  '</div>',  1, $show_h ide );   638                echo Des ignBoxCont ent( _t( $ sCaption ) , '<div al ign="cente r">' . $re t . '</div >', 1, $sh ow_hide );
1018       }   639           }
    640       }
1019     641  
1020        function   showBlockM utualFrien ds(   $sCaption  
)   {
  642        function   showBlockM utualFrien ds(   $sCaption ,   $bNoDB   =   false   )   {
1021           gl obal $site ;   643           gl obal $site ;
1022           $i FriendNums  = getFrie ndNumber(  $this -> _ iProfileID  );   644           $i FriendNums  = getFrie ndNumber(  $this -> _ iProfileID  );
1023     645  
1024           $r et = '';   646           $r et = '';
1025           $i Counter =  0;   647           $i Counter =  0;
1026           $i TotalCount er = 0;   648           $i TotalCount er = 0;
1027           fo reach ($th is -> aMut ualFriends  as $key = > $value)  {   649           fo reach ($th is -> aMut ualFriends  as $key = > $value)  {
1028                $iCounte r ++;   650                $iCounte r ++;
1029                $sKey =  '1';   651                $sKey =  '1';
1030                
if(   $iCounter   ==   3   )   $sKey   =   '2';
  652                 // if(   $iCounter   ==   3   )   $sKey   =   '2';
1031     653  
1032                 $ret   .=   '<div   class="fri ends_thumb _'.$sKey.' ">'   .   get_member _thumbnail ($key,   ' l e ft '
)   .   '<div   class="
browse_nic k"><a   href="'   .   getProfile Link($key)   .   '">'   .   $value   .   '</a></div ><div   class="cle ar_both">< /div></div >';
  654                 $ret   .=   '<div   class="fri ends_thumb _'.$sKey.' ">'   .   get_member _thumbnail ($key,   ' non e
' ,   true )   .   '<div   class=" clear_both "></div><d iv   class=" browse_nic k"><a   href="'   .   getProfile Link($key)   .   '">'   .   $value   .   '</a></div ><div   class="cle ar_both">< /div></div >';
1033                if( $iCo unter == 3 )  $iCount er = 0;    655                if( $iCo unter == 3 )  $iCount er = 0; 
1034                $iTotalC ounter ++;   656                $iTotalC ounter ++;
1035                if( $iTo talCounter  >= 12 ) b reak;   657                if( $iTo talCounter  >= 12 ) b reak;
1036           }   658           }
1037           if  ($ret) {   659           if  ($ret) {
1038                $ret .=  '<div clas s="clear_b oth"></div >';   660                $ret .=  '<div clas s="clear_b oth"></div >';
1039                $sFriend Info = '<d iv class=" caption_it em"><a hre f="'.$site ['url'].'v iewFriends .php?iUser ='.$this - > _iProfil eID.'">'.$ iFriendNum s.' '._t(" _Friends") .'</a></di v>';   661                $sFriend Info = '<d iv class=" caption_it em"><a hre f="'.$site ['url'].'v iewFriends .php?iUser ='.$this - > _iProfil eID.'">'.$ iFriendNum s.' '._t(" _Friends") .'</a></di v>';
    662                if ($bNo DB) {
    663                    retu rn $ret;
    664                } else {
1040                echo Des ignBoxCont ent( _t( $ sCaption ) , $ret, 1,  $sFriendI nfo);   665                    echo  DesignBox Content( _ t( $sCapti on ), $ret , 1, $sFri endInfo);
1041           }   666                }
1042       }   667           }
    668       }
1043     669  
1044       functi on FindMut ualFriends  () {   670       functi on FindMut ualFriends  () {
1045           gl obal $logg ed;    671           gl obal $logg ed; 
1046             672          
1047           if ( $logged[ 'member']  )   673           if ( $logged[ 'member']  )
1048                  $membe rID = (int )$_COOKIE[ 'memberID' ];   674                  $membe rID = (int )$_COOKIE[ 'memberID' ];
1049           el se   675           el se
1050           $m emberID =  0;     676           $m emberID =  0;  
1051             677          
1052             678          
1053                  $sQuer y = "   679                  $sQuer y = "
1054                    SELE CT   680                    SELE CT
1055                         IF(   `FriendLis t`.`ID`   =  
$memberID
,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   AS   `friendID` ,
  681                         IF(   `FriendLis t`.`ID`   =   { $memberID } ,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   AS   `friendID` ,
1056                         `Profiles` .`NickName `   682                         `Profiles` .`NickName `
1057                    FROM  `FriendLi st`   683                    FROM  `FriendLi st`
1058                    INNE R JOIN `Fr iendList`  AS `Friend ListMy` ON   684                    INNE R JOIN `Fr iendList`  AS `Friend ListMy` ON
1059                    (   685                    (
1060                     `FriendLis tMy`.`ID`        =   IF(   `FriendLis t`.`ID`   =  
$memberID
,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   OR
  686                     `FriendLis tMy`.`ID`        =   IF(   `FriendLis t`.`ID`   =   { $memberID } ,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   OR
1061                     `FriendLis tMy`.`Prof ile`   =   IF(   `FriendLis t`.`ID`   =  
$memberID
,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )
  687                     `FriendLis tMy`.`Prof ile`   =   IF(   `FriendLis t`.`ID`   =   { $memberID } ,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )
1062                    ) AN D   688                    ) AN D
1063                    `Fri endListMy` .`Check` =  1   689                    `Fri endListMy` .`Check` =  1
1064                    INNE R JOIN `Pr ofiles` ON   690                    INNE R JOIN `Pr ofiles` ON
1065                         `Profiles` .`ID`   =   IF(   `FriendLis t`.`ID`   =  
$memberID
,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )
  691                         `Profiles` .`ID`   =   IF(   `FriendLis t`.`ID`   =   { $memberID } ,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )
1066                    WHER E   692                    WHER E
1067                    (   693                    (
1068                    (   694                    (
1069                     `FriendLis t`.`ID`   =  
$memberID  
OR
  695                     `FriendLis t`.`ID`   =   { $memberID }   OR
1070                     `FriendLis t`.`Profil e`   =  
$memberID
  696                     `FriendLis t`.`Profil e`   =   { $memberID }
1071                    ) AN D   697                    ) AN D
1072                    `Fri endList`.` Check` = 1   698                    `Fri endList`.` Check` = 1
1073                    ) AN D   699                    ) AN D
1074                    (   700                    (
1075                    (   701                    (
1076                    `Fri endListMy` .`ID` = {$ this -> _i ProfileID}  OR   702                    `Fri endListMy` .`ID` = {$ this -> _i ProfileID}  OR
1077                    `Fri endListMy` .`Profile`  = {$this  -> _iProfi leID}   703                    `Fri endListMy` .`Profile`  = {$this  -> _iProfi leID}
1078                    ) AN D   704                    ) AN D
1079                    `Fri endListMy` .`Check` =  1   705                    `Fri endListMy` .`Check` =  1
1080                    ) AN D   706                    ) AN D
1081                     IF(   `FriendLis t`.`ID`   =  
$memberID
,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   !=   {$this   ->   _iProfileI D}
  707                     IF(   `FriendLis t`.`ID`   =   { $memberID } ,   `FriendLis t`.`Profil e`   ,   `FriendLis t`.`ID`   )   !=   {$this   ->   _iProfileI D}
1082                    ";   708                    ";
1083                           709                        
1084                      $r Result = d b_res( $sQ uery );   710                      $r Result = d b_res( $sQ uery );
1085                      wh ile( $aRow  = mysql_f etch_assoc ( $rResult  ) )   711                      wh ile( $aRow  = mysql_f etch_assoc ( $rResult  ) )
1086                         $this -> a MutualFrie nds[ $aRow ['friendID '] ] = $aR ow['NickNa me'];   712                         $this -> a MutualFrie nds[ $aRow ['friendID '] ] = $aR ow['NickNa me'];
1087                        713                     
1088                }   714                }
    715        funct ion getLin kStat($sTy pe, $sCapt ion, $iMem ber) {
    716           $s Type = htm lspecialch ars_adv($s Type);
    717           $s Caption =  _t(htmlspe cialchars_ adv($sCapt ion));
    718           $i Member = ( int)$iMemb er;
    719           sw itch ($sTy pe) {
    720                case 'pr Photo':
    721                    $sql QueryStat  = "SELECT  COUNT(*) F ROM `media ` WHERE `m ed_type`=' photo' AND  `med_stat us`='activ e' AND `me d_prof_id` ='$iMember '";
    722                    brea k;
    723                case 'pr Music':
    724                    $sql QueryStat  = "SELECT  COUNT(*) F ROM `RayMp 3Files` WH ERE `Appro ved`='true ' AND `Own er`='$iMem ber'";
    725                    brea k;
    726                case 'pr Video':
    727                    $sql QueryStat  = "SELECT  `Approved`  FROM `Ray VideoStats ` WHERE `U ser`='$iMe mber'";
    728                    brea k;
    729           }
    730           $i Count = (i nt)db_valu e($sqlQuer yStat);
    731           $s FinalCapt  = $iCount  ? $sCaptio n . ' ('.$ iCount.')'  : $sCapti on;
1089     732           
    733           re turn $sFin alCapt;
    734        }
1090   }   735   }
1091   ?>   736   ?>