forked from joedanz/cf-project-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.cfm
713 lines (675 loc) · 26.4 KB
/
account.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
<cfsetting enablecfoutputonly="true">
<cfprocessingdirective pageencoding="utf-8">
<cfparam name="whichTab" default="">
<cfset variables.errors = "">
<cfif StructKeyExists(form,"submit1")>
<cfif compare(trim(form.email),'') and not request.udf.isEmail(trim(form.email))>
<cfset variables.errors = variables.errors & '<li>The email address you entered was invalid.</li>'>
<cfelse>
<cfset application.user.userUpdate(session.user.userID,form.firstname,form.lastname,form.email,request.udf.NumbersOnly(form.phone),request.udf.NumbersOnly(form.mobile),form.carrierID)>
</cfif>
<cfset session.user.firstName = form.firstname>
<cfset session.user.lastName = form.lastname>
<cfset session.user.email = form.email>
<cfset session.user.phone = form.phone>
<cfset session.user.mobile = form.mobile>
<cfset session.user.carrierID = form.carrierID>
<cfelseif StructKeyExists(form,"submit2")>
<cfif not compareNoCase(form.pass1,form.pass2)>
<cfset newPass = form.pass1>
<cfelse>
<cfset newPass = "">
</cfif>
<cfset application.user.acctUpdate(session.user.userID,form.username,newPass)>
<cfset session.user.username = form.username>
<cfset whichTab = 3>
<cfelseif StructKeyExists(form,"submitimage")>
<!--- this include prevents invalid tag error from on earlier versions --->
<cfif application.isCF8 or application.isRailo>
<cfinclude template="img_proc_acct_cf8.cfm">
<cfelseif application.isBD>
<cfinclude template="img_proc_acct_bd.cfm">
</cfif>
<cfset whichTab = 4>
<cfelseif StructKeyExists(url,"rmvimg")>
<cftry>
<cffile action="delete" file="#application.userFilesPath#avatars/#session.user.userid#_72.jpg">
<cffile action="delete" file="#application.userFilesPath#avatars/#session.user.userid#_48.jpg">
<cffile action="delete" file="#application.userFilesPath#avatars/#session.user.userid#_24.jpg">
<cffile action="delete" file="#application.userFilesPath#avatars/#session.user.userid#_16.jpg">
<cfcatch></cfcatch>
</cftry>
<cfset application.user.setImage(session.user.userID,0)>
<cfset whichTab = 4>
<cfelseif StructKeyExists(form,"style")>
<cfset session.style = form.style>
<cfset application.user.setStyle(session.user.userID,form.style)>
<cfset whichTab = 5>
<cfif not application.isCF8 and not application.isBD and not application.isRailo>
<cfset whichTab = whichTab - 1>
</cfif>
<cfelseif StructKeyExists(url,"editStyle")>
<cfset whichTab = 5>
<cfif not application.isCF8 and not application.isBD and not application.isRailo>
<cfset whichTab = whichTab - 1>
</cfif>
<cfelseif StructKeyExists(form,"tz")>
<cfset application.user.setLocaleTimezone(session.user.userID,form.locale,form.timezone)>
<cfset session.locale = form.locale>
<cfset session.timezone = form.timezone>
<cfset whichTab = 6>
<cfif not application.isCF8 and not application.isBD and not application.isRailo>
<cfset whichTab = whichTab - 1>
</cfif>
<cfelseif StructKeyExists(url,"rp")>
<cfset application.role.remove(url.rp,session.user.userid)>
</cfif>
<cfset user = application.user.get(session.user.userid)>
<cfset projects = application.project.get(session.user.userid)>
<cfset notifications = application.project.userNotify(session.user.userid)>
<!--- Loads header/footer --->
<cfmodule template="#application.settings.mapping#/tags/layout.cfm" templatename="main" title="#application.settings.app_title# » My Account">
<cfhtmlhead text="<script type='text/javascript'>
function confirmSubmit1() {
var errors = '';
if (document.edit.firstname.value == '') {errors = errors + ' ** You must enter your first name.\n';}
if (document.edit.lastname.value == '') {errors = errors + ' ** You must enter your last name.\n';}
if (document.edit.email.value == '') {errors = errors + ' ** You must enter your email.\n';}
if (errors != '') {
alert('Please correct the following errors:\n\n' + errors)
return false;
} else return true;
}
function confirmSubmit2() {
var errors = '';
if (document.editacct.username.value == '') {errors = errors + ' ** You must enter your username.\n';}
if ((document.editacct.pass1.value != '' || document.editacct.pass2.value != '') && document.editacct.pass1.value != document.editacct.pass2.value) {errors = errors + ' ** The new passwords must match.\n';}
if (errors != '') {
alert('Please correct the following errors:\n\n' + errors)
return false;
} else return true;
}
</script>
<script type='text/javascript' src='#application.settings.mapping#/js/jquery.history_remote.pack.js'></script>
<script type='text/javascript' src='#application.settings.mapping#/js/jquery.tabs.pack.js'></script>
<script type='text/javascript' src='#application.settings.mapping#/js/jquery.hoverIntent.js'></script>
<script type='text/javascript' src='#application.settings.mapping#/js/jquery.cluetip.js'></script>
<link rel='stylesheet' href='#application.settings.mapping#/css/jquery.tabs.css' media='screen,projection' type='text/css' />
<!--[if lte IE 7]>
<link rel='stylesheet' href='#application.settings.mapping#/css/jquery.tabs-ie.css' type='text/css' media='projection, screen' />
<![endif]-->
<script type='text/javascript'>
$(function() {
$('##container1').tabs(#whichTab#);
$('a.jt').cluetip({
cluetipClass: 'jtip',
width:440,
local:true,
cursor: 'pointer',
arrows: true,
dropShadow: false,
hoverIntent: false
});
});
</script>
">
<cfoutput>
<div id="container">
<!--- left column --->
<div class="left">
<div class="main">
<div class="header">
<h2 class="user">Edit account details</h2>
</div>
<div class="content">
<cfif compare(variables.errors,'')>
<div class="wrapper">
<div class="error">
<h4 class="alert b r">An Error Has Occurred</h3>
<ul>#variables.errors#</ul>
</div>
</div>
</cfif>
<div id="container1">
<ul>
<li><a href="##user"><span>General Info</span></a></li>
<li><a href="##projects"><span>Projects</span></a></li>
<li><a href="##account"><span>Account Info</span></a></li>
<cfif application.isCF8 or application.isBD or application.isRailo>
<li><a href="##avatar"><span>Avatar</span></a></li>
</cfif>
<li><a href="##skin"><span>Style</span></a></li>
<li><a href="##locale"><span>Locale / Timezone</span></a></li>
</ul>
<div id="user">
<form action="#cgi.script_name#" method="post" name="edit" class="frm">
<p>
<label for="fname" class="req">First Name:</label>
<input type="text" name="firstname" id="fname" value="#HTMLEditFormat(user.firstName)#" maxlength="12" />
</p>
<p>
<label for="lname" class="req">Last Name:</label>
<input type="text" name="lastname" id="lname" value="#HTMLEditFormat(user.lastName)#" maxlength="20" />
</p>
<p>
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="#HTMLEditFormat(user.email)#" maxlength="120" />
</p>
<p>
<label for="phone">Phone:</label>
<input type="text" name="phone" id="phone" value="#HTMLEditFormat(request.udf.phoneFormat(user.phone,"(xxx) xxx-xxxx"))#" maxlength="15" />
</p>
<p>
<label for="mobile">Mobile:</label>
<input type="text" name="mobile" id="mobile" value="#HTMLEditFormat(request.udf.phoneFormat(user.mobile,"(xxx) xxx-xxxx"))#" maxlength="15" />
</p>
<p>
<label for="carrier">Carrier:</label>
<select name="carrierID" id="carrier">
<option value=""> </option>
</cfoutput>
<cfoutput query="application.carriers" group="country">
<optgroup label="#country#">
<cfoutput>
<option value="#carrierID#"<cfif not compare(user.carrierID,carrierID)> selected="selected"</cfif>>#HTMLEditFormat(carrier)#</option>
</cfoutput>
</optgroup>
</cfoutput>
<cfoutput>
</select> <span style="font-size:85%;" class="i">(used for SMS notifications)</span>
</p>
<label for="submit1"> </label>
<input type="submit" class="button" name="submit1" id="submit1" value="Update Account" onclick="return confirmSubmit1();" />
</form>
</div>
<div id="projects">
<table class="clean admin full mb10">
<tr>
<th>Project</th>
<th class="tac">Owner</th>
<th class="tac">Admin</th>
<th class="tac">Permissions</th>
<th class="tac">Notifications</th>
<th class="tac">Remove</th>
</tr>
<cfloop query="projects">
<tr id="r#currentRow#">
<td>#name#</td>
<td class="tac"><img src="./images/<cfif not compareNoCase(session.user.userid,ownerid)>close<cfelse>cancel</cfif>.gif" height="16" width="16" border="0" alt="#YesNoFormat(not compareNoCase(session.user.userid,ownerid))#" /></td>
<td class="tac">#YesNoIcon('admin')#</td>
<td class="tac">[<a href="##p#currentRow#" rel="##p#currentRow#" title="#name# Permissions" class="jt">Show Popup</a>]</td>
<td class="tac">[<a href="##n#currentRow#" rel="##n#currentRow#" title="#name# Notifications" class="jt">Show Popup</a> / <a href="projectNotify.cfm?p=#projectID#">Edit</a>]</td>
<td class="tac">[<a href="#cgi.script_name#?rp=#projectid###projects" onclick="return confirm('Are you sure you wish to remove yourself from this project?')">remove</a>]</td>
</tr>
</cfloop>
</table>
<cfloop query="projects">
<div id="p#currentRow#" style="display:none;">
<table>
<tr valign="top"><td width="50%">
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Messages</th>
</tr>
</thead>
<tbody>
<tr>
<td>View messages</td>
<td class="tac">#YesNoIcon('msg_view')#</td>
</tr>
<tr>
<td>Post/edit messages</td>
<td class="tac">#YesNoIcon('msg_edit')#</td>
</tr>
<tr>
<td>Comment on messages</td>
<td class="tac">#YesNoIcon('msg_comment')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">To-Dos</th>
</tr>
</thead>
<tbody>
<tr>
<td>View to-do lists</td>
<td class="tac">#YesNoIcon('todolist_view')#</td>
</tr>
<tr>
<td>Add/edit to-do lists</td>
<td class="tac">#YesNoIcon('todolist_edit')#</td>
</tr>
<tr>
<td>Add/edit to-do items</td>
<td class="tac">#YesNoIcon('todo_edit')#</td>
</tr>
<tr>
<td>Comment on to-do items</td>
<td class="tac">#YesNoIcon('todo_comment')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Milestones</th>
</tr>
</thead>
<tbody>
<tr>
<td>View milestones</td>
<td class="tac">#YesNoIcon('mstone_view')#</td>
</tr>
<tr>
<td>Add/edit milestones</td>
<td class="tac">#YesNoIcon('mstone_edit')#</td>
</tr>
<tr>
<td>Comment on milestones</td>
<td class="tac">#YesNoIcon('mstone_comment')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Files</th>
</tr>
</thead>
<tbody>
<tr>
<td>View files</td>
<td class="tac">#YesNoIcon('file_view')#</td>
</tr>
<tr>
<td>Upload/edit files</td>
<td class="tac">#YesNoIcon('file_edit')#</td>
</tr>
<tr>
<td>Comment on files</td>
<td class="tac">#YesNoIcon('file_comment')#</td>
</tr>
</tbody>
</table>
</td><td width="50%">
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Issues</th>
</tr>
</thead>
<tbody>
<tr>
<td>View issues</td>
<td class="tac">#YesNoIcon('issue_view')#</td>
</tr>
<tr>
<td>Add/edit issues</td>
<td class="tac">#YesNoIcon('issue_edit')#</td>
</tr>
<tr>
<td>Assign issues</td>
<td class="tac">#YesNoIcon('issue_assign')#</td>
</tr>
<tr>
<td>Resolve issues</td>
<td class="tac">#YesNoIcon('issue_resolve')#</td>
</tr>
<tr>
<td>Close issues</td>
<td class="tac">#YesNoIcon('issue_close')#</td>
</tr>
<tr>
<td>Comment on issues</td>
<td class="tac">#YesNoIcon('issue_comment')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Time Tracking</th>
</tr>
</thead>
<tbody>
<tr>
<td>View time tracking</td>
<td class="tac">#YesNoIcon('time_view')#</td>
</tr>
<tr>
<td>Add/edit time tracking</td>
<td class="tac">#YesNoIcon('time_edit')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Billing</th>
</tr>
</thead>
<tbody>
<tr>
<td>View billing</td>
<td class="tac">#YesNoIcon('bill_view')#</td>
</tr>
<tr>
<td>Add/edit billing</td>
<td class="tac">#YesNoIcon('bill_edit')#</td>
</tr>
<tr>
<td>Manage billing rates</td>
<td class="tac">#YesNoIcon('bill_rates')#</td>
</tr>
<tr>
<td>Generate invoices</td>
<td class="tac">#YesNoIcon('bill_invoices')#</td>
</tr>
<tr>
<td>Mark items paid</td>
<td class="tac">#YesNoIcon('bill_markpaid')#</td>
</tr>
</tbody>
</table>
<table class="permspop">
<thead>
<tr>
<th class="b" colspan="2">Subversion</th>
</tr>
</thead>
<tbody>
<tr>
<td>Access Subversion repository</td>
<td class="tac">#YesNoIcon('svn')#</td>
</tr>
</tbody>
</table>
</td></tr>
</table>
</div>
<div id="n#currentRow#" style="display:none;">
<table>
<tr valign="top"><td width="50%">
<table class="notifypop">
<thead>
<tr>
<th class="b">Messages</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New message</td>
<td class="tac">#YesNoIcon('email_msg_new')#</td>
<td class="tac">#YesNoIcon('mobile_msg_new')#</td>
</tr>
<tr>
<td>Updated message</td>
<td class="tac">#YesNoIcon('email_msg_upd')#</td>
<td class="tac">#YesNoIcon('mobile_msg_upd')#</td>
</tr>
<tr>
<td>Comment on message</td>
<td class="tac">#YesNoIcon('email_msg_com')#</td>
<td class="tac">#YesNoIcon('mobile_msg_com')#</td>
</tr>
</tbody>
</table>
<table class="notifypop">
<thead>
<tr>
<th class="b">To-Dos</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New to-do item</td>
<td class="tac">#YesNoIcon('email_todo_new')#</td>
<td class="tac">#YesNoIcon('mobile_todo_new')#</td>
</tr>
<tr>
<td>Updated to-do item</td>
<td class="tac">#YesNoIcon('email_todo_upd')#</td>
<td class="tac">#YesNoIcon('mobile_todo_upd')#</td>
</tr>
<tr>
<td>Comment on to-do item</td>
<td class="tac">#YesNoIcon('email_todo_com')#</td>
<td class="tac">#YesNoIcon('mobile_todo_com')#</td>
</tr>
</tbody>
</table>
<table class="notifypop">
<thead>
<tr>
<th class="b">Milestones</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New milestone</td>
<td class="tac">#YesNoIcon('email_mstone_new')#</td>
<td class="tac">#YesNoIcon('mobile_mstone_new')#</td>
</tr>
<tr>
<td>Updated milestone</td>
<td class="tac">#YesNoIcon('email_mstone_upd')#</td>
<td class="tac">#YesNoIcon('mobile_mstone_upd')#</td>
</tr>
<tr>
<td>Comment on milestone</td>
<td class="tac">#YesNoIcon('email_mstone_com')#</td>
<td class="tac">#YesNoIcon('mobile_mstone_com')#</td>
</tr>
</tbody>
</table>
<table class="notifypop">
<thead>
<tr>
<th class="b">Files</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New file</td>
<td class="tac">#YesNoIcon('email_file_new')#</td>
<td class="tac">#YesNoIcon('mobile_file_new')#</td>
</tr>
<tr>
<td>Updated file</td>
<td class="tac">#YesNoIcon('email_file_upd')#</td>
<td class="tac">#YesNoIcon('mobile_file_upd')#</td>
</tr>
<tr>
<td>Comment on file</td>
<td class="tac">#YesNoIcon('email_file_com')#</td>
<td class="tac">#YesNoIcon('mobile_file_com')#</td>
</tr>
</tbody>
</table>
</td><td width="50%">
<table class="notifypop">
<thead>
<tr>
<th class="b">Issues</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New issue</td>
<td class="tac">#YesNoIcon('email_issue_new')#</td>
<td class="tac">#YesNoIcon('mobile_issue_new')#</td>
</tr>
<tr>
<td>Updated issue</td>
<td class="tac">#YesNoIcon('email_issue_upd')#</td>
<td class="tac">#YesNoIcon('mobile_issue_upd')#</td>
</tr>
<tr>
<td>Comment on issue</td>
<td class="tac">#YesNoIcon('email_issue_com')#</td>
<td class="tac">#YesNoIcon('mobile_issue_com')#</td>
</tr>
</tbody>
</table>
<table class="notifypop">
<thead>
<tr>
<th class="b">Time Tracking</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New time tracking item</td>
<td class="tac">#YesNoIcon('email_time_new')#</td>
<td class="tac">#YesNoIcon('mobile_time_new')#</td>
</tr>
<tr>
<td>Updated time tracking</td>
<td class="tac">#YesNoIcon('email_time_upd')#</td>
<td class="tac">#YesNoIcon('mobile_time_upd')#</td>
</tr>
</tbody>
</table>
<table class="notifypop">
<thead>
<tr>
<th class="b">Billing</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New billing item</td>
<td class="tac">#YesNoIcon('email_bill_new')#</td>
<td class="tac">#YesNoIcon('mobile_bill_new')#</td>
</tr>
<tr>
<td>Updated billing item</td>
<td class="tac">#YesNoIcon('email_bill_upd')#</td>
<td class="tac">#YesNoIcon('mobile_bill_upd')#</td>
</tr>
<tr>
<td>Billing item marked paid</td>
<td class="tac">#YesNoIcon('email_bill_paid')#</td>
<td class="tac">#YesNoIcon('mobile_bill_paid')#</td>
</tr>
</tbody>
</table>
</td></tr>
</table>
</div>
</cfloop>
</div>
<div id="account">
<form action="#cgi.script_name#" method="post" name="editacct" class="frm">
<p>
<label for="user" class="req">Username:</label>
<input type="text" name="username" id="username" value="#HTMLEditFormat(user.username)#" maxlength="20" />
</p>
<p>
<label for="pass1">New Password:</label>
<input type="text" name="pass1" id="pass1" value="" maxlength="20" />
</p>
<p>
<label for="pass2">Confirm Password:</label>
<input type="text" name="pass2" id="pass2" value="" maxlength="20" />
</p>
<label for="submit2"> </label>
<input type="submit" class="button" name="submit2" id="submit2" value="Update Account" onclick="return confirmSubmit2();" />
</form>
</div>
<cfif application.isCF8 or application.isBD or application.isRailo>
<div id="avatar">
<form action="#cgi.script_name#" method="post" name="editavatar" class="frm" enctype="multipart/form-data">
<p>
<label for="img"> </label>
<cfif user.avatar eq 1>
<img src="#application.settings.userFilesMapping#/avatars/#session.user.userid#_72.jpg" height="72" width="72" border="0" alt="#user.firstName# #user.lastName#" style="border:1px solid ##666;" />
<a href="#cgi.script_name#?rmvimg">remove</a>
<cfelse>
<img src="./images/noavatar72.gif" height="72" width="72" border="0" alt="No Avatar" style="border:1px solid ##666;" />
</cfif>
</p>
<p>
<label for="imgfile">Profile Image:</label>
<input type="file" name="imagefile" id="imgfile" />
</p>
<label for="submit3"> </label>
<input type="submit" class="button" name="submitimage" id="submit3" value="Upload Image" />
</form>
</div>
</cfif>
<div id="skin">
<form action="#cgi.script_name#" method="post" name="editstyle" class="frm">
<p>
<label for="headstyle">Your Style:</label>
<select name="style" id="headstyle">
<option value="blue"<cfif not compare(user.style,'blue')> selected="selected"</cfif>>Blue</option>
<option value="green"<cfif not compare(user.style,'green')> selected="selected"</cfif>>Green</option>
<option value="grey"<cfif not compare(user.style,'grey')> selected="selected"</cfif>>Grey</option>
<option value="red"<cfif not compare(user.style,'red')> selected="selected"</cfif>>Red</option>
<option value="stars"<cfif not compare(user.style,'stars')> selected="selected"</cfif>>Stars</option>
</select>
</p>
<label for="submit4"> </label>
<input type="submit" class="button" name="skinsub" id="submit4" value="Set Style" />
</form>
</div>
<div id="locale">
<form action="#cgi.script_name#" method="post" name="editlocale" class="frm">
<p>
<label for="yourlocale">Your Locale:</label>
<select name="locale" id="yourlocale">
<cfloop list="#Server.Coldfusion.SupportedLocales#" index="i">
<option value="#i#"<cfif not compare(i,session.locale)> selected="selected"</cfif>>#i#</option>
</cfloop>
</select>
</p>
<p>
<label for="timezone">Your Timezone:</label>
<select name="timezone" id="timezone" size="10">
<cfloop from="1" to="#ArrayLen(application.timezones)#" index="i">
<option value="#application.timezones[i]#"<cfif not compare(application.timezones[i],session.timezone)> selected="selected"</cfif>>#application.timezones[i]#</option>
</cfloop>
</select>
</p>
<label for="submit5"> </label>
<input type="submit" class="button" name="tz" id="submit5" value="Set Locale / Timezone" />
</form>
</div>
</div>
</div>
</div>
<div class="bottom"> </div>
<div class="footer">
<cfinclude template="footer.cfm">
</div>
</div>
<!--- right column --->
<div class="right">
</div>
</div>
</cfoutput>
</cfmodule>
<cffunction name="YesNoIcon">
<cfargument name="fieldName" type="string" required="true">
<cfoutput><img src="./images/<cfif Evaluate(arguments.fieldName) eq 1>close<cfelse>cancel</cfif>.gif" height="16" width="16" border="0" alt="#YesNoFormat(Evaluate(arguments.fieldName))#" /></cfoutput>
</cffunction>
<cfsetting enablecfoutputonly="false">