require_once './classes.php'; $payKind = $_POST['payKind']; $purposeMarker = $_POST['purpose2']; $purpose = Purposes::getPurposeByMarker($purposeMarker) ?: Purposes::$DEFAULTPURPOSE; $_POST['purpose1'] = str_replace('iran', 'morgenland', $_POST['purpose1']); $_POST['purpose1'] = str_replace('kuba', 'insel', $_POST['purpose1']); if ($payKind == 'SEPA') { sendMail($_POST); header("Location: donationThankyou.html"); } else { if ($payKind == 'SOU') { runExternal(new SofortDestination(), $purpose); sendMail($_POST); } else { if ($payKind == 'PP') { runExternal(new PPDestination(), $purpose); sendMail($_POST); } } } function runExternal(Destination $destination, $purpose) { $destination->setAmount($_POST['amount']); $destination->setPurpose1($purpose); $destination->setPurpose2($_POST['purpose1']); $url = $destination->getUrl(); $params = http_build_query($destination->getParams()); $completeUrl = $url . '?' . $params; header('Location: ' . $completeUrl); } function sendMail(array $data)
} */ } //} } else { if ($type == 'audio') { $updir = "{$cid}/presentation/{$aid}/mp3"; $keytmpname = $fname; //foreach ($_FILES as $keytmpname => $valuetmpname) { $file = $CFG->dataroot . "/" . $updir . "/" . $keytmpname . ".wav"; $filemp3 = $CFG->dataroot . "/" . $updir . "/" . $keytmpname . ".mp3"; $fileogg = $CFG->dataroot . "/" . $updir . "/" . $keytmpname . ".ogg"; unlink($CFG->dataroot . "/" . $updir . "/" . $keytmpname . ".wav"); move_uploaded_file($_FILES['media']['tmp_name'], $file); runExternal("/usr/local/bin/ffmpeg -y -i {$file} -acodec libmp3lame -ab 68k -ar 44100 {$filemp3}", &$code); runExternal("/usr/local/bin/ffmpeg -i {$file} -acodec libvorbis -aq 100 -ac 2 {$fileogg}", &$code); //} } else { if ($type == 'submit') { $updir = "{$cid}/presentation/{$aid}"; $slideimages = explode(":", $slideimages); $xmlcontents = '<xml version="1.0" encoding="utf-8"> <parameter autochange="0" /> <images>'; foreach ($slideimages as $valuetmpname) { if (!empty($valuetmpname) && $valuetmpname != 'undefined') { //list($a1,$i1) = eaplode(":",$valuetmpname); $xmlcontents .= ' <image url="' . $CFG->wwwroot . '/file.php/' . $cid . '/presentation/' . $data->id . '/' . $fname . '_' . $valuetmpname . '.jpg" voice="' . $CFG->wwwroot . '/file.php/' . $cid . '/presentation/' . $aid . '/mp3/' . $fname . '_' . $valuetmpname . '.mp3" mp3="true" /> '; }