Latest Dutch news on you CPG but it doesn't work Latest Dutch news on you CPG but it doesn't work
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Latest Dutch news on you CPG but it doesn't work

Started by rgroen, December 19, 2003, 02:45:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rgroen

I have the following code:


<?PHP
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr>                 //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //

define('IN_COPPERMINE', true);  

require('include/init.inc.php');  

pageheader('laurens');  
starttable("100%", $lang_ecard_php['title'], 3);

?>
<?

// zet "nee" neer als je het onderdeel wilt uitschakelen
$algemeen = "ja";
$economie = "ja";
$internet = "ja";
$sport = "ja";
$powered = "nee";
$copyright = "nee";
?>
<?
if($bekijk == "")
{
?>
  <?
    if($algemeen=="ja")
    {
    ?>
   
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Algemeen nieuws </b> </td>
  </tr>
  <tr>
    <td width="100%">
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"nieuws.hoofd\">"
    
$eind "<section name=\"nieuws.overig\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
            echo 
$tekst1[1]; 
                echo(
"<small><a href=nieuws.php?bekijk=algemeen>meer...</a></small>");
    
?>

   </td>
  </tr>

</table> <br> <?
    }
    ?><?
    if($economie=="ja")
    {
    ?> <table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Economisch nieuws</b> </td>
  </tr>
  <tr>
    <td width="100%">
     
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"economie.hoofd\">"
    
$eind "<section name=\"economie.overig\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
        echo(
"<small><a href=nieuws.php?bekijk=economie>meer...</a></small>");
    
?>

    </td>
  </tr>

</table> <br><?
    }
    ?><?
    if($internet=="ja")
    {
    ?> <table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Internet nieuws </b> </td>
  </tr>
  <tr>
    <td width="100%">
   
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"net.hoofd\">"
    
$eind "<section name=\"net.overig\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
        echo(
"<small><a href=nieuws.php?bekijk=internet>meer...</a></small>");
    
?>

   </td>
  </tr>

</table> <br> <?
    }
    ?><?
    if($sport=="ja")
    {
    ?> <table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Sport nieuws</b> </td>
  </tr>
  <tr>
    <td width="100%">
     
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"sport.hoofd\">"
    
$eind "<section name=\"sport.overig\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
        echo(
"<small><a href=nieuws.php?bekijk=sport>meer...</a></small>");
    
?>

   
</td>
  </tr>

</table><br>
<?
    }
    ?>
<?
}
elseif($bekijk == "bericht")
{
?>

<?php 
$adres 
"http://www.nu.nl/news.jsp?n=$n&c=$c"
$begin "<p class=\"heading\">"
$eind "<p>Uitgegeven"
$openen fopen("$adres""r"); 
$lezen fread($openen200000); 
$data eregi("$begin(.*)$eind"$lezen$tekst2); 
fclose($openen); 
$tekst2 str_replace("</p>","",$tekst2);
 
$tekst2 str_replace("SRC=\"","http://nu.nl/",$tekst2); 
?>

<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> <? echo $tekst2[1];
?></b>  </td>
  </tr>
 
               


<tr>
    <td width="100%">uitgegeven: <?php 
$adres 
"http://www.nu.nl/news.jsp?n=$n&c=$c"
$begin "<p>Uitgegeven:"
$eind "<ul>"
$openen fopen("$adres""r"); 
$lezen fread($openen200000); 
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
fclose($openen); 
$tekst1 str_replace("http://nu.nl/news.jsp","$url&",$tekst1); 
$tekst1 str_replace("news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
$tekst1 str_replace("<a href","<a href",$tekst1); 
$tekst1 str_replace("</a>","</a>",$tekst1);
$tekst1 str_replace("<img src=\"img/pijl_trans.gif\" border=\"0\" alt=\"\" width=\"8\" height=\"8\" hspace=\"4\" vspace=\"0\">","",$tekst1); 
$tekst1 str_replace("SRC=\"","src=\"http://nu.nl/",$tekst1);
$tekst1 str_replace("ZIE OOK:","</b></td></tr></table><br><table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#000000\" width=\"100%\">
  <tr>
    <td width=\"100%\" bgcolor=\"#FFD733\" class=\"table\"><b>Zie ook</b> </td>
  </tr>
  <tr>
    <td width=\"100%\">"
,$tekst1);
?>


  <?
echo $tekst1[1];
?> </td>
  </tr>

</table>
<br>
<?
}
?>

 

<? if($bekijk == "bericht"){ ?><table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> Meer</b></td>
  </tr>
  <tr>
    <td width="100%">
klik <a href="nieuws.php">hier</a>  om de andere berichten te zien.<br></td>
  </tr>

</table><? } ?>

<? if($bekijk == "algemeen"){ ?>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Algemeen nieuws </b> </td>
  </tr>
  <tr>
    <td width="100%">
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"nieuws.hoofd\">"
    
$eind "<section name=\"economie.hoofd\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
            echo 
$tekst1[1]; 
    
?>

   </td>
  </tr>

</table> <br> <table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> Meer</b></td>
  </tr>
  <tr>
    <td width="100%">
klik <a href="nieuws.php">hier</a>  om de andere berichten te zien.<br></td>
  </tr>

</table><br>
<? } ?>

<? if($bekijk == "economie"){ ?>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Economisch nieuws</b> </td>
  </tr>
  <tr>
    <td width="100%">
     
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"economie.hoofd\">"
    
$eind "<section name=\"net.hoofd\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
    
?>

    </td>
  </tr>

</table> <br><table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> Meer</b></td>
  </tr>
  <tr>
    <td width="100%">
klik <a href="nieuws.php">hier</a>  om de andere berichten te zien.<br></td>
  </tr>

</table><br>
<? } ?>

<? if($bekijk == "internet"){ ?>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Internet nieuws </b> </td>
  </tr>
  <tr>
    <td width="100%">
   
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"net.hoofd\">"
    
$eind "<section name=\"sport.hoofd\">"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
    
?>

   </td>
  </tr>

</table> <br><table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> Meer</b></td>
  </tr>
  <tr>
    <td width="100%">
klik <a href="nieuws.php">hier</a>  om de andere berichten te zien.<br></td>
  </tr>

</table><br>
<? } ?>

<? if($bekijk == "sport"){ ?>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Sport nieuws</b> </td>
  </tr>
  <tr>
    <td width="100%">
     
    <?php 
    $adres 
"http://nu.nl/deeplink_pagina/pagina_xml.jsp"
    
$begin "<section name=\"sport.hoofd\">"
    
$eind "</nu>"
    
$openen fopen("$adres""r"); 
    
$lezen fread($openen200000); 
    
$data eregi("$begin(.*)$eind"$lezen$tekst1); 
    
fclose($openen); 
    
$tekst1 str_replace("<document","<a",$tekst1); 
    
$tekst1 str_replace("</document>","</a> <br> ",$tekst1); 
    
$tekst1 str_replace("</li>","<br>",$tekst1); 
    
$tekst1 str_replace("http://nu.nl/news.jsp?","nieuws.php?bekijk=bericht&",$tekst1); 
    echo 
$tekst1[1]; 
    
?>

   
</td>
  </tr>

</table><br><table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b> Meer</b></td>
  </tr>
  <tr>
    <td width="100%">
klik <a href="nieuws.php">hier</a>  om de andere berichten te zien.<br></td>
  </tr>

</table><br>
<? } ?>
<? if($powered == "ja"){ ?>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Powered</b> </td>
  </tr>
  <tr>
    <td width="100%"><br><center> <a href="http://nu.nl/" target="_top">
 <img src="http://nu.nl/images/nulogo.gif"
  alt="NU.nl" border="0" height="31" width="88">
</a></center><br></td>
  </tr>

</table>

<br>
<? } ?>
<? if($copyright == "ja"){ ?> <br>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="100%">
  <tr>
    <td width="100%" bgcolor="#FFD733" class="table"><b>Copyright</b> </td>
  </tr>
  <tr>
    <td width="100%">
        Gemaakt door <i><a href="http://www.webdesigntools.nl">webdesigntools.nl</a></i><br>
        Aangepast door <i><a href="http://www.rl-webdesign.com">rl-webdesign.com</a></i><br>
</td>
</table>
<? }?>
<?
endtable();  
pagefooter();  
ob_end_flush();


But when I click on a link I get the same page. For the Dutch people this is a great way to show the latest news on your CPG site.

Please can anyone help me?!

Joachim Müller