244. File Comparison Report

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

244.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\inc sharing.inc.php Mon Dec 24 09:44:18 2007 UTC
2 Dolphin-v.6.1.0\inc sharing.inc.php Mon Apr 14 11:47:22 2008 UTC

244.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 15 120
Changed 11 682
Inserted 2 2
Removed 1 10

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

244.4 Active regular expressions

No regular expressions were active.

244.5 Comparison detail

1   <?   1   <?
2   /********* ********** ********** ********** ********** ********** ********** ******   2   /********* ********** ********** ********** ********** ********** ********** ******
3   *                              D olphin Sma rt Communi ty Builder   3   *                              D olphin Sma rt Communi ty Builder
4   *                                 --------- --------   4   *                                 --------- --------
5   *     begi n                 : M on Mar 23  2006   5   *     begi n                 : M on Mar 23  2006
6   *     copy right             : ( C) 2006 Bo onEx Group   6   *     copy right             : ( C) 2006 Bo onEx Group
7   *     webs ite               : h ttp://www. boonex.com /   7   *     webs ite               : h ttp://www. boonex.com /
8   * This fil e is part  of Dolphin  - Smart C ommunity B uilder   8   * This fil e is part  of Dolphin  - Smart C ommunity B uilder
9   *   9   *
10   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.    10   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License. 
11   * http://c reativecom mons.org/l icenses/by /3.0/   11   * http://c reativecom mons.org/l icenses/by /3.0/
12   *   12   *
13   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   13   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
14   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   14   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
15   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    15   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
16   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin   16   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin
17   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   17   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
18   ********** ********** ********** ********** ********** ********** ********** *****/   18   ********** ********** ********** ********** ********** ********** ********** *****/
19     19  
20   require_on ce( 'heade r.inc.php'  );   20   require_on ce( 'heade r.inc.php'  );
21   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php'  );   21   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php'  );
    22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p arams.inc. php' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' );
23   require_on ce(   BX_DIRECTO RY_PATH_ ROOT   .   "templ a tes/tmpl_{ $tmpl}/scr ipts/BxTe m plVot in gV i ew .php "   );   24   require_on ce(   BX_DIRECTO RY_PATH_ INC   .   ' a d m
in . i nc .php '   );
24     25  
25   function   defineTime Interval($ iTime)
  26   function   defineTime Interval($ iTime)   {
26   {   27        $iTime   =   t ime ( )   -   ( in
t )$iTim e ;
27       $iTime  = time()  - $iTime;   28        $sCode   =   _format_wh en( $iTime
);
28       if ( $ iTime < 60  )    
29         $sCo de = "$iTi me "._t("_ seconds ag o");    
30       else    
31       {    
32          $iTime   =   round(   $iT ime   /   60   ) ;   //   m in u t
e s
   
33         if (  $iTime <  60 )    
34           $s Code = "$i Time "._t( "_minutes  ago");    
35         else    
36         {    
37           $i Time = rou nd( $iTime  / 60 ); / /hours    
38           if  ( $iTime  < 24 )    
39                 $sCode   =   " $iTime   "._t("_hou rs   ago" );    
40           el se    
41           {    
42                $iTime =  round( $i Time / 24  ); //days    
43                $sCode =  "$iTime " ._t("_days  ago");    
44           }    
45         }    
46       }    
47          29       
48       return  $sCode;   30       return  $sCode;
49   }   31   }
50     32  
51     33   function c ommentNavi gation($iN umber,$iDi vis, $iCur r = 0) {
52   function d eleteMedia ($iFile, $ sType, $sE xt = '')    
53   {    
54       global  $dir;    
55       global  $logged;    
56           
57       $sType  = $sType  == 'Video'  ? 'Movie'  : $sType  ;    
58      
59       // del ete voting    
60       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );     
61      
62       if( $l ogged['adm in'] )    
63       {    
64           
65       }    
66       elseif ( $logged[ 'member']  )    
67       {    
68         $iMe mberID = ( int)$_COOK IE['member ID'];    
69             
70         if ( $sType ==  'Photo')    
71         {    
72           $s TableName  = "`share{ $sType}Fil es`";    
73           $s Query = "S ELECT * FR OM $sTable Name WHERE  `medID`=' $iFile'";    
74         }    
75         else    
76         {    
77           $s TableName  = "`Ray{$s Type}Files `";    
78           $s Query = "S ELECT `ID`  as `medID `,    
79                               `Tit le` as `me dTitle`,    
80                               `Des cription`  as `medDes c`,    
81                               `Dat e` as `med Date`,    
82                               `Own er` as `me dProfId`    
83                       F ROM $sTabl eName     
84                       W HERE `ID`= '$iFile'";    
85         }    
86      
87         $aFi le = db_ar r( $sQuery  );    
88      
89         if(  !$aFile )    
90           re turn false ;    
91           
92         if(  $aFile['me dProfId']  != $iMembe rID )    
93           re turn false ;    
94       }    
95       else    
96         retu rn false;    
97           
98       $aFNam e = array( );    
99       switch  ($sType)    
100       {    
101           ca se 'Music' :    
102                $sTableN ame = "`Ra y{$sType}F iles`";    
103                $sModPat h = 'ray/m odules/mus ic/files/' ;    
104                $aFName[ ] = $iFile .'.mp3';    
105                $oVoting  = new BxD olVoting ( 'gmusic',  0, 0);    
106                $sTagsTy pe = 'musi c';    
107                break;    
108           ca se 'Photo' :    
109                $sTableN ame = "`sh are{$sType }Files`";    
110                $sModPat h = 'media /images/sh aringImage s/';    
111                $aFName[ ] = $iFile .'.'.$sExt ;    
112                $aFName[ ] = $iFile .'_t.'.$sE xt;    
113                $aFName[ ] = $iFile .'_m.'.$sE xt;    
114                $oVoting  = new BxD olVoting ( 'gphoto',  0, 0);    
115                $sTagsTy pe = 'phot o';    
116                break;    
117           ca se 'Movie' :    
118                $sTableN ame = "`Ra y{$sType}F iles`";    
119                $sModPat h = 'ray/m odules/mov ie/files/' ;    
120                $aFName[ ] = $iFile .'.jpg';    
121                $aFName[ ] = $iFile .'_small.j pg';    
122                $aFName[ ] = $iFile .'.flv';    
123                $aFName[ ] = $iFile .'.mpg';    
124                $oVoting  = new BxD olVoting ( 'gvideo',  0, 0);    
125                $sTagsTy pe = 'vide o';    
126                break;    
127       }    
128      
129       foreac h($aFName  as $iK =>  $sVal)    
130       {    
131           $s FilePath =  BX_DIRECT ORY_PATH_R OOT.$sModP ath.$sVal;    
132           @u nlink($sFi lePath);    
133       }        
134       $sCond  = $sType  == 'Photo'  ? " `medI D`='$iFile '" : "`ID` ='$iFile'"  ;    
135       db_res ("DELETE F ROM $sTabl eName WHER E $sCond") ;    
136           
137       repars eObjTags(  $sTagsType , $iFile ) ;    
138           
139       $oVoti ng->delete Votings ($ iFile);    
140       header ('Location :' . $_SER VER["HTTP_ REFERER"]) ;    
141   }    
142      
143   function d eleteProfi leGallerie s($iUser)    
144   {    
145       $aType  = array(    
146       'Photo '=>array(' medProfId' ,'sharePho toFiles'),    
147       'Video '=>array(' Owner','Ra yMovieFile s'),    
148       'Music '=>array(' Owner','Ra yMusicFile s')    
149       );    
150           
151       foreac h ($aType  as $sKey=> $sVal)    
152       {    
153           $s qlQuery =  "SELECT *  FROM `{$sV al[1]}` WH ERE `{$sVa l[0]}`='$i User'";    
154           $r Files = db _res($sqlQ uery);    
155               
156           if  (mysql_nu m_rows($rF iles))    
157           {    
158                while ($ aFile = my sql_fetch_ array($rFi les))    
159                {    
160                    $iID  = isset($ aFile['med ID']) ? $a File['medI D'] : $aFi le['ID'] ;    
161                    $sEx t = isset( $aFile['me dExt']) ?  $aFile['me dExt'] : ' ';    
162                    dele teMedia($i ID, $sKey,  $sExt);    
163                }    
164           }        
165       }    
166   }    
167      
168   function a pproveMedi a($iFile,  $sType)    
169   {    
170       $sId =  'ID';    
171       switch  ($sType)    
172       {    
173           ca se 'Photo' :    
174                $sTableN ame = '`sh arePhotoFi les`';    
175                $sId = ' med'.$sId;    
176                break;    
177           ca se 'Music' :    
178                $sTableN ame = '`Ra yMusicFile s`';    
179                break;    
180           ca se 'Video' :    
181                $sTableN ame = '`Ra yMovieFile s`';    
182                break;    
183       }    
184       $sqlQu ery = "UPD ATE $sTabl eName SET  `Approved`  = IF(`App roved`='tr ue','false ','true')  WHERE `$sI d`='$iFile '";    
185       db_res ($sqlQuery );    
186       header ('Location :' . $_SER VER["HTTP_ REFERER"]) ;    
187   }    
188      
189   function a ddMediaCom ment($iFil e, $iUser,  $sText, $ sType)    
190   {    
191       $sQuer y = "INSER T INTO `sh are".$sTyp e."Comment s` (`medID `, `commDa te`, `prof ileID`, `c ommText`)     
192       VALUES ('$iFile',  NOW(), '$ iUser','$s Text')";    
193           
194       db_res ($sQuery);    
195   }    
196      
197   function c ommentNavi gation($iN umber,$iDi vis, $iCur r = 0)    
198   {    
199       global  $site;   34       global  $site;
200       global  $aFile;   35       global  $aFile;
201          36       
202       $iPage s = $iNumb er >= 2 ?  round($iNu mber/2) :  1;   37       $iPage s = $iNumb er >= 2 ?  round($iNu mber/2) :  1;
203     38  
204       $sCode  = '<div i d="comment Navigation ">';   39       $sCode  = '<div i d="comment Navigation ">';
205     40  
206       for ($ i = 1; $i  < $iPages  + 1; $i++)   41       for ($ i = 1; $i  < $iPages  + 1; $i++)
207       {   42       {
208           $s Capt = $i  == 1 ? _t( "_Page").' : ' : '' ;   43           $s Capt = $i  == 1 ? _t( "_Page").' : ' : '' ;
209           $s Code .= '< div class= "commentNa vUnit">'.$ sCapt;   44           $s Code .= '< div class= "commentNa vUnit">'.$ sCapt;
210           $s Link =  $i  != $iCurr  ? '<a hre f="'.$_SER VER['PHP_S ELF'].'?fi leID='.$aF ile['medID '].'&commP age='.$i.' ">'.$i.'</ a>' : $iCu rr;   45           $s Link =  $i  != $iCurr  ? '<a hre f="'.$_SER VER['PHP_S ELF'].'?fi leID='.$aF ile['medID '].'&commP age='.$i.' ">'.$i.'</ a>' : $iCu rr;
211           $s Code .= $s Link.'</di v>';   46           $s Code .= $s Link.'</di v>';
212       }   47       }
213       $sCode  .= '<div  class="cle ar_both">< /div>';   48       $sCode  .= '<div  class="cle ar_both">< /div>';
214       $sCode  .= '</div >';   49       $sCode  .= '</div >';
215          50       
216       return  $sCode;   51       return  $sCode;
217   }   52   }
218     53  
219   function   get TagL i nks ($s TagL i st ,   $sType
)
  54   function   get FileIdByUr i
($s F i leName ,   $sType   =   '' )   {
220   {   55       $sFile Name =  pr ocess_db_i nput($sFil eName);
221       global  $site;    
222           
223       if (st rlen($sTag List))    
224       {    
225           $a Tags = exp lode(' ',  $sTagList) ;    
226           fo reach ($aT ags as $iK ey => $sVa l)    
227           {    
228                $sVal    = trim($sV al,',');    
229                $sCode . = '<a href ="'.$site[ 'URL'].'br owse'.$sTy pe.'.php?t ag='.$sVal .'">'.$sVa l.'</a> ';    
230           }    
231       }    
232           
233       return  $sCode;    
234   }    
235      
236   function d efineBrows eAction($s Act, $sTyp e, $iUser  = 0)    
237   {    
238       global  $member;    
239           
240       $sqlQu ery = '';    
241       switch  ($sAct)    
242       {    
243           ca se 'fav':    
244                $sUserCo nd = $iUse r != 0 ? "  AND `user ID`=$iUser " : "" ;    
245                $sqlQuer y = "SELEC T `medID`  FROM `shar e".$sType. "Favorites ` WHERE 1  ".$sUserCo nd;    
246                $sType =  $sType ==  'Video' ?  'Movie' :  $sType;    
247     56       
248                
i f   ($sType   ==   'Photo' )
  57        sw i tch   ($sType
)   {
249                {   58           ca se 'photo' :
250                    $sRe s = " AND  `share{$sT ype}Files` .`medID` I N(";   59                $sqlQuer y = "SELEC T `medID`  FROM `shar ePhotoFile s` WHERE ` medUri`='$ sFileName' ";
251                }    
252                else    
253                {    
254                    $sRe s = " AND  `Ray{$sTyp e}Files`.` ID` IN(" ;    
255                }    
256                $rList =  db_res($s qlQuery);    
257                    
258                while ($ aList = my sql_fetch_ row($rList ))    
259                {    
260                    $sPa ram .= $aL ist[0] . ' ,';    
261                }    
262                if (strl en($sParam ) > 0)    
263                {    
264                    $sRe s = $sRes. trim($sPar am,',').') ';    
265                }    
266                else    
267                {    
268                    $sRe s =' AND 0 ';    
269                }    
270                break;   60                break;
271            case   ' del ':   61            case   ' music ':
272                if (isse t($_GET['f ileID']))   62                $sqlQuer y = "SELEC T `ID` FRO M `RayMusi cFiles` WH ERE `Uri`= '$sFileNam e'";
273                {    
274                    $iFi le = (int) $_GET['fil eID'];    
275                    dele teMedia($i File, $sTy pe);    
276                }    
277                $sRes =  '';    
278                break;     63                break;
279       }   64           ca se 'video' :
280          65                $sqlQuer y = "SELEC T `ID` FRO M `RayMovi eFiles` WH ERE `Uri`= '$sFileNam e'";
281       return  $sRes;    
282   }    
283      
284   function g etSitesArr ay($iFile,  $sType)    
285   {    
286       global  $site;    
287           
288       $sLink  = $site[' url'].'vie wMusic.php ?fileID='. $iFile;    
289       $aSite s = array(    
290           ar ray(    
291           'i mage'=>'di gg.png',    
292           'l ink'=>'htt p://digg.c om/submit? phase=2&ur l='.$sLink    
293           ),    
294           ar ray(    
295           'i mage'=>'de licious.pn g',    
296           'l ink' =>'ht tp://del.i cio.us/pos t?url='.$s Link    
297           ),    
298           ar ray(    
299           'i mage'=>'bl inklist.pn g',    
300           'l ink' =>'ht tp://www.b linklist.c om/index.p hp?Action= Blink/addb link.php&a mp;Url='.$ sLink    
301           ),    
302           ar ray(    
303           'i mage'=>'fu rl.png',    
304           'l ink' =>'ht tp://www.f url.net/st oreIt.jsp? u='.$sLink    
305           ),    
306           ar ray(    
307           'i mage'=>'ne tscape.gif ',    
308           'l ink' =>'ht tp://www.n etscape.co m/submit/? U='.$sLink    
309           ),    
310           ar ray(    
311           'i mage'=>'ne wsvine.png ',    
312           'l ink' =>'ht tp://www.n ewsvine.co m/_tools/s eed&save?u ='.$sLink    
313           ),    
314           ar ray(    
315           'i mage'=>'re ddit.png',    
316           'l ink' =>'ht tp://reddi t.com/subm it?url='.$ sLink    
317           ),    
318           ar ray(    
319           'i mage'=>'sh adows.png' ,    
320           'l ink' =>'ht tp://www.s hadows.com /features/ tcr.htm?ur l='.$sLink    
321           ),    
322           ar ray(    
323           'i mage'=>'sl ashdot.png ',    
324           'l ink' =>'ht tp://slash dot.org/bo okmark.pl? url='.$sLi nk    
325           ),    
326           ar ray(    
327           'i mage'=>'sp here.png',    
328           'l ink' =>'ht tp://www.s phere.com/ search?q=s phereit:'. $sLink    
329           ),    
330           ar ray(    
331           'i mage'=>'st umbleupon. png',    
332           'l ink' =>'ht tp://www.s tumbleupon .com/url/h ttp'.$sLin k    
333           ),    
334           ar ray(    
335           'i mage'=>'te chnorati.p ng',    
336           'l ink' =>'ht tp://techn orati.com/ faves?add= '.$sLink    
337           )    
338       );    
339       $sLink  = '<a hre f="{Link}" ><div clas s="shareLi nk" style= "backgroun d-image:ur l(\'{Image }\')"></di v></a>';    
340      
341       foreac h ($aSites  as $iKey  =>$sVal)    
342       {    
343           $s LinkCur =  str_replac e('{Image} ', getTemp lateIcon($ sVal['imag e']),$sLin k);    
344           $s LinkCur =  str_replac e('{Link}' , $sVal['l ink'],$sLi nkCur);    
345           $s Code   .=  $sLinkCur;    
346       }    
347       $sCode  .= '<div  class="cle ar_both">< /div>';    
348           
349       return  $sCode;    
350   }    
351      
352   function P ageCompSha rePhotosCo ntent($sCa ption, $iI D = 0)    
353   {    
354       global  $site;    
355           
356       $max_n um    = (i nt)getPara m("top_pho tos_max_nu m");    
357       $mode        = pr ocess_db_i nput( getP aram("top_ photos_mod e") );    
358           
359       $mode  = $_GET['s hPhotosMod e'];    
360       if( $m ode != 'ra nd' && $mo de != 'top ' && $mode  != 'last' )    
361           $m ode = 'las t';    
362           
363       $sqlSe lect = "SE LECT `medI D`,    
364                              `medE xt`,    
365                              `medT itle`";    
366       $sqlFr om  = " FR OM `shareP hotoFiles` ";    
367       if ($i ID != 0)    
368       {    
369           $s qlWhere =  " WHERE `A pproved`=' true' AND  `medProfId `='$iID'";    
370       }       
371           
372       $menu  = '<div cl ass="dbTop Menu">';    
373        forea ch( array(  'last', ' top', 'ran d' ) as $m yMode )    
374        {    
375         swit ch ( $myMo de )    
376         {    
377          cas e 'last':    
378           if ( $mode ==  $myMode )    
379            $ sqlOrder =  "    
380                ORDER BY  `medDate`  DESC";    
381            $ modeTitle  = _t('_Lat est');    
382          bre ak;    
383          cas e 'rand':    
384           if ( $mode ==  $myMode )    
385            $ sqlOrder =  "    
386                ORDER BY  RAND()";    
387            $ modeTitle  = _t('_Ran dom');    
388          bre ak;    
389          cas e 'top':    
390           if ( $mode ==  $myMode )    
391           {    
392                $oVoting View = new  BxTemplVo tingView ( 'gphoto',  0, 0);    
393                $aSql         = $oV otingView- >getSqlPar ts('`share PhotoFiles `', '`medI D`');    
394                $sHow         = "DE SC";    
395                $sqlOrde rBy  = $oV otingView- >isEnabled () ? "ORDE R BY `voti ng_rate` $ sHow, `vot ing_count`  $sHow, `m edDate` $s How" : $sq lOrderBy ;    
396                $sqlFiel ds   = $aS ql['fields '];    
397                $sqlLJoi n    = $aS ql['join'] ;    
398           
399                $sqlSele ct  .= $sq lFields;    
400                $sqlFrom     .= $sq lLJoin;    
401                $sqlOrde r    = $sq lOrderBy;    
402           }    
403           $m odeTitle =  _t('_Top' );    
404          bre ak;   66                break;
    67           de fault: bre ak; 
405         }   68       }
406          69  
407         if(  $myMode ==  $mode )   70       return  (int)db_v alue($sqlQ uery);
408                $menu .=  "<div cla ss=\"activ e\">$modeT itle</div> ";    
409         else    
410         {    
411           if ( basename ( $_SERVER ['PHP_SELF '] ) == 'r ewrite_nam e.php' ||  basename(  $_SERVER[' PHP_SELF']  ) == 'pro file.php'  )    
412                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"pro file.php?I D={$iID}&s hPhotosMod e=$myMode\ " class=\" top_member s_menu\" o nclick=\"g etHtmlData ( 'show_sh arePhotos' , this.hre f+'&amp;sh ow_only=sh arePhotos' ); return  false;\">$ modeTitle< /a></div>" ;    
413           el se    
414                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"{$_ SERVER['PH P_SELF']}? shPhotosMo de=$myMode \" class=\ "top_membe rs_menu\"  onclick=\" getHtmlDat a( 'show_s harePhotos ', this.hr ef+'&amp;s how_only=s harePhotos '); return  false;\"> $modeTitle </a></div> ";    
415         }    
416        }   71   }
417        $menu  .= '</div >';    
418            
419       $aNum  = db_arr(  "SELECT CO UNT(`share PhotoFiles `.`medID`)  $sqlFrom  $sqlWhere"  );    
420       $num =  (int)$aNu m[0];    
421           
422       $ret =  '';    
423       if( $n um )    
424       {    
425           $p ages = cei l( $num /  $max_num ) ;    
426           $p age = (int )$_GET['pa ge_p'];    
427              72  
428           if ( $page <  1 or $mode  == 'rand'  )   73   function g etFileUrl( $iFileId,  $sFileUri,  $sType, $ bPermalink ) {
429                $page =  1;   74       if ($b Permalink)
430           if ( $page >  $pages )   75           $s Link = $sT ype.'/gall ery/'.$sFi leUri;
431                $page =  $pages;    
432               
433           $s qlLimitFro m = ( $pag e - 1 ) *  $max_num;    
434           $s qlLimit =  "    
435           LI MIT $sqlLi mitFrom, $ max_num";    
436            
437        $rDat a = db_res ($sqlSelec t.$sqlFrom .$sqlWhere .$sqlOrder .$sqlLimit );    
438            
439        $ret  .= '<div c lass="clea r_both"></ div>';    
440        $iCou nter = 1;    
441        $sAdd on = '';    
442        while  ($aData =  mysql_fet ch_array($ rData))    
443        {    
444           $s Image = $s ite['shari ngImages'] .$aData['m edID'].'_t .'.$aData[ 'medExt'];    
445           $o VotingView  = new BxT emplVoting View ('gph oto', $aDa ta['medID' ]);    
446           if ( $oVoting View->isEn abled())    
447           {    
448                $sRate =  $oVotingV iew->getSm allVoting  (0);    
449                $sShowRa te = '<div  class="ga lleryRate" >'. $sRate  . '</div> ';    
450           }    
451           $s Href = $si te['url']. 'viewPhoto .php?fileI D='.$aData ['medID'];    
452           $s Img  = '<d iv class=" lastFilesP ic" style= "backgroun d-image: u rl(\''.$sI mage.'\'); ">    
453                      <a  href="'.$ sHref.'">< img src="' .$site['im ages'] .'s pacer.gif"  width="11 0" height= "110"></a> </div><div  class="cl ear_both"> </div>';    
454           if ( ($iCount er % 3) !=  0 )    
455                $ret .=  '<div clas s="sharePh otosConten t_1">';    
456           el se   76       else
457           {   77           $s Link = 'vi ew'.ucfirs t($sType). '.php?file ID='.$iFil eId;
458                $ret .=  '<div clas s="sharePh otosConten t_2">';    
459                $sAddon  = '<div cl ass="clear _both"></d iv>';    
460           }    
461           $s Title = st rlen($aDat a['medTitl e']) > 0 ?  $aData['m edTitle']  : _t("_Unt itled");    
462           $r et .= $sIm g.'<div><a  href="'.$ sHref.'">' .$sTitle.' </a></div> '.$sShowRa te.'</div> ';    
463           $r et .= $sAd don;    
464           $s Addon = '' ;    
465           $i Counter++;    
466        }    
467            
468        $ret  .= '<div c lass="clea r_both"></ div>';    
469        $ret  = DesignBo xContent(  _t( $sCapt ion ), $re t, 1, $men u );    
470       }     
471      
472    return $r et;    
473   }    
474      
475   function P ageCompSha reVideosCo ntent($sCa ption, $iI D = 0)    
476   {    
477       global  $site;    
478           
479       $max_n um    = (i nt)getPara m("top_pho tos_max_nu m");    
480       $mode        = pr ocess_db_i nput( getP aram("top_ photos_mod e") );    
481           
482       $mode  = $_GET['s hVideosMod e'];    
483       if( $m ode != 'ra nd' && $mo de != 'top ' && $mode  != 'last' )    
484           $m ode = 'las t';    
485           
486       $sqlSe lect = "SE LECT `ID`  as `medID` ,    
487                              `Titl e` as `med Title`,    
488                              `Date ` as `medD ate`    
489                              ";    
490       $sqlFr om  = " FR OM `RayMov ieFiles`";    
491       if ($i ID != 0)    
492       {    
493           $s qlWhere =  " WHERE `A pproved`=' true' AND  `Owner`='$ iID'";    
494       }       
495           
496       $menu  = '<div cl ass="dbTop Menu">';    
497        forea ch( array(  'last', ' top', 'ran d' ) as $m yMode )    
498        {    
499         swit ch ( $myMo de )    
500         {    
501          cas e 'last':    
502           if ( $mode ==  $myMode )    
503            $ sqlOrder =  "    
504                ORDER BY  `medDate`  DESC";    
505            $ modeTitle  = _t('_Lat est');    
506          bre ak;    
507          cas e 'rand':    
508           if ( $mode ==  $myMode )    
509            $ sqlOrder =  "    
510                ORDER BY  RAND()";    
511            $ modeTitle  = _t('_Ran dom');    
512          bre ak;    
513          cas e 'top':    
514           if ( $mode ==  $myMode )    
515           {    
516                $oVoting View = new  BxTemplVo tingView ( 'gvideo',  0, 0);    
517                $aSql         = $oV otingView- >getSqlPar ts('`RayMo vieFiles`' , '`ID`');    
518                $sHow         = "DE SC";    
519                $sqlOrde rBy  = $oV otingView- >isEnabled () ? "ORDE R BY `voti ng_rate` $ sHow, `vot ing_count`  $sHow, `m edDate` $s How" : $sq lOrderBy ;    
520                $sqlFiel ds   = $aS ql['fields '];    
521                $sqlLJoi n    = $aS ql['join'] ;    
522           
523                $sqlSele ct  .= $sq lFields;    
524                $sqlFrom     .= $sq lLJoin;    
525                $sqlOrde r    = $sq lOrderBy;    
526           }    
527           $m odeTitle =  _t('_Top' );    
528          bre ak;    
529         }    
530           
531         if(  $myMode ==  $mode )    
532                $menu .=  "<div cla ss=\"activ e\">$modeT itle</div> ";    
533         else    
534         {    
535           if ( basename ( $_SERVER ['PHP_SELF '] ) == 'r ewrite_nam e.php' ||  basename(  $_SERVER[' PHP_SELF']  ) == 'pro file.php'  )    
536                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"pro file.php?I D={$iID}&s hVideosMod e=$myMode\ " class=\" top_member s_menu\" o nclick=\"g etHtmlData ( 'show_sh areVideos' , this.hre f+'&amp;sh ow_only=sh areVideos' ); return  false;\">$ modeTitle< /a></div>" ;    
537           el se    
538                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"{$_ SERVER['PH P_SELF']}? shVideosMo de=$myMode \" class=\ "top_membe rs_menu\"  onclick=\" getHtmlDat a( 'show_s hareVideos ', this.hr ef+'&amp;s how_only=s hareVideos '); return  false;\"> $modeTitle </a></div> ";    
539         }    
540        }    
541        $menu  .= '</div >';    
542            
543       $aNum  = db_arr(  "SELECT CO UNT(`RayMo vieFiles`. `ID`) $sql From $sqlW here" );    
544       $num =  (int)$aNu m[0];    
545           
546       $ret =  '';    
547       if( $n um )    
548       {    
549           $p ages = cei l( $num /  $max_num ) ;    
550           $p age = (int )$_GET['pa ge_p'];    
551               
552           if ( $page <  1 or $mode  == 'rand'  )    
553                $page =  1;    
554           if ( $page >  $pages )    
555                $page =  $pages;    
556               
557           $s qlLimitFro m = ( $pag e - 1 ) *  $max_num;    
558           $s qlLimit =  "    
559           LI MIT $sqlLi mitFrom, $ max_num";    
560            
561        $rDat a = db_res ($sqlSelec t.$sqlFrom .$sqlWhere .$sqlOrder .$sqlLimit );    
562            
563        $ret  .= '<div c lass="clea r_both"></ div>';    
564            
565        $iCou nter = 1;    
566        $sAdd on = '';    
567        $ret  .= '<div c lass="clea r_both"></ div>';    
568        while  ($aData =  mysql_fet ch_array($ rData))    
569        {    
570           $s Href = $si te['url']. 'viewVideo .php?fileI D='.$aData ['medID'];    
571           $s VidTitle =  strlen($a Data['medT itle']) >  0 ? $aData ['medTitle '] : _t("_ Untitled") ;    
572           $s Img  = '<a  href="'.$ sHref.'">< img src="' .$site['ur l'].'ray/m odules/mov ie/files/' .$aData['m edID'].'.j pg" width= "112px" he ight="80px "></a>';    
573               
574           $o VotingView  = new BxT emplVoting View ('gvi deo', $aDa ta['medID' ]);    
575           if ( $oVoting View->isEn abled())    
576           {    
577                $sRate =  $oVotingV iew->getSm allVoting  (0);    
578                $sShowRa te = '<div  class="ga lleryRate" >'. $sRate  . '</div> ';    
579           }    
580      
581           if ( ($iCount er % 3) !=  0 )    
582                $ret .=  '<div clas s="sharePh otosConten t_1">';    
583           el se    
584           {    
585                $ret .=  '<div clas s="sharePh otosConten t_2">';    
586                $sAddon  = '<div cl ass="clear _both"></d iv>';    
587           }    
588           $r et .= '<di v class="l astVideoPi c">'.$sImg .'</div>';    
589           $r et .= '<di v><a href= "'.$sHref. '">'.$sVid Title.'</a ></div>';    
590           $r et .= $sSh owRate.'</ div>';    
591           $r et .= $sAd don;    
592           $s Addon = '' ;    
593           $i Counter++;    
594        }    
595            
596        $ret  .= '<div c lass="clea r_both"></ div>';    
597        $ret  = DesignBo xContent(  _t( $sCapt ion ), $re t, 1, $men u );    
598       }     
599      
600    return $r et;    
601   }    
602      
603   function P ageCompSha reMusicCon tent($sCap tion, $iID  = 0)    
604   {    
605       global  $site;    
606           
607       $max_n um    = (i nt)getPara m("top_pho tos_max_nu m");    
608       $mode        = pr ocess_db_i nput( getP aram("top_ photos_mod e") );    
609           
610       $mode  = $_GET['s hMusicMode '];    
611       if( $m ode != 'ra nd' && $mo de != 'top ' && $mode  != 'last' )    
612           $m ode = 'las t';    
613           
614       $sqlSe lect = "SE LECT `ID`  as `medID` ,    
615                              `Titl e` as `med Title`,    
616                              `Date ` as `medD ate`    
617                              ";    
618       $sqlFr om  = " FR OM `RayMus icFiles`";    
619       if ($i ID != 0)    
620       {    
621           $s qlWhere =  " WHERE `A pproved`=' true' AND  `Owner`='$ iID'";    
622       }       
623           
624       $menu  = '<div cl ass="dbTop Menu">';    
625        forea ch( array(  'last', ' top', 'ran d' ) as $m yMode )    
626        {    
627         swit ch ( $myMo de )    
628         {    
629          cas e 'last':    
630           if ( $mode ==  $myMode )    
631            $ sqlOrder =  "    
632                ORDER BY  `medDate`  DESC";    
633            $ modeTitle  = _t('_Lat est');    
634          bre ak;    
635          cas e 'rand':    
636           if ( $mode ==  $myMode )    
637            $ sqlOrder =  "    
638                ORDER BY  RAND()";    
639            $ modeTitle  = _t('_Ran dom');    
640          bre ak;    
641          cas e 'top':    
642           if ( $mode ==  $myMode )    
643           {    
644                $oVoting View = new  BxTemplVo tingView ( 'gmusic',  0, 0);    
645                $aSql         = $oV otingView- >getSqlPar ts('`RayMu sicFiles`' , '`ID`');    
646                $sHow         = "DE SC";    
647                $sqlOrde rBy  = $oV otingView- >isEnabled () ? "ORDE R BY `voti ng_rate` $ sHow, `vot ing_count`  $sHow, `m edDate` $s How" : $sq lOrderBy ;    
648                $sqlFiel ds   = $aS ql['fields '];    
649                $sqlLJoi n    = $aS ql['join'] ;    
650           
651                $sqlSele ct  .= $sq lFields;    
652                $sqlFrom     .= $sq lLJoin;    
653                $sqlOrde r    = $sq lOrderBy;    
654           }    
655           $m odeTitle =  _t('_Top' );    
656          bre ak;    
657         }    
658               
659         //if ( $_SERVER ['PHP_SELF '] == 'rew rite_name. php' )    
660             
661         if(  $myMode ==  $mode )    
662                $menu .=  "<div cla ss=\"activ e\">$modeT itle</div> ";    
663         else    
664         {    
665           if ( basename ( $_SERVER ['PHP_SELF '] ) == 'r ewrite_nam e.php' ||  basename(  $_SERVER[' PHP_SELF']  ) == 'pro file.php'  )    
666                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"pro file.php?I D={$iID}&s hMusicMode =$myMode\"  class=\"t op_members _menu\" on click=\"ge tHtmlData(  'show_sha reMusic',  this.href+ '&amp;show _only=shar eMusic');  return fal se;\">$mod eTitle</a> </div>";    
667           el se    
668                $menu .=  "<div cla ss=\"notAc tive\"><a  href=\"{$_ SERVER['PH P_SELF']}? shMusicMod e=$myMode\ " class=\" top_member s_menu\" o nclick=\"g etHtmlData ( 'show_sh areMusic',  this.href +'&amp;sho w_only=sha reMusic');  return fa lse;\">$mo deTitle</a ></div>";    
669         }    
670               
671        }    
672        $menu  .= '</div >';    
673            
674       $aNum  = db_arr(  "SELECT CO UNT(`RayMu sicFiles`. `ID`) $sql From $sqlW here" );    
675       $num =  (int)$aNu m[0];    
676           
677       $ret =  '';    
678       if( $n um )    
679       {    
680           $p ages = cei l( $num /  $max_num ) ;    
681           $p age = (int )$_GET['pa ge_p'];    
682               
683           if ( $page <  1 or $mode  == 'rand'  )    
684                $page =  1;    
685           if ( $page >  $pages )    
686                $page =  $pages;    
687               
688           $s qlLimitFro m = ( $pag e - 1 ) *  $max_num;    
689           $s qlLimit =  "    
690           LI MIT $sqlLi mitFrom, $ max_num";    
691            
692        $rDat a = db_res ($sqlSelec t.$sqlFrom .$sqlWhere .$sqlOrder .$sqlLimit );    
693            
694        $sAdd on = '';    
695        $iCou nter = 1;    
696        $ret  .= '<div c lass="clea r_both"></ div>';    
697        while  ($aData =  mysql_fet ch_array($ rData))    
698        {    
699           $s Href = $si te['url']. 'viewMusic .php?fileI D='.$aData ['medID'];    
700           $s VidTitle =  strlen($a Data['medT itle']) >  0 ? $aData ['medTitle '] : _t("_ Untitled") ;    
701           $s Img = '<a  href="'.$s Href.'"><i mg src="'. $site['ima ges'].'mus ic.png"></ a>';    
702               
703           $o VotingView  = new BxT emplVoting View ('gmu sic', $aDa ta['medID' ]);    
704           if ( $oVoting View->isEn abled())    
705           {    
706                $sRate =  $oVotingV iew->getSm allVoting  (0);    
707                $sShowRa te = '<div  class="ga lleryRate" >'. $sRate  . '</div> ';    
708           }    
709               
710           if ( ($iCount er % 3) !=  0 )    
711                $ret .=  '<div clas s="shareMu sicContent _1">';    
712           el se    
713           {    
714                $ret .=  '<div clas s="shareMu sicContent _2">';    
715                $sAddon  = '<div cl ass="clear _both"></d iv>';              
716           }    
717           $r et .= '<di v class="l astMusicPi c">'.$sImg .'</div>';    
718           $r et .= '<di v><a href= "'.$sHref. '">'.$sVid Title.'</a ></div>';    
719           $r et .= $sSh owRate.'</ div>';    
720           $r et .= $sAd don;    
721           $s Addon = '' ;    
722           $i Counter++;    
723        }    
724            
725        $ret  .= '<div c lass="clea r_both"></ div>';    
726        $ret  = DesignBo xContent(  _t( $sCapt ion ), $re t, 1, $men u );    
727       }     
728     78       
729    return $r et;   79       return  $GLOBALS[ 'site']['u rl'].$sLin k;
730   }   80   }
731     81  
732   ?>   82   ?>