21. File Comparison Report

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

21.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2\inc\classes BxDolPageViewAdmin.php Mon May 26 10:15:40 2008 UTC
2 Dolphin-v.6.1.3\inc\classes BxDolPageViewAdmin.php Wed Jul 16 09:51:19 2008 UTC

21.2 Comparison summary

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

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

21.4 Active regular expressions

No regular expressions were active.

21.5 Comparison detail

1   <?   1   <?
2     2  
3   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' plugins/Se rvices_JSO N.php' );   3   require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' plugins/Se rvices_JSO N.php' );
4     4  
5   class BxDo lPageViewA dmin {   5   class BxDo lPageViewA dmin {
6       var $a Pages = ar ray();   6       var $a Pages = ar ray();
7       var $o Page;   7       var $o Page;
8       var $s Page_db; / /name of c urrent pag e, used fo rm databas e manipula tions   8       var $s Page_db; / /name of c urrent pag e, used fo rm databas e manipula tions
9       var $s DBTable; / /used data base table   9       var $s DBTable; / /used data base table
10       var $b AjaxMode =  false;   10       var $b AjaxMode =  false;
11       var $a Aliases =  array(   11       var $a Aliases =  array(
12           'i ndex' => ' Homepage',   12           'i ndex' => ' Homepage',
13           'm usic' => ' Shared Mus ic',   13           'm usic' => ' Shared Mus ic',
14           'v ideo' => ' Shared Vid eo',   14           'v ideo' => ' Shared Vid eo',
15           'p hoto' => ' Shared Pho to',   15           'p hoto' => ' Shared Pho to',
16           'a ds'   => ' Classified s',   16           'a ds'   => ' Classified s',
17           'm ember' =>  'Account',   17           'm ember' =>  'Account',
18           'p rofile' =>  'Profile'   18           'p rofile' =>  'Profile'
19       );   19       );
20          20       
21          21       
22       functi on BxDolPa geViewAdmi n( $sDBTab le, $sCach eFile ) {   22       functi on BxDolPa geViewAdmi n( $sDBTab le, $sCach eFile ) {
23           $t his -> sDB Table = $s DBTable;   23           $t his -> sDB Table = $s DBTable;
24           $t his -> sCa cheFile =  $sCacheFil e;   24           $t his -> sCa cheFile =  $sCacheFil e;
25              25           
26           $s Page = pro cess_pass_ data( isse t( $_REQUE ST['Page']  ) ? trim(  $_REQUEST ['Page'] )  : '' );   26           $s Page = pro cess_pass_ data( isse t( $_REQUE ST['Page']  ) ? trim(  $_REQUEST ['Page'] )  : '' );
27              27           
28           $t his -> get Pages();   28           $t his -> get Pages();
29              29           
30           if ( strlen($ sPage) )   30           if ( strlen($ sPage) )
31                /* @var  $this->oPa ge BxDolPV APage */   31                /* @var  $this->oPa ge BxDolPV APage */
32                $this ->  oPage = n ew BxDolPV APage( $sP age, $this  );   32                $this ->  oPage = n ew BxDolPV APage( $sP age, $this  );
33              33           
34           $t his -> che ckAjaxMode ();   34           $t his -> che ckAjaxMode ();
35              35           
36           if ( $this ->  bAjaxMode  and $this  -> oPage  ) {   36           if ( $this ->  bAjaxMode  and $this  -> oPage  ) {
37                $this ->  sPage_db  = addslash es( $this  -> oPage - > sName );   37                $this ->  sPage_db  = addslash es( $this  -> oPage - > sName );
38                   38                
39                switch(  $_REQUEST[ 'action']  ) {   39                switch(  $_REQUEST[ 'action']  ) {
40                    case  'load':   40                    case  'load':
41                         header( 'C ontent-typ e:text/jav ascript' ) ;   41                         header( 'C ontent-typ e:text/jav ascript' ) ;
42                         send_heade rs_page_ch anged();   42                         send_heade rs_page_ch anged();
43                         echo $this  -> oPage  -> getJSON ();   43                         echo $this  -> oPage  -> getJSON ();
44                    brea k;   44                    brea k;
45                       45                    
46                    case  'saveCols Widths':   46                    case  'saveCols Widths':
47                         if( is_arr ay( $_POST ['widths']  ) ) {   47                         if( is_arr ay( $_POST ['widths']  ) ) {
48                             $this  -> saveCol sWidths( $ _POST['wid ths'] );   48                             $this  -> saveCol sWidths( $ _POST['wid ths'] );
49                             $this  -> createC ache();   49                             $this  -> createC ache();
50                         }   50                         }
51                    brea k;   51                    brea k;
52                       52                    
53                    case  'saveBloc ks':   53                    case  'saveBloc ks':
54                         if( is_arr ay( $_POST ['columns' ] ) ) {   54                         if( is_arr ay( $_POST ['columns' ] ) ) {
55                             $this  -> saveBlo cks( $_POS T['columns '] );   55                             $this  -> saveBlo cks( $_POS T['columns '] );
56                             $this  -> createC ache();   56                             $this  -> createC ache();
57                         }   57                         }
58                    brea k;   58                    brea k;
59                       59                    
60                    case  'loadEdit Form':   60                    case  'loadEdit Form':
61                         if( $iBloc kID = (int )$_POST['i d'] )   61                         if( $iBloc kID = (int )$_POST['i d'] )
62                             $this  -> showPro pForm( $iB lockID );   62                             $this  -> showPro pForm( $iB lockID );
63                    brea k;   63                    brea k;
64                       64                    
65                    case  'saveItem ':   65                    case  'saveItem ':
66                         if( (int)$ _POST['id' ] ) {   66                         if( (int)$ _POST['id' ] ) {
67                             $this  -> saveIte m( $_POST  );   67                             $this  -> saveIte m( $_POST  );
68                             $this  -> createC ache();   68                             $this  -> createC ache();
69                         }   69                         }
70                    brea k;   70                    brea k;
71                       71                    
72                    case  'deleteBl ock':   72                    case  'deleteBl ock':
73                         if( $iBloc kID = (int )$_REQUEST ['id'] ) {   73                         if( $iBloc kID = (int )$_REQUEST ['id'] ) {
74                             $this  -> deleteB lock( $iBl ockID );   74                             $this  -> deleteB lock( $iBl ockID );
75                             $this  -> createC ache();   75                             $this  -> createC ache();
76                         }   76                         }
77                    brea k;   77                    brea k;
78                       78                    
79                    case  'checkNew Block':   79                    case  'checkNew Block':
80                         if( $iBloc kID = (int )$_REQUEST ['id'] )   80                         if( $iBloc kID = (int )$_REQUEST ['id'] )
81                             $this  -> checkNe wBlock( $i BlockID );   81                             $this  -> checkNe wBlock( $i BlockID );
82                    brea k;   82                    brea k;
83                       83                    
84                    case  'savePage Width':   84                    case  'savePage Width':
85                         if( $sPage Width = pr ocess_pass _data( $_P OST['width '] ) ) {   85                         if( $sPage Width = pr ocess_pass _data( $_P OST['width '] ) ) {
86                             $this  -> savePag eWidth( $s PageWidth  );   86                             $this  -> savePag eWidth( $s PageWidth  );
87                             $this  -> createC ache();   87                             $this  -> createC ache();
88                                88                             
89                             if( $t his -> oPa ge -> sNam e == 'inde x' ) {   89                             if( $t his -> oPa ge -> sNam e == 'inde x' ) {
90                                 if ( $sPageWi dth == '10 0%' )   90                                 if ( $sPageWi dth == '10 0%' )
91                                      setParam ( 'promoWi dth', '960 ' );   91                                      setParam ( 'promoWi dth', '960 ' );
92                                 el se   92                                 el se
93                                      setParam ( 'promoWi dth', (int )$sPageWid th );   93                                      setParam ( 'promoWi dth', (int )$sPageWid th );
94                                    94                                 
95                                 Re sizeAllPro mos();   95                                 Re sizeAllPro mos();
96                             }   96                             }
97                         }   97                         }
98                    brea k;   98                    brea k;
99                       99                    
100                    case  'saveOthe rPagesWidt h':   100                    case  'saveOthe rPagesWidt h':
101                         if( $sWidt h = $_REQU EST['width '] ) {   101                         if( $sWidt h = $_REQU EST['width '] ) {
102                             setPar am( 'main_ div_width' , $sWidth  );   102                             setPar am( 'main_ div_width' , $sWidth  );
103                             echo ' OK';   103                             echo ' OK';
104                         }   104                         }
105                    brea k;   105                    brea k;
106                       106                    
107                    case  'resetPag e':   107                    case  'resetPag e':
108                         $this -> r esetPage() ;   108                         $this -> r esetPage() ;
109                         $this -> c reateCache ();   109                         $this -> c reateCache ();
110                    brea k;   110                    brea k;
111                }   111                }
112                   112                
113                exit;   113                exit;
114           }  else {   114           }  else {
115                $this ->  showMainP age();   115                $this ->  showMainP age();
116           }   116           }
117       }   117       }
118          118       
119       functi on savePag eWidth( $s PageWidth  ) {   119       functi on savePag eWidth( $s PageWidth  ) {
120           $s PageWidth  = addslash es( $sPage Width );   120           $s PageWidth  = addslash es( $sPage Width );
121           $s Query = "U PDATE `{$t his -> sDB Table}` SE T `PageWid th` = '$sP ageWidth'  WHERE `Pag e` = '{$th is -> sPag e_db}'";   121           $s Query = "U PDATE `{$t his -> sDB Table}` SE T `PageWid th` = '$sP ageWidth'  WHERE `Pag e` = '{$th is -> sPag e_db}'";
122           db _res( $sQu ery );   122           db _res( $sQu ery );
123              123           
124           ec ho 'OK';   124           ec ho 'OK';
125       }   125       }
126          126       
127       functi on createC ache() {   127       functi on createC ache() {
128           $o Cacher = n ew BxDolPa geViewCach er( $this  -> sDBTabl e, $this - > sCacheFi le );   128           $o Cacher = n ew BxDolPa geViewCach er( $this  -> sDBTabl e, $this - > sCacheFi le );
129           $o Cacher ->  createCach e();   129           $o Cacher ->  createCach e();
130       }   130       }
131     131  
132          132       
133       functi on checkNe wBlock( $i BlockID )  {   133       functi on checkNe wBlock( $i BlockID )  {
134           $s Query = "S ELECT `Des c`, `Capti on`, `Func `, `Conten t`, `Visib le` FROM ` {$this ->  sDBTable}`  WHERE `ID ` = $iBloc kID";   134           $s Query = "S ELECT `Des c`, `Capti on`, `Func `, `Conten t`, `Visib le` FROM ` {$this ->  sDBTable}`  WHERE `ID ` = $iBloc kID";
135           $a Block = db _assoc_arr ( $sQuery  );   135           $a Block = db _assoc_arr ( $sQuery  );
136              136           
137           if ( $aBlock[ 'Func'] ==  'Sample'  ) {   137           if ( $aBlock[ 'Func'] ==  'Sample'  ) {
138                $sQuery  = "   138                $sQuery  = "
139                    INSE RT INTO `{ $this -> s DBTable}`  SET   139                    INSE RT INTO `{ $this -> s DBTable}`  SET
140                         `Desc`     = '" . add slashes( $ aBlock['De sc']    )  . "',   140                         `Desc`     = '" . add slashes( $ aBlock['De sc']    )  . "',
141                         `Caption`  = '" . add slashes( $ aBlock['Ca ption'] )  . "',   141                         `Caption`  = '" . add slashes( $ aBlock['Ca ption'] )  . "',
142                         `Func`     = '{$aBloc k['Content ']}',   142                         `Func`     = '{$aBloc k['Content ']}',
143                         `Visible`  = '{$aBloc k['Visible ']}',   143                         `Visible`  = '{$aBloc k['Visible ']}',
144                         `Page`     = '{$this  -> sPage_d b}'   144                         `Page`     = '{$this  -> sPage_d b}'
145                    ";   145                    ";
146                db_res(  $sQuery );   146                db_res(  $sQuery );
147                   147                
148                echo mys ql_insert_ id();   148                echo mys ql_insert_ id();
149                   149                
150                $this ->  createCac he();   150                $this ->  createCac he();
151           }   151           }
152       }   152       }
153          153       
154       functi on deleteB lock( $iBl ockID ) {   154       functi on deleteB lock( $iBl ockID ) {
155           $s Query = "D ELETE FROM  `{$this - > sDBTable }` WHERE ` Page` = '{ $this -> s Page_db}'  AND `ID` =  $iBlockID ";   155           $s Query = "D ELETE FROM  `{$this - > sDBTable }` WHERE ` Page` = '{ $this -> s Page_db}'  AND `ID` =  $iBlockID ";
156           db _res( $sQu ery );   156           db _res( $sQu ery );
157       }   157       }
158          158       
159       functi on resetPa ge() {   159       functi on resetPa ge() {
160           if ( $this ->  oPage ->  bResetable  ) {   160           if ( $this ->  oPage ->  bResetable  ) {
161                $sQuery  = "DELETE  FROM `{$th is -> sDBT able}` WHE RE `Page`  = '{$this  -> sPage_d b}'";   161                $sQuery  = "DELETE  FROM `{$th is -> sDBT able}` WHE RE `Page`  = '{$this  -> sPage_d b}'";
162                db_res($ sQuery);   162                db_res($ sQuery);
163                execSqlF ile( $this  -> oPage  -> sDefaul tSqlFile ) ;   163                execSqlF ile( $this  -> oPage  -> sDefaul tSqlFile ) ;
164                   164                
165                if( $thi s -> oPage  -> sName  == 'index'  ) {   165                if( $thi s -> oPage  -> sName  == 'index'  ) {
166                    setP aram( 'pro moWidth',  '960' );   166                    setP aram( 'pro moWidth',  '960' );
167                    Resi zeAllPromo s();   167                    Resi zeAllPromo s();
168                }   168                }
169           }   169           }
170              170           
171           ec ho (int)$t his -> oPa ge -> bRes etable;   171           ec ho (int)$t his -> oPa ge -> bRes etable;
172       }   172       }
173          173       
174       functi on saveIte m( $aData  ) {   174       functi on saveIte m( $aData  ) {
175           $i ID = (int) $aData['id '];   175           $i ID = (int) $aData['id '];
176              176           
177           $s Query = "S ELECT `Fun c` FROM `{ $this -> s DBTable}`  WHERE `ID`  = $iID";   177           $s Query = "S ELECT `Fun c` FROM `{ $this -> s DBTable}`  WHERE `ID`  = $iID";
178           $s Func  = db _value( $s Query );   178           $s Func  = db _value( $s Query );
179           if ( !$sFunc  )   179           if ( !$sFunc  )
180                return;   180                return;
181              181           
182           $s Caption =  process_db _input($aD ata['Capti on']);   182           $s Caption =  process_db _input($aD ata['Capti on']);
183           $s Visible =  is_array(  $aData['Vi sible'] )  ? implode(  ',', $aDa ta['Visibl e'] ) : '' ;   183           $s Visible =  is_array(  $aData['Vi sible'] )  ? implode(  ',', $aDa ta['Visibl e'] ) : '' ;
184              184           
185           if ( $sFunc = = 'RSS' )   185           if ( $sFunc = = 'RSS' )
186                $sConten tUpd = "`C ontent` =  '" . proce ss_db_inpu t($aData[' Url']) . ' #' . (int) $aData['Nu m'] . "'," ;   186                $sConten tUpd = "`C ontent` =  '" . proce ss_db_inpu t($aData[' Url']) . ' #' . (int) $aData['Nu m'] . "'," ;
187           el seif( $sFu nc == 'Ech o' )   187           el seif( $sFu nc == 'Ech o' )
188                $sConten tUpd = "`C ontent` =  '" . proce ss_db_inpu t($aData[' Content'])  . "',";   188                $sConten tUpd = "`C ontent` =  '" . proce ss_db_inpu t($aData[' Content'])  . "',";
189           el se   189           el se
190                $sConten tUpd = '';   190                $sConten tUpd = '';
191              191           
192           $s Query = "   192           $s Query = "
193                UPDATE ` {$this ->  sDBTable}`  SET   193                UPDATE ` {$this ->  sDBTable}`  SET
194                    `Cap tion` = '$ sCaption',   194                    `Cap tion` = '$ sCaption',
195                    $sCo ntentUpd   195                    $sCo ntentUpd
196                    `Vis ible` = '$ sVisible'   196                    `Vis ible` = '$ sVisible'
197                WHERE `I D` = $iID   197                WHERE `I D` = $iID
198           ";   198           ";
199              199           
200           db _res( $sQu ery );   200           db _res( $sQu ery );
201              201           
202           ec ho _t( pro cess_pass_ data($aDat a['Caption ']) );   202           ec ho _t( pro cess_pass_ data($aDat a['Caption ']) );
203       }   203       }
204          204       
205       functi on saveCol sWidths( $ aWidths )  {   205       functi on saveCol sWidths( $ aWidths )  {
206           $i Counter =  0;   206           $i Counter =  0;
207           fo reach( $aW idths as $ iWidth ) {   207           fo reach( $aW idths as $ iWidth ) {
208                $iCounte r ++;   208                $iCounte r ++;
209                $iWidth  = (int)$iW idth;   209                $iWidth  = (int)$iW idth;
210                   210                
211                $sQuery  = "UPDATE  `{$this ->  sDBTable} ` SET `Col Width` = $ iWidth WHE RE `Page`  = '{$this  -> sPage_d b}' AND `C olumn` = $ iCounter";   211                $sQuery  = "UPDATE  `{$this ->  sDBTable} ` SET `Col Width` = $ iWidth WHE RE `Page`  = '{$this  -> sPage_d b}' AND `C olumn` = $ iCounter";
212                db_res(  $sQuery );   212                db_res(  $sQuery );
213           }   213           }
214              214           
215           ec ho 'OK';   215           ec ho 'OK';
216       }   216       }
217          217       
218       functi on saveBlo cks( $aCol umns ) {   218       functi on saveBlo cks( $aCol umns ) {
219           // reset bloc ks on this  page   219           // reset bloc ks on this  page
220           $s Query = "U PDATE `{$t his -> sDB Table}` SE T `Column`  = 0, `Ord er` = 0 WH ERE `Page`  = '{$this  -> sPage_ db}'";   220           $s Query = "U PDATE `{$t his -> sDB Table}` SE T `Column`  = 0, `Ord er` = 0 WH ERE `Page`  = '{$this  -> sPage_ db}'";
221           db _res( $sQu ery );   221           db _res( $sQu ery );
222              222           
223           $i ColCounter  = 0;   223           $i ColCounter  = 0;
224           fo reach( $aC olumns as  $sBlocks )  {   224           fo reach( $aC olumns as  $sBlocks )  {
225                $iColCou nter ++;   225                $iColCou nter ++;
226                   226                
227                $aBlocks  = explode ( ',', $sB locks );   227                $aBlocks  = explode ( ',', $sB locks );
228                foreach(  $aBlocks  as $iOrder  => $iBloc kID ) {   228                foreach(  $aBlocks  as $iOrder  => $iBloc kID ) {
229                    $iBl ockID = (i nt)$iBlock ID;   229                    $iBl ockID = (i nt)$iBlock ID;
230                    $sQu ery = "UPD ATE `{$thi s -> sDBTa ble}` SET  `Column` =  $iColCoun ter, `Orde r` = $iOrd er WHERE ` ID` = $iBl ockID AND  `Page` = ' {$this ->  sPage_db}' ";   230                    $sQu ery = "UPD ATE `{$thi s -> sDBTa ble}` SET  `Column` =  $iColCoun ter, `Orde r` = $iOrd er WHERE ` ID` = $iBl ockID AND  `Page` = ' {$this ->  sPage_db}' ";
231                    db_r es( $sQuer y );   231                    db_r es( $sQuer y );
232                }   232                }
233           }   233           }
234              234           
235           ec ho 'OK';   235           ec ho 'OK';
236       }   236       }
237          237       
238       functi on showMai nPage() {   238       functi on showMai nPage() {
239           gl obal $_pag e;   239           gl obal $_pag e;
240           gl obal $site ;   240           gl obal $site ;
241              241           
242           $_ page['head er']   = ' Page Build er';   242           $_ page['head er']   = ' Page Build er';
243           $_ page['css_ name'] = ' pageBuilde r.css';   243           $_ page['css_ name'] = ' pageBuilde r.css';
244           $_ page['extr aCodeInHea d'] = <<<B LAH   244           $_ page['extr aCodeInHea d'] = <<<B LAH
245                       245                    
246                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.js"></ script>   246                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.js"></ script>
247                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.dimens ions.js">< /script>   247                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.dimens ions.js">< /script>
248                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.form.j s"></scrip t>   248                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/jqu ery.form.j s"></scrip t>
249                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. mouse.js"> </script>   249                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. mouse.js"> </script>
250                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. draggable. js"></scri pt>   250                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. draggable. js"></scri pt>
251                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. draggable. ext.js"></ script>   251                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. draggable. ext.js"></ script>
252                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. droppable. js"></scri pt>    
253                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. sortable.j s"></scrip t>   252                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. sortable.j s"></scrip t>
254                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. sortable.e xt.js"></s cript>   253                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. sortable.e xt.js"></s cript>
255                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. slider.js" ></script>   254                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} jquery/ui. slider.js" ></script>
256                       255                    
257                    <scr ipt type=" text/javas cript" lan guage="jav ascript" s rc="{$site ['url']}in c/js/class es/BxDolPa geBuilder. js"></scri pt>   256                    <scr ipt type=" text/javas cript" lan guage="jav ascript" s rc="{$site ['url']}in c/js/class es/BxDolPa geBuilder. js"></scri pt>
258                       257                    
259                    <!--  tinyMCE g z -->   258                    <!--  tinyMCE g z -->
260                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} tiny_mce/t iny_mce_gz ip.js"></s cript>   259                    <scr ipt type=" text/javas cript" src ="{$site[' plugins']} tiny_mce/t iny_mce_gz ip.js"></s cript>
261                    <scr ipt type=" text/javas cript">   260                    <scr ipt type=" text/javas cript">
262                         tinyMCE_GZ .init({   261                         tinyMCE_GZ .init({
263                             plugin s : "style ,layer,tab le,save,ad vhr,advima ge,advlink ,emotions, iespell,in sertdateti me,preview ,media,sea rchreplace ,print,con textmenu,p aste,direc tionality, fullscreen ,noneditab le,visualc hars,nonbr eaking,xht mlxtras",   262                             plugin s : "style ,layer,tab le,save,ad vhr,advima ge,advlink ,emotions, iespell,in sertdateti me,preview ,media,sea rchreplace ,print,con textmenu,p aste,direc tionality, fullscreen ,noneditab le,visualc hars,nonbr eaking,xht mlxtras",
264                             themes  : "simple ,advanced" ,   263                             themes  : "simple ,advanced" ,
265                             langua ges : "en" ,   264                             langua ges : "en" ,
266                             disk_c ache : tru e,   265                             disk_c ache : tru e,
267                             debug  : false   266                             debug  : false
268                         });   267                         });
269                    </sc ript>   268                    </sc ript>
270                   269                
271                    <scr ipt langua ge="javasc ript" type ="text/jav ascript">   270                    <scr ipt langua ge="javasc ript" type ="text/jav ascript">
272                         tinyMCE.in it({   271                         tinyMCE.in it({
273                             mode :  "textarea s",   272                             mode :  "textarea s",
274                             theme  : "advance d",   273                             theme  : "advance d",
275                                274                             
276                             editor _selector  : "form_in put_html",   275                             editor _selector  : "form_in put_html",
277                             conten t_css : "{ $site['plu gins']}tin y_mce/dolp hin.css",   276                             conten t_css : "{ $site['plu gins']}tin y_mce/dolp hin.css",
278                                277                             
279                             plugin s : "style ,layer,tab le,save,ad vhr,advima ge,advlink ,emotions, iespell,in sertdateti me,preview ,zoom,medi a,searchre place,prin t,contextm enu,paste, directiona lity,fulls creen,visu alchars,no nbreaking, xhtmlxtras ",   278                             plugin s : "style ,layer,tab le,save,ad vhr,advima ge,advlink ,emotions, iespell,in sertdateti me,preview ,zoom,medi a,searchre place,prin t,contextm enu,paste, directiona lity,fulls creen,visu alchars,no nbreaking, xhtmlxtras ",
280                             relati ve_urls :  false,   279                             relati ve_urls :  false,
281                                280                             
282                             theme_ advanced_b uttons1 :  "bold,ital ic,underli ne,striket hrough,|,j ustifyleft ,justifyce nter,justi fyright,ju stifyfull, |,fontsele ct,fontsiz eselect",   281                             theme_ advanced_b uttons1 :  "bold,ital ic,underli ne,striket hrough,|,j ustifyleft ,justifyce nter,justi fyright,ju stifyfull, |,fontsele ct,fontsiz eselect",
283                             theme_ advanced_b uttons2 :  "forecolor ,backcolor ,|,bullist ,numlist,| ,outdent,i ndent,|,li nk,unlink, image,hr,| ,sub,sup,| ,insertdat e,insertti me,|,style props",   282                             theme_ advanced_b uttons2 :  "forecolor ,backcolor ,|,bullist ,numlist,| ,outdent,i ndent,|,li nk,unlink, image,hr,| ,sub,sup,| ,insertdat e,insertti me,|,style props",
284                             theme_ advanced_b uttons3 :  "charmap,e motions,|, cite,abbr, acronym,at tribs,|,pr eview,remo veformat,| ,code,help ",   283                             theme_ advanced_b uttons3 :  "charmap,e motions,|, cite,abbr, acronym,at tribs,|,pr eview,remo veformat,| ,code,help ",
285                             theme_ advanced_b uttons4 :  "table,row _props,cel l_props,de lete_col,d elete_row, delete_tab le,col_aft er,col_bef ore,row_af ter,row_be fore,row_a fter,row_b efore,spli t_cells,me rge_cells" ,   284                             theme_ advanced_b uttons4 :  "table,row _props,cel l_props,de lete_col,d elete_row, delete_tab le,col_aft er,col_bef ore,row_af ter,row_be fore,row_a fter,row_b efore,spli t_cells,me rge_cells" ,
286                             theme_ advanced_t oolbar_loc ation : "t op",   285                             theme_ advanced_t oolbar_loc ation : "t op",
287                             theme_ advanced_t oolbar_ali gn : "cent er",   286                             theme_ advanced_t oolbar_ali gn : "cent er",
288                             valid_ elements :  "*[*]"   287                             valid_ elements :  "*[*]"
289                         });   288                         });
290                    </sc ript>   289                    </sc ript>
291   BLAH;   290   BLAH;
292              291           
293           $_ page['extr aCodeInBod y'] = <<<B LAH   292           $_ page['extr aCodeInBod y'] = <<<B LAH
294                    <div  id="editF ormWrapper "   293                    <div  id="editF ormWrapper "
295                      st yle="displ ay:none;"  onclick="i f ( ( even t.target | | event.sr cElement )  == this )  $(this).h ide();">   294                      st yle="displ ay:none;"  onclick="i f ( ( even t.target | | event.sr cElement )  == this )  $(this).h ide();">
296                         <div id="e ditFormCon t">   295                         <div id="e ditFormCon t">
297                                296                             
298                         </div>   297                         </div>
299                    </di v>   298                    </di v>
300   BLAH;   299   BLAH;
301           To pCodeAdmin ();   300           To pCodeAdmin ();
302              301           
303           $t his -> sho wBuildZone ();   302           $t his -> sho wBuildZone ();
304              303           
305           Bo ttomCode() ;   304           Bo ttomCode() ;
306       }   305       }
307          306       
308       functi on showBui ldZone() {   307       functi on showBui ldZone() {
309           gl obal $site ;   308           gl obal $site ;
310           ?>   309           ?>
311                <div id= "buildZone Wrapper">   310                <div id= "buildZone Wrapper">
312           <?   311           <?
313              312           
314           $t his -> sho wPageSelec tor();   313           $t his -> sho wPageSelec tor();
315              314           
316           if ( $this ->  oPage ) {   315           if ( $this ->  oPage ) {
317                ?>   316                ?>
318                    <div  id="build AreasWrapp er">   317                    <div  id="build AreasWrapp er">
319                         <div class ="block_he ad">Page W idth</div>   318                         <div class ="block_he ad">Page W idth</div>
320                         <div class ="block_co nt_nd">   319                         <div class ="block_co nt_nd">
321                                320                             
322                             <div i d="pageWid thValue">< /div>   321                             <div i d="pageWid thValue">< /div>
323                                322                             
324                             <div i d="pageWid thSlider">   323                             <div i d="pageWid thSlider">
325                                 <d iv></div>   324                                 <d iv></div>
326                             </div>   325                             </div>
327                                326                             
328                             <div c lass="clea r_both"></ div>   327                             <div c lass="clea r_both"></ div>
329                         </div>   328                         </div>
330                           329                        
331                         <div class ="block_he ad">Active  Blocks</d iv>   330                         <div class ="block_he ad">Active  Blocks</d iv>
332                         <div class ="block_co nt" id="ac tiveAreaWr apper">   331                         <div class ="block_co nt" id="ac tiveAreaWr apper">
333                             <div i d="pageCon trols">   332                             <div i d="pageCon trols">
334                <?   333                <?
335                if( !iss et( $this  -> aAliase s[ $this - > oPage ->  sName ] )  ) {   334                if( !iss et( $this  -> aAliase s[ $this - > oPage ->  sName ] )  ) {
336                    ?>   335                    ?>
337                                 <a  href="<?=  $site['ur l'] ?>view Page.php?I D=<?= html specialcha rs( $this  -> oPage - > sName )  ?>"   336                                 <a  href="<?=  $site['ur l'] ?>view Page.php?I D=<?= html specialcha rs( $this  -> oPage - > sName )  ?>"
338                                    target="_b lank">View  Page</a>   337                                    target="_b lank">View  Page</a>
339                    <?   338                    <?
340                }   339                }
341                   340                
342                if( $thi s -> oPage  -> bReset able ) {   341                if( $thi s -> oPage  -> bReset able ) {
343                    ?>   342                    ?>
344                                 <a  href="#"  onclick="o PB.resetPa ge(); retu rn false;" >Reset Pag e</a>   343                                 <a  href="#"  onclick="o PB.resetPa ge(); retu rn false;" >Reset Pag e</a>
345                    <?   344                    <?
346                }   345                }
347                ?>   346                ?>
348                                    347                                 
349                             </div>   348                             </div>
350                                349                             
351                             <div i d="activeB locksArea"  class="bu ildArea">   350                             <div i d="activeB locksArea"  class="bu ildArea">
352                                 Lo ading...   351                                 Lo ading...
353                             </div>   352                             </div>
354                         </div>   353                         </div>
355                           354                        
356                         <div id="c olumnsSlid er">   355                         <div id="c olumnsSlid er">
357                             <div>< /div>   356                             <div>< /div>
358                         </div>   357                         </div>
359     358  
360                         <div class ="block_he ad">Inacti ve Blocks< /div>   359                         <div class ="block_he ad">Inacti ve Blocks< /div>
361                         <div class ="block_co nt">   360                         <div class ="block_co nt">
362                             <div i d="inactiv eBlocksAre a" class=" buildArea" >   361                             <div i d="inactiv eBlocksAre a" class=" buildArea" >
363                                 Lo ading...   362                                 Lo ading...
364                             </div>   363                             </div>
365                         </div>   364                         </div>
366                           365                        
367                         <div class ="block_he ad">Sample s</div>   366                         <div class ="block_he ad">Sample s</div>
368                         <div class ="block_co nt">   367                         <div class ="block_co nt">
369                             <div i d="samples BlocksArea " class="b uildArea">   368                             <div i d="samples BlocksArea " class="b uildArea">
370                                 Lo ading...   369                                 Lo ading...
371                             </div>   370                             </div>
372                         </div>   371                         </div>
373                           372                        
374                         <div class ="block_he ad">Other  Pages Widt h</div>   373                         <div class ="block_he ad">Other  Pages Widt h</div>
375                         <div class ="block_co nt_nd">   374                         <div class ="block_co nt_nd">
376                                375                             
377                             <div i d="pageWid thValue1"> </div>   376                             <div i d="pageWid thValue1"> </div>
378                                377                             
379                             <div i d="pageWid thSlider1" >   378                             <div i d="pageWid thSlider1" >
380                                 <d iv></div>   379                                 <d iv></div>
381                             </div>   380                             </div>
382                                381                             
383                             <div c lass="clea r_both"></ div>   382                             <div c lass="clea r_both"></ div>
384                         </div>   383                         </div>
385                           384                        
386                    </di v>   385                    </di v>
387                       386                    
388                    <scr ipt langua ge="javasc ript" type ="text/jav ascript">   387                    <scr ipt langua ge="javasc ript" type ="text/jav ascript">
389                         $( documen t ).ready(  function( ){   388                         $( documen t ).ready(  function( ){
390                             oPB =  new BxDolP ageBuilder ( {   389                             oPB =  new BxDolP ageBuilder ( {
391                                 pa rser: '<?=  $_SERVER[ 'PHP_SELF' ] ?>',   390                                 pa rser: '<?=  $_SERVER[ 'PHP_SELF' ] ?>',
392                                 pa ge: '<?= a ddslashes(  $this ->  oPage -> s Name ) ?>' ,   391                                 pa ge: '<?= a ddslashes(  $this ->  oPage -> s Name ) ?>' ,
393                                 mi nCols: 1,   392                                 mi nCols: 1,
394                                 ma xCols: 4,   393                                 ma xCols: 4,
395                                 pa geWidth: ' <?= $this  -> oPage - > iPageWid th ?>',   394                                 pa geWidth: ' <?= $this  -> oPage - > iPageWid th ?>',
396                                 ot herPagesWi dth: '<?=  getParam(  'main_div_ width' ) ? >'   395                                 ot herPagesWi dth: '<?=  getParam(  'main_div_ width' ) ? >'
397                             } );   396                             } );
398                         } );   397                         } );
399                    </sc ript>   398                    </sc ript>
400                <?   399                <?
401           }   400           }
402              401           
403           ?>   402           ?>
404                </div>   403                </div>
405           <?   404           <?
406       }   405       }
407          406       
408       functi on showPag eSelector( ) {   407       functi on showPag eSelector( ) {
409           ?>   408           ?>
410           <d iv>   409           <d iv>
411                <script  type="text /javascrip t" languag e="javascr ipt">   410                <script  type="text /javascrip t" languag e="javascr ipt">
412                    var  createNewB uilderPage  = functio n() {   411                    var  createNewB uilderPage  = functio n() {
413                         var sNewPa ge = promp t('Enter n ame of new  page', 'N ew Page');   412                         var sNewPa ge = promp t('Enter n ame of new  page', 'N ew Page');
414                         if(sNewPag e != undef ined && $. trim(sNewP age) != '' )   413                         if(sNewPag e != undef ined && $. trim(sNewP age) != '' )
415                             window .location  = '<?= $_S ERVER['PHP _SELF'] ?> ?Page=' +  encodeURIC omponent(  sNewPage ) ;   414                             window .location  = '<?= $_S ERVER['PHP _SELF'] ?> ?Page=' +  encodeURIC omponent(  sNewPage ) ;
416                    }   415                    }
417                </script >   416                </script >
418                   417                
419                <a href= "#" onclic k="createN ewBuilderP age(); ret urn false; " id="newP ageLink">N ew Page</a >   418                <a href= "#" onclic k="createN ewBuilderP age(); ret urn false; " id="newP ageLink">N ew Page</a >
420                   419                
421                <ul id=" pageSelect or">   420                <ul id=" pageSelect or">
422           <?   421           <?
423           fo reach( $th is -> aPag es as $sPa ge ) {   422           fo reach( $th is -> aPag es as $sPa ge ) {
424                $sSelect ed = ( $th is -> oPag e -> sName  == $sPage  ) ? 'clas s="current "' : '';   423                $sSelect ed = ( $th is -> oPag e -> sName  == $sPage  ) ? 'clas s="current "' : '';
425                   424                
426                ?>   425                ?>
427                    <li  <?= $sSele cted ?>>   426                    <li  <?= $sSele cted ?>>
428                         <a href="< ?= $_SERVE R['PHP_SEL F'] ?>?Pag e=<?= html specialcha rs_adv( ur lencode($s Page) ) ?> ">   427                         <a href="< ?= $_SERVE R['PHP_SEL F'] ?>?Pag e=<?= html specialcha rs_adv( ur lencode($s Page) ) ?> ">
429                             <?= ht mlspecialc hars( isse t($this ->  aAliases[ $sPage]) ?  $this ->  aAliases[$ sPage] : $ sPage ) ?>   428                             <?= ht mlspecialc hars( isse t($this ->  aAliases[ $sPage]) ?  $this ->  aAliases[$ sPage] : $ sPage ) ?>
430                         </a>   429                         </a>
431                    </li >   430                    </li >
432                <?   431                <?
433           }   432           }
434              433           
435           ?>   434           ?>
436                </ul>   435                </ul>
437           </ div>   436           </ div>
438           <?   437           <?
439       }   438       }
440          439       
441       functi on getPage s() {   440       functi on getPage s() {
442           $s PagesQuery  = "SELECT  DISTINCT  `Page` FRO M `{$this  -> sDBTabl e}` WHERE  `Page` !=  '' ORDER B Y `Page`";   441           $s PagesQuery  = "SELECT  DISTINCT  `Page` FRO M `{$this  -> sDBTabl e}` WHERE  `Page` !=  '' ORDER B Y `Page`";
443           $r Pages = db _res( $sPa gesQuery ) ;   442           $r Pages = db _res( $sPa gesQuery ) ;
444           wh ile( $aPag e = mysql_ fetch_asso c($rPages)  )   443           wh ile( $aPag e = mysql_ fetch_asso c($rPages)  )
445                $this ->  aPages[]  = $aPage[' Page'];   444                $this ->  aPages[]  = $aPage[' Page'];
446       }   445       }
447          446       
448       functi on checkAj axMode() {   447       functi on checkAj axMode() {
449           if ( isset( $ _SERVER['H TTP_X_REQU ESTED_WITH '] ) and $ _SERVER['H TTP_X_REQU ESTED_WITH '] == 'XML HttpReques t' )   448           if ( isset( $ _SERVER['H TTP_X_REQU ESTED_WITH '] ) and $ _SERVER['H TTP_X_REQU ESTED_WITH '] == 'XML HttpReques t' )
450                $this ->  bAjaxMode  = true;   449                $this ->  bAjaxMode  = true;
451       }   450       }
452          451       
453       functi on showPro pForm( $iB lockID ) {   452       functi on showPro pForm( $iB lockID ) {
454           $s Query = "S ELECT * FR OM `{$this  -> sDBTab le}` WHERE  `Page` =  '{$this ->  sPage_db} ' AND `ID`  = $iBlock ID";   453           $s Query = "S ELECT * FR OM `{$this  -> sDBTab le}` WHERE  `Page` =  '{$this ->  sPage_db} ' AND `ID`  = $iBlock ID";
455           $a Item = db_ assoc_arr( $sQuery);   454           $a Item = db_ assoc_arr( $sQuery);
456           if ( !$aItem  ) {   455           if ( !$aItem  ) {
457                ?>   456                ?>
458                <div sty le="text-a lign:cente r;color:re d;">This b lock has n o properti es</div>   457                <div sty le="text-a lign:cente r;color:re d;">This b lock has n o properti es</div>
459                <?   458                <?
460                return ;   459                return ;
461           }   460           }
462              461           
463           ?>   462           ?>
464   <form name ="formItem Edit" id=" formItemEd it" action ="<?=$_SER VER['PHP_S ELF']?>" m ethod="POS T">   463   <form name ="formItem Edit" id=" formItemEd it" action ="<?=$_SER VER['PHP_S ELF']?>" m ethod="POS T">
465       <input  type="hid den" name= "Page" val ue="<?= ht mlspecialc hars($this ->oPage->s Name) ?>"  />   464       <input  type="hid den" name= "Page" val ue="<?= ht mlspecialc hars($this ->oPage->s Name) ?>"  />
466       <input  type="hid den" name= "id" value ="<?= $iBl ockID ?>"  />   465       <input  type="hid den" name= "id" value ="<?= $iBl ockID ?>"  />
467       <input  type="hid den" name= "action" v alue="save Item" />   466       <input  type="hid den" name= "action" v alue="save Item" />
468          467       
469       <table  class="po pup_form_w rapper">   468       <table  class="po pup_form_w rapper">
470           <t r>   469           <t r>
471                <td clas s="corner" ><img src= "images/op _cor_tl.pn g" /></td>   470                <td clas s="corner" ><img src= "images/op _cor_tl.pn g" /></td>
472                <td clas s="side_ve r"><img sr c="images/ spacer.gif " /></td>   471                <td clas s="side_ve r"><img sr c="images/ spacer.gif " /></td>
473                <td clas s="corner" ><img src= "images/op _cor_tr.pn g" /></td>   472                <td clas s="corner" ><img src= "images/op _cor_tr.pn g" /></td>
474           </ tr>   473           </ tr>
475           <t r>   474           <t r>
476                <td clas s="side">< img src="i mages/spac er.gif" /> </td>   475                <td clas s="side">< img src="i mages/spac er.gif" /> </td>
477                   476                
478                <td clas s="contain er">   477                <td clas s="contain er">
479                    <div  class="ed it_item_ta ble_cont">   478                    <div  class="ed it_item_ta ble_cont">
480                       479                    
481                         <table cla ss="edit_i tem_table"  >   480                         <table cla ss="edit_i tem_table"  >
482                             <tr>   481                             <tr>
483                                 <t d class="f orm_label" >Type:</td >   482                                 <t d class="f orm_label" >Type:</td >
484                                 <t d>   483                                 <t d>
485                                      <?   484                                      <?
486                                          swit ch( $aItem ['Func'] )  {   485                                          swit ch( $aItem ['Func'] )  {
487                                               case 'PFBl ock': echo  'Profile  Fields'; b reak;   486                                               case 'PFBl ock': echo  'Profile  Fields'; b reak;
488                                               case 'Echo ':    echo  'HTML Blo ck'; break ;   487                                               case 'Echo ':    echo  'HTML Blo ck'; break ;
489                                               case 'RSS' :     echo  'RSS Feed '; break;   488                                               case 'RSS' :     echo  'RSS Feed '; break;
490                                               default:         echo  'Special  Block';   489                                               default:         echo  'Special  Block';
491                                          }   490                                          }
492                                      ?>   491                                      ?>
493                                 </ td>   492                                 </ td>
494                             </tr>   493                             </tr>
495                             <tr>   494                             <tr>
496                                 <t d class="f orm_label" >Descripti on:</td>   495                                 <t d class="f orm_label" >Descripti on:</td>
497                                 <t d><?= $aIt em['Desc']  ?></td>   496                                 <t d><?= $aIt em['Desc']  ?></td>
498                             </tr>   497                             </tr>
499                             <tr>   498                             <tr>
500                                 <t d class="f orm_label" >Caption L ang Key:</ td>   499                                 <t d class="f orm_label" >Caption L ang Key:</ td>
501                                 <t d>   500                                 <t d>
502                                      <input t ype="text"  class="fo rm_input_t ext" name= "Caption"  value="<?=  $aItem['C aption'] ? >" />   501                                      <input t ype="text"  class="fo rm_input_t ext" name= "Caption"  value="<?=  $aItem['C aption'] ? >" />
503                                 </ td>   502                                 </ td>
504                             </tr>   503                             </tr>
505                             <tr>   504                             <tr>
506                                 <t d class="f orm_label" >Visible f or:</td>   505                                 <t d class="f orm_label" >Visible f or:</td>
507                                 <t d>   506                                 <t d>
508                                      <label>   507                                      <label>
509                                          <inp ut type="c heckbox" n ame="Visib le[]" valu e="non"   508                                          <inp ut type="c heckbox" n ame="Visib le[]" valu e="non"
510                                            <? = ( ( strp os( $aItem ['Visible' ], 'non'   ) === fals e ) ? '' :  'checked= "checked"'  ) ?> />   509                                            <? = ( ( strp os( $aItem ['Visible' ], 'non'   ) === fals e ) ? '' :  'checked= "checked"'  ) ?> />
511                                          Gues t   510                                          Gues t
512                                      </label>   511                                      </label>
513                                         512                                      
514                                      <label>   513                                      <label>
515                                          <inp ut type="c heckbox" n ame="Visib le[]" valu e="memb"   514                                          <inp ut type="c heckbox" n ame="Visib le[]" valu e="memb"
516                                            <? = ( ( strp os( $aItem ['Visible' ], 'memb'  ) === fals e ) ? '' :  'checked= "checked"'  ) ?> />   515                                            <? = ( ( strp os( $aItem ['Visible' ], 'memb'  ) === fals e ) ? '' :  'checked= "checked"'  ) ?> />
517                                          Memb er   516                                          Memb er
518                                      </label>   517                                      </label>
519                                 </ td>   518                                 </ td>
520                             </tr>   519                             </tr>
521       <?   520       <?
522       if( $a Item['Func '] == 'Ech o' ) {   521       if( $a Item['Func '] == 'Ech o' ) {
523           ?>   522           ?>
524                             <tr>   523                             <tr>
525                                 <t d class="f orm_label" >HTML-cont ent:</td>   524                                 <t d class="f orm_label" >HTML-cont ent:</td>
526                                 <t d>&nbsp;</ td>   525                                 <t d>&nbsp;</ td>
527                             </tr>   526                             </tr>
528                             <tr>   527                             <tr>
529                                 <t d class="f orm_colspa n" colspan ="2">   528                                 <t d class="f orm_colspa n" colspan ="2">
530                                      <textare a class="f orm_input_ html" id=" form_input _html" nam e="Content "><?= html specialcha rs_adv( $a Item['Cont ent'] ) ?> </textarea >   529                                      <textare a class="f orm_input_ html" id=" form_input _html" nam e="Content "><?= html specialcha rs_adv( $a Item['Cont ent'] ) ?> </textarea >
531                                 </ td>   530                                 </ td>
532                             </tr>   531                             </tr>
533           <?   532           <?
534       } else if( $aItem ['Func'] = = 'RSS' )  {   533       } else if( $aItem ['Func'] = = 'RSS' )  {
535           li st( $sUrl,  $iNum ) =  explode(  '#', $aIte m['Content '] );   534           li st( $sUrl,  $iNum ) =  explode(  '#', $aIte m['Content '] );
536           $i Num = (int )$iNum;   535           $i Num = (int )$iNum;
537              536           
538           ?>   537           ?>
539                             <tr>   538                             <tr>
540                                 <t d class="f orm_label" >Url of RS S feed:</t d>   539                                 <t d class="f orm_label" >Url of RS S feed:</t d>
541                                 <t d><input t ype="text"  class="fo rm_input_t ext" name= "Url" valu e="<?= $sU rl ?>" />< /td>   540                                 <t d><input t ype="text"  class="fo rm_input_t ext" name= "Url" valu e="<?= $sU rl ?>" />< /td>
542                             </tr>   541                             </tr>
543                             <tr>   542                             <tr>
544                                 <t d class="f orm_label" >Number of  RSS items  (0 - all) :</td>   543                                 <t d class="f orm_label" >Number of  RSS items  (0 - all) :</td>
545                                 <t d><input t ype="text"  class="fo rm_input_t ext" name= "Num" valu e="<?= $iN um ?>" />< /td>   544                                 <t d><input t ype="text"  class="fo rm_input_t ext" name= "Num" valu e="<?= $iN um ?>" />< /td>
546                             </tr>   545                             </tr>
547           <?   546           <?
548       }   547       }
549       ?>   548       ?>
550                             <tr>   549                             <tr>
551                                 <t d class="f orm_colspa n" colspan ="2">   550                                 <t d class="f orm_colspa n" colspan ="2">
552                                      <input t ype="submi t" value=" Save" />   551                                      <input t ype="submi t" value=" Save" />
553       <?   552       <?
554       if( $a Item['Func '] == 'RSS ' or $aIte m['Func']  == 'Echo'  ) {   553       if( $a Item['Func '] == 'RSS ' or $aIte m['Func']  == 'Echo'  ) {
555           ?>   554           ?>
556                                      <input t ype="reset " value="D elete" nam e="Delete"  />   555                                      <input t ype="reset " value="D elete" nam e="Delete"  />
557           <?   556           <?
558       }   557       }
559       ?>   558       ?>
560                                      <input t ype="reset " value="C ancel" nam e="Cancel"  />   559                                      <input t ype="reset " value="C ancel" nam e="Cancel"  />
561                                 </ td>   560                                 </ td>
562                             </tr>   561                             </tr>
563                         </table>   562                         </table>
564                       563                    
565                    </di v>   564                    </di v>
566                </td>   565                </td>
567                   566                
568                <td clas s="side">< img src="i mages/spac er.gif" al t="" /></t d>   567                <td clas s="side">< img src="i mages/spac er.gif" al t="" /></t d>
569           </ tr>   568           </ tr>
570           <t r>   569           <t r>
571                <td clas s="corner" ><img src= "images/op _cor_bl.pn g" /></td>   570                <td clas s="corner" ><img src= "images/op _cor_bl.pn g" /></td>
572                <td clas s="side_ve r"><img sr c="images/ spacer.gif " alt="" / ></td>   571                <td clas s="side_ve r"><img sr c="images/ spacer.gif " alt="" / ></td>
573                <td clas s="corner" ><img src= "images/op _cor_br.pn g" onload= "if( navig ator.appNa me == 'Mic rosoft Int ernet Expl orer' && v ersion >=  5.5 && ver sion < 7 )  png_fix() ;" /></td>   572                <td clas s="corner" ><img src= "images/op _cor_br.pn g" onload= "if( navig ator.appNa me == 'Mic rosoft Int ernet Expl orer' && v ersion >=  5.5 && ver sion < 7 )  png_fix() ;" /></td>
574           </ tr>   573           </ tr>
575       </tabl e>   574       </tabl e>
576   </form>   575   </form>
577     576  
578     577  
579           <?   578           <?
580       }   579       }
581          580       
582   }   581   }
583     582  
584   class BxDo lPVAPage {   583   class BxDo lPVAPage {
585       var $s Name;   584       var $s Name;
586       var $s Name_db;   585       var $s Name_db;
587       var $o Parent;   586       var $o Parent;
588       var $a ColsWidths      = arr ay();   587       var $a ColsWidths      = arr ay();
589       var $a Blocks          = arr ay();   588       var $a Blocks          = arr ay();
590       var $a BlocksInac tive = arr ay();   589       var $a BlocksInac tive = arr ay();
591       var $a BlocksSamp les  = arr ay();   590       var $a BlocksSamp les  = arr ay();
592       var $a MinWidths       = arr ay();   591       var $a MinWidths       = arr ay();
593       var $i PageWidth;   592       var $i PageWidth;
594       var $b Resetable;  //defines  if the pa ge can be  reset   593       var $b Resetable;  //defines  if the pa ge can be  reset
595       var $s DefaultSql File; //fi le contain ing defaul t setting  for reset   594       var $s DefaultSql File; //fi le contain ing defaul t setting  for reset
596          595       
597       var $b New = fals e;   596       var $b New = fals e;
598          597       
599       functi on BxDolPV APage( $sP age, &$oPa rent ) {   598       functi on BxDolPV APage( $sP age, &$oPa rent ) {
600           gl obal $dir;    
601           gl obal $admi n_dir;   599           gl obal $admi n_dir;
602              600           
603           $t his -> sNa me   = $sP age;   601           $t his -> sNa me   = $sP age;
604           $t his -> sNa me_db = ad dslashes(  $this -> s Name );   602           $t his -> sNa me_db = ad dslashes(  $this -> s Name );
605              603           
606           /*  @var $thi s->oParent  BxDolPage ViewAdmin  */   604           /*  @var $thi s->oParent  BxDolPage ViewAdmin  */
607           $t his -> oPa rent = &$o Parent;   605           $t his -> oPa rent = &$o Parent;
608              606           
609            $this   ->   sDefaultSq lFile   =  
"{$ dir['root' ]}{$ admin_dir} /default_b uilders/{$ this   ->   oParent   ->   sDBTable}_ {$this   ->   sName}.sql ";
  607            $this   ->   sDefaultSq lFile   =   BX_DIRECTO RY_PATH_RO OT   .   "{$
admin_dir} /default_b uilders/{$ this   ->   oParent   ->   sDBTable}_ {$this   ->   sName}.sql ";
610           $t his -> bRe setable =  file_exist s( $this - > sDefault SqlFile );   608           $t his -> bRe setable =  file_exist s( $this - > sDefault SqlFile );
611                       609                    
612           $t his -> loa dContent() ;   610           $t his -> loa dContent() ;
613       }   611       }
614          612       
615       functi on loadCon tent() {   613       functi on loadCon tent() {
616           if ( in_array ( $this ->  sName, $t his -> oPa rent -> aP ages ) ) {   614           if ( in_array ( $this ->  sName, $t his -> oPa rent -> aP ages ) ) {
617                //get pa ge width   615                //get pa ge width
618                $sQuery  = "SELECT  `PageWidth ` FROM `{$ this -> oP arent -> s DBTable}`  WHERE `Pag e` = '{$th is -> sNam e_db}' LIM IT 1";   616                $sQuery  = "SELECT  `PageWidth ` FROM `{$ this -> oP arent -> s DBTable}`  WHERE `Pag e` = '{$th is -> sNam e_db}' LIM IT 1";
619                $this ->  iPageWidt h = db_val ue( $sQuer y );   617                $this ->  iPageWidt h = db_val ue( $sQuer y );
620                   618                
621                   619                
622                //get co lumns widt hs   620                //get co lumns widt hs
623                $sQuery  = "   621                $sQuery  = "
624                    SELE CT   622                    SELE CT
625                         `Column`,   623                         `Column`,
626                         `ColWidth`   624                         `ColWidth`
627                    FROM  `{$this - > oParent  -> sDBTabl e}`   625                    FROM  `{$this - > oParent  -> sDBTabl e}`
628                    WHER E   626                    WHER E
629                         `Page` = ' {$this ->  sName_db}'  AND   627                         `Page` = ' {$this ->  sName_db}'  AND
630                         `Column` ! = 0   628                         `Column` ! = 0
631                    GROU P BY `Colu mn`   629                    GROU P BY `Colu mn`
632                    ORDE R BY `Colu mn`   630                    ORDE R BY `Colu mn`
633                ";   631                ";
634                $rColumn s = db_res ( $sQuery  );   632                $rColumn s = db_res ( $sQuery  );
635                while( $ aColumn =  mysql_fetc h_assoc( $ rColumns )  ) {   633                while( $ aColumn =  mysql_fetc h_assoc( $ rColumns )  ) {
636                    $iCo lumn                         = ( int)$aColu mn['Column '];   634                    $iCo lumn                         = ( int)$aColu mn['Column '];
637                    $thi s -> aCols Widths[$iC olumn] = ( int)$aColu mn['ColWid th'];   635                    $thi s -> aCols Widths[$iC olumn] = ( int)$aColu mn['ColWid th'];
638                    $thi s -> aBloc ks[$iColum n]     = a rray();   636                    $thi s -> aBloc ks[$iColum n]     = a rray();
639                       637                    
640                    //ge t active b locks   638                    //ge t active b locks
641                    $sQu eryActive  = "   639                    $sQu eryActive  = "
642                         SELECT   640                         SELECT
643                             `ID`,   641                             `ID`,
644                             `Capti on`   642                             `Capti on`
645                         FROM `{$th is -> oPar ent -> sDB Table}`   643                         FROM `{$th is -> oPar ent -> sDB Table}`
646                         WHERE   644                         WHERE
647                             `Page`  = '{$this  -> sName_ db}' AND   645                             `Page`  = '{$this  -> sName_ db}' AND
648                             `Colum n` = $iCol umn   646                             `Colum n` = $iCol umn
649                         ORDER BY ` Order`   647                         ORDER BY ` Order`
650                         ";   648                         ";
651                       649                    
652                    $rBl ocks = db_ res( $sQue ryActive ) ;   650                    $rBl ocks = db_ res( $sQue ryActive ) ;
653                       651                    
654                    whil e( $aBlock   = mysql_ fetch_asso c( $rBlock s ) )   652                    whil e( $aBlock   = mysql_ fetch_asso c( $rBlock s ) )
655                         $this -> a Blocks[$iC olumn][ (i nt)$aBlock ['ID'] ] =  _t( $aBlo ck['Captio n'] );   653                         $this -> a Blocks[$iC olumn][ (i nt)$aBlock ['ID'] ] =  _t( $aBlo ck['Captio n'] );
656                }   654                }
657                   655                
658                // load  minimal wi dths   656                // load  minimal wi dths
659                $sQuery  = "SELECT  `ID`, `Min Width` FRO M `{$this  -> oParent  -> sDBTab le}` WHERE  `MinWidth ` > 0 AND  `Page`= '{ $this -> s Name_db}'" ;   657                $sQuery  = "SELECT  `ID`, `Min Width` FRO M `{$this  -> oParent  -> sDBTab le}` WHERE  `MinWidth ` > 0 AND  `Page`= '{ $this -> s Name_db}'" ;
660                $rBlocks  = db_res(  $sQuery ) ;   658                $rBlocks  = db_res(  $sQuery ) ;
661                while( $ aBlock = m ysql_fetch _assoc( $r Blocks ) )   659                while( $ aBlock = m ysql_fetch _assoc( $r Blocks ) )
662                    $thi s -> aMinW idths[ (in t)$aBlock[ 'ID'] ] =  (int)$aBlo ck['MinWid th'];   660                    $thi s -> aMinW idths[ (in t)$aBlock[ 'ID'] ] =  (int)$aBlo ck['MinWid th'];
663                   661                
664                   662                
665                $this ->  loadInact iveBlocks( );   663                $this ->  loadInact iveBlocks( );
666                   664                
667           }  else {   665           }  else {
668                $this ->  bNew = tr ue;   666                $this ->  bNew = tr ue;
669                $this ->  oParent - > aPages[]  = $this - > sName;   667                $this ->  oParent - > aPages[]  = $this - > sName;
670                $this ->  loadInact iveBlocks( );   668                $this ->  loadInact iveBlocks( );
671                //load f rom post   669                //load f rom post
672           }   670           }
673       }   671       }
674          672       
675       functi on loadIna ctiveBlock s() {   673       functi on loadIna ctiveBlock s() {
676           // get inacti ve blocks  and sample s   674           // get inacti ve blocks  and sample s
677           $s QueryInact ive = "   675           $s QueryInact ive = "
678                SELECT   676                SELECT
679                    `ID` ,   677                    `ID` ,
680                    `Cap tion`   678                    `Cap tion`
681                FROM `{$ this -> oP arent -> s DBTable}`   679                FROM `{$ this -> oP arent -> s DBTable}`
682                WHERE   680                WHERE
683                    `Pag e` = '{$th is -> sNam e_db}' AND   681                    `Pag e` = '{$th is -> sNam e_db}' AND
684                    `Col umn` = 0   682                    `Col umn` = 0
685           ";   683           ";
686              684           
687           $s QuerySampl es = "   685           $s QuerySampl es = "
688                SELECT   686                SELECT
689                    `ID` ,   687                    `ID` ,
690                    `Cap tion`   688                    `Cap tion`
691                FROM `{$ this -> oP arent -> s DBTable}`   689                FROM `{$ this -> oP arent -> s DBTable}`
692                WHERE   690                WHERE
693                    `Fun c` = 'Samp le'   691                    `Fun c` = 'Samp le'
694           ";   692           ";
695              693           
696           $r Inactive =  db_res( $ sQueryInac tive );   694           $r Inactive =  db_res( $ sQueryInac tive );
697           $r Samples  =  db_res( $ sQuerySamp les );   695           $r Samples  =  db_res( $ sQuerySamp les );
698              696           
699           wh ile( $aBlo ck = mysql _fetch_ass oc( $rInac tive ) )   697           wh ile( $aBlo ck = mysql _fetch_ass oc( $rInac tive ) )
700                $this ->  aBlocksIn active[ (i nt)$aBlock ['ID'] ] =  _t( $aBlo ck['Captio n'] );   698                $this ->  aBlocksIn active[ (i nt)$aBlock ['ID'] ] =  _t( $aBlo ck['Captio n'] );
701              699           
702           wh ile( $aBlo ck = mysql _fetch_ass oc( $rSamp les ) )   700           wh ile( $aBlo ck = mysql _fetch_ass oc( $rSamp les ) )
703                $this ->  aBlocksSa mples[ (in t)$aBlock[ 'ID'] ] =  _t( $aBloc k['Caption '] );   701                $this ->  aBlocksSa mples[ (in t)$aBlock[ 'ID'] ] =  _t( $aBloc k['Caption '] );
704       }   702       }
705          703       
706       functi on getJSON () {   704       functi on getJSON () {
707           $o PVAPageJSO N = new Bx DolPVAPage JSON( $thi s );   705           $o PVAPageJSO N = new Bx DolPVAPage JSON( $thi s );
708           $o Json = new  Services_ JSON();   706           $o Json = new  Services_ JSON();
709           re turn $oJso n -> encod e($oPVAPag eJSON);   707           re turn $oJso n -> encod e($oPVAPag eJSON);
710       }   708       }
711          709       
712   }   710   }
713     711  
714   /* tempora ry JSON ob ject */   712   /* tempora ry JSON ob ject */
715   class BxDo lPVAPageJS ON {   713   class BxDo lPVAPageJS ON {
716       var $a ctive;   714       var $a ctive;
717       var $i nactive;   715       var $i nactive;
718       var $s amples;   716       var $s amples;
719       var $w idths;   717       var $w idths;
720       var $m in_widths;   718       var $m in_widths;
721          719       
722       functi on BxDolPV APageJSON(  $oParent  ) {   720       functi on BxDolPV APageJSON(  $oParent  ) {
723           $t his -> wid ths     =  $oParent - > aColsWid ths;   721           $t his -> wid ths     =  $oParent - > aColsWid ths;
724           $t his -> min _widths =  $oParent - > aMinWidt hs;   722           $t his -> min _widths =  $oParent - > aMinWidt hs;
725           $t his -> act ive     =  $oParent - > aBlocks;   723           $t his -> act ive     =  $oParent - > aBlocks;
726           $t his -> ina ctive   =  $oParent - > aBlocksI nactive;   724           $t his -> ina ctive   =  $oParent - > aBlocksI nactive;
727           $t his -> sam ples    =  $oParent - > aBlocksS amples;   725           $t his -> sam ples    =  $oParent - > aBlocksS amples;
728       }   726       }
729   }   727   }
730     728  
731     729  
732   class BxDo lPageViewC acher {   730   class BxDo lPageViewC acher {
733       var $s CacheFile;   731       var $s CacheFile;
734          732       
735       functi on BxDolPa geViewCach er( $sDBTa ble, $sCac heFile ) {   733       functi on BxDolPa geViewCach er( $sDBTa ble, $sCac heFile ) {
736           $t his -> sDB Table = $s DBTable;   734           $t his -> sDB Table = $s DBTable;
737           $t his -> sCa cheFile =  BX_DIRECTO RY_PATH_IN C . "db_ca ched/$sCac heFile";   735           $t his -> sCa cheFile =  BX_DIRECTO RY_PATH_IN C . "db_ca ched/$sCac heFile";
738       }   736       }
739          737       
740       functi on createC ache() {   738       functi on createC ache() {
741           $s CacheStrin g = '';   739           $s CacheStrin g = '';
742              740           
743           $r CacheFile  = @fopen(  $this -> s CacheFile,  'w' );   741           $r CacheFile  = @fopen(  $this -> s CacheFile,  'w' );
744           if ( !$rCache File ) {   742           if ( !$rCache File ) {
745                echo '<b r /><b>War ning!</b>  Cannot ope n Page Vie w cache fi le (' . $t his -> sCa cheFile .  ') for wri te.';   743                echo '<b r /><b>War ning!</b>  Cannot ope n Page Vie w cache fi le (' . $t his -> sCa cheFile .  ') for wri te.';
746                return f alse;   744                return f alse;
747           }   745           }
748              746           
749           fw rite( $rCa cheFile, " // cache o f Page Vie w composer \n\nreturn  array(\n   //pages\n " );   747           fw rite( $rCa cheFile, " // cache o f Page Vie w composer \n\nreturn  array(\n   //pages\n " );
750              748           
751           // get pages   749           // get pages
752           $s Query = "S ELECT `Pag e`,`PageWi dth` FROM  `{$this ->  sDBTable} ` WHERE `P age` != ''  GROUP BY  `Page`";   750           $s Query = "S ELECT `Pag e`,`PageWi dth` FROM  `{$this ->  sDBTable} ` WHERE `P age` != ''  GROUP BY  `Page`";
753           $r Pages = db _res( $sQu ery );   751           $r Pages = db _res( $sQu ery );
754              752           
755           wh ile( $aPag e = mysql_ fetch_asso c( $rPages  ) ) {   753           wh ile( $aPag e = mysql_ fetch_asso c( $rPages  ) ) {
756                $sPageNa me = $aPag e['Page'];   754                $sPageNa me = $aPag e['Page'];
757                   755                
758                fwrite(  $rCacheFil e, "  '$sP ageName' = > array(\n " );   756                fwrite(  $rCacheFil e, "  '$sP ageName' = > array(\n " );
759                fwrite(  $rCacheFil e, "    'W idth' => ' {$aPage['P ageWidth'] }',\n" );   757                fwrite(  $rCacheFil e, "    'W idth' => ' {$aPage['P ageWidth'] }',\n" );
760                fwrite(  $rCacheFil e, "    'C olumns' =>  array(\n"  );   758                fwrite(  $rCacheFil e, "    'C olumns' =>  array(\n"  );
761                   759                
762                //get co lumns   760                //get co lumns
763                $sQuery  = "   761                $sQuery  = "
764                    SELE CT   762                    SELE CT
765                         `Column`,   763                         `Column`,
766                         `ColWidth`   764                         `ColWidth`
767                    FROM  `{$this - > sDBTable }`   765                    FROM  `{$this - > sDBTable }`
768                    WHER E   766                    WHER E
769                         `Page` = ' $sPageName ' AND   767                         `Page` = ' $sPageName ' AND
770                         `Column` >  0   768                         `Column` >  0
771                    GROU P BY `Colu mn`   769                    GROU P BY `Colu mn`
772                    ORDE R BY `Colu mn`   770                    ORDE R BY `Colu mn`
773                ";   771                ";
774                $rColumn s = db_res ( $sQuery  );   772                $rColumn s = db_res ( $sQuery  );
775                   773                
776                while( $ aColumn =  mysql_fetc h_assoc( $ rColumns )  ) {   774                while( $ aColumn =  mysql_fetc h_assoc( $ rColumns )  ) {
777                    $iCo lumn = $aC olumn['Col umn'];   775                    $iCo lumn = $aC olumn['Col umn'];
778                    $iCo lWidth  =  $aColumn[' ColWidth'] ;   776                    $iCo lWidth  =  $aColumn[' ColWidth'] ;
779                       777                    
780                    fwri te( $rCach eFile, "       $iColu mn => arra y(\n" );   778                    fwri te( $rCach eFile, "       $iColu mn => arra y(\n" );
781                    fwri te( $rCach eFile, "         'Wid th'  => $i ColWidth,\ n" );   779                    fwri te( $rCach eFile, "         'Wid th'  => $i ColWidth,\ n" );
782                    fwri te( $rCach eFile, "         'Blo cks' => ar ray(\n" );   780                    fwri te( $rCach eFile, "         'Blo cks' => ar ray(\n" );
783                       781                    
784                    //ge t blocks o f column   782                    //ge t blocks o f column
785                    $sQu ery = "   783                    $sQu ery = "
786                         SELECT   784                         SELECT
787                             `ID`,   785                             `ID`,
788                             `Capti on`,   786                             `Capti on`,
789                             `Func` ,   787                             `Func` ,
790                             `Conte nt`,   788                             `Conte nt`,
791                             `Desig nBox`,   789                             `Desig nBox`,
792                             `Visib le`   790                             `Visib le`
793                         FROM `{$th is -> sDBT able}`   791                         FROM `{$th is -> sDBT able}`
794                         WHERE   792                         WHERE
795                             `Page`  = '$sPage Name' AND   793                             `Page`  = '$sPage Name' AND
796                             `Colum n` = $iCol umn   794                             `Colum n` = $iCol umn
797                         ORDER BY ` Order` ASC   795                         ORDER BY ` Order` ASC
798                    ";   796                    ";
799                    $rBl ocks = db_ res( $sQue ry );   797                    $rBl ocks = db_ res( $sQue ry );
800                       798                    
801                    whil e( $aBlock  = mysql_f etch_assoc ( $rBlocks  ) ) {   799                    whil e( $aBlock  = mysql_f etch_assoc ( $rBlocks  ) ) {
802                         fwrite( $r CacheFile,  "           {$aBlock ['ID']} =>  array(\n"  );   800                         fwrite( $r CacheFile,  "           {$aBlock ['ID']} =>  array(\n"  );
803                           801                        
804                         fwrite( $r CacheFile,  "             'Func'       => ' {$aBlock[' Func']}',\ n" );   802                         fwrite( $r CacheFile,  "             'Func'       => ' {$aBlock[' Func']}',\ n" );
805                         fwrite( $r CacheFile,  "             'Conte nt'   => ' " . $this  -> addSlas hes( $aBlo ck['Conten t'] ) . "' ,\n" );   803                         fwrite( $r CacheFile,  "             'Conte nt'   => ' " . $this  -> addSlas hes( $aBlo ck['Conten t'] ) . "' ,\n" );
806                         fwrite( $r CacheFile,  "             'Capti on'   => ' " . $this  -> addSlas hes( $aBlo ck['Captio n'] ) . "' ,\n" );   804                         fwrite( $r CacheFile,  "             'Capti on'   => ' " . $this  -> addSlas hes( $aBlo ck['Captio n'] ) . "' ,\n" );
807                         fwrite( $r CacheFile,  "             'Visib le'   => ' {$aBlock[' Visible']} ',\n" );   805                         fwrite( $r CacheFile,  "             'Visib le'   => ' {$aBlock[' Visible']} ',\n" );
808                         fwrite( $r CacheFile,  "             'Desig nBox' => { $aBlock['D esignBox'] }\n" );   806                         fwrite( $r CacheFile,  "             'Desig nBox' => { $aBlock['D esignBox'] }\n" );
809                           807                        
810                         fwrite( $r CacheFile,  "           ),\n" );  //close b lock   808                         fwrite( $r CacheFile,  "           ),\n" );  //close b lock
811                    }   809                    }
812                    fwri te( $rCach eFile, "         )\n"  ); //clos e blocks   810                    fwri te( $rCach eFile, "         )\n"  ); //clos e blocks
813                    fwri te( $rCach eFile, "       ),\n"  ); //close  column   811                    fwri te( $rCach eFile, "       ),\n"  ); //close  column
814                }   812                }
815                   813                
816                fwrite(  $rCacheFil e, "    )\ n" ); //cl ose column s   814                fwrite(  $rCacheFil e, "    )\ n" ); //cl ose column s
817                fwrite(  $rCacheFil e, "  ),\n " ); //clo se page   815                fwrite(  $rCacheFil e, "  ),\n " ); //clo se page
818           }   816           }
819              817           
820           fw rite( $rCa cheFile, " );\n" ); / /close mai n array   818           fw rite( $rCa cheFile, " );\n" ); / /close mai n array
821              819           
822           fc lose( $rCa cheFile );   820           fc lose( $rCa cheFile );
823           re turn true;   821           re turn true;
824       }   822       }
825          823       
826       functi on addSlas hes( $sTex t ) {   824       functi on addSlas hes( $sTex t ) {
827           $s Text = str _replace(  '\\', '\\\ \', $sText  );   825           $s Text = str _replace(  '\\', '\\\ \', $sText  );
828           $s Text = str _replace(  '\'', '\\\ '', $sText  );   826           $s Text = str _replace(  '\'', '\\\ '', $sText  );
829              827           
830           re turn $sTex t;   828           re turn $sTex t;
831       }   829       }
832   }   830   }