Archive for June, 2008
Wednesday, June 18th, 2008
Very, very insecure.
$base_dir = "/var/log/sxr";
$file = (isset($_GET['file']) ? $_GET['file'] : 0);
$to_tail = 25;
$full_path = $base_dir . '/' . $file;
$lines = file($full_path);
$count = count($lines);
if($count < $to_tail) {
$to_tail = $count;
}
$start = $count - $to_tail;
print = "Last $to_tail lines of $file";
while($start < $count) {
print $lines[$start] . '';
$start++;
}
Posted in Code | No Comments »
Monday, June 16th, 2008
You would think a check all function would be pretty easy in jQuery, and it is if all of the checkboxes have the same name. If they don't things get tricky.
In this example, I have an anchor named chk_all that the user can click to check all. All of my ...
Posted in Code | No Comments »
Monday, June 9th, 2008
I should keep this to myself.
[youtube]http://www.youtube.com/watch?v=vYHgJS7WXUE[/youtube]
Posted in Fighting | No Comments »