<?php
  $askData=$db->prepare("SELECT * FROM general_setting where general_id=:general_id");
  $askData->execute(array(
    'general_id' => 1
  ));
  $checkData=$askData->fetch(PDO::FETCH_ASSOC);
?>
<div class="card">
  <div class="card-body">
    <div class="row">
      <div class="col-md-12">
        <form action="system/operation.php" method="post">
          <div class="card card-warning">
            <div class="card-header">
              <h3 class="card-title"><?php echo $langArray['EDIT_FORM']; ?></h3>
            </div>
            <div class="card-body row">
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_LANG']; ?></label>
                  <select class="form-control select2" name="site_language">
                    <?php
                      $siteLangAsk=$db->prepare("SELECT * FROM language WHERE status=:status ORDER BY order_sort");
                      $siteLangAsk->execute(array(
                        'status' => 1
                      ));
                      while ($siteLangCheck=$siteLangAsk->fetch(PDO::FETCH_ASSOC)){
                        $countryNameAsk=$db->prepare("SELECT * FROM countries WHERE alpha=:alpha");
                        $countryNameAsk->execute(array(
                          'alpha' => $siteLangCheck['country_code']
                        ));
                        $countryNameCheck=$countryNameAsk->fetch(PDO::FETCH_ASSOC);
                    ?>
                      <option <?php echo $countryNameCheck['alpha'] == $checkData["site_language"] ? 'selected=""' : ''; ?> value="<?php echo $siteLangCheck['country_code']; ?>"><?php echo $countryNameCheck['country']; ?></option>
                    <?php } ?>
                  </select>
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_URL']; ?></label>
                  <input type="text" name="site_url" class="form-control" value="<?php echo $checkData['site_url'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_TITLE']; ?></label>
                  <input type="text" name="site_title" class="form-control" value="<?php echo $checkData['site_title'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_KEYW']; ?></label>
                  <input type="text" placeholder="<?php echo $langArray['WRITE_ENTER_PRESS']; ?>" name="site_keyw" class="form-control" value="<?php echo $checkData['site_keyw'] ?>" data-role="tagsinput">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_DESC']; ?></label>
                  <input type="text" name="site_desc" class="form-control" value="<?php echo $checkData['site_desc'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_AUTHOR']; ?></label>
                  <input type="text" name="site_author" class="form-control" value="<?php echo $checkData['site_author'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_COPYRIGHT']; ?></label>
                  <input type="text" name="site_copyright" class="form-control" value="<?php echo $checkData['site_copyright'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_EMAIL']; ?></label>
                  <input type="text" name="site_email" class="form-control" value="<?php echo $checkData['site_email'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_WORKTIME']; ?></label>
                  <input type="text" name="work_time" class="form-control" value="<?php echo $checkData['work_time'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_LANDPHONE']; ?></label>
                  <input type="text" name="contact_land_phone" class="form-control" value="<?php echo $checkData['contact_land_phone'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_MOBILEPHONE']; ?></label>
                  <input type="text" name="contact_mobile_phone" class="form-control" value="<?php echo $checkData['contact_mobile_phone'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_FAX']; ?></label>
                  <input type="text" name="contact_fax" class="form-control" value="<?php echo $checkData['contact_fax'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_WHATSAPP']; ?></label>
                  <input type="text" name="contact_whatsapp" class="form-control" value="<?php echo $checkData['contact_whatsapp'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_WEBMASTERNAME']; ?></label>
                  <input type="text" name="webmaster_name" class="form-control" value="<?php echo $checkData['webmaster_name'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_WEBMASTERLINK']; ?></label>
                  <input type="text" name="webmaster_link" class="form-control" value="<?php echo $checkData['webmaster_link'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_CONTACT_ADRESS']; ?></label>
                  <input type="text" name="contact_adress" class="form-control" value="<?php echo $checkData['contact_adress'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_SMTPHOST']; ?></label>
                  <input type="text" name="site_smtphost" class="form-control" value="<?php echo $checkData['site_smtphost'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_SMTPPORT']; ?></label>
                  <input type="text" name="site_smtpport" class="form-control" value="<?php echo $checkData['site_smtpport'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_SMTPUSER']; ?></label>
                  <input type="text" name="site_smtpuser" class="form-control" value="<?php echo $checkData['site_smtpuser'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_SMTPPASSWORD']; ?></label>
                  <input type="password" name="site_smtppassword" class="form-control" value="<?php echo $checkData['site_smtppassword'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_ANALYTICS']; ?></label>
                  <input type="text" name="site_analytics" class="form-control" value="<?php echo $checkData['site_analytics'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_WEBMASTERTOOLS']; ?></label>
                  <input type="text" name="site_webmastertools" class="form-control" value="<?php echo $checkData['site_webmastertools'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_MAPS']; ?></label>
                  <input type="text" name="site_maps" class="form-control" value="<?php echo $checkData['site_maps'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_RECAPSITEKEY']; ?></label>
                  <input type="text" name="site_recap_sitekey" class="form-control" value="<?php echo $checkData['site_recap_sitekey'] ?>">
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_RECAPSECRETKEY']; ?></label>
                  <input type="text" name="site_recap_secretkey" class="form-control" value="<?php echo $checkData['site_recap_secretkey'] ?>">
                </div>
              </div>
              <div class="col-md-6">

              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_HEADERCODE']; ?></label>
                  <textarea name="header_code" rows="10" class="form-control"><?php echo $generalSettingCheck['header_code']; ?></textarea>
                </div>
              </div>
              <div class="col-md-6">
                <!-- #form-group -->
                <div class="form-group">
                  <label for="inputName"><?php echo $langArray['GENERAL_FORM_SITE_FOOTERCODE']; ?></label>
                  <textarea name="footer_code" rows="10" class="form-control"><?php echo $generalSettingCheck['footer_code']; ?></textarea>
                </div>
              </div>
              <div class="col-12">
                 <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteGeneralUpdate">
              </div>
              <div class="clearfix"></div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["site_logo"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Logo ( White )</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['site_logo'] != null) { ?>
                  <img src="../<?php echo $checkData['site_logo']; ?>" width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteLogoUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["site_logo_2"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Logo ( Black )</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image2" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['site_logo_2'] != null) { ?>
                  <img src="../<?php echo $checkData['site_logo_2']; ?>"  width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteLogo2Update">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["site_favico"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Favico</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['site_favico'] != null) { ?>
                  <img src="../<?php echo $checkData['site_favico']; ?>" class="img-responsive">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteFavicoUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
        <input type="hidden" name="image" value="<?=$checkData["about_image"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Hakkımızda Resim</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['about_image'] != null) { ?>
                  <img src="../<?php echo $checkData['about_image']; ?>" width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteAboutImageUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["counter_image"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Hakkımızda Resim2</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['counter_image'] != null) { ?>
                  <img src="../<?php echo $checkData['counter_image']; ?>" width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteCounterImageUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["skill_image"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Yetenek Resim</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['skill_image'] != null) { ?>
                  <img src="../<?php echo $checkData['skill_image']; ?>" width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteSkillImageUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
         <div class="col-md-4">
        <form class="" action="system/operation.php" method="post" enctype="multipart/form-data" data-parsley-validate>
          <input type="hidden" name="image" value="<?=$checkData["client_image"] ?>">
          <div class="card card-warning">
            <div class="card-body">
              <div class="form-group">
                <label for="image">Müşteri Yorum Resim</label>
                <div class="input-group">
                  <div class="custom-file">
                    <input type="file" name="upload_image" class="custom-file-input">
                    <label class="custom-file-label"><?php echo $langArray['TABLE_CHOOSE_FILE']; ?></label>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <?php if ($checkData['client_image'] != null) { ?>
                  <img src="../<?php echo $checkData['client_image']; ?>" width="100%">
                <?php } ?>
              </div>
              <div class="form-group">
                <input type="submit" value="<?php echo $langArray['UPDATE_FORM']; ?>" class="btn btn-warning float-right" name="siteClientImageUpdate">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="clearfix"></div>
    </div>
  </div>
</div>
