Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Frames

  • 26-02-2003 11:47am
    #1
    Closed Accounts Posts: 59 ✭✭


    Oh my God ... Everything I try to do with this project causes a problem!!
    Sorry for bugging all ye webmasters that actually know wot ye're doing:rolleyes:
    I want to include a html page with two frames in it into a php script... Didn't think it would be a difficult thing to do but the html page is not being displayed. It's so wierd coz the other html pages that I include are displayed no prob!
    include "frames.html"
    Is it because there are frames in it?? When I view the HTML page itself the frames are there just the way I want them!!
    I've looked on Google but nobody else seems to be having problems with it...
    Any ideas ppl before i give up on this Godforsaken Website altogether ???
    Thanx


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Source code, context, etc?

    adam


  • Closed Accounts Posts: 59 ✭✭Fi_C**


    adam,
    this is the php script that the html will be included in:
    //***************************************************
    <? session_start();

    if($pNr != null)
    {

    if( ! session_is_registered("spNr") )
    {
    session_register ("spNr");
    $spNr = $pNr;
    }

    }
    ?>
    <html>
    <head>
    <title>Projects</title>
    </head>
    <body bgcolor=#FFFFFF>
    <?include "Projtitle.html";?>
    <center >
    <table CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR="#FFFFFF"WIDTH=750 VALIGN=BOTTOM>
    <?
    $conn= mysql_connect("******", "***", "*******")
    or die("Could not connect");

    mysql_select_db("*******")
    or die("Could not select database");

    $query = "select * from projects where pNr = \"$spNr\";";
    $result = mysql_query($query)
    or die("Query failed");

    $num = mysql_num_rows($result);
    $row = mysql_fetch_array($result);
    $cName = $row["custName"];
    $pDesc = $row["pDesc"];
    $projMgr = $row["mgr"];

    if($num != 0)
    {
    echo ("<tr >
    <td COLSPAN=6 ALIGN=LEFT>
    <img src=\"images\pNr.bmp\"><b><font face=\"Comic Sans MS\"size=\"2\" color=\"#003399\"> $spNr</font></b>
    </td>
    <td COLSPAN=6 ALIGN=RIGHT>
    <img src=\"images\cName.bmp\"><b><font face=\"Comic Sans MS\"size=\"2\" color=\"#003399\"> $cName</font></b>
    </td>
    </tr>");

    echo ("<tr >
    <td COLSPAN=6 ALIGN=LEFT>
    <img src=\"images\pMan.bmp\"><b><font face=\"Comic Sans MS\"size=\"2\" color=\"#003399\"> $projMgr</font></b>
    </td>
    <td COLSPAN=6 ALIGN=RIGHT>
    <img src=\"images\pDesc.bmp\"><b><font face=\"Comic Sans MS\" size=\"2\" color=\"#003399\"> $pDesc</font></b>
    </td>
    </tr>");



    echo("<tr><td COLSPAN=6 ALIGN=LEFT><a href = \"addNews.php\"><font face=\"Comic Sans MS\" size=\"3\"
    color=\"#003399\">Submit News about $spNr</font></a></td><td COLSPAN=6
    ALIGN=RIGHT><a href = \"AddMins.php\"><font face=\"Comic Sans MS\" size=\"3\"
    color=\"#003399\">Submit meeting minutes for $spNr</font></a></td></tr>");

    $query2 = "select info from dynamicInfo where pNr = \"$spNr\" order by date DESC";

    $result2 = mysql_query($query2)
    or die ("Query2 failed");
    $num = mysql_num_rows($result2);


    $marquee ="<tr><td COLSPAN=12 ALIGN=CENTER><marquee SCROLLDELAY=110>";



    while($row2 = mysql_fetch_row($result2))
    {
    $marquee.="<img src=\"images\star.jpg\" height=\"25\" width=\"25\">";
    $marquee.="<font face=\"Comic Sans MS\" size=\"3\" color=\"#CC0000\">";
    $marquee.="$row2[0]$S$S$S$S$S$S$S$S$S$S$S$S$S$S</font>";
    array_shift ($row2);
    }
    $marquee.="</MARQUEE></td></tr></table>";
    echo($marquee);





    echo("<table CELLPADDING=0 CELLSPACING=0 BORDER=1 width=\"750\" BGCOLOR=\"#F0F8FF\" ><tr><td>");
    include "menu.html";
    echo(" </td><td ALIGN=center>");

    //include "minutes.php";

    include "frames.html"; //HERE IS WHERE THE PROBLEM IS!!
    }





    //***************************************************
    this is the frames.html page
    <html>
    <head>
    <title>frames</title>
    </head>
    <frameset cols="*,75%" frameborder="0">

    <frame name="bottom" scrolling="no" >

    <frame name="bottom1" src="minutes.php" scrolling="yes" >

    </frameset>

    <noframes>

    <body>

    <p>This page uses frames, but your browser doesn't support them.</p>

    </body>
    </noframes>
    </frameset>

    </html>

    //*************************************************
    And this is the minutes.php script src for the bottom1 frame
    (bottom frame is left blank)

    <?php
    session_start();

    $conn= mysql_connect("********", "****", "******")
    or die("Could not connect");

    mysql_select_db("***********")
    or die("Could not select database");


    $form = "<FORM Action=\"$PHP_SELF.php\">";
    $form.= "<SELECT NAME=\"minType\" SIZE=1>";
    $form.= " <OPTION> 3-1 Project Meetings (Customers)";
    $form.= " <OPTION> 3-2 Internal Meetings";
    $form.= " <OPTION> 3-3 Supplier Meeting";
    $form.= " <OPTION> 3-4 Miscel Meetings";
    $form.= " <OPTION> 3-5 Action Register";
    $form.= " </SELECT>";
    $form.="<input type= \"submit\" name = \"mT\" value = \"View\"></form></p>";
    $form.= "</FORM>";
    echo(@$form);





    //echo(@mT: $mT pNr = $spNr qNr = $sqNr<br>);
    $textarea = "<p><textarea rows=\"10\" cols=\"70\" READONLY>";
    if ($spNr)
    {

    @$query4 = "select fileLoc from projects where pNr = \"$spNr\"";
    $result4 = mysql_query($query4)
    or die ("Query 4 failed");
    $r = mysql_fetch_array($result4);
    $loc = $r["fileLoc"];

    @$query3 = "select filename from minutes where pNr = \"$spNr\" and minType = \"$mT\"";
    $result3 = mysql_query($query3)
    or die("Query3 failed");

    $row = mysql_fetch_array($result3);

    $name = $row["filename"];

    //displays file name
    }
    if (@$sqNr)
    {
    @$query4 = "select fileLoc from quotes where qNr = \"$sqNr\"";
    $result4 = mysql_query($query4)
    or die ("Query 4 failed");
    $r = mysql_fetch_array($result4);
    $loc = $r["fileLoc"];

    @$query3 = "select filename from minutes where qNr = \"$sqNr\" and minType = \"$mT\"";
    $result3 = mysql_query($query3)
    or die("Query3 failed");

    $row = mysql_fetch_array($result3);

    $name = $row["filename"];

    //displays file name
    }
    include("SOinit.php");
    $sAddr = "*ip address*";
    $sPath = "path1"; //$loc\03 minutes of meetings\$mT
    $sFile = "template.doc"; //$name
    $sPage = "";

    include("SOhttp.php");




    $text = SOWord($sAddr, $sPath, $sFile, &$sPage);

    echo("$text"); // display outside of textarea


    $txt = strip_tags($text );
    //$txt2= unhtmlentities ($txt);

    @$textarea.="****$mT minutes****\n\n";

    if($text!= null)
    {
    //$textarea.="<table CELLPADDING=0 CELLSPACING=0 BORDER=0 width=\"750\"
    // BGCOLOR=\"#F0F8FF\" ><tr><td>$txt\n\n";
    $textarea.="$txt";
    $textarea.="****************";
    $textarea.="</textarea></p></td></tr>";
    echo($textarea);
    }
    else
    {
    $textarea.="****************";
    $textarea.="</textarea></p></td></tr>";
    echo($textarea);
    }
    //****************************************************************************************************
    function SOWord($sAddr, $sPath, $sFile, &$sPage)
    {
    $errmsg = "";
    do {

    // Construct URL and grab page...

    $sURL = "http://".$sAddr."/ext.dll?MfcISAPICommand=LoadPage&"."page=doc.htx&a0=/get/".$sPath."/&quot;
    .rawurlencode($sFile)."&a1=_&a2=2048&a3=8&a4=1";
    $errmsg = SOHTTPGet($sURL, &$sPage);

    if (strlen($errmsg))
    {
    break;
    }

    }
    while (0);
    return ($sPage);
    }
    //****************************************************************************************************
    function unhtmlentities ($string)
    {
    $trans_tbl = get_html_translation_table (HTML_ENTITIES);
    $trans_tbl = array_flip ($trans_tbl);
    return strtr ($string, $trans_tbl);
    }







    ?>


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Can you stick the code in [code] or [php] tags please? It's very hard to read code like that.

    adam


  • Registered Users, Registered Users 2 Posts: 2,120 ✭✭✭p


    Kevin's #1 tip for getting help online.

    Posting up huge chunks of code won't get you any help.

    Cut the code down to the smallest amount of code where you can replicate the problem. Then post up the code and a live URL to it.

    - Kevin

    p.s. Don't use frames :P


  • Closed Accounts Posts: 1,325 ✭✭✭b3t4


    Hey Fi,

    Not too sure if what Il say will help.
    Had problems before trying to add a framed html page into
    a none frames page. (left the frames behind and continued on)

    Here be my bash at this......

    In the html file that you are including you have an extra </frameset> tag
    as far as I can see.

    You mite have to include other frameset's within the page that it is being
    included into. Also the page being included into the main page doesnt
    need the <html> </html> parts as they are already there.

    Im not too knowledgeable with regard frames so the above may be wrong.

    Have fun,
    A.


  • Advertisement
  • Closed Accounts Posts: 59 ✭✭Fi_C**


    Thanks ang this sh*t is wreckin my head
    I want my teammate back!!
    Good God even loggedIn.php didn't cause me this many headaches!!


  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    Didn't read the code much. But are you trying to include a page (with frames in it) into a PHP generated page which has other content in it?


  • Closed Accounts Posts: 59 ✭✭Fi_C**


    Yup that's exactly wot I'm doing
    But I think i'll just forget about the frames altogether coz I haven't got time to stay messin with it...It won't look the way I want it to but the functionality is more important.
    unless anyone can help that is....


  • Closed Accounts Posts: 570 ✭✭✭manonthemoon


    Just wondering?

    Why are you using frames?


  • Closed Accounts Posts: 59 ✭✭Fi_C**


    Just coz I wanted the site to look a certain way that I didn't think would be possible with includes and tables...but it's ok now coz I made a scrollable table (didn't know that could be done)
    and It actually looks the way I want it to so F**k frames - never touchin them again!!:)


  • Advertisement
  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    You're trying to include frames in a HTML page, which is just silly. Have a look at IFRAME.

    adam


Advertisement