📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv12.demodesign.com.tr
/
panel
/
inc
📝
pazaryeri-ayarlari.php
← Geri Dön
<?php if($_POST){ $islem = $db->prepare("UPDATE ayar SET td_magazaID = ?, td_apiKey = ?, td_apiSecret = ?, n11AppKey = ?, n11AppSecret = ?, n11Teslimat = ?, hb_username = ?, hb_password = ?, hb_MerchantID = ?"); $islem = $islem->execute(array($_POST['td_magazaID'],$_POST['td_apiKey'],$_POST['td_apiSecret'],$_POST['n11AppKey'],$_POST['n11AppSecret'],$_POST['n11Teslimat'],$_POST['hb_username'],$_POST['hb_password'],$_POST['hb_MerchantID'])); if ( isset($_POST['td_cat']) ) { if ( $_POST['td_cat'] == 1 ) { include_once '../eklentiler/trendyol/trendyol.class.php'; $getTdKategori = get_tdCURL( '', 0, 3, 0 ); $res_td = array(); foreach ( $getTdKategori as $k ) { if ( is_array($k['subCategories']) ) { if ( count($k['subCategories']) != 0 ) { foreach ( $k['subCategories'] as $a ) { $res_td[] = array( 'id' => $a['id'], 'name' => $a['name'] ); if ( is_array($a['subCategories']) ) { if ( count($a['subCategories']) != 0 ) { foreach ( $a['subCategories'] as $b ) { $res_td[] = array( 'id' => $b['id'], 'name' => $b['name'] ); if ( is_array($b['subCategories']) ) { if ( count($b['subCategories']) != 0 ) { foreach ( $b['subCategories'] as $c ) { $res_td[] = array( 'id' => $c['id'], 'name' => $c['name'] ); if ( is_array($c['subCategories']) ) { if ( count($c['subCategories']) != 0 ) { foreach ( $c['subCategories'] as $d ) { $res_td[] = array( 'id' => $d['id'], 'name' => $d['name'] ); if ( is_array($d['subCategories']) ) { if ( count($d['subCategories']) != 0 ) { foreach ( $d['subCategories'] as $e ) { $res_td[] = array( 'id' => $e['id'], 'name' => $e['name'] ); } } } } } } } } } } } } } } } } $td_del = $db->exec("DELETE FROM td_cat"); if ( is_array($res_td) || is_object($res_td) ) { foreach ( $res_td as $td ) { $islem = $db->prepare("INSERT INTO td_cat SET categoryId = ?, name = ?"); $islem = $islem->execute(array($td['id'],$td['name'])); } } } } if ( isset($_POST['n11_cat']) ) { if ( $_POST['n11_cat'] == 1 ) { include_once '../eklentiler/n11/N11.class.php'; $n11Params = array( 'appKey' => $ayar["n11AppKey"], 'appSecret' => $ayar["n11AppSecret"] ); $n11 = new N11($n11Params); $n11_cat = $n11->GetTopLevelCategories(); $n11_del = $db->exec("DELETE FROM n11_cat"); if ( is_array($n11_cat->categoryList->category) || is_object($n11_cat->categoryList->category) ) { foreach ( $n11_cat->categoryList->category as $k_n11 ) { $islem = $db->prepare("INSERT INTO n11_cat SET categoryId = ?, name = ?"); $islem = $islem->execute(array($k_n11->id,$k_n11->name)); } } } } if ( isset($_POST['hb_cat']) ) { if ( $_POST['hb_cat'] == 1 ) { include_once '../eklentiler/hepsiburada/hepsiburada.class.php'; $hb_auth = array( "username" => $ayar["hb_username"], "password" => $ayar["hb_password"], "authenticationType" => "INTEGRATOR" ); $hb_query = get_hpCURL( $hb_auth, 1, 1 ); $hb_cats = get_hpCURL( '', 0, 2 ); $hb_del = $db->exec("DELETE FROM hb_cat"); if ( is_array($hb_cats) || is_object($hb_cats) ) { foreach ( $hb_cats as $hb ) { $islem = $db->prepare("INSERT INTO hb_cat SET categoryId = ?, name = ?, displayName = ?, parentCategoryId = ?, leaf = ?, status = ?, sortId = ?, imageURL = ?, available = ?"); $islem = $islem->execute(array($hb['categoryId'],$hb['name'],$hb['displayName'],$hb['parentCategoryId'],$hb['leaf'],$hb['status'],$hb['sortId'],$hb['imageURL'],$hb['available'])); } } } } if($islem){ echo b(); }else{ echo h(); } } $duzenle = $db->query("SELECT * FROM ayar LIMIT 1")->fetch(PDO::FETCH_ASSOC); ?> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6"> <div class="breadcrumb-header justify-content-between"> <div class="my-auto"> <div class="d-flex"> <h4 class="content-title mb-0 my-auto">Pazaryeri Ayarları</h4><span class="text-muted mt-1 tx-13 ml-2 mb-0">/ Ekle - Düzenle</span> </div> </div> </div> <div class="card"> <div class="card-header pb-0"> <div class="d-flex justify-content-between"> <h4 class="card-title mg-b-0">Eklenen Veriler</h4> </div> </div> <div class="card-body"> <form action="" method="post"> <div class="form-group row"> <label class="col-md-3 form-label">Trendyol Mağaza ID</label> <div class="col-md-9"> <input type="text" class="form-control" name="td_magazaID" value="<?php echo @$duzenle['td_magazaID']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Trendyol Api Key</label> <div class="col-md-9"> <input type="text" class="form-control" name="td_apiKey" value="<?php echo @$duzenle['td_apiKey']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Trendyol Api Secret</label> <div class="col-md-9"> <input type="text" class="form-control" name="td_apiSecret" value="<?php echo @$duzenle['td_apiSecret']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Trendyol Kategori Güncelle</label> <div class="col-md-9"> <select class="form-control" name="td_cat"> <option value="0">Hayır</option> <option value="1">Güncelle</option> </select> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">N11 Api Key</label> <div class="col-md-9"> <input type="text" class="form-control" name="n11AppKey" value="<?php echo @$duzenle['n11AppKey']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">N11 Api Secret</label> <div class="col-md-9"> <input type="text" class="form-control" name="n11AppSecret" value="<?php echo @$duzenle['n11AppSecret']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">N11 Teslimat Şablon Adı</label> <div class="col-md-9"> <input type="text" class="form-control" name="n11Teslimat" value="<?php echo @$duzenle['n11Teslimat']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">N11 Kategori Güncelle</label> <div class="col-md-9"> <select class="form-control" name="n11_cat"> <option value="0">Hayır</option> <option value="1">Güncelle</option> </select> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Hepsiburada Username</label> <div class="col-md-9"> <input type="text" class="form-control" name="hb_username" value="<?php echo @$duzenle['hb_username']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Hepsiburada Password</label> <div class="col-md-9"> <input type="text" class="form-control" name="hb_password" value="<?php echo @$duzenle['hb_password']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Hepsiburada MerchantID</label> <div class="col-md-9"> <input type="text" class="form-control" name="hb_MerchantID" value="<?php echo @$duzenle['hb_MerchantID']; ?>"> </div> </div> <div class="form-group row"> <label class="col-md-3 form-label">Hepsiburada Kategori Güncelle</label> <div class="col-md-9"> <select class="form-control" name="hb_cat"> <option value="0">Hayır</option> <option value="1">Güncelle</option> </select> </div> </div> <div class="form-group row"> <div class="col-md-12"><center><button type="submit" class="btn btn-success">Değişiklikleri Kaydet</button></center></div> </div> </form> </div> </div> </div> </div>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula