<?php include('header.php');
//error_reporting(0);
$countries = array(
	"AF" => "Afghanistan",
    "AX" => "Åland Islands",
    "AL" => "Albania",
    "DZ" => "Algeria",
    "AS" => "American Samoa",
    "AD" => "Andorra",
    "AO" => "Angola",
    "AI" => "Anguilla",
    "AQ" => "Antarctica",
    "AG" => "Antigua and Barbuda",
    "AR" => "Argentina",
    "AM" => "Armenia",
    "AW" => "Aruba",
    "AU" => "Australia",
    "AT" => "Austria",
    "AZ" => "Azerbaijan",
    "BS" => "Bahamas",
    "BH" => "Bahrain",
    "BD" => "Bangladesh",
    "BB" => "Barbados",
    "BY" => "Belarus",
    "BE" => "Belgium",
    "BZ" => "Belize",
    "BJ" => "Benin",
    "BM" => "Bermuda",
    "BT" => "Bhutan",
    "BO" => "Bolivia",
    "BA" => "Bosnia and Herzegovina",
    "BW" => "Botswana",
    "BV" => "Bouvet Island",
    "BR" => "Brazil",
    "IO" => "British Indian Ocean Territory",
    "BN" => "Brunei Darussalam",
    "BG" => "Bulgaria",
    "BF" => "Burkina Faso",
    "BI" => "Burundi",
    "KH" => "Cambodia",
    "CM" => "Cameroon",
    "CA" => "Canada",
    "CV" => "Cape Verde",
    "KY" => "Cayman Islands",
    "CF" => "Central African Republic",
    "TD" => "Chad",
    "CL" => "Chile",
    "CN" => "China",
    "CX" => "Christmas Island",
    "CC" => "Cocos (Keeling) Islands",
    "CO" => "Colombia",
    "KM" => "Comoros",
    "CG" => "Congo",
    "CD" => "Congo, The Democratic Republic of The",
    "CK" => "Cook Islands",
    "CR" => "Costa Rica",
    "CI" => "Cote D'ivoire",
    "HR" => "Croatia",
    "CU" => "Cuba",
    "CY" => "Cyprus",
    "CZ" => "Czech Republic",
    "DK" => "Denmark",
    "DJ" => "Djibouti",
    "DM" => "Dominica",
    "DO" => "Dominican Republic",
    "EC" => "Ecuador",
    "EG" => "Egypt",
    "SV" => "El Salvador",
    "GQ" => "Equatorial Guinea",
    "ER" => "Eritrea",
    "EE" => "Estonia",
    "ET" => "Ethiopia",
    "FK" => "Falkland Islands (Malvinas)",
    "FO" => "Faroe Islands",
    "FJ" => "Fiji",
    "FI" => "Finland",
    "FR" => "France",
    "GF" => "French Guiana",
    "PF" => "French Polynesia",
    "TF" => "French Southern Territories",
    "GA" => "Gabon",
    "GM" => "Gambia",
    "GE" => "Georgia",
    "DE" => "Germany",
    "GH" => "Ghana",
    "GI" => "Gibraltar",
    "GR" => "Greece",
    "GL" => "Greenland",
    "GD" => "Grenada",
    "GP" => "Guadeloupe",
    "GU" => "Guam",
    "GT" => "Guatemala",
    "GG" => "Guernsey",
    "GN" => "Guinea",
    "GW" => "Guinea-bissau",
    "GY" => "Guyana",
    "HT" => "Haiti",
    "HM" => "Heard Island and Mcdonald Islands",
    "VA" => "Holy See (Vatican City State)",
    "HN" => "Honduras",
    "HK" => "Hong Kong",
    "HU" => "Hungary",
    "IS" => "Iceland",
    "IN" => "India",
    "ID" => "Indonesia",
    "IR" => "Iran, Islamic Republic of",
    "IQ" => "Iraq",
    "IE" => "Ireland",
    "IM" => "Isle of Man",
    "IL" => "Israel",
    "IT" => "Italy",
    "JM" => "Jamaica",
    "JP" => "Japan",
    "JE" => "Jersey",
    "JO" => "Jordan",
    "KZ" => "Kazakhstan",
    "KE" => "Kenya",
    "KI" => "Kiribati",
    "KP" => "Korea, Democratic People's Republic of",
    "KR" => "Korea, Republic of",
    "KW" => "Kuwait",
    "KG" => "Kyrgyzstan",
    "LA" => "Lao People's Democratic Republic",
    "LV" => "Latvia",
    "LB" => "Lebanon",
    "LS" => "Lesotho",
    "LR" => "Liberia",
    "LY" => "Libyan Arab Jamahiriya",
    "LI" => "Liechtenstein",
    "LT" => "Lithuania",
    "LU" => "Luxembourg",
    "MO" => "Macao",
    "MK" => "Macedonia, The Former Yugoslav Republic of",
    "MG" => "Madagascar",
    "MW" => "Malawi",
    "MY" => "Malaysia",
    "MV" => "Maldives",
    "ML" => "Mali",
    "MT" => "Malta",
    "MH" => "Marshall Islands",
    "MQ" => "Martinique",
    "MR" => "Mauritania",
    "MU" => "Mauritius",
    "YT" => "Mayotte",
    "MX" => "Mexico",
    "FM" => "Micronesia, Federated States of",
    "MD" => "Moldova, Republic of",
    "MC" => "Monaco",
    "MN" => "Mongolia",
    "ME" => "Montenegro",
    "MS" => "Montserrat",
    "MA" => "Morocco",
    "MZ" => "Mozambique",
    "MM" => "Myanmar",
    "NA" => "Namibia",
    "NR" => "Nauru",
    "NP" => "Nepal",
    "NL" => "Netherlands",
    "AN" => "Netherlands Antilles",
    "NC" => "New Caledonia",
    "NZ" => "New Zealand",
    "NI" => "Nicaragua",
    "NE" => "Niger",
    "NG" => "Nigeria",
    "NU" => "Niue",
    "NF" => "Norfolk Island",
    "MP" => "Northern Mariana Islands",
    "NO" => "Norway",
    "OM" => "Oman",
    "PK" => "Pakistan",
    "PW" => "Palau",
    "PS" => "Palestinian Territory, Occupied",
    "PA" => "Panama",
    "PG" => "Papua New Guinea",
    "PY" => "Paraguay",
    "PE" => "Peru",
    "PH" => "Philippines",
    "PN" => "Pitcairn",
    "PL" => "Poland",
    "PT" => "Portugal",
    "PR" => "Puerto Rico",
    "QA" => "Qatar",
    "RE" => "Reunion",
    "RO" => "Romania",
    "RU" => "Russian Federation",
    "RW" => "Rwanda",
    "SH" => "Saint Helena",
    "KN" => "Saint Kitts and Nevis",
    "LC" => "Saint Lucia",
    "PM" => "Saint Pierre and Miquelon",
    "VC" => "Saint Vincent and The Grenadines",
    "WS" => "Samoa",
    "SM" => "San Marino",
    "ST" => "Sao Tome and Principe",
    "SA" => "Saudi Arabia",
    "SN" => "Senegal",
    "RS" => "Serbia",
    "SC" => "Seychelles",
    "SL" => "Sierra Leone",
    "SG" => "Singapore",
    "SK" => "Slovakia",
    "SI" => "Slovenia",
    "SB" => "Solomon Islands",
    "SO" => "Somalia",
    "ZA" => "South Africa",
    "GS" => "South Georgia and The South Sandwich Islands",
    "ES" => "Spain",
    "LK" => "Sri Lanka",
    "SD" => "Sudan",
    "SR" => "Suriname",
    "SJ" => "Svalbard and Jan Mayen",
    "SZ" => "Swaziland",
    "SE" => "Sweden",
    "CH" => "Switzerland",
    "SY" => "Syrian Arab Republic",
    "TW" => "Taiwan, Province of China",
    "TJ" => "Tajikistan",
    "TZ" => "Tanzania, United Republic of",
    "TH" => "Thailand",
    "TL" => "Timor-leste",
    "TG" => "Togo",
    "TK" => "Tokelau",
    "TO" => "Tonga",
    "TT" => "Trinidad and Tobago",
    "TN" => "Tunisia",
    "TR" => "Turkey",
    "TM" => "Turkmenistan",
    "TC" => "Turks and Caicos Islands",
    "TV" => "Tuvalu",
    "UG" => "Uganda",
    "UA" => "Ukraine",
    "AE" => "United Arab Emirates",
    "GB" => "United Kingdom",
    "US" => "United States",
    "UM" => "United States Minor Outlying Islands",
    "UY" => "Uruguay",
    "UZ" => "Uzbekistan",
    "VU" => "Vanuatu",
    "VE" => "Venezuela",
    "VN" => "Viet Nam",
    "VG" => "Virgin Islands, British",
    "VI" => "Virgin Islands, U.S.",
    "WF" => "Wallis and Futuna",
    "EH" => "Western Sahara",
    "YE" => "Yemen",
    "ZM" => "Zambia",
    "ZW" => "Zimbabwe"
);  
$currency_symbols = array(
	'AED' => '&#1583;.&#1573;', // ?
	'AFN' => '&#65;&#102;',
	'ALL' => '&#76;&#101;&#107;',
	'AMD' => '',
	'ANG' => '&#402;',
	'AOA' => '&#75;&#122;', // ?
	'ARS' => '&#36;',
	'AUD' => '&#36;',
	'AWG' => '&#402;',
	'AZN' => '&#1084;&#1072;&#1085;',
	'BAM' => '&#75;&#77;',
	'BBD' => '&#36;',
	'BDT' => '&#2547;', // ?
	'BGN' => '&#1083;&#1074;',
	'BHD' => '.&#1583;.&#1576;', // ?
	'BIF' => '&#70;&#66;&#117;', // ?
	'BMD' => '&#36;',
	'BND' => '&#36;',
	'BOB' => '&#36;&#98;',
	'BRL' => '&#82;&#36;',
	'BSD' => '&#36;',
	'BTN' => '&#78;&#117;&#46;', // ?
	'BWP' => '&#80;',
	'BYR' => '&#112;&#46;',
	'BZD' => '&#66;&#90;&#36;',
	'CAD' => '&#36;',
	'CDF' => '&#70;&#67;',
	'CHF' => '&#67;&#72;&#70;',
	'CLF' => '', // ?
	'CLP' => '&#36;',
	'CNY' => '&#165;',
	'COP' => '&#36;',
	'CRC' => '&#8353;',
	'CUP' => '&#8396;',
	'CVE' => '&#36;', // ?
	'CZK' => '&#75;&#269;',
	'DJF' => '&#70;&#100;&#106;', // ?
	'DKK' => '&#107;&#114;',
	'DOP' => '&#82;&#68;&#36;',
	'DZD' => '&#1583;&#1580;', // ?
	'EGP' => '&#163;',
	'ETB' => '&#66;&#114;',
	'EUR' => '&#8364;',
	'FJD' => '&#36;',
	'FKP' => '&#163;',
	'GBP' => '&#163;',
	'GEL' => '&#4314;', // ?
	'GHS' => '&#162;',
	'GIP' => '&#163;',
	'GMD' => '&#68;', // ?
	'GNF' => '&#70;&#71;', // ?
	'GTQ' => '&#81;',
	'GYD' => '&#36;',
	'HKD' => '&#36;',
	'HNL' => '&#76;',
	'HRK' => '&#107;&#110;',
	'HTG' => '&#71;', // ?
	'HUF' => '&#70;&#116;',
	'IDR' => '&#82;&#112;',
	'ILS' => '&#8362;',
	'INR' => '&#8377;',
	'IQD' => '&#1593;.&#1583;', // ?
	'IRR' => '&#65020;',
	'ISK' => '&#107;&#114;',
	'JEP' => '&#163;',
	'JMD' => '&#74;&#36;',
	'JOD' => '&#74;&#68;', // ?
	'JPY' => '&#165;',
	'KES' => '&#75;&#83;&#104;', // ?
	'KGS' => '&#1083;&#1074;',
	'KHR' => '&#6107;',
	'KMF' => '&#67;&#70;', // ?
	'KPW' => '&#8361;',
	'KRW' => '&#8361;',
	'KWD' => '&#1583;.&#1603;', // ?
	'KYD' => '&#36;',
	'KZT' => '&#1083;&#1074;',
	'LAK' => '&#8365;',
	'LBP' => '&#163;',
	'LKR' => '&#8360;',
	'LRD' => '&#36;',
	'LSL' => '&#76;', // ?
	'LTL' => '&#76;&#116;',
	'LVL' => '&#76;&#115;',
	'LYD' => '&#1604;.&#1583;', // ?
	'MAD' => '&#1583;.&#1605;.', //?
	'MDL' => '&#76;',
	'MGA' => '&#65;&#114;', // ?
	'MKD' => '&#1076;&#1077;&#1085;',
	'MMK' => '&#75;',
	'MNT' => '&#8366;',
	'MOP' => '&#77;&#79;&#80;&#36;', // ?
	'MRO' => '&#85;&#77;', // ?
	'MUR' => '&#8360;', // ?
	'MVR' => '.&#1923;', // ?
	'MWK' => '&#77;&#75;',
	'MXN' => '&#36;',
	'MYR' => '&#82;&#77;',
	'MZN' => '&#77;&#84;',
	'NAD' => '&#36;',
	'NGN' => '&#8358;',
	'NIO' => '&#67;&#36;',
	'NOK' => '&#107;&#114;',
	'NPR' => '&#8360;',
	'NZD' => '&#36;',
	'OMR' => '&#65020;',
	'PAB' => '&#66;&#47;&#46;',
	'PEN' => '&#83;&#47;&#46;',
	'PGK' => '&#75;', // ?
	'PHP' => '&#8369;',
	'PKR' => '&#8360;',
	'PLN' => '&#122;&#322;',
	'PYG' => '&#71;&#115;',
	'QAR' => '&#65020;',
	'RON' => '&#108;&#101;&#105;',
	'RSD' => '&#1044;&#1080;&#1085;&#46;',
	'RUB' => '&#1088;&#1091;&#1073;',
	'RWF' => '&#1585;.&#1587;',
	'SAR' => '&#65020;',
	'SBD' => '&#36;',
	'SCR' => '&#8360;',
	'SDG' => '&#163;', // ?
	'SEK' => '&#107;&#114;',
	'SGD' => '&#36;',
	'SHP' => '&#163;',
	'SLL' => '&#76;&#101;', // ?
	'SOS' => '&#83;',
	'SRD' => '&#36;',
	'STD' => '&#68;&#98;', // ?
	'SVC' => '&#36;',
	'SYP' => '&#163;',
	'SZL' => '&#76;', // ?
	'THB' => '&#3647;',
	'TJS' => '&#84;&#74;&#83;', // ? TJS (guess)
	'TMT' => '&#109;',
	'TND' => '&#1583;.&#1578;',
	'TOP' => '&#84;&#36;',
	'TRY' => '&#8356;', // New Turkey Lira (old symbol used)
	'TTD' => '&#36;',
	'TWD' => '&#78;&#84;&#36;',
	'TZS' => '',
	'UAH' => '&#8372;',
	'UGX' => '&#85;&#83;&#104;',
	'USD' => '&#36;',
	'UYU' => '&#36;&#85;',
	'UZS' => '&#1083;&#1074;',
	'VEF' => '&#66;&#115;',
	'VND' => '&#8363;',
	'VUV' => '&#86;&#84;',
	'WST' => '&#87;&#83;&#36;',
	'XAF' => '&#70;&#67;&#70;&#65;',
	'XCD' => '&#36;',
	'XDR' => '',
	'XOF' => '',
	'XPF' => '&#70;',
	'YER' => '&#65020;',
	'ZAR' => '&#82;',
	'ZMK' => '&#90;&#75;', // ?
	'ZWL' => '&#90;&#36;',
);
$currency_name = array (
	'ALL' => 'Albania Lek',
	'AFN' => 'Afghanistan Afghani',
	'ARS' => 'Argentina Peso',
	'AWG' => 'Aruba Guilder',
	'AUD' => 'Australia Dollar',
	'AZN' => 'Azerbaijan New Manat',
	'BSD' => 'Bahamas Dollar',
	'BBD' => 'Barbados Dollar',
	'BDT' => 'Bangladeshi taka',
	'BYR' => 'Belarus Ruble',
	'BZD' => 'Belize Dollar',
	'BMD' => 'Bermuda Dollar',
	'BOB' => 'Bolivia Boliviano',
	'BAM' => 'Bosnia and Herzegovina Convertible Marka',
	'BWP' => 'Botswana Pula',
	'BGN' => 'Bulgaria Lev',
	'BRL' => 'Brazil Real',
	'BND' => 'Brunei Darussalam Dollar',
	'KHR' => 'Cambodia Riel',
	'CAD' => 'Canada Dollar',
	'KYD' => 'Cayman Islands Dollar',
	'CLP' => 'Chile Peso',
	'CNY' => 'China Yuan Renminbi',
	'COP' => 'Colombia Peso',
	'CRC' => 'Costa Rica Colon',
	'HRK' => 'Croatia Kuna',
	'CUP' => 'Cuba Peso',
	'CZK' => 'Czech Republic Koruna',
	'DKK' => 'Denmark Krone',
	'DOP' => 'Dominican Republic Peso',
	'XCD' => 'East Caribbean Dollar',
	'EGP' => 'Egypt Pound',
	'SVC' => 'El Salvador Colon',
	'EEK' => 'Estonia Kroon',
	'EUR' => 'Euro Member Countries',
	'FKP' => 'Falkland Islands (Malvinas) Pound',
	'FJD' => 'Fiji Dollar',
	'GHC' => 'Ghana Cedis',
	'GIP' => 'Gibraltar Pound',
	'GTQ' => 'Guatemala Quetzal',
	'GGP' => 'Guernsey Pound',
	'GYD' => 'Guyana Dollar',
	'HNL' => 'Honduras Lempira',
	'HKD' => 'Hong Kong Dollar',
	'HUF' => 'Hungary Forint',
	'ISK' => 'Iceland Krona',
	'INR' => 'India Rupee',
	'IDR' => 'Indonesia Rupiah',
	'IRR' => 'Iran Rial',
	'IMP' => 'Isle of Man Pound',
	'ILS' => 'Israel Shekel',
	'JMD' => 'Jamaica Dollar',
	'JPY' => 'Japan Yen',
	'JEP' => 'Jersey Pound',
	'KZT' => 'Kazakhstan Tenge',
	'KPW' => 'Korea (North) Won',
	'KRW' => 'Korea (South) Won',
	'KGS' => 'Kyrgyzstan Som',
	'LAK' => 'Laos Kip',
	'LVL' => 'Latvia Lat',
	'LBP' => 'Lebanon Pound',
	'LRD' => 'Liberia Dollar',
	'LTL' => 'Lithuania Litas',
	'MKD' => 'Macedonia Denar',
	'MYR' => 'Malaysia Ringgit',
	'MUR' => 'Mauritius Rupee',
	'MXN' => 'Mexico Peso',
	'MNT' => 'Mongolia Tughrik',
	'MZN' => 'Mozambique Metical',
	'NAD' => 'Namibia Dollar',
	'NPR' => 'Nepal Rupee',
	'ANG' => 'Netherlands Antilles Guilder',
	'NZD' => 'New Zealand Dollar',
	'NIO' => 'Nicaragua Cordoba',
	'NGN' => 'Nigeria Naira',
	'NOK' => 'Norway Krone',
	'OMR' => 'Oman Rial',
	'PKR' => 'Pakistan Rupee',
	'PAB' => 'Panama Balboa',
	'PYG' => 'Paraguay Guarani',
	'PEN' => 'Peru Nuevo Sol',
	'PHP' => 'Philippines Peso',
	'PLN' => 'Poland Zloty',
	'QAR' => 'Qatar Riyal',
	'RON' => 'Romania New Leu',
	'RUB' => 'Russia Ruble',
	'SHP' => 'Saint Helena Pound',
	'SAR' => 'Saudi Arabia Riyal',
	'RSD' => 'Serbia Dinar',
	'SCR' => 'Seychelles Rupee',
	'SGD' => 'Singapore Dollar',
	'SBD' => 'Solomon Islands Dollar',
	'SOS' => 'Somalia Shilling',
	'ZAR' => 'South Africa Rand',
	'LKR' => 'Sri Lanka Rupee',
	'SEK' => 'Sweden Krona',
	'CHF' => 'Switzerland Franc',
	'SRD' => 'Suriname Dollar',
	'SYP' => 'Syria Pound',
	'TWD' => 'Taiwan New Dollar',
	'THB' => 'Thailand Baht',
	'TTD' => 'Trinidad and Tobago Dollar',
	'TRY' => 'Turkey Lira',
	'TRL' => 'Turkey Lira',
	'TVD' => 'Tuvalu Dollar',
	'UAH' => 'Ukraine Hryvna',
	'GBP' => 'United Kingdom Pound',
	'USD' => 'United States Dollar',
	'UYU' => 'Uruguay Peso',
	'UZS' => 'Uzbekistan Som',
	'VEF' => 'Venezuela Bolivar',
	'VND' => 'Viet Nam Dong',
	'YER' => 'Yemen Rial',
	'ZWD' => 'Zimbabwe Dollar'
);

if(isset($_GET['id'])){
	$user=$_GET['id'];

	$sql = "select * from users where uID='$user'"; 
	$rs_result =  $conn->query($sql); //run the query
	$no = 0;
	while($row = $rs_result->fetch_assoc()) { 
		$uid=$row['uID'];
		$fname=$row['fn'];
		$lname=$row['ln'];
		$add=$row['address'];
		$ct=$row['townCity'];
		$st=$row['state'];
		$count=$row['country'];
		$pz=$row['zip'];
		$ph=$row['pNumber'];
		$em=$row['email'];
		$dob=$row['dob'];
		$gen=$row['gender'];
		$nat=$row['nation'];
		$occ=$row['occu'];
		$acc=$row['memID'];
		$pw=$row['pass'];
		$cd=$row['cDate'];
		$ll=$row['LLogin'];
		$pic=$row['picture'];
		$tok=$row['token'];
		$no++;
	}

	$sr = "select * from settings where memID='$acc'"; 
	$r_r=mysqli_query($conn,$sr);
	$count_pay = mysqli_num_rows($r_r);
	while($row = mysqli_fetch_array($r_r)) { 
		$md=$row['memID'];
		$sa1=$row['sA1'];
		$sa2=$row['sA2'];
		$sa3=$row['sA3'];
		$ep=$row['eP'];
		$eb=$row['eB'];
		$et=$row['eT'];
		$e3d=$row['e3D'];
		$eea=$row['eEa'];
		$esa=$row['eSa'];
		$b1=$row['b1'];
		$b2=$row['b2'];
		$b3=$row['b3'];
		$b4=$row['b4'];
		$b5=$row['b5'];
	}
}

if(isset($_GET['st'])){
	$delete_id=$_GET['st'];

	$deletepost="update trans set status='complete' where tid='$delete_id'";
	$run = $conn->query($deletepost);
	echo "<script>alert('Transaction Completed Successfully!')</script>";

	echo "<script>window.location.href = 'client_notifications.php?id=".$uid."';</script>";
}

if(isset($_GET['tid'])){
	$delete_id=$_GET['tid'];
	
	$deletetrans="delete from trans where tid='$delete_id'";
	$run = $conn->query($deletepost);

	if($run){
		echo "<script>alert('Statement Deleted Successfully!')</script>";
		echo "<script>window.location.href = 'client_notifications.php?id=".$uid."';</script>";
	}
}

if(isset($_GET['message_id'])){
	$delete_id=$_GET['message_id'];

	$deletecat="delete from notifications where id='$delete_id'";
	$run = $conn->query($deletecat);

	echo "<script>alert('Message Deleted Successfully...')</script>";
	echo '<script>window.location.href = "index.php";</script>';
}

if(isset($_POST['add_notif'])){
    $cln = $_POST['user'];
    $n_mess = $_POST['n_message'];
    $payd = $_POST['pd'];
    $payt = $_POST['pt'];
  
    $insQ = "INSERT INTO notifications(`user_id`, `notification`, `date`) VALUES ('".$cln."','".mysqli_real_escape_string($conn, $n_mess)."','".$payd." ".$payt."')";
    $runit = mysqli_query($conn, $insQ);
    if($runit){
        echo "<script>alert('Notification sent successfully!')</script>";
        echo "<script>window.location.href = 'client_notifications.php?id=".$uid."';</script>";
        
    }else{
         echo "<script>alert('Error Adding Notification')</script>";
    }
}           
?>

<style>
	/* Style the buttons that are used to open and close the accordion panel */
	button.accordion {
		background-color: #eee;
		color: #444;
		cursor: pointer;
		padding: 18px;
		width: 100%;
		text-align: left;
		border: none;
		outline: none;
		transition: 0.4s;
	}
	button.accordion:after {
		content: '\02795'; /* Unicode character for "plus" sign (+) */
		font-size: 13px;
		color: #777;
		float: right;
		margin-left: 5px;
	}

	button.accordion.active:after {
		content: "\2796"; /* Unicode character for "minus" sign (-) */
	}
	/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
	button.accordion.active, button.accordion:hover {
		background-color: #ddd;
	}

	/* Style the accordion panel. Note: hidden by default */
	div.panelt {
		padding: 0 18px;
		background-color: white;
		max-height: 0;
		overflow: hidden;
		transition: 0.6s ease-in-out;
		opacity: 0;
	}

	/* The "show" class is added to the accordion panel when the user clicks on one of the buttons. This will show the panel content */
	div.panelt.show {
		opacity: 1;
		max-height: 600px; /* Whatever you like, as long as its more than the height of the content (on all screen sizes) */
	}
</style>
	
	<!-- MENU SECTION END-->
	<div class="content-wrapper">
		<div class="container" style="background: lightgrey;">
			<div class="row" style="margin-top:40px">
				<div class="w3-bar" style="background-color:#142440;color:White">
					<a class="w3-bar-item w3-button" style="text-decoration: none;" href="client_info.php?id=<?php echo $uid; ?>">Personal Information</a>
					<a class="w3-bar-item w3-button active" style="text-decoration: none;" href="client_notifications.php?id=<?php echo $uid; ?>">Manage Transaction History</a>
					<a class="w3-bar-item w3-button" style="text-decoration: none;" href="client_accounts.php?id=<?php echo $uid; ?>">Manage Accounts</a>
					<a class="w3-bar-item w3-button" style="text-decoration: none;" href="transaction_steps.php?id=<?php echo $uid; ?>">Manage Transaction Steps</a>
					<a class="w3-bar-item w3-button" style="text-decoration: none;" href="client_notifications.php?id=<?php echo $uid; ?>">Manage Notifications</a>
				</div>
				<div id="Paris" class="w3-container w3-display-container city">
					<div class="panel-heading" style="color:White;font-size:20px;color:grey">
						<i class="fa fa-th-list" style="font-size:30px;color:black"></i> MANAGE NOTIFICATIONS
					</div>
					<div class="col-md-12">
						<div class="panel panel-default">
							<div class="panel-body">
								<form class="" method="post">
                                    <div class="form-group">
                                      <label class="control-label">Enter Message</label>
                                      <input name="user" type="hidden" value="<?php echo $uid; ?>">
                                      <textarea name="n_message" style="height: 120px;" class="form-control" required=""></textarea>
                                    </div>
                                    <div class="form-group">
                                      <label class="control-label">Timestamp</label>
                                      <input type="date" name="pd" class="form-control" required="">
            						  <input type="time" name="pt" class="form-control" required="">
                                    </div>
                                    <div class="form-group">
                                      <button type="submit" class="btn btn-primary" name="add_notif">Add Notification</button>
                                      <button type="reset" class="btn btn-default">Reset</button>
                                    </div>
                				</form>
                				<hr>
                				<div class="panel panel-success" data-widget="{&quot;draggable&quot;: &quot;false&quot;}" data-widget-static="">
                    				<div class="panel-heading">
                    					View All Notifications
                    				</div>
                    				<div class="panel-body" style="overflow: auto;">
                    					<table class="table table-striped">
                    						<thead>
                    							<tr class="warning">
                    								<th>Date</th>
                    								<th>Message</th>
                    								<th></th>
                    							</tr>
                    						</thead>
                    						<tbody>
                    							<?php 
                    								$sn = "select * from notifications where user_id='$uid' order by date desc";
                                                	$runq = $conn->query($sn);
                                                	while($row = $runq->fetch_assoc())
                                                	{
                                                    		$notif_id=$row['id'];
                                                    		$message=$row['notification'];
                                                    		$n_date=$row['date'];
                                                    		
                                                    		$n_date_ = date("jS M, Y h:ia", strtotime($n_date));
                    									
                    									echo "
                    										<tr>
                    											<td>$n_date_</td>
                    											<td>$message</td>
                    											<td><a href='client_notifications.php?id=".$uid."&message_id=".$notif_id."' class='btn btn-danger'>Delete Message</a></td>	
                    										</tr>											
                    									";
                    								}
                                                ?>
                    					    </tbody>	
                                        </table>
                                    </div>			
                    			</div>
							</div>                        
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

    <!-- CONTENT-WRAPPER SECTION END-->
    <footer style="background-color:#071A30">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    Copyright &copy; <?php echo date("Y"); ?> | ALL RIGHTS RESERVED. 
                </div>

            </div>
        </div>
    </footer>
    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY SCRIPTS -->
    <script src="assets/js/jquery-1.11.1.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/js/bootstrap.js"></script>
	<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
</body>
</html>
