Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example convert <input> to <button> #423

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 38 additions & 21 deletions about.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@
<?php
/**
* About WebCalendar
*
* Acknowledge contributors.
*
* @package WebCalendar
*/
/**
* Include the basics.
*
* // Required to end the page docBlock without getting errors..
*/
require_once 'includes/init.php';

$credits = getPostValue( 'Credits' );
$credits = getPostValue ( 'Credits' );
static $data;

if ( empty( $data ) ) {
// Read in and format AUTHORS file.
if ( empty ( $data ) ) {
// Read in and format AUTHORS file.
$data = file_get_contents ( 'AUTHORS' );
$patterns = $replacements = [];
$patterns[0] = "/\r\n|\n/";
$replacements[0] = "<br>";
$patterns[] = "/\r\n|\n/";
$replacements[] = '<br>';
// Strip email addresses out
$patterns[1] = "<\S*@\S*>";
$replacements[1] = "";
$patterns[] = "<\S*@\S*>";
$replacements[] = '';
$data = preg_replace ( $patterns, $replacements, $data );
}
print_header ( [], '<link href="includes/css/about.css" rel="stylesheet">',
'', true, false, true );
echo ' <div id="creds">' . ( empty( $credits ) ? '
<a title="' . $PROGRAM_NAME . '" href="' . $PROGRAM_URL
. '" target="_blank">
<h2>' . translate( 'Title' ) . '</h2>
<p>' . str_replace( 'XXX', $PROGRAM_VERSION,
translate( 'version XXX' ) ) . '<br>' . $PROGRAM_DATE . '</p></a>
echo ' <div id="creds">'
. ( empty ( $credits ) ? '
<a href="' . $PROGRAM_URL
. '" target="_blank" title="' . $PROGRAM_NAME . '">
<h2>' . translate ( 'Title' ) . '</h2>
<p>' . str_replace ( 'XXX', $PROGRAM_VERSION,
translate ( 'version XXX' ) ) . '<br>' . $PROGRAM_DATE . '</p></a>
<br>
<p>' . translate( 'WebCalendar is a PHP application used...' ) . '</p>' : '' ) . '
<p>' . translate ( 'WebCalendar is a PHP application used...' ) . '</p>' : '' ) . '
</div>
<form action="about.php" name="aboutform" id="aboutform" method="post">';
<form id="aboutform" name="aboutform" action="about.php" method="post">';
print_form_key();
echo '<input type="submit" name="' . ( empty( $credits )
? 'Credits" value="' . translate( 'Credits' )
: 'About" value="' . translate( 'About' ) ) . '">
<input type="button" id="ok" name="ok" value="' . translate( 'OK' )
. '" onclick="window.close()">
</form>' . ( empty ( $credits ) ? '' : "
echo '
<button type="submit" name="'
. ( empty ( $credits )
? 'Credits">' . translate ( 'Credits' )
: 'About">' . translate ( 'About' ) )
. '</button>
<button id="ok" name="ok" type="button" onclick="window.close()">'
. translate ( 'OK' ) . '</button>
</form>'
. ( empty ( $credits ) ? '' : "
<script src=\"includes/js/v_h_scrolls.js\"></script>
<script>
function start() {
Expand Down