Example #1
0
         $texto = addslashes($texto);
         if ($charset == 'd') {
             $texto = utf8_encode($texto);
         } elseif ($charset != 'u') {
             $texto = cyrillic2utf($texto, $charset);
         }
         $query = "insert into subs (subID,sequence,authorID,version,original,locked,in_date,start_time,start_time_fraction,end_time,end_time_fraction,text,lang_id,edited_seq, last,estart_time,estart_time_fraction,eend_time,eend_time_fraction,fversion) ";
         $query .= "values({$subID},{$secuencia},{$userID},0,1,0,NOW(),'" . $tiempos[0] . "',{$tiempos_start_fraction},'" . $tiempos[1] . "',{$tiempos_end_fraction},'{$texto}',{$lang},{$secuencia},1,'" . $tiempos[0] . "',{$tiempos_start_fraction},'" . $tiempos[1] . "',{$tiempos_end_fraction},0)";
         mysql_query($query);
     } else {
         $clin++;
     }
 }
 $query = "update files set duration='" . $tiempos[1] . "' where subID={$subID}";
 mysql_query($query);
 tn_duplicates($subID, 0, $lang);
 $newduration = $tiempos[1];
 $novalido = !isset($newduration) || $newduration == '';
 if (!$novalido) {
     $utf = $charset != 'd';
     if ($utf) {
         $utfval = 1;
     } else {
         $utfval = 0;
     }
     $query = "insert into flangs(subID,fversion,lang_id,state,testing,original,totalseq,totalVersion0, cyrillic)";
     $query .= " values({$subID},0,{$lang},100,0,1,{$secuencia},{$secuencia}, {$utfval})";
     mysql_query($query);
 } else {
     $error = true;
     $errordesc = "Wrong file format";
Example #2
0
<?php

$subID = $_GET['id'];
$fversion = $_GET['fversion'];
$lang = $_GET['lang'];
include 'includes/includes.php';
include 'translate_fns.php';
tn_duplicates($subID, $fversion, $lang);
bbdd_close();