Op deze website gebruiken we cookies om content en advertenties te personaliseren, om functies voor social media te bieden en om ons websiteverkeer te analyseren. Ook delen we informatie over uw gebruik van onze site met onze partners voor social media, adverteren en analyse. Deze partners kunnen deze gegevens combineren met andere informatie die u aan ze heeft verstrekt of die ze hebben verzameld op basis van uw gebruik van hun services. Meer informatie.

Akkoord

Vraag & Antwoord

Webprogrammeren & scripting

Includen wil maar niet lukken! :(

Annie
1 antwoord
  • Hoi,

    Ik ben bezig met een eigen homepage alleen ik heb een probleem wat toch opgelost moet worden omdat ik anders niet echt verder kan.
    Alleen, het oplossen lukt me maar niet.
    Vandaar dat ik het hier kom vragen bij de wat gevorderde mensen. :wink:

    Eerst maar de volledige bron:
    [code:1:0f196b22ab]
    <? include ("online.php"); ?>
    <html>
    <head>
    <link href="css/style.css" rel=StyleSheet type=text/css>
    <title>Warlocks from Hell, an Unreal Tournament InstaGib clan</title>
    <script language=JavaScript src="fade.js"></script>
    </head>
    <body topmargin="0" leftmargin="0" bgcolor="#262223">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="80%" height="815">
    <tr valign="top">
    <td width="100%" height="14" style="border-bottom-style: solid; border-bottom-width: 1" colspan="5">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" height="103" style="border-style: solid; border-width: 1" colspan="5" bgcolor="#333333">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="100%">
    <tr>
    <td width="100%" height="100%">
    <div align="left"></div>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td style="border-top-style: solid; border-top-width: 1" colspan="5" height="14">
    </td>
    </tr>
    <tr valign="top">
    <td width="1%" height="603">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="180">
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">
    <b>&nbsp;Users:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333" bordercolor="#000000">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td> U are <b>not</b> logged in.<br>
    <br>
    <a href="news.php?action=login">Log in</a><br>
    <a href="news.php?action=register">Register</a><br>
    <a href=news.php?action=retrieve>Retrieve password</a><br>
    <a href=news.php?action=userlist>Users</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:solid; border-top-width:1; border-bottom-style:solid; border-bottom-width:1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Home:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="index.php">News</a><br>
    <a href="search.php">Search</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Clan:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" cellpadding="2">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="clan/trophies.php">Trophies</a><br>
    <a href="clan/demos.php">Demos</a><br>
    <a href="clan/pictures.php">Pictures</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Members:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1">
    <table border="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" cellpadding="2">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="members/members.php">Members</a><br>
    <a href="members/join.php">Join</a><br>
    <a href="members/trainees.php">Trainees</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Clanwars:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="wars/wars.php">Results</a><br>
    <a href="wars/challenge.php">Challenge</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style:solid; border-width:1; " background="images/bar.gif">&nbsp;<b>Miscellaneous:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-bottom-style:solid; border-bottom-width:1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="misc/downloads.php">Downloads</a><br>
    <a href="guestbook/guestbook.php">Guestbook</a><br>
    <a href=forum/forum.php>Forum</a><br>
    <a href=news.php?action=links>Links</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-bottom-style:solid; border-bottom-width:1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-bottom-style:solid; border-bottom-width:1" background="images/bar.gif">&nbsp;<b>Who
    is online:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-bottom-style:solid; border-bottom-width:1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"> :smile:</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td width="4" height="603"> <img border="0" src="images/pixel.gif" width="10" height="10"></td>
    <td width="100%" height="603">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#000000">
    <tr>
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>News:</b></td>
    </tr>
    <tr>
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" width="100%">
    <tr>
    <td width="100%">&nbsp; </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="100%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</td>
    </tr>
    <tr>
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" width="100%">
    <tr>
    <td width="100%">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="100%" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:solid; border-top-width:1; border-bottom-style:solid; border-bottom-width:1">&nbsp;
    </td>
    </tr>
    <tr>
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" width="100%">
    <tr>
    <td width="100%">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td width="4" height="603"> <img border="0" src="images/pixel.gif" width="10" height="10"></td>
    <td width="1%" height="603">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="180">
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">
    <b>&nbsp;Administrator:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333">
    <table border="0" align="center">
    <tr>
    <td>&nbsp;<font color="#ff9933">Login</font></font></td>
    <td>
    <input type=text name=userid size=18 class=regular maxlength="18">
    </td>
    </tr>
    <tr>
    <td>&nbsp;<font color="#ff9933">Password</font></font></td>
    <td>
    <input type=password name=passwd size=18 class=regular maxlength="18">
    </td>
    </tr>
    <tr>
    <td colspan=2 align=right>
    <input type="image" name="submit" src="images/login.png" onMouseover="src='images/login2.png'" onMouseout="src='images/login.png'" valign="bottom" border="0" value="Log in" class="button">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:solid; border-top-width:1; border-bottom-style:solid; border-bottom-width:1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Statistics:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333">Visitors: <font color="#ff9933">
    <? include("counter.php"); ?>
    </font><br>
    Hits: <font color="#ff9933">
    <? include("hits.php"); ?>
    </font><br>
    <? include("active.php"); ?>
    <br>
    <br>
    Forum messages:<br>
    Forum topics:<br>
    Forum replies:</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Poll:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333">:-)</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Other:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="statistics/mirc.php">mIRC</a><br>
    <a href="statistics/website.php">Website</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Server:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333"><a href="server/stats.php">Current
    status</a></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;</td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" background="images/bar.gif">&nbsp;<b>Other
    news:</b></td>
    </tr>
    <tr valign="top">
    <td width="100%" style="border-style: solid; border-width: 1" bgcolor="#333333">
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%">
    <tr>
    <td width="100%" bgcolor="#333333">:-)</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign="top">
    <td colspan="5" height="60">
    <p align="center"><font color="#ff9933">©</font> 2002 - Warlocks from
    Hell - All rights reserved.<br>
    Page loaded in <font color="#ff9933">
    <? include ("loading.php"); echo "$time"; ?>
    </font> seconds.<br>
    <br>
    Design and scripts: <a href="mailto:smoke@warlocksfromhell.com">[WfH]$m0k3</a>
    </td>
    </tr>
    </table>
    </center>
    </body>
    </html>
    [/code:1:0f196b22ab]
    Ok, de pagina zelf die bij deze bron hoort kan je bekijken op http://www.warlocksfromhell.com/news.php

    Nu het probleem.
    Ik heb aan zowel de linker als rechterkant een menu. In het midden wil ik dus alles includen.
    Ik gebruik het volgende script daarvoor:
    [code:1:0f196b22ab]
    <?php
    if($action == "") {
    include("news.php");
    }
    else {
    if(file_exists("$action.php")) {
    include("$action.php");
    }

    }
    ?>
    [/code:1:0f196b22ab]
    Dit script moet gewoon werken lijkt me.
    Alleen ik krijg het maar niet voor elkaar om die pagina's ook vervolgens precies in het midden te includen.
    Als ik het probeer wordt de pagina wel geinclude, maar dan is me menu dat rechts stond weer helemaal onder alles opeens.
    Volgens mij komt dit omdat de tabel die ik include (die er precies hetzelfde uitziet als waar nu news: staat) niet de goede breedte maten ofzo hebben.

    Kan iemand mij misschien vertellen op welk punt (dus tussen welke tags) ik alles moet includen, zodat ik in ieder geval zeker weet dat het daar is en ik op dat punt dus verder kan bouwen?

    Bedankt!

Beantwoord deze vraag

Dit is een gearchiveerde pagina. Antwoorden is niet meer mogelijk.