<?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 {
		// echo "failed";
	}



	if (isset($_POST['update1'])) {
		$update = $_POST['notice1'];
		$id = 1;
	
	} 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_ngstate_on'])) {
        $sql2 = 'UPDATE control SET cc_ng_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_bk_off'])) {
        $sql2 = 'UPDATE control SET cc_ng_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }
	 if (isset($_POST['cc_ng_on'])) {
        $sql2 = 'UPDATE control SET cc_ng_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_ngstate_off'])) {
        $sql2 = 'UPDATE control SET cc_ng_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }
    if (isset($_POST['cc_nginfo_on'])) {
        $sql2 = 'UPDATE control SET cc_nginfo_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_nginfo_off'])) {
        $sql2 = 'UPDATE control SET cc_nginfo_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }    
    if (isset($_POST['cc_nidallnumber_on'])) {
        $sql2 = 'UPDATE control SET cc_nidallnumber_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_nidallnumber_off'])) {
        $sql2 = 'UPDATE control SET cc_nidallnumber_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
    if (isset($_POST['cc_imei_on'])) {
        $sql2 = 'UPDATE control SET cc_imei_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_imei_off'])) {
        $sql2 = 'UPDATE control SET cc_imei_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
    if (isset($_POST['cc_rocketinfo_on'])) {
        $sql2 = 'UPDATE control SET cc_rocketinfo_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_rocketinfo_off'])) {
        $sql2 = 'UPDATE control SET cc_rocketinfo_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
    if (isset($_POST['cc_bkashinfo_on'])) {
        $sql2 = 'UPDATE control SET cc_bkashinfo_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_bkashinfo_off'])) {
        $sql2 = 'UPDATE control SET cc_bkashinfo_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
    if (isset($_POST['cc_numberloc_on'])) {
        $sql2 = 'UPDATE control SET cc_numberloc_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_numberloc_off'])) {
        $sql2 = 'UPDATE control SET cc_numberloc_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
    if (isset($_POST['cc_calllist_on'])) {
        $sql2 = 'UPDATE control SET cc_calllist_control=1 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned ON';
        }
    } elseif (isset($_POST['cc_calllist_off'])) {
        $sql2 = 'UPDATE control SET cc_calllist_control=0 WHERE id = 1';
        if ($result = mysqli_query($link, $sql2)) {
            $msg1 = 'Turned OFF';
        }
    }	
	
    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';
        }
    }


	// Price Update Settings by KD (START). 
	
	if (isset($_POST['cc_ng_price'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
	
    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_ng_control'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    
    if (isset($_POST['cc_nagad_control'])) {
        $price = $_POST['cc_nagad_price'];
        $sql = "UPDATE control SET cc_nagad_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_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";
        }
    }
    if (isset($_POST['cc_ng_control'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_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_calllist_control'])) {
        $price = $_POST['cc_calllist_price'];
        $sql = "UPDATE control SET cc_calllist_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }    
    if (isset($_POST['cc_numberloc_control'])) {
        $price = $_POST['cc_numberloc_price'];
        $sql = "UPDATE control SET cc_numberloc_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }    
    if (isset($_POST['cc_bkashinfo_control'])) {
        $price = $_POST['cc_bkashinfo_price'];
        $sql = "UPDATE control SET cc_bkashinfo_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_rocketinfo_control'])) {
        $price = $_POST['cc_rocketinfo_price'];
        $sql = "UPDATE control SET cc_rocketinfo_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_imei_control'])) {
        $price = $_POST['cc_imei_price'];
        $sql = "UPDATE control SET cc_imei_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    } 
    if (isset($_POST['cc_nidallnumber_control'])) {
        $price = $_POST['cc_nidallnumber_price'];
        $sql = "UPDATE control SET cc_nidallnumber_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    } 
    if (isset($_POST['cc_bk_control'])) {
        $price = $_POST['cc_bk_price'];
        $sql = "UPDATE control SET cc_bk_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    } 
    if (isset($_POST['cc_ng_control'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_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_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_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_price'])) {
        $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['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_calllist_control'])) {
        $price = $_POST['cc_calllist_price'];
        $sql = "UPDATE control SET cc_calllist_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
     
} 

        
    }
 
    if (isset($_POST['cc_numbertoloc_control'])) {
        $price = $_POST['cc_numbertoloc_price'];
        $sql = "UPDATE control SET cc_numbertoloc_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    
    if (isset($_POST['cc_bkashinfo_control'])) {
        $price = $_POST['cc_bkashinfo_price'];
        $sql = "UPDATE control SET cc_bkashinfo_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_rocketinfo_control'])) {
        $price = $_POST['cc_rocketinfo_price'];
        $sql = "UPDATE control SET cc_rocketinfo_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_ng_control'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_imei_control'])) {
        $price = $_POST['cc_imei_price'];
        $sql = "UPDATE control SET cc_imei_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_nidallnumber_control'])) {
        $price = $_POST['cc_nidallnumber_price'];
        $sql = "UPDATE control SET cc_nidallnumber_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_bk_control'])) {
        $price = $_POST['cc_bk_price'];
        $sql = "UPDATE control SET cc_bk_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    if (isset($_POST['cc_ng_control'])) {
        $price = $_POST['cc_ng_price'];
        $sql = "UPDATE control SET cc_ng_price=$price WHERE id = 1";
        if ($result = mysqli_query($link, $sql)) {
            $msg1 = "Price seted to $price";
        }
    }
    
    if (isset($_POST['cc_tin_price'])) {
        $price = $_POST['cc_tin_price'];
        $sql = "UPDATE control SET tin=$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['cc_nginfo_price'])) {
		$serverAndSignCharge = $_POST['cc_nginfo_price'];
		$sql2 = "UPDATE control SET cc_nginfo_price=$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">Card Making Price</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 -->
										

										<!-- 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 (Un Official) 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 -->
										
										
										
										
										
										<!-- card 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"> Birth Card 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>

										<!-- card Copy Price End -->
										
										
										
										
										
										<!-- numberloc 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_numberloc_price = $row['cc_numberloc_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">Order Number to Locatin Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_numberloc_price" class="form-control" value="<?php echo $cc_numberloc_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_numberloc_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>

          <!-- numberloc Price End -->
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										<!-- calllist 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_calllist_price = $row['cc_calllist_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Call List</label>
												<div class="col-sm-6">
													<input type="number" name="cc_calllist_price" class="form-control" value="<?php echo $cc_calllist_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_calllist_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>

										<!-- calllist Price End -->	
										
										
										
										
										
										
										
										
										
										
										
										
										
										
											

										<?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 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_tin_price = $row['tin'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">TIN</label>
												<div class="col-sm-6">
													<input type="number" name="cc_tin_price" class="form-control" value="<?php echo $cc_tin_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>

										<!-- server Copy Price 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)) {
														$apr = $row['cc_bio_control'];
														if ($apr == 1) {
															$st = "server ON";
														} else {
															$st = "server OFF";
														}
													}
												}
											} 
										?>
										
									<?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 -->
										
										
										
										
										
										
                                        <!-- nagad 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">All Sim Sms List 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>

										<!-- nagad info Price End -->
										 
										
										
										
										<!-- nagad 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_nginfo_price = $row['cc_nginfo_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Nagad Info Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_nginfo_price" class="form-control" value="<?php echo $cc_nginfo_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_nagad_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>

										<!-- nagad info Price End -->
										
										
											
										<!-- nagad 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_ng_price = $row['cc_ng_price'];
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">
											<div class="form-group">
												<label class="col-sm-2 control-label">Nagad Statement Price</label>
												<div class="col-sm-6">
													<input type="number" name="cc_ng_price" class="form-control" value="<?php echo $cc_ng_price; ?>">
												</div>
												<div class="col-sm-8 col-lg-2  ">
													<button class="btn btn-primary" name="cc_nagad_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>

										<!-- nagad info Price End -->
										
										
										
										
										
										
										
										 <!-- bkashinfo 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_bkashinfo_price = $row['cc_bkashinfo_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">Bkash Info Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_bkashinfo_price" class="form-control" value="<?php echo $cc_bkashinfo_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_bkashinfo_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>

          <!-- bkashinfo Price End -->
										
										
										
										<!-- imei 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_imei_price = $row['cc_imei_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">Imei Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_imei_price" class="form-control" value="<?php echo $cc_imei_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_imei_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>

          <!-- imei Price End -->
										
										 <!-- nidallnumber 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_nidallnumber_price = $row['cc_nidallnumber_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">nid all number Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_nidallnumber_price" class="form-control" value="<?php echo $cc_nidallnumber_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_nidallnumber_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>

          <!-- nidallnumber Price End -->
										
										
										<!-- rocketinfo 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_rocketinfo_price = $row['cc_rocketinfo_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">Rocket Info Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_rocketinfo_price" class="form-control" value="<?php echo $cc_rocketinfo_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_rocketinfo_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>

          <!-- rocketinfo Price End --> 
										
										
										
										
										
										
										<!-- bkashstsat 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_bk_price = $row['cc_bk_price'];
             }
            }
           } 
          ?>
          
          <form method="post" class="form-horizontal" enctype="multipart/form-data">
           <div class="form-group">
            <label class="col-sm-2 control-label">Nagad Info Price</label>
            <div class="col-sm-6">
             <input type="number" name="cc_bk_price" class="form-control" value="<?php echo $cc_bk_price; ?>">
            </div>
            <div class="col-sm-8 col-lg-2  ">
             <button class="btn btn-primary" name="cc_bk_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>

          <!-- bkashstat 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) -->
										
										
										
										
										<!-- card 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  Card Order 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>

										<!-- card 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) -->

									
										<!-- card 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 = "card ON";
														} else {
															$st = "card OFF";
														}
													}
												}
											} 
										?>
										
										<form method="post" class="form-horizontal" enctype="multipart/form-data">

											<div class="form-group">
												<label class="col-sm-2 control-label">Card</label>
												<div class="col-sm-6">
													<input type="text" name="card_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>
										
										<!-- card ON/OFF (END) -->

										

										
										<!-- bio kd start/of -->
				<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="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_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) -->

									

										<!-- call list 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_calllist_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">Call LIst</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_calllist_control'];
																if ($apr == 0) {
																	echo "<button class='btn btn-success'  name='cc_calllist_on' type='submit'>Turn ON</button>";
																} else {
																	echo "<button class='btn btn-danger'  name='cc_calllist_off' type='submit'>Turn OFF</button>";
																}
															}
														}
													}  ?>
												</div>
											</div>

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

										
										
										
										
										
										
										
																				<!-- call list 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_server_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">Sms LIst</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>
										
										<!-- call list ON/OFF (END) -->

										
										
										
										
										
										
										
										
										
										
										
										<!-- call list 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_numberloc_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">Number to Location</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_numberloc_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_numberloc_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_numberloc_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

         
          
<!-- Bkash Info 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_bkashinfo_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">Bkash Info</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_bkashinfo_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_bkashinfo_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_bkashinfo_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

         

          
          <!-- imei 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_imei_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">Imei To Active Number</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_imei_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_imei_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_imei_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

          
          
         <!-- nid all number 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_nidallnumber_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">nid all number</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_nidallnumber_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_nidallnumber_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_nidallnumber_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

         
          
          <!-- rocketinfo 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_rocketinfo_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">Rocket Info</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_rocketinfo_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_rocketinfo_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_rocketinfo_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

          
          
           <!-- Nagad_Info 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_nginfo_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">Nagad_Info</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_nginfo_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_nginfo_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_nginfo_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

           <input type="hidden" name="editid" class="form-control" required value="<?php echo htmlentities($result->id); ?>">
          </form>
          
          <!-- Nagad_Info ON/OFF (END) -->
          
          
          
            <!-- Nagad_State 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_ng_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">Nagad_Statement</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_ng_control'];
                if ($apr == 0) {
                 echo "<button class='btn btn-success'  name='cc_ngstate_on' type='submit'>Turn ON</button>";
                } else {
                 echo "<button class='btn btn-danger'  name='cc_ngstate_off' type='submit'>Turn OFF</button>";
                }
               }
              }
             }  ?>
            </div>
           </div>

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

          

									</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); ?>">


								
								
								
								
								
												</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">

												

										</form>

									</div>
								</div>
							</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>
