194. File Comparison Report

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

194.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\inc\classes BxDolMedia.php Wed Oct 17 08:48:20 2007 UTC
2 Dolphin-v.6.1.0\inc\classes BxDolMedia.php Sat Apr 26 08:19:14 2008 UTC

194.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 588
Changed 2 4
Inserted 0 0
Removed 4 19

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

194.4 Active regular expressions

No regular expressions were active.

194.5 Comparison detail

1   <?php   1   <?php
2     2  
3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolMe diaQuery.p hp');   3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolMe diaQuery.p hp');
4   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofile.php' );   4   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofile.php' );
5   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . "BxDolVo ting.php"  );   5   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . "BxDolVo ting.php"  );
6     6  
7   class BxDo lMedia ext ends BxDol Mistake   7   class BxDo lMedia ext ends BxDol Mistake
8   {   8   {
9       var $s MediaType;   9       var $s MediaType;
10       var $i ProfileID;   10       var $i ProfileID;
11       var $a MediaConfi g;   11       var $a MediaConfi g;
12     12  
13       var $s MediaDir;   13       var $s MediaDir;
14       var $s MediaUrl;   14       var $s MediaUrl;
15     15  
16       var $a Media;   16       var $a Media;
17       var $i MediaCount ;   17       var $i MediaCount ;
18     18  
19       var $o MediaQuery ;   19       var $o MediaQuery ;
20     20  
21       var $s SupportedE xt;   21       var $s SupportedE xt;
22     22  
23       var $o DolVoting  = NULL;   23       var $o DolVoting  = NULL;
24     24  
25       functi on BxDolMe dia()   25       functi on BxDolMe dia()
26       {   26       {
27           $t his -> oMe diaQuery =  new BxDol MediaQuery ();   27           $t his -> oMe diaQuery =  new BxDol MediaQuery ();
28           $t his -> aMe diaConfig  = $this ->  getMediaC onfigArray ();   28           $t his -> aMe diaConfig  = $this ->  getMediaC onfigArray ();
29     29  
30           $t his -> sMe diaDir = $ this -> aM ediaConfig ['dir'][$t his -> sMe diaType] .  $this ->  iProfileID  . '/';   30           $t his -> sMe diaDir = $ this -> aM ediaConfig ['dir'][$t his -> sMe diaType] .  $this ->  iProfileID  . '/';
31           $t his -> sMe diaUrl = $ this -> aM ediaConfig ['url'][$t his -> sMe diaType] .  $this ->  iProfileID  . '/';            31           $t his -> sMe diaUrl = $ this -> aM ediaConfig ['url'][$t his -> sMe diaType] .  $this ->  iProfileID  . '/';         
32     32  
33           $t his -> oDo lVoting =  new BxDolV oting ('me dia', 0, 0 );   33           $t his -> oDo lVoting =  new BxDolV oting ('me dia', 0, 0 );
34       }   34       }
35     35  
36       functi on getMedi aArray()   36       functi on getMedi aArray()
37       {   37       {
38           $a Media = $t his -> oMe diaQuery - > getMedia Array( $th is -> iPro fileID, $t his -> sMe diaType,   $this -> o DolVoting) ;   38           $a Media = $t his -> oMe diaQuery - > getMedia Array( $th is -> iPro fileID, $t his -> sMe diaType,   $this -> o DolVoting) ;
39           $t his -> aMe dia = $thi s -> valid ateMediaAr ray( $aMed ia );   39           $t his -> aMe dia = $thi s -> valid ateMediaAr ray( $aMed ia );
40           $t his -> iMe diaCount =  count( $t his -> aMe dia );   40           $t his -> iMe diaCount =  count( $t his -> aMe dia );
41       }   41       }
42     42  
43       functi on getActi veMediaArr ay()   43       functi on getActi veMediaArr ay()
44       {   44       {
45           $a Media = $t his -> oMe diaQuery - > getActiv eMediaArra y( $this - > iProfile ID, $this  -> sMediaT ype,  $thi s -> oDolV oting );   45           $a Media = $t his -> oMe diaQuery - > getActiv eMediaArra y( $this - > iProfile ID, $this  -> sMediaT ype,  $thi s -> oDolV oting );
46           $t his -> aMe dia = $thi s -> valid ateMediaAr ray( $aMed ia );   46           $t his -> aMe dia = $thi s -> valid ateMediaAr ray( $aMed ia );
47           $t his -> iMe diaCount =  count( $t his -> aMe dia );   47           $t his -> iMe diaCount =  count( $t his -> aMe dia );
48       }   48       }
49     49  
50       functi on validat eMediaArra y( &$aMedi a )   50       functi on validat eMediaArra y( &$aMedi a )
51       {   51       {
52           fo reach($aMe dia as $iK ey => $aVa lue)   52           fo reach($aMe dia as $iK ey => $aVa lue)
53           {   53           {
54                $sMediaF ile = $thi s -> sMedi aDir . $aV alue['med_ file'];   54                $sMediaF ile = $thi s -> sMedi aDir . $aV alue['med_ file'];
55                if( !ext FileExists ( $sMediaF ile ) )   55                if( !ext FileExists ( $sMediaF ile ) )
56                    unse t( $aMedia [$iKey]);   56                    unse t( $aMedia [$iKey]);
57           }   57           }
58     58  
59           re turn array _values( $ aMedia );   59           re turn array _values( $ aMedia );
60       }   60       }
61     61  
62       functi on getMedi aPage()   62       functi on getMedi aPage()
63       {   63       {
64           gl obal $dir;   64           gl obal $dir;
65           gl obal $tmpl ;   65           gl obal $tmpl ;
66              66           
67           re quire_once ( BX_DIREC TORY_PATH_ INC . 'pro files.inc. php' );   67           re quire_once ( BX_DIREC TORY_PATH_ INC . 'pro files.inc. php' );
68           $t his -> get MediaArray ();   68           $t his -> get MediaArray ();
69     69  
70           $r et = '<div  class="cl ear_both"> </div>';   70           $r et = '<div  class="cl ear_both"> </div>';
71              71           
72           $t mplBlock =  file_get_ contents(  "{$dir['ro ot']}templ ates/tmpl_ {$tmpl}/me dia_page_b lock.html"  );   72           $t mplBlock =  file_get_ contents(  "{$dir['ro ot']}templ ates/tmpl_ {$tmpl}/me dia_page_b lock.html"  );
73              73           
74           $i  = 1;   74           $i  = 1;
75           fo reach($thi s -> aMedi a as $aVal ue )   75           fo reach($thi s -> aMedi a as $aVal ue )
76           {   76           {
77                $block =  $tmplBloc k;   77                $block =  $tmplBloc k;
78                   78                
79                $aReplac e['media_t itle'] = p rocess_lin e_output(  $aValue['m ed_title']  );   79                $aReplac e['media_t itle'] = p rocess_lin e_output(  $aValue['m ed_title']  );
80                $aReplac e['media_i con']  = ' <img src=" '.getTempl ateIcon( $ this -> sM ediaType .  '.jpg' ). '" />';   80                $aReplac e['media_i con']  = ' <img src=" '.getTempl ateIcon( $ this -> sM ediaType .  '.jpg' ). '" />';
81                $aReplac e['nicknam e']    = ' ';   81                $aReplac e['nicknam e']    = ' ';
82                $aReplac e['downloa d']    = ' <a href="'  . $this - > getMedia Link( $aVa lue ) . '" >'._t('_do wnload').' </a>';   82                $aReplac e['downloa d']    = ' <a href="'  . $this - > getMedia Link( $aVa lue ) . '" >'._t('_do wnload').' </a>';
83                $aReplac e['delete' ]      = ' <a href="'  . $_SERVE R['PHP_SEL F'] . '?sh ow=' . $th is -> sMed iaType . ' &amp;actio n=delete&a mp;mediaID ='.   83                $aReplac e['delete' ]      = ' <a href="'  . $_SERVE R['PHP_SEL F'] . '?sh ow=' . $th is -> sMed iaType . ' &amp;actio n=delete&a mp;mediaID ='.
84                    $aVa lue['med_i d'] . '" o nclick="re turn confi rm(\''._t( '_are you  sure?').'\ ');">'._t( '_delete') .'</a>';   84                    $aVa lue['med_i d'] . '" o nclick="re turn confi rm(\''._t( '_are you  sure?').'\ ');">'._t( '_delete') .'</a>';
85                   85                
86                foreach(  $aReplace  as $key = > $val )   86                foreach(  $aReplace  as $key = > $val )
87                    $blo ck = str_r eplace( "_ _{$key}__" , $val, $b lock );   87                    $blo ck = str_r eplace( "_ _{$key}__" , $val, $b lock );
88                   88                
89                $ret .=  $block;   89                $ret .=  $block;
90                   90                
91                if( $i++  >= $this  -> aMediaC onfig['max '][$this - > sMediaTy pe] )   91                if( $i++  >= $this  -> aMediaC onfig['max '][$this - > sMediaTy pe] )
92                    brea k;   92                    brea k;
93           }   93           }
94           $r et .= '<di v class="c lear_both" ></div>';   94           $r et .= '<di v class="c lear_both" ></div>';
95              95           
96           re turn $ret;   96           re turn $ret;
97       }   97       }
98     98  
99       functi on getMedi aLink( $aM edia )   99       functi on getMedi aLink( $aM edia )
100       {   100       {
101           $s File = $th is -> aMed iaConfig[' dir']['tmp '] . $aMed ia['med_fi le'];   101           $s File = $th is -> aMed iaConfig[' dir']['tmp '] . $aMed ia['med_fi le'];
102     102  
103           if ( extFileE xists( $sF ile ) )   103           if ( extFileE xists( $sF ile ) )
104                return $ this -> aM ediaConfig ['site'][' tmp'] . $a Media['med _file'];   104                return $ this -> aM ediaConfig ['site'][' tmp'] . $a Media['med _file'];
105           el se   105           el se
106                if( copy ($this ->  sMediaDir  . $aMedia[ 'med_file' ], $sFile  ) )   106                if( copy ($this ->  sMediaDir  . $aMedia[ 'med_file' ], $sFile  ) )
107                    retu rn $this - > aMediaCo nfig['site ']['tmp']  . $aMedia[ 'med_file' ];   107                    retu rn $this - > aMediaCo nfig['site ']['tmp']  . $aMedia[ 'med_file' ];
108     108  
109           re turn false ;   109           re turn false ;
110       }   110       }
111     111  
112       functi on uploadM edia()   112       functi on uploadM edia()
113       {   113       {
114     114  
115           $s MediaDir =  $this ->  getProfile MediaDir() ;   115           $s MediaDir =  $this ->  getProfile MediaDir() ;
116           if ( !$sMedia Dir )   116           if ( !$sMedia Dir )
117                return ' failed to  open profi le directo ry';   117                return ' failed to  open profi le directo ry';
118     118  
119           $a SupoortedE xt = split (',', strt olower($th is -> sSup portedExt)  );   119           $a SupoortedE xt = split (',', strt olower($th is -> sSup portedExt)  );
120           $s FileName =  time();   120           $s FileName =  time();
121           $a Ext = path info( $_FI LES[$this  -> sMediaT ype]['name '] );   121           $a Ext = path info( $_FI LES[$this  -> sMediaT ype]['name '] );
122           $e xt = strto lower( $aE xt['extens ion'] );   122           $e xt = strto lower( $aE xt['extens ion'] );
123     123  
124           // print_r( $ _FILES);   124           // print_r( $ _FILES);
125     125  
126           if ( ( 0 == $ _FILES[$th is -> sMed iaType]['e rror'] ) )   126           if ( ( 0 == $ _FILES[$th is -> sMed iaType]['e rror'] ) )
127           {   127           {
128                $iMaxFil eSize = (  ( ( $this  -> aMediaC onfig['max '][$this - > sMediaTy pe . 'File '] ) * 102 4 ) * 1024  );   128                $iMaxFil eSize = (  ( ( $this  -> aMediaC onfig['max '][$this - > sMediaTy pe . 'File '] ) * 102 4 ) * 1024  );
129                if( $iMa xFileSize  >= $_FILES [$this ->  sMediaType ]['size']  )   129                if( $iMa xFileSize  >= $_FILES [$this ->  sMediaType ]['size']  )
130                {   130                {
131                    if(  in_array(  $ext, $aSu poortedExt ) )   131                    if(  in_array(  $ext, $aSu poortedExt ) )
132                    {   132                    {
133                         if( move_u ploaded_fi le($_FILES [$this ->  sMediaType ]['tmp_nam e'], $sMed iaDir . $s FileName .  '.' . $ex t ) )   133                         if( move_u ploaded_fi le($_FILES [$this ->  sMediaType ]['tmp_nam e'], $sMed iaDir . $s FileName .  '.' . $ex t ) )
134                         {   134                         {
135                              $sFileTitl e   =   process_db _input(  
$_POST['ti tle']   )
;
  135                              $sFileTitl e   =   process_db _input(   htmlspecia lchars_adv ( $_POST['ti tle']   ) ) ;
136                             if( $t his -> oMe diaQuery - > insertMe dia( $this  -> iProfi leID, $thi s -> sMedi aType, $sF ileName .  '.' . $ext , $sFileTi tle ) )   136                             if( $t his -> oMe diaQuery - > insertMe dia( $this  -> iProfi leID, $thi s -> sMedi aType, $sF ileName .  '.' . $ext , $sFileTi tle ) )
137                                 $r et .= 'fai le success fully uplo aded <br>' ;   137                                 $r et .= 'fai le success fully uplo aded <br>' ;
138                         }   138                         }
139                         else   139                         else
140                             $ret . = 'failed  to upload  file <br>' ;   140                             $ret . = 'failed  to upload  file <br>' ;
141                    }   141                    }
142                    else   142                    else
143                         $ret .= 'y ou tried t o upload n ot support ed format  <br>';   143                         $ret .= 'y ou tried t o upload n ot support ed format  <br>';
144                }   144                }
145                else   145                else
146                    $ret  .= 'file  to big <br >';   146                    $ret  .= 'file  to big <br >';
147           }   147           }
148           el se   148           el se
149                $ret .=  'you have  an error w hile uploa ding the f ile <br>';   149                $ret .=  'you have  an error w hile uploa ding the f ile <br>';
150     150  
151           re turn $ret;   151           re turn $ret;
152       }   152       }
153     153  
154       functi on insertM ediaToDb(  $sFileName  )   154       functi on insertM ediaToDb(  $sFileName  )
155       {   155       {
156           $s MediaType  = process_ db_input($ this -> sM ediaType);   156           $s MediaType  = process_ db_input($ this -> sM ediaType);
157           $s FileName =  process_d b_input( $ sFileName  );   157           $s FileName =  process_d b_input( $ sFileName  );
158            $sFileTitl e   =   process_db _input(  
$_POST['ti tle']   )
;
  158            $sFileTitl e   =   process_db _input(   htmlspecia lchars_adv ( $_POST['ti tle']) ) ;
159              159           
160           $s Status = g etParam("a utoApprova l_Photo")  == 'on' ?  'active' :  'passive'  ;   160           $s Status = g etParam("a utoApprova l_Photo")  == 'on' ?  'active' :  'passive'  ;
161           $i Result = $ this -> oM ediaQuery  -> insertM edia( $thi s -> iProf ileID, $sM ediaType,  $sFileName , $sFileTi tle, $sSta tus );   161           $i Result = $ this -> oM ediaQuery  -> insertM edia( $thi s -> iProf ileID, $sM ediaType,  $sFileName , $sFileTi tle, $sSta tus );
162     162  
163           if ( 0 < $iRe sult )   163           if ( 0 < $iRe sult )
164           {   164           {
165                if (getP aram("auto Approval_i fPhoto") ! = 'on' )   165                if (getP aram("auto Approval_i fPhoto") ! = 'on' )
166                {   166                {
167                    $sql Query = "U PDATE `Pro files` set  `Status`= 'Approval'  WHERE `ID `={$this - > iProfile ID}";   167                    $sql Query = "U PDATE `Pro files` set  `Status`= 'Approval'  WHERE `ID `={$this - > iProfile ID}";
168                    db_r es($sqlQue ry);   168                    db_r es($sqlQue ry);
169                    crea teUserData File( $thi s -> iProf ileID );   169                    crea teUserData File( $thi s -> iProf ileID );
170                    repa rseObjTags ( 'profile ', $this - > iProfile ID );   170                    repa rseObjTags ( 'profile ', $this - > iProfile ID );
171                }   171                }
172                return t rue;   172                return t rue;
173           }   173           }
174           el se   174           el se
175           {   175           {
176                return f alse;   176                return f alse;
177           }   177           }
178       }   178       }
179     179  
180       functi on deleteM edia( $iMe diaID )   180       functi on deleteM edia( $iMe diaID )
181       {   181       {
182           $a MediaFile  = $this ->  getElemen tArrayByID ( $iMediaI D );   182           $a MediaFile  = $this ->  getElemen tArrayByID ( $iMediaI D );
183     183  
184           $t his -> oMe diaQuery - > deleteMe dia( $this  -> iProfi leID, $aMe diaFile['m ed_id'], $ this -> sM ediaType ) ;   184           $t his -> oMe diaQuery - > deleteMe dia( $this  -> iProfi leID, $aMe diaFile['m ed_id'], $ this -> sM ediaType ) ;
185     185  
186           $s FileSrc =  $this -> s MediaDir .  $aMediaFi le['med_fi le'];   186           $s FileSrc =  $this -> s MediaDir .  $aMediaFi le['med_fi le'];
187           @u nlink($sFi leSrc);   187           @u nlink($sFi leSrc);
188       }   188       }
189     189  
190       functi on getProf ileMediaDi r()   190       functi on getProf ileMediaDi r()
191       {   191       {
192           if ( extDirEx ists( $thi s -> sMedi aDir ) )   192           if ( extDirEx ists( $thi s -> sMedi aDir ) )
193           {   193           {
194                return $ this -> sM ediaDir;   194                return $ this -> sM ediaDir;
195           }   195           }
196           el se   196           el se
197           {   197           {
198                if( mkdi r( $this - > sMediaDi r ) )   198                if( mkdi r( $this - > sMediaDi r ) )
199                {   199                {
200                    chmo d ($this - > sMediaDi r, 0777);   200                    chmo d ($this - > sMediaDi r, 0777);
201                    retu rn $this - > sMediaDi r;   201                    retu rn $this - > sMediaDi r;
202                }   202                }
203           }   203           }
204     204  
205           re turn false ;   205           re turn false ;
206       }   206       }
207     207  
208       functi on getElem entArrayBy ID( $iMedi aID )   208       functi on getElem entArrayBy ID( $iMedi aID )
209       {   209       {
210           fo reach($thi s -> aMedi a as $aVal ue)   210           fo reach($thi s -> aMedi a as $aVal ue)
211           {   211           {
212                if( $iMe diaID == $ aValue['me d_id'] )   212                if( $iMe diaID == $ aValue['me d_id'] )
213                {   213                {
214                    retu rn $aValue ;   214                    retu rn $aValue ;
215                }   215                }
216           }   216           }
217       }   217       }
218     218  
219       functi on getRati ng( $iSum,  $iCount )   219       functi on getRati ng( $iSum,  $iCount )
220       {   220       {
221           $i PossibleMa x = $this  -> aMediaC onfig['max ']['voting '] * $iCou nt;   221           $i PossibleMa x = $this  -> aMediaC onfig['max ']['voting '] * $iCou nt;
222           $i PossibleMi n = $this  -> aMediaC onfig['min ']['voting '] * $iCou nt;   222           $i PossibleMi n = $this  -> aMediaC onfig['min ']['voting '] * $iCou nt;
223     223  
224           if ( !$iSum | | !$iCount  )   224           if ( !$iSum | | !$iCount  )
225           {   225           {
226                return 0 ;   226                return 0 ;
227           }   227           }
228     228  
229           $i MediaRate  = $iSum *  100 / $iPo ssibleMax;   229           $i MediaRate  = $iSum *  100 / $iPo ssibleMax;
230           $i MediaRate  = round( $ iMediaRate  );   230           $i MediaRate  = round( $ iMediaRate  );
231           re turn $iMed iaRate;   231           re turn $iMed iaRate;
232       }   232       }
233     233  
234       functi on getMedi aConfigArr ay()   234       functi on getMedi aConfigArr ay()
235       {   235       {
236           gl obal $site , $dir;   236           gl obal $site , $dir;
237           gl obal $enab le_video_u pload, $en able_audio _upload;    
238           gl obal $max_ voting_mar k;   237           gl obal $max_ voting_mar k;
239           gl obal $min_ voting_mar k;   238           gl obal $min_ voting_mar k;
240           gl obal $max_ voting_per iod;   239           gl obal $max_ voting_per iod;
241     240  
242           gl obal $max_ icon_width ;   241           gl obal $max_ icon_width ;
243           gl obal $max_ icon_heigh t;   242           gl obal $max_ icon_heigh t;
244           gl obal $max_ thumb_widt h;   243           gl obal $max_ thumb_widt h;
245           gl obal $max_ thumb_heig ht;   244           gl obal $max_ thumb_heig ht;
246           gl obal $max_ photo_widt h;   245           gl obal $max_ photo_widt h;
247           gl obal $max_ photo_heig ht;   246           gl obal $max_ photo_heig ht;
248     247  
249           gl obal $max_ photo_file s;   248           gl obal $max_ photo_file s;
250           gl obal $max_ photo_size ;   249           gl obal $max_ photo_size ;
251           gl obal $max_ video_file s;    
252           gl obal $max_ video_size ;    
253           gl obal $max_ audio_file s;    
254           gl obal $max_ audio_size ;    
255           gl obal $max_ media_titl e;   250           gl obal $max_ media_titl e;
256           gl obal $min_ media_titl e;   251           gl obal $min_ media_titl e;
257     252  
258     253  
259           $a MediaConfi g = array( );   254           $a MediaConfi g = array( );
260     255  
261           $a MediaConfi g['enable' ]['photo']  = 1;   256           $a MediaConfi g['enable' ]['photo']  = 1;
262           $a MediaConfi g['enable' ]['audio']  = $enable _audio_upl oad;    
263           $a MediaConfi g['enable' ]['video']  = $enable _video_upl oad;    
264     257  
265           $a MediaConfi g['profile ']['ID'] =  (int)$thi s -> iProf ileID;   258           $a MediaConfi g['profile ']['ID'] =  (int)$thi s -> iProf ileID;
266           $a MediaConfi g['url'][' site'] = $ site['url' ];   259           $a MediaConfi g['url'][' site'] = $ site['url' ];
267           $a MediaConfi g['url'][' media'] =  $aMediaCon fig['url'] ['site'] .  'upload_m edia.php';   260           $a MediaConfi g['url'][' media'] =  $aMediaCon fig['url'] ['site'] .  'upload_m edia.php';
268           $a MediaConfi g['max'][' mediaTitle '] = (int) $max_media _title ? $ max_media_ title : 15 0; //Max n umbers of  chars in m edia title   261           $a MediaConfi g['max'][' mediaTitle '] = (int) $max_media _title ? $ max_media_ title : 15 0; //Max n umbers of  chars in m edia title
269           $a MediaConfi g['min'][' mediaTitle '] = (int) $min_media _title ? $ min_media_ title : 3;  //Min num bers of ch ars in med ia title   262           $a MediaConfi g['min'][' mediaTitle '] = (int) $min_media _title ? $ min_media_ title : 3;  //Min num bers of ch ars in med ia title
270           $a MediaConfi g['enable' ]['voting' ] = true;   263           $a MediaConfi g['enable' ]['voting' ] = true;
271           if ( $aMediaC onfig['ena ble']['vot ing'] )   264           if ( $aMediaC onfig['ena ble']['vot ing'] )
272           {   265           {
273                $aMediaC onfig['min ']['voting '] = (int) $min_votin g_mark ? ( int)$min_v oting_mark  : 1;   266                $aMediaC onfig['min ']['voting '] = (int) $min_votin g_mark ? ( int)$min_v oting_mark  : 1;
274                $aMediaC onfig['max ']['voting '] = (int) $max_votin g_mark ? ( int)$max_v oting_mark  : 5;   267                $aMediaC onfig['max ']['voting '] = (int) $max_votin g_mark ? ( int)$max_v oting_mark  : 5;
275                $aMediaC onfig['max ']['voting Period'] =  (int)$max _voting_pe riod ? (in t)$max_vot ing_period  : 24; //i n hours   268                $aMediaC onfig['max ']['voting Period'] =  (int)$max _voting_pe riod ? (in t)$max_vot ing_period  : 24; //i n hours
276           }   269           }
277           $a MediaConfi g['dir'][' tmp'] = $d ir['tmp'];   270           $a MediaConfi g['dir'][' tmp'] = $d ir['tmp'];
278     271  
279           sw itch( $thi s -> sMedi aType )   272           sw itch( $thi s -> sMedi aType )
280           {   273           {
281                case 'ph oto':   274                case 'ph oto':
282                    $aMe diaConfig[ 'size']['i conWidth']  = (int)$m ax_icon_wi dth ? (int )$max_icon _width : 4 5;   275                    $aMe diaConfig[ 'size']['i conWidth']  = (int)$m ax_icon_wi dth ? (int )$max_icon _width : 4 5;
283                    $aMe diaConfig[ 'size']['i conHeight' ] = (int)$ max_icon_h eight ? (i nt)$max_ic on_height  : 45;   276                    $aMe diaConfig[ 'size']['i conHeight' ] = (int)$ max_icon_h eight ? (i nt)$max_ic on_height  : 45;
284                    $aMe diaConfig[ 'size']['t humbWidth' ] = (int)$ max_thumb_ width ? (i nt)$max_th umb_width  : 110;   277                    $aMe diaConfig[ 'size']['t humbWidth' ] = (int)$ max_thumb_ width ? (i nt)$max_th umb_width  : 110;
285                    $aMe diaConfig[ 'size']['t humbHeight '] = (int) $max_thumb _height ?  (int)$max_ thumb_heig ht : 110;   278                    $aMe diaConfig[ 'size']['t humbHeight '] = (int) $max_thumb _height ?  (int)$max_ thumb_heig ht : 110;
286                    $aMe diaConfig[ 'size']['p hotoWidth' ] = (int)$ max_photo_ width ? (i nt)$max_ph oto_width  : 400;   279                    $aMe diaConfig[ 'size']['p hotoWidth' ] = (int)$ max_photo_ width ? (i nt)$max_ph oto_width  : 400;
287                    $aMe diaConfig[ 'size']['p hotoHeight '] = (int) $max_photo _height ?  (int)$max_ photo_heig ht : 400;   280                    $aMe diaConfig[ 'size']['p hotoHeight '] = (int) $max_photo _height ?  (int)$max_ photo_heig ht : 400;
288                    $aMe diaConfig[ 'dir']['ph oto'] = $d ir['profil eImage'];   281                    $aMe diaConfig[ 'dir']['ph oto'] = $d ir['profil eImage'];
289                    $aMe diaConfig[ 'url']['ph oto'] = $s ite['profi leImage'];   282                    $aMe diaConfig[ 'url']['ph oto'] = $s ite['profi leImage'];
290                    $aMe diaConfig[ 'max']['ph oto'] = (i nt)$max_ph oto_files  ? (int)$ma x_photo_fi les : 20;  // Max num ber of pho tos   283                    $aMe diaConfig[ 'max']['ph oto'] = (i nt)$max_ph oto_files  ? (int)$ma x_photo_fi les : 20;  // Max num ber of pho tos
291                    $aMe diaConfig[ 'max']['ph otoFile']  = $max_pho to_size *  1024 * 102 4; // in M B   284                    $aMe diaConfig[ 'max']['ph otoFile']  = $max_pho to_size *  1024 * 102 4; // in M B
292                break;   285                break;
293                case 'au dio':    
294                    $aMe diaConfig[ 'dir']['au dio'] = $d ir['profil eSound'];    
295                    $aMe diaConfig[ 'url']['au dio'] = $s ite['profi leSound'];    
296                    $aMe diaConfig[ 'max']['au dio'] = (i nt)$max_au dio_files  ? (int)$ma x_audio_fi les : 20;  // Max num ber of aud io files    
297                    $aMe diaConfig[ 'max']['au dioFile']  = $max_aud io_size *  1024 * 102 4; // in M B    
298                break;    
299                case 'vi deo':    
300                    $aMe diaConfig[ 'dir']['vi deo'] = $d ir['profil eVideo'];    
301                    $aMe diaConfig[ 'url']['vi deo'] = $s ite['profi leVido'];    
302                    $aMe diaConfig[ 'max']['vi deo'] = (i nt)$max_vi deo_files  ? (int)$ma x_video_fi les : 20;  // Max num ber of vid eo files    
303                    $aMe diaConfig[ 'max']['vi deoFile']  = $max_vid eo_size *  1024 * 102 4; // in M B    
304                break;    
305           }   286           }
306     287  
307           $a MediaConfi g['site']  = $site;   288           $a MediaConfi g['site']  = $site;
308     289  
309           re turn $aMed iaConfig;   290           re turn $aMed iaConfig;
310       }   291       }
311     292  
312     293  
313   }   294   }
314     295  
315   ?>   296   ?>