function check_logs($login, $passwd) { $swag = file_get_contents("private/passwd"); $unserialized = unserialize($swag); $hashed_pwd = hash("whirlpool", $passwd); $i = 0; while ($unserialized[$i]) { if ($unserialized[$i]['login'] === $login) { if ($unserialized[$i]['passwd'] === $hashed_pwd) { if (check_admin($login) === TRUE) { $_SESSION['admin'] = 'ok'; } else { $_SESSION['admin'] = ""; } return TRUE; } else { $_SESSION['message'] = "Veuillez saisir une combinaison login/mot de passe valide."; return FALSE; } } $i = $i + 1; } $_SESSION['message'] = "Erreur très très louche."; return FALSE; }
/** * 检查是否具有权限(模板使用) * @param $authStr * @return \Illuminate\Http\RedirectResponse */ function check_auth($authStr) { if (check_admin()) { return true; } if (in_array($authStr, session('loginUser')->auth['authList'])) { return true; } return false; }
function step($is_submit) { $is_external_users = $_SESSION['install']['db']['users_exists']; if ($is_submit) { if ($is_external_users) { return array('error' => false); } return check_admin(); } $result = array('html' => render('step_admin', array('is_external_users' => $is_external_users, 'users_table' => $_SESSION['install']['db']['users_table']))); return $result; }
public function action_add() { $community = $this->request->param('id'); if (!$community) { $this->request->redirect(URL::base() . 'tournament'); } $view = View::factory('tournament_add'); $view->community = com_from_id($community); $view->available_maps = get_maps(); /* $view->refs = ''; $view->maps = ''; */ $view->description = ''; $view->exclusive = ''; if ($_POST) { $refs = array(); $refCount = $_POST['refCount']; for ($i = 1; $i <= $refCount; $i++) { array_push($refs, $_POST['ref' . $i]); } $ref_ids = array(); foreach ($refs as $ref) { if (!id_from_name($ref)) { array_push($this->template->errors, "Could not find user: "******"You are not the admin of this community."); } if (empty($this->template->errors)) { //DB::insert('tournies', array('community','admin','description','exclusive'))->values(array($community,$this->user,$description,$exclusive))->execute(); $this->request->redirect("/tournament?success"); } else { $view->description = $description; $view->exclusive = $exclusive; } } $this->template->content = $view; }
function inform_and_exit_if_not_admin() { switch (check_admin()) { case 98: echo json_encode(array('iserror' => true, "result" => "KO", 'errno' => 98, 'errorMsg' => 'not administrator')); exit(1); break; case 99: echo json_encode(array('iserror' => true, "result" => "KO", "errno" => 99, "errMsg" => "not connected")); exit(1); case 0: break; default: echo json_encode(array('iserror' => true, "result" => "KO", "errno" => 1, "errMsg" => "unknown error")); exit(1); } }
function app_settings($folder = NULL) { check_admin(); $set = NULL; $data['app'] = $this->admin->get_app_info_by_folder($folder); $data['config'] = NULL; $path = ROOT . 'application/app/' . $folder . '/controller/'; if (file_exists($path . 'admin_config.php')) { include_once $path . 'admin_config.php'; $data['config'] = $config; foreach ($config as $k => $v) { if (!is_array($v)) { $set .= "set( '{$k}' , '{$v}' );"; } } } $data['set'] = $set; $data['folder'] = $folder; $this->view('app_settings', $data); }
<?php if (isset($_POST['submit'])) { $email = $_POST['Email']; $pass = $_POST['Password']; $check = check_admin($email, $pass); if ($check) { $_SESSION['email'] = $email; $_SESSION['password'] = $pass; header('location:index.php?lang=' . $lang . '&controller=dashboard'); } else { $error = 'Sign in Failure ! Please try again.'; } } ?> <?php require 'view/sign/index.php';
<?php $visa = get_number_recored('passport_visa_offers'); $tour = get_number_recored('tour_content'); $contact = get_number_recored('contact'); $news = get_number_recored('news_event_content'); $labor = get_number_recored('labor_content'); $car_service = get_number_recored('car_service'); $ticket_plane = get_number_recored('ticket_plane_content'); $abroad = get_number_recored('abroad_offers'); $lang = get_lang(); if (isset($_SESSION['email']) && isset($_SESSION['password'])) { $email = $_SESSION['email']; $password = $_SESSION['password']; $check = check_admin($email, $password); if ($check) { $active = 'Dashboard'; require 'template/header.php'; require_once 'view/dashboard/index.php'; } else { header('location: index.php?lang=' . $lang . '&controller=sign'); } } else { header('location: index.php?lang=' . $lang . '&controller=sign'); }
header("Location:?act=login&err=" . urlencode('用户名不能为空')); exit; } elseif ($admin_pwd == '') { header("Location:?act=login&err=" . urlencode('密码不能为空')); exit; } $captcha = get_cache('captcha'); if (empty($postcaptcha) && $captcha['verify_adminlogin'] == '1') { header("Location:?act=login&err=" . urlencode('验证码不能为空')); exit; } if ($captcha['verify_adminlogin'] == '1' && strcasecmp($_SESSION['imageCaptcha_content'], $postcaptcha) != 0) { write_log("<span style=\"color:#FF0000\">验证码填写错误</span>", $admin_name, 2); header("Location:?act=login&err=" . urlencode('验证码填写错误')); exit; } elseif (check_admin($admin_name, $admin_pwd)) { $admininfo = get_admin_one($admin_name); if (!in_array($_CFG['subsite_id'], explode(',', $admininfo['site_purview'])) && $admininfo['purview'] != "all") { write_log("<span style=\"color:#FF0000\">您没有管理权限</span>", $admin_name, 2); header("Location:?act=login&err=" . urlencode('没有管理权限')); exit; } update_admin_info($admin_name); write_log("成功登录", $admin_name); if ($remember == 1) { $admininfo = get_admin_one($admin_name); setcookie('Qishi[admin_id]', $_SESSION['admin_id'], time() + 86400, $QS_cookiepath, $QS_cookiedomain); setcookie('Qishi[admin_name]', $admin_name, time() + 86400, $QS_cookiepath, $QS_cookiedomain); setcookie('Qishi[admin_pwd]', md5($admin_name . $admininfo['pwd'] . $admininfo['pwd_hash'] . $QS_pwdhash), time() + 86400, $QS_cookiepath, $QS_cookiedomain); } } else {
include_once '../lib/php/auth_utils.php'; session_start(); if (isset($DEBUG_ON) && $DEBUG_ON == 1) { ob_start(); print_r($_REQUEST); $debug_msg = ob_get_contents(); ob_end_clean(); error_log($debug_msg); } $server = "127.0.0.1"; $port = "3306"; $base = "domotique"; $user = "******"; $password = "******"; header('Content-Type: text/javascript'); $check = check_admin(); switch ($check) { case 98: break; case 99: echo "console.log('pas habilité');\n"; echo $callback . "([]);"; exit(1); case 0: break; default: echo "console.log('erreur inconnue');\n"; echo $callback . "([]);"; exit(1); } if (!isset($_REQUEST['sensor_id'])) {
<?php include_once '../../lib/common.function.php'; check_admin(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Examples</title> <link href="../css/style.css" rel="stylesheet"> <link href="../css/font-awesome.min.css" rel="stylesheet"> <link href="../css/bootstrap.min.css" media="all" rel="stylesheet"> <link rel="stylesheet" href="../css/bootstrapValidator.css"/> <script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="../js/bootstrap.min.js"></script> <script type="text/javascript" src="../js/bootstrapValidator.js"></script> <script type="text/javascript" src="../ckeditor/ckeditor.js"></script> </head> <body> <div class="col-xs-8"> <form method="post" class="form-horizontal center-block" action="../do.php?f=index_content_add_vector"> <table class="table table-bordered"> <caption><h2>矢量图内容添加</h2></caption> <tbody> <tr> <td>标题</td> <td><textarea class="form-control" name="index-title" placeholder="title"></textarea></td> </tr> <tr> <td>内容</td>
<?php include_once '../lib/configs.php'; include_once '../lib/php/auth_utils.php'; session_start(); if (isset($DEBUG_ON) && $DEBUG_ON == 1) { ob_start(); print_r($_REQUEST); $debug_msg = ob_get_contents(); ob_end_clean(); error_log($debug_msg); } switch (check_admin()) { case 98: error_log("not administrator"); echo json_encode(array('iserror' => true, 'errno' => 98, 'errorMsg' => 'not administrator')); exit(1); break; case 99: error_log("not connected"); echo json_encode(array('iserror' => true, 'errno' => 99, 'errorMsg' => 'not connected')); exit(1); case 0: break; default: error_log("unknown error"); echo json_encode(array('iserror' => true, 'errno' => 100, 'errorMsg' => 'unknown')); exit(1); } if (!isset($_REQUEST['id'])) { echo json_encode(array('iserror' => true, 'errno' => 1, 'errorMsg' => 'id is mandatory'));
function del($id = NULL) { check_admin(); $pro = $this->pro->load_item($id); if (!$pro) { info_page(_text('system_error_id')); die; } $this->pro->del($id); if ($pro['u2_pic']) { @unlink($pro['u2_pic']); } info_page(_text('pro_del_success'), '/riki/plist/' . $pro['u2_cate']); }
?> </div></a></li> <li><a discount="profile" class="profm"><img src="images/profil/menu/profile.png" width="20" height="20" /> Profile</a></li> <li><a><img src="images/profil/menu/settings.png" width="20" height="20" /> Profile</a> <ul> <li><a discount="settings/hotel_detail" class="profm"><img src="images/profil/menu/hotel_detail.png" width="20" height="20" /> Hotel details</a></li> <li><a discount="settings/design" class="profm"><img src="images/profil/menu/template.png" width="20" height="20" /> Profile Template</a> <ul> <li><a discount="settings/dcolors" class="profm"><img src="images/profil/menu/colors.png" width="20" height="20" /> Colors</a></li> <li><a discount="settings/dimages" class="profm"><img src="images/profil/menu/images.png" width="20" height="20" /> Images</a></li> <li><a discount="settings/dadvanced" class="profm"><img src="images/profil/menu/advanced.png" width="20" height="20" /> Advanced</a></li> </ul> </li> <li><a discount="settings/privacy" class="profm"><img src="images/profil/menu/privacy.png" width="20" height="20" /> Privacy Settings</a></li> <?php if (check_admin(2)) { ?> <li><a discount="settings/logs" class="profm"><img src="images/profil/menu/logs.png" width="20" height="20" /> Logs</a></li><?php } ?> </ul> </li> <li><a discount="add_post" class="profm"><img src="images/profil/menu/post.png" width="20" height="20" /> Write Post</a></li> <li><a discount="manage_rooms" class="profm"><img src="images/profil/menu/rooms.png" width="20" height="20" /> Manage rooms</a> <!--<ul> <li><a href="#managerooms/Room1">Room 1</a></li> <li><a href="#managerooms/Room2">Room 2</a> <ul> <li><a href="#managerooms/Room2/Room2.1">Room 2.1</a></li> <li><a href="#managerooms/Room2/Room2.2">Room 2.2</a></li> <li><a href="#managerooms/Room2/Room2.3">Room 2.3</a></li>
} $tr = ""; if ($id) { $tr = "contact{$id}"; } return "<tr id=\"{$tr}\"><td>{$removes}{$lhs}:{$removee}</td> <td>{$rhs}</td></tr>"; } $dbconn = dbauth::connect('directory', null, $_SERVER['REMOTE_USER']) or die("Could not connect: " . pg_last_error()); pg_query($dbconn, "begin"); $personid = isset($_GET['person_id']) ? $_GET['person_id'] : null; // the order by is used to get the non-NULL ones pushed to the top , tho now // there should be only one row $query = "\n\tSELECT p.person_id,\n\t\tcoalesce(p.preferred_first_name, p.first_name) as first_name,\n\t\tcoalesce(p.preferred_last_name, p.last_name) as last_name,\n\t\tcoalesce(pc.nickname, p.nickname) as nickname,\n\t\tpc.position_title,\n\t\tpc.person_company_relation,\n\t\tdate_part('month', p.birth_date) as birth_date_month,\n\t\tdate_part('day', p.birth_date) as birth_date_day,\n\t\tdate_part('epoch', p.birth_date) as birth_date_epoch,\n\t\tpc.hire_date,\n\t\tc.company_name,\n\t\tc.company_id,\n\t\tpi.person_image_id,\n\t\tpc.manager_person_id,\n\t\tcoalesce(mgrp.preferred_first_name, mgrp.first_name) as mgr_first_name,\n\t\tcoalesce(mgrp.preferred_last_name, mgrp.last_name) as mgr_last_name,\n\t\tac.account_collection_id,\n\t\tac.account_collection_name,\n\t\ta.login,\n\t\tnumreports.tally as num_reports,\n\t\tofc.display_label,\n\t\tofc.physical_address_id,\n\t\tofc.building,\n\t\tofc.floor,\n\t\tofc.section,\n\t\tofc.seat_number\n\tFROM v_corp_family_account a\n\t\tINNER JOIN person p using (person_id)\n\t\tINNER JOIN company c using (company_id)\n\t\tINNER JOIN person_company pc using (person_id,company_id)\n\t\tLEFT JOIN ( select ac.*, account_id\n\t\t\t FROM account_collection ac\n\t\t\t\tINNER JOIN account_collection_account\n\t\t\t\tUSING (account_collection_id)\n\t\t\t WHERE account_collection_type = 'department'\n\t\t) ac USING (account_id)\n\t\tLEFT JOIN (\n\t\t select pi.*, piu.person_image_usage\n\t\t from person_image pi\n\t\t\t inner join person_image_usage piu\n\t\t\t\ton pi.person_image_id = piu.person_image_id\n\t\t\t\tand piu.person_image_usage = 'corpdirectory'\n\t\t ) pi USING (person_id)\n\t\tLEFT JOIN (\n\t\t select manager_person_id as person_id, count(*) as tally\n\t\t\t from person_company\n\t\t\t where person_company_status = 'enabled'\n\t\t\t group by manager_person_id\n\t\t) numreports USING (person_id)\n\t\tLEFT JOIN (\n\t\t select pl.person_id,\n\t\t\tpa.physical_address_id,\n\t\t\tpa.display_label,\n\t\t\tpl.building,\n\t\t\tpl.floor,\n\t\t\tpl.section,\n\t\t\tpl.seat_number\n\t\t from person_location pl\n\t\t\tinner join physical_address pa\n\t\t\t USING (physical_address_id)\n\t\t where pl.person_location_type = 'office'\n\t\t order by site_rank\n\t\t) ofc USING (person_id)\n\t\tLEFT JOIN person mgrp\n\t\t on pc.manager_person_id = mgrp.person_id\n\tWHERE p.person_id = \$1 \n\tAND (pc.hire_date is null or pc.hire_date <= now())\n\tAND a.account_role = 'primary'\n\tORDER BY ac.account_collection_name\n;\n"; $result = pg_query_params($dbconn, $query, array($personid)) or die('Query failed: ' . pg_last_error()); $row = pg_fetch_array($result, null, PGSQL_ASSOC) or die("no person"); if ($row['login'] == $_SERVER['REMOTE_USER'] || check_admin($dbconn, $_SERVER['REMOTE_USER'])) { $canedit = 1; } else { $canedit = 0; } $name = $row['first_name'] . " " . $row['last_name']; $title = $row['position_title']; $teamc = " (" . $row['company_name'] . ")"; if (isset($row['mgr_last_name'])) { $manager = $row['mgr_first_name'] . " " . $row['mgr_last_name']; } echo build_header($name); echo browsingMenu($dbconn, null); if (isset($_GET['random']) && $_GET['random'] == 'yes') { echo "<div id=random> <a href=\"./?index=random\"> Another Random Person </a> </div>\n"; }
} else { return 2; } } } /*ends here*/ function logout($Cookie) { $sql = "DELETE FROM AHO_Sess WHERE session = '{$Cookie}' "; $sql_result = mysql_query($sql); $row = mysql_fetch_array($sql_result); setcookie("session_id", "z", time() - 3600); header("location:index.php"); } $Cookie = addslashes($_COOKIE["session_id"]); $Check_Admin = check_admin($Cookie); if ($Check_Admin == '1') { $sql = "SELECT * FROM AHO_Sess WHERE session = '{$Cookie}' "; $sql_result = mysql_query($sql); $row = mysql_fetch_array($sql_result); $User_ID = $row["u_id"]; $sql = "SELECT * FROM AHO_User WHERE id = '{$User_ID}' "; $sql_result = mysql_query($sql); $row = mysql_fetch_array($sql_result); $full = $row["full_account"]; $emailol = $row["Email_1"]; $Branch = $row["B_Code"]; /**starts here*/ $type = $row["Type"]; /*ends here*/ if ($Branch == 0) {
?> <div id="layout"> <a href="" id="menuLink" class="menu-link"> <span></span> </a> <div id='menu'> <div class='pure-menu pure-menu-open'> <a class='pure-menu-heading' align='center' href='main.php'><img src='img/logo.png'></a> <ul> <li><a href='my_projects.php'>Mine projekter</a></li> <li><a href='all_projects.php'>Alle projekter</a></li> <li><a href='history.php'>Min historik</a></li> <li><a href='contact.php'>Kontakt</a></li> <?php if (check_admin($mysqli) == true) { ?> <li> <a href='new_project.php'>Nyt projekt</a></li> <li> <a href ='sql_table_to_pdf/generate-pdf.php'> Print </a></li> <?php } ?> <?php if (check_overadmin($mysqli) == true) { ?> <li> <a href='administrator.php'>Administrator</a></li> <?php } ?> <li><a class='logout' href='includes/logout.php'>Log ud</a></li> </ul>
?> </label> <div class="col-sm-10"> <textarea id="idtextarea" name="post_text" rows="10" style="width:100%" placeholder="<?php echo $lib_manage_blog_81; ?> "><?php if (isset($blog['b_post_text'])) { echo $blog['b_post_text']; } ?> </textarea> </div> </div> <?php if (check_admin()) { ?> <div class="form-group"> <label class="col-sm-2 control-label" for="post_statut"><?php echo $lib_manage_blog_130; ?> </label> <div class="col-sm-10"> <input type="text" class="form-control" name="post_statut" id="post_statut" placeholder="<?php echo $lib_manage_blog_140; ?> " value="<?php if (isset($blog['b_statut'])) { echo $blog['b_statut']; } ?>
function check_status() { global $page, $webimroot, $settings, $dbversion; $page['done'][] = getlocal2("install.0.php", array(phpversion())); if (!check_webimroot()) { return; } if (!check_files()) { return; } $link = check_connection(); if (!$link) { return; } if (!check_database($link)) { mysql_close($link); return; } if (!check_tables($link)) { mysql_close($link); return; } if (!check_columns($link)) { mysql_close($link); return; } check_sound(); $page['done'][] = getlocal("installed.message"); if (!check_admin($link)) { $page['nextstep'] = getlocal("installed.login_link"); $page['nextnotice'] = getlocal2("installed.notice", array("{$webimroot}/install/")); $page['nextstepurl'] = "{$webimroot}/operator/login.php?login=admin"; } $page['show_small_login'] = true; mysql_close($link); loadsettings(); $settings['dbversion'] = $dbversion; update_settings(); }
function get_admin_oauth($username_user, $password_user, $device) { if (isset($username_user) && isset($password_user) && isset($device)) { $secret = check_admin($username_user); if ($secret != 'false') { $device = json_encode($device); $profile_id = get_profile_id($username_user, $password_user); $oauth_key = check_oauth($profile_id, $device); $status = "failure"; //$device_name = 'device_'.uniqid(rand(), true); include 'sql.php'; if ($profile_id != null && $oauth_key == null) { /* * generate and write the oauth key to db */ $token = md5(uniqid(rand(), true)); $date = date_create(); date_timestamp_set($date, time() + 2 * 24 * 60 * 60); $dtm = date_format($date, "Y-m-d H:i:s"); $sql = "insert into " . $dbname . ".oauth(oauth_key,oauth_expiry,device,profile_id) value ('{$token}','{$dtm}','{$device}',{$profile_id})"; $result = $conn->query($sql); $oauth_key = $token; header($_SERVER["SERVER_PROTOCOL"] . " " . $GLOBALS['status_found']); header('Oauth: ' . $oauth_key); $res = get_userdata($profile_id); $result_array = array('status' => 'Success', 'message' => 'User found', 'number_of_devices_logged_in' => get_users_logged_in($profile_id), 'secret_key' => $secret, 'user_data' => $res); // /* // * write to logs // */ // date_default_timezone_set('Asia/Calcutta'); // $date = date_create(); // date_timestamp_set($date, time()); // $dtm = date_format($date, "Y-m-d H:i:s"); // //echo $dtm; // //exit; // $sql = "insert into " . $dbname . ".logs(profile_id,state,mytime,oauth_key,device) value ($profile_id,'login','$dtm','$oauth_key','$device')"; // $result = $conn->query($sql); $conn->close(); } else { if ($oauth_key != null) { $res = get_userdata($profile_id); header($_SERVER["SERVER_PROTOCOL"] . " " . $GLOBALS['status_found']); header('oauth: ' . $oauth_key); $status = "Sucess"; $result_array = array('status' => 'Success', 'message' => 'User found', 'number_of_devices_logged_in' => get_users_logged_in($profile_id), 'secret_key' => $secret, 'user_data' => $res); /* * write to logs */ date_default_timezone_set('Asia/Calcutta'); $date = date_create(); date_timestamp_set($date, time()); $dtm = date_format($date, "Y-m-d H:i:s"); $sql = "insert into " . $dbname . ".logs(profile_id,state,mytime,oauth_key,device) value ({$profile_id},'login','{$dtm}','{$oauth_key}','{$device}')"; $result = $conn->query($sql); } else { header($_SERVER["SERVER_PROTOCOL"] . " " . $GLOBALS['status_notfound']); // header('oauth: ' . $oauth_key); $result_array = array('status' => 'Failure', 'message' => 'User not found'); } } print_r(json_encode($result_array)); } else { header($_SERVER["SERVER_PROTOCOL"] . " " . $GLOBALS['status_notfound']); $result_array = array('status' => 'Failure', 'message' => 'Admin access denied'); } } }
<?php include_once '../lib/configs.php'; include_once '../lib/php/auth_utils.php'; session_start(); if (isset($_SESSION['language'])) { $LANG = $_SESSION['language']; } include_once '../lib/php/translation.php'; include_once '../lib/php/' . $LANG . '/translation.php'; mea_loadTranslationData($LANG, '../'); $isadmin = check_admin(); if ($isadmin != 0 && $isadmin != 98) { ?> <script> window.location = "login.php"; </script> <?php exit(1); } ?> <script type="text/javascript" src="controllers/capteurs-actionneurs-ctrl.js"></script> <script> function select_error() { alert("Accès aux données impossible"); } function strTypeOfType_sa(group)
<?php require_once "../config/saemysql.class.php"; require_once "../function/admin/common-function.php"; require_once "../common/admin/common-head.php"; if (false == check_admin()) { ?> <script type="text/javascript"> window.location.href="./login.php"; </script> <?php exit(0); } $tag = "koastal"; ?> <div class="container menu"> <div class="navbar"> <div class="navbar-inner"> <ul class="nav"> <li class="active"><a href="index.php">答题情况</a></li> <li class="active"><a href="../function/admin/compute-score.php">计算考生分数</a></li> <li class=""><a href="index.php?id=111">设置考试时间</a></li> <li class="dropdown"> <a class="dropdown-toggle" id="drop1" role="button" data-toggle="dropdown" href="#">考生管理<b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="drop1"> <li role="presentation"><a role="menuitem" tabindex="-1" href="index.php?id=3">查看考生</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="index.php?id=2">添加考生</a></li> </ul> </li>
<?php header('Location: ../admin_panel.php'); require_once "util.php"; if (!check_admin()) { die('You can access only as admin!'); } try { $con = connect() or die("db connection error"); $username = $_POST['username']; $days = intval($_POST['days']); $until = time() + $days * 24 * 60 * 60; $until = date('Y-m-d H:i:s', $until); $result = mysqli_query($con, "UPDATE users SET blocked_until = '{$until}' where username='******'"); // where username='******'") or die('query err1'); mysqli_close($con); } catch (Exception $e) { die('err'); }
function del($id = NULL) { check_admin(); $id = intval($id); if (!$id) { info_page('错误的组件Id'); } $data['finfo'] = $this->form->get_form_info_by_id($id); if (!$data['finfo']) { info_page('错误: 无此组件.'); } $folder = $data['finfo']['name']; $path = 'application/app/' . $folder . '/'; $this->form->del_form_by_id($id); $this->item->del_item_by_fid($id); if (v('unlink')) { deldir($path); } info_page('成功删除组件', '/design', '返回组件列表'); }