made the date format an option
This commit is contained in:
parent
a9fca8ae0d
commit
6cd1031a44
3 changed files with 12 additions and 9 deletions
|
@ -179,7 +179,7 @@ try {
|
||||||
|
|
||||||
$events = array();
|
$events = array();
|
||||||
while ($row = $stmt->fetch()) {
|
while ($row = $stmt->fetch()) {
|
||||||
$row['eventdate'] = strftime("%m/%d/%Y", strtotime($row['eventdate']));
|
$row['eventdate'] = strftime($opt["date_format"], strtotime($row['eventdate']));
|
||||||
$events[] = $row;
|
$events[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ try {
|
||||||
$smarty->assign('action', $action);
|
$smarty->assign('action', $action);
|
||||||
$smarty->assign('haserror', $haserror);
|
$smarty->assign('haserror', $haserror);
|
||||||
$smarty->assign('events', $events);
|
$smarty->assign('events', $events);
|
||||||
$smarty->assign('eventdate', strftime("%m/%d/%Y", strtotime($eventdate)));
|
$smarty->assign('eventdate', strftime($opt["date_format"], strtotime($eventdate)));
|
||||||
if (isset($eventdate_error)) {
|
if (isset($eventdate_error)) {
|
||||||
$smarty->assign('eventdate_error', $eventdate_error);
|
$smarty->assign('eventdate_error', $eventdate_error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@ function getGlobalOptions() {
|
||||||
"pdo_connection_string" => "mysql:host=localhost;dbname=giftreg",
|
"pdo_connection_string" => "mysql:host=localhost;dbname=giftreg",
|
||||||
|
|
||||||
/* The database username and password. */
|
/* The database username and password. */
|
||||||
"pdo_username" => "dbusername",
|
"pdo_username" => "giftreg",
|
||||||
"pdo_password" => "dbpassword",
|
"pdo_password" => "cn3Malk",
|
||||||
|
|
||||||
/* The maximum number of days before an event which produces a notification. */
|
/* The maximum number of days before an event which produces a notification. */
|
||||||
"event_threshold" => "60",
|
"event_threshold" => "60",
|
||||||
|
@ -49,7 +49,7 @@ function getGlobalOptions() {
|
||||||
"email_from" => "webmaster@" . $_SERVER['SERVER_NAME'],
|
"email_from" => "webmaster@" . $_SERVER['SERVER_NAME'],
|
||||||
|
|
||||||
/* The e-mail Reply-To: header. */
|
/* The e-mail Reply-To: header. */
|
||||||
"email_reply_to" => "your@address.com",
|
"email_reply_to" => "rwalberg@mts.net",
|
||||||
|
|
||||||
/* The e-mail X-Mailer header. */
|
/* The e-mail X-Mailer header. */
|
||||||
"email_xmailer" => "PHP/" . phpversion(),
|
"email_xmailer" => "PHP/" . phpversion(),
|
||||||
|
@ -78,6 +78,9 @@ function getGlobalOptions() {
|
||||||
//"currency_symbol" => "€", // Euro
|
//"currency_symbol" => "€", // Euro
|
||||||
//"currency_symbol" => "€", // Euro alternative
|
//"currency_symbol" => "€", // Euro alternative
|
||||||
|
|
||||||
|
/* The date format used in PHP's strftime function. */
|
||||||
|
"date_format" => "%m/%d/%Y",
|
||||||
|
|
||||||
/* If this is set to something other than "" then phpgiftreg will expect that
|
/* If this is set to something other than "" then phpgiftreg will expect that
|
||||||
string to prefix all tables in this installation. Useful for running
|
string to prefix all tables in this installation. Useful for running
|
||||||
multiple phpgiftreg installations in the same MySQL database.
|
multiple phpgiftreg installations in the same MySQL database.
|
||||||
|
@ -109,7 +112,7 @@ function getGlobalOptions() {
|
||||||
UPDATE users SET password = MD5(password)
|
UPDATE users SET password = MD5(password)
|
||||||
on your database to convert the passwords. This operation is NON-REVERSIBLE!
|
on your database to convert the passwords. This operation is NON-REVERSIBLE!
|
||||||
*/
|
*/
|
||||||
"password_hasher" => "SHA1",
|
"password_hasher" => "MD5",
|
||||||
|
|
||||||
/* Whether or not to allow image uploads. If on, the next option must point to
|
/* Whether or not to allow image uploads. If on, the next option must point to
|
||||||
a valid subdirectory that is writeable by the web server. The setup.php
|
a valid subdirectory that is writeable by the web server. The setup.php
|
||||||
|
|
|
@ -138,7 +138,7 @@ $stmt->bindParam(1, $userid, PDO::PARAM_INT);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$shoppees = array();
|
$shoppees = array();
|
||||||
while ($row = $stmt->fetch()) {
|
while ($row = $stmt->fetch()) {
|
||||||
$row['list_stamp'] = ($row['list_stamp == 0'] ? '-' : strftime("%m/%d/%Y", strtotime($row['list_stamp'])));
|
$row['list_stamp'] = ($row['list_stamp == 0'] ? '-' : strftime($opt["date_format"], strtotime($row['list_stamp'])));
|
||||||
$shoppees[] = $row;
|
$shoppees[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ $stmt->bindParam(1, $userid, PDO::PARAM_INT);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$messages = array();
|
$messages = array();
|
||||||
while ($row = $stmt->fetch()) {
|
while ($row = $stmt->fetch()) {
|
||||||
$row['created'] = strftime("%m/%d/%Y", strtotime($row['created']));
|
$row['created'] = strftime($opt["date_format"], strtotime($row['created']));
|
||||||
$messages[] = $row;
|
$messages[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ while ($row = $stmt->fetch()) {
|
||||||
'fullname' => $event_fullname,
|
'fullname' => $event_fullname,
|
||||||
'eventname' => $row['description'],
|
'eventname' => $row['description'],
|
||||||
'daysleft' => $days_left,
|
'daysleft' => $days_left,
|
||||||
'date' => strftime("%m/%d/%Y", $event_date)
|
'date' => strftime($opt["date_format"], $event_date)
|
||||||
);
|
);
|
||||||
$events[] = $thisevent;
|
$events[] = $thisevent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue