Tarih: 2007-10-25, 21:38:03 Mesaj konusu: cikan bu isreti nasil silebilirim
arkadaslar compranma resim galerisinde index.php dosayasinda sag bloklarin gorunmemesi icin asagidaki kodu silince yukarda logonun yanin
bu isret cikiyor
Kod:
define('INDEX_FILE', true);
$index = 1;
if (eregi("modules/", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
define('INDEX_PHP', true);
<?php
// ------------------------------------------------------------------------ //
// Coppermine Photo Gallery 1.3.1 for CMS 7.11.05 //
// ------------------------------------------------------------------------ //
// Copyright (C) 2002,2003 Grégory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------ //
// Updated by the Coppermine Dev Team //
// (http://coppermine.sf.net/team/) //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------ //
// New Port by GoldenTroll //
// http://coppermine.findhere.org/ //
// Based on coppermine 1.1d by Surf http://www.surf4all.net/ //
// ------------------------------------------------------------------------ //
// Pc-Nuke! Systems - Development/Support - Coppermine for PHP-Nuke //
// http://www.max.pcnuke.com - http://www.pcnuke.com //
// Website for Port Upgrades from 1.3.0 and up... 7.11.05 //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------ //
/**********************************/
/* Module Configuration */
/* (right side on) v3.1 */
/* Remove the following line */
/* will remove the right side */
/**********************************/
$index = 1;
if (eregi("modules/", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
define('INDEX_PHP', true);
// List all categories
function get_cat_list(&$cat_data, &$statistics)
{
global $CONFIG, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST;
global $HIDE_USER_CAT;
global $cat;
global $lang_list_categories, $lang_errors;
// Build the category list
$cat_data = array();
$album_set_array = array();
get_subcat_data($cat, $cat_data, $album_set_array, $CONFIG['subcat_level']);
// Add the albums in the current category to the album set
if ($cat) {
if ($cat == USER_GAL_CAT) {
$result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category >= " . FIRST_USER_CAT);
}
else {
$result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = '$cat'");
}
while ($row = mysql_fetch_array($result)) {
$album_set_array[] = $row['aid'];
} // while
mysql_free_result($result);
}
if (count($album_set_array) && $cat) {
$set = '';
foreach ($album_set_array as $album) $set .= $album . ',';
$set = substr($set, 0, -1);
$current_album_set = "AND aid IN ($set) ";
} elseif ($cat) {
$current_album_set = "AND aid IN (-1) ";
}
// Gather gallery statistics
if ($cat == 0) {
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$album_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$picture_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$comment_count = $nbEnr[0];
mysql_free_result($result);
$result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$cat_count = $nbEnr[0] - $HIDE_USER_CAT;
mysql_free_result($result);
$result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$hit_count = (int)$nbEnr[0];
mysql_free_result($result);
function list_users()
{
global $CONFIG, $PAGE, $CPG_M_DIR, $CPG_M_URL;
global $lang_list_users, $lang_errors, $template_user_list_info_box;
global $field_user_id, $field_user_name, $field_user_avatar;
$sql = "SELECT $field_user_id, " .
"$field_user_name, $field_user_avatar as avatar, " .
"COUNT(DISTINCT a.aid) as alb_count, " .
"COUNT(DISTINCT pid) as pic_count, " .
"MAX(pid) as thumb_pid " .
"FROM {$CONFIG['TABLE_USERS']} AS u " .
"INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON (category = " . FIRST_USER_CAT . " + $field_user_id " . " AND ".VIS_GROUPS.")".
"LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') " .
"GROUP BY $field_user_id ORDER BY $field_user_name";
$result = db_query($sql);
$user_count = mysql_num_rows($result);
if (!$user_count) {
msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%');
mysql_free_result($result);
return;
}
// List (category) albums
// Redone for a cleaner approach: DJMaze
function list_cat_albums($cat = 0, $buffer = true)
{
global $CONFIG, $USER, $PAGE, $lastup_date_fmt, $USER_DATA, $CPG_M_DIR;
global $lang_list_albums, $lang_errors;
if ($cat == 0 && $buffer) return '';
if ($cat == "") $cat = 0;
if (isset($_GET['page'])) $PAGE = max((int)$_GET['page'], 1);
else $PAGE = 1;
if (isset($_GET['cat'])) $cat = (int)$_GET['cat'];
// Gather data for categories
$cat_data = array();
$statistics = '';
$STATS_IN_ALB_LIST = false;
get_cat_list($cat_data, $statistics);
global $BREADCRUMB_TEXT, $thisalbum ;
//limit m e t a blocks to the current album or category
// NEW
$thisalbum = "category >= 0";
if ($cat < 0) { // && $cat<0 m e t a albums, we need to restrict the albums to the current category
$actual_album = -$cat;
$thisalbum .= $CONFIG['TABLE_ALBUMS'].'.aid = '.$actual_album;
} else if ($cat){
if ($cat == USER_GAL_CAT) {
$thisalbum = 'category > ' . FIRST_USER_CAT;
} elseif (is_numeric($cat)) {
$thisalbum = "category = '$cat'";
}
}
// NEW
/*if ((is_numeric($cat))&&(!$album)){ //cat list
$thisalbum = "category = $cat";
}else if ((is_numeric($cat))||(is_numeric($album))){ // numeric album
$thisalbum = "aid = $album";
}elseif ((!is_numeric($cat))&&(!$album)){ //home page
$thisalbum = "category = 0";
}
*/
//non-numeric album don't need this value as there is no m e t a blocks
Kayıt: Jul 20, 2002 Mesajlar: 3836 Konum: Balıkesir
Tarih: 2007-10-26, 13:37:45 Mesaj konusu:
include klasöründeki dosyaları bir kontrol edin. load.inc dosyasının başında filan olabilir yada dil dosyasında olabilir. Şurdadır demek kesin değildir.
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız