function file_find($dir, $find = '*') { return file::find($dir, $find); }
public function change_password($id = null) { if (!is_null($id) && isset($_POST['new_password'])) { $file = new file(); $file->find($id); $file->password = $_POST['new_password']; $file->save(); $this->session->flash($this->l10n->__("La clave de acceso ha sido cambiada")); $this->redirect("files"); } }
/** * 读取所有日志 * * @param string $name * @return array */ static function read($name = null) { if (static::$open === false) { return; } $dir = static::$path; if ($name) { $name = ucfirst($name); $dir = $dir . '/' . $name; } $list = file::find($dir); if ($list['file']) { foreach (array_reverse($list['file']) as $v) { $k = str_replace(static::$path, '', $v); $content = file_get_contents($v); $out .= "<h3>" . $k . "</h3>" . $content . "\n\n"; } } return $out; }