Probleme mit Funct. nach PHP Update 4.2 auf 4.3 (easyphp)
Verfasst: 16.06.2004 11:13
Hallo,
habe seit gestern abend ein Problem mit einigen Functions.
Ich habe ein Update von Easyphp 1.6 ( PHP Vers. 4.2) auf Easyphp 1.7 (PHP Vers. 4.3) durchgeführt und jetzt läuft meine Photovote Seite nicht mehr.
Es scheint Probleme mit einigen Funktionen bzw. SQL Anweiseungen zugeben. Irgednwie wird mein Code nicht mehr richtig interpretiert. Könnte mir da jemand bei der korrekten Formulierung helfen ?
Hier mal der Code:
habe seit gestern abend ein Problem mit einigen Functions.
Ich habe ein Update von Easyphp 1.6 ( PHP Vers. 4.2) auf Easyphp 1.7 (PHP Vers. 4.3) durchgeführt und jetzt läuft meine Photovote Seite nicht mehr.
Es scheint Probleme mit einigen Funktionen bzw. SQL Anweiseungen zugeben. Irgednwie wird mein Code nicht mehr richtig interpretiert. Könnte mir da jemand bei der korrekten Formulierung helfen ?
Hier mal der Code:
Code: Alles auswählen
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//include($phpbb_root_path . 'includes/function.inc.'.$phpEx);
//session_start();
//
//include ("../include/config.inc.php");
//include ("../include/specials.inc.php");
global $eintrag, $eintrag2, $anz, $richtung, $sortart, $eintrag;
//include ("../include/config.inc.php");
//include ("../include/specials.inc.php");
if (!isset($sortart) OR $sortart == "ALL"){
$sortart = "ALL";
$chiff = picture($usertable);
}
if ($sortart == "girls") {
$showquery = mysql_query("SELECT * FROM ".USERS_TABLE." WHERE (user_gender = '2' AND user_photo != '')");
$showanzahl = mysql_num_rows($showquery);
} elseif ($sortart == "boys") {
$showquery = mysql_query("SELECT * FROM ".USERS_TABLE." WHERE (user_gender = '1' AND user_photo != '')");
$showanzahl = mysql_num_rows($showquery);
}
if ($showanzahl >= $config["voting_user"]) {
//include ("../include/functions.inc.php");
?>
<html>
<head>
<title><?=$config["ie_header"]; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
</head>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="forumline">
<tr>
<th>
<?
if ($sortart == "girls") {
print "Frauen bewerten";
} elseif ($sortart == "boys") {
print "Männer bewerten";
}
?>
</th>
</tr>
<tr>
<td>
<table border="0" cellspacing="8" cellpadding="0" align="center">
<?
if ($sortart == "" OR $sortart == "alle"){
$result = mysql_query("SELECT count(*) FROM ".USERS_TABLE." 'WHERE user_id >= 0'");
$gesamt = mysql_result($result,0);
mt_srand(time());
$zeile = mt_rand(0,$gesamt-1);
$result = mysql_query("SELECT user_photo FROM ".USERS_TABLE." 'WHERE user_id >= 0'");
mysql_data_seek($result,$zeile);
$row = mysql_fetch_array($result);
$ausgabe = $row["chiff"];
mysql_free_result($result);
$chiff = $ausgabe;
}
if ($sortart == "boys"){
$result = mysql_query("SELECT count(*) FROM ".USERS_TABLE." WHERE (user_gender = '1' AND user_photo != '')");
$gesamt = mysql_result($result,0);
mt_srand(time());
$zeile = mt_rand(0,$gesamt-1);
$result = mysql_query("SELECT user_photo FROM ".USERS_TABLE." WHERE (user_gender = '1' AND user_photo != '')");
mysql_data_seek($result,$zeile);
$row = mysql_fetch_array($result);
$ausgabe = $row["user_photo"];
mysql_free_result($result);
$chiff = $ausgabe;
}
if ($sortart == "girls"){
$result = mysql_query("SELECT count(*) FROM ".USERS_TABLE." WHERE (user_gender= '2' AND user_photo!= '')");
$gesamt = mysql_result($result,0);
mt_srand(time());
$zeile = mt_rand(0,$gesamt-1);
$result = mysql_query("SELECT user_photo FROM ".USERS_TABLE." WHERE (user_gender = '2' AND user_photo!= '')");
mysql_data_seek($result,$zeile);
$row = mysql_fetch_array($result);
$ausgabe = $row["user_photo"];
mysql_free_result($result);
$chiff = $ausgabe;
}
$query = mysql_query("SELECT * FROM ".USERS_TABLE." WHERE user_photo = '$chiff'");
$anzahl = mysql_num_rows($query);
if ($anzahl == 0) {
$punkte = "0";
$anz_vote = "0";
$durchschnitt = "0";
} else {
$zeile = mysql_fetch_array($query);
$punkte = $zeile["user_vote"];
$anz_vote = $zeile["user_vote_anzahl"];
$note = ($punkte / $anz_vote);
$durchschnitt = round ($note ,2);