function bookcategorie($id = NULL, $action = NULL) { admin_required(); $type = "livro-categoria"; $bookcategorie = new BookCategorie(); if (!empty($id)) { admin_edit($bookcategorie, $type, $id, $action); } else { admin_list($bookcategorie, $type); } }
} if ($user->id == $team->ping_user) { $get_from_db = true; } // Cache the team record, its forum record, its new members, // its admins, and its member counts $cache_args = "teamid={$teamid}"; if (!$get_from_db) { $cached_data = get_cached_data(TEAM_PAGE_TTL, $cache_args); if ($cached_data) { // We found some old but non-stale data, let's use it $team = unserialize($cached_data); } else { $get_from_db = true; } } if ($get_from_db) { $team->nusers = BoincUser::count("teamid={$teamid}"); $team->nusers_worked = BoincUser::count("teamid={$teamid} and total_credit>0"); $team->nusers_active = BoincUser::count("teamid={$teamid} and expavg_credit>0.1"); $team->forum = BoincForum::lookup("parent_type=1 and category={$team->id}"); $team->new_members = new_member_list($teamid); $team->admins = admin_list($teamid); $team->founder = BoincUser::lookup_id($team->userid); set_cached_data(TEAM_PAGE_TTL, serialize($team), $cache_args); } if (!$team) { error_page(tra("no such team")); } display_team_page($team, $user); page_tail(true);
} elseif ($_REQUEST['mode'] == 'permission_directory') { admin_permission_directory(); } elseif ($_REQUEST['mode'] == 'move_file') { admin_move_file(); } elseif ($_REQUEST['mode'] == 'move_directory') { admin_move_directory(); } elseif ($_REQUEST['mode'] == 'delete_file') { admin_delete_file(); } elseif ($_REQUEST['mode'] == 'delete_directory') { admin_delete_directory(); } elseif ($_REQUEST['mode'] == 'phpinfo') { admin_phpinfo(); } elseif ($_REQUEST['mode'] == 'logout') { admin_logout(); } else { admin_list(); } } else { admin(); } exit; /********* ユーザー定義関数 *****************************************/ /* ログイン状態チェック */ function isloggedin() { if (isset($_POST['password'])) { //パスワード認証 if ($_POST['password'] == ADMIN_PASSWORD) { $_SESSION['login'] = true; } header('Location: ' . HTTP_URL . MAIN_FILE . '?mode=default');