exit; } $id = $_GET['id']; $fversion = $_GET['fversion']; $lang = $_GET['lang']; $query = "delete from flangs where subID={$id} and fversion={$fversion} and lang_id={$lang}"; mysql_query($query); $query = "delete from subs where subID={$id} and fversion={$fversion} and lang_id={$lang}"; mysql_query($query); $query = "select count(*) from flangs where subID={$id} and fversion={$fversion}"; $result = mysql_query($query); if (mysql_result($result, 0) < 1) { $query = "delete from fversions where subID={$id} and fversion={$fversion}"; mysql_query($query); $query = "delete from translating where subID={$id} and fversion={$fversion}"; mysql_query($query); $query = "select max(fversion) from fversions where subID={$id}"; $result = mysql_query($query); if (mysql_result($result, 0) > $fversion) { $query = "update fversions set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); $query = "update flangs set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); $query = "update subs set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); } } log_insert(LOG_deleteLanguage, bd_getLangName($lang), $_SESSION['userID'], $id, bd_userIsModerador()); $url = bd_getUrl($id); location($url); bbdd_close();
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); } } $title = bd_getTitle($id); log_insert(LOG_updateprop, '', $userID, $id, bd_userIsModerador()); $url = bd_getUrl($id); location("{$url}"); bbdd_close();
?> </strong> <?php while ($linkrow = mysql_fetch_assoc($result)) { ?> <?php echo $linkrow['versionDESC'] . ', ' . $linkrow['versionSize'] . ' MBs'; ?> · <?php echo "{$wikilang_uplodaded_by} <a href='/user/" . $linkrow['author'] . "'>" . bd_getUsername($linkrow['author']) . '</a>'; ?> <?php echo $linkrow['downloads'] . " {$wikilang_downloads} "; if (bd_userIsModerador()) { echo "<a href='/dellink.php?linkid=" . $linkrow['linkID'] . "'>" . 'Delete</a>'; } $query = "select distinct(lang_id) from flangs where subID={$myID} and fversion={$v}"; $lresult = mysql_query($query); while ($llrow = mysql_fetch_assoc($lresult)) { $llid = $llrow['lang_id']; $llname = bd_getLangName($llid); $llstate = bd_getLangState($myID, $llid, $v); ?> <?php echo $llname; echo '<a href="' . $SCRIPT_PATH . 'downloadlink.php?linkID=' . $linkrow['linkID'] . '&lang=' . $llid . '">'; echo $wikilang_download; ?> </a>
echo "Forbidden"; bbdd_close(); exit; } $id = $_POST['id']; $fversion = $_POST['fversion']; if (isset($fversion)) { $modifications = bd_countSubNoOriginal($id, $fversion); } else { $modifications = bd_countSubNoOriginal($id, 0); } $query = "select title,author from files where subID={$id}"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $author = $row['author']; if ($author != $_SESSION['userID'] && !bd_userIsModerador()) { echo "Forbidden"; bbdd_close(); exit; } if (isset($fversion)) { $query = "delete from subs where subID={$id} and fversion={$fversion}"; } else { $query = "delete from subs where subID={$id}"; } mysql_query($query); if (!isset($fversion)) { $query = "delete from files where subID={$id}"; mysql_query($query); $query = "delete from comments where subID={$id}"; mysql_query($query);
<?php include 'includes/includes.php'; $cid = $_GET['cid']; $query = "select * from comments where commentid={$cid}"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); if (bd_userIsModerador() || $row['userID'] == $_SESSION['userID']) { $query = "update comments set deleted=1 where commentid={$cid}"; mysql_query($query); } bbdd_close(); echo "OK";
<?php include 'includes/includes.php'; $linkID = $_GET['linkid']; $subID = bd_link_getSubID($linkID); if (!bd_userIsModerador()) { bbdd_close(); location(bd_getUrl($subID)); exit; } $query = "delete from links_data where linkID={$linkID}"; mysql_query($query); $query = "delete from links where linkID={$linkID}"; mysql_query($query); log_insert(LOG_deleteLink, bd_link_getFversion($linkID), $_SESSION['userID'], $subID, bd_userIsModerador()); location(bd_getUrl($subID)); bbdd_close();
while ($numresults > 0) { $query = "select entryID,edited_seq,version from subs where subID={$id} and fversion={$fversion} and lang_id={$lang} and authorID={$author} and last=1"; $result = mysql_query($query); $numresults = mysql_affected_rows(); while ($row = mysql_fetch_assoc($result)) { $entry = $row['entryID']; $seq = $row['edited_seq']; $version = $row['version']; if (!$notoriginal) { $query = "delete from subs where entryID={$entry}"; mysql_query($query); } if ($version > 0) { if ($notoriginal) { $query = "delete from subs where entryID={$entry}"; mysql_query($query); } $minver = $version - 1; $query = "update subs set last=1 where subID={$id} and fversion={$fversion} and lang_id={$lang} and edited_seq={$seq} and version={$minver}"; mysql_query($query); } } } if (bd_getOriginalLang($id, $fversion) != $lang && !bd_isMerged($id, $fversion, $lang)) { tn_check($id, $fversion, bd_getOriginalLang($id, $fversion), $lang); bd_confirmTranslated($id, $fversion, $lang); } $authorName = bd_getUsername($authorName); log_insert(LOG_troll, "User {$authorname}", $_SESSION['userID'], $id, bd_userIsModerador()); location("/antitroll.php?id={$id}&fversion={$fversion}&lang={$lang}"); bbdd_close();
mysql_query($query); $query = "select max(fversion) from fversions where subID={$id}"; $result = mysql_query($query); if (mysql_result($result, 0) > $fversion) { $query = "update fversions set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); $query = "update flangs set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); $query = "update subs set fversion = fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); } $url = bd_getUrl($id); location("{$url}"); log_insert(LOG_deleteVersion, "version {$fversion}", $_SESSION['userID'], $id, bd_userIsModerador()); } else { $query = "delete from fversions where subID={$id}"; mysql_query($query); $query = "delete from flangs where subID={$id}"; mysql_query($query); $query = "delete from subs where subID={$id}"; mysql_query($query); $query = "delete from translating where subID={$id}"; mysql_query($query); $query = "delete from files where subID={$id}"; mysql_query($query); $query = "delete from lasttranslated where subID={$id}"; mysql_query($query); location("/index.php"); log_insert(LOG_deleteFile, $title, $_SESSION['userID'], $id, bd_userIsModerador()); } bbdd_close();
$query .= " order by edited_seq,version"; } else { if ($mode == "updated") { $query .= " and last=1 order by edited_seq,version"; } else { if ($mode == "user") { $query .= " and authorID={$author} order by edited_seq,version,entryID"; } } } $fquery .= " limit {$start},{$MAX_PAGE}"; $finalresult = mysql_query($squery . $query . $fquery); $countquery = "select count(*) from subs " . $query; $result2 = mysql_query($countquery); $total = mysql_result($result2, 0); $lock = bd_userIsModerador() || logged() && bd_getFVersionAuthor($id, $fversion) == $_SESSION['userID']; ?> <table align="center" width="100%" border="0"> <tr><td align="center"> <?php if (!isset($timefrom)) { if ($mode == "updated") { echo "<input type=\"checkbox\" name=\"updated\" value=\"true\" onchange=\"list('{$start}','','{$slang}');\" checked/>"; } else { echo "<input type=\"checkbox\" name=\"updated\" value=\"true\" onchange=\"list('{$start}','true','{$slang}');\"/>"; } } else { if ($mode == "updated") { echo "<input type=\"checkbox\" name=\"updated\" value=\"true\" onchange=\"apply_filter('{$slang}','','{$start}');\" checked/>"; } else {
<?php include_once 'includes/includes.php'; if (!bd_userIsModerador()) { bbdd_close(); exit; } $id = $_GET['id']; $fversion = $_GET['fversion']; $prevv = $fversion - 1; $query = "update subs set original=0,fversion={$prevv} where subID={$id} and fversion={$fversion}"; mysql_query($query); $query = "update flangs set merged=1,original=0,fversion={$prevv} where subID={$id} and fversion={$fversion}"; mysql_query($query); $query = "delete from fversions where subID={$id} and fversion={$fversion}"; mysql_query($query); $query = "delete from flangs where subID = {$id} and fversion={$fversion}"; mysql_query($query); $query = "select max(fversion) from fversions where subID={$id}"; $result = mysql_query($query); if (mysql_result($result, 0) > $fversion) { $query = "update fversions set fversion=fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); $query = "update flangs set fversion=fversion -1 where subID={$id} and fversion>{$fversion}"; mysql_query($query); } log_insert(LOG_merge, "Merged from version {$fversion} to {$prevv}", $_SESSION['userID'], $id, bd_userIsModerador()); $url = bd_getUrl($id); location($url); bbdd_close();