Ejemplo n.º 1
0
// (C) Objective Development Software GmbH
// http://www.obdev.at
$webyep_bDocumentPage = false;
$webyep_sIncludePath = "..";
include_once "{$webyep_sIncludePath}/webyep.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYRichTextElement.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextArea.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$bOK = false;
$sResponse = WYTS("RichTextSaved");
$sHelpFile = "richtext-element.php";
$oEditor = new WYEditor();
$oElement = new WYRichTextElement($oEditor->sFieldName, $oEditor->bGlobal);
$oTAHTMLCode = new WYTextArea("HTML_CODE", $oElement->sText());
if ($oEditor->bSave) {
    $oElement->setText($oTAHTMLCode->sText());
    $oElement->save();
    $bOK = true;
} else {
    $sOnLoadScript = 'document.forms[0].HTML_CODE.focus();';
}
$goApp->outputWarningPanels();
// give App a chance to say something
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<title>
<?php 
WYTSD("RichTextEditorTitle", true);
?>
Ejemplo n.º 2
0
// (C) Objective Development Software GmbH
// http://www.obdev.at
$webyep_bDocumentPage = false;
$webyep_sIncludePath = "..";
include_once "{$webyep_sIncludePath}/webyep.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYLongTextElement.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextArea.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$bOK = false;
$sResponse = WYTS("LongTextSaved");
$sHelpFile = "longtext-element.php";
$oEditor = new WYEditor();
$oElement = new WYLongTextElement($oEditor->sFieldName, $oEditor->bGlobal, "");
$oTA = new WYTextArea("TEXT", $oElement->sText());
if ($oEditor->bSave) {
    $oElement->setText($oTA->sText());
    $oElement->save();
    $bOK = true;
} else {
    $sOnLoadScript = 'document.forms[0].TEXT.focus();';
}
$goApp->outputWarningPanels();
// give App a chance to say something
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<title>
<?php 
WYTSD("LongTextEditorTitle", true);
?>
Ejemplo n.º 3
0
//$oHFTitles = new WYHiddenField("MENU_TITLES");
//$oHFIDs = new WYHiddenField("MENU_IDS");
$oTAWYEditorPostArea = new WYTextArea('WY_EditorPostArea');
$oHFURL = new WYHiddenField(WY_QK_MENU_URL);
$sURL = $oHFURL->sValue();
if ($sURL) {
    $oURL = new WYURL($sURL);
    //echo '$oURL = '.$oURL->sEURL().', $sURL = '.$sURL;
} else {
    $oURL = od_nil;
    //echo '$oURL = od_nil';
}
$oElement = new WYMenuElement($oEditor->sFieldName, $oEditor->bGlobal, $oURL, "", "", od_nil);
if ($oEditor->bSave) {
    if (isset($oTAWYEditorPostArea->sText)) {
        $chunks = explode('|@|', $oTAWYEditorPostArea->sText());
        $chunks[1] = explode('|§|', $chunks[1]);
        $oElement->dContent = parseDataForServer($chunks[1], $chunks[2]);
        $oElement->save();
        $bOK = true;
    }
} else {
    $sContent = parseDataForClient($oElement->dContent, $oURL->sURL());
}
$goApp->outputWarningPanels();
// give App a chance to say something
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php