Вход Регистрация
Файл: vk/inc/db.class.php
Строк: 57
<?php class db{    function mysql_qw() {      $args func_get_args();      $tmpl =& $args[0];      $tmpl str_replace("%""%%"$tmpl);      $tmpl str_replace("?""%s"$tmpl);      foreach ($args as $i=>$v) {        if (!$i) continue;        if (is_int($v)) continue;        $args[$i] = "'".mysql_escape_string($v)."'";      }      for ($i=$c=count($args)-1$i<$c+20$i++)         $args[$i+1] = "UNKNOWN_PLACEHOLDER_$i";        $query call_user_func_array("sprintf"$args);        $result mysql_query("$query") or die(mysql_error()."n$query");      return $result;    }    function config()    {        $this->host "mysql.hostinger.ru";        $this->user "u453135715_vk";        $this->pass "Vert2011";        $this->name "u453135715_vk";        $this->prefix "";    }    function connect()    {        mysql_connect($this->host,$this->user,$this->pass) or die ("Could not make connection to MySQL");        mysql_select_db($this->name) or die ("Could not select MySQL DB");        mysql_query("SET NAMES 'utf8'");    }    function close()    {        if(isset($this->connect)){            mysql_close($this->connect);        }    }    function changeHost($host)    {        $this->host $host;    }    function changeUser($user)    {        $this->user $user;    }    function changePass($pass)    {        $this->pass $pass;    }    function changeName($name)    {        $this->name $name;    }}$db = new db();$db->config();$db->connect();?>
Онлайн: 0
Реклама