69. File Comparison Report

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

69.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\admin post_mod_media.php Thu Sep 20 08:58:42 2007 UTC
2 Dolphin-v.6.1.0\admin post_mod_media.php Sat Apr 19 12:05:02 2008 UTC

69.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 436
Changed 1 2
Inserted 0 0
Removed 0 0

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

69.4 Active regular expressions

No regular expressions were active.

69.5 Comparison detail

1   <?   1   <?
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( '../in c/header.i nc.php' );   21   require_on ce( '../in c/header.i nc.php' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   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_desig n.inc.php'  );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
25     25  
26   $logged['a dmin']   =   member_aut h(   1  
);
  26   $logged['a dmin']   =   member_aut h(   1 ,   true,   true   );
27     27  
28   $navigatio nStep = 12 ; // count  of object s to show  per page   28   $navigatio nStep = 12 ; // count  of object s to show  per page
29     29  
30   $_page['he ader'] = " Photos Pos tModeratio n";   30   $_page['he ader'] = " Photos Pos tModeratio n";
31   $_page['he ader_text' ] = "Unapp roved prof ile photos ";   31   $_page['he ader_text' ] = "Unapp roved prof ile photos ";
32     32  
33   if (isset( $_GET['med ia']))   33   if (isset( $_GET['med ia']))
34   {   34   {
35       $sType  = htmlspe cialchars_ adv($_GET[ 'media']);   35       $sType  = htmlspe cialchars_ adv($_GET[ 'media']);
36   }   36   }
37     37  
38   if (isset( $_GET['sta tus']))   38   if (isset( $_GET['sta tus']))
39   {   39   {
40       $sStat us = htmls pecialchar s_adv($_GE T['status' ]);   40       $sStat us = htmls pecialchar s_adv($_GE T['status' ]);
41   }   41   }
42     42  
43   if (isset( $_GET['iUs er']))   43   if (isset( $_GET['iUs er']))
44   {   44   {
45       $iUser  = htmlspe cialchars_ adv($_GET[ 'iUser']);   45       $iUser  = htmlspe cialchars_ adv($_GET[ 'iUser']);
46   }   46   }
47     47  
48   if (isset( $_POST['ch eck']) &&  is_array($ _POST['che ck']))   48   if (isset( $_POST['ch eck']) &&  is_array($ _POST['che ck']))
49   {   49   {
50       foreac h($_POST[' check'] as  $iKey =>  $iVal)   50       foreac h($_POST[' check'] as  $iKey =>  $iVal)
51       {   51       {
52           sw itch (true )   52           sw itch (true )
53           {   53           {
54                case iss et($_POST[ 'Delete']) :   54                case iss et($_POST[ 'Delete']) :
55                    dele teItem((in t)$iVal);   55                    dele teItem((in t)$iVal);
56                    brea k;   56                    brea k;
57                case iss et($_POST[ 'Approve'] ):   57                case iss et($_POST[ 'Approve'] ):
58                    appr oveItem((i nt)$iVal);   58                    appr oveItem((i nt)$iVal);
59                    brea k;     59                    brea k;  
60           }   60           }
61       }   61       }
62   }   62   }
63     63  
64   TopCodeAdm in();   64   TopCodeAdm in();
65   ContentBlo ckHead("Pr ofile medi a");   65   ContentBlo ckHead("Pr ofile medi a");
66       echo g etPostModM ediaPage($ sType,$sSt atus,$iUse r);   66       echo g etPostModM ediaPage($ sType,$sSt atus,$iUse r);
67   ContentBlo ckFoot();   67   ContentBlo ckFoot();
68   BottomCode ();   68   BottomCode ();
69     69  
70     70  
71     71  
72   function g etPostModM ediaPage($ sType = 'p hoto', $sS tatus = 'p assive', $ iUser = 0)   72   function g etPostModM ediaPage($ sType = 'p hoto', $sS tatus = 'p assive', $ iUser = 0)
73   {   73   {
74       global  $dir;   74       global  $dir;
75       global  $site, $m ax_thumb_w idth, $max _thumb_hei ght, $max_ photo_widt h, $max_ph oto_height ;   75       global  $site, $m ax_thumb_w idth, $max _thumb_hei ght, $max_ photo_widt h, $max_ph oto_height ;
76          76       
77       $ret =  '';   77       $ret =  '';
78     78  
79       $aFile s = getUna pprovedFil esArray($s Type, $sSt atus, $iUs er);   79       $aFile s = getUna pprovedFil esArray($s Type, $sSt atus, $iUs er);
80     80  
81       $style  = '   81       $style  = '
82           fl oat:left;   82           fl oat:left;
83           ma rgin:5px 1 1px;   83           ma rgin:5px 1 1px;
84           pa dding:5px;   84           pa dding:5px;
85           bo rder:1px s olid silve r;   85           bo rder:1px s olid silve r;
86           te xt-align:c enter;   86           te xt-align:c enter;
87     87  
88       ';   88       ';
89       $style 2 = '   89       $style 2 = '
90           wi dth:' . $m ax_thumb_w idth  . 'p x;   90           wi dth:' . $m ax_thumb_w idth  . 'p x;
91           he ight:' . $ max_thumb_ height . ' px;   91           he ight:' . $ max_thumb_ height . ' px;
92           ba ckground-c olor:#f1f1 f1;   92           ba ckground-c olor:#f1f1 f1;
93           bo rder:1px s olid silve r;   93           bo rder:1px s olid silve r;
94       ';   94       ';
95       $ret . = '<div st yle="clear :both;"></ div>';   95       $ret . = '<div st yle="clear :both;"></ div>';
96       $ret . = "<script >   96       $ret . = "<script >
97       functi on checkAl l( _pref,  do_check )   97       functi on checkAl l( _pref,  do_check )
98       {   98       {
99           aE lems = doc ument.getE lementsByT agName( 'i nput' );   99           aE lems = doc ument.getE lementsByT agName( 'i nput' );
100              100           
101           fo r( i = 0;  i < aElems .length; i  ++ )   101           fo r( i = 0;  i < aElems .length; i  ++ )
102           {   102           {
103                elt = aE lems[i];   103                elt = aE lems[i];
104                if( elt. name.subst r( 0, _pre f.length )  == _pref  )   104                if( elt. name.subst r( 0, _pre f.length )  == _pref  )
105                    elt. checked =  do_check;   105                    elt. checked =  do_check;
106           }   106           }
107       }   107       }
108       </scri pt>"   108       </scri pt>"
109       ;   109       ;
110       $ret . = '<div><f orm method ="post" ac tion="'.$_ HTTP['REFE RER'].'">' ;   110       $ret . = '<div><f orm method ="post" ac tion="'.$_ HTTP['REFE RER'].'">' ;
111       foreac h( $aFiles  as $aMedi a )   111       foreac h( $aFiles  as $aMedi a )
112       {   112       {
113           $s ThumbFile  = $dir['pr ofileImage '] . $aMed ia['med_pr of_id'] .  '/thumb_'  . $aMedia[ 'med_file' ];   113           $s ThumbFile  = $dir['pr ofileImage '] . $aMed ia['med_pr of_id'] .  '/thumb_'  . $aMedia[ 'med_file' ];
114           if ( extFileE xists( $sT humbFile )  )   114           if ( extFileE xists( $sT humbFile )  )
115           {   115           {
116                $sThumbU rl = $site ['profileI mage'] . $ aMedia['me d_prof_id' ] . '/thum b_' . $aMe dia['med_f ile'];   116                $sThumbU rl = $site ['profileI mage'] . $ aMedia['me d_prof_id' ] . '/thum b_' . $aMe dia['med_f ile'];
117                $sMediaU rl = $site ['profileI mage'] . $ aMedia['me d_prof_id' ] . '/phot o_' . $aMe dia['med_f ile'];   117                $sMediaU rl = $site ['profileI mage'] . $ aMedia['me d_prof_id' ] . '/phot o_' . $aMe dia['med_f ile'];
118                $ret .=  '<div styl e="' . $st yle . '">' ;   118                $ret .=  '<div styl e="' . $st yle . '">' ;
119                    $ret  .= '<div  style="' .  $style2 .  '">';   119                    $ret  .= '<div  style="' .  $style2 .  '">';
120                         $ret .= '< img src="'  . $sThumb Url . '" o nclick="wi ndow.open( \'' . $sMe diaUrl . ' \', \'phot o\',\'widt h=' . ($ma x_photo_wi dth+10) .  ',height='  . ($max_p hoto_heigh t+10) . ', left=100,t op=100,cop yhistory=n o,director ies=no,men ubar=no,lo cation=no, resizable= yes,scroll bars=yes\' );" />';   120                         $ret .= '< img src="'  . $sThumb Url . '" o nclick="wi ndow.open( \'' . $sMe diaUrl . ' \', \'phot o\',\'widt h=' . ($ma x_photo_wi dth+10) .  ',height='  . ($max_p hoto_heigh t+10) . ', left=100,t op=100,cop yhistory=n o,director ies=no,men ubar=no,lo cation=no, resizable= yes,scroll bars=yes\' );" />';
121                    $ret  .= '</div >';   121                    $ret  .= '</div >';
122                    $ret  .= '<br / >';   122                    $ret  .= '<br / >';
123                $ret .=  '<div><inp ut type="c heckbox" n ame="check []" id="ch '.$aMedia[ 'med_id']. '" value=" '.$aMedia[ 'med_id']. '"></div>'   123                $ret .=  '<div><inp ut type="c heckbox" n ame="check []" id="ch '.$aMedia[ 'med_id']. '" value=" '.$aMedia[ 'med_id']. '"></div>'
124                $ret .=  '</div>';   124                $ret .=  '</div>';
125           }   125           }
126       }   126       }
127       $ret . = '<div st yle="clear :both;"></ div>';   127       $ret . = '<div st yle="clear :both;"></ div>';
128          128       
129       if( !e mpty( $aFi les ) )   129       if( !e mpty( $aFi les ) )
130       {   130       {
131           $s AppBut = $ sStatus ==  'passive'  ? '<input  type="sub mit" name= "Approve"  value="App rove">' :  '';   131           $s AppBut = $ sStatus ==  'passive'  ? '<input  type="sub mit" name= "Approve"  value="App rove">' :  '';
132           $s Check  = c ount($aFil es) > 1 ?  '<input ty pe="checkb ox" name=\ "ch_all" o nclick="ch eckAll( \' ch\', this .checked ) " />Check  all' : '';   132           $s Check  = c ount($aFil es) > 1 ?  '<input ty pe="checkb ox" name=\ "ch_all" o nclick="ch eckAll( \' ch\', this .checked ) " />Check  all' : '';
133           $r et .= '<di v style="c lear:both; font-weigh t:bold; te xt-align:c enter;">'. $sCheck.'   133           $r et .= '<di v style="c lear:both; font-weigh t:bold; te xt-align:c enter;">'. $sCheck.'
134           <i nput type= "submit" n ame="Delet e" value=" Delete">';   134           <i nput type= "submit" n ame="Delet e" value=" Delete">';
135           $r et .= $sAp pBut.'</di v>';   135           $r et .= $sAp pBut.'</di v>';
136       }   136       }
137       $ret . = '</form> </div>';   137       $ret . = '</form> </div>';
138       return  $ret;   138       return  $ret;
139   }   139   }
140     140  
141   function g etUnapprov edFilesArr ay($sType,  $sStatus,  $iUser)   141   function g etUnapprov edFilesArr ay($sType,  $sStatus,  $iUser)
142   {   142   {
143       $ret =  '';   143       $ret =  '';
144       $sAdd   = "AND `m ed_status`  = '$sStat us'";   144       $sAdd   = "AND `m ed_status`  = '$sStat us'";
145       $sAdd  .= " AND ` med_type`  = '$sType' ";   145       $sAdd  .= " AND ` med_type`  = '$sType' ";
146       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";   146       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";
147          147       
148       $sQuer y = "   148       $sQuer y = "
149           SE LECT   149           SE LECT
150                   `medi a`.`med_id `,   150                   `medi a`.`med_id `,
151                   `medi a`.`med_pr of_id`,   151                   `medi a`.`med_pr of_id`,
152                   `medi a`.`med_ty pe`,   152                   `medi a`.`med_ty pe`,
153                   `medi a`.`med_fi le`,   153                   `medi a`.`med_fi le`,
154                   `medi a`.`med_ti tle`   154                   `medi a`.`med_ti tle`
155           FR OM `media`   155           FR OM `media`
156           WH ERE 1   156           WH ERE 1
157           $s Add   157           $s Add
158        158     
159           OR DER BY `me dia`.`med_ date`   159           OR DER BY `me dia`.`med_ date`
160       ";   160       ";
161     161  
162       $res =  db_res( $ sQuery );   162       $res =  db_res( $ sQuery );
163       $ret =  fill_asso c_array( $ res );   163       $ret =  fill_asso c_array( $ res );
164       return  $ret;   164       return  $ret;
165   }   165   }
166     166  
167   function d eleteItem(  $iMedia )   167   function d eleteItem(  $iMedia )
168   {   168   {
169       global  $dir;   169       global  $dir;
170     170  
171       $aFile  = db_arr( "SELECT *  FROM `medi a` WHERE ` med_id`='$ iMedia'");   171       $aFile  = db_arr( "SELECT *  FROM `medi a` WHERE ` med_id`='$ iMedia'");
172          172       
173       $sIcon File = $di r['profile Image'] .  $aFile['me d_prof_id' ] . '/icon _' . $aFil e['med_fil e'];   173       $sIcon File = $di r['profile Image'] .  $aFile['me d_prof_id' ] . '/icon _' . $aFil e['med_fil e'];
174       $sThum bFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/thu mb_' . $aF ile['med_f ile'];   174       $sThum bFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/thu mb_' . $aF ile['med_f ile'];
175       $sPhot oFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/pho to_' . $aF ile['med_f ile'];   175       $sPhot oFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/pho to_' . $aF ile['med_f ile'];
176     176  
177       $sqlQu ery = "   177       $sqlQu ery = "
178       DELETE  FROM `med ia` WHERE  `med_id` =  '$iMedia' ;   178       DELETE  FROM `med ia` WHERE  `med_id` =  '$iMedia' ;
179       ";   179       ";
180     180  
181       $res =  db_res( $ sqlQuery ) ;   181       $res =  db_res( $ sqlQuery ) ;
182     182  
183       // del ete voting s   183       // del ete voting s
184       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );   184       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );
185       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );   185       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );
186       $oVoti ngMedia->d eleteVotin gs ($aMedi a['med_id' ]);   186       $oVoti ngMedia->d eleteVotin gs ($aMedi a['med_id' ]);
187     187  
188       @unlin k( $sIconF ile );   188       @unlin k( $sIconF ile );
189       @unlin k( $sThumb File );   189       @unlin k( $sThumb File );
190       @unlin k( $sPhoto File );   190       @unlin k( $sPhoto File );
191     191  
192       return  $res;   192       return  $res;
193   }   193   }
194     194  
195   function a pproveItem ( $iMedia  )   195   function a pproveItem ( $iMedia  )
196   {   196   {
197       $sQuer y = "   197       $sQuer y = "
198           UP DATE `medi a`   198           UP DATE `medi a`
199           SE T   199           SE T
200                `med_sta tus` = 'ac tive'   200                `med_sta tus` = 'ac tive'
201           WH ERE `med_i d` = '$iMe dia'   201           WH ERE `med_i d` = '$iMe dia'
202       ";   202       ";
203     203  
204       return  db_res( $ sQuery );   204       return  db_res( $ sQuery );
205   }   205   }
206     206  
207   function a pproveAllI tems()   207   function a pproveAllI tems()
208   {   208   {
209       $sQuer y = "   209       $sQuer y = "
210           UP DATE `medi a`   210           UP DATE `medi a`
211           SE T   211           SE T
212                `med_sta tus` = 'ac tive'   212                `med_sta tus` = 'ac tive'
213       ";   213       ";
214     214  
215       return  db_res( $ sQuery );   215       return  db_res( $ sQuery );
216   }   216   }
217     217  
218     218  
219   ?>   219   ?>