forked from ArctosDB/arctos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpecimenSearch2.cfm
798 lines (756 loc) · 28.6 KB
/
SpecimenSearch2.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
<!---- replace table layout with CSS experiment ---->
<cfinclude template="/includes/_header.cfm">
<cfhtmlhead text='<script src="http://maps.googleapis.com/maps/api/js?client=gme-museumofvertebrate1&sensor=false&libraries=places,geometry" type="text/javascript"></script>'>
<script src="/includes/jquery/jquery-autocomplete/jquery.autocomplete.pack.js" language="javascript" type="text/javascript"></script>
<script src="/includes/jquery.multiselect.min.js"></script>
<link rel="stylesheet" href="/includes/jquery.multiselect.css" />
<cfset title="Specimen Search">
<cfset metaDesc="Search for museum specimens and observations by taxonomy, identifications, specimen attributes, and usage history.">
<cfoutput>
<cfquery name="getCount" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
select count(collection_object_id) as cnt from cataloged_item
</cfquery>
<cfquery name="ctmedia_type" datasource="cf_dbuser" cachedwithin="#createtimespan(0,0,60,0)#">
select media_type from ctmedia_type order by media_type
</cfquery>
<cfquery name="ctcataloged_item_type" datasource="cf_dbuser" cachedwithin="#createtimespan(0,0,60,0)#">
select cataloged_item_type from ctcataloged_item_type order by cataloged_item_type
</cfquery>
<cfquery name="hasCanned" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
select SEARCH_NAME,URL
from cf_canned_search,cf_users
where cf_users.user_id=cf_canned_search.user_id
and username='#session.username#'
and URL like '%SpecimenResults.cfm%'
order by search_name
</cfquery>
<style>
/* for some strange reason this won't work from the .css so keep it here...*/
.ui-helper-reset a, ui-helper-reset a:visited {color:blue; !important;}
.ui-helper-reset a:hover {color:red; !important;}
/* copied from /home.cfm */
.table {display:table;width:100%}
.tr {display:table-row}
.td {display:table-cell;}
/* copied from /home.cfm */
</style>
<div class="table">
<div class="tr">
<div class="td">Access to #numberformat(getCount.cnt,",")# records</div>
<cfif hasCanned.recordcount gt 0>
<div class="td">
Saved Searches: <select name="goCanned" id="goCanned" size="1" onchange="document.location=this.value;">
<option value=""></option>
<option value="saveSearch.cfm?action=manage">[ Manage ]</option>
<cfloop query="hasCanned">
<option value="#url#">#SEARCH_NAME#</option><br />
</cfloop>
</select>
</div>
<div class="td">
<span style="color:red;">
<cfif action is "dispCollObj">
<p>You are searching for items to add to a loan.</p>
<cfelseif action is "encumber">
<p>You are searching for items to encumber.</p>
<cfelseif action is "collEvent">
<p>You are searching for items to change collecting event.</p>
<cfelseif action is "identification">
<p>You are searching for items to reidentify.</p>
<cfelseif action is "addAccn">
<p>You are searching for items to reaccession.</p>
</cfif>
</span>
</div>
</cfif>
</div>
</div>
<form method="post" action="SpecimenResults.cfm" name="SpecData" id="SpecData" onSubmit="getFormValues();">
<div class="table">
<div class="tr">
<div class="td">
<input type="submit" value="Search" class="schBtn">
</div>
<div class="td">
<input type="button" name="Reset" value="Clear Form" class="clrBtn" onclick="resetSSForm();">
</div>
<div class="td">
<input type="button" name="Previous" value="Use Last Values" class="lnkBtn" onclick="setPrevSearch()">
</div>
<div class="td">
See results as:
</div>
<div class="td">
<select name="tgtForm1" id="tgtForm1" size="1" onChange="changeTarget(this.id,this.value);">
<option value="">Specimen Records</option>
<option value="SpecimenResultsHTML.cfm">HTML Specimen Records</option>
<option value="/bnhmMaps/bnhmMapData.cfm">BerkeleyMapper Map</option>
<option value="/bnhmMaps/kml.cfm?action=newReq">KML</option>
<option value="SpecimenResultsSummary.cfm">Specimen Summary</option>
<option value="SpecimenGraph.cfm">Graph</option>
</select>
</div>
<div class="td">
<div id="groupByDiv1" style="display:none;border:1px solid green;padding:.5em;">
<font size="-1"><em><strong>Group by:</strong></em></font><br>
<select name="groupBy1" id="groupBy1" multiple size="4" onchange="changeGrp(this.id)">
<option value="kingdom">Kingdom</option>
<option value="phylum">Phylum</option>
<option value="phylclass">Class</option>
<option value="phylorder">Order</option>
<option value="family">Family</option>
<option value="subfamily">Subfamily</option>
<option value="tribe">Tribe</option>
<option value="subtribe">Subtribe</option>
<option value="genus">Genus</option>
<option value="scientific_name">Scientific Name</option>
<option value="formatted_scientific_name">Formatted Scientific Name</option>
<option value="identifiedby">IdentifiedBy</option>
<option value="continent_ocean">Continent</option>
<option value="country">Country</option>
<option value="state_prov">State</option>
<option value="county">County</option>
<option value="quad">Map Name</option>
<option value="feature">Feature</option>
<option value="island">Island</option>
<option value="island_group">Island Group</option>
<option value="sea">Sea</option>
<option value="spec_locality">Specific Locality</option>
<option value="year">Year</option>
<option value="individualcount">individualcount</option>
</select>
</div>
<div id="kmlDiv1" style="display:none;border:1px solid green;padding:.5em;">
<font size="-1"><em><strong>KML Options:</strong></em></font><br>
<label for="next1">Color By</label>
<select name="next1" id="next1" onchange="kmlSync(this.id,this.value)">
<option value="colorByCollection">Collection</option>
<option value="colorBySpecies">Species</option>
</select>
<label for="method1">Method</label>
<select name="method1" id="method1" onchange="kmlSync(this.id,this.value)">
<option value="download">Download</option>
<option value="link">Download Linkfile</option>
<option value="gmap">Google Maps</option>
</select>
<label for="includeTimeSpan1">include Time?</label>
<select name="includeTimeSpan1" id="includeTimeSpan1" onchange="kmlSync(this.id,this.value)">
<option value="0">no</option>
<option value="1">yes</option>
</select>
<label for="showErrors1">Show error radii?</label>
<select name="showErrors1" id="showErrors1" onchange="kmlSync(this.id,this.value)">
<option value="0">no</option>
<option value="1">yes</option>
</select>
</div>
</div>
</div>
</div>
<div>
<span class="helpLink" id="_cataloged_item_type">Type</span>:<select name="cataloged_item_type" id="cataloged_item_type" size="1">
<option value="">any</option>
<cfloop query="ctcataloged_item_type">
<option value="#ctcataloged_item_type.cataloged_item_type#">#ctcataloged_item_type.cataloged_item_type#</option>
</cfloop>
</select>
<span class="helpLink" id="_is_tissue">Require Tissues?</span><input type="checkbox" name="is_tissue" id="is_tissue" value="1">
</div>
<input type="hidden" name="action" value="#action#">
<div class="secDiv">
<cfquery name="ctInst" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
SELECT
collection.institution,
collection.collection,
collection.collection_id
FROM
collection,
cf_collection
where
collection.collection_id=cf_collection.collection_id and
PUBLIC_PORTAL_FG=1
order by collection.collection
</cfquery>
<cfif isdefined("collection_id") and len(collection_id) gt 0>
<cfset thisCollId = collection_id>
<cfelse>
<cfset thisCollId = "">
</cfif>
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Identifiers</span>
<span class="secControl" id="c_identifiers" onclick="showHide('identifiers',1)">Show More Options</span>
<span class="secControl" id="c_identifiers_cust">Customize</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="collection">Collection</span>:
</td>
<td class="srch">
<cfquery name="cfi" dbtype="query">
select institution from ctInst group by institution order by institution
</cfquery>
<select name="collection_id" id="collection_id" size="3" multiple="multiple">
<cfloop query="cfi">
<cfquery name="ic" dbtype="query">
select collection, collection_id FROM ctInst where institution='#cfi.institution#' order by collection
</cfquery>
<optgroup label="#institution#">
<cfloop query="ic">
<option <cfif thisCollId is ic.collection_id>selected="selected" </cfif>value="#ic.collection_id#">#ic.collection#</option>
</cfloop>
</optgroup>
</cfloop>
</select>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="cat_num">Catalog Number:</span>
</td>
<td class="srch">
<cfif ListContains(session.searchBy, 'bigsearchbox') gt 0>
<textarea name="listcatnum" id="listcatnum" rows="6" cols="40" class="largetextarea"></textarea>
<cfelse>
<input type="text" name="listcatnum" id="listcatnum" size="21" value="">
</cfif>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="guid">GUID:</span>
</td>
<td class="srch">
<cfif ListContains(session.searchBy, 'bigsearchbox') gt 0>
<textarea name="guid" id="guid" rows="6" cols="40" class="largetextarea"></textarea>
<cfelse>
<input type="text" name="guid" id="guid" size="21" value="">
</cfif>
</td>
</tr>
<!-------
<tr>
<td colspan="2">
<table>
<tr>
<td>
<cfquery name="cfi" dbtype="query">
select institution from ctInst group by institution order by institution
</cfquery>
<select name="collection_id" id="collection_id" size="3" multiple="multiple">
<cfloop query="cfi">
<cfquery name="ic" dbtype="query">
select collection, collection_id FROM ctInst where institution='#cfi.institution#' order by collection
</cfquery>
<optgroup label="#institution#">
<cfloop query="ic">
<option <cfif thisCollId is ic.collection_id>selected="selected" </cfif>value="#ic.collection_id#">#ic.collection#</option>
</cfloop>
</optgroup>
</cfloop>
</select>
</td>
<td>
<table>
<tr>
<td align="right">
<span class="helpLink" id="cat_num">Catalog Number:</span>
</td><td>
<cfif #ListContains(session.searchBy, 'bigsearchbox')# gt 0>
<textarea name="listcatnum" id="listcatnum" rows="6" cols="40" wrap="soft"></textarea>
<cfelse>
<input type="text" name="listcatnum" id="listcatnum" size="21" value="">
</cfif>
</td>
</tr>
<tr>
<td align="right">
<span class="helpLink" id="guid">GUID:</span>
</td><td>
<input type="text" name="guid" id="guid" size="21" value="">
</td>
</tr>
</table>
</td>
</tr>
</table>
i am left column
i am noleft column
</td>
</tr>
--->
<!----
<tr>
<td class="lbl">
<span class="helpLink" id="collection">Collection</span>:
</td>
<td class="srch">
<table>
<tr>
<td>
<!----
<div class="cboxdiv">
<div class="cboxdiv_allnone">
<span class="likeLink" onclick="$('input[name^=collection_id]').prop('checked',true);">[ all ]</span>
<span class="likeLink" onclick="$('input[name^=collection_id]').prop('checked',false);">[ none ]</span>
</div>
<cfloop query="ctinst">
<div class="cboxdiv_option" id="collection_id">
<input type="checkbox" name="collection_id" value="#collection_id#"> #collection#
</div>
</cfloop>
</div>
---->
<select name="collection_id" id="collection_id" size="3" multiple="multiple">
<cfloop query="ctInst">
<option <cfif thisCollId is ctInst.collection_id>selected="selected" </cfif>value="#ctInst.collection_id#">#ctInst.collection#</option>
</cfloop>
</select>
</td>
<td>
<table>
<tr>
<td align="right">
<span class="helpLink" id="cat_num">Catalog Number:</span>
</td><td>
<cfif #ListContains(session.searchBy, 'bigsearchbox')# gt 0>
<textarea name="listcatnum" id="listcatnum" rows="6" cols="40" wrap="soft"></textarea>
<cfelse>
<input type="text" name="listcatnum" id="listcatnum" size="21" value="">
</cfif>
</td>
</tr>
<tr>
<td align="right">
<span class="helpLink" id="guid">GUID:</span>
</td><td>
<input type="text" name="guid" id="guid" size="21" value="">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
---->
<cfif isdefined("session.CustomOtherIdentifier") and len(session.CustomOtherIdentifier) gt 0>
<tr>
<td class="lbl">
<span class="helpLink" id="custom_identifier">#replace(session.CustomOtherIdentifier," "," ","all")#:</span>
</td>
<td class="srch">
<cfif isdefined("session.CustomOidOper")>
<cfset thisSelected=session.CustomOidOper>
<cfelse>
<cfset thisSelected="IS">
</cfif>
<label for="CustomOidOper">Display Value</label>
<select name="CustomOidOper" id="CustomOidOper" size="1" onchange="setSessionCustomID(this.value);">
<option value="IS" <cfif thisSelected is "IS"> selected="selected"</cfif>>is</option>
<option value="" <cfif thisSelected is ""> selected="selected"</cfif>>contains</option>
<option value="LIST"<cfif thisSelected is "LIST"> selected="selected"</cfif>>in list</option>
<option value="BETWEEN"<cfif thisSelected is "BETWEEN"> selected="selected"</cfif>>in range</option>
</select> <input type="text" name="CustomIdentifierValue" id="CustomIdentifierValue" size="50">
</td>
</tr>
<tr>
<td class="lbl">
<cfif isdefined("session.fancyCOID") and session.fancyCOID is 1>
</td>
<td class="srch">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<label for="custom_id_prefix">OR: Prefix</label>
<input type="text" name="custom_id_prefix" id="custom_id_prefix" size="12">
</td>
<td>
<label for="custom_id_number">Number</label>
<input type="text" name="custom_id_number" id="custom_id_number" size="24">
</td>
<td>
<label for="custom_id_suffix">Suffix</label>
<input type="text" name="custom_id_suffix" id="custom_id_suffix" size="12">
</td>
</tr>
</table>
</td>
</cfif>
</tr>
</cfif>
</table>
<div id="e_identifiers"></div>
</div>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Identification and Taxonomy</span>
<span class="secControl" id="c_taxonomy" onclick="showHide('taxonomy',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="_scientific_name">Identification</span>
</td>
<td class="srch">
<table style="border:1px solid green;">
<tr>
<td>
<input type="text" name="scientific_name" id="scientific_name" size="50" placeholder="Identification (scientific name)">
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td width="50%">
<label for="scientific_name_scope">Include previous IDs?</label>
<select name="scientific_name_scope" id="scientific_name_scope">
<option value="currentID">Current ID only</option>
<option value="allID">Include all IDs</option>
</select>
</td>
<td>
<label id="_scientific_name_match_type" class="helpLink" style="text-align:left;" for="scientific_name_match_type">Match Type</label>
<select name="scientific_name_match_type" id="scientific_name_match_type">
<option value="contains">contains</option>
<option value="exact">is (case insensitive)</option>
<option value="notcontains">does not contain</option>
<option value="inlist">comma-list</option>
<option value="inlist_substring">comma-list (substring)</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="e_taxonomy"></div>
</div>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Locality</span>
<span class="secControl" id="c_locality" onclick="showHide('locality',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="_any_geog">Any Geographic Element:</span>
</td>
<td class="srch">
<input type="text" name="any_geog" id="any_geog" size="50">
<span class="secControl" style="font-size:.9em;" id="c_spatial_query" onclick="showHide('spatial_query',1)">Select on Google Map</span>
</td>
</tr>
<tr>
<td colspan="2">
<div id="e_spatial_query"></div>
</td>
</tr>
</table>
<div id="e_locality"></div>
</div>
<cfquery name="ctcollector_role" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
select collector_role from ctcollector_role order by collector_role
</cfquery>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Date/Collector</span>
<span class="secControl" id="c_collevent" onclick="showHide('collevent',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink infoLink" id="collector">Help</span>
<select name="coll_role" id="coll_role" size="1">
<option value="" selected="selected">Agent Role</option>
<cfloop query="ctcollector_role">
<option value="#ctcollector_role.collector_role#">#ctcollector_role.collector_role#</option>
</cfloop>
</select>
<span class="infoLink" onclick="getCtDoc('ctcollector_role',SpecData.coll_role.value);">Define</span>
</td>
<td class="srch">
<input type="text" name="coll" id="coll" size="50">
</td>
</tr>
</table>
<div id="e_collevent"></div>
</div>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Biological Individual</span>
<span class="secControl" id="c_biolindiv" onclick="showHide('biolindiv',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="part_name">Part Name:</span>
</td>
<td class="srch">
<input type="text" name="partname" id="partname">
<span class="infoLink" onclick="getCtDoc('ctspecimen_part_name',SpecData.partname.value);">Define</span>
<span class="infoLink" onclick="var e=document.getElementById('partname');e.value='='+e.value;">Add = for exact match</span>
</td>
</tr>
</table>
<div id="e_biolindiv"></div>
</div>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Usage</span>
<span class="secControl" id="c_usage" onclick="showHide('usage',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="_type_status">Basis of Citation:</span>
</td>
<td class="srch">
<cfquery name="ctTypeStatus" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
select type_status from ctcitation_type_status
</cfquery>
<select name="type_status" id="type_status" size="1">
<option value=""></option>
<option value="any">Any</option>
<option value="type">Any TYPE</option>
<cfloop query="ctTypeStatus">
<option value="#ctTypeStatus.type_status#">#ctTypeStatus.type_status#</option>
</cfloop>
</select>
<span class="infoLink" onclick="getCtDoc('ctcitation_type_status', SpecData.type_status.value);">Define</span>
</td>
</tr>
</table>
<div id="e_usage"></div>
</div>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Media</span>
<span class="secControl" id="c_media" onclick="showHide('media',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="_media_type">Media Type:</span>
</td>
<td class="srch">
<select name="media_type" id="media_type" size="1">
<option value=""></option>
<option value="any">Any</option>
<cfloop query="ctmedia_type">
<option value="#ctmedia_type.media_type#">#ctmedia_type.media_type#</option>
</cfloop>
</select>
<span class="infoLink" onclick="getCtDoc('ctmedia_type', SpecData.media_type.value);">Define</span>
</td>
</tr>
</table>
<div id="e_media"></div>
</div>
<cfquery name="ctid_references" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#" cachedwithin="#createtimespan(0,0,60,0)#">
select id_references from ctid_references where id_references != 'self' order by id_references
</cfquery>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Relationships</span>
<span class="secControl" id="c_relationships" onclick="showHide('relationships',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="id_references">Relationship:</span>
</td>
<td class="srch">
<select name="id_references" id="id_references" size="1">
<option value=""></option>
<cfloop query="ctid_references">
<option value="#ctid_references.id_references#">#ctid_references.id_references#</option>
</cfloop>
</select>
</td>
</tr>
</table>
<div id="e_relationships"></div>
</div>
<cfif listcontainsnocase(session.roles,"coldfusion_user")>
<div class="secDiv">
<table class="ssrch">
<tr>
<td colspan="2" class="secHead">
<span class="secLabel">Curatorial</span>
<span class="secControl" id="c_curatorial" onclick="showHide('curatorial',1)">Show More Options</span>
</td>
</tr>
<tr>
<td class="lbl">
<span class="helpLink" id="srch_barcode">Part Barcode:</span>
</td>
<td class="srch">
<input type="text" name="barcode" id="barcode" size="50">
</td>
</tr>
</table>
<div id="e_curatorial"></div>
</div>
</cfif>
<table>
<tr>
<td valign="top">
<input type="submit" value="Search" class="schBtn">
</td>
<td valign="top">
<input type="button" name="Reset" value="Clear Form" class="clrBtn" onclick="resetSSForm();">
</td>
<td valign="top">
<input type="button" name="Previous" value="Use Last Values" class="lnkBtn" onclick="setPrevSearch()">
</td>
<td valign="top" align="right">
<b>See results as:</b>
</td>
<td align="left" colspan="2" valign="top">
<select name="tgtForm" id="tgtForm" size="1" onChange="changeTarget(this.id,this.value);">
<option value="">Specimen Records</option>
<option value="SpecimenResultsHTML.cfm">HTML Specimen Records</option>
<option value="/bnhmMaps/bnhmMapData.cfm">BerkeleyMapper Map</option>
<option value="/bnhmMaps/kml.cfm?action=newReq">KML</option>
<option value="SpecimenResultsSummary.cfm">Specimen Summary</option>
<option value="SpecimenGraph.cfm">Graph</option>
<cfif isdefined("session.username") AND (#session.username# is "link" OR #session.username# is "dusty")>
<option value="/CustomPages/Link.cfm">Link's Form</option>
</cfif>
<cfif isdefined("session.username") AND (#session.username# is "cindy" OR #session.username# is "dusty")>
<option value="/CustomPages/CindyBats.cfm">Cindy's Form</option>
</cfif>
</select>
</td>
<td align="left">
<div id="groupByDiv" style="display:none;border:1px solid green;padding:.5em;">
<font size="-1"><em><strong>Group by:</strong></em></font><br>
<select name="groupBy" id="groupBy" multiple size="4" onchange="changeGrp(this.id)">
<option value="kingdom">Kingdom</option>
<option value="phylum">Phylum</option>
<option value="phylclass">Class</option>
<option value="phylorder">Order</option>
<option value="family">Family</option>
<option value="subfamily">Subfamily</option>
<option value="tribe">Tribe</option>
<option value="subtribe">Subtribe</option>
<option value="genus">Genus</option>
<option value="scientific_name">Scientific Name</option>
<option value="formatted_scientific_name">Formatted Scientific Name</option>
<option value="identifiedby">IdentifiedBy</option>
<option value="continent_ocean">Continent</option>
<option value="country">Country</option>
<option value="state_prov">State</option>
<option value="county">County</option>
<option value="quad">Map Name</option>
<option value="feature">Feature</option>
<option value="island">Island</option>
<option value="island_group">Island Group</option>
<option value="sea">Sea</option>
<option value="spec_locality">Specific Locality</option>
<option value="year">Year</option>
<option value="individualcount">individualcount</option>
</select>
</div>
<div id="kmlDiv" style="display:none;border:1px solid green;padding:.5em;">
<font size="-1"><em><strong>KML Options:</strong></em></font><br>
<label for="next">Color By</label>
<select name="next" id="next" onchange="kmlSync(this.id,this.value)">
<option value="colorByCollection">Collection</option>
<option value="colorBySpecies">Species</option>
</select>
<label for="method">Method</label>
<select name="method" id="method" onchange="kmlSync(this.id,this.value)">
<option value="download">Download</option>
<option value="link">Download Linkfile</option>
<option value="gmap">Google Maps</option>
</select>
<label for="includeTimeSpan">include Time?</label>
<select name="includeTimeSpan" id="includeTimeSpan" onchange="kmlSync(this.id,this.value)">
<option value="0">no</option>
<option value="1">yes</option>
</select>
<label for="showErrors">Show error radii?</label>
<select name="showErrors" id="showErrors" onchange="kmlSync(this.id,this.value)">
<option value="0">no</option>
<option value="1">yes</option>
</select>
</div>
</td>
</tr>
</table>
<cfif isdefined("transaction_id") and len(transaction_id) gt 0>
<input type="hidden" name="transaction_id" value="#transaction_id#">
</cfif>
<input type="hidden" name="newQuery" value="1">
</form>
</cfoutput>
<script type='text/javascript' language='javascript'>
$(document).ready(function() {
var tval = document.getElementById('tgtForm').value;
changeTarget('tgtForm',tval);
changeGrp('groupBy');
jQuery.getJSON("/component/functions.cfc",
{
method : "getSpecSrchPref",
returnformat : "json",
queryformat : 'column'
},
function (getResult) {
if (getResult == "cookie") {
var cookie = readCookie("specsrchprefs");
if (cookie != null) {
r_getSpecSrchPref(cookie);
}
} else {
r_getSpecSrchPref(getResult);
}
}
);
jQuery.get("/form/browse.cfm", function(data){
jQuery('body').append(data);
})
$("#collection_id").multiselect({
minWidth: "500",
height: "300"
});
$("#groupBy,#groupBy1").multiselect({
//minWidth: "500",
//height: "300"
});
});
jQuery("#partname").autocomplete("/ajax/part_name.cfm", {
width: 320,
max: 50,
autofill: false,
multiple: false,
scroll: true,
scrollHeight: 300,
matchContains: true,
minChars: 1,
selectFirst:false
});
</script>
<cfinclude template = "includes/_footer.cfm">