 LN21A1	LN23F5	UAM	Nitrogen freezer positions	10/9/2009	DLM
 LN2FRZR1	LN2FRZR3	UAM	Nitrogen freezers	10/9/2009	DLM
 ES 000001	ES 019999	UAM:ES	UAM Paleo specimen labels	10/9/2009	DLM
-ES20000	ES54999	UAM:ES	Updated UAM Paleo specimen labels		
+ES20000	ES54999	UAM:ES	Updated UAM Paleo specimen labels
 UAM100000001	UAM100050000	UAM:Ento	UAM Insects specimen labels	10/9/2009	DLM
 FRZR1	FRZR9	UAM	freezers	9/22/2014	Kyndall
 FRZR1-01A	"FRZR9-12D

MSB100001	MSB150000	MSB Birds		5/22/2012	ABJ
DGR10001	DGR20001	MSB:DGR	Divison of Genomic Resources, labels for freezer racks and freezer boxes.	6/13/2013	Jarrell
p0	pzzzzzzzzzzzzzz	MSB Parasites	Prefix for p for parasites, followed by all base-36 (A-Z0-9) values for small circular microscope-slide labels.  DataMatrix.	3/4/2013	Jarrell
	p2cvk	MSB Parasites	Parasites, next 10,000 base-36 values for 2"X1/2" slide-box labels. Code 128.	3/4/2013	
KNWRC[number]	various	KNWR	generic container label for KNWR containers, used in both KNWR:Herb and KNWR:Ento collections.	3/12/2013	Matt Bowser
UDCC_TCN [number]	various	KNWR	These are 2D barcode labels used by the University of Delaware Entomology Collection (UDCC), added to specimens loaned from KNWR to UDCC.	4/26/2013	Matt Bowser
UDCC_NRI [number]	various	KNWR	These are 2D barcode labels used by the University of Delaware Entomology Collection (UDCC), added to specimens loaned from KNWR to UDCC.	4/26/2013	Matt Bowser
H1250000	H1279999	UAM:Herb	Herbarium sheet labels, ordered from EIM.	9/11/2013	JSM
A24E3 (16895163)	A36YY	MSB:Mamm	"50,000 cryotube labels in base-36 Datamatrix, 
"	7/7/2014	
BOWIE 1	BOWIE 500	MVZ Birds	MVZ uncataloged bird samples collected by Raurie Bowie and colleagues, labels for his freezer boxes	4/16/2015	CC
BIRD 1	BIRD 500	MVZ Birds	MVZ uncataloged bird samples (non-Bowie accns), labels for freezer boxes	4/16/2015	CC
A36YZ	A49JU	MSB Mamm	MSB Mamm and DGR base 36 3 part barcode labels for use on cryotubes, parasite vials, and skull tags; equivalent to base 10 numbers 16945163 to 16995162	6/1/2015	"MLC

<cfinclude template="/includes/_header.cfm">
<a href="barcodeseries.cfm?action=test">test</a>
<cfoutput>
	<cfif action is "nothing">
		<cfparam name="barcode" default="">
		<form name="t" method="get" action="barcodeseries.cfm">
			<input type="hidden" name="action" value="test">
			<label for="barcode">Enter a barcode to test</label>
			<input type="text" value="#barcode#" name="barcode">
			<input type="submit" value="test this barcode">
		</form>
		<cfquery name="d" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
			select * from cf_barcodeseries order by key
		</cfquery>

		<table border>
			<tr>
				<th>Txt</th>
				<th>sql</th>
				<th>status</th>
				<th>statusSQL</th>
				<th>Inst</th>
				<th>Date</th>
				<th>Who</th>
				<th>Note</th>
			</tr>
			<cfloop query="d">
				<td>#barcodeseriestxt#</td>
				<td>#barcodeseriessql#</td>
				<cfif len(barcode) gt 0>
					<cftry>
					<p>Testing #barcodeseriestxt# (#barcodeseriessql#)</p>
					<cfset statusSQL=replace(barcodeseriessql,"barcode","'#barcode#'","all")>
					<br>select count(*) c from dual where #preserveSingleQuotes(statusSQL)#
					<cfquery name="t" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
						select count(*) c from dual where #preserveSingleQuotes(bc)#
					</cfquery>
					<cfif t.c gt 0>
						<cfset tststts='PASS'>
					<cfelse>
						<cfset tststts='FAIL (count: #t.c#)'>
					</cfif>
					<cfcatch>
						<cfset tststts='FAIL: #cfcatch.message# #cfcatch.detail#'>
					</cfcatch>
					</cftry>
				<cfelse>
					<cfset statusSQL='Enter a barcode in the form above to test'>
					<cfset tststts='-'>
				</cfif>


				<td>#tststts#</td>
				<td>#institution#</td>
				<td>#createdate#</td>
				<td>whodunit##</td>
				<td>#notes#</td>
			</cfloop>
			</table>





		</cfif>
	</cfif>
</cfoutput>
