link seite
parent
f742d5effd
commit
64dd4352d0
36
index.php
36
index.php
|
@ -1,28 +1,28 @@
|
||||||
|
<?php
|
||||||
|
include ('link_lib.php');
|
||||||
|
|
||||||
|
$db = new dbLinkHAndler();
|
||||||
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<main>
|
<body>
|
||||||
<form action="index.php" method="post">
|
<form action="index.php" method="post">
|
||||||
Name: <input type="text" name="linkName"> URL: <input type="text" name="linkUrl"> <input type="Submit" value="Speichern">
|
Name: <input type="text" name="linkName"> URL: <input type="text" name="linkUrl"> <input type="Submit" value="Speichern">
|
||||||
</form>
|
</form>
|
||||||
</main>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
<?php
|
||||||
<?php
|
if ($_POST["linkName"] != "" AND $_POST["linkUrl"] != "")
|
||||||
include ('link.php');
|
{
|
||||||
|
|
||||||
$db = new dbLinkHAndler();
|
|
||||||
|
|
||||||
if ($_POST["linkName"] != "" AND $_POST["linkUrl"] != "")
|
|
||||||
{
|
|
||||||
$link1=new Link($_POST["linkName"], $_POST["linkUrl"]);
|
$link1=new Link($_POST["linkName"], $_POST["linkUrl"]);
|
||||||
$db->saveLink($link1);
|
$db->saveLink($link1);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($db->getListReverse() as $link)
|
foreach ($db->getListReverse() as $link)
|
||||||
{
|
{
|
||||||
echo '<a href="'.$link['link_url'].'" target="_blank">'.$link['link_name'].'</a><br>';
|
echo '<a href="link.php?url='.$link['link_url'].'">'.$link['link_name'].'</a> - <a href="'.$link['link_url'].'" target="_blank">'.$link['link_url'].'</a><br>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue