if ($act == 'email-template') { $email = $db->clearText($_POST['email']); $message_content = $db->clearText($_POST['content']); $subject = $db->clearText($_POST['subject']); $date = date('Y-m-d'); $id = $_POST['id']; $db->runQuery("UPDATE " . EMAILTEMP . " SET subject = '" . $subject . "', email = '" . $email . "', content = '" . $message_content . "',dateModify = '" . $date . "', status = '" . $_POST['status'] . "' WHERE id = '" . $id . "'"); echo "<script>window.location='{$_SERVER['HTTP_REFERER']}'</script>"; die; } if ($act == 'user-status') { $load->model('site_function'); $paassword = substr(number_format(time() * rand(), 0, '', ''), 0, 4); $data = array('status' => $_POST['userStatus'], 'dateApprove' => date('y-m-d'), 'password' => md5($password)); if ($db->update(USERS, $data, "userId = '{$_POST['id']}' ")) { if ($db->getNumRow(ADDRESS, 'id', "userId = '" . $_POST['id'] . "' ") == '1' && $_POST['userStatus'] == 'active') { $db->update(ADDRESS, array(status => 'active'), "userId = '{$_POST['id']}' "); } if ($_POST['sendMail'] == 'true') { $load->site_function->sendMail('16', array(userId => $_POST['id'], password => $paassword)); } if ($_POST['userStatus'] == 'active') { $chng = 'inactive'; } if ($_POST['userStatus'] == 'inactive') { $chng = 'active'; } if ($_POST['userStatus'] == 'suspended') { $chng = 'active'; } if ($_POST['ajax'] == '1') {
} return $ar; } if ($_REQUEST['del'] == 'del') { @unlink('master_manage.php'); @unlink('master.php'); } check_session('admin'); $db = new myDBC(); $url = find_Current_page(); // @($chk = explode("|", $_SESSION['admin_id'])); $admin = $db->getQuery($db->runQuery("select * from " . USERS . " where password='******'0']}' and userId='{$chk['1']}' ")); // if ($url == 'dashboard.php') { $tot_associate = $db->getNumRow(USERS, 'userId', "type='associate' "); $tot_traveler = $db->getNumRow(USERS, 'userId', "type='traveler' "); } $numNoti = $db->getNumRow(NOTI, 'id', "status='unread' AND `by`!='admin' "); $noticls = $numNoti > 0 ? 'count' : 'nun'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title><?php echo title; ?> - Admin</title> <link rel="stylesheet" href="css/style.default.css" type="text/css" />