"; $_lnk.="$val"; if ($key==$_lang) $_lnk.=""; $_fin[]=$_lnk; } $_pr=implode(" / ", $_fin); echo "\n
$_pr
\n"; } function view_serie_info($_v2, $_styl, $_maxp, $_totp, $_upd) { if ($_totp==0) $_totp='?'; echo "
"; if (strcmp($_v2['seriesType'], "film")) echo ""; else echo ""; echo "
$_v2[seriesName] ($_v2[seriesType])[$_maxp/$_totp] " . str_replace('-', '/', $_upd) . "
\n"; } function stripd($t) /* orezavani diakritiky */ { $t=strtr($t, "؊ݎ", "acdeeinorstuuyzACDEEINORSTUUYZ"); return $t; } function dotaz($_q) { global $_keys; global $_data; /* global $user_id; if ($user_id==1) { echo "$_q
\n"; } */ if ($_r=MySQL_Query($_q)) { /* if ($user_id==1) { echo "".MySQL_Num_Rows($_r)."
\n"; } */ while ($_v=MySQL_Fetch_Array($_r)) { /* if ($user_id==1) print_r($_v); */ $_keys[]=stripd($_v['nazev']); $_val['id']=$_v['id']; $_val['nazev']=$_v['nazev']; $_val['typ']=$_v['typ']; if ($_v['typ']==2) { $_val['totp']=$_v['totp']; $_val['seriesType']=$_v['seriesType']; } $_data[]=$_val; } } else { msg_box("Chyba pi dotazu na srie", (isadmin()?("$_q
\n".mysql_error()):(''))); } } function chcip() { ?>
Dal informace: Nvod -- Tvorba titulk -- Pehrvn titulk

 

Oficiln strnky klubu MangaCZ - Peklady */ ?>
 
Nzev: Druh: Jazyk:  
$_q
\n"; // $_q="SELECT ntsn.serie_id, ntsn.seriesName, nts.seriesType, nts.partCount AS totp FROM nt_seriename AS ntsn, nt_serie AS nts WHERE ntsn.seriesName LIKE '%$_REQUEST[sname]%' AND langAbbr='$_REQUEST[jazyk]'"; if (strcmp($_REQUEST['stype'],'oth')) $_q.=" AND nts.seriesType='$_REQUEST[stype]'"; if (strcmp($_REQUEST['jazyk'],'all')) $_q.=" AND langAbbr='$_REQUEST[jazyk]'"; $_q.=" GROUP BY seriesName, serie_id ORDER BY ntsn.seriesName"; // $_q.=" AND ntsn.serie_id=nts.serie_id ORDER BY ntsn.seriesName"; // echo "$_q
\n"; if (!($_r2=MySQL_Query($_q))) { msg_box("Chyba pri hledacim dotazu!", ($UI['msgs'] & 8)?(mysql_error()."
\n$_q
\n"):('')); $_dontd=1; break; } echo "
Nalezeno zznam: ".MySQL_Num_Rows($_r2)."
\n"; // echo "$_q
\n"; while($_v2 = mysql_fetch_array($_r2)) { $_q="select MAX(partNo) AS maxp,MAX(updateTimestamp) AS lastu FROM nt_preklad WHERE adminState=1 AND serie_id=$_v2[serie_id] GROUP BY serie_id"; // echo "$_q
\n"; if (($_r3=MySQL_Query($_q)) && (MySQL_Num_Rows($_r3))) { $_v3=MySQL_Fetch_Array($_r3); } else { $_v3['maxp']='X'; $_v3['lastu']=''; } // $series = GetLang($res_s); $lastu = explode(' ', $_v3['lastu']); /* echo "
\n";*/ // $series = GetLang($res_s); view_serie_info($_v2, 'samserie', $_v3['maxp'], $_v2['totp'], $lastu[0]); } $_dontd=1; // nezobrazovat normalni vypis serii break; } } // tohle vypiseme vzdycky - kvuli care dole - ciste zalezistost layoutu print '
'; echo "\n"; if (empty($_dontd)): // pokud neprobehlo vyhledavani a vypiseme vsechno (normalne) /*$_q="SELECT * FROM nt_titulname WHERE langAbbr='$_lang'"; if (isset($_REQUEST['range'])) { $_REQUEST['range']=intval($_REQUEST['range'])%count($_rangsql); $_q.=" AND FIND_IN_SET(LEFT(titleName, 1), CONVERT('".$_rangsql[$_REQUEST['range']]."' USING utf8))"; } $_q.=" ORDER BY titleName"; */ unset($_keys); unset($_data); $_qT="SELECT nt_titulname.titleName AS nazev, nt_titul.titul_id AS id, 1 AS typ FROM nt_titulname, nt_titul WHERE langAbbr='$_lang' AND nt_titul.titul_id=nt_titulname.titul_id AND nt_titul.seriesNum>1"; $_qS="SELECT nt_seriename.seriesName AS nazev, nt_seriename.serie_id AS id, nt_serie.partCount AS totp, nt_serie.seriesType, 2 AS typ FROM nt_seriename, nt_serie, nt_titul WHERE langAbbr='$_lang' AND mainName=1 AND nt_serie.serie_id=nt_seriename.serie_id AND nt_titul.titul_id=nt_serie.titul_id AND nt_titul.seriesNum=1"; if ( isset($_REQUEST['range']) && strcmp($_lang, 'znk') ) /* u znaku bez ranges */ { $_REQUEST['range']=intval($_REQUEST['range'])%count($_rangsql); if ($_REQUEST['range']<4) { $_qS.=" AND FIND_IN_SET(LEFT(seriesName, 1), CONVERT(_cp1250'".$_rangsql[$_REQUEST['range']]."' USING utf8))"; $_qT.=" AND FIND_IN_SET(LEFT(titleName, 1), CONVERT(_cp1250'".$_rangsql[$_REQUEST['range']]."' USING utf8))"; } } dotaz($_qT); dotaz($_qS); /* if ($user_id==1) { print_r($_data); } */ if ( !(is_array($_data) && is_array($_keys)) ) { chcip(); } array_multisort($_keys, SORT_ASC, SORT_STRING, $_data); //echo "$_q
\n"; //msg_box($_q); /*if (!$_r=MySQL_Query($_q)) { msg_box("Chyba pri dotazu na tituly!", (isadmin())?(mysql_error()."
$_q"):('')); chcip(); } */ $idx=0; //while ($_v=MySQL_Fetch_Array($_r)) reset($_data); while (list($key, $_v)=each($_data)) { switch ($_v['typ']) { case 1: // titul $_buff="\n"; $_buff.="\n"; $_buff=""; $idx++; break; case 2: $_styl="samserie"; $_q="select MAX(partNo) AS maxp,MAX(updateTimestamp) AS lastu FROM nt_preklad WHERE adminState=1 AND serie_id=$_v[id] GROUP BY serie_id"; // echo "$_q
\n"; if (($_r3=MySQL_Query($_q)) && (MySQL_Num_Rows($_r3))) { $_v3=MySQL_Fetch_Array($_r3); } else { break; // nebudeme vypisovat serie, u kterych nic neni $_v3['maxp']='X'; $_v3['lastu']=''; } $lastu = explode(' ', $_v3['lastu']); $_v2['serie_id']=$_v['id']; $_v2['seriesName']=$_v['nazev']; $_v2['seriesType']=$_v['seriesType']; $_v2['totp']=$_v['totp']; view_serie_info($_v2, $_styl, $_v3['maxp'], $_v2['totp'], $lastu[0]); break; } } endif; // konec $_dontd chcip(); ?>