include $cale . 'head' . $v . '.txt';
include $cale . 'tags.txt';
include $cale . 'javas.txt';
echo "\r\n";
if ($v != 'wallpaperxe') echo "
750) {writeMenus(document.body.clientWidth/2-200);} else {writeMenus(180);}\" onResize=\"if (isNS4) nsResizeHandler();HideZ();if (document.body.clientWidth>750) {writeMenus(document.body.clientWidth/2-200);} else {writeMenus(180);}\">\r\n";
else echo "750) {writeMenus(document.body.clientWidth/2-200);} else {writeMenus(180);}\" onResize=\"if (isNS4) nsResizeHandler();HideZ();if (document.body.clientWidth>750) {writeMenus(document.body.clientWidth/2-200);} else {writeMenus(180);}\">\r\n";
if(empty($action)) {
include $cale . 'header' . '.txt';
include $cale . 'body' . $v . '.txt';
}
else {
switch ($action ) {
case 'subscribe' : include $cale . 'header.txt';
//if ($email=="") $email=$email2;
if ((eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$email))||(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$email2)))
{
if($submit=="Sign Up Now") {
$subject = "Confirm your subscription to: Amic Games Newsletter";
include 'connection.inc.php';
$baza=array('0','1','2','3','4','5','6','7','8','9','0','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
$cod='';
for ($i=1; $i<=10;$i++){
$cod=$cod.$baza[rand(0,count($baza)-1)];
}
$time=time();
$mailtemp_sql=mysql_query("INSERT INTO mailtemp (prenumele,numele,email,code,time) VALUES ('$sname','$lname','$email','$cod',$time)");
$text = "Hello " . $sname . ",\n\n A few minutes ago, you entered your email address at www.amicgames.com to be added to our mailing list.\n This list has a double optin feature so you must visit the URL listed below to confirm your subscription:\n\n http://www.amicgames.com/confirm.php?cod=$cod \n\n Sincerely,\n Alexandru Marias\n\n______________\n You receive this message because your email address was entered at http://www.amicgames.com/ ( from IP:$REMOTE_ADDR)\n If this message was sent in error, please disregard it and no further messages will be sent.\n";
include $cale . 'subscribeok.txt';
mysql_close();
}else {
$subject = "Unsubscribed from Amic Games Newsletter";
include 'connection.inc.php';
$email=$email2;
$text = "Hello,\n\n Your email address have been removed from our database.\n\n Sincerely,\n Alexandru Marias\n Amic Games\n www.amicgames.com\n";
$maillist_sql=mysql_query("DELETE FROM maillist WHERE email='$email'");
include $cale . 'unsubscribeok.txt';
mysql_close();
}
mail("$email","$subject","$text","From: Amic Games \r\n"
."X-Mailer: PHP/" . phpversion());
}
else include $cale . 'subscribeerror.txt';
break;
case 'submitpress' : include $cale . 'header.txt';
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail))
{
$text = "Nume: " . $exName . "; ";
$text .= "Adresa email: " . $exEmail . "; ";
$text .= "Publicatie: " . $exPublication . "; ";
$text .= "Comentariu: " . $exComments . "; ";
$subject = "New Press List member";
mail("alex@amicgames.com","$subject","$text");
include $cale . 'pressok.txt';
}
else include $cale . 'subscribeerror.txt';
break;
case 'sendfeedback' : include $cale . 'header.txt';
echo "";
if ( (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) and
( $exName != "" ) and ( $exSubject != "" ) and ( $exMessage != "" ) )
{
$from="From: $exName<$exEmail>\r\nReturn-path: $exEmail";
$text = "Nume: " . $exName . "; ";
$text .= "Adresa email: " . $exEmail . "; ";
$text .= "Company: " . $exCompany . "; ";
$text .= "Phone: " . $exPhone . "; ";
$text .= "Product: " . $exProduct . "; \r\n";
$text .= "\r\n" . $exMessage . "; ";
$subject = "Online Form: " . $exSubject;
mail("support@amicgames.com", $subject, $text, $from);
include $cale . 'contactusok.txt';
}
else {
include $cale . 'contactuserror.txt';
if ( !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) echo " The email you entered appear to be invalid.
";
if ( $exName == "" ) echo " Name field is empty.
";
if ( $exSubject == "" ) echo " Subject field is empty.
";
if ( $exMessage == "" ) echo " Message box is empty.
";
echo "
Please press the back button of your browser and correct them.
";
echo "If you feel that this error screen should not appeared please write us at support@amicgames.com.
";
}
echo "";
break;
case 'sendidea' : include $cale . 'header.txt';
echo "";
if ( (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) and
( $exName != "" ) and ( $exGender != "" )and ( $exAge != "" ) and ( $exDescription != "" ) )
{
$text = "From: " . $exName . "; ";
$text .= "Email: " . $exEmail . "; ";
$text .= "Gender: " . $exGender . "; ";
$text .= "Age: " . $exAge . "; ";
$text .= "Description: " . $exDescription . "; ";
$from="From: $exName<$exEmail>\r\nReturn-path: $exEmail";
mail("support@amicgames.com", "Game Idea", $text, $from);
include $cale . 'contactusok.txt';
}
else {
include $cale . 'contactuserror.txt';
if ( !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) echo " The email you entered appear to be invalid.
";
if ( $exName == "" ) echo " Name field is empty.
";
if ( $exGender == "" ) echo " Gender field is empty.
";
if ( $exAge == "" ) echo " Age field is empty.
";
if ( $exDescription == "" ) echo " Description box is empty.
";
echo "
Please press the back button of your browser and correct them.
";
echo "If you feel that this error screen should not appeared please write us at support@amicgames.com.
";
}
echo "";
break;
case 'vote' : if(!empty($exVot)) { include $cale . 'voteok.txt';
$text = "Ip address: " . gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "(" . $_SERVER["REMOTE_ADDR"] . "); Vot: " . $exVot . "; ";
if(!empty($exAge)) $text .= "Varsta: " . $exAge . "; ";
if(!empty($exLastLevel)) $text .= "Ultimul Nivel Jucat: " . $exLastLevel . "; ";
$timp=time();print "\n";$t_timp=$timp-60*60*24;
include 'connection.inc.php';
$vote_sql=mysql_query("SELECT * FROM vote WHERE ip='$REMOTE_ADDR' AND time>$t_timp");
if (!($vote=mysql_fetch_object($vote_sql))){
$vote_sql=mysql_query("INSERT INTO vote (ip,time,value) VALUES ('$REMOTE_ADDR',$timp,'$exVot')");
}
$vote_sql=mysql_query("SELECT * FROM vote");
$rezultate=array();
while ($vote=mysql_fetch_object($vote_sql)){
if (array_key_exists($vote->value, $rezultate)){
$rezultate[$vote->value]++;
}else {$rezultate[$vote->value]=1;}
}
for ($i=0;$i| $a[$i] | | ";
}
print "
\n";
mysql_close();
}
else include $cale . 'voteerror.txt';
break;
case 'tell' : include $cale . 'header.txt';
if ( (!empty($exName)) and (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) and (!empty($frName)) and (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$frEmail)) and (!empty($exMessage)) ) {
include $cale . 'tellafriendok.txt';
$from="From: $exName<$exEmail>\r\nReturn-path: $exEmail";
mail($frEmail, "Cool site!", $exMessage, $from);
}
else {
echo "
The folowing errors occured:
";
if ( !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$exEmail)) echo " The email you entered appear to be invalid.
";
if ( $exName == "" ) echo " Your name field is empty.
";
if ( $exEmail == "" ) echo " Your email field is empty.
";
if ( $frName == "" ) echo " Your friend name field is empty.
";
if ( $frEmail == "" ) echo " Your friend email field is empty.
";
if ( $exMessage == "" ) echo " Message box is empty.
";
echo "
Please press the back button of your browser and correct them.
";
echo "If you feel that this error screen should not appeared please write us at support@amicgames.com.
";
}
include $cale . 'tellafrienderror.txt';
break;
case 'import' : include $cale . 'header.txt';
if ($HTTP_POST_FILES['file']['name']!=''){
if ($HTTP_POST_FILES['file']['size']<=500000){
move_uploaded_file($file, "temp/fis.txt");
} else $eroare="Fisierul este prea mare (<=500Kb)";
}
if ($passw==$parola_admin){
include 'admin.php';
if(empty($clear)){$clear="no";}
if(empty($formats)){$formats="no";}
importtxt('temp/fis.txt','maillist',$clear,$formats);
print "DONE!";
}else{print "PASSWORD INCORRECT!!!";}
break;
case 'sendmail' : include $cale . 'header.txt';
if ($passw==$parola_admin){
include 'admin.php';
mailsend('maillist',$from,$subject,$body);
print "DONE!";
}else{print "PASSWORD INCORRECT!!!";}
break;
case 'export' : include $cale . 'header.txt';
if ($passw==$parola_admin){
include 'admin.php';
exporttxt("temp/email.txt",'maillist');
print "Download!";
}else{print "PASSWORD INCORRECT!!!";}
break;
}
}
include $cale . 'footer.txt';
?>
?>