1
Discussion & Troubleshooting / Re: No error message recieved after upload failure
« on: November 06, 2008, 01:45:24 PM »
And when category is not selected a blank allert window pops up
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
$mime_type_match['exe'] = array("application/octet-stream");
$mime_type_match['exe'] = array("application/octet-stream", "application/x-msdownload");
Пытаюсь войти в админку, выскакивает страничка
Not Acceptable
An appropriate representation of the requested resource /admin/index.php could not be found on this server.
define('ROOT_PATH', './');
I just found it in lightbox.php (it was the first document I opend).Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: db_mysql.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.1 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
if (!defined('ROOT_PATH')) {
die("Security violation");
}
class Db {
var $no_error = 0;
var $connection;
var $query_id = 0;
var $query_count = 0;
var $query_time = 0;
var $query_array = array();
var $table_fields = array();
function Db($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
$connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
$this->error("Could not connect to the database server ($db_host, $db_user).", 1);
}
if ($db_name != "") {
if (!@mysql_select_db($db_name)) {
@mysql_close($this->connection);
$this->error("Could not select database ($db_name).", 1);
}
}
return $this->connection;
}
function close() {
if ($this->connection) {
if ($this->query_id) {
@mysql_free_result($this->query_id);
}
return @mysql_close($this->connection);
}
else {
return false;
}
}
function query($query = "") {
unset($this->query_id);
if ($query != "") {
if ((defined("PRINT_QUERIES") && PRINT_QUERIES == 1) || (defined("PRINT_STATS") && PRINT_STATS == 1)) {
$startsqltime = explode(" ", microtime());
}
if (!$this->query_id = @mysql_query($query, $this->connection)) {
$this->error("<b>Bad SQL Query</b>: ".htmlentities($query)."<br /><b>".mysql_error()."</b>");
}
if ((defined("PRINT_QUERIES") && PRINT_QUERIES == 1) || (defined("PRINT_STATS") && PRINT_STATS == 1)) {
$endsqltime = explode(" ", microtime());
$totalsqltime = round($endsqltime[0]-$startsqltime[0]+$endsqltime[1]-$startsqltime[1],3);
$this->query_time += $totalsqltime;
$this->query_count++;
}
if (defined("PRINT_QUERIES") && PRINT_QUERIES == 1) {
$query_stats = htmlentities($query);
$query_stats .= "<br><b>Querytime:</b> ".$totalsqltime;
$this->query_array[] = $query_stats;
}
return $this->query_id;
}
}
function fetch_array($query_id = -1, $assoc = 0) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
if ($this->query_id) {
return ($assoc) ? mysql_fetch_assoc($this->query_id) : mysql_fetch_array($this->query_id);
}
}
function free_result($query_id = -1) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return @mysql_free_result($this->query_id);
}
function query_firstrow($query = "") {
if ($query != "") {
$this->query($query);
}
$result = $this->fetch_array($this->query_id);
$this->free_result();
return $result;
}
function get_numrows($query_id = -1) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return mysql_num_rows($this->query_id);
}
function get_insert_id() {
return ($this->connection) ? @mysql_insert_id($this->connection) : 0;
}
function get_next_id($column = "", $table = "") {
if (!empty($column) && !empty($table)) {
$sql = "SELECT MAX($column) AS max_id
FROM $table";
$row = $this->query_firstrow($sql);
return (($row['max_id'] + 1) > 0) ? $row['max_id'] + 1 : 1;
}
else {
return NULL;
}
}
function get_numfields($query_id = -1) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return @mysql_num_fields($this->query_id);
}
function get_fieldname($query_id = -1, $offset) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return @mysql_field_name($this->query_id, $offset);
}
function get_fieldtype($query_id = -1, $offset) {
if ($query_id != -1) {
$this->query_id = $query_id;
}
return @mysql_field_type($this->query_id, $offset);
}
function affected_rows() {
return ($this->connection) ? @mysql_affected_rows($this->connection) : 0;
}
function is_empty($query = "") {
if ($query != "") {
$this->query($query);
}
return (!mysql_num_rows($this->query_id)) ? 1 : 0;
}
function not_empty($query = "") {
if ($query != "") {
$this->query($query);
}
return (!mysql_num_rows($this->query_id)) ? 0 : 1;
}
function get_table_fields($table) {
if (!empty($this->table_fields[$table])) {
return $this->table_fields[$table];
}
$this->table_fields[$table] = array();
$result = $this->query("SHOW FIELDS FROM $table");
while ($row = $this->fetch_array($result)) {
$this->table_fields[$table][$row['Field']] = $row['Type'];
}
return $this->table_fields[$table];
}
function error($errmsg, $halt = 0) {
if (!$this->no_error) {
echo "<br /><font color='#FF0000'><b>DB Error</b></font>: ".$errmsg."<br />";
if ($halt) {
exit;
}
}
}
} // end of class
?>
Try this:Code: [Select]// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', '/usr/local/httpd/htdocs/.../foto/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
Good luck!
Markus
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/config.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 30
Warning: main(/usr/local/httpd/htdocs/.../foto/config.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 30
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/config.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 30
Warning: main(/usr/local/httpd/htdocs/.../foto/config.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 30
Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/config.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 30
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 31
Warning: main(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 31
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 31
Warning: main(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 31
Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 31
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/constants.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 32
Warning: main(/usr/local/httpd/htdocs/.../foto/includes/constants.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 32
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/constants.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 32
Warning: main(/usr/local/httpd/htdocs/.../foto/includes/constants.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 32
Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/includes/constants.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 32
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34
define(ROOT_PATH, '/usr/local/httpd/htdocs/.../foto/');
define(ROOT_PATH.'/usr/local/httpd/htdocs/.../foto/');
Warning: Wrong parameter count for define() in /home/166413/http/foto/random.php on line 28
Warning: main(ROOT_PATHconfig.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 30
Warning: main(ROOT_PATHconfig.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 30
Warning: main(): Failed opening 'ROOT_PATHconfig.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 30
Warning: main(ROOT_PATHincludes/db_mysql.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 31
Warning: main(ROOT_PATHincludes/db_mysql.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 31
Warning: main(): Failed opening 'ROOT_PATHincludes/db_mysql.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 31
Warning: main(ROOT_PATHincludes/constants.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 32
Warning: main(ROOT_PATHincludes/constants.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 32
Warning: main(): Failed opening 'ROOT_PATHincludes/constants.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 32
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34
Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: random_more_pics.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.0 for 4images 1.6.1 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', 'http://www.ipoding.ru/foto/');
include('http://www.ipoding.ru/foto/config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images = 4;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
ORDER BY RAND()
LIMIT $num_images";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)){
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo "<b>$image_name</b><br>\n";
echo "Comments: $image_comments<hr>\n";
}
?>
Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: random_more_pics.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.0 for 4images 1.6.1 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', 'http://www.ipoding.ru/foto/');
include('http://www.ipoding.ru/foto/config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
$site_db = new Db($db_host, $db_user, $db_password, $db_name); <----- 34-àÿ ëèíÿÿ
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images = 4;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
ORDER BY RAND()
LIMIT $num_images";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)){
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo "<b>$image_name</b><br>\n";
echo "Comments: $image_comments<hr>\n";
}
?>