// INITIALISATION $hist_dir = "history/"; $self = $PHP_SELF; function archiver_good($a) { return (isset($a) && ( (is_string($a) && ($a != "")) || (!is_string($a) && ($a != 0)) ) ); } function archiver_show_options($optnames, $optvalues, $selected) { if (!is_array($optvalues)) return 0; $found = 0; $ret = ""; for($i = 0; $i < sizeof($optvalues); $i++) { $ret .= "\n"; echo $ret; } function get_archives($dir) { $ret = array(); $d = opendir($dir); if (!$d) return $ret; while (($file = readdir($d)) !== false) { if (ereg("^([^0-9]*)([0-9]*)", $file, $regs)) { if (!ereg("^\.", $regs[1])) $ret[$regs[1]][$regs[2]] = true; } } closedir($d); return $ret; } ?>