<?php

/*

Letzlink Release 1.4.1
(C) Jean Schumacher 2007 - 2011.
This free software is released under CC GNU - GPL2 ( General Public License )
Your are completely free to use it, alter or change it or to distribute it
as log you are in accordance with the GNU - GPL2 license which is distributed
along with this software.
More information can be found at http://www.creativecommons.org/licenses/GPL/2.0
Attention: The software was mainly developed to be run on localhost or LAN Systems.
If you run it on public accessible areas, this may be a security risk, especially
if the software is not protected with appropriate software to limit access.
Please report any bug to bugs@rootserver.lu

*/

if ($_POST['user1a']) {
$user1a = stripslashes($_POST['user1a']);
$entry = "<?php ";
$entry1a ='$user1a[]= "';
$entry2 ='";';
$entry3 =" ?>";
$entry4 = "\n";
$content = file_get_contents('Personal/link.php');
$content = htmlentities($content);
$output = $entry . $entry1a . $user1a . $entry2 . $entry3;
$output = htmlentities($output);
$newlink = str_replace("$output","",$content);
$newlink = str_replace("&lt;","<",$newlink);
$newlink = str_replace('&quot;','"',$newlink);
$newlink = str_replace('&gt;','>',$newlink);
$fh = fopen("Personal/link.php","wb");
fwrite($fh,"$newlink");
fclose($fh);

}

if ($_POST['user1b']) {
$user1b = stripslashes($_POST['user1b']);
$entry = "<?php ";
$entry1b ='$user1b[]= "';
$entry2 ='";';
$entry3 =" ?>";
$entry4 = "\n";
$content = file_get_contents('Business/link.php');
$content = htmlentities($content);
$output = $entry . $entry1b . $user1b . $entry2 . $entry3;
$output = htmlentities($output);
$newlink = str_replace("$output","",$content);
$newlink = str_replace("&lt;","<",$newlink);
$newlink = str_replace('&quot;','"',$newlink);
$newlink = str_replace('&gt;','>',$newlink);
$fh = fopen("Business/link.php","wb");
fwrite($fh,"$newlink");
fclose($fh);


}

if ($_POST['user1c']) {
$user1c = stripslashes($_POST['user1c']);
$entry = "<?php ";
$entry1c ='$user1c[]= "';
$entry2 ='";';
$entry3 =" ?>";
$entry4 = "\n";
$content = file_get_contents('Software/link.php');
$content = htmlentities($content);
$output = $entry . $entry1c . $user1c . $entry2 . $entry3;
$output = htmlentities($output);
$newlink = str_replace("$output","",$content);
$newlink = str_replace("&lt;","<",$newlink);
$newlink = str_replace('&quot;','"',$newlink);
$newlink = str_replace('&gt;','>',$newlink);
$fh = fopen("Software/link.php","wb");
fwrite($fh,"$newlink");
fclose($fh);


}



if ($_POST['user1d']) {
$user1d = stripslashes($_POST['user1d']);
$entry = "<?php ";
$entry1d ='$user1d[]= "';
$entry2 ='";';
$entry3 =" ?>";
$entry4 = "\n";
$content = file_get_contents('Other/link.php');
$content = htmlentities($content);
$output = $entry . $entry1d . $user1d . $entry2 . $entry3;
$output = htmlentities($output);
$newlink = str_replace("$output","",$content);
$newlink = str_replace("&lt;","<",$newlink);
$newlink = str_replace('&quot;','"',$newlink);
$newlink = str_replace('&gt;','>',$newlink);
$fh = fopen("Other/link.php","wb");
fwrite($fh,"$newlink");
fclose($fh);


}
print <<<OUTPUT

<script language='JavaScript'>
parent.location.replace('index.php');
</script>

OUTPUT;
?>
