Exemplo n.º 1
0
    case 'saveedit':
        savePage(1);
        break;
    case 'delete':
        deletePage();
        break;
    case 'private':
        showPages(0);
        break;
    case 'public':
        showPages(1);
        break;
    case 'publicate':
        approveBulk(1);
        break;
    case 'privatize':
        approveBulk(0);
        break;
    case 'savechanges':
        saveChanges();
        break;
    case 'linked':
        linkedPages();
        break;
    case 'clone':
        clonePage();
        break;
    default:
        showPages();
        break;
}
$oMedia = new BxDolSharedMedia('photo', $site, $dir, $member);
// ----------------------------------- main variables for actions ------------------------------------ //
$sTable = 'sharePhotoFiles';
$sIdent = 'medID';
$aInfo = array('Owner' => 'medProfId', 'Title' => 'medTitle', 'Tags' => 'medTags', 'Desc' => 'medDesc', 'Uri' => 'medUri');
// -------------------------------------------------------------------------------------------------- //
if (isset($_POST['fileID']) && isset($_POST['send']) && isset($_POST['email'])) {
    $iFile = (int) $_POST['fileID'];
    $sEmail = $_POST['email'];
    $sMessage = htmlspecialchars_adv($_POST['messageText']);
    $sUrl = process_pass_data($_POST['fileUrl']);
    $sCode .= $oMedia->sendFileInfo($iFile, $sEmail, $sMessage, $sUrl);
}
if (isset($_POST['mediaAction']) && $_POST['mediaAction'] == 'edit') {
    $iFile = (int) $_POST['fileID'];
    saveChanges($iFile);
    echo '<script language="javascript">window.parent.opener.location = window.parent.opener.location; window.parent.close();</script>';
}
if (isset($_GET['action']) && isset($_GET['fileID'])) {
    $sAct = htmlspecialchars_adv($_GET['action']);
    $aAction['fileID'] = (int) $_GET['fileID'];
    switch ($sAct) {
        case 'favorite':
            $sCode = $oMedia->addToFavorites($aAction['fileID']);
            break;
        case 'edit':
            $sCode = displayMediaEditForm($aAction['fileID']);
            break;
        case 'report':
        case 'share':
            $aAction['action'] = $sAct;