$id2 = $row['subID']; $titulo2 = bd_getTitle($id2); $mquery = "select authorID from subs where subID={$id2} and version>0 order by entryID DESC limit 1"; $mresult = mysql_query($mquery); $author2 = mysql_result($mresult, 0); $authorName2 = bd_getUsername($author2); $url2 = bd_getUrl($id2); $image2 = bd_getIcon($id2); } if ($row = mysql_fetch_assoc($lastedited_result)) { $id3 = $row['subID']; $titulo3 = bd_getTitle($id3); $mquery = "select authorID from subs where subID={$id3} and version>0 order by entryID DESC limit 1"; $mresult = mysql_query($mquery); $author3 = mysql_result($mresult, 0); $authorName3 = bd_getUsername($author3); $url3 = bd_getUrl($id3); $image3 = bd_getIcon($id3); } echo '<tr> <td>' . $image1 . '</td> <td><big><a href="' . $url1 . '">' . $titulo1 . '</a></big> <small>' . $wikilang_edited_by . ' <strong><a href="/user/' . $author1 . '">' . $authorName1 . '</a></strong></small></td> </tr> <tr> <td>' . $image2 . '</td> <td><big><a href="' . $url2 . '">' . $titulo2 . '</a></big> <small>' . $wikilang_edited_by . ' <strong><a href="/user/' . $author2 . '">' . $authorName2 . '</a></strong></small></td> </tr> <tr> <td>' . $image3 . '</td> <td><big><a href="' . $url3 . '">' . $titulo3 . ' </a></big> <small>' . $wikilang_edited_by . ' <strong><a href="/user/' . $author3 . '">' . $authorName3 . '</a></strong></small></td> </tr>';
if ($linkcount > 0) { ?> <tr> <td colspan="6"><small class="extra"><strong><?php echo $wikilang_linked_versions; ?> </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
<?php include 'includes/includes.php'; if (isset($_POST['newcomment'])) { $myID = $_POST['id']; $newc = addslashes($_POST['newcomment']); $uID = $_SESSION['userID']; $username = bd_getUsername($uID); $query = "insert into comments(subID,userID,username,date,comment) "; $query .= "values({$myID}, {$uID}, '{$username}', NOW(),'{$newc}')"; mysql_query($query); } else { $myID = $_GET['id']; if (isset($_GET['cid'])) { $query = "select subID from comments where commentid=" . $_GET['cid']; $result = mysql_query($query); $myID = mysql_result($result, 0); } } ?> <form action="/ajax_getComments.php" method="post" onsubmit="return enviar();" id="newc"> <h4><?php echo $wikilang_comments; ?> </h4> <?php $query = "select * from comments where subID={$myID} and deleted=0"; $result = mysql_query($query);
<td class="NewsTitle"><?php echo $wikilang_date_date; ?> </td> </tr> <?php $query = "select msgID,`to`,date,subject from msgs where `from`={$me} and fromDelete=0 order by DATE DESC"; $result = mysql_query($query); $nummsgs = mysql_affected_rows(); $tickcount = 0; while ($row = mysql_fetch_assoc($result)) { $msgID = $row['msgID']; $date = obtenerFecha($row['date']); $subject = utf8_decode(stripslashes($row['subject'])); $to = $row['to']; $toName = bd_getUsername($to); $opened = $row['opened'] == '1'; echo '<tr><td>'; echo "<input type=\"checkbox\" name=\"tick{$tickcount}\" value=\"{$msgID}\" />"; if ($opened) { echo '<img src="/' . $SCRIPT_PATH . 'email_open.png" /></td>'; } else { echo '<img src="' . $SCRIPT_PATH . 'images/email_go.png" /></td>'; } echo "<td><a href=\"msgcreate.php?to={$to}\">{$toName}</a></td>"; echo "<td><a href=\"msgview.php?id={$msgID}\">{$subject}</a></td>"; echo "<td>{$date}</td>"; echo '</tr>'; $tickcount++; } ?>
<?php include 'includes/includes.php'; $vuser = $_GET['userid']; $vname = bd_getUsername($vuser); $query = "select website,joined from users where userID={$vuser}"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $website = stripslashes($row['website']); $joined = $row['joined']; ?> <!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> <?php echo "{$wikilang_user} {$vname} - wikisubtitles.net"; ?> </title> </head> <body> <?php include 'header.php'; ?> <table width="90%" border="0"> <tr><td class="titulo" colspan="4">
<td><?php echo $wikilang_total_lines_current; ?> </td> <td><?php echo $wikilang_total_lines_version0; ?> </td> </tr> <?php $query = "select distinct(authorID) from subs where subID={$id} and fversion={$fversion} and lang_id={$lang}"; $result = mysql_query($query); $contador = 0; while ($row = mysql_fetch_assoc($result)) { $authorID = $row['authorID']; $authorname = bd_getUsername($authorID); $totallines = bd_countModificationsByUser($id, $lang, $authorID, $fversion); $totalOriginal = bd_countOriginalLinesByUserSub($id, $lang, $fversion, $authorID); $totalLast = bd_countLastLinesByUserSub($id, $lang, $fversion, $authorID); echo '<tr>'; echo '<td><input type="radio" name="author" value="' . $authorID . '" /></td>'; echo '<td><a href="/user/' . $authorID . '">' . $authorname . '</a></td>'; echo '<td>' . $totallines . '</td>'; echo '<td><b>' . $totalLast . '</b></td>'; echo '<td>' . $totalOriginal . '</td>'; echo '<tr>'; } ?> <tr> <td colspan="6" align="center"><input type="checkbox" name="notoriginal" value="true" /> <?php echo $wikilang_dont_delete_original;
<span id="comments"> <form action="/translate_comments.php" method="post" onsubmit="return enviar();" id="newc"> <table width="90%" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td colspan="2" class="NewsTitle"><?php echo $wikilang_comments; ?> </td> </tr> <?php $query = "select * from transcomments where subID={$id} and fversion={$fversion} and lang_id={$langto}"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $cid = $row['author']; $cuser = bd_getUsername($cid); $cc = stripslashes($row['text']); echo '<tr> <td width="21%"><img src="images/user_comment.png" width="16" height="16" />'; echo "<a href=\\/user/{$cid}\">{$cuser}</a>"; echo '</td>'; echo '<td width="66%">'; echo $cc; echo '</td></tr>'; } if (isset($_SESSION['userID'])) { echo '<tr> <td><div align="right"> <input name="Submit" type="submit" class="coolBoton" value="' . $wikilang_send_comment . '" /> </div></td> <td><textarea name="newcomment" cols="70"></textarea></td>
<td class="NewsTitle"><?php echo $wikilang_date_date; ?> </td> </tr> <?php $query = "select msgID,`from`,date,subject,opened from msgs where `to`={$me} and toDelete=0 order by DATE DESC"; $result = mysql_query($query); $nummsgs = mysql_affected_rows(); $tickcount = 0; while ($row = mysql_fetch_assoc($result)) { $msgID = $row['msgID']; $date = obtenerFecha($row['date']); $subject = utf8_decode(stripslashes($row['subject'])); $from = $row['from']; $fromName = bd_getUsername($from); $opened = $row['opened'] == '1'; echo '<tr><td>'; echo "<input type=\"checkbox\" name=\"tick{$tickcount}\" value=\"{$msgID}\" />"; if ($opened) { echo '<img src="' . $SCRIPT_PATH . 'images/email_open.png" /></td>'; } else { echo '<img src="/' . $SCRIPT_PATH . 'mages/email_go.png" /></td>'; } echo "<td><a href=\"msgcreate.php?to={$from}\">{$fromName}</a></td>"; echo "<td><a href=\"msgview.php?id={$msgID}\">{$subject}</a></td>"; echo "<td>{$date}</td>"; echo '</tr>'; $tickcount++; } ?>
</head> <body> <?php include 'header.php'; ?> <div align="center" class="titulo"><?php echo $wikilang_top_uploaders; ?> </div> <table align="center" border="0" cellpadding="0" cellspacing="0"> <?php $query = "select userID,uploads from users order by uploads DESC limit 50"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $uid = $row['userID']; $uname = bd_getUsername($uid); $uploads = $row['uploads']; echo '<tr>'; echo '<td class="NewsTitle"><a href="/user/' . $uid . '">' . $uname . '</a></td>'; echo '<td>' . $uploads . ' ' . $wikilang_files . '</td>'; echo '</tr>'; } ?> </table> <?php include 'footer.php'; bbdd_close(); ?> </body>
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();
echo '</td>'; echo '<td>'; $title = bd_getTitle($subID); $url = bd_getUrl($subID); echo '<a href="' . $url . '">' . $title . '</a>'; echo '</td>'; echo '<td>'; $langname = bd_getLangName($lang); $versionDESC = bd_getFVersion($subID, $fversion); $versionSize = bd_getFVersionSize($subID, $fversion); echo "{$wikilang_version} {$fversion} ({$versionDESC}, {$versionSize} Mbs), {$wikilang_language} {$langname}"; echo '</td>'; echo '<td>' . $counter . '</td>'; echo '<td>'; if (!$active) { echo bd_getUsername($moderator); } else { echo ' '; } echo '</td>'; echo '<td>'; if (!$active) { echo $comment; } else { echo '<form method="post">'; hidden('entry', $entry); echo '<textarea name="newcomment" cols="40"></textarea>'; echo '<input type="submit" value="Resolve" class="coolBoton" />'; echo '</form>'; } echo '</td>';
echo $text; echo "</textarea>"; echo '<input name="Save" type="submit" class="coolBoton" value="' . $wikilang_save . '" />'; echo '</form>'; } else { $row = mysql_fetch_assoc($result); $tokened = $row['tokened']; $tokened_user = $row['userID']; if (!$tokened || $tokened_user == $_SESSION['userID']) { //set token $query = "update translating set tokened=1,userID={$userID} where subID={$id} and fversion={$fversion} and lang_id={$langto} and sequence={$seq}"; mysql_query($query); echo "<form method=\"post\" onsubmit=\"return update('o', '{$seq}');\" id=\"of{$seq}\">"; hidden("id", $id); hidden("fversion", $fversion); hidden("langto", $langto); hidden("langfrom", $langfrom); hidden("seq", $seq); echo '<input type="hidden" name="Cancel" id="Cancel' . $seq . '" value="false">'; echo "<textarea name=\"ttext\" cols=\"60\">"; echo "</textarea>"; echo '<input name="Save" type="submit" class="coolBoton" value="' . $wikilang_save . '" />'; echo '<input name="Cancel" type="submit" class="coolBoton" value="' . $wikilang_cancel . '" onclick="setCancel(' . "'{$seq}'" . ')"/>'; echo '</form>'; } else { $myuser = bd_getUsername($tokened_user); echo "<a href=\"/user/{$myuserID}\">{$myuser}</a> {$wikilang_currently_translating}"; } } } bbdd_close();
<div id="header"> <h1><a href="/index.php">Subtítols</a></h1> <?php if (isset($_SESSION['userID'])) { $meme = $_SESSION['userID']; $username = bd_getUsername($_SESSION['userID']); $queryheader = "select count(*) from msgs where `to`={$meme} and noticed=0"; $resultheader = mysql_query($queryheader); $noticedcount = mysql_result($resultheader, 0); $queryheader = "select count(*) from msgs where `to`={$meme} and opened=0"; $resultheader = mysql_query($queryheader); $openedcount = mysql_result($resultheader, 0); if ($noticedcount > 0 && $openedcount > 0 && !isset($_SESSION['msgadvised'])) { ?> <script language="javascript"> <?php echo "var url=\"/msgspopup.php?count={$openedcount}\";"; ?> editwin = window.open(url, "msgswin", 'height=200,width=350,toolbar=0,location=0,statusbar=0,menubar=0'); if (editwin.focus) {editwin.focus()} </script> <?php } echo "<dl class=\"country\">\n"; echo "<dt>" . $wikilang_welkome . ' '; echo "<a href=\"/myaccount.php\">{$username}</a></dt>\n"; echo '<dd><a href="/msginbox.php">' . $openedcount; echo ' ' . $wikilang_unread_messages . '</a> · <a href="/newsub.php">' . $wikilang_upload_new . '</a> · <a href="/logout.php">' . $wikilang_logout . '</a></dd>';
$last_authorID = 0; while ($row = mysql_fetch_assoc($finalresult)) { if ($row['last'] == '1') { $class = 'originalText'; } else { $class = 'quotedText'; } if ($row['lang_id'] != $lang) { $class = ''; } if ($row['locked'] && $row['last']) { $class = 'lockedText'; } if ($last_authorID != $row['authorID']) { $last_authorID = $row['authorID']; $myauthor = bd_getUsername($last_authorID); } echo '<tr class="' . $class . '" valign="top" id="trseq' . $row['edited_seq'] . '">'; if ($lock) { if ($row['last']) { if ($row['locked']) { echo '<td align="right" id="lock' . $row['edited_seq'] . '"><a href="javascript:lock(true, \'' . $row['edited_seq'] . '\');" ><img src="' . $SCRIPT_PATH . 'images/lock.png" border="0" /></a></td>'; } else { echo '<td align="right" id="lock' . $row['edited_seq'] . '"><a href="javascript:lock(false, \'' . $row['edited_seq'] . '\');" ><img src="' . $SCRIPT_PATH . 'images/lock_open.png" border="0" /></a></td>'; } } else { echo '<td> </td>'; } } echo '<td>' . $row['edited_seq'] . '</td>'; echo '<td><div align="center">' . $row['version'] . '</div></td>';
for ($contav = 0; $contav < $nversions; $contav++) { $v = $version[$contav]['num']; //*************** languages $query = "SELECT DISTINCT lang_id from flangs where subID={$myID} and fversion={$v} order by entryID"; //echo $query; $result = mysql_query($query); $numlanguages = mysql_affected_rows(); $version[$v]['numlanguages'] = $numlanguages; for ($c = 0; $c < $numlanguages; $c++) { $row = mysql_fetch_assoc($result); $currentLangID = $row['lang_id']; $langs[$v][$c][0] = $currentLangID; $langs[$v][$c][1] = bd_getLangName($currentLangID); $langs[$v][$c][2] = bd_getLangState($myID, $currentLangID, $v); $langs[$v][$c][3] = bd_countLinesEditedByLang($myID, $currentLangID, $v); $query = "select count(*) from downloads where subID={$myID} and fversion={$v} and lang={$currentLangID}"; $dresult = mysql_query($query); $langs[$v][$c][4] = mysql_result($dresult, 0); } //******************************** } $query = "select count(*) from subs where subID={$myID} and version>0"; $result = mysql_query($query); $nummod = mysql_result($result, 0); $candel = $nummod < 1 && $nversion == 1; } $meID = $_SESSION['userID']; if (isset($meID)) { $me = bd_getUsername($meID); } $ahora = date("F j, Y, g:i a");