本文整理汇总了PHP中alertBox函数的典型用法代码示例。如果您正苦于以下问题:PHP alertBox函数的具体用法?PHP alertBox怎么用?PHP alertBox使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了alertBox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: alertBox
$edate = $mysqli->real_escape_string($_POST["edate"]);
$eamount = $mysqli->real_escape_string(clean($_POST["eamount"]));
if ($ename == '' or $eamount == '') {
$msgBox = alertBox($MessageEmpty);
} else {
if ($eamount < 0) {
$msgBoxExpense = alertBox($NegativeAmount);
} else {
//add new expense
$sql = "INSERT INTO bills (UserId, Title, Dates, CategoryId, AccountId, Amount, Description) VALUES (?,?,?,?,?,?,?)";
if ($statement = $mysqli->prepare($sql)) {
//bind parameters for markers, where (s = string, i = integer, d = double, b = blob)
$statement->bind_param('issiiss', $euser, $ename, $edate, $ecategory, $eaccount, $eamount, $edescription);
$statement->execute();
}
$msgBoxExpense = alertBox($SaveMsgExpense);
}
}
}
?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header"><?php
echo $Transaction;
?>
</h1>
</div>
示例2: alertBox
$paypalEmail = $mysqli->real_escape_string($_POST['paypalEmail']);
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\t\t\t\tsitesettings\n\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\tenablePayments = ?,\n\t\t\t\t\t\t\t\t\t\tpaymentCurrency = ?,\n\t\t\t\t\t\t\t\t\t\tpaymentCompleteMsg = ?,\n\t\t\t\t\t\t\t\t\t\tpaypalEmail = ?,\n\t\t\t\t\t\t\t\t\t\tpaypalItemName = ?,\n\t\t\t\t\t\t\t\t\t\tpaypalFee = ?\n\t\t\t\t");
$stmt->bind_param('ssssss', $enablePayments, $paymentCurrency, $paymentCompleteMsg, $paypalEmail, $paypalItemName, $paypalFee);
$stmt->execute();
$msgBox = alertBox($paymentSettingsSavedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
}
}
}
}
} else {
$stmt = $mysqli->prepare("UPDATE sitesettings SET enablePayments = ? ");
$stmt->bind_param('s', $enablePayments);
$stmt->execute();
$msgBox = alertBox($paymentSettingsSavedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
}
// Get Data
$sqlStmt = "SELECT\n\t\t\t\t\tinstallUrl,\n\t\t\t\t\tlocalization,\n\t\t\t\t\tsiteName,\n\t\t\t\t\tbusinessName,\n\t\t\t\t\tbusinessAddress,\n\t\t\t\t\tbusinessEmail,\n\t\t\t\t\tbusinessPhone,\n\t\t\t\t\tuploadPath,\n\t\t\t\t\ttemplatesPath,\n\t\t\t\t\tfileTypesAllowed,\n\t\t\t\t\tavatarFolder,\n\t\t\t\t\tavatarTypes,\n\t\t\t\t\tallowRegistrations,\n\t\t\t\t\tenablePayments,\n\t\t\t\t\tpaymentCurrency,\n\t\t\t\t\tpaymentCompleteMsg,\n\t\t\t\t\tpaypalEmail,\n\t\t\t\t\tpaypalItemName,\n\t\t\t\t\tpaypalFee\n\t\t\t\tFROM\n\t\t\t\t\tsitesettings";
$res = mysqli_query($mysqli, $sqlStmt) or die('-1' . mysqli_error());
$row = mysqli_fetch_assoc($res);
if ($row['localization'] == 'ar') {
$ar = 'selected';
} else {
$ar = '';
}
if ($row['localization'] == 'bg') {
$bg = 'selected';
} else {
示例3: alertBox
$statement->execute();
}
$msgBox = alertBox($UpdateMsgCategory);
}
// add new category
if (isset($_POST['submit'])) {
$category = $mysqli->real_escape_string($_POST["category"]);
$level = 2;
//add new category
$sql = "INSERT INTO category (UserId, CategoryName, Level) VALUES (?,?,?)";
if ($statement = $mysqli->prepare($sql)) {
//bind parameters for markers, where (s = string, i = integer, d = double, b = blob)
$statement->bind_param('isi', $UserId, $category, $level);
$statement->execute();
}
$msgBox = alertBox($SaveMsgCategory);
}
//Get list category
$GetList = "SELECT CategoryId, CategoryName FROM category WHERE Level = 2 AND UserId = {$UserId} ORDER BY CategoryName ASC";
$GetListCategory = mysqli_query($mysqli, $GetList);
// Search category
if (isset($_POST['searchbtn'])) {
$SearchTerm = $_POST['search'];
$GetList = "SELECT CategoryId, CategoryName FROM category WHERE Level = 2 AND UserId = {$UserId} AND CategoryName\n\t\t\t\tlike '%{$SearchTerm}%' ORDER BY CategoryName ASC";
$GetListCategory = mysqli_query($mysqli, $GetList);
}
//Include Global page
include 'includes/global.php';
?>
<div id="page-wrapper">
示例4: alertBox
if ($_POST['lastName'] == '') {
$msgBox = alertBox($yourLastNameReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
$userEmail = htmlspecialchars($_POST['userEmail']);
$firstName = htmlspecialchars($_POST['firstName']);
$lastName = htmlspecialchars($_POST['lastName']);
$receiveEmails = htmlspecialchars($_POST['recEmails']);
$stmt = $mysqli->prepare("UPDATE\r\n\t\t\t\t\t\t\t\t\t\tusers\r\n\t\t\t\t\t\t\t\t\tSET\r\n\t\t\t\t\t\t\t\t\t\tuserEmail = ?,\r\n\t\t\t\t\t\t\t\t\t\tfirstName = ?,\r\n\t\t\t\t\t\t\t\t\t\tlastName = ?,\r\n\t\t\t\t\t\t\t\t\t\trecEmails = ?,\r\n\t\t\t\t\t\t\t\t\t\tlastUpdated = ?\r\n\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\tuserId = ?");
$stmt->bind_param('ssssss', $userEmail, $firstName, $lastName, $receiveEmails, $todayDt, $pw_userId);
$stmt->execute();
$stmt->close();
// Add Recent Activity
$activityType = '9';
$activityTitle = $myProfUpdAct;
updateActivity($pw_userId, $activityType, $activityTitle);
$msgBox = alertBox($myProfUpdMsg, "<i class='fa fa-check-square'></i>", "success");
}
}
}
}
// Get Data
$sql = "SELECT * FROM users WHERE userId = " . $pw_userId;
$res = mysqli_query($mysqli, $sql) or die('-1' . mysqli_error());
$row = mysqli_fetch_assoc($res);
if (!empty($row['firstName']) && $row['firstName'] != '') {
$firstName = clean($row['firstName']);
} else {
$firstName = '';
}
if (!empty($row['lastName']) && $row['lastName'] != '') {
$lastName = clean($row['lastName']);
示例5: alertBox
$subject = $newPMEmailSubject . ' ' . $clientFullName;
$message = '<html><body>';
$message .= '<h3>' . $subject . '</h3>';
$message .= '<p>' . $messageText . '</p>';
$message .= '<hr>';
$message .= $emailLink;
$message .= $emailThankYou;
$message .= '</body></html>';
$headers = "From: " . $siteName . " <" . $businessEmail . ">\r\n";
$headers .= "Reply-To: " . $businessEmail . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if (mail($theEmail, $subject, $message, $headers)) {
$msgBox = alertBox($newPMSentConf, "<i class='fa fa-check-square'></i>", "success");
} else {
$msgBox = alertBox($emailErrorMsg, "<i class='fa fa-times-circle'></i>", "danger");
}
// Clear the Form of values
$_POST['messageTitle'] = $_POST['messageText'] = '';
$stmt->close();
}
}
}
// Include Pagination Class
include 'includes/pagination.php';
// Create new object & pass in the number of pages and an identifier
$pages = new paginator($pagPages, 'p');
// Get the number of total records
$rows = $mysqli->query("\n\t\tSELECT\n\t\t\t*\n\t\tFROM\n\t\t\tprivatemessages\n\t\t\tLEFT JOIN clients ON privatemessages.clientId = clients.clientId\n\t\t\tLEFT JOIN admins ON privatemessages.adminId = admins.adminId\n\t\tWHERE\n\t\t\tprivatemessages.toClientId = " . $clientId . " AND\n\t\t\tprivatemessages.toDeleted = 0 AND\n\t\t\tprivatemessages.toArchived = 1\n\t");
$total = mysqli_num_rows($rows);
// Pass the number of total records
示例6: date
}
// Clock a Manager Out
if (isset($_POST['submit']) && $_POST['submit'] == 'stopClock') {
$clockId = $mysqli->real_escape_string($_POST['clockId']);
$entryId = $mysqli->real_escape_string($_POST['entryId']);
$endTime = date("Y-m-d H:i:s");
// Stop Clock - Update the timeclock Record
$sqlstmt = $mysqli->prepare("\n\t\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\t\ttimeclock\n\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\trunning = 0\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\tclockId = ?\n\t\t");
$sqlstmt->bind_param('s', $clockId);
$sqlstmt->execute();
$sqlstmt->close();
// Stop Clock - Update the time entry
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\t\t\ttimeentry\n\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\tendTime = ?\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\tentryId = ?\n\t\t");
$stmt->bind_param('ss', $endTime, $entryId);
$stmt->execute();
$msgBox = alertBox($mngrClockedOutMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
// Get a list of all the Years
$a = "SELECT clockYear FROM timeclock GROUP BY clockYear";
$b = mysqli_query($mysqli, $a) or die('-1' . mysqli_error());
$yrs = array();
// Set each Year in an array
while ($year = mysqli_fetch_assoc($b)) {
$yrs[] = $year['clockYear'];
}
// Get a list of all the Managers
$c = "SELECT adminId FROM admins WHERE isActive = 1";
$d = mysqli_query($mysqli, $c) or die('-2' . mysqli_error());
// Set each Manager in an array
$mgrs = array();
示例7: alertBox
} else {
if ($_POST['password_r'] == '') {
$msgBox = alertBox($retypeAccountPass, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password'] != $_POST['password_r']) {
$msgBox = alertBox($accountPassNotMatch, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if (isset($_POST['password']) && $_POST['password'] != "") {
$password = encryptIt($_POST['password']);
} else {
$password = $_POST['passwordOld'];
}
$stmt = $mysqli->prepare("UPDATE\n\t\t\t\t\t\t\t\t\t\tclients\n\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\tpassword = ?\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\tclientId = ?");
$stmt->bind_param('ss', $password, $clientId);
$stmt->execute();
$msgBox = alertBox($accountPassUpdatedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
}
}
}
}
}
// Get Data
$query = "SELECT\n\t\t\t\tclientId,\n\t\t\t\tclientEmail,\n\t\t\t\tpassword,\n\t\t\t\tclientFirstName,\n\t\t\t\tclientLastName,\n\t\t\t\tCONCAT(clientFirstName,' ',clientLastName) AS clientName,\n\t\t\t\tclientCompany,\n\t\t\t\tclientBio,\n\t\t\t\tclientAddress,\n\t\t\t\tclientPhone,\n\t\t\t\tclientCell,\n\t\t\t\tclientAvatar,\n\t\t\t\tDATE_FORMAT(lastVisited,'%M %e, %Y at %l:%i %p') AS lastVisited,\n\t\t\t\tDATE_FORMAT(createDate,'%M %d, %Y') AS createDate\n\t\t\tFROM\n\t\t\t\tclients\n\t\t\tWHERE clientId = " . $clientId;
$res = mysqli_query($mysqli, $query) or die('-2' . mysqli_error());
$row = mysqli_fetch_assoc($res);
// Decrypt data
if ($row['clientAddress'] != '') {
$clientAddress = decryptIt($row['clientAddress']);
} else {
示例8: rmdir
}
if ($isFiles != 'true') {
// Delete the DB Record
$stmt = $mysqli->prepare("DELETE FROM projectfolders WHERE folderId = ?");
$stmt->bind_param('s', $deleteId);
$stmt->execute();
// Delete the Folder on the host
if (is_dir($uploadsDir . $folderUrl)) {
rmdir($uploadsDir . $folderUrl);
$msgBox = alertBox("The Project Folder has been Deleted.", "<i class='fa fa-check-square'></i>", "success");
} else {
$msgBox = alertBox($deleteFolderErrorMsg, "<i class='fa fa-times-circle'></i>", "danger");
}
$stmt->close();
} else {
$msgBox = alertBox($foldNotEmptyMsg, "<i class='fa fa-times-circle'></i>", "danger");
}
}
// Include Pagination Class
include 'includes/getpagination.php';
$pages = new paginator($pagPages, 'p');
// Get the number of total records
$rows = $mysqli->query("SELECT * FROM projectfolders WHERE projectId = " . $projectId);
$total = mysqli_num_rows($rows);
// Pass the number of total records
$pages->set_total($total);
// Get Folder Data
$sql = "SELECT\n\t\t\t\tprojectfolders.folderId,\n\t\t\t\tprojectfolders.projectId,\n\t\t\t\tprojectfolders.adminId,\n\t\t\t\tprojectfolders.clientId,\n\t\t\t\tprojectfolders.folderTitle,\n\t\t\t\tprojectfolders.folderDesc,\n\t\t\t\tprojectfolders.folderUrl,\n\t\t\t\tDATE_FORMAT(projectfolders.folderDate,'%M %d, %Y') AS folderDate,\n\t\t\t\tUNIX_TIMESTAMP(projectfolders.folderDate) AS orderDate,\n\t\t\t\tCONCAT(clients.clientFirstName,' ',clients.clientLastName) AS theClient,\n\t\t\t\tCONCAT(admins.adminFirstName,' ',admins.adminLastName) AS theAdmin\n\t\t\tFROM\n\t\t\t\tprojectfolders\n\t\t\t\tLEFT JOIN clients ON projectfolders.clientId = clients.clientId\n\t\t\t\tLEFT JOIN admins ON projectfolders.adminId = admins.adminId\n\t\t\tWHERE\n\t\t\t\tprojectfolders.projectId = " . $projectId . "\n\t\t\tORDER BY orderDate " . $pages->get_limit();
$res = mysqli_query($mysqli, $sql) or die('-1' . mysqli_error());
$query = "SELECT clientId, projectName FROM clientprojects WHERE projectId = " . $projectId;
$result = mysqli_query($mysqli, $query) or die('-2' . mysqli_error());
示例9: alertBox
<?php
$pagPages = '10';
// Delete Manager Account
if (isset($_POST['submit']) && $_POST['submit'] == 'deleteAdmin') {
$adminId = $mysqli->real_escape_string($_POST['adminId']);
$stmt = $mysqli->prepare("DELETE FROM admins WHERE adminId = ?");
$stmt->bind_param('s', $adminId);
$stmt->execute();
$stmt->close();
$msgBox = alertBox($managerDeletedMsg, "<i class='fa fa-check-square'></i>", "success");
}
// Include Pagination Class
include 'includes/pagination.php';
// Create new object & pass in the number of pages and an identifier
$pages = new paginator($pagPages, 'p');
// Get the number of total records
$rows = $mysqli->query("SELECT * FROM clients WHERE isActive = 1");
$total = mysqli_num_rows($rows);
// Pass the number of total records
$pages->set_total($total);
// Get Data
$query = "SELECT\n\t\t\t\tadminId,\n\t\t\t\tadminEmail,\n\t\t\t\tCONCAT(adminFirstName,' ',adminLastName) AS theAdmin,\n\t\t\t\tadminPhone,\n\t\t\t\tisAdmin,\n\t\t\t\tadminRole,\n\t\t\t\tisArchived,\n\t\t\t\tDATE_FORMAT(archiveDate,'%M %e, %Y') AS archiveDate\n\t\t\tFROM\n\t\t\t\tadmins\n\t\t\tWHERE\n\t\t\t\tisActive = 0 AND\n\t\t\t\tisAdmin = 0\n\t\t\tORDER BY\n\t\t\t\tadminId " . $pages->get_limit();
$res = mysqli_query($mysqli, $query) or die('-1' . mysqli_error());
include 'includes/navigation.php';
if ($isAdmin != '1') {
?>
<div class="content">
<h3><?php
echo $accessErrorHeader;
?>
示例10: alertBox
$message .= '<p>' . $resetPassEmail2 . '</p>';
$message .= '<p>' . $resetPassEmail3 . '</p>';
$message .= '<p>' . $emailThankYou . '</p>';
$message .= '</body></html>';
$headers = "From: " . $siteName . " <" . $businessEmail . ">\r\n";
$headers .= "Reply-To: " . $businessEmail . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if (mail($theEmail, $subject, $message, $headers)) {
$msgBox = alertBox($passwordResetMsg, "<i class='fa fa-check-square-o'></i>", "success");
$isReset = 'true';
$stmt->close();
}
} else {
// No account found
$msgBox = alertBox($noAccountFoundMsg, "<i class='fa fa-warning'></i>", "warning");
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php
echo $set['siteName'];
?>
· <?php
示例11: encodeIt
$entryUsername = null;
}
if ($_POST['entryUrl'] != '') {
$entryUrl = encodeIt($_POST['entryUrl']);
} else {
$entryUrl = null;
}
$stmt = $mysqli->prepare("UPDATE\n\t\t\t\t\t\t\t\t\t\tentries\n\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\tcatId = ?,\n\t\t\t\t\t\t\t\t\t\tentryTitle = ?,\n\t\t\t\t\t\t\t\t\t\tentryDesc = ?,\n\t\t\t\t\t\t\t\t\t\tentryUsername = ?,\n\t\t\t\t\t\t\t\t\t\tentryUrl = ?,\n\t\t\t\t\t\t\t\t\t\tentryNotes = ?,\n\t\t\t\t\t\t\t\t\t\tlastUpdated = ?\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\tentryId = ?");
$stmt->bind_param('ssssssss', $catId, $entryTitle, $entryDesc, $entryUsername, $entryUrl, $entryNotes, $todayDt, $entryId);
$stmt->execute();
$stmt->close();
// Add Recent Activity
$activityType = '8';
$activityTitle = $theEntryText . ' "' . $entryTitleOld . '" ' . $wasUpdatedText;
updateActivity($pw_userId, $activityType, $activityTitle);
$msgBox = alertBox($theEntryText . " \"" . $entryTitleOld . "\" " . $theCatUpdMsg2, "<i class='fa fa-check-square'></i>", "success");
}
}
}
// Get Entry Data
$sql = "SELECT\n\t\t\t\tentries.*,\n\t\t\t\tcategories.catId,\n\t\t\t\tcategories.catTitle,\n\t\t\t\tCONCAT(users.firstName,' ',users.lastName) AS entOwner\n\t\t\tFROM\n\t\t\t\tentries\n\t\t\t\tLEFT JOIN categories ON entries.catId = categories.catId\n\t\t\t\tLEFT JOIN users ON entries.userId = users.userId\n\t\t\tWHERE entries.entryId = " . $entryId;
$res = mysqli_query($mysqli, $sql) or die('-1' . mysqli_error());
$row = mysqli_fetch_assoc($res);
if (!empty($row['entryUsername']) && $row['entryUsername'] != '') {
$entryUsername = '<span class="usrname">' . decodeIt($row['entryUsername']) . '<span>';
$entryUser = decodeIt($row['entryUsername']);
} else {
$entryUsername = $entryUser = '';
}
if (!empty($row['entryNotes']) && $row['entryNotes'] != '') {
$entryNotes = decodeIt($row['entryNotes']);
示例12: alertBox
$msgBox = alertBox($catTitleReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['catDesc'] == '') {
$msgBox = alertBox($catDescReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
$catTitle = htmlspecialchars($_POST['catTitle']);
$catDesc = htmlspecialchars($_POST['catDesc']);
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\t\tcategories(\n\t\t\t\t\t\t\t\t\t\tuserId,\n\t\t\t\t\t\t\t\t\t\tcatTitle,\n\t\t\t\t\t\t\t\t\t\tcatDesc,\n\t\t\t\t\t\t\t\t\t\tcatDate,\n\t\t\t\t\t\t\t\t\t\tipAddress\n\t\t\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t)\n\t\t\t");
$stmt->bind_param('sssss', $pw_userId, $catTitle, $catDesc, $todayDt, $actIp);
$stmt->execute();
$stmt->close();
// Add Recent Activity
$activityType = '7';
$activityTitle = $newCatNavLink . ' "' . $catTitle . ' ' . $createdText;
updateActivity($pw_userId, $activityType, $activityTitle);
$msgBox = alertBox($newcatMsg1 . " " . $catTitle . " " . $newcatMsg2, "<i class='fa fa-check-square'></i>", "success");
// Clear the Form of values
$_POST['catTitle'] = $_POST['catDesc'] = '';
}
}
}
$catsPage = 'true';
$pageTitle = $newCatNavLink;
include 'includes/header.php';
?>
<h3 class="mb-20">Create a <?php
echo $pageTitle;
?>
</h3>
<?php
if ($msgBox) {
示例13: alertBox
$stmt->close();
} else {
$msgBox = alertBox($mngrStatusError1, "<i class='fa fa-warning'></i>", "warning");
}
} else {
$msgBox = alertBox($mngrStatusError2, "<i class='fa fa-warning'></i>", "warning");
}
}
// Update Manager Type
if (isset($_POST['submit']) && $_POST['submit'] == 'managerType') {
$superuser = $mysqli->real_escape_string($_POST['superuser']);
$adminRole = $mysqli->real_escape_string($_POST['adminRole']);
$stmt = $mysqli->prepare("UPDATE\n\t\t\t\t\t\t\t\t\tadmins\n\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\tisAdmin = ?,\n\t\t\t\t\t\t\t\t\tadminRole = ?\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\tadminId = ?");
$stmt->bind_param('sss', $superuser, $adminRole, $aId);
$stmt->execute();
$msgBox = alertBox($mngrTypeUpdatedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
// Get Data
$query = "SELECT\n\t\t\t\tadminId,\n\t\t\t\tadminEmail,\n\t\t\t\tpassword,\n\t\t\t\tadminFirstName,\n\t\t\t\tadminLastName,\n\t\t\t\tCONCAT(adminFirstName,' ',adminLastName) AS theAdmin,\n\t\t\t\tadminBio,\n\t\t\t\tadminAddress,\n\t\t\t\tadminPhone,\n\t\t\t\tadminCell,\n\t\t\t\tadminAvatar,\n\t\t\t\tadminNotes,\n\t\t\t\tDATE_FORMAT(lastVisited,'%M %e, %Y at %l:%i %p') AS lastVisited,\n\t\t\t\tDATE_FORMAT(createDate,'%M %d, %Y') AS createDate,\n\t\t\t\tisAdmin,\n\t\t\t\tadminRole,\n\t\t\t\tisActive,\n\t\t\t\tisArchived,\n\t\t\t\tDATE_FORMAT(archiveDate,'%M %d, %Y') AS archiveDate\n\t\t\tFROM\n\t\t\t\tadmins\n\t\t\tWHERE adminId = " . $aId;
$res = mysqli_query($mysqli, $query) or die('-1' . mysqli_error());
$row = mysqli_fetch_assoc($res);
// Decrypt data
if ($row['adminAddress'] != '') {
$adminAddress = decryptIt($row['adminAddress']);
} else {
$adminAddress = '';
}
if ($row['adminPhone'] != '') {
$adminPhone = decryptIt($row['adminPhone']);
} else {
示例14: alertBox
$msgBox = alertBox("Please enter a valid email for the Primary Admin. Email addresses are used as your account login.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password'] == '') {
$msgBox = alertBox("Please enter a password for the Primary Admin's Account.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['r-password'] == '') {
$msgBox = alertBox("Please re-enter the password for the Primary Admin's Account.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password'] != $_POST['r-password']) {
$msgBox = alertBox("The password for the Primary Admin's Account does not match.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['adminFirstName'] == '') {
$msgBox = alertBox("Please enter the Primary Admin's First Name.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['adminLastName'] == '') {
$msgBox = alertBox("Please enter the Primary Admin's Last Name.", "<i class='fa fa-times-circle'></i>", "danger");
} else {
$installUrl = $mysqli->real_escape_string($_POST['installUrl']);
$siteName = $mysqli->real_escape_string($_POST['siteName']);
$businessName = $mysqli->real_escape_string($_POST['businessName']);
$businessAddress = $_POST['businessAddress'];
$businessEmail = $mysqli->real_escape_string($_POST['businessEmail']);
$businessPhone = $mysqli->real_escape_string($_POST['businessPhone']);
$uploadPath = $mysqli->real_escape_string($_POST['uploadPath']);
$templatesPath = $mysqli->real_escape_string($_POST['templatesPath']);
$fileTypesAllowed = $mysqli->real_escape_string($_POST['fileTypesAllowed']);
$avatarFolder = $mysqli->real_escape_string($_POST['avatarFolder']);
$avatarTypes = $mysqli->real_escape_string($_POST['avatarTypes']);
// Add data to the siteSettings Table
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\t\t\tsitesettings(\n\t\t\t\t\t\t\t\t\t\t\tinstallUrl,\n\t\t\t\t\t\t\t\t\t\t\tsiteName,\n\t\t\t\t\t\t\t\t\t\t\tbusinessName,\n\t\t\t\t\t\t\t\t\t\t\tbusinessAddress,\n\t\t\t\t\t\t\t\t\t\t\tbusinessEmail,\n\t\t\t\t\t\t\t\t\t\t\tbusinessPhone,\n\t\t\t\t\t\t\t\t\t\t\tuploadPath,\n\t\t\t\t\t\t\t\t\t\t\ttemplatesPath,\n\t\t\t\t\t\t\t\t\t\t\tfileTypesAllowed,\n\t\t\t\t\t\t\t\t\t\t\tavatarFolder,\n\t\t\t\t\t\t\t\t\t\t\tavatarTypes\n\t\t\t\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t)");
$stmt->bind_param('sssssssssss', $installUrl, $siteName, $businessName, $businessAddress, $businessEmail, $businessPhone, $uploadPath, $templatesPath, $fileTypesAllowed, $avatarFolder, $avatarTypes);
示例15: alertBox
<?php
require_once './session_login.inc.php';
function alertBox($alerttext)
{
echo '<script type="text/javascript">alert("' . $alerttext . '");window.history.back();</script>';
}
$class = $_REQUEST['class'];
if (empty($class)) {
alertBox("Error!!!:Please check value of class in URL");
} else {
if (!($class == "1" || $class == "2" || $class == "3" || $class == "4" || $class == "wifi")) {
alertBox("Error!!!:Please check value of class in URL");
}
}
$servername = "localhost";
$username = "root";
$password = "qwerty";
$dbname = "dhcp";
$con = mysql_connect($servername, $username, $password) or die(mysql_error("Error connect"));
mysql_select_db($dbname) or die(mysql_error("Error database"));
$query_all_data = 'SELECT * FROM `class' . $class . '`';
$all_data = mysql_query($query_all_data);
$query_range = 'SELECT * FROM `class_range` WHERE `class` = ' . $class;
$range = mysql_query($query_range);
while ($ip_range = mysql_fetch_array($range)) {
$ip_start = $ip_range["ip_start"];
$ip_end = $ip_range["ip_end"];
}
?>
<!DOCTYPE html>