]>
Commit | Line | Data |
---|---|---|
04fec0c5 TP |
1 | diff -ur phpPgAdmin-4.2.2.orig/classes/database/Postgres.php phpPgAdmin-4.2.2/classes/database/Postgres.php |
2 | --- phpPgAdmin-4.2.2.orig/classes/database/Postgres.php 2008-12-18 06:28:57.000000000 +0100 | |
0bb50a65 | 3 | +++ phpPgAdmin-4.2.2/classes/database/Postgres.php 2010-09-30 01:01:41.000000000 +0200 |
05a1c9f3 | 4 | @@ -302,6 +302,14 @@ class Postgres extends ADODB_base { |
04fec0c5 TP |
5 | echo htmlspecialchars($value); |
6 | echo "</textarea>\n"; | |
7 | break; | |
8 | + case 'date': | |
9 | + $showsTime='false'; $timeFormat=''; | |
10 | + case 'timestamp': | |
11 | + if(!isset($showsTime)) { $showsTime='true'; $timeFormat=' %H:%M:%S'; } | |
12 | + echo "<input name=\"", htmlspecialchars($name), "\" value=\"", htmlspecialchars($value), "\" size=\"35\"{$action_str} {$szExtra} id=\"", htmlspecialchars($name), "\"/>\n"; | |
13 | + echo "<button type=\"button\" onclick=\"return false\" id=\"trigger", htmlspecialchars($name), "\">...</button>"; | |
14 | + echo "<script type=\"text/javascript\">Calendar.setup( { inputField: \"", htmlspecialchars($name), "\", button: \"trigger", htmlspecialchars($name), "\", showsTime: $showsTime, ifFormat: \"%Y-%m-%d$timeFormat\" }); </script>"; | |
15 | + break; | |
16 | default: | |
05a1c9f3 | 17 | echo "<input name=\"", htmlspecialchars($name), "\" value=\"", htmlspecialchars($value), "\" size=\"35\"{$extra_str} />\n"; |
04fec0c5 TP |
18 | break; |
19 | diff -ur phpPgAdmin-4.2.2.orig/classes/Misc.php phpPgAdmin-4.2.2/classes/Misc.php | |
20 | --- phpPgAdmin-4.2.2.orig/classes/Misc.php 2008-12-18 06:28:57.000000000 +0100 | |
21 | +++ phpPgAdmin-4.2.2/classes/Misc.php 2009-04-13 17:22:01.000000000 +0200 | |
05a1c9f3 | 22 | @@ -395,6 +395,12 @@ |
04fec0c5 TP |
23 | echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$lang['appcharset']}\" />\n"; |
24 | // Theme | |
25 | echo "<link rel=\"stylesheet\" href=\"themes/{$conf['theme']}/global.css\" type=\"text/css\" />\n"; | |
26 | +?> | |
27 | +<link rel="stylesheet" href="libraries/calendar/skins/aqua/theme.css" type="text/css" /> | |
28 | +<script src="libraries/calendar/calendar.js" type="text/javascript"></script> | |
29 | +<script src="libraries/calendar/lang/calendar-en.js" type="text/javascript"></script> | |
30 | +<script src="libraries/calendar/calendar-setup.js" type="text/javascript"></script> | |
31 | +<?php | |
32 | echo "<link rel=\"shortcut icon\" href=\"images/themes/{$conf['theme']}/Favicon.ico\" type=\"image/vnd.microsoft.icon\" />\n"; | |
33 | echo "<link rel=\"icon\" type=\"image/png\" href=\"images/themes/{$conf['theme']}/Introduction.png\" />\n"; | |
34 | echo "<title>", htmlspecialchars($appName); | |
35 | diff -ur phpPgAdmin-4.2.2.orig/display.php phpPgAdmin-4.2.2/display.php | |
36 | --- phpPgAdmin-4.2.2.orig/display.php 2008-12-18 06:28:57.000000000 +0100 | |
05a1c9f3 TP |
37 | +++ phpPgAdmin-4.2.2/display.php 2010-10-02 01:41:27.000000000 +0200 |
38 | @@ -61,6 +61,7 @@ | |
04fec0c5 TP |
39 | echo "<th class=\"data\">{$lang['strnull']}</th><th class=\"data\">{$lang['strvalue']}</th></tr>"; |
40 | ||
41 | $i = 0; | |
42 | + $shift=0; | |
43 | while (!$attrs->EOF) { | |
05a1c9f3 TP |
44 | |
45 | $attrs->fields['attnotnull'] = $data->phpBool($attrs->fields['attnotnull']); | |
46 | @@ -106,7 +107,7 @@ | |
47 | // keep track of which element offset we're up to. We can't refer to the null checkbox by name | |
04fec0c5 TP |
48 | // as it contains '[' and ']' characters. |
49 | if (!$attrs->fields['attnotnull']) { | |
05a1c9f3 TP |
50 | - $extras['onChange'] = 'elements[' . ($elements - 1) . '].checked = false;'; |
51 | + $extras['onChange'] = 'elements[' . ($elements - 1 + $shift) . '].checked = false;'; | |
04fec0c5 | 52 | } |
05a1c9f3 TP |
53 | |
54 | if (($fksprops !== false) && isset($fksprops['byfield'][$attrs->fields['attnum']])) { | |
55 | @@ -116,6 +117,7 @@ | |
56 | ||
57 | echo $data->printField("values[{$attrs->fields['attnum']}]", $rs->fields[$attrs->fields['attname']], $attrs->fields['type'], $extras); | |
58 | ||
04fec0c5 TP |
59 | + if (in_array(substr($attrs->fields['type'],0,9),array('date','timestamp'))) $shift++; |
60 | echo "</td>"; | |
61 | $elements++; | |
62 | echo "</tr>\n"; |