<?php
	if($_POST){
		$islem = $db->prepare("UPDATE iyzico SET setApiKey = ?, setSecretKey = ?");
		$islem = $islem->execute(array($_POST['setApiKey'],$_POST['setSecretKey']));
		if($islem){
			echo b();
		}else{
			echo h();
		}
	}
	$duzenle = $db->query("SELECT * FROM iyzico")->fetch(PDO::FETCH_ASSOC);
?>

<div class="page-header">
	<div class="page-leftheader">
		<h4 class="page-title">İyzico Api Ayarı</h4>
	</div>
	<div class="page-rightheader ml-auto d-lg-flex d-none">
		<ol class="breadcrumb">
			<li class="breadcrumb-item"><a href="index.php">Anasayfa</a></li>
			<li class="breadcrumb-item active" aria-current="page">İyzico Api Ayarı</li>
		</ol>
	</div>
</div>
						
<div class="row">
	
	<div class="col-md-12">
		<div class="card">
			<div class="card-body">
				<div class="row">
					<div class="col-md-12">
						
						<form class="form-horizontal" method="post" action="">

							<div class="form-group row">
								<label class="col-md-3 form-label">setApiKey</label>
								<div class="col-md-9">
									<input type="text" class="form-control" name="setApiKey" value="<?php echo @$duzenle['setApiKey']; ?>">
								</div>
							</div>
							
							<div class="form-group row">
								<label class="col-md-3 form-label">setSecretKey</label>
								<div class="col-md-9">
									<input type="text" class="form-control" name="setSecretKey" value="<?php echo @$duzenle['setSecretKey']; ?>">
								</div>
							</div>


							<div class="form-group row">
								<div class="col-md-12"><center><button type="submit" class="btn btn-info">Kaydet</button></center></div>
							</div>

						</form>

					</div>
				</div>
			</div>
		</div>
	</div>
</div>
