63. File Comparison Report

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

63.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2 uploadPhoto.php Mon Mar 31 07:47:50 2008 UTC
2 Dolphin-v.6.1.3 uploadPhoto.php Wed Jul 16 09:51:23 2008 UTC

63.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 732
Changed 2 27
Inserted 0 0
Removed 0 0

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

63.4 Active regular expressions

No regular expressions were active.

63.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_CLASSES  . 'BxDolMe dia.php');   21   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolMe dia.php');
22     22  
23     23  
24   class Uplo adPhoto ex tends BxDo lMedia   24   class Uplo adPhoto ex tends BxDo lMedia
25   {   25   {
26       functi on UploadP hoto( $iPr ofileID )   26       functi on UploadP hoto( $iPr ofileID )
27       {   27       {
28           $t his -> sMe diaType =  'photo';   28           $t his -> sMe diaType =  'photo';
29           $t his -> iPr ofileID =  $iProfileI D;   29           $t his -> iPr ofileID =  $iProfileI D;
30           pa rent::BxDo lMedia();   30           pa rent::BxDo lMedia();
31              31           
32           $a Member = g etProfileI nfo( $this  -> iProfi leID );   32           $a Member = g etProfileI nfo( $this  -> iProfi leID );
33           $s Sex = $aMe mber['Sex' ];   33           $s Sex = $aMe mber['Sex' ];
34              34           
35           // $sSex = db _value( "S ELECT `Sex ` FROM `Pr ofiles` WH ERE `ID` =  '{$this - > iProfile ID}'" );   35           // $sSex = db _value( "S ELECT `Sex ` FROM `Pr ofiles` WH ERE `ID` =  '{$this - > iProfile ID}'" );
36              36           
37           if ( $sSex ==  'male' or  $sSex ==  'Male' )   37           if ( $sSex ==  'male' or  $sSex ==  'Male' )
38           {   38           {
39                $this ->  sSexIcon  = 'man_sma ll.gif';   39                $this ->  sSexIcon  = 'man_sma ll.gif';
40                $this ->  sSexPic =  'man_big. gif';   40                $this ->  sSexPic =  'man_big. gif';
41           }   41           }
42           el seif( $sSe x == 'fema le' or $sS ex == 'Fem ale' )   42           el seif( $sSe x == 'fema le' or $sS ex == 'Fem ale' )
43           {   43           {
44                $this ->  sSexIcon  = 'woman_s mall.gif';   44                $this ->  sSexIcon  = 'woman_s mall.gif';
45                $this ->  sSexPic =  'woman_bi g.gif';   45                $this ->  sSexPic =  'woman_bi g.gif';
46           }   46           }
47           el se   47           el se
48           {   48           {
49                $this ->  sSexIcon  = 'visitor _small.gif ';   49                $this ->  sSexIcon  = 'visitor _small.gif ';
50                $this ->  sSexPic =  'visitor_ big.gif';   50                $this ->  sSexPic =  'visitor_ big.gif';
51           }   51           }
52       }   52       }
53     53  
54     54  
55       functi on getMedi aPage( $iM ediaID = ' ' )   55       functi on getMedi aPage( $iM ediaID = ' ' )
56       {   56       {
57     57  
58     58  
59           // print_r( $ this -> aM edia);   59           // print_r( $ this -> aM edia);
60     60  
61           $r et = '';   61           $r et = '';
62           // $ret .= pr int_r($_PO ST, true);   62           // $ret .= pr int_r($_PO ST, true);
63     63  
64           $b ShowMenu =  false;   64           $b ShowMenu =  false;
65           $b WithoutJS  = false;   65           $b WithoutJS  = false;
66     66  
67     67  
68           if ( 0 < $thi s -> iMedi aCount )   68           if ( 0 < $thi s -> iMedi aCount )
69           {   69           {
70                $iMediaI D = ( 0 <  $iMediaID  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];   70                $iMediaI D = ( 0 <  $iMediaID  ) ? $iMedi aID : $thi s -> aMedi a['0']['Pr imPhoto'];
71     71  
72                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);   72                $aCurPho to = $this  -> getEle mentArrayB yID($iMedi aID);
73                if( empt y( $aCurPh oto ) )   73                if( empt y( $aCurPh oto ) )
74                {   74                {
75                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );   75                    $sPh otoUrl = g etTemplate Icon( $thi s -> sSexP ic );
76                    $bSh owMenu = f alse;   76                    $bSh owMenu = f alse;
77                    $bWi thoutJS =  true;   77                    $bWi thoutJS =  true;
78                }   78                }
79                else   79                else
80                {   80                {
81                    $ret  .= '<div  class="med iaTitle" i d="sTitleD iv">';   81                    $ret  .= '<div  class="med iaTitle" i d="sTitleD iv">';
82                         $ret   .=  
p roc e ss_l i ne _ output (   $aCurPhoto ['med_titl e']   );
  82                         $ret   .=   htmls p
e c i alchars _ adv (   $aCurPhoto ['med_titl e']   );
83                    $ret  .= '</div >';   83                    $ret  .= '</div >';
84                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];   84                    $sPh otoUrl = $ this -> sM ediaUrl .  'photo_' .  $aCurPhot o['med_fil e'];
85                    $iPh otoRating  = $this ->  getRating ( $aCurPho to['med_ra ting_sum'] , $aCurPho to['med_ra ting_count '] );   85                    $iPh otoRating  = $this ->  getRating ( $aCurPho to['med_ra ting_sum'] , $aCurPho to['med_ra ting_count '] );
86                    $bSh owMenu = t rue;   86                    $bSh owMenu = t rue;
87                }   87                }
88     88  
89           }   89           }
90           el se   90           el se
91           {   91           {
92                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;   92                $sPhotoU rl = getTe mplateIcon ( $this ->  sSexPic ) ;
93                $bShowMe nu = false ;   93                $bShowMe nu = false ;
94           }   94           }
95     95  
96           $r et .= $thi s -> getJS Code( $aCu rPhoto );   96           $r et .= $thi s -> getJS Code( $aCu rPhoto );
97     97  
98           $r et .= '<di v class="r atingParen tBlock">';   98           $r et .= '<di v class="r atingParen tBlock">';
99                $ret .=  '<div clas s="ratingB lock" styl e="height: ' . $this  -> aMediaC onfig['siz e']['photo Height'] .  'px; widt h:10px;">' ;   99                $ret .=  '<div clas s="ratingB lock" styl e="height: ' . $this  -> aMediaC onfig['siz e']['photo Height'] .  'px; widt h:10px;">' ;
100                    $ret  .= '<div  class="rat ingInner"  id="sPhoto RatingDiv"  style="he ight:' . $ iPhotoRati ng . '%;"> ';   100                    $ret  .= '<div  class="rat ingInner"  id="sPhoto RatingDiv"  style="he ight:' . $ iPhotoRati ng . '%;"> ';
101                         $ret .= '< div class= "ratingTex tBlock">';   101                         $ret .= '< div class= "ratingTex tBlock">';
102                             $ret . = '<div id ="sRatingT extDiv" st yle="heigh t:0%;">';   102                             $ret . = '<div id ="sRatingT extDiv" st yle="heigh t:0%;">';
103                                 $i PhotoRatin gSum = ( 0  < $aCurPh oto['med_r ating_sum' ] ) ? $aCu rPhoto['me d_rating_s um'] : 0 ;   103                                 $i PhotoRatin gSum = ( 0  < $aCurPh oto['med_r ating_sum' ] ) ? $aCu rPhoto['me d_rating_s um'] : 0 ;
104                                 $i PhotoRatin gCount = (  0 < $aCur Photo['med _rating_co unt'] ) ?  $aCurPhoto ['med_rati ng_count']  : 0;   104                                 $i PhotoRatin gCount = (  0 < $aCur Photo['med _rating_co unt'] ) ?  $aCurPhoto ['med_rati ng_count']  : 0;
105                                 $r et .= _t(' _votes') .  '&nbsp;'  . $iPhotoR atingCount  . '<br>';   105                                 $r et .= _t(' _votes') .  '&nbsp;'  . $iPhotoR atingCount  . '<br>';
106                                 $r et .= _t(' _ratio') .  '&nbsp;'  . $iPhotoR atingSum;   106                                 $r et .= _t(' _ratio') .  '&nbsp;'  . $iPhotoR atingSum;
107                             $ret . = '</div>'  . "\n";   107                             $ret . = '</div>'  . "\n";
108                         $ret .= '< /div>' . " \n";   108                         $ret .= '< /div>' . " \n";
109                    $ret  .= '</div >' . "\n";   109                    $ret  .= '</div >' . "\n";
110                $ret .=  '</div>' .  "\n";   110                $ret .=  '</div>' .  "\n";
111           $r et .= '</d iv>' . "\n ";   111           $r et .= '</d iv>' . "\n ";
112     112  
113           $r et .= '<di v class="p hotoBlock"  id="photo Keeper">';   113           $r et .= '<di v class="p hotoBlock"  id="photo Keeper">';
114                $ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="wid th:' . $th is -> aMed iaConfig[' size']['ph otoWidth']  . 'px; he ight:' . $ this -> aM ediaConfig ['size'][' photoHeigh t'] . 'px;  backgroun d-image:ur l(' . $sPh otoUrl . ' );" class= "photo" id ="temPhoto ID" alt=""  />';   114                $ret .=  '<img src= "' . getTe mplateIcon ('spacer.g if') . '"  style="wid th:' . $th is -> aMed iaConfig[' size']['ph otoWidth']  . 'px; he ight:' . $ this -> aM ediaConfig ['size'][' photoHeigh t'] . 'px;  backgroun d-image:ur l(' . $sPh otoUrl . ' );" class= "photo" id ="temPhoto ID" alt=""  />';
115           $r et .= '</d iv>';   115           $r et .= '</d iv>';
116     116  
117           if ( $bShowMe nu )   117           if ( $bShowMe nu )
118           {   118           {
119                $ret .=  '<div clas s="photoMe nu">';   119                $ret .=  '<div clas s="photoMe nu">';
120                    $ret  .= '<form  action="'  . $_SERVE R['PHP_SEL F'] . '" m ethod="pos t" name="a ctionForm" >';   120                    $ret  .= '<form  action="'  . $_SERVE R['PHP_SEL F'] . '" m ethod="pos t" name="a ctionForm" >';
121     121  
122                         $ret .= '< input type ="submit"  name="dele tePhoto" v alue="' .  _t( '_Dele te' ) . '"  onclick=" return con firm(\'' .  _t('_are  you sure?' ) . '\');"  />';   122                         $ret .= '< input type ="submit"  name="dele tePhoto" v alue="' .  _t( '_Dele te' ) . '"  onclick=" return con firm(\'' .  _t('_are  you sure?' ) . '\');"  />';
123                         $ret .= '< input type ="submit"  name="make Prim" valu e="' . _t( '_Make Pri mary') . ' " />';   123                         $ret .= '< input type ="submit"  name="make Prim" valu e="' . _t( '_Make Pri mary') . ' " />';
124                         $aMember =  getProfil eInfo( $th is -> iPro fileID );   124                         $aMember =  getProfil eInfo( $th is -> iPro fileID );
125                         $ret .= ($ aMember['C ouple']>0)  ? '<input  type="sub mit" name= "makePrimC ouple" val ue="' . _t ('_Make Pr imary') .  ' to Coupl e" />' : ' ';   125                         $ret .= ($ aMember['C ouple']>0)  ? '<input  type="sub mit" name= "makePrimC ouple" val ue="' . _t ('_Make Pr imary') .  ' to Coupl e" />' : ' ';
126                         $ret .= '< input type ="hidden"  id="photoI D" name="p hotoID" va lue="' . $ aCurPhoto[ 'med_id']  . '" />';   126                         $ret .= '< input type ="hidden"  id="photoI D" name="p hotoID" va lue="' . $ aCurPhoto[ 'med_id']  . '" />';
127     127  
128                         $sRatable  = ($aCurPh oto['rate_ able']=='1 ') ? _t('_ disable ab le to rate ') : _t('_ enable abl e to rate' );   128                         $sRatable  = ($aCurPh oto['rate_ able']=='1 ') ? _t('_ disable ab le to rate ') : _t('_ enable abl e to rate' );
129                         $ret .= '< input type ="submit"  id="makeRa ble" name= "makeRable " value="'  . $sRatab le . '" /> ';   129                         $ret .= '< input type ="submit"  id="makeRa ble" name= "makeRable " value="'  . $sRatab le . '" /> ';
130     130  
131                    $ret  .= '</for m>';   131                    $ret  .= '</for m>';
132                $ret .=  '</div>';   132                $ret .=  '</div>';
133           }   133           }
134           $r et .= '<di v class="c lear_both" ></div>';   134           $r et .= '<di v class="c lear_both" ></div>';
135           $r et .= '<di v class="i conBlock"> ';   135           $r et .= '<di v class="i conBlock"> ';
136                if( $bWi thoutJS )   136                if( $bWi thoutJS )
137                {   137                {
138                    $ret  .= $this  -> getIcon sList();   138                    $ret  .= $this  -> getIcon sList();
139                }   139                }
140                else   140                else
141                {   141                {
142                    $ret  .= $this  -> _getIco nsList();   142                    $ret  .= $this  -> _getIco nsList();
143                }   143                }
144           $r et .= '</d iv>';   144           $r et .= '</d iv>';
145     145  
146           re turn $ret;   146           re turn $ret;
147       }   147       }
148     148  
149       functi on getJSCo de( $aCurP hoto )   149       functi on getJSCo de( $aCurP hoto )
150       {   150       {
151           $r et = '';   151           $r et = '';
152     152  
153           $r et .= '<sc ript type= "text/java script">   153           $r et .= '<sc ript type= "text/java script">
154                function  setImage( )   154                function  setImage( )
155                {   155                {
156                    var  imgCode;   156                    var  imgCode;
157                    var  oOldImg =  document.g etElementB yId("temPh otoID");   157                    var  oOldImg =  document.g etElementB yId("temPh otoID");
158                    oOld Img.style. background Image = "u rl(' . $th is -> sMed iaUrl . 'p hoto_' . $ aCurPhoto[ 'med_file' ] . ')";   158                    oOld Img.style. background Image = "u rl(' . $th is -> sMed iaUrl . 'p hoto_' . $ aCurPhoto[ 'med_file' ] . ')";
159                    retu rn false;   159                    retu rn false;
160                }   160                }
161     161  
162                function  changePho to( sFile,  iMediaID,  sTitle, i Rate, rate Sum, rateC ount, bRab le )   162                function  changePho to( sFile,  iMediaID,  sTitle, i Rate, rate Sum, rateC ount, bRab le )
163                {   163                {
164                    var  oOldImg =  document.g etElementB yId("temPh otoID");   164                    var  oOldImg =  document.g etElementB yId("temPh otoID");
165                    oOld Img.style. background Image = "u rl(' . $th is -> sMed iaUrl . 'p hoto_"+sFi le+")";   165                    oOld Img.style. background Image = "u rl(' . $th is -> sMed iaUrl . 'p hoto_"+sFi le+")";
166                    chan geTitle( s Title );   166                    chan geTitle( s Title );
167                    chan geRate( iR ate, rateS um, rateCo unt );   167                    chan geRate( iR ate, rateS um, rateCo unt );
168                    chan geMediaID(  iMediaID  );   168                    chan geMediaID(  iMediaID  );
169                    chan geRable( b Rable );   169                    chan geRable( b Rable );
170                    retu rn false;   170                    retu rn false;
171                }   171                }
172     172  
173                function  changeTit le( sTitle  )   173                function  changeTit le( sTitle  )
174                {   174                {
175                    var  oTitleDiv  = document .getElemen tById("sTi tleDiv");   175                    var  oTitleDiv  = document .getElemen tById("sTi tleDiv");
176                    oTit leDiv.inne rHTML = st ripSlashes (sTitle);   176                    oTit leDiv.inne rHTML = st ripSlashes (sTitle);
177                }   177                }
178     178  
179                function  changeRat e( iRate,  rateSum, r ateCount )   179                function  changeRat e( iRate,  rateSum, r ateCount )
180                {   180                {
181                    var  oRateDiv =  document. getElement ById("sPho toRatingDi v");   181                    var  oRateDiv =  document. getElement ById("sPho toRatingDi v");
182                    var  oRateTextD iv = docum ent.getEle mentById(" sRatingTex tDiv");   182                    var  oRateTextD iv = docum ent.getEle mentById(" sRatingTex tDiv");
183     183  
184                    oRat eDiv.style .position  = "relativ e";   184                    oRat eDiv.style .position  = "relativ e";
185                    oRat eDiv.style .height =  iRate + "% ";   185                    oRat eDiv.style .height =  iRate + "% ";
186                    oRat eDiv.style .top =  10 0 - iRate  + "%";   186                    oRat eDiv.style .top =  10 0 - iRate  + "%";
187     187  
188                    oRat eTextDiv.i nnerHTML =  "' . _t(' _votes') .  ' "+rateC ount+"<br> ' . _t('_r atio') . '  "+rateSum ;   188                    oRat eTextDiv.i nnerHTML =  "' . _t(' _votes') .  ' "+rateC ount+"<br> ' . _t('_r atio') . '  "+rateSum ;
189                }   189                }
190     190  
191                function  changeMed iaID( iMed iaID )   191                function  changeMed iaID( iMed iaID )
192                {   192                {
193                    var  oPhotoID =  document. getElement ById("phot oID");   193                    var  oPhotoID =  document. getElement ById("phot oID");
194                    oPho toID.value  = iMediaI D;   194                    oPho toID.value  = iMediaI D;
195                }   195                }
196     196  
197                function  changeRab le( iCheck ed )   197                function  changeRab le( iCheck ed )
198                {   198                {
199                    var  oRable = d ocument.ge tElementBy Id("makeRa ble");   199                    var  oRable = d ocument.ge tElementBy Id("makeRa ble");
200                    var  sRableCapt  = (iCheck ed == 1) ?  "'._t('_d isable abl e to rate' ).'" : "'. _t('_enabl e able to  rate').'";   200                    var  sRableCapt  = (iCheck ed == 1) ?  "'._t('_d isable abl e to rate' ).'" : "'. _t('_enabl e able to  rate').'";
201                    oRab le.value =  sRableCap t;   201                    oRab le.value =  sRableCap t;
202                }   202                }
203     203  
204           </ script>';   204           </ script>';
205     205  
206           re turn $ret;   206           re turn $ret;
207       }   207       }
208     208  
209     209  
210       functi on _getIco nsList()   210       functi on _getIco nsList()
211       {   211       {
212           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   212           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
213           {   213           {
214                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   214                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
215                if( extF ileExists(  $sIconSrc  ) )   215                if( extF ileExists(  $sIconSrc  ) )
216                {   216                {
217                    $iPh otoRatingS um = ( 0 <  $this ->  aMedia[$i] ['med_rati ng_sum'] )  ? $this - > aMedia[$ i]['med_ra ting_sum']  : 0 ;   217                    $iPh otoRatingS um = ( 0 <  $this ->  aMedia[$i] ['med_rati ng_sum'] )  ? $this - > aMedia[$ i]['med_ra ting_sum']  : 0 ;
218                    $iPh otoRatingC ount = ( 0  < $this - > aMedia[$ i]['med_ra ting_count '] ) ? $th is -> aMed ia[$i]['me d_rating_c ount'] : 0  ;   218                    $iPh otoRatingC ount = ( 0  < $this - > aMedia[$ i]['med_ra ting_count '] ) ? $th is -> aMed ia[$i]['me d_rating_c ount'] : 0  ;
219                    $iPh otoRating  = $this ->  getRating ( $iPhotoR atingSum,  $iPhotoRat ingCount ) ;   219                    $iPh otoRating  = $this ->  getRating ( $iPhotoR atingSum,  $iPhotoRat ingCount ) ;
220                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   220                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
221     221  
222                    //fu nction cha ngePhoto(  sFile, img Div, sTitl e, titleDi v, iRate,  rateDiv)   222                    //fu nction cha ngePhoto(  sFile, img Div, sTitl e, titleDi v, iRate,  rateDiv)
223                    $sRa bleVal = ( $this -> a Media[$i][ 'rate_able ']=='1') ?  '1' : '0' ;   223                    $sRa bleVal = ( $this -> a Media[$i][ 'rate_able ']=='1') ?  '1' : '0' ;
224     224  
225                     $atrib   =   '   225                     $atrib   =
226                         \' '   .   $this   ->   aMedia[$i] ['med_file ']    .   '\ ',
  226                         " ' { $this   ->   aMedia[$i] ['med_file '] } ',   "   .
227                        
'   .   $this   ->   aMedia[$i] ['med_id']   .   ',
  227                         " ' { $this   ->   aMedia[$i] ['med_id'] } ',   "   .
228                         \' '  
.   proces s _ l in e _ou t
p ut(   a dds l
a
s
h
e
s($this   ->   aMedia[$i] ['med_titl e']   )   )  
.   '\ ',
  228                         " ' "   .   add s
l ash e s(   h t mls p eci a
l ch a r s (   h tmlsp e cialchar s($this   ->   aMedia[$i] ['med_titl e']   )   )   )   .   " ', "   .
229                         '   .   $iPhotoRat ing   .   ' ,
  229                         " $iPhotoRat ing
,   "   .
230                         '   .   $iPhotoRat ingSum   .    ' ,
  230                         " $iPhotoRat ingSum
,   "   .
231                         '    .   $iPhotoRat ingCount   .   ' ,
  231                         " $iPhotoRat ingCount
,   "   .
232                         \' '    .   $sRableVal   .   '\ '
  232                         " '
$sRableVal
' ";
233                     ';   233  
                 
234                    $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 . ');"  />';   234                    $ret  .= '
    235                         <img src=" ' . getTem plateIcon( 'spacer.gi f') . '"
    236                           style="w idth:' . $ this -> aM ediaConfig ['size'][' iconWidth' ] . 'px; h eight:' .
    237                             $this  -> aMediaC onfig['siz e']['iconH eight'] .  'px; backg round-imag e:url(' .  $sIconUrl  . '); curs or:pointer ;"
    238                           alt="" c lass="icon s" onmouse over="this .className =\'iconsHo ver\'" onm ouseout="t his.classN ame=\'icon s\'"
    239                           onclick= "return ch angePhoto( ' . $atrib  . ');" /> ';
235                }   240                }
236                else   241                else
237                {   242                {
238                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );   243                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );
239                    $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" />';   244                    $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" />';
240                }   245                }
241           }   246           }
242           re turn $ret;   247           re turn $ret;
243       }   248       }
244     249  
245       functi on getIcon sList()   250       functi on getIcon sList()
246       {   251       {
247           $r et = '';   252           $r et = '';
248     253  
249           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )   254           fo r( $i = 0;  $i < $thi s -> aMedi aConfig['m ax']['phot o']; $i++  )
250           {   255           {
251                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];   256                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $this  -> aMedia [$i]['med_ file'];
252                if( extF ileExists(  $sIconSrc  ) )   257                if( extF ileExists(  $sIconSrc  ) )
253                {   258                {
254                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;   259                    $sIc onUrl = $t his -> sMe diaUrl . ' icon_' . $ this -> aM edia[$i][' med_file'] ;
255                    $ret  .= '<a hr ef="' . $t his -> aMe diaConfig[ 'url']['me dia'] . '? photoID='  . $this ->  aMedia[$i ]['med_id' ] . '">';   260                    $ret  .= '<a hr ef="' . $t his -> aMe diaConfig[ 'url']['me dia'] . '? photoID='  . $this ->  aMedia[$i ]['med_id' ] . '">';
256                         $ret .= '< img src="'  . getTemp lateIcon(' spacer.gif ') . '" st yle="width :' . $this  -> aMedia Config['si ze']['icon Width'] .  'px; heigh t:' . $thi s -> aMedi aConfig['s ize']['ico nHeight']  . 'px; bac kground-im age:url('  . $sIconUr l . '); cu rsor:point er;"  alt= "" class=" icons" onm ouseover=" this.class Name=\'ico nsHover\'"  onmouseou t="this.cl assName=\' icons\'" / >';   261                         $ret .= '< img src="'  . getTemp lateIcon(' spacer.gif ') . '" st yle="width :' . $this  -> aMedia Config['si ze']['icon Width'] .  'px; heigh t:' . $thi s -> aMedi aConfig['s ize']['ico nHeight']  . 'px; bac kground-im age:url('  . $sIconUr l . '); cu rsor:point er;"  alt= "" class=" icons" onm ouseover=" this.class Name=\'ico nsHover\'"  onmouseou t="this.cl assName=\' icons\'" / >';
257                    $ret  .= '</a>' ;   262                    $ret  .= '</a>' ;
258                }   263                }
259                else   264                else
260                {   265                {
261                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );   266                    $sIc onUrl = ge tTemplateI con( $this  -> sSexIc on );
262                    $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" />';   267                    $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" />';
263                }   268                }
264           }   269           }
265           re turn $ret;   270           re turn $ret;
266       }   271       }
267     272  
268       functi on validat eMediaArra y( $aMedia  )   273       functi on validat eMediaArra y( $aMedia  )
269       {   274       {
270           fo reach( $aM edia as $i Key => $aV alue )   275           fo reach( $aM edia as $i Key => $aV alue )
271           {   276           {
272                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $aVal ue['med_fi le'];   277                $sIconSr c = $this  -> sMediaD ir . 'icon _' . $aVal ue['med_fi le'];
273                $sThumbS rc = $this  -> sMedia Dir . 'thu mb_' . $aV alue['med_ file'];   278                $sThumbS rc = $this  -> sMedia Dir . 'thu mb_' . $aV alue['med_ file'];
274                $sPhotoS rc = $this  -> sMedia Dir . 'pho to_' . $aV alue['med_ file'];   279                $sPhotoS rc = $this  -> sMedia Dir . 'pho to_' . $aV alue['med_ file'];
275     280  
276                if( !ext FileExists ( $sIconSr c ) || !ex tFileExist s( $sThumb Src ) || ! extFileExi sts( $sPho toSrc ) )   281                if( !ext FileExists ( $sIconSr c ) || !ex tFileExist s( $sThumb Src ) || ! extFileExi sts( $sPho toSrc ) )
277                {   282                {
278                    if(  $aValue['m ed_id'] ==  $aValue[' PrimPhoto' ] )   283                    if(  $aValue['m ed_id'] ==  $aValue[' PrimPhoto' ] )
279                    {   284                    {
280                         $this -> o MediaQuery  -> resetP rimPhoto(  $this -> i ProfileID  );   285                         $this -> o MediaQuery  -> resetP rimPhoto(  $this -> i ProfileID  );
281                    }   286                    }
282                    unse t( $aMedia [$iKey]);   287                    unse t( $aMedia [$iKey]);
283                }   288                }
284     289  
285           }   290           }
286     291  
287           re turn array _values( $ aMedia );   292           re turn array _values( $ aMedia );
288       }   293       }
289     294  
290       functi on uploadM edia()   295       functi on uploadM edia()
291       {   296       {
292           gl obal $dir;   297           gl obal $dir;
293           $s MediaDir =  $this ->  getProfile MediaDir() ;   298           $s MediaDir =  $this ->  getProfile MediaDir() ;
294     299  
295           if ( !$sMedia Dir )   300           if ( !$sMedia Dir )
296           {   301           {
297                return f alse;   302                return f alse;
298           }   303           }
299           $s FileName =  time();   304           $s FileName =  time();
300     305  
301           $e xt = moveU ploadedIma ge( $_FILE S, 'photo' , $sMediaD ir . $sFil eName, $th is -> aMed iaConfig[' max']['pho toFile'],  false );   306           $e xt = moveU ploadedIma ge( $_FILE S, 'photo' , $sMediaD ir . $sFil eName, $th is -> aMed iaConfig[' max']['pho toFile'],  false );
302              307           
303           if ( ( 0 == $ _FILES[$th is -> sMed iaType]['e rror'] ) )   308           if ( ( 0 == $ _FILES[$th is -> sMed iaType]['e rror'] ) )
304           {   309           {
305                if ( get Param( 'en able_water mark' ) ==  'on' )   310                if ( get Param( 'en able_water mark' ) ==  'on' )
306                {   311                {
307                    $iTr ansparent  = getParam ( 'transpa rent1' );   312                    $iTr ansparent  = getParam ( 'transpa rent1' );
308                    $sWa terMark =  $dir['prof ileImage']  . getPara m( 'Water_ Mark' );   313                    $sWa terMark =  $dir['prof ileImage']  . getPara m( 'Water_ Mark' );
309                                                 314                                              
310                    if (   strlen(g etParam( ' Water_Mark ' )) && fi le_exists( $sWaterMar k) )   315                    if (   strlen(g etParam( ' Water_Mark ' )) && fi le_exists( $sWaterMar k) )
311                    {   316                    {
312                         $sFile = $ sMediaDir  . $sFileNa me . $ext;                 317                         $sFile = $ sMediaDir  . $sFileNa me . $ext;              
313                         applyWater mark( $sFi le, $sFile , $sWaterM ark, $iTra nsparent ) ;   318                         applyWater mark( $sFi le, $sFile , $sWaterM ark, $iTra nsparent ) ;
314                    }   319                    }
315                }   320                }
316                   321                
317                if( strl en( $ext )  && !(int) $ext )   322                if( strl en( $ext )  && !(int) $ext )
318                {   323                {
319                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'icon_ ' . $sFile Name . $ex t, $this - > aMediaCo nfig['size ']['iconWi dth'], $th is -> aMed iaConfig[' size']['ic onHeight'] , true );   324                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'icon_ ' . $sFile Name . $ex t, $this - > aMediaCo nfig['size ']['iconWi dth'], $th is -> aMed iaConfig[' size']['ic onHeight'] , true );
320                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'thumb _' . $sFil eName . $e xt, $this  -> aMediaC onfig['siz e']['thumb Width'], $ this -> aM ediaConfig ['size'][' thumbHeigh t'], true  );   325                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'thumb _' . $sFil eName . $e xt, $this  -> aMediaC onfig['siz e']['thumb Width'], $ this -> aM ediaConfig ['size'][' thumbHeigh t'], true  );
321                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'photo _' . $sFil eName . $e xt, $this  -> aMediaC onfig['siz e']['photo Width'], $ this -> aM ediaConfig ['size'][' photoHeigh t'], true  );   326                    imag eResize( $ sMediaDir  . $sFileNa me . $ext,  $sMediaDi r . 'photo _' . $sFil eName . $e xt, $this  -> aMediaC onfig['siz e']['photo Width'], $ this -> aM ediaConfig ['size'][' photoHeigh t'], true  );
322                       327                    
323                    chmo d( $sMedia Dir . 'ico n_'  . $sF ileName .  $ext, 0644  );   328                    chmo d( $sMedia Dir . 'ico n_'  . $sF ileName .  $ext, 0644  );
324                    chmo d( $sMedia Dir . 'thu mb_' . $sF ileName .  $ext, 0644  );   329                    chmo d( $sMedia Dir . 'thu mb_' . $sF ileName .  $ext, 0644  );
325                    chmo d( $sMedia Dir . 'pho to_' . $sF ileName .  $ext, 0644  );   330                    chmo d( $sMedia Dir . 'pho to_' . $sF ileName .  $ext, 0644  );
326                       331                    
327                    $thi s -> inser tMediaToDb ( $sFileNa me . $ext  );   332                    $thi s -> inser tMediaToDb ( $sFileNa me . $ext  );
328                    if(  0 == $this  -> iMedia Count || $ this -> aM edia['0'][ 'PrimPhoto '] == 0  )   333                    if(  0 == $this  -> iMedia Count || $ this -> aM edia['0'][ 'PrimPhoto '] == 0  )
329                    {   334                    {
330                         $iLastID =  mysql_ins ert_id();   335                         $iLastID =  mysql_ins ert_id();
331                         $this -> o MediaQuery  -> setPri maryPhoto(  $this ->  iProfileID , $iLastID  );   336                         $this -> o MediaQuery  -> setPri maryPhoto(  $this ->  iProfileID , $iLastID  );
332                    }   337                    }
333          338       
334          339       
335                    @unl ink( $sMed iaDir . $s FileName .  $ext );   340                    @unl ink( $sMed iaDir . $s FileName .  $ext );
336                }   341                }
337           }   342           }
338       }   343       }
339     344  
340       functi on deleteM edia( $iPh otoID )   345       functi on deleteM edia( $iPh otoID )
341       {   346       {
342           $a Photos = $ this -> ge tElementAr rayByID( $ iPhotoID ) ;   347           $a Photos = $ this -> ge tElementAr rayByID( $ iPhotoID ) ;
343           $s IconSrc =  $this -> s MediaDir .  'icon_' .  $aPhotos[ 'med_file' ];   348           $s IconSrc =  $this -> s MediaDir .  'icon_' .  $aPhotos[ 'med_file' ];
344           $s ThumbSrc =  $this ->  sMediaDir  . 'thumb_'  . $aPhoto s['med_fil e'];   349           $s ThumbSrc =  $this ->  sMediaDir  . 'thumb_'  . $aPhoto s['med_fil e'];
345           $s PhotoSrc =  $this ->  sMediaDir  . 'photo_'  . $aPhoto s['med_fil e'];   350           $s PhotoSrc =  $this ->  sMediaDir  . 'photo_'  . $aPhoto s['med_fil e'];
346     351  
347           $t his -> oMe diaQuery - > deleteMe dia( $this  -> iProfi leID, $iPh otoID, $th is -> sMed iaType );   352           $t his -> oMe diaQuery - > deleteMe dia( $this  -> iProfi leID, $iPh otoID, $th is -> sMed iaType );
348           if ( $aPhotos ['med_id']  == $aPhot os['PrimPh oto'] )   353           if ( $aPhotos ['med_id']  == $aPhot os['PrimPh oto'] )
349           {   354           {
350                $this ->  oMediaQue ry -> rese tPrimPhoto ( $this ->  iProfileI D );   355                $this ->  oMediaQue ry -> rese tPrimPhoto ( $this ->  iProfileI D );
351           }   356           }
352     357  
353           @u nlink( $sI conSrc );   358           @u nlink( $sI conSrc );
354           @u nlink( $sT humbSrc );   359           @u nlink( $sT humbSrc );
355           @u nlink( $sP hotoSrc );   360           @u nlink( $sP hotoSrc );
356       }   361       }
357     362  
358       functi on makePri mPhoto( $i PhotoID, $ bCouple =  false )   363       functi on makePri mPhoto( $i PhotoID, $ bCouple =  false )
359       {   364       {
360           if  ($bCouple >0) {   365           if  ($bCouple >0) {
361                $aMember  = getProf ileInfo( $ this -> iP rofileID ) ;   366                $aMember  = getProf ileInfo( $ this -> iP rofileID ) ;
362                $sDestID  = $aMembe r['Couple' ];   367                $sDestID  = $aMembe r['Couple' ];
363           }  else {   368           }  else {
364                $sDestID  = $this-> iProfileID ;   369                $sDestID  = $this-> iProfileID ;
365           }   370           }
366           if  ($sDestID >0)   371           if  ($sDestID >0)
367                $this ->  oMediaQue ry -> setP rimaryPhot o( $sDestI D, $iPhoto ID );   372                $this ->  oMediaQue ry -> setP rimaryPhot o( $sDestI D, $iPhoto ID );
368           cr eateUserDa taFile( $s DestID );   373           cr eateUserDa taFile( $s DestID );
369       }   374       }
370     375  
371       functi on makeRab lePhoto( $ iPhotoID )  {   376       functi on makeRab lePhoto( $ iPhotoID )  {
372           $t his->oMedi aQuery->se tRablePhot o($iPhotoI D);   377           $t his->oMedi aQuery->se tRablePhot o($iPhotoI D);
373       }   378       }
374     379  
375   }   380   }
376     381  
377   ?>   382   ?>