// Eval the code
eval($GLOBALS['template_eval'][$template]);
- } else {
- // No file!
- $GLOBALS['template_eval'][$template] = '404';
- }
- } elseif (((isAdmin()) || ((isInstalling()) && (!isInstalled()))) && ($GLOBALS['template_eval'][$template] == '404')) {
- // Only admins shall see this warning or when installation mode is active
- $ret = '<br /><span class=\\"guest_failed\\">{--TEMPLATE_404--}</span><br />
+ } elseif ((isAdmin()) || ((isInstalling()) && (!isInstalled()))) {
+ // Only admins shall see this warning or when installation mode is active
+ $ret = '<br /><span class=\\"guest_failed\\">{--TEMPLATE_404--}</span><br />
(' . $template . ')<br />
<br />
{--TEMPLATE_CONTENT--}
<pre>' . print_r($content, true) . '</pre>
{--TEMPLATE_DATA--}
<pre>' . print_r($DATA, true) . '</pre>
-<br /><br />\";';
+<br /><br />';
+ } else {
+ // No file!
+ $GLOBALS['template_eval'][$template] = '404';
+ }
} else {
// Eval the code
eval($GLOBALS['template_eval'][$template]);
// Return the HTML code
return $ret;
} else {
- // Output direct
+ // Output directly
outputHtml($ret);
}
} elseif (isDebugModeEnabled()) {
}
//
-function addSelectionBox ($type, $default, $prefix = '', $id = 0) {
+function addSelectionBox ($type, $default, $prefix = '', $id = 0, $class = 'register_select') {
$OUT = '';
if ($type == 'yn') {
// This is a yes/no selection only!
if ($id > 0) $prefix .= "[" . $id."]";
- $OUT .= " <select name=\"" . $prefix."\" class=\"register_select\" size=\"1\">\n";
+ $OUT .= " <select name=\"" . $prefix."\" class=\"" . $class . "\" size=\"1\">\n";
} else {
// Begin with regular selection box here
if (!empty($prefix)) $prefix .= "_";
$type2 = $type;
if ($id > 0) $type2 .= "[" . $id."]";
- $OUT .= " <select name=\"".strtolower($prefix . $type2)."\" class=\"register_select\" size=\"1\">\n";
+ $OUT .= " <select name=\"".strtolower($prefix . $type2)."\" class=\"" . $class . "\" size=\"1\">\n";
}
switch ($type) {
return $message;
}
-// Generate a "link" for the given admin id (admin_id)
-function generateAdminLink ($adminId) {
- // No assigned admin is default
- $admin = "<span class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>";
-
- // Zero? = Not assigned
- if (bigintval($adminId) > 0) {
- // Load admin's login
- $login = getAdminLogin($adminId);
-
- // Is the login valid?
- if ($login != '***') {
- // Is the extension there?
- if (isExtensionActive('admins')) {
- // Admin found
- $admin = "<a href=\"".generateEmailLink(getAdminEmail($adminId), 'admins')."\">" . $login."</a>";
- } else {
- // Extension not found
- $admin = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'admins');
- }
- } else {
- // Maybe deleted?
- $admin = "<div class=\"admin_note\">".sprintf(getMessage('ADMIN_ID_404'), $adminId)."</div>";
- }
- } // END - if
-
- // Return result
- return $admin;
-}
-
// Compile characters which are allowed in URLs
function compileUriCode ($code, $simple = true) {
// Compile constants
return '{?URL?}/modules.php?module=admin&what=list_user';
}
+// Generate a "link" for the given admin id (admin_id)
+function generateAdminLink ($adminId) {
+ // No assigned admin is default
+ $adminLink = "<span class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>";
+
+ // Zero? = Not assigned
+ if (bigintval($adminId) > 0) {
+ // Load admin's login
+ $login = getAdminLogin($adminId);
+
+ // Is the login valid?
+ if ($login != '***') {
+ // Is the extension there?
+ if (isExtensionActive('admins')) {
+ // Admin found
+ $adminLink = "<a href=\"".generateEmailLink(getAdminEmail($adminId), 'admins')."\">" . $login."</a>";
+ } else {
+ // Extension not found
+ $adminLink = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'admins');
+ }
+ } else {
+ // Maybe deleted?
+ $adminLink = "<div class=\"admin_note\">".sprintf(getMessage('ADMIN_ID_404'), $adminId)."</div>";
+ }
+ } // END - if
+
+ // Return result
+ return $adminLink;
+}
+
// [EOF]
?>
// List found rallyes
$OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
- $select = "<input type=\"checkbox\" name=\"sel[".$content['id']."]\" class=\"admin_normal\" value=\"1\">";
- if ($content['is_active'] == 'Y') $select = "<div class=\"big\">".$content['id']."</div>";
-
// Prepare data for the row template
$content = array(
'sw' => $SW,
'id' => $content['id'],
- 'select' => $select,
'title' => $content['title'],
'admin_id' => $content['admin_id'],
- 'email_link' => generateEmailLink($content['admin_id']),
+ 'admin_link' => generateAdminLink($content['admin_id']),
'login' => $content['login'],
'start' => generateDateTime($content['start_time'], 3),
'end' => generateDateTime($content['end_time'], 3),
<div align="center">
-<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rallye_prices" method="post" style="margin-bottom: 0px">
<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
<tr>
- <td colspan="5" align="center" class="admin_title" height="30"><strong>{--RALLYE_EDIT_DEL_RALLYES--}:</strong>
+ <td colspan="5" align="center" class="admin_title" height="30">
+ <strong>{--ADMIN_LIST_RALLYES_PRICING--}:</strong>
</td>
</tr>
<tr>
- <td align="center" width="10" class="admin_title bottom2 right2"><strong>{--ID_SELECT--}</strong></td>
<td align="center" width="100" class="admin_title bottom2 right2"><strong>{--RALLYE_TITLE--}:</strong></td>
<td align="center" width="70" class="admin_title bottom2 right2"><strong>{--RALLYE_ADMIN_ID--}:</strong></td>
<td align="center" width="200" class="admin_title bottom2 right2"><strong>{--RALLYE_TSTART--}:</strong></td>
</tr>
$content
<tr>
- <td colspan="5" class="admin_footer">
- <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
- <input type="submit" name="edit" class="admin_submit" value="{--RALLYE_EDIT_ADMIN--}" />
- <input type="submit" name="del" class="admin_delete" value="{--RALLYE_DELETE_ADMIN--}" />
- </td>
+ <td colspan="5" class="admin_footer"> </td>
</tr>
</table>
-</form>
<div class="admin_note">
- {--RALLYE_EDIT_DEL_NOTE--}
+ {--ADMIN_RALLYE_PRICES_NOTE--}
</div>
</div>
<tr>
- <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[select]</td>
<td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content[id]">$content[title]</a></td>
- <td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="$content[email_link]">$content[login]</a></td>
+ <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[admin_link]</td>
<td align="center" class="switch_sw$content[sw] bottom2 right2">$content[start]</td>
<td align="center" class="switch_sw$content[sw] bottom2">$content[end]</td>
</tr>