コード例 #1
0
ファイル: ajax.php プロジェクト: k3x/VoteMPD
     if (!isset($_GET["id"])) {
         doError("No id specified");
     }
     doOutput(getBrowseFolder(intval($_GET["id"])), "browse-folders");
     break;
 case "browse-artists":
     if (!isset($_POST["name"])) {
         doError("No post-name specified");
     }
     doOutput(getBrowseArtist($_POST["name"]), "browse-artists");
     break;
 case "browse-albums":
     if (!isset($_POST["name"])) {
         doError("No post-name specified");
     }
     doOutput(getBrowseAlbum($_POST["name"]), "browse-albums");
     break;
 case "browse-playlists":
     if (!isset($_POST["name"])) {
         doError("No post-name specified");
     }
     doOutput(getBrowsePlaylist($_POST["name"]), "browse-playlists");
     break;
 case "browse-often-playlists":
     doOutput(getBrowseOftenPlaylist(), "browse-often-playlists");
     break;
 case "browse-often-played":
     doOutput(getBrowseOftenPlayed(), "browse-often-played");
     break;
 case "browse-often-votes":
     doOutput(getBrowseOftenVote(), "browse-often-votes");
コード例 #2
0
ファイル: functions.php プロジェクト: k3x/VoteMPD
function doVoteAlbum($ip, $name, $vote)
{
    $files = getBrowseAlbum($name)["files"];
    foreach ($files as $file) {
        $fid = $file->id;
        if ($vote) {
            doVote($ip, $fid, false);
        } else {
            doRemoveMyVote($ip, $fid, false);
        }
    }
}