$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)) { $sResponse .= $oFU->sErrorMessage(true, $j); $iNrOfErrors++; $iImageID--;
// 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/WYAudioElement.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYFileUpload.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYHiddenField.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextField.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php"; $sHelpFile = "audio-element.html"; $oEditor = new WYEditor(); $oHFDelete = new WYHiddenField("DELETE_FILE"); $oFU = new WYFileUpload("AUDIO_FILE"); $oElement = new WYAudioElement($oEditor->sFieldName, ""); $oFP = od_nil; $sMaxUpload = ini_get("upload_max_filesize"); $sMaxUpload = str_replace("M", "MB", $sMaxUpload); $bOK = false; if ((int) $oHFDelete->sValue() == 1) { $oElement->deleteFile(); // implicit save $sResponse = WYTS("FileDeleted"); $bOK = true; } else { if ($oEditor->bSave) { if ($oFU->bUploadOK()) { $oFP =& $oFU->oFilePath(); $oOFP =& $oFU->oOriginalFilename();
// (C) Objective Development Software GmbH // http://www.obdev.at define("ACTION", "ACTION"); define("ACTION_UPLOAD", "UPLOAD"); $webyep_bDocumentPage = false; $webyep_sIncludePath = ".."; include_once "{$webyep_sIncludePath}/webyep.php"; if (!$goApp->bEditMode) { $goApp->log("Editor " . basename($_SERVER['PHP_SELF']) . " called in non edit mode"); exit; } include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYHiddenField.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYFileUpload.php"; $oHFFunctioNumber = new WYHiddenField('CKEditorFuncNum'); $iFunctionNumber = (int) $oHFFunctioNumber->sValue(); $oFU = new WYFileUpload("upload"); $bOK = false; $sResponse = ""; $sURL = ""; if (isset($_REQUEST['CKEditor'])) { if ($oFU->bUploadOK()) { $oOriginalName = od_clone($oFU->oOriginalFilename()); if ($oOriginalName->bCheck(WYPATH_CHECK_NOSCRIPT | WYPATH_CHECK_NOPATH | WYPATH_CHECK_JUSTIMAGE)) { $sFilename = $oOriginalName->sPath; $sExtension = $oOriginalName->sExtension(); $sFilename = str_replace(".{$sExtension}", "", $sFilename); $sFilename = WYPath::sMakeFilename($sFilename); $oDestPath = od_clone($goApp->oDataPath); $sDestFilename = "rtimg-{$sFilename}.{$sExtension}"; $oDestPath->addComponent($sDestFilename); $oFile = new WYFile($oFU->oFilePath());
// 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/WYAttachmentElement.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYFileUpload.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYHiddenField.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextField.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php"; define("WY_QK_POST_MAX_CHECK", "POST_MAX_CHECK"); $sHelpFile = "attachment-element.php"; $oEditor = new WYEditor(); $oHFDelete = new WYHiddenField("DELETE_FILE"); $oFU = new WYFileUpload("ATTACHMENT_FILE"); $oElement = new WYAttachmentElement($oEditor->sFieldName, $oEditor->bGlobal); $oFP = od_nil; $sMaxUpload = $goApp->sFormattedByteSizeString($goApp->iMaxUploadBytes()); $bOK = false; $bDidSave = false; if ((int) $oHFDelete->sValue() == 1) { $oElement->deleteFile(); // implicit save $sResponse = WYTS("FileDeleted"); $bOK = true; } else { if ($oEditor->bSave) { if ($oFU->bUploadOK()) { $oFP =& $oFU->oFilePath(); $oOFP =& $oFU->oOriginalFilename();