$value) { if (!isset($_POST['term_address']) OR empty($_POST['term_address'])) { $errors1['term_address'] = "Please enter your term address"; } } } if (!checkPostcode($_POST['term_pcode'])) { $errors1['term_pcode'] = "Please enter a valid term postcode"; } if (!checkUKTelephone($_POST['home_phone'], &$intError, &$strError)) { $errors1['home_phone'] = $strError; } if (!checkUKTelephone($_POST['mob_phone'], &$intError, &$strError)) { $errors1['mob_phone'] = $strError; } if (!checkEmail($_POST['email'])) { $errors1['email'] = "Please enter a valid email address"; } if (!isset($_POST['nationality']) OR empty($_POST['nationality'])) { $errors1['nationality'] = "Please select your nationality"; } if (!isset($_POST['dobDay']) OR empty($_POST['dobDay'])) { $errors1['dobDay'] = "Please select the day of your Date of Birth"; } if (!isset($_POST['dobMonth']) OR empty($_POST['dobMonth'])) { $errors1['dobMonth'] = "Please select the month of your Date of Birth"; } if (!isset($_POST['dobYear']) OR empty($_POST['dobYear'])) { $errors1['dobYear'] = "Please enter the year of your Date of Birth"; } if (!isset($_POST['objective']) OR empty($_POST['objective'])) { $errors1['objective'] = "Please state your objective"; } if (!isset($_POST['preference']) OR empty($_POST['preference'])) { $errors1['preference'] = "Please state your preference"; } if (!isset($_POST['skills_gen'])) { $errors1['skills_gen'] = "Please select how many general skills to include"; } if (!isset($_POST['skills_comms'])) { $errors1['skills_comms'] = "Please select how many communication skills to include"; } if (!isset($_POST['skills_team'])) { $errors1['skills_team'] = "Please select how many teamwork skills to include"; } if (!isset($_POST['skills_prob'])) { $errors1['skills_prob'] = "Please select how many problem solving skills to include"; } if (!isset($_POST['skills_comp'])) { $errors1['skills_comp'] = "Please select how many computing skills to include"; } if($_FILES['photograph']['size'] > $_POST['MAX_FILE_SIZE']) { $errors1['photograph'] = "Your photograph must be less than 80 kB in size"; } if($_FILES['photograph']['type'] != 'image/jpeg') { $errors1['photograph'] = "Your photograph be a jpg"; } return $errors1; } function validateForm2() { $errors2 = array(); for ($x = 1; $x <= $_POST['sgen[]']; $x++) { if (!isset($_POST['sgen']) OR empty($_POST['sgen'])) { $errors2['sgen'] = "Please fill in box number $x of general skills"; } } for ($x = 1; $x <= $_POST['scomms[]']; $x++) { if (!isset($_POST['scomms']) OR empty($_POST['scomms'])) { $errors2['scomms'] = "Please fill in box number $x of communication skills"; } } for ($x = 1; $x <= $_POST['steam[]']; $x++) { if (!isset($_POST['steam']) OR empty($_POST['steam'])) { $errors2['steam'] = "Please fill in box number $x of teamwork skills"; } } for ($x = 1; $x <= $_POST['sprob[]']; $x++) { if (!isset($_POST['sprob']) OR empty($_POST['sprob'])) { $errors2['sprob'] = "Please fill in box number $x of problem solving skills"; } } for ($x = 1; $x <= $_POST['scomp[]']; $x++) { if (!isset($_POST['scomp']) OR empty($_POST['scomp'])) { $errors2['scomp'] = "Please fill in box number $x of computing skills"; } } return $errors2; } function printErrors2($errors2) { echo "

"; printForm2(); } function printErrors1($errors1) { echo "

"; printForm1(); } function generatePDF() { echo '

generatePDF

'; } function checkUKTelephone (&$strTelephoneNumber, &$intError, &$strError) { // Copy the parameter and strip out the spaces $strTelephoneNumberCopy = str_replace (' ', '', $strTelephoneNumber); // Convert into a string and check that we were provided with something if (empty($strTelephoneNumberCopy)) { $intError = 1; $strError = 'Telephone number not provided'; return false; } // Don't allow country codes to be included (assumes a leading "+") if (ereg('^(\+)[\s]*(.*)$',$strTelephoneNumberCopy)) { $intError = 2; $strError = 'UK telephone number without the country code, please'; return false; } // Remove hyphens - they are not part of a telephine number $strTelephoneNumberCopy = str_replace ('-', '', $strTelephoneNumberCopy); // Now check that all the characters are digits if (!ereg('^[0-9]{10,11}$',$strTelephoneNumberCopy)) { $intError = 3; $strError = 'UK telephone numbers should contain 10 or 11 digits'; return false; } // Now check that the first digit is 0 if (!ereg('^0[0-9]{9,10}$',$strTelephoneNumberCopy)) { $intError = 4; $strError = 'The telephone number should start with a 0'; return false; } // Finally, check that the telephone number is appropriate. if (!ereg('^(01|02|03|05|070|077|07624|078|079)[0-9]+$',$strTelephoneNumberCopy)) { $intError = 5; $strError = 'The telephone number is either invalid or inappropriate'; return false; } // Seems to be valid - return the stripped telephone number $strTelephoneNumber = $strTelephoneNumberCopy; $intError = 0; $strError = ''; return true; } function checkEmail($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } function checkPostcode (&$toCheck) { // Permitted letters depend upon their position in the postcode. $alpha1 = "[abcdefghijklmnoprstuwyz]"; // Character 1 $alpha2 = "[abcdefghklmnopqrstuvwxy]"; // Character 2 $alpha3 = "[abcdefghjkstuw]"; // Character 3 $alpha4 = "[abehmnprvwxy]"; // Character 4 $alpha5 = "[abdefghjlnpqrstuwxyz]"; // Character 5 // Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA $pcexp[0] = '^('.$alpha1.'{1}'.$alpha2.'{0,1}[0-9]{1,2})([0-9]{1}'.$alpha5.'{2})$'; // Expression for postcodes: ANA NAA $pcexp[1] = '^('.$alpha1.'{1}[0-9]{1}'.$alpha3.'{1})([0-9]{1}'.$alpha5.'{2})$'; // Expression for postcodes: AANA NAA $pcexp[2] = '^('.$alpha1.'{1}'.$alpha2.'[0-9]{1}'.$alpha4.')([0-9]{1}'.$alpha5.'{2})$'; // Exception for the special postcode GIR 0AA $pcexp[3] = '^(gir)(0aa)$'; // Standard BFPO numbers $pcexp[4] = '^(bfpo)([0-9]{1,4})$'; // c/o BFPO numbers $pcexp[5] = '^(bfpo)(c\/o[0-9]{1,3})$'; // Load up the string to check, converting into lowercase and removing spaces $postcode = strtolower($toCheck); $postcode = str_replace (' ', '', $postcode); // Assume we are not going to find a valid postcode $valid = false; // Check the string against the six types of postcodes foreach ($pcexp as $regexp) { if (ereg($regexp,$postcode, $matches)) { // Load new postcode back into the form element $toCheck = strtoupper ($matches[1] . ' ' . $matches [2]); // Take account of the special BFPO c/o format $toCheck = ereg_replace ('C\/O', 'c/o ', $toCheck); // Remember that we have found that the code is valid and break from loop $valid = true; break; } } // Return with the reformatted valid postcode in uppercase if the postcode was // valid if ($valid){return true;} else {return false;}; } function printForm1() { $days = ''; for ($x = 1; $x <= 31; $x++) { $days .= ""; } $months = ''; for ($x = 1; $x <= 12; $x++) { $months .= ""; } $current_year = date('Y'); $min_age = 5; $max_age = 99; $y = $current_year - $min_age; $years = ""; for ($x = $y; $x >= ($current_year - $max_age); $x--) { $years .= ""; } ?> Erasmus CV Generator

Erasmus CV Generator


Gender:
Your full name:
Full title of your degree course:
Number of units in Level 1 of your course
Number of units in Level 2 of your course
Number of units in Level 3 of your course
Term address:
 
 
 
Postcode:
Home phone number:
Mobile phone number:
Email address:
Nationality:
Date of Birth:
Objective:
Placement Preference:
How many general skills would like to include on your CV?
3
4
5
How many communication skills would like to include on your CV?
3
4
5
How many teamwork skills would like to include on your CV?
3
4
5
How many problem solving skills would like to include on your CV?
3
4
5
How many computing skills would like to include on your CV?
3
4
5

Please upload your photograph. The file must be gif/jpeg format and less than 80 KB in size.

Select Picture:
Do you have a Full UK Driver\'s License? Yes: No:
 
'."\n"; } for ($x = 1; $x <= $_POST['skills_comms']; $x++) { $skills_comms .= ''."\n"; } for ($x = 1; $x <= $_POST['skills_team']; $x++) { $skills_team .= ''."\n"; } for ($x = 1; $x <= $_POST['skills_prob']; $x++) { $skills_prob .= ''."\n"; } for ($x = 1; $x <= $_POST['skills_comp']; $x++) { $skills_comp .= ''."\n"; } ?> Erasmus CV Generator

Erasmus CV Generator



Please enter general skills
 
Please enter communication skills
 
Please enter teamwork skills
 
Please enter problem solving skills
 
Please enter computing skills