Jump to content


Photo

Verification problems


  • Please log in to reply
No replies to this topic

#1 zombie_002

zombie_002
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 September 2006 - 08:40 PM

What file is the default mail verification in so i can edit it there. because i have a screen that allows you to register i just need it to actualy send the verification email ( For Registering) I looked in the mainfile.php and found this is this what i need to edit?

}

function validate_mail($email) {
  if(strlen($email) < 7 || !preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
    //include_once("header.php");
    OpenTable();
    echo _ERRORINVEMAIL;
    CloseTable();
    //include_once("footer.php");
  }
  else {
    return $email;
  }
}

function encode_mail($email) {
  $finished = "";
  for($i=0; $i<strlen($email); ++$i) {
    $n = mt_rand(0, 1);
    if($n) {
      $finished .= '&#x'.sprintf("%X",ord($email{$i})).';';
    }
    else {
      $finished .= '&#'.ord($email{$i}).';';
    }
  }
  return $finished;
}

function paid() {
global $db, $user, $cookie, $adminmail, $sitename, $nukeurl, $subscription_url, $user_prefix, $prefix;
if (is_user($user)) {
if (!empty($subscription_url)) {
$renew = ""._SUBRENEW." $subscription_url";
} else {
$renew = "";
}
cookiedecode($user);
$sql = "SELECT * FROM ".$prefix."_subscriptions WHERE userid='$cookie[0]'";
$result = $db->sql_query($sql);
$numrows = $db->sql_numrows($result);
$row = $db->sql_fetchrow($result);
if ($numrows == 0) {
return 0;
} elseif ($numrows != 0) {
$time = time();
if ($row['subscription_expire'] <= $time) {
$db->sql_query("DELETE FROM ".$prefix."_subscriptions WHERE userid='$cookie[0]' AND id='".intval($row['id'])."'");
$from = "$sitename <$adminmail>";
$subject = "$sitename: "._SUBEXPIRED."";
$body = ""._HELLO." $cookie[1]:\n\n"._SUBSCRIPTIONAT." $sitename "._HASEXPIRED."\n$renew\n\n"._HOPESERVED."\n\n$sitename "._TEAM."\n$nukeurl";
$row = $db->sql_fetchrow($db->sql_query("SELECT user_email FROM ".$user_prefix."_users WHERE id='$cookie[0]' AND nickname='$cookie[1]' AND password='$cookie[2]'"));
mail($row['user_email'], $subject, $body, "From: $from\nX-Mailer: PHP/" . phpversion());
}
return 1;
}
} else {
return 0;
}
}






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users