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

6.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2\admin manage_classifieds.php Sun May 11 13:17:02 2008 UTC
2 Dolphin-v.6.1.3\admin manage_classifieds.php Wed Jul 16 09:51:21 2008 UTC

6.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 792
Changed 2 4
Inserted 0 0
Removed 0 0

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

6.4 Active regular expressions

No regular expressions were active.

6.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'] = m ember_auth ( 1, true,  true );   30   $logged['a dmin'] = m ember_auth ( 1, true,  true );
31   $_page['he ader'] = _ t('_Manage  classifie ds');   31   $_page['he ader'] = _ t('_Manage  classifie ds');
32     32  
33   $path   =  
" {$dir['roo t']} templates/ tmpl_{$tmp l}/css/";
  33   $path   =   BX_DIRECTO RY_PATH_RO OT   .   "
templates/ tmpl_{$tmp l}/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  
41   Main();   41   Main();
42     42  
43       /**   43       /**
44        * Gen erating Ma in page co de   44        * Gen erating Ma in page co de
45        *   45        *
46        * @re turn ALL p resentatio n of data   46        * @re turn ALL p resentatio n of data
47        */   47        */
48       functi on Main()  {   48       functi on Main()  {
49           $o Classified s = new Bx DolClassif ieds();   49           $o Classified s = new Bx DolClassif ieds();
50           $o Classified s -> sCurr BrowsedFil e = 'manag e_classifi eds.php';   50           $o Classified s -> sCurr BrowsedFil e = 'manag e_classifi eds.php';
51           $o Classified s -> bAdmi nMode = TR UE;   51           $o Classified s -> bAdmi nMode = TR UE;
52     52  
53           pr int $oClas sifieds ->  PrintComm andForms() ;   53           pr int $oClas sifieds ->  PrintComm andForms() ;
54     54  
55           if  ($_REQUES T) {   55           if  ($_REQUES T) {
56                if (isse t($_REQUES T['action' ])) {   56                if (isse t($_REQUES T['action' ])) {
57                    if ( (int)$_REQ UEST['acti on']==3) {   57                    if ( (int)$_REQ UEST['acti on']==3) {
58                         print $oCl assifieds  -> PrintFi lterForm() ;   58                         print $oCl assifieds  -> PrintFi lterForm() ;
59                         print $oCl assifieds  -> PrintFi lteredAllA dvertiseme nts();   59                         print $oCl assifieds  -> PrintFi lteredAllA dvertiseme nts();
60                         ContentBlo ckFoot();   60                         ContentBlo ckFoot();
61                         BottomCode ();   61                         BottomCode ();
62                         return;   62                         return;
63                    }   63                    }
64                    else if ((int)$ _REQUEST[' action']== 2) {   64                    else if ((int)$ _REQUEST[' action']== 2) {
65                         $iClassifi edSubID =  (int)$_REQ UEST['Filt erSubCat'] ;   65                         $iClassifi edSubID =  (int)$_REQ UEST['Filt erSubCat'] ;
66                         print $oCl assifieds  -> PrintSu bRecords($ iClassifie dSubID, TR UE);   66                         print $oCl assifieds  -> PrintSu bRecords($ iClassifie dSubID, TR UE);
67                         ContentBlo ckFoot();   67                         ContentBlo ckFoot();
68                         BottomCode ();   68                         BottomCode ();
69                         return;   69                         return;
70                    }   70                    }
71                    else if ((int)$ _REQUEST[' action']== 1) {   71                    else if ((int)$ _REQUEST[' action']== 1) {
72                         $iClassifi edID = (in t)$_REQUES T['FilterC at'];   72                         $iClassifi edID = (in t)$_REQUES T['FilterC at'];
73                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);   73                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);
74                         ContentBlo ckFoot();   74                         ContentBlo ckFoot();
75                         BottomCode ();   75                         BottomCode ();
76                         return;   76                         return;
77                    }   77                    }
78                }   78                }
79                elseif ( isset($_GE T['bClassi fiedID']))  {   79                elseif ( isset($_GE T['bClassi fiedID']))  {
80                    $iCl assifiedID  = (int)$_ GET['bClas sifiedID'] ;   80                    $iCl assifiedID  = (int)$_ GET['bClas sifiedID'] ;
81                    if ( $iClassifi edID > 0)  {   81                    if ( $iClassifi edID > 0)  {
82                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);   82                         print $oCl assifieds  -> PrintAl lSubRecord s($iClassi fiedID);
83                         print $oCl assifieds  -> PrintBa ckLink();   83                         print $oCl assifieds  -> PrintBa ckLink();
84                         ContentBlo ckFoot();   84                         ContentBlo ckFoot();
85                         BottomCode ();   85                         BottomCode ();
86                         return;   86                         return;
87                    }   87                    }
88                }   88                }
89                elseif ( isset($_GE T['bSubCla ssifiedID' ])) {   89                elseif ( isset($_GE T['bSubCla ssifiedID' ])) {
90                    $iSu bClassifie dID = (int )$_GET['bS ubClassifi edID'];   90                    $iSu bClassifie dID = (int )$_GET['bS ubClassifi edID'];
91                    if ( $iSubClass ifiedID >  0) {   91                    if ( $iSubClass ifiedID >  0) {
92                         print $oCl assifieds  -> PrintSu bRecords($ iSubClassi fiedID, TR UE);   92                         print $oCl assifieds  -> PrintSu bRecords($ iSubClassi fiedID, TR UE);
93                         print $oCl assifieds  -> PrintBa ckLink();   93                         print $oCl assifieds  -> PrintBa ckLink();
94                         ContentBlo ckFoot();   94                         ContentBlo ckFoot();
95                         BottomCode ();   95                         BottomCode ();
96                         return;   96                         return;
97                    }   97                    }
98                }   98                }
99                elseif ( isset($_RE QUEST['iAc tion'])) {   99                elseif ( isset($_RE QUEST['iAc tion'])) {
100                    $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'));
101                    $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 '));
102                    $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 '));
103                    $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') );
104                    $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'));
105                    $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'));
106                    $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'));
107                    $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'));
108     108  
109                    swit ch( $_REQU EST['iActi on'] ) {   109                    swit ch( $_REQU EST['iActi on'] ) {
110                         case 'AddM ainCategor y':   110                         case 'AddM ainCategor y':
111                             $sName  = process _db_input(  $_REQUEST ['name1']  );   111                             $sName  = process _db_input(  $_REQUEST ['name1']  );
112                             $sDesc ription =  process_db _input( $_ REQUEST['d escription 1'] );   112                             $sDesc ription =  process_db _input( $_ REQUEST['d escription 1'] );
113                             $sCust omName1 =  process_db _input( $_ REQUEST['C ustomName1 '] );   113                             $sCust omName1 =  process_db _input( $_ REQUEST['C ustomName1 '] );
114                             $sCust omName2 =  process_db _input( $_ REQUEST['C ustomName2 '] );   114                             $sCust omName2 =  process_db _input( $_ REQUEST['C ustomName2 '] );
115                             $sCust omAction1  = process_ db_input(  $_REQUEST[ 'CustomAct ion1'] );   115                             $sCust omAction1  = process_ db_input(  $_REQUEST[ 'CustomAct ion1'] );
116                             $sCust omAction2  = process_ db_input(  $_REQUEST[ 'CustomAct ion2'] );   116                             $sCust omAction2  = process_ db_input(  $_REQUEST[ 'CustomAct ion2'] );
117                             if ($s Name=='')  {   117                             if ($s Name=='')  {
118                                 pr int $sAddM ainCatFail C;   118                                 pr int $sAddM ainCatFail C;
119                                 br eak;   119                                 br eak;
120                             }   120                             }
121                             $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);
122                             print  (mysql_aff ected_rows ()!=0) ? $ sAddMainCa tSuccC : $ sAddMainCa tFailC;   122                             print  (mysql_aff ected_rows ()!=0) ? $ sAddMainCa tSuccC : $ sAddMainCa tFailC;
123                             break;   123                             break;
124                         case 'AddS ubCategory ':   124                         case 'AddS ubCategory ':
125                             if (($ _REQUEST[' FilterCat' ]) AND (is set($_REQU EST['name2 ']))) {   125                             if (($ _REQUEST[' FilterCat' ]) AND (is set($_REQU EST['name2 ']))) {
126                                 $s Name = pro cess_db_in put( $_REQ UEST['name 2'] );   126                                 $s Name = pro cess_db_in put( $_REQ UEST['name 2'] );
127                                 $s Descriptio n = proces s_db_input ( $_REQUES T['descrip tion2'] );   127                                 $s Descriptio n = proces s_db_input ( $_REQUES T['descrip tion2'] );
128                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );   128                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );
129                                 if  ((int)$sC ategoryID  < 1) {   129                                 if  ((int)$sC ategoryID  < 1) {
130                                      print $s AddSubCatF ailC; brea k;   130                                      print $s AddSubCatF ailC; brea k;
131                                 }   131                                 }
132                                 $s qlRes = In sertCS($sC ategoryID,  $sName, $ sDescripti on);   132                                 $s qlRes = In sertCS($sC ategoryID,  $sName, $ sDescripti on);
133                                 pr int (mysql _affected_ rows()!=0)  ? $sAddSu bCatSuccC  : $sAddSub CatFailC;   133                                 pr int (mysql _affected_ rows()!=0)  ? $sAddSu bCatSuccC  : $sAddSub CatFailC;
134                             }   134                             }
135                         break;   135                         break;
136                         case 'Dele teMainCate gory':   136                         case 'Dele teMainCate gory':
137                             if ($_ REQUEST['F ilterCat'] ) {   137                             if ($_ REQUEST['F ilterCat'] ) {
138                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );   138                                 $s CategoryID  = process _db_input(  $_REQUEST ['FilterCa t'] );
139                                 $q uery = "DE LETE FROM  `Classifie ds` WHERE  `ID` = '{$ sCategoryI D}'";   139                                 $q uery = "DE LETE FROM  `Classifie ds` WHERE  `ID` = '{$ sCategoryI D}'";
140                                 $s qlRes = db _res( $que ry );   140                                 $s qlRes = db _res( $que ry );
141                                 pr int (mysql _affected_ rows()!=0)  ? $sDelMa inCatSuccC  : $sDelMa inCatFailC ;   141                                 pr int (mysql _affected_ rows()!=0)  ? $sDelMa inCatSuccC  : $sDelMa inCatFailC ;
142                             }   142                             }
143                         break;   143                         break;
144                         case 'Dele teSubCateg ory':   144                         case 'Dele teSubCateg ory':
145                             if ($_ REQUEST['S ubClassifi ed']) {   145                             if ($_ REQUEST['S ubClassifi ed']) {
146                                 $s CategoryID  = process _db_input(  $_REQUEST ['SubClass ified'] );   146                                 $s CategoryID  = process _db_input(  $_REQUEST ['SubClass ified'] );
147                                 $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}";
148                                 $s qlRes = db _res( $que ry );   148                                 $s qlRes = db _res( $que ry );
149                                 pr int (mysql _affected_ rows()!=0)  ? $sDelSu bCatSuccC  : $sDelSub CatFailC;   149                                 pr int (mysql _affected_ rows()!=0)  ? $sDelSu bCatSuccC  : $sDelSub CatFailC;
150                             }   150                             }
151                         break;   151                         break;
152                    }   152                    }
153                }   153                }
154                elseif ( isset($_RE QUEST['Del eteAdverti sementID'] )) {   154                elseif ( isset($_RE QUEST['Del eteAdverti sementID'] )) {
155                    $id  = (int)$_R EQUEST['De leteAdvert isementID' ];   155                    $id  = (int)$_R EQUEST['De leteAdvert isementID' ];
156                    if ( $id > 0) {   156                    if ( $id > 0) {
157                         //print Ac tionDelete Advertisem ent($id);   157                         //print Ac tionDelete Advertisem ent($id);
158                         print   $ th i
s->ActionD eleteAdver tisement($ id);
  158                         print   $ oClassif i ed s->ActionD eleteAdver tisement($ id);
159                    }   159                    }
160                }   160                }
161                elseif ( isset($_RE QUEST['Act ivateAdver tisementID '])) {   161                elseif ( isset($_RE QUEST['Act ivateAdver tisementID '])) {
162                    $id  = (int)$_R EQUEST['Ac tivateAdve rtisementI D'];   162                    $id  = (int)$_R EQUEST['Ac tivateAdve rtisementI D'];
163                    if ( $id > 0) {   163                    if ( $id > 0) {
164                         print Acti onActivate Advertisem ent($id);   164                         print Acti onActivate Advertisem ent($id);
165                    }   165                    }
166                }   166                }
167                elseif ( isset($_RE QUEST['Act ivateAdvWh olesale']) ) {   167                elseif ( isset($_RE QUEST['Act ivateAdvWh olesale']) ) {
168                    prin t UpdateAl lNewAdvInt oActive();   168                    prin t UpdateAl lNewAdvInt oActive();
169                }   169                }
170                elseif ( isset($_RE QUEST['Del eteSelecte d'])) {   170                elseif ( isset($_RE QUEST['Del eteSelecte d'])) {
171                    prin t DeleteSe lectedAdv( );   171                    prin t DeleteSe lectedAdv( );
172                }   172                }
173                elseif ( isset($_RE QUEST['App roveSelect ed'])) {   173                elseif ( isset($_RE QUEST['App roveSelect ed'])) {
174                    prin t ApproveS electedAdv ();   174                    prin t ApproveS electedAdv ();
175                }   175                }
176                if (isse t($_REQUES T['Updated Advertisem entID']))  {   176                if (isse t($_REQUES T['Updated Advertisem entID']))  {
177                    $id  = (int)$_R EQUEST['Up datedAdver tisementID '];   177                    $id  = (int)$_R EQUEST['Up datedAdver tisementID '];
178                    if ( $id > 0) {   178                    if ( $id > 0) {
179                         if (isset( $_REQUEST[ 'DeletedPi ctureID'])  && (int)$ _REQUEST[' DeletedPic tureID']>0 ) {   179                         if (isset( $_REQUEST[ 'DeletedPi ctureID'])  && (int)$ _REQUEST[' DeletedPic tureID']>0 ) {
180                             //dele te a pic   180                             //dele te a pic
181                             print  $oClassifi eds->Actio nDeletePic ture();   181                             print  $oClassifi eds->Actio nDeletePic ture();
182                             print  $oClassifi eds->Print EditForm($ id);   182                             print  $oClassifi eds->Print EditForm($ id);
183                         } else {   183                         } else {
184                             print  $oClassifi eds->Actio nUpdateAdv ertisement ID($id);   184                             print  $oClassifi eds->Actio nUpdateAdv ertisement ID($id);
185                         }   185                         }
186                    }   186                    }
187                    retu rn;   187                    retu rn;
188                }   188                }
189                elseif ( isset($_RE QUEST['Edi tAdvertise mentID']))  {   189                elseif ( isset($_RE QUEST['Edi tAdvertise mentID']))  {
190                    if ( ((int)$_RE QUEST['Edi tAdvertise mentID'])  > 0) {   190                    if ( ((int)$_RE QUEST['Edi tAdvertise mentID'])  > 0) {
191                         print $oCl assifieds  -> PrintEd itForm((in t)$_REQUES T['EditAdv ertisement ID']);   191                         print $oCl assifieds  -> PrintEd itForm((in t)$_REQUES T['EditAdv ertisement ID']);
192                         print $oCl assifieds  -> PrintBa ckLink();   192                         print $oCl assifieds  -> PrintBa ckLink();
193                         ContentBlo ckFoot();   193                         ContentBlo ckFoot();
194                         BottomCode ();   194                         BottomCode ();
195                         return;   195                         return;
196                    }   196                    }
197                }   197                }
198                elseif ( isset($_RE QUEST['Sho wAdvertise mentID']))  {   198                elseif ( isset($_RE QUEST['Sho wAdvertise mentID']))  {
199                    if ( $_REQUEST[ 'ShowAdver tisementID '] > 0) {   199                    if ( $_REQUEST[ 'ShowAdver tisementID '] > 0) {
200                         print $oCl assifieds  -> ActionP rintAdvert isement($_ REQUEST['S howAdverti sementID'] );   200                         print $oCl assifieds  -> ActionP rintAdvert isement($_ REQUEST['S howAdverti sementID'] );
201                         print $oCl assifieds  -> PrintBa ckLink();   201                         print $oCl assifieds  -> PrintBa ckLink();
202                         ContentBlo ckFoot();   202                         ContentBlo ckFoot();
203                         BottomCode ();   203                         BottomCode ();
204                         return;   204                         return;
205                    }   205                    }
206                }   206                }
207                elseif ( isset($_RE QUEST['Buy Now'])) {   207                elseif ( isset($_RE QUEST['Buy Now'])) {
208                    $adv Id = (int) $_REQUEST[ 'IDAdv'];   208                    $adv Id = (int) $_REQUEST[ 'IDAdv'];
209                    if ( $advId > 0 ) {   209                    if ( $advId > 0 ) {
210                         print $oCl assifieds  -> ActionB uyAdvertis ement($adv Id);   210                         print $oCl assifieds  -> ActionB uyAdvertis ement($adv Id);
211                         ContentBlo ckFoot();   211                         ContentBlo ckFoot();
212                         BottomCode ();   212                         BottomCode ();
213                         return;   213                         return;
214                    }   214                    }
215                }   215                }
216                elseif ( isset($_RE QUEST['Buy SendNow']) ) {   216                elseif ( isset($_RE QUEST['Buy SendNow']) ) {
217                    $adv Id = (int) $_REQUEST[ 'IDAdv'];   217                    $adv Id = (int) $_REQUEST[ 'IDAdv'];
218                    if ( $advId > 0 ) {   218                    if ( $advId > 0 ) {
219                         print $oCl assifieds  -> ActionB uySendMail Advertisem ent($advId );   219                         print $oCl assifieds  -> ActionB uySendMail Advertisem ent($advId );
220                         ContentBlo ckFoot();   220                         ContentBlo ckFoot();
221                         BottomCode ();   221                         BottomCode ();
222                         return;   222                         return;
223                    }   223                    }
224                }   224                }
225                elseif ( isset($_RE QUEST['Use rsOtherLis ting'])) {   225                elseif ( isset($_RE QUEST['Use rsOtherLis ting'])) {
226                    $iPr ofileID =  (int)$_REQ UEST['IDPr ofile'];   226                    $iPr ofileID =  (int)$_REQ UEST['IDPr ofile'];
227                    if ( $iProfileI D > -1) {   227                    if ( $iProfileI D > -1) {
228                         print $oCl assifieds  -> PrintMy Ads($iProf ileID);   228                         print $oCl assifieds  -> PrintMy Ads($iProf ileID);
229                         ContentBlo ckFoot();   229                         ContentBlo ckFoot();
230                         BottomCode ();   230                         BottomCode ();
231                         return;   231                         return;
232                    }   232                    }
233                }   233                }
234           }   234           }
235           pr int $oClas sifieds ->  PrintMana geClassifi edsForm();   235           pr int $oClas sifieds ->  PrintMana geClassifi edsForm();
236     236  
237           $s Cap1C = _t ("_TREE_C_ BRW");   237           $s Cap1C = _t ("_TREE_C_ BRW");
238           $s Cap2C = _t ("_MODERAT ING");   238           $s Cap2C = _t ("_MODERAT ING");
239     239  
240           pr int "<h2>{ $sCap1C}</ h2>";   240           pr int "<h2>{ $sCap1C}</ h2>";
241           pr int $oClas sifieds ->  PrintTree Classified sBrowse();   241           pr int $oClas sifieds ->  PrintTree Classified sBrowse();
242     242  
243           $s Act = _t(" _Activate" );   243           $s Act = _t(" _Activate" );
244           $s Whol = _t( "_wholesal e");   244           $s Whol = _t( "_wholesal e");
245           $s ActivateAd vWholesale  = "<a hre f=\"{$_SER VER['PHP_S ELF']}?Act ivateAdvWh olesale=1\ ">{$sAct}  {$sWhol}</ a>";   245           $s ActivateAd vWholesale  = "<a hre f=\"{$_SER VER['PHP_S ELF']}?Act ivateAdvWh olesale=1\ ">{$sAct}  {$sWhol}</ a>";
246           pr int "<h2>{ $sCap2C} ( {$sActivat eAdvWholes ale})</h2> ";   246           pr int "<h2>{ $sCap2C} ( {$sActivat eAdvWholes ale})</h2> ";
247     247  
248           pr int $oClas sifieds ->  PrintMode ratingTabl e();   248           pr int $oClas sifieds ->  PrintMode ratingTabl e();
249           pr int '<div  style="cle ar: both;" ></div>';   249           pr int '<div  style="cle ar: both;" ></div>';
250           re turn;   250           re turn;
251       }   251       }
252     252  
253       Conten tBlockFoot ();   253       Conten tBlockFoot ();
254       Bottom Code();   254       Bottom Code();
255     255  
256       /**   256       /**
257        * SQL  deteting  of Adverti sement   257        * SQL  deteting  of Adverti sement
258        *   258        *
259         * @p aram $id   ID`s of de leting Adv ertisement   259         * @p aram $id   ID`s of de leting Adv ertisement
260        * @re turn Text  presentati on of data   260        * @re turn Text  presentati on of data
261        */   261        */
262       /*func tion Actio nDeleteAdv ertisement ($id) {   262       /*func tion Actio nDeleteAdv ertisement ($id) {
263           $r et = '';   263           $r et = '';
264           $s SuccDel =  _t("_SUCC_ DEL_ADV");   264           $s SuccDel =  _t("_SUCC_ DEL_ADV");
265           $s FailDel =  _t("_FAIL_ DEL_ADV");   265           $s FailDel =  _t("_FAIL_ DEL_ADV");
266           $i DeleteAdve rtisementI D = (int)$ id;   266           $i DeleteAdve rtisementI D = (int)$ id;
267           $q uery = "DE LETE FROM  `Classifie dsAdvertis ements` WH ERE `ID` =  {$iDelete Advertisem entID} LIM IT 1";   267           $q uery = "DE LETE FROM  `Classifie dsAdvertis ements` WH ERE `ID` =  {$iDelete Advertisem entID} LIM IT 1";
268           $s qlRes = db _res( $que ry );   268           $s qlRes = db _res( $que ry );
269           re parseObjTa gs( 'ad',  $iDeleteAd vertisemen tID );   269           re parseObjTa gs( 'ad',  $iDeleteAd vertisemen tID );
270           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccDel) :  _t($sFail Del);   270           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccDel) :  _t($sFail Del);
271           re turn MsgBo x($ret);   271           re turn MsgBo x($ret);
272       }*/   272       }*/
273     273  
274       /**   274       /**
275        * SQL  activatin g of Adver tisement   275        * SQL  activatin g of Adver tisement
276        *   276        *
277         * @p aram $id   ID`s of ac tivating A dvertiseme nt   277         * @p aram $id   ID`s of ac tivating A dvertiseme nt
278        * @re turn Text  presentati on of data   278        * @re turn Text  presentati on of data
279        */   279        */
280       functi on ActionA ctivateAdv ertisement ($id) {   280       functi on ActionA ctivateAdv ertisement ($id) {
281           $r et = '';   281           $r et = '';
282           $s SuccAct =  _t("_SUCC_ ACT_ADV");   282           $s SuccAct =  _t("_SUCC_ ACT_ADV");
283           $s FailAct =  _t("_FAIL_ ACT_ADV");   283           $s FailAct =  _t("_FAIL_ ACT_ADV");
284           $i ActivateAd vertisemen tID = (int )$id;   284           $i ActivateAd vertisemen tID = (int )$id;
285           $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 ;";   285           $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 ;";
286           $s qlRes = db _res( $que ry );   286           $s qlRes = db _res( $que ry );
287           re parseObjTa gs( 'ad',  $iActivate Advertisem entID );   287           re parseObjTa gs( 'ad',  $iActivate Advertisem entID );
288           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccAct) :  _t($sFail Act);   288           $r et .= (mys ql_affecte d_rows()!= 0) ? _t($s SuccAct) :  _t($sFail Act);
289           re turn MsgBo x($ret);   289           re turn MsgBo x($ret);
290       }   290       }
291     291  
292       /*   292       /*
293       *safe  SQL functi ons   293       *safe  SQL functi ons
294       */   294       */
295     295  
296       /**   296       /**
297        * SQL  Inserting  new Class ifieds   297        * SQL  Inserting  new Class ifieds
298        *   298        *
299         * @p aram $sNam e       Ad ded Name F Ield value   299         * @p aram $sNam e       Ad ded Name F Ield value
300         * @p aram $sDes cription     Added De scription  FIeld valu e   300         * @p aram $sDes cription     Added De scription  FIeld valu e
301         * @p aram $sCus tomName1     Added Cu stomName1  FIeld valu e   301         * @p aram $sCus tomName1     Added Cu stomName1  FIeld valu e
302         * @p aram $sCus tomName2     Added Cu stomName1  FIeld valu e   302         * @p aram $sCus tomName2     Added Cu stomName1  FIeld valu e
303         * @p aram $Cust omAction1    Added Cu stomAction 1 FIeld va lue   303         * @p aram $Cust omAction1    Added Cu stomAction 1 FIeld va lue
304         * @p aram $Cust omAction2    Added Cu stomAction 2 FIeld va lue   304         * @p aram $Cust omAction2    Added Cu stomAction 2 FIeld va lue
305        * @re turn SQL r esult   305        * @re turn SQL r esult
306        */   306        */
307       functi on InsertC ($sName, $ sDescripti on, $sCust omName1, $ sCustomNam e2, $sCust omAction1,  $sCustomA ction2) {   307       functi on InsertC ($sName, $ sDescripti on, $sCust omName1, $ sCustomNam e2, $sCust omAction1,  $sCustomA ction2) {
308           $s NewUri = u riGenerate ($sName, ' Classified s', 'CEntr yUri', 64) ;   308           $s NewUri = u riGenerate ($sName, ' Classified s', 'CEntr yUri', 64) ;
309     309  
310           $q uery = "IN SERT INTO  `Classifie ds` SET   310           $q uery = "IN SERT INTO  `Classifie ds` SET
311                         `Name`='{$ sName}',   311                         `Name`='{$ sName}',
312                         `CEntryUri `='{$sNewU ri}',   312                         `CEntryUri `='{$sNewU ri}',
313                         `Descripti on`='{$sDe scription} '"   313                         `Descripti on`='{$sDe scription} '"
314                          .(($sCust omName1)?" , `CustomF ieldName1` ='{$sCusto mName1}'": "")   314                          .(($sCust omName1)?" , `CustomF ieldName1` ='{$sCusto mName1}'": "")
315                          .(($sCust omName2)?" , `CustomF ieldName2` ='{$sCusto mName2}'": "")   315                          .(($sCust omName2)?" , `CustomF ieldName2` ='{$sCusto mName2}'": "")
316                          .(($sCust omAction1) ?", `Custo mAction1`= '{$sCustom Action1}'" :"")   316                          .(($sCust omAction1) ?", `Custo mAction1`= '{$sCustom Action1}'" :"")
317                          .(($sCust omAction2) ?", `Custo mAction2`= '{$sCustom Action2}'" :"");   317                          .(($sCust omAction2) ?", `Custo mAction2`= '{$sCustom Action2}'" :"");
318           $s qlRes = db _res( $que ry );   318           $s qlRes = db _res( $que ry );
319           re turn $sqlR es;   319           re turn $sqlR es;
320       }   320       }
321     321  
322       /**   322       /**
323        * SQL  Inserting  new SubCl assifieds   323        * SQL  Inserting  new SubCl assifieds
324        *   324        *
325        * @pa ram $sCate goryID  Ad ded Catego ryID FIeld  value   325        * @pa ram $sCate goryID  Ad ded Catego ryID FIeld  value
326         * @p aram $sNam e       Ad ded Name F Ield value   326         * @p aram $sNam e       Ad ded Name F Ield value
327         * @p aram $sDes cription     Added De scription  FIeld valu e   327         * @p aram $sDes cription     Added De scription  FIeld valu e
328        * @re turn SQL r esult   328        * @re turn SQL r esult
329        */   329        */
330       functi on InsertC S($sCatego ryID, $sNa me, $sDesc ription) {   330       functi on InsertC S($sCatego ryID, $sNa me, $sDesc ription) {
331           $s NewUri = u riGenerate ($sName, ' Classified sSubs', 'S EntryUri',  128);   331           $s NewUri = u riGenerate ($sName, ' Classified sSubs', 'S EntryUri',  128);
332     332  
333           $q uery = "IN SERT INTO  `Classifie dsSubs` SE T   333           $q uery = "IN SERT INTO  `Classifie dsSubs` SE T
334                         `IDClassif ied`='{$sC ategoryID} ',   334                         `IDClassif ied`='{$sC ategoryID} ',
335                         `NameSub`= '{$sName}' ,   335                         `NameSub`= '{$sName}' ,
336                         `SEntryUri `='{$sNewU ri}',   336                         `SEntryUri `='{$sNewU ri}',
337                         `Descripti on`='{$sDe scription} '";   337                         `Descripti on`='{$sDe scription} '";
338           $s qlRes = db _res( $que ry );   338           $s qlRes = db _res( $que ry );
339           re turn $sqlR es;   339           re turn $sqlR es;
340       }   340       }
341     341  
342       /**   342       /**
343        * SQL  Activate  all 'new'  Advertisem ents   343        * SQL  Activate  all 'new'  Advertisem ents
344        *   344        *
345        * @re turn text  result   345        * @re turn text  result
346        */   346        */
347       functi on UpdateA llNewAdvIn toActive()  {   347       functi on UpdateA llNewAdvIn toActive()  {
348           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   348           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
349           $s FailUpd =  _t("_FAIL_ UPD_ADV");   349           $s FailUpd =  _t("_FAIL_ UPD_ADV");
350     350  
351           $s SelectedQu ery = "   351           $s SelectedQu ery = "
352                SELECT ` Classified sAdvertise ments`.`ID `   352                SELECT ` Classified sAdvertise ments`.`ID `
353                FROM `Cl assifiedsA dvertiseme nts`   353                FROM `Cl assifiedsA dvertiseme nts`
354                WHERE `S tatus`='ne w'   354                WHERE `S tatus`='ne w'
355           ";   355           ";
356           $v SelectedAd s = db_res  ($sSelect edQuery);   356           $v SelectedAd s = db_res  ($sSelect edQuery);
357     357  
358           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Status ` = 'new'" ;   358           $q uery = "UP DATE `Clas sifiedsAdv ertisement s` SET `St atus` = 'a ctive' WHE RE `Status ` = 'new'" ;
359           $s qlRes = db _res( $que ry );   359           $s qlRes = db _res( $que ry );
360     360  
361           wh ile( $aSel ectedAds =  mysql_fet ch_assoc($ vSelectedA ds) ) {   361           wh ile( $aSel ectedAds =  mysql_fet ch_assoc($ vSelectedA ds) ) {
362                reparseO bjTags( 'a d', $aSele ctedAds['I D'] );   362                reparseO bjTags( 'a d', $aSele ctedAds['I D'] );
363           }   363           }
364     364  
365           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   365           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
366           re turn MsgBo x($ret);   366           re turn MsgBo x($ret);
367       }   367       }
368     368  
369       functi on DeleteS electedAdv () {   369       functi on DeleteS electedAdv () {
370           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   370           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
371           $s FailUpd =  _t("_FAIL_ UPD_ADV");   371           $s FailUpd =  _t("_FAIL_ UPD_ADV");
372           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {   372           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {
373                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {   373                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {
374                    $que ry = "DELE TE FROM `C lassifieds Advertisem ents` WHER E `ID` = { $iVal} LIM IT 1";   374                    $que ry = "DELE TE FROM `C lassifieds Advertisem ents` WHER E `ID` = { $iVal} LIM IT 1";
375                    $sql Res = db_r es( $query  );   375                    $sql Res = db_r es( $query  );
376                    repa rseObjTags ( 'ad', $i Val );   376                    repa rseObjTags ( 'ad', $i Val );
377                }   377                }
378           }   378           }
379     379  
380           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   380           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
381           re turn MsgBo x($ret);   381           re turn MsgBo x($ret);
382       }   382       }
383     383  
384       functi on Approve SelectedAd v() {   384       functi on Approve SelectedAd v() {
385           $s SuccUpd =  _t("_SUCC_ UPD_ADV");   385           $s SuccUpd =  _t("_SUCC_ UPD_ADV");
386           $s FailUpd =  _t("_FAIL_ UPD_ADV");   386           $s FailUpd =  _t("_FAIL_ UPD_ADV");
387           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {   387           if  (isset($_ REQUEST['C heck'])  & & is_array ($_REQUEST ['Check']) ) {
388                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {   388                foreach( $_REQUEST[ 'Check'] a s $iKey =>  $iVal) {
389                    $que ry = "UPDA TE `Classi fiedsAdver tisements`  SET `Stat us` = 'act ive' WHERE  `ID` = {$ iVal} LIMI T 1";   389                    $que ry = "UPDA TE `Classi fiedsAdver tisements`  SET `Stat us` = 'act ive' WHERE  `ID` = {$ iVal} LIMI T 1";
390                    $sql Res = db_r es( $query  );   390                    $sql Res = db_r es( $query  );
391                    repa rseObjTags ( 'ad', $i Val );   391                    repa rseObjTags ( 'ad', $i Val );
392                }   392                }
393           }   393           }
394     394  
395           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);   395           $r et = (mysq l_affected _rows()!=0 ) ? _t($sS uccUpd) :  _t($sFailU pd);
396           re turn MsgBo x($ret);   396           re turn MsgBo x($ret);
397       }   397       }
398   ?>   398   ?>