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:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
|
<?
@session_start();
$uname = $_SESSION["user_name"];
$pferd = $_SESSION["user_pferd"];
include "checkuser.php";
// Code by Unicorn, darf beliebig verändert werden
?>
<? $obj=$HTTP_POST_VARS['obj'];
$obe=$HTTP_POST_VARS['obe'];
$obe2=$HTTP_POST_VARS['obe2'];
$price=$HTTP_POST_VARS['price'];
if($obe != ""){$obe= " ".$obe.",";}
// Code von Unicorn/N. Heppler. Verändern und Verwenden auf Webseiten erlaubt, solange dieser Verweis drin bleibt.
$datei = fopen("konto_$uname.txt","a+");
$kstand = fgets($datei);
$neukstand= $kstand - $price;
$dateix = fopen("konto_$uname.txt","w+");
fwrite($dateix, $neukstand);
fclose($dateix);
$datei = fopen("pferde_$uname.php","a+");
$neuinh="<br>$obj ($obe $obe2)";
fwrite($datei, $neuinh);
fclose($datei);
?>
<?php // Verbindung zur Datenbank
include ("datenbank.php");
$aendern = "UPDATE pferd Set
Besitzer = '$uname' WHERE Name = '$obj'";
$update = mysql_query($aendern); ?>
<html>
<head><link rel="stylesheet" href="datei.css" type="text/css">
<title></title>
</head>
<center>
<body style="background-color: transparent;"><font style="color: #3B2308";>
<table style="border-style: dashed; border-width: 1px; font-size: 12px; text-align: left; margin-left: auto; margin-right: auto; font-family: Verdana;" border="0" cellpadding="5" cellspacing="0" width="424">
<tr>
<td align="center" >
Dies ist nun dein Pferd. Herzlichen Glückwunsch!<br> <br> Dein Kontostand betrug vorher <? echo $kstand;?> Euro <br>
Nun hast du noch <? echo $neukstand;?> Euro auf dem Konto <br> <br>
<a href="pferde_<? echo $uname;?>.php"> Meine Pferde ansehen</a> <br> <br>
</center>
</td>
</td>
</tr>
</table>
</font>
</body>
</html>
|