Evtl koennte man auch mit Frames/Iframes arbeiten, in denen
die Ausgabe dieser beiden Scripte angezeigt wird.
Hallo Stefan,
an Iframes habe ich auch schon gedacht, aber bei Iframes habe ich immer das Problem dass man wieder weit nach oben scrollen muss, wenn man bei einer langen PHP Seite relativ weit unten einen Eintrag vornimmt und die darauf erscheinende Ausgabe relativ kurz ist. Andernfalls sieht man nur den Hintergrund.
Hier sind mal die Quellcodes der PHP Seiten, welche auf einer angezeigt werden sollen:
live_charts.php
<?php /* ############## DEFINE IMPORTANT CONSTANTS AND VARIABLES ############### */
define('IN\_UC', TRUE);
define('SCRIPT\_VERSION', "1.1");
define('SCRIPT\_NAME', "PHP USERCHARTS ".SCRIPT\_VERSION);
define('DIR\_SEP', DIRECTORY\_SEPARATOR);
$script\_path = realpath(dirname(\_\_FILE\_\_)) . DIR\_SEP;
define('SCRIPT\_PATH', $script\_path);
$script\_filename = basename(\_\_FILE\_\_);
define('SCRIPT\_FILENAME', defined('UC\_INCLUDED') ? basename($\_SERVER['SCRIPT\_NAME']).UC\_INCLUDED\_PARAMS : $script\_filename);
define('INCLUDE\_PATH', SCRIPT\_PATH.'includes'.DIR\_SEP);
define('LANGUAGE\_PATH', SCRIPT\_PATH.'languages'.DIR\_SEP);
define('TEMP\_PATH', SCRIPT\_PATH.'temp'.DIR\_SEP);
define('TEMPLATE\_PATH', SCRIPT\_PATH.'templates'.DIR\_SEP);
define('TEMPLATE\_COMPILE\_PATH', SCRIPT\_PATH.'templates\_c'.DIR\_SEP);
define('TEMPLATE\_IMAGE\_PATH', TEMPLATE\_PATH.'images'.DIR\_SEP);
define('TEMPLATE\_IMAGE\_URL', 'templates/images/');
define('FILES\_PATH', SCRIPT\_PATH.'files'.DIR\_SEP);
define('SAMPLE\_PATH', FILES\_PATH.'samples'.DIR\_SEP);
define('SAMPLE\_URL', 'files/samples/');
define('COVER\_PATH', FILES\_PATH.'covers'.DIR\_SEP);
define('COVER\_URL', 'files/covers/');
define('SESSION\_PATH', TEMP\_PATH.'sessions'.DIR\_SEP);
define('SMARTY\_PATH', SCRIPT\_PATH.'smarty'.DIR\_SEP);
define('SCRIPT\_URL', "http://".$\_SERVER['HTTP\_HOST'].$\_SERVER['SCRIPT\_NAME']);
define('JS\_SCRIPT\_URL', SCRIPT\_URL);
define('REQUEST\_URL', "http://".$\_SERVER['HTTP\_HOST'].$\_SERVER['REQUEST\_URI']);
define('REFERER\_URL', $\_SERVER['HTTP\_REFERER']);
define('PHP5', version\_compare(phpversion(), '5.0', '\>='));
//include configuration
require\_once (SCRIPT\_PATH.'CONFIG.php');
define('AMAZON\_ASSOCID', $UC\_config['amazon\_associd']);
define('AMAZON\_TOKEN', $UC\_config['amazon\_token']);
define('AMAZON\_AWS\_URL', $UC\_config['amazon\_aws\_url']);
/\* ####################### SET PHP ENVIRONMENT ########################### \*/
error\_reporting(E\_ALL);
ini\_set('display\_errors', TRUE);
ini\_set('session.save\_path', SESSION\_PATH);
ini\_set("session.gc\_maxlifetime", 604800);
ini\_set("session.gc\_probability", 100);
/\* ################### BEGIN CALCULATE EXECUTE TIME ###################### \*/
$time\_start = microtime\_float();
function microtime\_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
/\* ####################################################################### \*/
/\* ######################## START MAIN SCRIPT ############################ \*/
/\* ####################################################################### \*/
//include smarty class
require\_once (SMARTY\_PATH.'Smarty.class.php');
if (!headers\_sent())
{
//cookie is set and seems to be valid
if (isset($\_COOKIE["phpucv1"]) && strlen($\_COOKIE["phpucv1"]) == 32)
{
//resume last session
session\_id($\_COOKIE["phpucv1"]);
}
//start session
session\_start();
//set cookie
setcookie("phpucv1", session\_id(), time() + 604800);
}
//include global settings and functions
include (INCLUDE\_PATH.$UC\_filenames['functions']);
include (INCLUDE\_PATH.$UC\_filenames['connect']);
include (INCLUDE\_PATH.$UC\_filenames['vars']);
include (INCLUDE\_PATH.$UC\_filenames['class\_charts']);
include (INCLUDE\_PATH.$UC\_filenames['maintenance']);
//init breadcrumb menue
array\_push($breadcrumb\_elements, array
(
'name' =\> CONFIG\_CHARTS\_TITLE,
'link' =\> SCRIPT\_FILENAME
)
);
switch ($UC\_view)
{
case '' : include(INCLUDE\_PATH.$UC\_filenames['live\_charts']); break;
case 'client\_vote' : include(INCLUDE\_PATH.$UC\_filenames['client\_vote']); break;
case 'details' : include(INCLUDE\_PATH.$UC\_filenames['details']); break;
case 'listen' : include(INCLUDE\_PATH.$UC\_filenames['listen']); break;
case 'suggest' : include(INCLUDE\_PATH.$UC\_filenames['suggest']); break;
default : errorhandler("ERROR",\_\_FILE\_\_,\_\_LINE\_\_); break;
}
?\>suggestions.php:
<?php /* ############## DEFINE IMPORTANT CONSTANTS AND VARIABLES ############### */
define('IN\_UC', TRUE);
define('SCRIPT\_VERSION', "1.1");
define('SCRIPT\_NAME', "PHP USERCHARTS ".SCRIPT\_VERSION);
define('DIR\_SEP', DIRECTORY\_SEPARATOR);
$script\_path = realpath(dirname(\_\_FILE\_\_)) . DIR\_SEP;
define('SCRIPT\_PATH', $script\_path);
$script\_filename = basename(\_\_FILE\_\_);
define('SCRIPT\_FILENAME', defined('UC\_INCLUDED') ? basename($\_SERVER['SCRIPT\_NAME']).UC\_INCLUDED\_PARAMS : $script\_filename);
define('INCLUDE\_PATH', SCRIPT\_PATH.'includes'.DIR\_SEP);
define('LANGUAGE\_PATH', SCRIPT\_PATH.'languages'.DIR\_SEP);
define('TEMP\_PATH', SCRIPT\_PATH.'temp'.DIR\_SEP);
define('TEMPLATE\_PATH', SCRIPT\_PATH.'templates'.DIR\_SEP);
define('TEMPLATE\_COMPILE\_PATH', SCRIPT\_PATH.'templates\_c'.DIR\_SEP);
define('TEMPLATE\_IMAGE\_PATH', TEMPLATE\_PATH.'images'.DIR\_SEP);
define('TEMPLATE\_IMAGE\_URL', 'templates/images/');
define('FILES\_PATH', SCRIPT\_PATH.'files'.DIR\_SEP);
define('SAMPLE\_PATH', FILES\_PATH.'samples'.DIR\_SEP);
define('SAMPLE\_URL', 'files/samples/');
define('COVER\_PATH', FILES\_PATH.'covers'.DIR\_SEP);
define('COVER\_URL', 'files/covers/');
define('SESSION\_PATH', TEMP\_PATH.'sessions'.DIR\_SEP);
define('SMARTY\_PATH', SCRIPT\_PATH.'smarty'.DIR\_SEP);
define('SCRIPT\_URL', "http://".$\_SERVER['HTTP\_HOST'].$\_SERVER['SCRIPT\_NAME']);
define('JS\_SCRIPT\_URL', SCRIPT\_URL);
define('REQUEST\_URL', "http://".$\_SERVER['HTTP\_HOST'].$\_SERVER['REQUEST\_URI']);
define('REFERER\_URL', $\_SERVER['HTTP\_REFERER']);
define('PHP5', version\_compare(phpversion(), '5.0', '\>='));
//include configuration
require\_once (SCRIPT\_PATH.'CONFIG.php');
define('AMAZON\_ASSOCID', $UC\_config['amazon\_associd']);
define('AMAZON\_TOKEN', $UC\_config['amazon\_token']);
define('AMAZON\_AWS\_URL', $UC\_config['amazon\_aws\_url']);
/\* ####################### SET PHP ENVIRONMENT ########################### \*/
error\_reporting(E\_ALL);
ini\_set('display\_errors', TRUE);
ini\_set('session.save\_path', SESSION\_PATH);
ini\_set("session.gc\_maxlifetime", 604800);
ini\_set("session.gc\_probability", 100);
/\* ################### BEGIN CALCULATE EXECUTE TIME ###################### \*/
$time\_start = microtime\_float();
function microtime\_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
/\* ####################################################################### \*/
/\* ######################## START MAIN SCRIPT ############################ \*/
/\* ####################################################################### \*/
//include smarty class
require\_once (SMARTY\_PATH.'Smarty.class.php');
if (!headers\_sent())
{
//cookie is set and seems to be valid
if (isset($\_COOKIE["phpucv1"]) && strlen($\_COOKIE["phpucv1"]) == 32)
{
//resume last session
session\_id($\_COOKIE["phpucv1"]);
}
//start session
session\_start();
//set cookie
setcookie("phpucv1", session\_id(), time() + 604800);
}
//include global settings and functions
include (INCLUDE\_PATH.$UC\_filenames['functions']);
include (INCLUDE\_PATH.$UC\_filenames['connect']);
include (INCLUDE\_PATH.$UC\_filenames['vars']);
include (INCLUDE\_PATH.$UC\_filenames['class\_charts']);
include (INCLUDE\_PATH.$UC\_filenames['maintenance']);
//init breadcrumb menue
array\_push($breadcrumb\_elements, array
(
'name' =\> CONFIG\_CHARTS\_TITLE,
'link' =\> SCRIPT\_FILENAME
)
);
switch ($UC\_view)
{
case '' : include(INCLUDE\_PATH.$UC\_filenames['suggestions']); break;
case 'client\_vote' : include(INCLUDE\_PATH.$UC\_filenames['client\_vote']); break;
case 'details' : include(INCLUDE\_PATH.$UC\_filenames['details']); break;
case 'listen' : include(INCLUDE\_PATH.$UC\_filenames['listen']); break;
case 'suggest' : include(INCLUDE\_PATH.$UC\_filenames['suggest']); break;
default : errorhandler("ERROR",\_\_FILE\_\_,\_\_LINE\_\_); break;
}
?\>
Ist dein ein einfaches includen zweier php seiten auf einer einzelnen generell unmöglich?