Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,43 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Valid HTML 4.01 Transitional
5
+// Based on eFiction 1.1
6
+// Copyright (C) 2003 by Rebecca Smallwood.
7
+// http://efiction.sourceforge.net/
8
+// ----------------------------------------------------------------------
9
+// LICENSE
10
+//
11
+// This program is free software; you can redistribute it and/or
12
+// modify it under the terms of the GNU General Public License (GPL)
13
+// as published by the Free Software Foundation; either version 2
14
+// of the License, or (at your option) any later version.
15
+//
16
+// This program is distributed in the hope that it will be useful,
17
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+// GNU General Public License for more details.
20
+//
21
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
22
+// ----------------------------------------------------------------------
23
+
24
+
25
+if(!defined("_CHARSET")) exit( );
26
+if(!defined("_CHALLENGES")) {
27
+	global $language;
28
+	if(file_exists(_BASEDIR."modules/challenges/languages/{$language}.php")) include_once(_BASEDIR."modules/challenges/languages/{$language}.php");
29
+	else include_once(_BASEDIR."modules/challenges/languages/en.php");
30
+}
31
+if(!empty($stories['challenges'])) {
32
+	$challengelinks = array( );
33
+	$chalresult = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_challenges WHERE FIND_IN_SET(chalid, '".$stories['challenges']."') > 0");
34
+	while($chal = dbassoc($chalresult)) {
35
+		$challengelinks[] = "<a href='"._BASEDIR."modules/challenges/challenges.php?chalid=".$chal['chalid']."'>".stripslashes($chal['title'])."</a>";
36
+	}
37
+	$tpl->assign("challengelinks", (!empty($challengelinks) ? implode(", ", $challengelinks) : _NONE));
38
+	$allclasslist .= "<span class='label'>"._CHALLENGES.": </span> ".implode(", ", $challengelinks)."<br />";
39
+}
40
+else $tpl->assign("challengelinks", _NONE);
41
+if($current == "challenges") $adminlinks  .= " [<a href='challenges.php?action=remove&amp;chalid=".$chalid."&amp;sid=".$stories['sid']."'>"._REMOVECHALLENGE."</a>]";
42
+
43
+?>
0 44
\ No newline at end of file