804. File Comparison Report

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

804.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5 profilePhotos.php Thu Sep 20 09:00:20 2007 UTC
2 Dolphin-v.6.1.0 profilePhotos.php Sat Apr 26 08:19:18 2008 UTC

804.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 21 716
Changed 12 34
Inserted 7 39
Removed 1 1

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

804.4 Active regular expressions

No regular expressions were active.

804.5 Comparison detail

1   <?php   1   <?php
2     2  
3   /********* ********** ********** ********** ********** ********** ********** ******   3   /********* ********** ********** ********** ********** ********** ********** ******
4   *                              D olphin Sma rt Communi ty Builder   4   *                              D olphin Sma rt Communi ty Builder
5   *                                 --------- --------   5   *                                 --------- --------
6   *     begi n                 : M on Mar 23  2006   6   *     begi n                 : M on Mar 23  2006
7   *     copy right             : ( C) 2006 Bo onEx Group   7   *     copy right             : ( C) 2006 Bo onEx Group
8   *     webs ite               : h ttp://www. boonex.com /   8   *     webs ite               : h ttp://www. boonex.com /
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder   9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder
10   *   10   *
11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.    11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License. 
12   * http://c reativecom mons.org/l icenses/by /3.0/   12   * http://c reativecom mons.org/l icenses/by /3.0/
13   *   13   *
14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin   17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
19   ********** ********** ********** ********** ********** ********** ********** *****/   19   ********** ********** ********** ********** ********** ********** ********** *****/
20     20  
21   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' uploadPhot o.php');        21   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' uploadPhot o.php');     
22     22  
23   class Prof ilePhotos  extends Up loadPhoto   23   class Prof ilePhotos  extends Up loadPhoto
24   {   24   {
25       functi on Profile Photos( $i ProfileID  )   25       functi on Profile Photos( $i ProfileID  )
26       {   26       {
27           pa rent::Uplo adPhoto( $ iProfileID  );   27           pa rent::Uplo adPhoto( $ iProfileID  );
28       }   28       }
29     29  
30     30  
31       functi on getMedi aPage( $iM ediaID = 0  )   31       functi on getMedi aPage( $iM ediaID = 0  )
32       {   32       {
33           gl obal $vote s_pic;   33           gl obal $vote s_pic;
34     34  
35           $r et = '';   35           $r et = '';
36     36  
37           // $ret .= $t his -> get JSCode();   37           // $ret .= $t his -> get JSCode();
38     38  
39           if ( 0 < $thi s -> iMedi aCount )   39           if ( 0 < $thi s -> iMedi aCount )
40           {   40           {
41                $iMediaI D = ( 0 <  $iMediaID  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];   41                $iMediaI D = ( 0 <  $iMediaID  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];
42     42  
43                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);   43                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);
44                if( empt y( $aCurPh oto ) )   44                if( empt y( $aCurPh oto ) )
45                {   45                {
46                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );   46                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );
47                }   47                }
48                else   48                else
49                {   49                {
50                    $ret  .= '<div  class="med iaTitle" i d="sTitleD iv">';   50                    $ret  .= '<div  class="med iaTitle" i d="sTitleD iv">';
51                         $ret .= st ripcslashe s( process _line_outp ut( $aCurP hoto['med_ title'] )  );   51                         $ret .= st ripcslashe s( process _line_outp ut( $aCurP hoto['med_ title'] )  );
52                    $ret  .= '</div >';   52                    $ret  .= '</div >';
53                    $iPh otoID = $a CurPhoto[' med_id'];   53                    $iPh otoID = $a CurPhoto[' med_id'];
54                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];   54                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];
55                    $iPh otoRating  = $this ->  getRating ( $aCurPho to['med_ra ting_sum'] , $aCurPho to['med_ra ting_count '] );   55                    $iPh otoRating  = $this ->  getRating ( $aCurPho to['med_ra ting_sum'] , $aCurPho to['med_ra ting_count '] );
56                }   56                }
57           }   57           }
58           el se   58           el se
59           {   59           {
60                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;   60                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;
61           }   61           }
62              62           
63           $r et .= $thi s -> getJS Code( $aCu rPhoto );   63           $r et .= $thi s -> getJS Code( $aCu rPhoto );
64     64  
65           $r et .= '<di v class="p hotoBlock"  id="photo Keeper">';   65           $r et .= '<di v class="p hotoBlock"  id="photo Keeper">';
66                $style =  '   66                $style =  '
67                    widt h:' . $thi s -> aMedi aConfig['s ize']['pho toWidth']  . 'px;' .   67                    widt h:' . $thi s -> aMedi aConfig['s ize']['pho toWidth']  . 'px;' .
68                    'hei ght:' . $t his -> aMe diaConfig[ 'size']['p hotoHeight '] . 'px;'  .   68                    'hei ght:' . $t his -> aMe diaConfig[ 'size']['p hotoHeight '] . 'px;'  .
69                    'bac kground-im age:url('  . $sPhotoU rl . ');';   69                    'bac kground-im age:url('  . $sPhotoU rl . ');';
70                $ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="' .  $style .  '" class=" photo" alt ="" id="te mPhotoID"  />';   70                $ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="' .  $style .  '" class=" photo" alt ="" id="te mPhotoID"  />';
71                //$ret . = '<img sr c="' . get TemplateIc on('spacer .gif') . ' " style="'  . $style  . '"                                              clas s="photo"  alt="" onl oad="retur n setImage ();" id="t emPhotoID"  />';   71                //$ret . = '<img sr c="' . get TemplateIc on('spacer .gif') . ' " style="'  . $style  . '"                                              clas s="photo"  alt="" onl oad="retur n setImage ();" id="t emPhotoID"  />';
72           $r et .= '</d iv>';   72           $r et .= '</d iv>';
73     73  
74           $s JsArray =  '';   74           $s JsArray =  '';
75           $i PhotosCoun t = 0;   75           $i PhotosCoun t = 0;
76           $s IconsList  = $this ->  _getIcons List($sJsA rray, $iPh otosCount) ;   76           $s IconsList  = $this ->  _getIcons List($sJsA rray, $iPh otosCount) ;
77     77  
78           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );   78           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );
79           // if( $iPhot osCount &&  getParam( 'votes_pic ') == 'on'  && $oVoti ngView->is Enabled())   79           // if( $iPhot osCount &&  getParam( 'votes_pic ') == 'on'  && $oVoti ngView->is Enabled())
80           if ( $iPhotos Count && $ votes_pic  && $oVotin gView->isE nabled())   80           if ( $iPhotos Count && $ votes_pic  && $oVotin gView->isE nabled())
81                $ret .=  '<div clas s="votingB lock">' .  $oVotingVi ew->getBig Voting ()  . '</div>' ;   81                $ret .=  '<div clas s="votingB lock">' .  $oVotingVi ew->getBig Voting ()  . '</div>' ;
82     82  
83           $r et .= '<di v class="i conBlock"> ';   83           $r et .= '<di v class="i conBlock"> ';
84           $r et .= $sIc onsList;   84           $r et .= $sIc onsList;
85           $r et .= '</d iv>';   85           $r et .= '</d iv>';
86     86  
87           $r et .= '<sc ript type= "text/java script">'  . $sJsArra y . '</scr ipt>';   87           $r et .= '<sc ript type= "text/java script">'  . $sJsArra y . '</scr ipt>';
88     88  
89           re turn $ret;   89           re turn $ret;
90       }   90       }
91     91  
92        function   getJSCode(   $aCurPhoto  
)
  92        function   getJSCode(   $aCurPhoto ,   $bUseFeatu re   =   'false'   )
93       {   93       {
94           gl obal $site ;   94           gl obal $site ;
95           $r et = '';   95           $r et = '';
96     96  
97            $ret   .=   ' <script   type="text /javascrip t">   97           $r et .= <<<E OF
    98           
<script   type="text /javascrip t">
98                   99                
99                if (wind ow.attachE vent)   100                if (wind ow.attachE vent)
100                    wind ow.attachE vent( "onl oad", onlo adPhotos ) ;   101                    wind ow.attachE vent( "onl oad", onlo adPhotos ) ;
101                else   102                else
102                    wind ow.addEven tListener(  "load", o nloadPhoto s, false);   103                    wind ow.addEven tListener(  "load", o nloadPhoto s, false);
103                   104                
104                function  onloadPho tos()   105                function  onloadPho tos()
105                {   106                {
106                    hide Scroll();   107                    hide Scroll();
107                    if ( window.oVo tingmedias mall)   108                    if ( window.oVo tingmedias mall)
108                    {   109                    {
109                         oVotingmed iasmall.on vote = fun ction (fRa te, iCount   110                         oVotingmed iasmall.on vote = fun ction (fRa te, iCount
110                         {   111                         {
111                             oIcons [this._iOb jId]["rate "] = fRate ;   112                             oIcons [this._iOb jId]["rate "] = fRate ;
112                             oIcons [this._iOb jId]["coun t"] = iCou nt;   113                             oIcons [this._iOb jId]["coun t"] = iCou nt;
113                         }                         114                         }                      
114                    }   115                    }
115                    if ( window.oVo tingmediab ig)   116                    if ( window.oVo tingmediab ig)
116                    {   117                    {
117                         oVotingmed iabig.onvo te = funct ion (fRate , iCount)    118                         oVotingmed iabig.onvo te = funct ion (fRate , iCount) 
118                         {   119                         {
119                             oPhoto s[this._iO bjId]["rat e"] = fRat e;   120                             oPhoto s[this._iO bjId]["rat e"] = fRat e;
120                             oPhoto s[this._iO bjId]["cou nt"] = iCo unt;   121                             oPhoto s[this._iO bjId]["cou nt"] = iCo unt;
121                         }                         122                         }                      
122                    }   123                    }
123                }   124                }
124                   125                
125                //hide s crollers i f needed   126                //hide s crollers i f needed
126                function  hideScrol l()   127                function  hideScrol l()
127                {   128                {
128                    b =  document.g etElementB yId( "icon Block" );   129                    b =  document.g etElementB yId( "icon Block" );
129                    s =  document.g etElementB yId( "scro llCont" );   130                    s =  document.g etElementB yId( "scro llCont" );
130                       131                    
131                    if(  !b || !s )   132                    if(  !b || !s )
132                         return fal se;   133                         return fal se;
133                       134                    
134                     if(   b.parentNo de.clientW idth   >=   b.clientWi dth   )
  135                     if(   b.parentNo de.clientW idth   >=   b.clientWi dth   )   {
135                         s.style.di splay = "n one";   136                         s.style.di splay = "n one";
    137                         $( '#iconB lock' ).cs s( { float : 'none',  position:  'static',  marginRigh t: 'auto',  marginLef t: 'auto'  } );
    138                    }
136                    else   139                    else
137                         s.style.di splay = "b lock";   140                         s.style.di splay = "b lock";
138                }   141                }
139                   142                
140                function  setImage( )   143                function  setImage( )
141                {   144                {
142                    var  imgCode;   145                    var  imgCode;
143                    var  oOldImg =  document.g etElementB yId("temPh otoID");   146                    var  oOldImg =  document.g etElementB yId("temPh otoID");
144                     oOldImg.st yle.backgr oundImage   =   "url( '   .   $this   ->   sMediaUrl   .   ' photo_ '   .   $aCurPhoto ['med_file ']   .   ' )";   147                     oOldImg.st yle.backgr oundImage   =   "url( { $this   ->   sMediaUrl } photo_ { $aCurPhoto ['med_file '] } )";
145                    retu rn false;   148                    retu rn false;
146                }   149                }
147     150  
148                function  setThumb( )   151                function  setThumb( )
149                {   152                {
    153                    if ( '{$bUseFea ture}' ==  'true')
    154                         return fal se;
150                    var  imgCode;   155                    var  imgCode;
151                    var  oOldImg =  document.g etElementB yId("temTh umbID");   156                    var  oOldImg =  document.g etElementB yId("temTh umbID");
152                    var  oLink = do cument.get ElementByI d("temThum bLink");   157                    var  oLink = do cument.get ElementByI d("temThum bLink");
153                       158                    
154                     oOldImg.st yle.backgr oundImage   =   "url( '   .   $this   ->   sMediaUrl   .   ' photo_ '   .   $aCurPhoto ['med_file ']   .   ' )";   159                     oOldImg.st yle.backgr oundImage   =   "url( { $this   ->   sMediaUrl } photo_ { $aCurPhoto ['med_file '] } )";
155                     oLink.href   =   " '   .   $site['url ']   .   ' photos_gal lery.php?I D= '   .    $this   ->   iProfileID   .   ' &photoID= '   .   $aCurPhoto ['med_id']   .   ' ";   160                     oLink.href   =   " { $site['url '] } photos_gal lery.php?I D= { $this   ->   iProfileID } &photoID= { $aCurPhoto ['med_id'] } ";
156                    retu rn false;   161                    retu rn false;
157                }   162                }
158     163  
159                function  changePho to(iMediaI D)   164                function  changePho to(iMediaI D)
160                {               165                {            
161                    var  oOldImg =  document.g etElementB yId("temPh otoID");   166                    var  oOldImg =  document.g etElementB yId("temPh otoID");
162     167  
163                     oOldImg.st yle.backgr oundImage   =   "url( '   .   $this   ->   sMediaUrl   .   ' photo_"+oP hotos[iMed iaID]["fil e"]+")";   168                     oOldImg.st yle.backgr oundImage   =   "url( { $this   ->   sMediaUrl } photo_"+oP hotos[iMed iaID]["fil e"]+")";
164                    chan geTitle( o Photos[iMe diaID]["ti tle"] );   169                    chan geTitle( o Photos[iMe diaID]["ti tle"] );
165     170  
166                    if ( oVotingmed iabig)   171                    if ( oVotingmed iabig)
167                    {   172                    {
168                         oVotingmed iabig._iOb jId = iMed iaID;   173                         oVotingmed iabig._iOb jId = iMed iaID;
169                         oVotingmed iabig.setC ount(oPhot os[iMediaI D]["count" ]);   174                         oVotingmed iabig.setC ount(oPhot os[iMediaI D]["count" ]);
170                         oVotingmed iabig.setR ate(oPhoto s[iMediaID ]["rate"]) ;   175                         oVotingmed iabig.setR ate(oPhoto s[iMediaID ]["rate"]) ;
171                    }   176                    }
172     177  
173     178  
174                    retu rn false;   179                    retu rn false;
175                }   180                }
176     181  
177                function  changeThu mb( iMedia ID )   182                function  changeThu mb( iMedia ID )
178                {   183                {
    184                    if ( '{$bUseFea ture}' ==  'false') {
179                    var  oOldImg =  document.g etElementB yId("temTh umbID");   185                         var oOldIm g = docume nt.getElem entById("t emThumbID" );
180                    var  oLink = do cument.get ElementByI d("temThum bLink");   186                         var oLink  = document .getElemen tById("tem ThumbLink" );
    187                         oOldImg.st yle.backgr oundImage  = "url({$t his -> sMe diaUrl}pho to_"+oIcon s[iMediaID ]["file"]+ ")";
    188                    }
181                    var  oTitle = d ocument.ge tElementBy Id("temPho toTitle");     189                    var  oTitle = d ocument.ge tElementBy Id("temPho toTitle");  
182     190  
183                    oOld Img.style. background Image = "u rl(' . $th is -> sMed iaUrl . 'p hoto_"+oIc ons[iMedia ID]["file" ]+")";    
184                    oTit le.innerHT ML = oIcon s[iMediaID ]["title"] ;   191                    oTit le.innerHT ML = oIcon s[iMediaID ]["title"] ;
185     192  
186                    if ( oVotingmed iasmall)   193                    if ( oVotingmed iasmall)
187                    {   194                    {
188                         oVotingmed iasmall._i ObjId = iM ediaID;   195                         oVotingmed iasmall._i ObjId = iM ediaID;
189                         oVotingmed iasmall.se tCount(oIc ons[iMedia ID]["count "]);   196                         oVotingmed iasmall.se tCount(oIc ons[iMedia ID]["count "]);
190                         oVotingmed iasmall.se tRate(oIco ns[iMediaI D]["rate"] );   197                         oVotingmed iasmall.se tRate(oIco ns[iMediaI D]["rate"] );
191                    }   198                    }
192     199  
193                     oLink.href   =   " '   .   $site['url ']   .   ' photos_gal lery.php?I D= '   .    $this   ->   iProfileID   .   ' &photoID="   +   iMediaID;   200                    if ( '{$bUseFea ture}' ==  'false') {
    201                         oLink.href   =   " { $site['url '] } photos_gal lery.php?I D= { $this   ->   iProfileID } &photoID="   +   iMediaID;
    202                    }
194     203  
195                    retu rn false;   204                    retu rn false;
196                }   205                }
197                                206                             
198                function  changeTit le( sTitle  )   207                function  changeTit le( sTitle  )
199                {   208                {
200                    var  oTitlDiv =  document. getElement ById("sTit leDiv");   209                    var  oTitlDiv =  document. getElement ById("sTit leDiv");
201                    oTit lDiv.inner HTML = str ipSlashes( sTitle);   210                    oTit lDiv.inner HTML = str ipSlashes( sTitle);
202                }   211                }
203     212  
204            </script> ';   213            </script>
    214   EOF;
205     215  
206           re turn $ret;   216           re turn $ret;
207       }   217       }
208     218  
209       functi on _getIco nsList(&$s JsArray, & $iCountPho tos)   219       functi on _getIco nsList(&$s JsArray, & $iCountPho tos)
210       {   220       {
211           $r et = '';   221           $r et = '';
212           $s JsArray =  'var oPhot os = {';   222           $s JsArray =  'var oPhot os = {';
213           $i CountPhoto s = 0;   223           $i CountPhoto s = 0;
214     224  
215           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   225           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
216           {   226           {
217                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   227                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
218                if( extF ileExists(  $sIconSrc  ) )   228                if( extF ileExists(  $sIconSrc  ) )
219                {   229                {
220                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;   230                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;
221                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0;    231                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0; 
222                       232                    
223                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   233                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
224     234  
225                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;   235                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;
226     236  
227                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  '); cursor :pointer;"   alt="" c lass="icon s" onmouse over="this .className =\'iconsHo ver\'" onm ouseout="t his.classN ame=\'icon s\'" oncli ck="return  changePho to(' . $at rib . ');"  />';   237                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  '); cursor :pointer;"   alt="" c lass="icon s" onmouse over="this .className =\'iconsHo ver\'" onm ouseout="t his.classN ame=\'icon s\'" oncli ck="return  changePho to(' . $at rib . ');"  />';
228     238  
229                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .     239                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .  
230                         "'title' :  '{$this - > aMedia[$ i]['med_ti tle']}',"    240                         "'title' :  '{$this - > aMedia[$ i]['med_ti tle']}'," 
231                         "'file' :  '{$this ->  aMedia[$i ]['med_fil e']}'," .    241                         "'file' :  '{$this ->  aMedia[$i ]['med_fil e']}'," . 
232                         "'rate' :  '{$iPhotoR ating}',"    242                         "'rate' :  '{$iPhotoR ating}'," 
233                         "'count' :  '{$iPhoto RatingCoun t}'},\n";   243                         "'count' :  '{$iPhoto RatingCoun t}'},\n";
234     244  
235                    ++$i CountPhoto s;   245                    ++$i CountPhoto s;
236                }   246                }
237                else   247                else
238                {   248                {
239                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );   249                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );
240                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  ');" alt=" " class="i cons" />';   250                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  ');" alt=" " class="i cons" />';
241                }   251                }
242     252  
243           }   253           }
244              254           
245           if ( $iCountP hotos )   255           if ( $iCountP hotos )
246                $sJsArra y = substr ($sJsArray ,0,-2);   256                $sJsArra y = substr ($sJsArray ,0,-2);
247              257           
248           $s JsArray .=  '}';   258           $s JsArray .=  '}';
249     259  
250           re turn $ret;   260           re turn $ret;
251       }   261       }
252          262       
253       // for  thumbs sw itching   263       // for  thumbs sw itching
254       functi on _getIco nsList2(&$ sJsArray,  &$iCountPh otos)   264       functi on _getIco nsList2(&$ sJsArray,  &$iCountPh otos)
255       {   265       {
256     266  
257           $r et = '';   267           $r et = '';
258           $s JsArray =  'var oIcon s = {';   268           $s JsArray =  'var oIcon s = {';
259           $i CountPhoto s = 0;   269           $i CountPhoto s = 0;
260     270  
261           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   271           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
262           {   272           {
263                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   273                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
264                if( extF ileExists(  $sIconSrc  ) )   274                if( extF ileExists(  $sIconSrc  ) )
265                {   275                {
266                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;   276                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;
267                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0;    277                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0; 
268     278  
269                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   279                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
270                       280                    
271                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;   281                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;
272     282  
273                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  ');"  alt= "" class=" icons" onc lick="retu rn changeT humb(' . $ atrib . ') ;" />';   283                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['iconWidt h'] . 'px;  height:'  . $this ->  aMediaCon fig['size' ]['iconHei ght'] . 'p x; backgro und-image: url(' . $s IconUrl .  ');"  alt= "" class=" icons" onc lick="retu rn changeT humb(' . $ atrib . ') ;" />';
274                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .     284                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .  
275                         "'title' :  '{$this - > aMedia[$ i]['med_ti tle']}',"    285                         "'title' :  '{$this - > aMedia[$ i]['med_ti tle']}'," 
276                         "'file' :  '{$this ->  aMedia[$i ]['med_fil e']}'," .    286                         "'file' :  '{$this ->  aMedia[$i ]['med_fil e']}'," . 
277                         "'rate' :  '{$iPhotoR ating}',"    287                         "'rate' :  '{$iPhotoR ating}'," 
278                         "'count' :  '{$iPhoto RatingCoun t}'},\n";   288                         "'count' :  '{$iPhoto RatingCoun t}'},\n";
279     289  
280                    ++$i CountPhoto s;   290                    ++$i CountPhoto s;
281                }   291                }
282           }   292           }
283           if ( $iCountP hotos )   293           if ( $iCountP hotos )
284                $sJsArra y = substr ($sJsArray ,0,-2);   294                $sJsArra y = substr ($sJsArray ,0,-2);
285              295           
286           $s JsArray .=  '}';   296           $s JsArray .=  '}';
287     297  
288           re turn $ret;   298           re turn $ret;
289       }   299       }
290     300  
291     301  
292     302  
293        function   getPrimary PhotoArray (
)
  303        function   getPrimary PhotoArray ( $iCouplePI D   =   0 )
294       {   304       {
295            $ aPr i mPho t o   =  
$ th i s   ->   getE le m e ntArrayBy ID (   $this   ->   aMedia['0' ]['PrimPho to']   ) ;
  305            $
i Des t ID   =   ( $
i Coup le PID>0)   ?   $iCoupl e P ID   :   $this   ->   aMedia['0' ]['PrimPho to']
;
    306           $a PrimPhoto  = $this ->  getElemen tArrayByID ( $iDestID  );
296           re turn $aPri mPhoto;   307           re turn $aPri mPhoto;
297       }   308       }
298          309       
299        function   getMediaBl ock(   $iMediaID   =   0  
)
  310        function   getMediaBl ock(   $iMediaID   =   0 ,   $bCouple   =   false   )
300       {   311       {
301           gl obal $site ;   312           gl obal $site ;
302           gl obal $vote s_pic;   313           gl obal $vote s_pic;
303     314  
304           $r et = '';   315           $r et = '';
305     316  
306           if ( $this ->  iMediaCou nt > 0 )   317           if ( $this ->  iMediaCou nt > 0 )
307           {   318           {
308                $iMediaI D = ( $iMe diaID > 0  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];   319                $iMediaI D = ( $iMe diaID > 0  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];
309     320  
310                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);   321                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);
311                if( empt y( $aCurPh oto ) )   322                if( empt y( $aCurPh oto ) )
312                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );   323                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );
313                else   324                else
314                {   325                {
315                    $iPh otoID = $a CurPhoto[' med_id'];   326                    $iPh otoID = $a CurPhoto[' med_id'];
316                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];   327                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];
317                }   328                }
318           }   329           }
319           el se   330           el se
320                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;   331                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;
321              332  
322            $ret   .=   $this   ->   getJSCode(   $aCurPhoto  
);
  333           $b UseFeature  = getPara m("profile _gallery_f eature") = = "on" ? t rue : fals e;
    334           // $bUseFeatu re = true;
    335           $b SUseFeatur e = ($bUse Feature) ?  'true' :  'false';
    336            $ret   .=   $this   ->   getJSCode(   $aCurPhoto ,   $bSUseFeat ure   );
323     337  
    338           $s Feature =  '';
    339           if  ($bUseFea ture) {
    340                for( $i  = 0; $i <  $this -> a MediaConfi g['max'][' photo']; $ i++ ) {
    341                    $sIc onSrc = $t his -> sMe diaDir . ' photo_' .  $this -> a Media[$i][ 'med_file' ]; 
    342                    if(  extFileExi sts( $sIco nSrc ) ) {
    343                         $sIconUrl  = $this ->  sMediaUrl  . 'photo_ ' . $this  -> aMedia[ $i]['med_f ile'];
    344                         //$atrib =  "'{$this  -> aMedia[ $i]['med_i d']}'";
    345                         //$sFeatIm gs .= '<a  href="' .  $site['url '] . 'phot os_gallery .php?ID='  .  $this - > iProfile ID . '">';
    346                         $sFeatImgs  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "width:' .  $this ->  aMediaConf ig['size'] ['photoWid th'] . 'px ; height:'  . $this - > aMediaCo nfig['size ']['photoH eight'] .  'px; backg round-imag e:url(' .  $sIconUrl  . ');posit ion:absolu te;"  alt= "" class=" icons" />' ;
    347                         //$sFeatIm gs .= '</a >';
    348                    }
    349                }
    350                $sFeatTo talHeight  = $this ->  aMediaCon fig['size' ]['photoHe ight'] + 3 0;
    351                $sFeatur e = <<<EOF
    352   <script ty pe="text/j avascript"  src="{$si te['url']} inc/js/jqu ery.dolPro moT.js"></ script>
    353   <script ty pe="text/j avascript" >
    354       $(docu ment).read y( functio n() {
    355           $(  '#iiPPhot o' ).dolPr omo( 3000,  1 );
    356       } );
    357   </script>
    358   <div style ="position :relative; width:100% ;height:{$ sFeatTotal Height}px; overflow:h idden;">
    359       <div i d="iiPPhot o">
    360           {$ sFeatImgs}
    361       </div>
    362   </div>
    363   EOF;
    364                $ret .=  $sFeature;
    365           }  else {
324           $r et .= '<di v class="p hotoBlock"  id="photo Keeper">';   366                $ret .=  '<div clas s="photoBl ock" id="p hotoKeeper ">';
325                $style =     367                    $sty le = 
326                    'wid th:'  . $t his -> aMe diaConfig[ 'size']['p hotoWidth' ] . 'px;'.   368                         'width:'   . $this ->  aMediaCon fig['size' ]['photoWi dth'] . 'p x;'.
327                    'hei ght:' . $t his -> aMe diaConfig[ 'size']['p hotoHeight '] . 'px;'  .   369                         'height:'  . $this ->  aMediaCon fig['size' ]['photoHe ight'] . ' px;' .
328                    'bac kground-im age:url('  . $sPhotoU rl . ');';   370                         'backgroun d-image:ur l(' . $sPh otoUrl . ' );';
329                   371                    
330                $ret .=  '<a href=" ' . $site[ 'url'] . ' photos_gal lery.php?I D=' .  $th is -> iPro fileID . ' " id="temT humbLink"> ';   372                    $ret  .= '<a hr ef="' . $s ite['url']  . 'photos _gallery.p hp?ID=' .   $this ->  iProfileID  . '" id=" temThumbLi nk">';
331                    $ret  .= '<img  src="' . g etTemplate Icon('spac er.gif') .  '" style= "' . $styl e . '" cla ss="photo"  alt="" id ="temThumb ID" />';   373                         $ret .= '< img src="'  . getTemp lateIcon(' spacer.gif ') . '" st yle="' . $ style . '"  class="ph oto" alt=" " id="temT humbID" /> ';
332                    //$r et .= '<im g src="' .  getTempla teIcon('sp acer.gif')  . '" styl e="' . $st yle . '" c lass="phot o" alt=""  onload="re turn setTh umb();" id ="temThumb ID" />';   374                         //$ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="' .  $style .  '" class=" photo" alt ="" onload ="return s etThumb(); " id="temT humbID" /> ';
333                $ret .=  '</a>';   375                    $ret  .= '</a>' ;
334                   376                    
335           $r et .= '</d iv>';   377                $ret .=  '</div>';
    378           }
336     379  
337           $r et .= '<di v id="temP hotoTitle"  class="ph oto_title" >' . strip slashes( $ aCurPhoto[ 'med_title '] ) . '</ div>';   380           $r et .= '<di v id="temP hotoTitle"  class="ph oto_title" >' . strip slashes( $ aCurPhoto[ 'med_title '] ) . '</ div>';
338     381  
    382           if  ($bCouple )
    383                return $ ret . '<di v class="c lear_both" ></div>';
    384  
339           $s JsIconsArr ay = '';   385           $s JsIconsArr ay = '';
340           $i CountPhoto s = 0;   386           $i CountPhoto s = 0;
341           $s Icons = $t his -> _ge tIconsList 2($sJsIcon sArray, $i CountPhoto s);   387           $s Icons = $t his -> _ge tIconsList 2($sJsIcon sArray, $i CountPhoto s);
342     388  
343           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );   389           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );
344           if ( $iCountP hotos && $ votes_pic  && $oVotin gView->isE nabled() )   390           if ( $iCountP hotos && $ votes_pic  && $oVotin gView->isE nabled() )
345                $ret .=  $oVotingVi ew->getSma llVoting ( );   391                $ret .=  $oVotingVi ew->getSma llVoting ( );
346           $r et .= '<di v class="c lear_both" ></div>';               392           $r et .= '<di v class="c lear_both" ></div>';            
347              393           
348           if ( strlen(  $sIcons )  )   394           if ( strlen(  $sIcons )  )
349           {   395           {
350                $ret .=  '<div clas s="scrollI conContain er">';   396                $ret .=  '<div clas s="scrollI conContain er">';
351                    $ret  .= '<div  class="scr ollCont" i d="scrollC ont">';   397                    $ret  .= '<div  class="scr ollCont" i d="scrollC ont">';
352                         $ret .= '< div class= "scrollLef t"  onmous eover="mov eScrollLef tAuto(  \' iconBlock\ ', 1 );" o nmouseout= "moveScrol lLeftAuto(   \'iconBl ock\', 0 ) ;"><img sr c="' . get TemplateIc on('left_a rrow.gif')  . '"/></d iv>';   398                         $ret .= '< div class= "scrollLef t"  onmous eover="mov eScrollLef tAuto(  \' iconBlock\ ', 1 );" o nmouseout= "moveScrol lLeftAuto(   \'iconBl ock\', 0 ) ;"><img sr c="' . get TemplateIc on('left_a rrow.gif')  . '"/></d iv>';
353                         $ret .= '< div class= "scrollRig ht" onmous eover="mov eScrollRig htAuto( \' iconBlock\ ', 1 );" o nmouseout= "moveScrol lRightAuto ( \'iconBl ock\', 0 ) ;"><img sr c="' . get TemplateIc on('right_ arrow.gif' ) . '"/></ div>';   399                         $ret .= '< div class= "scrollRig ht" onmous eover="mov eScrollRig htAuto( \' iconBlock\ ', 1 );" o nmouseout= "moveScrol lRightAuto ( \'iconBl ock\', 0 ) ;"><img sr c="' . get TemplateIc on('right_ arrow.gif' ) . '"/></ div>';
354                         $ret .= '< div class= "clear_bot h"></div>' ;   400                         $ret .= '< div class= "clear_bot h"></div>' ;
355                    $ret  .= '</div >';   401                    $ret  .= '</div >';
356                    $ret  .= '<div  class="ico nBlockCont ">';   402                    $ret  .= '<div  class="ico nBlockCont ">';
357                         $ret .= '< div id="ic onBlock" c lass="icon Block">';   403                         $ret .= '< div id="ic onBlock" c lass="icon Block">';
358                             $ret . = $sIcons;   404                             $ret . = $sIcons;
359                         $ret .= '< /div>';   405                         $ret .= '< /div>';
360                    $ret  .= '</div >';   406                    $ret  .= '</div >';
361                $ret .=  '</div>';   407                $ret .=  '</div>';
362           }   408           }
363     409  
364           $r et .= '<sc ript type= "text/java script">'  . $sJsIcon sArray . ' </script>' ;   410           $r et .= '<sc ript type= "text/java script">'  . $sJsIcon sArray . ' </script>' ;
365     411  
366           re turn $ret;   412           re turn $ret;
367       }   413       }
368     414  
369   }   415   }
370     416  
371     417  
372   ?>   418   ?>