Beispiel #1
0
            echo ' · <a href="/jointranslation.php' . $ref . '">' . $wikilang_join_translation . '</a> ';
        }
        echo ' · <a href="/list.php' . $ref . '">' . $wikilang_view_edit . '</a>';
        ?>
</small></td>
		<td><?php 
        $secs = bd_flangsVersion0($myID, $v, $clangID);
        echo "{$secs} {$wikilang_sequences}";
        ?>
</td>
		<td><?php 
        if ($clangState == $wikilang_completed && $clangID != $voriginalLang) {
            $query = "select count(*) from lasttranslated where subID={$myID} and fversion={$v} and lang_id={$clangID}";
            $result = mysql_query($query);
            if (mysql_result($result, 0) == 0) {
                tn_check($myID, $fversion, $voriginalLang, $clangID);
                $clangState = bd_getLangState($myID, $clangID, $version);
            }
        }
        echo $clangState;
        ?>
</td>
					<td>
						<?php 
        if ($clangEdited > 0) {
            echo "{$wikilang_edited} " . obtenerFecha(bd_getLastTimeEdited($myID, $v, $clangID));
        }
        ?>
    </td>
  </tr>
 <?php 
<?php

include_once 'includes/includes.php';
include_once 'translate_fns.php';
$MAX_PAGE = 20;
$id = $_GET['id'];
$langto = $_GET['langto'];
$langfrom = $_GET['langfrom'];
$fversion = $_GET['fversion'];
$untranslated = getBool('untraslated');
if (!isset($fversion)) {
    $fversion = 0;
}
tn_check($id, $fversion, $langfrom, $langto);
$start = $_GET['start'];
if (!isset($start)) {
    $start = 0;
}
$updated = "updated";
$mode = "updated";
$author = $_GET['user'];
$slang = $langfrom;
$squery = "select authorID,version,original,locked,text,lang_id,edited_seq,last,estart_time,estart_time_fraction,eend_time,eend_time_fraction,fversion from subs ";
$query = "where subID={$id} and fversion={$fversion}";
$query .= " and lang_id={$langfrom}";
if ($untranslated) {
    $query .= " and edited_seq= ANY (select sequence from translating where subID={$id} and fversion={$fversion} and lang_id={$langto})";
}
$query .= " and last=1 order by edited_seq,version";
$fquery .= " limit {$start},{$MAX_PAGE}";
$finalresult = mysql_query($squery . $query . $fquery);
Beispiel #3
0
function bd_testAll()
{
    $query = "select subID,fversion,lang_id from flangs where state<=100";
    $result = mysql_query($query);
    while ($row = mysql_fetch_assoc($result)) {
        $subID = $row['subID'];
        $fversion = $row['fversion'];
        $lang = $row['lang_id'];
        $original = bd_getOriginalLang($subID, $fversion);
        $title = bd_getTitle($subID);
        echo $title . '<br />';
        tn_check($subID, $fversion, $original, $lang);
    }
}
Beispiel #4
0
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();
Beispiel #5
0
function tn_super_test($subID, $fversion, $lang)
{
    $original = bd_getOriginalLang($subID, $fversion);
    tn_check($subID, $fversion, $original, $lang);
    tn_start($subID, $fversion, $original, $lang);
    //tn_check($subID, $fversion, $original, $lang);
}