Ejemplo n.º 1
0
$sHelpFile = 'gallery-element.php';
$oEditor = new WYEditor();
$oHFImageID = new WYHiddenField(WY_QK_GALLERY_IMAGE_ID);
$iImageID = (int) $oHFImageID->sValue();
$oHFTNWidth = new WYHiddenField(WY_QK_THUMB_WIDTH);
$iTNWidth = (int) $oHFTNWidth->sValue();
$oHFTNHeight = new WYHiddenField(WY_QK_THUMB_HEIGHT);
$iTNHeight = (int) $oHFTNHeight->sValue();
$oHFImageWidth = new WYHiddenField(WY_QK_IMAGE_WIDTH);
$iImageWidth = (int) $oHFImageWidth->sValue();
$oHFImageHeight = new WYHiddenField(WY_QK_IMAGE_HEIGHT);
$iImageHeight = (int) $oHFImageHeight->sValue();
$oElement = new WYGalleryElement($oEditor->sFieldName, $oEditor->bGlobal, $iTNWidth, $iTNHeight, 0, $iImageWidth, $iImageHeight);
$oHFNewImage = new WYHiddenField(WY_QK_GALLERY_ADD, 'false');
$bNewImage = $oHFNewImage->sValue() == 'true';
$oTA = new WYTextArea('TEXT', $bNewImage ? '' : $oElement->sTextForID($iImageID));
$oTA->setWidth(30);
$oTA->setHeight(7);
$oFU = new WYFileUpload('IMAGE_FILE', $bNewImage);
$oFP = od_nil;
$sResponse = '';
$iNrOfErrors = 0;
if ($oEditor->bSave) {
    // if about to save, ...
    if ($bNewImage) {
        // ...and there is at least one new image, ...
        for ($j = 0; $j < $oFU->iNrOfFiles; $j++) {
            // ...save ALL files, ...
            $bHasError = false;
            $iImageID++;
            if ($oFU->bFileUploaded($j) && !$oFU->bUploadOK($j)) {
Ejemplo n.º 2
0
// WebYep
// (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 
Ejemplo n.º 3
0
// WebYep
// (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 
Ejemplo n.º 4
0
$bOK = false;
$sResponse = WYTS("MenuSaved");
$sHelpFile = "menu-element.php";
$oEditor = new WYEditor();
//$sMenuName = "MENU";
//$sTextFieldName = "ITEM";
//$aTitles = array();
//$aIDs = array();
//$dItems = array();
//$i = 0;
//$iC = 0;
//$oSM = od_nil;
//$oTFItem = od_nil;
//$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]);