9. File Comparison Report

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

9.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2\admin post_mod_photos.php Sat Apr 26 08:19:16 2008 UTC
2 Dolphin-v.6.1.3\admin post_mod_photos.php Wed Jul 16 09:51:21 2008 UTC

9.2 Comparison summary

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

9.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

9.4 Active regular expressions

No regular expressions were active.

9.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'] = m ember_auth ( 1, true,  true );   26   $logged['a dmin'] = m ember_auth ( 1, true,  true );
27     27  
28   $_page['cs s_name']       = 'pos t_moderati on.css';   28   $_page['cs s_name']       = 'pos t_moderati on.css';
29     29  
30   $navigatio nStep = 12 ; // count  of object s to show  per page   30   $navigatio nStep = 12 ; // count  of object s to show  per page
31     31  
32   $_page['he ader'] = " Profile Ph otos PreMo deration";   32   $_page['he ader'] = " Profile Ph otos PreMo deration";
33   $_page['he ader_text' ] = "";   33   $_page['he ader_text' ] = "";
34     34  
35   if (isset( $_GET['med ia']))   35   if (isset( $_GET['med ia']))
36   {   36   {
37       $sType  = htmlspe cialchars_ adv($_GET[ 'media']);   37       $sType  = htmlspe cialchars_ adv($_GET[ 'media']);
38   }   38   }
39     39  
40   if (isset( $_GET['sta tus']))   40   if (isset( $_GET['sta tus']))
41   {   41   {
42       $sStat us = htmls pecialchar s_adv($_GE T['status' ]);   42       $sStat us = htmls pecialchar s_adv($_GE T['status' ]);
43   }   43   }
44     44  
45   if (isset( $_GET['iUs er']))   45   if (isset( $_GET['iUs er']))
46   {   46   {
47       $iUser  = htmlspe cialchars_ adv($_GET[ 'iUser']);   47       $iUser  = htmlspe cialchars_ adv($_GET[ 'iUser']);
48   }   48   }
49     49  
50   if (isset( $_POST['ch eck']) &&  is_array($ _POST['che ck']))   50   if (isset( $_POST['ch eck']) &&  is_array($ _POST['che ck']))
51   {   51   {
52       foreac h($_POST[' check'] as  $iKey =>  $iVal)   52       foreac h($_POST[' check'] as  $iKey =>  $iVal)
53       {   53       {
54           sw itch (true )   54           sw itch (true )
55           {   55           {
56                case iss et($_POST[ 'Delete']) :   56                case iss et($_POST[ 'Delete']) :
57                    dele teItem((in t)$iVal);   57                    dele teItem((in t)$iVal);
58                    brea k;   58                    brea k;
59                case iss et($_POST[ 'Approve'] ):   59                case iss et($_POST[ 'Approve'] ):
60                    appr oveItem((i nt)$iVal);   60                    appr oveItem((i nt)$iVal);
61                    brea k;     61                    brea k;  
62           }   62           }
63       }   63       }
64   }   64   }
65     65  
66   TopCodeAdm in();   66   TopCodeAdm in();
67   ContentBlo ckHead("") ;   67   ContentBlo ckHead("") ;
68       echo g etPostModM ediaPage($ sType,$sSt atus,$iUse r);   68       echo g etPostModM ediaPage($ sType,$sSt atus,$iUse r);
69   ContentBlo ckFoot();   69   ContentBlo ckFoot();
70   BottomCode ();   70   BottomCode ();
71     71  
72     72  
73     73  
74   function g etPostModM ediaPage($ sType = 'p hoto', $sS tatus = 'p assive', $ iUser = 0)   74   function g etPostModM ediaPage($ sType = 'p hoto', $sS tatus = 'p assive', $ iUser = 0)
75   {   75   {
76        global   $ dir,   $ admin_dir;   76        global   $
admin_dir;
77       global  $site, $m ax_thumb_w idth, $max _thumb_hei ght, $max_ photo_widt h, $max_ph oto_height ;   77       global  $site, $m ax_thumb_w idth, $max _thumb_hei ght, $max_ photo_widt h, $max_ph oto_height ;
78          78       
79       $ret =  '';   79       $ret =  '';
80     80  
81       ////// ////////// //paginati on additio n///////// ////////// ///////   81       ////// ////////// //paginati on additio n///////// ////////// ///////
82       $iTota lNum = get Unapproved FilesCnt($ sType, $sS tatus, $iU ser);   82       $iTota lNum = get Unapproved FilesCnt($ sType, $sS tatus, $iU ser);
83       if( !$ iTotalNum  ) {   83       if( !$ iTotalNum  ) {
84           pr int $ret .  MsgBox(_t ( '_Sorry,  nothing f ound' ));   84           pr int $ret .  MsgBox(_t ( '_Sorry,  nothing f ound' ));
85           /* $sJS = <<< EOF   85           /* $sJS = <<< EOF
86   <script ty pe="text/j avascript" >   86   <script ty pe="text/j avascript" >
87       window .location. href = '{$ site['url' ]}{$admin_ dir}/profi les.php?me dia=photo& status=pas sive';   87       window .location. href = '{$ site['url' ]}{$admin_ dir}/profi les.php?me dia=photo& status=pas sive';
88   </script>   88   </script>
89   EOF;   89   EOF;
90           pr int $sJS;* /   90           pr int $sJS;* /
91           ex it();   91           ex it();
92       }   92       }
93     93  
94       $iPerP age = (int )$_GET['pe r_page'];   94       $iPerP age = (int )$_GET['pe r_page'];
95       if( !$ iPerPage )   95       if( !$ iPerPage )
96           $i PerPage =  20;   96           $i PerPage =  20;
97       $iTota lPages = c eil( $iTot alNum / $i PerPage );   97       $iTota lPages = c eil( $iTot alNum / $i PerPage );
98     98  
99       $iCurP age = (int )$_GET['pa ge'];   99       $iCurP age = (int )$_GET['pa ge'];
100     100  
101       if( $i CurPage >  $iTotalPag es )   101       if( $i CurPage >  $iTotalPag es )
102           $i CurPage =  $iTotalPag es;   102           $i CurPage =  $iTotalPag es;
103     103  
104       if( $i CurPage <  1 )   104       if( $i CurPage <  1 )
105           $i CurPage =  1;   105           $i CurPage =  1;
106     106  
107       $sLimi tFrom = (  $iCurPage  - 1 ) * $i PerPage;   107       $sLimi tFrom = (  $iCurPage  - 1 ) * $i PerPage;
108       $sqlLi mit = "LIM IT {$sLimi tFrom}, {$ iPerPage}" ;   108       $sqlLi mit = "LIM IT {$sLimi tFrom}, {$ iPerPage}" ;
109       ////// ////////// ////////// //   109       ////// ////////// ////////// //
110     110  
111       $aFile s = getUna pprovedFil esArray($s Type, $sSt atus, $iUs er, $sqlLi mit);   111       $aFile s = getUna pprovedFil esArray($s Type, $sSt atus, $iUs er, $sqlLi mit);
112     112  
113       if( !e mpty( $aFi les ) )   113       if( !e mpty( $aFi les ) )
114       {   114       {
115           $r et .= '<di v style="c lear:both; "></div>';   115           $r et .= '<di v style="c lear:both; "></div>';
116           $r et .= "<sc ript>   116           $r et .= "<sc ript>
117           fu nction che ckAll( _pr ef, do_che ck )   117           fu nction che ckAll( _pr ef, do_che ck )
118           {   118           {
119                aElems =  document. getElement sByTagName ( 'input'  );   119                aElems =  document. getElement sByTagName ( 'input'  );
120                   120                
121                for( i =  0; i < aE lems.lengt h; i ++ )   121                for( i =  0; i < aE lems.lengt h; i ++ )
122                {   122                {
123                    elt  = aElems[i ];   123                    elt  = aElems[i ];
124                    if(  elt.name.s ubstr( 0,  _pref.leng th ) == _p ref )   124                    if(  elt.name.s ubstr( 0,  _pref.leng th ) == _p ref )
125                         elt.checke d = do_che ck;   125                         elt.checke d = do_che ck;
126                }   126                }
127           }   127           }
128           </ script>"   128           </ script>"
129           ;   129           ;
130           $r et .= '<di v><form me thod="post " action=" '.$_HTTP[' REFERER']. '">';   130           $r et .= '<di v><form me thod="post " action=" '.$_HTTP[' REFERER']. '">';
131              131           
132           fo reach( $aF iles as $a Media )   132           fo reach( $aF iles as $a Media )
133           {   133           {
134                $sThumbU rl = $site ['profileI mage'] . $ aMedia['me dProfId']  . '/thumb_ ' . $aMedi a['medFile '];   134                $sThumbU rl = $site ['profileI mage'] . $ aMedia['me dProfId']  . '/thumb_ ' . $aMedi a['medFile '];
135                $sMedia  = '<div cl ass="thumb Block" sty le="width: '.$max_thu mb_width.' px; height :'.$max_th umb_height .'px; back ground-ima ge: url(\' '.$sThumbU rl.'\');"> &nbsp;</di v>';   135                $sMedia  = '<div cl ass="thumb Block" sty le="width: '.$max_thu mb_width.' px; height :'.$max_th umb_height .'px; back ground-ima ge: url(\' '.$sThumbU rl.'\');"> &nbsp;</di v>';
136                $sProf =  '<a href= "'.$site[' url'].'ped it.php?ID= '.$aMedia[ 'medProfId '].'">'.$a Media['Nic kName'].'< /a>';   136                $sProf =  '<a href= "'.$site[' url'].'ped it.php?ID= '.$aMedia[ 'medProfId '].'">'.$a Media['Nic kName'].'< /a>';
137                   137                
138                $ret .=  '<div clas s="mainBlo ck">';   138                $ret .=  '<div clas s="mainBlo ck">';
139                    $ret  .= '<div  class="che ckBox">   139                    $ret  .= '<div  class="che ckBox">
140                                 <i nput type= "checkbox"  name="che ck[]" id=" ch'.$aMedi a['medID'] .'" value= "'.$aMedia ['medID']. '">   140                                 <i nput type= "checkbox"  name="che ck[]" id=" ch'.$aMedi a['medID'] .'" value= "'.$aMedia ['medID']. '">
141                             </div> ';   141                             </div> ';
142                    $ret  .= '<div  class="che ckBox">';   142                    $ret  .= '<div  class="che ckBox">';
143                             $ret . = $sMedia;   143                             $ret . = $sMedia;
144                    $ret  .= '</div >';   144                    $ret  .= '</div >';
145                    $ret  .= '<div  class="pho toInfo">';   145                    $ret  .= '<div  class="pho toInfo">';
146                         $ret .= '< div>'.$aMe dia['medTi tle'].'</d iv>';   146                         $ret .= '< div>'.$aMe dia['medTi tle'].'</d iv>';
147                         $ret .= '< div>by '.$ sProf.'</d iv>';   147                         $ret .= '< div>by '.$ sProf.'</d iv>';
148                         $ret .= '< div>Added:  '.date('y -m-d',$aMe dia['medDa te']).'</d iv>';   148                         $ret .= '< div>Added:  '.date('y -m-d',$aMe dia['medDa te']).'</d iv>';
149                    $ret  .= '</div >';   149                    $ret  .= '</div >';
150                $ret .=  '</div>';   150                $ret .=  '</div>';
151           }   151           }
152           $r et .= '<di v style="c lear:both; "></div>';   152           $r et .= '<di v style="c lear:both; "></div>';
153           $s AppBut = $ sStatus ==  'passive'  ? '<input  type="sub mit" name= "Approve"  value="App rove">' :  '';   153           $s AppBut = $ sStatus ==  'passive'  ? '<input  type="sub mit" name= "Approve"  value="App rove">' :  '';
154           $s Check  = c ount($aFil es) > 1 ?  '<input ty pe="checkb ox" name=\ "ch_all" o nclick="ch eckAll( \' ch\', this .checked ) " />Check  all' : '';   154           $s Check  = c ount($aFil es) > 1 ?  '<input ty pe="checkb ox" name=\ "ch_all" o nclick="ch eckAll( \' ch\', this .checked ) " />Check  all' : '';
155           $r et .= '<di v style="c lear:both; font-weigh t:bold; te xt-align:c enter;">'. $sCheck.'   155           $r et .= '<di v style="c lear:both; font-weigh t:bold; te xt-align:c enter;">'. $sCheck.'
156           <i nput type= "submit" n ame="Delet e" value=" Delete">';   156           <i nput type= "submit" n ame="Delet e" value=" Delete">';
157           $r et .= $sAp pBut.'</di v>';   157           $r et .= $sAp pBut.'</di v>';
158           $r et .= '</f orm></div> ';   158           $r et .= '</f orm></div> ';
159       }   159       }
160       else   160       else
161       {   161       {
162           $r et .= '<di v style="t ext-align: center; li ne-height: 25px; vert ical-align :middle; b ackground- color:#c2d aeb; font- weight:bol d;">There  is nothing  to approv e </div>';   162           $r et .= '<di v style="t ext-align: center; li ne-height: 25px; vert ical-align :middle; b ackground- color:#c2d aeb; font- weight:bol d;">There  is nothing  to approv e </div>';
163       }   163       }
164     164  
165       ////// ///paginat ion additi on//////// //////////   165       ////// ///paginat ion additi on//////// //////////
166       if( $i TotalPages  > 1) {   166       if( $i TotalPages  > 1) {
167           $s Request =  $_SERVER[' PHP_SELF']  . '?';   167           $s Request =  $_SERVER[' PHP_SELF']  . '?';
168           $a Fields = a rray( 'med ia', 'stat us', 'iUse r', 'check ', 'Delete ', 'Approv e', 'Repla ce' );   168           $a Fields = a rray( 'med ia', 'stat us', 'iUse r', 'check ', 'Delete ', 'Approv e', 'Repla ce' );
169     169  
170           fo reach( $aF ields as $ vField )   170           fo reach( $aF ields as $ vField )
171                if( isse t( $_GET[$ vField] )  )   171                if( isse t( $_GET[$ vField] )  )
172                    $sRe quest .= " &amp;{$vFi eld}=" . h tmlentitie s( process _pass_data ( $_GET[$v Field] ) ) ;   172                    $sRe quest .= " &amp;{$vFi eld}=" . h tmlentitie s( process _pass_data ( $_GET[$v Field] ) ) ;
173     173  
174           $s Pagination  = '<div s tyle="text -align: ce nter; posi tion: rela tive;">'._ t("_Result s per page ").':   174           $s Pagination  = '<div s tyle="text -align: ce nter; posi tion: rela tive;">'._ t("_Result s per page ").':
175                    <sel ect name=" per_page"  onchange=" window.loc ation=\''  . $sReques t . '&amp; per_page=\ ' + this.v alue;">   175                    <sel ect name=" per_page"  onchange=" window.loc ation=\''  . $sReques t . '&amp; per_page=\ ' + this.v alue;">
176                         <option va lue="10"'  . ( $iPerP age == 10  ? ' select ed="select ed"' : ''  ) . '>10</ option>   176                         <option va lue="10"'  . ( $iPerP age == 10  ? ' select ed="select ed"' : ''  ) . '>10</ option>
177                         <option va lue="20"'  . ( $iPerP age == 20  ? ' select ed="select ed"' : ''  ) . '>20</ option>   177                         <option va lue="20"'  . ( $iPerP age == 20  ? ' select ed="select ed"' : ''  ) . '>20</ option>
178                         <option va lue="50"'  . ( $iPerP age == 50  ? ' select ed="select ed"' : ''  ) . '>50</ option>   178                         <option va lue="50"'  . ( $iPerP age == 50  ? ' select ed="select ed"' : ''  ) . '>50</ option>
179                         <option va lue="100"'  . ( $iPer Page == 10 0 ? ' sele cted="sele cted"' : ' ' ) . '>10 0</option>   179                         <option va lue="100"'  . ( $iPer Page == 10 0 ? ' sele cted="sele cted"' : ' ' ) . '>10 0</option>
180                    </se lect></div >' .   180                    </se lect></div >' .
181                genPagin ation( $iT otalPages,  $iCurPage , ( $sRequ est . '&am p;page={pa ge}&amp;pe r_page='.$ iPerPage )  );   181                genPagin ation( $iT otalPages,  $iCurPage , ( $sRequ est . '&am p;page={pa ge}&amp;pe r_page='.$ iPerPage )  );
182       } else   182       } else
183           $s Pagination  = '';   183           $s Pagination  = '';
184       ////// ////////// ////////// /   184       ////// ////////// ////////// /
185     185  
186       return  $ret.$sPa gination;   186       return  $ret.$sPa gination;
187   }   187   }
188     188  
189   function g etUnapprov edFilesCnt ($sType, $ sStatus, $ iUser)   189   function g etUnapprov edFilesCnt ($sType, $ sStatus, $ iUser)
190   {   190   {
191       $ret =  '';   191       $ret =  '';
192       $sAdd   = "AND `m ed_status`  = '$sStat us'";   192       $sAdd   = "AND `m ed_status`  = '$sStat us'";
193       $sAdd  .= " AND ` med_type`  = '$sType' ";   193       $sAdd  .= " AND ` med_type`  = '$sType' ";
194       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";   194       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";
195          195       
196       $sQuer y = "   196       $sQuer y = "
197           SE LECT   197           SE LECT
198                   COUNT (`media`.` med_id`) a s `Cnt`   198                   COUNT (`media`.` med_id`) a s `Cnt`
199           FR OM `media`   199           FR OM `media`
200           LE FT JOIN `P rofiles` O N `Profile s`.`ID`=`m edia`.`med _prof_id`   200           LE FT JOIN `P rofiles` O N `Profile s`.`ID`=`m edia`.`med _prof_id`
201           WH ERE 1   201           WH ERE 1
202           $s Add   202           $s Add
203     203  
204           OR DER BY `me dia`.`med_ date`   204           OR DER BY `me dia`.`med_ date`
205       ";   205       ";
206     206  
207       $res =  db_value(  $sQuery ) ;   207       $res =  db_value(  $sQuery ) ;
208     208  
209       return  $res;   209       return  $res;
210   }   210   }
211     211  
212   function g etUnapprov edFilesArr ay($sType,  $sStatus,  $iUser, $ sqlLimit =  '')   212   function g etUnapprov edFilesArr ay($sType,  $sStatus,  $iUser, $ sqlLimit =  '')
213   {   213   {
214       $ret =  '';   214       $ret =  '';
215       $sAdd   = "AND `m ed_status`  = '$sStat us'";   215       $sAdd   = "AND `m ed_status`  = '$sStat us'";
216       $sAdd  .= " AND ` med_type`  = '$sType' ";   216       $sAdd  .= " AND ` med_type`  = '$sType' ";
217       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";   217       $sAdd  .= $iUser  != 0 ? " A ND `med_pr of_id`='$i User'" : " ";
218          218       
219       $sQuer y = "   219       $sQuer y = "
220           SE LECT   220           SE LECT
221                   `medi a`.`med_id ` as `medI D`,   221                   `medi a`.`med_id ` as `medI D`,
222                   `medi a`.`med_pr of_id` as  `medProfId `,   222                   `medi a`.`med_pr of_id` as  `medProfId `,
223                   `medi a`.`med_ty pe` as `me dType`,   223                   `medi a`.`med_ty pe` as `me dType`,
224                   `medi a`.`med_fi le` as `me dFile`,   224                   `medi a`.`med_fi le` as `me dFile`,
225                   `medi a`.`med_ti tle` as `m edTitle`,   225                   `medi a`.`med_ti tle` as `m edTitle`,
226                   UNIX_ TIMESTAMP( `media`.`m ed_date`)  as `medDat e`,   226                   UNIX_ TIMESTAMP( `media`.`m ed_date`)  as `medDat e`,
227                   `Prof iles`.`Nic kName`   227                   `Prof iles`.`Nic kName`
228           FR OM `media`   228           FR OM `media`
229           LE FT JOIN `P rofiles` O N `Profile s`.`ID`=`m edia`.`med _prof_id`   229           LE FT JOIN `P rofiles` O N `Profile s`.`ID`=`m edia`.`med _prof_id`
230           WH ERE 1   230           WH ERE 1
231           $s Add   231           $s Add
232        232     
233           OR DER BY `me dia`.`med_ date`   233           OR DER BY `me dia`.`med_ date`
234           {$ sqlLimit}   234           {$ sqlLimit}
235       ";   235       ";
236     236  
237       $res =  db_res( $ sQuery );   237       $res =  db_res( $ sQuery );
238       $ret =  fill_asso c_array( $ res );   238       $ret =  fill_asso c_array( $ res );
239       return  $ret;   239       return  $ret;
240   }   240   }
241     241  
242   function d eleteItem(  $iMedia )   242   function d eleteItem(  $iMedia )
243   {   243   {
244       global  $dir;   244       global  $dir;
245     245  
246       $aFile  = db_arr( "SELECT *  FROM `medi a` WHERE ` med_id`='$ iMedia'");   246       $aFile  = db_arr( "SELECT *  FROM `medi a` WHERE ` med_id`='$ iMedia'");
247          247       
248       $sIcon File = $di r['profile Image'] .  $aFile['me d_prof_id' ] . '/icon _' . $aFil e['med_fil e'];   248       $sIcon File = $di r['profile Image'] .  $aFile['me d_prof_id' ] . '/icon _' . $aFil e['med_fil e'];
249       $sThum bFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/thu mb_' . $aF ile['med_f ile'];   249       $sThum bFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/thu mb_' . $aF ile['med_f ile'];
250       $sPhot oFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/pho to_' . $aF ile['med_f ile'];   250       $sPhot oFile = $d ir['profil eImage'] .  $aFile['m ed_prof_id '] . '/pho to_' . $aF ile['med_f ile'];
251     251  
252       $sqlQu ery = "   252       $sqlQu ery = "
253       DELETE  FROM `med ia` WHERE  `med_id` =  '$iMedia' ;   253       DELETE  FROM `med ia` WHERE  `med_id` =  '$iMedia' ;
254       ";   254       ";
255     255  
256       $res =  db_res( $ sqlQuery ) ;   256       $res =  db_res( $ sqlQuery ) ;
257     257  
258       // del ete voting s   258       // del ete voting s
259       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );   259       requir e_once( BX _DIRECTORY _PATH_CLAS SES . 'BxD olVoting.p hp' );
260       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );   260       $oVoti ngMedia =  new BxDolV oting ('me dia', 0, 0 );
261       $oVoti ngMedia->d eleteVotin gs ($aMedi a['med_id' ]);   261       $oVoti ngMedia->d eleteVotin gs ($aMedi a['med_id' ]);
262     262  
263       @unlin k( $sIconF ile );   263       @unlin k( $sIconF ile );
264       @unlin k( $sThumb File );   264       @unlin k( $sThumb File );
265       @unlin k( $sPhoto File );   265       @unlin k( $sPhoto File );
266     266  
267       return  $res;   267       return  $res;
268   }   268   }
269     269  
270   function a pproveItem ( $iMedia  )   270   function a pproveItem ( $iMedia  )
271   {   271   {
272       $sQuer y = "   272       $sQuer y = "
273           UP DATE `medi a`   273           UP DATE `medi a`
274           SE T   274           SE T
275                `med_sta tus` = 'ac tive'   275                `med_sta tus` = 'ac tive'
276           WH ERE `med_i d` = '$iMe dia'   276           WH ERE `med_i d` = '$iMe dia'
277       ";   277       ";
278     278  
279       return  db_res( $ sQuery );   279       return  db_res( $ sQuery );
280   }   280   }
281     281  
282   function a pproveAllI tems()   282   function a pproveAllI tems()
283   {   283   {
284       $sQuer y = "   284       $sQuer y = "
285           UP DATE `medi a`   285           UP DATE `medi a`
286           SE T   286           SE T
287                `med_sta tus` = 'ac tive'   287                `med_sta tus` = 'ac tive'
288       ";   288       ";
289     289  
290       return  db_res( $ sQuery );   290       return  db_res( $ sQuery );
291   }   291   }
292     292  
293     293  
294   ?>   294   ?>