Mercurial > hg > fapweb
diff showajax.php @ 387:3cc078b17260
Show backend work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Dec 2013 09:06:06 +0200 |
parents | 0693747fa7d3 |
children | 0c1798c9d486 |
line wrap: on
line diff
--- a/showajax.php Thu Dec 05 08:30:34 2013 +0200 +++ b/showajax.php Thu Dec 05 09:06:06 2013 +0200 @@ -15,17 +15,23 @@ if ($title !== false) echo - " <div class=\"title\">".$title."</div>\n"; + " <div class=\"entryTitle\">".$title."</div>\n"; echo " <div class=\"entryIndex\">#".$entry["show_id"]."</div>\n". " <div class=\"entryName\">".chentities($entry["name"])."</div>\n"; if ($compo["showAuthors"]) + { + if ($title === false) + echo " <div class=\"entryBy\">by</div>\n"; echo " <div class=\"entryAuthor\">".chentities($entry["author"])."</div>\n"; + } + + if ($title === false) + echo " <div class=\"entryInfo\">".chentities($entry["info"])."</div>\n"; echo - " <div class=\"entryInfo\">".chentities($entry["info"])."</div>\n". " </div>\n"; } @@ -35,7 +41,7 @@ echo " <div class=\"compoHeader\">\n". " <img src=\"img/fapsm.png\" /><br />\n". - " <div class=\"title\">".chentities($compo["name"])." competition</div>\n". + " <div class=\"compoTitle\">".chentities($compo["name"])." competition</div>\n". " </div>\n"; if ($entry !== false) @@ -152,6 +158,9 @@ // Competition mode, is controlled from admin UI, so we donẗ // actually do anything here. // + if (time() >= stGetDisplayVar("activeSlideExpire")) + stSetDisplayVar("activeSlideMode", SMODE_COMPO); + break; } @@ -201,17 +210,18 @@ case SMODE_COMPO: // Competition mode, show entry data + $compo_id = stGetDisplayVar("compoID"); $compo = stFetchSQL(stPrepareSQL( "SELECT * FROM compos WHERE id=%d", - stGetDisplayVar("compoID"))); + $compo_id)); $prev = stFetchSQL(stPrepareSQL( - "SELECT * FROM entries WHERE id=%d", - stGetDisplayVar("compoPrevEntry"))); + "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d", + $compo_id, stGetDisplayVar("compoPrevEntry"))); $entry = stFetchSQL(stPrepareSQL( - "SELECT * FROM entries WHERE id=%d", - stGetDisplayVar("compoCurrEntry"))); + "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d", + $compo_id, stGetDisplayVar("compoCurrEntry"))); if ($compo !== false) stPrintCompoSlide($compo, $entry, $prev);