PDA

View Full Version : HTML in PHP



mvwebdesign
04-06-2008, 01:47 AM
Hi,

I want to set up a splash page using the script located here.

http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

Problem is, I have a php file as my main page. How would I set up the script in my php page.

My php follows below:


<?php

/*
#======================================================
| Trellis Desk
| =====================================
| By DJ "someotherguy" (sog@accord5.com)
| 2007 ACCORD5
| http://www.accord.com/products/trellis/
| =====================================
| Email: sales@accord5.com
#======================================================
| @ Version: v1.0 RC 1 Build 10031234
| @ Version Int: 100.3.1.234
| @ Version Num: 10031234
| @ Build: 0234
#======================================================
| | Trellis Desk Main Index
| | Date Started: January 8, 2006
| | Date Completed: N/A
| | Release Hash: <#TAG_RHASH_TAG#>
#======================================================
*/

#=============================
# Safe and Secure
#=============================

ini_set( 'register_globals', 0 );

if ( function_exists('date_default_timezone_get') )
{
date_default_timezone_set( date_default_timezone_get() );
}

if ( @ini_get( 'register_globals' ) )
{
while ( list( $key, $value ) = each( $_REQUEST ) )
{
unset( $$key );
}
}

#=============================
# Itsy Bitsy Stuff
#=============================

define( 'IN_HD' , 1 );

#ini_set( 'display_errors', 1 );
error_reporting( E_ERROR | E_WARNING | E_PARSE );

#=============================
# Define Our Paths
#=============================

define( "HD_PATH", "./" );
define( 'HD_INC', HD_PATH ."includes/" );
define( 'HD_SRC', HD_PATH ."sources/" );
define( 'HD_SKIN', HD_PATH ."skin/" );

define( 'HD_DEBUG', false );

#=============================
# Main Class
#=============================

require_once HD_INC . "ifthd.php";
$ifthd = new ifthd();

#=============================
# Are We Banned?
#=============================

$banned_users = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_names'] ) );
$banned_emails = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_emails'] ) );
$banned_ips = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_ips'] ) );

if ( in_array( strtolower( $ifthd->member['name'] ), $banned_users ) || ( $ifthd->member['email'] && in_array( strtolower( $ifthd->member['email'] ), $banned_emails ) ) || in_array( strtolower( $ifthd->input['ip_address'] ), $banned_ips ) )
{
$ifthd->skin->error('no_perm_banned');
}

#=============================
# Other Junk
#=============================

$choice = array(
'article' => 'article',
'kb' => 'article',
'myaccount' => 'account',
'feed' => 'feed',
'portal' => 'portal',
'pages' => 'pages',
'news' => 'news',
'register' => 'register',
'tickets' => 'tickets',
);

#=============================
# Require & Run
#=============================

$required = $choice[ $ifthd->input['act'] ];

if ( ! isset( $required ) )
{
$required = 'portal';
}

require_once HD_SRC . $required .".php";

$run = new $required();
$run->ifthd =& $ifthd;

$run->auto_run();

?>

Thanks,

RJ

thetestingsite
04-06-2008, 01:55 AM
Depending on which page you want the splash page, you would want to place it on one of the following pages:

article.php
account.php
feed.php
portal.php
pages.php
news.php
register.php
tickets.php

Hope this helps.

mvwebdesign
04-06-2008, 02:52 AM
But how would I insert


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<script type="text/javascript" src="splashpage.js">

/***********************************************
* Splash Page script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

into my index.php listed above.

Thanks
RJ

djr33
04-06-2008, 09:03 AM
The code above INCLUDES the pages that thetestingsite listed. You will need to look at those pages then add it in the appropriate location.

Remember, PHP generates html, so you need to first find which page and which lines generate that part of your page (the head section, it seems), then you need to decide how to include it there.