コード例 #1
0
ファイル: doAdminAction.php プロジェクト: hiden2/shopImooc-1
<?php

require_once '../include.php';
$act = $_REQUEST['act'];
@($id = $_REQUEST['id']);
if ($act == "logout") {
    $mes = logout();
} elseif ($act == "addAdmin") {
    $mes = addAdmin();
} elseif ($act == "editAdmin") {
    $mes = editAdmin($id);
} elseif ($act == "delAdmin") {
    $mes = delAdmin($id);
} elseif ($act == "addCate") {
    $mes = addCate();
} elseif ($act == "delCate") {
    $mes = delCate($id);
} elseif ($act == "editCate") {
    $mes = editCate($id);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<?php 
if ($mes) {
コード例 #2
0
ファイル: doAdminAction.php プロジェクト: kevins1022/shop
<?php

/**
 * Created by PhpStorm.
 * User: ning-pc
 * Date: 15/8/16
 * Time: 下午3:18
 */
require_once '../include.php';
$act = $_REQUEST['act'];
$id = $_REQUEST['id'];
if ($act == 'logout') {
    logout();
} elseif ($act == 'addAdmin') {
    $msg = addAdmin();
} elseif ($act == 'editAdmin') {
    $msg = editAdmin($id);
} elseif ($act == 'delAdmin') {
    $msg = delAdmin($id);
}
?>
<h1><?php 
echo $msg;
?>
</h1>
コード例 #3
0
ファイル: doAdminAction.php プロジェクト: SunDoge/shopImooc
/*
if($act == "logout"){
	logout();
}elseif ($act == "addAdmin") {
	$mes = addAdmin();
}
*/
switch ($act) {
    case 'logout':
        logout();
        break;
    case 'addAdmin':
        $mes = addAdmin();
        break;
    case 'editAdmin':
        $mes = editAdmin($_REQUEST['id']);
        break;
    case 'delAdmin':
        $mes = delAdmin($_REQUEST['id']);
        break;
}
?>

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<?php 
if ($mes) {