diff options
Diffstat (limited to 'lib/study/setrate.php')
-rw-r--r-- | lib/study/setrate.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/study/setrate.php b/lib/study/setrate.php deleted file mode 100644 index f893eb9..0000000 --- a/lib/study/setrate.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -assert_redir(count($args) >= 3, 'study'); -$studyid = intval($args[2]); - -$study = mysql_fetch_assoc(sql( - "SELECT decks.id AS deckid, decks.name AS deckname, account.login AS deckowner, ". - " deck_study.learn_rate AS learn_rate, deck_study.user AS learn_user ". - "FROM deck_study LEFT JOIN decks ON deck_study.deck = decks.id LEFT JOIN account ON account.id = decks.owner ". - "WHERE deck_study.id = $studyid")); -assert_error($study && $study['learn_user'] == $user['id'], "You are not at the right place here."); - -if (isset($args[3]) && ($rate = intval($args[3])) > 0) { - sql("UPDATE deck_study SET learn_rate = $rate WHERE id = $studyid"); - header("Location: deck-study-$studyid"); - die(); -} - -include ("tpl/study/setrate.php"); |