Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
деионкубе
ну что не понятного, файлы декодировлись нормально.
токо нужен дебаг кода, тоесть есть некие ошибки в фйлах, нужно править ручками и разбирать всю структуру.
mysql.php
упс, понял выкладываю правильный архив.Код:<?php class db_mysql { public function db_mysql( ) { global $config_db_server; global $config_db_server_username; global $config_db_server_password; global $config_db_database; $password = str_replace( "\$", "\$", $config_db_server_password ); $this->link = @mysql_connect( @$config_db_server, @$config_db_server_username, @$password ); $this->errorQuery = array( ); $this->error = ""; $this->limit = ""; $this->offset = ""; $this->errorPath = ""; if ( $this->link ) { if ( @mysql_select_db( @$config_db_database, @$this->link ) ) { $this->recent_link =& $this->link; global $config_db_charset; global $config_db_collation; return $this->link; } $this->errorPath = getErrorPath( ); $this->error = "Could not select database: {$config_db_database}"; } else { $this->error = "Could not connect to server: {$config_db_server}"; $this->errorPath = getErrorPath( ); } } public function test( ) { return 1; } public function geterror( ) { global $config_debug; $str = "<span>Database query error. </span>"; if ( $config_debug ) { $str .= "<span>The error was: </span>".$this->error; $str .= "<br><span>SQL query/queries : </span>".printErrorQuery( )."<span>Error path:</span> ".$this->errorPath; } return $str; } public function printerrorquery( ) { $result = ""; foreach ( $this->errorQuery as $str ) { $result .= $str."<br>"; } return $result; } public function setsql( $sql ) { $this->sql = $sql; } public function getsql( ) { return $this->sql; } public function query( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !is_resource( $this->link ) ) { return false; } $this->recent_link =& $this->link; if ( 0 < $this->limit || 0 < $this->offset ) { $this->sql .= " LIMIT ".$this->offset.", ".$this->limit; } $result = @mysql_query( @$this->sql, @$this->link ); ++$this->query_count; if ( !$result ) { error( ); $this->errorPath = getErrorPath( ); return false; } return $result; } public function fetchrow( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !( $result = query( ) ) ) { return null; } $ret = null; if ( $row = @mysql_fetch_row( @$result ) ) { $ret = $row[0]; } freeResult( $result ); return $ret; } public function fetchrowlist( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !( $result = query( ) ) ) { return null; } $array = array( ); while ( $row = @mysql_fetch_row( @$result ) ) { $array[] = $row[0]; } freeResult( $result ); return $array; } public function fetchassoc( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !( $result = query( ) ) ) { return null; } $ret = null; if ( $row = @mysql_fetch_assoc( @$result ) ) { $ret = $row; } freeResult( $result ); return $ret; } public function fetchassoclist( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !( $result = query( ) ) ) { return null; } $array = array( ); while ( $row = @mysql_fetch_assoc( @$result ) ) { $array[] = $row; } freeResult( $result ); return $array; } public function fetcharray( $sql = "" ) { if ( $sql ) { $this->sql = $sql; } if ( !( $result = query( ) ) ) { return null; } $array = array( ); while ( $row = @mysql_fetch_array( @$result ) ) { $array[] = $row; } freeResult( $result ); return $array; } public function numrows( $result ) { return mysql_num_rows( @$result ); } public function affectedrows( ) { return mysql_affected_rows( @$this->recent_link ); } public function numqueries( ) { return $this->query_count; } public function insertid( ) { return mysql_insert_id( @$this->link ); } public function freeresult( $result ) { return mysql_free_result( @$result ); } public function setoffset( $off ) { $this->offset = $off; } public function setlimit( $lim ) { $this->limit = $lim; } public function close( ) { $this->sql = ""; return mysql_close( $this->link ); } public function error( $err = "" ) { if ( $err ) { $this->error .= $err; } else { if ( is_null( $this->recent_link ) ) { } else { $this->error = " errno : ".mysql_errno( $this->recent_link )." ".mysql_error( $this->recent_link ); } } $no = count( $this->errorQuery ); $this->errorQuery[$no] = $this->sql; return $this->error; } public function geterrorpath( ) { if ( $_SERVER['REQUEST_URI'] ) { $errorpath = $_SERVER['REQUEST_URI']; } else { if ( $_SERVER['PATH_INFO'] ) { $errorpath = $_SERVER['PATH_INFO']; } else { $errorpath = $_SERVER['PHP_SELF']; } if ( $_SERVER['QUERY_STRING'] ) { $errorpath .= "?".$_SERVER['QUERY_STRING']; } } if ( ( $pos = strpos( $errorpath, "?" ) ) !== false ) { $errorpath = urldecode( substr( $errorpath, 0, $pos ) ).substr( $errorpath, $pos ); } else { $errorpath = urldecode( $errorpath ); } return $_SERVER['HTTP_HOST'].$errorpath; } public function gettablefields( $table ) { $array = array( ); $res = mysql_query( "DESCRIBE ".$table ); $i = 0; while ( $row = mysql_fetch_row( $res ) ) { $array[$i] = $row[0]; ++$i; } return $array; } public function getfulltablefields( $table ) { $array = array( ); $res = mysql_query( "DESCRIBE ".$table ); $i = 0; while ( $row = mysql_fetch_assoc( $res ) ) { $array[$i]['Field'] = $row['Field']; $array[$i]['Type'] = $row['Type']; ++$i; } return $array; } public function gettablecsvfields( $table ) { $fields = ""; $res = mysql_query( "DESCRIBE ".$table ); $i = 0; while ( $row = mysql_fetch_row( $res ) ) { if ( $i ) { $fields .= ","; } $fields .= $row[0]; ++$i; } return $fields; } public function gettexttablefields( $table ) { $array = array( ); $res = mysql_query( "DESCRIBE ".$table ); $i = 0; while ( $row = mysql_fetch_row( $res ) ) { if ( !strstr( $row[1], "varchar" ) && $row[1] != "text" ) { continue; } $array[$i] = $row[0]; ++$i; } return $array; } public function gettables( $prefix = "", $not_prefix = "" ) { if ( !( $result = fetchRowList( "SHOW TABLES" ) ) ) { return 0; } if ( !$prefix ) { return $result; } $i = 0; $arr = array( ); foreach ( $result as $row ) { if ( preg_match( "/^{$prefix}/", $row ) && !preg_match( "/^{$not_prefix}/", $row ) ) { $arr[$i++] = $row; } } return $arr; } } ?>
kak эту строку исправить?if ( !( $result = query( ) ) )
Мля ну выкладывал же поправленный mysql.php см. пару-тройку стр. назад.
Кто-нибудь помогите. (за помощь поделюсь смс-биллингом A1Pay) или уже успокойте, что это невозможноГоспода как сделать, чтобы открывались не подкатегории, а сразу все объявлении этой категории.
P.S. Когда включен Site Appearance->Browse Categories