Wstawianie kodu w panelu
|
Piter573PB |
Dodany dnia 24.01.2008 15:20:20
|

Przedszkolak

Postów: 53
Data rejestracji: 19.01.2008 11:31
|
?askawie nie moge wstawic do tamtego kody php funkcji <br> bo za wyswietlanie tekstu odpowiada jedna funkcja. Mia?em na mysli jakis skrypt który po odczytaniu ju? tego przetworzonego kodu php na html bedzie umia? rozdzielic te dwie sekcje <span>
Jak wstawiam kod z przyk?adu 1 który podajesz to mi wy?wietla
Parse error: syntax error, unexpected '<' in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Jak biore drugi przyk?ad to mam
Warning: Unknown(http://fotozoom.webd.pl/cpg1413/losowa.php): failed to open stream: Connection refused in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Warning: (null)() [function.include]: Failed opening 'http://fotozoom.webd.pl/cpg1413/losowa.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Prosi?bym o jakie? rady
Edytowane przez Milka dnia 24.01.2008 15:33:47
|
|
|
|
W?cibski Go?? |
Dodany dnia 06.09.2025 09:26:58
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
bartek124 |
Dodany dnia 24.01.2008 15:42:21
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Piter573PB napisa?/a:
Jak wstawiam kod z przyk?adu 1 który podajesz to mi wy?wietla
Parse error: syntax error, unexpected '<' in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Jak biore drugi przyk?ad to mam
Warning: Unknown(http://fotozoom.webd.pl/cpg1413/losowa.php): failed to open stream: Connection refused in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Warning: (null)() [function.include]: Failed opening 'http://fotozoom.webd.pl/cpg1413/losowa.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/sites/yoyo.pl/z/s/zsg5r-sko-beta2/php-fusion/side_right.php(43) : eval()'d code on line 1
Prosi?bym o jakie? rady
Drugi sposób dzia?a, bierz s?ownik w r?k? i t?umacz komunikat.
Co do tego drugiego kodu to przecie? tam s? dwa span i je oddzieli?em! S?uchaj wyt?umacz to jako? normalnie. Napisa?e? ?eby oddzieli? dwa spany <br> to oddzieli?em.
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
Piter573PB |
Dodany dnia 24.01.2008 16:03:56
|

Przedszkolak

Postów: 53
Data rejestracji: 19.01.2008 11:31
|
Mo?e ?le si? wyrazi??m. Pod tym adresem http://fotozoom.w...losowa.php jest kod php który ma za zadanie wy?wietla? losow? fotografie z galeri zrobionej w coppermine. Jak ka?dy wie kod php jest przetwarzany przez serwer i do przegl?darki trafia ju? tylo gotowyt kod html. W kodzie html s? 2 znaczniki <span> w jednym tytu? zdjecia w drugim nazwa autora. w pliku php który wy?wietla to jest tylko jedna funkcja która odpowiada za wy?wietlanie tekstu i ni jak nie idzie j? podzieli?. Dlatego moje pytanie jest takie. Jak kod wstawi? do panelu w php-fusion aby by? wy?wietlany efekt tego skryptu tzn. fotka z podpisem i autorem. Ewentualnie jakis sposób aby php-fusion rozdziela? te znaczniki <span>. Jak nadal kto? twierdzi ,?e napisa?em zawile to powiem krótko. Chce mie? wy?wietlony obrazek, pod obrazkiem jego tytu?, a pod tytu?m autora. A co do t?umachenia komnikatu to w tym drugim komunikacie pisze tak jakby ,?e serwer nie mo?e sie po??czyc z tym plikiem php bo jest jaki? b??d w pliku side_right.php w lini 1. Nie bardzo ??pie tylko ten fragment.
(include_path='.:/usr/share/php:/usr/share/pear')
bartek124, ty oddzieli?e? je ale w kodzie html. a on jest generowany za ka?dym razem od nowa. wi?c nie wiem jak mog? wstawi? go tam. Jak by to komu? pomog?o to dam tu kod tego pliku losowa.php
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - random photo displayer //
// ------------------------------------------------------------------------- //
// Based on Dr. Tarique Sani RSS feed for Coppermine //
// <a href=\"http://tariquesani.net/\" target=\"_blank\">http://tariquesani.net/</a> //
//
// Adapted by djib to display a random photo - <a href=\"http://djib.biz\" target=\"_blank\">http://djib.biz</a> //
// 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. //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show
$thumb_per_page = 1;
$thumb_count = 4;
$lower_limit = 0;
$album = 'random';
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$keywords = explode(" ",trim($picture[keywords]));
$category_string = "";
$pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Random image"/><br><br></a>'.bb_decode($picture[caption_text]);
echo $description;
}
?>
Edytowane przez bartek124 dnia 24.01.2008 16:26:42
|
|
|
|
bartek124 |
Dodany dnia 24.01.2008 16:19:21
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Trzeba by?o od razu da? kod pliku :P.
bb_decode($picture[caption_text])
To odpowiada za wy?wietlanie nazwy i autora zdj?cia. Nie znam coppermine, wi?c nie wiem gdzie to mo?e by?, ale daj kod pliku include/init.inc.php.
A poza tym dowiedz si?, czy twój serwer obs?uguje mo?liwo?? includowania z zewn?trznej ?cie?ki.

U mnie na localhost jak wida? wszystko dzia?a.
PS. To rozpocznij nowy w?tek, bo ten szkoda za?mieca?, z reszt? i tak piszemy nie na temat.
Edytowane przez bartek124 dnia 24.01.2008 16:27:57
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
Piter573PB |
Dodany dnia 24.01.2008 16:29:05
|

Przedszkolak

Postów: 53
Data rejestracji: 19.01.2008 11:31
|
Kod pliku losowa.php jest w po?cie wy?ej. a i jeszcze jedno pytanko czy teraz jak ju? wyt?umaczy?em o co dok?adnie chodzi?o mi z tym <br> jeste? w stanie odpowiedzie? na pytanie , czy da si? co? takiego zrobi? jak pisa?em wy?ej?. A co do includowania to plik phpinfo mam wy??czony. I teraz co mam zmieni? w jego kodzie php tak ,?eby dzia?a?. Komunikat pisa? ,?e w lini 15 czyli phpinfo(); tylko co tam zmienic.
require_once "../maincore.php";
if (!checkrights("PI") || !defined("iAUTH") || $aid != iAUTH) fallback("../index.php");
phpinfo();
Narazie serwer mam na yoyo.pl. Ale zamierzam przenie?? na webd.pl wi?c jak by? si? orjentowa? jak sprawa wyglada z includowaniem na tych serwerach to by?o by fajnie
Ni?ej kod pliku init.inc.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2007 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.4.14
$Source$
$Revision: 4028 $
$Author: gaugau $
$Date: 2007-11-05 09:20:20 +0100 (Mo, 05 Nov 2007) $
**********************************************/
define('COPPERMINE_VERSION', '1.4.14');
define('COPPERMINE_VERSION_STATUS', 'stable');
if (!defined('IN_COPPERMINE')) { die('Not in Coppermine...');}
// Store all reported errors in the $cpgdebugger
require_once('include/debugger.inc.php');
set_magic_quotes_runtime(0);
// used for timing purpose
$query_stats = array();
$queries = array();
function cpgGetMicroTime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$cpg_time_start = cpgGetMicroTime();
// Do some cleanup in GET, POST and cookie data and un-register global vars
$HTML_SUBST = array('&' => '&', '"' => '"', '<' => '<', '>' => '>', '%26' => '&', '%22' => '"', '%3C' => '<', '%3E' => '>','%27' => ''', "'" => ''');
$keysToSkip = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', 'HTML_SUBST');
if (get_magic_quotes_gpc()) {
if (is_array($_POST)) {
foreach ($_POST as $key => $value) {
if (!is_array($value))
$_POST[$key] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_GET)) {
foreach ($_GET as $key => $value) {
unset($_GET[$key]);
$_GET[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_COOKIE)) {
foreach ($_COOKIE as $key => $value) {
if (!is_array($value))
$_COOKIE[$key] = stripslashes($value);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
if (!is_array($value))
$_REQUEST[$key] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
} else {
if (is_array($_POST)) {
foreach ($_POST as $key => $value) {
if (!is_array($value))
$_POST[$key] = strtr($value, $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_GET)) {
foreach ($_GET as $key => $value) {
unset($_GET[$key]);
$_GET[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_COOKIE)) {
foreach ($_COOKIE as $key => $value) {
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
if (is_array($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
if (!is_array($value))
$_REQUEST[$key] = strtr($value, $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key) && ini_get('register_globals') == '1') unset($$key);
}
}
}
// Initialise the $CONFIG array and some other variables
$CONFIG = array();
//$PHP_SELF = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
$PHP_SELF = '';
$ORIGINAL_PHP_SELF = $_SERVER['PHP_SELF'];
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');
foreach ($possibilities as $test){
if (isset($_SERVER[$test]) && preg_match('/([^\/]+\.php)$/', $_SERVER[$test], $matches)){
$PHP_SELF = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $matches[1];
break;
}
}
$REFERER = urlencode($_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$META_ALBUM_SET = '';
$FORBIDDEN_SET = '';
$FORBIDDEN_SET_DATA = array();
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
// Record User's IP address
$raw_ip = stripslashes($_SERVER['REMOTE_ADDR']);
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$hdr_ip = stripslashes($_SERVER['HTTP_CLIENT_IP']);
} else {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$hdr_ip = stripslashes($_SERVER['HTTP_X_FORWARDED_FOR']);
} else {
$hdr_ip = $raw_ip;
}
}
if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $raw_ip)) $raw_ip = '0.0.0.0';
if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $hdr_ip)) $hdr_ip = '0.0.0.0';
// Define some constants
define('USER_GAL_CAT', 1);
define('FIRST_USER_CAT', 10000);
define('RANDPOS_MAX_PIC', 200);
define('TEMPLATE_FILE', 'template.html');
// Constants used by the cpg_die function
define('INFORMATION', 1);
define('ERROR', 2);
define('CRITICAL_ERROR', 3);
// Include config and functions files
if(file_exists('include/config.inc.php')){
ob_start();
require_once 'include/config.inc.php';
ob_clean();
} else {
// error handling: if the config file doesn't exist go to install
die('<html>
<head>
<title>Coppermine not installed yet</title>
<meta http-equiv="refresh" content="10;url=install.php">
<style type="text/css">
<!--
body { font-size: 12px; background: #FFFFFF; margin: 20%; color: black; font-family: verdana, arial, helvetica, sans-serif;}
-->
</style>
</head>
<body>
<img src="images/coppermine_logo.png" alt="Coppermine Photo Gallery - Your Online Photo Gallery" /><br />
Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. You\'ll be redirected to the installer. If your browser doesn\'t support redirect, click <a href="install.php">here</a>.
</body>
</html>');
}
$mb_utf8_regex = '[\xE1-\xEF][\x80-\xBF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xC2-\xDF][\x80-\xBF]';
require 'include/functions.inc.php';
# see http://php.net/mbstring for details
if (function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); }
$CONFIG['TABLE_PICTURES'] = $CONFIG['TABLE_PREFIX'].'pictures';
$CONFIG['TABLE_ALBUMS'] = $CONFIG['TABLE_PREFIX'].'albums';
$CONFIG['TABLE_COMMENTS'] = $CONFIG['TABLE_PREFIX'].'comments';
$CONFIG['TABLE_CATEGORIES'] = $CONFIG['TABLE_PREFIX'].'categories';
$CONFIG['TABLE_CONFIG'] = $CONFIG['TABLE_PREFIX'].'config';
$CONFIG['TABLE_USERGROUPS'] = $CONFIG['TABLE_PREFIX'].'usergroups';
$CONFIG['TABLE_VOTES'] = $CONFIG['TABLE_PREFIX'].'votes';
$CONFIG['TABLE_USERS'] = $CONFIG['TABLE_PREFIX'].'users';
$CONFIG['TABLE_BANNED'] = $CONFIG['TABLE_PREFIX'].'banned';
$CONFIG['TABLE_EXIF'] = $CONFIG['TABLE_PREFIX'].'exif';
$CONFIG['TABLE_FILETYPES'] = $CONFIG['TABLE_PREFIX'].'filetypes';
$CONFIG['TABLE_ECARDS'] = $CONFIG['TABLE_PREFIX'].'ecards';
$CONFIG['TABLE_TEMPDATA'] = $CONFIG['TABLE_PREFIX'].'temp_data';
$CONFIG['TABLE_FAVPICS'] = $CONFIG['TABLE_PREFIX'].'favpics';
$CONFIG['TABLE_BRIDGE'] = $CONFIG['TABLE_PREFIX'].'bridge';
$CONFIG['TABLE_VOTE_STATS'] = $CONFIG['TABLE_PREFIX'].'vote_stats';
$CONFIG['TABLE_HIT_STATS'] = $CONFIG['TABLE_PREFIX'].'hit_stats';
// Connect to database
($CONFIG['LINK_ID'] = cpg_db_connect()) || die('<b>Coppermine critical error</b>:<br />Unable to connect to database !<br /><br />MySQL said: <b>' . mysql_error() . '</b>');
// Retrieve DB stored configuration
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_CONFIG']}");
while ($row = mysql_fetch_array($results)) {
$CONFIG[$row['name']] = $row['value'];
} // while
mysql_free_result($results);
// Reference 'site_url' to 'ecards_more_pic_target'
$CONFIG['site_url'] =& $CONFIG['ecards_more_pic_target'];
// Include logger functions
include_once('include/logger.inc.php');
// Include media functions
require 'include/media.functions.inc.php';
// Check for GD GIF Create support
if ($CONFIG['thumb_method'] == 'im' || function_exists('imagecreatefromgif'))
$CONFIG['GIF_support'] = 1;
else
$CONFIG['GIF_support'] = 0;
// Include plugin API
require('include/plugin_api.inc.php');
if ($CONFIG['enable_plugins'] == 1) {
CPGPluginAPI::load();
}
// Set UDB_INTEGRATION if enabled in admin
if ($CONFIG['bridge_enable'] == 1 && !defined('BRIDGEMGR_PHP')) {
$BRIDGE = cpg_get_bridge_db_values();
} else {
$BRIDGE['short_name'] = 'coppermine';
$BRIDGE['use_standard_groups'] = 1;
$BRIDGE['recovery_logon_failures'] = 0;
$BRIDGE['use_post_based_groups'] = false;
}
define('UDB_INTEGRATION', $BRIDGE['short_name']);
require_once 'bridge/' . UDB_INTEGRATION . '.inc.php';
/*
Removed temporarily due to non-compliance with bridging system - Nibbler
// Retrieve Array of Admin Groups (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT group_id FROM {$CONFIG['TABLE_USERGROUPS']} WHERE has_admin_access ");
$CONFIG['ADMIN_GROUPS']=array();
while ($row = mysql_fetch_array($results)) {
$CONFIG['ADMIN_GROUPS'][]= $row['group_id'];
} // while
mysql_free_result($results);
// Retrieve Array of Admin Users (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT {$cpg_udb->field['user_id']} as user_id FROM $cpg_udb->usertable WHERE {$cpg_udb->field['usertbl_group_id']} in (" . implode(',',$CONFIG['ADMIN_GROUPS']).')');
$CONFIG['ADMIN_USERS']=array();
while ($row = mysql_fetch_array($results)) {
$CONFIG['ADMIN_USERS'][] = $row['user_id'];
} // while
mysql_free_result($results);
*/
// Start output buffering
ob_start('cpg_filter_page_html');
// Parse cookie stored user profile
user_get_profile();
// Authenticate
$cpg_udb->authenticate();
// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);
// Set error logging level
// Maze's new error report system
if (!USER_IS_ADMIN) {
if (!$CONFIG['debug_mode']) $cpgdebugger->stop(); // useless to run debugger cos there's no output
error_reporting(E_PARSE); // hide all errors for visitors
}
// Process theme selection if present in URI or in user profile
if (!empty($_GET['theme'])) {
$USER['theme'] = $_GET['theme'];
}
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
unset($USER['theme']);
}
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
require "include/themes.inc.php"; //All Fallback Theme Templates and Functions
$THEME_DIR = "themes/{$CONFIG['theme']}/";
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if (!empty($_GET['lang']))
{
$USER['lang'] = ereg("^[a-z0-9_-]*$", $_GET['lang']) ? $_GET['lang'] : $CONFIG['lang'];
}
if (isset($USER['lang']) && !strstr($USER['lang'], '/') && file_exists('lang/' . $USER['lang'] . '.php'))
{
$CONFIG['default_lang'] = $CONFIG['lang']; // Save default language
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>|`', '____________');
}
elseif ($CONFIG['charset'] == 'utf-8')
{
include('include/select_lang.inc.php');
if (file_exists('lang/' . $USER['lang'] . '.php'))
{
$CONFIG['default_lang'] = $CONFIG['lang']; // Save default language
$CONFIG['lang'] = $USER['lang'];
}
}
else
{
unset($USER['lang']);
}
if (isset($CONFIG['default_lang']) && ($CONFIG['default_lang']==$CONFIG['lang']))
{
unset($CONFIG['default_lang']);
}
if (!file_exists("lang/{$CONFIG['lang']}.php"))
$CONFIG['lang'] = 'english';
// We load the chosen language file
require "lang/{$CONFIG['lang']}.php";
// Include and process fallback here if lang <> english
if($CONFIG['lang'] != 'english' && $CONFIG['language_fallback']==1 ){
require "include/langfallback.inc.php";
}
// See if the fav cookie is set else set it
if (isset($_COOKIE[$CONFIG['cookie_name'] . '_fav'])) {
$FAVPICS = @unserialize(@base64_decode($_COOKIE[$CONFIG['cookie_name'] . '_fav']));
foreach ($FAVPICS as $key => $id ){
$FAVPICS[$key] = (int)$id; //protect against sql injection attacks
}
} else {
$FAVPICS = array();
}
// If the person is logged in get favs from DB those in the DB have precedence
if (USER_ID > 0){
$sql = "SELECT user_favpics FROM {$CONFIG['TABLE_FAVPICS']} WHERE user_id = ".USER_ID;
$results = cpg_db_query($sql);
$row = mysql_fetch_array($results);
if (!empty($row['user_favpics'])){
$FAVPICS = @unserialize(@base64_decode($row['user_favpics']));
}else{
$FAVPICS = array();
}
}
// If referer is set in URL and it contains 'http' or 'script' texts then set it to 'index.php' script
if (isset($_GET['referer'])) {
if (preg_match('/((\%3C)|<)[^\n]+((\%3E)|>)|(.*http.*)|(.*script.*)/i', $_GET['referer'])) {
$_GET['referer'] = 'index.php';
}
}
/**
* CPGPluginAPI::action('page_start',null)
*
* Executes page_start action on all plugins
*
* @param null
* @return N/A
**/
CPGPluginAPI::action('page_start',null);
// load the main template
load_template();
// Remove expired bans
$now = date('Y-m-d H:i:s', localised_timestamp());
$CONFIG['template_loaded'] = true;
cpg_db_query("DELETE FROM {$CONFIG['TABLE_BANNED']} WHERE expiry < '$now'");
// Check if the user is banned
$user_id = USER_ID;
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE (ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id=$user_id) AND brute_force=0");
if (mysql_num_rows($result)) {
pageheader($lang_error);
msg_box($lang_info, $lang_errors['banned']);
pagefooter();
exit;
}
mysql_free_result($result);
// Retrieve the "private" album set
if (!GALLERY_ADMIN_MODE && $CONFIG['allow_private_albums']) get_private_album_set();
if (!USER_IS_ADMIN && $CONFIG['offline'] && !strstr($_SERVER["SCRIPT_NAME"],'login')) {
pageheader($lang_errors['offline_title']);
msg_box($lang_errors['offline_title'], $lang_errors['offline_text']);
pagefooter();
exit;
}
// kick user into user_admin_mode (needed to fix "removed user mode for users" when upgrading)
if (USER_ID && !USER_IS_ADMIN && !$USER['am']) { // user is logged in, but is not gallery admin and not in admin mode
$USER['am'] = 1;
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$referer\">");
msg_box($lang_info, 'Sending you to admin mode', $lang_continue, $referer);
pagefooter();
ob_end_flush();
die();
}
?>
doda?em nowy temat http://www.php-fu...d_id=16796 Jak by? móg? to przenie? nasze wcze?niejsze posty z tego dzia?u tam bo ktos nie zorientoany w sprawie nie bedzie wiedzi?? o co chodzi.
B?d? ?askaw, i nie usuwaj moich dopisków. Postów przenosi? nie mog?, wi?c za?ó? nowy temat opisuj?c wszystko od nowa.
Edytowane przez bartek124 dnia 24.01.2008 17:05:35
|
|
|
|
ma2o |
Dodany dnia 02.02.2008 18:54:38
|

Przedszkolak

Postów: 3
Data rejestracji: 30.01.2008 21:09
|
W podobnym skrypcie jak powy?ej losowa fotka dzia?a i wszystko by?oby OK gdyby by?a wy?wietlana centralnie w panelu a nie po lewej stronie.
openside("name");
include 'http://fotozoom.webd.pl/cpg1413/losowa.php';
closeside();
gdzie trzeba w tym kodzie dopisa? CENTER i jak. Probowa?em wielu rozwiaza? ale zawsze wychodzi b??d.
poni?ej przyk?ad jak wyswietlana jest zawartoscs panelu
http://img152.ima...ioncl1.png
Edytowane przez ma2o dnia 02.02.2008 18:55:26
|
|
|
|
Johny |
Dodany dnia 02.02.2008 18:58:08
|

Bywalec

Postów: 372 Pomógł: 2
Data rejestracji: 30.08.2006 23:02
|
openside("name");
echo "<center>";
include 'http://fotozoom.webd.pl/cpg1413/losowa.php';
echo "</center>";
closeside();
Edytowane przez Johny dnia 02.02.2008 19:01:03
|
|
|
|
ma2o |
Dodany dnia 02.02.2008 19:14:10
|

Przedszkolak

Postów: 3
Data rejestracji: 30.01.2008 21:09
|
Wszystko gra dzi?ki, mam nadzieje ze przyda sie tez innym.
Edytowane przez bartek124 dnia 02.02.2008 19:15:23
|
|
|
|
rabit7 |
Dodany dnia 15.02.2008 18:14:38
|

Przedszkolak

Postów: 57 Ostrzeżeń: 1
Data rejestracji: 02.02.2008 08:21
|
Panel nie akceptuje podwójnego apostrofa ".
W zwiazku z tym musicie " :
a) zamieniac na \"
 zamieniac na pojedyncze apostrofy '
c) zmienic echo " na echo '
d) wstawic w tagi <?php ?>
Mam male pytanie po co jest ten temat ? Mi wszystko dzia?a tak jak dotychczas mia?em..
|
|
|
|
bartek124 |
Dodany dnia 15.02.2008 19:03:05
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Ale inni nie s? tacy m?drzy jak Ty, i potrzebuj? pomocy .
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
syber |
Dodany dnia 22.02.2008 20:08:19
|

Przedszkolak

Postów: 53 Pomógł: 1 Ostrzeżeń: 1
Data rejestracji: 07.02.2007 10:10
|
Witam.
Mam takie co?:
opentable($data['download_title']);
Jak zrobi?, ?eby przed:
$data['download_title']
wstawi? jaki? napis, np. Plik: ?
Chodzi mi o co? takiego:
Plik: $data['download_title']
Tylko, ?e taki kod nie b?dzie dzia?a?:
opentable(Plik: $data['download_title']);
Pozdrawiam! |
|
|
|
bartek124 |
Dodany dnia 22.02.2008 20:13:26
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
opentable("Plik: "$data['download_title']);
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
syber |
Dodany dnia 22.02.2008 21:02:56
|

Przedszkolak

Postów: 53 Pomógł: 1 Ostrzeżeń: 1
Data rejestracji: 07.02.2007 10:10
|
bartek124 napisa?/a:
opentable("Plik: "$data['download_title']);
Niestety to nie dzia?a.
Poprawnie jest tak:
opentable("Plik: ".$data['download_title']);
"."
:)
Dzi?ki!
Edytowane przez syber dnia 22.02.2008 21:07:15
|
|
|
|
loke83 |
Dodany dnia 23.02.2008 16:31:25
|

Przedszkolak

Postów: 1
Data rejestracji: 22.02.2008 17:53
|
Witam mam taki kod który wklejam jest to baner reklamowy animowany ale niestety wida? tylko czarne pole
echo "
<embed name='reklama'src='http://www.cogasg.com/reklama/reklama.swf'
quality='high' bgcolor='#000000' swLiveConnect='true'
width='218' height='100'
type='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>
";
Oczywi?cie ju? go przerobi?em do wstawienia ale nie wida? ?adnych animacji strona to www.grssfora.yoyo.pl na php fusion i nie wiem co jest nie tak :( Mo?e kto? mi to przerobi???
Edytowane przez Milka dnia 23.02.2008 18:48:12
|
|
|
|
bartek124 |
Dodany dnia 23.02.2008 18:54:10
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Ta reklama nie istnieje. Wejd? w http://www.cogasg...eklama.swf i sam zobacz.
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
pietro007 |
Dodany dnia 28.02.2008 11:27:46
|

Przedszkolak

Postów: 2
Data rejestracji: 06.02.2008 13:35
|
Prosz? o pomoc. Wstawi?em taki kod brak b??dów ale nie dzia?a co zrobi?em ?le
openside("Cytat");
echo "<? readfile('http://www.edycja.pl/ext/dzien.php'); ?>";
closeside();
|
|
|
|
bartek124 |
Dodany dnia 28.02.2008 15:25:04
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
openside("Cytat");
[b]echo "<? [/b]readfile('http://www.edycja.pl/ext/dzien.php');[b] ?>";[/b]
closeside();
Wyt?umacz mi po co jest to pogrubione?
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
pietro007 |
Dodany dnia 28.02.2008 15:33:01
|

Przedszkolak

Postów: 2
Data rejestracji: 06.02.2008 13:35
|
Przyznaj? si? dopiero zaczynam i wielu rzeczy nie rozumiem (tz nie mog? ci tego wyt?umaczy?).
Edytowane przez bartek124 dnia 28.02.2008 15:50:34
|
|
|
|
krissvansmall |
Dodany dnia 07.03.2008 00:57:52
|

Przedszkolak

Postów: 2
Data rejestracji: 11.02.2008 13:08
|
Witam jestem kompletnie zielony w te klocki ale powoli sie ucze mam pytanko..jak dodac w panelu bullet tzn te grafike kropki co sa w odnosnikach np. tak jak w nawigacji jaki to jest kod ? z gory dziekuje  |
|
|
|
bartek124 |
Dodany dnia 07.03.2008 07:42:44
|

Weteran

Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
echo "<img scr='".THEME."images/bullet.gif' />";
Nie pomagam na komunikatorach oraz PW!
|
|
|