<html>
	<head>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" href="css/main.css">
	</head>
	<body>
		<div class="topbar" style="box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: 70px; padding: 0px 24px; display: flex; justify-content: space-between; background-color: rgb(33, 33, 33);">
			<div style="position: relative; display: flex; justify-content: space-between;">
				<img src="img/billrun-logo-tm.png" />
			</div>
		</div>
		<div className="container-fluid main-content">
			<div className="contents">
				<div class="container">
					<h3>Company Name</h3>
					<form class="form-horizontal" action="/paypage/create">
						<div class="panel panel-primary">
							<div class="panel-heading">
								<h4>Customer Information</h4>
							</div>
							<div class="panel-body">
								<?php
								foreach ($config as $c) {
									if ($c['display'] === false)
										continue;
									echo "<div class='form-group'>";
									echo "<div class='col-md-3'>"
									. "<label for='" . $c['field_name'] . "' >" . $c['field_name'] . "</label>"
									. "<input class='form-control' type='text' name='" . $c['field_name'] . "' " . (!empty($account) ? 'disabled=disabled' : '') . " "
										. "placeholder=" . $c['field_name'] . " id='" . $c['field_name'] . "' "
										. "value='" . $account[$c['field_name']] . "' " . ($c['mandatory'] ? 'required=required' : '') . " />"
									. "</div>";
									echo "</div>";
								}
								?>
								<input type="hidden" name="aid" id="aid" value="<?php echo $account['aid']; ?>" />
							</div>
						</div>
						<div class="panel panel-primary">
							<div class="panel-heading">
								<h4>Plan Information</h4>
							</div>
							<div class="panel-body">
								<div class="row">
									<div class="col-md-3">
										<label for="plan">Plan</label>
										<select name="plan" id="plan" class="form-control">
										<?php
										foreach ($plans as $plan) {
											echo "<option value='" . $plan . "'>";
													echo $plan;
											echo "</option>";
										}
										?>
										</select>
									</div>
								</div>
							</div>
						</div>
						<div class="panel panel-primary">
							<div class="panel-heading">
								<h4>Payment Gateway</h4>
        						<div>
	        					<div class="panel-body">
		                				  <div class="row">
				                        		    <div class="col-md-12">
							                      <label for="payment_gateway">Payment Gateway</label>
									    </div>
								  </div>
								  <div class="row">
								    <?php
								       foreach ($payment_gateways as $pg) {
								       echo "<div class='col-md-3'>";
								       echo "<div class='radio'>";
								       echo "<label>";
								       echo "<input type='radio' name='payment_gateway' value='" . $pg['name'] . "'>";
								       if (!empty($pg['image_url'])) {
  								       echo "<img src='" . $pg['image_url'] . "' />";
								       } else {
								       echo $pg['name'];
								       }
								       echo "</label>";
								       echo "</div>";
								       echo "</div>";
								       }
								       ?>
								  </div>
							</div>
						</div>
						<div class="pull-left">
							<button class="btn btn-primary">Submit</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>
