In Progress

PHP Codes Generator/Modify

PHP Codes Generator Script

POST Input Provided:

VARDATA - Variable String 12-30 Characters long / First 3 must be alphabetic

VARDATE - A date in the MMDDYY format

VARMAX - A 2 digit value between 30-60

Display error mesage and a return link if any of the above three inputs is not valid

Script Logic:

Each character of the content of the VARDATA string is compared against the letter/values from the Letters Table below and the corresponding values are accumulated (example: if VARDATA contains “Green Mountain” the value accummulated would be 315 (5+ 15+ 35+ 35+ 11+ 10+ 45+ 50+ 11+ 17+ 30+ 40+ 11). Skip any character that is blank, or is not alphabetic. After the string value is accumulated add the current day’s Julian Value (1-365) to it and then multiply the result by the VARDATE to get a temporary BASEVALUE.

Letters Table (small and capital letters have the same values)

A-30 B-1 C-2 D-3 E-35 F-4 G-5 H-6 I-40 J-7 K-8 L-9 M-10-N-11

O-45 P-13 Q-14 R-15 S-16 T-17 U-50 V-18 W-19 X-20 Y-20 Z-22

Generate Output

CODE3 - Divide the BASEVALUE by 8.1457 to get TEMPVALUE and from TEMPVALUE take the 2nd, 3rd and 4th digits to create a 3 digit number to display as CODE3.

CODE4 - Divide the BASEVALUE by 7.6197 to get TEMPVALUE and from TEMPVALUE take the 2nd, 3rd, 4th and 5th digits to create a 4 digit number to display as CODE4.

CODE6A - Divide the BASEVALUE by 6.9165 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6A. If CODE6A is greater that VARMAX subtract VARMAX from CODE6A until it’s equal or less.

CODE6B - Divide the BASEVALUE by 6.5916 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6B. If CODE6B is greater that VARMAX subtract VARMAX from CODE6B until it’s equal or less.

CODE6C - Divide the BASEVALUE by 6.1591 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6C. If CODE6C is greater that VARMAX subtract VARMAX from CODE6C until it’s equal or less.

CODE6D - Divide the BASEVALUE by 6.8159 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6D. If CODE6D is greater that VARMAX subtract VARMAX from CODE6D until it’s equal or less.

CODE6E - Divide the BASEVALUE by 6.4815 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6E. If CODE6E is greater that VARMAX subtract VARMAX from CODE6E until it’s equal or less.

CODE6F - Divide the BASEVALUE by 6.2481 to get TEMPVALUE and from TEMPVALUE take the 2nd and 3rd digits to create a 2 digit [url removed, login to view] CODE6F. If CODE6F is greater that VARMAX subtract VARMAX from CODE6F until it’s equal or less.

Check to verify that all the six CODE6A through CODE6F are different. If any is duplicated, generate the duplicate one again after incrementing the BASEVALUE by 7. Repeat this verification until all six CODE6A-CODE6F are different.

Display Output

VARDATA: The input string

VARDATE: The input date in MM/DD/YY format

Todays Date: MM/DD/YY

CODE3: CODE3 Result

CODE4: CODE4 Result

CODE6A: CODE6A Result

CODE6B: CODE6B Result

CODE6C: CODE6C Result

CODE6D: CODE6D Result

CODE6E: CODE6E Result

CODE6F: CODE6F Result

This project was originally created and it's working Ok. What I need is a modification of it (the working PHP code will be provided)

with the following modifications.

1. CODE3 and CODE4 outputs will not be required.

2. The input variable VARMAX will not be provided, instead a fix value of 60 will be used for outputs CODE6A-CODE6C

and 40 for CODE6D-CODE6F.

3. The generation process will be repeated 4 times to create 5 sets of outputs (CODE6A-CODE6F, CODE62A-CODE62F,

CODE63A-CODE63F, CODE64A-CODE64F, CODE65A-CODE64F)

Skills: PHP

See more: string j, php verify, h.i.g. capital, generator logic, g. e. capital, first capital, capital times, w-9 what is it, yy, r j, q-v, need a three character, logic x, julian, it codes, green capital, fix w, e n t r e p r e n e u r 9 1 1, d e s i g n l o g o, codes, code4, C++ codes, input verification code, format php code, small php script variable

About the Employer:
( 6 reviews ) Vega Alta, Puerto Rico

Project ID: #2516184