Hoşgeldin Misafir

Çözüldü E-Ticaret Scripti Gelişmiş Sistem V9

crypto

crypto

Karanlık özgürlüktür.
localhost
6 Ağu 2023
1,061 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Çözüm
/admin/class/database.php acalım

Kod:
<?php

class Database {
    public $isConn;
    protected $datab;

    // connect to db
    public function __construct($options = []) {
        $this->isConn = TRUE;

        $decodedData = $this->df();
        $mysqlConfig = $decodedData['mysql'];

        try {
            $username = $options['ajansyazili_otelv7'] ?? $mysqlConfig['kullanici_adi'];
            $password = $options['ajansyazili_otelv7'] ?? $mysqlConfig['sifre'];
            $host = $options['localhost'] ?? $mysqlConfig['host'];
            $dbname = $options['dbname'] ?? $mysqlConfig['db'];

            $this->datab = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8", $username, $password)...

THS-Information

THS-Information

THS-BOT
Turkhacks Kurumsal
16 Haz 2023
2,248 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Yazılımda HTTP 500 hatası alıyorum, php sürümlerinin hepsi denendi, SQL bağlantıları doğru yapıldı ancak erişim alamıyorum maalesef. Veyahut değiştirilecek yerleri atladım... Siz değerli destek ekibine şimdiden çok teşekkür ederim.

Merhaba değerli üyemiz,

Script destek konunuz başarı ile oluşturulmuş olup, yardım talebiniz alınmıştır. Talebinize ilişkin çözüm yetkin personel & üyelerimiz tarafından en kısa süre içerisinde paylaşılacaktır. Aynı script için yeni bir istek konusu açmanıza gerek yoktur. İstek, öneri ve şikayetlerinizin Turkhacks.com yönetimi için değerli olduğunu bilmenizi isteriz.

İyi forumlar.
 

scholar

30 Eyl 2019
1,739 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:

Security Web

Security Web

Web Hacker
Almanya
2 Eyl 2023
423 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
/admin/class/database.php acalım

Kod:
<?php

class Database {
    public $isConn;
    protected $datab;

    // connect to db
    public function __construct($options = []) {
        $this->isConn = TRUE;

        $decodedData = $this->df();
        $mysqlConfig = $decodedData['mysql'];

        try {
            $username = $options['ajansyazili_otelv7'] ?? $mysqlConfig['kullanici_adi'];
            $password = $options['ajansyazili_otelv7'] ?? $mysqlConfig['sifre'];
            $host = $options['localhost'] ?? $mysqlConfig['host'];
            $dbname = $options['dbname'] ?? $mysqlConfig['db'];

            $this->datab = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8", $username, $password);
            $this->datab->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->datab->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
        } catch (PDOException $e) {
            throw new Exception($e->getMessage());
        }
    }

    // disconnect from db
    public function Disconnect() {
        $this->datab = NULL;
        $this->isConn = FALSE;
    }
    
    
    // get rowv1_site
    public function getRow($query, $params = []){
        try {
            $stmt = $this->datab->prepare($query);
            $stmt->execute($params);
            return $stmt->fetch();
        } catch (PDOException $e) {
            throw new Exception($e->getMessage());
        }
    }
    // get rows
    public function getRows($query, $params = []){
        try {
            $stmt = $this->datab->prepare($query);
            $stmt->execute($params);
            return $stmt->fetchAll();
        } catch (PDOException $e) {
            throw new Exception($e->getMessage());
        }
    }
    // insert row
    public function insertRow($query, $params = []){
        try {
            $stmt = $this->datab->prepare($query);
            $stmt->execute($params);
            return TRUE;
        } catch (PDOException $e) {
            throw new Exception($e->getMessage());
        }
    }
    
    
    
    public function df() {
        $decodedData = [
            'mysql' => [
                'host' => 'localhost',
                'kullanici_adi' => 'DB KULLANICI ADI',
                'sifre' => 'DB ŞİFRE',
                'db' => 'DB VERİ TABANI ADI',
            ],
            'hatirla' => [
                'cookie_ismi' => 'hash',
                'cookie_bitis' => 604800,
            ],
            'session' => [
                'session_ismi' => 'kullanici',
                'token_ismi' => 'token',
            ],
        ];

        return $decodedData;
    }
    
    
    
    
    
    
    
    
    // insert yeni kolon
    public function kolon($query, $params = []){
        try {
            $stmt = $this->datab->prepare($query);
            $stmt->execute();

            return TRUE;
        } catch (PDOException $e) {
            throw new Exception($e->getMessage());
        }
    }

    // update row
    public function updateRow($query, $params = []){
        $this->insertRow($query, $params);

    }

    // delete row
    public function deleteRow($query, $params = []){
        $this->insertRow($query, $params);
    }
    public function tabloAc($query)
    {
      try {
        $stmt = $this->datab->exec($query);

      } catch (PDOException $e) {

        $e->getMessage();
          throw new Exception($e->getMessage());
      }
    }
    public function tabloSil($query)
    {
      try {
        $stmt = $this->datab->exec($query);

      } catch (PDOException $e) {
          throw new Exception($e->getMessage());
      }
    }
    public function seo($s) {
       $tr = array('ş','Ş','ı','I','İ','ğ','Ğ','ü','Ü','ö','Ö','Ç','ç','(',')','/',':',',');
       $eng = array('s','s','i','i','i','g','g','u','u','o','o','c','c','','','-','-','');
       $s = str_replace($tr,$eng,$s);
       $s = strtolower($s);
       $s = preg_replace('/&amp;amp;amp;amp;amp;amp;amp;amp;amp;.+?;/', '', $s);
       $s = preg_replace('/\s+/', '-', $s);
       $s = preg_replace('|-+|', '-', $s);
       $s = preg_replace('/#/', '', $s);
       $s = str_replace('.', '', $s);
       $s = str_replace('+', 've', $s);
       $s = str_replace('&', 've', $s);
       $s = str_replace('*', '-yildiz-', $s);
       $s = str_replace('?', '', $s);
       $s = str_replace('\'', '-', $s);
       $s = str_replace(array('”','“','"'), '', $s);
       $s = str_replace("’", "", $s);
       $s = str_replace("´", "", $s);
       $s = trim($s, '-');
       return $s;
      }



}

?>
 
Çözüm

crypto

crypto

Karanlık özgürlüktür.
localhost
6 Ağu 2023
1,061 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Değerli arkadaşlar, veri tabanı bağlantısı hatası çözülüyor ancak anlamadığım şekilde sitede ki bütün işlevler bozuk olarak gelmekte. Çözebilen arkadaşlar yardımcı olursa seviniriz. Hayırlı akşamlar dilerim.