
	
	
	<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1>Genel Ayarları 
          </h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="<?=SITE?>">Anasayfa</a></li>
            <li class="breadcrumb-item active">Genel Ayarları</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>
  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
     <div class="row"> 
      <div class="col-md-12">
        <?php
        if($_POST)
        {
          if(!empty($_POST["posapi"]) && !empty($_POST["poskey"])  && !empty($_POST["posurl"]))
          {
           $posapi=$VT->filter($_POST["posapi"]);
           $poskey=$VT->filter($_POST["poskey"]);
           $posurl=$VT->filter($_POST["posurl"]); 

           $posmodul=$VT->SorguCalistir("UPDATE sanalpos","SET posapi=?, poskey=?, posurl=? WHERE ID=?",
            array($posapi,$poskey,$posurl,1),1);

           if($posmodul!=false)
           {
            ?>
            <div class="alert alert-success">İşleminiz başarıyla kaydedildi.</div>
            <meta http-equiv="refresh" content="2;url=<?=SITE?>sanal-pos" />
            <?php
          }
          else
          {
            ?>
            <div class="alert alert-danger">Lütfen daha sonra tekrar deneyiniz.</div>
            <?php
          }
        }
        else
        {
         ?>
         <div class="alert alert-danger">Boş bıraktığınız alanları doldurunuz.</div>
         <?php
       }
     }
     ?> 
     <div class="card card-warning">
      <div class="card-header">
        <h3 class="card-title">Sanal Pos Modülü</h3>
      </div>
      <!-- /.card-header --> 
       <form action="#" method="post" enctype="multipart/form-data">
        <div class="card-body"> 

          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Api Key</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="posapi" value="<?=$posapi?>">
            </div>
          </div> 

          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Secret Key</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="poskey" value="<?=$poskey?>">
            </div>
          </div> 

          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Base Url</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="posurl" value="<?=$posurl?>">
            </div>
          </div> 
 
        </div>
        <!-- /.card-body -->
        <div class="card-footer">
          <button type="submit" class="btn btn-info">Güncelle</button> 
          <!-- /.card-footer -->
        </form>
      </div>
    </div>
  </div> 
</div> 
</section>
<!-- /.content -->
</div>
