1
0
Fork 0

added spaces + some curly braces + some usage of dbm::is_result()

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-26 15:23:30 +01:00 committed by Roland Haeder
commit 0cd241bcbe
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
92 changed files with 1190 additions and 1087 deletions

View file

@ -6,20 +6,23 @@ require_once('include/datetime.php');
function localtime_post(App $a) {
$t = $_REQUEST['time'];
if(! $t)
if (! $t) {
$t = 'now';
}
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM
if($_POST['timezone'])
if ($_POST['timezone']) {
$a->data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format);
}
}
function localtime_content(App $a) {
$t = $_REQUEST['time'];
if(! $t)
if (! $t) {
$t = 'now';
}
$o .= '<h3>' . t('Time Conversion') . '</h3>';
@ -29,11 +32,13 @@ function localtime_content(App $a) {
$o .= '<p>' . sprintf( t('UTC time: %s'), $t) . '</p>';
if($_REQUEST['timezone'])
if ($_REQUEST['timezone']) {
$o .= '<p>' . sprintf( t('Current timezone: %s'), $_REQUEST['timezone']) . '</p>';
}
if(x($a->data,'mod-localtime'))
if (x($a->data,'mod-localtime')) {
$o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
}
$o .= '<form action ="' . App::get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';