function webyep_audio($sFieldName, $sLinkContent) { global $goApp; $o = new WYAudioElement($sFieldName, $sLinkContent); $s = $o->sDisplay(); if ($goApp->bEditMode) { echo $o->sEditButtonHTML(); if (!$s) { $s = $o->sName; } } echo $s; }
// 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(); if ($oOFP->bCheck(WYPATH_CHECK_JUSTAUDIO | WYPATH_CHECK_NOPATH)) {