Changed the name of "Default" theme folder to "Classic"

This commit is contained in:
arman 2025-01-30 18:03:49 +00:00
parent 0c9a22d898
commit a98df7ac09
21 changed files with 1033 additions and 1011 deletions

View File

@ -276,7 +276,7 @@ function i18n($str, $args = array(), $argsdesc = array(), $forcelang = '')
if (count($argsdesc)) { if (count($argsdesc)) {
$argsdescstring = ''; $argsdescstring = '';
$n = 1; $n = 1;
foreach ($argsdesc AS $ad) { foreach ($argsdesc as $ad) {
$argsdescstring .= "%$n=$ad, "; $argsdescstring .= "%$n=$ad, ";
$n++; $n++;
} }
@ -353,10 +353,13 @@ function send_header($title = '', $nav = null, $icon = null, $titletranslated =
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title><? if ($title && !$titletranslated) echo i18n($title); else if ($title) echo $title; else echo i18n($config['fairname']); ?></title> <title><? if ($title && !$titletranslated) echo i18n($title);
else if ($title) echo $title;
else echo i18n($config['fairname']); ?></title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="<?= $config['SFIABDIRECTORY'] ?>/theme/<?= $config['theme'] ?>/sfiab.css" type="text/css" media="all" /> <link rel="stylesheet" href="<?= $config['SFIABDIRECTORY'] ?>/theme/<?= $config['theme'] ?>/sfiab.css" type="text/css" media="all" />
@ -364,8 +367,11 @@ function send_header($title = '', $nav = null, $icon = null, $titletranslated =
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
</head> </head>
<body> <body>
<!-- <? if ($title && !$titletranslated) echo i18n($title); else if ($title) echo $title; else echo i18n($config['fairname']); ?> --> <!-- <? if ($title && !$titletranslated) echo i18n($title);
else if ($title) echo $title;
else echo i18n($config['fairname']); ?> -->
<script src="https://code.jquery.com/jquery-3.7.1.js"></script> <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.5.2.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.5.2.js"></script>
@ -394,6 +400,7 @@ $(document).ready(function(){
echo '<h1>' . i18n($config['fairname']) . '</h1>'; echo '<h1>' . i18n($config['fairname']) . '</h1>';
if ($config['theme'] == 'science_ation') if ($config['theme'] == 'science_ation')
echo "<span id='menu-toggle-button' onClick='toggle_sidebar()' class='material-symbols-outlined'> echo "<span id='menu-toggle-button' onClick='toggle_sidebar()' class='material-symbols-outlined'>
menu menu
@ -405,9 +412,13 @@ menu
<? <?
echo '<div align="right" style="font-size: 0.75em;">'; echo '<div align="right" style="font-size: 0.75em;">';
if (isset($_SESSION['users_type'])) { if (isset($_SESSION['users_type'])) {
$types = array('volunteer' => 'Volunteer', 'judge' => 'Judge', $types = array(
'student' => 'Participant', 'committee' => 'Committee Member', 'volunteer' => 'Volunteer',
'fair' => 'Science Fair'); 'judge' => 'Judge',
'student' => 'Participant',
'committee' => 'Committee Member',
'fair' => 'Science Fair'
);
if ($_SESSION['users_type'] != false) { if ($_SESSION['users_type'] != false) {
echo i18n($types[$_SESSION['users_type']]); echo i18n($types[$_SESSION['users_type']]);
} }
@ -432,7 +443,8 @@ menu
?> ?>
<table id='content' cellpadding="5" width="100%"> <table id='content' cellpadding="5" width="100%">
<tr><td id='sidebar' width="175"> <tr>
<td id='sidebar' width="175">
<? <?
global $pdo; global $pdo;
// if the date is greater than the date/time that the confirmed participants gets posted, // if the date is greater than the date/time that the confirmed participants gets posted,
@ -525,7 +537,7 @@ menu
echo '<br />'; echo '<br />';
echo '<form name="languageselect" method="get" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<form name="languageselect" method="get" action="' . $_SERVER['PHP_SELF'] . '">';
echo "<select name=\"switchlanguage\" onchange=\"document.forms.languageselect.submit()\">\n"; echo "<select name=\"switchlanguage\" onchange=\"document.forms.languageselect.submit()\">\n";
foreach ($config['languages'] AS $key => $val) { foreach ($config['languages'] as $key => $val) {
if ($_SESSION['lang'] == $key) if ($_SESSION['lang'] == $key)
$selected = 'selected="selected"'; $selected = 'selected="selected"';
else else
@ -546,7 +558,8 @@ menu
?> ?>
</div> </div>
</td><td id='main-content'> </td>
<td id='main-content'>
<? <?
if (is_array($nav)) { if (is_array($nav)) {
@ -606,7 +619,9 @@ function send_footer()
{ {
global $config; global $config;
?> ?>
</td></tr></table> </td>
</tr>
</table>
</div> </div>
<div id="footer"> <div id="footer">
<? <?
@ -633,6 +648,7 @@ function send_footer()
<iframe id="content" src="" style="visibility:hidden; width:0px; height:0px"></iframe> <iframe id="content" src="" style="visibility:hidden; width:0px; height:0px"></iframe>
</body> </body>
</html> </html>
<? <?
@ -653,6 +669,7 @@ function send_popup_header($title = '')
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -664,6 +681,7 @@ function send_popup_header($title = '')
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"> rel="stylesheet">
</head> </head>
<body onLoad="window.focus()"> <body onLoad="window.focus()">
<script src="https://code.jquery.com/jquery-3.7.1.js"></script> <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.5.2.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.5.2.js"></script>
@ -698,6 +716,7 @@ function send_popup_footer()
<iframe id="content" src="" style="visibility:hidden; width:0px; height:0px"></iframe> <iframe id="content" src="" style="visibility:hidden; width:0px; height:0px"></iframe>
</body> </body>
</html> </html>
<? <?
} }
@ -901,7 +920,7 @@ function communication_replace_vars($text, &$u, $otherrep = array())
} }
$rep = array_merge($userrep, $otherrep); $rep = array_merge($userrep, $otherrep);
foreach ($rep AS $k => $v) { foreach ($rep as $k => $v) {
$text = preg_replace("\[$k\]", $v, $text); $text = preg_replace("\[$k\]", $v, $text);
} }
return $text; return $text;
@ -941,18 +960,18 @@ function email_send($val, $to, $sub_subject = array(), $sub_body = array())
/* Eventually we should just do this with communication_replace_vars() */ /* Eventually we should just do this with communication_replace_vars() */
if (count($sub_subject)) { if (count($sub_subject)) {
foreach ($sub_subject AS $sub_k => $sub_v) { foreach ($sub_subject as $sub_k => $sub_v) {
$subject = preg_replace("\[$sub_k\]", "$sub_v", $subject); $subject = preg_replace("\[$sub_k\]", "$sub_v", $subject);
} }
} }
if (count($sub_body)) { if (count($sub_body)) {
foreach ($sub_body AS $sub_k => $sub_v) { foreach ($sub_body as $sub_k => $sub_v) {
$body = preg_replace("\[$sub_k\]", "$sub_v", $body); $body = preg_replace("\[$sub_k\]", "$sub_v", $body);
} }
} }
if (count($sub_body)) { if (count($sub_body)) {
foreach ($sub_body AS $sub_k => $sub_v) { foreach ($sub_body as $sub_k => $sub_v) {
$bodyhtml = preg_replace("\[$sub_k\]", "$sub_v", $bodyhtml); $bodyhtml = preg_replace("\[$sub_k\]", "$sub_v", $bodyhtml);
} }
} }
@ -1312,14 +1331,12 @@ function colour_to_percent($percent)
if ($percent <= 50) if ($percent <= 50)
$red = 255; $red = 255;
else else
$red = (100 - $percent) * 2 / 100 * 255; $red = (100 - $percent) * 2 / 100 * 255;;
;
if ($percent > 50) if ($percent > 50)
$green = 255; $green = 255;
else else
$green = ($percent) * 2 / 100 * 255; $green = ($percent) * 2 / 100 * 255;;
;
// echo "red=$red"; // echo "red=$red";
// echo "green=$green"; // echo "green=$green";
@ -1444,7 +1461,12 @@ function wordify($val, $monetize = false)
} }
$val = intval($val); $val = intval($val);
$powerofthousand = array( $powerofthousand = array(
'', 'Thousand', 'Million', 'Billion', 'trillion', 'quadrillion' '',
'Thousand',
'Million',
'Billion',
'trillion',
'quadrillion'
); );
$n = 0; $n = 0;
if (!$val) { if (!$val) {

View File

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 180 B

View File

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 180 B

View File

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

View File

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

View File

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 88 B

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -20,8 +20,8 @@
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
$theme['name']="Default"; $theme['name']="Classic";
$theme['description']="The default theme"; $theme['description']="The classic theme";
$theme['author']="James Grant <james@lightbox.org>"; $theme['author']="James Grant <james@lightbox.org>";
?> ?>

View File

@ -20,7 +20,7 @@
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
$theme_icons['name']="Default Icons"; $theme_icons['name']="Classic Theme Icons";
$theme_icons['description']="KDE4 icons"; $theme_icons['description']="KDE4 icons";
$theme_icons['author']="James Grant <james@lightbox.org>"; $theme_icons['author']="James Grant <james@lightbox.org>";