<? ini_set('session.cookie_domain', substr($_SERVER['SERVER_NAME'],strpos($_SERVER['SERVER_NAME'],"."),100)); session_start(); $username = $_SESSION['myusername']; echo "<b>"."Welcome ". $username."</b>"; if(!session_is_registered(myusername)){ header("location:index.php"); } ?> <html> <body> <br> Login Successful!<br> <? function redirecta($url) { echo "<meta http-equiv=\"refresh\" content=\"1; URL=".$url."\">"; } echo "Redirecting to main in 1..."; redirecta("http://portal.cryptum.net"); ?> </body> </html>
} } require_once('/home/cryptum1/public_html/weblib/recaptchalib.php'); $privatekey = ""; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly echo "Captcha entered incorrectly. Redirecting"; redirecta("javascript:history.go(-1)"); } else { $comment = $_POST['com']; $host="localhost"; // Host name $username="******"; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="homepage"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");
{ echo "<meta http-equiv=\"refresh\" content=\"1; URL=".$url."\">"; } if ($_POST['myusername'] != null) { require_once('/home/cryptum1/public_html/recaptchalib.php'); $privatekey = "6LcTa8ASAAAAANWrs227JBUcqH_yPV80JqXae7Aq"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly echo "Account created Successfully!"; redirecta("http://login.cryptum.net"); } else { // Your code here to handle a successful verification } } include("/home/cryptum1/public_html/template.php"); ?> <script type=text/javascript> function checkpwd() { var a = document.getElementById('mypassword'); var b = document.getElementById('confirmpassword'); if (a.value != b.value)
redirecta("javascript:history.go(-1)"); } else { $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="cryptum1_posts"; // Database name $tbl_name="homepage"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); date_default_timezone_set('Australia/Brisbane'); $time = date('d/m/Y h:i a', time()); mysql_query("INSERT INTO `homepage` (title,text,author,topic,time) VALUES ('$title','$text','Annonymous','$topic','$time')"); echo "Thanks Post Submitted. <br> Redirecting in 1 second..."; redirecta("http://cryptum.net/"); // Your code here to handle a successful verification } } } else { echo "<h3>I dont want any posts right now</h3>"; redirecta("http://cryptum.net/"); } ?>