Cheetah
ChWsbPageViewAdmin.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  var $aPages = array();
11  var $oPage;
12  var $sPage_db; //name of current page, used form database manipulations
13  var $sDBTable; //used database table
14  var $bAjaxMode = false;
15  var $aTitles; // array containing aliases of pages
16 
17  function __construct( $sDBTable, $sCacheFile )
18  {
19  $GLOBALS['oAdmTemplate']->addJsTranslation(array(
20  '_adm_pbuilder_Reset_page_warning',
21  '_adm_pbuilder_Column_non_enough_width_warn',
22  '_adm_pbuilder_Column_delete_confirmation',
23  '_adm_pbuilder_Add_column',
24  '_adm_pbuilder_Want_to_delete',
25  '_delete'
26  ));
27 
28  $this -> sDBTable = $sDBTable;
29  $this -> sCacheFile = $sCacheFile;
30 
31  // special actions (without creating page)
32  if (isset($_REQUEST['action_sys'])) {
33  switch ($_REQUEST['action_sys']) {
34  case 'loadNewPageForm':
35  header('Content-Type: text/html; charset=utf-8');
36  echo $this -> showNewPageForm();
37  break;
38 
39  case 'createNewPage':
40  header('Content-Type:text/javascript');
41  echo json_encode($this->createUserPage());
42  break;
43 
44  case 'addCodeBlock':
45  header('Content-Type:text/javascript');
46  echo json_encode(array('result' => $GLOBALS['MySQL']->query("INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES ('', '1140px', 'Simple PHP Block', '_Code Block', 0, 0, 'Sample', 'Code', 11, 0, 'non,memb', 0, 0)") ? 'ok' : 'fail'));
47  break;
48 
49  case 'removeCodeBlock':
50  header('Content-Type:text/javascript');
51  echo json_encode(array('result' => $GLOBALS['MySQL']->query("DELETE FROM `sys_page_compose` WHERE `Func` = 'Sample' AND `Content` = 'Code'") ? 'ok' : 'fail'));
52  break;
53  }
54  exit;
55  }
56 
57  $sPage = process_pass_data( isset( $_REQUEST['Page'] ) ? trim( urldecode ($_REQUEST['Page']) ) : '' );
58 
59  $this -> getPages();
60 
61  if (strlen($sPage) && in_array($sPage, $this->aPages)) {
62  $this->oPage = new ChWsbPVAPage( $sPage, $this );
63  }
64 
65  $this -> checkAjaxMode();
66  if(!empty($_REQUEST['action']) && $this -> oPage) {
67  $this -> sPage_db = addslashes( $this -> oPage -> sName );
68 
69  switch( $_REQUEST['action'] ) {
70  case 'load':
71  header( 'Content-type:text/javascript' );
73  echo $this -> oPage -> getJSON();
74  break;
75 
76  case 'saveColsWidths':
77  if( is_array( $_POST['widths'] ) ) {
78  $this -> saveColsWidths( $_POST['widths'] );
79  $this -> createCache();
80  }
81  break;
82 
83  case 'saveBlocks':
84  if( is_array( $_POST['columns'] ) ) {
85  $this -> saveBlocks( $_POST['columns'] );
86  $this -> createCache();
87  }
88  break;
89 
90  case 'loadEditForm':
91  $iBlockID = (int)$_POST['id'];
92  if($iBlockID) {
93  header( 'Content-type:text/html;charset=utf-8' );
94  echo $this -> showPropForm( $iBlockID );
95  }
96  break;
97 
98  case 'saveItem':
99  if( (int)$_POST['id'] ) {
100  $this -> saveItem( $_POST );
101  $this -> createCache((int)$_POST['id']);
102  }
103  break;
104 
105  case 'deleteCustomPage' :
106  header( 'Content-type:text/html;charset=utf-8' );
107  $sPage = isset($_POST['Page']) ? $_POST['Page'] : '';
108 
109  if(!$sPage) {
110  echo _t('_Error Occured');
111  } else {
112  //remove page from page builder
113  $this -> deleteCustomPage($sPage);
114  }
115  break;
116 
117  case 'deleteBlock':
118  if( $iBlockID = (int)$_REQUEST['id'] ) {
119  $this -> deleteBlock( $iBlockID );
120  $this -> createCache();
121  }
122  break;
123 
124  case 'checkNewBlock':
125  if( $iBlockID = (int)$_REQUEST['id'] )
126  $this -> checkNewBlock( $iBlockID );
127  break;
128 
129  case 'savePageWidth':
130  if( $sPageWidth = process_pass_data( $_POST['width'] ) ) {
131  $this -> savePageWidth( $sPageWidth );
132  $this -> createCache();
133  }
134  break;
135 
136  case 'saveOtherPagesWidth':
137  if( $sWidth = $_REQUEST['width'] ) {
138  setParam( 'main_div_width', $sWidth );
139  echo 'OK';
140  }
141  break;
142 
143  case 'resetPage':
144  $this -> resetPage();
145  $this -> createCache();
146  break;
147  }
148  }
149  if($this -> bAjaxMode)
150  exit;
151 
152  $sMainPageContent = $this -> showBuildZone();
153 
155  $iNameIndex = 0;
156  $_page = array(
157  'name_index' => $iNameIndex,
158  'css_name' => array('pageBuilder.css', 'forms_adv.css'),
159  'js_name' => array('jquery.ui.core.min.js', 'jquery.ui.widget.min.js', 'jquery.ui.mouse.min.js', 'jquery.ui.sortable.min.js', 'jquery.ui.slider.min.js', 'jquery.cookie.min.js', 'ChWsbPageBuilder.js'),
160  'header' => _t('_adm_pbuilder_title'),
161  'header_text' => _t('_adm_pbuilder_box_title'),
162  );
163  $_page_cont[$iNameIndex]['page_main_code'] = $sMainPageContent;
164 
165  PageCodeAdmin();
166  }
167 
168  function createUserPage()
169  {
170  // Make sure page does not already exist.
171  $s = uriFilter($_REQUEST['uri']);
172  if (!uriCheckUniq($s, $this -> sDBTable . '_pages', 'Name')) {
173  return array('code' => '1', 'message' => 'Page with the name ' . $_REQUEST['uri'] . ' already exists.');
174  }
175 
176  // If here, then page name is ok, so create the new page.
177  $sUri = uriGenerate(process_db_input($_REQUEST['uri']), $this -> sDBTable . '_pages', 'Name');
178  $sTitle = process_db_input($_REQUEST['title']);
179 
180  $res = db_res("INSERT INTO `{$this -> sDBTable}_pages` (`Name`, `Title`, `Order`, `System`) SELECT '{$sUri}', '$sTitle', MAX(`Order`) + 1, '0' FROM `{$this -> sDBTable}_pages` LIMIT 1");
181  if(!db_affected_rows($res))
182  return array('code' => '1', 'message' => 'Failed database insert');
183 
184  $iPageId = db_last_id();
185  $oZ = new ChWsbAlerts('page_builder', 'page_add', $iPageId, 0, array('uri' => $sUri));
186  $oZ->alert();
187 
188  return array('code' => '0', 'message' => 'OK', 'uri' => $sUri);
189  }
190 
191  function savePageWidth( $sPageWidth )
192  {
193  $sPageWidth = process_db_input( $sPageWidth, CH_TAGS_STRIP );
194  $sQuery = "UPDATE `{$this -> sDBTable}` SET `PageWidth` = '{$sPageWidth}' WHERE `Page` = '{$this -> sPage_db}'";
195  db_res( $sQuery );
196 
197  echo 'OK';
198  }
199 
200  function createCache($iBlockId = 0)
201  {
202  $oCacher = new ChWsbPageViewCacher( $this -> sDBTable, $this -> sCacheFile );
203  $oCacher -> createCache();
204 
205  if ($iBlockId > 0) {
206  $oCacheBlocks = $oCacher->getBlocksCacheObject ();
207  $a = array (
208  $iBlockId.true.'tab'.false,
209  $iBlockId.false.'tab'.false,
210  $iBlockId.true.'popup'.false,
211  $iBlockId.false.'popup'.false,
212  $iBlockId.true.'tab'.true,
213  $iBlockId.false.'tab'.true,
214  $iBlockId.true.'popup'.true,
215  $iBlockId.false.'popup'.true
216  );
217  foreach ($a as $sKey)
218  $oCacheBlocks->delData($oCacher->genBlocksCacheKey ($sKey));
219  }
220 
221  }
222 
223  function checkNewBlock( $iBlockID )
224  {
225  $iBlockID = (int) $iBlockID;
226 
227  $sQuery = "SELECT `Desc`, `Caption`, `Func`, `Content`, `Visible`, `DesignBox` FROM `{$this -> sDBTable}` WHERE `ID` = '{$iBlockID}'";
228  $aBlock = db_assoc_arr( $sQuery );
229 
230  if( $aBlock['Func'] == 'Sample' ) {
231  if(substr($aBlock['Content'], 0, 7) == 'Custom_') {
232  $sName = str_replace('Custom_', '', $aBlock['Content']);
233  $sQuery = "SELECT `Eval` FROM `sys_custom_code_blocks` WHERE `Name` = '$sName'";
234  $sBlockContent = db_value( $sQuery );
235  } else {
236  $sBlockContent = '';
237  }
238  $sQuery = "
239  INSERT INTO `{$this -> sDBTable}` SET
240  `Desc` = '" . addslashes( $aBlock['Desc'] ) . "',
241  `Caption` = '" . addslashes( $aBlock['Caption'] ) . "',
242  `Func` = '{$aBlock['Content']}',
243  `Content` = '" . addslashes($sBlockContent) . "',
244  `Visible` = '{$aBlock['Visible']}',
245  `DesignBox` = '{$aBlock['DesignBox']}',
246  `Page` = '{$this -> sPage_db}'
247  ";
248  db_res( $sQuery );
249 
250  echo db_last_id();
251 
252  $this -> createCache();
253  }
254  }
255 
257  {
259  $sQuery = "DELETE `{$this -> sDBTable}_pages`, `{$this -> sDBTable}` FROM `{$this -> sDBTable}_pages`
260  LEFT JOIN `{$this -> sDBTable}` ON `{$this -> sDBTable}`.`Page` = `{$this -> sDBTable}_pages`.`Name`
261  WHERE `{$this -> sDBTable}_pages`.`Name` = '{$sPageName}'";
262 
263  if(!db_res($sQuery))
264  return false;
265 
266  $oZ = new ChWsbAlerts('page_builder', 'page_delete', 0, 0, array('uri' => $sPageName));
267  $oZ->alert();
268 
269  return true;
270  }
271 
272  function deleteBlock( $iBlockID )
273  {
274  $iBlockID = (int) $iBlockID;
275  $aBlock = db_assoc_arr("SELECT * FROM `{$this -> sDBTable}` WHERE `ID`='{$iBlockID}'");
276  if(empty($aBlock) || !is_array($aBlock))
277  return true;
278 
279  $sQuery = "DELETE FROM `{$this -> sDBTable}` WHERE `Page` = '{$this -> sPage_db}' AND `ID`='{$iBlockID}'";
280  if(!db_res( $sQuery ))
281  return false;
282 
283  $oZ = new ChWsbAlerts('page_builder', 'block_delete', $iBlockID, 0, array('page_uri' => $aBlock['Page']));
284  $oZ->alert();
285 
286  return true;
287  }
288 
289  function resetPage()
290  {
291  if( $this -> oPage -> bResetable ) {
292  $sQuery = "DELETE FROM `{$this -> sDBTable}` WHERE `Page` = '{$this -> sPage_db}'";
293  db_res($sQuery);
294  execSqlFile( $this -> oPage -> sDefaultSqlFile );
295 
296  $oZ = new ChWsbAlerts('page_builder', 'page_reset', 0, 0, array('uri' => $this -> sPage_db));
297  $oZ->alert();
298  }
299 
300  echo (int)$this -> oPage -> bResetable;
301  }
302 
303  function saveItem( $aData )
304  {
305  $iID = (int)$aData['id'];
306 
307  $sQuery = "SELECT `Func` FROM `{$this -> sDBTable}` WHERE `ID` = $iID";
308  $sFunc = db_value( $sQuery );
309  if( !$sFunc )
310  return;
311 
312  $sCaption = process_db_input($aData['Caption'], CH_TAGS_STRIP);
313  $iDesignBox = isset($aData['DesignBox']) > 0 ? (int)$aData['DesignBox'] : 1;
314  $sVisible = is_array( $aData['Visible'] ) ? implode( ',', $aData['Visible'] ) : '';
315  $iCache = (int)$aData['Cache'] > 0 ? (int)$aData['Cache'] : 0;
316 
317  if( $sFunc == 'RSS' )
318  $sContentUpd = "`Content` = '" . process_db_input($aData['Url'], CH_TAGS_STRIP) . '#' . (int)$aData['Num'] . "',";
319  elseif( $sFunc == 'Echo' || $sFunc == 'Text' || $sFunc == 'Code' || $sFunc == 'TrueText')
320  $sContentUpd = "`Content` = '" . process_db_input($aData['Content'], CH_TAGS_NO_ACTION) . "',";
321  elseif( $sFunc == 'XML' ) {
322  $iApplicationID = (int)$aData['application_id'];
323  $sContentUpd = "`Content` = '" . $iApplicationID . "',";
324  } elseif( substr($sFunc, 0, 7) == 'Custom_' ) {
325  $sName = str_replace('Custom_', '', $sFunc);
326  $sQuery = "SELECT `allow_eval_edit` FROM `sys_custom_code_blocks` WHERE `Name` = '$sName'";
327  $bAllowEdit = (int)db_value( $sQuery );
328  if($bAllowEdit) {
329  $sContentUpd = "`Content` = '" . process_db_input($aData['Content'], CH_TAGS_NO_ACTION) . "',";
330  }
331  } else
332  $sContentUpd = '';
333 
334  $sQuery = "
335  UPDATE `{$this -> sDBTable}` SET
336  `Caption` = '{$sCaption}',
337  {$sContentUpd}
338  `DesignBox` = '{$iDesignBox}',
339  `Visible` = '{$sVisible}',
340  `Cache` = '{$iCache}'
341  WHERE `ID` = '{$iID}'
342  ";
343  db_res( $sQuery );
344  $sCaption = process_pass_data($aData['Caption']);
345  if (mb_strlen($sCaption) == 0)
346  $sCaption = '_Empty';
347 
348  $oZ = new ChWsbAlerts('page_builder', 'block_form_save', $iID, 0, array('data' => $aData, 'caption_key' => &$sCaption));
349  $oZ->alert();
350 
351  echo _t($sCaption);
352  }
353 
354  function saveColsWidths( $aWidths )
355  {
356  $iCounter = 0;
357  foreach( $aWidths as $iWidth ) {
358  $iCounter ++;
359  $iWidth = (float)$iWidth;
360 
361  $sQuery = "UPDATE `{$this -> sDBTable}` SET `ColWidth` = $iWidth WHERE `Page` = '{$this -> sPage_db}' AND `Column` = $iCounter";
362  db_res( $sQuery );
363  }
364 
365  echo 'OK';
366  }
367 
368  function saveBlocks( $aColumns )
369  {
370  //reset blocks on this page
371  $sQuery = "UPDATE `{$this -> sDBTable}` SET `Column` = 0, `Order` = 0 WHERE `Page` = '{$this -> sPage_db}'";
372  db_res( $sQuery );
373 
374  $iColCounter = 0;
375  foreach( $aColumns as $sBlocks ) {
376  $iColCounter ++;
377 
378  $aBlocks = explode( ',', $sBlocks );
379  foreach( $aBlocks as $iOrder => $iBlockID ) {
380  $iBlockID = (int)$iBlockID;
381  $sQuery = "UPDATE `{$this -> sDBTable}` SET `Column` = $iColCounter, `Order` = $iOrder WHERE `ID` = $iBlockID AND `Page` = '{$this -> sPage_db}'";
382  db_res( $sQuery );
383  }
384  }
385 
386  echo 'OK';
387  }
388 
389  function getCssCode()
390  {
391  return $GLOBALS['oAdmTemplate']->addCss(array('general.css', 'forms_adv.css', 'plugins/jquery/themes/|jquery-ui.css'), true);
392  }
393 
394  function showBuildZone()
395  {
396  $sEditorId = $sEditorCode = '';
397 
398  ch_import('ChWsbEditor');
399  $oEditor = ChWsbEditor::getObjectInstance();
400  if($oEditor) {
401  $sEditorId = 'buildZoneEditor';
402  $sEditorCode = $oEditor->attachEditor('#' . $sEditorId, CH_EDITOR_FULL);
403  }
404 
405  return $GLOBALS['oAdmTemplate']->parseHtmlByName('pbuilder_content.html', array(
406  'top_controls' => $this->getPageSelector(),
407  'ch_if:page' => array(
408  'condition' => (bool)$this -> oPage,
409  'content' => array(
410  'ch_if:delete_link' => array(
411  'condition' => (isset($this->oPage->isSystem) && !$this->oPage->isSystem),
412  'content' => array(
413  )
414  ),
415  'ch_if:view_link' => array(
416  'condition' => (isset($this->oPage->isSystem) && !$this->oPage->isSystem),
417  'content' => array(
418  'site_url' => $GLOBALS['site']['url'],
419  'page_name' => (!isset($this->oPage->sName)) ?: htmlspecialchars($this->oPage->sName)
420  )
421  ),
422  'parser_url' => ch_html_attribute($_SERVER['PHP_SELF']),
423  'page_name' => (!isset($this->oPage->sName)) ?: addslashes($this->oPage->sName),
424  'page_width_min' => getParam('sys_template_page_width_min'),
425  'page_width_max' => getParam('sys_template_page_width_max'),
426  'page_width' => (!isset($this->oPage->iPageWidth)) ?: $this->oPage->iPageWidth,
427  'main_width' => getParam('main_div_width')
428  )
429  ),
430  'ch_if:empty' => array(
431  'condition' => !(bool)$this -> oPage,
432  'content' => array(
433  'content' => MsgBox(_t('_Empty'))
434  )
435  ),
436  'ch_if:editor' => array(
437  'condition' => !empty($sEditorCode),
438  'content' => array(
439  'editor_id' => $sEditorId,
440  'editor_code' => $sEditorCode
441  )
442  )
443  ));
444  }
445 
446  function getPageSelector()
447  {
448  $bPage = !empty($this->oPage->sName);
449  $aPages = array(
450  array(
451  'value' => 'none',
452  'title' => _t('_adm_txt_pb_select_page'),
453  'selected' => !$bPage ? 'selected="selected"' : ''
454  )
455  );
456 
457  asort($this->aTitles);
458  foreach($this->aTitles as $sName => $sTitle)
459  $aPages[] = array(
460  'value' => htmlspecialchars_adv(urlencode($sName)),
461  'title' => htmlspecialchars(!empty($sTitle) ? $sTitle : $sName),
462  'selected' => (isset($this->oPage->sName) && $this->oPage->sName == $sName) ? 'selected="selected"' : ''
463  );
464 
465  return $GLOBALS['oAdmTemplate']->parseHtmlByName('pbuilder_cpanel.html', array(
466  'ch_repeat:pages' => $aPages,
467  'ch_if:show_add_column' => array(
468  'condition' => $bPage,
469  'content' => array()
470  ),
471  'url' => ch_html_attribute($_SERVER['PHP_SELF'])
472  ));
473  }
474 
475  function getPages()
476  {
477  $sPagesQuery = "SELECT `Name`, `Title` FROM `{$this -> sDBTable}_pages` ORDER BY `Order`";
478 
479  $rPages = db_res( $sPagesQuery );
480  while( $aPage = $rPages->fetch() ) {
481  $this -> aPages[] = $aPage['Name'];
482  $this -> aTitles[$aPage['Name']] = $aPage['Title'];
483  }
484  }
485 
486  function checkAjaxMode()
487  {
488  if( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' )
489  $this -> bAjaxMode = true;
490  }
491 
492  function showPropForm($iBlockID)
493  {
494  $sNoPropertiesC = _t('_adm_pbuilder_This_block_has_no_properties');
495  $sProfileFieldsC = _t('_adm_pbuilder_Profile_Fields');
496  $sHtmlBlockC = _t('_adm_pbuilder_HTML_Block');
497  $sXmlBlockC = _t('_adm_pbuilder_XML_Block');
498  $sRssBlockC = _t('_adm_pbuilder_RSS_Feed');
499  $sCustomBlockC = _t('_adm_pbuilder_Custom_Block');
500  $sPhpBlockC = _t('_adm_pbuilder_Code_Block');
501  $sTextBlockC = _t('_adm_pbuilder_Text_Block');
502  $sTrueTextBlockC = _t('_adm_pbuilder_TrueText_Block');
503  $sSpecialBlockC = _t('_adm_pbuilder_Special_Block');
504  $sXmlPathC = _t('_adm_pbuilder_XML_path');
505  $sUrlRssFeedC = _t('_adm_pbuilder_Url_of_RSS_feed');
506  $sNumbRssItemsC = _t('_adm_pbuilder_Number_RSS_items');
507  $sTypeC = _t('_Type');
508  $sDescriptionC = _t('_Description');
509  $sCaptionLangKeyC = _t('_adm_pbuilder_Caption_Lang_Key');
510  $sDesignBoxLangKeyC = _t('_adm_pbuilder_DesignBox_Lang_Key');
511  $sVisibleForC = _t('_adm_mbuilder_Visible_for');
512  $sGuestC = _t('_Guest');
513  $sMemberC = _t('_Member');
514 
515  $sQuery = "SELECT * FROM `{$this -> sDBTable}` WHERE `Page` = '{$this -> sPage_db}' AND `ID` = $iBlockID";
516  $aItem = db_assoc_arr($sQuery);
517  if(!$aItem) {
518  $aOptions = array(
519  //'timer' => 0,
520  //'onTimer' => '',
521  'showclosebtn' => true,
522  'removefog' => true,
523  'class' => 'MsgBoxInfo ch-def-font-large',
524  'buttonclass' => 'ch-btn',
525  'showtitle' => true,
526  'showtitleclose' => true,
527  'titletext' => 'Info!',
528  'titleclass' => 'MsgBoxTitleInfo ch-def-font-large',
529  'showicon' => true,
530  'icon' => 'info-circle',
531  'iconclass' => 'sys-icon icon-large',
532  );
533  return AdvMsgBox($sNoPropertiesC, $aOptions);
534  }
535 
536  $sPageName = htmlspecialchars($this->oPage->sName);
537 
538  $sBlockType = '';
539  switch( $aItem['Func'] ) {
540  case 'PFBlock': $sBlockType = $sProfileFieldsC; break;
541  case 'Echo': $sBlockType = $sHtmlBlockC; break;
542  case 'Text': $sBlockType = $sTextBlockC; break;
543  case 'TrueText': $sBlockType = $sTrueTextBlockC; break;
544  case 'Code': $sBlockType = $sPhpBlockC; break;
545  case 'XML': $sBlockType = $sXmlBlockC; break;
546  case 'RSS': $sBlockType = $sRssBlockC; break;
547  default: $sBlockType = $sSpecialBlockC; break;
548  }
549 
550  if($sBlockType == $sSpecialBlockC) {
551  if(substr($aItem['Func'], 0, 7) == 'Custom_') $sBlockType = $sCustomBlockC;
552  }
553 
554  $aVisibleValues = array();
555  if(strpos($aItem['Visible'], 'non') !== false)
556  $aVisibleValues[] = 'non';
557  if(strpos( $aItem['Visible'], 'memb' ) !== false)
558  $aVisibleValues[] = 'memb';
559 
560  $aForm = array(
561  'form_attrs' => array(
562  'name' => 'formItemEdit',
563  'action' => ch_html_attribute($_SERVER['PHP_SELF']),
564  'method' => 'post',
565  ),
566  'inputs' => array(
567  'Page' => array(
568  'type' => 'hidden',
569  'name' => 'Page',
570  'value' => $sPageName,
571  ),
572  'id' => array(
573  'type' => 'hidden',
574  'name' => 'id',
575  'value' => $iBlockID,
576  ),
577  'action' => array(
578  'type' => 'hidden',
579  'name' => 'action',
580  'value' => 'saveItem',
581  ),
582  'Cache' => array(
583  'type' => 'hidden',
584  'name' => 'Cache',
585  'value' => (int)$aItem['Cache'],
586  ),
587  'header1' => array(
588  'type' => 'value',
589  'name' => 'header1',
590  'caption' => $sTypeC,
591  'value' => $sBlockType,
592  ),
593  'header2' => array(
594  'type' => 'value',
595  'name' => 'header2',
596  'caption' => $sDescriptionC,
597  'value' => $aItem['Desc'],
598  ),
599  'Caption' => array(
600  'type' => 'text',
601  'name' => 'Caption',
602  'caption' => $sCaptionLangKeyC,
603  'value' => $aItem['Caption'],
604  'required' => true,
605  ),
606  'DesignBox' => array(
607  'type' => 'select',
608  'name' => 'DesignBox',
609  'caption' => $sDesignBoxLangKeyC,
610  'value' => $aItem['DesignBox'],
611  'values' => array(
612  array('key' => 2, 'value' => _t('_adm_pbuilder_DesignBox_2')),
613  array('key' => 0, 'value' => _t('_adm_pbuilder_DesignBox_0')),
614  array('key' => 11, 'value' => _t('_adm_pbuilder_DesignBox_11')),
615  array('key' => 1, 'value' => _t('_adm_pbuilder_DesignBox_1')),
616  array('key' => 13, 'value' => _t('_adm_pbuilder_DesignBox_13')),
617  array('key' => 3, 'value' => _t('_adm_pbuilder_DesignBox_3')),
618  ),
619  'required' => true,
620  ),
621  'Visible' => array(
622  'type' => 'checkbox_set',
623  'caption' => $sVisibleForC,
624  'name' => 'Visible',
625  'value' => $aVisibleValues,
626  'values' => array(
627  'non' => $sGuestC,
628  'memb' => $sMemberC
629  )
630  )
631  ),
632  );
633 
634  $sBlockContent = $aItem['Content'];
635  //$sBlockContent = htmlspecialchars_adv( $aItem['Content'] );
636 
637  if( $aItem['Func'] == 'Echo' ) {
638  $sMceEditorKey = 'ch_mce_editor_disabled';
639  $bMceEditor = !isset($_COOKIE[$sMceEditorKey]) || (int)$_COOKIE[$sMceEditorKey] != 1;
640 
641  $aForm['inputs']['Content'] = array(
642  'type' => 'textarea',
643  'html' => 2, // $bMceEditor ? 2 : 0,
644  // 'html_toggle' => true,
645  'dynamic' => true,
646  'attrs' => array ('id' => 'form_input_html'.$iBlockID, 'style' => 'height:250px;'),
647  'name' => 'Content',
648  'value' => $sBlockContent,
649  'colspan' => true,
650  );
651  } elseif( $aItem['Func'] == 'Text' || $aItem['Func'] == 'Code' || $aItem['Func'] == 'TrueText') {
652 
653  $aForm['inputs']['Content'] = array(
654  'type' => 'textarea',
655  'name' => 'Content',
656  'value' => $sBlockContent,
657  'colspan' => true,
658  );
659 
660  } elseif( substr($aItem['Func'], 0, 7) == 'Custom_' ) {
661  $sName = str_replace('Custom_', '', $aItem['Func']);
662  $sQuery = "SELECT `allow_eval_edit` FROM `sys_custom_code_blocks` WHERE `Name` = '$sName'";
663  $bAllowEdit = (int)db_value( $sQuery );
664  if($bAllowEdit) {
665  $aForm['inputs']['Content'] = array(
666  'type' => 'textarea',
667  'name' => 'Content',
668  'caption' => '<div class="ch-form-caption ch-def-font-inputs-captions">' . _t('_adm_pbuilder_eval_code') . '</div>',
669  'value' => $sBlockContent,
670  'colspan' => true,
671  );
672  }
673 
674  } elseif( $aItem['Func'] == 'XML' ) {
675  $aExistedApplications = ChWsbService::call('open_social', 'get_admin_applications', array());
676 
677  $aForm['inputs']['Applications'] = array(
678  'type' => 'select',
679  'name' => 'application_id',
680  'caption' => _t('_osi_Existed_applications'),
681  'values' => $aExistedApplications
682  );
683  } elseif( $aItem['Func'] == 'RSS' ) {
684  list( $sUrl, $iNum ) = explode( '#', $aItem['Content'] );
685  $iNum = (int)$iNum;
686 
687  $aForm['inputs']['Url'] = array(
688  'type' => 'text',
689  'name' => 'Url',
690  'caption' => $sUrlRssFeedC,
691  'value' => $sUrl,
692  'required' => true,
693  );
694  $aForm['inputs']['Num'] = array(
695  'type' => 'text',
696  'name' => 'Num',
697  'caption' => $sNumbRssItemsC,
698  'value' => $iNum,
699  'required' => true,
700  );
701  }
702 
703  $aForm['inputs']['controls'] = array(
704  'type' => 'input_set',
705  array(
706  'type' => 'submit',
707  'name' => 'Save',
708  'value' => _t('_Save')
709  )
710  );
711 
712  if ($aItem['Func'] == 'RSS' || $aItem['Func'] == 'Echo' || $aItem['Func'] == 'Text' || $aItem['Func'] == 'TrueText' || $aItem['Func'] == 'Code' || $aItem['Func'] == 'XML') {
713  $aForm['inputs']['controls'][] = array(
714  'type' => 'reset',
715  'name' => 'Delete',
716  'value' => _t('_Delete')
717  );
718  }
719 
720  if (substr($aItem['Func'], 0, 7) == 'Custom_') {
721  $aForm['inputs']['controls'][] = array(
722  'type' => 'reset',
723  'name' => 'Delete',
724  'value' => _t('_Delete')
725  );
726  }
727 
728  $oZ = new ChWsbAlerts('page_builder', 'block_form_display', $iBlockID, 0, array('form' => &$aForm));
729  $oZ->alert();
730 
731  $sResult = '';
733 
734  $sContent = '';
735  $sContent .= $this->getCssCode();
736  $sContent .= $oForm->getCode();
737 
738  $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sContent));
739  return $GLOBALS['oFunctions']->popupBox('adm-pbuilder-properties', _t('_adm_pbuilder_Block'), $sContent);
740  }
741 
742  function showNewPageForm()
743  {
744  $oForm = new ChTemplFormView(array(
745  'form_attrs' => array(
746  'name' => 'formItemEdit',
747  'action' => ch_html_attribute($_SERVER['PHP_SELF']),
748  'method' => 'post',
749  ),
750  'inputs' => array(
751  array(
752  'type' => 'hidden',
753  'name' => 'action_sys',
754  'value' => 'createNewPage',
755  ),
756  array(
757  'type' => 'text',
758  'name' => 'uri',
759  'value' => 'newpage',
760  'caption' => _t('_Page URI'),
761  'info' => _t('_adm_pbuilder_uri_info', CH_WSB_URL_ROOT . 'page/newpage'),
762  ),
763  array(
764  'type' => 'text',
765  'name' => 'title',
766  'caption' => _t('_Page title'),
767  'value' => 'New Page',
768  'info' => _t('_adm_pbuilder_title_info'),
769  ),
770  array(
771  'type' => 'submit',
772  'name' => 'do_submit',
773  'value' => _t('_adm_btn_Create_page'),
774  ),
775  ),
776  ));
777 
778  $sContent = '';
779  $sContent .= $this->getCssCode();
780  $sContent .= $oForm->getCode();
781 
782  $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sContent));
783  return $GLOBALS['oFunctions']->popupBox('adm-pbuilder-add-page', _t('_adm_pbuilder_Create_new_page'), $sContent);
784  }
785 }
786 
788 {
789  var $sName;
791  var $oParent;
792  var $aColsWidths = array();
793  var $aBlocks = array();
794  var $aBlocksOrder = array();
795  var $aBlocksInactive = array();
796  var $aBlocksSamples = array();
797  var $aMinWidths = array();
799  var $bResetable; //defines if the page can be reset
800  var $sDefaultSqlFile; //file containing default setting for reset
801  var $isSystem; // defines if the page is system or created by admin
802 
803  function __construct( $sPage, &$oParent )
804  {
805  global $admin_dir;
806 
807  $this -> sName = $sPage;
808  $this -> sName_db = addslashes( $this -> sName );
809 
810  /* @var $this->oParent ChWsbPageViewAdmin */
811  $this -> oParent = &$oParent;
812 
813  $this -> sDefaultSqlFile = CH_DIRECTORY_PATH_ROOT . "{$admin_dir}/default_builders/{$this -> oParent -> sDBTable}_{$this -> sName}.sql";
814  $this -> bResetable = file_exists( $this -> sDefaultSqlFile );
815 
816  $this -> loadContent();
817  }
818 
819  function loadContent()
820  {
821  global $MySQL;
822 
823  $sQuery = "SELECT `System` FROM `{$this -> oParent -> sDBTable}_pages` WHERE `Name` = '{$this -> sName_db}'";
824  $this->isSystem = (int)$MySQL->getOne($sQuery) == 1;
825 
826  //get page width
827  $sQuery = "SELECT `PageWidth` FROM `{$this -> oParent -> sDBTable}` WHERE `Page` = '{$this -> sName_db}' LIMIT 1";
828  $this->iPageWidth = $MySQL->getOne($sQuery);
829 
830  if(!$this->iPageWidth)
831  $this->iPageWidth = '960px';
832 
833  //get columns widths
834  $sQuery = "SELECT
835  `Column`,
836  `ColWidth`
837  FROM `{$this -> oParent -> sDBTable}`
838  WHERE
839  `Page` = ? AND
840  `Column` != 0
841  GROUP BY `Column`
842  ORDER BY `Column`";
843 
844  $aColumns = $MySQL->getAllWithKey($sQuery, 'Column', [$this -> sName_db]);
845 
846  ksort($aColumns);
847 
848  foreach($aColumns as $aColumn) {
849  $iColumn = (int)$aColumn['Column'];
850  $this -> aColsWidths[$iColumn] = (float)$aColumn['ColWidth'];
851  $this -> aBlocks[$iColumn] = array();
852  $this -> aBlocksOrder[$iColumn]= array();
853 
854  //get active blocks
855  $sQueryActive = "SELECT
856  `ID`,
857  `Caption`
858  FROM `{$this -> oParent -> sDBTable}`
859  WHERE
860  `Page` = ? AND
861  `Column` = ?
862  ORDER BY `Order`";
863 
864  $aBlocks = $MySQL->getAll($sQueryActive, [$this -> sName_db, $iColumn]);
865  foreach($aBlocks as $aBlock) {
866  $this->aBlocks[$iColumn][$aBlock['ID']] = _t($aBlock['Caption']);
867  $this->aBlocksOrder[$iColumn][] = $aBlock['ID'];
868  }
869  }
870 
871  // load minimal widths
872  $sQuery = "SELECT `ID`, `MinWidth` FROM `{$this -> oParent -> sDBTable}` WHERE `MinWidth` > 0 AND `Page`= ?";
873  $aBlocks = $MySQL->getAll($sQuery, [$this -> sName_db]);
874  foreach($aBlocks as $aBlock)
875  $this->aMinWidths[(int)$aBlock['ID']] = (int)$aBlock['MinWidth'];
876 
877  $this->loadInactiveBlocks();
878  }
879 
881  {
882  //get inactive blocks and samples
883  $sQueryInactive = "
884  SELECT
885  `ID`,
886  `Caption`
887  FROM `{$this -> oParent -> sDBTable}`
888  WHERE
889  `Page` = '{$this -> sName_db}' AND
890  `Column` = 0
891  ";
892 
893  $sQuerySamples = "
894  SELECT
895  `ID`,
896  `Caption`
897  FROM `{$this -> oParent -> sDBTable}`
898  WHERE
899  `Func` = 'Sample'
900  ";
901 
902  $rInactive = db_res( $sQueryInactive );
903  $rSamples = db_res( $sQuerySamples );
904 
905  while( $aBlock = $rInactive ->fetch() )
906  $this -> aBlocksInactive[ (string)$aBlock['ID'] . ' '] = _t( $aBlock['Caption'] );
907 
908  while( $aBlock = $rSamples ->fetch() )
909  $this -> aBlocksSamples[ (int)$aBlock['ID'] ] = _t( $aBlock['Caption'] );
910 
911  asort($this -> aBlocksInactive, SORT_STRING | SORT_FLAG_CASE);
912  }
913 
914  function getJSON()
915  {
916  $oPVAPageJSON = new ChWsbPVAPageJSON( $this );
917  return json_encode($oPVAPageJSON);
918  }
919 
920 }
921 
922 /* temporary JSON object */
924 {
925  var $active;
928  var $samples;
929  var $widths;
931 
932  function __construct( $oParent )
933  {
934  $this -> widths = $oParent -> aColsWidths;
935  $this -> min_widths = $oParent -> aMinWidths;
936  $this -> active = $oParent -> aBlocks;
937  $this -> active_order = $oParent -> aBlocksOrder;
938  $this -> inactive = $oParent -> aBlocksInactive;
939  $this -> samples = $oParent -> aBlocksSamples;
940  }
941 }
942 
944 {
947 
948  function __construct( $sDBTable, $sCacheFile )
949  {
950  $this -> sDBTable = $sDBTable;
951  $this -> sCacheFile = $sCacheFile;
952  }
953 
954  function createCache()
955  {
956  global $MySQL;
957 
958  $oCacheBlocks = $this->getBlocksCacheObject ();
959  $oCacheBlocks->removeAllByPrefix ('pb_');
960 
961  $sCacheString = "// cache of Page View composer\n\nreturn array(\n //pages\n";
962 
963  //get pages
964 
965  $sQuery = "SELECT `Page` AS `Name` FROM `{$this -> sDBTable}` WHERE `Page` != '' GROUP BY `Page`";
966 
967  $rPages = db_res( $sQuery );
968 
969  while ($aPageN = $rPages->fetch()) {
970  $sPageName = addslashes($aPageN['Name']);
971  $aPageN['Title'] = db_value("SELECT `Title` FROM `{$this -> sDBTable}_pages` WHERE `Name` = '$sPageName'");
972  $sPageTitle = addslashes($aPageN['Title']);
973  $sPageWidth = db_value("SELECT `PageWidth` FROM `{$this -> sDBTable}` WHERE `Page` = '$sPageName' LIMIT 1");
974  $sPageWidth = empty($sPageWidth) ? '998px' : $sPageWidth;
975 
976  $sCacheString .= " '$sPageName' => array(\n";
977  $sCacheString .= " 'Title' => '$sPageTitle',\n";
978  $sCacheString .= " 'Width' => '$sPageWidth',\n";
979  $sCacheString .= " 'Columns' => array(\n";
980 
981  //get columns
982  $sQuery = "SELECT
983  `Column`,
984  `ColWidth`
985  FROM `{$this -> sDBTable}`
986  WHERE
987  `Page` = ? AND
988  `Column` > 0
989  GROUP BY `Column`
990  ORDER BY `Column`";
991  $aColumns = $MySQL->getAllWithKey($sQuery, 'Column', [$sPageName]);
992 
993  ksort($aColumns);
994 
995  foreach($aColumns as $aColumn) {
996  $iColumn = $aColumn['Column'];
997  $iColWidth = $aColumn['ColWidth'];
998 
999  $sCacheString .= " $iColumn => array(\n";
1000  $sCacheString .= " 'Width' => $iColWidth,\n";
1001  $sCacheString .= " 'Blocks' => array(\n";
1002 
1003  //get blocks of column
1004  $sQuery = "SELECT
1005  `ID`,
1006  `Caption`,
1007  `Func`,
1008  `Content`,
1009  `DesignBox`,
1010  `Visible`,
1011  `Cache`
1012  FROM `{$this -> sDBTable}`
1013  WHERE
1014  `Page` = ? AND
1015  `Column` = ?
1016  ORDER BY `Order` ASC";
1017  $aBlocks = $MySQL->getAll($sQuery, [$sPageName, $iColumn]);
1018 
1019  foreach($aBlocks as $aBlock) {
1020  $sCacheString .= " {$aBlock['ID']} => array(\n";
1021 
1022  $sCacheString .= " 'Func' => '{$aBlock['Func']}',\n";
1023  $sCacheString .= " 'Content' => '" . $this -> addSlashes( $aBlock['Content'] ) . "',\n";
1024  $sCacheString .= " 'Caption' => '" . $this -> addSlashes( $aBlock['Caption'] ) . "',\n";
1025  $sCacheString .= " 'Visible' => '{$aBlock['Visible']}',\n";
1026  $sCacheString .= " 'DesignBox' => {$aBlock['DesignBox']},\n";
1027  $sCacheString .= " 'Cache' => {$aBlock['Cache']}\n";
1028 
1029  $sCacheString .= " ),\n"; //close block
1030  }
1031  $sCacheString .= " )\n"; //close blocks
1032  $sCacheString .= " ),\n"; //close column
1033  }
1034 
1035  $sCacheString .= " )\n"; //close columns
1036  $sCacheString .= " ),\n"; //close page
1037  }
1038 
1039  $sCacheString .= ");\n"; //close main array
1040 
1041  $aResult = eval($sCacheString);
1042 
1043  $oCache = $MySQL->getDbCacheObject();
1044  $oCache->setData ($MySQL->genDbCacheKey($this -> sCacheFile), $aResult);
1045 
1046  return true;
1047  }
1048 
1049  function addSlashes( $sText )
1050  {
1051  $sText = str_replace( '\\', '\\\\', $sText );
1052  $sText = str_replace( '\'', '\\\'', $sText );
1053 
1054  return $sText;
1055  }
1056 
1058  {
1059  if ($this->oBlocksCacheObject != null) {
1061  } else {
1062  $sEngine = getParam('sys_pb_cache_engine');
1063  $this->oBlocksCacheObject = ch_instance ('ChWsbCache'.$sEngine);
1064  if (!$this->oBlocksCacheObject->isAvailable())
1065  $this->oBlocksCacheObject = ch_instance ('ChWsbCacheFile');
1067  }
1068  }
1069 
1071  {
1072  global $site;
1073  return 'pb_' . $sId . '_' . md5($site['ver'] . $site['build'] . $site['url'] . getCurrentLangName(false) . $GLOBALS['oSysTemplate']->getCode()) . '.php';
1074  }
1075 }
ChWsbPageViewAdmin\showNewPageForm
showNewPageForm()
Definition: ChWsbPageViewAdmin.php:742
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
ChWsbPVAPage\$aBlocksSamples
$aBlocksSamples
Definition: ChWsbPageViewAdmin.php:796
ChWsbPVAPageJSON\$min_widths
$min_widths
Definition: ChWsbPageViewAdmin.php:930
ChWsbPVAPage\$bResetable
$bResetable
Definition: ChWsbPageViewAdmin.php:799
ChWsbPageViewAdmin\checkNewBlock
checkNewBlock( $iBlockID)
Definition: ChWsbPageViewAdmin.php:223
ChTemplFormView
Definition: ChTemplFormView.php:11
ChWsbPVAPageJSON\$active
$active
Definition: ChWsbPageViewAdmin.php:925
db_assoc_arr
db_assoc_arr($query, $bindings=[])
Definition: db.inc.php:86
ChWsbPVAPage\getJSON
getJSON()
Definition: ChWsbPageViewAdmin.php:914
$sPageTitle
$sPageTitle
Definition: antispam.php:374
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
getCurrentLangName
if(!defined('CH_SKIP_INSTALL_CHECK')) getCurrentLangName($isSetCookie=true)
Definition: languages.inc.php:36
ChWsbPageViewCacher\addSlashes
addSlashes( $sText)
Definition: ChWsbPageViewAdmin.php:1049
ChWsbPageViewAdmin\$sPage_db
$sPage_db
Definition: ChWsbPageViewAdmin.php:12
ChWsbPageViewAdmin\createCache
createCache($iBlockId=0)
Definition: ChWsbPageViewAdmin.php:200
uriGenerate
uriGenerate($s, $sTable, $sField, $iMaxLen=255)
Definition: utils.inc.php:900
ChWsbPageViewAdmin\checkAjaxMode
checkAjaxMode()
Definition: ChWsbPageViewAdmin.php:486
$sResult
$sResult
Definition: advanced_settings.php:26
$sPageName
$sPageName
Definition: viewPage.php:20
$_page
$_page['name_index']
Definition: about_us.php:13
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$aResult
$aResult
Definition: index.php:19
ChWsbPageViewAdmin\saveItem
saveItem( $aData)
Definition: ChWsbPageViewAdmin.php:303
$_page_cont
$_page_cont[$_ni]['page_main_code']
Definition: about_us.php:24
ChWsbPVAPage\loadContent
loadContent()
Definition: ChWsbPageViewAdmin.php:819
ChWsbPVAPage\loadInactiveBlocks
loadInactiveBlocks()
Definition: ChWsbPageViewAdmin.php:880
ChWsbPVAPage\$iPageWidth
$iPageWidth
Definition: ChWsbPageViewAdmin.php:798
$sUrl
$sUrl
Definition: cart.php:15
php
$oZ
$oZ
Definition: db.php:20
ChWsbPVAPage\$oParent
$oParent
Definition: ChWsbPageViewAdmin.php:791
ChWsbPVAPage\__construct
__construct( $sPage, &$oParent)
Definition: ChWsbPageViewAdmin.php:803
send_headers_page_changed
send_headers_page_changed()
Definition: design.inc.php:99
ChWsbPageViewAdmin\showBuildZone
showBuildZone()
Definition: ChWsbPageViewAdmin.php:394
ChWsbPageViewAdmin\savePageWidth
savePageWidth( $sPageWidth)
Definition: ChWsbPageViewAdmin.php:191
ChWsbPageViewCacher
Definition: ChWsbPageViewAdmin.php:944
ChWsbPageViewAdmin\getPageSelector
getPageSelector()
Definition: ChWsbPageViewAdmin.php:446
$oCache
$oCache
Definition: prof.inc.php:10
ChWsbPVAPageJSON\__construct
__construct( $oParent)
Definition: ChWsbPageViewAdmin.php:932
uriCheckUniq
uriCheckUniq($s, $sTable, $sField)
Definition: utils.inc.php:949
AdvMsgBox
AdvMsgBox($sText, $aOptions=array())
Definition: design.inc.php:180
ch_html_attribute
ch_html_attribute($mixedInput)
Definition: utils.inc.php:1324
ChWsbPVAPage\$aBlocksOrder
$aBlocksOrder
Definition: ChWsbPageViewAdmin.php:794
$oForm
$oForm
Definition: host_tools.php:42
ChWsbPVAPage\$sName_db
$sName_db
Definition: ChWsbPageViewAdmin.php:790
ChWsbPVAPageJSON\$samples
$samples
Definition: ChWsbPageViewAdmin.php:928
ChWsbAlerts
Definition: ChWsbAlerts.php:39
ChWsbPageViewCacher\$oBlocksCacheObject
$oBlocksCacheObject
Definition: ChWsbPageViewAdmin.php:946
exit
exit
Definition: cart.php:21
and
and
Definition: license.txt:18
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
$sTitle
$sTitle
Definition: actions.inc.php:13
ChWsbEditor\getObjectInstance
static getObjectInstance($sObject=false)
Definition: ChWsbEditor.php:87
htmlspecialchars_adv
htmlspecialchars_adv($string)
Definition: utils.inc.php:302
$site
$site['ver']
Definition: version.inc.php:8
db_last_id
db_last_id()
Definition: db.inc.php:47
$_REQUEST
$_REQUEST['action']
Definition: cmd.php:11
ChWsbPageViewAdmin\$sDBTable
$sDBTable
Definition: ChWsbPageViewAdmin.php:13
CH_TAGS_NO_ACTION
const CH_TAGS_NO_ACTION
Definition: utils.inc.php:21
ChWsbPageViewAdmin
Definition: ChWsbPageViewAdmin.php:9
uriFilter
uriFilter($s)
Definition: utils.inc.php:931
ch_instance
ch_instance($sClassName, $aParams=array(), $aModule=array())
Definition: utils.inc.php:1264
ChWsbPageViewAdmin\createUserPage
createUserPage()
Definition: ChWsbPageViewAdmin.php:168
ChWsbPageViewAdmin\resetPage
resetPage()
Definition: ChWsbPageViewAdmin.php:289
execSqlFile
execSqlFile($sFileName)
Definition: utils.inc.php:843
ChWsbPVAPage\$aBlocksInactive
$aBlocksInactive
Definition: ChWsbPageViewAdmin.php:795
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
PageCodeAdmin
PageCodeAdmin($oTemplate=null)
Definition: admin_design.inc.php:45
ChWsbPVAPageJSON\$active_order
$active_order
Definition: ChWsbPageViewAdmin.php:926
ChWsbPageViewCacher\$sCacheFile
$sCacheFile
Definition: ChWsbPageViewAdmin.php:945
$sContent
$sContent
Definition: bottom_menu_compose.php:169
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChWsbPageViewAdmin\deleteCustomPage
deleteCustomPage($sPageName)
Definition: ChWsbPageViewAdmin.php:256
CH_EDITOR_FULL
const CH_EDITOR_FULL
Definition: ChWsbEditor.php:20
ChWsbPageViewAdmin\__construct
__construct( $sDBTable, $sCacheFile)
Definition: ChWsbPageViewAdmin.php:17
ChWsbPageViewAdmin\$oPage
$oPage
Definition: ChWsbPageViewAdmin.php:11
db_affected_rows
db_affected_rows($oStmt=null)
Definition: db.inc.php:56
ChWsbPageViewAdmin\$bAjaxMode
$bAjaxMode
Definition: ChWsbPageViewAdmin.php:14
ChWsbPVAPageJSON
Definition: ChWsbPageViewAdmin.php:924
CH_TAGS_STRIP
const CH_TAGS_STRIP
Definition: utils.inc.php:22
ChWsbPageViewAdmin\$aPages
$aPages
Definition: ChWsbPageViewAdmin.php:10
ChWsbPageViewAdmin\showPropForm
showPropForm($iBlockID)
Definition: ChWsbPageViewAdmin.php:492
ChWsbPageViewCacher\__construct
__construct( $sDBTable, $sCacheFile)
Definition: ChWsbPageViewAdmin.php:948
ChWsbPVAPage\$aBlocks
$aBlocks
Definition: ChWsbPageViewAdmin.php:793
ChWsbPageViewAdmin\saveColsWidths
saveColsWidths( $aWidths)
Definition: ChWsbPageViewAdmin.php:354
$s
$s
Definition: embed.php:13
setParam
setParam($sParamName, $sParamValue)
Definition: db.inc.php:149
process_pass_data
process_pass_data($text, $strip_tags=0)
Definition: utils.inc.php:290
ChWsbPageViewAdmin\getCssCode
getCssCode()
Definition: ChWsbPageViewAdmin.php:389
db_res
db_res($query, $bindings=[])
Definition: db.inc.php:39
$sId
$sId
Definition: actions.inc.php:8
db_value
db_value($query, $bindings=[], $error_checking=true, $index=0)
Definition: db.inc.php:98
$aForm
$aForm
Definition: forgot.php:43
ChWsbPVAPageJSON\$inactive
$inactive
Definition: ChWsbPageViewAdmin.php:927
ChWsbPageViewAdmin\saveBlocks
saveBlocks( $aColumns)
Definition: ChWsbPageViewAdmin.php:368
$sCaption
$sCaption
Definition: tellfriend.php:39
ChWsbPVAPage\$sName
$sName
Definition: ChWsbPageViewAdmin.php:789
ChWsbPVAPage\$sDefaultSqlFile
$sDefaultSqlFile
Definition: ChWsbPageViewAdmin.php:800
ChWsbPVAPage\$isSystem
$isSystem
Definition: ChWsbPageViewAdmin.php:801
ChWsbPVAPageJSON\$widths
$widths
Definition: ChWsbPageViewAdmin.php:929
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChWsbPageViewAdmin\deleteBlock
deleteBlock( $iBlockID)
Definition: ChWsbPageViewAdmin.php:272
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
CH_SLASHES_AUTO
const CH_SLASHES_AUTO
Definition: utils.inc.php:27
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbPageViewCacher\getBlocksCacheObject
getBlocksCacheObject()
Definition: ChWsbPageViewAdmin.php:1057
$iNameIndex
$iNameIndex
Definition: admin_tools.php:39
$sName
$sName
Definition: ChWsbAdminTools.php:853
ChWsbPageViewCacher\createCache
createCache()
Definition: ChWsbPageViewAdmin.php:954
ChWsbPVAPage\$aColsWidths
$aColsWidths
Definition: ChWsbPageViewAdmin.php:792
ChWsbPageViewAdmin\getPages
getPages()
Definition: ChWsbPageViewAdmin.php:475
ChWsbPageViewAdmin\$aTitles
$aTitles
Definition: ChWsbPageViewAdmin.php:15
ChWsbPVAPage
Definition: ChWsbPageViewAdmin.php:788
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
ChWsbPageViewCacher\genBlocksCacheKey
genBlocksCacheKey($sId)
Definition: ChWsbPageViewAdmin.php:1070
ChWsbPVAPage\$aMinWidths
$aMinWidths
Definition: ChWsbPageViewAdmin.php:797