56. File Comparison Report

Produced on Thu Jul 17 07:17:32 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.

56.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2 profilePhotos.php Sun May 11 13:17:04 2008 UTC
2 Dolphin-v.6.1.3 profilePhotos.php Wed Jul 16 09:51:23 2008 UTC

56.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 9 834
Changed 8 51
Inserted 0 0
Removed 0 0

56.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
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

56.4 Active regular expressions

No regular expressions were active.

56.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            $ret   .=   ' <script   type="text /javascrip t"> '   .   $sJsArray   .   '</script> ';   87           $r et .= '
    88                
<script   type="text /javascrip t">
    89                    ' .  $sJsArray  . '
    90                </script >';
88     91  
89           re turn $ret;   92           re turn $ret;
90       }   93       }
91     94  
92       functi on getJSCo de( $aCurP hoto, $bUs eFeature =  'false' )   95       functi on getJSCo de( $aCurP hoto, $bUs eFeature =  'false' )
93       {   96       {
94           gl obal $site ;   97           gl obal $site ;
95           $r et = '';   98           $r et = '';
96     99  
97           $r et .= <<<E OF   100           $r et .= <<<E OF
98           <s cript type ="text/jav ascript">   101           <s cript type ="text/jav ascript">
99                   102                
100                if (wind ow.attachE vent)   103                if (wind ow.attachE vent)
101                    wind ow.attachE vent( "onl oad", onlo adPhotos ) ;   104                    wind ow.attachE vent( "onl oad", onlo adPhotos ) ;
102                else   105                else
103                    wind ow.addEven tListener(  "load", o nloadPhoto s, false);   106                    wind ow.addEven tListener(  "load", o nloadPhoto s, false);
104                   107                
105                function  onloadPho tos()   108                function  onloadPho tos()
106                {   109                {
107                    hide Scroll();   110                    hide Scroll();
108                    if ( window.oVo tingmedias mall)   111                    if ( window.oVo tingmedias mall)
109                    {   112                    {
110                         oVotingmed iasmall.on vote = fun ction (fRa te, iCount   113                         oVotingmed iasmall.on vote = fun ction (fRa te, iCount
111                         {   114                         {
112                             oIcons [this._iOb jId]["rate "] = fRate ;   115                             oIcons [this._iOb jId]["rate "] = fRate ;
113                             oIcons [this._iOb jId]["coun t"] = iCou nt;   116                             oIcons [this._iOb jId]["coun t"] = iCou nt;
114                         }                         117                         }                      
115                    }   118                    }
116                    if ( window.oVo tingmediab ig)   119                    if ( window.oVo tingmediab ig)
117                    {   120                    {
118                         oVotingmed iabig.onvo te = funct ion (fRate , iCount)    121                         oVotingmed iabig.onvo te = funct ion (fRate , iCount) 
119                         {   122                         {
120                             oPhoto s[this._iO bjId]["rat e"] = fRat e;   123                             oPhoto s[this._iO bjId]["rat e"] = fRat e;
121                             oPhoto s[this._iO bjId]["cou nt"] = iCo unt;   124                             oPhoto s[this._iO bjId]["cou nt"] = iCo unt;
122                         }                         125                         }                      
123                    }   126                    }
124                }   127                }
125                   128                
126                //hide s crollers i f needed   129                //hide s crollers i f needed
127                function  hideScrol l()   130                function  hideScrol l()
128                {   131                {
129                    b =  document.g etElementB yId( "icon Block" );   132                    b =  document.g etElementB yId( "icon Block" );
130                    s =  document.g etElementB yId( "scro llCont" );   133                    s =  document.g etElementB yId( "scro llCont" );
131                       134                    
132                    if(  !b || !s )   135                    if(  !b || !s )
133                         return fal se;   136                         return fal se;
134                       137                    
135                    if(  b.parentNo de.clientW idth >= b. clientWidt h ) {   138                    if(  b.parentNo de.clientW idth >= b. clientWidt h ) {
136                         s.style.di splay = "n one";   139                         s.style.di splay = "n one";
137                         $( '#iconB lock' ).cs s( { float : 'none',  position:  'static',  marginRigh t: 'auto',  marginLef t: 'auto'  } );   140                         $( '#iconB lock' ).cs s( { float : 'none',  position:  'static',  marginRigh t: 'auto',  marginLef t: 'auto'  } );
138                    }   141                    }
139                    else   142                    else
140                         s.style.di splay = "b lock";   143                         s.style.di splay = "b lock";
141                }   144                }
142                   145                
143                function  setImage( )   146                function  setImage( )
144                {   147                {
145                    var  imgCode;   148                    var  imgCode;
146                    var  oOldImg =  document.g etElementB yId("temPh otoID");   149                    var  oOldImg =  document.g etElementB yId("temPh otoID");
147                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_{ $aCurPhoto ['med_file ']})";   150                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_{ $aCurPhoto ['med_file ']})";
148                    retu rn false;   151                    retu rn false;
149                }   152                }
150     153  
151                function  setThumb( )   154                function  setThumb( )
152                {   155                {
153                    if ( '{$bUseFea ture}' ==  'true')   156                    if ( '{$bUseFea ture}' ==  'true')
154                         return fal se;   157                         return fal se;
155                    var  imgCode;   158                    var  imgCode;
156                    var  oOldImg =  document.g etElementB yId("temTh umbID");   159                    var  oOldImg =  document.g etElementB yId("temTh umbID");
157                    var  oLink = do cument.get ElementByI d("temThum bLink");   160                    var  oLink = do cument.get ElementByI d("temThum bLink");
158                       161                    
159                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_{ $aCurPhoto ['med_file ']})";   162                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_{ $aCurPhoto ['med_file ']})";
160                    oLin k.href = " {$site['ur l']}photos _gallery.p hp?ID={$th is -> iPro fileID}&ph otoID={$aC urPhoto['m ed_id']}";   163                    oLin k.href = " {$site['ur l']}photos _gallery.p hp?ID={$th is -> iPro fileID}&ph otoID={$aC urPhoto['m ed_id']}";
161                    retu rn false;   164                    retu rn false;
162                }   165                }
163     166  
164                function  changePho to(iMediaI D)   167                function  changePho to(iMediaI D)
165                {               168                {            
166                    var  oOldImg =  document.g etElementB yId("temPh otoID");   169                    var  oOldImg =  document.g etElementB yId("temPh otoID");
167     170  
168                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_" +oPhotos[i MediaID][" file"]+")" ;   171                    oOld Img.style. background Image = "u rl({$this  -> sMediaU rl}photo_" +oPhotos[i MediaID][" file"]+")" ;
169                    chan geTitle( o Photos[iMe diaID]["ti tle"] );   172                    chan geTitle( o Photos[iMe diaID]["ti tle"] );
170     173  
171                    if ( oVotingmed iabig)   174                    if ( oVotingmed iabig)
172                    {   175                    {
173                         oVotingmed iabig._iOb jId = iMed iaID;   176                         oVotingmed iabig._iOb jId = iMed iaID;
174                         oVotingmed iabig.setC ount(oPhot os[iMediaI D]["count" ]);   177                         oVotingmed iabig.setC ount(oPhot os[iMediaI D]["count" ]);
175                         oVotingmed iabig.setR ate(oPhoto s[iMediaID ]["rate"]) ;   178                         oVotingmed iabig.setR ate(oPhoto s[iMediaID ]["rate"]) ;
176                    }   179                    }
177     180  
178     181  
179                    retu rn false;   182                    retu rn false;
180                }   183                }
181     184  
182                function  changeThu mb( iMedia ID )   185                function  changeThu mb( iMedia ID )
183                {   186                {
184                    if ( '{$bUseFea ture}' ==  'false') {   187                    if ( '{$bUseFea ture}' ==  'false') {
185                         var oOldIm g = docume nt.getElem entById("t emThumbID" );   188                         var oOldIm g = docume nt.getElem entById("t emThumbID" );
186                         var oLink  = document .getElemen tById("tem ThumbLink" );   189                         var oLink  = document .getElemen tById("tem ThumbLink" );
187                         oOldImg.st yle.backgr oundImage  = "url({$t his -> sMe diaUrl}pho to_"+oIcon s[iMediaID ]["file"]+ ")";   190                         oOldImg.st yle.backgr oundImage  = "url({$t his -> sMe diaUrl}pho to_"+oIcon s[iMediaID ]["file"]+ ")";
188                    }   191                    }
189                    var  oTitle = d ocument.ge tElementBy Id("temPho toTitle");     192                    var  oTitle = d ocument.ge tElementBy Id("temPho toTitle");  
190     193  
191                    oTit le.innerHT ML = oIcon s[iMediaID ]["title"] ;   194                    oTit le.innerHT ML = oIcon s[iMediaID ]["title"] ;
192     195  
193                    if ( oVotingmed iasmall)   196                    if ( oVotingmed iasmall)
194                    {   197                    {
195                         oVotingmed iasmall._i ObjId = iM ediaID;   198                         oVotingmed iasmall._i ObjId = iM ediaID;
196                         oVotingmed iasmall.se tCount(oIc ons[iMedia ID]["count "]);   199                         oVotingmed iasmall.se tCount(oIc ons[iMedia ID]["count "]);
197                         oVotingmed iasmall.se tRate(oIco ns[iMediaI D]["rate"] );   200                         oVotingmed iasmall.se tRate(oIco ns[iMediaI D]["rate"] );
198                    }   201                    }
199     202  
200                    if ( '{$bUseFea ture}' ==  'false') {   203                    if ( '{$bUseFea ture}' ==  'false') {
201                         oLink.href  = "{$site ['url']}ph otos_galle ry.php?ID= {$this ->  iProfileID }&photoID= " + iMedia ID;   204                         oLink.href  = "{$site ['url']}ph otos_galle ry.php?ID= {$this ->  iProfileID }&photoID= " + iMedia ID;
202                    }   205                    }
203     206  
204                    retu rn false;   207                    retu rn false;
205                }   208                }
206                                209                             
207                function  changeTit le( sTitle  )   210                function  changeTit le( sTitle  )
208                {   211                {
209                    var  oTitlDiv =  document. getElement ById("sTit leDiv");   212                    var  oTitlDiv =  document. getElement ById("sTit leDiv");
210                    oTit lDiv.inner HTML = str ipSlashes( sTitle);   213                    oTit lDiv.inner HTML = str ipSlashes( sTitle);
211                }   214                }
212     215  
213           </ script>   216           </ script>
214   EOF;   217   EOF;
215     218  
216           re turn $ret;   219           re turn $ret;
217       }   220       }
218     221  
219       functi on _getIco nsList(&$s JsArray, & $iCountPho tos)   222       functi on _getIco nsList(&$s JsArray, & $iCountPho tos)
220       {   223       {
221           $r et = '';   224           $r et = '';
222           $s JsArray =  'var oPhot os = {';   225           $s JsArray =  'var oPhot os = {';
223           $i CountPhoto s = 0;   226           $i CountPhoto s = 0;
224     227  
225           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   228           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
226           {   229           {
227                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   230                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
228                if( extF ileExists(  $sIconSrc  ) )   231                if( extF ileExists(  $sIconSrc  ) )
229                {   232                {
230                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;   233                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;
231                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0;    234                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0; 
232                       235                    
233                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   236                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
234     237  
235                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;   238                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;
236     239  
237                     $ret   .=   '<img   src="'   .   getTemplat eIcon('spa cer.gif')   .   '"   style="wid th:'   .   $this   ->   aMediaConf ig['size'] ['iconWidt h']   .   'px;   height:'   .   $this   ->   aMediaConf ig['size'] ['iconHeig ht']   .   'px;   background -image:url ('   .   $sIconUrl   .   ');   cursor:poi nter;"    alt=""   class="ico ns"   onmouseove r="this.cl assName=\' iconsHover \'"   onmouseout ="this.cla ssName=\'i cons\'"   onclick="r eturn   changePhot o('   .   $atrib   .   ');"   />';   240                    $ret  .= '
    241                         <img src=" ' . getTem plateIcon( 'spacer.gi f') . '"
    242                           
style="wid th:'   .   $this   ->   aMediaConf ig['size'] ['iconWidt h']   .   'px;   height:'   .   $this   ->   aMediaConf ig['size'] ['iconHeig ht']   .   'px;   background -image:url ('   .   $sIconUrl   .   ');   cursor:poi nter;"
    243                           alt="" c lass="icon s" onmouse over="this .className =\'iconsHo ver\'" onm ouseout="t his.classN ame=\'icon s\'"
    244                           onclick= "return ch angePhoto( ' . $atrib  . ');" /> ';
238     245  
239                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .     246                    $sJs Array .= "
240                         "'title'   :   '{$this   ->   aMedia[$i] ['med_ t i tle ']}' ,"   .     247                        
'{$this   ->   aMedia[$i] ['med_
i d ']}'   :   {
241                         " ' f i
le'   :   ' { $this   ->   aMedia[$i] ['med_ f i
le'] } ', "   .  
  248                             
' t i t le'   :   ' "   .   addslashes (   htmlspecia lchars(   $this   ->   aMedia[$i] ['med_ t i t le']   )   )   .   " ',
242                         " 'rate'   :   '{$iPhotoR ating}', "   .     249                             'file'  : '{$this  -> aMedia [$i]['med_ file']}',
243                         " 'count'   :   '{$iPhotoR atingCount }' },\n";   250                             
'rate'   :   '{$iPhotoR ating}',
    251                             
'count'   :   '{$iPhotoR atingCount }'
    252                         },";
244     253  
245                    ++$i CountPhoto s;   254                    ++$i CountPhoto s;
246                }   255                }
247                else   256                else
248                {   257                {
249                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );   258                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );
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" />';   259                    $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" />';
251                }   260                }
252     261  
253           }   262           }
254              263           
255           if ( $iCountP hotos )   264           if ( $iCountP hotos )
256                 $sJsArray   =   substr($sJ sArray,0,- 2 );   265                 $sJsArray   =   substr($sJ sArray,0,- 1 );
257              266           
258           $s JsArray .=  '}';   267           $s JsArray .=  '}';
259     268  
260           re turn $ret;   269           re turn $ret;
261       }   270       }
262          271       
263       // for  thumbs sw itching   272       // for  thumbs sw itching
264       functi on _getIco nsList2(&$ sJsArray,  &$iCountPh otos)   273       functi on _getIco nsList2(&$ sJsArray,  &$iCountPh otos)
265       {   274       {
266     275  
267           $r et = '';   276           $r et = '';
268           $s JsArray =  'var oIcon s = {';   277           $s JsArray =  'var oIcon s = {';
269           $i CountPhoto s = 0;   278           $i CountPhoto s = 0;
270     279  
271           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   280           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
272           {   281           {
273                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   282                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
274                if( extF ileExists(  $sIconSrc  ) )   283                if( extF ileExists(  $sIconSrc  ) )
275                {   284                {
276                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;   285                    $iPh otoRatingC ount = $th is -> aMed ia[$i]['vo ting_count '] ? $this  -> aMedia [$i]['voti ng_count']  : 0;
277                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0;    286                    $iPh otoRating  = $this ->  aMedia[$i ]['voting_ rate'] ? $ this -> aM edia[$i][' voting_rat e'] : 0; 
278     287  
279                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   288                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
280                       289                    
281                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;   290                    $atr ib = "'{$t his -> aMe dia[$i]['m ed_id']}'" ;
282     291  
283                     $ret   .=   '<img   src="'   .   getTemplat eIcon('spa cer.gif')   .   '"   style="wid th:'   .   $this   ->   aMediaConf ig['size'] ['iconWidt h']   .   'px;   height:'   .   $this   ->   aMediaConf ig['size'] ['iconHeig ht']   .   'px;   background -image:url ('   .   $sIconUrl   .   ');"    alt=""   class="ico ns"   onclick="r eturn   changeThum b('   .   $atrib   .   ');"   />';   292                    $ret  .= '
284                    $sJs Array .= " '{$this ->  aMedia[$i ]['med_id' ]}' : {" .     293                         <img src=" ' . getTem plateIcon( 'spacer.gi f') . '"
285                         "'title'   :   '{$this   ->   aMedia[$i] ['med_ t i tle ']}' ,"   .     294                           
style="wid th:'   .   $this   ->   aMediaConf ig['size'] ['iconWidt h']   .   'px;   height:'   .   $this   ->   aMediaConf ig['size'] ['iconHeig ht']   .   'px;   background -image:url ('   .   $sIconUrl   .   ');"
286                         " ' f i
le'   :   ' { $this   ->   aMedia[$i] ['med_ f i
le'] } ', "   .  
  295                           alt="" c lass="icon s" onclick ="return c hangeThumb (' . $atri b . ');" / >';
287                         " 'rate'   :   '{$iPhotoR ating}', "   .     296                    $sJs Array .= "
288                         " 'count'   :   '{$iPhotoR atingCount }' },\n";   297                        
'{$this   ->   aMedia[$i] ['med_
i d ']}'   :   {
    298                             
' t i t le'   :   ' "   .   addslashes (   htmlspecia lchars(   $this   ->   aMedia[$i] ['med_ t i t le']   )   )   .   " ',
    299                             'file'  : '{$this  -> aMedia [$i]['med_ file']}',
    300                             
'rate'   :   '{$iPhotoR ating}',
    301                             
'count'   :   '{$iPhotoR atingCount }'
    302                         },";
289     303  
290                    ++$i CountPhoto s;   304                    ++$i CountPhoto s;
291                }   305                }
292           }   306           }
293           if ( $iCountP hotos )   307           if ( $iCountP hotos )
294                 $sJsArray   =   substr($sJ sArray,0,- 2 );   308                 $sJsArray   =   substr($sJ sArray,0,- 1 );
295              309           
296           $s JsArray .=  '}';   310           $s JsArray .=  '}';
297     311  
298           re turn $ret;   312           re turn $ret;
299       }   313       }
300     314  
301     315  
302     316  
303       functi on getPrim aryPhotoAr ray($iCoup lePID = 0)   317       functi on getPrim aryPhotoAr ray($iCoup lePID = 0)
304       {   318       {
305           $i DestID = ( $iCouplePI D>0) ? $iC ouplePID :  $this ->  aMedia['0' ]['PrimPho to'];   319           $i DestID = ( $iCouplePI D>0) ? $iC ouplePID :  $this ->  aMedia['0' ]['PrimPho to'];
306           $a PrimPhoto  = $this ->  getElemen tArrayByID ( $iDestID  );   320           $a PrimPhoto  = $this ->  getElemen tArrayByID ( $iDestID  );
307           re turn $aPri mPhoto;   321           re turn $aPri mPhoto;
308       }   322       }
309          323       
310       functi on getMedi aBlock( $i MediaID =  0, $bCoupl e = false  )   324       functi on getMedi aBlock( $i MediaID =  0, $bCoupl e = false  )
311       {   325       {
312           gl obal $site ;   326           gl obal $site ;
313           gl obal $vote s_pic;   327           gl obal $vote s_pic;
314     328  
315           $r et = '';   329           $r et = '';
316     330  
317           if ( $this ->  iMediaCou nt > 0 )   331           if ( $this ->  iMediaCou nt > 0 )
318           {   332           {
319                $iMediaI D = ( $iMe diaID > 0  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];   333                $iMediaI D = ( $iMe diaID > 0  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];
320     334  
321                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);   335                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);
322                if( empt y( $aCurPh oto ) )   336                if( empt y( $aCurPh oto ) )
323                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );   337                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );
324                else   338                else
325                {   339                {
326                    $iPh otoID = $a CurPhoto[' med_id'];   340                    $iPh otoID = $a CurPhoto[' med_id'];
327                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];   341                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];
328                }   342                }
329           }   343           }
330           el se   344           el se
331                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;   345                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;
332     346  
333           $b UseFeature  = getPara m("profile _gallery_f eature") = = "on" ? t rue : fals e;   347           $b UseFeature  = getPara m("profile _gallery_f eature") = = "on" ? t rue : fals e;
334           // $bUseFeatu re = true;   348           // $bUseFeatu re = true;
335           $b SUseFeatur e = ($bUse Feature) ?  'true' :  'false';   349           $b SUseFeatur e = ($bUse Feature) ?  'true' :  'false';
336           $r et .= $thi s -> getJS Code( $aCu rPhoto, $b SUseFeatur e );   350           $r et .= $thi s -> getJS Code( $aCu rPhoto, $b SUseFeatur e );
337     351  
338           $s Feature =  '';   352           $s Feature =  '';
339           if  ($bUseFea ture) {   353           if  ($bUseFea ture) {
340                for( $i  = 0; $i <  $this -> a MediaConfi g['max'][' photo']; $ i++ ) {   354                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' ];    355                    $sIc onSrc = $t his -> sMe diaDir . ' photo_' .  $this -> a Media[$i][ 'med_file' ]; 
342                    if(  extFileExi sts( $sIco nSrc ) ) {   356                    if(  extFileExi sts( $sIco nSrc ) ) {
343                         $sIconUrl  = $this ->  sMediaUrl  . 'photo_ ' . $this  -> aMedia[ $i]['med_f ile'];   357                         $sIconUrl  = $this ->  sMediaUrl  . 'photo_ ' . $this  -> aMedia[ $i]['med_f ile'];
344                         //$atrib =  "'{$this  -> aMedia[ $i]['med_i d']}'";   358                         //$atrib =  "'{$this  -> aMedia[ $i]['med_i d']}'";
345                         //$sFeatIm gs .= '<a  href="' .  $site['url '] . 'phot os_gallery .php?ID='  .  $this - > iProfile ID . '">';   359                         //$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" />' ;   360                         $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 >';   361                         //$sFeatIm gs .= '</a >';
348                    }   362                    }
349                }   363                }
350                $sFeatTo talHeight  = $this ->  aMediaCon fig['size' ]['photoHe ight'] + 3 0;   364                $sFeatTo talHeight  = $this ->  aMediaCon fig['size' ]['photoHe ight'] + 3 0;
351     365  
352                $iNumber =($bCouple ) ? '2' :  '1';   366                $iNumber =($bCouple ) ? '2' :  '1';
353     367  
354                $sFeatur e = <<<EOF   368                $sFeatur e = <<<EOF
355   <script ty pe="text/j avascript"  src="{$si te['url']} inc/js/jqu ery.dolPro moT.js"></ script>   369   <script ty pe="text/j avascript"  src="{$si te['url']} inc/js/jqu ery.dolPro moT.js"></ script>
356   <script ty pe="text/j avascript" >   370   <script ty pe="text/j avascript" >
357       $(docu ment).read y( functio n() {   371       $(docu ment).read y( functio n() {
358           $(  '#iiPPhot o{$iNumber }' ).dolPr omo( 3000,  1 );   372           $(  '#iiPPhot o{$iNumber }' ).dolPr omo( 3000,  1 );
359       } );   373       } );
360   </script>   374   </script>
361   EOF;   375   EOF;
362     376  
363                if ($sFe atImgs ==  '') {   377                if ($sFe atImgs ==  '') {
364                    $sty le =    378                    $sty le = 
365                         'width:'   . $this ->  aMediaCon fig['size' ]['photoWi dth'] . 'p x;'.   379                         'width:'   . $this ->  aMediaCon fig['size' ]['photoWi dth'] . 'p x;'.
366                         'height:'  . $this ->  aMediaCon fig['size' ]['photoHe ight'] . ' px;' .   380                         'height:'  . $this ->  aMediaCon fig['size' ]['photoHe ight'] . ' px;' .
367                         'backgroun d-image:ur l(' . $sPh otoUrl . ' );   381                         'backgroun d-image:ur l(' . $sPh otoUrl . ' );
368                         ';   382                         ';
369                       383                    
370                    $sFe atImgs = ' <img src=" ' . getTem plateIcon( 'spacer.gi f') . '" s tyle="' .  $style . ' " class="p hoto" alt= "" />';   384                    $sFe atImgs = ' <img src=" ' . getTem plateIcon( 'spacer.gi f') . '" s tyle="' .  $style . ' " class="p hoto" alt= "" />';
371                    $sFe ature = '' ;   385                    $sFe ature = '' ;
372                }   386                }
373                $sFeatur e .= <<<EO F   387                $sFeatur e .= <<<EO F
374   <div style ="position :relative; width:100% ;height:{$ sFeatTotal Height}px; overflow:h idden;">   388   <div style ="position :relative; width:100% ;height:{$ sFeatTotal Height}px; overflow:h idden;">
375       <div i d="iiPPhot o{$iNumber }">   389       <div i d="iiPPhot o{$iNumber }">
376           {$ sFeatImgs}   390           {$ sFeatImgs}
377       </div>   391       </div>
378   </div>   392   </div>
379   EOF;   393   EOF;
380                $ret .=  $sFeature;   394                $ret .=  $sFeature;
381           }  else {   395           }  else {
382                $ret .=  '<div clas s="photoBl ock" id="p hotoKeeper ">';   396                $ret .=  '<div clas s="photoBl ock" id="p hotoKeeper ">';
383                    $sty le =    397                    $sty le = 
384                         'width:'   . $this ->  aMediaCon fig['size' ]['photoWi dth'] . 'p x;'.   398                         'width:'   . $this ->  aMediaCon fig['size' ]['photoWi dth'] . 'p x;'.
385                         'height:'  . $this ->  aMediaCon fig['size' ]['photoHe ight'] . ' px;' .   399                         'height:'  . $this ->  aMediaCon fig['size' ]['photoHe ight'] . ' px;' .
386                         'backgroun d-image:ur l(' . $sPh otoUrl . ' );';   400                         'backgroun d-image:ur l(' . $sPh otoUrl . ' );';
387                       401                    
388                    $ret  .= '<a hr ef="' . $s ite['url']  . 'photos _gallery.p hp?ID=' .   $this ->  iProfileID  . '" id=" temThumbLi nk">';   402                    $ret  .= '<a hr ef="' . $s ite['url']  . 'photos _gallery.p hp?ID=' .   $this ->  iProfileID  . '" id=" temThumbLi nk">';
389                         $ret .= '< img src="'  . getTemp lateIcon(' spacer.gif ') . '" st yle="' . $ style . '"  class="ph oto" alt=" " id="temT humbID" /> ';   403                         $ret .= '< img src="'  . getTemp lateIcon(' spacer.gif ') . '" st yle="' . $ style . '"  class="ph oto" alt=" " id="temT humbID" /> ';
390                         //$ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="' .  $style .  '" class=" photo" alt ="" onload ="return s etThumb(); " id="temT humbID" /> ';   404                         //$ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="' .  $style .  '" class=" photo" alt ="" onload ="return s etThumb(); " id="temT humbID" /> ';
391                    $ret  .= '</a>' ;   405                    $ret  .= '</a>' ;
392                       406                    
393                $ret .=  '</div>';   407                $ret .=  '</div>';
394           }   408           }
395     409  
396            $ret   .=   '<div   id="temPho toTitle"   class="pho to_title"> '   .   s t rips l a s h e
s(   $aCurPhoto ['med_titl e']   )   .   '</div>';
  410            $ret   .=   '<div   id="temPho toTitle"   class="pho to_title"> '   .   h t m l
s p e cialchar s(   $aCurPhoto ['med_titl e']   )   .   '</div>';
397     411  
398           if  ($bCouple )   412           if  ($bCouple )
399                return $ ret . '<di v class="c lear_both" ></div>';   413                return $ ret . '<di v class="c lear_both" ></div>';
400     414  
401           $s JsIconsArr ay = '';   415           $s JsIconsArr ay = '';
402           $i CountPhoto s = 0;   416           $i CountPhoto s = 0;
403           $s Icons = $t his -> _ge tIconsList 2($sJsIcon sArray, $i CountPhoto s);   417           $s Icons = $t his -> _ge tIconsList 2($sJsIcon sArray, $i CountPhoto s);
404     418  
405           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );   419           $o VotingView  = new BxT emplVoting View ('med ia', (int) $aCurPhoto ['med_id'] );
406           if ( $iCountP hotos && $ votes_pic  && $oVotin gView->isE nabled() )   420           if ( $iCountP hotos && $ votes_pic  && $oVotin gView->isE nabled() )
407                $ret .=  $oVotingVi ew->getSma llVoting ( );   421                $ret .=  $oVotingVi ew->getSma llVoting ( );
408           $r et .= '<di v class="c lear_both" ></div>';               422           $r et .= '<di v class="c lear_both" ></div>';            
409              423           
410           if ( strlen(  $sIcons )  )   424           if ( strlen(  $sIcons )  )
411           {   425           {
412                $ret .=  '<div clas s="scrollI conContain er">';   426                $ret .=  '<div clas s="scrollI conContain er">';
413                    $ret  .= '<div  class="scr ollCont" i d="scrollC ont">';   427                    $ret  .= '<div  class="scr ollCont" i d="scrollC ont">';
414                         $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>';   428                         $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>';
415                         $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>';   429                         $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>';
416                         $ret .= '< div class= "clear_bot h"></div>' ;   430                         $ret .= '< div class= "clear_bot h"></div>' ;
417                    $ret  .= '</div >';   431                    $ret  .= '</div >';
418                    $ret  .= '<div  class="ico nBlockCont ">';   432                    $ret  .= '<div  class="ico nBlockCont ">';
419                         $ret .= '< div id="ic onBlock" c lass="icon Block">';   433                         $ret .= '< div id="ic onBlock" c lass="icon Block">';
420                             $ret . = $sIcons;   434                             $ret . = $sIcons;
421                         $ret .= '< /div>';   435                         $ret .= '< /div>';
422                    $ret  .= '</div >';   436                    $ret  .= '</div >';
423                $ret .=  '</div>';   437                $ret .=  '</div>';
424           }   438           }
425     439  
426            $ret   .=   ' <script   type="text /javascrip t"> '   .   $sJsIconsA rray   .   '</script> ';   440           $r et .= '
    441                
<script   type="text /javascrip t">
    442                    ' .  $sJsIconsA rray . '
    443                </script >';
427     444  
428           re turn $ret;   445           re turn $ret;
429       }   446       }
430     447  
431   }   448   }
432     449  
433     450  
434   ?>   451   ?>