Merge branch '164-crash-on-patching-and-possibly-right-after-login' into 'main/atys...
[ryzomcore.git] / nelns / admin / public_html / index.php
blob316cc85d63f3e1ecd87b197d2d4a3cdfa89022f8
1 <?php
2 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
3 // Copyright (C) 2010 Winch Gate Property Limited
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Affero General Public License as
7 // published by the Free Software Foundation, either version 3 of the
8 // License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Affero General Public License for more details.
15 // You should have received a copy of the GNU Affero General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 global $HTTP_POST_VARS, $HTTP_GET_VARS;
20 include('authenticate.php');
23 include('display_view.php');
26 if (isset($reset_filters))
28 //$filter_shard = "";
29 $filter_server = "";
30 $filter_service = "";
31 $filter_entity = "";
34 $HTTP_VARS = array_merge($HTTP_POST_VARS, $HTTP_GET_VARS);
36 unset($sel);
37 unset($tid);
38 unset($tname);
39 unset($updateResult);
40 unset($overriden);
42 if (isset($active_player) && $active_player != "")
44 $arr = explode(',', $active_player);
45 foreach($arr as $player)
47 $pl = explode(' ', $player);
48 nel_query("*.*.EGS.loadPlayer ".$pl[0], $dummyResult);
49 nel_query("*.*.EGS.activePlayer ".$pl[0]." ".$pl[1], $dummyResult);
53 if (isset($current_tid) && $current_tid != "")
54 $tid = $current_tid;
56 $updatedShardAnnot = false;
58 // select table and display name
59 foreach ($HTTP_VARS as $var => $value)
61 if (strncmp($var, "selectTid_", 10) == 0)
62 $tid = (int)substr($var, 10);
63 else if (strncmp($var, "upd_annot_button_", 17) == 0)
65 $shard = substr($var, 17);
67 if ($shardLockState[$shard]['lock_state'] == 1)
69 $annot = $GLOBALS["upd_annot_text_".$shard];
71 $result = sqlquery("SELECT shard FROM shard_annotation WHERE shard='$shard'");
72 if (!$result || sqlnumrows($result) == 0)
73 sqlquery("INSERT INTO shard_annotation SET shard='$shard'");
75 sqlquery("UPDATE shard_annotation SET annotation='$annot', user='$uid', post_date=NOW() WHERE shard='$shard'");
77 $updatedShardAnnot = true;
80 else if (strncmp($var, "upd_lock_button_", 16) == 0)
82 $shard = substr($var, 16);
84 if ($shardLockState[$shard]['lock_state'] != 1)
86 $result = sqlquery("SELECT shard FROM shard_annotation WHERE shard='$shard'");
88 if (!$result || sqlnumrows($result) == 0)
89 sqlquery("INSERT INTO shard_annotation SET shard='$shard', annotation='locked by $admlogin', user='$uid', post_date=NOW()");
91 sqlquery("UPDATE shard_annotation SET lock_user='$uid', lock_ip='$REMOTE_ADDR', lock_date=NOW() WHERE shard='$shard'");
93 $updatedShardAnnot = true;
96 else if (strncmp($var, "upd_unlock_button_", 18) == 0)
98 $shard = substr($var, 18);
100 if ($shardLockState[$shard]['lock_state'] == 1)
102 $result = sqlquery("SELECT shard FROM shard_annotation WHERE shard='$shard'");
103 if (!$result || sqlnumrows($result) == 0)
104 sqlquery("INSERT INTO shard_annotation SET shard='$shard', annotation='locked by $admlogin', user='$uid', post_date=NOW()");
106 sqlquery("UPDATE shard_annotation SET lock_user='0' WHERE shard='$shard'");
108 $updatedShardAnnot = true;
113 if ($updatedShardAnnot)
115 getShardLockState();
119 if (isset($select_view) && $select_view != "")
120 $tname = explode(',', $select_view);
122 if (isset($tname) && count($tname)>0 && !isset($tid))
124 $found = false;
125 foreach($tname as $tbname)
127 $result = sqlquery("SELECT tid, name FROM view_table WHERE uid='$uid' AND name='$tbname'");
128 if ($result && ($arr=sqlfetch($result)))
130 $tid = $arr["tid"];
131 $tname = $tbname;
132 $found = true;
133 break;
136 $result = sqlquery("SELECT tid, name FROM view_table WHERE uid='$gid' AND name='$tbname'");
137 if ($result && ($arr=sqlfetch($result)))
139 $tid = $arr["tid"];
140 $tname = $tbname;
141 $found = true;
142 break;
146 if (!$found)
148 unset($tname);
152 if (!isset($tid))
154 $result = sqlquery("SELECT default_view FROM user, view_table WHERE user.uid='$uid' AND (view_table.uid='$uid' OR view_table.uid='$gid') AND view_table.tid=user.default_view");
155 if ($result && ($arr=sqlfetch($result)))
157 $tid=$arr["default_view"];
158 if ($tid == 0)
159 unset($tid);
162 if (!isset($tid))
164 $result = sqlquery("SELECT tid, name FROM view_table WHERE uid='$uid' ORDER BY ordering LIMIT 1");
165 if ($result && ($arr=sqlfetch($result)))
167 $tid = $arr["tid"];
168 $tname = $arr["name"];
170 else
172 $result = sqlquery("SELECT tid, name FROM view_table WHERE uid='$gid' ORDER BY ordering LIMIT 1");
173 if ($result && ($arr=sqlfetch($result)))
175 $tid = $arr["tid"];
176 $tname = $arr["name"];
182 $refreshRate = 0;
184 if (isset($tid))
185 $current_tid = $tid;
187 $result = sqlquery("SELECT name, refresh_rate FROM view_table WHERE tid='$tid'");
188 if ($result && ($result=sqlfetch($result)))
190 $tname = $result["name"];
191 $refreshRate = $result["refresh_rate"];
194 // get selection
195 foreach ($HTTP_VARS as $var => $value)
197 if (strncmp($var, "select_", 7) == 0)
199 $sel_arr = explode(":", substr($var, 7));
201 if (!$keep_shard) $sel_arr[0] = '*';
202 if (!$keep_server) $sel_arr[1] = '*';
203 if (!$keep_service) $sel_arr[2] = '*';
205 $sel[] = $sel_arr[0].".".$sel_arr[1].".".$sel_arr[2].".*";
207 else if (strncmp($var, "execServCommand_", 16) == 0)
209 $execServCommand = substr($var, 16);
213 if (!isset($sel) || !is_array($sel))
214 $sel = array("*.*.*.*");
216 unset($shards);
217 $selShards = array();
219 // add shard access to selection
220 if ($admlogin != "root" && !$IsNevrax)
222 if (count($shardAccess)>0)
224 $unfiltered = $sel;
225 unset($sel);
226 foreach ($shardAccess as $sshard)
228 $shards[] = $sshard["shard"];
229 $filtershard = $sshard["shard"];
230 foreach ($unfiltered as $filter)
232 list($shard, $server, $service, $variable) = explode(".", $filter);
233 if ($shard == "*" || $shard == $filtershard)
235 $sel[] = "$filtershard.$server.$service.$variable";
240 else
242 unset($sel);
243 $shards = array();
246 else
248 $result = sqlquery("SELECT DISTINCT shard FROM service ORDER BY shard");
249 while ($result && ($arr=sqlfetch($result)))
251 $shards[] = $arr["shard"];
255 unset($cmdResult);
257 if (isset($execServCommand) && isset($factPaths) && isset($execServParams) && isset($variableData[$execServCommand]))
259 // get command path
260 $cmd = $variableData[$execServCommand];
261 $path = $cmd["path"];
263 $paths = expandQuery($factPaths);
265 for ($i=0; $i<count($paths); ++$i)
267 $fpath = filterPathUsingAliases($paths[$i], $path);
268 if ($fpath != "")
269 $newPaths[] = $fpath;
272 $fullPath = factorizeQuery("[".join($newPaths, ",")."]");
274 // filter selection with command
275 $fullCmd = $fullPath." ".$execServParams;
276 logUser($uid, "COMMAND=".$fullCmd);
277 $qstate = nel_query($fullPath." ".$execServParams, $cmdResult);
280 unset($ownerTables);
282 // display available user and group views
283 $result = sqlquery("SELECT view.name AS name, view.tid AS tid, view.uid AS gid, user.login AS owner FROM view_table AS view, user WHERE view.uid=user.uid AND (view.uid='$uid' OR view.uid='$gid') ORDER BY gid, ordering");
284 if ($result)
286 $owner = "";
287 while ($arr = sqlfetch($result))
288 $ownerTables[$arr["owner"]][] = $arr;
291 htmlProlog($_SERVER['PHP_SELF'], "View Selection '$tname'", true);
293 if (isset($tname))
294 $current_tname = $tname;
296 $use_refreshRate = (isset($form_refreshRate) && $form_refreshRate != 0 ? $form_refreshRate : $refreshRate);
298 if ($use_refreshRate > 0)
300 echo "<script><!--\n";
301 echo " var sURL = unescape(window.location.pathname);\n";
302 echo " var pos = sURL.indexOf('.php');\n";
303 echo " function refresh() { window.location.replace( sURL ); }\n";
304 echo " if (pos >= 0) {\n";
305 echo " sURL = sURL.substr(0, pos+4)+'?current_tid=$tid&form_refreshRate=$form_refreshRate';\n";
306 echo " setTimeout(\"refresh()\", ".($use_refreshRate*1000).");\n";
307 echo " }\n";
308 echo "//--></script>\n";
311 echo "<br>\n";
312 echo "<table width=100%><form method=post action='".$_SERVER['PHP_SELF']."' name='viewForm'><tr valign=top>\n";
314 if (count($ownerTables)>0)
316 $clr = array("#E8E8E8", "#E0E0E0");
317 $o = 0;
318 foreach ($ownerTables as $owner => $ownerViews)
320 $i=0;
321 $bgcolor=$clr[$o];
322 $o = 1-$o;
323 foreach ($ownerViews as $arr)
325 if ($i%4 == 0)
327 if ($i>0)
328 echo "</table></td><td width=150 bgcolor=$bgcolor><table><tr><th>&nbsp;</th></tr>\n";
329 else
330 echo "<td width=150 bgcolor=$bgcolor><table><tr><th align=left>$owner views</th></tr>\n";
332 if ($tname == $arr["name"])
333 echo "<tr><td nowrap><input type=submit name='selectTid_".$arr["tid"]."' value='View'> <b>".$arr["name"]."</b></td></tr>";
334 else
335 echo "<tr><td nowrap><input type=submit name='selectTid_".$arr["tid"]."' value='View'> ".$arr["name"]."</td></tr>";
337 ++$i;
339 echo "</table></td>\n";
343 echo "<td width=40>&nbsp;</td>\n";
346 $use_filter_shard = $filter_shard;
347 $use_filter_server = $filter_server;
348 $use_filter_service = $filter_service;
349 $use_filter_entity = $filter_entity;
351 if (!isset($use_filter_shard) || $use_filter_shard == "") $use_filter_shard = "*";
352 if (!isset($use_filter_server) || $use_filter_server == "") $use_filter_server = "*";
353 if (!isset($use_filter_service) || $use_filter_service == "") $use_filter_service = "*";
354 if (!isset($use_filter_entity) || $use_filter_entity == "") $use_filter_entity = "*";
356 $view_filter = $use_filter_shard.".".$use_filter_server.".".$use_filter_service.".".$use_filter_entity;
358 $selAllShards = false;
359 for ($i=0; $i<count($sel); ++$i)
361 $sel[$i] = partialFilterPath($sel[$i], $view_filter);
363 $expSel = explode('.', $sel[$i]);
364 if ($expSel[0] == '*')
365 $selAllShards = true;
366 $selShards[$expSel[0]] = true;
369 echo "<td nowrap bgcolor=#E0E0E0>\n";
370 if (count($shards) > 0)
372 echo "<b>Shard shortcuts</b><table><tr valign=top><td>\n";
373 $i = 1;
374 echo "<table>";
375 echo "<tr><td><a href='".$_SERVER['PHP_SELF']."?current_tid=$tid&form_refreshRate=$form_refreshRate&filter_shard=$link_shard&filter_server=&filter_service='><i>All</i></a></td></tr>";
376 foreach ($shards as $link_shard)
378 if ($i%5 == 0 && $i>0)
379 echo "</table></td><td><table>\n";
380 echo "<tr>";
381 echo ($selShards[$link_shard]) ? '<td nowrap bgcolor=#C0C0C0><b>' : '<td nowrap>';
382 $alias = $shardLockState[$link_shard]['alias'];
383 if ($alias == '')
384 $alias = $link_shard;
385 else
386 $alias .= "($link_shard)";
387 echo "<a href='".$_SERVER['PHP_SELF']."?current_tid=$tid&form_refreshRate=$form_refreshRate&filter_shard=$link_shard&filter_server=&filter_service='>$alias</a>";
388 if ($selShards[$link_shard])
389 echo "</b>";
390 echo "</td></tr>";
391 ++$i;
393 echo "</table>";
394 echo "</td></tr></table>\n";
396 echo "</td>\n";
398 echo "<td width=100% align=right>\n";
399 echo "<table><tr><th>Refresh rate</th></tr>\n";
400 echo "<tr><td><select name=form_refreshRate onChange='submit()'>\n";
401 echo "<option value='0'".(!isset($form_refreshRate) || $form_refreshRate==0 ? " selected" : "").">View setting (".($refreshRate>0 ? "$refreshRate seconds" : "no refresh").")\n";
402 echo "<option value='-1'".($form_refreshRate==-1 ? " selected" : "").">No refresh\n";
403 echo "<option value='30'".($form_refreshRate==30 ? " selected" : "").">30 seconds\n";
404 echo "<option value='60'".($form_refreshRate==60 ? " selected" : "").">60 seconds\n";
405 echo "<option value='120'".($form_refreshRate==120 ? " selected" : "").">2 minutes\n";
406 echo "<option value='300'".($form_refreshRate==300 ? " selected" : "").">5 minutes\n";
407 echo "</select></td></tr></table>\n";
408 echo "</td>\n";
410 echo "<td align=right><table><tr><th width=300>Selection</th></tr>\n";
411 if (count($sel) > 0)
412 foreach ($sel as $s)
413 echo "<tr><td>$s</td></tr>\n";
414 echo "</table></td>\n";
416 echo "</tr></table><br>Content of view <font size=3><b>$tname</b></font><br><br>\n";
418 echo "<table><tr><td>\n";
420 $queryErrors = array();
422 // update values
423 if ($upd_values)
425 unset($update);
426 $tid = $current_tid;
428 foreach ($HTTP_VARS as $var => $value)
429 if (strncmp($var, "override_", 9) == 0)
430 $overriden[substr($var, 9)]=$value;
432 $shardAccessForbidden = array();
434 foreach ($HTTP_VARS as $var => $value)
436 if (strncmp($var, "updvar_", 7) == 0)
438 $vv = substr($var, 7);
439 $prevValue = $GLOBALS["prevvar_$vv"];
441 $var_split = explode("|", $vv);
442 $shard = $var_split[0];
443 $var_split = $var_split[count($var_split)-1];
444 $override = $overriden[$var_split];
446 if ($shardLockState[$shard]['lock_state'] != 1)
448 if (!$shardAccessForbidden[$shard])
450 $shardAccessForbidden[$shard] = true;
451 $queryErrors[] = "You can't update values on shard '$shard', access is not locked for you";
453 continue;
456 if ($value != $prevValue)
458 $address = str_replace("|", ".", $vv);
459 $update[] = "$address=$value";
461 else if (isset($override) && $override != "" && $override != $prevValue)
463 $address = str_replace("|", ".", $vv);
464 $update[] = "$address=$override";
467 else if (strncmp($var, "current_select_", 15) == 0)
469 $sel[] = $value;
473 $sel = array_unique($sel);
475 if (isset($update) && count($update > 0))
477 if (count($update) > 1)
479 $query = "[".join(",", $update)."]";
480 $query = factorizeQuery($query);
482 else
483 $query = $update[0];
485 $executeQuery = $query;
487 $bef = microtime();
488 logUser($uid, "UPDATE=".$executeQuery);
489 $qstate = nel_query($executeQuery, $updateResult);
490 $aft = microtime();
492 list($usec, $sec) = explode(" ", $bef);
493 $bef = ((float)$sec + (float)$usec);
494 list($usec, $sec) = explode(" ", $aft);
495 $aft = ((float)$sec + (float)$usec);
496 $tm = (int)(($aft-$bef)*1000.0);
498 $queryResult = "Executed $executeQuery<br>$tm milliseconds computation time<br>\n";
501 else if (isset($executeQuery))
503 $bef = microtime();
504 $qstate = nel_query($executeQuery, $updateResult);
505 $aft = microtime();
507 list($usec, $sec) = explode(" ", $bef);
508 $bef = ((float)$sec + (float)$usec);
509 list($usec, $sec) = explode(" ", $aft);
510 $aft = ((float)$sec + (float)$usec);
511 $tm = (int)(($aft-$bef)*1000.0);
513 $queryResult = "Executed $executeQuery<br>$tm milliseconds computation time<br>\n";
516 if ($updateResult)
518 buildVariableEnv($uid, $gid, $tid, $vardisp, $bounds, $privilege, $tree, $condensed, $autoDisplay);
519 displayResult($updateResult, $vardisp, $bounds, $privilege);
521 else
523 // send select request
524 if (count($sel) > 0)
525 $sel = array_unique($sel);
527 if (count($sel) == 1 && $sel[0] == "")
528 unset($sel);
530 $queryResult = displayViewTable($uid, $gid, $tid, $sel);
533 echo "<input type=hidden name='current_tid' value='$tid'>\n";
534 $i=0;
535 if (count($sel) > 0)
536 foreach ($sel as $selec)
537 echo "<input type=hidden name='current_select_".($i++)."' value='$selec'>\n";
539 if (isset($tid) && $tid != "")
541 $result = sqlquery("SELECT view_row.name AS name, variable.vid AS vid FROM view_row, variable WHERE tid='$tid' AND variable.command='command' AND view_row.vid=variable.vid ORDER BY ordering");
542 if ($result && sqlnumrows($result) > 0)
544 echo "<br><br><b>Service commands</b> <font size=1>The commands are sent to all services seen in the view above</font><br>\n";
545 echo "Command parameters <input name=execServParams size=64 maxlength=128><br>\n";
546 echo "<table>\n";
547 echo "<tr valign=top>\n";
548 echo "<td><table>\n";
550 $numInCol = 0;
551 while ($result && ($arr=sqlfetch($result)))
553 if ($numInCol >= 5 || $arr["name"] == 'SEPARATOR')
555 echo "</table></td><td width=30></td><td><table>\n";
556 $numInCol = 0;
558 if ($arr["name"] != 'SEPARATOR')
560 echo "<tr><td><input type=submit name=execServCommand_".$arr["vid"]." value='".$arr["name"]."'></td></tr>\n";
561 ++$numInCol;
565 if (isset($listPath) && count($listPath) > 0)
567 $address = "[".join(",", $listPath)."]";
568 $address = factorizeQuery($address);
570 echo "<input type=hidden name=factPaths value='$address'>\n";
573 echo "</table></td>\n";
574 echo "</tr></table>\n";
576 if (isset($cmdResult))
578 echo "<br>Result of command '$fullPath $execServParams':<br>\n";
579 echo "<table border=1><tr><td>\n";
580 echo "<pre>$cmdResult</pre>\n";
581 echo "</td></tr></table>\n";
586 if (count($queryErrors) > 0)
588 echo "<br><font size=3><b>Execution errors:</b></font>\n";
589 foreach ($queryErrors as $error)
590 echo "<br><font size=3 color=#FF0000><b>$error</b></font>\n";
592 echo "<br><br><font size=0>$queryResult</font>\n";
593 echo "</td></form></tr></table>\n";
595 function lvcmp($a, $b)
597 return ($a["path"] == $b["path"] ? 0 : $a["path"] < $b["path"] ? -1 : 1);
600 if (isset($tid) && $tid != "" && count($listPath) > 0)
602 $result = sqlquery("SELECT view_row.name AS name, variable.vid, variable.path, warning_bound, error_bound, alarm_order FROM view_row, variable WHERE tid='$tid' AND variable.vid=view_row.vid AND graph!='0' ORDER BY name");
604 if ($result && sqlnumrows($result) > 0)
606 unset($listVars);
608 while ($result && ($arr=sqlfetch($result)))
610 $gname = $arr["name"];
611 $gvid = $arr["vid"];
612 $gfilter = $arr["path"];
614 $gwarn = $arr["warning_bound"];
615 $gerr = $arr["error_bound"];
616 $gord = $arr["alarm_order"];
618 for ($i=0; $i<count($listPath); ++$i)
620 $path = $listPath[$i].".*";
621 $varpath = filterPathUsingAliases($path, $gfilter);
622 $rrdpath = $rrdrootpath."/".$varpath.".rrd";
623 if ($varpath != "" && file_exists($rrdpath))
624 $listVars[] = array("path" => $varpath, "name" => $gname, "warn" => $gwarn, "err" => $gerr, "order" => $gord);
628 if (count($listVars) > 0)
630 usort($listVars, "lvcmp");
632 echo "<br><br><b>View Graphs</b><br><br>\n";
633 echo "<table><tr valign=top>\n";
634 echo "<td><table>\n";
636 $counter = 0;
638 // remove too old picture files
639 // opendir for scanning gif files
640 if ($dir = @opendir($gifoutputpath))
642 unset($eraseFiles);
643 $curtime = time();
644 while($file = readdir($dir))
646 if (substr($file, 0, 7) == "tmppic_")
648 $fstats = stat("$gifoutputpath/$file");
649 if ($fstats[9] < $curtime - $gifpersistence)
650 $eraseFiles[] = "$gifoutputpath/$file";
654 closedir($dir);
656 if (count($eraseFiles) > 0)
657 foreach ($eraseFiles as $file)
658 unlink($file);
662 mt_srand((float) microtime()*1000000);
663 $randFilename = "tmppic_".mt_rand(10000, 99999);
665 foreach ($listVars as $var)
667 $rrdvar = $var["path"];
668 $rrdpath = $rrdrootpath."/".$rrdvar.".rrd";
669 $rrdname = $var["name"];
670 $rrdwarn = $var["warn"];
671 $rrderr = $var["err"];
672 $rrdord = strtoupper($var["order"]);
674 echo "<tr><th>$rrdvar <font size=0>(using path $rrdpath)</font></th></tr>\n";
676 // generate a temp filename
678 $tempFilename_0 = "$gifhttplocation/".$randFilename."_".$counter."_0.gif";
679 $tempFilename_1 = "$gifhttplocation/".$randFilename."_".$counter."_1.gif";
680 $tempFilename_2 = "$gifhttplocation/".$randFilename."_".$counter."_2.gif";
682 $tempFilenameout_0 = "$gifoutputpath/".$randFilename."_".$counter."_0.gif";
683 $tempFilenameout_1 = "$gifoutputpath/".$randFilename."_".$counter."_1.gif";
684 $tempFilenameout_2 = "$gifoutputpath/".$randFilename."_".$counter."_2.gif";
686 ++$counter;
688 // generate picture according to the temp filename
690 unset($result);
692 $rrdDEF = "DEF:val=$rrdpath:var:AVERAGE";
693 $rrdDraw = "";
695 if ($rrdwarn != -1)
697 $rrdDEF .= " CDEF:warn=val,$rrdwarn,$rrdord,val,0,IF";
698 $rrdDraw .= "AREA:warn#FFCC88 ";
701 if ($rrderr != -1)
703 $rrdDEF .= " CDEF:err=val,$rrderr,$rrdord,val,0,IF";
704 $rrdDraw .= "AREA:err#FF4422 ";
707 $rrdDraw .= "LINE2:val#0000FF";
709 $execStr = "rrdtool graph $tempFilenameout_0 --start -1200 $rrdDEF $rrdDraw";
710 //echo "exec(\"$execStr\")<br>\n";
711 exec($execStr, $result, $retcode1);
712 // echo "<tr><td><img src='$tempFilename_0'></td></tr>";
714 $execStr = "rrdtool graph $tempFilenameout_1 --start -10800 $rrdDEF $rrdDraw";
715 //echo "exec(\"$execStr\")<br>\n";
716 exec($execStr, $result, $retcode2);
717 // echo "<tr><td><img src='$tempFilename_1'></td></tr>";
719 $execStr = "rrdtool graph $tempFilenameout_2 --start -86400 $rrdDEF $rrdDraw";
720 //echo "exec(\"$execStr\")<br>\n";
721 exec($execStr, $result, $retcode3);
722 // echo "<tr><td><img src='$tempFilename_2'></td></tr>";
723 echo "<tr><td><img src='$tempFilename_0'><img src='$tempFilename_1'><img src='$tempFilename_2'></td></tr>";
725 echo "<tr height=10><td colspan=1></td></tr>";
727 if ($retcode1 || $retcode2 || $retcode3)
729 echo "<b>RRDTool output:</b><br>\n";
730 print_r($result);
731 echo "<br>\n";
735 echo "</table></td>\n";
736 echo "</tr></table>\n";
741 htmlEpilog();
743 //print_r($shardLockState);