'$UI[fanart_dseen]' $_fav"; // print_r($_q); $_qw = mysql_query($_q); $_row2 = mysql_fetch_array($_qw); */ if (empty($_REQUEST['limit'])) $limit=0; else $limit=$_REQUEST['limit']; $limit=intval($limit); if ($limit<0) $limit=0; //$dont_auth=1; if(isset($user_id)) { if (!empty($UI['sekce'])) // filtr na sekce $_fs=" AND NOT($NF_FANART_TABLE.sekce IN $UI[sekce]) "; else $_fs=""; if (!isset($_REQUEST['limit'])) // empty($limit) - ale my chceme umoznit skok na nejnovejsi pomoci limit=0 { $_q="SELECT author_id FROM $NF_FANART_TABLE WHERE datum<=NOW() AND approved>'$last_dseen' AND publish>0 $_fav $_fs GROUP BY $NF_FANART_TABLE.author_id"; @$_pn=intval(MySQL_Num_Rows(MySQL_Query($_q))); // echo "$_q
\n[$_pn]
\n"; if ($_pn>$IDX_THUMB_COUNT) $limit=$_pn-$IDX_THUMB_COUNT; if (!empty($_pn)) { $_not.=" (celkem nových: $_pn)"; } } if (empty($limit)) // od zacatku - pouzij jednodussi verzi { $q="UPDATE uzivatel SET fanart_seen=$_row[mid], fanart_dseen=NOW() WHERE id='$user_id'"; $UI['fanart_seen']=$_row['mid']; $UI['fanart_dseen']=$_row['nw']; } else // oznac jen to, co uvidi { $_gpar='?limit=0'; // aby se slo dostat cudlikem "Galerie" na nejnovejsi prispevky $q="SELECT author_id, MAX(id) AS mid, MAX(approved) AS m_datum FROM $NF_FANART_TABLE WHERE datum<=NOW() AND approved>'$last_dseen' AND publish>0 $_fav $_fs GROUP BY $NF_FANART_TABLE.author_id ORDER BY m_datum DESC, mid DESC LIMIT $limit,1"; // echo "$q
\n"; $_r=MySQL_Query($q); $_v=MySQL_Fetch_Array($_r); $_row['mid']=$_v['mid']; if (!empty($_row['mid'])) $q="UPDATE uzivatel SET fanart_seen='$_v[mid]', fanart_dseen='$_v[m_datum]' WHERE id='$user_id'"; } @MySQL_Query($q); /* setcookie('g_seen', $_row['mid'], time()+3600*24*365);*/ $g_seen = $_row['mid']; //aby oznaceni zmizelo hned } else { $last_seen=0; } ?> Oficiální stránky klubu MangaCZ ?> ?>
Fanart - Novinky / Oblíbení autoři / Galerie

0): ?>

.:: Stav nahraných obrázků ::.
Nejnovější příspěvky
0 $_fav $_fs group by $NF_FANART_TABLE.author_id order by m_datum desc, latest_id desc limit $limit, $IDX_THUMB_COUNT"; if (!($_v = MySQL_Query($_q))) echo "Thumb select error"; // $_vc = MySQL_Query("select max(approved) as m_datum, max(nf_fanart.id) as latest_id, count(author_id) AS cid FROM $NF_FANART_TABLE, uzivatel where $NF_FANART_TABLE.author_id=uzivatel.id and datum<=now() and publish>0 group by $NF_FANART_TABLE.author_id order by m_datum desc, latest_id desc limit $limit, $IDX_THUMB_COUNT"); if ($_vc = MySQL_Query("SELECT FOUND_ROWS() AS totr")) { $_tota=MySQL_Fetch_Array($_vc); } $line_idx=0; if (!isset($last_seen)) $last_seen=0; if (!isset($last_dseen)) $last_dseen='NOW()'; while($_z = MySQL_Fetch_Array($_v)) { // $_v_novych = MySQL_Query("select count(id) as pn from $NF_FANART_TABLE WHERE id>$last_seen AND author_id=$_z[author_id]"); /* if ($user_id==1) { echo "select count(id) as pn from $NF_FANART_TABLE WHERE approved>'$last_dseen' AND author_id=$_z[author_id]"; } */ if ($line_idx==0) echo "\n"; $_v_novych = MySQL_Query("select count(id) as pn from $NF_FANART_TABLE WHERE approved>'$last_dseen' AND author_id=$_z[author_id] $_fs"); $_novych = MySQL_Fetch_Array($_v_novych); $_v_latest_q = "select * from $NF_FANART_TABLE where author_id='$_z[author_id]' and approved='$_z[m_datum]'"; $_v_latest = MySQL_Query($_v_latest_q); $_latest = MySQL_Fetch_Array($_v_latest); $_fname = ($_z['fname']) ? $_z['fname'] : $_z['name']; $_nu=""; if ($_novych['pn'] && $user_id) // if (($_z['latest_id']>$last_seen) && ($user_id)) { $_tc = "newthumb"; // trida pro novy thumbnail $_bb = ""; // bold begin & end $_be = ""; if ($_novych[0]>1) { $_nu=" ($_novych[0])"; } } else { $_tc = "thumb"; $_bb = $_be = ""; } print "\n"; if(++$line_idx == $IMG_PER_ROW) { $line_idx = 0; echo("\n"); } } print('

'); echo "
"; if ($limit+$IDX_THUMB_COUNT<$_tota['totr']) { echo "< Starší  \n"; } if ($limit>0) { echo "=$IDX_THUMB_COUNT)?($limit-$IDX_THUMB_COUNT):0)."$_foh\">Novější >\n"; } echo "
\n"; ?>