function deleteTmpFile($iIndex = 0) { $sTmpPath = $this->dFileInfos["tmp_name"][$iIndex]; if ($sTmpPath) { $oFile = new WYFile(new WYPath($sTmpPath)); if ($oFile->bExists()) { $oFile->bDelete(); } } }
function deleteFile() { global $goApp; $oFile = od_nil; $sFN = $this->sDownloadFileName(); if ($sFN) { $oPath = od_clone($goApp->oDataPath); $oPath->addComponent($sFN); $oFile = new WYFile($oPath); if ($oFile->bExists() && !$oFile->bDelete()) { $goApp->log("could not delete attachment file " . $oPath->sPath); } $this->setOriginalFilename(""); $this->save(); } }
</head> <?php // WebYep // (C) Objective Development Software GmbH // http://www.obdev.at $bPermOK = false; $oP = od_nil; $oF = od_nil; srand((double) microtime() * 1000000); $sFilename = "permission-test" . mt_rand(1000, 9999); $oP = od_clone($goApp->oDataPath); $oP->addComponent($sFilename); $oF = new WYFile($oP); $oF->setContent("write test"); $bPermOK = $oF->bWrite(); @$oF->bDelete(); ?> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="pageTitle" align="left" valign="middle">WebYep System Infos</td> <td align="right" valign="top"><a href="http://www.obdev.at/webyep/" target="_blank"><img src="program/images/logo.gif" align="top" border="0" alt="WebYep WebSite"></a></td> </tr> </table> <hr size="1" noshade> <h2>Installed WebYep-Version</h2> <p><b>Version <?php echo "{$webyep_iMajorVersion}.{$webyep_iMinorVersion}.{$webyep_iSubVersion} {$webyep_sVersionPostfix}"; ?> </b></p> <?php
/** * Löscht das Vorschaubild * * no implicit save! */ function deleteThumbnail() { global $goApp; $oFile = od_nil; $sFN = $this->dContent[WY_DK_THUMBNAIL_FILENAME]; if ($sFN) { $oPath = od_clone($goApp->oDataPath); $oPath->addComponent($sFN); $oFile = new WYFile($oPath); if ($oFile->bExists() && !$oFile->bDelete()) { $goApp->log("could not delete thumbnail file " . $oPath->sPath); } $this->dContent[WY_DK_THUMBNAIL_FILENAME] = ""; } }
function _loadContent() { global $goApp, $webyep_oCurrentLoop, $webyep_sLiveDemoSlotID; $oP = od_nil; $oF = od_nil; $iDelLoopID = 0; if ($this->bUseLoopID() && $webyep_oCurrentLoop != od_nil && ($iDelLoopID = $webyep_oCurrentLoop->iDeletedLoopInstance()) != 0) { $iCurrentLoopID = $goApp->oDocument->iLoopID(); $goApp->oDocument->setLoopID($iDelLoopID); $oP =& $this->oDataFilePath($goApp->bEditMode, false); if ($oP && $oP->bExists()) { $oF = new WYFile($oP); $this->dContent = unserialize($oF->sContent()); $this->deleteContent(); // $this->save(); $oF->bDelete(); } $goApp->oDocument->setLoopID($iCurrentLoopID); } $oP =& $this->oDataFilePath($goApp->bEditMode, true); if ($oP && $oP->bExists()) { $oF = new WYFile($oP); $this->dContent = unserialize($oF->sContent()); } else { $this->dContent = array(); } }
// $sResponse = WYTS("RichTextSaved"); // $oCKBaseURL = od_clone($goApp->oProgramURL); // $oCKBaseURL->addComponent("opt"); // $oCKBaseURL->addComponent("ckeditor"); // $oCKJSURL = od_clone($oCKBaseURL); // $oCKJSURL->addComponent("ckeditor.js"); $goApp->outputWarningPanels(); // give App a chance to say something if ($sAction == ACTION_DELETE) { $oHFFilename = new WYHiddenField(FILENAME); $oFullPath = od_clone($goApp->oDataPath); $oFilename = new WYPath($oHFFilename->sValue()); if ($oFilename->bCheck(WYPATH_CHECK_JUSTIMAGE | WYPATH_CHECK_NOPATH)) { $oFullPath->addComponent($oFilename->sPath); $oFile = new WYFile($oFullPath); $oFile->bDelete(); } } $aEntries = array(); $r = opendir($goApp->oDataPath->sPath); while (($sEntry = readdir($r)) !== false) { if ($sEntry[0] == ".") { continue; } if (substr($sEntry, 0, 5) != "rtimg") { continue; } unset($dEntry); $oPath = od_clone($goApp->oDataPath); $oPath->addComponent($sEntry); $dEntry[PATH] = $oPath->sPath;
/** * Löscht das zur übergebenen ID gehörige Bild, inkl. Vorschau * * @access private * @param int imageID des zu löschenden Bildes */ function _deleteImageFilesForID($iID) { global $goApp; $oFile = od_nil; $aItems =& $this->_aItems(); if (isset($aItems[$iID]) && isset($aItems[$iID][WY_DK_GALLERY_FILENAME]) && ($sFN = $aItems[$iID][WY_DK_GALLERY_FILENAME])) { $oPath = od_clone($goApp->oDataPath); $oPath->addComponent($sFN); $oFile = new WYFile($oPath); if ($oFile->bExists() && !$oFile->bDelete()) { $goApp->log("could not delete image file " . $oPath->sPath); } $oPath = od_clone($goApp->oDataPath); $oPath->addComponent($this->_sThumbnailName($sFN)); $oFile = new WYFile($oPath); if ($oFile->bExists() && !$oFile->bDelete()) { $goApp->log("could not delete thumbnail file " . $oPath->sPath); } } }