<?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYElement.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYURL.php"; define("WY_ATTACHMENT_VERSION", 1); define("WY_DK_ATTACHMENT_FILENAME", "FILENAME"); define("WY_QK_DOWNLOAD_FILENAME", "FILENAME"); define("WY_QK_ORIGINAL_FILENAME", "ORG_FILENAME"); define("WY_ATTACHMENT_CSS_ICON", "WebYepAttachmentIcon"); function webyep_attachment($sFieldName, $bGlobal = false, $sCustomIcon = "") { global $goApp; $o = new WYAttachmentElement($sFieldName, $bGlobal, $sCustomIcon); $s = $o->sDisplay(); if ($goApp->bEditMode) { echo $o->sEditButtonHTML("edit-button-attachment.gif", "", $goApp->bIsiPhone ? $o->oIPhoneEditURL() : od_nil); if (!$s) { $s = $o->sName; } } echo $s; } class WYAttachmentElement extends WYElement { // instance variables var $sCustomIcon; function WYAttachmentElement($sN, $bG = false, $sCustomIcon = "") {
<?php // 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/WYGalleryElement.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/WYTextArea.php'; include_once @webyep_sConfigValue('webyep_sIncludePath') . '/lib/WYEditor.php'; $bOK = false; $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);
<?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at include_once @webyep_sConfigValue('webyep_sIncludePath') . '/lib/WYApplication.php'; include_once @webyep_sConfigValue('webyep_sIncludePath') . '/lib/WYHTMLTag.php'; $webyep_bGD2Installed = ''; // Thanks to Hagan Fox - code copied from php.net: function webyep_gdVersion($user_ver = 0) { if (!extension_loaded('gd')) { return; } static $gd_ver = 0; // Just accept the specified setting if it's 1. if ($user_ver == 1) { $gd_ver = 1; return 1; } // Use the static variable if function was called previously. if ($user_ver != 2 && $gd_ver > 0) { return $gd_ver; } // Use the gd_info() function if possible. if (function_exists('gd_info')) { $ver_info = gd_info(); preg_match('/\\d/', $ver_info['GD Version'], $match); $gd_ver = $match[0]; return $match[0]; }
<?php // WebYep // (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);
<?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYApplication.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYDocument.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYPath.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYURL.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYLoopElement.php"; define("WY_QK_EDITOR_SAVE", "WEBYEP_EDIT_SAVE"); define("WY_QK_PAGEID", "WEBYEP_PAGEID"); define("WY_QK_EDITOR_FIELDNAME", "WEBYEP_FIELDNAME"); define("WY_QK_EDITOR_GLOBAL", "WEBYEP_GLOBAL"); define("WY_EDITOR_RESIZE", 1); define("WY_EDITOR_OPEN", 2); class WYEditor { // public var $sFieldName; var $bGlobal; var $bSave; // private // class methods function dQueryForElement(&$oElement) { global $goApp; $d = array(); $d[WY_QK_EDITOR_FIELDNAME] = $oElement->sName; $d[WY_QK_EDITOR_GLOBAL] = (int) $oElement->bGlobal; $d[WY_QK_PAGEID] = $goApp->oDocument->iPageID(true);
define("PATH", "PATH"); define("URL", "URL"); define("NUM_COLS", 5); define("PADDING", 5); define("IMG_SIZE", 100); define("ACTION", "ACTION"); define("ACTION_DELETE", "DELETE"); define("ACTION_SELECT", "SELECT"); $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"; $oHFCKEditorName = new WYHiddenField('CKEditor'); $sCKEditorName = $oHFCKEditorName->sValue(); $oHFFunctioNumber = new WYHiddenField('CKEditorFuncNum'); $sFunctionNumber = $oHFFunctioNumber->sValue(); $oHFLanguageCode = new WYHiddenField('langCode'); $sLangCode = $oHFLanguageCode->sValue(); $oHFAction = new WYHiddenField(ACTION); $sAction = $oHFAction->sValue(); // $sResponse = WYTS("RichTextSaved"); // $oCKBaseURL = od_clone($goApp->oProgramURL); // $oCKBaseURL->addComponent("opt"); // $oCKBaseURL->addComponent("ckeditor"); // $oCKJSURL = od_clone($oCKBaseURL); // $oCKJSURL->addComponent("ckeditor.js"); $goApp->outputWarningPanels();
<?php /** * WebYep * @copyright Objective Development Software GmbH * @link http://www.obdev.at */ include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYElement.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYLink.php"; include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYPopupWindowLink.php"; define("WY_GALLERY_VERSION", 1); define("WY_DK_GALLERY_ID_ARRAY", "CONTENT"); define("WY_DK_GALLERY_FILENAME", "FILENAME"); define("WY_DK_GALLERY_TEXT", "TEXT"); define("WY_QK_GALLERY_ADD", "GALLERY_ADD"); define("WY_QV_GALLERY_REMOVE", "GALLERY_REMOVE"); define("WY_QV_GALLERY_UP", "GALLERY_UP"); define("WY_QV_GALLERY_DOWN", "GALLERY_DOWN"); define("WY_QK_GALLERY_IMAGE_ID", "GALLERY_IMAGE_ID"); define("WY_QK_GALLERY_FILENAME", "FILENAME"); define("WY_GALLERY_CSS_CONTAINER", "WebYepGalleryContainer"); define("WY_GALLERY_CSS_ROW", "WebYepGalleryRow"); define("WY_GALLERY_CSS_FIRSTROW", "WebYepGalleryFirstRow"); define("WY_GALLERY_CSS_CELL", "WebYepGalleryCell"); define("WY_GALLERY_CSS_FIRSTCOLUMN", "WebYepGalleryFirstColumn"); define("WY_GALLERY_CSS_IMAGE", "WebYepGalleryImage"); define("WY_GALLERY_CSS_TEXT", "WebYepGalleryText"); /** * public API * * Diese Funktion wird mittels PHP-PI in der HTML-Seite eingebunden
<?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYApplication.php"; define("WYFILE_WRITE_NORMAL", 0); define("WYFILE_WRITE_ATOMIC", 1); class WYFile { // public var $oPath; // private var $sContent; var $iWriteMode; function WYFile(&$oP) { global $goApp; $this->oPath = od_clone($oP); // we only act on files inside a webyep-system folder: if (strpos($this->oPath->sPath, "webyep-system") === false) { $goApp->log("WYFile abuse - trying to access path " . $this->oPath->sPath); $this->oPath = od_nil; } $this->sContent = false; $this->iWriteMode = WYFILE_WRITE_ATOMIC; } function setContent($s) { $this->sContent = $s; }
<?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at $webyep_bDocumentPage = false; if (file_exists("programm")) { $webyep_sIncludePath = "programm"; } else { $webyep_sIncludePath = "program"; } include_once "{$webyep_sIncludePath}/webyep.php"; include_once webyep_sConfigValue("webyep_sIncludePath") . "/" . WYTS("info.php");