require ("../phpinc/include.php");
require ("../phpinc/userFunctions.php");
require ("../phpinc/helperFunctions.php");
require ("../phpinc/confirmEmailSP.php");
//
// checkRegInfo
//
// checks registration info
function checkRegInfo() {
global $errors, $in;
$localError = false;
// check service
if (strlen(trim(stripslashes($in->postArgs["firstName"])))<2 || strlen(trim(stripslashes($in->postArgs["firstName"])))>32) {
$localError = true;
$errors[] = "The required field First Name was not correctly filled.";
}
if (strlen(trim(stripslashes($in->postArgs["lastName"])))<2 || strlen(trim(stripslashes($in->postArgs["lastName"])))>32) {
$localError = true;
$errors[] = "The required field Last Name was not correctly filled.";
}
if (!ereg ("^[a-zA-Z0-9._-]+@([a-zA-Z0-9._-]+\.)+([a-zA-Z0-9_-]){2,5}$", $in->postArgs["email"])) {
$localError = true;
$errors[] = "The required field Email was not correctly filled.";
}
if ($localError==false) {
return true;
} else {
return false;
}
}
//
// checkLoginInfo
//
// checks login info
function checkLoginInfo() {
global $errors, $in;
if (!ereg ("^[a-zA-Z0-9._-]+@([a-zA-Z0-9._-]+\.)+([a-zA-Z0-9_-]){2,5}$", $in->postArgs["regEmail"])) {
$localError = true;
$errors[] = "The required field Email was not correctly filled.";
}
if ($localError==false) {
return true;
} else {
return false;
}
} // end checkLoginInfo
function getLink($service) {
switch ($service) {
case "SP":
$linkName = "http://www.internet-taxprep.com/plindex.asp?welcome=WL7959093";
break;
case "SP1":
$linkName = "http://www.internet-taxprep.com/plindex.asp?welcome=MY1311603";
break;
case "SP2":
$linkName = "http://www.internet-taxprep.com/plindex.asp?welcome=RK1327140&A=NY404";
break;
default:
$linkName = "http://www.e-file-online.com/";
break;
}
return $linkName;
}
function showPage($errorString="") {
global $in;
?>
Self-Prepared Online Tax Returns - 1040,1099,1040A,1040ez,1099 forms,audit,basic,business,calculators,capital gains,capital gains tax,child care credit,credits,deduction,deductions,deluxe,e file,education,efile,EFILE,efile,e-file,efile state,efile tax return,efile taxes,efiling,e-filing,electronic filing,employment,estate,estimates,experts,families,family savings,fast tax refund,federal income tax,federal income tax forms,federal income tax return,federal state tax return,federal tax form,federal tax refund,federal taxes,file tax extension,filing tax returns,forms,free file,free tax services,guides,help,homeowners,income tax,income tax forms,income tax information,income tax preparation,income tax return,information,internal revenue service,IRS,irs efile,irs forms,IRS income tax returns,irs tax,irs.gov,online filing,online preparation,online tax refunds,online tax return service,online taxes,personal income tax,personal tax return,planning,premier,prep,preparation,products,property,Pub 1 Your Rights As A Taxpayer,Pub 1546 The Taxpayer Advocate Service,Pub 17 Your Federal Income Tax (huge file),Pub 225 Farmer's Tax Guide,Pub 3 Armed Forces' Tax Guide,Pub 334 Tax Guide for Small Business,Pub 378 Fuel Tax Credits and Refunds,Pub 463 Travel Entertainment Gift and Car Exp.,Pub 501 Exemptions Standard Deduction and Filing,Pub 502 Medical and Dental Expenses,Pub 503 Child and Dependent Care Expenses,Pub 504 Divorced or Separated Individuals,Pub 505 Tax Withholding and Estimated Tax,Pub 508 Tax Benefits for Work-Related Education ,Pub 509 Tax Calendars for 2001,Pub 514 Foreign Tax Credit for Individuals,Pub 516 U.S. Government Civilian Employees...,Pub 517 Clergy and Religious Workers,Pub 519 U.S. Tax Guide for Aliens,Pub 520 Scholarships and Fellowships,Pub 521 Moving Expenses,Pub 523 Selling Your Home,Pub 524 Credit for the Elderly or the Disabled,Pub 525 Taxable and Nontaxable Income,Pub 526 Charitable Contributions,Pub 527 Residential Rental Property,Pub 529 Miscellaneous Deductions,Pub 530 Tax Information for First-Time Homeowners,Pub 531 Reporting Tip Income,Pub 533 Self-Employment Tax,Pub 535 Business Expenses ,Pub 536 Net Operating Losses,Pub 537 Installment Sales,Pub 54 U.S. Citizens and Resident Aliens Abroad,Pub 541 Partnerships,Pub 544 Sales and other Dispositions of Assets,Pub 547 Casualties Disasters and Thefts,Pub 550 Investment Income and Expenses,Pub 551 Basis of Assets,Pub 552 Recordkeeping for Individuals,Pub 554 Older Americans' Tax Guide,Pub 555 Community Property,Pub 556 Examination of Returns Appeals Refunds,Pub 559 Survivors Executors and Administrators,Pub 561 Determining the Value of Donated Property,Pub 564 Mutual Fund Distributions,Pub 570 Income from U.S. Possessions,Pub 575 Pension and Annuity Income,Pub 584 Casualty Disaster and Theft Loss Workbook ,Pub 587 Business Use of Your Home,Pub 590 Individual Retirement Arrangements,Pub 593 U.S. Citizens and Residents Going Abroad,Pub 594 The IRS Collection Process,Pub 595 Tax Highlights for Commercial Fishermen,Pub 596 Earned Income Credit,Pub 721 U.S. Civil Service Retirement Benefits,Pub 901 U.S. Tax Treaties,Pub 907 Persons With Disabilities,Pub 908 Bankruptcy Tax Guide,Pub 910 Guide to Free Tax Services,Pub 911 Direct Sellers,Pub 915 Social Security Benefits,Pub 919 How Do I Adjust My Tax Withholding?,Pub 925 Passive Activity and At-Risk Rules,Pub 926 Household Employer's Tax Guide,Pub 929 Tax Rules for Children and Dependents ,Pub 936 Home Mortgage Interest Deduction,Pub 939 General Rule for Pensions and Annuities,Pub 946 How to Depreciate Property,Pub 950 Introduction to Estate and Gift Taxes,Pub 967 the IRS Will Figure Your Tax,Pub 968 Tax Benefits for Adoption,Pub 969 Medical Savings Accounts,Pub 970 Tax Benefits for Higher Education,Pub 971 Innocent Spouse Relief,Pub 972 Child Tax Credit,question,resources,retirement,return,returns,service,software,software for tax,software solutions,software tax,tables,tax,tax advice,tax filing,tax filing online,tax refund,tax refunds,tax relief,tax return preparation,tax software,tax tips,taxes,taxes efile,taxes online,turbotax,TurboTax for the Web,turbotax.com,w2,w2 forms,Web,web-based prep
Enter your Registration Information below and you'll be redirected to our secure tax-return preparation server.
New Customers will receive a registration confirmation from E-file Online, Inc. to the email you provide. Privacy Information
}
$contactInfo = array();
$serviceId = 0;
$selectedService = "SP";
switch ($in->postArgs["action"]) {
case "formSubmit":
if (!empty($in->postArgs["APP1"])) {
$selectedService = "SP1";
} elseif (!empty($in->postArgs["APP2"])) {
$selectedService = "SP2";
} else {
$selectedService = "SP";
}
// if log in
if ($in->postArgs["submit"]=="Log-in") {
if (!checkLoginInfo()) {
showPage(showErrors());
break;
}
// login form filled ok
// check if he's already registered
$userRegInfo = getUserByEmail(strtolower(trim($in->postArgs["regEmail"])));
// an error occured
if ($userRegInfo==-1) {
showPage(showErrors());
break;
}
// user not registered
if ($userRegInfo==0) {
$errors[] = "Please register first.";
showPage(showErrors());
break;
}
// user was registered ($userRegInfo is an array containing id and clientCode)
// check if the user alredy got the requested service for the current fiscal year
$alreadyGotIt = checkIfAlreadyGot($userRegInfo["id"], $selectedService);
// an error occured
if ($alreayGotIt==-1) {
showPage(showErrors());
break;
}
// doesn't have it
if ($alreadyGotIt==0) {
// save service
if (!$serviceId = saveService($selectedService, $userRegInfo["id"], "0", "")) {
showPage(showErrors());
break;
}
}
// service inserted
// send him e-mail and redirect the user to the next page
if ($alreadyGotIt==0) {
switch ($selectedService) {
case "SP":
mailSPConf(stripslashes(strtolower($in->postArgs["regEmail"])), $userRegInfo["clientCode"], $serviceId);
break;
case "SP1":
mailSP1Conf(stripslashes(strtolower($in->postArgs["regEmail"])), $userRegInfo["clientCode"], $serviceId);
break;
case "SP2":
mailSP2Conf(stripslashes(strtolower($in->postArgs["regEmail"])), $userRegInfo["clientCode"], $serviceId);
break;
default:
break;
}
}
// redirect
redirect(getLink($selectedService));
exit;
break;
} elseif ($in->postArgs["submit"]=="Register") {
// if register
$contactInfo = array(
"id" => "0",
"firstName" => $in->postArgs["firstName"],
"lastName" => $in->postArgs["lastName"],
"email" => $in->postArgs["email"],
"address" => "",
"city" => "",
"state" => "",
"zip" => "",
"phoneArea" => "",
"phone1" => "",
"phone2" => "",
"speed" => "",
"newsletter" => ""
);
if (!checkRegInfo()) {
showPage(showErrors());
break;
}
// reg form filled ok
// check if he's already registered
$userRegInfo = getUserByEmail(strtolower(trim($contactInfo["email"])));
// an error occured
if ($userRegInfo==-1) {
showPage(showErrors());
break;
}
// user is not registered - register him
if ($userRegInfo==0) {
if (!$userRegInfo = registerUser($contactInfo)) {
showPage(showErrors());
break;
}
// user sucessfuly registered
$contactInfo["id"] = $userRegInfo["id"];
$contactInfo["clientCode"] = $userRegInfo["clientCode"];
} else {
// user was a registered user
$contactInfo["id"] = $userRegInfo["id"];
$contactInfo["clientCode"] = $userRegInfo["clientCode"];
}
// check if the user alredy got the requested service for the current fiscal year
$alreadyGotIt = checkIfAlreadyGot($contactInfo["id"], $selectedService);
// an error occured
if ($alreayGotIt==-1) {
showPage(showErrors());
break;
}
// doesn't have it
if ($alreadyGotIt==0) {
// save service and audit protection
if (!$serviceId = saveService($selectedService, $contactInfo["id"], "0" ,"")) {
showPage(showErrors());
break;
}
}
// user info inserted
// send him e-mail and redirect the user to the next page
if ($alreadyGotIt==0) {
switch ($selectedService) {
case "SP":
mailSPConf(stripslashes(strtolower($in->postArgs["email"])), $contactInfo["clientCode"], $serviceId);
break;
case "SP1":
mailSP1Conf(stripslashes(strtolower($in->postArgs["email"])), $contactInfo["clientCode"], $serviceId);
break;
case "SP2":
mailSP2Conf(stripslashes(strtolower($in->postArgs["email"])), $contactInfo["clientCode"], $serviceId);
break;
default:
break;
}
}
// show confirm page;
redirectWithOverture(getLink($selectedService));
exit;
break;
} else {
$errors[] = "Undefined action";
showPage(showErrors());
break;
}
default:
showPage();
break;
}
?>