session_start();
// mysql settings
$m = 1;
$MySQL[$m]['Host'] = "localhost:3306";
$MySQL[$m]['Datenbank'] = "copybase_apic";
$MySQL[$m]['Benutzer'] = "Bibo";
$MySQL[$m]['Passwort'] = "63631150";
$MySQL[$m]['Verbindung'] = mysql_connect($MySQL[$m]['Host'],$MySQL[$m]['Benutzer'],$MySQL[$m]['Passwort']);
//mysql_select_db($MySQL[$m]['Datenbank']); // Alt :-)
$SelectDBQuery = mysql_query ( "USE copybase_apic" ); // Neu :-)
//std settings
$icon1 = "Bilder/headline_pfeil.gif";
$icon2 = "Bilder/small_red_pointer.gif";
$icon3 = "Bilder/down_arrow.gif";
$icon4 = "Bilder/inaktive.jpg";
$icon5 = "Bilder/hinweis.gif";
$icon6 = "Bilder/redarrowleft.gif";
$tablewidth1 = "470"; //* In px KEINE %
$linecolor = "#000000";
$linecolor2 = "#000000";
$prefix = "apiC_";
//Website Settings
$Conf['SiteUrl'] = "www.apic-es.de/";
?>
function checktable($Tabelle1,$Erstellen,$IDFeld = "id INT NOT NULL AUTO_INCREMENT PRIMARY KEY")
{
$Tabelle = mysql_query("SELECT * FROM ".$Tabelle1);
if(!$Tabelle)
{
$Erstellen = str_replace("\n","",$Erstellen);
$Tabelle2 = mysql_query("CREATE TABLE ".$Tabelle1." ( ".$IDFeld.", ".$Erstellen." ) ");
}
if($IDFeld == "delete")
{
$Tabelle3 = mysql_query("DROP TABLE ".$Tabelle1);
}
}
?>
// WERBUNG ?
$werbung = 1;
function thisdir( )
{
global $_SERVER;
$bla = explode("/",$_SERVER['REQUEST_URI']);
$path = "/";
for($i=0;$i<(count($bla)-1);$i++)
{
if($bla[$i] != "") $path .= $bla[$i]."/";
}
return $path;
}
$auth = "";
if($_REQUEST['action'] == "logout")
{
setcookie("name",strtolower($_POST['name']),(time()-1),"/",".apic-es.de");
setcookie("password",md5(strtolower($_POST['password'])),(time()-1),"/",".apic-es.de");
setcookie("userid",$row['id'],(time()-1),"/",".apic-es.de");
setcookie("level",$row['member_stufe'],(time()-1),"/",".apic-es.de");
if($_REQUEST['times'] != "2") header("Location: ".$_SERVER['REQUEST_URI']."×=2");
}
if($_POST['name'] && $_POST['password'])
{
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."members");
while($row = mysql_fetch_array($result[$i]))
{
if(strtolower($_POST['name']) == strtolower($row['member_name']))
{
if(md5(strtolower($_POST['password'])) == $row['member_passwort'])
{
$auth = 1;
setcookie("name",strtolower($_POST['name']),(time()+3600*24*7),"/",".apic-es.de");
setcookie("password",md5(strtolower($_POST['password'])),(time()+3600*24*7),"/",".apic-es.de");
setcookie("userid",$row['id'],(time()+3600*24*7),"/",".apic-es.de");
setcookie("level",$row['member_stufe'],(time()+3600*24*7),"/",".apic-es.de");
$AUTH['name'] = strtolower($_POST['name']);
$AUTH['password'] = md5(strtolower($_POST['password']));
$AUTH['userid'] = $row['id'];
$AUTH['level'] = $row['member_stufe'];
$auth = 1;
}
}
}
}
elseif($_COOKIE['name'] && $_COOKIE['password'])
{
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."members");
while($row = mysql_fetch_array($result[$i]))
{
if($_COOKIE['name'] == strtolower($row['member_name']))
{
if($_COOKIE['password'] == $row['member_passwort'])
{
$AUTH['name'] = $_COOKIE['name'];
$AUTH['password'] = $_COOKIE['password'];
$AUTH['userid'] = $_COOKIE['userid'];
$AUTH['level'] = $_COOKIE['level'];
$auth = 1;
}
}
}
if($auth != 1)
{
$AUTH['name'] = "";
$AUTH['password'] = "";
$AUTH['userid'] = "";
$AUTH['level'] = "";
}
}
if($werbung)
{
if($_REQUEST['click'] == "1")
{
setcookie("advert","1",(time()+3600*24*7),"/",".apic-es.de");
}
}
// VOTEZEUGS
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."questions ORDER BY id DESC LIMIT 1");
while($row=mysql_fetch_array($result[$i]))
{
$frageid = $row['id'];
}
if($_POST['reply'])
{
setcookie("voted_".$frageid,"1",(time()+3600*24*2),"/",".apic-es.de");
$voted = 1;
}
$string1 = "voted_".$frageid;
if($_COOKIE[$string1] == "1") $voted = 1;
?>
[* apiC-electronic.Sports - Since ²°°° *]
include_once "functions.php";
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."wars WHERE war_ergebnis1!='' ORDER BY war_datum DESC LIMIT 5");
$zeilen = 0;
while($row=mysql_fetch_array($result[$i]))
{
if(strlen($row['titel']) > 21) $newstitel = substr(stripslashes($row['titel']),0,21)."...";
else $newstitel = stripslashes($row['titel']);
echo "";
$zeilen++;
}
if(mysql_num_rows($result[$i]) < 1) echo "Keine Wars in der Datenbank!";
$lastwarsdone = 1;
?>
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."wars WHERE war_datum>'".time()."' ORDER BY war_datum ASC LIMIT 1");
while($row=mysql_fetch_array($result[$i]))
{
echo "";
}
if(mysql_num_rows($result[$i]) < 1) echo "Kein Match zurzeit! ";
?>
Sorry, die Seite 'user/index.php' wurde nicht gefunden auf www.apic-es.de!
include "reply.php";
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."questions ORDER BY id DESC LIMIT 1");
while($row=mysql_fetch_array($result[$i]))
{
$frage = $row['question'];
$frageid = $row['id'];
}
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."replies WHERE question='".$frageid."' ORDER BY id ASC");
while($row=mysql_fetch_array($result[$i]))
{
$id = $row['id'];
$antworten[$id] = $row['antwort'];
}
if(!$voted)
{
echo "
";
}
else
{
$i++;
$result[$i] = mysql_query("SELECT * FROM ".$prefix."replies WHERE question='".$frageid."'");
$id=0;
while($row=mysql_fetch_array($result[$i]))
{
$count[$id] = $row['counter'];
$question[$id] = $row['antwort'];
$id++;
}
foreach($count as $schluessel => $wert)
{
$insgesamt = $insgesamt + $wert;
}
foreach($question as $schluessel => $wert)
{
if($schluessel != (count($question) - 1))
{
if($insgesamt) $prozent[$schluessel] = $count[$schluessel] / $insgesamt * 100;
else $prozent[$schluessel] = 0;
$prozent[$schluessel] = round($prozent[$schluessel],1);
echo $question[$schluessel]."
".$prozent[$schluessel]."% (
".$count[$schluessel]." )
";
}
else
{
$thisteil = count($question) - 1;
$prozent[$thisteil] = 100;
for($i=0;$i<(count($question)-1);$i++)
{
$prozent[$thisteil] = $prozent[$thisteil] - $prozent[$i];
}
if(!$insgesamt) $prozent[$thisteil] = 0;
echo $question[$thisteil]."
".$prozent[$thisteil]."% (
".$count[$thisteil]." )
";
}
}
echo "
Insgesamt : [".$insgesamt."] ";
echo "";
}
?>
$Counter['Zeit'] = "1"; // Stunden, für die IP Sperre hält
$Counter['Zeit'] = $Counter['Zeit'] * 60 * 60;
$Counter['OnlineZeit'] = "5"; // Minuten
$Counter['OnlineZeit'] = $Counter['OnlineZeit'] * 60;
$Tage[0] = mktime(0,0,0,date("m"),date("d"),date("Y"));
if(!$_REQUEST['what']) $_REQUEST['what'] = "news/news.php";
if(mysql_num_rows(mysql_query("SELECT * FROM ".$prefix."stats WHERE stats_datum>'".(time() - $Counter['Zeit'])."' AND stats_ip='".$_SERVER['REMOTE_ADDR']."'")) > 0) $donot = "1";
else $donot = "0";
$i++;
$result[$i] = mysql_query("INSERT INTO ".$prefix."stats(stats_datum,stats_url,stats_ip,stats_donot) VALUES ('".time()."','index.php?".$_SERVER['QUERY_STRING']."','".$_SERVER['REMOTE_ADDR']."','".$donot."')");
$i++;
$result[$i] = mysql_query("DELETE FROM ".$prefix."online WHERE stats_datum<'".(time() - $Counter['OnlineZeit'])."' OR stats_ip='".$_SERVER['REMOTE_ADDR']."'");
$i++;
$result[$i] = mysql_query("INSERT INTO ".$prefix."online(stats_datum,stats_url,stats_ip) VALUES ('".time()."','index.php?".$_SERVER['QUERY_STRING']."','".$_SERVER['REMOTE_ADDR']."')");
include"counter/list.php";
?>
$render_time=$time_start-$time_stop; echo ( " Rendertime: ".$render_time." sec. " ); ?>