759. File Comparison Report

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

759.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5 browseMusic.php Thu Sep 20 09:00:20 2007 UTC
2 Dolphin-v.6.1.0 browseMusic.php Mon Apr 14 11:47:24 2008 UTC

759.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 14 90
Changed 9 178
Inserted 2 2
Removed 2 4

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

759.4 Active regular expressions

No regular expressions were active.

759.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('inc/he ader.inc.p hp');   21   require_on ce('inc/he ader.inc.p hp');
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );    
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' );    
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'i mages.inc. php' );    
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php' );   22   require_on ce(BX_DIRE CTORY_PATH _INC . 'sh aring.inc. php');
    23   require_on ce(BX_DIRE CTORY_PATH _CLASSES .  'BxDolSha redMedia.p hp');
26     24  
27   $_page['na me_index']     = 82;   25   check_logg ed();
28   $_page['cs s_name']       = 'vie wMusic.css ';    
29     26  
30   $oVotingVi ew = new B xTemplVoti ngView('gm usic', 0,  0);   27   $member['I D'] = (int )$_COOKIE[ 'memberID' ];
31   $_page['ex tra_js']   = $oVoting View->getE xtraJs();    
32     28  
33   if ( !( $l ogged['adm in'] = mem ber_auth(  1, false )  ) )   29   $oNew = ne w BxDolSha redMedia(' music', $s ite, $dir,  $member);
34   {   30  
35       if ( ! ( $logged[ 'member']  = member_a uth( 0, fa lse ) ) )   31   $_page['na me_index']  = 82;
36       {   32   $_page['cs s_name'] =  $oNew->sC ssName;
37           if  ( !( $log ged['aff']  = member_ auth( 2, f alse ) ) )    
38           {    
39                $logged[ 'moderator '] = membe r_auth( 3,  false );    
40           }    
41        }    
42   }    
43     33  
44   $_page['he ader'] = _ t( "_brows eMusic" );   34   $_page['he ader'] = _ t( "_brows eMusic" );
45   $_page['he ader_text' ] = _t("_b rowseMusic ");   35   $_page['he ader_text' ] = _t("_b rowseMusic ");
46     36  
47   $_ni = $_p age['name_ index'];   37   $_ni = $_p age['name_ index'];
48     38  
49   $member['I D'] = (int )$_COOKIE[ 'memberID' ];   39   $aConditio n  = $oNew ->getCondi tionArray( $logged);
50     40   if ($aCond ition !==  false) {
51   $aWhere =  array();   41       $aSqlQ uery   = $ aCondition ['query'];
52   $aWhere[]  = '1';   42       $iTota lPages = $ aCondition ['total'];
53     43       $iCurP age    = $ aCondition ['cur_page '];
54   if (isset( $_GET['use rID']))   44       $iPerP age    = $ aCondition ['per_page '];
55   {    
56       $iUser  = (int)$_ GET['userI D'];    
57       $aWher e[] = "`Ra yMusicFile s`.`Owner` =$iUser";        
58   }   45   }
59     46   else {
60   if (isset( $_GET['tag ']))    
61   {    
62       $sTag  = htmlspec ialchars_a dv($_GET[' tag']);    
63       $aWher e[] = "`Ra yMusicFile s`.`Tags`  like '%$sT ag%'";    
64   }    
65      
66   if (isset( $_GET['act ion']))    
67   {    
68       $sAct  = htmlspec ialchars_a dv($_GET[' action']);    
69       $sAddo n = define BrowseActi on($sAct,' Music',$me mber['ID'] );    
70   }    
71      
72   $sqlWhere  = "WHERE "  . implode ( ' AND ',  $aWhere ) .$sAddon."  AND `Appr oved`= 'tr ue'";    
73      
74   $iTotalNum  = db_valu e( "SELECT  COUNT( *  ) FROM `Ra yMusicFile s` $sqlWhe re" );    
75   if( !$iTot alNum )    
76   {    
77       $_page _cont[$_ni ]['page_ma in_code']  = _t( '_So rry, nothi ng found'  );   47       $_page _cont[$_ni ]['page_ma in_code']  = _t( '_So rry, nothi ng found'  );
78      
79       PageCo de();   48       PageCo de();
80       exit;   49       exit;
81   }   50   }
82     51  
83   $iPerPage  = (int)$_G ET['per_pa ge'];   52   $rData   =   $oNew->get Fil es List ($ aSql Query);
84   if( !$iPer Page )    
85       $iPerP age = 10;    
86   $iTotalPag es = ceil(  $iTotalNu m / $iPerP age );    
87      
88   $iCurPage  = (int)$_G ET['page'] ;    
89      
90   if( $iCurP age > $iTo talPages )    
91       $iCurP age = $iTo talPages;    
92      
93   if( $iCurP age < 1 )    
94       $iCurP age = 1;    
95           
96   $sLimitFro m = ( $iCu rPage - 1  ) * $iPerP age;    
97      
98   $sqlOrderB y = 'ORDER  BY `Date`  DESC';    
99      
100   if (isset( $_GET['rat e']))    
101   {    
102       $oVoti ngView = n ew BxTempl VotingView  ('gmusic' , 0, 0);    
103           
104       $aSql         = $ oVotingVie w->getSqlP arts('`Ray MusicFiles `', '`ID`' );    
105       $sHow         = $ _GET['rate '] == 'top ' ? "DESC"  : "ASC";    
106           $s qlOrderBy   = $oVotin gView->isE nabled() ?  "ORDER BY  `voting_r ate` $sHow , `voting_ count` $sH ow, `medDa te` $sHow"  : $sqlOrd erBy ;    
107       $sqlFi elds   = $ aSql['fiel ds'];    
108       $sqlLJ oin    = $ aSql['join '];    
109   }       
110   $sqlLimit  = "LIMIT $ sLimitFrom , $iPerPag e";    
111      
112   $sQuery =  "    
113       SELECT    
114           `R ayMusicFil es`.`ID` a s `medID`,    
115           `R ayMusicFil es`.`Title ` as `medT itle`,    
116           `R ayMusicFil es`.`Tags`  as `medTa gs`,    
117           `R ayMusicFil es`.`Descr iption` as  `medDesc` ,    
118           `R ayMusicFil es`.`Date`  as `medDa te`,    
119           `R ayMusicFil es`.`Liste ns` as `me dListens`,    
120           `R ayMusicFil es`.`Owner ` as `medP rofId`,    
121           `R ayMusicFil es`.`Appro ved`,    
122           `P rofiles`.` NickName`,    
123           `P rofiles`.` Password`    
124           $s qlFields    
125       FROM ` RayMusicFi les`    
126       LEFT J OIN `Profi les` ON    
127           `P rofiles`.` ID` = `Ray MusicFiles `.`Owner`    
128       $sqlLJ oin    
129       $sqlWh ere    
130       $sqlOr derBy    
131       $sqlLi mit    
132       ";    
133      
134   $rData   =   db_r es
($ s Query);
   
135     53  
136   $_page_con t[$_ni]['p age_main_c ode'] = Pa geCompPage MainCode() ;   54   while ($aD ata = mysq l_fetch_as soc($rData ))
137     55       $sCode  .= $oNew- >showBrows eUnit($aDa ta);
138   PageCode() ;    
139      
140   function P ageCompPag eMainCode( )    
141   {    
142       global  $site;    
143       global  $rData;    
144       global  $iTotalPa ges;    
145       global  $iCurPage ;    
146       global  $iPerPage ;    
147       global  $member;    
148           
149       $sCode  = '<div s tyle="posi tion: rela tive; floa t: left;"> ';    
150       if (my sql_num_ro ws($rData) )    
151       {    
152           wh ile ($aDat a = mysql_ fetch_arra y($rData))    
153           {    
154                $sProfLi nk = '<div >'._t("_By ").': <a h ref="'.get ProfileLin k($aData[' medProfId' ]).'">'.$a Data['Nick Name'].'</ a></div>';    
155                    
156                $oVoting View = new  BxTemplVo tingView ( 'gmusic',  $aData['me dID']);    
157                if( $oVo tingView-> isEnabled( ) )    
158                {    
159                    $sRa te = $oVot ingView->g etSmallVot ing (0);    
160                    $sSh owRate = ' <div class ="galleryR ate">'. $s Rate . '</ div>';    
161                }    
162                $sHref =  $site['ur l'].'viewM usic.php?f ileID='.$a Data['medI D'];    
163                $sImg =  '<a href=" '.$sHref.' "><img src ="'.$site[ 'images']. 'music.png "></a>';    
164                    
165                $sMusTit le = strle n($aData[' medTitle'] ) > 0 ? $a Data['medT itle'] : _ t("_Untitl ed");    
166                $sDelLin k = $membe r['ID'] ==  $aData['m edProfId']  ? '<div>< a href="'. $_SERVER[' PHP_SELF'] .'?action= del&fileID ='.$aData[ 'medID'].' "    
167                onClick= "return co nfirm( \'' ._t("_are  you sure?" ).'\');">' ._t("_Dele te").'</a> </div>'  :  "" ;    
168                    
169                $sCode . = '<div cl ass="brows eUnit">';    
170                    $sCo de .= '<di v class="l astFilesPi c">'.$sImg .'</div>';    
171                    $sCo de .= '<di v><a href= "'.$sHref. '"><b>'.$s MusTitle.' </b></a></ div>';    
172                    $sCo de .= $sPr ofLink;    
173                    $sCo de .= '<di v>'._t("_A dded").':  <b>'.defin eTimeInter val($aData ['medDate' ]).'</b></ div>';    
174                    $sCo de .= '<di v>'._t("_P laybacks") .': <b>'.$ aData['med Listens']. '</b></div >';    
175                    $sCo de .= $sSh owRate;    
176                    $sCo de .= $sDe lLink;    
177                $sCode . = '</div>'    
178           }    
179       }    
180     56  
181       $sCode  .= '<div  class="cle ar_both">< /div>';   57   $sCode .=  '<div clas s="clear_b oth"></div >';
182          58  
    59   $sCode .=  $oNew->sho wPaginatio n($iTotalP ages, $iCu rPage, $iP erPage);
183          60  
184       // gen erate pagi nation   61   $_page_con t[$_ni]['p age_main_c ode'] = $s Code;
185       if( $i TotalPages  > 1)    
186       {    
187           $s Request =  $_SERVER[' PHP_SELF']  . '?';    
188           $a Fields = a rray( 'use rID', 'tag ', 'rate'  );    
189              62  
190           fo reach( $aF ields as $ field )   63   PageCode() ;
191                if( isse t( $_GET[$ field] ) )    
192                    $sRe quest .= " &amp;{$fie ld}=" . ht mlentities ( process_ pass_data(  $_GET[$fi eld] ) );    
193               
194           $p agination  = '<div st yle="text- align: cen ter; posit ion: relat ive;">'._t ("_Results  per page" ).':    
195                    <sel ect name=" per_page"  onchange=" window.loc ation=\''  . $sReques t . '&amp; per_page=\ ' + this.v alue;">    
196                         <option va lue="10"'  . ( $iPerP age == 10  ? ' select ed="select ed"' : ''  ) . '>10</ option>    
197                         <option va lue="20"'  . ( $iPerP age == 20  ? ' select ed="select ed"' : ''  ) . '>20</ option>    
198                         <option va lue="50"'  . ( $iPerP age == 50  ? ' select ed="select ed"' : ''  ) . '>50</ option>    
199                         <option va lue="100"'  . ( $iPer Page == 10 0 ? ' sele cted="sele cted"' : ' ' ) . '>10 0</option>    
200                    </se lect></div >' .    
201                genPagin ation( $iT otalPages,  $iCurPage , ( $sRequ est . '&am p;page={pa ge}&amp;pe r_page='.$ iPerPage )  );    
202       }    
203       else    
204           $p agination  = '';    
205           
206       return  $sCode .  $paginatio n.'</div>' ;    
207   }    
208     64  
209   ?>   65   ?>