+ Reply to Thread
Results 1 to 1 of 1

Thread: Heredoc help!

  1. #1
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Heredoc/Nowdoc help!

    I get this error:
    Code:
    Parse error: syntax error, unexpected T_SL in /home/xav0989/public_html/grafsig/test/includes/functions_layout.php on line 74
    And here is the file:
    PHP Code:
    <?php

    class layout {

        var 
    $dtd '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
        var 
    $attribution '<!--Design by Free CSS Templates
    http://www.freecsstemplates.org
    Released for free under a Creative Commons Attribution 2.5 License

    Title      : Blooming
    Version    : 1.0
    Released   : 20070813
    Description: A two-column, fixed-width design suitable for blogs and forum sites.

    -->'
    ;
        var 
    $html_start '<html xmlns="http://www.w3.org/1999/xhtml">';
        var 
    $head_start '    <head>
            <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />'
    ;
        var 
    $head '        <meta name="keywords" content="" />
            <meta name="description" content="" />'
    ;
        var 
    $head_end '    </head>';
        var 
    $body_start '    <body>
            <!-- start page_header -->
            <div id="header">
                <form id="search" method="get" action="/search/search.php">
                    <fieldset>
                        <legend>Search</legend>
                        <input id="searchfield" name="q" value="Search" type="text" onfocus="this.value=null;" />
                        <input id="offset" name="offset" value="0" type="hidden" />
                        <input id="searchsubmit" value="Search" type="submit" />
                    </fieldset>
                </form>
                <h1>GrafSig</h1>
            </div>
            <!-- end header -->'
    ;
        var 
    $page_start '        <!-- start page -->
            <div id="page">'
    ;
        var 
    $content_start '            <!-- start content -->
                <div id="content">'
    ;
        var 
    $content_end '            </div>
                <!-- end content -->'
    ;
        var 
    $sidebar '            <!-- start sidebar -->
                <div id="sidebar">
                    <ul>
                        <li>
                            <h2>Main Navigation</h2>
                            <ul>
                                <li><a href="/">GrafSig</a></li>
                                <li><a href="/search/search.php">Search</a></li>
                                <li><a href="/resend_email.php">Resend Download Link</a></li>
                                <li><a href="/check_status.php">Check Request Status</a></li>
                                <li><a href="/contact.php">Contact Us</a></li>
                            </ul>
                        </li>
                        <li>
                            <h2>Sigs</h2>
                            <ul>
                                <a href="/graf.sigs.php" title="Graffiti Type Signature">Graffiti Type Sig</a>
                            </ul>
                        </li>
                    </ul>
                    <div style="clear: both">&nbsp;</div>
                </div>
                <!-- end sidebar -->'
    ;
        var 
    $page_end '            <div style="clear: both">&nbsp;</div>
            </div>
            <!-- end page -->'
    ;
        var 
    $footer '        <div id="footer">
                <p id="legal">©2007 All Rights Reserved. | Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
                <p id="links"><a href="/privacy.php">Privacy</a> | <a href="/license.php">License</a> | <a href="/tac.php">Terms</a> | <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a></p>
            </div>'
    ;
        var 
    $body_end '    </body>';
        var 
    $html_end '</html>';
        var 
    $link_tracker = <<<'EOLT'
    <script type="text/javascript">
       var clicktracker_url        = "http://test.grafsig.co.cc/path_to_click_tracker/click-tracker.php";
       var clicktracker_domains    = Array("", "grafsig.co.cc", "www.grafsig.co.cc", "test.grafsig.co.cc");
       var clicktracker_extensions = Array("doc", "exe", "rar", "zip");
       </script>

       <script type="text/javascript" src="http://www.yourdomain.com/path_to_click_tracker/click-tracker.js"></script>
    EOLT;

        function 
    page_head($title$addijs ''$addjs ''$css 'default.css'$defaultname 'GrafSig :: ') {
            if (
    $addjs != '') {
                
    $addjs '<script type="text/javascript" src="/style/' $addjs '.js"></script>';
            }
            if (
    $addijs != '') {
                
    $addijs '<script type="text/javascript">' $addijs '</script>';
            }
            
    header("Content-Type: application/xhtml+xml");

            echo 
    $this->dtd "\n";
            echo 
    $this->attribution "\n";
            echo 
    $this->html_start "\n";
            echo 
    $this->head_start "\n";
            echo 
    "<title>" $defaultname $title "</title>" "\n";
            echo 
    $this->head "\n";
            echo 
    '<link href="/style/' $css '" rel="stylesheet" type="text/css" />' "\n";
            echo 
    $this-link_tracker "\n";
            echo 
    $addjs "\n";
            echo 
    $addijs "\n";
            echo 
    $this->head_end "\n";
            echo 
    $this->body_start "\n";
            echo 
    $this->page_start "\n";
            echo 
    $this->content_start "\n";
        }

        function 
    page_tpl_load($tpl) {
            
    $tpl "style/tpl/" $tpl ".html";
            if (!
    file_exists($tpl)) {
            
    $this->page_content('error_notemp');
            return;
            }
            
    $file file_get_contents($tpl);
            echo 
    $file "\n"
        }

        function 
    page_content($tpl_file) {
            
    $this->page_tpl_load($tpl_file);
        }

        function 
    page_sidebar() {

            echo 
    $this->content_end "\n";
            echo 
    $this->sidebar "\n"
        }

        function 
    page_foot() {

            echo 
    $this->page_end "\n";
            echo 
    $this->footer "\n";
            echo 
    $this->body_end "\n";
            echo 
    $this->html_end "\n";
        }
    };

    ?>
    HELP!
    Edit:
    Nevermind, we need PHP 5.3.0!
    Last edited by xav0989; 09-21-2008 at 11:55 AM. Reason: Automerged Doublepost
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers