48. File Comparison Report

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

48.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\admin manage_classifieds.php Thu Jan 31 09:17:20 2008 UTC
2 Dolphin-v.6.1.0\admin manage_classifieds.php Sat Apr 19 12:05:02 2008 UTC

48.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 14 818
Changed 6 12
Inserted 5 7
Removed 2 6

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

48.4 Active regular expressions

No regular expressions were active.

48.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) 2007 Bo onEx Group   7   *     copy right             : ( C) 2007 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; yo u can redi stribute i t and/or m odify it u nder   11   * Dolphin  is free so ftware; yo u can redi stribute i t and/or m odify it u nder
12   * the term s of the G NU General  Public Li cense as p ublished b y the   12   * the term s of the G NU General  Public Li cense as p ublished b y the
13   * Free Sof tware Foun dation; ei ther versi on 2 of th e   13   * Free Sof tware Foun dation; ei ther versi on 2 of th e
14   * License,  or  any l ater versi on.   14   * License,  or  any l ater versi on.
15   *   15   *
16   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   16   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
17   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   17   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
18   * See the  GNU Genera l Public L icense for  more deta ils.   18   * See the  GNU Genera l Public L icense for  more deta ils.
19   * You shou ld have re ceived a c opy of the  GNU Gener al Public  License al ong with D olphin,   19   * You shou ld have re ceived a c opy of the  GNU Gener al Public  License al ong with D olphin,
20   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   20   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
21   ********** ********** ********** ********** ********** ********** ********** *****/   21   ********** ********** ********** ********** ********** ********** ********** *****/
22     22  
23   require_on ce( '../in c/header.i nc.php' );   23   require_on ce( '../in c/header.i nc.php' );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' );
27     27  
28   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );   28   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolCl assifieds. php' );
29     29  
30   $logged['a dmin']   =   member_aut h(   1  
);
  30   $logged['a dmin']   =   member_aut h(   1 ,   true,   true   );
31   $_page['he ader'] = _ t('_Manage  classifie ds');   31   $_page['he ader'] = _ t('_Manage  classifie ds');
32     32  
33   $path = "{ $dir['root ']}templat es/tmpl_{$ tmpl}/css/ ";   33   $path = "{ $dir['root ']}templat es/tmpl_{$ tmpl}/css/ ";
34   $cssPath =  "../../te mplates/tm pl_{$tmpl} /css/";   34   $cssPath =  "../../te mplates/tm pl_{$tmpl} /css/";
35   $_page['cs s_name'] =  $cssPath  . "classif ieds_view. css";   35   $_page['cs s_name'] =  $cssPath  . "classif ieds_view. css";
36     36  
37   TopCodeAdm in();   37   TopCodeAdm in();
38   ContentBlo ckHead('') ;   38   ContentBlo ckHead('') ;
39     39  
    40  
40   Main();   41   Main();
41     42  
42       /**   43       /**
43        * Gen erating Ma in page co de   44        * Gen erating Ma in page co de
44        *   45        *
45        * @re turn ALL p resentatio n of data   46        * @re turn ALL p resentatio n of data
46        */   47        */
47       functi on Main()  {   48       functi on Main()  {
48           $o Classified s = new Bx DolClassif ieds();   49           $o Classified s = new Bx DolClassif ieds();
49            $oClassifi eds   ->   sCurrBrows edFile   =   $_SERVER[ ' PHP _ SELF ' ] ;   50            $oClassifi eds   ->   sCurrBrows edFile   =  
' manage _ classified s.php '
;
50           $o Classified s -> bAdmi nMode = TR UE;   51           $o Classified s -> bAdmi nMode = TR UE;
51     52  
52           pr int $oClas sifieds ->  PrintComm andForms() ;   53           pr int $oClas sifieds ->  PrintComm andForms() ;
53     54  
54           if  ($_REQUES T) {   55           if  ($_REQUES T) {
55                if (isse t($_REQUES T['action' ])) {   56                if (isse t($_REQUES T['action' ])) {
56                    if ( (int)$_REQ UEST['acti on']==3) {   57                    if ( (int)$_REQ UEST['acti on']==3) {
57                         print $oCl assifieds  -> PrintFi lterForm() ;   58                         print $oCl assifieds  -> PrintFi lterForm() ;
58                         print $oCl assifieds  -> PrintFi lteredAllA dvertiseme nts();   59                         print $oCl assifieds  -> PrintFi lteredAllA dvertiseme nts();
59                         ContentBlo ckFoot();   60                         ContentBlo ckFoot();
60                         BottomCode ();   61                         BottomCode ();
61                         return;   62                         return;
62                    }   63                    }
63                    else if ((int)$ _REQUEST[' action']== 2) {   64                    else if ((int)$ _REQUEST[' action']== 2) {
64                         $iClassifi edSubID =  (int)$_REQ UEST['Filt erSubCat'] ;   65                         $iClassifi edSubID =  (int)$_REQ UEST['Filt erSubCat'] ;
65                         print $oCl assifieds  -> PrintSu bRecords($ iClassifie dSubID, TR UE);   66                         print $oCl assifieds  -> PrintSu bRecords($ iClassifie dSubID, TR UE);
66                         ContentBlo ckFoot();   67                         ContentBlo ckFoot();
67                         BottomCode ();   68                         BottomCode ();
68                         return;   69                         return;
69                    }   70                    }
70                    else if ((int)$ _REQUEST[' action']== 1) {   71                    else if ((int)$ _REQUEST[' action']== 1) {
71                         $iClassifi edID = (in t)$_REQUES T['FilterC at'];   72                         $iClassifi edID = (in t)$_REQUES T['FilterC at'];
72                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);   73                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);
73                         ContentBlo ckFoot();   74                         ContentBlo ckFoot();
74                         BottomCode ();   75                         BottomCode ();
75                         return;   76                         return;
76                    }   77                    }
77                }   78                }
78                elseif ( isset($_GE T['bClassi fiedID']))  {   79                elseif ( isset($_GE T['bClassi fiedID']))  {
79                    $iCl assifiedID  = (int)$_ GET['bClas sifiedID'] ;   80                    $iCl assifiedID  = (int)$_ GET['bClas sifiedID'] ;
80                    if ( $iClassifi edID > 0)  {   81                    if ( $iClassifi edID > 0)  {
81                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);   82                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);
82                         print $oCl assifieds  -> PrintBa ckLink();   83                         print $oCl assifieds  -> PrintBa ckLink();
83                         ContentBlo ckFoot();   84                         ContentBlo ckFoot();
84                         BottomCode ();   85                         BottomCode ();
85                         return;   86                         return;
86                    }   87                    }
87                }   88                }
88                elseif ( isset($_GE T['bSubCla ssifiedID' ])) {   89                elseif ( isset($_GE T['bSubCla ssifiedID' ])) {
89                    $iSu bClassifie dID = (int )$_GET['bS ubClassifi edID'];   90                    $iSu bClassifie dID = (int )$_GET['bS ubClassifi edID'];
90                    if ( $iSubClass ifiedID >  0) {   91                    if ( $iSubClass ifiedID >  0) {
91                         print $oCl assifieds  -> PrintSu bRecords($ iSubClassi fiedID, TR UE);   92                         print $oCl assifieds  -> PrintSu bRecords($ iSubClassi fiedID, TR UE);
92                         print $oCl assifieds  -> PrintBa ckLink();   93                         print $oCl assifieds  -> PrintBa ckLink();
93                         ContentBlo ckFoot();   94                         ContentBlo ckFoot();
94                         BottomCode ();   95                         BottomCode ();
95                         return;   96                         return;
96                    }   97                    }
97                }   98                }
98                elseif ( isset($_RE QUEST['iAc tion'])) {   99                elseif ( isset($_RE QUEST['iAc tion'])) {
99                    $sAd dMainCatSu ccC = MsgB ox(_t('_Ad dMainCateg ory succes sfully add ed'));   100                    $sAd dMainCatSu ccC = MsgB ox(_t('_Ad dMainCateg ory succes sfully add ed'));
100                    $sAd dMainCatFa ilC = MsgB ox(_t('_Fa iled to In sert AddMa inCategory '));   101                    $sAd dMainCatFa ilC = MsgB ox(_t('_Fa iled to In sert AddMa inCategory '));
101                    $sAd dSubCatSuc cC = MsgBo x(_t('_Add SubCategor y successf ully added '));   102                    $sAd dSubCatSuc cC = MsgBo x(_t('_Add SubCategor y successf ully added '));
102                    $sAd dSubCatFai lC = MsgBo x(_t('_Fai led to Ins ert AddSub Category') );   103                    $sAd dSubCatFai lC = MsgBo x(_t('_Fai led to Ins ert AddSub Category') );
103                    $sDe lMainCatSu ccC = MsgB ox(_t('_De leteMainCa tegory was  successfu lly'));   104                    $sDe lMainCatSu ccC = MsgB ox(_t('_De leteMainCa tegory was  successfu lly'));
104                    $sDe lMainCatFa ilC = MsgB ox(_t('_Fa iled to De leteMainCa tegory'));   105                    $sDe lMainCatFa ilC = MsgB ox(_t('_Fa iled to De leteMainCa tegory'));
105                    $sDe lSubCatSuc cC = MsgBo x(_t('_Del eteSubCate gory was s uccessfull y'));   106                    $sDe lSubCatSuc cC = MsgBo x(_t('_Del eteSubCate gory was s uccessfull y'));
106                    $sDe lSubCatFai lC = MsgBo x(_t('_Fai led to Del eteSubCate gory'));   107                    $sDe lSubCatFai lC = MsgBo x(_t('_Fai led to Del eteSubCate gory'));
107     108  
108                    swit ch( $_REQU EST['iActi on'] ) {   109                    swit ch( $_REQU EST['iActi on'] ) {
109                         case 'AddM ainCategor y':   110                         case 'AddM ainCategor y':
110                             $sName  = process _db_input(  $_REQUEST ['name1']  );   111                             $sName  = process _db_input(  $_REQUEST ['name1']  );
111                             $sDesc ription =  process_db _input( $_ REQUEST['d escription 1'] );   112                             $sDesc ription =  process_db _input( $_ REQUEST['d escription 1'] );
112                             $sCust omName1 =  process_db _input( $_ REQUEST['C ustomName1 '] );   113                             $sCust omName1 =  process_db _input( $_ REQUEST['C ustomName1 '] );
113                             $sCust omName2 =  process_db _input( $_ REQUEST['C ustomName2 '] );   114                             $sCust omName2 =  process_db _input( $_ REQUEST['C ustomName2 '] );
114                             $sCust omAction1  = process_ db_input(  $_REQUEST[ 'CustomAct ion1'] );   115                             $sCust omAction1  = process_ db_input(  $_REQUEST[ 'CustomAct ion1'] );
115                             $sCust omAction2  = process_ db_input(  $_REQUEST[ 'CustomAct ion2'] );   116                             $sCust omAction2  = process_ db_input(  $_REQUEST[ 'CustomAct ion2'] );
116                             if ($s Name=='')  {   117                             if ($s Name=='')  {
117                                 pr int $sAddM ainCatFail C;   118                                 pr int $sAddM ainCatFail C;
118                                 br eak;   119                                 br eak;
119                             }   120                             }
120                             $sqlRe s = Insert C($sName,  $sDescript ion, $sCus tomName1,  $sCustomNa me2, $sCus tomAction1 , $sCustom Action2);   121                             $sqlRe s = Insert C($sName,  $sDescript ion, $sCus tomName1,  $sCustomNa me2, $sCus tomAction1 , $sCustom Action2);
121                             print  (mysql_aff ected_rows ()!=0) ? $ sAddMainCa tSuccC : $ sAddMainCa tFailC;   122                             print  (mysql_aff ected_rows ()!=0) ? $ sAddMainCa tSuccC : $ sAddMainCa tFailC;
122                             break;   123                             break;
123                         case 'AddS ubCategory ':   124                         case 'AddS ubCategory ':
124                             if (($ _REQUEST[' FilterCat' ]) AND (is set($_REQU EST['name2 ']))) {   125                             if (($ _REQUEST[' FilterCat' ]) AND (is set($_REQU EST['name2 ']))) {
125                                 $s Name = pro cess_db_in put( $_REQ UEST['name 2'] );   126                                 $s Name = pro cess_db_in put( $_REQ UEST['name 2'] );
126                                 $s Descriptio n = proces s_db_input ( $_REQUES T['descrip tion2'] );   127                                 $s Descriptio n = proces s_db_input ( $_REQUES T['descrip tion2'] );
127                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );   128                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );
128                                 if  ((int)$sC ategoryID  < 1) {   129                                 if  ((int)$sC ategoryID  < 1) {
129                                      print $s AddSubCatF ailC; brea k;   130                                      print $s AddSubCatF ailC; brea k;
130                                 }   131                                 }
131                                 $s qlRes = In sertCS($sC ategoryID,  $sName, $ sDescripti on);   132                                 $s qlRes = In sertCS($sC ategoryID,  $sName, $ sDescripti on);
132                                 pr int (mysql _affected_ rows()!=0)  ? $sAddSu bCatSuccC  : $sAddSub CatFailC;   133                                 pr int (mysql _affected_ rows()!=0)  ? $sAddSu bCatSuccC  : $sAddSub CatFailC;
133                             }   134                             }
134                         break;   135                         break;
135                         case 'Dele teMainCate gory':   136                         case 'Dele teMainCate gory':
136                             if ($_ REQUEST['F ilterCat'] ) {   137                             if ($_ REQUEST['F ilterCat'] ) {
137                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );   138                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );
138                                 $q uery = "DE LETE FROM  `Classifie ds` WHERE  `ID` = '{$ sCategoryI D}'";   139                                 $q uery = "DE LETE FROM  `Classifie ds` WHERE  `ID` = '{$ sCategoryI D}'";
139                                 $s qlRes = db _res( $que ry );   140                                 $s qlRes = db _res( $que ry );
140                                 pr int (mysql _affected_ rows()!=0)  ? $sDelMa inCatSuccC  : $sDelMa inCatFailC ;   141                                 pr int (mysql _affected_ rows()!=0)  ? $sDelMa inCatSuccC  : $sDelMa inCatFailC ;
141                             }   142                             }
142                         break;   143                         break;
143                         case 'Dele teSubCateg ory':   144                         case 'Dele teSubCateg ory':
144                             if ($_ REQUEST['S ubClassifi ed']) {   145                             if ($_ REQUEST['S ubClassifi ed']) {
145                                 $s CategoryID  = process _db_input(  $_REQUEST ['SubClass ified'] );   146                                 $s CategoryID  = process _db_input(  $_REQUEST ['SubClass ified'] );
146                                 $q uery = "DE LETE FROM  `Classifie dsSubs` WH ERE `Class ifiedsSubs `.`ID` = { $sCategory ID}";   147                                 $q uery = "DE LETE FROM  `Classifie dsSubs` WH ERE `Class ifiedsSubs `.`ID` = { $sCategory ID}";
147                                 $s qlRes = db _res( $que ry );   148                                 $s qlRes = db _res( $que ry );
148                                 pr int (mysql _affected_ rows()!=0)  ? $sDelSu bCatSuccC  : $sDelSub CatFailC;   149                                 pr int (mysql _affected_ rows()!=0)  ? $sDelSu bCatSuccC  : $sDelSub CatFailC;
149                             }   150                             }
150                         break;   151                         break;
151                    }   152                    }
152                }   153                }
153                elseif ( isset($_RE QUEST['Del eteAdverti sementID'] )) {   154                elseif ( isset($_RE QUEST['Del eteAdverti sementID'] )) {
154                    $id  = (int)$_R EQUEST['De leteAdvert isementID' ];   155                    $id  = (int)$_R EQUEST['De leteAdvert isementID' ];
155                    if ( $id > 0) {   156                    if ( $id > 0) {
156                         print Acti onDeleteAd vertisemen t($id);   157                         print Acti onDeleteAd vertisemen t($id);
157                    }   158                    }
158                }   159                }
159                elseif ( isset($_RE QUEST['Act ivateAdver tisementID '])) {   160                elseif ( isset($_RE QUEST['Act ivateAdver tisementID '])) {
160                    $id  = (int)$_R EQUEST['Ac tivateAdve rtisementI D'];   161                    $id  = (int)$_R EQUEST['Ac tivateAdve rtisementI D'];
161                    if ( $id > 0) {   162                    if ( $id > 0) {
162                         print Acti onActivate Advertisem ent($id);   163                         print Acti onActivate Advertisem ent($id);
163                    }   164                    }
164                }   165                }
165                elseif ( isset($_RE QUEST['Act ivateAdvWh olesale']) ) {   166                elseif ( isset($_RE QUEST['Act ivateAdvWh olesale']) ) {
166                    prin t UpdateAl lNewAdvInt oActive();   167                    prin t UpdateAl lNewAdvInt oActive();
167                }   168                }
168                elseif ( isset($_RE QUEST['Del eteSelecte d'])) {   169                elseif ( isset($_RE QUEST['Del eteSelecte d'])) {
169                    prin t DeleteSe lectedAdv( );   170                    prin t DeleteSe lectedAdv( );
170                }   171                }
171                elseif ( isset($_RE QUEST['App roveSelect ed'])) {   172                elseif ( isset($_RE QUEST['App roveSelect ed'])) {
172                    prin t ApproveS electedAdv ();   173                    prin t ApproveS electedAdv ();
173                }   174                }
174                if (isse t($_REQUES T['Updated Advertisem entID']))  {   175                if (isse t($_REQUES T['Updated Advertisem entID']))  {
175                    $id  = (int)$_R EQUEST['Up datedAdver tisementID '];   176                    $id  = (int)$_R EQUEST['Up datedAdver tisementID '];
176                    if ( $id > 0) {   177                    if ( $id > 0) {
177                         if (isset( $_REQUEST[ 'DeletedPi ctureID'])  && (int)$ _REQUEST[' DeletedPic tureID']>0 ) {   178                         if (isset( $_REQUEST[ 'DeletedPi ctureID'])  && (int)$ _REQUEST[' DeletedPic tureID']>0 ) {
178                             //dele te a pic   179                             //dele te a pic
179                             print  $oClassifi eds->Actio nDeletePic ture();   180                             print  $oClassifi eds->Actio nDeletePic ture();
180                             print  $oClassifi eds->Print EditForm($ id);   181                             print  $oClassifi eds->Print EditForm($ id);
181                             //brea k;    
182                         } else {   182                         } else {
183                             print  $oClassifi eds->Actio nUpdateAdv ertisement ID($id);   183                             print  $oClassifi eds->Actio nUpdateAdv ertisement ID($id);
184                         }   184                         }
185                    }   185                    }
186                    retu rn;   186                    retu rn;
187                }   187                }
188                elseif ( isset($_RE QUEST['Edi tAdvertise mentID']))  {   188                elseif ( isset($_RE QUEST['Edi tAdvertise mentID']))  {
189                    if ( ((int)$_RE QUEST['Edi tAdvertise mentID'])  > 0) {   189                    if ( ((int)$_RE QUEST['Edi tAdvertise mentID'])  > 0) {
190                         print $oCl assifieds  -> PrintEd itForm((in t)$_REQUES T['EditAdv ertisement ID']);   190                         print $oCl assifieds  -> PrintEd itForm((in t)$_REQUES T['EditAdv ertisement ID']);
191                         print $oCl assifieds  -> PrintBa ckLink();   191                         print $oCl assifieds  -> PrintBa ckLink();
192                         ContentBlo ckFoot();   192                         ContentBlo ckFoot();
193                         BottomCode ();   193                         BottomCode ();
194                         return;   194                         return;
195                    }   195                    }
196                }   196                }
197                elseif ( isset($_RE QUEST['Sho wAdvertise mentID']))  {   197                elseif ( isset($_RE QUEST['Sho wAdvertise mentID']))  {
198                    if ( $_REQUEST[ 'ShowAdver tisementID '] > 0) {   198                    if ( $_REQUEST[ 'ShowAdver tisementID '] > 0) {
199                         print $oCl assifieds  -> ActionP rintAdvert isement($_ REQUEST['S howAdverti sementID'] );   199                         print $oCl assifieds  -> ActionP rintAdvert isement($_ REQUEST['S howAdverti sementID'] );
200                         print $oCl assifieds  -> PrintBa ckLink();   200                         print $oCl assifieds  -> PrintBa ckLink();
201                         ContentBlo ckFoot();   201                         ContentBlo ckFoot();
202                         BottomCode ();   202                         BottomCode ();
203                         return;   203                         return;
204                    }   204                    }
205                }   205                }
206                elseif ( isset($_RE QUEST['Buy Now'])) {   206                elseif ( isset($_RE QUEST['Buy Now'])) {
207                    $adv Id = (int) $_REQUEST[ 'IDAdv'];   207                    $adv Id = (int) $_REQUEST[ 'IDAdv'];
208                    if ( $advId > 0 ) {   208                    if ( $advId > 0 ) {
209                         print $oCl assifieds  -> ActionB uyAdvertis ement($adv Id);   209                         print $oCl assifieds  -> ActionB uyAdvertis ement($adv Id);
210                         ContentBlo ckFoot();   210                         ContentBlo ckFoot();
211                         BottomCode ();   211                         BottomCode ();
212                         return;   212                         return;
213                    }   213                    }
214                }   214                }
215                elseif ( isset($_RE QUEST['Buy SendNow']) ) {   215                elseif ( isset($_RE QUEST['Buy SendNow']) ) {
216                    $adv Id = (int) $_REQUEST[ 'IDAdv'];   216                    $adv Id = (int) $_REQUEST[ 'IDAdv'];
217                    if ( $advId > 0 ) {   217                    if ( $advId > 0 ) {
218                         print $oCl assifieds  -> ActionB uySendMail Advertisem ent($advId );   218                         print $oCl assifieds  -> ActionB uySendMail Advertisem ent($advId );
219                         ContentBlo ckFoot();   219                         ContentBlo ckFoot();
220                         BottomCode ();   220                         BottomCode ();
221                         return;   221                         return;
222                    }   222                    }
223                }   223                }
224                
elseif   (isset($_R EQUEST['po stCommentA dv']))   {
  224                 /* elseif   (isset($_R EQUEST['po stCommentA dv']))   {
225                    $adv Id = (int) $_REQUEST[ 'CommAdver tisementID '];   225                    $adv Id = (int) $_REQUEST[ 'CommAdver tisementID '];
226                    if ( $advId > 0 ) {   226                    if ( $advId > 0 ) {
227                         print $oCl assifieds  -> ActionP ostCommAdv ertisement ($advId);   227                         print $oCl assifieds  -> ActionP ostCommAdv ertisement ($advId);
228                         print $oCl assifieds  -> PrintBa ckLink2Adv ($advId);   228                         print $oCl assifieds  -> PrintBa ckLink2Adv ($advId);
229                         print $oCl assifieds  -> ActionP rintAdvert isement($a dvId);   229                         print $oCl assifieds  -> ActionP rintAdvert isement($a dvId);
230                         return;   230                         return;
231                    }   231                    }
232                 }
  232                 } */
233                elseif ( isset($_RE QUEST['Use rsOtherLis ting'])) {   233                elseif ( isset($_RE QUEST['Use rsOtherLis ting'])) {
234                    $iPr ofileID =  (int)$_REQ UEST['IDPr ofile'];   234                    $iPr ofileID =  (int)$_REQ UEST['IDPr ofile'];
235                    if ( $iProfileI D > -1) {   235                    if ( $iProfileI D > -1) {
236                         print $oCl assifieds  -> PrintMy Ads($iProf ileID);   236                         print $oCl assifieds  -> PrintMy Ads($iProf ileID);
237                         ContentBlo ckFoot();   237                         ContentBlo ckFoot();
238                         BottomCode ();   238                         BottomCode ();
239                         return;   239                         return;
240                    }   240                    }
241                }   241                }
242                
elseif   (isset($_R EQUEST['Ed itCommentI D']))   {
  242                 /* elseif   (isset($_R EQUEST['Ed itCommentI D']))   {
243                    $iCo mmId = (in t)$_REQUES T['EditCom mentID'];   243                    $iCo mmId = (in t)$_REQUES T['EditCom mentID'];
244                    if ( $iCommId >  0) {   244                    if ( $iCommId >  0) {
245                         // $sMessa ge = addsl ashes( cle ar_xss( pr ocess_pass _data( $_R EQUEST['me ssage'] )  ) );    
246                         // $sMessa ge = str_r eplace( "\ r\n", "<br >", $sMess age );    
247                         // $query  = "UPDATE  `ClsAdvCom ments` SET  `Message`  = '{$sMes sage}' WHE RE `ClsAdv Comments`. `ID` = {$i CommId} LI MIT 1 ;";    
248                         // $sqlRes  = db_res(  $query );    
249                         // $advId  = (int)$_R EQUEST['EA dvID'];    
250                         print $oCl assifieds- >ActionEdi tComment() ;   245                         print $oCl assifieds- >ActionEdi tComment() ;
251                         print $oCl assifieds- >ActionPri ntAdvertis ement($_RE QUEST['EAd vID']);   246                         print $oCl assifieds- >ActionPri ntAdvertis ement($_RE QUEST['EAd vID']);
252                         return;   247                         return;
253                    }   248                    }
254                }   249                }
255                elseif ( isset($_RE QUEST['Del eteComment ID'])) {   250                elseif ( isset($_RE QUEST['Del eteComment ID'])) {
256                    $iCo mmId = (in t)$_REQUES T['DeleteC ommentID'] ;   251                    $iCo mmId = (in t)$_REQUES T['DeleteC ommentID'] ;
257                    if ( $iCommId >  0) {   252                    if ( $iCommId >  0) {
258                         print $oCl assifieds- >ActionDel eteComment ();   253                         print $oCl assifieds- >ActionDel eteComment ();
259                         print $oCl assifieds- >ActionPri ntAdvertis ement($_RE QUEST['DAd vID']);   254                         print $oCl assifieds- >ActionPri ntAdvertis ement($_RE QUEST['DAd vID']);
260                         return;   255                         return;
261                    }   256                    }
262                 }
  257                 } */
263           }   258           }
264           pr int $oClas sifieds ->  PrintMana geClassifi edsForm();   259           pr int $oClas sifieds ->  PrintMana geClassifi edsForm();
265     260  
266           $s Cap1C = _t ("_TREE_C_ BRW");   261           $s Cap1C = _t ("_TREE_C_ BRW");
267           $s Cap2C = _t ("_MODERAT ING");   262           $s Cap2C = _t ("_MODERAT ING");
268     263  
269           pr int "<h2>{ $sCap1C}</ h2>";   264           pr int "<h2>{ $sCap1C}</ h2>";
270           pr int $oClas sifieds ->  PrintTree Classified sBrowse();   265           pr int $oClas sifieds ->  PrintTree Classified sBrowse();
271     266  
272           $s Act = _t(" _Activate" );   267           $s Act = _t(" _Activate" );
273           $s Whol = _t( "_wholesal e");   268           $s Whol = _t( "_wholesal e");
274           $s ActivateAd vWholesale  = "<a hre f=\"{$_SER VER['PHP_S ELF']}?Act ivateAdvWh olesale=1\ ">{$sAct}  {$sWhol}</ a>";   269           $s ActivateAd vWholesale  = "<a hre f=\"{$_SER VER['PHP_S ELF']}?Act ivateAdvWh olesale=1\ ">{$sAct}  {$sWhol}</ a>";
275           pr int "<h2>{ $sCap2C} ( {$sActivat eAdvWholes ale})</h2> ";   270           pr int "<h2>{ $sCap2C} ( {$sActivat eAdvWholes ale})</h2> ";
276     271  
277           pr int $oClas sifieds ->  PrintMode ratingTabl e();   272           pr int $oClas sifieds ->  PrintMode ratingTabl e();
278           pr int '<div  style="cle ar: both;" ></div>';   273           pr int '<div  style="cle ar: both;" ></div>';
279           re turn;   274           re turn;
280       }   275       }
281     276  
282       Conten tBlockFoot ();   277       Conten tBlockFoot ();
283       Bottom Code();   278       Bottom Code();
284     279  
285       /**   280       /**
286        * SQL  deteting  of Adverti sement   281        * SQL  deteting  of Adverti sement
287        *   282        *
288         * @p aram $id   ID`s of de leting Adv ertisement   283         * @p aram $id   ID`s of de leting Adv ertisement
289        * @re turn Text  presentati on of data   284        * @re turn Text  presentati on of data
290        */   285        */
291       functi on ActionD eleteAdver tisement($ id) {   286       functi on ActionD eleteAdver tisement($ id) {
292           $r et = '';   287           $r et = '';
293           $s SuccDel =  _t("_SUCC_ DEL_ADV");   288           $s SuccDel =  _t("_SUCC_ DEL_ADV");
294           $s FailDel =  _t("_FAIL_ DEL_ADV");   289           $s FailDel =  _t("_FAIL_ DEL_ADV");
295           $i DeleteAdve rtisementI D = (int)$ id;   290           $i DeleteAdve rtisementI D = (int)$ id;
296           $q uery = "DE LETE FROM  `Classifie dsAdvertis ements` WH ERE `ID` =  {$iDelete Advertisem entID} LIM IT 1";   291           $q uery = "DE LETE FROM  `Classifie dsAdvertis ements` WH ERE `ID` =  {$iDelete Advertisem entID} LIM IT 1";
297           $s qlRes = db _res( $que ry );   292           $s qlRes = db _res( $que ry );
298           re parseObjTa gs( 'ad',  $iDeleteAd vertisemen tID );   293           re parseObjTa gs( 'ad',  $iDeleteAd vertisemen tID );
299           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccDel) :  _t($sFail Del);   294           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccDel) :  _t($sFail Del);
300           re turn MsgBo x($ret);   295           re turn MsgBo x($ret);
301       }   296       }
302     297  
303       /**   298       /**
304        * SQL  activatin g of Adver tisement   299        * SQL  activatin g of Adver tisement
305        *   300        *
306         * @p aram $id   ID`s of ac tivating A dvertiseme nt   301         * @p aram $id   ID`s of ac tivating A dvertiseme nt
307        * @re turn Text  presentati on of data   302        * @re turn Text  presentati on of data
308        */   303        */
309       functi on ActionA ctivateAdv ertisement ($id) {   304       functi on ActionA ctivateAdv ertisement ($id) {
310           $r et = '';   305           $r et = '';
311           $s SuccAct =  _t("_SUCC_ ACT_ADV");   306           $s SuccAct =  _t("_SUCC_ ACT_ADV");
312           $s FailAct =  _t("_FAIL_ ACT_ADV");   307           $s FailAct =  _t("_FAIL_ ACT_ADV");
313           $i ActivateAd vertisemen tID = (int )$id;   308           $i ActivateAd vertisemen tID = (int )$id;
314           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Classi fiedsAdver tisements` .`ID` = {$ iActivateA dvertiseme ntID} LIMI T 1 ;";   309           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Classi fiedsAdver tisements` .`ID` = {$ iActivateA dvertiseme ntID} LIMI T 1 ;";
315           $s qlRes = db _res( $que ry );   310           $s qlRes = db _res( $que ry );
316           re parseObjTa gs( 'ad',  $iActivate Advertisem entID );   311           re parseObjTa gs( 'ad',  $iActivate Advertisem entID );
317           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccAct) :  _t($sFail Act);   312           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccAct) :  _t($sFail Act);
318           re turn MsgBo x($ret);   313           re turn MsgBo x($ret);
319       }   314       }
320     315  
321       /*   316       /*
322       *safe  SQL functi ons   317       *safe  SQL functi ons
323       */   318       */
324     319  
325       /**   320       /**
326        * SQL  Inserting  new Class ifieds   321        * SQL  Inserting  new Class ifieds
327        *   322        *
328         * @p aram $sNam e       Ad ded Name F Ield value   323         * @p aram $sNam e       Ad ded Name F Ield value
329         * @p aram $sDes cription     Added De scription  FIeld valu e   324         * @p aram $sDes cription     Added De scription  FIeld valu e
330         * @p aram $sCus tomName1     Added Cu stomName1  FIeld valu e   325         * @p aram $sCus tomName1     Added Cu stomName1  FIeld valu e
331         * @p aram $sCus tomName2     Added Cu stomName1  FIeld valu e   326         * @p aram $sCus tomName2     Added Cu stomName1  FIeld valu e
332         * @p aram $Cust omAction1    Added Cu stomAction 1 FIeld va lue   327         * @p aram $Cust omAction1    Added Cu stomAction 1 FIeld va lue
333         * @p aram $Cust omAction2    Added Cu stomAction 2 FIeld va lue   328         * @p aram $Cust omAction2    Added Cu stomAction 2 FIeld va lue
334        * @re turn SQL r esult   329        * @re turn SQL r esult
335        */   330        */
336       functi on InsertC ($sName, $ sDescripti on, $sCust omName1, $ sCustomNam e2, $sCust omAction1,  $sCustomA ction2) {   331       functi on InsertC ($sName, $ sDescripti on, $sCust omName1, $ sCustomNam e2, $sCust omAction1,  $sCustomA ction2) {
    332           $s NewUri = u riGenerate ($sName, ' Classified s', 'CEntr yUri', 64) ;
    333  
337           $q uery = "IN SERT INTO  `Classifie ds` SET   334           $q uery = "IN SERT INTO  `Classifie ds` SET
338                         `Name`='{$ sName}',   335                         `Name`='{$ sName}',
    336                         `CEntryUri `='{$sNewU ri}',
339                         `Descripti on`='{$sDe scription} '"   337                         `Descripti on`='{$sDe scription} '"
340                          .(($sCust omName1)?" , `CustomF ieldName1` ='{$sCusto mName1}'": "")   338                          .(($sCust omName1)?" , `CustomF ieldName1` ='{$sCusto mName1}'": "")
341                          .(($sCust omName2)?" , `CustomF ieldName2` ='{$sCusto mName2}'": "")   339                          .(($sCust omName2)?" , `CustomF ieldName2` ='{$sCusto mName2}'": "")
342                          .(($sCust omAction1) ?", `Custo mAction1`= '{$sCustom Action1}'" :"")   340                          .(($sCust omAction1) ?", `Custo mAction1`= '{$sCustom Action1}'" :"")
343                          .(($sCust omAction2) ?", `Custo mAction2`= '{$sCustom Action2}'" :"");   341                          .(($sCust omAction2) ?", `Custo mAction2`= '{$sCustom Action2}'" :"");
344           $s qlRes = db _res( $que ry );   342           $s qlRes = db _res( $que ry );
345           re turn $sqlR es;   343           re turn $sqlR es;
346       }   344       }
347     345  
348       /**   346       /**
349        * SQL  Inserting  new SubCl assifieds   347        * SQL  Inserting  new SubCl assifieds
350        *   348        *
351        * @pa ram $sCate goryID  Ad ded Catego ryID FIeld  value   349        * @pa ram $sCate goryID  Ad ded Catego ryID FIeld  value
352         * @p aram $sNam e       Ad ded Name F Ield value   350         * @p aram $sNam e       Ad ded Name F Ield value
353         * @p aram $sDes cription     Added De scription  FIeld valu e   351         * @p aram $sDes cription     Added De scription  FIeld valu e
354        * @re turn SQL r esult   352        * @re turn SQL r esult
355        */   353        */
356       functi on InsertC S($sCatego ryID, $sNa me, $sDesc ription) {   354       functi on InsertC S($sCatego ryID, $sNa me, $sDesc ription) {
    355           $s NewUri = u riGenerate ($sName, ' Classified sSubs', 'S EntryUri',  128);
    356  
357           $q uery = "IN SERT INTO  `Classifie dsSubs` SE T   357           $q uery = "IN SERT INTO  `Classifie dsSubs` SE T
358                         `IDClassif ied`='{$sC ategoryID} ',   358                         `IDClassif ied`='{$sC ategoryID} ',
359                         `NameSub`= '{$sName}' ,   359                         `NameSub`= '{$sName}' ,
    360                         `SEntryUri `='{$sNewU ri}',
360                         `Descripti on`='{$sDe scription} '";   361                         `Descripti on`='{$sDe scription} '";
361           $s qlRes = db _res( $que ry );   362           $s qlRes = db _res( $que ry );
362           re turn $sqlR es;   363           re turn $sqlR es;
363       }   364       }
364     365  
365       /**   366       /**
366        * SQL  Activate  all 'new'  Advertisem ents   367        * SQL  Activate  all 'new'  Advertisem ents
367        *   368        *
368        * @re turn text  result   369        * @re turn text  result
369        */   370        */
370       functi on UpdateA llNewAdvIn toActive()  {   371       functi on UpdateA llNewAdvIn toActive()  {
371           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   372           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
372           $s FailUpd =  _t("_FAIL_ UPD_ADV");   373           $s FailUpd =  _t("_FAIL_ UPD_ADV");
373     374  
374           $s SelectedQu ery = "   375           $s SelectedQu ery = "
375                SELECT ` Classified sAdvertise ments`.`ID `   376                SELECT ` Classified sAdvertise ments`.`ID `
376                FROM `Cl assifiedsA dvertiseme nts`   377                FROM `Cl assifiedsA dvertiseme nts`
377                WHERE `S tatus`='ne w'   378                WHERE `S tatus`='ne w'
378           ";   379           ";
379           $v SelectedAd s = db_res  ($sSelect edQuery);   380           $v SelectedAd s = db_res  ($sSelect edQuery);
380     381  
381           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Status ` = 'new'" ;   382           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Status ` = 'new'" ;
382           $s qlRes = db _res( $que ry );   383           $s qlRes = db _res( $que ry );
383     384  
384           wh ile( $aSel ectedAds =  mysql_fet ch_assoc($ vSelectedA ds) ) {   385           wh ile( $aSel ectedAds =  mysql_fet ch_assoc($ vSelectedA ds) ) {
385                reparseO bjTags( 'a d', $aSele ctedAds['I D'] );   386                reparseO bjTags( 'a d', $aSele ctedAds['I D'] );
386           }   387           }
387     388  
388           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   389           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
389           re turn MsgBo x($ret);   390           re turn MsgBo x($ret);
390       }   391       }
391     392  
392       functi on DeleteS electedAdv () {   393       functi on DeleteS electedAdv () {
393           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   394           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
394           $s FailUpd =  _t("_FAIL_ UPD_ADV");   395           $s FailUpd =  _t("_FAIL_ UPD_ADV");
395           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {   396           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {
396                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {   397                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {
397                    $que ry = "DELE TE FROM `C lassifieds Advertisem ents` WHER E `ID` = { $iVal} LIM IT 1";   398                    $que ry = "DELE TE FROM `C lassifieds Advertisem ents` WHER E `ID` = { $iVal} LIM IT 1";
398                    $sql Res = db_r es( $query  );   399                    $sql Res = db_r es( $query  );
399                    repa rseObjTags ( 'ad', $i Val );   400                    repa rseObjTags ( 'ad', $i Val );
400                }   401                }
401           }   402           }
402     403  
403           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   404           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
404           re turn MsgBo x($ret);   405           re turn MsgBo x($ret);
405       }   406       }
406     407  
407       functi on Approve SelectedAd v() {   408       functi on Approve SelectedAd v() {
408           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   409           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
409           $s FailUpd =  _t("_FAIL_ UPD_ADV");   410           $s FailUpd =  _t("_FAIL_ UPD_ADV");
410           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {   411           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {
411                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {   412                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {
412                    $que ry = "UPDA TE `Classi fiedsAdver tisements`  SET `Stat us` = 'act ive' WHERE  `ID` = {$ iVal} LIMI T 1";   413                    $que ry = "UPDA TE `Classi fiedsAdver tisements`  SET `Stat us` = 'act ive' WHERE  `ID` = {$ iVal} LIMI T 1";
413                    $sql Res = db_r es( $query  );   414                    $sql Res = db_r es( $query  );
414                    repa rseObjTags ( 'ad', $i Val );   415                    repa rseObjTags ( 'ad', $i Val );
415                }   416                }
416           }   417           }
417     418  
418           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   419           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
419           re turn MsgBo x($ret);   420           re turn MsgBo x($ret);
420       }   421       }
421   ?>   422   ?>