diff --git a/,dockerignore b/,dockerignore deleted file mode 100644 index 2bbc36f8a..000000000 --- a/,dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -.git -includes/settings.php -node_modules diff --git a/access.php b/access.php index a892f12f2..193e4e5cf 100644 --- a/access.php +++ b/access.php @@ -35,7 +35,8 @@ $defConfigStr = translate( 'DEFAULT CONFIGURATION' ); $goStr = ' - + '; $saveStr = translate( 'Save' ); $undoStr = translate( 'Undo' ); @@ -262,8 +263,9 @@ - - + + '; $pagetitle = translate( 'Allow Access to Other Users Calendar' ); @@ -415,13 +417,15 @@ echo ' ' - . ( $otheruser != '__default__' && $otheruser != '__public__' ? ' -   ' : '' ) . ' -    - + . ( $otheruser !== '__default__' && $otheruser !== '__public__' ? ' + ' + : '' ) . ' + + @@ -438,8 +442,10 @@ echo ' diff --git a/admin.php b/admin.php index 65d607294..2bdc4050e 100644 --- a/admin.php +++ b/admin.php @@ -110,10 +110,10 @@ function save_pref ( $prefs, $src ) { @session_start(); $_SESSION['webcal_tmp_login'] = 'blahblahblah'; - $editStr = ''; + $editStr = ''; $choices = ['day.php', 'week.php', 'month.php', 'year.php']; $choices_text = [translate ( 'Day' ), translate ( 'Week' ), translate ( 'Month' ), translate ( 'Year' )]; @@ -243,8 +243,8 @@ function save_pref ( $prefs, $src ) { ' . csrf_form_key() . display_admin_link() . ' -

+

' . $tabs . ' @@ -852,7 +852,8 @@ function save_pref ( $prefs, $src ) {
- +
diff --git a/approve_entry.php b/approve_entry.php index edb22bdfc..01063da74 100644 --- a/approve_entry.php +++ b/approve_entry.php @@ -31,10 +31,10 @@ diff --git a/assistant_edit.php b/assistant_edit.php index a1f659aca..cabfd71c3 100644 --- a/assistant_edit.php +++ b/assistant_edit.php @@ -57,14 +57,15 @@ echo "\n"; if ( $GROUPS_ENABLED == 'Y' ) { - echo ''; + echo ''; } echo "\n"; ?>
- +
diff --git a/category.php b/category.php index 342ff99f3..d3afcf4db 100644 --- a/category.php +++ b/category.php @@ -66,7 +66,7 @@
@@ -76,19 +76,19 @@
    - -
' : '') // end test of ENABLE_ICON_UPLOADS - . '
- ' + +
' : '' ) . ' +
+ ' . 'Cancel ' . (!empty($id) ? ' - ' : '') . ' + ' : '' ) . '
'; } else @@ -141,7 +141,8 @@
diff --git a/catsel.php b/catsel.php index 9a2a64eab..64c68c9df 100644 --- a/catsel.php +++ b/catsel.php @@ -59,8 +59,8 @@ } echo ' - + - + . '    +
- - + +
-     - +     +
- +
*' . translate ( 'Global Category' ) - . '     
diff --git a/docadd.php b/docadd.php index 28a2c4d8f..7a2db359c 100644 --- a/docadd.php +++ b/docadd.php @@ -216,7 +216,7 @@ : - + @@ -236,7 +236,7 @@ - + diff --git a/docker/Dockerfile-php8-dev b/docker/Dockerfile-php8-dev index 609197595..207f576cc 100644 --- a/docker/Dockerfile-php8-dev +++ b/docker/Dockerfile-php8-dev @@ -1,6 +1,5 @@ FROM php:8.0-apache -MAINTAINER craigk5n - +LABEL org.opencontainers.image.authors="craig@k5n.us" RUN docker-php-ext-install mysqli #COPY docker/cron-hourly /tmp/cron.hourly @@ -11,4 +10,3 @@ RUN docker-php-ext-install mysqli #TODO: setup cron #RUN chown -R www-data:www-data /var/www - diff --git a/docs/extractfaqs.pl b/docs/extractfaqs.pl index 3e40d7e29..523818948 100755 --- a/docs/extractfaqs.pl +++ b/docs/extractfaqs.pl @@ -15,13 +15,13 @@ # 02-Feb-2005 Craig Knudsen # Updated to group into categories. # -####################################################################### +################################################################################ -my @files = ( ); -my @questions = ( ); my @answers = ( ); -my @file = ( ); my @cat = ( ); +my @file = ( ); +my @files = ( ); +my @questions = ( ); for ( $i = 0; $i < @ARGV; $i++ ) { if ( -f $ARGV[$i] ) { @@ -152,4 +152,3 @@ sub process_file { } } } - diff --git a/docs/php2html.pl b/docs/php2html.pl index 220d79728..d30f1077c 100755 --- a/docs/php2html.pl +++ b/docs/php2html.pl @@ -6,8 +6,7 @@ # # Description: # Create HTML documentation from a PHP include file. -# The PHP file must use a specific syntax for documenting -# functions. +# The PHP file must use a specific syntax for documenting functions. # # History: # 21-Jan-2005 Craig Knudsen @@ -15,17 +14,17 @@ # 30-Nov-2002 Craig Knudsen # Created # -####################################################################### +################################################################################ $TITLE = 'WebCalendar Function Documentation'; sub add_links { my ( $in ) = @_; - $in =~ s/(webcal_[a-z_]+)\s+table/$1<\/tt><\/a> table/g; + $in =~ s/(webcal_[a-z_]+)\s+table/$1<\/span><\/a> table/g; foreach $funcName ( keys ( %funcNames ) ) { - $in =~ s/($funcName)\s+function/$1<\/tt><\/a> function/ig; + $in =~ s/($funcName)\s+function/$1<\/span><\/a> function/ig; } $in =~ s/&/&/g; @@ -39,11 +38,11 @@ sub add_links { sub print_function { my ( $loc ) = @_; $out{$name} = "

$name

\n"; - $out{$name} .= "$name ( " . '$' . join ( ', $', @params ) . - " )

\n"; + $out{$name} .= "$name ( " + . '$' . join ( ', $', @params ) . " )

\n"; if ( defined ( $description ) ) { - $out{$name} .= "Description:" . - "
"; + $out{$name} .= "Description:" + . "
"; $out{$name} .= add_links ( $description ) . "
\n"; } $out{$name} .= "Parameters:
\n
    \n"; @@ -51,16 +50,17 @@ sub print_function { $out{$name} .= "
  • None
  • \n"; } foreach $p ( @params ) { - $out{$name} .= "
  • \$$p"; + $out{$name} .= "
  • \$$p"; $out{$name} .= " - " . add_links ( $paramDescr{$p} ) if ( defined ( $paramDescr{$p} ) ); $out{$name} .= "
  • \n"; } $out{$name} .= "
\n"; - $out{$name} .= "Returns:
" . - ( $returns eq '' ? "Nothing" : add_links ( $returns ) ) . "
\n"; - $out{$name} .= "Location:" . - "
$loc
\n"; + $out{$name} .= "Returns:
" + . ( $returns eq '' ? "Nothing" : add_links ( $returns ) ) + . "
\n"; + $out{$name} .= "Location:" + . "
$loc
\n"; $out{$name} .= "

\n"; } @@ -174,108 +174,90 @@ sub print_function { } close ( F ); -print< - -$TITLE - - - -

$TITLE

-
-$info -
- - - - - -
Home Page:$url
WebCalendar Version:$version ($date)
Last updated:$now
-

List of Functions

-
    + + $TITLE + + + + +

    $TITLE

    +
    + $info +
    + + + + + + + + + + + + + +
    Home Page:$url
    WebCalendar Version:$version ($date)
    Last updated:$now
    +

    List of Functions

    +
      EOF foreach $name ( sort keys ( %out ) ) { - print "
    • $name
    • \n"; + print "\n
    • $name
    • "; } -print "
    \n
    \n"; +print "\n
\n
"; foreach $name ( sort keys ( %out ) ) { - print "

\n" . $out{$name}; + print "\n

\n " . $out{$name}; } -print< -

- Valid XHTML 1.0! -

- +print < +

Validate>

+ EOF diff --git a/edit_entry.php b/edit_entry.php index da9bac12d..bd27440f3 100644 --- a/edit_entry.php +++ b/edit_entry.php @@ -1016,7 +1016,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1026,7 +1027,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1037,7 +1039,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1052,8 +1055,10 @@ function time_selection($prefix, $time = '', $trigger = false) - - + + @@ -1067,9 +1072,7 @@ function time_selection($prefix, $time = '', $trigger = false) - - - @@ -1237,9 +1240,9 @@ function time_selection($prefix, $time = '', $trigger = false) . translate($byday_names[$rpt_byday_mod]) : ' ')); echo ' - '; + "; } echo ' '; @@ -1311,9 +1314,9 @@ function time_selection($prefix, $time = '', $trigger = false) ' : '') . ($loop_ctr == 31 ? ' ' : '') . ' - ' + " . ($loop_ctr % 10 == 0 ? ' ' : ''); @@ -1357,9 +1360,10 @@ function time_selection($prefix, $time = '', $trigger = false) . '' : '') . ($loop_ctr == 31 ? ' ' : '') . ' - ' + " . ($loop_ctr % 10 == 0 ? ' ' : ''); @@ -1420,12 +1424,15 @@ function time_selection($prefix, $time = '', $trigger = false) -
-
- +
+
+ @@ -1592,7 +1599,8 @@ function time_selection($prefix, $time = '', $trigger = false) ?>
- + 0 && ($login == $create_by || $single_user == 'Y' || $is_admin)) { ?>
diff --git a/edit_entry_handler.php b/edit_entry_handler.php index c2123fe1c..d0eae6339 100644 --- a/edit_entry_handler.php +++ b/edit_entry_handler.php @@ -1290,10 +1290,10 @@ function sort_byday( $a, $b ) { echo // Allow them to override a conflict if server settings allow it. ( ! empty( $ALLOW_CONFLICT_OVERRIDE ) && $ALLOW_CONFLICT_OVERRIDE == 'Y' ? ' - ' : '' ) . ' - + ' : '' ) . ' + '; } else diff --git a/edit_report.php b/edit_report.php index bf3ac87c6..c01e91d79 100644 --- a/edit_report.php +++ b/edit_report.php @@ -325,13 +325,15 @@ function print_options ( $textarea, $option ) { //} echo '
- ' - . ( $adding_report ? '' : ' - ' . translate('Cancel') . ' - ' ); + ' + . ( $adding_report ? '' : ' + ' + . translate ( 'Cancel' ) . ' + ' ); ?>
diff --git a/edit_template.php b/edit_template.php index b542642ec..eef7631ab 100644 --- a/edit_template.php +++ b/edit_template.php @@ -131,14 +131,13 @@ ' : '' ) . '
- - ' + + ' . ( ! empty ( $user ) ? ' - ' - : '' ) . ' + ' : '' ) . ' ' ) . "\n" . print_trailer ( false, true, true ); ?> diff --git a/export.php b/export.php index c4748f620..8d50698d2 100644 --- a/export.php +++ b/export.php @@ -106,8 +106,8 @@ - + '; diff --git a/groups.php b/groups.php index e7a96da86..a480fabfd 100644 --- a/groups.php +++ b/groups.php @@ -41,7 +41,8 @@ @@ -61,7 +62,9 @@
- +
@@ -111,8 +114,13 @@
@@ -142,8 +150,13 @@
diff --git a/help_bug.php b/help_bug.php index 65c45e9e5..79383c12d 100644 --- a/help_bug.php +++ b/help_bug.php @@ -18,7 +18,7 @@ . str_replace ('XXX', translate ( get_browser_language ( true ) ), translate ( 'Also, please use English rather than XXX.' ) ) : '' ) . '

- +

' . translate ( 'System Settings' ) . '

'; diff --git a/import.php b/import.php index 7e8703342..f05ad035e 100644 --- a/import.php +++ b/import.php @@ -173,7 +173,8 @@ function print_categories() { print_categories(); echo '
- + '; } echo print_trailer(); diff --git a/includes/dbtable.php b/includes/dbtable.php index d81809fea..989ac510d 100644 --- a/includes/dbtable.php +++ b/includes/dbtable.php @@ -132,8 +132,8 @@ function dbtable_to_html ( $tablear, $valuesar, $action = '', $formname = '', return $ret . ( empty ( $actionlabel ) ? '' : ' - + ' ) . ' diff --git a/includes/js/dblclick_add.js b/includes/js/dblclick_add.js index 7c925ebfa..49af84807 100644 --- a/includes/js/dblclick_add.js +++ b/includes/js/dblclick_add.js @@ -1,8 +1,14 @@ - -// Function that will send user to the add event page. -// This is typically invoked as the ondblclick event handler. -function dblclick_add( date, name, hour, minute ) { +/** + * @description Send user to the add event page. Typically invoked as the ondblclick event handler. + * @author Craig Knudsen + * @date 2023-10-05 + * @param {int} date + * @param {string} name + * @param {int} hour + * @param {int} minute + */ +function dblclick_add ( date, name, hour, minute ) { window.location.href = 'edit_entry.php?date=' + date + '&defusers=' + name + ( hour ? '&hour=' + hour + '&minute=' - + ( typeof( minute ) != 'undefined' ? minute : 0 ) : '' ); + + ( typeof ( minute ) !== 'undefined' ? minute : 0 ) : '' ); } diff --git a/layers.php b/layers.php index 38104c469..b6baaa6ec 100644 --- a/layers.php +++ b/layers.php @@ -38,7 +38,6 @@ $duplicatesStr = translate('Duplicates'); $editLayerStr = translate('Edit layer'); $editStr = translate('Edit'); -$enableLayersStr = translate('Enable layers'); $layerStr = translate('Layer'); $LAYERS_DISABLED = translate('Layers are currently disabled.'); $LAYERS_ENABLED = translate('Layers are currently enabled.'); @@ -87,8 +86,14 @@       - " id="enablebutton" > - " id="disablebutton"> + +


@@ -98,7 +103,8 @@
- +

@@ -179,13 +185,16 @@ diff --git a/login-app.php b/login-app.php index 029c14e34..31bdfd07b 100644 --- a/login-app.php +++ b/login-app.php @@ -117,8 +117,8 @@ function myOnLoad() { } echo ' - + diff --git a/login.php b/login.php index 0b4181b14..1c7dba516 100644 --- a/login.php +++ b/login.php @@ -223,7 +223,8 @@
- +
diff --git a/pref.php b/pref.php index 38bf23878..0f349f1bb 100644 --- a/pref.php +++ b/pref.php @@ -209,7 +209,8 @@ function save_pref( $prefs, $src) { $resetConfirm = str_replace("XXX", $user, $resetConfirm); ?>
- + @@ -840,24 +841,27 @@ function save_pref( $prefs, $src) { "> - name=""> + "> - name=""> + "> - name=""> + @@ -894,7 +898,8 @@ function save_pref( $prefs, $src) {

- +

diff --git a/purge.php b/purge.php index 316733999..c22dbb990 100644 --- a/purge.php +++ b/purge.php @@ -109,9 +109,8 @@ } echo '

...' . translate ( 'Finished' ) . ".

\n"; ?> -
' . "$sqlLog
\n"; @@ -160,10 +159,10 @@ - + diff --git a/register.php b/register.php index db90fd485..db83d9056 100644 --- a/register.php +++ b/register.php @@ -371,7 +371,7 @@ function generate_password() function valid_form() { validform = true; - $(':input[type="submit"]').prop('disabled', false); + document.querySelector(':button[type="submit"]').prop('disabled', false); if ($('#upassword1').length && $('#upassword1').val().length == 0) { $('#infoMessage').html(xlate['inputPassword']); $('#main-dialog-alert').show(); @@ -404,7 +404,7 @@ function valid_form() { checkers('uemail', 'email'); } - $(':input[type="submit"]').prop('disabled', !validform); + document.querySelector(':button[type="submit"]').prop('disabled', !validform); return validform; } @@ -430,14 +430,14 @@ function(data, status) { $('#main-dialog-alert').show(); validform = false; if(!validform) { - $(':input[type="submit"]').prop('disabled', true); + document.querySelector(':button[type="submit"]').prop('disabled', true); } return; } if(!validform) { - $(':input[type="submit"]').prop('disabled', true); + document.querySelector(':button[type="submit"]').prop('disabled', true); } else { - $('#main-dialog-alert').hide(); + document.querySelector('#main-dialog-alert').hide(); } }); } diff --git a/reject_entry.php b/reject_entry.php index 48e69f58e..1a6968783 100644 --- a/reject_entry.php +++ b/reject_entry.php @@ -28,8 +28,8 @@ . ' - + ' diff --git a/remotecal_mgmt.php b/remotecal_mgmt.php index 648fcf849..74f23a4fc 100644 --- a/remotecal_mgmt.php +++ b/remotecal_mgmt.php @@ -96,7 +96,8 @@
- +
@@ -147,8 +148,11 @@
@@ -178,8 +182,12 @@
@@ -211,8 +219,12 @@ diff --git a/resourcecal_mgmt.php b/resourcecal_mgmt.php index efa6d3e32..542b971f3 100644 --- a/resourcecal_mgmt.php +++ b/resourcecal_mgmt.php @@ -72,7 +72,8 @@
- +
@@ -129,8 +130,11 @@ @@ -159,8 +163,11 @@
diff --git a/search.php b/search.php index 5ae1986a7..89cc5076a 100644 --- a/search.php +++ b/search.php @@ -160,13 +160,14 @@ } echo '' - . ( $GROUPS_ENABLED == 'Y' - ? '' : '' ) . ' + . ( $GROUPS_ENABLED === 'Y' + ? '' : '' ) . ' '; } -echo ''; +echo ''; ?>