Example #1
0
 public function delete($id)
 {
     $db = new DB();
     $this->delCartForUser($id);
     $this->delUserCategoryExclusions($id);
     $rc = new ReleaseComments();
     $rc->deleteCommentsForUser($id);
     $um = new UserMovies();
     $um->delMovieForUser($id);
     $us = new UserSeries();
     $us->delShowForUser($id);
     $forum = new Forum();
     $forum->deleteUser($id);
     $db->query(sprintf("delete from users where ID = %d", $id));
 }
Example #2
0
<?php

require_once WWW_DIR . "/lib/category.php";
require_once WWW_DIR . "/lib/userseries.php";
if (!$users->isLoggedIn()) {
    $page->show403();
}
$us = new UserSeries();
$action = isset($_REQUEST['id']) ? $_REQUEST['id'] : '';
$rid = isset($_REQUEST['subpage']) ? $_REQUEST['subpage'] : '';
switch ($action) {
    case 'delete':
        $show = $us->getShow($users->currentUserId(), $rid);
        if (!$show) {
            $page->show404('Not subscribed');
        } else {
            $us->delShow($users->currentUserId(), $rid);
        }
        if (isset($_REQUEST['from'])) {
            header("Location:" . WWW_TOP . $_REQUEST['from']);
        } else {
            header("Location:" . WWW_TOP . "/myshows");
        }
        break;
    case 'add':
    case 'doadd':
        $show = $us->getShow($users->currentUserId(), $rid);
        if ($show) {
            $page->show404('Already subscribed');
        } else {
            $db = new DB();
Example #3
0
<?php

if (!$page->users->isLoggedIn()) {
    $page->show403();
}
$releases = new Releases();
$tvrage = new TvRage();
$cat = new Category();
$us = new UserSeries();
if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
    $category = -1;
    if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) {
        $category = $_REQUEST["t"];
    }
    $catarray = [];
    $catarray[] = $category;
    $rel = $releases->searchbyRageId($_GET["id"], '', '', 0, 1000, "", $catarray, -1);
    $rage = $tvrage->getByRageID($_GET['id']);
    if (!$rage) {
        $page->smarty->assign('nodata', 'No tvrage information for this series.');
    } elseif (!$rel) {
        $page->smarty->assign('nodata', 'No releases for this series.');
    } else {
        $myshows = $us->getShow($page->users->currentUserId(), $rage[0]['rageid']);
        // Sort releases by season, episode, date posted.
        $season = $episode = $posted = [];
        foreach ($rel as $rlk => $rlv) {
            $season[$rlk] = $rlv['season'];
            $episode[$rlk] = $rlv['episode'];
            $posted[$rlk] = $rlv['postdate'];
        }
Example #4
0
 public function delete($id)
 {
     $this->delCartForUser($id);
     $this->delUserCategoryExclusions($id);
     $this->delDownloadRequests($id);
     $this->delApiRequests($id);
     $rc = new ReleaseComments();
     $rc->deleteCommentsForUser($id);
     $um = new UserMovies();
     $um->delMovieForUser($id);
     $us = new UserSeries();
     $us->delShowForUser($id);
     $forum = new Forum();
     $forum->deleteUser($id);
     $this->pdo->queryExec(sprintf("DELETE from users where id = %d", $id));
 }
<?php

require_once WWW_DIR . "/lib/releases.php";
require_once WWW_DIR . "/lib/tvinfo.php";
require_once WWW_DIR . "/lib/category.php";
require_once WWW_DIR . "/lib/userseries.php";
$releases = new Releases();
$tvinfo = new TvInfo();
$cat = new Category();
$us = new UserSeries();
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
    $category = -1;
    if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) {
        $category = $_REQUEST["t"];
    }
    $catarray = array();
    $catarray[] = $category;
    $rel = $releases->searchbytvinfoId($_GET["id"], '', '', 0, 1000, "", $catarray, -1);
    $tvinforow = $tvinfo->getByID($_GET['id']);
    $page->smarty->assign('tvinforow', $tvinforow);
    if (!$tvinforow) {
        $page->show404();
    } elseif (!$rel) {
        $page->smarty->assign("nodata", "No releases for this series.");
    } else {
        $myshows = $us->getShow($users->currentUserId(), $_GET['id']);
        //sort releases by season, episode, date posted
        $season = $episode = $posted = array();
<?php

require_once WWW_DIR . "/lib/category.php";
require_once WWW_DIR . "/lib/userseries.php";
if (!$users->isLoggedIn()) {
    $page->show403();
}
$us = new UserSeries();
$action = isset($_REQUEST['id']) ? $_REQUEST['id'] : '';
$tvinfoID = isset($_REQUEST['subpage']) ? $_REQUEST['subpage'] : '';
switch ($action) {
    case 'delete':
        $show = $us->getShow($users->currentUserId(), $tvinfoID);
        if (!$show) {
            $page->show404('Not subscribed');
        } else {
            $us->delShow($users->currentUserId(), $tvinfoID);
        }
        if (isset($_REQUEST['from'])) {
            header("Location:" . WWW_TOP . $_REQUEST['from']);
        } else {
            header("Location:" . WWW_TOP . "/myshows");
        }
        break;
    case 'add':
    case 'doadd':
        $show = $us->getShow($users->currentUserId(), $tvinfoID);
        if ($show) {
            $page->show404('Already subscribed');
        } else {
            $db = new DB();
Example #7
0
<?php

require_once WWW_DIR . "/lib/releases.php";
require_once WWW_DIR . "/lib/tvrage.php";
require_once WWW_DIR . "/lib/category.php";
require_once WWW_DIR . "/lib/userseries.php";
$releases = new Releases();
$tvrage = new TvRage();
$cat = new Category();
$us = new UserSeries();
if (!$users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"]) && ctype_digit($_GET['id'])) {
    $category = -1;
    if (isset($_REQUEST["t"]) && ctype_digit($_REQUEST["t"])) {
        $category = $_REQUEST["t"];
    }
    $catarray = array();
    $catarray[] = $category;
    $rel = $releases->searchbyRageId($_GET["id"], '', '', 0, 1000, "", $catarray, -1);
    $rage = $tvrage->getByRageID($_GET['id']);
    if (!$rage) {
        $page->smarty->assign("nodata", "No tvrage information for this series.");
    } elseif (!$rel) {
        $page->smarty->assign("nodata", "No releases for this series.");
    } else {
        $myshows = $us->getShow($users->currentUserId(), $rage[0]['rageID']);
        //sort releases by season, episode, date posted
        $season = $episode = $posted = array();
        foreach ($rel as $rlk => $rlv) {