Пример #1
0
     ppIpn();
     break;
 case 'vote':
     recordVote();
     break;
 case 'addtag':
     addTag();
     break;
 case 'removetag':
     removeTag();
     break;
 case 'showtags':
     showTags($id);
     break;
 case 'addtofavorites':
     addToFavorites();
     break;
 case 'editpic':
     GalleryHeader();
     editPic($uid);
     GalleryFooter();
     break;
 case 'edittitle':
     editImageTitle();
     break;
 case 'editdesc':
     editImageDesc();
     break;
 case 'savepic':
     savePic();
     break;
$_page['header'] = _t("_Music Actions");
$_page['header_text'] = _t("_Music Actions");
$_ni = $_page['name_index'];
$member['ID'] = (int) $_COOKIE['memberID'];
if (isset($_POST['fileID']) && isset($_POST['send']) && isset($_POST['email'])) {
    $iFile = (int) $_POST['fileID'];
    $sEmail = $_POST['email'];
    $sMessage = htmlspecialchars_adv($_POST['messageText']);
    $sCode .= sendFileInfo($iFile, $sEmail, $sMessage);
}
if (isset($_GET['action']) && isset($_GET['fileID'])) {
    $sAct = htmlspecialchars_adv($_GET['action']);
    $iFile = (int) $_GET['fileID'];
    switch ($sAct) {
        case 'favorite':
            $sCode = addToFavorites($iFile);
            break;
        case 'share':
            $sCode = displaySubmitForm($iFile, 'share');
            break;
        case 'report':
            $sCode = displaySubmitForm($iFile, 'report');
            break;
    }
}
$_page_cont[$_ni]['page_main_code'] = DesignBoxContent(_t('_Notification'), $sCode, 1);
PageCode();
function addToFavorites($iFile)
{
    global $member;
    if ($iFile) {
Пример #3
0
<?php

include_once "../database.php";
$json = file_get_contents('php://input');
$request = json_decode($json, true);
$userid = isset($request["userid"]) ? $request["userid"] : "";
$agencyid = isset($request["agencyid"]) ? $request["agencyid"] : "";
addToFavorites($userid, $agencyid);