@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<buildpath>
|
||||||
|
<buildpathentry kind="src" path=""/>
|
||||||
|
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
|
||||||
|
</buildpath>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>ag_v1.0</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.dltk.core.scriptbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.php.core.PHPNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,3 @@
|
|||||||
|
#Thu May 26 20:40:01 CEST 2011
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
include_path=0;/ag_v1.0
|
@ -0,0 +1,176 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$char_id = validateUnsignedInteger($_GET['char_id'], null);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$ab = $_GET['ab'];
|
||||||
|
$user = $user_ida;
|
||||||
|
|
||||||
|
|
||||||
|
$char_1 = getChar($char_id);
|
||||||
|
if(!isUserOwnerOf($user_ida['id'],$char_id)) { exit; }
|
||||||
|
|
||||||
|
if($char_1['status'] == 'Frei') {
|
||||||
|
displayErrorMessage(NULL,'Dein Charakter ist frei!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($char_1['besitzer'] != $user['id']) {
|
||||||
|
displayErrorMessage(NULL,'Das ist nicht dein Charakter!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ermittle den Abholcode (Eingefuehrt um das nutzen von Bots zu erschweren!)
|
||||||
|
$code_row = mysql_fetch_assoc(mysql_query('Select * from char_abholcodes where charid = '.$char_id));
|
||||||
|
if($code_row){
|
||||||
|
$abholstring = 'char_id='.$char_id.'&code='.$code_row['code'];
|
||||||
|
} else{
|
||||||
|
$abholstring = 'char_id='.$char_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################Kampf
|
||||||
|
if($ab == "Kampf") {
|
||||||
|
$kampf_a = mysql_fetch_array(mysql_query("SELECT char1, char2, id, dauer FROM kampf WHERE db_satz='$char_id' order by id DESC LIMIT 1"));
|
||||||
|
$kampf_a1 = getChar($kampf_a['char1']);
|
||||||
|
$kampf_a2 = getChar($kampf_a['char2']);
|
||||||
|
|
||||||
|
$zeit_in_sek = $kampf_a['dauer'] - time();
|
||||||
|
|
||||||
|
|
||||||
|
echo "<SCRIPT language='JavaScript'>";
|
||||||
|
?>
|
||||||
|
function showfight1(){
|
||||||
|
var Info = window.open("./kampf4.php?<?php echo $abholstring; ?>","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
echo "</SCRIPT>";
|
||||||
|
?>
|
||||||
|
<p align=center id="content"><b> Kampf</b><br> <br>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo "<b> $kampf_a1[name] vs. $kampf_a2[name]";
|
||||||
|
?>
|
||||||
|
<div align='center' id='timer'>
|
||||||
|
<?php
|
||||||
|
if($zeit_in_sek <= 0){
|
||||||
|
echo '<a href="javascript:showfight1()" id="content">anzeigen</a>';
|
||||||
|
} else{
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
v=new Date();
|
||||||
|
var ht=document.getElementById('timer');
|
||||||
|
function t(){
|
||||||
|
n=new Date();
|
||||||
|
s=<?php echo $zeit_in_sek; ?>-Math.round((n.getTime()-v.getTime())/1000.);
|
||||||
|
m=0;
|
||||||
|
h=0;
|
||||||
|
if(s<0){
|
||||||
|
ht.innerHTML="<?php echo "<a href='javascript:showfight1()' id='content'>anzeigen</a>"; ?>"
|
||||||
|
} else {
|
||||||
|
if(s>59){
|
||||||
|
m=Math.floor(s/60);s=s-m*60
|
||||||
|
}
|
||||||
|
if(m>59){
|
||||||
|
h=Math.floor(m/60);m=m-h*60
|
||||||
|
}
|
||||||
|
if(s<10){
|
||||||
|
s='0'+s
|
||||||
|
}
|
||||||
|
if(m<10){
|
||||||
|
m='0'+m
|
||||||
|
}
|
||||||
|
ht.innerHTML=h+':'+m+':'+s
|
||||||
|
}
|
||||||
|
window.setTimeout('t();',950);
|
||||||
|
}
|
||||||
|
window.onload=t;
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################Clan Kampf
|
||||||
|
if($ab == "Clan Kampf") {
|
||||||
|
|
||||||
|
echo "<SCRIPT language='JavaScript'>";
|
||||||
|
?>
|
||||||
|
function showfight(){
|
||||||
|
|
||||||
|
var Info = window.open("./clan_kampf.php?char_id=<?php echo $char_id; ?>","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
echo "</SCRIPT>";
|
||||||
|
|
||||||
|
$kampf_a = mysql_fetch_array(mysql_query("SELECT c1.name AS c1name, c2.name, k.id, k.dauer FROM clan_kampf k LEFT JOIN chars c1 ON(k.char1=c1.id) LEFT JOIN chars c2 ON(k.char2=c2.id) WHERE k.db_satz='$char_id' LIMIT 1"));
|
||||||
|
|
||||||
|
$zeit_in_sek = $kampf_a[dauer] - time();
|
||||||
|
?>
|
||||||
|
<p align=center><b>Clan Kampf</b><br> <br>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo "<b> $kampf_a[c1name] vs. $kampf_a[name] </b><br> <br>";
|
||||||
|
?>
|
||||||
|
<div align='center' id='timer'>
|
||||||
|
<?php
|
||||||
|
if($zeit_in_sek <= 0){
|
||||||
|
echo '<a href="javascript:showfight()">anzeigen</a>';
|
||||||
|
} else{
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>v=new Date();var ht=document.getElementById('timer');function t(){n=new Date();s=<?php echo $zeit_in_sek; ?>-Math.round((n.getTime()-v.getTime())/1000.);m=0;h=0;if(s<0){ht.innerHTML="<?php echo "<a href='javascript:showfight()'>Ergebnis zeigen</a>"; ?>"}else{if(s>59){m=Math.floor(s/60);s=s-m*60}if(m>59){h=Math.floor(m/60);m=m-h*60}if(s<10){s='0'+s}if(m<10){m='0'+m}ht.innerHTML=h+':'+m+':'+s}window.setTimeout('t();',950);}window.onload=t;</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#######################Schatz Suche Kampf
|
||||||
|
if($ab == "Schatz Suche") {
|
||||||
|
$kampf_a = mysql_fetch_array(mysql_query('select Timestampdiff(Second,now(),dauer) as dauer from quests where charid = '.$char_id));
|
||||||
|
$zeit_in_sek = $kampf_a['dauer'];
|
||||||
|
|
||||||
|
echo "<SCRIPT language='JavaScript'>";
|
||||||
|
?>
|
||||||
|
function showfight(){
|
||||||
|
|
||||||
|
var Info = window.open("./schatz3.php?<?php echo $abholstring; ?>","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
echo "</SCRIPT>";
|
||||||
|
echo "<p align=center id='content'><b> Schatz Suche </b><br> <br>";
|
||||||
|
?>
|
||||||
|
<div align='center' id='timer'>
|
||||||
|
<?php
|
||||||
|
if($zeit_in_sek <= 0){
|
||||||
|
echo '<a href="javascript:showfight()" id="content">anzeigen</a>';
|
||||||
|
} else{
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>v=new Date();var ht=document.getElementById('timer');function t(){n=new Date();s=<?php echo $zeit_in_sek; ?>-Math.round((n.getTime()-v.getTime())/1000.);m=0;h=0;if(s<0){ht.innerHTML="<?php echo "<a href='javascript:showfight()' id='content'>Abholen</a>"; ?>"}else{if(s>59){m=Math.floor(s/60);s=s-m*60}if(m>59){h=Math.floor(m/60);m=m-h*60}if(s<10){s='0'+s}if(m<10){m='0'+m}ht.innerHTML=h+':'+m+':'+s+'<br /><a href="./schatz3.php?<?php echo $abholstring; ?>&abort=cancel">abbrechen</a>'}window.setTimeout('t();',950);}window.onload=t;</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div><p align=center>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,173 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
$nodisturb = 'YES';
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/messagefunctions.inc.php');
|
||||||
|
|
||||||
|
// Die Nachricht muss nicht geparst werden!
|
||||||
|
|
||||||
|
// Die ID aber schon
|
||||||
|
|
||||||
|
$anon_block = false;
|
||||||
|
$trueuser = false;
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($user_ida['nickname'])){
|
||||||
|
if(!isset($_SESSION['user_ida'])){
|
||||||
|
$_SESSION['user_ida'] = $user_ida;
|
||||||
|
}
|
||||||
|
$trueuser = true;
|
||||||
|
} else if(isset($_SESSION['user_ida'])){
|
||||||
|
$user_ida = $_SESSION['user_ida'];
|
||||||
|
} else {
|
||||||
|
// Session has started, but user is not logged on :(
|
||||||
|
if(!isset($_SESSION['anon_ip'])){
|
||||||
|
$_SESSION['anon_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
|
// Wechsel der IP
|
||||||
|
if($_SESSION['anon_ip'] != $_SERVER['REMOTE_ADDR']){
|
||||||
|
mysql_query('Update anon_chatter set ip = \''.$_SERVER['REMOTE_ADDR'].'\' where ip = \''.$_SESSION['anon_ip'].'\'');
|
||||||
|
$_SESSION['anon_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
|
$usr = mysql_fetch_assoc(mysql_query('Select * from anon_chatter where ip = \''.$_SESSION['anon_ip'].'\''));
|
||||||
|
while(!$usr){
|
||||||
|
mysql_query('Insert into anon_chatter(ip, anon_id) values(\''.$_SESSION['anon_ip'].'\', '.mt_rand(90000,99999).')');
|
||||||
|
$usr = mysql_fetch_assoc(mysql_query('Select * from anon_chatter where ip = \''.$_SESSION['anon_ip'].'\''));
|
||||||
|
}
|
||||||
|
$user_ida['id'] = $usr['anon_id'];
|
||||||
|
$user_ida['nickname'] = 'anon_' . $usr['anon_id'];
|
||||||
|
$user_ida['ads'] = 0;
|
||||||
|
$user_ida['gm'] = 'nein';
|
||||||
|
|
||||||
|
$anon_block = $usr['muted']==0?false:true;
|
||||||
|
mysql_query('UPDATE anon_chatter SET online = now() WHERE anon_ip = '.$usr['anon_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (isset($_GET['send'])) {
|
||||||
|
if(!$trueuser && $_REQUEST['myself'] != $user_ida['nickname']){
|
||||||
|
// sendChatMessage($user_ida, '***SPAM***'.$_GET['send']);
|
||||||
|
echo "ERROR";
|
||||||
|
} else {
|
||||||
|
if($anon_block === false){
|
||||||
|
$send = $_GET['send'];
|
||||||
|
// $send = preg_replace(array('#ace #i', '#tod#'), array('SPOIL!!', 'SPOIL!!'), $send);
|
||||||
|
sendChatMessage($user_ida, $send);
|
||||||
|
}
|
||||||
|
echo "OK";
|
||||||
|
}
|
||||||
|
} else if (isset ($_GET['me'])) {
|
||||||
|
// Cachen verhindern
|
||||||
|
header("Expires: Sat, 05 Nov 2005 00:00:00 GMT");
|
||||||
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
echo getChatMessages($user_ida['id'], $_GET['id']);
|
||||||
|
} else {
|
||||||
|
$messagearray = getChatMessages($user_ida['id']);
|
||||||
|
$delay = 6500; // 6.5 Sekunden
|
||||||
|
$activeTime = 30; // 30 Min
|
||||||
|
|
||||||
|
$aktiv = round($activeTime * 60 * 1000 / $delay);
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<link href="design/styleChat.css" rel="STYLESHEET" type="text/css">
|
||||||
|
<script type="text/javascript" src="java/prototype-1.6.0.2.js" ></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var lastmessageid = 0;
|
||||||
|
var receiving = false;
|
||||||
|
var aktiv = <?php echo $aktiv ?>;
|
||||||
|
function send(){
|
||||||
|
var myAjax = new Ajax.Request("<?php echo $_SERVER['PHP_SELF']; ?>?send="+encodeURIComponent($("blubb").value)+"&myself=<?php echo $user_ida['nickname']; ?>", { method: 'get', onComplete: sendenfertig });
|
||||||
|
$("blubb").value = "";
|
||||||
|
aktiv = <?php echo $aktiv ?>;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendenfertig(originalRequest ) {
|
||||||
|
if(originalRequest.responseText != "OK"){
|
||||||
|
alert("Nachricht konnte nicht versendet werden! Chat wird neu gestartet!");
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function anzeigenChat(originalRequest ) {
|
||||||
|
var index = originalRequest.responseText.indexOf(";");
|
||||||
|
if(index < 1){
|
||||||
|
receiving = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!Number(originalRequest.responseText.substring(0,index))){
|
||||||
|
receiving = false;
|
||||||
|
return;
|
||||||
|
} else{
|
||||||
|
lastmessageid = originalRequest.responseText.substring(0,index);
|
||||||
|
}
|
||||||
|
var text = originalRequest.responseText.substring(index+1);
|
||||||
|
var newMessages=0, newPos=0;
|
||||||
|
// Ermittle Anzahl neuer Nachrichten!
|
||||||
|
while(true){
|
||||||
|
newPos = text.indexOf("<div>",newPos)+1;
|
||||||
|
if(newPos != 0){
|
||||||
|
newMessages++;
|
||||||
|
} else{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Loesche alte Nachrichten!
|
||||||
|
var text2 = $("nope").innerHTML;
|
||||||
|
newPos = 0;
|
||||||
|
for(i=0;i<newMessages;i++){
|
||||||
|
newPos = text2.toLowerCase().indexOf("</div>",newPos)+6;
|
||||||
|
}
|
||||||
|
$("nope").innerHTML = text2.substring(newPos) + text;
|
||||||
|
receiving = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadData(){
|
||||||
|
if(--aktiv == 0){
|
||||||
|
alert('Du wurdest als Inaktiv erkannt, Ok anklicken um wieder Nachrichten zu empfangen!');
|
||||||
|
aktiv = <?php echo $aktiv ?>;
|
||||||
|
}
|
||||||
|
if(aktiv < 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!receiving){
|
||||||
|
receiving = true;
|
||||||
|
var myAjax = new Ajax.Request( "<?php echo $_SERVER['PHP_SELF']; ?>?me=blablubb&id="+lastmessageid, { method: 'get', onComplete: anzeigenChat });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function activate(){
|
||||||
|
document.forms["myForm2"].style.visibility = "hidden";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
setInterval("loadData();",<?php echo $delay ?>);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form name="myForm" onsubmit="return send();">
|
||||||
|
<div id="nope" name="anzeige" style="width: 100%; overflow: overflow:auto;"><?php echo substr($messagearray,strpos($messagearray,';')+1); ?></div>
|
||||||
|
<input id="input" type="submit" name="myButton" value="send" style="position:absolute; bottom:0px; left:0px;"/><input id="blubb" name="blabla"/ style="position:absolute; bottom:0px; left:50px; width: 85%;">
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/messagefunctions.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$nick_name = validateName($_GET['nick_name']);
|
||||||
|
$serial = validateString($_GET['serial']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
if($charm) {
|
||||||
|
$user_k = mysql_fetch_assoc(mysql_query('SELECT * FROM user_activation WHERE username=\''.$nick_name.'\' AND code=\''.$serial.'\''));
|
||||||
|
if(!$user_k['username']) {
|
||||||
|
displayErrorMessage(NULL,'Account konnte nicht aktiviert werden!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
#########USER AKTIVIERUNG
|
||||||
|
|
||||||
|
mysql_query('INSERT INTO user(nickname, mail, passwort, agb) values(\''.$user_k['username'].'\',\''.$user_k['mail'].'\', \''.$user_k['passwort'].'\', \'ja\')');
|
||||||
|
$user_ida_nach = mysql_fetch_array(mysql_query('SELECT id FROM user WHERE nickname=\''.$nick_name.'\''));
|
||||||
|
$sql = 'INSERT arena(besitzer, exp) values (\''.$user_ida_nach['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')';
|
||||||
|
mysql_query($sql);
|
||||||
|
mysql_query('DELETE from user_activation where username = \''.$user_k['username'].'\'');
|
||||||
|
displayErrorMessage(NULL,'Account wurde aktiviert!', '<a href="index.php?as=login">weiter</a>');
|
||||||
|
sendMessage('Die Animegame Crew', $user_ida_nach['id'], 'Herzlich Willkommen bei AG', 'Herzlich Willkommen beim Animegame,'."\n".' dem Spiel in dem die Welten von One Piece und Dragonball aufeinanderprallen.'."\n\n".'Zu Anfang sieht AnimeGame ziemlich kompliziert aus, deshalb liest Du dir am besten erstmal den Anfängerguide in unserem Wiki durch:'."\n".'[url=http://ag01.animegame.eu/mediawiki/index.php/Anfaengerguide][color=yellow]Anfängerguide[/color][/url]'."\n\n".'Wenn danach noch Fragen offen sind, findest Du bestimmt eine Antwort in der FAQ-Abteilung:'."\n".'[url=http://ag01.animegame.eu/mediawiki/index.php/FAQ][color=red]Häufig gestellte Fragen[/color][/url]'."\n\n".'Falls du danach immer noch Fragen haben solltest, kannst du diese auch gerne im Chat oder im Forum stellen. Die anderen Mitspieler werden dir bestimmt gerne weiterhelfen.'."\n\n".'Viel Spass'."\n".'Das Animegame Team');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="index.php" method="GET">
|
||||||
|
<input type="hidden" name="as" value="aktiv" />
|
||||||
|
<input type="hidden" name="charm" value="1" />
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="25">
|
||||||
|
<tr>
|
||||||
|
<td width="466" height="25" colspan="2">
|
||||||
|
<p align="center"><b>Account Aktivieren</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="179" height="25">
|
||||||
|
<p align="center"><b>Nickname</b></td>
|
||||||
|
<td width="281" height="25"> <input id="input" name="nick_name" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="179" height="25">
|
||||||
|
<p align="center"><b>Serial</b></td>
|
||||||
|
<td width="281" height="25"> <input id="input" name="serial" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="179" height="25"></td>
|
||||||
|
<td width="281" height="25"> <input id="input" type="submit" value="aktivieren"></form></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
@ -0,0 +1,152 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/db.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/speed_config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$nick_name = validateName($_GET['nick_name']);
|
||||||
|
$pw_1 = validateString($_GET['pw_1']);
|
||||||
|
$pw_2 = validateString($_GET['pw_2']);
|
||||||
|
$mail = validateEmailAddress($_GET['mail']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$cke = $_GET['cke'];
|
||||||
|
?>
|
||||||
|
|
||||||
|
<SCRIPT language="JavaScript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function isAPhoneNumber(){
|
||||||
|
var s = "" + document.charz.nick_name.value; //Umwandlung in eine Zeichenkette
|
||||||
|
var zeichen = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ! " //Gueltige Zeichen
|
||||||
|
for (var i=0; i<s.length; i++)
|
||||||
|
if (zeichen.indexOf(s.charAt(i))==-1)
|
||||||
|
//kein gueltiges Zeichen
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
-->
|
||||||
|
</SCRIPT>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
if ($charm) {
|
||||||
|
|
||||||
|
if ($cke == null) {
|
||||||
|
displayErrorMessage(NULL, 'Sie müssen mit den Regeln einverstanden sein', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pw_1 != $pw_2) {
|
||||||
|
displayErrorMessage(NULL, 'Die Passwörter müssen gleich sein', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mail == null) {
|
||||||
|
displayErrorMessage(NULL, 'Deine Email-adresse ist nicht gütig', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
######USER UEBERPRUEFUNG
|
||||||
|
|
||||||
|
// Entfernen der whitespaces am nickname
|
||||||
|
$nick_name = trim($nick_name);
|
||||||
|
|
||||||
|
$sql = 'SELECT nickname,mail FROM user WHERE nickname=\'' . $nick_name . '\' OR mail=\'' . $mail . '\'';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$user_a = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
$sql = 'SELECT username,mail FROM user_activation WHERE username=\'' . $nick_name . '\' OR mail=\'' . $mail . '\'';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$user_b = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
|
||||||
|
if ($user_a != FALSE || $user_b != FALSE) {
|
||||||
|
if ($user_a['nickname'] == $nick_name || $user_b['username'] == $nick_name) {
|
||||||
|
displayErrorMessage(NULL, 'Den Nicknamen ' . $nick_name . ' gibt es schon!', displayHistoryBackLink());
|
||||||
|
} else
|
||||||
|
if ($user_a['mail'] == $mail || $user_b['mail'] == $mail) {
|
||||||
|
displayErrorMessage(NULL, 'Die Emailadresse ' . $mail . ' ist schon vorhanden gibt es schon!', displayHistoryBackLink());
|
||||||
|
} else {
|
||||||
|
displayErrorMessage(NULL, 'Unbekannter Fehler!', displayHistoryBackLink());
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
####### ANGABE FEHLER
|
||||||
|
|
||||||
|
if (!$nick_name OR !$pw_1 OR !$pw_2 OR !$mail) {
|
||||||
|
displayErrorMessage(NULL, 'Bitte geben sie alles ein', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
######## Erfolgreich Angemeldet
|
||||||
|
$serial = time() * 40000;
|
||||||
|
$zeit = time();
|
||||||
|
$serial_1 = number_format($serial, 0, '', '-');
|
||||||
|
|
||||||
|
$aktivierungslink = $GLOBALS['server_url_long'] . '/ag/index.php?as=aktiv&charm=1&nick_name=' . $nick_name . '&serial=' . $serial_1;
|
||||||
|
$inhalt = 'Zugangsdaten,\n\nSie lauten:\n\nUsername: ' . $nick_name . ' \n\nPasswort: ' . $pw_1 . '\n Aktivierungsnummer: ' . $serial_1 . ' \n\n Bitte geben sie die Aktivierungsnummer auf der Seite ein oder klicken sie folgenden Link\n\n' . $aktivierungslink . '\n\nViel Spass beim Spielen!';
|
||||||
|
mail($mail, 'Animegame', 'Zugangsdaten,' . "\n\n" . ' Sie lauten: ' . "\n\n" . 'Username: ' . $nick_name . ' ' . "\n" . ' Passwort: ' . $pw_1 . ' ' . "\n\n" . ' Aktivierungsnummer: ' . $serial_1 . ' ' . "\n\n" . ' Bitte geben sie die Aktivierungsnummer innerhalb von 14 Tagen auf der Seite ein oder klicken sie auf folgenden Link' . "\n" . ' ' . $aktivierungslink . ' ' . "\n\n" . 'Viel Spass beim Spielen!', "From: " . "Vegeta" . "\nReply-To: " . $GLOBALS['email_webmaster'] . "\nX-Mailer: PHP/" . phpversion());
|
||||||
|
|
||||||
|
$pw_1 = md5($pw_1);
|
||||||
|
|
||||||
|
mysql_query('INSERT INTO user_activation(username, code, passwort, mail, registerdate) values(\'' . $nick_name . '\', \'' . $serial_1 . '\', \'' . $pw_1 . '\', \'' . $mail . '\', now())');
|
||||||
|
|
||||||
|
displayErrorMessage(NULL, 'Erfolgreich angemeldet | Schauen sie in ihr Postfach', '<a href="index.php?as=login">weiter</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="index.php" name="charz" method="GET" onsubmit="return isAPhoneNumber()">
|
||||||
|
<input type="hidden" name="as" value="anmeldung">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="25">
|
||||||
|
<tr>
|
||||||
|
<th width="512" height="25" colspan="2">
|
||||||
|
<p align="center"><b>Anmeldung</b></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
<p align="center"><b>Nickname</b></td>
|
||||||
|
<td width="339" height="25"> <input id="input" name="nick_name" size="20">(keine Sonderzeichen)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
<p align="center"><b>Passwort</b></td>
|
||||||
|
<td width="339" height="25"> <input id="input" type=password name="pw_1" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
<p align="center"><b>Passwort (Wiederholung)</b></td>
|
||||||
|
<td width="339" height="25"> <input id="input" type=password name="pw_2" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
<p align="center"><b>E-Mail</b></td>
|
||||||
|
<td width="339" height="25"> <input id="input" name="mail" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
<p align="center"><b>Regeln gelesen: </b></td>
|
||||||
|
<td width="339" height="25"> <input id="input" type="checkbox" name="cke" value="ja"> <a href="index.php?as=info/agb" target="_blank">Regeln lesen</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="167" height="25">
|
||||||
|
</td>
|
||||||
|
<td width="339" height="25"> <input id="input" type="submit" value="Anmelden" size="20"></form></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
@ -0,0 +1,348 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/arena.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$arena_name = validateName($_GET['arena_name']);
|
||||||
|
$steh = validateUnsignedInteger($_GET['steh'],null);
|
||||||
|
$sitz = validateUnsignedInteger($_GET['sitz'],null);
|
||||||
|
$loge = validateUnsignedInteger($_GET['loge'],null);
|
||||||
|
$luxus = validateUnsignedInteger($_GET['luxus'],null);
|
||||||
|
$hausmeister = validateUnsignedInteger($_GET['hausmeister'],null);
|
||||||
|
$charmax = validateUnsignedInteger($_GET['char_max'],null);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$user = $user_ida;
|
||||||
|
$action = $_GET['action'];
|
||||||
|
$confirm = $_GET['confirm'];
|
||||||
|
|
||||||
|
?>
|
||||||
|
<SCRIPT language="JavaScript">
|
||||||
|
function showgamess(){
|
||||||
|
var Info = window.open("kampf_list.php","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
}
|
||||||
|
</SCRIPT>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function displayArena($arena){
|
||||||
|
$unterhalt = calculateUnterhaltsKosten($arena);
|
||||||
|
?>
|
||||||
|
<form action=<?php echo $_SERVER['PHP_SELF']; ?> method="get">
|
||||||
|
<input type="hidden" name="as" value="arena">
|
||||||
|
<input type="hidden" name="action" value="miete">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="48">
|
||||||
|
<tr>
|
||||||
|
<th valign="top" colspan="2" height="23" align="center"><?php echo $arena['name']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Stehplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo $arena['steh']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Sitzplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo $arena['sitz']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Logenplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo $arena['loge']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Arena Level:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo $arena['level']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Umsatz heute:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo displayMoney($arena['einnahmen']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Exp:</th>
|
||||||
|
<td height="25" width="373" valign="top"><?php echo join(' / ',preg_split('#,#',$arena['exp'])); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Zustand:</th>
|
||||||
|
<?php
|
||||||
|
if($arena['zustand'] != 1.0){
|
||||||
|
// javascript:if(confirm('Hecht-Sensei%20Wirklich%20l%C3%B6schen?')==true)%20window.location.href='index.php?as=char_index&charm=3&char_id=19260'
|
||||||
|
$kosten = 12345;
|
||||||
|
echo '<td height="25" width="373" valign="top"><a href="javascript:if(confirm(\'Arena wirklich für '.displayMoney(calculateRenovierungsKosten($arena)).' renovieren lassen?\')==true) window.location.href=\'index.php?as=arena&action=renovieren\'">'.(round($arena['zustand']*100,2)).'%</a></td>';
|
||||||
|
} else{
|
||||||
|
echo '<td height="25" width="373" valign="top">100%</td>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Upgrade</th>
|
||||||
|
<?php
|
||||||
|
if($unterhalt == 0){
|
||||||
|
echo ' <td height="25" width="373" valign="top"><a href="index.php?as=arena&action=skill1">Skill Points</a> - <a href="index.php?as=arena&action=ausbau1">Arena Sizer</a></td>';
|
||||||
|
} else{
|
||||||
|
echo ' <td height="25" width="373" valign="top"><a href="index.php?as=arena&action=skill1">Skill Points</a> - Arena Sizer</td>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Kämpfen</th>
|
||||||
|
<td height="25" width="373" valign="top"><a href='javascript:showgamess()'>Kampf list</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="117" align="center"></td>
|
||||||
|
<?php
|
||||||
|
if($unterhalt == 0){
|
||||||
|
echo '<td height="25" width="373" valign="top"><input id="input" type="submit" value="Umsatzsteuer schon bezahlt!" disabled></td>';
|
||||||
|
} else{
|
||||||
|
echo '<td height="25" width="373" valign="top"><input id="input" type="submit" value="Umsatzsteuer bezahlen ('.displayMoney($unterhalt).')!" ></td>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayAusbau($arena){
|
||||||
|
$unterhalt = calculateUnterhaltsKosten($arena);
|
||||||
|
if($unterhalt != 0){
|
||||||
|
displayErrorMessage(NULL, 'Bezahle erstmal deine Schulden!', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action=<?php echo $_SERVER['PHP_SELF']; ?> method="get">
|
||||||
|
<input type="hidden" name="as" value="arena">
|
||||||
|
<input type="hidden" name="action" value="ausbau2">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="48">
|
||||||
|
<tr>
|
||||||
|
<th valign="top" colspan="2" height="23" align="center"><?php echo $arena['name']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Name:</th>
|
||||||
|
<td height="25" width="373" valign="top"><input name="arena_name" class="input" value="<?php echo $arena['name']; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Stehplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><input name="steh" class="input" size="4" value="<?php echo $arena['steh']; ?>" /> (<?php echo displayMoney(12);?> Kosten)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Sitzplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><input name="sitz" class="input" size="4" value="<?php echo $arena['sitz']; ?>" /> (<?php echo displayMoney(180);?> Kosten)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="117" align="center">Logenplätze:</th>
|
||||||
|
<td height="25" width="373" valign="top"><input name="loge" class="input" size="4" value="<?php echo $arena['loge']; ?>" /> (<?php echo displayMoney(21600);?> Kosten)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="117" align="center"></td>
|
||||||
|
<td height="25" width="373" valign="top"><input id="input" type="submit" value="ausbauen/abreissen" name="submit"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayAusbau2($user, $arena, $arena_name, $steh, $sitz, $loge, $vermoegen, $confirm){
|
||||||
|
$unterhalt = calculateUnterhaltsKosten($arena);
|
||||||
|
if($unterhalt != 0){
|
||||||
|
displayErrorMessage(NULL, 'Bezahle erstmal deine Schulden!', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if($confirm == 1){
|
||||||
|
if($arena['steh'] < $steh){
|
||||||
|
$gesamtkosten += ($steh-$arena['steh'])*12;
|
||||||
|
}
|
||||||
|
if($arena['sitz'] < $sitz){
|
||||||
|
$gesamtkosten += ($sitz-$arena['sitz'])*180;
|
||||||
|
}
|
||||||
|
if($arena['loge'] < $loge){
|
||||||
|
$gesamtkosten += ($loge-$arena['loge'])*21600;
|
||||||
|
}
|
||||||
|
if($gesamtkosten > $vermoegen){
|
||||||
|
displayErrorMessage(NULL, 'Nicht genug Geld für den Umbau!', displayHistoryBackLink());
|
||||||
|
} else{
|
||||||
|
$sql = 'UPDATE arena set name = \''.$arena_name.'\', steh = '.$steh.', sitz = '.$sitz.', loge = '.$loge.' WHERE id = '.$arena['id'];
|
||||||
|
// echo $sql;
|
||||||
|
mysql_query($sql);
|
||||||
|
if(mysql_affected_rows() > 0){
|
||||||
|
mysql_query('UPDATE user set geld = geld - '.$gesamtkosten.' where id = '.$user['id']);
|
||||||
|
displayErrorMessage(NULL, 'Umbau durchgeführt!', '<a href="'.$_SERVER['PHP_SELF'].'?as=arena">weiter</a>');
|
||||||
|
} else{
|
||||||
|
displayErrorMessage(NULL, 'Umbau konnte nicht durchgeführt werden!', displayHistoryBackLink());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
$changelog = array();
|
||||||
|
$abbreissen = array();
|
||||||
|
$aufbauen = array();
|
||||||
|
$gesamtkosten = 0;
|
||||||
|
if($arena['name'] != $arena_name){
|
||||||
|
$arena_name = validateName($arena_name);
|
||||||
|
$changelog[] = 'Den Namen wirklich zu "'.$arena_name.'" ändern?';
|
||||||
|
}
|
||||||
|
if($arena['steh'] > $steh){
|
||||||
|
$abbreissen[] = ($arena['steh']-$steh).' Stehplätze';
|
||||||
|
} else if($arena['steh'] < $steh){
|
||||||
|
$aufbauen[] = ($steh-$arena['steh']).' Stehplätze';
|
||||||
|
$gesamtkosten += ($steh-$arena['steh'])*12;
|
||||||
|
}
|
||||||
|
if($arena['sitz'] > $sitz){
|
||||||
|
$abbreissen[] = ($arena['sitz']-$sitz).' Sitzplätze';
|
||||||
|
} else if($arena['sitz'] < $sitz){
|
||||||
|
$aufbauen[] = ($sitz-$arena['sitz']).' Sitzplätze';
|
||||||
|
$gesamtkosten += ($sitz-$arena['sitz'])*180;
|
||||||
|
}
|
||||||
|
if($arena['loge'] > $loge){
|
||||||
|
$abbreissen[] = ($arena['loge']-$loge).' Logenplätze';
|
||||||
|
} else if($arena['loge'] < $loge){
|
||||||
|
$aufbauen[] = ($loge-$arena['loge']).' Logenplätze';
|
||||||
|
$gesamtkosten += ($loge-$arena['loge'])*21600;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($abbreissen) != 0){
|
||||||
|
$changelog[] = join(', ',$abbreissen).' wirklich abreissen?';
|
||||||
|
}
|
||||||
|
if($gesamtkosten > 0){
|
||||||
|
$changelog[] = join(', ',$aufbauen).' wirklich für '.displayMoney($gesamtkosten).' ausbauen?';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($changelog) != 0){
|
||||||
|
echo join('<br>',$changelog).'<br>';
|
||||||
|
echo '<a href="'.$_SERVER['PHP_SELF'].'?as=arena&action=ausbau2&confirm=1&arena_name='.$arena_name.'&steh='.$steh.'&sitz='.$sitz.'&loge='.$loge.'">ja</a> | '.displayHistoryBackLink();
|
||||||
|
} else{
|
||||||
|
echo displayErrorMessage(NULL,'Nix zu tun!!', displayHistoryBackLink());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function displaySkillen($user, $arena, $charmax, $hausmeister, $luxus){
|
||||||
|
if($charmax !== NULL || $hausmeister !== NULL || $luxus !== NULL){
|
||||||
|
$cm = abs($user['char_max']-$charmax);
|
||||||
|
if($user['char_max'] + $cm > 7){
|
||||||
|
displayErrorMessage(NULL, 'Nicht mehr als 7 Chars möglich!', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$hm = abs($arena['hausmeister']-$hausmeister);
|
||||||
|
if($arena['hausmeister'] + $hm > 10){
|
||||||
|
displayErrorMessage(NULL, 'Nicht mehr als 10 Finanzberater möglich!', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$lu = abs($arena['luxus']-$luxus);
|
||||||
|
if($arena['luxus'] + $lu > 10){
|
||||||
|
displayErrorMessage(NULL, 'Nicht mehr als 10 Punkte bei Luxus möglich!', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// echo $cm.' '.$hm.' '.$lu.'<br>';
|
||||||
|
if($arena['skill'] < $cm + $hm + $lu){
|
||||||
|
displayErrorMessage(NULL, 'Nicht genug Skill-Points!', displayHistoryBackLink());
|
||||||
|
} else{
|
||||||
|
$n_skill = $arena['skill'] - ($cm + $hm + $lu);
|
||||||
|
$sql = 'Update arena SET skill = '.$n_skill.', hausmeister = '.($arena['hausmeister']+$hm).', luxus = '.($arena['luxus']+$lu).' WHERE id = '.$arena['id'];
|
||||||
|
mysql_query($sql);
|
||||||
|
if($cm != 0){
|
||||||
|
mysql_query('Update user SET char_max = '.($user['char_max']+$cm).' WHERE id = '.$user['id']);
|
||||||
|
}
|
||||||
|
displayErrorMessage(NULL, 'Die Skill-Points wurden erfolgreich verteilt!', '<a href="'.$_SERVER['PHP_SELF'].'?as=arena&skill1">weiter</a>');
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action=<?php echo $_SERVER['PHP_SELF']; ?> method="get">
|
||||||
|
<input type="hidden" name="as" value="arena">
|
||||||
|
<input type="hidden" name="action" value="skill1">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="48">
|
||||||
|
<tr>
|
||||||
|
<th valign="top" colspan="4" height="23" align="center"><?php echo $arena['name']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" width="100" align="center">Skillpoints:</th>
|
||||||
|
<td height="25" valign="top"><?php echo $arena['skill']; ?></td>
|
||||||
|
<td width="50"></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" align="center">Maximale Chars:</th>
|
||||||
|
<td height="25" valign="top"><input name="char_max" class="input" size="1" value="<?php echo $user['char_max']; ?>" /></td>
|
||||||
|
<td>Max: 7</td>
|
||||||
|
<td>Mehr Chars</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" align="center">Luxus:</th>
|
||||||
|
<td height="25" valign="top"><input name="luxus" class="input" size="1" value="<?php echo $arena['luxus']; ?>" /></td>
|
||||||
|
<td>Max: 10</td>
|
||||||
|
<td>Mehr Zuschauer</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="top" align="center">Finanzberater:</th>
|
||||||
|
<td height="25" valign="top"><input name="hausmeister" class="input" size="1" value="<?php echo $arena['hausmeister']; ?>" /></td>
|
||||||
|
<td>Max: 10</td>
|
||||||
|
<td>Erhöht Steuerfreibetrag, Senkt Steuersatz</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" align="center"></td>
|
||||||
|
<td height="25" valign="top"><input id="input" type="submit" value="skillen" name="submit"></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function renovate($user, $arena, $vermoegen){
|
||||||
|
$costs = calculateRenovierungsKosten($arena);
|
||||||
|
if($costs > $vermoegen){
|
||||||
|
displayErrorMessage(NULL, 'Nicht genug Geld für die Renovierung!', displayHistoryBackLink());
|
||||||
|
} else{
|
||||||
|
mysql_query('Update user set geld = geld - '.$costs.' WHERE id = '.$user['id']);
|
||||||
|
mysql_query('Update arena set zustand = 1 WHERE id = '.$arena['id']);
|
||||||
|
displayErrorMessage(NULL, 'Renovierung durchgeführt!', displayHistoryBackLink());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena where besitzer = \''.$user_ida['id'].'\''));
|
||||||
|
if(!$arena['name']) {
|
||||||
|
$sql = 'INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')';
|
||||||
|
mysql_query($sql);
|
||||||
|
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena where besitzer = \''.$user_ida['id'].'\''));
|
||||||
|
}
|
||||||
|
|
||||||
|
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter'));
|
||||||
|
$auktionensumme = $auktionensumme['summe'];
|
||||||
|
$vermoegen = $user['geld'] - $auktionensumme;
|
||||||
|
$unterhalt = calculateUnterhaltsKosten($arena);
|
||||||
|
|
||||||
|
if($action == 'miete'){
|
||||||
|
// Zahle Miete
|
||||||
|
if($vermoegen < $unterhalt){
|
||||||
|
displayErrorMessage(NULL, 'Du hast nicht genug Geld um die Unterhaltskosten zu bezahlen!', displayHistoryBackLink());
|
||||||
|
} else{
|
||||||
|
mysql_query('Update user set geld = geld - '.$unterhalt.' WHERE id = '.$user_ida['id']);
|
||||||
|
mysql_query('Update arena set mietlasten = 0, steuerlasten = 0 WHERE id = '.$arena['id']);
|
||||||
|
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena where besitzer = \''.$user_ida['id'].'\''));
|
||||||
|
displayArena($arena);
|
||||||
|
}
|
||||||
|
} else if($action == 'ausbau1'){
|
||||||
|
displayAusbau($arena);
|
||||||
|
} else if($action == 'ausbau2'){
|
||||||
|
displayAusbau2($user, $arena, $arena_name, $steh, $sitz, $loge, $vermoegen, $confirm);
|
||||||
|
} else if($action == 'skill1'){
|
||||||
|
displaySkillen($user, $arena, $charmax, $hausmeister, $luxus);
|
||||||
|
} else if($action == 'renovieren'){
|
||||||
|
renovate($user, $arena, $vermoegen);
|
||||||
|
}else{
|
||||||
|
displayArena($arena);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,398 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 14.08.2007
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/******************************************************************************
|
||||||
|
* Dieser Skript erzeugt die Eingabemaske für die Auktion,
|
||||||
|
* es nutzt hierbei die in auktion_functions.inc.php zur verfügung gestellten Funktionen
|
||||||
|
*******************************************************************************
|
||||||
|
* Autor: Pascal Proksch
|
||||||
|
* Erstellungsdatum: 14.08.2007
|
||||||
|
* Zuletzt verändert: 15.08.2007
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/auktion_functions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$auktionsid = validateUnsignedInteger($_GET['auktionsid'],null);
|
||||||
|
$gebot = validateUnsignedInteger($_GET['gebot'],null);
|
||||||
|
$anzahl = validateUnsignedInteger($_GET['anzahl'], null);
|
||||||
|
$start = validateUnsignedInteger($_GET['start'], null);
|
||||||
|
$entries = validateUnsignedInteger($_GET['entries'], null);
|
||||||
|
$page = validateUnsignedInteger($_GET['page'], null);
|
||||||
|
$maxpreis = validateUnsignedInteger($_GET['maxpreis'], null);
|
||||||
|
$itemname = validateString($_GET['itemname']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$pay = $_GET['pay'];
|
||||||
|
$action = $_GET['action'];
|
||||||
|
|
||||||
|
// Wird selbst geprueft!!
|
||||||
|
$items = $_GET['items'];
|
||||||
|
$order = $_GET['order'];
|
||||||
|
$dir = $_GET['dir'];
|
||||||
|
$kategorie = $_GET['kategorie'];
|
||||||
|
|
||||||
|
|
||||||
|
function stelleBietenMaskeDar($userid,$auktionsid,$gebot){
|
||||||
|
if($gebot != NULL && $gebot != ''){
|
||||||
|
$errorMsg = biete($userid,$auktionsid,$gebot);
|
||||||
|
if($errorMsg == ''){
|
||||||
|
echo 'Es wurde erfolgreich für das Item geboten!<br><br>';
|
||||||
|
} else{
|
||||||
|
echo 'Es ist beim Bieten ein Fehler aufgetreten: '.$errorMsg.'!<br><br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$auktionsdaten = getEntryInformation($auktionsid);
|
||||||
|
?>
|
||||||
|
<form action="" method=GET>
|
||||||
|
<input type="hidden" name="as" value="auktion"></input>
|
||||||
|
<input type="hidden" name="action" value="1"></input>
|
||||||
|
<input type='hidden' name="auktionsid" value='<?php echo $auktionsdaten['auktionsid']; ?>'></input>
|
||||||
|
<table border="0" width="332" height="187" align="center">
|
||||||
|
<tr>
|
||||||
|
<th height="25" width="332" colspan="2" align="center">Item Auktion</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Name</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayItemLink($auktionsdaten['tablename'], $auktionsdaten['itemid'], $auktionsdaten['itemname']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Höchstbietender?</b></td>
|
||||||
|
<td height="25" width="178" align="left"> <?php echo displayUserLink($auktionsdaten['bieter'],$auktionsdaten['bietername']); ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Aktuelles Gebot</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayMoney($auktionsdaten['aktuellesgebot']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Startgebot</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayMoney($auktionsdaten['startgebot']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Anzahl</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayCount($auktionsdaten['anzahl']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($auktionsdaten['anbieter'] != 1){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Durchschnittlicher Kaufpreis</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayMoney(getAveragePrice($auktionsdaten['itemid'], $auktionsdaten['tablename'], $auktionsdaten['anzahl'])); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Bieten</b></td>
|
||||||
|
<td height="25" width="178" align="left"><input id="input" type="int" name="gebot" value="<?php echo aktuellesMindestgebot($auktionsdaten['auktionsid']); ?>" size="7"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td height="25" width="178" align="left"><input id="input" type="submit" value="bieten"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" colspan="2">INFO: Es muss immer mindestens 2% mehr Geboten werden, als das akutelle Gebot.<br><br>Es ist verboten weit über dem Wert zu ersteigern! Dies wird als Cheatingverdacht behandelt und auch bestraft! Bsp. HP Trank II für 20.000</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function stelleAuktionErstellenMaskeDar($userid,$id_db_mix, $anzahl, $startgebot){
|
||||||
|
// Maske in <html>
|
||||||
|
if($id_db_mix != '' && !is_null($id_db_mix)){
|
||||||
|
$errorMessage = insertItem($userid,$id_db_mix, $anzahl, $startgebot);
|
||||||
|
if($errorMessage == '' OR $errorMessage == NULL){
|
||||||
|
echo '<br>Das Item konnte erfolgreich eingefügt werden.<br>';
|
||||||
|
$id_db_mix = '';
|
||||||
|
$anzahl = '1';
|
||||||
|
$startgebot = '10';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<br>Das Item konnte nicht eingefügt werden: '.$errorMessage.'<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$anzahl = '1';
|
||||||
|
$startgebot = '10';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="" method=GET>
|
||||||
|
<input type="hidden" name="as" value="auktion"></input>
|
||||||
|
<input type="hidden" name="action" value="2"></input>
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<th height="20" valign="center" width="557" colspan="2" align="center">Item versteigern!</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="50%" valign="center" align="center">Item</td>
|
||||||
|
<td height="25" width="50%" valign="center" align="right">
|
||||||
|
<select id="input" name="items">
|
||||||
|
<?php
|
||||||
|
// Nun erstmal die Optionen empfangen
|
||||||
|
$options = getItemOptions($userid,$id_db_mix);
|
||||||
|
$index = 0;
|
||||||
|
while($options[$index] != NULL){
|
||||||
|
echo "\t\t\t\t\t".$options[$index++]."\n";
|
||||||
|
}
|
||||||
|
?> </select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="50%" valign="center" align="center">Mindestgebot</td>
|
||||||
|
<td height="25" width="50%" valign="center" align="right"> <input id="input" type="int" name="start" value="<?php echo $startgebot; ?>" size="5"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="50%" valign="center" align="center">Anzahl</td>
|
||||||
|
<td height="25" width="50%" valign="center" align="right"> <input id="input" type="int" name="anzahl" value="<?php echo $anzahl; ?>" size="5"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="50%"> </td>
|
||||||
|
<td height="25" width="50%" valign="center" align="right"><input id="input" type=submit value="Verkaufen"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" colspan="2">Da dieser Service nicht gratis ist, werden als Bearbeitungsgebühr 1% des Versteigerungspreises enthalten.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function stelleAuktionsuebersichtDar($userid,$kategorie,$itemnamepart,$entries,$pageNumber,$maxpreis,$order,$dir){
|
||||||
|
if($pageNumber == NULL || $pageNumber<0 || !is_numeric($pageNumber)){$pageNumber=0;}
|
||||||
|
if($entries == NULL || $entries == 0 || !is_numeric($entries)){ $entries = 20;}
|
||||||
|
|
||||||
|
if(!($kategorie == 'ware' || $kategorie == 'sp_ware' || $kategorie == 'wochen_ware')){$kategorie = 'all';}
|
||||||
|
if(!($order == 'itemname' || $order == 'aktuellesgebot' || $order == 'anbietername' || $order == 'bietername' || $order == 'anzahl' || $order == 'deadline')){
|
||||||
|
$order = 'deadline';
|
||||||
|
}
|
||||||
|
if($dir != 'DESC' || $dir == NULL){
|
||||||
|
$dir = 'ASC';
|
||||||
|
}
|
||||||
|
// // Wichtig fuer die SQL-Abfrage -> Muss nicht mehr
|
||||||
|
// $itemnamepart = preg_replace('#\'#','',$itemnamepart);
|
||||||
|
|
||||||
|
$orderstring = '<a href="index.php?as=auktion&page='.$pageNumber.'&entries='.$entries.'&maxpreis='.$maxpreis.'&kategorie='.$kategorie.'&itemname='.$itemnamepart.'&###ORDER###">###LABEL###</a>';
|
||||||
|
?>
|
||||||
|
<form action="" method='GET'>
|
||||||
|
<input type="hidden" name="as" value="auktion"></input>
|
||||||
|
<input type="hidden" name="order" value="<?php echo $order; ?>"></input>
|
||||||
|
<input type="hidden" name="dir" value="<?php echo $dir; ?>"></input>
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td height="30" valign="top" width="410" align="center"><b>Auktions-Markt</b></td>
|
||||||
|
<td height="30" valign="top" width="136" align="center"><b><a href="index.php?as=auktion&action=2">Item Online Stellen</a></b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Suchfeld einschränken</td>
|
||||||
|
<td align="right">
|
||||||
|
<select id="input" id="input" name='kategorie'>
|
||||||
|
<?php
|
||||||
|
$index = 0;
|
||||||
|
$options = getKategorieOptions($kategorie);
|
||||||
|
while($options[$index] != NULL){
|
||||||
|
echo "\t\t\t\t".$options[$index++]."\n";
|
||||||
|
}
|
||||||
|
?> </select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Auktionen pro Seite</td>
|
||||||
|
<td align="right"><input id="input" type="int" name="entries" size="5" value="<?php echo $entries;?>"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Maximalgebot</td>
|
||||||
|
<td align="right"><input id="input" type="int" name="maxpreis" size="5" value="<?php echo $maxpreis;?>"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Itemname</td>
|
||||||
|
<td align="right"><input id="input" name="itemname" size="5" value="<?php echo $itemnamepart;?>"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="131"> </td>
|
||||||
|
<td height="25" width="426" valign="center" align="right"><input id="input" type=submit value="Suchanfrage absenden"></input></form></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="546" colspan="2">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php
|
||||||
|
if($order == 'itemname' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=itemname&dir=DESC','Item'),$orderstring);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=itemname&dir=ASC','Item'),$orderstring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php
|
||||||
|
if($order == 'aktuellesgebot' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=aktuellesgebot&dir=DESC','Akuelles Gebot'),$orderstring);
|
||||||
|
} else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=aktuellesgebot&dir=ASC','Akuelles Gebot'),$orderstring);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php if($order == 'anbietername' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=anbietername&dir=DESC','Anbieter'),$orderstring);
|
||||||
|
} else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=anbietername&dir=ASC','Anbieter'),$orderstring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php if($order == 'bietername' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=bietername&dir=DESC','Höchstbietender'),$orderstring);
|
||||||
|
} else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=bietername&dir=ASC','Höchstbietender'),$orderstring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php if($order == 'anzahl' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=anzahl&dir=DESC','Anzahl'),$orderstring);
|
||||||
|
} else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=anzahl&dir=ASC','Anzahl'),$orderstring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
<?php if($order == 'deadline' && $dir == 'ASC'){
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=deadline&dir=DESC','Deadline'),$orderstring);
|
||||||
|
} else{
|
||||||
|
echo preg_replace(array('/###ORDER###/','/###LABEL###/'), array('order=deadline&dir=ASC','Deadline'),$orderstring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</th>
|
||||||
|
<th height="31" valign="top" align="center">
|
||||||
|
Bieten
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$aktionentries = getAuktionEntries($kategorie,$itemnamepart,$entries,$pageNumber,$maxpreis,$order,$dir);
|
||||||
|
$index = 0;
|
||||||
|
while($aktionentries[$index] != NULL){
|
||||||
|
echo "\t\t\t\t".'<tr>'."\n";
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayItemLink($aktionentries[$index]['tablename'], $aktionentries[$index]['itemid'], $aktionentries[$index]['itemname']).'</td>'."\n";
|
||||||
|
if($aktionentries[$index]['aktuellesgebot'] != NULL){
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayMoney($aktionentries[$index]['aktuellesgebot']).'</td>'."\n";
|
||||||
|
} else{
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayMoney($aktionentries[$index]['startgebot']).'</td>'."\n";
|
||||||
|
}
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayUserLink($aktionentries[$index]['anbieter'],$aktionentries[$index]['anbietername']).'</td>'."\n";
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayUserLink($aktionentries[$index]['bieter'],$aktionentries[$index]['bietername']).'</td>'."\n";
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.displayCount($aktionentries[$index]['anzahl']).'</td>'."\n";
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center">'.$aktionentries[$index]['deadline'].'</td>'."\n";
|
||||||
|
if($userid == $aktionentries[$index]['anbieter']){
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center"><a href="index.php?as=auktion&action=3&auktionsid='.$aktionentries[$index]['auktionsid'].'">zurückziehen</a></td>'."\n";
|
||||||
|
} else{
|
||||||
|
echo "\t\t\t\t\t".'<td height="31" valign="top" align="center"><a href="index.php?as=auktion&action=1&auktionsid='.$aktionentries[$index]['auktionsid'].'">mitbieten</a></td>'."\n";
|
||||||
|
}
|
||||||
|
echo "\t\t\t\t".'</tr>'."\n";
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="100%" colspan="2">
|
||||||
|
<?php
|
||||||
|
if($entries > 0){
|
||||||
|
$anzahl = ceil(getAuktionTotalCount($kategorie,$itemnamepart,$maxpreis) / $entries);
|
||||||
|
$pagestring = '<a href="index.php?as=auktion&page=###PAGE###&entries='.$entries.'&maxpreis='.$maxpreis.'&kategorie='.$kategorie.'&itemname='.$itemnamepart.'&order='.$order.'&dir='.$dir.'">###LABEL###</a>';
|
||||||
|
echo displayPagelinks($pageNumber,$anzahl,$pagestring);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<input type='hidden' name='page' value='0'></input>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function zieheAuktionZurueck($userid,$auktionsid,$pay){
|
||||||
|
$auktionsdaten = getEntryInformation($auktionsid);
|
||||||
|
|
||||||
|
if($pay == NULL || $pay == ''){
|
||||||
|
// Nix eigentlich!!
|
||||||
|
$pay = $auktionsdaten['aktuellesgebot']!=NULL?'YES':'NO';
|
||||||
|
} else{
|
||||||
|
$errMessage = zurueckziehen($userid, $auktionsid, $pay);
|
||||||
|
if($errMessage == ''){
|
||||||
|
echo 'Zurückziehen erfolgreich!';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo 'Fehler beim Zurückziehen aufgetreten: '.$errMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="" method=GET>
|
||||||
|
<input type="hidden" name="as" value="auktion"></input>
|
||||||
|
<input type="hidden" name="action" value="3"></input>
|
||||||
|
<input type="hidden" name="auktionsid" value='<?php echo $auktionsdaten['auktionsid']; ?>'></input>
|
||||||
|
<input type="hidden" name="pay" value="<?php echo $pay; ?>"></input>
|
||||||
|
<table border="0" width="332" height="187" align="center">
|
||||||
|
<tr>
|
||||||
|
<th height="25" width="332" colspan="2" align="center">Item zurückziehen</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Name</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayItemLink($auktionsdaten['tablename'], $auktionsdaten['itemid'], $auktionsdaten['itemname']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Höchstbietender?</b></td>
|
||||||
|
<td height="25" width="178" align="left"> <?php echo displayUserLink($auktionsdaten['bieter'],$auktionsdaten['bietername']);; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Aktuelles Gebot</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayMoney($auktionsdaten['aktuellesgebot']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="138" align="left"><b>Startgebot</b></td>
|
||||||
|
<td height="25" width="178" align="left"><?php echo displayMoney($auktionsdaten['startgebot']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td height="25" width="178" align="left"><input id="input" type="submit" value="zurückziehen"></input></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" colspan="2">
|
||||||
|
Auktionen, bei denen noch niemand geboten hat, können ohne zusätzliche Kosten zurückgezogen werden. Auktionen mit aktuellem Gebot kosten beim Zurückziehen 10% des aktuellen Gebots!
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($user_ida[id])){
|
||||||
|
// Abfrage der uebergebenen Aktionen
|
||||||
|
if($action == 1){ // Bieten für eine Auktion
|
||||||
|
stelleBietenMaskeDar($user_ida['id'],$auktionsid, $gebot);
|
||||||
|
} else if($action == 2){ // Erstellen einer Auktion
|
||||||
|
stelleAuktionErstellenMaskeDar($user_ida['id'],$items,$anzahl,$start);
|
||||||
|
} elseif($action == 3){ // Zurueckziehen einer Auktion
|
||||||
|
zieheAuktionZurueck($user_ida['id'],$auktionsid,$pay);
|
||||||
|
} else{ // Ansonsten Standardfenster
|
||||||
|
stelleAuktionsuebersichtDar($user_ida['id'],$kategorie,$itemname,$entries,$page,$maxpreis,$order,$dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
?><link rel="stylesheet" href="design/style.css" type="text/css">
|
||||||
|
<?php
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/auktion_functions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
$pagenum = validateUnsignedInteger($_GET['pagenum'], null);
|
||||||
|
$firstLetter = validateString($_GET['firstLetter']);
|
||||||
|
|
||||||
|
|
||||||
|
if($firstLetter == 'Numeric'){
|
||||||
|
$auser = mysql_query('SELECT * FROM user where SUBSTRING(nickname,1,1) < \'a\' order by nickname ASC LIMIT '.($pagenum*50).', 50');
|
||||||
|
$total = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM user where SUBSTRING(nickname,1,1) < \'a\''));
|
||||||
|
} else if($firstLetter == null){
|
||||||
|
$auser = mysql_query('SELECT * FROM user order by nickname ASC LIMIT '.($pagenum*50).', 50');
|
||||||
|
$total = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM user'));
|
||||||
|
} else{
|
||||||
|
$auser = mysql_query('SELECT * FROM user where nickname like \''.$firstLetter.'%\' order by nickname ASC LIMIT '.($pagenum*50).', 50');
|
||||||
|
$total = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM user where nickname like \''.$firstLetter.'%\''));
|
||||||
|
}
|
||||||
|
|
||||||
|
$total = $total['anzahl'];
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="80%" height="1" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="693" height="11" colspan="4">
|
||||||
|
<p align="center"><b>Hier findest du alle User</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<table width="100%"><tr>
|
||||||
|
<td><a href="index.php?as=auser">Alle</a></td>
|
||||||
|
<td><a href="index.php?as=auser&firstLetter=Numeric">0-9</a></td><?php
|
||||||
|
for($i=ord('A');$i<=ord('Z');$i++){
|
||||||
|
echo '<td><a href="index.php?as=auser&firstLetter='.chr($i).'">'.chr($i).'</a></td>';
|
||||||
|
}
|
||||||
|
?></tr></table></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="143" height="30" align="center"><b>Nickname</b></td>
|
||||||
|
<td width="98" height="30" align="center"><b>ICQ</b></td>
|
||||||
|
<td width="157" height="30" align="center"><b>Homepage</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
while($row = mysql_fetch_array($auser)) {
|
||||||
|
if(!$row['icq']) { $row['icq'] = 'Kein ICQ'; }
|
||||||
|
if(!$row['homepage']) { $row['homepage'] = 'Keine Homepage'; }
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="144" height="30" align="center"><?php echo "<a href=index.php?as=info&user_id=$row[id]>$row[nickname]</a>"; ?></td>
|
||||||
|
<td width="99" height="30" align="center"><?php echo $row['icq']; ?></td>
|
||||||
|
<td width="156" height="30" align="center"><?php echo "<a href=$row[homepage]>$row[homepage]</a>"; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="644" height="22" colspan="3"><?php echo displayPagelinksNew(50, $total, $pagenum, '<a href="index.php?as=auser&firstLetter='.$firstLetter.'&pagenum=###PAGE###">###LABEL###</a>');?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Legacy!
|
||||||
|
*
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
|
||||||
|
$clan = mysql_fetch_array(mysql_query("SELECT leader, id FROM clan WHERE id='$user_ida[clan]' LIMIT 1"));
|
||||||
|
|
||||||
|
$kampfs1 = mysql_query("SELECT * FROM clan_kampf WHERE clan1_id='$clan[id]' OR clan2_id='$clan[id]' ORDER BY id DESC LIMIT 3");
|
||||||
|
|
||||||
|
$kampf_row = mysql_num_rows(mysql_query("SELECT id FROM clan_kampf WHERE clan1_id='$clan[id]' OR clan2_id='$clan[id]' ORDER BY id DESC LIMIT 1"));
|
||||||
|
|
||||||
|
if(!$kampf_row) {
|
||||||
|
echo "Sie haben keine Kämpfe offen.";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<body bgcolor=#202020>";
|
||||||
|
while($kampf1 = mysql_fetch_array($kampfs1)) {
|
||||||
|
|
||||||
|
$char_1 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char1]' LIMIT 1"));
|
||||||
|
$char_2 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char2]' LIMIT 1"));
|
||||||
|
|
||||||
|
$spleoic = "clan";
|
||||||
|
|
||||||
|
$starke1 = explode(",", $kampf1[starke1]);
|
||||||
|
$starke2 = explode(",", $kampf1[starke2]);
|
||||||
|
$ver1 = explode(",", $kampf1[ver1]);
|
||||||
|
$ver2 = explode(",", $kampf1[ver2]);
|
||||||
|
$speed1 = explode(",", $kampf1[speed1]);
|
||||||
|
$speed2 = explode(",", $kampf1[speed2]);
|
||||||
|
$ausdauer1 = explode(",", $kampf1[ausdauer1]);
|
||||||
|
$ausdauer2 = explode(",", $kampf1[ausdauer2]);
|
||||||
|
|
||||||
|
$schaden1 = explode(",", $kampf1[schaden1]);
|
||||||
|
$schaden2 = explode(",", $kampf1[schaden2]);
|
||||||
|
$attacke1 = explode(",", $kampf1[attacke1]);
|
||||||
|
$attacke2 = explode(",", $kampf1[attacke2]);
|
||||||
|
|
||||||
|
$hp1 = explode(",", $kampf1[hp1]);
|
||||||
|
$hp2 = explode(",", $kampf1[hp2]);
|
||||||
|
$mp1 = explode(",", $kampf1[mp1]);
|
||||||
|
$mp2 = explode(",", $kampf1[mp2]);
|
||||||
|
|
||||||
|
$a_hp1 = explode(",", $char_1[hp]);
|
||||||
|
$a_hp2 = explode(",", $char_2[hp]);
|
||||||
|
$a_mp1 = explode(",", $char_1[mp]);
|
||||||
|
$a_mp2 = explode(",", $char_2[mp]);
|
||||||
|
$runde = 1;
|
||||||
|
|
||||||
|
include($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.php');
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
?>
|
@ -0,0 +1,180 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Diese Datei wird aufgerufen wenn "Charakter erstellen" ausgewaehlt wurde.
|
||||||
|
* TODO: Layout anpassen (keine <center>, <font> und <strong> Tags mehr)
|
||||||
|
* TODO: Alle "" Strings in '' Strings umwandeln
|
||||||
|
* TODO: Funktioneller Aufruf, damit exit-Tags verschwinden koennen und somit der Chat angezeigt werden kann!!
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/erstellfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$char_name = validateName($_GET['char_name']);
|
||||||
|
$char_1_type = validateString($_GET['char_1_Type']);
|
||||||
|
$char_bild = validateURL($_GET['char_bild']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$char_type = $_GET['char_type'];
|
||||||
|
|
||||||
|
?>
|
||||||
|
<SCRIPT language="JavaScript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function isAPhoneNumber(){
|
||||||
|
var s = "" + document.charz.char_name.value; //Umwandlung in eine Zeichenkette
|
||||||
|
var zeichen = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_ !" //Gueltige Zeichen
|
||||||
|
for (var i=0; i<s.length; i++){
|
||||||
|
if (zeichen.indexOf(s.charAt(i))==-1){
|
||||||
|
//kein gueltiges Zeichen
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-->
|
||||||
|
</SCRIPT>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//if($charm == 2) {
|
||||||
|
|
||||||
|
// $user_ida, $char_1_Type, $char_name
|
||||||
|
function handleErstelleCharRequest($user, $type, $name, $bild){
|
||||||
|
if($type != 'Mensch' && $type != 'Saiyajin' && $type != 'Dämon' && $type != 'Mutant' && $type != 'Cyborg' && $type != 'Namekianer' && $type != 'Pirat' && $type != 'Schwertkämpfer' && $type != 'Grandline Maschine'){
|
||||||
|
displayErrorMessage(NULL,'Rasse kann nicht erstellt werden!',displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(erstelleChar($user, $type, $name,$bild)){
|
||||||
|
displayErrorMessage('Änderungen übernommen','','<a href="index.php?as=char">weiter</a>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if($charm !== NULL) {
|
||||||
|
|
||||||
|
function handleSecondPhase($type, $name){
|
||||||
|
?>
|
||||||
|
<form action="index.php" method="get">
|
||||||
|
<input type="hidden" name="as" value="char">
|
||||||
|
<input type="hidden" name="charm" value="2">
|
||||||
|
<input type="hidden" name="char_name" value="<?php echo $name; ?>">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="20">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" align="center">Charakter erstellen (2/2)</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Rasse:</td>
|
||||||
|
<td>
|
||||||
|
<select id="input" name="char_1_Type">
|
||||||
|
<?php
|
||||||
|
if($type == 'Dragonball') {
|
||||||
|
?>
|
||||||
|
<option value="Mensch">Mensch</option>
|
||||||
|
<option value="Saiyajin">Saiyajin</option>
|
||||||
|
<option value="Dämon">Dämon</option>
|
||||||
|
<option value="Mutant">Mutant</option>
|
||||||
|
<option value="Cyborg">Cyborg</option>
|
||||||
|
<option value="Namekianer">Namekianer</option>
|
||||||
|
<?php
|
||||||
|
} else if($type == 'Onepiece') {
|
||||||
|
?>
|
||||||
|
<option value="Pirat">Pirat</option>
|
||||||
|
<option value="Schwertkämpfer">Schwertkämpfer</option>
|
||||||
|
<option value="Grandline Maschine">Grandline Maschine</option>
|
||||||
|
<?php
|
||||||
|
} else{
|
||||||
|
?>
|
||||||
|
<option value="Cheater">Cheater</option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Charakter Bild (75x75):</th>
|
||||||
|
<td>
|
||||||
|
<input name="char_bild" id="input">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<input id="input" type=submit value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleFirstPhase(){
|
||||||
|
?>
|
||||||
|
<form action="index.php" method="get" name="charz" onsubmit="return isAPhoneNumber()">
|
||||||
|
<input type="hidden" name="as" value="char">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="25">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" align="center">Charakter Erstellen (1/2)</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="center">Charaktername</th>
|
||||||
|
<td>
|
||||||
|
<input id="input" name="char_name" size="20"></input> (Buchstaben)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="center">Type</th>
|
||||||
|
<td>
|
||||||
|
<select id="input" name="char_type">
|
||||||
|
<option value="Dragonball">Dragonball</option>
|
||||||
|
<option value="Onepiece">Onepiece</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><input id="input" type="submit" value="weiter"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_daten= mysql_fetch_assoc(mysql_query("SELECT char_max, id FROM user WHERE nickname='".$_COOKIE[name]."' LIMIT 1"));
|
||||||
|
$anzahl_spezialchars = mysql_num_rows(mysql_query('SELECT char_type,name from chars WHERE (rasse = "Kaioshin" OR fusion_rasse = "Kaioshin" OR rasse = "Shichibukai" OR fusion_rasse = "Shichibukai") AND besitzer='.$user_daten['id']));
|
||||||
|
$anzahl_charactere= mysql_num_rows(mysql_query("SELECT id FROM chars WHERE besitzer='".$user_daten[id]."'"));
|
||||||
|
|
||||||
|
if ($anzahl_spezialchars >= 1 AND $user_daten['char_max'] == 7) {
|
||||||
|
$chars_max= 8;
|
||||||
|
} else {
|
||||||
|
$chars_max= $user_daten['char_max'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($anzahl_charactere < $chars_max) {
|
||||||
|
if($charm === NULL){
|
||||||
|
handleFirstPhase($user_daten,$anzahl_charactere);
|
||||||
|
} else if($charm == 1){
|
||||||
|
handleSecondPhase($char_type, $char_name);
|
||||||
|
} else if($charm == 2){
|
||||||
|
handleErstelleCharRequest($user_ida, $char_1_type, $char_name, $char_bild);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo 'Du hast bereits die maximal mögliche Menge an Characteren erstellt, die du erstellen kannst.<br />Nämlich '.$anzahl_charactere.' von '.$chars_max.' Charaktere.';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Diese Datei wird aufgerufen wenn "Charakter verwalten" ausgewaehlt wurde.
|
||||||
|
* TODO: Layout anpassen (keine <center>, <font> und <strong> Tags mehr)
|
||||||
|
* TODO: Alle "" Strings in '' Strings umwandeln
|
||||||
|
* TODO: Funktioneller Aufruf, damit exit-Tags verschwinden koennen und somit der Chat angezeigt werden kann!!
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$char_id = validateUnsignedInteger($_GET['char_id'], null);
|
||||||
|
|
||||||
|
// Unkritisch!
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$as = $_GET['as'];
|
||||||
|
|
||||||
|
if ($charm == 3) {
|
||||||
|
$char = getChar($char_id);
|
||||||
|
$result = deleteChar($user_ida['id'],$char_id);
|
||||||
|
if($result === true){
|
||||||
|
displayErrorMessage(NULL, 'Der Char '.$char['name']. ' wurde gelöscht', '<a href="index.php?as=char_index">weiter</a>');
|
||||||
|
} else{
|
||||||
|
displayErrorMessage(NULL, $result, '<a href="index.php?as=char_index">weiter</a>');
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($as == "char_index") {
|
||||||
|
$as = "char_profil";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" height="132">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$chars = getCharsOfUser($user_ida['id']);
|
||||||
|
if(count($chars) == 0){
|
||||||
|
?><tr><td align="center">Du hast noch keine Chars!</td></tr><?php
|
||||||
|
} else{
|
||||||
|
foreach ($chars as $row) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="429" height="84" align="center"><?php
|
||||||
|
?>
|
||||||
|
<img border="1" src="<?php echo "$row[bild]"; ?>" width="75" height="75"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="429" height="44" align="center"><b>Charakter: <?php
|
||||||
|
|
||||||
|
if ($as == "schatz_suche") {
|
||||||
|
echo "<a href=schatz.php?char_id=$row[id]>$row[name]</a> | Status: ";
|
||||||
|
} else {
|
||||||
|
echo "<a href=index.php?as=$as&char_id=$row[id]>$row[name]</a> | Status: ";
|
||||||
|
}
|
||||||
|
if ($row['status'] == 'Frei') {
|
||||||
|
echo "<b>Frei</b> |";
|
||||||
|
echo '<a href="javascript:if(confirm(\'' . $row['name'] . ' Wirklich löschen?\')==true) window.location.href=\'index.php?as=char_index&charm=3&char_id=' . $row['id'] . '\'">Charakter löschen</a>';
|
||||||
|
} else {
|
||||||
|
echo "<a href='index.php?as=abholen&ab=$row[status]&char_id=$row[id]'>$row[status]</a> |";
|
||||||
|
echo '<a href="javascript:if(confirm(\'' . $row['name'] . ' Wirklich löschen?\')==true) window.location.href=\'index.php?as=char_index&charm=3&char_id=' . $row['id'] . '\'">Charakter löschen</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -0,0 +1,203 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Diese Datei wird aufgerufen wenn "Charakter verwalten" ausgewaehlt wurde.
|
||||||
|
* TODO: Layout anpassen (keine <center>, <font> und <strong> Tags mehr)
|
||||||
|
* TODO: Alle "" Strings in '' Strings umwandeln
|
||||||
|
* TODO: Funktioneller Aufruf, damit exit-Tags verschwinden koennen und somit der Chat angezeigt werden kann!!
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
$chars = getCharsOfUser($user_ida['id']);
|
||||||
|
$char_zahl = 0;
|
||||||
|
foreach($chars as $my_charz){
|
||||||
|
// $hp = explode(",", $my_charz[hp]);
|
||||||
|
// $mp = explode(",", $my_charz[mp]);
|
||||||
|
//
|
||||||
|
// $POWERLEVEL5 = $my_charz['starke']+$my_charz['verteidigung']+$my_charz['speed']+$my_charz['ausdauer']+$my_charz['glueck'] + $hp[1]/10 + $mp[1]/5;
|
||||||
|
$POWERLEVEL5 = $my_charz['starke']+$my_charz['verteidigung']+$my_charz['speed']+$my_charz['ausdauer']+$my_charz['glueck'];
|
||||||
|
if($my_charz['fusion']=="ja"){
|
||||||
|
$fusi = "<br>Fusionsrasse: ".$my_charz['fusion_rasse'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$fusi = "";
|
||||||
|
if($my_charz['type']=="Onepiece"){
|
||||||
|
$frucht = "<br>Teufelsfrucht: ".$my_charz['frucht'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$frucht = "";
|
||||||
|
$hptemp = explode(",", $my_charz['hp']);
|
||||||
|
$hpleft[$char_zahl] = $hptemp['0'] / $hptemp['1'] * 100;
|
||||||
|
$mptemp = explode(",", $my_charz['mp']);
|
||||||
|
$mpleft[$char_zahl] = $mptemp['0'] / $mptemp['1'] * 100;
|
||||||
|
$exptemp = explode(",", $my_charz['exp']);
|
||||||
|
$room = mysql_query('SELECT ci.name FROM clan_item ci inner join clan_ware cw on ci.id = cw.item_id WHERE cw.id='.$my_charz['clan_train']);
|
||||||
|
$clanroom=mysql_fetch_assoc($room);
|
||||||
|
|
||||||
|
if($clanroom['name']=="")
|
||||||
|
$clanroom['name']="kein";
|
||||||
|
|
||||||
|
$temproom="<br><a href=index.php?as=clan/c_ware&char_id=$my_charz[id] id=popup> Trainingsraum: ".$clanroom['name']."</a>";
|
||||||
|
|
||||||
|
$hp = "HP: ".$hptemp['0']." / ".$hptemp['1'];
|
||||||
|
if($my_charz['status'] == "Schatz Suche")
|
||||||
|
$statustemp = "Schatz%20Suche";
|
||||||
|
else
|
||||||
|
$statustemp = $my_charz['status'];
|
||||||
|
|
||||||
|
|
||||||
|
if($my_charz['kampf_item'] != NULL && $my_charz['kampf_item'] != ',,,,'){
|
||||||
|
// echo 'Problematic Entry = '.$chara_1['kampf_item'].'<br>';
|
||||||
|
$char1_buffs = mysql_fetch_assoc(mysql_query('SELECT sum(i.hp) as hp, sum(i.mp) as mp, sum(i.starke) as starke, sum(i.verteidigung) as verteidigung, sum(i.speed) as speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id IN (' . $my_charz['kampf_item'] . ')'));
|
||||||
|
}
|
||||||
|
$c_starke = $char1_buffs['starke']==0?$my_charz['starke']:($my_charz['starke']).' (+'.$char1_buffs['starke'].')';
|
||||||
|
$c_verteidigung = $char1_buffs['verteidigung']==0?$my_charz['verteidigung']:($my_charz['verteidigung']).' (+'.$char1_buffs['verteidigung'].')';
|
||||||
|
$c_speed = $char1_buffs['speed']==0?$my_charz['speed']:($my_charz['speed']).' (+'.$char1_buffs['speed'].')';
|
||||||
|
$c_ausdauer = $char1_buffs['ausdauer']==0?$my_charz['ausdauer']:($my_charz['ausdauer']).' (+'.$char1_buffs['ausdauer'].')';
|
||||||
|
$c_glueck = $char1_buffs['glueck']==0?$my_charz['glueck']:($my_charz['glueck']).' (+'.$char1_buffs['glueck'].')';
|
||||||
|
|
||||||
|
$mp = "MP: ".$mptemp['0']." / ".$mptemp['1'];
|
||||||
|
$exp = "Exp: ".$exptemp['0']." / ".$exptemp['1'];
|
||||||
|
if($my_charz['status'] == 'Frei' ){
|
||||||
|
$temp = 'Status: '.$my_charz['status'];
|
||||||
|
} elseif($my_charz['status'] == 'Angemeldet' OR $my_charz['status'] == 'Kampf erstellt') {
|
||||||
|
$temp = 'Status: '.$my_charz['status'];
|
||||||
|
} elseif($my_charz['status'] == 'Kampf') {
|
||||||
|
$kampf_a = mysql_fetch_assoc(mysql_query("SELECT dauer FROM kampf WHERE db_satz='".$my_charz['id']."' order by id DESC LIMIT 1"));
|
||||||
|
$zeit_in_sek[$char_zahl] = $kampf_a['dauer'] - time();
|
||||||
|
$temp = '<a href="index.php?as=abholen&ab='.$statustemp.'&char_id='.$my_charz['id'].'" id="popup">Status: '.$my_charz['status'].'</a><br /><span id="timer_'.$char_zahl.'"></span>';
|
||||||
|
} elseif($my_charz['status'] == 'Schatz Suche') {
|
||||||
|
$kampf_a = mysql_fetch_array(mysql_query('select Timestampdiff(Second,now(),dauer) as dauer from quests where charid = '.$my_charz['id']));
|
||||||
|
$zeit_in_sek[$char_zahl] = $kampf_a['dauer'];
|
||||||
|
$temp = '<a href="index.php?as=abholen&ab='.$statustemp.'&char_id='.$my_charz['id'].'" id="popup">Status: '.$my_charz['status'].'</a><br /><span id="timer_'.$char_zahl.'"></span>';
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
$werte = "Stärke: ".$c_starke."<br>Verteidigung: ".$c_verteidigung."<br>Geschwindigkeit: ".$c_speed."<br>Ausdauer: ".$c_ausdauer."<br>Glück: ".$c_glueck;
|
||||||
|
$lp = "<br><a href=index.php?as=lernpunkte&char_id=".$my_charz['id']." id=popup>Lernpunkte: ".$my_charz['lernpunkte']."</a>";
|
||||||
|
$tp = "<a href=index.php?as=training&char_id=".$my_charz['id']." id=popup>Trainingspunkte: ".$my_charz['training_points']."</a>".$temproom;
|
||||||
|
|
||||||
|
//$temp = $statustemp."";
|
||||||
|
$temp2 = "Level: ".$my_charz['level']."<br>Powerlevel: $POWERLEVEL5<br>Typ: ".$my_charz['type']."<br>Rasse: ".$my_charz['rasse'].$fusi.$frucht.$lp."<br>$tp<p>$hp<br>$mp<br>$exp<p>$werte";
|
||||||
|
|
||||||
|
$popup[$char_zahl] = $temp.'<br>'.'<span class=overviewcharname>'.$my_charz['name'].'</span><br>'.$temp2;
|
||||||
|
$status[$char_zahl]= $my_charz['status'];
|
||||||
|
|
||||||
|
$char_zahl++;
|
||||||
|
}
|
||||||
|
$visiblechars = 8;
|
||||||
|
|
||||||
|
for($i=$char_zahl;$i<$visiblechars;$i++){
|
||||||
|
$CHARAKTER_NAME[$i] = "Kein Charakter";
|
||||||
|
$CHARAKTER_VERWALTUNG[$i] = "none";
|
||||||
|
$CHARAKTER_LERNPUNKTE[$i] = "none";
|
||||||
|
$CHARAKTER_TRAINING[$i] = "none";
|
||||||
|
$CHARAKTER_STATUS[$i] = "none";
|
||||||
|
$CHARAKTER_SCHATZ[$i] = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$chars_bilds['0']) { $chars_bilds['0'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['1']) { $chars_bilds['1'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['2']) { $chars_bilds['2'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['3']) { $chars_bilds['3'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['4']) { $chars_bilds['4'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['5']) { $chars_bilds['5'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['6']) { $chars_bilds['6'] = "bilder/Char.gif"; }
|
||||||
|
if(!$chars_bilds['7']) { $chars_bilds['7'] = "bilder/Char.gif"; }
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table cellpadding="5" cellspacing="0" width="100%" height="0">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<count($chars) ;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='bilder/Char.gif')
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '<td width=25% valign=top id="content" align="center">';
|
||||||
|
echo '<img border="0" src="'.$chars_bilds[$i].'" width="75" height="75">';
|
||||||
|
|
||||||
|
echo '<table id="hptable"><tr>';
|
||||||
|
if($hpleft[$i] > 1)
|
||||||
|
echo '<td id="hptd" width="'.$hpleft[$i].'%"></td>';
|
||||||
|
if($hpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table>';
|
||||||
|
echo '<table id="mptable"><tr>';
|
||||||
|
if($mpleft[$i] > 1)
|
||||||
|
echo '<td id="mptd" width="'.$mpleft[$i].'%"></td>';
|
||||||
|
if($mpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table>';
|
||||||
|
|
||||||
|
echo $popup[$i].'</a></td>';
|
||||||
|
|
||||||
|
if($i==3){
|
||||||
|
echo '</tr></table><hr id="hrc"><table cellpadding="0" cellspacing="0" width="100%" height="0"><tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($status[$i] != 'Frei' AND $status[$i] != 'Angemeldet' AND $status[$i] != 'Kampf erstellt') {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
v=new Date();
|
||||||
|
var ht<?php echo $i; ?>=document.getElementById('timer_<?php echo $i;?>');
|
||||||
|
function t<?php echo $i; ?>(){
|
||||||
|
n=new Date();
|
||||||
|
s=<?php echo $zeit_in_sek[$i]; ?>-Math.round((n.getTime()-v.getTime())/1000.);
|
||||||
|
m=0;
|
||||||
|
h=0;
|
||||||
|
if(s<0){
|
||||||
|
ht<?php echo $i; ?>.innerHTML="beendet"
|
||||||
|
}else{
|
||||||
|
if(s>59){
|
||||||
|
m=Math.floor(s/60);
|
||||||
|
s=s-m*60
|
||||||
|
}
|
||||||
|
if(m>59){
|
||||||
|
h=Math.floor(m/60);
|
||||||
|
m=m-h*60
|
||||||
|
}
|
||||||
|
if(s<10){
|
||||||
|
s="0"+s
|
||||||
|
}
|
||||||
|
if(m<10){
|
||||||
|
m="0"+m
|
||||||
|
}
|
||||||
|
ht<?php echo $i; ?>.innerHTML=h+":"+m+":"+s
|
||||||
|
}
|
||||||
|
window.setTimeout('t<?php echo $i; ?>();',950);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.onload = function () {
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<count($chars) ;$i++) {
|
||||||
|
if ($status[$i] != 'Frei' AND $status[$i] != 'Angemeldet' AND $status[$i] != 'Kampf erstellt') {
|
||||||
|
?>
|
||||||
|
new t<?php echo $i; ?>();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/char.inc.php');
|
||||||
|
|
||||||
|
$char_id = validateUnsignedInteger($_REQUEST['char_id'], null);
|
||||||
|
$char = getChar($char_id);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" height="50"><?php echo $char['name']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" height="50">Kampfitems</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Helm</th>
|
||||||
|
<td>
|
||||||
|
<select><option>Nichts</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Rüstung</th>
|
||||||
|
<td>
|
||||||
|
<select><option>Nichts</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Schild</th>
|
||||||
|
<td>
|
||||||
|
<select><option>Nichts</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Schwert</th>
|
||||||
|
<td>
|
||||||
|
<select><option>Nichts</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Schuhe</th>
|
||||||
|
<td>
|
||||||
|
<select><option>Nichts</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<hr id="hrc">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" height="50">Kampfeinstellungen</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Arenakämpfe</th>
|
||||||
|
<td>
|
||||||
|
<select><option>A</option><option>B</option><option>C</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Schatzsuche</th>
|
||||||
|
<td>
|
||||||
|
<select><option>A</option><option>B</option><option>C</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Liga</th>
|
||||||
|
<td>
|
||||||
|
<select><option>A</option><option>B</option><option>C</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="left">Turniere</th>
|
||||||
|
<td>
|
||||||
|
<select><option>A</option><option>B</option><option>C</option></select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<a href="index.php?as=char_fight_settings">Kampfeinstellungen editieren</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<hr id="hrc">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<input type="submit" value="Einstellungen Speichern" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
@ -0,0 +1,161 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$clan_name = validateName($_GET['clan_name']);
|
||||||
|
$clan_pw = validateString($_GET['clan_pw']);
|
||||||
|
$poll1 = validateString($_GET['poll1']);
|
||||||
|
$poll2 = validateString('ASC');
|
||||||
|
$pagenum = validateUnsignedInteger($_GET['pagenum'], null);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$user = $user_ida;
|
||||||
|
|
||||||
|
if ($charm == 1) {
|
||||||
|
$clan = mysql_fetch_assoc(mysql_query('SELECT *, (Select 10 - count(*) from user u where clan = c.id and ((c.leader is null || c.leader != u.id) and (c.co_leader is null || c.co_leader != u.id))) as freeslots FROM clan c WHERE clanname=\''.$clan_name.'\' AND pw=\''.$clan_pw.'\''));
|
||||||
|
|
||||||
|
if (!$clan['id']) {
|
||||||
|
displayErrorMessage(NULL, 'Clanname oder Clanpasswort ist falsch!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($user['clan'] != 0) {
|
||||||
|
displayErrorMessage(NULL, 'Du bist schon in einem Clan!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($clan['freeslots'] <= 0) { // Keine Plätze mehr frei
|
||||||
|
displayErrorMessage(NULL, 'Der Clan ist voll!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_query('UPDATE user SET clan='.$clan['id'].' WHERE id='.$user_ida['id']);
|
||||||
|
|
||||||
|
displayErrorMessage(NULL, 'Du bist jetzt im '.$clan_name.' Clan', '<a href="index.php?as=clan/index">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="index.php" method="GET">
|
||||||
|
<input type="hidden" name="as" value="clan/add">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="30" valign="top" width="585" colspan="6">
|
||||||
|
<p align="center"><b>Clan Beitreten</b><p align="center"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="30" valign="center" width="296" colspan="3">
|
||||||
|
<p align="right"><b>Clanname</b></td>
|
||||||
|
<td height="30" valign="center" width="289" colspan="3">
|
||||||
|
<input name="clan_name" size=20></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="30" valign="top" width="296" colspan="3">
|
||||||
|
<p align="right"><b>Clan Passwort</b></td>
|
||||||
|
<td height="30" valign="center" width="289" colspan="3">
|
||||||
|
<input name="clan_pw" size=10> <input type=submit value="Beitreten">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!$poll1) {
|
||||||
|
$poll1 = 'clanname';
|
||||||
|
$poll2 = 'ASC';
|
||||||
|
}
|
||||||
|
if ($poll1 == 'clanname' AND $poll2 == 'ASC') {
|
||||||
|
$poll['clanname'] = 'DESC';
|
||||||
|
} else {
|
||||||
|
$poll['clanname'] = 'ASC';
|
||||||
|
}
|
||||||
|
if ($poll1 == 'leader' AND $poll2 == 'ASC') {
|
||||||
|
$poll['leader'] = 'DESC';
|
||||||
|
} else {
|
||||||
|
$poll['leader'] = 'ASC';
|
||||||
|
}
|
||||||
|
if ($poll1 == 'geld' AND $poll2 == 'ASC') {
|
||||||
|
$poll['geld'] = 'DESC';
|
||||||
|
} else {
|
||||||
|
$poll['geld'] = 'ASC';
|
||||||
|
}
|
||||||
|
$ready = 'clan/add&pagenum='.$pagenum;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="33" width="96" valign="top">
|
||||||
|
<p align="center"><b><?php echo '<a href="index.php?as='.$ready.'&poll1=clanname&poll2='.$poll['clanname'].'">Clanname</a>'; ?></b></td>
|
||||||
|
<td height="33" width="128" valign="top">
|
||||||
|
<p align="center"><b><?php echo "<a href='index.php?as=$ready&poll1=leader&poll2=$poll[leader]'>Leader</a>"; ?></b></td>
|
||||||
|
<td height="33" width="76" valign="top">
|
||||||
|
<p align="center"><b>Mitglieder</b></td>
|
||||||
|
<td height="33" width="98" valign="top">
|
||||||
|
<p align="center"><b><?php echo "<a href='index.php?as=$ready&poll1=geld&poll2=$poll[geld]'>Geld</a>"; ?></b></td>
|
||||||
|
<td height="33" width="76" valign="top">
|
||||||
|
<p align="center"><b>Info</b></td>
|
||||||
|
<td height="33" width="115" valign="top">
|
||||||
|
<p align="center"><b>Beitreten</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// TODO: Seitenzahlen ueber displayfunction funktion
|
||||||
|
|
||||||
|
if (!is_numeric($pagenum) || $pagenum <= 1) {
|
||||||
|
$pagenum = 0;
|
||||||
|
} else{
|
||||||
|
$pagenum = ($pagenum -1) * 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
$clan = mysql_Query('SELECT c.clanzeichen, c.clanname, c.geld, c.info, c.id, u.id AS uid, u.nickname FROM clan c LEFT JOIN user u ON(c.leader=u.id) ORDER BY '.$poll1.' '.$poll2.' LIMIT '.$pagenum.',20');
|
||||||
|
while ($row = mysql_fetch_array($clan)) {
|
||||||
|
$mitglieder = mysql_num_rows(mysql_query('SELECT id FROM user WHERE clan='.$row['id']));
|
||||||
|
$z_v = explode(',', $row['clanzeichen']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td height="35" width="96" valign="top">
|
||||||
|
<p align="center"><?php echo $row['clanname']; ?></td>
|
||||||
|
<td height="25" width="128" valign="top">
|
||||||
|
<p align="center"><?php echo displayUserLink($row['uid'], $row['nickname'], $z_v[0], $z_v[1]); ?></td>
|
||||||
|
<td height="25" width="76" valign="top">
|
||||||
|
<p align="center"><?php echo $mitglieder; ?></td>
|
||||||
|
<td height="25" width="98" valign="top">
|
||||||
|
<p align="center"><?php echo displayMoney($row['geld']); ?></td>
|
||||||
|
<td height="25" width="100" valign="top">
|
||||||
|
<p align="center"><?php echo '<a href="index.php?as=clan/clan_info&clan_id='.$row['id'].'">Info</a>'; ?></td>
|
||||||
|
<td height="25" width="115" valign="top">
|
||||||
|
<p align="center"><?php echo '<a href="index.php?as=nachricht&charm=1&besitzer='.$row['nickname'].'">Beitreten</a>'; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
// TODO: Seitenzahlen aus Designfunctions benutzen!!!
|
||||||
|
}
|
||||||
|
$Total = mysql_num_rows(mysql_query('SELECT id FROM clan'));
|
||||||
|
$pages = ceil($Total / 20);
|
||||||
|
|
||||||
|
$z = 1;
|
||||||
|
$i = 0;
|
||||||
|
while ($pages > $i) {
|
||||||
|
|
||||||
|
$seiten .= ' <a href="index.php?as=clan/add&pagenum='.$z.'">'.$z.'</a> ';
|
||||||
|
$z++;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="18" width="589" valign="top" colspan="6"> <b>Seite
|
||||||
|
<?php echo $seiten; ?></b></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<body bgcolor="#202020">
|
||||||
|
<?php
|
||||||
|
$clan = mysql_fetch_array(mysql_query("SELECT leader, id FROM clan WHERE id='$user_ida[clan]' LIMIT 1"));
|
||||||
|
|
||||||
|
$kampfs1 = mysql_query("SELECT * FROM clan_kampf WHERE clan1_id='$clan[id]' OR clan2_id='$clan[id]' ORDER BY id DESC LIMIT 1");
|
||||||
|
|
||||||
|
while($kampf1 = mysql_fetch_array($kampfs1)) {
|
||||||
|
|
||||||
|
$char_1 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char1]' LIMIT 1"));
|
||||||
|
$char_2 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char2]' LIMIT 1"));
|
||||||
|
|
||||||
|
$spleoic = "clan";
|
||||||
|
|
||||||
|
$starke1 = explode(",", $kampf1[starke1]);
|
||||||
|
$starke2 = explode(",", $kampf1[starke2]);
|
||||||
|
$ver1 = explode(",", $kampf1[ver1]);
|
||||||
|
$ver2 = explode(",", $kampf1[ver2]);
|
||||||
|
$speed1 = explode(",", $kampf1[speed1]);
|
||||||
|
$speed2 = explode(",", $kampf1[speed2]);
|
||||||
|
$ausdauer1 = explode(",", $kampf1[ausdauer1]);
|
||||||
|
$ausdauer2 = explode(",", $kampf1[ausdauer2]);
|
||||||
|
|
||||||
|
$schaden1 = explode(",", $kampf1[schaden1]);
|
||||||
|
$schaden2 = explode(",", $kampf1[schaden2]);
|
||||||
|
$attacke1 = explode(",", $kampf1[attacke1]);
|
||||||
|
$attacke2 = explode(",", $kampf1[attacke2]);
|
||||||
|
|
||||||
|
$hp1 = explode(",", $kampf1[hp1]);
|
||||||
|
$hp2 = explode(",", $kampf1[hp2]);
|
||||||
|
$mp1 = explode(",", $kampf1[mp1]);
|
||||||
|
$mp2 = explode(",", $kampf1[mp2]);
|
||||||
|
|
||||||
|
$a_hp1 = explode(",", $char_1[hp]);
|
||||||
|
$a_hp2 = explode(",", $char_2[hp]);
|
||||||
|
$a_mp1 = explode(",", $char_1[mp]);
|
||||||
|
$a_mp2 = explode(",", $char_2[mp]);
|
||||||
|
$runde = 1;
|
||||||
|
|
||||||
|
// TODO: include_one und danach Funktionsaufruf!!
|
||||||
|
include($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.php');
|
||||||
|
|
||||||
|
displayErrorMessage(NULL,$fehler_m,$weiter_an);
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
?>
|
@ -0,0 +1,132 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$item_id = validateUnsignedInteger($_GET['item_id'], null);
|
||||||
|
|
||||||
|
//Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
if($charm == 3)
|
||||||
|
{
|
||||||
|
$item_info = mysql_fetch_array(mysql_query("SELECT id, preis, name, anzahl FROM clan_item WHERE id='$item_id' LIMIT 1"));
|
||||||
|
$user = mysql_Fetch_array(mysql_query("SELECT leader, co_leader, geld, id FROM clan WHERE id='$user_ida[clan]'"));
|
||||||
|
|
||||||
|
if($user['leader'] != $user_ida['id'] AND $user['co_leader'] != $user_ida['id']) {
|
||||||
|
displayErrorMessage(NULL,'Nur der Leader und der Co-Leader kann Clanitems kaufen!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($user['geld'] < $item_info['preis'])
|
||||||
|
{
|
||||||
|
$fehler_m = 'Euer Clan hat nicht genug Geld';
|
||||||
|
displayErrorMessage(NULL,$fehler_m, displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$new_geld = $user[geld] - $item_info[preis];
|
||||||
|
|
||||||
|
mysql_query("UPDATE clan_item SET anzahl=anzahl-1 WHERE id=".$item_info[id]." LIMIT 1");
|
||||||
|
mysql_query("UPDATE clan SET geld='$new_geld' WHERE id=".$user[id]." LIMIT 1");
|
||||||
|
mysql_query("INSERT INTO clan_ware SET item_id='".$item_info[id]."', clan='".$user[id]."'");
|
||||||
|
|
||||||
|
$fehler_m = "$item_name[name] erfolgreich gekauft<br> <br>Geld: $user[geld] - $item_info[preis] = $new_geld";
|
||||||
|
|
||||||
|
displayErrorMessage(NULL,$fehler_m, '<a href="'.$_SERVER['PHP_SELF'].'?as=clan/c_markt">weiter</a>');
|
||||||
|
exit;
|
||||||
|
} else if($charm == 5){
|
||||||
|
$user = mysql_Fetch_array(mysql_query("SELECT leader, co_leader, geld, id FROM clan WHERE id='$user_ida[clan]'"));
|
||||||
|
|
||||||
|
if($user['leader'] != $user_ida['id'] AND $user['co_leader'] != $user_ida['id']) {
|
||||||
|
displayErrorMessage(NULL,'Nur der Leader und der Co-Leader kann Clanitems abreissen!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_query('Delete from clan_ware where clan = '.$user_ida['clan'].' and item_id = '.$item_id);
|
||||||
|
if(mysql_affected_rows() > 0){
|
||||||
|
displayErrorMessage(NULL,'Abreissen erfolgreich!', '<a href="'.$_SERVER['PHP_SELF'].'?as=clan/c_markt">weiter</a>');
|
||||||
|
} else{
|
||||||
|
displayErrorMessage(NULL,'Abreissen ist fehlgeschlagen!', displayHistoryBackLink());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!$charm)
|
||||||
|
{
|
||||||
|
if(!$oder)
|
||||||
|
{
|
||||||
|
$oder = preis;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="25">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6" align="center">Clan Markt</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="center">Item</th>
|
||||||
|
<th align="center">Kaufpreis</th>
|
||||||
|
<th align="center">Miete*</th>
|
||||||
|
<th align="center">Nutzung**</th>
|
||||||
|
<th align="center">TP-Verbrauch</th>
|
||||||
|
<th align="center">Info</th>
|
||||||
|
<th align="center">Kaufen</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$item_name = mysql_query('SELECT * FROM clan_item order by preis');
|
||||||
|
$clan_items_query = mysql_query('SELECT * FROM clan_ware where clan = '.$user_ida['clan']);
|
||||||
|
while($row = mysql_fetch_assoc($clan_items_query)){
|
||||||
|
$c_item[$row['item_id']] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while($row = mysql_fetch_array($item_name))
|
||||||
|
{
|
||||||
|
$info = '';
|
||||||
|
$info .= $row['staerke']!=0?' +'.$row['staerke'].' Str':'';
|
||||||
|
$info .= $row['verteidigung']!=0?' +'.$row['verteidigung'].' Def':'';
|
||||||
|
$info .= $row['glueck']!=0?' +'.$row['glueck'].' Lck':'';
|
||||||
|
$info .= $row['geschwindigkeit']!=0?' +'.$row['geschwindigkeit'].' Spd':'';
|
||||||
|
$info .= $row['ausdauer']!=0?' +'.$row['ausdauer'].' Aus':'';
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><?php echo $row['name']; ?></th>
|
||||||
|
<td align="center"><?php echo displayMoney($row['preis']); ?></th>
|
||||||
|
<td align="center"><?php echo displayMoney($row['miete']); ?></td>
|
||||||
|
<td align="center"><?php echo displayMoney($row['nutzung']); ?></td>
|
||||||
|
<td align="center"><?php echo displayCount($row['tp']); ?></td>
|
||||||
|
<td align="center"><?php echo $info; ?></td>
|
||||||
|
<?php
|
||||||
|
if($c_item[$row['id']] === 1){
|
||||||
|
echo '<td align="center"><a href="javascript:if(confirm(\''.$row['name'].' Wirklich abreissen?\')==true) window.location.href=\'index.php?as=clan/c_markt&charm=5&item_id='.$row['id'].'\'"><img border=0 src="design/bilder/buttons/abreissen.gif" width="42" height="19"></a></td>';
|
||||||
|
} else{
|
||||||
|
echo '<td align="center"><a href="javascript:if(confirm(\''.$row['name'].' Wirklich kaufen?\')==true) window.location.href=\'index.php?as=clan/c_markt&charm=3&item_id='.$row['id'].'\'"><img border=0 src="design/bilder/buttons/kaufen.gif" width="42" height="19"></a></td>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="692" height="25" colspan="6">* Miete wird täglich durch den Clan bezahlt und richtet sich nach der Charanzahl im Clan bei denen aktuell Clantraining eingestellt ist! (es wird mindestens für 12 Chars bezahlt)
|
||||||
|
<br>** Die Nutzungsgebühr wird durch den User pro Char bezahlt (allerdings nur wenn der Char dort trainiert und genug TP hat)</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,104 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/parse.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/designfunctions.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
|
||||||
|
//Unkritisch
|
||||||
|
$char_name = $_GET['char_name'];
|
||||||
|
$wahl = $_GET['wahl'];
|
||||||
|
|
||||||
|
if ($wahl == 'geld') {
|
||||||
|
$wahl_x = 'Geld';
|
||||||
|
} elseif ($wahl == 'siege' OR $wahl == 'niederlagen' OR $wahl == 'unentschieden') {
|
||||||
|
$wahl_x= 'Siege';
|
||||||
|
$wahl_y= 'Niederlagen';
|
||||||
|
$wahl_z= 'Unentschieden';
|
||||||
|
} else {
|
||||||
|
$wahl = 'siege';
|
||||||
|
$wahl_x= 'Siege';
|
||||||
|
$wahl_y= 'Niederlagen';
|
||||||
|
$wahl_z= 'Unentschieden';
|
||||||
|
}
|
||||||
|
|
||||||
|
$char_s = mysql_query('SELECT i.siege, i.leader, i.niederlagen, i.unentschieden, i.geld, i.clanname, i.id, u.nickname, (Select count(*) from user u1 where clan = i.id) as member, (Select 10 - count(*) from user u2 where clan = i.id and ((i.leader is null || i.leader != u2.id) and (i.co_leader is null ||i.co_leader != u2.id))) as freeslots, (select sum(spende) as summe from user_clan where clanid = i.id) as summe FROM clan i LEFT JOIN user u ON(i.leader=u.id) ORDER BY i.'.$wahl.' DESC LIMIT 50');
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td valign="middle" colspan="3">
|
||||||
|
<p align="center">
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"><br>
|
||||||
|
<input type="hidden" name="as" value="clan/c_ranglist" />
|
||||||
|
<input type="hidden" name="char_name" value="<?php echo $char_name; ?>" />
|
||||||
|
<select id="input" name="wahl">
|
||||||
|
<option value="siege">Siege
|
||||||
|
<option value="unentschieden">Unentschieden
|
||||||
|
<option value="niederlagen">Niederlagen
|
||||||
|
<option value="geld">Geld
|
||||||
|
</select>
|
||||||
|
<input id="input" type=submit value="ordnen" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td valign="middle" colspan="3" height="1">
|
||||||
|
<p align="center"><b>
|
||||||
|
</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th valign="middle" height="25" align="center">#</th>
|
||||||
|
<th valign="middle" height="25" align="center" width="20%">Name</th>
|
||||||
|
<th valign="middle" height="25" align="center" width="20%">Leader</th>
|
||||||
|
<th valign="middle" height="25" align="center">Member</th>
|
||||||
|
<th valign="middle" height="25" align="center">Slots</th>
|
||||||
|
<?php
|
||||||
|
if ($wahl != 'geld') {
|
||||||
|
echo '<th valign="middle" height="25">'.$wahl_x.'</th>';
|
||||||
|
echo '<th valign="middle" height="25">'.$wahl_z.'</th>';
|
||||||
|
echo '<th valign="middle" height="25">'.$wahl_y.'</th>';
|
||||||
|
} else {
|
||||||
|
echo '<th valign="middle" height="25">'.$wahl_x.' Aktuell</th>';
|
||||||
|
echo '<th validn="middle" height="25">'.$wahl_x.' ∑</th>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$x=1;
|
||||||
|
while($row = mysql_fetch_assoc($char_s)) {
|
||||||
|
echo '<tr>'."\n";
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.$x.'</th>'."\n";
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center"><a href="index.php?as=clan/clan_info&clan_id='.$row['id'].'">'.$row['clanname'].'</a></th>'."\n";
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayUserLink($row['leader'], $row['nickname']).'</th>'."\n";
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.$row['member'].'</th>'."\n";
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.$row['freeslots'].'</th>'."\n";
|
||||||
|
|
||||||
|
if($wahl == "geld"){
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayMoney($row[$wahl]).'</th>';
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayMoney($row['summe']).'</th>';
|
||||||
|
} else {
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayCount($row[strtolower($wahl_x)]).'</th>';
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayCount($row[strtolower($wahl_z)]).'</th>';
|
||||||
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayCount($row[strtolower($wahl_y)]).'</th>';
|
||||||
|
}
|
||||||
|
echo '</tr>'."\n";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 07.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" align="center">Clan Ticker</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th align="center" width="200">Datum</th>
|
||||||
|
<th align="center">Nachricht</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$ticks_qry = mysql_query('SELECT * FROM clan_ticker WHERE clanid ='.$user_ida['clan'].' ORDER BY `date` DESC LIMIT 20');
|
||||||
|
while($tick = mysql_fetch_assoc($ticks_qry)){
|
||||||
|
echo '<tr><td align="center">'.$tick['date'].'</td><td>'.$tick['text'].'</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 07.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$char_id = validateUnsignedInteger($_GET['char_id'], null);
|
||||||
|
$c_ware = validateUnsignedInteger($_GET['c_ware'], null);
|
||||||
|
|
||||||
|
//Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
if(!$char_id) {
|
||||||
|
include($_SERVER['DOCUMENT_ROOT'].'ag/char_index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($charm) {
|
||||||
|
mysql_query("UPDATE chars SET clan_train='$c_ware' WHERE id='$char_id' AND besitzer='$user_ida[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
$char = getChar($char_id, false);
|
||||||
|
$clan_items = mysql_query("SELECT ci.name, ci.type, cw.id, 1/(1+exp(3-$char[level]/12)) * nutzung as nutzkosten FROM clan_ware cw LEFT JOIN clan_item ci ON(cw.item_id=ci.id) WHERE cw.clan='$user_ida[clan]'");
|
||||||
|
if(!isUserOwnerOf($user_ida['id'], $char_id)){
|
||||||
|
// Legacy (Datei muss ueberarbeitet werden)
|
||||||
|
$char = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<form action="index.php" method="GET">
|
||||||
|
<input type="hidden" name="as" value="clan/c_ware" />
|
||||||
|
<input type="hidden" name="charm" value="1" />
|
||||||
|
<input type="hidden" name="char_id" value="<?php echo $char_id; ?>" />
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="127">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="31" colspan="2">
|
||||||
|
<p align="center"><b>Clan Items</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="260" valign="middle" align="center">
|
||||||
|
Raum für <?php echo $char[name] ; ?></td>
|
||||||
|
<td height="25" width="273" valign="middle">
|
||||||
|
<select id="input" name="c_ware">
|
||||||
|
<option value="0">Wähle Kampf Raum
|
||||||
|
<?php
|
||||||
|
while($row = mysql_Fetch_array($clan_items)) {
|
||||||
|
$save="";
|
||||||
|
if($row['id'] == $char['clan_train']) { $save = "Selected"; }
|
||||||
|
if($row['type'] == "Raum") {
|
||||||
|
echo "<option value='$row[id]' $save>$row[name] (".displayMoney($row['nutzkosten']).") </option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="19" width="260" valign="top"> </td>
|
||||||
|
<td height="19" width="273"> <input id="input" type=submit value="Speichern"></form></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 07.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
if(!$charm) {
|
||||||
|
displayErrorMessage(NULL,'Clan wirklich löschen?', '<a href="index.php?as=clan/del&charm=1">Ja</a> | '.displayHistoryBackLink());
|
||||||
|
}
|
||||||
|
if($charm == 1) {
|
||||||
|
$dl = mysql_fetch_array(mysql_query("SELECT id FROM clan WHERE id='$user_ida[clan]' AND leader='$user_ida[id]' LIMIT 1"));
|
||||||
|
if($dl['id']) {
|
||||||
|
mysql_query("DELETE FROM clan WHERE id='$user_ida[clan]' AND leader='$user_ida[id]' LIMIT 1");
|
||||||
|
mysql_query("DELETE FROM clan_ware WHERE clan='$dl[id]'");
|
||||||
|
|
||||||
|
mysql_query("UPDATE user SET clan=NULL WHERE clan='$user_ida[clan]' LIMIT 1");
|
||||||
|
displayErrorMessage(NULL,'Clan erfolgreich gelöscht', '<a href="index.php?as=char_index">weiter...</a>');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" width="951" height="396">
|
||||||
|
<tr>
|
||||||
|
<td width="949" height="39" colspan="2">
|
||||||
|
<p align="center"><b>$CLANNAME Info</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="28"><b> Leader:</b></td>
|
||||||
|
<td width="852" height="28"> $LEADER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="28"><b> Co Leader.</b></td>
|
||||||
|
<td width="852" height="28"> $COLEADER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="36"><b> Clanzeichen:</b></td>
|
||||||
|
<td width="852" height="36"> $CLANZEICHEN</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="28"><b> Member:</b></td>
|
||||||
|
<td width="852" height="27"> $MIN_MEMBER / $MAX_MEMBER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Level:</b></td>
|
||||||
|
<td width="852" height="24"> $LEVEL</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="33"><b> Homepage:</b></td>
|
||||||
|
<td width="852" height="32"> $HOMEPAGE</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="23"><b> Info:</b></td>
|
||||||
|
<td width="852" height="172" rowspan="2"> <textarea rows="10" cols="40" readonly>$CLAN_INFO</textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="144"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function gettemplate($template)
|
||||||
|
{
|
||||||
|
if(file_exists(''.$template.'.htm'))
|
||||||
|
{
|
||||||
|
$file = file(''.$template.'.htm');
|
||||||
|
$template = implode("",$file);
|
||||||
|
$template = str_replace("\"","\\\"",$template);
|
||||||
|
}
|
||||||
|
else $template='Das Template '.$template.' existiert nicht';
|
||||||
|
return $template;
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$user_id = validateUnsignedInteger($_GET['user_id'], null);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
if ($charm) {
|
||||||
|
$clan = mysql_fetch_array(mysql_Query("SELECT leader FROM clan WHERE id='$user_ida[clan]'"));
|
||||||
|
$kick_u = mysql_fetch_array(mysql_Query("SELECT clan, nickname FROM user WHERE id='$user_id'"));
|
||||||
|
|
||||||
|
if (($clan['leader'] == $user_ida['id']) OR ($user_id == $user_ida['id']) AND $clan['leader'] != $user_id AND $kick_u['clan'] == $user_ida['clan']) {
|
||||||
|
mysql_query("UPDATE user SET clan=NULL WHERE id='$user_id'");
|
||||||
|
mysql_query('Update chars set clan_train = 0 where besitzer = '.$user_id);
|
||||||
|
displayErrorMessage(NULL, 'User erfolgreich aus den Clan gekickt!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="69">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="18" valign="top" width="603" colspan="2">
|
||||||
|
<p align="center"><b>Clan Mitglieder</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$clan = mysql_fetch_array(mysql_Query("SELECT clanzeichen, leader FROM clan where id='$user_ida[clan]' LIMIT 1"));
|
||||||
|
if ($clan[leader] == $user_ida[id]) {
|
||||||
|
$kick = "ja";
|
||||||
|
}
|
||||||
|
$clan1 = explode(",", $clan[clanzeichen]);
|
||||||
|
if ($user_ida['clan'] != 0) {
|
||||||
|
$user = mysql_query("SELECT id, nickname FROM user WHERE clan='$user_ida[clan]' LIMIT 50");
|
||||||
|
while ($row = mysql_fetch_array($user)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" valign="top" width="161">
|
||||||
|
<p align="center"><b>Nickname</b></td>
|
||||||
|
<td height="25" valign="top" width="442"> <?php echo displayUserLink($row['id'],$row['nickname'],$clan1[0],$clan1[1]); if(($kick == "ja" OR $user_ida[id] == $row[id]) AND ($clan[leader] != $row[id])) { echo " | <b><a href='index.php?as=clan/index&charm=1&user_id=$row[id]'>kicken</a></b>"; } ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$chars = getCharsOfUser($row['id']);
|
||||||
|
foreach ($chars as $row2) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="161" valign="top">
|
||||||
|
<p align="center"><b>Charakter</b></td>
|
||||||
|
<td height="25" width="442" valign="top"> <?php echo displayCharLink($row2['id'],$row2['name'],NULL,$clan1[0],$clan1[1]); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="161" valign="top">
|
||||||
|
<p align="center"><b></b></td>
|
||||||
|
<td height="25" width="442" valign="top"></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($clan[leader] == $user_ida[id]) {
|
||||||
|
?>
|
||||||
|
<p align=center><a href="index.php?as=clan/del">Clan löschen<p></a>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
####################SSJ SPIELER 1
|
||||||
|
|
||||||
|
if ($technick1['type'] == 'SSJ') {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
if ($k_mp[0] < 0) {
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = 'SSJ-Verwandlung fehlgeschlagen';
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
$k_mp[0] = 0;
|
||||||
|
} else {
|
||||||
|
if (!$ssj_tech_1) {
|
||||||
|
$k_starke[0] = $k_starke[0] * $technick1['starke'];
|
||||||
|
$k_speed[0] = $k_speed[0] * $technick1['speed'];
|
||||||
|
$k_ver[0] = $k_ver[0] * $technick1['verteidigung'];
|
||||||
|
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = $technick1['name'];
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
$ssj_tech_1 = $technick1['level'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
####################SSJ SPIELER 2
|
||||||
|
|
||||||
|
if ($technick2['type'] == 'SSJ') {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
if ($k_mp[1] < 0) {
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = 'SSJ-Verwandlung fehlgeschlagen';
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
$k_mp[1] = 0;
|
||||||
|
} else {
|
||||||
|
if (!$ssj_tech_2) {
|
||||||
|
$k_starke[1] = $k_starke[1] * $technick2['starke'];
|
||||||
|
$k_speed[1] = $k_speed[1] * $technick2['speed'];
|
||||||
|
$k_ver[1] = $k_ver[1] * $technick2['verteidigung'];
|
||||||
|
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = $technick2['name'];
|
||||||
|
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
$ssj_tech_2 = $technick2['level'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#####################################KAMPF SYSTEM
|
||||||
|
|
||||||
|
$speed_prz_1 = $speed_char1/100;
|
||||||
|
$speed_prz_2 = $speed_char2/100;
|
||||||
|
|
||||||
|
if($speed_char1 > $speed_char2) {
|
||||||
|
if($speed_prz_1*90 >= $speed_char2) { $play1_ausweich=20; }
|
||||||
|
if($speed_prz_1*80 >= $speed_char2) { $play1_ausweich=41; }
|
||||||
|
if($speed_prz_1*70 >= $speed_char2) { $play1_ausweich=52; }
|
||||||
|
if($speed_prz_1*60 >= $speed_char2) { $play1_ausweich=63; }
|
||||||
|
if($speed_prz_1*50 >= $speed_char2) { $play1_ausweich=80; }
|
||||||
|
} else {
|
||||||
|
if($speed_prz_2*90 >= $speed_char1) { $play2_ausweich=20; }
|
||||||
|
if($speed_prz_2*80 >= $speed_char1) { $play2_ausweich=41; }
|
||||||
|
if($speed_prz_2*70 >= $speed_char1) { $play2_ausweich=52; }
|
||||||
|
if($speed_prz_2*60 >= $speed_char1) { $play2_ausweich=63; }
|
||||||
|
if($speed_prz_2*50 >= $speed_char1) { $play2_ausweich=80; }
|
||||||
|
}
|
||||||
|
$zufall_pl1=mt_rand(1,100);
|
||||||
|
$zufall_pl2=mt_rand(1,100);
|
||||||
|
?>
|
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($x > 0) {
|
||||||
|
################### PLAYER 1
|
||||||
|
|
||||||
|
$k_starke[0] = round($k_starke[0] + (($k_ausdauer[0] / 20)) - ($k_starke[0] / 50));
|
||||||
|
$k_speed[0] = round($k_speed[0] + ($k_ausdauer[0] / 10));
|
||||||
|
$k_ver[0] = round($k_ver[0] + ($k_ausdauer[0] / 10));
|
||||||
|
$k_ausdauer[0] = round($k_ausdauer[0] - ($k_ausdauer[0] / 20));
|
||||||
|
|
||||||
|
################### PLAYER 2
|
||||||
|
|
||||||
|
$k_starke[1] = round($k_starke[1] + (($k_ausdauer[1] / 20)) - ($k_starke[1] / 50));
|
||||||
|
$k_speed[1] = round($k_speed[1] + ($k_ausdauer[1] / 10));
|
||||||
|
$k_ver[1] = round($k_ver[1] + ($k_ausdauer[1] / 10));
|
||||||
|
$k_ausdauer[1] = round($k_ausdauer[1] - ($k_ausdauer[1] / 20));
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
####################KAMPF HP SPIELER 1
|
||||||
|
|
||||||
|
if($technick1['type'] == normal AND $technick1['hp'] > 0) {
|
||||||
|
$k_hp[0] = $k_hp[0] - $technick1[hp];
|
||||||
|
}
|
||||||
|
|
||||||
|
####################KAMPF HP SPIELER 2
|
||||||
|
|
||||||
|
if($technick2['type'] == normal AND $technick2['hp'] > 0) {
|
||||||
|
$k_hp[1] = $k_hp[1] - $technick2['hp'];
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
####################KAMPF HP SPIELER 1
|
||||||
|
if ($speeds_char1 >= $speeds_char2) {
|
||||||
|
if ($technick1['type'] == 'hp') {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
if ($k_mp[0] < 0) {
|
||||||
|
$k_mp[0] = 0;
|
||||||
|
} else {
|
||||||
|
$k_hp[0] = $k_hp[0] + $technick1['hp'];
|
||||||
|
if ($k_hp1[1] < $k_hp[0]) {
|
||||||
|
$k_hp[0] = $k_hp1[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = '+ ' . $technick1['hp'] . ' HP';
|
||||||
|
}
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
####################KAMPF HP SPIELER 2
|
||||||
|
|
||||||
|
if ($technick2['type'] == 'hp') {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
if ($k_mp[1] < 0) {
|
||||||
|
$k_mp[1] = 0;
|
||||||
|
} else {
|
||||||
|
$k_hp[1] = $k_hp[1] + $technick2['hp'];
|
||||||
|
if ($k_hp2[1] < $k_hp[1]) {
|
||||||
|
$k_hp[1] = $k_hp2[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = '+ '.$technick2['hp'].' HP';
|
||||||
|
}
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//KAIOKEN SPIELER 1
|
||||||
|
|
||||||
|
if($technick1['type'] == 'kaioken'){
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
$k_hp[0] = $k_hp[0] - $technick1['hp'];
|
||||||
|
if($k_mp[0] < 0) {
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = 'kaioken fehlgeschlagen';
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
$k_mp[0] = 0;
|
||||||
|
} else {
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = 'Kaioken';
|
||||||
|
$k_starke[0] = $k_starke[0] + $technick1['starke'];
|
||||||
|
$k_speed[0] = $k_speed[0] + $technick1['speed'];
|
||||||
|
$k_ver[0] = $k_ver[0] + $technick1['verteidigung'];
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//KAIOKEN SPIELER 2
|
||||||
|
|
||||||
|
if($technick2['type'] == 'kaioken') {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
$k_hp[1] = $k_hp[1] - $technick2['hp'];
|
||||||
|
if($k_mp[1] < 0) {
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = 'kaioken fehlgeschlagen';
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
$k_mp[1] = 0;
|
||||||
|
} else {
|
||||||
|
$k_starke[1] = $k_starke[1] + $technick2['starke'];
|
||||||
|
$k_speed[1] = $k_speed[1] + $technick2['speed'];
|
||||||
|
$k_ver[1] = $k_ver[1] + $technick2['verteidigung'];
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = 'kaioken';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($zufall_pl1 > $play2_ausweich) {
|
||||||
|
if (!$aktion_AV1[$x]) {
|
||||||
|
$alt_hp = $k_hp[1];
|
||||||
|
|
||||||
|
$charsa1_def = $k_ver[1] + $technick2['verteidigung'];
|
||||||
|
$charsa1_4_def = ($k_ver[1] + $technick2['verteidigung']) / 1.1;
|
||||||
|
|
||||||
|
if ($charsa1_def <= 2) {
|
||||||
|
$charsa1_def = 2;
|
||||||
|
}
|
||||||
|
if ($charsa1_4_def < 1) {
|
||||||
|
$charsa1_4_def = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$charsa1_def = mt_rand($charsa1_4_def, $charsa1_def);
|
||||||
|
|
||||||
|
$charsa1_str = $k_starke[0] * 1.8 + $technick1['starke'];
|
||||||
|
$charsa1_4_str = ($k_starke[0] * 1.8 + $technick1['starke']) + 1;
|
||||||
|
|
||||||
|
if ($charsa1_str <= 2) {
|
||||||
|
$charsa1_str = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($charsa1_4_str < 1) {
|
||||||
|
$charsa1_4_str = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$charsa1_str = mt_rand($charsa1_4_str, $charsa1_str);
|
||||||
|
|
||||||
|
$k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str +mt_rand(1, 20)));
|
||||||
|
$schaden_1 = $alt_hp - $k_hp[1];
|
||||||
|
if ($alt_hp < $k_hp[1]) {
|
||||||
|
$k_hp[1] = $alt_hp;
|
||||||
|
$schaden_1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
}
|
||||||
|
if ($zufall_pl2 > $play1_ausweich) {
|
||||||
|
if (!$aktion_AV2[$x]) {
|
||||||
|
|
||||||
|
$alt_hp = $k_hp[0];
|
||||||
|
|
||||||
|
$charsa2_def = $k_ver[0] + $technick1['verteidigung'];
|
||||||
|
$charsa2_4_def = ($k_ver[0] + $technick1['verteidigung']) / 1.1;
|
||||||
|
|
||||||
|
if ($charsa2_def <= 2) {
|
||||||
|
$charsa2_def = 2;
|
||||||
|
}
|
||||||
|
if ($charsa2_4_def < 1) {
|
||||||
|
$charsa2_4_def = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$charsa2_def = mt_rand($charsa2_4_def, $charsa2_def);
|
||||||
|
$charsa2_str = $k_starke[1] * 1.8 + $technick2['starke'];
|
||||||
|
$charsa2_4_str = ($k_starke[1] * 1.8 + $technick2['starke']) + 1;
|
||||||
|
|
||||||
|
if ($charsa1_str <= 2) {
|
||||||
|
$charsa1_str = 2;
|
||||||
|
}
|
||||||
|
if ($charsa2_4_str < 1) {
|
||||||
|
$charsa2_4_str = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$charsa2_str = mt_rand($charsa2_4_str, $charsa2_str);
|
||||||
|
|
||||||
|
$k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str +mt_rand(1, 20)));
|
||||||
|
$schaden_2 = $alt_hp - $k_hp[0];
|
||||||
|
if ($alt_hp < $k_hp[0]) {
|
||||||
|
$k_hp[0] = $alt_hp;
|
||||||
|
$schaden_2 = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$schaden_2 = "Keinen Schaden";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$technick1['name']) {
|
||||||
|
$technick1['name'] = 'Normaler Kick';
|
||||||
|
}
|
||||||
|
if (!$technick2['name']) {
|
||||||
|
$technick2['name'] = 'Normaler Kick';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($k_hp[0] < 0) {
|
||||||
|
$k_hp7[0] = 0;
|
||||||
|
} else {
|
||||||
|
$k_hp7[0] = $k_hp[0];
|
||||||
|
}
|
||||||
|
if ($k_mp[0] < 0) {
|
||||||
|
$k_mp7[0] = 0;
|
||||||
|
} else {
|
||||||
|
$k_mp7[0] = $k_mp[0];
|
||||||
|
}
|
||||||
|
if ($k_hp[1] < 0) {
|
||||||
|
$k_hp7[1] = 0;
|
||||||
|
} else {
|
||||||
|
$k_hp7[1] = $k_hp[1];
|
||||||
|
}
|
||||||
|
if ($k_mp[1] < 0) {
|
||||||
|
$k_mp7[1] = 0;
|
||||||
|
} else {
|
||||||
|
$k_mp7[1] = $k_mp[1];
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
####################KAMPF MP SPIELER 1
|
||||||
|
|
||||||
|
if ($technick1['type'] == 'normal' AND $technick1['mp'] > 0) {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
|
||||||
|
if ($k_mp[0] < 0) {
|
||||||
|
$k_hp[0] = $k_hp[0] + ($k_mp[0] * 10);
|
||||||
|
$k_mp[0] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
####################KAMPF MP SPIELER 2
|
||||||
|
|
||||||
|
if ($technick2['type'] == 'normal' AND $technick2['mp'] > 0) {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
|
||||||
|
if ($k_mp[1] < 0) {
|
||||||
|
$k_hp[1] = $k_hp[1] + ($k_mp[1] * 10);
|
||||||
|
$k_mp[1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
####################KAMPF MPV SPIELER 1
|
||||||
|
|
||||||
|
if ($technick1['type'] == 'mpv') {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick1['mp'];
|
||||||
|
if ($k_mp[1] < 0) {
|
||||||
|
$k_mp[1] = 0;
|
||||||
|
}
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
}
|
||||||
|
if ($technick2['type'] == 'mpv') {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick2['mp'];
|
||||||
|
if ($k_mp[0] < 0) {
|
||||||
|
$k_mp[0] = 0;
|
||||||
|
}
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
################### Spieler 1
|
||||||
|
$haloo1 = 95;
|
||||||
|
if ($technick1['type'] == 'tausch') {
|
||||||
|
if ($k_mp[0] >= $technick1['mp']) {
|
||||||
|
if ($haloo1 > mt_rand(1, 100)) {
|
||||||
|
|
||||||
|
$k_starke_alt[0] = $k_starke[0];
|
||||||
|
$k_speed_alt[0] = $k_speed[0];
|
||||||
|
$k_ver_alt[0] = $k_ver[0];
|
||||||
|
$k_ausdauer_alt[0] = $k_ausdauer[0];
|
||||||
|
$k_glueck_alt[0] = $k_glueck[0];
|
||||||
|
$k_hp_alt[0] = $k_hp[0];
|
||||||
|
|
||||||
|
$k_starke_alt[1] = $k_starke[1];
|
||||||
|
$k_speed_alt[1] = $k_speed[1];
|
||||||
|
$k_ver_alt[1] = $k_ver[1];
|
||||||
|
$k_ausdauer_alt[1] = $k_ausdauer[1];
|
||||||
|
$k_glueck_alt[1] = $k_glueck[1];
|
||||||
|
$k_hp_alt[1] = $k_hp[1];
|
||||||
|
|
||||||
|
$k_starke[0] = $k_starke_alt[1];
|
||||||
|
$k_speed[0] = $k_speed_alt[1];
|
||||||
|
$k_ver[0] = $k_ver_alt[1];
|
||||||
|
$k_ausdauer[0] = $k_ausdauer_alt[1];
|
||||||
|
$k_glueck[0] = $k_glueck_alt[1];
|
||||||
|
$k_hp[0] = $k_hp_alt[1];
|
||||||
|
|
||||||
|
$k_starke[1] = $k_starke_alt[0];
|
||||||
|
$k_speed[1] = $k_speed_alt[0];
|
||||||
|
$k_ver[1] = $k_ver_alt[0];
|
||||||
|
$k_ausdauer[1] = $k_ausdauer_alt[0];
|
||||||
|
$k_glueck[1] = $k_glueck_alt[0];
|
||||||
|
$k_hp[1] = $k_hp_alt[0];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = 'Körpertausch';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||||
|
$schaden_2 = 'Keinen Schaden';
|
||||||
|
$schaden_1 = 'Körpertausch fehlgeschlagen';
|
||||||
|
}
|
||||||
|
$aktion_AV1[$x] = 'nein';
|
||||||
|
}
|
||||||
|
|
||||||
|
################### Spieler 2
|
||||||
|
if ($technick2['type'] == 'tausch') {
|
||||||
|
if ($k_mp[1] >= $technick2['mp']) {
|
||||||
|
if ($haloo1 > mt_rand(1, 100)) {
|
||||||
|
|
||||||
|
$k_starke_alt[0] = $k_starke[0];
|
||||||
|
$k_speed_alt[0] = $k_speed[0];
|
||||||
|
$k_ver_alt[0] = $k_ver[0];
|
||||||
|
$k_ausdauer_alt[0] = $k_ausdauer[0];
|
||||||
|
$k_glueck_alt[0] = $k_glueck[0];
|
||||||
|
$k_hp_alt[0] = $k_hp[0];
|
||||||
|
|
||||||
|
$k_starke_alt[1] = $k_starke[1];
|
||||||
|
$k_speed_alt[1] = $k_speed[1];
|
||||||
|
$k_ver_alt[1] = $k_ver[1];
|
||||||
|
$k_ausdauer_alt[1] = $k_ausdauer[1];
|
||||||
|
$k_glueck_alt[1] = $k_glueck[1];
|
||||||
|
$k_hp_alt[1] = $k_hp[1];
|
||||||
|
|
||||||
|
$k_starke[0] = $k_starke_alt[1];
|
||||||
|
$k_speed[0] = $k_speed_alt[1];
|
||||||
|
$k_ver[0] = $k_ver_alt[1];
|
||||||
|
$k_ausdauer[0] = $k_ausdauer_alt[1];
|
||||||
|
$k_glueck[0] = $k_glueck_alt[1];
|
||||||
|
$k_hp[0] = $k_hp_alt[1];
|
||||||
|
|
||||||
|
$k_starke[1] = $k_starke_alt[0];
|
||||||
|
$k_speed[1] = $k_speed_alt[0];
|
||||||
|
$k_ver[1] = $k_ver_alt[0];
|
||||||
|
$k_ausdauer[1] = $k_ausdauer_alt[0];
|
||||||
|
$k_glueck[1] = $k_glueck_alt[0];
|
||||||
|
$k_hp[1] = $k_hp_alt[0];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = 'Körpertausch';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||||
|
$schaden_1 = 'Keinen Schaden';
|
||||||
|
$schaden_2 = 'Körpertausch fehlgeschlagen';
|
||||||
|
}
|
||||||
|
$aktion_AV2[$x] = 'nein';
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$clan_name = validateName($_GET['clan_name']);
|
||||||
|
$clan_pw = validateString($_GET['clan_pw']);
|
||||||
|
$clan_for = validateString($_GET['clan_for']);
|
||||||
|
$clan_back = validateString($_GET['clan_back']);
|
||||||
|
$clan_info = validateString($_GET['clan_info']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$user = $user_ida;
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
|
||||||
|
|
||||||
|
if ($charm == 1) {
|
||||||
|
$clanz = mysql_fetch_assoc(mysql_Query("SELECT id FROM clan ORDER BY id DESC LIMIT 1"));
|
||||||
|
$clan_upps = mysql_fetch_assoc(mysql_query("SELECT id FROM clan WHERE clanname='$clan_name' OR clanzeichen='$clan_for,$clan_back'"));
|
||||||
|
$clan_num = $clanz['id'] + 1;
|
||||||
|
|
||||||
|
if ($clan_upps[id]) {
|
||||||
|
displayErrorMessage(NULL, 'Clanname oder Clan Zeichen gibt es schon.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_pw) {
|
||||||
|
displayErrorMessage(NULL, 'Clan Passwort Eingeben!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_for AND !$clan_back) {
|
||||||
|
displayErrorMessage(NULL, 'Sie müssen ein Clanzeichen haben.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_name) {
|
||||||
|
displayErrorMessage(NULL, 'Sie müssen einen Clannamen haben.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user['clan'] != 0) {
|
||||||
|
displayErrorMessage(NULL, 'Sie haben schon einen Clan.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$clan_name = preg_replace("#<#", "<", $clan_name);
|
||||||
|
$clan_pw = preg_replace("#<#", "<", $clan_pw);
|
||||||
|
$clan_info = preg_replace("#<#", "<", $clan_info);
|
||||||
|
|
||||||
|
mysql_query("INSERT INTO clan SET clanname='$clan_name', clanzeichen='$clan_for,$clan_back', pw='$clan_pw', info='$clan_info', leader='$user_ida[id]'") OR DIE (mysql_error());
|
||||||
|
$c_id = mysql_fetch_assoc(mysql_query('Select * from clan where clanname = \''.$clan_name.'\''));
|
||||||
|
mysql_query('UPDATE user SET clan='.$c_id['id'].' WHERE id='.$user_ida['id']);
|
||||||
|
|
||||||
|
displayErrorMessage(NULL, 'Clan erfolgreich Erstellt.', '<a href="index.php?as=clan/index">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<form action="index.php" method="GET">
|
||||||
|
<input type="hidden" name="as" value="clan/new" />
|
||||||
|
<input type="hidden" name="charm" value="1" />
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="25" valign="top" width="557" colspan="2">
|
||||||
|
<p align="center"><b>Clan Gründen</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clanname</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <input name="clan_name"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clan Passwort</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <input name="clan_pw"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clanzeichen vorn</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <input name="clan_for" size=5 maxlength=10></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clanzeichen hinten</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <input name="clan_back" size=5 maxlength=10></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clan Info</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <textarea rows=5 cols=30 name="clan_info"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162"> </td>
|
||||||
|
<td height="25" width="395" valign="top"> <input type=submit value="Clan Gründen"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/messagefunctions.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$text = validateString($_REQUEST['text']);
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_REQUEST['charm'];
|
||||||
|
|
||||||
|
if($charm) {
|
||||||
|
if($user_ida['clan'] <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$clans = mysql_query('SELECT id FROM user WHERE clan='.$user_ida['clan']);
|
||||||
|
while($row = mysql_fetch_array($clans)) {
|
||||||
|
sendMessage($user_ida['nickname'], $row['id'], 'Clan Nachricht', $text);
|
||||||
|
// mysql_query("INSERT nachricht SET von='$user_ida[nickname]', besitzer='$row[id]', betreff='Clan Nachricht', text='$text'");
|
||||||
|
}
|
||||||
|
|
||||||
|
displayErrorMessage(NULL,'Nachricht erfolgreich verschickt', '<a href="index.php?as=clan/post">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
|
||||||
|
<input type="hidden" name="as" value="clan/post">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="69">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="18" valign="top" width="603" colspan="2" align="center">
|
||||||
|
<b>Nachricht an Alle clan member</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" valign="top" colspan="2" align="center"> <textarea id="input" rows="8" name="text" cols="40"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" valign="top" colspan="2" align="center"> <input id="input" type="submit" value="abschicken"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
@ -0,0 +1,193 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$new_leader = validateUnsignedInteger($_GET['new_leader'], null);
|
||||||
|
$co_leader = validateUnsignedInteger($_GET['co_leader'], null);
|
||||||
|
$clan_pw = validateString($_GET['clan_pw']);
|
||||||
|
$clan_name = validateName($_GET['clan_name']);
|
||||||
|
$clan_banner = validateURL($_GET['clan_banner']);
|
||||||
|
$clan_b = validateString($_GET['clan_b']);
|
||||||
|
$clan_page = validateString($_GET['clan_page']);
|
||||||
|
$clan_v = validateString($_GET['clan_v']);
|
||||||
|
$clan_info = validateString($_GET['clan_info']);
|
||||||
|
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$clan = mysql_fetch_assoc(mysql_query('SELECT * FROM clan WHERE id=' . $user_ida['clan'] . ' LIMIT 1'));
|
||||||
|
$clan1 = mysql_query('SELECT nickname, id FROM user WHERE clan=' . $user_ida['clan']);
|
||||||
|
$clan2 = mysql_query('SELECT nickname, id FROM user WHERE clan=' . $user_ida['clan']);
|
||||||
|
$clan_8 = explode(',', $clan['clanzeichen']);
|
||||||
|
|
||||||
|
if ($charm == 1) {
|
||||||
|
$clan_upps = mysql_fetch_assoc(mysql_query("SELECT id, (Select 10 - count(*) from user u where clan = c.id and ((c.leader is null || c.leader != u.id) and (c.co_leader is null || c.co_leader != u.id))) as freeslots FROM clan c WHERE clanname='$clan_name' OR clanzeichen='$clan_v,$clan_b' AND id!='$user_ida[clan]'"));
|
||||||
|
$cuu = mysql_fetch_assoc(mysql_query('SELECT clan FROM user WHERE id=' . $new_leader));
|
||||||
|
|
||||||
|
if ($cuu['clan'] != $user_ida['clan']) {
|
||||||
|
displayErrorMessage(NULL, 'Fehler User ist nicht im Clan.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($clan_upps['id'] AND $clan_upps['id'] != $user_ida['clan']) {
|
||||||
|
displayErrorMessage(NULL, 'Clanname oder Clan Zeichen gibt es schon.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_pw) {
|
||||||
|
displayErrorMessage(NULL, 'Clanpasswort eingeben!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_v AND !$clan_b) {
|
||||||
|
displayErrorMessage(NULL, 'Sie müssen ein Clanzeichen haben.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$clan_name) {
|
||||||
|
displayErrorMessage(NULL, 'Sie müssen einen Clanname haben.', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($clan['leader'] != $user_ida['id'] AND $clan['co_leader'] != $user_ida['id']) {
|
||||||
|
displayErrorMessage(NULL, 'Sie sind weder Leader noch Co-Leader!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check new conditions (10 Members + 1 Co + 1 Leader Slot available)
|
||||||
|
if($clan['leader'] != $clan['co_leader'] && $new_leader == $co_leader && $clan_upps['freeslots'] <= 0){
|
||||||
|
// Failure
|
||||||
|
displayErrorMessage(NULL, 'Alleinherrschaft ist leider nicht möglich, da sich zuviele User im Clan befinden!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_query("UPDATE clan SET clanname='$clan_name', clanzeichen='$clan_v,$clan_b', pw='$clan_pw', info='$clan_info', leader='$new_leader', co_leader='$co_leader', homepage='$clan_page', banner='$clan_banner' WHERE id='$user_ida[clan]'");
|
||||||
|
|
||||||
|
displayErrorMessage(NULL, 'Clan erfolgreich geändert.', '<a href="index.php?as=clan/profil">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET">
|
||||||
|
<input type="hidden" name="as" value="clan/profil">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="51">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td valign="top" colspan="2" height="32">
|
||||||
|
<p align="center"><b>Ihr Profil</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Level</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<?php echo "$clan[level]"; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Exp</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<?php echo "$clan[min_exp] / $clan[max_exp]"; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Clanname</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name="clan_name" value="<?php echo $clan[clanname]; ?>"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Passwort</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name="clan_pw" value="<?php echo $clan[pw]; ?>" size='20'></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Homepage</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name='clan_page' value="<?php echo $clan['homepage']; ?>" size='20'></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Banner (468 x 60)</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name='clan_banner' value="<?php echo $clan['banner']; ?>" size='20'></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Clanzeichen vorn</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name='clan_v' size='20' maxlength=10 value="<?php echo $clan_8[0]; ?>"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Clanzeichen hinten</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" name='clan_b' size='20' maxlength=10 value="<?php echo $clan_8[1]; ?>"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Leader</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<select id="input" name="new_leader">
|
||||||
|
<option value=""></option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$x = 0;
|
||||||
|
while ($row = mysql_fetch_array($clan1)) {
|
||||||
|
if ($row[id] == $clan[leader]) {
|
||||||
|
$selected[$x] = "selected";
|
||||||
|
}
|
||||||
|
echo "<option value=$row[id] $selected[$x]>$row[nickname]";
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b>Co. Leader</b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<select id="input" name="co_leader">
|
||||||
|
<option value=""></option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$y = 0;
|
||||||
|
while ($row = mysql_fetch_array($clan2)) {
|
||||||
|
if ($row[id] == $clan[co_leader]) {
|
||||||
|
$selecteds[$y] = "selected";
|
||||||
|
}
|
||||||
|
echo "<option value=$row[id] $selecteds[$y]>$row[nickname]";
|
||||||
|
$y++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" width="162" valign="top">
|
||||||
|
<p align="center"><b>Clan Info</b></td>
|
||||||
|
<td height="25" width="395" valign="top"> <textarea id="input" rows="5" cols="30" name="clan_info"><?php echo $clan[info]; ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="25" width="195">
|
||||||
|
<p align="center"><b></b></td>
|
||||||
|
<td valign="top" height="25" width="191">
|
||||||
|
<input id="input" type=submit value='speichern'></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,285 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
$clan_geld=validateUnsignedInteger($_GET['clan_geld'], null);
|
||||||
|
// Unkritisch
|
||||||
|
$charm=$_GET['charm'];
|
||||||
|
|
||||||
|
$mindestchar = 12;
|
||||||
|
|
||||||
|
$clan = mysql_fetch_array(mysql_query("SELECT geld FROM clan WHERE id='$user_ida[clan]' LIMIT 1"));
|
||||||
|
$user = mysql_fetch_array(mysql_Query("SELECT nickname, clan_geld, geld FROM user WHERE id='$user_ida[id]' LIMIT 1"));
|
||||||
|
|
||||||
|
if ($charm == 1) {
|
||||||
|
if($clan_geld <= 0) {
|
||||||
|
mysql_query("INSERT INTO cheater values('$user_ida[id]','Versuchte mehr weniger als 0 zu Spenden! (Eingabe:".$clan_geld.")',now())");
|
||||||
|
displayErrorMessage(NULL,'Geld darf nicht unter 0 sein!', '<a href="index.php?as=clan/spende">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
displayErrorMessage(NULL,'<p>Willst du wirklich "<strong>'.$clan_geld.'</strong> ¥" an deinen Clan spenden ?</p><p><a href="index.php?as=clan/spende&charm=2&clan_geld='.$clan_geld.'">Ja</a> | <a href="index.php?as=clan/spende">Nein</a></p>','');
|
||||||
|
exit;
|
||||||
|
} elseif($charm == 2) {
|
||||||
|
|
||||||
|
// Um Pufferueberlaeufe zu vermeiden, einfach die Laenge der Zeichenkette abfragen, ab der 8ten stelle also uerbe 99 Mio geht nicht aufeinmal!
|
||||||
|
if(strlen($clan_geld)>8) {
|
||||||
|
mysql_query("INSERT INTO cheater values('$user_ida[id]','Versuchte mehr als 99.999.999 aufeinmal zu Spenden! (Eingabe:".$clan_geld.")',now())");
|
||||||
|
displayErrorMessage(NULL,'Es kann nicht mehr als 99.999.999 aufeinmal gespendet werden!', '<a href="index.php?as=clan/spende">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($clan_geld <= 0) {
|
||||||
|
mysql_query("INSERT INTO cheater values('$user_ida[id]','Versuchte mehr weniger als 0 zu Spenden! (Eingabe:".$clan_geld.")',now())");
|
||||||
|
displayErrorMessage(NULL,'Geld darf nicht unter 0 sein!', '<a href="index.php?as=clan/spende">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Damit das minus nicht ausgenutzt wird!!
|
||||||
|
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter'));
|
||||||
|
$auktionensumme = $auktionensumme['summe'];
|
||||||
|
|
||||||
|
|
||||||
|
if($clan_geld+$auktionensumme>$user['geld']) {
|
||||||
|
displayErrorMessage(NULL,'Sie haben nicht genug Geld.', '<a href="index.php?as=clan/spende">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysql_query("UPDATE clan SET geld=geld+'$clan_geld' WHERE id='$user_ida[clan]'");
|
||||||
|
mysql_query('Update user SET geld=geld-'.$clan_geld.' WHERE id='.$user_ida['id']);
|
||||||
|
mysql_query('UPDATE user_clan SET spende = spende + '.$clan_geld.' WHERE clanid = '.$user_ida['clan'].' and userid = '.$user_ida['id']);
|
||||||
|
|
||||||
|
if(mysql_affected_rows() == 0){
|
||||||
|
mysql_query('INSERT INTO user_clan(spende,clanid,userid) values('.$clan_geld.','.$user_ida['clan'].','.$user_ida['id'].')');
|
||||||
|
}
|
||||||
|
//mysql_query("UPDATE user SET geld=geld-'$_GET[clan_geld]', clan_geld=clan_geld+'$_GET[clan_geld]' WHERE id='$user_ida[id]'");
|
||||||
|
|
||||||
|
displayErrorMessage(NULL,'An Clan Erfolgreich Gespendet', '<a href="index.php?as=clan/spende">weiter...</a>');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<head>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function show_me () {
|
||||||
|
summe = (parseInt(document.forms[0].elements["clan_geld"].value));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var aktiv;
|
||||||
|
|
||||||
|
function button_plus(feld,schritt)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
nummer=parseInt(document.forms[0].elements[feld].value)+schritt;
|
||||||
|
document.forms[0].elements[feld].value=nummer;
|
||||||
|
document.forms[0].elements["ges_lern"].value = parseInt(document.forms[0].elements["clan_geld"].value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function button_minus(feld,min,schritt)
|
||||||
|
{
|
||||||
|
if(document.forms[0].elements[feld].value>min)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
nummer=parseInt(document.forms[0].elements[feld].value)-schritt;
|
||||||
|
document.forms[0].elements[feld].value=nummer;
|
||||||
|
|
||||||
|
document.forms[0].elements["ges_lern"].value = parseInt(document.forms[0].elements["clan_geld"].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_plus(feld,schritt)
|
||||||
|
{
|
||||||
|
aktiv = setInterval("button_plus('"+feld+"',"+schritt+")",50);
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_minus(feld,min,schritt)
|
||||||
|
{
|
||||||
|
aktiv = setInterval("button_minus('"+feld+"',"+min+","+schritt+")",50);
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopp()
|
||||||
|
{
|
||||||
|
clearInterval(aktiv);
|
||||||
|
}
|
||||||
|
-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//$sql = 'select u.id, item_id, count(c.id) from clan_ware cw inner join user u on cw.clan = u.clan inner join chars c on u.id = c.besitzer where u.clan = '.$user_ida['clan'].' group by u.id, item_id';
|
||||||
|
//$sql = 'SELECT miete as mietkosten, item_id from clan_ware inner join clan_item on clan_item.id = clan_ware.item_id where clan = '.$user_ida['clan'].' group by clan';
|
||||||
|
$sql ='SELECT miete, item_id, name, clan_ware.id from clan_ware inner join clan_item on clan_item.id = clan_ware.item_id where clan = '.$user_ida['clan'].' order by item_id asc';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
$clanraum = array();
|
||||||
|
$clanraum_a = array();
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$clanraum[$row['id']] = $row;
|
||||||
|
// print_r($row);
|
||||||
|
$clanraum_a[] = $row;
|
||||||
|
}
|
||||||
|
$raumanzahl = count($clanraum_a);
|
||||||
|
//echo 'Raumanzahl = '.$raumanzahl.'<br>';
|
||||||
|
$sql = 'SELECT chars.clan_train, count(chars.id) as anzahl from chars inner join user on chars.besitzer = user.id where user.clan = '.$user_ida['clan'].' and chars.clan_train != 0 group by chars.clan_train';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
|
||||||
|
$clanrauminfo = array();
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$clanrauminfo[$row['clan_train']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//print_r($clanrauminfo);
|
||||||
|
|
||||||
|
$sql = 'select clan_ware.id as clan_warenid, user.id as userid, count(chars.id) as anzahl, clan.id as clanid from clan inner join clan_ware on clan.id = clan_ware.clan inner join clan_item on clan_item.id = clan_ware.item_id inner join user on clan.id = user.clan left join chars on user.id = chars.besitzer and clan_ware.id = chars.clan_train where clan.id = '.$user_ida['clan'].' group by userid, clan_warenid order by userid, clan_warenid';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
|
||||||
|
$user_raum = array();
|
||||||
|
// Anzahl der Chars pro Raum pro User
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$user_raum[$row['userid']][$row['clan_warenid']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//print_r($user_raum);
|
||||||
|
|
||||||
|
$clans_spend = mysql_query('SELECT spende, nickname, user.id as userid FROM user left join user_clan on user.id = user_clan.userid and user.clan = user_clan.clanid WHERE user.clan = '.$user_ida['clan'].' ORDER BY spende DESC');
|
||||||
|
$member = mysql_num_rows($clans_spend);
|
||||||
|
|
||||||
|
$sql = 'select besitzer, round(sum(1/(1+exp(3-level/12)) * nutzung)) as nutzkosten from user inner join chars on chars.besitzer = user.id inner join clan_ware on chars.clan_train = clan_ware.id inner join clan_item on clan_ware.item_id = clan_item.id where user.clan = clan_ware.clan and user.clan = '.$user_ida['clan'].' group by besitzer order by besitzer';
|
||||||
|
//echo $sql.'<br>';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
|
||||||
|
$user_nutz = array();
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$user_nutz[$row['besitzer']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//print_r($user_nutz);
|
||||||
|
|
||||||
|
$clan_kosten = 0;
|
||||||
|
$clan_untersch = 0;
|
||||||
|
|
||||||
|
for($i=0;$i<$raumanzahl;$i++){
|
||||||
|
$clan_kosten += $clanraum_a[$i]['miete']*max($mindestchar, $clanrauminfo[$clanraum_a[$i]['id']]['anzahl']);
|
||||||
|
if($clanrauminfo[$clanraum_a[$i]['id']]['anzahl'] < $mindestchar){
|
||||||
|
$clan_untersch += ($mindestchar - $clanrauminfo[$clanraum_a[$i]['id']]['anzahl']) * $clanraum_a[$i]['miete'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo 'Unterschuss: '.$clan_untersch.'<br>';
|
||||||
|
$cols = 4;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<th colspan="<?php echo $cols+$raumanzahl; ?>" align="center">Spender Liste</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Member</th>
|
||||||
|
<th>Spenden</th>
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<$raumanzahl;$i++){
|
||||||
|
echo '<th>'.$clanraum_a[$i]['name'].'</th>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th>Mietgebühren</th>
|
||||||
|
<th>Nutzungsgebühren</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="<?php echo $cols+$raumanzahl; ?>"><hr></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$summe = 0;
|
||||||
|
while($row = mysql_fetch_assoc($clans_spend)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th align="center"><?php echo $row['nickname']; ?></th>
|
||||||
|
<td align="center"><?php echo displayMoney($row['spende']); ?></td>
|
||||||
|
<?php
|
||||||
|
$summe += $row['spende'];
|
||||||
|
$costs = 0;
|
||||||
|
for($i=0;$i<$raumanzahl;$i++){
|
||||||
|
echo '<td align="center">'.$user_raum[$row['userid']][$clanraum_a[$i]['id']]['anzahl'].'</td>';
|
||||||
|
$costs += $user_raum[$row['userid']][$clanraum_a[$i]['id']]['anzahl']*$clanraum_a[$i]['miete'];
|
||||||
|
}
|
||||||
|
if($clan_untersch != 0){
|
||||||
|
echo '<td align="center">'.displayMoney($costs + ($clan_untersch/$member)).' (incl. '.displayMoney($clan_untersch/$member).')</td>';
|
||||||
|
} else{
|
||||||
|
echo '<td align="center">'.displayMoney($costs).'</td>';
|
||||||
|
}
|
||||||
|
// $checksumme += $costs + ($clan_untersch/$member);
|
||||||
|
?>
|
||||||
|
<td align="center"><?php echo displayMoney($user_nutz[$row['userid']]['nutzkosten']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th colspan="<?php echo $cols+$raumanzahl; ?>"><hr></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $member; ?> Member</th>
|
||||||
|
<th><?php
|
||||||
|
$sql = 'SELECT sum(spende) as summe FROM user_clan WHERE clanid ='.$user_ida['clan'];
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
$row_s = mysql_fetch_assoc($qry);
|
||||||
|
echo displayMoney($row_s['summe']);
|
||||||
|
?></th>
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<$raumanzahl;$i++){
|
||||||
|
if($clanrauminfo[$clanraum_a[$i]['id']]['anzahl'] < $mindestchar){
|
||||||
|
echo '<th>'.$mindestchar.' ('.$clanrauminfo[$clanraum_a[$i]['id']]['anzahl'].')</th>';
|
||||||
|
}else{
|
||||||
|
echo '<th>'.$clanrauminfo[$clanraum_a[$i]['id']]['anzahl'].'</th>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th><?php echo displayMoney($clan_kosten); ?> </th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET">
|
||||||
|
<input type="hidden" name="as" value="clan/spende">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table width="75%" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">Clan Geld Spenden (<?php echo displayMoney($clan['geld']); ?>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Dein Geld -</td>
|
||||||
|
<td align="center"><input id="input" name="ges_lern" type="text" value="0" size="15" readonly></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">Clan Geld +</td>
|
||||||
|
<td align="center">
|
||||||
|
<input id="input" name="clan_geld" type="text" value="0" size="7">
|
||||||
|
<input id="input" type="button" name="+2" value=" + " onMouseDown="start_plus('clan_geld',100);" onMouseUp="stopp();">
|
||||||
|
<input id="input" type="button" name="-2" value="-" onMouseDown="start_minus('clan_geld','0',100);" onMouseUp="stopp();">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="center"><input id="input" type=submit value="Geld Spenden"></form></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
@ -0,0 +1,191 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<body bgcolor="#202020">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$pl = 0;
|
||||||
|
$clan1 = 0;
|
||||||
|
$clan2 = 0;
|
||||||
|
$pluto = -1;
|
||||||
|
$kampf9 = mysql_Fetch_array(mysql_query("SELECT char_set, dauer, char1, char2, x_satz FROM clan_kampf WHERE db_satz='$char_id' LIMIT 1"));
|
||||||
|
$c_a1 = explode(",", $kampf9[char_set]);
|
||||||
|
|
||||||
|
if ($kampf9['dauer'] > time()) {
|
||||||
|
displayErrorMessage(NULL, 'Der Kampf ist noch nicht vorbei!', displayHistoryBackLink());
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ($pl < 3) {
|
||||||
|
$pl2 = $pl +1;
|
||||||
|
$kampf1 = mysql_Fetch_array(mysql_query("SELECT * FROM clan_kampf WHERE char1='$c_a1[$pl]' OR char2='$c_a1[$pl]' AND x_satz='$kampf9[x_satz]' LIMIT 1"));
|
||||||
|
$user = mysql_fetch_array(mysql_query("SELECT id, geld FROM user WHERE nickname='$name' LIMIT 1"));
|
||||||
|
|
||||||
|
$char_1 = getChar($kampf1['char1']);mysql_Fetch_array(mysql_query("SELECT c.name, c.hp, c.mp, c.bild, c.id, u.clan FROM chars c LEFT JOIN user u ON(c.besitzer=u.id) WHERE c.id='$kampf1[char1]' LIMIT 1"));
|
||||||
|
$char_2 = getChar($kampf1['char1']);mysql_Fetch_array(mysql_query("SELECT c.name, c.hp, c.mp, c.bild, c.id, u.clan FROM chars c LEFT JOIN user u ON(c.besitzer=u.id) WHERE c.id='$kampf1[char2]' LIMIT 1"));
|
||||||
|
|
||||||
|
$arena = mysql_Fetch_array(mysql_query("SELECT name, besitzer, history_besucher, history_geld FROM arena WHERE id='$kampf1[arena_name]' LIMIT 1"));
|
||||||
|
$my_charakter = mysql_fetch_array(mysql_Query("SELECT name, siege, niederlagen, liga_siege, liga_niederlagen, preis, dead_list, besitzer FROM chars WHERE id='$char_id' LIMIT 1"));
|
||||||
|
|
||||||
|
$starke1 = explode(",", $kampf1[starke1]);
|
||||||
|
$starke2 = explode(",", $kampf1[starke2]);
|
||||||
|
$ver1 = explode(",", $kampf1[ver1]);
|
||||||
|
$ver2 = explode(",", $kampf1[ver2]);
|
||||||
|
$speed1 = explode(",", $kampf1[speed1]);
|
||||||
|
$speed2 = explode(",", $kampf1[speed2]);
|
||||||
|
$ausdauer1 = explode(",", $kampf1[ausdauer1]);
|
||||||
|
$ausdauer2 = explode(",", $kampf1[ausdauer2]);
|
||||||
|
|
||||||
|
$schaden1 = explode(",", $kampf1[schaden1]);
|
||||||
|
$schaden2 = explode(",", $kampf1[schaden2]);
|
||||||
|
$attacke1 = explode(",", $kampf1[attacke1]);
|
||||||
|
$attacke2 = explode(",", $kampf1[attacke2]);
|
||||||
|
|
||||||
|
$hp1 = explode(",", $kampf1[hp1]);
|
||||||
|
$hp2 = explode(",", $kampf1[hp2]);
|
||||||
|
$mp1 = explode(",", $kampf1[mp1]);
|
||||||
|
$mp2 = explode(",", $kampf1[mp2]);
|
||||||
|
|
||||||
|
$a_hp1 = explode(",", $char_1[hp]);
|
||||||
|
$a_hp2 = explode(",", $char_2[hp]);
|
||||||
|
$a_mp1 = explode(",", $char_1[mp]);
|
||||||
|
$a_mp2 = explode(",", $char_2[mp]);
|
||||||
|
$runde = 1;
|
||||||
|
|
||||||
|
include ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/kampf_anzeige.php');
|
||||||
|
|
||||||
|
if ($kampf1[win] == "$char_1[name]") {
|
||||||
|
$clan1++;
|
||||||
|
}
|
||||||
|
if ($kampf1[win] == "$char_2[name]") {
|
||||||
|
$clan2++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$kampf1[db_satz]) {
|
||||||
|
$pluto++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$runde = $runde -1;
|
||||||
|
|
||||||
|
if ($kampf1[db_satz] == $char_id) {
|
||||||
|
$char_infos = mysql_fetch_Array(mysql_query("SELECT name, id, hp, mp, exp FROM chars WHERE id='$char_id' LIMIT 1"));
|
||||||
|
|
||||||
|
$alt_exp = explode(",", $char_infos[exp]);
|
||||||
|
|
||||||
|
if ($kampf1[char1] == $char_id) {
|
||||||
|
$new_exp = $alt_exp[0] + $kampf1[exp1];
|
||||||
|
$new_geld = $user[geld] + $kampf1[geld1] + $ex_geld;
|
||||||
|
$new_hp = $hp1[$runde];
|
||||||
|
$new_mp = $mp1[$runde];
|
||||||
|
if ($new_hp < 1) {
|
||||||
|
$new_hp = 1;
|
||||||
|
}
|
||||||
|
if ($new_mp < 1) {
|
||||||
|
$new_mp = 1;
|
||||||
|
}
|
||||||
|
if ($new_hp > $hp1[1]) {
|
||||||
|
$new_hp = $hp1[1];
|
||||||
|
}
|
||||||
|
if ($new_mp > $mp1[1]) {
|
||||||
|
$new_mp = $mp1[1];
|
||||||
|
}
|
||||||
|
mysql_query("UPDATE chars SET status='Frei', mp='$new_mp,$a_mp1[1]', hp='$new_hp,$a_hp1[1]', exp='$new_exp,$alt_exp[1]' WHERE id='$char_id' LIMIT 1");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$new_exp = $alt_exp[0] + $kampf1[exp2];
|
||||||
|
$new_geld = $user[geld] + $kampf1[geld2] + $ex_geld;
|
||||||
|
$new_hp = $hp2[$runde];
|
||||||
|
$new_mp = $mp2[$runde];
|
||||||
|
if ($new_hp < 1) {
|
||||||
|
$new_hp = 1;
|
||||||
|
}
|
||||||
|
if ($new_mp < 1) {
|
||||||
|
$new_mp = 1;
|
||||||
|
}
|
||||||
|
if ($new_hp > $hp2[1]) {
|
||||||
|
$new_hp = $hp2[1];
|
||||||
|
}
|
||||||
|
if ($new_mp > $mp2[1]) {
|
||||||
|
$new_mp = $mp2[1];
|
||||||
|
}
|
||||||
|
mysql_query("UPDATE chars SET status='Frei', mp='$new_mp,$a_mp2[1]', hp='$new_hp,$a_hp2[1]', exp='$new_exp,$alt_exp[1]' WHERE id='$char_id' LIMIT 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################################CHARAKTER WIN
|
||||||
|
|
||||||
|
if ($kampf1[win] == "$my_charakter[name]") {
|
||||||
|
$new_siege = $my_charakter[siege] + 1;
|
||||||
|
|
||||||
|
mysql_query("UPDATE chars SET siege='$new_siege' WHERE id='$char_id'");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
###################################################CHARAKTER LOSE
|
||||||
|
$new_niederlage = $my_charakter[niederlage] + 1;
|
||||||
|
|
||||||
|
mysql_query("UPDATE chars SET niederlage='$new_niederlage' WHERE id='$char_id'");
|
||||||
|
}
|
||||||
|
|
||||||
|
include ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/exp.php');
|
||||||
|
|
||||||
|
mysql_query("UPDATE user SET geld='$new_geld' WHERE id='$user[id]' LIMIT 1");
|
||||||
|
mysql_query("UPDATE clan_kampf SET db_satz='' WHERE db_satz='$char_id'");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$pl++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$clan_name1 = mysql_fetch_Array(mysql_query("SELECT clanname, siege, niederlagen, id FROM clan WHERE id='$char_1[clan]' LIMIT 1"));
|
||||||
|
$clan_name2 = mysql_fetch_Array(mysql_query("SELECT clanname, siege, niederlagen, id FROM clan WHERE id='$char_2[clan]' LIMIT 1"));
|
||||||
|
|
||||||
|
if ($c_a1[0] == $kampf9[char1] OR $c_a1[1] == $kampf9[char1] OR $c_a1[2] == $kampf9[char1]) {
|
||||||
|
|
||||||
|
if ($clan1 > $clan2) {
|
||||||
|
$new_siegea1 = $clan_name1[siege] + 1;
|
||||||
|
$clan_sieger = $clan_name1[clanname];
|
||||||
|
if ($pluto == -1) {
|
||||||
|
mysql_Query("UPDATE clan SET siege='$new_siegea1' WHERE id='$clan_name1[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$clan_sieger = $clan_name2[clanname];
|
||||||
|
$new_niederlage1 = $clan_name1[niederlagen] + 1;
|
||||||
|
if ($pluto == -1) {
|
||||||
|
mysql_Query("UPDATE clan SET niederlagen='$new_niederlage1' WHERE id='$clan_name1[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if ($clan1 < $clan2) {
|
||||||
|
$new_siegea1 = $clan_name2[siege] + 1;
|
||||||
|
$clan_sieger = $clan_name2[clanname];
|
||||||
|
if ($pluto == -1) {
|
||||||
|
mysql_Query("UPDATE clan SET siege='$new_siegea1' WHERE id='$clan_name2[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$clan_sieger = $clan_name1[clanname];
|
||||||
|
$new_niederlage1 = $clan_name2[niederlagen] + 1;
|
||||||
|
if ($pluto == -1) {
|
||||||
|
mysql_Query("UPDATE clan SET niederlagen='$new_niederlage1' WHERE id='$clan_name2[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($pluto == 1) {
|
||||||
|
mysql_query("DELETE FROM clan_kampf WHERE x_satz='$user_ida[clan]'");
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<p align=center>Clan Sieger: $clan_sieger";
|
||||||
|
*/
|
||||||
|
?>
|
@ -0,0 +1,221 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/erstellfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/semaphore.inc.php');
|
||||||
|
|
||||||
|
// GET-Section
|
||||||
|
// Kritisch (SQL-Injections)
|
||||||
|
// Nothing
|
||||||
|
// Unkritisch
|
||||||
|
$charm = $_GET['charm'];
|
||||||
|
$wunsch = $_GET['wunsch'];
|
||||||
|
$h_name = validateName($_GET['h_name']);
|
||||||
|
|
||||||
|
|
||||||
|
// Nicht viel aber eine große Auswirkung
|
||||||
|
function wuenscheGeld($user){
|
||||||
|
mysql_query('UPDATE user SET geld=geld+10000000 WHERE id='.$user['id']);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function wuenschePotaras($user){
|
||||||
|
mysql_query('INSERT sp_ware SET item=1, user='.$user['id']);
|
||||||
|
mysql_query('INSERT sp_ware SET item=1, user='.$user['id']);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function wuenscheTeufelsfrucht($user){
|
||||||
|
$teufelsseele = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM sp_ware WHERE item=33 AND user='.$user['id']));
|
||||||
|
|
||||||
|
if($teufelsseele['anzahl'] <= 0) {
|
||||||
|
displayErrorMessage(NULL,'Du besitzt das benötigte Item nicht!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
mysql_query('DELETE FROM sp_ware WHERE item=33 AND user='.$user['id'].' LIMIT 1');
|
||||||
|
|
||||||
|
$sum = mysql_fetch_assoc(mysql_query('SELECT sum(verteilung) as gesamt FROM wochen_markt WHERE art=\'natur\''));
|
||||||
|
if($sum['gesamt'] != 100){
|
||||||
|
displayErrorMessage(NULL,'Die Wahrscheinlichkeit eine Frucht zu bekommen entspricht nicht 100%, Melde dich bei einem der GM!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$natur_frucht = mysql_query('SELECT item, id,verteilung FROM wochen_markt WHERE art=\'natur\' order by id'); ///wieviel TF gibt es?.
|
||||||
|
$value = mt_rand(1,100);
|
||||||
|
|
||||||
|
|
||||||
|
$peak = 0;
|
||||||
|
while($row = mysql_fetch_assoc($natur_frucht)){
|
||||||
|
$peak += $row['verteilung'];
|
||||||
|
if($value <= $peak){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
displayErrorMessage(NULL,'Du hast eine '.$row['item'].' bekommen!!','');
|
||||||
|
mysql_query('INSERT wochen_ware SET item='.$row['id'].', user='.$user['id']);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function wuenscheSpecialChar($user, $specialcharname, $newname = ''){
|
||||||
|
if($specialcharname == 'Kaioshin'){
|
||||||
|
$spitem = 3;
|
||||||
|
} else if($specialcharname == 'Shichibukai'){
|
||||||
|
$spitem = 15;
|
||||||
|
} else{
|
||||||
|
displayErrorMessage(NULL,'Es koennen nur Kaioshin und Shichibukai gewünscht werden!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($newname == ''){
|
||||||
|
displayErrorMessage(NULL,'Der Name ist ungueltig!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hat der User überhaupt das Item ???
|
||||||
|
$qry = mysql_query('SELECT count(*) AS anzahl FROM sp_ware WHERE item='.$spitem.' AND user='.$user['id']);
|
||||||
|
$row = mysql_fetch_assoc($qry);
|
||||||
|
if($row['anzahl'] < 1){
|
||||||
|
// Er hat das Item garnicht!!
|
||||||
|
displayErrorMessage(NULL,'Du kannst dir einen '.$specialcharname.' nur mit dem richtigen Item wünschen!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$kaioshin = mysql_fetch_assoc(mysql_query('SELECT char_type,name from chars WHERE (rasse = \''.$specialcharname.'\' or fusion_rasse = \''.$specialcharname.'\') and besitzer='.$user['id']));
|
||||||
|
if($kaioshin != null){
|
||||||
|
displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$kaioshin['name'].' belegt!!',displayHistoryBackLink());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kleine Funktion grosse Wirkung
|
||||||
|
if(!erstelleChar($user, $specialcharname, $newname)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Slotüberprüfung beendet!
|
||||||
|
mysql_query('DELETE FROM sp_ware WHERE item='.$spitem.' AND user='.$user['id'].' LIMIT 1');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function wuenscheUserRename($user, $newname){
|
||||||
|
$sql = 'Insert into user_rename(pre_name, post_name, datum, userid, wunsch) values(\''.$user['nickname'].'\', \''.$newname.'\', now(), '.$user['id'].', 1)';
|
||||||
|
mysql_query($sql);
|
||||||
|
mysql_query('Update user set nickname = \''.$newname.'\' WHERE id = '.$user['id']);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function worker($charm,$wunsch,$user,$newname){
|
||||||
|
$ressource = 'User:'.$user['id'];
|
||||||
|
// Wichtig, die Semaphore!!
|
||||||
|
if(!semaphoreUP($ressource)){ // TRUE, diese Anfrage darf bearbeitet werden
|
||||||
|
displayErrorMessage(NULL,'Verarbeitung gerade in Gange, bitte warten...', displayHistoryBackLink());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$dragonballs = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM sp_ware WHERE user='.$user['id'].' AND item=11'));
|
||||||
|
if($dragonballs['anzahl'] < 7) {
|
||||||
|
displayErrorMessage(NULL,'Du hast keine 7 Dragonballs!!',displayHistoryBackLink());
|
||||||
|
semaphoreDown($ressource);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'DELETE FROM sp_ware WHERE item=11 AND user='.$user['id'].' LIMIT 7';
|
||||||
|
mysql_query($sql);
|
||||||
|
|
||||||
|
$result = true;
|
||||||
|
if($charm == 1) {
|
||||||
|
if($wunsch == 1) {
|
||||||
|
$result = wuenscheGeld($user);
|
||||||
|
} else if($wunsch == 2) {
|
||||||
|
$result = wuenschePotaras($user);
|
||||||
|
} else if($wunsch == 3) {
|
||||||
|
$result = wuenscheSpecialChar($user,'Kaioshin',$newname);
|
||||||
|
} else if($wunsch == 4) {
|
||||||
|
$result = wuenscheSpecialChar($user,'Shichibukai',$newname);
|
||||||
|
} else if($wunsch == 5) {
|
||||||
|
$result = wuenscheTeufelsfrucht($user);
|
||||||
|
} else if($wunsch == 6) {
|
||||||
|
$result = wuenscheUserRename($user,$newname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($result){
|
||||||
|
displayErrorMessage('Änderungen übernommen!','Dragonballs erfolgreich eingesetzt!!','<a href="index.php?as=dragonballs">weiter</a>');
|
||||||
|
} else{
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 1
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 2
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 3
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 4
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 5
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 6
|
||||||
|
mysql_query('INSERT sp_ware SET item=11, user='.$user['id']); // 7
|
||||||
|
}
|
||||||
|
semaphoreDown($ressource);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function displayWuensche($user){
|
||||||
|
$items = mysql_query('SELECT distinct(i1.id) FROM sp_ware i INNER JOIN sp_item i1 ON(i.item=i1.id) WHERE i.user='.$user['id']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
|
||||||
|
<input type="hidden" name="as" value="dragonballs">
|
||||||
|
<input type="hidden" name="charm" value="1">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<th align="center">Wünsch dir etwas</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<select id="input" name="wunsch">
|
||||||
|
<option value="1">10.000.000 ¥</option>
|
||||||
|
<option value="2">2x Potara Ohrringe</option>
|
||||||
|
<option value="6">Nutzernamen ändern</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
while($row = mysql_fetch_assoc($items)) {
|
||||||
|
if($row['id'] == 3) { ?>
|
||||||
|
<option value="3">Kaioshin befreien</option>
|
||||||
|
<?php
|
||||||
|
} else if($row['id'] == 15) { ?>
|
||||||
|
<option value="4">Shichibukai befreien</option>
|
||||||
|
<?php
|
||||||
|
} else if($row['id'] == 33) { ?>
|
||||||
|
<option value="5">Naturfrucht</option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<th align="center">
|
||||||
|
<br>Name nur bei Erschaffung von Specialchars oder Änderung des Nutzernamens
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<input id="input" name="h_name" value="" size="20"><br> <br>
|
||||||
|
<input id="input" type=submit value="Shenlong erscheine und erfülle mir meinen Wunsch!"></td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if($charm !== NULL && $wunsch !== NULL){
|
||||||
|
worker($charm, $wunsch,$user_ida,$h_name);
|
||||||
|
} else{
|
||||||
|
displayWuensche($user_ida);
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 24.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
||||||
|
$id = 3;
|
||||||
|
$user = $user_ida;
|
||||||
|
$chars = getCharsOfUser($user_ida['id']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<form>
|
||||||
|
<select id = "input" name="menu">
|
||||||
|
<option value ="-1">Charakter auswählen...</option>
|
||||||
|
<?php
|
||||||
|
foreach($chars as $row)
|
||||||
|
{
|
||||||
|
echo "<option value='$row[id]'>$row[name]>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</form>
|
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 03.10.2007
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/******************************************************************************
|
||||||
|
* Darstellen der neuen FAQ
|
||||||
|
*******************************************************************************
|
||||||
|
* Autor: Pascal Proksch
|
||||||
|
* Erstellungsdatum: 03.10.2007
|
||||||
|
* Zuletzt verändert: 03.10.2007
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
include_once "include/faq.inc.php";
|
||||||
|
$themes = getTableOfContents('<tr><###ROW###><a href="#thema_###ID###" id="content">','</a></###ROW###></tr>');
|
||||||
|
$content = getContext('<tr><th><a name="thema_###ID###" id="content">','<tr><td id="content">','</a></th></tr>','</td></tr>');
|
||||||
|
?>
|
||||||
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<th id="content">FAQ : Frequently Asked Questions (häufig gestellte Fragen) <th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
|
<?php echo $themes; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
|
<?php echo $content; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,34 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script type="text/javascript" src="java/kampfchat.js" ></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body onLoad="char($char_id1,$char_id2,$zeit_in_sek);">
|
||||||
|
<form action="" name="kampfchat" onsubmit="saveData(); return false;">
|
||||||
|
<table width="100%" height="172">
|
||||||
|
<tr>
|
||||||
|
<td width="510" height="38">
|
||||||
|
<p align="center"><div align="center" id="timer">Lädt Zeit (<a href="kampf4.php?char_id=$char_id">Lädt noch?</a>)</div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="510" height="124" valign="top">
|
||||||
|
|
||||||
|
<div id="text_inhalt">
|
||||||
|
Lädt...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="510" height="38"> <input name="textfeld" size="40" type="text">
|
||||||
|
<input type="hidden" name="char" value="$char_id" type="text">
|
||||||
|
<input type="hidden" name="user" value="$name" type="text">
|
||||||
|
<input type="submit" value="senden">
|
||||||
|
|
||||||
|
</form></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,70 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form action="?as=clan/c_kampf&id=2&kampf_id=$an" method="post">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="548" height="0">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="29" valign="top" colspan="5">
|
||||||
|
<p align="center"><b>Clan Kämpfer</b></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 1</b></td>
|
||||||
|
<td height="25" colspan="4">
|
||||||
|
<select name="char1">
|
||||||
|
$option
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 2</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char2">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 3</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char3">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 4</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char4">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 5</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char5">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 6</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char6">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td height="36" valign="top" colspan="4"> <input type="submit" value="Annehmen"></form></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="143"> </td>
|
||||||
|
<td width="151"> </td>
|
||||||
|
<td width="68"> </td>
|
||||||
|
<td width="198"> </td>
|
||||||
|
<td height="72" width="4"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,100 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script language="JavaScript" src="java/new_clan.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form action="?as=clan/c_kampf&id=1" method="post">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="548" height="412">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<td height="29" valign="top" colspan="5">
|
||||||
|
<p align="center"><b>Clan Kämpfe</b></td>
|
||||||
|
</tr>
|
||||||
|
$TABELLE
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 1</b></td>
|
||||||
|
<td height="25" colspan="4">
|
||||||
|
<select name="char1">
|
||||||
|
$option
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 2</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char2">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 3</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char3">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 4</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char4">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 5</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char5">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Charakter 6</b></td>
|
||||||
|
<td height="25" colspan="4"> <select name="char6">$option
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"><b>Clan herausfordern.</b></td>
|
||||||
|
<td height="50" colspan="4"> <select name="clan_name">
|
||||||
|
$CLAN_OPTION
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="center"> </td>
|
||||||
|
<td>
|
||||||
|
<p align="left"><b>in wievielen Tagen:</b></td>
|
||||||
|
<td height="25" valign="top" colspan="3"><b>Zeit</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
<td valign="top">
|
||||||
|
<input name="tag" size="2" value="0" maxlength="2" readonly>
|
||||||
|
<td valign="top">
|
||||||
|
<font id="uhr">$std</font>:00:00 Uhr
|
||||||
|
<td valign="top"> <input name="uhr1" value="1" type="hidden">
|
||||||
|
<p align="left">
|
||||||
|
<a href='javascript: nix()' onClick="button_plus('uhr',8);"><img src="gfx/markt/push-plus.gif" border="0"></a>
|
||||||
|
<a href='javascript: nix()' onClick="button_minus('uhr',8,$MIN);"><img src="gfx/markt/push-min.gif" border="0"></a>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td height="25"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td height="36" valign="top" colspan="4"><input type="submit" value="Herausfordern"></form></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="143"> </td>
|
||||||
|
<td width="151"> </td>
|
||||||
|
<td width="68"> </td>
|
||||||
|
<td width="198"> </td>
|
||||||
|
<td height="72" width="4"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,4 @@
|
|||||||
|
<tr>
|
||||||
|
<td height="25" valign="top" colspan="5">
|
||||||
|
<p align="center"><b>Herausforderung von $CLANNAME am $DATUM <a href=?as=clan/c_kampf&an=$CUSER&$SPECIAL>$NAMES $SPECIAL_NAME </a></b></td>
|
||||||
|
</tr>
|
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<center>
|
||||||
|
<table border="0" width="100%" height="423">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" height="39" colspan="2">
|
||||||
|
<p align="center"><b>$CLANNAME Info</b></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="948" height="52" colspan="2" align=center>
|
||||||
|
$BILD</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Leader:</b></td>
|
||||||
|
<td width="852" height="25"> $LEADER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Co Leader.</b></td>
|
||||||
|
<td width="852" height="25"> $COLEADER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Clanzeichen:</b></td>
|
||||||
|
<td width="852" height="25"> $CLANZEICHEN</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Member:</b></td>
|
||||||
|
<td width="852" height="25"> $MIN_MEMBER / $MAX_MEMBER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Level:</b></td>
|
||||||
|
<td width="852" height="25"> $LEVEL</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> Homepage:</b></td>
|
||||||
|
<td width="852" height="25"> $HOMEPAGE</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25" valign="top"><b> Info:</b></td>
|
||||||
|
<td width="852" height="25"> <textarea rows="10" cols="40" readonly>$CLAN_INFO</textarea></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="96" height="25"><b> </b></td>
|
||||||
|
<td width="852" height="25"> $back</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
function checkref() {
|
||||||
|
global $HTTP_REFERER;
|
||||||
|
if(preg_match('/^http:\/\/(animegame.animeone.info.*|animegame.de.*|www.animegame.de.*|agforum.animeone.info*)/i',$HTTP_REFERER)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
function fehler($fehler, $text) {
|
||||||
|
displayErrorMessage(NULL,$fehler, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
function gettemplate($template)
|
||||||
|
{
|
||||||
|
if(file_exists(''.$template.'.htm'))
|
||||||
|
{
|
||||||
|
$file = file(''.$template.'.htm');
|
||||||
|
$template = implode("",$file);
|
||||||
|
$template = str_replace("\"","\\\"",$template);
|
||||||
|
}
|
||||||
|
else $template='Das Template '.$template.' existiert nicht';
|
||||||
|
return $template;
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,70 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<form action="grandline_option.php?charm=1" method="post">
|
||||||
|
<table width="201" height="405" background="bilder/grandline.jpg">
|
||||||
|
<tr>
|
||||||
|
<td width="201" height="30" colspan="2">
|
||||||
|
<p align="center"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="201" height="75" colspan="2">
|
||||||
|
<p align="center">$LOGO</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="201" height="25" colspan="2">
|
||||||
|
<p align="center"><b>Crew</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="201" height="25" colspan="2">
|
||||||
|
<p align="center">$clan[clanname]</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="47" height="25"> Feld: </td>
|
||||||
|
<td width="148" height="25"> $MYFELD</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="47" height="25"> Reise:</td>
|
||||||
|
<td width="148" height="25"> <select name="reisen">
|
||||||
|
<option value="1" $REISE_SELECT1>1 Feld weiter
|
||||||
|
<option value="2" $REISE_SELECT2>2 Felder weiter
|
||||||
|
<option value="3" $REISE_SELECT3>hier warten
|
||||||
|
<option value="4" $REISE_SELECT4> Hier Schatz Suchen
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="47" height="25"> Reise2:</td>
|
||||||
|
<td width="148" height="25"> <select name="reisen2">
|
||||||
|
<option value="0" $KAMPF_SELECT2>nicht Kämpfen
|
||||||
|
<option value="1" $KAMPF_SELECT1>immer Kämpfen
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="195" height="25" colspan="2">
|
||||||
|
<p align="center"><b>Extra Option</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="47" height="25"> Heilen</td>
|
||||||
|
<td width="148" height="25">
|
||||||
|
<select name="heal">
|
||||||
|
<option value="0">Nix
|
||||||
|
<option value="1">Crew 50% Heilen
|
||||||
|
<option value="2">Crew 75% Heilen
|
||||||
|
<option value="3">Crew 100% Heilen
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="47" height="25"> </td>
|
||||||
|
<td width="148" height="25"> <input type="submit" value="Speichern"></form> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,13 @@
|
|||||||
|
<tr>
|
||||||
|
<td width="57" height="25">
|
||||||
|
<p align="center">$x</td>
|
||||||
|
<td width="95" height="25">
|
||||||
|
<p align="center">$CHARAKTER</td>
|
||||||
|
<td width="61" height="25">
|
||||||
|
<p align="center">$WIN</td>
|
||||||
|
<td width="79" height="25">
|
||||||
|
<p align="center">$LOSE</td>
|
||||||
|
<td width="56" height="25">
|
||||||
|
<p align="center"> $PUNKTE</td>
|
||||||
|
<td width="2" height="25"></td>
|
||||||
|
</tr>
|
@ -0,0 +1,20 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="gfx/markt/style.css">
|
||||||
|
</head>
|
||||||
|
<body bgcolor="#75A9E3">
|
||||||
|
|
||||||
|
<table border="0" width="250" height="54">
|
||||||
|
<tr>
|
||||||
|
<td height="27" width="245">
|
||||||
|
<p align="center"><b>$head</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="21" width="245">
|
||||||
|
<p align="left"><b>$text</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,32 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="left">
|
||||||
|
<table border="0" width="100%" height="78">
|
||||||
|
<tr>
|
||||||
|
<td width="424" height="47" colspan="7">
|
||||||
|
<p align="center"><b>Liga 1</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="57" height="25">
|
||||||
|
<p align="center">Platz</td>
|
||||||
|
<td width="95" height="25">
|
||||||
|
<p align="center">Charakter</td>
|
||||||
|
<td width="61" height="25">
|
||||||
|
<p align="center">Siege</td>
|
||||||
|
<td width="79" height="25">
|
||||||
|
<p align="center">Niederlagen</td>
|
||||||
|
<td width="56" height="25">
|
||||||
|
<p align="center"> Punkte</td>
|
||||||
|
<td width="2" height="25"></td>
|
||||||
|
</tr>
|
||||||
|
$IN_LIGA1
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,167 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Animegame Markt!</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="gfx/markt/style.css">
|
||||||
|
<script language="JavaScript" src="java/new_markt.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
<body
|
||||||
|
background="gfx/markt/back_xx.jpg" OnLoad="preis();">
|
||||||
|
<form action="markt.php" method="GET">
|
||||||
|
<input type="hidden" name="id" value="1">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><table border="0" cellpadding="0"
|
||||||
|
cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><font size="1" face="Arial"><img
|
||||||
|
src="gfx/markt/top_stor_xx.gif" width="137" height="33"></font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="136"
|
||||||
|
background="gfx/markt/storage_line.jpg"><table
|
||||||
|
border="0" width="136%">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td valign="top" width="100%"><font>
|
||||||
|
<!-- Storage -->
|
||||||
|
$STORE_ITEMS
|
||||||
|
</font>
|
||||||
|
<!-- Storage Ende-->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><img src="gfx/markt/storage_end.jpg"
|
||||||
|
width="136" height="20"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p> </p>
|
||||||
|
<p>
|
||||||
|
<!-- Preis abrechnung -->
|
||||||
|
<font><strong><p id="preis"></p> <h2><input SRC="gfx/markt/kaufen2.gif" border="0" WIDTH="90" HEIGHT="50" TYPE="image"></h2> </strong></font></p>
|
||||||
|
<p> </p>
|
||||||
|
<p> </p>
|
||||||
|
<!-- Ende Preis --->
|
||||||
|
</td>
|
||||||
|
<td valign="top"><table border="0" cellpadding="0"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="right" valign="top"><font
|
||||||
|
color="#80FF00"><strong><map name="Map">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Schuhe" shape="rect" coords="0, 0, 64, 53">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Ruestung" shape="rect" coords="64, 4, 131, 54">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Helm" shape="rect" coords="133, 3, 192, 54">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Schild" shape="rect" coords="193, 2, 252, 54">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Schwert" shape="rect" coords="253, 1, 311, 54">
|
||||||
|
<area href="?as=markt&charm=$charm&ords=Trank" shape="rect" coords="312, 4, 380, 54">
|
||||||
|
</map>
|
||||||
|
<img src="gfx/markt/typ_1.jpg"
|
||||||
|
width="383" height="55" usemap="#Map" border="0"></strong></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<!-- Kontostand -->
|
||||||
|
<font><strong>Kontostand: $GELD</strong></font>
|
||||||
|
<!-- Konto Ende-->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0"
|
||||||
|
width="376">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<map name="FPMap0">
|
||||||
|
<area href="?as=markt&charm=Dragonball&ords=$ords" shape="rect" coords="14, 2, 79, 18">
|
||||||
|
<area href="?as=markt&charm=Onepiece&ords=$ords" shape="rect" coords="93, 0, 187, 20">
|
||||||
|
</map>
|
||||||
|
<img src="gfx/markt/line_top.gif" width="376"
|
||||||
|
height="55" usemap="#FPMap0" border="0"></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 1 form des styles! -->
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="376"
|
||||||
|
background="gfx/markt/line_middl.gif"><table
|
||||||
|
border="0" cellpadding="0" cellspacing="0"
|
||||||
|
width="376">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="3%"><font
|
||||||
|
color="#DCE9D9" size="1" face="Arial"></font> </td>
|
||||||
|
<td valign="top" width="100%">
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="356">
|
||||||
|
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<!-- 1 form des styles -->
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td width="90" bgcolor="$FARBE">
|
||||||
|
<!--Items-->
|
||||||
|
<b><a href="?as=markt&charm=$charm&ords=$ords&oder=name">Item:</a></b></td><td width="47" bgcolor="#A5B197">
|
||||||
|
<!-- Typ -->
|
||||||
|
<b><a href="?as=markt&charm=$charm&ords=$ords&oder=s_type">Type:</a></b></td>
|
||||||
|
<td width="43" bgcolor="#A5B197">
|
||||||
|
<!-- Preis-->
|
||||||
|
<b><a href="?as=markt&charm=$charm&ords=$ords&oder=preis">Preise:</a></b></td><td width="40" bgcolor="#A5B197">
|
||||||
|
<!-- Anzahl -->
|
||||||
|
<b><a href="?as=markt&charm=$charm&ords=$ords&oder=anzahl">Anzahl:</a></b></td><td width="37" bgcolor="#A5B197">
|
||||||
|
<!-- Info -->
|
||||||
|
<b>Info:</td><td width="109" bgcolor="#A5B197">
|
||||||
|
<!-- Stueck -->
|
||||||
|
<b>Stück:</b>
|
||||||
|
</td></tr>
|
||||||
|
$ITEMS
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td width="90" bgcolor="">
|
||||||
|
<!--Items-->
|
||||||
|
</td><td width="47" bgcolor="">
|
||||||
|
<!-- Typ -->
|
||||||
|
</td>
|
||||||
|
<td width="43" bgcolor="">
|
||||||
|
<!-- Preis-->
|
||||||
|
</td><td width="40" bgcolor="">
|
||||||
|
<!-- Anzahl -->
|
||||||
|
</td><td width="37" bgcolor="">
|
||||||
|
<!-- Info -->
|
||||||
|
</td><td width="109" height="30" bgcolor="">
|
||||||
|
<!-- Stueck -->
|
||||||
|
<b>Seite: $seiten</b>
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td><td valign="top" width="3%"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="gfx/markt/line_end.gif" width="376"
|
||||||
|
height="23"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 362 B |
After Width: | Height: | Size: 141 B |
After Width: | Height: | Size: 782 B |
After Width: | Height: | Size: 149 B |
After Width: | Height: | Size: 152 B |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
font {
|
||||||
|
color: #DCE9D9;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
b {
|
||||||
|
font-weight: normal;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h1 a:link, h1 a:hover, h1 a:visited {
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 11px;
|
||||||
|
font-family: Arial;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
input, select, textarea
|
||||||
|
{
|
||||||
|
font-size:11px;
|
||||||
|
font-family: Tahoma;
|
||||||
|
border: 1px solid #d3d3d3;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 input
|
||||||
|
{
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link {color: black; text-decoration: none; }
|
||||||
|
a:visited {color: black; text-decoration: none; }
|
||||||
|
a:hover {color: black; text-decoration: none; }
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,22 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="gfx/markt/style.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body
|
||||||
|
background="gfx/markt/back_xx.jpg">
|
||||||
|
|
||||||
|
<table border="0" width="356" height="69">
|
||||||
|
<tr>
|
||||||
|
<td height="31" width="356">
|
||||||
|
<p align="center"><h1>$fehler</h1></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="32" width="356">
|
||||||
|
<p align="center"><h1>$link</h1></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,27 @@
|
|||||||
|
<!-- 1 form des styles -->
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td width="90" bgcolor="$FARBE">
|
||||||
|
<!--Items-->
|
||||||
|
<font>$ITEM</font></td><td width="37" bgcolor="$FARBE">
|
||||||
|
<!-- Typ -->
|
||||||
|
<font>$TYPE</font></td>
|
||||||
|
<td width="56" bgcolor="$FARBE">
|
||||||
|
<!-- Preis-->
|
||||||
|
<font>$PREIS</font></td><td width="50" bgcolor="$FARBE">
|
||||||
|
<!-- Anzahl -->
|
||||||
|
<font>$ANZAHL</font></td><td width="38" bgcolor="$FARBE">
|
||||||
|
<!-- Info -->
|
||||||
|
<font><a href='javascript:info($info_id)'>Info</a></font></td><td width="67" bgcolor="$FARBE">
|
||||||
|
<!-- Stueck -->
|
||||||
|
|
||||||
|
<input name="$ANZAHL1" type="text" value="0" size="1" maxlength="$MAXLENGTH" onkeyup="nachrechnen();">
|
||||||
|
<input name="$ITEM_ID1" type="hidden" value="$ITEM_ID" size="1" maxlength="1">
|
||||||
|
<input name="$PREIS1" type="hidden" value="$PREIS">
|
||||||
|
|
||||||
|
<a href='javascript: nix()' onClick="button_plus('$ANZAHL1',$MAXNUMBER,1,$PREIS);"><img src="gfx/markt/push-plus.gif" border="0"></a>
|
||||||
|
<a href='javascript: nix()' onClick="button_minus('$ANZAHL1',0,1,$PREIS);"><img src="gfx/markt/push-min.gif" border="0"></a>
|
||||||
|
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
|
<!-- 1 ende -->
|
@ -0,0 +1,98 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<font size="1" face="Arial">
|
||||||
|
<head>
|
||||||
|
<script language="JavaScript"
|
||||||
|
src="java/schnell_start.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
</font>
|
||||||
|
|
||||||
|
<div id="schnellbox_zu" style="position:absolute; top:0px; left:0px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="785"
|
||||||
|
bordercolor="#3B2820" style="border-collapse: collapse"
|
||||||
|
height="25">
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" width="785" height="13"><p align="center"><font
|
||||||
|
color="#DADADA" size="1" face="Arial"><b>Charakter
|
||||||
|
Schnellleiste (</b></font><a href="javascript:inix()"
|
||||||
|
onclick="ishowText(1);"><b>>>>></b></a>)</b></font></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="schnellbox_auf" style="visibility:hidden; position:absolute; top:0px; left:0px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="785"
|
||||||
|
bgcolor="#4D3C31" bordercolor="#3B2820"
|
||||||
|
style="border-collapse: collapse" height="154">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" colspan="6" width="785" height="13"><p
|
||||||
|
align="center"><font color="#DADADA" size="1"
|
||||||
|
face="Arial"><b>Charakter Schnellleiste (</b></font><a
|
||||||
|
href="javascript:inix()" onclick="ishowText(2);"><font
|
||||||
|
color="#FFFFFF" size="1" face="Arial"><b>>>>></b></font></a><font
|
||||||
|
color="#FFFFFF" size="1" face="Arial"><b>)</b></font></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial"></font><font
|
||||||
|
color="#00FF00" size="1" face="Arial"><strong>$CHARAKTER_NAME[0]</strong></font></td>
|
||||||
|
<td width="110" height="15"><font color="#00FF00"
|
||||||
|
size="1" face="Arial"><strong>$CHARAKTER_NAME[1]</strong></font></td>
|
||||||
|
<td width="110" height="15"><font color="#00FF00"
|
||||||
|
size="1" face="Arial"><strong>$CHARAKTER_NAME[2]</strong></font></td>
|
||||||
|
<td width="110" height="15"><font color="#00FF00"
|
||||||
|
size="1" face="Arial"><strong>$CHARAKTER_NAME[3]</strong></font></td>
|
||||||
|
<td width="110" height="15"><font color="#00FF00"
|
||||||
|
size="1" face="Arial"><strong>$CHARAKTER_NAME[4]</strong></font></td>
|
||||||
|
<td width="110" height="15"><font color="#00FF00"
|
||||||
|
size="1" face="Arial"><strong>$CHARAKTER_NAME[5]</strong></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[0]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[1]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[2]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[3]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[4]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_LERNPUNKTE[5]</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[0]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[1]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[2]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[3]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[4]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_VERWALTUNG[5]</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[0]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[1]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[2]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[3]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[4]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_TRAINING[5]</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[0]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[1]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[2]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[3]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[4]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_SCHATZ[5]</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[0]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[1]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[2]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[3]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[4]</font></td>
|
||||||
|
<td width="110" height="15"><font size="1" face="Arial">$CHARAKTER_STATUS[5]</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<script language="JavaScript" src="java/schnell_start.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="schnellbox_zu" style="position:absolute; top:0px; left:0px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3b2820" width="785" height="25" bgcolor="#3b2820">
|
||||||
|
<tr>
|
||||||
|
<td width="785" height="13" colspan="6">
|
||||||
|
<p align="center"><b>Charakter Schnellleiste (<a href='javascript:inix()' onClick="ishowText(1);">>>>></a>)</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="schnellbox_auf" style="visibility:hidden; position:absolute; top:0px; left:0px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3b2820" width="785" height="154" bgcolor="#3b2820">
|
||||||
|
<tr>
|
||||||
|
<td width="785" height="13" colspan="6">
|
||||||
|
<p align="center"><b>Charakter Schnellleiste (<a href='javascript:inix()' onClick="ishowText(2);">>>>></a>)</b></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_NAME[5]</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_LERNPUNKTE[5]</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_VERWALTUNG[5]</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_TRAINING[5]</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_SCHATZ[5]</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[0]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[1]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[2]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[3]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[4]</td>
|
||||||
|
<td width="110" height="15">$CHARAKTER_STATUS[5]</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 20.08.2007
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/******************************************************************************
|
||||||
|
* Dieser Skript enthaelt Funktionen fuer das versenden von Nachrichten wichtig ist
|
||||||
|
* Dabei werden die Info's ueber einen bbCode umgesetzt
|
||||||
|
*******************************************************************************
|
||||||
|
* Autor: Pascal Proksch
|
||||||
|
* Erstellungsdatum: 20.08.2007
|
||||||
|
* Zuletzt veraendert: 03.10.2007
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/db.inc.php');
|
||||||
|
|
||||||
|
function getChatMessages(){
|
||||||
|
$result = mysql_query('SELECT *, Minute(zeit) as m, Hour(zeit) as h, DAY(zeit) as d , MONTH(zeit) as mon FROM ag_chat ORDER BY ID desc');
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_array($result)) {
|
||||||
|
$h = $row[h];
|
||||||
|
if($h < 10){ $h = "0".$h;}
|
||||||
|
$m = $row[m];
|
||||||
|
if($m < 10){ $m = "0".$m;}
|
||||||
|
$resultstring = $row[d].'.'.$row[mon].' '.$h.':'.$m.' '.$row[user].': '.$row[nachricht].'<br>'.$resultstring;
|
||||||
|
}
|
||||||
|
return $resultstring;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo getChatMessages();
|
||||||
|
|
||||||
|
//$test = "Dies ist eine [b]beliebige[/b] Nachricht mit einem auktionslink [a]testlink.html[/a]";
|
||||||
|
//echo decodeMessage($test).'<br>';
|
||||||
|
|
||||||
|
//$test = '<a href="test.html">Test</a>';
|
||||||
|
//echo encodeMessage($test).'<br>';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
|
||||||
|
// Einziger Übergabewert (und der ist auch noch kritisch!!)
|
||||||
|
$page = validateUnsignedInteger($_GET['page'], null);
|
||||||
|
|
||||||
|
|
||||||
|
$online_h = mysql_fetch_array(mysql_query('SELECT * FROM online WHERE id='.($page+1)));
|
||||||
|
|
||||||
|
$row = mysql_fetch_assoc(mysql_query('Select max(id) as maximum from online'));
|
||||||
|
$maxpages = $row['maximum'];
|
||||||
|
|
||||||
|
$url = '<a href="index.php?as=h_turnier&page=###PAGE###">###LABEL###</a>';
|
||||||
|
|
||||||
|
$expl = explode(",",$online_h['turnier']);
|
||||||
|
$exp2 = explode(",",$online_h['turnier_klein']);
|
||||||
|
$exp3 = explode(",",$online_h['turnier_gross']);
|
||||||
|
$exp4 = explode(',',$online_h['liga']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="69">
|
||||||
|
<tr>
|
||||||
|
<th class="content" colspan="3">Halle der Helden aus Runde <?php echo $maxpages - $page; ?></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="39" colspan="3">Welt Turnier History</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="22" width="100" align="center">Turnier</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Sieger</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Trainier</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$x=0;
|
||||||
|
$z=1;
|
||||||
|
while($x+1 < count($exp3)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $z; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp3[$x+1]; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp3[$x+2]; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$x+=2;
|
||||||
|
$z++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="39" colspan="3">Wochen Turnier History</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="22" width="100" align="center">Turnier</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Sieger</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Trainier</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$x=0;
|
||||||
|
$z=1;
|
||||||
|
while($x+1 < count($expl)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $z; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $expl[$x+1]; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $expl[$x+2]; ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$x+=2;
|
||||||
|
$z++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="39" colspan="3">Anfänger Turnier History</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="22" width="100" align="center">Turnier</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Sieger</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Trainier</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$x=0;
|
||||||
|
$z=1;
|
||||||
|
while($x+1 < count($exp2)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $z; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp2[$x+1]; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp2[$x+2]; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$x+=2;
|
||||||
|
$z++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="39" colspan="3">Liga History</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="content" height="22" width="100" align="center">Saison</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Sieger</th>
|
||||||
|
<th class="content" height="22" width="100" align="center">Trainier</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$x=0;
|
||||||
|
$z=1;
|
||||||
|
while($x+1 < count($exp4)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $z; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp4[$x+1]; ?></td>
|
||||||
|
<td class="content" height="25" width="100" align="center"><?php echo $exp4[$x+2]; ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$x+=2;
|
||||||
|
$z++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="bottom" height="22" width="100%" colspan="3">
|
||||||
|
<table width="100%">
|
||||||
|
<?php echo displayPagelinks($page, $maxpages, $url); ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
|
||||||
|
|
||||||
|
$page = validateUnsignedInteger($_GET['page'], null);
|
||||||
|
|
||||||
|
$row = mysql_fetch_assoc(mysql_query('Select max(runde) as maximum from highscore'));
|
||||||
|
$maxpages = $row['maximum'];
|
||||||
|
|
||||||
|
$url = '<a href="index.php?as=halloffame&page=###PAGE###">###LABEL###</a>';
|
||||||
|
|
||||||
|
if(!is_numeric($page) || $page < 1){
|
||||||
|
$page = 0;
|
||||||
|
} else if($page > $maxpages){
|
||||||
|
$page = $maxpages;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Determine the importance of the Highscores (the less occurece, the more important)
|
||||||
|
$qry = mysql_query('Select count(*) as anzahl, art from highscore where runde = '.($maxpages-$page).' group by art order by anzahl,art asc');
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$events[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$qry = mysql_query('Select * from highscore where runde = '.($maxpages-$page).' order by art, datum');
|
||||||
|
|
||||||
|
|
||||||
|
echo '<table cellpadding="0" cellspacing="0" width="100%" height="69">'."\n";
|
||||||
|
echo '<tr>'."\n";
|
||||||
|
echo ' <th class="content" colspan="3">Halle der Helden aus Runde '.($maxpages - $page).'</th>'."\n";
|
||||||
|
echo '</tr>'."\n";
|
||||||
|
|
||||||
|
// Now generate the strings
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
if($old != $row['art']){
|
||||||
|
$eventhighscore[$row['art']] .= '<tr>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= ' <th class="content" height="39" colspan="3">'.$row['art'].'</th>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= '</tr>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= '<tr>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= ' <th class="content" height="22" width="100" align="center">Datum</th>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= ' <th class="content" height="22" width="100" align="center">Sieger</th>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= ' <th class="content" height="22" width="100" align="center">Trainer</th>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= '</tr>'."\n";
|
||||||
|
$old = $row['art'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$eventhighscore[$row['art']] .= '<tr>'."\n";
|
||||||
|
$eventhighscore[$row['art']] .= ' <td class="content" height="25" width="100" align="center">'.$row['datum'].'</td>'."\n";
|
||||||
|
if(!is_null($row['charid'])){
|
||||||
|
$eventhighscore[$row['art']] .= ' <td class="content" height="25" width="100" align="center">'.displayCharLink($row['charid'], $row['charname']).'</td>'."\n";
|
||||||
|
} else {
|
||||||
|
$eventhighscore[$row['art']] .= ' <td class="content" height="25" width="100" align="center">'.$row['charname'].'</td>'."\n";
|
||||||
|
}
|
||||||
|
if(!is_null($row['userid'])){
|
||||||
|
$eventhighscore[$row['art']] .= ' <td class="content" height="25" width="100" align="center">'.displayUserLink($row['userid'], $row['username']).'</td>'."\n";
|
||||||
|
} else{
|
||||||
|
$eventhighscore[$row['art']] .= ' <td class="content" height="25" width="100" align="center">'.$row['username'].'</td>'."\n";
|
||||||
|
}
|
||||||
|
$eventhighscore[$row['art']] .= '</tr>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now echo the stuff!!
|
||||||
|
for($i=0;$i<count($events);$i++){
|
||||||
|
echo $eventhighscore[$events[$i]['art']];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<tr>'."\n";
|
||||||
|
echo ' <td align="center" valign="bottom" height="22" width="100%" colspan="3">'."\n";
|
||||||
|
echo ' <table width="100%">'."\n";
|
||||||
|
echo displayPagelinks($page, $maxpages, $url);
|
||||||
|
echo ' </table>'."\n";
|
||||||
|
echo ' </td>'."\n";
|
||||||
|
echo '</tr>'."\n";
|
||||||
|
|
||||||
|
echo '</table>'."\n";
|
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/img.inc.php');
|
||||||
|
// Die möglichen Zeichen
|
||||||
|
|
||||||
|
// Einziger Übergabewert (und der ist auch noch kritisch!!)
|
||||||
|
$id = validateString($_GET['id'], null);
|
||||||
|
|
||||||
|
displayImage($id, $user_ida);
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*//*
|
||||||
|
* * Nur durch draufklicken ist das oeffnen Moeglich :D
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function encodeKrypted($string){
|
||||||
|
$returnstring = '';
|
||||||
|
for($i=0;$i<strlen($string);$i++){
|
||||||
|
$char = substr($string, $i, 1);
|
||||||
|
$char_ord = ord($char);
|
||||||
|
$returnstring .= '&#'.$char_ord.';';
|
||||||
|
}
|
||||||
|
return $returnstring;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<table width="100%" height="0" >
|
||||||
|
<tr>
|
||||||
|
<br>
|
||||||
|
<td width="562" height="0"><b><font size="4">Anschrift</font></b><p></p>
|
||||||
|
<br>
|
||||||
|
<p><?php echo encodeKrypted($GLOBALS['admin_realname']); ?><br>
|
||||||
|
<?php echo encodeKrypted($GLOBALS['admin_street']); ?><br>
|
||||||
|
<?php echo encodeKrypted($GLOBALS['admin_plz']); ?></p>
|
||||||
|
<b><font size="4">Kontakt<p></p></font></b><br>
|
||||||
|
Email: <a href="mailto:<?php echo encodeKrypted($GLOBALS['email_webmaster']); ?>"><?php echo encodeKrypted($GLOBALS['email_webmaster']); ?></a><br>
|
||||||
|
Internet: <a href="<?php echo encodeKrypted($GLOBALS['server_url_long']); ?>"><?php echo encodeKrypted($GLOBALS['server_url_long']); ?></a>
|
||||||
|
<p> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font size="4">Externe Links:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Der Inhaber übernimmt keine Haftung für externe Links. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 21.08.2007
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/awards.inc.php');
|
||||||
|
echo join('<br>'."\n", $awards);
|
||||||
|
?>
|
@ -0,0 +1,211 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/ads.inc.php');
|
||||||
|
|
||||||
|
$char_zahl = 0;
|
||||||
|
$chars = getCharsOfUser($user_ida['id']);
|
||||||
|
foreach($chars as $my_charz){
|
||||||
|
$POWERLEVEL5 = getPowerLevel($my_charz['id']);
|
||||||
|
if($my_charz['fusion']=="ja"){
|
||||||
|
$fusi = "<br>Fusionsrasse: ".$my_charz['fusion_rasse'];
|
||||||
|
} else{
|
||||||
|
$fusi = "";
|
||||||
|
}
|
||||||
|
if($my_charz['type']=="Onepiece"){
|
||||||
|
$frucht = "<br>Teufelsfrucht: ".str_replace('"','\\\'',$my_charz['frucht']);
|
||||||
|
} else{
|
||||||
|
$frucht = "";
|
||||||
|
}
|
||||||
|
$hptemp = explode(",", $my_charz['hp']);
|
||||||
|
$hpleft[$char_zahl] = $hptemp['0'] / $hptemp['1'] * 100;
|
||||||
|
$mptemp = explode(",", $my_charz['mp']);
|
||||||
|
$mpleft[$char_zahl] = $mptemp['0'] / $mptemp['1'] * 100;
|
||||||
|
$exptemp = explode(",", $my_charz['exp']);
|
||||||
|
$room = mysql_query('SELECT ci.name FROM clan_item ci inner join clan_ware cw on ci.id = cw.item_id WHERE cw.id='.$my_charz['clan_train']);
|
||||||
|
$clanroom=mysql_fetch_assoc($room);
|
||||||
|
|
||||||
|
if($clanroom['name']=="")
|
||||||
|
$clanroom['name']="kein";
|
||||||
|
|
||||||
|
$temproom="<br><a href=index.php?as=clan/c_ware&char_id=$my_charz[id] id=popup> Trainingsraum: ".$clanroom['name']."</a>";
|
||||||
|
|
||||||
|
$hp = "HP: ".$hptemp['0']." / ".$hptemp['1'];
|
||||||
|
if($my_charz['status'] == "Schatz Suche"){
|
||||||
|
$statustemp = "Schatz%20Suche";
|
||||||
|
} else{
|
||||||
|
$statustemp = $my_charz['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($my_charz['kampf_item'] != NULL && $my_charz['kampf_item'] != ',,,,'){
|
||||||
|
// echo 'Problematic Entry = '.$chara_1['kampf_item'].'<br>';
|
||||||
|
$char1_buffs = mysql_fetch_assoc(mysql_query('SELECT sum(i.hp) as hp, sum(i.mp) as mp, sum(i.starke) as starke, sum(i.verteidigung) as verteidigung, sum(i.speed) as speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id IN (' . $my_charz['kampf_item'] . ')'));
|
||||||
|
}
|
||||||
|
$c_starke = $char1_buffs['starke']==0?$my_charz['starke']:($my_charz['starke']).' (+'.$char1_buffs['starke'].')';
|
||||||
|
$c_verteidigung = $char1_buffs['verteidigung']==0?$my_charz['verteidigung']:($my_charz['verteidigung']).' (+'.$char1_buffs['verteidigung'].')';
|
||||||
|
$c_speed = $char1_buffs['speed']==0?$my_charz['speed']:($my_charz['speed']).' (+'.$char1_buffs['speed'].')';
|
||||||
|
$c_ausdauer = $char1_buffs['ausdauer']==0?$my_charz['ausdauer']:($my_charz['ausdauer']).' (+'.$char1_buffs['ausdauer'].')';
|
||||||
|
$c_glueck = $char1_buffs['glueck']==0?$my_charz['glueck']:($my_charz['glueck']).' (+'.$char1_buffs['glueck'].')';
|
||||||
|
|
||||||
|
$mp = "MP: ".$mptemp['0']." / ".$mptemp['1'];
|
||||||
|
$exp = "Exp: ".$exptemp['0']." / ".$exptemp['1'];
|
||||||
|
if($my_charz['status'] == 'Frei' ){
|
||||||
|
$temp = 'Status: '.$my_charz['status'];
|
||||||
|
$quicklink = "<hr><a href=schatz.php?char_id=$my_charz[id] id=popup>Auf Schatzsuche schicken</a><br><a href=index.php?as=char_profil&char_id=$my_charz[id] id=popup>Attacken einstellen</a>";
|
||||||
|
} else if($my_charz['status'] == 'Turnier' OR $my_charz['status'] == 'Kampf Erstellt'){
|
||||||
|
$temp = 'Status: '.$my_charz['status'];
|
||||||
|
$quicklink = '';
|
||||||
|
} else{
|
||||||
|
$temp = "<a href=index.php?as=abholen&ab=".$statustemp."&char_id=".$my_charz['id']." id=popup>Status: ".$my_charz['status']."</a>";
|
||||||
|
$quicklink = '';
|
||||||
|
}
|
||||||
|
$werte = "Stärke: ".$c_starke."<br>Verteidigung: ".$c_verteidigung."<br>Geschwindigkeit: ".$c_speed."<br>Ausdauer: ".$c_ausdauer."<br>Glück: ".$c_glueck;
|
||||||
|
$lp = "<br><a href=index.php?as=lernpunkte&char_id=".$my_charz['id']." id=popup>Lernpunkte: ".$my_charz['lernpunkte']."</a>";
|
||||||
|
$tp = "<a href=index.php?as=training&char_id=".$my_charz['id']." id=popup>Trainingspunkte: ".$my_charz['training_points']."</a>".$temproom;
|
||||||
|
|
||||||
|
//$temp = $statustemp."";
|
||||||
|
$temp2 = "Level: ".$my_charz['level']."<br>Powerlevel: $POWERLEVEL5<br>Typ: ".$my_charz['type']."<br>Rasse: ".$my_charz['rasse'].$fusi.$frucht.$lp."<br>$tp<p>$hp<br>$mp<br>$exp<p>$werte";
|
||||||
|
|
||||||
|
$popup[$char_zahl] = '<a id=popup href="#" onclick="return overlib(\'<div class="tooltip_wrap"><div><span class="status">'.$temp.'</span><p><span class="charname">'.$my_charz['name'].'</span></div><span class="pl">'.$temp2.$quicklink.'</div><br></div></div>\',NOCLOSE);" onmouseout="return nd();" class="q3">';
|
||||||
|
$chars_bilds[] = $my_charz['bild'];
|
||||||
|
$chars_names[] = $my_charz['name'];
|
||||||
|
$char_zahl++;
|
||||||
|
}
|
||||||
|
$visiblechars = 8;
|
||||||
|
|
||||||
|
for($i=$char_zahl;$i<$visiblechars;$i++){
|
||||||
|
$CHARAKTER_NAME[$i] = "Kein Charakter";
|
||||||
|
$CHARAKTER_VERWALTUNG[$i] = "none";
|
||||||
|
$CHARAKTER_LERNPUNKTE[$i] = "none";
|
||||||
|
$CHARAKTER_TRAINING[$i] = "none";
|
||||||
|
$CHARAKTER_STATUS[$i] = "none";
|
||||||
|
$CHARAKTER_SCHATZ[$i] = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
for($i=0;$i<$visiblechars;$i++){
|
||||||
|
if($chars_bilds[$i] == null) {
|
||||||
|
$chars_bilds[$i] = 'design/bilder/avatare/Char.gif';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zeige einen vertikalen Werbebanner an
|
||||||
|
echo getHorizontalAdvertisement();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="0">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<=3;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td width=25% align="center" id="content">';
|
||||||
|
echo $popup[$i].$chars_names[$i].'</a></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<=3;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td width=25% valign="top"><p align="center">';
|
||||||
|
echo $popup[$i].'<img border="0" src="'.$chars_bilds[$i].'" width="75" height="75"></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</tr><tr><td></td></tr><tr>';
|
||||||
|
for($i=0;$i<=3;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td align="center"><table id="hptable"><tr>';
|
||||||
|
if($hpleft[$i] > 1)
|
||||||
|
echo '<td id="hptd" width="'.$hpleft[$i].'%"></td>';
|
||||||
|
if($hpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '<tr><td></td></tr><tr>';
|
||||||
|
for($i=0;$i<=3;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td align="center"><table id="mptable"><tr>';
|
||||||
|
if($mpleft[$i] > 1)
|
||||||
|
echo '<td id="mptd" width="'.$mpleft[$i].'%"></td>';
|
||||||
|
if($mpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
<hr id="hrc">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="0">
|
||||||
|
<!-- MSTableType="layout" -->
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
for($i=4;$i<=7;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td width=25% align="center" id="content">';
|
||||||
|
echo $popup[$i].$chars_names[$i].'</td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
for($i=4;$i<=7;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td valign="top" width=25% align="center">';
|
||||||
|
echo $popup[$i].'<img border="0" src="'.$chars_bilds[$i].'" width="75" height="75"></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</tr><tr><td></td></tr><tr>';
|
||||||
|
for($i=4;$i<=7;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td align="center"><table id="hptable"><tr>';
|
||||||
|
if($hpleft[$i] > 1)
|
||||||
|
echo '<td id="hptd" width="'.$hpleft[$i].'%"></td>';
|
||||||
|
if($hpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '<tr><td></td></tr><tr>';
|
||||||
|
for($i=4;$i<=7;$i++)
|
||||||
|
{
|
||||||
|
if($chars_bilds[$i]!='design/bilder/avatare/Char.gif')
|
||||||
|
{
|
||||||
|
echo '<td align="center"><table id="mptable"><tr>';
|
||||||
|
if($mpleft[$i] > 1)
|
||||||
|
echo '<td id="mptd" width="'.$mpleft[$i].'%"></td>';
|
||||||
|
if($mpleft[$i] < 100)
|
||||||
|
echo '<td height=5px></td>';
|
||||||
|
echo '</tr></table></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</table>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/partner.inc.php');
|
||||||
|
echo join('<br>'."\n", $partner);
|
||||||
|
?>
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/toplists.inc.php');
|
||||||
|
?>
|
||||||
|
<div id="toplists"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function showToplists(){
|
||||||
|
document.getElementById("toplists").innerHTML = '<?php echo join('<br>', $toplist); ?>';
|
||||||
|
}
|
||||||
|
showToplists();
|
||||||
|
</script>
|
@ -0,0 +1,168 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2010 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/online.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/designfunctions.inc.php');
|
||||||
|
|
||||||
|
$itemsx1 = mysql_num_rows(mysql_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]'"));
|
||||||
|
$itemsz1 = mysql_fetch_array(mysql_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]' LIMIT 1"));
|
||||||
|
|
||||||
|
$itemsx2 = mysql_num_rows(mysql_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]'"));
|
||||||
|
$itemsz2 = mysql_fetch_array(mysql_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]' LIMIT 1"));
|
||||||
|
|
||||||
|
$anmeldungen = mysql_num_rows(mysql_Query("SELECT id FROM user"));
|
||||||
|
$db_info = mysql_num_rows(mysql_Query("SELECT id FROM sp_ware WHERE user='$user_ida[id]' AND item='11'"));
|
||||||
|
|
||||||
|
$user_info_test = mysql_Fetch_array(mysql_Query("SELECT geld FROM user WHERE nickname='$name' LIMIT 1"));
|
||||||
|
|
||||||
|
//$nnn_nn = mysql_num_rows(mysql_query("SELECT id FROM nachricht WHERE besitzer='$user_ida[id]' AND ag='neu'"));
|
||||||
|
//echo $nnn_nn;
|
||||||
|
$zeit = date("H:i:s");
|
||||||
|
$date = date("d.m.y");
|
||||||
|
$user_info_test2['geld'] = displayMoney($user_info_test['geld']);
|
||||||
|
?>
|
||||||
|
<SCRIPT language="JavaScript">
|
||||||
|
|
||||||
|
function markt(){
|
||||||
|
var Info = window.open("markt.php","","status=no,hotkeys=no,Height=500,Width=700,scrollbars=yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
</SCRIPT>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($name AND $passwort) {
|
||||||
|
|
||||||
|
$charakter_009 = "
|
||||||
|
<a href='index.php?as=char'>Charakter Erstellen</a><br>
|
||||||
|
<a href='index.php?as=char_index'>Charakter Verwaltung</a><br>
|
||||||
|
<a href='index.php?as=training'>Charakter Training</a><br>
|
||||||
|
<a href='index.php?as=info/lern'>Meine Techniken</a><br>
|
||||||
|
<a href='index.php?as=lernpunkte'>Lernpunkte</a><br>
|
||||||
|
<a href='index.php?as=schatz_suche'>Schatz Suche</a><br>
|
||||||
|
<a href='index.php?as=arena'>Arena</a><br>
|
||||||
|
<a href='index.php?as=liga_kampf_anzeige'>Meine Liga Kämpfe</a><br>
|
||||||
|
<a href='index.php?as=wanted_kampf_anzeige'>Meine Wanted Kämpfe</a><br>
|
||||||
|
";
|
||||||
|
$charakter_009 = "<a href=index.php?as=char_overview>Charakter Übersicht</a><br>".$charakter_009;
|
||||||
|
|
||||||
|
|
||||||
|
$training_009 = "";
|
||||||
|
|
||||||
|
$turnier_009 = '<a href="index.php?as=turnier&art=wochen">Wochen Turnier Anmeldung</a><br>' .
|
||||||
|
'<a href="index.php?as=turnier&art=klein">Anfänger Turnier Anmeldung</a><br>' .
|
||||||
|
'<a href="index.php?as=turnier_auswahl">Turnier Angucken</a><br>';
|
||||||
|
|
||||||
|
if ($user_ida['clan'] == 0) {
|
||||||
|
$clan_009 = "
|
||||||
|
<a href=index.php?as=clan/new>Clan Gründen</a><br>
|
||||||
|
<a href=index.php?as=clan/add>Clan Beitreten</a><br>";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<SCRIPT language="JavaScript">
|
||||||
|
|
||||||
|
function showgames(){
|
||||||
|
|
||||||
|
var Info = window.open("./clan/kampf_list.php","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
|
||||||
|
}
|
||||||
|
function pkampf(){
|
||||||
|
var Info = window.open("c_kampf_anzeige.php","","status=no,hotkeys=no,Height=600,Width=820,scrollbars=yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
</SCRIPT>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$clan_009 = "
|
||||||
|
<a href=index.php?as=clan/post>Clan Nachricht</a><br>
|
||||||
|
<a href=index.php?as=clan/c_markt>Clan Markt</a><br>
|
||||||
|
<a href=index.php?as=clan/c_ware>Clan Item Nutzung</a><br>
|
||||||
|
<a href=index.php?as=clan/profil>Clan Profil</a><br>
|
||||||
|
<a href=index.php?as=clan/c_ticker>Clan Ticker</a><br>
|
||||||
|
<a href=index.php?as=clan/index>Clan Mitglieder</a><br>
|
||||||
|
<a href=index.php?as=clan/spende>Geld Spenden</a><br>
|
||||||
|
<a href=index.php?as=clan/c_kampf&id=fights>Clan Kämpfe Anzeige</a><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ist user der leader?
|
||||||
|
$chiefs = mysql_fetch_assoc(mysql_query('Select co_leader, leader from clan where id = '.$user_ida['clan']));
|
||||||
|
if($chiefs['co_leader'] == $user_ida['id'] || $chiefs['leader'] == $user_ida['id']){
|
||||||
|
$clan_009 .= '<a href=index.php?as=clan/c_kampf>Clan Kämpfe</a><br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$info_009 = "
|
||||||
|
<a href=index.php?as=auser>Alle User</a><br>
|
||||||
|
<a href=index.php?as=info/attacken>Alle Attacken</a><br>
|
||||||
|
<a href=index.php?as=ranglist>Top 50 User</a><br>
|
||||||
|
<a href=index.php?as=clan/c_ranglist>Top 10 Clan</a><br>
|
||||||
|
<a href=index.php?as=wanted>Top 10 wanted</a><br>
|
||||||
|
<a href=index.php?as=online>Wer ist Online?</a><br>
|
||||||
|
<a href=index.php?as=liga1>Liga 1</a><br>
|
||||||
|
<a href=index.php?as=halloffame>Halle der Helden</a><br>
|
||||||
|
<a href=index.php?as=last_fight>Letzten 20 Kämpfe</a><br>";
|
||||||
|
|
||||||
|
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = ' . $user_ida[id] . ' GROUP BY bieter'));
|
||||||
|
$auktionensumme = $auktionensumme[summe];
|
||||||
|
|
||||||
|
if ($auktionensumme == 0) {
|
||||||
|
$geldstring = $user_info_test2[geld];
|
||||||
|
} else {
|
||||||
|
$geldstring = displayMoney($user_info_test['geld'] - $auktionensumme) . ' (' . $user_info_test2['geld'] . ')';
|
||||||
|
}
|
||||||
|
$points = mysql_Fetch_array(mysql_Query("SELECT pkt FROM user WHERE nickname='$name' LIMIT 1"));
|
||||||
|
$points2[pkt] = number_format($points[pkt], 0, "", ".");
|
||||||
|
$points3 = $points2[pkt];
|
||||||
|
|
||||||
|
|
||||||
|
if ($name == 'Pegasus') {
|
||||||
|
$status_009 .= "<a href='index.php?as=status'>Status</a><br>";
|
||||||
|
}
|
||||||
|
$status_009 .= "Geld: $geldstring<br>";
|
||||||
|
// $status_009 .= "IP: $points3 <br>";
|
||||||
|
|
||||||
|
|
||||||
|
$status_009 .= '<a href="index.php?as=profil">Profil</a><br>';
|
||||||
|
$status_009 .= '<a href="index.php?as=ticker">User Ticker</a><br>';
|
||||||
|
$status_009 .= '<a href="index.php?as=nachricht">User Postfach</a><br>';
|
||||||
|
|
||||||
|
$status_009 .= '<a href="index.php?as=item">Meine Items</a><br>';
|
||||||
|
$status_009 .= '<a href="javascript:markt();">Markt</a><br>';
|
||||||
|
$status_009 .= '<a href="index.php?as=auktion">Auktions Markt</a><br>';
|
||||||
|
// $status_009 .= '<a href="index.php?as=shop">Shakkys Abzockbar</a><br>';
|
||||||
|
|
||||||
|
$status_009 .= '<a href="logout.php">Logout</a><br>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$agc_009 = "
|
||||||
|
<a href=index.php?as=anmeldung>Anmeldung</a><br>
|
||||||
|
<a href=index.php?as=login>Login</a><br>
|
||||||
|
<a href=index.php?as=aktiv>Account Aktivieren</a><br>
|
||||||
|
<a href=index.php?as=pw>Passwort Vergessen?</a><br>
|
||||||
|
<a href=index.php?as=info/logs>Login Probleme?</a><br>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
$active = mysql_fetch_assoc(mysql_query('select count(*) as anzahl from user where online_zeit between TIMESTAMPADD(DAY, -7, now()) and now()'));
|
||||||
|
|
||||||
|
$o_datum = preg_split('# #',$online_rekord_1_0['datum']);
|
||||||
|
$info_019 = "
|
||||||
|
<a href=\"$GLOBALS[faq_url]\">FAQ</a><br>
|
||||||
|
<a href=\"$GLOBALS[noobguide_url]\">Anfängerguide</a><br>
|
||||||
|
<a href=index.php?as=support>AG Unterstützen</a><br>
|
||||||
|
<a href=index.php?as=info/agb target=_blank>Regeln lesen</a><br>
|
||||||
|
<a href=index.php?as=umfrage> Umfragen</a><br>
|
||||||
|
<a href=index.php?as=impressum>Impressum</a><hr id=hru>
|
||||||
|
Angemeldet: $anmeldungen <br>" .
|
||||||
|
"Aktiv: $active[anzahl]<br>
|
||||||
|
Online: $online_r<br>
|
||||||
|
Online Rekord: $online_rekord_1_0[anzahl]<br>
|
||||||
|
Am: $o_datum[0]<br>
|
||||||
|
Um: $o_datum[1] Uhr<br>";
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 12.07.2008
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function createAbholcode($charid){
|
||||||
|
$code = mt_rand(0, 44*$charid);
|
||||||
|
$code = md5($code.time());
|
||||||
|
mysql_query('DELETE from char_abholcodes where charid = '.$charid);
|
||||||
|
mysql_query('INSERT INTO char_abholcodes(charid, code) values('.$charid.', \''.$code.'\')');
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkAbholcode($charid, $code){
|
||||||
|
$code_row = mysql_fetch_assoc(mysql_query('Select * from char_abholcodes where charid = '.$charid));
|
||||||
|
if($code_row){
|
||||||
|
return $code == $code_row['code'];
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
|
||||||
|
|
||||||
|
//if($chara_1['id']) {
|
||||||
|
// $arena = mysql_fetch_array(mysql_query("SELECT id, name, ring, platz, lux, preis, level, skill, exp FROM arena WHERE besitzer='$chara_2[besitzer]' LIMIT 1"));
|
||||||
|
//} else {
|
||||||
|
// $arena = mysql_fetch_array(mysql_query("SELECT id, name, ring, platz, lux, preis, level, skill, exp FROM arena WHERE besitzer='$user_ida[id]' LIMIT 1"));
|
||||||
|
//}
|
||||||
|
//$arena_geld = ($arena['platz'] / 2) + ($arena['ring'] * 3) + ($arena['lux'] * 50);
|
||||||
|
//$arena_geld /= 4;
|
||||||
|
//
|
||||||
|
//$exp1 = explode(",",$arena[exp]);
|
||||||
|
//$exp1[0] = round($exp1[0]);
|
||||||
|
//$arena_besucher = ($arena[ring] * 3) + ($arena[lux] * 200);
|
||||||
|
//if($arena[preis] != 0){
|
||||||
|
// $arena_besucher = round($arena_besucher / ($arena[preis] / 10));
|
||||||
|
//} else{
|
||||||
|
// $arena_besucher = 1;
|
||||||
|
//}
|
||||||
|
//if($arena_besucher<0) {
|
||||||
|
//$arena_besucher = 0;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//if($arena_besucher>$arena[platz]) {
|
||||||
|
//$arena_besucher = $arena[platz];
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//$arena_einkommen = $arena_besucher * $arena[preis];
|
||||||
|
|
||||||
|
function calculateArenaData($owner_id, $char_1, $char_2, $factor){
|
||||||
|
// echo 'Berechne die Arena-Daten mit Faktor '.$factor;
|
||||||
|
$lf = 0.7; // Luxus Exponent
|
||||||
|
$kf_1 = 1/3; // Kampf Exponent a)
|
||||||
|
$kf_2 = $kf_1 * $kf_1; // Kampf Exponent b)
|
||||||
|
|
||||||
|
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena WHERE besitzer = '.$owner_id));
|
||||||
|
$wert_char1 = max(0.75,min(1.25,$char_1['siege']/($char_1['niederlagen'] + 0.01))) * getPowerLevelWithBuffs($char_1['id']);
|
||||||
|
$wert_char2 = max(0.75,min(1.25,$char_2['siege']/($char_2['niederlagen'] + 0.01))) * getPowerLevelWithBuffs($char_2['id']);
|
||||||
|
// Neue Kalkulation :)
|
||||||
|
$kampf_wert = (pow($wert_char1,$kf_1)+pow($wert_char1,$kf_2))*(pow($wert_char2,$kf_1)+pow($wert_char2,$kf_2));
|
||||||
|
// Neue Kalkulation :)
|
||||||
|
$arena_wert = pow($arena['luxus'], $lf)+log($arena['level'],4)+0.5;
|
||||||
|
|
||||||
|
$zuschauer = $kampf_wert*$arena_wert*$factor;
|
||||||
|
$z_loge = floor(0.01*$zuschauer);
|
||||||
|
$z_sitz = round(0.36*$zuschauer);
|
||||||
|
$z_steh = round($zuschauer - $z_loge - $z_sitz); // Damit auch ja keiner zu kurz kommt :D
|
||||||
|
$result['steh'] = $z_steh>$arena['steh']?$arena['steh']:$z_steh;
|
||||||
|
$result['sitz'] = $z_sitz>$arena['sitz']?$arena['sitz']:$z_sitz;
|
||||||
|
$result['loge'] = $z_loge>$arena['loge']?$arena['loge']:$z_loge;
|
||||||
|
$result['steh'] = round($result['steh']*$arena['zustand']);
|
||||||
|
$result['sitz'] = round($result['sitz']*$arena['zustand']);
|
||||||
|
$result['loge'] = round($result['loge']*$arena['zustand']);
|
||||||
|
$result['geld'] = $result['steh'] * 10 + $result['sitz'] * 60 + $result['loge'] * 3000;
|
||||||
|
$result['id'] = $arena['id'];
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateUnterhaltsKosten($arena){
|
||||||
|
return $arena['steuerlasten'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateRenovierungsKosten($arena){
|
||||||
|
return (1-$arena['zustand'])*($arena['steh']*10+$arena['sitz']*150+$arena['loge']*18000);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Die schlimmste Datei, die es derzeit im Quellcode gibt (Kommentar Hecht)
|
||||||
|
|
||||||
|
|
||||||
|
//////////////Kampf Techniken Erlaubt im kampf
|
||||||
|
$kampf_ssj = 1; /////// SSJ ist eine Art technik die werte mal setzt
|
||||||
|
$kampf_tausch = 1; /////// Tausch ist eine Art technik die alle werte vertauscht gegner und sich selbst
|
||||||
|
$kampf_hp = 2; /////// HP ist eine technik die es erlaubt sich zu Heilen
|
||||||
|
$kampf_hpmp = 1; /////// HPMP ist eine art die HP+MP erhoeht
|
||||||
|
$kampf_sprit = 1; /////// spirit ist was mit spirit stones
|
||||||
|
$kampf_spirit2 = 1; /////// spirit2 ist was mit spirit stones
|
||||||
|
$kampf_lose = 1; /////// Lose ist wie Kaioken nur das man werte verliert
|
||||||
|
$kampf_kaioken = 1; /////// Kaioken ist eine technik die werte gibt
|
||||||
|
|
||||||
|
/////////ALLE NEU
|
||||||
|
$kampf_summon = 1; /////// spirit2 ist was mit spirit stones
|
||||||
|
$kampf_gift = 1; /////// Lose ist wie Kaioken nur das man werte verliert
|
||||||
|
$kampf_schatten = 2; /////// Kaioken ist eine technik die werte gibt
|
||||||
|
$kampf_copy = 1; /////// Man Trasfert werte.
|
||||||
|
$kampf_kaioken2 = 1; //////// Man Bekommt sau viel staerke fuer 1runde
|
||||||
|
$kampf_lose2 = 1; //////// MP Wegmachen
|
||||||
|
$kampf_majin = 1; /////// Jemnand als majin machen.
|
||||||
|
$kampf_tausch2 = 3; /////// Attacke Kopieren.
|
||||||
|
|
||||||
|
|
||||||
|
$rassen_werte = array(
|
||||||
|
"Mensch", ///0
|
||||||
|
"Saiyajin", ///1
|
||||||
|
"Dämon", ///2
|
||||||
|
"Mutant", ///3
|
||||||
|
"Cyborg", ///4
|
||||||
|
"Namekianer", ///5
|
||||||
|
"Pirat", ///6
|
||||||
|
"Shichibukai", ///7
|
||||||
|
"Kaioshin", ///8
|
||||||
|
"Schwertkämpfer", ///9
|
||||||
|
"Grandline Maschine", ///10
|
||||||
|
"01", ///11
|
||||||
|
"Leaf Dorf", ///12
|
||||||
|
"Sand Dorf", ///13
|
||||||
|
"Sound Dorf" ///14
|
||||||
|
);
|
||||||
|
|
||||||
|
#############################
|
||||||
|
|
||||||
|
if($char_1[rasse] == "$rassen_werte[0]") { $sup_rasse = 1; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[1]") { $sup_rasse = 2; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[2]") { $sup_rasse = 3; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[3]") { $sup_rasse = 4; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[4]") { $sup_rasse = 5; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[5]") { $sup_rasse = 6; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[6]") { $sup_rasse = 7; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[7]") { $sup_rasse = 8; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[8]") { $sup_rasse = 9; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[9]") { $sup_rasse = 10; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[10]") { $sup_rasse = 11; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[12]") { $sup_rasse = 13; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[13]") { $sup_rasse = 14; }
|
||||||
|
else if($char_1[rasse] == "$rassen_werte[14]") { $sup_rasse = 15; }
|
||||||
|
else{ $sup_rasse = 16; }
|
||||||
|
############################# FUSION
|
||||||
|
|
||||||
|
if($char_1[fusion_rasse] == "$rassen_werte[0]") { $sup_rasse1 = 1; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[1]") { $sup_rasse1 = 2; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[2]") { $sup_rasse1 = 3; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[3]") { $sup_rasse1 = 4; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[4]") { $sup_rasse1 = 5; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[5]") { $sup_rasse1 = 6; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[6]") { $sup_rasse1 = 7; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[7]") { $sup_rasse1 = 8; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[8]") { $sup_rasse1 = 9; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[9]") { $sup_rasse1 = 10; }
|
||||||
|
else if($char_1[fusion_rasse] == "$rassen_werte[10]") { $sup_rasse1 = 11; }
|
||||||
|
else{ $sup_rasse1 = 16; }
|
||||||
|
|
||||||
|
########Energie Anzeige
|
||||||
|
$k3 = $hp1[1] / 100;
|
||||||
|
if($hp1[0] <= $k3 * 99.9) { $energie = 90; }
|
||||||
|
if($hp1[0] <= $k3 * 90) { $energie = 90; }
|
||||||
|
if($hp1[0] <= $k3 * 80) { $energie = 80; }
|
||||||
|
if($hp1[0] <= $k3 * 70) { $energie = 70; }
|
||||||
|
if($hp1[0] <= $k3 * 60) { $energie = 60; }
|
||||||
|
if($hp1[0] <= $k3 * 50) { $energie = 50; }
|
||||||
|
if($hp1[0] <= $k3 * 40) { $energie = 40; }
|
||||||
|
if($hp1[0] <= $k3 * 30) { $energie = 30; }
|
||||||
|
if($hp1[0] <= $k3 * 20) { $energie = 20; }
|
||||||
|
if($hp1[0] <= $k3 * 10) { $energie = 10; }
|
||||||
|
if($hp1[0] == $hp1[1]) { $energie = 100; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,365 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 14.08.2007
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/******************************************************************************
|
||||||
|
* Dieser Skript enthält Funktionen für das Implementieren eines Auktionshauses
|
||||||
|
* Ein Skript kann diese Funktionen verwenden, um Informationen darzustellen
|
||||||
|
*******************************************************************************
|
||||||
|
* Autor: Pascal Proksch
|
||||||
|
* Erstellungsdatum: 14.08.2007
|
||||||
|
* Zuletzt verändert: 15.10.2007
|
||||||
|
|
||||||
|
* changelog:
|
||||||
|
* 15.10. Fehler in der Bietefunktion. if($userid == $anbieter) war immer ungueltig!!
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/messagefunctions.inc.php');
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/semaphore.inc.php');
|
||||||
|
|
||||||
|
|
||||||
|
// Funktion um das aktuelle Mindestgebot einer Auktion zu ermitteln!
|
||||||
|
// Returns Mindestgebot
|
||||||
|
// @Return Integer
|
||||||
|
function aktuellesMindestgebot($auktionsid){
|
||||||
|
$qry = mysql_query('SELECT aktuellesgebot, startgebot FROM auktion WHERE auktionsid = '.$auktionsid);
|
||||||
|
if(mysql_num_rows($qry) != 1){ // Auktion nicht vorhanden??
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$result = mysql_fetch_assoc($qry); // Hole dir den einen Datensatz
|
||||||
|
// Aktuelles Gebot vorhanden??
|
||||||
|
if($result['aktuellesgebot']!=NULL){
|
||||||
|
$minBetrag = $result['aktuellesgebot']*1.02; // Mindestens 2% mehr muss geboten werden
|
||||||
|
return ceil($minBetrag-$result['aktuellesgebot']<10?$result['aktuellesgebot']+10:$minBetrag); // Mindestens aber 10 Gold mehr
|
||||||
|
} else{ // Nein?? Dann den startBetrag
|
||||||
|
return ceil($result['startgebot']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zum bieten für eine Auktion
|
||||||
|
// Returns '' wenn alles ok, ansonsten eine Fehlerausgabe
|
||||||
|
// @Return String
|
||||||
|
function biete($userid, $auktionsid, $gebot){
|
||||||
|
// Keine Kommagebote!! Immer Abrunden!!
|
||||||
|
if(!is_numeric($gebot) || floor($gebot) <= 0){
|
||||||
|
return 'Gebot ungültig!';
|
||||||
|
}
|
||||||
|
$gebot = floor($gebot);
|
||||||
|
$auktionsdaten = getEntryInformation($auktionsid);
|
||||||
|
|
||||||
|
$itemname = $auktionsdaten['itemname'];
|
||||||
|
$aktuellesgebot = $auktionsdaten['aktuellesgebot'];
|
||||||
|
$startgebot = $auktionsdaten['startgebot'];
|
||||||
|
$deadline = $auktionsdaten['deadline'];
|
||||||
|
$zeitdifferenz = $auktionsdaten['zeitdifferenz'];
|
||||||
|
$bieter = $auktionsdaten['bieter'];
|
||||||
|
$anbieter = $auktionsdaten['anbieter'];
|
||||||
|
|
||||||
|
if($userid == $anbieter){
|
||||||
|
return 'Sie können nicht auf eigene Items bieten';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nun erstmal pruefen ob noch geboten werden kann
|
||||||
|
if($zeitdifferenz < 0){
|
||||||
|
return 'Deadline abgelaufen!';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Was ist das aktuelle startgebot?? Rufe die Funktion auf!
|
||||||
|
$klGebot = aktuellesMindestgebot($auktionsid);
|
||||||
|
|
||||||
|
if($klGebot == -1){
|
||||||
|
return 'Fehler beim Bieten aufgetreten';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($gebot < $klGebot){
|
||||||
|
return 'Es muss mindestens '.$klGebot.' geboten werden';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Nun muss noch geprueft werden ob der User genug Geld hat und auch mit allen Geboten gesamt nicht in den Minusbereich kommt
|
||||||
|
$user_a = mysql_fetch_assoc(mysql_query('SELECT nickname, geld FROM user WHERE id = '.$userid));
|
||||||
|
$usermoney = $user_a['geld'];
|
||||||
|
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$userid.' AND auktionsid != '.$auktionsid.' GROUP BY bieter'));
|
||||||
|
$auktionensumme = $auktionensumme['summe'];
|
||||||
|
|
||||||
|
if($usermoney < $auktionensumme + $gebot){
|
||||||
|
return 'Nicht genug Geld!';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Wenn 10 minuten vor Deadline-ende geboten wird wird die deadline um 10 Minuten verschoben
|
||||||
|
if($zeitdifferenz < 10){
|
||||||
|
mysql_query('UPDATE auktion SET bieter='.$userid.', aktuellesgebot='.$gebot.', deadline=TIMESTAMPADD(Minute,10,TIMESTAMPADD(Second,-second(now()),now())) WHERE auktionsid='.$auktionsid);
|
||||||
|
// Speichern der neuen deadline in die deadlinevariable
|
||||||
|
$res_deadline = mysql_fetch_assoc(mysql_query('SELECT deadline FROM auktion WHERE auktionsid = '.$auktionsid));
|
||||||
|
$deadline = $res_deadline['deadline'];
|
||||||
|
} else{
|
||||||
|
// Ansonsten nur die Grundwerte
|
||||||
|
mysql_query('UPDATE auktion SET bieter='.$userid.', aktuellesgebot='.$gebot.' WHERE auktionsid='.$auktionsid);
|
||||||
|
}
|
||||||
|
// Nun noch den aktuellen bieter eine Nachricht senden
|
||||||
|
sendMessage('Auktionsmarkt', $bieter, 'Überboten worden', 'Sie sind von '.$user_a['nickname'].' überboten worden, er bietet '.$gebot.' für das Item '.debbcode($itemname).'. Deadline: '.$deadline.' Link: [url='.$GLOBALS['server_url_long'].'/ag/index.php?as=auktion&action=1&auktionsid='.$auktionsid.']Auktion[/url]');
|
||||||
|
|
||||||
|
// mysql_query($new_query);
|
||||||
|
// echo '<br><br>'.$new_query.'<br><br>';
|
||||||
|
return ''; // Leerer String, also kein Fehler!
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion erstellt die Optionen die Auswahl
|
||||||
|
// Returns items mit Anzahl die der User verkaufen kann
|
||||||
|
// @Return String-Array
|
||||||
|
function getItemOptions($userid,$preselected){
|
||||||
|
$result = NULL;
|
||||||
|
$index = 0;
|
||||||
|
// Die etwas abgewandelten SQL-Querys aus dem Onlinemarkt (MEGA-QUERY)
|
||||||
|
$query = 'SELECT i.id, i.name, count(i.id) AS anzahl, \'ware\' as tablename FROM ware w INNER JOIN item i ON(i.id=w.item_id) WHERE w.user = '.$userid.' AND s_type = \'Trank\' GROUP BY i.id
|
||||||
|
union
|
||||||
|
SELECT i.id, i.name,count(i.id) AS anzahl, \'sp_ware\' as tablename FROM sp_ware w INNER JOIN sp_item i ON(i.id=w.item) WHERE w.user = '.$userid.' GROUP BY i.id
|
||||||
|
union
|
||||||
|
SELECT i.id, i.item AS name, count(i.id) AS anzahl, \'wochen_ware\' as tablename FROM wochen_ware w INNER JOIN wochen_markt i ON(i.id=w.item) WHERE w.user = '.$userid.' GROUP BY (i.id)';
|
||||||
|
|
||||||
|
$qry = mysql_query($query);
|
||||||
|
// Damit waeren alle noetigen Datenbankaufrufe erledigt!
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
if($row[id] == $preselected){
|
||||||
|
$result[$index++] = '<option value=\''.$row['id'].','.$row['tablename'].'\' selected>'.$row['name'].' | Anzahl:'.$row['anzahl'].'</option>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$result[$index++] = '<option value=\''.$row['id'].','.$row['tablename'].'\'>'.$row['name'].' | Anzahl:'.$row['anzahl'].'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Liefert Zusatzinformationen zu einer Waren-Datenbank
|
||||||
|
// Returns Array mit DatenbankName, ItemDatenbankName, itemFeldName
|
||||||
|
// @Return Array
|
||||||
|
function getDatabaseAdditions($db){
|
||||||
|
$returnValue = Array(3);
|
||||||
|
$returnValue[0] = $db;
|
||||||
|
if($db == 'ware'){$returnValue[1] = 'item';$returnValue[2]='item_id';$returnValue[3]='name';}
|
||||||
|
else if($db == 'sp_ware'){$returnValue[1] = 'sp_item';$returnValue[2]='item';$returnValue[3]='name';}
|
||||||
|
else if($db == 'wochen_ware'){$returnValue[1] = 'wochen_markt';$returnValue[2]='item';$returnValue[3]='item';}
|
||||||
|
return $returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Diese Funktion stellt ein item in den Basar
|
||||||
|
// Returns '' wenn alles ok, ansonsten eine Fehlerausgabe
|
||||||
|
// @Return String
|
||||||
|
function insertItem($userid,$id_db_mix, $anzahl, $startgebot){
|
||||||
|
if(!is_numeric($startgebot) || floor($startgebot) <=0){
|
||||||
|
return 'Es muss ein gültiges Gebot abgegeben werden.';
|
||||||
|
}
|
||||||
|
$startgebot = floor($startgebot);
|
||||||
|
if(!is_numeric($anzahl) || floor($anzahl) <= 0){
|
||||||
|
return 'Es muss eine gültige Anzahl angegeben werden.';
|
||||||
|
}
|
||||||
|
$anzahl = floor($anzahl);
|
||||||
|
|
||||||
|
preg_replace('#,#','',$id_db_mix); // Entferne die Gefaehrlichen \' !!!
|
||||||
|
|
||||||
|
$mix_explode = explode(',',$id_db_mix);
|
||||||
|
$id = $mix_explode[0]; // ID des items
|
||||||
|
$db = getDatabaseAdditions($mix_explode[1]); // Datenbank die das Item speichert, mit samt den Zusatzinformationen abholen
|
||||||
|
|
||||||
|
// Nun die Anzahl vergleichen
|
||||||
|
$test = 'SELECT count(i.id) AS anzahl FROM '.$db[0].' as w INNER JOIN '.$db[1].' as i ON(i.id=w.'.$db[2].') where w.user= '.$userid.' AND i.id = '.$id;
|
||||||
|
$result = mysql_fetch_assoc(mysql_query($test));
|
||||||
|
// echo $test;
|
||||||
|
if($result['anzahl'] < $anzahl){
|
||||||
|
return 'Nicht genug Items (Vorhanden:'.$result['anzahl'].', Eingetragen:'.$anzahl.')';
|
||||||
|
}
|
||||||
|
$test = 'SELECT '.$db[3].' AS name FROM '.$db[1].' WHERE id ='.$id;
|
||||||
|
$itemname = mysql_fetch_assoc(mysql_query($test));
|
||||||
|
// echo $test;
|
||||||
|
// Nun werden dem User die Items abgezogen und in die auktionstabelle eingefuegt.
|
||||||
|
$qry = mysql_query('DELETE FROM '.$db[0].' WHERE '.$db[2].'='.$id.' AND user='.$userid.' LIMIT '.$anzahl);
|
||||||
|
$anzahl2 = mysql_affected_rows();
|
||||||
|
if($anzahl2 == 0){
|
||||||
|
return 'Cheater!!';
|
||||||
|
} else if($anzahl != $anzahl2){
|
||||||
|
mysql_query('INSERT INTO auktion (itemid, itemname, tablename, anbieter, anzahl, deadline, startgebot, startdate) VALUES('.$id.',\''.$itemname['name'].'\',\''.$db[0].'\','.$userid.','.$anzahl2.',TIMESTAMPADD(Day,3,TIMESTAMPADD(Second,-second(now()),now())),'.$startgebot.',now())');
|
||||||
|
} else{
|
||||||
|
mysql_query('INSERT INTO auktion (itemid, itemname, tablename, anbieter, anzahl, deadline, startgebot, startdate) VALUES('.$id.',\''.$itemname['name'].'\',\''.$db[0].'\','.$userid.','.$anzahl.',TIMESTAMPADD(Day,3,TIMESTAMPADD(Second,-second(now()),now())),'.$startgebot.',now())');
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Diese Funktion erstellt die Auktionstabelle und die Transaktionentabelle
|
||||||
|
function createTables(){
|
||||||
|
// Erstellen der Auktionstabelle
|
||||||
|
mysql_query('DROP TABLE auktion');
|
||||||
|
mysql_query('
|
||||||
|
CREATE TABLE `auktion` (
|
||||||
|
`auktionsid` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`anbieter` int(10) unsigned NOT NULL,
|
||||||
|
`bieter` int(10) unsigned default NULL,
|
||||||
|
`itemid` int(10) unsigned NOT NULL,
|
||||||
|
`itemname` varchar(20) collate utf8_unicode_ci NOT NULL,
|
||||||
|
`tablename` varchar(15) collate utf8_unicode_ci NOT NULL,
|
||||||
|
`anzahl` int(10) unsigned NOT NULL,
|
||||||
|
`startgebot` decimal(10,0) unsigned NOT NULL,
|
||||||
|
`aktuellesgebot` decimal(10,0) unsigned default NULL,
|
||||||
|
`deadline` timestamp NULL default NULL,
|
||||||
|
`startdate` timestamp NULL default NULL,
|
||||||
|
`cheatingverdacht` int(10) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`auktionsid`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=0 ;
|
||||||
|
');
|
||||||
|
|
||||||
|
mysql_query('DROP TABLE auktion_transaktionen');
|
||||||
|
mysql_query('
|
||||||
|
CREATE TABLE `auktion_transaktionen` (
|
||||||
|
`transaktionsid` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`anbieter` int(10) unsigned NOT NULL,
|
||||||
|
`bieter` int(10) unsigned NOT NULL,
|
||||||
|
`itemid` int(10) unsigned NOT NULL,
|
||||||
|
`tablename` varchar(15) collate utf8_unicode_ci NOT NULL,
|
||||||
|
`anzahl` int(10) unsigned NOT NULL,
|
||||||
|
`betrag` decimal(10,0) unsigned NOT NULL,
|
||||||
|
`deadline` timestamp NULL default NULL,
|
||||||
|
`cheatingverdacht` int(10) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`transaktionsid`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=0 ;
|
||||||
|
');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAuktionTotalCount($kategorie,$itemnamepart,$maxPrice){
|
||||||
|
// vorbereiten der uebergabevariablen zu sicherheitszwecken
|
||||||
|
|
||||||
|
$priceDelimiter = '';
|
||||||
|
$kategorieDelimitier ='';
|
||||||
|
$stringDelimiter = '';
|
||||||
|
|
||||||
|
if($maxPrice > 0){
|
||||||
|
$priceDelimiter = ' AND startgebot <= '.$maxPrice.' AND (aktuellesgebot IS NULL OR aktuellesgebot <= '.$maxPrice.') ';
|
||||||
|
}
|
||||||
|
if($kategorie == 'wochen_ware' OR $kategorie == 'ware' OR $kategorie == 'sp_ware'){
|
||||||
|
$kategorieDelimitier = ' AND tablename = \''.$kategorie.'\' ';
|
||||||
|
}
|
||||||
|
if($itemnamepart != NULL && $itemnamepart != ''){
|
||||||
|
$stringDelimiter = ' AND itemname LIKE \'%'.$itemnamepart.'%\' ';
|
||||||
|
}
|
||||||
|
$test = 'SELECT count(auktionsid) as anzahl FROM auktion WHERE 1 '.$kategorieDelimitier.$stringDelimiter.$priceDelimiter.' AND TIMESTAMPDIFF(Minute,now(),deadline) >= 0';
|
||||||
|
$qry = mysql_query($test);
|
||||||
|
if(mysql_num_rows($qry) == 0){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$result = mysql_fetch_assoc($qry);
|
||||||
|
return $result['anzahl'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAuktionEntries($kategorie,$itemnamepart,$entriesPerSite,$pageNumber,$maxPrice,$order,$dir){
|
||||||
|
// vorbereiten der uebergabevariablen zu sicherheitszwecken
|
||||||
|
$priceDelimiter = '';
|
||||||
|
$kategorieDelimitier ='';
|
||||||
|
$stringDelimiter = '';
|
||||||
|
$interval = ' LIMIT '.($entriesPerSite*$pageNumber).','.$entriesPerSite.' ';
|
||||||
|
$returnArray = NULL;
|
||||||
|
|
||||||
|
if($maxPrice > 0){
|
||||||
|
$priceDelimiter = ' AND startgebot <= '.$maxPrice.' AND (aktuellesgebot IS NULL OR aktuellesgebot <= '.$maxPrice.') ';
|
||||||
|
}
|
||||||
|
if($kategorie == 'wochen_ware' OR $kategorie == 'ware' OR $kategorie == 'sp_ware'){
|
||||||
|
$kategorieDelimitier = ' AND tablename = \''.$kategorie.'\' ';
|
||||||
|
}
|
||||||
|
if($itemnamepart != NULL && $itemnamepart != ''){
|
||||||
|
$stringDelimiter = ' AND itemname LIKE \'%'.$itemnamepart.'%\' ';
|
||||||
|
}
|
||||||
|
$index = 0;
|
||||||
|
$test = 'SELECT a.auktionsid, u.nickname AS anbietername, u2.nickname AS bietername, a.deadline, a.aktuellesgebot, a.startgebot, a.anzahl, a.itemname, a.bieter, a.anbieter, a.itemid, a.tablename FROM auktion AS a INNER JOIN user as u ON a.anbieter = u.id LEFT JOIN user as u2 ON a.bieter = u2.id WHERE 1 '.$kategorieDelimitier.$stringDelimiter.$priceDelimiter.' AND TIMESTAMPDIFF(Minute,now(),deadline) >= 0 ORDER BY '.$order.' '.$dir.' '.$interval;
|
||||||
|
$qry = mysql_query($test);
|
||||||
|
//echo '<br>'.$test.'<br>';
|
||||||
|
while($result = mysql_fetch_assoc($qry)){
|
||||||
|
$returnArray[$index++] = $result;
|
||||||
|
}
|
||||||
|
return $returnArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getEntryInformation($auktionsid){
|
||||||
|
if(!is_numeric($auktionsid)){return;}
|
||||||
|
$qry = mysql_query('SELECT u.nickname AS anbietername, u2.nickname AS bietername, a.auktionsid,a.anbieter,a.bieter,a.itemid,a.itemname,a.tablename,a.anzahl,a.startgebot,a.aktuellesgebot,a.deadline,a.startdate,a.cheatingverdacht, TIMESTAMPDIFF(Minute,now(),deadline) AS zeitdifferenz FROM auktion AS a INNER JOIN user as u ON a.anbieter = u.id LEFT JOIN user as u2 ON a.bieter = u2.id WHERE auktionsid = '.$auktionsid);
|
||||||
|
if(mysql_num_rows($qry) == 0){ return NULL; }
|
||||||
|
return mysql_fetch_assoc($qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getKategorieOptions($preselect){
|
||||||
|
$result = NULL;
|
||||||
|
$index = 0;
|
||||||
|
$converter['ware'] = 'Tränke';
|
||||||
|
$converter['sp_ware'] = 'Items';
|
||||||
|
$converter['wochen_ware'] = 'Teufelsfrüchte';
|
||||||
|
|
||||||
|
$total = 0;
|
||||||
|
$select = false;
|
||||||
|
$qry = mysql_query('SELECT tablename,count(tablename) as anzahl FROM auktion WHERE TIMESTAMPDIFF(Minute,now(),deadline) >= 0 GROUP BY tablename');
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
if($preselect == $row['tablename']){
|
||||||
|
$result[$index++] = '<option value=\''.$row['tablename'].'\' selected>'.$converter[$row['tablename']].' | Anzahl:'.$row['anzahl'].'</option>';
|
||||||
|
$select = true;
|
||||||
|
} else{
|
||||||
|
$result[$index++] = '<option value=\''.$row['tablename'].'\'>'.$converter[$row['tablename']].' | Anzahl:'.$row['anzahl'].'</option>';
|
||||||
|
}
|
||||||
|
$total += $row['anzahl'];
|
||||||
|
}
|
||||||
|
if(!$select){
|
||||||
|
$result[$index++] = '<option value=\'all\' selected>Alles | Anzahl:'.$total.'</option>';
|
||||||
|
} else{
|
||||||
|
$result[$index++] = '<option value=\'all\'>Alles | Anzahl:'.$total.'</option>';
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function zurueckziehen($userid, $auktionsid, $pay){
|
||||||
|
// So das eigentliche abziehen
|
||||||
|
$auktionsdaten = getEntryInformation($auktionsid);
|
||||||
|
if($userid != $auktionsdaten['anbieter']){
|
||||||
|
return 'Sie sind garnicht der Anbieter dieser Auktion!';
|
||||||
|
}
|
||||||
|
if($pay == 'YES' && $auktionsdaten['aktuellesgebot'] == NULL){
|
||||||
|
return 'Es wurde mitübergeben, dass geboten wurde, es ist aber nicht geboten worden!';
|
||||||
|
}
|
||||||
|
else if($pay == 'NO' && $auktionsdaten['aktuellesgebot'] != NULL){
|
||||||
|
return 'Es wurde zwischenzeitlich geboten! Zurückziehen nur mit Gebühr möglich!';
|
||||||
|
}
|
||||||
|
$gebuehr = floor($auktionsdaten['aktuellesgebot'] * 0.1);
|
||||||
|
mysql_query('UPDATE user SET geld=geld-'.$gebuehr.' WHERE id='.$userid);
|
||||||
|
|
||||||
|
mysql_query('DELETE FROM auktion WHERE auktionsid='.$auktionsid);
|
||||||
|
$anzahl2 = mysql_affected_rows();
|
||||||
|
if($anzahl2 == 0){
|
||||||
|
return 'CHEATER!!';
|
||||||
|
}
|
||||||
|
$anzahl = $auktionsdaten['anzahl'];
|
||||||
|
$item_row_name = 'item';
|
||||||
|
if($auktionsdaten['tablename'] == 'ware'){$item_row_name = 'item_id';}
|
||||||
|
while($anzahl-- > 0){
|
||||||
|
$sql = 'INSERT INTO '.$auktionsdaten['tablename'].' ('.$item_row_name.', user) VALUES('.$auktionsdaten['itemid'].','.$userid.')';
|
||||||
|
mysql_query($sql);
|
||||||
|
// echo '<br>'.$sql.'<br>';
|
||||||
|
}
|
||||||
|
$sql = 'INSERT INTO nachricht(von, besitzer, betreff, text) VALUES (\'Auktionsmarkt\', '.$auktionsdaten['anbieter'].', \'Item zurückgezogen!\', \' Sie haben das Item '.$auktionsdaten['itemname'].' für eine Gebühr von '.$gebuehr.' zurückgezogen!\')';
|
||||||
|
mysql_query($sql);
|
||||||
|
// echo '<br>'.$sql.'<br>';
|
||||||
|
if($auktionsdaten['bieter'] != NULL){
|
||||||
|
$sql = 'INSERT INTO nachricht(von, besitzer, betreff, text) VALUES (\'Auktionsmarkt\', '.$auktionsdaten['bieter'].', \'Item zurückgezogen!\', \' Das Item '.$auktionsdaten['itemname'].' wurde von '.$auktionsdaten['anbietername'].' zurückgezogen!\')';
|
||||||
|
mysql_query($sql);
|
||||||
|
// echo '<br>'.$sql.'<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAveragePrice($itemid, $tablename, $anzahl){
|
||||||
|
$sql = 'SELECT avg(betrag) / avg(anzahl) AS average FROM auktion_transaktionen WHERE anbieter != 1 and itemid = '.$itemid.' and tablename = \''.$tablename.'\' and cheatingverdacht = 0 and TIMESTAMPADD(DAY,30,deadline) > CURRENT_TIMESTAMP';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
$row = mysql_fetch_assoc($qry);
|
||||||
|
return round($row['average']*$anzahl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function isSpammer($id){
|
||||||
|
$result = mysql_fetch_assoc(mysql_query('SELECT TIMESTAMPDIFF(Second,max(bann_until),now()) as anzahl from spammer WHERE userid='.$id.' group by userid'));
|
||||||
|
if($result[anzahl] < 0){
|
||||||
|
return true;
|
||||||
|
} else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function becomeSpammer($id,$nick,$text){
|
||||||
|
// Es gibt 2 indikatoren ein Spammer zu sein
|
||||||
|
// Man schreibt min 10 posts innerhalb von 20 Sekunden
|
||||||
|
$result1 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 20'));
|
||||||
|
// Man schreibt min 30 Posts innerhalb einer Minute
|
||||||
|
$result2 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 60'));
|
||||||
|
// Innerhalb einer halben Minute 4 mal den selben Post!!
|
||||||
|
$result3 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' AND TIMESTAMPDIFF(Second,zeit,now()) <= 30 AND nachricht = \''.$text.'\''));
|
||||||
|
|
||||||
|
|
||||||
|
// Und nun noch ein paar Aergernisse
|
||||||
|
// $a = stripos($text, 'frei') !== FALSE || stripos($text, 'free') !== FALSE || stripos($text, 'offen') !== FALSE || stripos($text, 'open') !== FALSE;
|
||||||
|
// $b = stripos($text, 'kämpfe') !== FALSE || stripos($text, 'fights') !== FALSE || stripos($text, 'f.') !== FALSE;
|
||||||
|
// $c = stripos($text, 'spam') !== FALSE;
|
||||||
|
// if(($a && $b && count(preg_split('# #', $text)) <= 4 ) || ($c && count(preg_split('# #', $text)) <= 1)){
|
||||||
|
// setSpamblock($id);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
if($result1 >= 10 || $result2 >= 30 || $result3 >=4){
|
||||||
|
// Anzahl eintraege in spamliste
|
||||||
|
setSpamblock($id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSpamblock($id){
|
||||||
|
$anzahl = mysql_num_rows(mysql_query('SELECT * FROM spammer WHERE userid='.$id.' AND TIMESTAMPDIFF(Day,bann_until,now()) <=14'));
|
||||||
|
$zeit = pow(5,($anzahl+1));
|
||||||
|
mysql_query('INSERT INTO spammer(userid, bann_until) values('.$id.',TIMESTAMPADD(Minute,'.$zeit.',now()))');
|
||||||
|
}
|
||||||
|
|
||||||
|
function releaseSpamblock($id){
|
||||||
|
mysql_query('DELETE from spammer where userid='.$id.' and TIMESTAMPDIFF(Second,bann_until,now()) < 0');
|
||||||
|
}
|
||||||
|
|
||||||
|
function bannAccount($id){
|
||||||
|
mysql_query('UPDATE user SET bann = \'ja\' WHERE id='.$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
function unbannAccount($id){
|
||||||
|
mysql_query('UPDATE user SET bann = \'nein\' WHERE id='.$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,286 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 07.08.2008
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Alle Hilfsfunktionen fuer Chars sollen hier rein!
|
||||||
|
*
|
||||||
|
* Die Funktionen der char_profil wären sehr geeignet hierfür
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Char Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Dieses Array ist dafuer da, dass nicht unnötig viele SQL-Abfragen gemacht werden!
|
||||||
|
// Fehlgriff im Design, aber solange wir nichts Klassenbasiert machen, gehts nicht anders
|
||||||
|
$GLOBALS['char_buffered_statuses'] = array ();
|
||||||
|
|
||||||
|
/* Diese Funktion gibt den Status des Chars wieder, kann ohne probleme mehrfach aufgerufen
|
||||||
|
* werden da die Anfragen gepuffert werden!
|
||||||
|
* returns Status des Charakters mit der id = $charid
|
||||||
|
*/
|
||||||
|
function getStatus($charid, $buffer_enabled = true) {
|
||||||
|
// Prioritaet, erst Turnier, dann Schatzsuche, dann Kampf
|
||||||
|
if ($GLOBALS['char_buffered_statuses'][$charid] != null && $buffer_enabled) {
|
||||||
|
return $GLOBALS['char_buffered_statuses'][$charid];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT count(*) as anzahl FROM turnier_kampf t where art != \'gross\' and (win = ' . $charid . ' or lose = ' . $charid . ') and dauer > now()';
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
if ($row['anzahl'] > 0) {
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Turnier';
|
||||||
|
return 'Turnier';
|
||||||
|
}
|
||||||
|
$sql = 'SELECT count(*) as anzahl from quests where charid = ' . $charid;
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
if ($row['anzahl'] > 0) {
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Schatz Suche';
|
||||||
|
return 'Schatz Suche';
|
||||||
|
}
|
||||||
|
$sql = 'SELECT count(*) as anzahl from kampf where db_satz = ' . $charid;
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
if ($row['anzahl'] > 0) {
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Kampf';
|
||||||
|
return 'Kampf';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT count(*) as anzahl FROM kampf_list where charakter = ' . $charid;
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
if ($row['anzahl'] > 0) {
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Kampf erstellt';
|
||||||
|
return 'Kampf erstellt';
|
||||||
|
}
|
||||||
|
$sql = 'SELECT count(*) as anzahl FROM turnier1 where charakter = ' . $charid;
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
if ($row['anzahl'] > 0) {
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Angemeldet';
|
||||||
|
return 'Angemeldet';
|
||||||
|
}
|
||||||
|
$GLOBALS['char_buffered_statuses'][$charid] = 'Frei';
|
||||||
|
return 'Frei';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Char generell!
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Initialisierung des Puffers
|
||||||
|
$GLOBALS['char_buffered_instances'] = array ();
|
||||||
|
$GLOBALS['chars_read_out_user'] = array ();
|
||||||
|
|
||||||
|
// Uebergabe der Charid, und optional ob gepuffert werden darf
|
||||||
|
// returns: Char als Array
|
||||||
|
function getChar($charid, $buffer_enabled = true) {
|
||||||
|
// Fehlerkontrolle
|
||||||
|
if(!is_numeric($charid)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Wenn Char nicht im Puffer ist, oder nicht gepuffert werden soll
|
||||||
|
if ($GLOBALS['char_buffered_instances'][$charid] == null || !$buffer_enabled) {
|
||||||
|
// Lese das Charfeld aus der Datenbank aus
|
||||||
|
$char = mysql_fetch_assoc(mysql_query('Select * from chars where id = '.$charid));
|
||||||
|
if(!$char){return null;}
|
||||||
|
// Speichere in $char['stauts'] den aktuellen Status des Chars (buffer-Strategie ist hierbei die selbe)
|
||||||
|
$char['status'] = getStatus($char['id'],$buffer_enabled);
|
||||||
|
$char['bild'] = getPicture($char);
|
||||||
|
$GLOBALS['char_buffered_instances'][$charid] = &$char; // Speichern des Chars in den Puffer
|
||||||
|
}
|
||||||
|
// Gebe Char zurueck
|
||||||
|
return $GLOBALS['char_buffered_instances'][$charid];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getChar2($charid) {
|
||||||
|
// Fehlerkontrolle
|
||||||
|
if(!is_numeric($charid)){
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
$char = mysql_fetch_assoc(mysql_query('Select * from chars where id = '.$charid));
|
||||||
|
if(!$char){return null;}
|
||||||
|
// Speichere in $char['stauts'] den aktuellen Status des Chars (buffer-Strategie ist hierbei die selbe)
|
||||||
|
$char['status'] = getStatus($char['id'],$buffer_enabled);
|
||||||
|
$char['bild'] = getPicture($char);
|
||||||
|
}
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCharWithBuffs($charid, $buffer_enabled = true){
|
||||||
|
$char = getChar($charid, $buffer_enabled);
|
||||||
|
if($char['kampf_item'] != NULL && $char['kampf_item'] != ',,,,'){
|
||||||
|
$char_buffs = mysql_fetch_assoc(mysql_query('SELECT sum(i.hp) as hp, sum(i.mp) as mp, sum(i.starke) as starke, sum(i.verteidigung) as verteidigung, sum(i.speed) as speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id IN (' . $char['kampf_item'] . ')'));
|
||||||
|
}
|
||||||
|
$char['starke'] += $char_buffs['starke'];
|
||||||
|
$char['verteidigung'] += $char_buffs['verteidigung'];
|
||||||
|
$char['speed'] += $char_buffs['speed'];
|
||||||
|
$char['ausdauer'] += $char_buffs['ausdauer'];
|
||||||
|
$char['glueck'] += $char_buffs['glueck'];
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uebergabe der Userid (Nachteil ist, dass Puffer von getChar mit $charid nicht moeglich ist, weil information fehlt, ob alle Chars im Buffer sind
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Liefert die Url zum Avatarbild (Falls Char keinen Avatar hat gibt es die
|
||||||
|
* noavatar.gif zurueck!)
|
||||||
|
* returns Url of Avatar-Picture
|
||||||
|
* */
|
||||||
|
function getPicture($char){
|
||||||
|
// Sichergehen, dass Char geladen wurde
|
||||||
|
if($char['bild'] == null || $char['bild'] == ''){
|
||||||
|
return 'design/bilder/avatare/noavart.gif';
|
||||||
|
}
|
||||||
|
return $char['bild'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// returns Array von Char-Arrays
|
||||||
|
function getCharsOfUser($userid, $buffer_enabled = true) {
|
||||||
|
// Fehlerkontrolle
|
||||||
|
if(!is_numeric($userid)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($GLOBALS['chars_read_out_user'][$userid] == null || !$buffer_enabled) {
|
||||||
|
$GLOBALS['chars_read_out_user'][$userid] = array();
|
||||||
|
$qry = mysql_query('Select * from chars where besitzer = '.$userid.' order by id');
|
||||||
|
while($char = mysql_fetch_assoc($qry)){
|
||||||
|
// Speichere in $char['stauts'] den aktuellen Status des Chars (buffer-Strategie ist hierbei die selbe)
|
||||||
|
$char['status'] = getStatus($char['id'],$buffer_enabled);
|
||||||
|
$char['bild'] = getPicture($char);
|
||||||
|
// Speichere den Char in das Globale-Pufferfeld
|
||||||
|
$GLOBALS['char_buffered_instances'][$char['id']] = $char;
|
||||||
|
// Gebe dem User eine Referenz auf die globale chars-Variable
|
||||||
|
$GLOBALS['chars_read_out_user'][$userid][] = &$GLOBALS['char_buffered_instances'][$char['id']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $GLOBALS['chars_read_out_user'][$userid]; // Gebe das globale Userfeld zurück.
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteChar($userid, $charid){
|
||||||
|
$char = getChar($charid);
|
||||||
|
if($char['besitzer'] != $userid){
|
||||||
|
return 'Char gehoert nicht dir!';
|
||||||
|
} else if($char['status'] != 'Frei'){
|
||||||
|
return 'Char ist nicht Frei!';
|
||||||
|
}
|
||||||
|
mysql_query('Delete from lernen where besitzer = '.$charid);
|
||||||
|
mysql_query('Delete from chars where id = '.$charid);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Funktionen die durch Puffern profitieren würden oder um einfach Code einzusparen und um flexibel zu bleiben
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Ermittelt den Besitzer
|
||||||
|
// Returns true = Ja, False = Nein, NULL = Error
|
||||||
|
function isUserOwnerOf($userid, $charid, $buffer_enabled = true){
|
||||||
|
// Fehlerkontrolle
|
||||||
|
if(!is_numeric($userid) || !is_numeric($charid)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
$char = getChar($charid, $buffer_enabled);
|
||||||
|
if($char == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return $char['besitzer'] == $userid;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion um das Powerlevel zu Berechnen (Kann ja durchaus sein, dass sich mal was dran ändert!)
|
||||||
|
// Returns Powerlevel als Integer, NULL = Error
|
||||||
|
function getPowerLevel($charid, $buffer_enabled = true){
|
||||||
|
$char = getChar($charid, $buffer_enabled);
|
||||||
|
if($char == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Uncomment for hp/mp in PL
|
||||||
|
// $hp = explode(",", $char[hp]);
|
||||||
|
// $mp = explode(",", $char[mp]);
|
||||||
|
// return $char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck']+ $hp[1]/10 + $mp[1]/5;
|
||||||
|
return $char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPowerLevelWithBuffs($charid, $buffer_enabled = true){
|
||||||
|
$char = getChar($charid, $buffer_enabled);
|
||||||
|
if($char == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if($char['kampf_item'] != NULL && $char['kampf_item'] != ',,,,'){
|
||||||
|
$char_buffs = mysql_fetch_assoc(mysql_query('SELECT sum(i.hp) as hp, sum(i.mp) as mp, sum(i.starke) as starke, sum(i.verteidigung) as verteidigung, sum(i.speed) as speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id IN (' . $char['kampf_item'] . ')'));
|
||||||
|
}
|
||||||
|
// Uncomment for hp/mp in PL
|
||||||
|
// $hp = explode(",", $char[hp]);
|
||||||
|
// $mp = explode(",", $char[mp]);
|
||||||
|
// return $char_buffs['starke']+$char_buffs['verteidigung']+$char_buffs['speed']+$char_buffs['ausdauer']+$char_buffs['glueck'] + $char_buffs['hp']/10 + $char_buffs['mp']/5 +$char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck'] + $hp[1]/10 + $mp[1]/5;
|
||||||
|
return $char_buffs['starke']+$char_buffs['verteidigung']+$char_buffs['speed']+$char_buffs['ausdauer']+$char_buffs['glueck']+$char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Auslesen der Attacken, die der Char beherrscht
|
||||||
|
*/
|
||||||
|
function getCharAttacks($charid){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auslesen der Kampfeinstellungen
|
||||||
|
function getChoosenAttacks($charid){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getCharRaceId($charid){
|
||||||
|
$char = getChar($charid);
|
||||||
|
$rassen_werte = array(
|
||||||
|
'Mensch' => 1, ///0
|
||||||
|
'Saiyajin' => 2, ///1
|
||||||
|
'Dämon' => 3, ///2
|
||||||
|
'Mutant' => 4, ///3
|
||||||
|
'Cyborg' => 5, ///4
|
||||||
|
'Namekianer' => 6, ///5
|
||||||
|
'Pirat' => 7, ///6
|
||||||
|
'Shichibukai' => 8, ///7
|
||||||
|
'Kaioshin' => 9, ///8
|
||||||
|
'Schwertkämpfer' => 10,///9
|
||||||
|
'Grandline Maschine'=> 11,///10
|
||||||
|
'01' => 12,///11
|
||||||
|
'Leaf Dorf' => 13,///12
|
||||||
|
'Sand Dorf' => 14,///13
|
||||||
|
'Sound Dorf' => 15///14
|
||||||
|
);
|
||||||
|
return $rassen_werte[$char['rasse']];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFusionRaceId($charid){
|
||||||
|
$char = getChar($charid);
|
||||||
|
$rassen_werte = array(
|
||||||
|
'Mensch' => 1, ///0
|
||||||
|
'Saiyajin' => 2, ///1
|
||||||
|
'Dämon' => 3, ///2
|
||||||
|
'Mutant' => 4, ///3
|
||||||
|
'Cyborg' => 5, ///4
|
||||||
|
'Namekianer' => 6, ///5
|
||||||
|
'Pirat' => 7, ///6
|
||||||
|
'Shichibukai' => 8, ///7
|
||||||
|
'Kaioshin' => 9, ///8
|
||||||
|
'Schwertkämpfer' => 10,///9
|
||||||
|
'Grandline Maschine'=> 11,///10
|
||||||
|
'01' => 12,///11
|
||||||
|
'Leaf Dorf' => 13,///12
|
||||||
|
'Sand Dorf' => 14,///13
|
||||||
|
'Sound Dorf' => 15///14
|
||||||
|
);
|
||||||
|
return $rassen_werte[$char['fusion_rasse']];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 25.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function checkCookies($nickname, $yps) {
|
||||||
|
$cookiearray = preg_split('#,#', $yps);
|
||||||
|
if (md5($cookiearray[0]) == $cookiearray[1]) { // Einfach um manipulation zu verringern
|
||||||
|
$nick_name2 = $cookiearray[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset ($nick_name2) && strtolower($nick_name2) != strtolower($nickname)) {
|
||||||
|
// Ha!!! Da ist doch was faul!!
|
||||||
|
// sortiere die namen
|
||||||
|
$m_user_qry = mysql_query('SELECT * FROM user where nickname IN (\'' . $nickname . '\',\'' . $nick_name2 . '\') order by id');
|
||||||
|
$muser = array ();
|
||||||
|
while ($row = mysql_fetch_assoc($m_user_qry)) {
|
||||||
|
$muser[] = $row;
|
||||||
|
}
|
||||||
|
if (count($muser) != 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Neue Tabelle
|
||||||
|
$sql = 'INSERT INTO multiuser(user1, user2, occured, type) values(\'' . $muser[0]['id'] . '\', \'' . $muser[1]['id'] . '\',CURRENT_TIMESTAMP, \'Cookie\')';
|
||||||
|
mysql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function detectNonCodeEnterers(){
|
||||||
|
$qry = mysql_query('Select * from bot_images WHERE TIMESTAMPDIFF(MINUTE, created, now()) > 10');
|
||||||
|
mysql_query('DELETE from bot_images WHERE TIMESTAMPDIFF(MINUTE, created, now()) > 10 ');
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$sql = 'Insert into bot_image_failures(userid, inserted, valid, used) values('.$row['userid'].', \'!NOTHING!\', \''.$row['compressed_phrase'].'\', \''.$row['created'].'\')';
|
||||||
|
// echo $sql.'<br>';
|
||||||
|
mysql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,749 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/******
|
||||||
|
Funktionen fuer die Clanfights
|
||||||
|
Muss noch bearbeitet werden !!
|
||||||
|
|
||||||
|
******/
|
||||||
|
|
||||||
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php');
|
||||||
|
|
||||||
|
function getClanMember($clanid) {
|
||||||
|
//$sql = 'SELECT * FROM user where clan = '.$clanid;
|
||||||
|
$qry = mysql_query('SELECT * FROM user where clan = '.$clanid);
|
||||||
|
$options = '';
|
||||||
|
while ($row = mysql_fetch_assoc($qry)) {
|
||||||
|
$options .= '<option value="'.$row['id'].'">'.$row['nickname'].'</option>';
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMemberCharacters($userid) {
|
||||||
|
$qry = mysql_query('SELECT * FROM chars where besitzer = '.$userid);
|
||||||
|
$options = '';
|
||||||
|
while ($row = mysql_fetch_assoc($qry)) {
|
||||||
|
$options .= '<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getClans($clanid) {
|
||||||
|
$qry= mysql_query('SELECT clanname, id FROM clan WHERE id != '.$clanid.' ORDER BY clanname ASC');
|
||||||
|
#$qry= mysql_query('SELECT clanname, id FROM clan ORDER BY clanname ASC');
|
||||||
|
$options = '';
|
||||||
|
while ($row = mysql_fetch_assoc($qry)) {
|
||||||
|
$options .= '<option value="'.$row['id'].'">'.$row['clanname'].'</option>';
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayClanFights($userid) {
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
$claninfos= getClanInformation($clanid);
|
||||||
|
?>
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<th height="29" valign="top" colspan="2">Clan Kämpfe</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<?php echo getActualClanChallengeInformation($clanid,$userid); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if ($claninfos['leader'] == $userid OR $claninfos['co_leader'] == $userid) {
|
||||||
|
$anzahl_herausforderungen= mysql_num_rows(mysql_query('SELECT id FROM clan_fight_list WHERE clan='.$clanid.' AND status<2'));
|
||||||
|
if ($anzahl_herausforderungen == 3) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th height="29" valign="top" colspan="2">Dein Clan hat bereits 3 Herausforderungen. Mehr sind nicht möglich.</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th height="29" valign="top" colspan="2"><a href="index.php?as=clan/c_kampf&id=create">Clan herausfordern</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayClanFightType($userid) {
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?as=clan/c_kampf" method="POST">
|
||||||
|
<input type="hidden" name="id" value="1">
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<th>Kampftyp: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="clanfighttyp">
|
||||||
|
<option value="1">1 vs. 1</option>
|
||||||
|
<option value="2">Survival</option>
|
||||||
|
<!--<option value="4">2 vs. 2</option>
|
||||||
|
<option value="7">4 vs. 4</option>
|
||||||
|
<option value="12">7 vs. 7</option>-->
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" align="center">
|
||||||
|
<input id="input" type="submit" value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displaySelectNumberOfFighter($clanfighttyp) {
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?as=clan/c_kampf" method="POST">
|
||||||
|
<input type="hidden" name="id" value="2">
|
||||||
|
<input type="hidden" name="clanfighttyp" value="<?php echo $clanfighttyp; ?>">
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<th>Anzahl Kämpfer: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="numberoffighter">
|
||||||
|
<?php
|
||||||
|
switch ($clanfighttyp) {
|
||||||
|
case "1":
|
||||||
|
?>
|
||||||
|
<option value="4">4 Kämpfer</option>
|
||||||
|
<option value="6">6 Kämpfer</option>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
?>
|
||||||
|
<option value="4">4 Kämpfer</option>
|
||||||
|
<option value="6">6 Kämpfer</option>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="25" align="center">
|
||||||
|
<input id="input" type="submit" value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayClanUser($userid,$numberoffighter,$clanfighttyp,$type){
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
$optionen = getCharacterOptions($clanid);
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?as=clan/c_kampf" method="POST">
|
||||||
|
<?php
|
||||||
|
if ($type == 'create') {
|
||||||
|
echo '<input type="hidden" name="id" value="3">';
|
||||||
|
} elseif ($type == 'accept') {
|
||||||
|
echo '<input type="hidden" name="id" value="acc2">';
|
||||||
|
echo '<input type="hidden" name="kid" value="'.$_GET['kid'].'">';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="numberoffighter" value="<?php echo $numberoffighter;?>">
|
||||||
|
<?php
|
||||||
|
if (!empty($clanfighttyp)) {
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="clanfighttyp" value="<?php echo $clanfighttyp; ?>">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<?php
|
||||||
|
for($i=1;$i<=$numberoffighter;$i++){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th>User <?php echo $i; ?></th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="user[<?php echo $i; ?>]">
|
||||||
|
<option value="-1">User wählen...
|
||||||
|
<?php echo getClanMember($clanid); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" align="center">
|
||||||
|
<input id="input" type="submit" value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayCharsOfClanUser($userid, $wahluser, $numberoffighter, $clanfighttyp='', $type){
|
||||||
|
$anzahl_gewaehlt= 0;
|
||||||
|
|
||||||
|
for($i=1;$i<count($wahluser)+1;$i++) {
|
||||||
|
if($wahluser[$i] != -1) {
|
||||||
|
$anzahl_gewaehlt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$count_member_array= array_count_values($wahluser);
|
||||||
|
|
||||||
|
for($i=1;$i<count($wahluser)+1;$i++) {
|
||||||
|
if($wahluser[$i] == -1) {
|
||||||
|
$errmsg .= '<p>Es sind nicht genug Clanmitglieder ausgewählt worden für einen Clankampf!</p>';
|
||||||
|
$errmsg .= '<p>Leider nur '.$anzahl_gewaehlt.' von '.count($wahluser).' Clanmitglieder ausgewählt!</p>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($count_member_array as $key => $value) {
|
||||||
|
if ($value > 1 AND $key != -1) {
|
||||||
|
$errmsg .= '<p>Du hast leider ein Clanmitglied mehrfach ausgewählt!</p>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
$optionen = getCharacterOptions($clanid);
|
||||||
|
|
||||||
|
if (empty($errmsg)) {
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?as=clan/c_kampf" method="POST">
|
||||||
|
<?php
|
||||||
|
if ($type == 'create') {
|
||||||
|
echo '<input type="hidden" name="id" value="4">';
|
||||||
|
echo '<input type="hidden" name="numberoffighter" value="'.$numberoffighter.'">';
|
||||||
|
echo '<input type="hidden" name="clanfighttyp" value="'.$clanfighttyp.'">';
|
||||||
|
} elseif ($type == 'accept') {
|
||||||
|
echo '<input type="hidden" name="id" value="acc_fin">';
|
||||||
|
echo '<input type="hidden" name="kid" value="'.$_POST['kid'].'">';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<?php
|
||||||
|
for($i=1;$i<=$numberoffighter;$i++){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th>User <?php echo $i; ?></th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="char[<?php echo $i; ?>]">
|
||||||
|
<option value="0">Charakter wählen...
|
||||||
|
<?php echo getMemberCharacters($wahluser[$i]); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td height="25" align="center">
|
||||||
|
<input id="input" type="submit" value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
$errmsg .= '<div style="text-align:center;"><input type="button" value="Zurück" onClick="history.back()"></div>';
|
||||||
|
echo $errmsg1;
|
||||||
|
echo $errmsg;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function displaySelectClanToFight($userid,$numberoffighter,$clanfighttyp) {
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
/*for ($i=1;$i<sizeof($_POST['char'])+1;$i++) {
|
||||||
|
if (getStatusOfChar($_POST['char'][$i]) != 'Frei') {
|
||||||
|
$fehlerhafter_status += 1;
|
||||||
|
$chars_mit_falschem_status[]= $_POST['char'][$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($fehlerhafter_status)) {
|
||||||
|
echo '<div style="text-align:center;"><input type="button" value="Zurück" onClick="history.back()"></div>';
|
||||||
|
echo '<p>Folgende Charaktere sind nicht verfügbar:</p>';
|
||||||
|
echo '<ul>';
|
||||||
|
for ($i=0;$i<count($chars_mit_falschem_status);$i++) {
|
||||||
|
echo '<li>'.getNameOfChar($chars_mit_falschem_status[$i]).'</li>';
|
||||||
|
}
|
||||||
|
echo '</ul>';
|
||||||
|
exit;
|
||||||
|
}*/
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?as=clan/c_kampf" method="POST">
|
||||||
|
<input type="hidden" name="id" value="5">
|
||||||
|
<input type="hidden" name="chars" value=<?php echo serialize($_POST['char']);?>>
|
||||||
|
<input type="hidden" name="numberoffighter" value="<?php echo $numberoffighter;?>">
|
||||||
|
<input type="hidden" name="clanfighttyp" value="<?php echo $clanfighttyp;?>">
|
||||||
|
<table width="548" cellspacing="0" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<th>Clan: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="clan">
|
||||||
|
<option value="0">Clan wählen...
|
||||||
|
<?php echo getClans($clanid); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Datum: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="datum">
|
||||||
|
<?php
|
||||||
|
$timestamp= time();
|
||||||
|
for ($i=0;$i<14;$i++) {
|
||||||
|
$datum= date("d.m.Y",$timestamp+$i*60*60*24);
|
||||||
|
$timestamp_changed= strtotime(date("d.m.Y",$timestamp+$i*60*60*24));
|
||||||
|
echo '<option value="'.$timestam_changed.'">'.$datum.'</datum>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Zeitpunkt: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="zeitpunkt">
|
||||||
|
<option value="0">nachts (0 Uhr)</option>
|
||||||
|
<option value="8">morgens (8 Uhr)</option>
|
||||||
|
<option value="16">nachmittags (16 Uhr)</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!--<tr>
|
||||||
|
<th>Ausrüstung: </th>
|
||||||
|
<td height="25">
|
||||||
|
<select class="input" name="ausruestung">
|
||||||
|
<option value="1">mit Ausrüstung</option>
|
||||||
|
<option value="0">ohne Ausrüstung</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>-->
|
||||||
|
<tr>
|
||||||
|
<td height="25" align="center">
|
||||||
|
<input id="input" type="submit" value="weiter">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function declineClanfight($clanfightid,$true='') {
|
||||||
|
if (empty($true)) {
|
||||||
|
echo '<p>Willst du den Clankamp wirklich ablehnen?</p>';
|
||||||
|
echo '<p><a href="index.php?as=clan/c_kampf&id=dec&kid='.$clanfightid.'&true=1">Ja</a> | <a href="index.php?as=clan/c_kampf">Nein</a></p>';
|
||||||
|
} else {
|
||||||
|
$clankampf_loeschen= mysql_query('DELETE FROM clan_fight_list WHERE id='.$clanfightid.' LIMIT 1');
|
||||||
|
echo '<p>Clankampf erfolgreich abgelehnt!</p>';
|
||||||
|
echo '<p><a href="index.php?as=clan/c_kampf">zurück zur Übersicht</a></p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkIfChallengeTimedOut($userid) {
|
||||||
|
$clanid= getClanOfUser($userid);
|
||||||
|
$qry = mysql_query('SELECT id, zeitpunkt, status FROM clan_fight_list WHERE clan='.$clanid.' OR gclan='.$clanid);
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
if ($row['zeitpunkt'] <= time() AND $row['status'] == 0) {
|
||||||
|
$status_updaten= mysql_query('UPDATE clan_fight_list SET status=3 WHERE id='.$row['id'].' LIMIT 1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function termineBereitsBelegt($clanid,$gclanid,$timestamp) {
|
||||||
|
global $errmsg;
|
||||||
|
$clan_qry= mysql_num_rows(mysql_query('SELECT id FROM clan_fight_list WHERE clan = '.$clanid.' AND status != 3 AND zeitpunkt = '.$timestamp));
|
||||||
|
$gclan_qry= mysql_num_rows(mysql_query('SELECT id FROM clan_fight_list WHERE gclan = '.$gclanid.' AND status != 3 AND zeitpunkt = '.$timestamp));
|
||||||
|
if ($clan_qry AND $gclan_qry) {
|
||||||
|
$errmsg= 'Dein Clan und der herausgeforderte Clan haben zu diesem Zeitpunkt bereits einen Clankampf!';
|
||||||
|
$err= 1;
|
||||||
|
} elseif ($clan_qry) {
|
||||||
|
$errmsg= 'Dein Clan hat zu diesem Zeitpunkt bereits einen Clankampf!';
|
||||||
|
$err= 1;
|
||||||
|
} elseif ($gclan_qry) {
|
||||||
|
$errmsg= 'Der herausgeforderte Clan hat zu diesem Zeitpunkt bereits einen Clankampf!';
|
||||||
|
$err= 1;
|
||||||
|
} else {
|
||||||
|
$err= 0;
|
||||||
|
}
|
||||||
|
return $err;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clanfightFromOwnClan($clanfightid,$userid='') {
|
||||||
|
$clanid= getClanOfUser($userid);
|
||||||
|
$clanfightcheck= mysql_fetch_assoc(mysql_query('SELECT clan from clan_fight_list WHERE id='.$clanfightid.' LIMIT 1'));
|
||||||
|
if ($clanfightcheck['clan'] == $clanid) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
global $errmsg;
|
||||||
|
$errmsg= '<p>Dieser Clankampf ist nicht von deinem Clan erstellt und kann somit nicht zurückgezogen werden!</p>';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clanfightToOwnClan($clanfightid,$userid='') {
|
||||||
|
$clanid= getClanOfUser($userid);
|
||||||
|
$clanfightcheck= mysql_fetch_assoc(mysql_query('SELECT gclan from clan_fight_list WHERE id='.$clanfightid.' LIMIT 1'));
|
||||||
|
if ($clanfightcheck['gclan'] == $clanid) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
global $errmsg;
|
||||||
|
$errmsg= '<p>Die Herausforderung von diesem Clankampf ist nicht an deinem Clan gerichtet!</p>';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkClanfight($clanfightid,$type='') {
|
||||||
|
if (is_numeric($clanfightid)) {
|
||||||
|
$clanfightcheck= mysql_fetch_assoc(mysql_query('SELECT status FROM clan_fight_list WHERE id='.$clanfightid.' LIMIT 1'));
|
||||||
|
if ($clanfightcheck) {
|
||||||
|
if ($clanfightcheck['status'] == 2 AND ($type == 'look' OR $type == 'look_survival')) {
|
||||||
|
return 1;
|
||||||
|
} elseif ($clanfightcheck['status'] != 0) {
|
||||||
|
global $errmsg;
|
||||||
|
$errmsg= '<p>Der Clankampf wurde bereits angenommen / abgelehnt!</p>';
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
global $errmsg;
|
||||||
|
$errmsg= '<p>Diesen Clankampf gibt es nicht!</p>';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
global $errmsg;
|
||||||
|
$errmsg= '<p>Die ID des Clankampfes ist kein numerischer Wert!</p>';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNumberOfFightersByClanfightID($clanfightid) {
|
||||||
|
$clankampf_informationen= mysql_fetch_assoc(mysql_query('SELECT numberoffighter FROM clan_fight_list WHERE id='.$clanfightid.' LIMIT 1'));
|
||||||
|
return $clankampf_informationen['numberoffighter'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function acceptClanfight($clanfightid,$chars) {
|
||||||
|
$chars= implode(",",$chars);
|
||||||
|
$status_pruefen= mysql_fetch_assoc(mysql_query('SELECT status FROM clan_fight_list WHERE id='.$clanfightid.' LIMIT 1'));
|
||||||
|
if ($status_pruefen['status'] == 0) {
|
||||||
|
$datensatz_updaten= mysql_query('UPDATE clan_fight_list SET gfighter="'.$chars.'", status=1 WHERE id='.$clanfightid) or die(mysql_error());
|
||||||
|
echo '<p>Der Clankampf wurde erfolgreich angenommen!</p>';
|
||||||
|
echo '<a href="index.php?as=clan/c_kampf">zurück zur Übersicht</a>';
|
||||||
|
} else {
|
||||||
|
echo '<p>Dieser Clankampf kann nichtmehr angenommen werden. Er wurde bereits angenommen!</p>';
|
||||||
|
echo '<a href="index.php?as=clan/c_kampf">zurück zur Übersicht</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteClanFight($clanfightid) {
|
||||||
|
$clankampf_loeschen= mysql_query('DELETE FROM clan_fight_list WHERE id='.$clanfightid.' LIMIT 1');
|
||||||
|
echo '<p>Herausforderung erfolgreich zurückgezogen!</p>';
|
||||||
|
echo '<a href="index.php?as=clan/c_kampf">zurück zur Übersicht</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getClanOptions(){
|
||||||
|
$sql = 'SELECT clanname, id FROM clan order by clanname';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
$options = '';
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$options .= '<option value="'.$row[id].'">'.$row[clanname].'</option>';
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Diese Funktion liefert alle Karaktaere des Clans mit der id $clanid.
|
||||||
|
// Sortiert werden die Eintraege nach Trainer und Charname
|
||||||
|
function getCharacterOptions($clanid){
|
||||||
|
$sql = 'SELECT c.name, c.id, u.nickname FROM chars c LEFT JOIN user u ON (u.id=c.besitzer) WHERE u.clan='.$clanid.' ORDER BY u.nickname, c.name ASC';
|
||||||
|
$qry = mysql_query($sql);
|
||||||
|
$options = '';
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
$options .= '<option value='.$row[id].'>'.$row[name].' ('.$row[nickname].')</option>';
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getActualClanChallengeInformation($clanid,$userid){
|
||||||
|
$string = '<table>';
|
||||||
|
#$kaempfe = mysql_query('SELECT u.aktiv, u.besitzer, c.clanname, c2.clanname as clanname2, u.tick, u.id FROM clan_k_list u LEFT JOIN clan c ON(u.besitzer=c.id) LEFT JOIN clan c2 ON(u.an = c2.id )WHERE u.an='.$clanid.' OR u.besitzer='.$clanid.' ORDER BY tick ASC');
|
||||||
|
$kaempfe_query= mysql_query('SELECT * FROM clan_fight_list WHERE (clan='.$clanid.' OR gclan='.$clanid.') AND status=0 ORDER BY zeitpunkt DESC');
|
||||||
|
$informationen_eigener_clan= getClanInformation($clanid);
|
||||||
|
while($row = mysql_fetch_assoc($kaempfe_query)) {
|
||||||
|
if($row['clan'] == $clanid) {
|
||||||
|
$claninformationen= getClanInformation($row['gclan']);
|
||||||
|
if ($informationen_eigener_clan['leader'] == $userid OR $informationen_eigener_clan['co_leader'] == $userid) {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung an "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td> (<a href="index.php?as=clan/c_kampf&id=del&kid='.$row['id'].'">zurückziehen</a>) </td></tr>';
|
||||||
|
} else {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung an "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td> (zurückziehen) </td></tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$claninformationen= getClanInformation($row['clan']);
|
||||||
|
if ($informationen_eigener_clan['leader'] == $userid OR $informationen_eigener_clan['co_leader'] == $userid) {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung von "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>(<a href="index.php?as=clan/c_kampf&id=acc&kid='.$row['id'].'">annehmen</a> | <a href="index.php?as=clan/c_kampf&id=dec&kid='.$row['id'].'">ablehnen</a>)</td></tr>';
|
||||||
|
} else {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung von "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>(annehmen | ablehnen)</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$string .= '</table>';
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getActualClanFightInformation($clanid,$userid){
|
||||||
|
$string = '<table>';
|
||||||
|
#$kaempfe = mysql_query('SELECT u.aktiv, u.besitzer, c.clanname, c2.clanname as clanname2, u.tick, u.id FROM clan_k_list u LEFT JOIN clan c ON(u.besitzer=c.id) LEFT JOIN clan c2 ON(u.an = c2.id )WHERE u.an='.$clanid.' OR u.besitzer='.$clanid.' ORDER BY tick ASC');
|
||||||
|
$kaempfe_query= mysql_query('SELECT * FROM clan_fight_list WHERE clan='.$clanid.' OR gclan='.$clanid.' ORDER BY zeitpunkt DESC');
|
||||||
|
$informationen_eigener_clan= getClanInformation($clanid);
|
||||||
|
while($row = mysql_fetch_assoc($kaempfe_query)) {
|
||||||
|
if($row['clan'] == $clanid) {
|
||||||
|
$claninformationen= getClanInformation($row['gclan']);
|
||||||
|
if ($row['status'] == 1) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>anschauen</td></tr>';
|
||||||
|
} elseif ($row['status'] == 2) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td><a href="index.php?as=clan/c_kampf&id=look&kid='.$row['id'].'">anschauen</a></td></tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$claninformationen= getClanInformation($row['clan']);
|
||||||
|
if ($row['status'] == 1) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>anschauen</td></tr>';
|
||||||
|
} elseif ($row['status'] == 2) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td><a href="index.php?as=clan/c_kampf&id=look&kid='.$row['id'].'">anschauen</a></td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$string .= '</table>';
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getClanInformation($clanid){
|
||||||
|
return mysql_fetch_array(mysql_query('SELECT clanname, leader, id, co_leader FROM clan WHERE id='.$clanid));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getClanOfUser($userid){
|
||||||
|
$sql = 'SELECT clan FROM user WHERE id = '.$userid;
|
||||||
|
$row = mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
return $row[clan];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getStatusOfChar($charid) {
|
||||||
|
$sql= 'SELECT status FROM chars WHERE id='.$charid;
|
||||||
|
$row= mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
return $row[status];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNameOfChar($charid) {
|
||||||
|
$sql= 'SELECT status, name FROM chars WHERE id='.$charid;
|
||||||
|
$row= mysql_fetch_assoc(mysql_query($sql));
|
||||||
|
return 'Char: '.$row[name].' - Status: '.$row[status];
|
||||||
|
}
|
||||||
|
|
||||||
|
function erstelleClanKampf($userid, $clanid, $time, $chars, $numberoffighter, $clanfighttyp) {
|
||||||
|
$chars= implode(",",$chars);
|
||||||
|
$own_clan = getClanOfUser($userid);
|
||||||
|
$claninfo = getClanInformation($own_clan);
|
||||||
|
$claninfo2 = getClanInformation($clanid);
|
||||||
|
|
||||||
|
$anfrage_an_clan_bereits_vorhanden= mysql_num_rows(mysql_query('SELECT * FROM clan_fight_list WHERE clan='.$claninfo['id'].' AND gclan='.$claninfo2['id'].' AND zeitpunkt='.$time.' AND status=0'));
|
||||||
|
if ($anfrage_an_clan_bereits_vorhanden == 1) {
|
||||||
|
echo '<div style="text-align:center;"><input type="button" value="Zurück" onClick="history.back()"></div>';
|
||||||
|
echo '<p>Eine Anfrage für den '.date("d.m.Y H:i:s",$time).' an den Clan "'.$claninfo2['clanname'].'" wurde bereits gestellt!</p>';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$anfrage_von_clan_bereits_vorhanden= mysql_num_rows(mysql_query('SELECT * FROM clan_fight_list WHERE clan='.$claninfo2['id'].' AND gclan='.$claninfo['id'].' AND zeitpunkt='.$time.' AND status=0'));
|
||||||
|
if ($anfrage_von_clan_bereits_vorhanden == 1) {
|
||||||
|
echo '<div style="text-align:center;"><input type="button" value="Zurück" onClick="history.back()"></div>';
|
||||||
|
echo '<p>Eine Herausforderung für den '.date("d.m.Y H:i:s",$time).' vom Clan "'.$claninfo2['clanname'].'" wurde bereits an deinen Clan gestellt!</p>';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($claninfo2 == null){
|
||||||
|
return 'Der herauszufordernde Clan existiert nicht (mehr!';
|
||||||
|
}
|
||||||
|
if($userid != $claninfo[leader] && $userid != $claninfo[co_leader]){
|
||||||
|
return 'Nur der Leader, bzw. der Co-Leader kann Clan-kämpfe erstellen!';
|
||||||
|
}
|
||||||
|
|
||||||
|
$clankampfanfrage_eintragen = mysql_query("INSERT INTO clan_fight_list (id,clan,gclan,fighter,clanfighttyp,numberoffighter,zeitpunkt,status) VALUES ('','".$claninfo['id']."','".$claninfo2['id']."','".$chars."','".$clanfighttyp."','".$numberoffighter."','".$time."',0)");
|
||||||
|
if(!$foo){
|
||||||
|
return 'Error by sql: '.$sql.'<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function loescheKampf($userid, $kampfid){
|
||||||
|
if(!is_numeric($userid) || !is_numeric($kampfid)){
|
||||||
|
return 'Fehler beim Übertragen der Daten aufgetreten!';
|
||||||
|
}
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
$claninfo = getClanInformation($clanid);
|
||||||
|
if($userid != $claninfo[leader] && $userid != $claninfo[co_leader]){
|
||||||
|
return 'Nur der Leader, bzw. der Co-Leader kann das!';
|
||||||
|
}
|
||||||
|
$pruef = mysql_num_rows(mysql_query('SELECT id FROM clan_k_list WHERE (besitzer='.$clanid.' OR an='.$clanid.') AND id='.$kampfid));
|
||||||
|
if($pruef == 1){
|
||||||
|
if(mysql_query('DELETE FROM clan_k_list WHERE id = '.$kampfid)){
|
||||||
|
return '';
|
||||||
|
} else{
|
||||||
|
return 'Fehler beim löschen in der Datenbank';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nehmeKampfAn($userid, $kampfid, $chars){
|
||||||
|
if(!is_numeric($userid) || !is_numeric($kampfid) || !is_array($chars)){
|
||||||
|
return 'Fehler beim &Uml;bertragen der Daten augetreten!';
|
||||||
|
}
|
||||||
|
|
||||||
|
$clanid = getClanOfUser($userid);
|
||||||
|
$claninfo = getClanInformation($clanid);
|
||||||
|
if($userid != $claninfo[leader] && $userid != $claninfo[co_leader]){
|
||||||
|
return 'Nur der Leader, bzw. der Co-Leader kann das!';
|
||||||
|
}
|
||||||
|
|
||||||
|
$error = checkCharArray($clanid, $chars);
|
||||||
|
if($error != ''){
|
||||||
|
return $error;
|
||||||
|
}
|
||||||
|
$sql = 'Update clan_k_list SET aktiv = 1, gcharakter1 = '.$chars[1].', gcharakter2 = '.$chars[2].', gcharakter3 = '.$chars[3].', gcharakter4 = '.$chars[4].', gcharakter5 = '.$chars[5].', gcharakter6 = '.$chars[6].' WHERE aktiv = 0 and id = '.$kampfid.' and an='.$clanid;
|
||||||
|
if(mysql_query($sql)){
|
||||||
|
return '';
|
||||||
|
} else{
|
||||||
|
return 'Fehler beim einfuegen in der Datenbank';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkIfClanFightsToExecute($userid) {
|
||||||
|
$clanid= getClanOfUser($userid);
|
||||||
|
$qry = mysql_query('SELECT id, zeitpunkt, status FROM clan_fight_list WHERE clan='.$clanid.' OR gclan='.$clanid);
|
||||||
|
while($row = mysql_fetch_assoc($qry)){
|
||||||
|
if ($row['zeitpunkt'] <= time() AND $row['status'] == 1) {
|
||||||
|
$status_updaten= mysql_query('UPDATE clan_fight_list SET status=2 WHERE id='.$row['id'].' LIMIT 1');
|
||||||
|
clanFightExecute($row['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function starteClanFight($chara_1, $chara_2, $clanfight_id, $runde, $kampf){
|
||||||
|
global $sieger, $verlierer;
|
||||||
|
include 'kampf_clan.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
function clanFightExecute($id) {
|
||||||
|
$pkt_a_satz= 0;
|
||||||
|
$pkt_b_satz= 0;
|
||||||
|
$pkt_runde_a= 0;
|
||||||
|
$pkt_runde_b= 0;
|
||||||
|
$rundenzaehler= 1;
|
||||||
|
$kampfzaehler= 1;
|
||||||
|
|
||||||
|
$clanfight_daten= mysql_fetch_assoc(mysql_query('SELECT fighter, gfighter, numberoffighter FROM clan_fight_list WHERE id='.$id.' LIMIT 1'));
|
||||||
|
$fighter_a_array= explode(",",$clanfight_daten['fighter']);
|
||||||
|
$fighter_b_array= explode(",",$clanfight_daten['gfighter']);
|
||||||
|
|
||||||
|
for ($x=1;;$x++) {
|
||||||
|
|
||||||
|
/*if ($rundenzaehler == 7) {
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
$fighter_a= mt_rand(0, count($fighter_a_array)-1);
|
||||||
|
$fighter_b= mt_rand(0, count($fighter_b_array)-1);
|
||||||
|
|
||||||
|
$char_a= getChar2($fighter_a_array[$fighter_a]);
|
||||||
|
$char_b= getChar2($fighter_b_array[$fighter_b]);
|
||||||
|
|
||||||
|
starteClanFight($char_a, $char_b, $id, $rundenzaehler, $kampfzaehler);
|
||||||
|
|
||||||
|
$kampfzaehler++;
|
||||||
|
|
||||||
|
if ($fighter_a_array[$fighter_a] == $sieger) {
|
||||||
|
$pkt_a_satz++;
|
||||||
|
} else {
|
||||||
|
$pkt_b_satz++;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($fighter_a_array[$fighter_a]);
|
||||||
|
unset($fighter_b_array[$fighter_b]);
|
||||||
|
sort($fighter_a_array);
|
||||||
|
sort($fighter_b_array);
|
||||||
|
|
||||||
|
#if ($pkt_a_satz == 3 OR $pkt_b_satz == 3) {
|
||||||
|
if ($pkt_a_satz + $pkt_b_satz == $clanfight_daten['numberoffighter']) {
|
||||||
|
if ($pkt_a_satz > $pkt_b_satz) {
|
||||||
|
$pkt_runde_a++;
|
||||||
|
} elseif ($pkt_a_satz < $pkt_b_satz) {
|
||||||
|
$pkt_runde_b++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fighter_a_array= explode(",",$clanfight_daten['fighter']);
|
||||||
|
$fighter_b_array= explode(",",$clanfight_daten['gfighter']);
|
||||||
|
|
||||||
|
$rundenzaehler++;
|
||||||
|
$kampfzaehler= 1;
|
||||||
|
$pkt_a_satz= 0;
|
||||||
|
$pkt_b_satz= 0;
|
||||||
|
if ($pkt_runde_a + $pkt_runde_b == 6) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
### old function ###
|
||||||
|
/*function getActualClanFightInformation($clanid,$userid){
|
||||||
|
$string = '<table>';
|
||||||
|
#$kaempfe = mysql_query('SELECT u.aktiv, u.besitzer, c.clanname, c2.clanname as clanname2, u.tick, u.id FROM clan_k_list u LEFT JOIN clan c ON(u.besitzer=c.id) LEFT JOIN clan c2 ON(u.an = c2.id )WHERE u.an='.$clanid.' OR u.besitzer='.$clanid.' ORDER BY tick ASC');
|
||||||
|
$kaempfe_query= mysql_query('SELECT * FROM clan_fight_list WHERE clan='.$clanid.' OR gclan='.$clanid.' ORDER BY zeitpunkt DESC');
|
||||||
|
$informationen_eigener_clan= getClanInformation($clanid);
|
||||||
|
while($row = mysql_fetch_assoc($kaempfe_query)){
|
||||||
|
if($row['clan'] == $clanid) {
|
||||||
|
$claninformationen= getClanInformation($row['gclan']);
|
||||||
|
if($row['status'] == 0){
|
||||||
|
if ($informationen_eigener_clan['leader'] == $userid OR $informationen_eigener_clan['co_leader'] == $userid) {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung an "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td> (<a href="index.php?as=clan/c_kampf&id=del&kid='.$row['id'].'">zurückziehen</a>) </td></tr>';
|
||||||
|
} else {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung an "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td> (zurückziehen) </td></tr>';
|
||||||
|
}
|
||||||
|
} elseif ($row['status'] == 1) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>anschauen</td></tr>';
|
||||||
|
} elseif ($row['status'] == 2) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td><a href="index.php?as=clan/c_kampf&id=look&kid='.$row['id'].'">anschauen</a></td></tr>';
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
$claninformationen= getClanInformation($row['clan']);
|
||||||
|
if($row['status'] == 0){
|
||||||
|
if ($informationen_eigener_clan['leader'] == $userid OR $informationen_eigener_clan['co_leader'] == $userid) {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung von "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>(<a href="index.php?as=clan/c_kampf&id=acc&kid='.$row['id'].'">annehmen</a> | <a href="index.php?as=clan/c_kampf&id=dec&kid='.$row['id'].'">ablehnen</a>)</td></tr>';
|
||||||
|
} else {
|
||||||
|
$string .= '<tr><th valign="top">Herausforderung von "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>(annehmen | ablehnen)</td></tr>';
|
||||||
|
}
|
||||||
|
} elseif ($row['status'] == 1) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td>anschauen</td></tr>';
|
||||||
|
} elseif ($row['status'] == 2) {
|
||||||
|
$string .= '<tr><th valign="top">Clankampf gegen "'.$claninformationen['clanname'].'" am '.date("d.m.Y H:i:s",$row['zeitpunkt']).'</td><td><a href="index.php?as=clan/c_kampf&id=look&kid='.$row['id'].'">anschauen</a></td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$string .= '</table>';
|
||||||
|
return $string;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hier muss echt mal aufgeräumt werden
|
||||||
|
* ne Menge altlasten hier
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Immer den ganzen Pfad angeben, dann hat man es einfacher ^^
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/db.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/server.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/settings.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/speed_config.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/online.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/user.inc.php');
|
||||||
|
|
||||||
|
// Referer statistics (no use for this in the moment)
|
||||||
|
//$rs = strpos($_SERVER['HTTP_REFERER'],'//');
|
||||||
|
//if($rs !== FALSE){
|
||||||
|
// $rs += 2;
|
||||||
|
// $ls = strpos($_SERVER['HTTP_REFERER'],'/', $rs);
|
||||||
|
// if($ls !== FALSE){
|
||||||
|
// $referer = substr($_SERVER['HTTP_REFERER'],$rs, $ls-$rs);
|
||||||
|
// } else{
|
||||||
|
// $referer = substr($_SERVER['HTTP_REFERER'],$rs);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//mysql_query('Update referer set anzahl = anzahl + 1 where url = \''.$referer.'\' and datum = CURRENT_DATE');
|
||||||
|
//if(mysql_affected_rows() == 0){
|
||||||
|
// mysql_query('Insert into referer(url, anzahl, datum) values(\''.$referer.'\', 1, CURRENT_DATE)');
|
||||||
|
//}
|
||||||
|
|
||||||
|
$name = validateName($_COOKIE['name']);
|
||||||
|
$passwort = validateString($_COOKIE['passwort']);
|
||||||
|
|
||||||
|
if(!checkCookiePassword($name, $passwort)){
|
||||||
|
$POLOE = 1;
|
||||||
|
$user_ida = array();
|
||||||
|
} else {
|
||||||
|
$user_ida = mysql_fetch_assoc(mysql_query("SELECT * FROM user WHERE nickname='$name' LIMIT 1"));
|
||||||
|
mysql_query('UPDATE user SET ip=\'' . $_SERVER['REMOTE_ADDR'] . '\', online_zeit=now() WHERE id='.$user_ida['id']);
|
||||||
|
if ($online_rekord_1_0['anzahl'] < $online_r) {
|
||||||
|
mysql_query('UPDATE online SET anzahl='.$online_r.', datum=now() WHERE id=1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$banned_accs = mysql_num_rows(mysql_query("SELECT id FROM user WHERE ip!='' AND ip='$user_ida[ip]' AND id!='$user_ida[id]' LIMIT 2"));
|
||||||
|
$clan_nachricht = mysql_fetch_array(mysql_query("SELECT i.id FROM clan_k_list i LEFT JOIN clan c ON(c.id=i.an) WHERE i.anzeige='1' AND (c.leader='$user_ida[id]' OR c.co_leader='$user_ida[id]') AND i.an='$user_ida[clan]' LIMIT 1"));
|
||||||
|
|
||||||
|
if ($user_ida['id'] != null) {
|
||||||
|
$as = 'profil';
|
||||||
|
}
|
||||||
|
|
||||||
|
$pic_g31 = 75; ///////////Bild Groesse
|
||||||
|
|
||||||
|
if ($clan_nachricht['id']) {
|
||||||
|
|
||||||
|
print " <script language='JavaScript'>
|
||||||
|
<!--
|
||||||
|
alert('Sie wurden zum Clankampf Herausgefordert.');
|
||||||
|
//-->
|
||||||
|
</script>";
|
||||||
|
mysql_query("UPDATE clan_k_list SET anzeige='0' WHERE id='$clan_nachricht[id]' LIMIT 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if($user_ida[post]) {
|
||||||
|
$nachricht = mysql_fetch_assoc(mysql_query("SELECT count(id) as anzahl FROM nachricht WHERE aktiv='1' AND besitzer='$user_ida[id]' LIMIT 1"));
|
||||||
|
|
||||||
|
if($nachricht['anzahl'] > 0) {
|
||||||
|
print ' <script language="JavaScript"">
|
||||||
|
<!--
|
||||||
|
alert("Sie haben '.$nachricht['anzahl'].' neue Nachrichten erhalten");
|
||||||
|
//-->
|
||||||
|
</script>';
|
||||||
|
mysql_query("UPDATE nachricht SET aktiv='0' WHERE besitzer='$user_ida[id]'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
?>
|
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 11.08.2008
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Liefert den HTML-Code für einen horizontalen Werbebanner
|
||||||
|
// @returns String des HTML-Codes
|
||||||
|
function getHorizontalAdvertisement(){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Liefert den HTML-Code für einen vertikalen Werbebanner
|
||||||
|
// @returns String des HTML-Codes
|
||||||
|
function getVerticalAdvertisement(){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Liefert den HTML-Code für einen quadratischen Werbebanner
|
||||||
|
// @returns String des HTML-Codes
|
||||||
|
function getBoxAdvertisement(){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Liefert den HTML-Code für einen Layer-Werbedienst
|
||||||
|
// @returns String des HTML-Codes
|
||||||
|
function getLayerAdvertisement(){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 16.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$awards[] = '<a target="_blank" href="http://www.gnu.org/licenses/lgpl.html"><img src="http://www.gnu.org/graphics/lgplv3-88x31.png" style="border: 0pt none ; width: 88px; height: 31px;" alt="LGPL"></a>';
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 11.08.2008
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
# Um die Datenbank nutzen zu koennen muss eine db.inc.php erstellt werden, bitte diese nicht in die Versionskontrolle einfügen!!
|
||||||
|
|
||||||
|
#####Online Bitte für localhost eintragen!!
|
||||||
|
$db_host = "Server";
|
||||||
|
$db_user ="username";
|
||||||
|
$db_passwort ="password";
|
||||||
|
$db_name = "databasename";
|
||||||
|
|
||||||
|
$main_db_name = "otherdatabasename";
|
||||||
|
$GLOBALS['mumble_db_name'] = "anotheradatabasename";
|
||||||
|
|
||||||
|
if(!isset($conn)){
|
||||||
|
$conn = mysql_connect($db_host, $db_user, $db_passwort);
|
||||||
|
$db = mysql_select_db($db_name, $conn);
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Created on 16.03.2009
|
||||||
|
*
|
||||||
|
* @copyright (c) 2009 animegame.eu
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$partner[] = '<a href="http://www.animedimension.de/ag" target="_blank"><img src="design/banner/adbanner.gif" border="0" alt="Animedimension"></a>';
|
||||||
|
$partner[] = '<a href="http://www.narutobattle.de/ag" target="_blank"><img src="design/banner/nb-banner.png" border="0" alt="Narutobattle"></a>';
|
||||||
|
$partner[] = '<a href="http://www.kemomi.de/naruto" target="_blank"><img src="design/banner/ng-banner.png" border="0" alt="Narutogame"></a>';
|
||||||
|
$partner[] = '<a href="http://x-fighters.org/ag" target="_blank"><img src="design/banner/xfighters.gif" border="0" alt="x-Fighters"></a>';
|
||||||
|
|
||||||
|
|
||||||
|
?>
|