Eeros - Geen nieuws melding

Gestart doorOne2xs3 reacties42 weergaven

4 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Vervang de paginas/nieuws.php in dit en er staat een melding dat er geen nieuws is.. Als dat zo is

Codeblok (eeros/paginas/nieuws.php):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50



/**
* @copyright 2010 Milan Drossaerts
* @author Milan Drossaerts [http://www.dynaspan-media.nl]
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice and this (list of) condition(s).
*/

## Geen nieuws gevonden bericht door Niels van Velzen

## smile


if (isset($_GET[id]))
{


$lnQuery = $mysql->query("SELECT * FROM nieuws WHERE id = " . $mysql->real_escape($_GET[id]) . "");

$lnFetch = $mysql->fetch($lnQuery);

$layout->boven($core->entities($lnFetch[titel]) . | Nieuws);

echo Geplaatst op . $core->f_date($lnFetch[datum]) .

. $core->ubb($core->entities($lnFetch[bericht])) .
;

}
else{

$layout->boven(Nieuws);

$lnQuery = $mysql->query("SELECT * FROM nieuws ORDER BY id DESC");

echo ($mysql->num_rows($lnQuery) == 0 ? Geen nieuws gevonden! : Hieronder vind je alle nieuwsberichten geordend op datum:
);

while($lnFetch = $mysql->fetch($lnQuery))
{


echo . $_CONFIG[Site_url] . ?p=nieuws&id= . $lnFetch[id] . "> . $core->entities($lnFetch[titel]) . ~ Geplaatst op . $core->f_date($lnFetch[datum]) .
;

}

}


$layout->onder();

?>
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Afbeelding
0
Berichten
10.857
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien

Den Haag

Bedankt Nielsiebiggrin
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je kon het ook gewoon doen met een IF nu rows ipv van die echo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren