Ejemplo n.º 1
0
 function loadHeader()
 {
     //EFFECTS: write in standard output extra header information
     global $op;
     switch ($op) {
         case "addpage":
         case "inspage":
         case "modpage":
         case "uppage":
             loadHeaderHTMLEditor();
             break;
     }
     return;
 }
Ejemplo n.º 2
0
 function loadHeader()
 {
     //EFFECTS: write in standard output extra header information
     switch ($GLOBALS['op']) {
         case "insfaqcat":
         case "newfaq":
         case "insfaq":
         case "modfaqcat":
         case "upfaqcat":
         case "modfaq":
         case "upfaq":
             loadHeaderHTMLEditor();
             break;
     }
     return;
 }
Ejemplo n.º 3
0
 function loadHeader()
 {
     //EFFECTS: write in standard output extra header information
     global $op;
     switch ($op) {
         case "additem":
         case "insitem":
         case "moditem":
         case "upitem":
             loadHeaderHTMLEditor();
             break;
         case "category":
             echo '<link href="' . getPathTemplate() . 'style/base-old-treeview.css" rel="stylesheet" type="text/css" />' . "\n";
             break;
     }
     return;
 }
Ejemplo n.º 4
0
/**
 * Create an instance of HTML Editor.
 *
 * @param string	$formid 		the id of the container form
 * @param string	$textarea_name 	id of textarea to use
 * @param string	$value initial 	content of text area
 *
 * @return string 	html for include the htmleditor
 **/
function loadHtmlEditor($id_form, $id, $name, $value, $css_text, $extra_param_for = false, $simple = false)
{
    if (!isset($GLOBALS["HTML_EDITOR_SETUP"])) {
        loadHeaderHTMLEditor();
        $GLOBALS["HTML_EDITOR_SETUP"] = TRUE;
    }
    if (getAccessibilityStatus() === false) {
        $ht = Get::sett('hteditor');
    } else {
        $ht = 'accesseditor';
    }
    $value = htmlspecialchars($value, ENT_COMPAT);
    switch ($ht) {
        //using tiny_mce
        case 'tinymce':
            $txt = '<textarea id="' . $id . '" name="' . $name . '" cols="52" rows="7" class="' . ($simple ? 'tinymce_simple' : 'tinymce_complex') . '">' . "\n" . $value . "\n" . '</textarea>' . "\n";
            return $txt;
            break;
        case 'yui':
            $txt = '<textarea class="' . $css_text . '" id="' . $id . '" name="' . $name . '" cols="52" rows="7">' . htmlspecialchars($value, ENT_NOQUOTES) . '</textarea>';
            $txt .= '<script>var yuiEditor' . $id . ' = new YAHOO.widget.Editor(\'' . $id . '\', {
				     height: \'250px\',
				     width: \'100%\',
				     dompath: true,
				     animate: true
				     });
				     yuiEditor' . $id . '.render();';
            $txt .= 'YAHOO.util.Event.on(yuiEditor' . $id . '.get(\'element\').form, \'submit\', function onSubmitOperation' . $id . '()' . '{' . 'yuiEditor' . $id . '.saveHTML();' . '}' . ', yuiEditor' . $id . ', true);</script>';
            return $txt;
            break;
            //using normal textarea
        //using normal textarea
        case 'accesseditor':
        default:
            if (!$css_text) {
                $css_text = 'textarea';
            }
            return '<textarea class="' . $css_text . '" id="' . $id . '" name="' . $name . '" cols="52" rows="7">' . htmlspecialchars($value, ENT_NOQUOTES) . '</textarea>';
            break;
    }
}