Parašė Mantas_· 2010 Sau. 16 14:01:41
#1
Sveiki, niekaip nesuprantu kodėl meta toki error'ą..
Notice: Undefined variable: nick in /home/xxxx/domains/xxxx/public_html/anketa.php on line 75
tokia eilute:
<input type='text' value='$sk' onclick=\"this.value=''\" name='Skype' maxlength='15' class='style7' style='width:120px;'>
Parašė Mantas_· 2010 Sau. 16 15:01:55
#3
<?php
session_start();
require_once "maincore.php";
require_once THEMES."templates/header.php";
include BASEDIR."local/Lithuanian/anketaLT.php";
$time=date("Y-m-d H:i:s");
$email=$userdata['user_email'];
if(!empty($userdata['user_web'])){
$web=$userdata['user_web'];
}else{
$web="";
}
if(!empty($userdata['user_aim'])){
$sk=$userdata['user_aim'];
}else{
$sk = "";
}
// Gavėjo ID pakeiskite pagal jūsų poreikius. SuperAdminas dažniausiai būna ID 1
$gavejoID = '1';
//MOD Created by Exz0sT`. Skype: marius-xp v.2.0
$puslapis = "";
if(!$puslapis){
opentable ("".$locale['001']."");
echo "<center><h3>".$locale['002']."</h3><br></center><br>";
echo "<form name='siustiZem' method='post' action='anketa.php?puslapis=siusti'>
<table border='0'><font color='blue'><b>Nario informacija:</b></font><tr><td>
<font color='red'>*</font> <b>Vardas, pavardė:</b>
</td>
<td>
<input class='adresas' value='$name' onclick=\"this.value=''\" name='name' type='text'>
<td><tr>
</td>
</tr><tr>
<td>
<font color='red'>*</font> <b>El.Paštas:</b>
</td>
<td>
<input type='text' value='$email' onclick=\"this.value=''\" name='email' maxlength='35' class='style7' style='width:180px;'>
</td></tr><tr><td>
<font color='red'>*</font> <b>Data:</b>
</td><td>
<input type='text' value='$data' onclick=\"this.value=''\" name='data' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Slapyvardis:</b>
</td><td>
<input type='text' value='$nick' onclick=\"this.value=''\" name='nick' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Miestas:</b>
</td><td>
<input type='text' value='$miestas' onclick=\"this.value=''\" name='miestas' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Telefonas:</b>
</td><td>
<input type='text' value='$tel' onclick=\"this.value=''\" name='tel' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Skype ID:</b>
</td><td>
<input type='text' value='$sk' onclick=\"this.value=''\" name='skype' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td><font color='blue'><b>Moto informacija:</b></font></td></tr>
<tr><td>
<font color='red'>*</font> <b>Moto pavadinimas:</b>
</td><td>
<input type='text' value='$moto' onclick=\"this.value=''\" name='moto' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Variklio darbinis tūris:</b>
</td><td>
<input type='text' value='$cc' onclick=\"this.value=''\" name='cc' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr><td>
<font color='red'>*</font> <b>Gamybos metai:</b>
</td><td>
<input type='text' value='$metai' onclick=\"this.value=''\" name='metai' maxlength='15' class='style7' style='width:120px;'>
</td></tr>
<tr>
<td>
<font color='red'>*</font> <b>".$locale['008']."</b> <h6>".$locale['009']."</h6>
</td>
<td><textarea name='info' class='style7' rows='5' cols='30' class='textbox'></textarea></td>
</td></tr><tr><td>
</tr><tr><td colspan='2' align='center'><br>
<img src='/includes/akneta_captcha/CaptchaSecurityImages.php?width=120&height=40&characters=5' /><br />
<label for='security_code'><font color='red'>*</font> Saugos kodas:<br></label><input id='security_code' name='security_code' type='text' /><br />";
echo "<fieldset>
<legend>Taisyklės:</legend><font color='red'>*</font> Pažymėtus laukelius, būtina įvesti!
<br><br>".$locale['reikalavimai']."
</fieldset>";
echo "".$locale['010']."
<input type='checkbox' name='taip'><br>
<input type='submit' name='siusti' style='width:70px' value='Siūsti' class='button'><input type='reset' value='Atstatyti' class='button'></td></table><br>
</form>";
closetable();}
if(isset($_GET['puslapis']) && $_GET['puslapis'] == 'siusti'){
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
$err="";
unset($_SESSION['security_code']);
} else {
$err[]="<font color='red'><b>Neteisingas saugos kodas!</font></b>"; }
if(empty($_POST['name'])){ $err[]="Neivestas vardas, pavardė."; }
if(empty($_POST['email'])){ $err[]="Neivestas El.Paštas"; }
if(empty($_POST['data'])){ $err[]="Neivesta data"; }
if(empty($_POST['nick'])){ $err[]="Neivestas slapyvardis"; }
if(empty($_POST['cc'])){ $err[]="Neivestas variklio darbinis tūris"; }
if(empty($_POST['metai'])){ $err[]="Neivesti gamybos metai"; }
if(empty($_POST['tel'])){ $err[]="Neivestas telefono numeris"; }
if(empty($_POST['miestas'])){ $err[]="Neivestas miestas"; }
if(empty($_POST['info'])){ $err[]="Neivesta Informacija"; }
if(empty($_POST['taip'])){ $err[]="Jūs nesutikote, kad atitinkate reikalavimus";}
if ($err==""){
$name = stripinput($_POST['name']);
$email = stripinput($_POST['email']);
$data = stripinput($_POST['data']);
$nick = stripinput($_POST['nick']);
$cc = stripinput($_POST['cc']);
$metai = stripinput($_POST['metai']);
$tel = stripinput($_POST['tel']);
$moto = stripinput($_POST['moto']);
$miestas = stripinput($_POST['miestas']);
$info = stripinput($_POST['info']);
$taip = stripinput($_POST['taip']);
$message = '
<b>Vardas, pavardė:</b> <b>.$name.</a></b>\n
<b>El. Paštas:</b> <b><a href="mailto:'.$email.'">'.$email.'</a></b>\n
<b>Data:</b> '.$data.'\n
<b>Slapyvardis:</b> '.$nick.'\n
<b>Variklio darbinis tūris:</b> '.$cc.'\n
<b>Gamybos metai:</b> '.$metai.'\n
<b>Telefonas:</b> '.$tel.'\n
<b>Moto:</b> '.$moto.'\n
<b>Miestas:</b> '.$miestas.'\n
<b>Skype ID:</b> <b><a href="skype:'.$Skype.'?chat">'.$Skype.'</a></b>\n
<b>Informacija:</b> '.$info.'\n
<b>Laikas:</b> '.date("Y-m-d H:i", time()).'\n ';
$result = dbquery("INSERT INTO ".$db_prefix."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder)
VALUES('".$gavejoID."','".$userdata['user_id']."','Užpildyta anketa!',".$nick.",".$cc.",".$metai.",".$tel.",".$moto.",".$miestas.",".$data.",'".$message."','0','0','".time()."','0')");
opentable ("".$locale['013']."");
echo "<fieldset><legend>Anketa išsiusta sėkmingai:</legend><br><br><center><img src='".BASEDIR."images/anketa/sekmingai.png' alt='Sėkmingai'><br><br><br>".$locale['012']."<br>[ <a href='".BASEDIR."index.php'>Sugryžti į pagrindidnį puslapį</a> ]<center></fieldset><br><br><br></span>";
closetable();
} else {
opentable ("".$locale['014']."");
for ($i=0;$i<count($err);$i++) {
echo "-".$err[$i]."<br/>"; }
echo '<br/>[ <a href="anketa.php?"><b> Grižti</b></a> ]';
closetable();
}
}
require_once THEMES."templates/footer.php";
?>
visas kodas.. errorai tokie:
Notice: Undefined variable: name in /home/mantukas/domains/xx/public_html/anketa.php on line 50
[code]Notice: Undefined variable: nick in /home/mantukas/domains/xx/public_html/anketa.php on line 64
[code]Notice: Undefined variable: miestas in /home/mantukas/domains/xx/public_html/anketa.php on line 69
[code]Notice: Undefined variaašel in /home/mantukas/domains/xx/public_html/anketa.php on line 74
[code]Notice: Undefined variable: moto in /home/mantukas/domains/xx/public_html/anketa.php on line 85
[code]Notice: Undefined variable: cc in /home/mantukas/domains/xx/public_html/anketa.php on line 90
Notice: Undefined variable: metai in /home/mantukas/domains/moto-fanai.lt/public_html/maklaudas/anketa.php on line 94