Purtroppo ho un grande problema.
Ho aperto un sito in altervista. Ho caricato un tool per un webgame preconfezionato. Adesso vorrei inserire un banner per fare qualche cents nella homepage.
Il sito in discussione č http://mouse84.altervista.org.
Se apro il codice sorgente me lo da editato in html contenente il codice php...
Ma se vado nel pannello di controllo del dominio la index contiente tutt'altro.
Se volete (moderatore permettendo) vi inserisco il codice in php che mi compare.
questo č il codice...
<?php
require_once "config.php";
// Update Statistics
require_once "create.php";
// Authentication
if (isset($_POST['name'])) {
$name = $_POST['name'];
// Read Player Info
$sql = "SELECT sid, pass, rechte, volk, aktiv ".
"FROM ".PREFIX."spieler ".
"WHERE name='".$name."'";
$result = mysql_query($sql) OR die(mysql_error());
$row = mysql_fetch_assoc($result);
// Playername not found
if (empty($row['sid'])) {
$fehler = text('login_wrong');
include "anmeldung.php";
// Wrong password
} elseif ($row['pass'] != md5($_POST['pass'])) {
$fehler = text('login_wrong');
include "anmeldung.php";
// Account locked
} elseif ($row['aktiv'] == '0') {
$fehler = text('login_inactive');
include "anmeldung.php";
// Authentication OK
} else {
// Create Session
$_SESSION[INSTANCE_KEY] = array(
'sid' => $row['sid'],
'name' => $name,
'pass' => $row['pass'],
'volk' => $row['volk'],
'rechte' => $row['rechte'],
'touch' => mktime(),
);
// Update last login date
$sql="UPDATE ".PREFIX."spieler ".
"SET lastlogin=NOW(), lasthost='".$_SERVER['REMOTE_ADDR']."' ".
"WHERE sid='".$row['sid']."'";
mysql_query($sql);
// Forward
fwd('user.php', str_replace('###PLAYER:NAME###', $name, text('login_success')));
}
// Already authenticated => go to own troops
} elseif (isset($_SESSION[INSTANCE_KEY])) {
include "user.php";
// Not authenticated => go to login
} else {
include "anmeldung.php";
}
?p>
Se apro la pagina e vado su codice sorgente mi esce tutt'altro... in html. Ho provato a cambiarlo, funziona tutto... meno che il login. E' come se non partisse lo script.
Allora mi chiedo... come posso aggiungere un banner a questa pagina facendo funzionare il login?
Se ho infranto qualche regola postando il codice php non bannatemi, piuttosto avvertitemi che riparo subito l'errore!
Grazie a tutti.