Lawn Care Business Forum Lawn Care Business Book Lawn Care Business Blog Lawn Care Software
Home Forum Contract & Flyer Templates Blog Software Videos Podcast Calculators / Estimators Store Mower Review Design It Yourself Lawn Business School

Go Back   GopherHaul Landscaping & Lawn Care Business Marketing Forum

» Lawn Care Marketing
» Recent Threads
DG or Angel Mix?
11-19-2016 12:02 AM
by Jmoney
Last post by Steve
11-25-2016 12:43 PM
4 Replies, 206 Views
Introductiion
11-22-2016 06:45 AM
Last post by Chilehead
11-22-2016 11:21 PM
2 Replies, 336 Views
Say Hello !!!
03-19-2007 11:18 AM
by Steve
Last post by Steve
11-22-2016 12:02 PM
1,266 Replies, 450,465 Views
Win a FREE website
11-09-2016 05:14 PM
Last post by BugmanGA
11-20-2016 09:32 AM
8 Replies, 420 Views
Web development for Lawn...
11-19-2016 05:32 PM
by ProSvit
Last post by Just for Cuts
11-19-2016 09:05 PM
1 Replies, 213 Views
Need help bidding
02-13-2009 07:39 PM
By Pavia's Lawn Care
Last post by Steve
11-17-2016 05:58 PM
12 Replies, 3,718 Views
Best selling lawn care...
11-11-2016 12:18 PM
by Steve
Last post by Steve
11-11-2016 12:18 PM
0 Replies, 422 Views
I have a new show!
09-19-2016 06:50 PM
Last post by BugmanGA
11-10-2016 09:42 PM
8 Replies, 2,348 Views
What will be different...
11-09-2016 11:16 AM
by Steve
Last post by Chilehead
11-10-2016 09:07 AM
1 Replies, 899 Views
fliers
08-19-2016 03:23 PM
by joshp
Last post by Just for Cuts
11-03-2016 06:16 AM
13 Replies, 9,417 Views
". mysql_error()); } // Select the database $db_select = mysql_select_db($db_database); if (!$db_select){ die ("Could not select the database:
". mysql_error( )); } // for vbulletin echo ""; ?>
» GopherHaul Lawn Care Business School
"; // ******************************************************************************** function DisplayListOfClasses() { echo " "; echo "
"; echo "

GopherHaul Lawn Care Business School

"; echo "

"; echo "

"; echo "

Cirriculum: Class 1 - Lawn Care Business Operator's Certificate.


Choose your lecture topic and get started now.

"; echo "
    "; $query = "SELECT * FROM SchoolSections ORDER by OrderID"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $UniqueID=mysql_result($result,$i,"UniqueID"); $SectionName=mysql_result($result,$i,"SectionName"); echo "
  • $SectionName
  • "; $j = 0; $query2 = "SELECT * FROM SchoolDiscussionTopics WHERE TopicID='$UniqueID' ORDER by OrderID"; if (!(@mysql_query($query2,$connection))) showerror; $result2=mysql_query($query2); $num2=mysql_numrows($result2); $j=0; while ($j < $num2) { $TopicTitle=mysql_result($result2,$j,"TopicTitle"); $ClassID=mysql_result($result2,$j,"UniqueID"); echo "- $TopicTitle
    "; $j++; } $i++; } echo "

Your Report Card:
"; $query = "SELECT * FROM SchoolTestQuestions"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalSchoolTestQuestions = $num; $id = $_SESSION['id']; $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$id' AND AnsweredCorrectly='1'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalCorrectAnswers = $num; $ClassGrade = round((($TotalCorrectAnswers / $TotalSchoolTestQuestions) * 100)); // How many questions have you answered in total? $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$id'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalAnsweredQuestions = $num; echo "You have answered $TotalAnsweredQuestions questions so far. $TotalCorrectAnswers test questions have been answered correctly out of $TotalSchoolTestQuestions total test questions giving you a current grade of $ClassGrade%."; echo "

Graduation Requirements:
To graduate you need to answer all the questions and acquire a grade of 70% or better to pass this class. A grade 0f 90% or better will allow you to graduate with honors.

"; echo '
'; echo ""; echo "
"; echo "
"; } // ************************************************************** function DisplayApplyForGraduationPage($connection) { echo " "; echo "
"; echo "

GopherHaul Lawn Care Business School

"; echo "

"; echo "

"; echo "

Cirriculum: Class 1 - Lawn Care Business Operator's Certificate.


Your Report Card.

"; echo "
"; $query = "SELECT * FROM SchoolTestQuestions"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalSchoolTestQuestions = $num; $id = $_SESSION['id']; $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$id' AND AnsweredCorrectly='1'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalCorrectAnswers = $num; $ClassGrade = round((($TotalCorrectAnswers / $TotalSchoolTestQuestions) * 100)); // How many questions have you answered in total? $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$id'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalAnsweredQuestions = $num; echo "You have answered $TotalAnsweredQuestions questions so far. $TotalCorrectAnswers test questions have been answered correctly out of $TotalSchoolTestQuestions total test questions giving you a current grade of $ClassGrade%."; echo "

"; if ($TotalAnsweredQuestions == $TotalSchoolTestQuestions) { if (($ClassGrade >= 70) AND ($ClassGrade < 90)) { echo "Congratulations! You have graduated!

"; echo '
'; echo " "; echo "
"; // See if they have applied for graduation before, if not, and they graduated, make an entry of it. // right now it is hard coded in to be for class #1 $query = "SELECT * FROM SchoolGraduation Where UserID='$id' and ClassID='1'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $CurrentDate = date("Y-m-d"); // if there is no record, make a record. if ($num == 0) { $query = "Insert INTO SchoolGraduation (UserID, ClassID, DateGraduated) Values ('$id', '1', '$CurrentDate') "; if (!(@mysql_query($query,$connection))) showerror; } // pull up the graduates hash code $query = "SELECT * From sampletable Where id='$id'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $RandomHash=mysql_result($result,$i,"RandomHash"); $i++; } echo "

You may now use this banner to promote that you have passed this course. If you copy and paste the html code located below into your website, you will be able to have a link to our site where a potential customer can click on it to see your certificate and that you did indeed pass the course.



"; echo "

I do hope you enjoyed this class and learned from it. If you feel you have benefited from this course would you please consider making a donation of $9.95 to keep this school going. If there is interest, I will create more continuing education classes.

\"\"


Thank you so much,
Steve"; } elseif ($ClassGrade >= 90) { echo "Congratulations! You have graduated with Honors!"; echo '
'; echo " "; echo "
"; // See if they have applied for graduation before, if not, and they graduated, make an entry of it. // right now it is hard coded in to be for class #1 $query = "SELECT * FROM SchoolGraduation Where UserID='$id' and ClassID='1'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $CurrentDate = date("Y-m-d"); // if there is no record, make a record. if ($num == 0) { $query = "Insert INTO SchoolGraduation (UserID, ClassID, DateGraduated) Values ('$id', '1', '$CurrentDate') "; if (!(@mysql_query($query,$connection))) showerror; } // pull up the graduates hash code $query = "SELECT * From sampletable Where id='$id'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $RandomHash=mysql_result($result,$i,"RandomHash"); $i++; } echo "

You may now use this banner to promote that you have passed this course. If you copy and paste the html code located below into your website, you will be able to have a link to our site where a potential customer can click on it to see your certificate and that you did indeed pass the course.



"; echo "

I do hope you enjoyed this class and learned from it. If you feel you have benefited from this course would you please consider making a donation of $9.95 to keep this school going. If there is interest, I will create more continuing education classes.

\"\"


Thank you so much,
Steve"; } elseif ($ClassGrade < 70) { echo "Please go back and review your test answers. You will need a grade of at least 70% to graduate."; } } else { echo "You have not answered all the questions. Please go back and answer them all before your apply for graduation again."; // find the question(s) they did not answer and print them out. $query = "SELECT * FROM SchoolTestQuestions"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $TestQuestion=mysql_result($result,$i,"TestQuestion"); $UniqueID=mysql_result($result,$i,"UniqueID"); $query2 = "SELECT * FROM SchoolStudentTestScores Where UserID='$id' AND AnsweredCorrectly='1' AND TESTQUESTIONID='$UniqueID'"; if (!(@mysql_query($query2,$connection))) showerror; $result2=mysql_query($query2); $num2=mysql_numrows($result2); if ($num2 == 0) { echo "

You missed this question #$UniqueID \"$TestQuestion\" "; } $i++; } } echo "
"; } // ************************************************************** function DisplaySpecificTestQuestions($class, $TopicTitle) { echo "
"; //

GopherHaul Lawn Care Business School

echo "

GopherHaul Lawn Care Business School

"; echo "

"; echo "

"; echo "

Lecture Title: $TopicTitle

"; // $query = "SELECT SchoolTestQuestions.TestOrderID , SchoolTestQuestions.DiscussionTopicID , SchoolTestQuestions.UniqueID, SchoolTestQuestions.TestQuestion, SchoolStudentTestScores.AnsweredCorrectly From SchoolTestQuestions Join SchoolStudentTestScores ON SchoolStudentTestScores.TestQuestionID = SchoolTestQuestions.UniqueID Where DiscussionTopicID='$class' ORDER BY TestOrderID"; $query = "SELECT TestOrderID , DiscussionTopicID , UniqueID, TestQuestion From SchoolTestQuestions Where DiscussionTopicID='$class' ORDER BY TestOrderID"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $TestQuestion=mysql_result($result,$i,"TestQuestion"); $TestQuestionUniqueID=mysql_result($result,$i,"UniqueID"); $DiscussionTopicID=mysql_result($result,$i,"DiscussionTopicID"); $TestOrderID=mysql_result($result,$i,"TestOrderID"); $id = $_SESSION['id']; // see if this test question has already been answered $query2 = "SELECT AnsweredCorrectly From SchoolStudentTestScores Where TestQuestionID='$TestQuestionUniqueID' AND UserID='$id'"; if (!(@mysql_query($query2,$connection))) showerror; $result2=mysql_query($query2); $num2=mysql_numrows($result2); $j=0; while ($j < $num2) { $AnsweredCorrectly=mysql_result($result2,$j,"AnsweredCorrectly"); if ($AnsweredCorrectly == 1) { echo "
Answered Correctly
"; } elseif ($AnsweredCorrectly == 0) { echo "
Answered Incorrectly
"; } $j++; } echo '
'; echo "Test Question: $TestQuestion"; $query2 = "SELECT * From SchoolTestQuestionAnswers Where TestQuestionID='$TestQuestionUniqueID' ORDER BY AnswerID"; if (!(@mysql_query($query2,$connection))) showerror; $result2=mysql_query($query2); $num2=mysql_numrows($result2); $j=0; echo "
"; while ($j < $num2) { $AnswerText=mysql_result($result2,$j,"AnswerText"); $AnswerTextUniqueID=mysql_result($result2,$j,"UniqueID"); echo "$AnswerText
"; $j++; } echo "I don't know."; echo "
"; echo "
"; echo "

"; $i++; } // get the discussion again for the student to review. $query = "SELECT * From SchoolDiscussionTopics Where UniqueID='$class'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $TopicTitle=mysql_result($result,$i,"TopicTitle"); $TopicDiscussion=mysql_result($result,$i,"TopicDiscussion"); $i++; } echo "Discussion Review: $TopicDiscussion

"; // how many sections are there total and where is this one in the step process? $query = "SELECT * From SchoolDiscussionTopics Order By TopicID, OrderID "; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalTopicCount = $num; $i=0; while ($i < $num) { $UniqueID=mysql_result($result,$i,"UniqueID"); $TopicTitle=mysql_result($result,$i,"TopicTitle"); if ($UniqueID == $class) { $CurrentPosition = ($i + 1); } $i++; } echo "

"; // is this the last lesson? If not, what is the next lesson? if ($CurrentPosition < $TotalTopicCount) { $NextTopicTitle=mysql_result($result,$CurrentPosition,"TopicTitle"); $NextTopicUniqueID=mysql_result($result,$CurrentPosition,"UniqueID"); echo "You are at step $CurrentPosition of $TotalTopicCount total lessons.
"; echo "Remember to pace yourself, don't try to do this all at one sitting.
"; echo "Continue to your next lesson - $NextTopicTitle..."; } else { echo "This is your last lesson.
"; } echo "
"; } // ******************************************************************************** function ShowWelcomePageBecauseUserIsNotLoggedIn() { echo "

Welcome to the GopherHaul Lawn Care Business School.

"; echo "

This FREE course the \"Class 1 - Lawn Care Business Operator's Certificate\" is designed to give the new lawn care business owner a knowledge base to draw from and build a successful lawn care business.

There are a total of 69 lessons to this course with 193 multiple choice questions. Each lesson has on average 3 multiple choice questions for you to answer after reading. The total time to complete this course depends on how much you read per sitting. I would suggest pacing yourself and reading 3 lessons per sitting, which would take you 23 days to complete.

I do feel if you spend the time to focus and learn the content within this class, you will have a competitive advantage over other start up lawn care business owners. Don't re-create the wheel when you don't have too. The lessons in here pull from years of discussions with thousands of lawn care business owners on the Gopher Lawn Care Business Forum.

Now take an important step in the growth of your business and start your education today.

When you are finished, please click the apply for graduation button and if you pass the course requirements, you will receive a certificate to prove you have indeed graduated. I do look forwards to your feedback on this class.

Sincerely,
Steve "; echo '
'; echo "
"; echo '
'; echo "
"; } // *************************************************************************************************** if (isset($_POST['Logout'])) { // ************************************************************************ // BEGIN Logout // ************************************************************************ session_destroy(); echo "logged out"; //header("location:http://www.gopherforum.com"); } // ************************************************************************ // END Logout // ************************************************************************ elseif (isset($_POST['Welcome'])) { // ************************************************************************ // BEGIN User has logged in, Welcome Students // ************************************************************************ echo "welcome students"; echo '
'; echo "
"; // ************************************************************************ // END User has logged in, Welcome Students // ************************************************************************ } elseif (isset($_POST['Login'])) { // ************************************************************************ // BEGIN Login process // ************************************************************************ $myusername = mysqlclean($_POST,"myusername",100,$connection); $mypassword = mysqlclean($_POST,"mypassword",100,$connection); // ************************************************************ // BEGIN Submit Login attempt into Database // ************************************************************ $ip=$_SERVER['REMOTE_ADDR']; //$CurrentDate=date("m/d/y"); $CurrentTime= date("g:i a"); $CurrentDate = date("Y-m-d"); $query = "Insert INTO LogInTracking (UserName, Password, IPAddress, CurrentDate, CurrentTime) VALUES ('$myusername','$mypassword', '$ip', '$CurrentDate', '$CurrentTime')"; if (!(@mysql_query($query,$connection))) showerror; // ************************************************************ // END Submit Login attempt into Database // ************************************************************ $sql="SELECT * FROM sampletable WHERE LoginName = '$myusername' and LoginPassword = '$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // is there at least 1 record? if ($count > 0){ $i=0; $AccountStatus=mysql_result($result,$i,"AccountStatus"); $AccountType=mysql_result($result,$i,"AccountType"); $id=mysql_result($result,$i,"id"); } // If result matched $myusername and $mypassword, table row must be 1 row // The account status must be active which is 1 or it doesn't let you log in. if(($count==1) and ($AccountStatus == 1)){ // Register $id, $myusername, $mypassword //$id=mysql_result($result,"id"); $_SESSION['id'] = $id; $_SESSION['AccountStatus'] = $AccountStatus; $_SESSION['AccountType'] = $AccountType; // show the list of classes DisplayListOfClasses(); } else { echo "Wrong Username or Password"; } } // ************************************************************************ // End Login process // ************************************************************************ elseif (isset($_POST['RegisterNewAccount'])) { // ************************************************************************ // BEGIN Register New Student // ************************************************************************ echo "
Create a new GopherHaul Lawn Care Business Student account.


"; echo ""; echo ''; echo ""; echo " "; echo "
FieldData
First Name
Last Name
Email
Company Name
User Name
Password
Website
How did you hear about this site?
Please fill out all of this information and you will be emailed a validation link. If you have any problems registering make a post in the GopherHaul Lawn Care Business Forum here. Thanks, Steve
"; // ************************************************************************ // End Register New Student // ************************************************************************ } elseif (isset($_GET['h'])) { // ************************************************************************ // BEGIN Complete email verification link // ************************************************************************ $h = $_GET['h']; // i did this to put it into an array to then put it into mysqlclean $hArray = array("$h"); // $UserFirstName = mysqlclean($_POST,"UserFirstName",100,$connection); $h = mysqlclean($hArray,0,100,$connection); // $h = mysqlclean($h); // See if this hash number exists and see if they are a new account. I don't want users to be able to reactivate an account if I de-activated it for whatever reason. $query = "SELECT COUNT(*) as HashCount From sampletable Where RandomHash='$h' and AccountType='900'"; if (!(@mysql_query($query,$connection))) showerror; $i=0; $result=mysql_query($query); $HashCount=mysql_result($result,$i,"HashCount"); //don't allow it to enter a duplicate vote if ($HashCount == 1) { $query = "UPDATE sampletable SET AccountStatus = '1', AccountType = '1001' WHERE RandomHash = '$h'"; if (!(@mysql_query($query,$connection))) showerror; echo "Congratulations you are registered. You can now log in at the main log in page."; } else { echo "Something went wrong with your registration process, get on the forum and let me know."; } // ************************************************************************ // END Complete email verification link // ************************************************************************ } elseif (isset($_GET['class'])) { // ************************************************************************ // BEGIN Show the specific class // ************************************************************************ // check if they are logged in if(!session_is_registered(id)){ ShowWelcomePageBecauseUserIsNotLoggedIn(); } else { $class = $_GET['class']; // i did this to put it into an array to then put it into mysqlclean $classArray = array("$class"); // $UserFirstName = mysqlclean($_POST,"UserFirstName",100,$connection); $class = mysqlclean($classArray,0,100,$connection); $query = "SELECT * From SchoolDiscussionTopics Where UniqueID='$class'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $TopicTitle=mysql_result($result,$i,"TopicTitle"); $TopicDiscussion=mysql_result($result,$i,"TopicDiscussion"); $i++; } echo "
"; //

GopherHaul Lawn Care Business School

echo "

GopherHaul Lawn Care Business School

"; echo "

"; echo "

"; echo "

Lecture Title: $TopicTitle

"; echo "Discussion: $TopicDiscussion

"; echo "

"; echo "

"; echo "Continue to your test questions..."; echo '
'; echo "
"; echo "
"; } // ************************************************************************ // END Show the specific class // ************************************************************************ } elseif (isset($_POST['ContinueToTest'])) { // ************************************************************************ // BEGIN Show the specific class test question // ************************************************************************ $class = mysqlclean($_POST,"class",100,$connection); $TopicTitle = mysqlclean($_POST,"TopicTitle",100,$connection); DisplaySpecificTestQuestions($class, $TopicTitle); // ************************************************************************ // END Show the specific class test question // ************************************************************************ } elseif (isset($_POST['SubmitAnswer'])) { // ************************************************************************ // BEGIN Submit Answer // ************************************************************************ $class = mysqlclean($_POST,"class",100,$connection); $TopicTitle = mysqlclean($_POST,"TopicTitle",100,$connection); $SubmittedAnswer = mysqlclean($_POST,"SubmittedAnswer",100,$connection); $TestQuestionUniqueID = mysqlclean($_POST,"TestQuestionUniqueID",100,$connection); $id = $_SESSION['id']; $ip=$_SERVER['REMOTE_ADDR']; $CurrentTime= date("g:i a"); $CurrentDate = date("Y-m-d"); // See if is the correct answer $query = "SELECT CorrectAnswer From SchoolTestQuestionAnswers Where UniqueID ='$SubmittedAnswer'"; if (!(@mysql_query($query,$connection))) showerror; $i=0; $result=mysql_query($query); $num=mysql_numrows($result); while ($i < $num) { $CorrectAnswer=mysql_result($result,$i,"CorrectAnswer"); $i++; } // See if this has already been answered, if not, then make an entry for the answer $query = "SELECT COUNT(*) as AnswerCount From SchoolStudentTestScores Where UserID ='$id' and TestQuestionID ='$TestQuestionUniqueID'"; if (!(@mysql_query($query,$connection))) showerror; $i=0; $result=mysql_query($query); $AnswerCount=mysql_result($result,$i,"AnswerCount"); // BEGIN Only insert if this question hasn't been answered. // don't insert it if the id is zero that means the session timed out. if (($AnswerCount == 0) and ($id <> 0)) { $query = "Insert into SchoolStudentTestScores (UserID, TestQuestionID, SubmittedAnswer, IPAddress, TimeEntered, DateEntered, AnsweredCorrectly ) Values ('$id', '$TestQuestionUniqueID', '$SubmittedAnswer', '$ip', '$CurrentTime', '$CurrentDate', '$CorrectAnswer')"; if (!(@mysql_query($query,$connection))) showerror; } // question has been answered so update the answer. elseif (($AnswerCount == 1) and ($id <> 0)) { $query="UPDATE SchoolStudentTestScores SET SubmittedAnswer='$SubmittedAnswer', IPAddress='$ip', TimeEntered='$CurrentTime', DateEntered='$CurrentDate', AnsweredCorrectly='$CorrectAnswer' WHERE UserID='$id' AND TestQuestionID='$TestQuestionUniqueID'"; if (!(@mysql_query($query,$connection))) showerror; } DisplaySpecificTestQuestions($class, $TopicTitle); // ************************************************************************ // END Submit Answer // ************************************************************************ } elseif (isset($_POST['EnterNewStudentInformation'])) { // ************************************************************************ // BEGIN Send email verification to new student // ************************************************************************ //so we use the MD5 algorithm to generate a random hash $RandomHash = md5(date('r', time())); $CurrentTime= date("g:i a"); $CurrentDate = date("Y-m-d"); $UserFirstName = mysqlclean($_POST,"UserFirstName",100,$connection); $UserLastName = mysqlclean($_POST,"UserLastName",100,$connection); $Email = mysqlclean($_POST,"Email",100,$connection); $CompanyName = mysqlclean($_POST,"CompanyName",100,$connection); $LoginName = mysqlclean($_POST,"LoginName",100,$connection); $LoginPassword = mysqlclean($_POST,"LoginPassword",100,$connection); $ReferralDescription = mysqlclean($_POST,"ReferralDescription",100,$connection); $Website = mysqlclean($_POST,"Website",100,$connection); // See if this username already exists $query = "SELECT COUNT(*) as UserNameCount From sampletable Where LoginName='$LoginName'"; if (!(@mysql_query($query,$connection))) showerror; $i=0; $result=mysql_query($query); $UserNameCount=mysql_result($result,$i,"UserNameCount"); // BEGIN check to see if this is a unique user name if ($UserNameCount == 0) { $query = "Insert into sampletable (UserFirstName, UserLastName, Email, CompanyName, LoginName, ReferralDescription, LoginPassword, AccountType, RandomHash, DateJoined, Student, Website) Values ('$UserFirstName', '$UserLastName', '$Email', '$CompanyName', '$LoginName', '$ReferralDescription', '$LoginPassword', '900', '$RandomHash', '$CurrentDate', '1', '$Website')"; if (!(@mysql_query($query,$connection))) showerror; // echo "Your registration information has been sent for approval. Thank you."; // *************************************************** // BEGIN Email the registration information // *************************************************** //error_reporting(E_ALL); error_reporting(E_STRICT); date_default_timezone_set('America/Toronto'); //date_default_timezone_set(date_default_timezone_get()); include_once('./uploaded-files/pages/class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); //$body = $mail->getFile('contents.html'); //$body = eregi_replace("[\]",'',$body); $body = "Hi $UserFirstName,

Thanks for signing up to the GopherHaul Lawn Care Business School. Please visit this link to complete your registration.

http://www.gopherforum.com/index.php?pageid=GopherHaul-Lawn-Care-Business-School&h=$RandomHash

If you have problems logging in, log in here. http://www.gopherforum.com/index.php?pageid=GopherHaul-Lawn-Care-Business-School

Your Username is $LoginName
Password is $LoginPassword

If you have any problems at all logging in, let me know.

Thanks, Steve "; $body = eregi_replace("[\]",'',$body); $mail->IsSMTP(); // telling the class to use SMTP //$mail->Host = "mail.worxteam.com"; // SMTP server //$mail->Host = "mail.internection.com"; // SMTP server $mail->Host = "localhost" ; // SMTP server //$mail->From = "$CompanyEmail"; //$mail->FromName = "$CompanyName"; $mail->From = "slow@gophersoftware.com"; $mail->FromName = "Steve"; $mail->Subject = "GopherHaul Lawn Care Business School Registration"; $mail->AltBody = "Hi $UserFirstName, \n Thanks for signing up to the GopherHaul Lawn Care Business School. Please visit this link to complete your registration. Either click on the link or highlight it with your mouse, right click on it and left click copy, then paste it into your browser location. \n http://www.gopherforum.com/index.php?pageid=GopherHaul-Lawn-Care-Business-School&h=$RandomHash \n Your Username is $LoginName \n Password is $LoginPassword \n If you have any problems at all logging in, let me know. \n Thanks, Steve"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress("$Email", "$UserFirstName $UserLastName"); //$mail->AddCC($CompanyEmail, "$CompanyName"); // $mail->AddAttachment("phpmailer.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Hey $UserFirstName,
I just sent you an email to finalize your registration process.
Thanks,
Steve"; } // *************************************************** // End Email the registration information // *************************************************** // END check to see if this is a unique user name } else { echo "Go Back and please try another username that username is already in use."; } // ************************************************************************ // End Send email verification to new student // ************************************************************************ } elseif (isset($_POST['PleaseLogIn'])) { // ************************************************************************ // BEGIN Please Log In // ************************************************************************ echo " "; //echo ''; //echo ""; echo ''; echo "
"; echo "
GopherHaul Lawn Care Business School Login
Username :
Password :
   
If you are a new student, you need to create a new account."; //echo '
'; echo ''; echo "
"; } // ************************************************************************ // End Please Log In // ************************************************************************ elseif (isset($_POST['ApplyForGraduation'])) { // ************************************************************************ // BEGIN Apply for graduation // ************************************************************************ DisplayApplyForGraduationPage($connection); } // ************************************************************************ // END Apply for graduation // ************************************************************************ elseif (isset($_GET['graduate'])) { // ************************************************************************ // BEGIN show page of lawn care business owner's credentials upon request // ************************************************************************ $graduate = $_GET['graduate']; // i did this to put it into an array to then put it into mysqlclean $graduateArray = array("$graduate"); $graduate = mysqlclean($graduateArray,0,100,$connection); // pull up the graduates information $query = "SELECT * From sampletable Where RandomHash='$graduate'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $UserID=mysql_result($result,$i,"id"); $UserFirstName=mysql_result($result,$i,"UserFirstName"); $UserLastName=mysql_result($result,$i,"UserLastName"); $CompanyName=mysql_result($result,$i,"CompanyName"); $i++; } // pull up the graduates class information $query = "SELECT * From SchoolGraduation Where UserID='$UserID'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $ClassID=mysql_result($result,$i,"ClassID"); $i++; } if ($num > 0) { echo "

GopherHaul Lawn Care Business School



"; echo "We affirm $UserFirstName $UserLastName has passed the Class 1 - Lawn Care Business Operator's Certificate.

" ; $query = "SELECT * FROM SchoolTestQuestions"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalSchoolTestQuestions = $num; $id = $_SESSION['id']; $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$UserID' AND AnsweredCorrectly='1'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalCorrectAnswers = $num; $ClassGrade = round((($TotalCorrectAnswers / $TotalSchoolTestQuestions) * 100)); // How many questions have you answered in total? $query = "SELECT * FROM SchoolStudentTestScores Where UserID='$UserID'"; if (!(@mysql_query($query,$connection))) showerror; $result=mysql_query($query); $num=mysql_numrows($result); $TotalAnsweredQuestions = $num; If ($TotalAnsweredQuestions == $TotalSchoolTestQuestions) { if (($ClassGrade >= 70) AND ($ClassGrade < 90)) { echo '
'; echo " "; echo "
"; } elseif ($ClassGrade >= 90) { echo '
'; echo " "; echo "
"; } } echo "

To pass this course, the student must read the equivalent of 220 pages of text and answer 193 questions. The average time to complete this course is one month of daily participation.

To participate in this class, you may sign up by clicking on the above link."; } // ************************************************************************ // END show page of lawn care business owner's credentials upon request // ************************************************************************ } else { // ************************************************************************ // BEGIN The Main School Page // ************************************************************************ // check if they are logged in if(!session_is_registered(id)){ ShowWelcomePageBecauseUserIsNotLoggedIn(); } else { DisplayListOfClasses(); } } // ************************************************************************ // End The Main School Page // ************************************************************************ // for vbulletin echo "
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:31 PM.


(C) 2011 Riggs Publications - Terms of use & Privacy Policy

All times are GMT -5. The time now is 05:31 PM.

(C) 2011 Riggs Publications - Terms of use & Privacy Policy