`ID` int(11) NOT NULL, `block_list` longtext NOT NULL, PRIMARY KEY (`ID`) ) DEFAULT CHARSET=utf8'); $mysql->exec('ALTER TABLE `users` ADD `newmd5` TEXT NOT NULL AFTER `md5`; '); $mysql->exec('UPDATE `users` SET `newmd5` = if (`md5` = "", "", concat("[\\"", `md5`, "\\"]"))'); $mysql->exec('ALTER TABLE `users` DROP `md5` ;'); $res = $mysql->prepare('select watchlist.*,users.ID as uid,newmd5 as usermd5, block_list from watchlist left join block_list on block_list.ID=watchlist.id left join users on users.ID=watchlist.user_id where watchlist.id=?'); $res->execute(array($id)); } $res = $res->fetch(); if (empty($res)) { echo '<h1>错误:找不到编号为' . $_SERVER['QUERY_STRING'] . '的记录</h1>'; die; } $login_test = loginFromDatabase($res['uid']); if ($login_test !== true) { echo '<h1>由于cookie失效,无法进行补档,'; if ($res['link'] == '/s/fakelink' || $res['link'] == '/s/notallow') { echo '请联系上传者!'; } else { echo '请尝试直接<a href="http://pan.baidu.com' . $res['link'] . '">访问分享页</a>(提取密码:' . $res['pass'] . ')'; } die; } if (!isset($force_direct_link)) { $force_direct_link = false; } $meta = getFileMetas($res['name']); if ($meta === false) { echo '<h1>文件不存在QuQ</h1>';
<?php require dirname(__FILE__) . '/../includes/common.php'; session_start(); print_header('创建分享'); if (!isset($_SESSION['uid']) || !is_numeric($_SESSION['uid'])) { alert_error('未选择用户', false); } if (!loginFromDatabase($_SESSION['uid'])) { alert_error('cookie失效,或者百度封了IP!', false); } if (isset($_POST['submit']) && $_POST['submit'] == '创建' && isset($_POST['type'])) { if ($_POST['type'] == 0 && strlen($_POST['code']) != 4) { echo '<h1>错误:提取码位数不对。请输入4个半角字符,或者1个全角字符和1个半角字符的组合。</h1>'; } else { if ($_POST['type'] < 0 || $_POST['type'] > 2) { echo '<h1>错误:无效参数</h1>'; } else { if ($_POST['type'] == 0) { $result = share($_POST['fid'], $_POST['code'], true); } elseif ($_POST['type'] == 1) { $result = share($_POST['fid'], '无', true); } elseif ($_POST['type'] == 2) { alert_error('暂不支持此种分享的创建!', false); } if (!$result) { alert_error('分享创建失败!', false); } die; } }
<?php require 'includes/common.php'; session_start(); if (isset($_GET['switch_user'])) { if (!is_numeric($_GET['switch_user'])) { alert_error('用户ID错误', 'switch_user.php'); } $result = loginFromDatabase($_GET['switch_user']); if ($result === -1) { alert_error('找不到用户', 'switch_user.php'); } else { if ($result === false) { alert_error('cookie失效,或者百度封了IP!', 'switch_user.php'); } } unset($_SESSION['file_can_add'], $_SESSION['folder']); $_SESSION['uid'] = $uid; wlog('切换用户:[' . $uid . ']' . $username); header('Location: browse.php'); die; } else { if (isset($_GET['remove_user'])) { if (!isset($_POST['password'])) { wlog('请求删除用户[' . $_GET['remove_user'] . ']', 1); } if (isset($_POST['password'])) { if (isset($_POST['code_string'])) { $result = login($_POST['name'], $_POST['password'], $_POST['code_string'], $_POST['captcha']); } else { $result = login($_POST['name'], $_POST['password']);