if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("rallye"))
- ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye");
+} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
return;
}
// Add description as navigation point
ADD_DESCR("guest", __FILE__);
-OUTPUT_HTML("<DIV align=\"center\">");
+OUTPUT_HTML("<div align=\"center\">");
// Check for possible running rallyes
$ADMIN = " AND d.is_active='Y'";
if (IS_ADMIN()) $ADMIN = "";
$result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices
-FROM "._MYSQL_PREFIX."_rallye_data AS d, "._MYSQL_PREFIX."_admins AS a
+FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d, `{!_MYSQL_PREFIX!}_admins` AS a
WHERE d.admin_id=a.id".$ADMIN." AND d.notified='Y'
ORDER BY d.end_time LIMIT 1", __FILE__, __LINE__);
define('__RALLYE_EXTRAS', RALLYE_HAS_EXPIRED);
$expired = true;
}
- elseif (time() >= ($end - $_CONFIG['one_day']))
+ elseif (time() >= ($end - getConfig('one_day')))
{
// Rallye will expire in less one day!
define('__RALLYE_EXTRAS', RALLYE_EXPIRE_ONE_DAY);
}
else
{
- define('__RALLYE_EXTRAS', "<A href=\"".URL."/modules.php?module=index&what=register\">".RALLYE_REGISTER_NOW."</A>");
+ define('__RALLYE_EXTRAS', "<a href=\"{!URL!}/modules.php?module=index&what=register\">".RALLYE_REGISTER_NOW."</a>");
}
// Set admin line (currently set to impressum, later to contact form)
- define('__RALLYE_ADMIN', "<A href=\"".URL."/modules.php?module=index&what=impressum&admin=".$aid."\">".$login."</A>");
+ define('__RALLYE_ADMIN', "<a href=\"{!URL!}/modules.php?module=index&what=impressum&admin=".$aid."\">".$login."</a>");
// Set title
define('__RALLYE_TITLE', COMPILE_CODE($title));
if ($expired)
{
define('__RALLYE_PRICES', RALLYE_LIST_WINNERS($id));
- define('__RALLYE_TOP_USERS', "<DIV align=\"center\" class=\"big\">".__RALLYE_EXTRAS."</DIV>");
+ define('__RALLYE_TOP_USERS', "<div align=\"center\" class=\"big\">".__RALLYE_EXTRAS."</div>");
define('__RALLYE_CAN_WIN_THIS', RALLYE_OUR_WINNERS_ARE);
}
else
LOAD_TEMPLATE("guest_no_rallyes");
}
//
-OUTPUT_HTML("</DIV>");
+OUTPUT_HTML("</div>");
//
?>