} if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "delete") { require_once "../../../controller/UserController.php"; require_once "../utils/user_util.php"; $id = $_REQUEST["userId"]; $result = UserController::Delete($id); if ($result) { echo UserUtil::createMessageBox("Delete completed!"); } else { echo UserUtil::createMessageBox("Delete does not complete!"); } } if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "search") { require_once "../../../controller/UserController.php"; require_once "../utils/user_util.php"; $name = $_REQUEST["name"]; $mail = $_REQUEST["email"]; $strSQL = "select * from user where 1=1 "; if (strlen($name) > 0) { $strSQL .= " and Name LIKE '%{$name}%' "; } if (strlen($mail)) { $strSQL .= " and Email LIKE '%{$mail}%' "; } $result = UserController::getAllBySql($strSQL); if ($result) { echo UserUtil::createSearchResult($result); } else { echo UserUtil::createSearchResult($result); } }