projects
/
Pman.Admin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sync
[Pman.Admin]
/
EventView.php
diff --git
a/EventView.php
b/EventView.php
index
761756e
..
bf0d1a4
100644
(file)
--- a/
EventView.php
+++ b/
EventView.php
@@
-14,8
+14,7
@@
class Pman_Admin_EventView extends Pman
$this->jerrAuth();
}
return true;
$this->jerrAuth();
}
return true;
-
-
+
}
function get($id, $opts = Array())
}
function get($id, $opts = Array())
@@
-43,9
+42,10
@@
class Pman_Admin_EventView extends Pman
// core_event_audit
// the event file..
$d= DB_DataObject::factory('core_event_audit');
// core_event_audit
// the event file..
$d= DB_DataObject::factory('core_event_audit');
- if (is_a($d,'DB_DataObject')) {
+ $d->event_id = $ev->id; // we can set that as the above returns error or dataobject..
+ if (is_a($d,'DB_DataObject') && $d->count()) {
echo "<H2>Changed Data:</H2>";
echo "<H2>Changed Data:</H2>";
- $d->event_id = $ev->id;
+
foreach($d->fetchAll() as $d) {
echo "{$d->name} SET TO: " . htmlspecialchars($d->newvalue) . "<br/>\n";
}
foreach($d->fetchAll() as $d) {
echo "{$d->name} SET TO: " . htmlspecialchars($d->newvalue) . "<br/>\n";
}
@@
-70,9
+70,14
@@
class Pman_Admin_EventView extends Pman
echo "not available (missing file) $file";
exit;
}
echo "not available (missing file) $file";
exit;
}
+
echo '<PRE>' . htmlspecialchars(print_r(json_decode(file_get_contents($file)), true)) . '</PRE>';
echo '<PRE>' . htmlspecialchars(print_r(json_decode(file_get_contents($file)), true)) . '</PRE>';
- echo '<BR/><PRE>'. htmlspecialchars($ev->remarks) . '</PRE>';
+ if (!empty($ev->remarks)) {
+ echo "<HR><H2>Remarks:</H2>";
+ echo '<PRE>'. htmlspecialchars($ev->remarks) . '</PRE>';
+ }
+
$json = json_decode($ev->remarks, JSON_PRETTY_PRINT);
$json = json_decode($ev->remarks, JSON_PRETTY_PRINT);
@@
-80,16
+85,17
@@
class Pman_Admin_EventView extends Pman
echo "<HR><H2>JSON DECODE Data:</H2>";
echo '<PRE>' . print_r($json, true) . '</PRE>';
}
echo "<HR><H2>JSON DECODE Data:</H2>";
echo '<PRE>' . print_r($json, true) . '</PRE>';
}
-
+ $filesJ = json_decode(file_get_contents($file));
if (!empty($filesJ->FILES )) {
if (!empty($filesJ->FILES )) {
- $filesJ = json_decode(file_get_contents($file));
- echo '<br /><PRE>Download files</PRE>';
+ echo "<HR><H2>Download files:</H2><ul>";
foreach($filesJ->FILES as $k=>$f){
$ip = $this->baseURL."/Images/events/". $ev->id . '/'. $f->tmp_name;
foreach($filesJ->FILES as $k=>$f){
$ip = $this->baseURL."/Images/events/". $ev->id . '/'. $f->tmp_name;
- echo '<a target="_new" href="'.$ip.'/download">' . htmlspecialchars( $k . ' - ' . $f->name ) . '</a><br/>';
+
+ echo '<li><a target="_new" href="'.$ip.'/download">' . htmlspecialchars( $k . ' - ' . $f->name ) . '</a><br/>';
}
}
+ echo "</ul>";
}
}