예제 #1
0
<?php

include 'includes/includes.php';
$show = $_GET['show'];
$epnumber = $_GET['epnumber'];
$season = $_GET['season'];
$query = "select subID from files where is_episode=1 and showID={$show} and season={$season} and season_number={$epnumber}";
$result = mysql_query($query);
if (mysql_affected_rows() > 0) {
    $sID = mysql_result($result, 0);
    $showName = bd_getShowTitle($show);
    $title = bd_getTitle($sID);
    $url = bd_getUrl($sID);
    echo '<a href="' . $url . '">' . $title . '</a> ';
    echo "{$wikilang_ep_already_exists}";
} else {
    echo '' . $wikilang_ep_not_exists . '';
}
bbdd_close();
예제 #2
0
$comment = addslashes(strip_tags($_POST["comment"]));
$version = $_POST['version'];
$size = $_POST['fsize'];
$lang = $_POST['lang'];
$query = "update fversions set versionDesc='{$version}',size='{$size}',comment='{$comment}' where subID={$id} and fversion={$rversion}";
mysql_query($query);
$prev_lang = bd_getOriginalLang($id, $rversion);
if ($lang != $prev_lang) {
    $query = "update subs set lang_id={$lang} where subID={$id} and fversion={$rversion} and lang_id={$prev_lang}";
    mysql_query($query);
    $query = "update flangs set lang_id={$lang} where subID={$id} and fversion={$rversion} and lang_id={$prev_lang}";
    mysql_query($query);
}
if (!isset($fversion)) {
    if ($is_episode) {
        $showname = bd_getShowTitle($showID);
        if (strlen($season) < 2) {
            $season = '0' . $season;
        }
        if (strlen($epnumber) < 2) {
            $epnumber = '0' . $epnumber;
        }
        $title = $showname . ' - ' . $season . 'x' . $epnumber . ' - ' . $eptitle;
        $title = addslashes($title);
        $query = "update files set is_episode=1,title='{$title}',season={$season},season_number={$epnumber} where subID={$id}";
        mysql_query($query);
    } else {
        $title = $movietitle . " ({$year})";
        $tile = addslashes($title);
        $query = "update files set is_episode=0,title='{$title}' where subID={$id}";
        mysql_query($query);
예제 #3
0
<?php

include 'includes/includes.php';
$id = $_GET['showID'];
$_SESSION['quicksearch'] = true;
$_SESSION['quicksearch_show'] = $id;
echo '<a href="/show/' . $_SESSION['quicksearch_show'] . '"><b>' . bd_getShowTitle($_SESSION['quicksearch_show']) . '</b></a>';
echo ' 
		<select name="qsiSeason" id="qsiSeason" onchange="seasonChange(' . $id . ',-1);">';
if (!isset($_SESSION['quicksearch_season'])) {
    echo '<option value="0">' . $wikilang_season . '</option>';
}
$query = "select distinct(season) from files where showID={$id} order by season";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
    if (!isset($_SESSION['quicksearch']) || isset($_SESSION['quicksearch']) && $_SESSION['quicksearch_season'] != $row['season']) {
        echo '<option>' . $row['season'] . '</option>';
    } else {
        echo '<option selected>' . $row['season'] . '</option>';
    }
}
echo '</select>';
bbdd_close();
예제 #4
0
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Admin shows
</title>
<link href="/css/wikisubtitles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php 
include 'header.php';
?>
<span class="titulo">Admin shows</span><br/>
<?php 
foreach ($_POST as $nombre => $valor) {
    if ($nombre != "Delete") {
        $sid = substr($nombre, 1);
        $sname = bd_getShowTitle($sid);
        $query = "delete from shows where showID={$sid}";
        mysql_query($query);
        echo $sname . ' deleted<br />';
    }
}
include 'footer.php';
bbdd_close();
?>

</body>
예제 #5
0
function bd_getUrl($id)
{
    $query = "select is_episode,showID,season,season_number,title from files where subID={$id}";
    $result = mysql_query($query);
    $row = @mysql_fetch_assoc($result);
    $isep = $row['is_episode'];
    $title = stripslashes($row['title']);
    if ($isep) {
        $season = $row['season'];
        $season_number = $row['season_number'];
        $showID = $row['showID'];
        $titlearray = split(' - ', $title);
        $eptitle = $titlearray[2];
        $sName = bd_getShowTitle($showID);
        $sName = str_ireplace(' ', '_', $sName);
        $sName = str_ireplace('&', '@', $sName);
        $sName = urlencode($sName);
        $eptitle = str_ireplace(' ', '_', $eptitle);
        $url = "serie/{$sName}/{$season}/{$season_number}/{$eptitle}";
    } else {
        $title = str_ireplace(' ', '_', $title);
        $title = str_ireplace('&', '@', $title);
        $title = urlencode($title);
        $url = "film/{$title}";
    }
    return $SCRIPT_PATH . $url;
}
예제 #6
0
 $showID = $row['showID'];
 $season = $row['season'];
 $epnumber = $row['season_number'];
 $finished = $row['finished'];
 $duration = $row['duration'];
 $comment = stripslashes($row['comment']);
 $authorID = $row['author'];
 $downloads = $row['downloads'];
 $_SESSION['quicksearch'] = true;
 $_SESSION['quicksearch_show'] = $showID;
 $_SESSION['quicksearch_season'] = $season;
 $valor = $showID . '-' . $season . 'x' . $epnumber;
 $_SESSION['quicksearch_epID'] = $valor;
 $author = bd_getUsername($authorID);
 if ($is_episode) {
     $show = bd_getShowTitle($showID);
 } else {
     unset($_SESSION['quicksearch']);
     unset($_SESSION['quicksearch_show']);
     unset($_SESSION['quicksearch_season']);
     unset($_SESSION['quicksearch_epID']);
 }
 //versions
 $query = "select distinct fversion from fversions where subID={$myID}";
 $vresult = mysql_query($query);
 $nversions = mysql_affected_rows();
 $contav = 0;
 if ($nversions > 0) {
     while ($vrow = mysql_fetch_assoc($vresult)) {
         $v = $vrow['fversion'];
         $query = "select versionDesc,size,author,comment,indate from fversions where subID={$myID} and fversion={$v}";