Changeset 15283 for trunk/FACT++/www
- Timestamp:
- 04/08/13 20:14:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/showlog.php
r15189 r15283 311 311 unset($_GET['refresh']); 312 312 313 $ name = empty($_GET['log']) ? "dimserver.log" : $_GET['log'].".log";314 $dir = empty($_GET['dir']) ? "FACT++" :$_GET['dir'];315 316 if (!strpos($ name, "/")===false || !strpos($dir, "/")===false)313 $prg = empty($_GET['log']) ? "dimserver" : $_GET['log']; 314 $dir = $_GET['dir']; 315 316 if (!strpos($prg, "/")===false || !strpos($dir, "/")===false) 317 317 return header('HTTP/1.0 403 Access forbidden.'); 318 318 319 $filename = "/users/fact/".$dir."/".$name; 319 if (empty($dir)) 320 { 321 if ($prg=="schedule") 322 $prg = "scripts/schedule.js"; 323 324 $filename = "/users/fact/operation/".$prg; 325 if (is_link($filename)) 326 $filename = "/users/fact/operation/".dirname(readlink($filename))."/".$prg.".log"; 327 } 328 329 if (empty($filename)) 330 $filename = "/users/fact/".$dir."/".$prg.".log"; 320 331 321 332 $size = filesize($filename); … … 337 348 array_splice($file, $pos+1, $n-$max); 338 349 } 350 351 $dir = basename(dirname($filename)); 352 $name = basename($filename); 339 353 340 354 ?>
Note:
See TracChangeset
for help on using the changeset viewer.