-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.php
773 lines (764 loc) · 24.8 KB
/
edit.php
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
<?php
/**This program was written by David Brear in May of 2007
* This page is for editing entries to the school index page.
* This page is only accessable to admins.
*/
//include the header.php which also houses the .css file
//also include the database connection, this returns an object called $connection
include("include/authentication.php");
include("include/collegeconnection.php");
//if the cookie userid has been sent, this user is logged in and has their ID as a cookie.
if($_COOKIE['userid'])
{
//this user is logged in so get, from the database, their login information.
$data = mysql_query('SELECT * FROM login WHERE id ='.$_COOKIE['userid'].';', $connection) or die(mysql_error());
$row = mysql_fetch_array($data, MYSQL_ASSOC) or die('Error: Could not find that id.<br> <a href="edit.php">back</a>');
}
else
{
//else this user is either not logged in or does not have cookies enabled. kick them out.
header ("Location: schoolindex.php");
}
if(!$row['admin'])
{
//if this user does not have admin status kick them out.
header ("Location: schoolindex.php");
}
//return, from the url, if the admin wants to delete or edit an entry
if(isset($_GET['edit']))
{
$id = ($_GET['edit']); //if this is set, they want to edit an entry
}
if(isset($_GET['delete']))
{
$delete = ($_GET['delete']);//if this is set, they want to delete an entry
}
if($delete)
{
//delete the entry.
$data = mysql_query('DELETE FROM schools WHERE id ='.$delete.';', $connection) or die(mysql_error());
header ("Location: schoolindex.php?deleted=1");
}
if (isset($id) && !$_POST['submitted'])
{
//if they want to edit the entry and this page has not been already filled out.
$data = mysql_query('SELECT * FROM schools WHERE id ='.$id.';', $connection) or die(mysql_error());
$row = mysql_fetch_array($data, MYSQL_ASSOC) or die('Error: Could not find that id.<br> <a href="edit.php">back</a>');
//grab all the information from the database and put it into the page variables.
$name = stripslashes($row['name']);
$colors = stripslashes($row['colors']);
$city = stripslashes($row['city']);
$description = stripslashes($row['description']);
$state = stripslashes($row['state']);
$num_students = stripslashes($row['num_students']);
$abrev = stripslashes($row['abrev']);
$schoolEmail = stripslashes($row['schoolEmail']);
$public = stripslashes($row['public']);
$girlguy = stripslashes($row['girlguy']);
$frats = stripslashes($row['frats']);
$sorority = stripslashes($row['sorority']);
$percentgreek = stripslashes($row['percentgreek']);
$religiousgroups = stripslashes($row['religiousgroups']);
$percentreligious = stripslashes($row['percentreligious']);
$sports = stripslashes($row['sports']);
$transferrate = stripslashes($row['transferrate']);
$alcoholpolicy = stripslashes($row['alcoholpolicy']);
$classpercent = stripslashes($row['classpercent']);
$avgentergpa = stripslashes($row['avgentergpa']);
$avgsat = stripslashes($row['avgsat']);
$avggpa = stripslashes($row['avggpa']);
/*7 extra attributes added on 09/20/07*/
$stuPerMaj = stripslashes($row['stuPerMaj']);
$mascot = stripslashes($row['mascot']);
$achieve = stripslashes($row['achieve']);
$attract = stripslashes($row['attract']);
$newBuild = stripslashes($row['newBuild']);
$campType = stripslashes($row['campType']);
$socialLife = stripslashes($row['socialLife']);
/*legalAvail added 10/3/07*/
$legalAvail = stripslashes($row['legalAvail']);
/*avgCost is Average Annual Cost added 10/12/07*/
$avgCost = stripslashes($row['avgCost']);
//done.
}
else if(isset($id) && $_POST['submitted'])
{
//if the person wants to edit the entry and has already submitted their modifications.
//get the modifications from the form (POSTED)
if(isset($_POST['name']))
{
$name = addslashes($_POST['name']);
}
else
{
$name = '';
}
if(isset($_POST['city']))
{
$city = addslashes($_POST['city']);
}
else
{
$city = '';
}
if(isset($_POST['state']))
{
$state = addslashes($_POST['state']);
}
else
{
$state = '';
}
if(isset($_POST['description']))
{
$description = addslashes($_POST['description']);
}
else
{
$description = '';
}
if(isset($_POST['num_students']))
{
$num_students = addslashes($_POST['num_students']);
}
else
{
$num_students = '';
}
if(isset($_POST['abrev']))
{
$abrev = addslashes($_POST['abrev']);
}
else
{
$abrev = '';
}
if(isset($_POST['schoolEmail']))
{
$schoolEmail = addslashes($_POST['schoolEmail']);
}
else
{
$schoolEmail = '';
}
if(isset($_POST['public']))
{
$public = addslashes($_POST['public']);
}
else
{
$public = '';
}
if(isset($_POST['girlguy']))
{
$girlguy = addslashes($_POST['girlguy']);
}
else
{
$girlguy = '';
}
if(isset($_POST['frats']))
{
$frats = addslashes($_POST['frats']);
}
else
{
$frats = '';
}
if(isset($_POST['sorority']))
{
$sorority = addslashes($_POST['sorority']);
}
else
{
$sorority = '';
}
if(isset($_POST['percentgreek']))
{
$percentgreek = addslashes($_POST['percentgreek']);
}
else
{
$percentgreek = '';
}
if(isset($_POST['religiousgroups']))
{
$religiousgroups = addslashes($_POST['religiousgroups']);
}
else
{
$religiousgroups = '';
}
if(isset($_POST['percentreligious']))
{
$percentreligious = addslashes($_POST['percentreligious']);
}
else
{
$percentreligious = '';
}
if(isset($_POST['sports']))
{
$sports = addslashes($_POST['sports']);
}
else
{
$sports = '';
}
if(isset($_POST['transferrate']))
{
$transferrate = addslashes($_POST['transferrate']);
}
else
{
$transferrate = '';
}
if(isset($_POST['alcoholpolicy']))
{
$alcoholpolicy = addslashes($_POST['alcoholpolicy']);
}
else
{
$alcoholpolicy = '';
}
if(isset($_POST['classpercent']))
{
$classpercent = addslashes($_POST['classpercent']);
}
else
{
$classpercent = '';
}
if(isset($_POST['avgentergpa']))
{
$avgentergpa = addslashes($_POST['avgentergpa']);
}
else
{
$avgentergpa = '';
}
if(isset($_POST['avgsat']))
{
$avgsat = addslashes($_POST['avgsat']);
}
else
{
$avgsat = '';
}
if(isset($_POST['avggpa']))
{
$avggpa = addslashes($_POST['avggpa']);
}
else
{
$avggpa = '';
}
if(isset($_POST['colors']))
{
$colors = addslashes($_POST['colors']);
}
else
{
$colors = '';
}
/** Extra 7 attrributes added on 09-20-07**/
if(isset($_POST['stuPerMaj']))
{
$stuPerMaj = addslashes($_POST['stuPerMaj']);
}
else
{
$stuPerMaj = '';
}
if(isset($_POST['mascot']))
{
$mascot = addslashes($_POST['mascot']);
}
else
{
$mascot = '';
}
if(isset($_POST['achieve']))
{
$achieve = addslashes($_POST['achieve']);
}
else
{
$achieve = '';
}
if(isset($_POST['attract']))
{
$attract = addslashes($_POST['attract']);
}
else
{
$attract = '';
}
if(isset($_POST['newBuild']))
{
$newBuild = addslashes($_POST['newBuild']);
}
else
{
$newBuild = '';
}
if(isset($_POST['campType']))
{
$campType = addslashes($_POST['campType']);
}
else
{
$campType = '';
}
if(isset($_POST['socialLife']))
{
$socialLife = addslashes($_POST['socialLife']);
}
else
{
$socialLife = '';
}
if(isset($_POST['legalAvail']))
{
$legalAvail = addslashes($_POST['legalAvail']);
}
else
{
$legalAvail = '';
}
if(isset($_POST['avgCost']))
{
$avgCost = addslashes($_POST['avgCost']);
}
else
{
$avgCost = '';
}
//update the database entry for this entry.
mysql_query('update schools set colors="'.$colors.'", name="'.$name.'", city="'.$city.'",description = "'.$description.'",state="'.$state.'",num_students="'.$num_students.'", abrev ="'.$abrev.'", schoolEmail ="'.$schoolEmail.'", public="'.$public.'", girlguy="'.$girlguy.'", frats ="'.$frats.'",
sorority="'.$sorority.'", percentgreek="'.$percentgreek.'", religiousgroups="'.$religiousgroups.'", percentreligious="'.$percentreligious.'", sports="'.$sports.'", transferrate="'.$transferrate.'", alcoholpolicy="'.$alcoholpolicy.'", classpercent="'.$classpercent.'", avgentergpa="'.$avgentergpa.'", avgsat="'.$avgsat.'", avggpa="'.$avggpa.'",
stuPerMaj = "'.$stuPerMaj.'", mascot ="'.$mascot.'", achieve="'.$achieve.'", attract = "'.$attract.'", newBuild="'.$newBuild.'", legalAvail="'.$legalAvail.'", avgCost="'.$avgCost.'", campType="'.$campType.'", socialLife="'.$socialLife.'" WHERE id='.$id.';', $connection)
or die('Error: '.mysql_error().' LINE 327<br> <a href="edit.php?edit='.$id.'">back</a>');
header ("Location: schoolindex.php?modified=1");
//return that this entry was modified.
}
else if($_POST['submitted'])
{
//if this user just wants to add a new entry.
//grab the data they entered.
//insert this data into the database.
$string = '';
if (isset($_POST['name']) && $_POST['name'] != '')
{
$string = $string.'"'.addslashes($_POST['name']).'",';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['city']) && $_POST['city'] != '')
{
$string = $string.'"'.addslashes($_POST['city']).'",';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['state']) && $_POST['state'] != '')
{
$string = $string.'"'.addslashes($_POST['state']).'",';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['description']) && $_POST['description'] != '')
{
$string = $string.'"'.addslashes($_POST['description']).'",';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['num_students']) && $_POST['num_students'] != '')
{
$string = $string.'"'.addslashes($_POST['num_students']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['abrev']) && $_POST['abrev'] != '')
{
$string = $string.'"'.addslashes($_POST['abrev']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['schoolEmail']) && $_POST['schoolEmail'] != '')
{
$string = $string.'"'.addslashes($_POST['schoolEmail']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['public']) && $_POST['public'] != '')
{
$string = $string.'"'.addslashes($_POST['public']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['girlguy']) && $_POST['girlguy'] != '')
{
$string = $string.'"'.addslashes($_POST['girlguy']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['frats']) && $_POST['frats'] != '')
{
$string = $string.'" '.addslashes($_POST['frats']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['sorority']) && $_POST['sorority'] != '')
{
$string = $string.'" '.addslashes($_POST['sorority']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['percentgreek']))
{
$string = $string.'"'.addslashes($_POST['percentgreek']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['religiousgroups']) && $_POST['religiousgroups'] != '')
{
$string = $string.'" '.addslashes($_POST['religiousgroups']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['percentreligious']))
{
$string = $string.'"'.addslashes($_POST['percentreligious']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['sports']) && $_POST['sports'] != '')
{
$string = $string.'" '.addslashes($_POST['sports']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['transferrate']) &&is_numeric($_POST['transferrate']))
{
$string = $string.'" '.addslashes($_POST['transferrate']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['alcoholpolicy']) && $_POST['alcoholpolicy'] != '')
{
$string = $string.'" '.addslashes($_POST['alcoholpolicy']).'", ';
}
else
{
$string = $string.'NULL,';
}
if (isset($_POST['classpercent']))
{
$string = $string.'" '.addslashes($_POST['classpercent']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['avgentergpa']))
{
$string = $string.'"'.addslashes($_POST['avgentergpa']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['avgsat']))
{
$string = $string.'"'.addslashes($_POST['avgsat']).'", ';
}
else
{
$string = $string.'0,';
}
if (isset($_POST['colors']))
{
$string = $string.'"'.addslashes($_POST['colors']).'", ';
}
else
{
$string = $string.'"",';
}
// EXTRA 7 attributes added 09-20-07 are below followed by avggpa which is always the closer attribute**//
if (isset($_POST['stuPerMaj']) && $_POST['stuPerMaj'] != '')
{
$string = $string.'"'.addslashes($_POST['stuPerMaj']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['mascot']) && $_POST['mascot'] != '')
{
$string = $string.'"'.addslashes($_POST['mascot']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['achieve']) && $_POST['achieve'] != '')
{
$string = $string.'"'.addslashes($_POST['achieve']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['attract']) && $_POST['attract'] != '')
{
$string = $string.'"'.addslashes($_POST['attract']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['newBuild']) && $_POST['newBuild'] != '')
{
$string = $string.'"'.addslashes($_POST['newBuild']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['campType']) && $_POST['campType'] != '')
{
$string = $string.'"'.addslashes($_POST['campType']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['socialLife']) && $_POST['socialLife'] != '')
{
$string = $string.'"'.addslashes($_POST['socialLife']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['legalAvail']) && $_POST['legalAvail'] != '')
{
$string = $string.'"'.addslashes($_POST['legalAvail']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['avgCost']) && $_POST['avgCost'] != '')
{
$string = $string.'"'.addslashes($_POST['avgCost']).'", ';
}
else
{
$string = $string.'"",';
}
if (isset($_POST['avggpa']))
{
$string = $string.'"'.addslashes($_POST['avggpa']).'"';
}
else
{
$string = $string.'""';
}
mysql_query('INSERT INTO schools(name, city, state, description, num_students, abrev, schoolEmail, public, girlguy,
frats, sorority, percentgreek, religiousgroups, percentreligious, sports, transferrate, alcoholpolicy, classpercent, avgentergpa, avgsat, colors, stuPerMaj, mascot, achieve, attract, newBuild, campType, socialLife, legalAvail, avgCost, avggpa) values('.$string.');', $connection)
or die('Error: '.mysql_error().'<br> <a href="edit.php">Back</a>');
header ("Location: schoolindex.php?added=1");
//return that the entry has successfully been added
}
include("include/header.php");
?>
<html>
<head>
<title>
Edit log
</title>
</head>
<script type="text/javascript">
function check()
{
return window.confirm("are you sure you want to <?php if(isset($id)){print 'modify';} else {print 'add';} ?> this entry?");
}
</script>
<style type="text/css" rel="Stylesheet">
.gray
{
background-color: #AAA;
}
</style>
<body>
<div id="mainContentPart">
<div class="schoolIndexCenterbox">
<div class="top"><h1 class="title">Edit page</h1></div>
<div id="composebox">
<table cellspacing="0" id="editTable">
<form name="editForm" action="<?php $_SERVER['PHP_SELF'] ?>" onsubmit="return check();" method="post">
<tr><td><label for="name" class="line">Name</label></td>
<td><input type="text" name="name" value="<?php print $name?>" size="20"></td></tr>
<tr class="gray"><td><label for="colors">School Colors(HTML colors separated by commas)</label></td>
<td><input type="text" name="colors" value="<?php print $colors ?>" size="20"></td></tr>
<tr><td><label for="city">City</label></td>
<td><input type="text" name="city" value="<?php print $city ?>" size="20"></td></tr>
<tr class="gray"><td><label for="state">State</label></td>
<td><select name="state">
<option selected="selected" name="<?php print '*'.$state.'*' ?>"><?php print $state ?></option>
<option name="Alabama">Alabama</option>
<option name="Alaska">Alaska</option>
<option name="Arizona">Arizona</option>
<option name="Arkansas">Arkansas</option>
<option name="California">California</option>
<option name="Colorado">Colorado</option>
<option name="Connecticut">Connecticut</option>
<option name="Delaware">Delaware</option>
<option name="Florida">Florida</option>
<option name="Georgia">Georgia</option>
<option name="Hawaii">Hawaii</option>
<option name="Idaho">Idaho</option>
<option name="Illinois">Illinois</option>
<option name="Indiana">Indiana</option>
<option name="Iowa">Iowa</option>
<option name="Kansas">Kansas</option>
<option name="Kentucky">Kentucky</option>
<option name="Louisianna">Louisianna</option>
<option name="Maine">Maine</option>
<option name="Maryland">Maryland</option>
<option name="Massachusettes">Massachusettes</option>
<option name="Michigan">Michigan</option>
<option name="Minnesota">Minnesota</option>
<option name="Mississippi">Mississippi</option>
<option name="Missouri">Missouri</option>
<option name="Montana">Montana</option>
<option name="Nebraska">Nebraska</option>
<option name="Nevada">Nevada</option>
<option name="New Hampshire">New Hampshire</option>
<option name="New Jersey">New Jersey</option>
<option name="New Mexico">New Mexico</option>
<option name="New York">New York</option>
<option name="North Carolina">North Carolina</option>
<option name="North Dakota">North Dakota</option>
<option name="Ohio">Ohio</option>
<option name="Oklohoma">Oklohoma</option>
<option name="Oregon">Oregon</option>
<option name="Pennsylvania">Pennsylvania</option>
<option name="Rhode Island">Rhode Island</option>
<option name="South Carolina">South Carolina</option>
<option name="South Dakota">South Dakota</option>
<option name="Tennessee">Tennessee</option>
<option name="Texas">Texas</option>
<option name="Utah">Ohio</option>
<option name="Vermont">Vermont</option>
<option name="Virginia">Virginia</option>
<option name="Washington">Washington</option>
<option name="West Virginia">West Virginia</option>
<option name="Wisconsin">Wisconsin</option>
<option name="Wyoming">Wyoming</option>
</select></td></tr>
<tr><td><label for="description">Description</label></td>
<td><textarea name="description" cols="50" rows="15"><?php print $description ?></textarea></td></tr>
<!--Below added 09-20-07 -->
<tr class="gray"><td colspan="100%" class="note">Social Life is to be determined by the school. *This is <b><u>not</u></b> a free space for us to write whatever we want!*</td></tr>
<tr><td><label for="socialLife">Social Life</label></td>
<td><textarea name="socialLife" cols="50" rows="15"><?php print $socialLife ?></textarea></td></tr>
<tr class="gray"><td><label for="mascot">Mascot</label></td>
<td><input type="text" name="mascot" value="<?php print $mascot ?>" size="20"></td></tr>
<tr><td><label for="stuPerMaj">Number of Students Per Major</label></td>
<td><input type="text" name="stuPerMaj" value="<?php print $stuPerMaj ?>" size="20"></td></tr>
<tr class="gray"><td><label for="achieve">Most Notable Achievements:</label></td>
<td><input type="text" name="achieve" value="<?php print $achieve ?>" size="20"></td></tr>
<tr><td><label for="attract">Closest Attractions: </label></td>
<td><input type="text" name="attract" value="<?php print $attract ?>" size="20"></td></tr>
<tr class="gray"><td><label for="newBuild">Newest Building(name, date built, purpose):</label></td>
<td><textarea name="newBuild" cols="50" rows="15"><?php print $newBuild ?></textarea></td></tr>
<tr><td><label for="campusType">Campus Type(urban, suburban, etc.):</label></td>
<td><input type="text" name="campType" value="<?php print $campType ?>" size="20"></td></tr>
<!--Above added 09-20-07 -->
<tr class="gray"><td><label for="num_students">Number of Students:</label></td>
<td><input type="text" name="num_students" value="<?php print $num_students ?>" size="20"></td></tr>
<tr><td><label for="abrev">Abreviation:</label></td>
<td><input type="text" name="abrev" value="<?php print $abrev ?>" size="20"></td></tr>
<tr class="gray"><td><label for="schoolEmail">Email ending example(cnu.edu, virginia.edu):</label></td>
<td><input type="text" name="schoolEmail" value="<?php print $schoolEmail ?>" size="20"></td></tr>
<tr><td>Public or Private:</td><td><select name="public">
<option selected="selected" value="<?php print $public ?>"><?php print 'Currently: *'.$public.'*' ?></option>
<option value="public">Public</option>
<option value="private">Private</option></select></td></tr>
<tr class="gray"><td>Legal assistance:<br><div class="note">Is Legal assistance provided by the University for all students?</div></td><td><select name="legalAvail">
<option selected="selected" value="<?php print $legalAvail ?>"><?php print 'Currently: *'; $arr = explode(' ', $legalAvail); print $arr[0].'*'; ?></option>
<option value="Yes">Yes</option>
<option value="No">No</option></select></td></tr>
<tr><td><label for="girlguy">Girl/Guy Ratio:</label></td>
<td><input type="text" name="girlguy" value="<?php print $girlguy ?>" size="20"></td></tr>
<tr class="gray"><td><label for="frats">Fraternities:</label></td>
<td><input type="text" name="frats" value="<?php print $frats ?>" size="20"></td></tr>
<tr><td><label for="sorority">Sororities:</label></td>
<td><input type="text" name="sorority" value="<?php print $sorority ?>" size="20"></td></tr>
<tr class="gray"><td><label for="percentgreek">Percent Greek:</label></td>
<td><input type="text" name="percentgreek" value="<?php print $percentgreek ?>" size="20"></td></tr>
<tr><td><label for="religiousgroups">Religious Groups:</label></td>
<td><input type="text" name="religiousgroups" value="<?php print $religiousgroups ?>" size="20"></td></tr>
<tr class="gray"><td><label for="percentreligious">Religious Influence(percent):</label></td>
<td><input type="text" name="percentreligious" value="<?php print $percentreligious ?>" size="20"></td></tr>
<tr><td><label for="sports">Sports Teams:</label></td>
<td><input type="text" name="sports" value="<?php print $sports ?>" size="20"></td></tr>
<tr class="gray"><td><label for="transferrate">Transfer Rate:</label></td>
<td><input type="text" name="transferrate" value="<?php print $transferrate ?>" size="20"></td></tr>
<tr><td><label for="alcoholpolicy">Alcohol Policy:</label></td>
<td><input type="text" name="alcoholpolicy" value="<?php print $alcoholpolicy ?>" size="20"></td></tr>
<tr class="gray"><td><label for="classpercent">Class Percentages:</label></td>
<td><input type="text" name="classpercent" value="<?php print $classpercent ?>" size="20"></td></tr>
<tr><td><label for="avgentergpa">Average Entering GPA:</label></td>
<td><input type="text" name="avgentergpa" value="<?php print $avgentergpa ?>" size="20"></td></tr>
<tr class="gray"><td><label for="avgsat">Average SAT:</label></td>
<td><input type="text" name="avgsat" value="<?php print $avgsat ?>" size="20"></td></tr>
<tr><td><label for="avggpa">Average GPA:</label></td>
<td><input type="text" name="avggpa" value="<?php print $avggpa ?>" size="20"></td></tr>
<tr class="gray"><td><label for="avgCost">Average Annual Cost:<br><div class="note"><center>(including room and board)</center></div></label></td>
<td><textarea type="text" name="avgCost" rows="5" cols="30"><?php print $avgCost ?></textarea></td></tr>
<tr><td colspan="100%"><input type="submit" name="submit" value="Submit">
<input type="hidden" name="submitted" value="1"></td></tr>
</form>
</table>
<a href="schoolindex.php">Back to Listings</a>
</div>
</div>
</div>
</body>
<!--this code was written by David Brear on 05/26/07 -->
</html>