Ejemplo n.º 1
0
 */
$path_upload = XOOPS_ROOT_PATH . "/uploads/yogurt/mp3/";
$maxfilebytes = $xoopsModuleConfig['maxfilesize'];
/**
 * If we are receiving a file  
 */
if ($_POST['xoops_upload_file'][0] == 'sel_audio') {
    /**
     * Verify Token
     */
    if (!$GLOBALS['xoopsSecurity']->check()) {
        redirect_header($_SERVER['HTTP_REFERER'], 3, _MD_YOGURT_TOKENEXPIRED);
    }
    /**
     * Try to upload picture resize it insert in database and then redirect to index
     */
    if ($audio_factory->receiveAudio($title, $path_upload, $author, $maxfilebytes)) {
        //$extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname');
        //                     $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid');
        //                     $notification_handler =& xoops_gethandler('notification');
        //                     $notification_handler->triggerEvent ("picture", $xoopsUser->getVar('uid'), "new_picture",$extra_tags);
        //header("Location: ".XOOPS_URL."/modules/yogurt/index.php?uid=".$xoopsUser->getVar('uid'));
        redirect_header(XOOPS_URL . "/modules/yogurt/audio.php?uid=" . $xoopsUser->getVar('uid'), 50, _MD_YOGURT_UPLOADEDAUDIO);
    } else {
        redirect_header(XOOPS_URL . "/modules/yogurt/audio.php?uid=" . $xoopsUser->getVar('uid'), 50, _MD_YOGURT_NOCACHACA);
    }
}
/**
 * Close page  
 */
include "../../footer.php";