$error = true; $sysmsg[] = $ids_arr[1]; } else { $plugin_ids = $ids_arr[1]; } if (!$error) { $db->query_unbuffered("update {$tpf}plugins set actived=1 where plugin_name in({$plugin_ids})"); $sysmsg[] = __('plugins_actived_success'); redirect($_SERVER['HTTP_REFERER'], $sysmsg); } else { redirect('back', $sysmsg); } } elseif ($task == 'inactive') { form_auth(gpc('formhash', 'P', ''), formhash()); $plugin_ids = gpc('plugin_ids', 'P', array()); $ids_arr = get_ids_arr($plugin_ids, __('please_select_plugins')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $plugin_ids = $ids_arr[1]; } if (!$error) { $db->query_unbuffered("update {$tpf}plugins set actived=0 where plugin_name in({$plugin_ids})"); $sysmsg[] = __('plugins_inactived_success'); redirect($_SERVER['HTTP_REFERER'], $sysmsg); } else { redirect('back', $sysmsg); } } else { syn_plugins();
# Site: http://www.google.com # # $Id: tag.inc.php 121 2014-03-04 12:38:05Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ if (!defined('IN_PHPDISK') || !defined('IN_ADMINCP')) { exit('[PHPDisk] Access Denied'); } admin_no_power($task, 41, $pd_uid); switch ($action) { default: if ($task) { $tagids = gpc('tagids', 'P', array('')); $ids_arr = get_ids_arr($tagids, __('please_select_tags')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $tag_str = $ids_arr[1]; } } if ($task == 'chg_show') { form_auth(gpc('formhash', 'P', ''), formhash()); if ($settings['online_demo']) { $error = true; $sysmsg[] = __('online_demo_deny'); } if (!$error) { $db->query_unbuffered("update {$tpf}tags set is_hidden=0 where tag_id in ({$tag_str})");
break; case 'index': admin_no_power($task, 6, $pd_uid); if ($task == 'move') { form_auth(gpc('formhash', 'P', ''), formhash()); $userids = gpc('userids', 'P', array('')); $dest_gid = (int) gpc('dest_gid', 'P', ''); if ($settings['online_demo']) { $error = true; $sysmsg[] = __('online_demo_deny'); } if (!$dest_gid) { $error = true; $sysmsg[] = __('please_select_dest_gid'); } $ids_arr = get_ids_arr($userids, __('please_select_move_users'), 1); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $user_str = $ids_arr[1]; } if (!$error) { $db->query_unbuffered("update {$tpf}users set gid='{$dest_gid}' where userid in ({$user_str})"); $sysmsg[] = __('move_user_success'); redirect(urr(ADMINCP, "item=users&menu=user&action=index"), $sysmsg); } else { redirect('back', $sysmsg); } } else { $perpage = 30;
# */ if (!defined('IN_PHPDISK') || !defined('IN_ADMINCP')) { exit('[PHPDisk] Access Denied'); } admin_no_power($task, 0, $pd_uid); switch ($action) { case 'search_index': if ($task == 'search_index') { form_auth(gpc('formhash', 'P', ''), formhash()); $searchids = gpc('searchids', 'P', array('')); if ($settings['online_demo']) { $error = true; $sysmsg[] = __('online_demo_deny'); } $ids_arr = get_ids_arr($searchids, __('please_select_operation_index')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $file_str = $ids_arr[1]; } if (!$error) { $db->query_unbuffered("delete from {$tpf}search_index where searchid in ({$file_str})"); $sysmsg[] = __('delete_search_cache_success'); redirect(urr(ADMINCP, "item={$item}&menu=tool&action={$action}"), $sysmsg); } else { redirect('back', $sysmsg); } } else { $q = $db->query("select * from {$tpf}search_index order by searchid desc");
unset($rs); $page_nav = multi($total_num, $perpage, $pg, urr(ADMINCP, "item={$item}&menu=file&action={$action}&view={$view}&uid={$uid}")); $dd = date('Y-m-d'); require_once template_echo($item, $admin_tpl_dir, '', 1); } break; case 'search': $view = trim(gpc('view', 'GP', '')); if (in_array($task, array('check_public', 'file_to_locked', 'file_to_unlocked', 'delete_file_complete', 'restore_del_file', 'move_to', 'move_oid'))) { form_auth(gpc('formhash', 'P', ''), formhash()); $file_ids = gpc('file_ids', 'P', array('')); if ($settings['online_demo']) { $error = true; $sysmsg[] = __('online_demo_deny'); } $ids_arr = get_ids_arr($file_ids, __('please_select_check_files')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $file_str = $ids_arr[1]; } if (!$error) { switch ($task) { case 'check_public': $db->query_unbuffered("update {$tpf}files set is_checked=1 where file_id in ({$file_str})"); $sysmsg[] = __('check_public_success'); redirect(urr(ADMINCP, "item=files&action=index&view=checked_file"), $sysmsg); break; case 'file_to_locked': $db->query_unbuffered("update {$tpf}files set is_locked=1 where file_id in ({$file_str})");
$sysmsg[] = __('cp_shortcut_exists'); } if (!$error) { $ins = array('title' => $title, 'url' => $url); $db->query_unbuffered("insert into {$tpf}cp_shortcut set " . $db->sql_array($ins) . ";"); $sysmsg[] = __('add_sitemap_success'); redirect('back', $sysmsg); } else { redirect('back', $sysmsg); } break; case 'setting': if ($task == 'setting') { form_auth(gpc('formhash', 'P', ''), formhash()); $ids = gpc('ids', 'P', array()); $ids_arr = get_ids_arr($ids, __('please_select_operation_menus')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $ids_str = $ids_arr[1]; } if (!$error) { $db->query_unbuffered("delete from {$tpf}cp_shortcut where id in ({$ids_str})"); $num = $db->result_first("select count(*) from {$tpf}cp_shortcut"); if (!$num) { $db->query_unbuffered("truncate table {$tpf}cp_shortcut;"); } $sysmsg[] = __('del_cp_shortcut_success'); redirect(urr(ADMINCP, "item={$item}&action={$action}"), $sysmsg); } else {
# Site: http://www.google.com # # $Id: comment.inc.php 121 2014-03-04 12:38:05Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ if (!defined('IN_PHPDISK') || !defined('IN_ADMINCP')) { exit('[PHPDisk] Access Denied'); } admin_no_power($task, 33, $pd_uid); switch ($action) { default: if ($task != 'update_setting') { $cmt_ids = gpc('cmt_ids', 'P', array('')); $ids_arr = get_ids_arr($cmt_ids, __('please_select_cmts')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $cmt_str = $ids_arr[1]; } } if ($task == 'update_setting') { form_auth(gpc('formhash', 'P', ''), formhash()); $setting = array('open_comment' => 0, 'check_comment' => 0); $settings = gpc('setting', 'P', $setting); if (!$error) { settings_cache($settings); $sysmsg[] = __('comment_update_success'); redirect(urr(ADMINCP, "item={$item}&menu=extend"), $sysmsg);
form_auth(gpc('formhash', 'P', ''), formhash()); $show_order = gpc('show_order', 'P', array()); $file_ids2 = gpc('file_ids2', 'P', array()); for ($i = 0; $i < count($show_order); $i++) { if ($file_ids2[$i]) { $db->query_unbuffered("update {$tpf}files set show_order='{$show_order[$i]}' where file_id='{$file_ids2[$i]}'"); } } $sysmsg[] = __('order_file_success'); redirect('back', $sysmsg); } elseif ($task == 'outlink') { form_auth(gpc('formhash', 'P', ''), formhash()); $file_ids = gpc('file_ids', 'P', array()); $order = gpc('order', 'G', ''); $order_txt = $order == 'asc' ? 'desc' : 'asc'; $ids_arr = get_ids_arr($file_ids, __('please_select_operation_files')); if ($ids_arr[0]) { $error = true; $sysmsg[] = $ids_arr[1]; } else { $file_str = $ids_arr[1]; } if ($file_str) { $q = $db->query("select file_id,file_name,file_key,file_extension,is_image,file_store_path,file_real_name,server_oid from {$tpf}files where file_id in ({$file_str}) order by file_id {$order}"); $upl_array = array(); while ($rs = $db->fetch_array($q)) { $tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : ""; $rs['file_name_all'] = $rs['file_name'] . $tmp_ext; $rs['file_name'] = cutstr($rs['file_name'] . $tmp_ext, 35); $rs['file_link'] = $settings['phpdisk_url'] . urr("viewfile", "file_id=" . $rs['file_id']); $upl_array[] = $rs;