Closed Cdetviler closed 8 years ago
This could be done the same way that I have it on the breakout boards product pages:
This would involve having a folder with all of the cert scans inside. The scan files would have a set naming convention such as:
R1_Scan.pdf, R86_scan.pdf, etc.
Then I would have a function that searches within the directory for all scans "*_scan.pdf." If there is one that matches the station_ID, then a link is placed in the nav bar. The same function could be used to embed the scan in the page.
Otherwise, we will need a table in the database with a link to each scan and an SQL query would have to be executed to check if a scan exists.
I was talking to Andrw and he mentioned that we could just use the whereused table in the calibration database to store the locations of each file. I will work on figuring this out today.
Andrew ended up creating a central location where all of the certificates are stored. all of the certificates have a defined naming convention so that PHP can easily query the database for the anemometer serial number and look up the files. Whether or not PHP finds a serial number and whether or not php is able to find a filename containing the serial number determines if the link to the certificate page shows up in the nav bar or not.
On the certificate page itself, I have the pdf embedded on the page with a fallback for older browsers which consists of a download link.
The calibration page now consists of a download link and values that are pulled in from the database for quick viewing.
Currently the following values are displayed: Serial Number, Manufacturer, Certificate Number, Type, calibration lab, mMS Value, bMS value, certificate date, in service date and expiration Date
If any one of these is unnecessary for the webpage, let me know and I can remove them. I just pulled them all in to be safe.
Calibration page has been implemented with values pulled in from database and a download link for the actual scan.
Need a page that can display scans of the calibration certificate on a customer-by-customer basis.
This can be done with php - does not need to be ajax.
The link will probably be in the nav bar next to daily conditions and current conditions