Caravel CMS PHP Cross Reference Content Management Systems

Source: /apps/FooterEditor/FooterEditor.php - 42 lines - 1874 bytes - Summary - Text - Print

   1  <?php
   2  require_once (T_CODE_BASE . 'File/oFile.php');
   3  
   4  class FooterEditor extends App
   5      {
   6      function onSave()
   7          {
   8          $filedn = "mnF=footer.html,mnOD=Footer,mnOD=Templates,mnOD=My Documents," . T_ORG_DN;
   9          $ffile = oFile::load($this->ldap, $filedn);
  10          $ffile->write($this->httpVars['footerEditor']);
  11          }
  12      
  13      
  14      function getContent()
  15          {
  16          $this->addHeader('<script language="Javascript" type="text/javascript" src="/.cWinc/tinymce/jscripts/tiny_mce/tiny_mce.js"></script><script language="Javascript" type="text/javascript" src="/.cWinc/load_editor.js"></script>');
  17  
  18          $filedn = "mnF=footer.html,mnOD=Footer,mnOD=Templates,mnOD=My Documents," . T_ORG_DN;
  19          $ffile = oFile::load($this->ldap, $filedn);
  20  
  21          $f = FormWidget::init('', 'form.nonsettings.tpl.html');
  22          $f->name('footereditor');
  23   
  24          $colWidth = 90;
  25          $restrictHTMLAreaFeatures = 1;
  26          $contentCSS = '';
  27          $attrName = $this->paramName('footerEditor');
  28          $popupLink = str_replace('&amp;', '&', Utility::link($this->sectionPathArray, array('_single' => '')));
  29          $ftext = '<script type="text/javascript" language="JavaScript">
  30                    initEditor(\'' . $colWidth . '\',\'' . $popupLink . '\',' . $restrictHTMLAreaFeatures . ', \'' . $contentCSS . '\');
  31                    </script>
  32                    <textarea class="tinymce" id="' . $attrName . '" name="' . $attrName . '" mce_editable="true" cols="' . $colWidth . '" rows="' . $attr[5] . '">' . $ffile->read() . '</textarea>
  33                    <input type="hidden" name="colWidth" value="' . $colWidth . '">
  34                    <input type="hidden" name="editing_xml" value="1">';
  35          $f->html('[replacement]');          
  36          $f->html('<div style="margin-top: 5px; float:right; width: 300px; text-align: right;">');          
  37          $f->defaultButtons();
  38          $f->html('</div>');
  39          return str_replace('[replacement]', $ftext, $f->get());                  
  40          }
  41      }
  42  ?>

title

Description

title

Description

title

Description

title

title

Body