Parašė paulinis· 2008 Gru. 30 09:12:33
#1
Ikeliau anketa. Kai paspaudi "siusti" ismeta kad puslapio nerado. Sita koda issaugaujau i anketa.php ir ikeliau i web failus
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
if(iGEUST){
//Config
$adminID = 'pj2pain';
//Config
if(!$puslapis){
opentable('Anketa');
echo"
<form name='siustiZem' method='post' action='adminreg.php?puslapis=siusti'>
<table border='0'>
<tr><td>
Užpildykite žemiau esančia anketa. Gal tapsite nariu.
</td>
<table border='0'>
<tr><td>
Nick:
</td><td>
<input type='text' name='csnickas' maxlength='60' class='textbox' style='width:300px;'>
</td></tr><tr><td>
Vardas:
</td><td>
<input type='text' name='vardas' maxlength='60' class='textbox' style='width:300px;'>
</td></tr><tr><td>
Kiek Zaidi:
</td><td>
<input type='text' name='kiekzaidics' maxlength='60' class='textbox' style='width:300px;'>
</td></tr><tr><td>
Skype:
</td><td>
<input type='text' name='skype' maxlength='60' class='textbox' style='width:300px;'>
</td>
</tr><tr><td colspan='2' align='center'><input type='submit' name='haomeris' style='width:150px' value='Siusti' class='button'></td></table></form>";
closetable();}
if($puslapis == 'siusti'){
if(empty($nickas)){ $err[]="Neįvestas Nickas"; }
if(empty($vardas)){ $err[]="Neįvestas Vardas"; }
if(empty($adresas)){ $err[]="Neįvestas Kiek Zaidi"; }
if(empty($skype)){ $err[]="Neįvestas Skype"; }
if (!$err){
$message = '
Nickas: '.$csnickas.'\n
Vardas: '.$vardas.'\n
Kiek zaidi: '.$kiekzaidics.'\n
Skype: '.$skype.'\n ';
dbquery("INSERT INTO ".$db_prefix."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('".$adminID."','".$userdata['user_id']."','Uzsakyti','".$message."','0','0','".time()."','0')");
opentable('Issiusta');
echo" Anketa priimta ir issiusta Administratoriams,<br/>
Dekojame.";
closetable();
} else {
opentable('Klaidos');
for ($i=0;$i<count($err);$i++) {
echo "-".$err[$i]."<br/>"; }
echo'<br/><a href="adminreg.php?">Grįžkite atgal, ir uzpildykite visa anketa.</a>';
closetable();
}
}
}else{redirect(BASEDIR.'register.php');}
require_once "side_right.php";
require_once "footer.php";
?>
Redagavo paulinis· 2008 Gru. 30 09:12:06