<?php
session_start();
error_reporting(1);
include('includes/config.php');
include('includes/db.php');



if (strlen($_SESSION['adminlogin']) == 0) {
	header('location:index.php');
} else {

	if (isset($_POST['submit1'])) {
		$notice = $_POST['notice1'];
		$id = 1;
	} else if (isset($_POST['submit2'])) {
		$notice = $_POST['notice2'];
		$id = 2;
	} else if (isset($_POST['submit3'])) {
		$notice = $_POST['notice3'];
		$id = 3;
	} else if (isset($_POST['submit4'])) {
		$notice = $_POST['notice4'];
		$id = 4;
	} else if (isset($_POST['submit5'])) {
		$notice = $_POST['notice5'];
		$id = 5;
	} else if (isset($_POST['submit6'])) {
		$notice = $_POST['notice6'];
		$id = 6;
	} else if (isset($_POST['submit7'])) {
		$notice = $_POST['notice7'];
		$id = 7;
	} else if (isset($_POST['submit8'])) {
		$notice = $_POST['notice8'];
		$id = 8;
	} else if (isset($_POST['submit9'])) {
		$notice = $_POST['notice9'];
		$id = 9;
	} else if (isset($_POST['submit10'])) {
		$notice = $_POST['notice10'];
		$id = 10;
	} else {
		// echo "failed";
	}



	if (isset($_POST['update1'])) {
		$update = $_POST['notice1'];
		$id = 1;
	} else if (isset($_POST['update2'])) {
		$update = $_POST['notice2'];
		$id = 2;
	} else if (isset($_POST['update3'])) {
		$update = $_POST['notice3'];
		$id = 3;
	} else if (isset($_POST['update4'])) {
		$update = $_POST['notice4'];
		$id = 4;
	} else if (isset($_POST['update5'])) {
		$update = $_POST['notice5'];
		$id = 5;
	} else if (isset($_POST['update6'])) {
		$update = $_POST['notice6'];
		$id = 6;
	} else if (isset($_POST['update7'])) {
		$update = $_POST['notice7'];
		$id = 7;
	} else if (isset($_POST['update8'])) {
		$update = $_POST['notice8'];
		$id = 8;
	} else if (isset($_POST['update9'])) {
		$update = $_POST['notice9'];
		$id = 9;
	} else if (isset($_POST['update10'])) {
		$update = $_POST['notice10'];
		$id = 10;
	} else {
		// echo "failed";
	}

	if (isset($notice)) {

		$sql2 = "UPDATE notice SET notice='$notice' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg = "Notice publish Successfully";
		}
	} else if (isset($update)) {

		$sql2 = "UPDATE notice SET notice='$update' WHERE id ='$id'";
		if ($result = mysqli_query($link, $sql2)) {

			$msg = "Notice Update Successfully";
		}
	} else {
		// echo "failed";
	}

	//---------------------------
	
	if (isset($_POST['cc_bio_on'])) {
        $sql2 = 'UPDATE control SET cc_bio_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_bio_off'])) {
        $sql2 = 'UPDATE control SET cc_bio_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }

    if (isset($_POST['cc_sign_on'])) {
        $sql2 = 'UPDATE control SET cc_sign_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_sign_off'])) {
        $sql2 = 'UPDATE control SET cc_sign_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }
    
    if (isset($_POST['cc_tin_on'])) {
        $sql2 = 'UPDATE control SET cc_tin_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_tin_off'])) {
        $sql2 = 'UPDATE control SET cc_tin_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }



    if (isset($_POST['cc_server_on'])) {
        $sql2 = 'UPDATE control SET cc_server_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_server_off'])) {
        $sql2 = 'UPDATE control SET cc_server_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }

    if (isset($_POST['cc_card_on'])) {
        $sql2 = 'UPDATE control SET cc_card_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_card_off'])) {
        $sql2 = 'UPDATE control SET cc_card_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }


	// Price Update Settings by KD (START). 
	
    if (isset($_POST['cc_card_make_control'])) {
        $price = $_POST['cc_card_make_price'];
        $sql = "UPDATE control SET cc_card_make_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

	if (isset($_POST['cc_sign2server_control'])) {
        $price = $_POST['cc_sign2server_price'];
        $sql = "UPDATE control SET cc_sign2server_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

	if (isset($_POST['cc_server_unofficial_control'])) {
        $price = $_POST['cc_server_unofficial_price'];
        $sql = "UPDATE control SET cc_server_unofficial_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    
    if (isset($_POST['cc_bio_control'])) {
        $price = $_POST['cc_bio_price'];
        $sql = "UPDATE control SET cc_bio_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }


	if (isset($_POST['cc_sign_control'])) {
        $price = $_POST['cc_sign_price'];
        $sql = "UPDATE control SET cc_sign_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    
    if (isset($_POST['cc_tin_control'])) {
        $price = $_POST['cc_tin_price'];
        $sql = "UPDATE control SET cc_tin_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    if (isset($_POST['cc_server_control'])) {
        $price = $_POST['cc_server_price'];
        $sql = "UPDATE control SET cc_server_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    if (isset($_POST['cc_card_control'])) {
        $price = $_POST['cc_card_price'];
        $sql = "UPDATE control SET cc_card_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

	if (isset($_POST['tin_control'])) {
        $price = $_POST['tin'];
        $sql = "UPDATE control SET tin=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    // Price Update Settings by KD (END).


	// Services Turn ON/OFF (Start)
	
	if (isset($_POST['cc_bio_on'])) {
        $sql2 = 'UPDATE control SET cc_bio_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_bio_off'])) {
        $sql2 = 'UPDATE control SET cc_bio_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }


    if (isset($_POST['cc_sign_on'])) {
        $sql2 = 'UPDATE control SET cc_sign_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_sign_off'])) {
        $sql2 = 'UPDATE control SET cc_sign_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }

    if (isset($_POST['cc_server_on'])) {
        $sql2 = 'UPDATE control SET cc_server_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_server_off'])) {
        $sql2 = 'UPDATE control SET cc_server_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }

    if (isset($_POST['cc_card_on'])) {
        $sql2 = 'UPDATE control SET cc_card_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_card_off'])) {
        $sql2 = 'UPDATE control SET cc_card_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }
    
    if (isset($_POST['cc_bio_control'])) {
        $price = $_POST['cc_bio_price'];
        $sql = "UPDATE control SET cc_bio_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    if (isset($_POST['cc_sign_control'])) {
        $price = $_POST['cc_sign_price'];
        $sql = "UPDATE control SET cc_sign_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    if (isset($_POST['cc_server_control'])) {
        $price = $_POST['cc_server_price'];
        $sql = "UPDATE control SET cc_server_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

    if (isset($_POST['cc_card_control'])) {
        $price = $_POST['cc_card_price'];
        $sql = "UPDATE control SET cc_card_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }

	// Services Turn ON/OFF (End)



	if (isset($_POST['signServerSettings'])) {
		$serverAndSignCharge = $_POST['serverAndSignCharge'];
		$sql2 = "UPDATE control SET serverAndSign=$serverAndSignCharge WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Price seted to $serverAndSignCharge";
		}
	} 
	
	if (isset($_POST['nid2numbersSettings'])) {
		$serverAndSignCharge = $_POST['nid2numbersCharge'];
		$sql2 = "UPDATE control SET nid2numbers=$serverAndSignCharge WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Price seted to $serverAndSignCharge";
		}
	} 
	
	if (isset($_POST['biomatricSettings'])) {
		$serverAndSignCharge = $_POST['biomatricCharge'];
		$sql2 = "UPDATE control SET biomatric=$serverAndSignCharge WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Price seted to $serverAndSignCharge";
		}
	} 
	
	if (isset($_POST['tinSettings'])) {
		$serverAndSignCharge = $_POST['tinCharge'];
		$sql2 = "UPDATE control SET tin=$serverAndSignCharge WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Price seted to $serverAndSignCharge";
		}
	} 
	

	if (isset($_POST['ton'])) {
		$sql2 = "UPDATE control SET reg=1 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned ON";
		}
	} else if (isset($_POST['toff'])) {
		$sql2 = "UPDATE control SET reg=0 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned OFF";
		}
	}

	if (isset($_POST['tonss'])) {
		$sql2 = "UPDATE control SET ssorder=1 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned ON";
		}
	} else if (isset($_POST['toffss'])) {
		$sql2 = "UPDATE control SET ssorder=0 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned OFF";
		}
	}
	
	
	if (isset($_POST['onreg'])) {
		$sql2 = "UPDATE control SET reg=1 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned ON";
		}
	} else if (isset($_POST['offreg'])) {
		$sql2 = "UPDATE control SET reg=0 WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Turned OFF";
		}
	}


	if (isset($_POST['rmsg'])) {
		$rmsg = $_POST['rmsg'];
		$sql2 = "UPDATE control SET msg='$rmsg' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Succesfully updated Recharge msg";
		}
	}
	if (isset($_POST['minr'])) {
		$minr = $_POST['minr'];
		$sql2 = "UPDATE control SET minr='$minr' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Succesfully updated Minmum Recharge Amount";
		}
	}
	if (isset($_POST['charge'])) {
		$cost = $_POST['charge'];
		$sql2 = "UPDATE control SET cost='$cost' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Succesfully updated Charge";
		}
	}
	
	
	
	
	if (isset($_POST['serverUnOffCostUpdate'])) {
		$serverUnOffCost = $_POST['serverUnOffCost'];
		$sql2 = "UPDATE control SET serverUnOffCost='$serverUnOffCost' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Succesfully updated Charge $serverUnOffCost";
		}
	}
	
	if (isset($_POST['birthCardCostUpdate'])) {
		$birthCardCost = $_POST['birthCardCost'];
		$sql2 = "UPDATE control SET birthCardCost='$birthCardCost' WHERE id = 1";
		if ($result = mysqli_query($link, $sql2)) {

			$msg1 = "Succesfully updated Charge $birthCardCost ";
		}
	}
}




?>

<!doctype html>
<html lang="en" class="no-js">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
	<meta name="description" content="">
	<meta name="author" content="">
	<meta name="theme-color" content="#3e454c">

	<title>Notice Bord</title>

	<!-- Font awesome -->
	<link rel="stylesheet" href="css/font-awesome.min.css">
	<!-- Sandstone Bootstrap CSS -->
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<!-- Admin Stye -->
	<link rel="stylesheet" href="css/style.css">

	<script type="text/javascript" src="../vendor/countries.js"></script>
	<style>
		.errorWrap {
			padding: 10px;
			margin: 0 0 20px 0;
			background: #dd3d36;
			color: #fff;
			-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
			box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
		}

		.succWrap {
			padding: 10px;
			margin: 0 0 20px 0;
			background: #5cb85c;
			color: #fff;
			-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
			box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
		}

		.btn {
			padding: 13px 46px;
		}
	</style>


</head>

<body>
	<?php
	$sql = "SELECT * from users;";
	$query = $dbh->prepare($sql);
	$query->execute();
	$result = $query->fetch(PDO::FETCH_OBJ);
	$cnt = 1;
	?>
	<?php include('includes/header.php'); ?>
	<div class="ts-main-content">
		<?php include('includes/leftbar.php'); ?>
		<div class="content-wrapper">
			<div class="container-fluid">
				<div class="row">
					<div class="col-md-12">
						<div class="row">

							<div class="col-md-12">
								<h2>Control Panel</h2>
								<div class="panel panel-default">
									<div class="panel-heading">Edit Info</div>
									<?php if ($error) { ?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php } else if ($msg1) { ?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg1); ?> </div><?php } ?>

									<div class="panel-body">

										<!-- Card Making Charge Start -->
										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_card_make_price = $row['cc_card_make_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">NID & Sign Card Making</label>
												<div class="col-sm-6">
													<input type="number" name="cc_card_make_price" class="form-control" value="<?php echo $cc_card_make_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_card_make_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- Card Making Charge End -->
										
										<!-- Sign to Server Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_sign2server_price = $row['cc_sign2server_price'];
													}
												}
											} 
										?>
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Nid Search Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_sign2server_price" class="form-control" value="<?php echo $cc_sign2server_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_sign2server_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!---Sign to Server Price End -->

										<!-- Server (Un Official) Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_server_unofficial_price = $row['cc_server_unofficial_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Server Copy Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_server_unofficial_price" class="form-control" value="<?php echo $cc_server_unofficial_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_server_unofficial_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- Server (Un Official) Price End -->
										
										<!-- SIGN ON/OFF (Start) -->
										<?php 
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$apr = $row['cc_sign_control'];
														if ($apr == 1) {
															$st = "Sign ON";
														} else {
															$st = "Sign OFF";
														}
													}
												}
											} 
										?>
										<!--
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Sign</label>
												<div class="col-sm-6">
													<input type="text" name="sign_on_off" class="form-control" disabled style=" background: none;" value="<?php echo $st; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<?php $sql = "SELECT * FROM control WHERE id='1'";
													if ($result = mysqli_query($link, $sql)) {
														if (mysqli_num_rows($result) > 0) {
															while ($row = mysqli_fetch_array($result)) {
																$apr = $row['cc_sign_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_sign_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_sign_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>
										
										<!-- SIGN ON/OFF (END) -->

										<!-- Sign Copy Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_sign_price = $row['cc_sign_price'];
													}
												}
											} 
										?>
										<!--
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Sign Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_sign_price" class="form-control" value="<?php echo $cc_sign_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_sign_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- Sign Copy Price End -->

										<!-- Server ON/OFF (Start) -->
										<?php 
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$apr = $row['cc_sign_control'];
														if ($apr == 1) {
															$st = "server ON";
														} else {
															$st = "server OFF";
														}
													}
												}
											} 
										?>
										<!--
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Server</label>
												<div class="col-sm-6">
													<input type="text" name="server_on_off" class="form-control" disabled style=" background: none;" value="<?php echo $st; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<?php $sql = "SELECT * FROM control WHERE id='1'";
													if ($result = mysqli_query($link, $sql)) {
														if (mysqli_num_rows($result) > 0) {
															while ($row = mysqli_fetch_array($result)) {
																$apr = $row['cc_server_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_server_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_server_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>
										
										<!-- server ON/OFF (END) -->

										<!-- server Copy Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_server_price = $row['cc_server_price'];
													}
												}
											} 
										?>
										<!--
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Server Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_server_price" class="form-control" value="<?php echo $cc_server_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_server_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- server Copy Price End -->



										<!-- card Copy Price Start -->

										<!-- card Copy Price End -->
										
											<!-- bio ON/OFF (Start) -->
										<?php 
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$apr = $row['cc_bio_control'];
														if ($apr == 1) {
															$st = "bio ON";
														} else {
															$st = "bio OFF";
														}
													}
												}
											} 
										?>
										
										
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">bio</label>
												<div class="col-sm-6">
													<input type="text" name="bio_on_off" class="form-control" disabled style=" background: none;" value="<?php echo $st; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<?php $sql = "SELECT * FROM control WHERE id='1'";
													if ($result = mysqli_query($link, $sql)) {
														if (mysqli_num_rows($result) > 0) {
															while ($row = mysqli_fetch_array($result)) {
																$apr = $row['cc_bio_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_bio_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_bio_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>
										
										<!-- bio ON/OFF (END) -->

										
										<!-- Bio Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_bio_price = $row['cc_bio_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Bio Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_bio_price" class="form-control" value="<?php echo $cc_bio_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_bio_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- Bio Price End -->
										
										
																				<!-- SIGN ON/OFF (Start) -->
										<?php 
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$apr = $row['cc_sign_control'];
														if ($apr == 1) {
															$st = "Sign ON";
														} else {
															$st = "Sign OFF";
														}
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Sign</label>
												<div class="col-sm-6">
													<input type="text" name="sign_on_off" class="form-control" disabled style=" background: none;" value="<?php echo $st; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<?php $sql = "SELECT * FROM control WHERE id='1'";
													if ($result = mysqli_query($link, $sql)) {
														if (mysqli_num_rows($result) > 0) {
															while ($row = mysqli_fetch_array($result)) {
																$apr = $row['cc_sign_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_sign_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_sign_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>
										
										<!-- SIGN ON/OFF (END) -->

										<!-- Sign Copy Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_sign_price = $row['cc_sign_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Sign Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_sign_price" class="form-control" value="<?php echo $cc_sign_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_sign_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- Sign Copy Price End -->
										
										
																				<!-- SIGN ON/OFF (Start) -->
                                                                                <?php 
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$apr = $row['cc_card_control'];
														if ($apr == 1) {
															$st = "NID ON";
														} else {
															$st = "NID OFF";
														}
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">NID</label>
												<div class="col-sm-6">
													<input type="text" name="nid_on_off" class="form-control" disabled style=" background: none;" value="<?php echo $st; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<?php $sql = "SELECT * FROM control WHERE id='1'";
													if ($result = mysqli_query($link, $sql)) {
														if (mysqli_num_rows($result) > 0) {
															while ($row = mysqli_fetch_array($result)) {
																$apr = $row['cc_card_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_card_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_card_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>
										
										<!-- SIGN ON/OFF (END) -->

										<!-- NID Copy Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_card_price = $row['cc_card_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">NID & Birth PDF Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_card_price" class="form-control" value="<?php echo $cc_card_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_card_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- NID Copy Price End -->
										
										
										<!-- TIN ON/OFF (Start) -->
										<?php 
// Fetch the control record
$sql = "SELECT * FROM control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result); // Fetch a single row
    $apr = $row['cc_tin_control'];
    $st = ($apr == 1) ? "TIN ON" : "TIN OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_tin_on'])) {
        $update_sql = "UPDATE control SET cc_tin_control = 1 WHERE id='1'";
    } elseif (isset($_POST['cc_tin_off'])) {
        $update_sql = "UPDATE control SET cc_tin_control = 0 WHERE id='1'";
    }
}
?>

<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">TIN Status</label>
        <div class="col-sm-6">
            <input type="text" name="tin_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_tin_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_tin_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>

										<!-- TIN ON/OFF (END) -->

										<!-- TIN Price Start -->

										<?php
											$sql = "SELECT * FROM control WHERE id='1'";
											if ($result = mysqli_query($link, $sql)) {
												if (mysqli_num_rows($result) > 0) {
													while ($row = mysqli_fetch_array($result)) {
														$cc_sign_price = $row['cc_tin_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">TIN Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_tin_price" class="form-control" value="<?php echo $cc_sign_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_tin_control" type="submit">Save</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
											</div>
											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
										</form>

										<!-- TIN Price End -->

<!-- Location Start -->
										<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_location_control'];
    $cc_location_pricee = $row['cc_location_price'];
    $st = ($apr == 1) ? "Location ON" : "Location OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_location_on'])) {
        $update_sql = "UPDATE text_control SET cc_location_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "Location ON";
        } else {
            echo "Error updating location status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_location_off'])) {
        $update_sql = "UPDATE text_control SET cc_location_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "Location OFF";
        } else {
            echo "Error updating location status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_location_price_save'])) {
        $new_price = intval($_POST['cc_location_price']);
        $update_price_sql = "UPDATE text_control SET cc_location_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_location_pricee = $new_price;
            echo "<div class='alert alert-success'>Location price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating location price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- Location ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Location Status</label>
        <div class="col-sm-6">
            <input type="text" name="location_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_location_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_location_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- Location ON/OFF (End) -->

<!-- Location Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Location Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_location_price" class="form-control" value="<?php echo $cc_location_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_location_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- Location Price End -->



<!-- NID to All Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_NidToAll_control'];
    $cc_NidToAll_pricee = $row['cc_NidToAll_price'];
    $st = ($apr == 1) ? "NidToAll ON" : "NidToAll OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_NidToAll_on'])) {
        $update_sql = "UPDATE text_control SET cc_NidToAll_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "NidToAll ON";
        } else {
            echo "Error updating NidToAll status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_NidToAll_off'])) {
        $update_sql = "UPDATE text_control SET cc_NidToAll_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "NidToAll OFF";
        } else {
            echo "Error updating NidToAll status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_NidToAll_price_save'])) {
        $new_price = intval($_POST['cc_NidToAll_price']);
        $update_price_sql = "UPDATE text_control SET cc_NidToAll_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_location_pricee = $new_price;
            echo "<div class='alert alert-success'>NidToAll price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating NidToAll price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- NID to All ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">NidToAll Status</label>
        <div class="col-sm-6">
            <input type="text" name="NidToAll_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_NidToAll_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_NidToAll_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- NID to All ON/OFF (End) -->

<!-- NID to All Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">NidToAll Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_NidToAll_price" class="form-control" value="<?php echo $cc_NidToAll_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_NidToAll_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- NID to All Price End -->

<!-- IMEI to All Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_IMEIToActive_control'];
    $cc_ImeiToActive_pricee = $row['cc_ImeiToActive_price'];
    $st = ($apr == 1) ? "ImeiToActive ON" : "ImeiToActive OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_IMEIToActive_on'])) {
        $update_sql = "UPDATE text_control SET cc_IMEIToActive_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "ImeiToActive ON";
        } else {
            echo "Error updating IMEIToActive status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_IMEIToActive_off'])) {
        $update_sql = "UPDATE text_control SET cc_IMEIToActive_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "IMEIToActive OFF";
        } else {
            echo "Error updating IMEIToActive status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_ImeiToActive_price_save'])) {
        $new_price = intval($_POST['cc_ImeiToActive_price']);
        $update_price_sql = "UPDATE text_control SET cc_ImeiToActive_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_ImeiToActive_pricee = $new_price;
            echo "<div class='alert alert-success'>ImeiToActive price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating IMEIToActive price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- IMEI to All ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">IMEIToAll Status</label>
        <div class="col-sm-6">
            <input type="text" name="IMEIToActive_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_IMEIToActive_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_IMEIToActive_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- IMEI to All ON/OFF (End) -->

<!-- IMEI to All Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">ImeiToActive Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_ImeiToActive_price" class="form-control" value="<?php echo $cc_ImeiToActive_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_ImeiToActive_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- IMEI to All Price End -->

<!-- NOGOD INFO Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_Nogod_control'];
    $cc_Nogod_pricee = $row['cc_Nogod_price'];
    $st = ($apr == 1) ? "Nogod ON" : "Nogod OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_Nogod_on'])) {
        $update_sql = "UPDATE text_control SET cc_Nogod_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "Nogod ON";
        } else {
            echo "Error updating Nogod status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Nogod_off'])) {
        $update_sql = "UPDATE text_control SET cc_Nogod_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "Nogod OFF";
        } else {
            echo "Error updating Nogod status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Nogod_price_save'])) {
        $new_price = intval($_POST['cc_Nogod_price']);
        $update_price_sql = "UPDATE text_control SET cc_Nogod_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_Nogod_pricee = $new_price;
            echo "<div class='alert alert-success'>Nogod price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Nogod price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- NOGOD INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Nogod Info Status</label>
        <div class="col-sm-6">
            <input type="text" name="Nogod_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_Nogod_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_Nogod_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- NOGOD INFO ON/OFF (End) -->

<!-- NOGOD INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Nogod Info Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_Nogod_price" class="form-control" value="<?php echo $cc_Nogod_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_Nogod_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- NOGOD INFO Price End -->


<!-- Bksh INFO Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_Bksh_control'];
    $cc_Bksh_pricee = $row['cc_Bksh_price'];
    $st = ($apr == 1) ? "Bksh ON" : "Bksh OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_Bksh_on'])) {
        $update_sql = "UPDATE text_control SET cc_Bksh_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "Bksh ON";
        } else {
            echo "Error updating Bksh status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Bksh_off'])) {
        $update_sql = "UPDATE text_control SET cc_Bksh_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "Bksh OFF";
        } else {
            echo "Error updating Bksh status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Bksh_price_save'])) {
        $new_price = intval($_POST['cc_Bksh_price']);
        $update_price_sql = "UPDATE text_control SET cc_Bksh_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_Bksh_pricee = $new_price;
            echo "<div class='alert alert-success'>Bksh price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Bksh price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- Bksh INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Bksh Info Status</label>
        <div class="col-sm-6">
            <input type="text" name="Bksh_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_Bksh_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_Bksh_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- BKSH INFO ON/OFF (End) -->

<!-- BKSH INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Bksh Info Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_Bksh_price" class="form-control" value="<?php echo $cc_Bksh_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_Bksh_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- BKSH INFO Price End -->

<!-- Roket INFO Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_Roket_control'];
    $cc_Roket_pricee = $row['cc_Roket_price'];
    $st = ($apr == 1) ? "Roket ON" : "Roket OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_Roket_on'])) {
        $update_sql = "UPDATE text_control SET cc_Roket_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "Roket ON";
        } else {
            echo "Error updating Roket status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Roket_off'])) {
        $update_sql = "UPDATE text_control SET cc_Roket_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "Roket OFF";
        } else {
            echo "Error updating Roket status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Roket_price_save'])) {
        $new_price = intval($_POST['cc_Roket_price']);
        $update_price_sql = "UPDATE text_control SET cc_Roket_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_Roket_pricee = $new_price;
            echo "<div class='alert alert-success'>Roket price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Roket price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- Roket INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Roket Info Status</label>
        <div class="col-sm-6">
            <input type="text" name="Roket_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_Roket_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_Roket_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- Roket INFO ON/OFF (End) -->

<!-- Roket INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Roket Info Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_Roket_price" class="form-control" value="<?php echo $cc_Roket_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_Roket_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- ROKET INFO Price End -->


<!-- Bmet INFO Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_Bmet_control'];
    $cc_Bmet_pricee = $row['cc_Bmet_price'];
    $st = ($apr == 1) ? "Bmet ON" : "Bmet OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_Bmet_on'])) {
        $update_sql = "UPDATE text_control SET cc_Bmet_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "Bmet ON";
        } else {
            echo "Error updating Bmet status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Bmet_off'])) {
        $update_sql = "UPDATE text_control SET cc_Bmet_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "Bmet OFF";
        } else {
            echo "Error updating Bmet status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_Bmet_price_save'])) {
        $new_price = intval($_POST['cc_Bmet_price']);
        $update_price_sql = "UPDATE text_control SET cc_Bmet_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_Bmet_pricee = $new_price;
            echo "<div class='alert alert-success'>Bmet price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Bmet price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- Bmet INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Bmet Info Status</label>
        <div class="col-sm-6">
            <input type="text" name="Bmet_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_Bmet_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_Bmet_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- Bmet INFO ON/OFF (End) -->

<!-- Bmet INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Bmet Info Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_Bmet_price" class="form-control" value="<?php echo $cc_Bmet_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_Bmet_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- BMET INFO Price End -->



<!-- BRS INFO Start -->
<?php
// Fetch the text_control record
$sql = "SELECT * FROM text_control WHERE id='1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $apr = $row['cc_BRS_control'];
    $cc_BRS_pricee = $row['cc_BRS_price'];
    $st = ($apr == 1) ? "BRS ON" : "BRS OFF";
} else {
    die("Error fetching control data.");
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['cc_BRS_on'])) {
        $update_sql = "UPDATE text_control SET cc_BRS_control = 1 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 1;
            $st = "BRS ON";
        } else {
            echo "Error updating BRS status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_BRS_off'])) {
        $update_sql = "UPDATE text_control SET cc_BRS_control = 0 WHERE id='1'";
        if (mysqli_query($link, $update_sql)) {
            $apr = 0;
            $st = "BRS OFF";
        } else {
            echo "Error updating BRS status: " . mysqli_error($link);
        }
    } elseif (isset($_POST['cc_BRS_price_save'])) {
        $new_price = intval($_POST['cc_BRS_price']);
        $update_price_sql = "UPDATE text_control SET cc_BRS_price = $new_price WHERE id='1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_BRS_pricee = $new_price;
            echo "<div class='alert alert-success'>BRS price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating BRS price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- BRS INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">BRS Info Status</label>
        <div class="col-sm-6">
            <input type="text" name="BRS_on_off" class="form-control" disabled style="background: none;" value="<?php echo $st; ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($apr == 0): ?>
                <button class="btn btn-success" name="cc_BRS_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_BRS_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- BRS INFO ON/OFF (End) -->

<!-- BRS INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">BRS Info Price</label>
        <div class="col-sm-6">
            <input type="number" name="cc_BRS_price" class="form-control" value="<?php echo $cc_BRS_pricee; ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="cc_BRS_price_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- BRS INFO Price End -->


<!-- USER ID PASS START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_useridpass_control'];
    $cc_userid_price = $row['cc_useridpass_price'];
    $st = ($cc_userid_control == 1) ? "NID ID PASS ON" : "NID ID PASS OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_userid_on'])) {
        $update_sql = "UPDATE file_control SET cc_useridpass_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "NID User Id ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating NID User Id status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_userid_off'])) {
        $update_sql = "UPDATE file_control SET cc_useridpass_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "NID User Id OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating NID User Id status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['userid_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_useridpass_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_userid_price = $new_price;
            echo "<div class='alert alert-success'>NID User Id price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating NID User Id price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- NID ID PASS ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">NID ID PASS Status</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_userid_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_userid_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- NID ID PASS ON/OFF (End) -->

<!-- NID ID PASS Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">NID ID PASS Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_userid_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="userid_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- NID ID PASS Price End -->


<!--  Call List 3 month START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_calllist_control'];
    $cc_calllist_price = $row['cc_calllist_price'];
    $st = ($cc_userid_control == 1) ? "Call List 3 month ON" : "Call List 3 month OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_calllist_on'])) {
        $update_sql = "UPDATE file_control SET cc_calllist_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = " Call List 3 month ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating  Call List 3 month status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_calllist_off'])) {
        $update_sql = "UPDATE file_control SET cc_calllist_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = " Call List 3 month OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating  Call List 3 month status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['calllist_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_calllist_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_calllist_price = $new_price;
            echo "<div class='alert alert-success'> Call List 3 month price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating  Call List 3 month price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--  Call List 3 month ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label"> Call List 3 month Status</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_calllist_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_calllist_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--  Call List 3 month ON/OFF (End) -->

<!-- Call List 3 month Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Call List 3 month Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_calllist_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="calllist_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- Call List 3 month Price End -->


<!--  Call List 6 month START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_calllist2_control'];
    $cc_calllist2_price = $row['cc_calllist2_price'];
    $st = ($cc_userid_control == 1) ? "Call List 6 month ON" : "Call List 6 month OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_calllist2_on'])) {
        $update_sql = "UPDATE file_control SET cc_calllist2_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "Call List 6 month ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating Call List 6 month status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_calllist2_off'])) {
        $update_sql = "UPDATE file_control SET cc_calllist2_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "Call List 6 month OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating Call List 6 month status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['calllist2_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_calllist2_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_calllist2_price = $new_price;
            echo "<div class='alert alert-success'>Call List 6 month price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Call List 6 month price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!-- Call List 6 month ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Call List 6 month Status</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_calllist2_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_calllist2_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!-- Call List 6 month ON/OFF (End) -->

<!-- Call List 6 month Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Call List 6 month Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_calllist2_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="calllist2_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!-- Call List 6 month Price End -->


<!-- nameaddressSTART -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_nameaddress_control'];
    $cc_nameaddress_price = $row['cc_nameaddress_price'];
    $st = ($cc_userid_control == 1) ? "nameaddress ON" : "nameaddressOFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_nameaddress_on'])) {
        $update_sql = "UPDATE file_control SET cc_nameaddress_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "nameaddress ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating nameaddress status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_nameaddress_off'])) {
        $update_sql = "UPDATE file_control SET cc_nameaddress_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "nameaddress OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating nameaddress status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['roketstatement_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_nameaddress_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_nameaddress_price = $new_price;
            echo "<div class='alert alert-success'>nameaddress price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating nameaddress price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--nameaddress ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">name address</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_nameaddress_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_nameaddress_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--nameaddress ON/OFF (End) -->

<!--nameaddress Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">nameaddress Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_nameaddress_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="roketstatement_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--nameaddress Price End -->



<!-- E PASS PORT INFO START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_passportvarify_control'];
    $cc_passportvarify_price = $row['cc_passportvarify_price'];
    $st = ($cc_userid_control == 1) ? "E PASS PORT INFO ON" : "Call List 6 month OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_passportvarify_on'])) {
        $update_sql = "UPDATE file_control SET cc_passportvarify_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "E PASS PORT INFO ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating E PASS PORT INFO status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_passportvarify_off'])) {
        $update_sql = "UPDATE file_control SET cc_passportvarify_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "Call List 6 month OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating E PASS PORT INFO status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['passportvarify_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_passportvarify_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_passportvarify_price = $new_price;
            echo "<div class='alert alert-success'>Call List 6 month price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating E PASS PORT INFO price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--E PASS PORT INFO ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">E PASS PORT INFO</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_passportvarify_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_passportvarify_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--E PASS PORT INFO ON/OFF (End) -->

<!--E PASS PORT INFO Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">E PASS PORT INFO Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_passportvarify_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="passportvarify_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--E PASS PORT INFO Price End -->




<!-- MRP Passport SB Copy START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_PassportSB_control'];
    $cc_PassportSB_price = $row['cc_PassportSB_price'];
    $st = ($cc_userid_control == 1) ? "MRP Passport SB Copy  ON" : "MRP Passport SB Copy OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_PassportSB_on'])) {
        $update_sql = "UPDATE file_control SET cc_PassportSB_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "MRP Passport SB Copy  ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating MRP Passport SB Copy  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_PassportSB_off'])) {
        $update_sql = "UPDATE file_control SET cc_PassportSB_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "MRP Passport SB Copy  OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating MRP Passport SB Copy  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['PassportSB_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_PassportSB_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_PassportSB_price = $new_price;
            echo "<div class='alert alert-success'>MRP Passport SB Copy  price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating MRP Passport SB Copy  price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--MRP Passport SB Copy  ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">MRP Passport SB Copy</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_PassportSB_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_PassportSB_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--MRP Passport SB Copy  ON/OFF (End) -->

<!--MRP Passport SB Copy  Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">MRP Passport SB Copy Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_PassportSB_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="PassportSB_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--MRP Passport SB Copy  Price End -->


<!-- E Passport SB Copy START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_passportdeliveryslip_control'];
    $cc_passportdeliveryslip_price = $row['cc_passportdeliveryslip_price'];
    $st = ($cc_userid_control == 1) ? "E Passport SB Copy  ON" : "E Passport SB Copy OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_passportdeliveryslip_on'])) {
        $update_sql = "UPDATE file_control SET cc_passportdeliveryslip_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "E Passport SB Copy  ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating E Passport SB Copy  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_passportdeliveryslip_off'])) {
        $update_sql = "UPDATE file_control SET cc_passportdeliveryslip_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "E Passport SB Copy  OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating E Passport SB Copy  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['passportdeliveryslip_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_passportdeliveryslip_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_passportdeliveryslip_price = $new_price;
            echo "<div class='alert alert-success'>E Passport SB Copy  price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating E Passport SB Copy  price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--E Passport SB Copy  ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">E Passport SB Copy</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_passportdeliveryslip_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_passportdeliveryslip_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--E Passport SB Copy  ON/OFF (End) -->

<!--E Passport SB Copy  Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">E Passport SB Copy Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_passportdeliveryslip_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="passportdeliveryslip_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--E Passport SB Copy  Price End -->



<!-- Nogod Statement  START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_nogodstatement_control'];
    $cc_nogodstatement_price = $row['cc_nogodstatement_price'];
    $st = ($cc_userid_control == 1) ? "Nogod Statement  ON" : "Nogod Statement OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_nogodstatement_on'])) {
        $update_sql = "UPDATE file_control SET cc_nogodstatement_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "Nogod Statement  ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating Nogod Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_nogodstatement_off'])) {
        $update_sql = "UPDATE file_control SET cc_nogodstatement_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "Nogod Statement  OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating Nogod Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['nogodstatement_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_nogodstatement_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_nogodstatement_price = $new_price;
            echo "<div class='alert alert-success'>Nogod Statement  price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Nogod Statement  price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--Nogod Statement  ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Nogod Statement</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_nogodstatement_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_nogodstatement_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--Nogod Statement  ON/OFF (End) -->

<!--Nogod Statement  Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Nogod Statement Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_nogodstatement_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="nogodstatement_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--Nogod Statement  Price End -->


<!-- BKsh Statement START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_bkshstatement_control'];
    $cc_bkshstatement_price = $row['cc_bkshstatement_price'];
    $st = ($cc_userid_control == 1) ? "BKsh Statement  ON" : "BKsh Statement OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_bkshstatement_on'])) {
        $update_sql = "UPDATE file_control SET cc_bkshstatement_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "BKsh Statement  ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating BKsh Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_bkshstatement_off'])) {
        $update_sql = "UPDATE file_control SET cc_bkshstatement_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "BKsh Statement  OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating BKsh Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['bkshstatement_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_bkshstatement_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_bkshstatement_price = $new_price;
            echo "<div class='alert alert-success'>BKsh Statement  price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating BKsh Statement  price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--BKsh Statement  ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">BKsh Statement</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_bkshstatement_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_bkshstatement_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--BKsh Statement  ON/OFF (End) -->

<!--BKsh Statement  Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">BKsh Statement Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_bkshstatement_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="bkshstatement_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--BKsh Statement  Price End -->


<!-- Roket Statement START -->
<?php
// Fetch the `file_control` record
$sql = "SELECT * FROM file_control WHERE id = '1'";
$result = mysqli_query($link, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $cc_userid_control = $row['cc_roketstatement_control'];
    $cc_roketstatement_price = $row['cc_roketstatement_price'];
    $st = ($cc_userid_control == 1) ? "Roket Statement  ON" : "Roket Statement OFF";
} else {
    die("Error fetching control data: " . mysqli_error($link));
}

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (isset($_POST['cc_roketstatement_on'])) {
        $update_sql = "UPDATE file_control SET cc_roketstatement_control = 1 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 1;
            $st = "Roket Statement  ON";
        } else {
            echo "<div class='alert alert-danger'>Error updating Roket Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['cc_roketstatement_off'])) {
        $update_sql = "UPDATE file_control SET cc_roketstatement_control = 0 WHERE id = '1'";
        if (mysqli_query($link, $update_sql)) {
            $cc_userid_control = 0;
            $st = "Roket Statement  OFF";
        } else {
            echo "<div class='alert alert-danger'>Error updating Roket Statement  status: " . mysqli_error($link) . "</div>";
        }
    } elseif (isset($_POST['roketstatement_save'])) {
        $new_price = intval($_POST['userid']);
        $update_price_sql = "UPDATE file_control SET cc_roketstatement_price = $new_price WHERE id = '1'";
        if (mysqli_query($link, $update_price_sql)) {
            $cc_roketstatement_price = $new_price;
            echo "<div class='alert alert-success'>Roket Statement  price updated successfully.</div>";
        } else {
            echo "<div class='alert alert-danger'>Error updating Roket Statement  price: " . mysqli_error($link) . "</div>";
        }
    }
}
?>

<!--Roket Statement  ON/OFF (Start) -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Roket Statement</label>
        <div class="col-sm-6">
            <input type="text" name="userid_on_off" class="form-control" disabled style="background: none;" value="<?php echo htmlspecialchars($st); ?>">
        </div>
        <div class="col-sm-8 col-lg-2">
            <?php if ($cc_userid_control == 0): ?>
                <button class="btn btn-success" name="cc_roketstatement_on" type="submit">Turn ON</button>
            <?php else: ?>
                <button class="btn btn-danger" name="cc_roketstatement_off" type="submit">Turn OFF</button>
            <?php endif; ?>
        </div>
    </div>
</form>
<!--Roket Statement  ON/OFF (End) -->

<!--Roket Statement  Price Start -->
<form method="post" class="form-horizontal" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-sm-2 control-label">Roket Statement Price</label>
        <div class="col-sm-6">
            <input type="number" name="userid" class="form-control" value="<?php echo htmlspecialchars($cc_roketstatement_price); ?>" required>
        </div>
        <div class="col-sm-8 col-lg-2">
            <button class="btn btn-primary" name="roketstatement_save" type="submit">Save</button>
        </div>
    </div>
</form>
<!--Roket Statement  Price End -->




									<!-- NOTICE START -->
									</div>
								</div>
							</div>

							<div class="col-md-12">
								<h2>Broadcast Notice</h2>
								<div class="panel panel-default">
									<div class="panel-heading">Edit Info</div>
									<?php if ($error) { ?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php } else if ($msg) { ?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php } ?>

									<div class="panel-body">
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 1</label>
												<div class="col-sm-6">
													<input style="background: #673ab778;border: 2px solid #00f7be;" type="text" name="notice1" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='1'";
															if ($result = mysqli_query($link, $sql)) {
																if (mysqli_num_rows($result) > 0) {
																	while ($row = mysqli_fetch_array($result)) {
																		echo $row['notice'];
																	}
																}
															}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update1" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  "> </div>
												<!--<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit1" type="submit">Publish</button>
												</div>-->
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">



										</form>
<!--
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 2</label>
												<div class="col-sm-6">
													<input type="text" name="notice2" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='2'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update2" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit2" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">

										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 3</label>
												<div class="col-sm-6">
													<input type="text" name="notice3" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='3'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update3" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit3" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 4</label>
												<div class="col-sm-6">
													<input type="text" name="notice4" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='4'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update4" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit4" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">



										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 5</label>
												<div class="col-sm-6">
													<input type="text" name="notice5" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='5'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update5" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit5" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 6</label>
												<div class="col-sm-6">
													<input type="text" name="notice6" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='6'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update6" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit6" type="submit">Publish</button>
												</div>

											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 7</label>
												<div class="col-sm-6">
													<input type="text" name="notice7" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='7'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update7" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit7" type="submit">Publish</button>
												</div>
											</div>

											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 8</label>
												<div class="col-sm-6">
													<input type="text" name="notice8" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='8'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update8" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit8" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 9</label>
												<div class="col-sm-6">
													<input type="text" name="notice9" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='9'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update9" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit9" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>

										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Notice 10</label>
												<div class="col-sm-6">
													<input type="text" name="notice10" class="form-control" value="<?php $sql = "SELECT * FROM notice WHERE id='10'";
																													if ($result = mysqli_query($link, $sql)) {
																														if (mysqli_num_rows($result) > 0) {
																															while ($row = mysqli_fetch_array($result)) {
																																echo $row['notice'];
																															}
																														}
																													}  ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="update10" type="submit"> Update</button>
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="submit10" type="submit">Publish</button>
												</div>
											</div>


											<input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">


										</form>
--->
									</div>
								</div>
							</div>
						</div>
								<div class="panel panel-default">
									<div class="panel-heading">Server Copy API</div>
									<div class="panel-body">
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">API Balance</label>
												<div class="col-sm-6">
													<input style="background: #00bcd438;bo;border: 2px solid #e91e63ab;font-weight: bold;" readonly type="text" name="notice1" class="form-control" value="<?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://api.friend-wel.xyz/al1NpR1yA7.txt'); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); echo $contents = curl_exec($curl); curl_close($curl); ?>">
												</div>
											</div>
										</form>
            				</div>
            			</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Loading Scripts -->
	<script src="js/jquery.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/main.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			setTimeout(function() {
				$('.succWrap').slideUp("slow");
			}, 3000);
		});
	</script>
</body>

</html>
<?php  ?>