Results 1 to 4 of 4

Thread: HTML in PHP

  1. #1
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default HTML in PHP

    Hi,

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

    http://www.dynamicdrive.com/dynamici...amicsplash.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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •