[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - PHP Nieuwssysteem
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

PHP Nieuwssysteem

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

PHP Nieuwssysteem

Berichtdoor joene » 14 mei 2005 12:47

joene
 

Berichtdoor Anthony » 14 mei 2005 12:50

Beste Jeroen, ik heb het ondertussen even opgezocht dus hier komtie.

Het leek me interessant als dit hier ook zou staan vandaar.
[syntax="php"]<html>
<head>
<title>Pagina titel</title>
<link rel="stylesheet" type="text/css" href="http://site.polyfemme.be/virtual/css/popup.css" />
</head>
<body>
<div id="reactie">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
<tr>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_left_top.gif"></td>
<td background="http://polyfemme.be/data/images/tbl_top.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_top.gif"></td>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_right_top.gif"></td>
</tr>
<tr>
<td width="10" background="http://polyfemme.be/data/images/tbl_left.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_left.gif"></td>
<td style="margin: 2">
<h4>Reacties</h4>
</td>
<td height="20" width="10" background="http://polyfemme.be/data/images/tbl_right.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_right.gif"></td>
</tr>
<tr>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_left_bottom.gif"></td>
<td background="http://polyfemme.be/data/images/tbl_bottom.gif">
<img border="0" src="http://polyfemme.be/data/images/tbl_bottom.gif"></td>
<td width="10">
<img border="0" src="http://polyfemme.be/data/images/tbl_right_bottom.gif"></td>
</tr>
</table>
<?
// set all needed variables to connect with MySQL database
$user = "gebruikersnaam";
$pass = "paswoord";
$host = "localhost";
$dbdb = "database";

// connect to MySQL database
if (!mysql_select_db($dbdb, mysql_connect($host, $user, $pass)))

// give error message if the connection could not be established
echo "Sorry, de database kan niet geopend worden.";

// unset all variables
unset($user);
unset($pass);
unset($host);
unset($dbdb);

$table = "reacties";

//-- insert reaction to database
if ($at && ($door && $msg))
{
$sql3 = "insert into $table (id, door, website, msg, at, tid, ip, fid) VALUES ('', '$door', '$website', '$msg', '$at', '$id', '$REMOTE_ADDR', '$fid')";
$res3 = mysql_query($sql3);

if ($res3)
{
if ($fid)
$insert = "<p><span class=here>Bedankt voor het reageren!</span></p>";
else
$insert = "<p><span class=here>Bedankt voor het reageren $door!</span></p>";
}
else
{
$insert = "<p><span class=here>Sorry, je reactie is niet opgeslagen, probeer het opnieuw of neem contact met ons op.</span></p>";
}
$fid = "";
$door = "";
$email = "";
$msg = "";
}
//-- not enough data
elseif ($at)
{
$insert = "<p><span class=kopje>Je bent je naam of bericht vergeten.</span></p>";
}

//-- recieve reacties from database
$sql2 = "select * from $table where tid = $id order by id";
$res2 = mysql_query($sql2);

echo "";

echo "";
echo "";
echo "";
echo "$insert";

//-- show reactions
if (mysql_num_rows($res2) >= 1)
{
while ($row2 = mysql_fetch_array($res2))
{
if ($row2[fid])
{
$fsql = "SELECT id, name FROM $table WHERE id = $row2[fid]";
$fres = mysql_query($fsql);
$frow = mysql_fetch_array($fres);
}

$row2[door] = htmlentities($row2[door]);
$row2[website] = htmlentities($row2[website]);
$row2[msg] = htmlentities($row2[msg]);
$row2[msg] = nl2br($row2[msg]);

if ($row2[email])
echo "<BR><b>Reactie door <a href=\"$row2[website]\" title=\"Website: $row2[website]\" target=\"_blank\">$row2[door]</a> @ $row2[at]</b><br>\n";
else
echo "<BR><b>Gepost door <a href=\"$row2[website]\" title=\"Website: $row2[website]\" target=\"_blank\">$row2[door]</a> @ $row2[at]</b><br>\n";
echo "$row2[msg]<P>";

$row2[door] = "";
$row2[email] = "";
$row2[msg] = "";
$frow[id] = "";
$frow[name] = "";
}
}
else
{
echo "<BR><b>Er zijn nog geen reacties op deze post.</b><BR><BR>";
}

echo "<hr>";

echo "<p>";

// door email at tid
$at = date("d-m-Y");

//echo "<center>";
echo "<form method=post name=invulform action=$PHP_SELF>";
echo "<input type=hidden name=id value=\"$id\">";
echo "<input type=hidden name=at value=\"$at\">";

echo "<b>Naam</b><br>";
echo "<input type=text name=door value=\"$door\" size=25><BR><BR>";

echo "<b>Jouw website</b> (inclusief http://)<br>";
echo "<input type=text name=website value=\"$website\" size=25><BR><BR>";

echo "<b>Reactie</b><br>";
echo "<textarea name=msg cols=80 rows=6>$msg</textarea><BR><BR>";

echo "<input type=submit name=submit value=\"Reageer\">";
echo "</form>";
//echo "</center>";
echo "</p>";

echo "<hr>";

?>
</div>
</body>
</html>
[/syntax]

Ik zal zien of ik nog een versie kan posten waar de polyfemme layout uit gesloopt is. Tot dan moet je het met dit doen. Maar het werkt ook hoor. Smile
Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Berichtdoor joene » 14 mei 2005 12:55

Is dit alleen het reageersysteem? Of ook het postsysteem?
joene
 

Berichtdoor Anthony » 14 mei 2005 13:03

Dit is het reageersysteem, het postsysteem was gewoon geschreven in html, dus dat kan je zelf ook door even te kijken naar de bron van polyfemme.be

Je kan het best het reageersysteem in een popup laten openen.

Edit ---------------------------------------------------------------------------------------------
Rats vergeten, mats zei het me

Dit is de SQL om de tabellen aan te maken.

[syntax="sql"]
CREATE TABLE `reacties` (
`id` int(11) NOT NULL auto_increment,
`door` varchar(150) NOT NULL default '',
`website` varchar(150) default NULL,
`msg` text NOT NULL,
`at` varchar(10) NOT NULL default '',
`tid` int(11) NOT NULL default '0',
`ip` varchar(20) NOT NULL default '',
`fid` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=51 ;[/syntax]
Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Berichtdoor joene » 14 mei 2005 13:34

hoe werk je daar mee? met die sql?
joene
 

Berichtdoor Anthony » 14 mei 2005 13:52

Die voeg je gewoon in je SQL als je phpmyadmin hebt.

En dan druk je op Start en zal hij automatisch alles aanmaken.
Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Berichtdoor joene » 14 mei 2005 16:49

gelukt, is het ook mogelijk om met één of ander systeem je updates online in te vullen?
joene
 

Berichtdoor Anthony » 15 mei 2005 12:32

Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België


Keer terug naar PHP, ASP, SQL



cron