Advertisement
Advertisement
| 05.12.2008 at 06:30PM PDT, ID: 23396457 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
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: 799: 800: 801: 802: 803: 804: 805: 806: 807: 808: 809: 810: 811: 812: 813: 814: 815: 816: 817: 818: 819: 820: 821: 822: 823: 824: 825: 826: 827: 828: 829: 830: 831: 832: 833: 834: 835: 836: 837: 838: 839: 840: 841: 842: 843: 844: 845: 846: 847: 848: 849: 850: 851: 852: 853: 854: 855: 856: 857: 858: 859: 860: 861: 862: 863: 864: 865: 866: 867: 868: 869: 870: 871: 872: 873: 874: 875: 876: 877: 878: 879: 880: 881: 882: 883: 884: 885: 886: 887: 888: 889: 890: 891: 892: 893: 894: 895: 896: 897: 898: 899: 900: 901: 902: 903: 904: 905: 906: 907: 908: 909: 910: 911: 912: 913: 914: 915: 916: 917: 918: 919: 920: |
<?php require_once('Connections/LessonSync.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "login.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php require_once('Connections/LessonSync.php'); ?>
<?php require_once('Connections/LessonSync.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO teacher (tFirst, tLast, tTelephone, tSpecialty1, tSpecialty2) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['tFirst'], "text"),
GetSQLValueString($_POST['tLast'], "text"),
GetSQLValueString($_POST['tTelephone'], "text"),
GetSQLValueString($_POST['tSpecialty1'], "text"),
GetSQLValueString($_POST['tSpecialty2'], "text"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['first'], "text"),
GetSQLValueString($_POST['last'], "text"),
GetSQLValueString($_POST['StreetAddress'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['ZIP'], "text"),
GetSQLValueString($_POST['Hometelephone'], "text"),
GetSQLValueString($_POST['WorkTelephone'], "text"),
GetSQLValueString($_POST['dob'], "date"),
GetSQLValueString($_POST['Instrument'], "text"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
if ((isset($_GET['teachID'])) && ($_GET['teachID'] != "")) {
$deleteSQL = sprintf("DELETE FROM teacher WHERE teachID=%s",
GetSQLValueString($_GET['teachID'], "int"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($deleteSQL, $LessonSync) or die(mysql_error());
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3")) {
$insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument, teacherID) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['first'], "text"),
GetSQLValueString($_POST['last'], "text"),
GetSQLValueString($_POST['StreetAddress'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['ZIP'], "text"),
GetSQLValueString($_POST['Hometelephone'], "text"),
GetSQLValueString($_POST['WorkTelephone'], "text"),
GetSQLValueString($_POST['dob'], "date"),
GetSQLValueString($_POST['Instrument'], "text"),
GetSQLValueString($_POST['teacherID'], "text"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3")) {
$insertSQL = sprintf("INSERT INTO `user` (name, pass, teacherID, adminpriv) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['pass'], "text"),
GetSQLValueString($_POST['teacherID'], "text"),
GetSQLValueString($_POST['adminpriv'], "text"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
$var1_rs_checkStudent = "none";
if (isset($_POST['first'])) {
$var1_rs_checkStudent = $_POST['first'];
}
$var2_rs_checkStudent = "none";
if (isset($_POST['last'])) {
$var2_rs_checkStudent = $_POST['last'];
}
$var3_rs_checkStudent = "none";
if (isset($_POST['Hometelephone'])) {
$var3_rs_checkStudent = $_POST['Hometelephone'];
}
$var4_rs_checkStudent = "none";
if (isset($_POST['WorkTelephone'])) {
$var4_rs_checkStudent = $_POST['WorkTelephone'];
}
$var5_rs_checkStudent = "none";
if (isset($_POST['StreetAddress'])) {
$var5_rs_checkStudent = $_POST['StreetAddress'];
}
$var6_rs_checkStudent = "none";
if (isset($_POST['City'])) {
$var6_rs_checkStudent = $_POST['City'];
}
$var7_rs_checkStudent = "none";
if (isset($_POST['State'])) {
$var7_rs_checkStudent = $_POST['State'];
}
$var8_rs_checkStudent = "none";
if (isset($_POST['ZIP'])) {
$var8_rs_checkStudent = $_POST['ZIP'];
}
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_checkStudent = sprintf("SELECT * FROM student WHERE student.`first` = %s AND student.`last` = %s AND student.Hometelephone = %s AND student.WorkTelephone = %s AND student.StreetAddress = %s AND student.City = %s AND student.`State` = %s AND student.ZIP = %s", GetSQLValueString($var1_rs_checkStudent, "text"),GetSQLValueString($var2_rs_checkStudent, "text"),GetSQLValueString($var3_rs_checkStudent, "text"),GetSQLValueString($var4_rs_checkStudent, "text"),GetSQLValueString($var5_rs_checkStudent, "text"),GetSQLValueString($var6_rs_checkStudent, "text"),GetSQLValueString($var7_rs_checkStudent, "text"),GetSQLValueString($var8_rs_checkStudent, "int"));
$rs_checkStudent = mysql_query($query_rs_checkStudent, $LessonSync) or die(mysql_error());
$row_rs_checkStudent = mysql_fetch_assoc($rs_checkStudent);
$totalRows_rs_checkStudent = mysql_num_rows($rs_checkStudent);
// assume that no match has been found
$alreadyRegistered = false;
//check whether recordset found any matches
if ($totalRows_rs_checkStudent > 0) {
//if found, reset $alreadyRegistered
$alreadyRegistered = true;
}
else {
//go ahead with server behavior
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form7")) {
$insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument, teacherID, Stime, Etime, `Date`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['first'], "text"),
GetSQLValueString($_POST['last'], "text"),
GetSQLValueString($_POST['StreetAddress'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['ZIP'], "text"),
GetSQLValueString($_POST['Hometelephone'], "text"),
GetSQLValueString($_POST['WorkTelephone'], "text"),
GetSQLValueString($_POST['dob'], "date"),
GetSQLValueString($_POST['Instrument'], "text"),
GetSQLValueString($_POST['teacherID'], "text"),
GetSQLValueString($_POST['Stime'], "text"),
GetSQLValueString($_POST['Etime'], "text"),
GetSQLValueString($_POST['Date'], "text"));
mysql_select_db($database_LessonSync, $LessonSync);
$Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
}
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_Student = "SELECT * FROM student";
$rs_Student = mysql_query($query_rs_Student, $LessonSync) or die(mysql_error());
$row_rs_Student = mysql_fetch_assoc($rs_Student);
$totalRows_rs_Student = mysql_num_rows($rs_Student);
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_StudentList = "SELECT student.stuID, CONCAT_WS(', ', student.`last`, student.`first`) AS student FROM student ORDER BY student.`last` ASC";
$rs_StudentList = mysql_query($query_rs_StudentList, $LessonSync) or die(mysql_error());
$row_rs_StudentList = mysql_fetch_assoc($rs_StudentList);
$totalRows_rs_StudentList = mysql_num_rows($rs_StudentList);
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_TeacherInfo = "SELECT teacher.teachID, teacher.tFirst, teacher.tLast, teacher.tTelephone, teacher.tSpecialty1, teacher.tSpecialty2, teacher.Address FROM teacher ORDER BY teacher.teachID ASC";
$rs_TeacherInfo = mysql_query($query_rs_TeacherInfo, $LessonSync) or die(mysql_error());
$row_rs_TeacherInfo = mysql_fetch_assoc($rs_TeacherInfo);
$totalRows_rs_TeacherInfo = mysql_num_rows($rs_TeacherInfo);
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_StudentInfo = "SELECT student.stuID, student.Instrument, student.dob, student.`first`, student.`last`, student.Hometelephone, student.WorkTelephone, student.StreetAddress, student.City, student.`State`, student.ZIP FROM student ORDER BY student.stuID ASC";
$rs_StudentInfo = mysql_query($query_rs_StudentInfo, $LessonSync) or die(mysql_error());
$row_rs_StudentInfo = mysql_fetch_assoc($rs_StudentInfo);
$totalRows_rs_StudentInfo = mysql_num_rows($rs_StudentInfo);
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_Tchr_TeacherList = "SELECT teacher.teachID, CONCAT_WS(', ', teacher.tLast, teacher.tFirst) AS teacher, teacher.tFirst, teacher.tLast, teacher.tTelephone, teacher.tSpecialty1, teacher.tSpecialty2, teacher.Address FROM teacher ORDER BY teacher.tLast ASC";
$rs_Tchr_TeacherList = mysql_query($query_rs_Tchr_TeacherList, $LessonSync) or die(mysql_error());
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
$totalRows_rs_Tchr_TeacherList = mysql_num_rows($rs_Tchr_TeacherList);
mysql_select_db($database_LessonSync, $LessonSync);
$query_Recordset1 = "SELECT teacher.stuID, teacher.teachID, CONCAT_WS(', ', teacher.tLast, teacher.tFirst) AS depteacher FROM teacher";
$Recordset1 = mysql_query($query_Recordset1, $LessonSync) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<SCRIPT type="text/javascript" language="JavaScript">
function submitStudent()
{
document.getElementById('frm_Student').submit();
}
</SCRIPT>
<SCRIPT type="text/javascript" language="JavaScript">
function submitTeacher()
{
document.getElementById('frm_Teacher').submit();
}
</SCRIPT>
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #333333;
}
body {
margin-left: 0px;
margin-top: 0px;
background-color: #FFFFFF;
}
a:link {
color: #FF3000;
text-decoration: none;
}
a:visited {
color: #CC6600;
text-decoration: none;
}
a:hover {
color: #999900;
text-decoration: none;
}
a:active {
color: #FF0000;
text-decoration: none;
}
#wrapper {
background-color: #FFFFFF;
padding: 10px;
width: 650px;
margin-right: auto;
margin-left: auto;
}
#heading {
}
-->
</style>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #0000FF}
-->
</style>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>
<body>
<div id="wrapper">
<p><img src="Images/topbar.png" alt="logo" width="650" height="100" /><br />
</p>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Students</li>
<li class="TabbedPanelsTab" tabindex="1">Teachers</li>
<li class="TabbedPanelsTab" tabindex="2">Users</li>
<li class="TabbedPanelsTab" tabindex="3">Lessons</li>
<li class="TabbedPanelsTab" tabindex="4">Make-Up Lesson</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<strong>Students</strong>
<form id="form4" name="form4" method="post" action="">
<div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
</form>
<form id="Find Student" name="Find Student" method="post" action="">
<label>
Find Student
<select name="list_FindStudent" id="list_FindStudent" onChange="submitStudent();">
<?php
do {
?><option value="<?php echo $row_rs_StudentList['stuID']?>"><?php echo $row_rs_StudentList['student']?></option>
<?php
} while ($row_rs_StudentList = mysql_fetch_assoc($rs_StudentList));
$rows = mysql_num_rows($rs_StudentList);
if($rows > 0) {
mysql_data_seek($rs_StudentList, 0);
$row_rs_StudentList = mysql_fetch_assoc($rs_StudentList);
}
?>
</select>
</label>
</form>
<?php
if ($_POST && $alreadyRegistered) {
echo '<p class="warning">'.$_POST['first'].' '.$_POST['last'].' IS ALREADY IN THE SYSTEM</p>';
}
?>
<form action="<?php echo $editFormAction; ?>" method="get" name="frm_Student" id="frm_Student" onsubmit="MM_validateForm('first','','R','last','','R','StreetAddress','','R','City','','R','ZIP','','RisNum','Hometelephone','','R','WorkTelephone','','R','dob','','R');return document.MM_returnValue">
<table align="center" cellpadding="5">
<tr valign="baseline">
<td nowrap="nowrap" align="right">First Name</td>
<td><input name="first" type="text" id="first" value="<?php echo $row_rs_StudentList['first']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Last Name</td>
<td><input name="last" type="text" id="last" value="<?php echo $row_rs_StudentList['last']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Street Address</td>
<td><input name="StreetAddress" type="text" id="StreetAddress" value="<?php echo $row_rs_StudentList['StreetAddress']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">City</td>
<td><input name="City" type="text" id="City" value="<?php echo $row_rs_StudentList['City']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">State</td>
<td><select name="State" title="<?php echo $row_rs_StudentList['State']; ?>">
<option value="New Jersey" <?php if (!(strcmp("New Jersey", ""))) {echo "SELECTED";} ?>>NJ</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">ZIP/Postal Code</td>
<td><input name="ZIP" type="text" id="ZIP" value="<?php echo $row_rs_StudentList['ZIP']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Home #</td>
<td><input name="Hometelephone" type="text" id="Hometelephone" value="<?php echo $row_rs_StudentList['Hometelephone']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Work #</td>
<td><input name="WorkTelephone" type="text" id="WorkTelephone" value="<?php echo $row_rs_StudentList['WorkTelephone']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">DoB</td>
<td><input name="dob" type="text" id="dob" value="<?php echo $row_rs_StudentList['dob']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Instrument</td>
<td><select name="Instrument" title="<?php echo $row_rs_StudentList['Instrument']; ?>">
<option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", ""))) {echo "SELECTED";} ?>>Bass Guitar</option>
<option value="Cello" <?php if (!(strcmp("Cello", ""))) {echo "SELECTED";} ?>>Cello</option>
<option value="Clarinet" <?php if (!(strcmp("Clarinet", ""))) {echo "SELECTED";} ?>>Clarinet</option>
<option value="Flute" <?php if (!(strcmp("Flute", ""))) {echo "SELECTED";} ?>>Flute</option>
<option value="Guitar" <?php if (!(strcmp("Guitar", ""))) {echo "SELECTED";} ?>>Guitar</option>
<option value="Piano" <?php if (!(strcmp("Piano", ""))) {echo "SELECTED";} ?>>Piano</option>
<option value="Saxophone" <?php if (!(strcmp("Saxophone", ""))) {echo "SELECTED";} ?>>Saxophone</option>
<option value="Trombone" <?php if (!(strcmp("Trombone", ""))) {echo "SELECTED";} ?>>Trombone</option>
<option value="Trumpet" <?php if (!(strcmp("Trumpet", ""))) {echo "SELECTED";} ?>>Trumpet</option>
<option value="Violin" <?php if (!(strcmp("Violin", ""))) {echo "SELECTED";} ?>>Violin</option>
<option value="Voice" <?php if (!(strcmp("Voice", ""))) {echo "SELECTED";} ?>>Voice</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Teacher</td>
<td><select name="teacherID" title="<?php echo $row_rs_StudentList['teacherID']; ?>">
<?php
do {
?>
<option value="<?php echo $row_rs_Tchr_TeacherList['teachID']?>"><?php echo $row_rs_Tchr_TeacherList['teacher']?></option>
<?php
} while ($row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList));
$rows = mysql_num_rows($rs_Tchr_TeacherList);
if($rows > 0) {
mysql_data_seek($rs_Tchr_TeacherList, 0);
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
}
?>
</select>
</td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Start Time</td>
<td><select name="Stime" title="<?php echo $row_rs_StudentList['Stime']; ?>">
<option value="3:00 PM" <?php if (!(strcmp("3:00 PM", ""))) {echo "SELECTED";} ?>>3:00 PM</option>
<option value="3:30 PM" <?php if (!(strcmp("3:30 PM", ""))) {echo "SELECTED";} ?>>3:30 PM</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">End Time</td>
<td><select name="Etime" title="<?php echo $row_rs_StudentList['Etime']; ?>">
<option value="3:00 PM" <?php if (!(strcmp("3:00 PM", ""))) {echo "SELECTED";} ?>>3:00 PM</option>
<option value="3:30 PM" <?php if (!(strcmp("3:30 PM", ""))) {echo "SELECTED";} ?>>3:30 PM</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Day</td>
<td valign="baseline"><table>
<tr>
<td><input type="radio" name="Date" value="m" />
Monday</td>
</tr>
<tr>
<td><input type="radio" name="Date" value="t" />
Tuesday</td>
</tr>
<tr>
<td><input type="radio" name="Date" value="w" />
Wednesday</td>
</tr>
<tr>
<td><input type="radio" name="Date" value="r" />
Thursday</td>
</tr>
<tr>
<td><input type="radio" name="Date" value="f" />
Friday</td>
</tr>
<tr>
<td><input type="radio" name="Date" value="s" />
Saturday</td>
</tr>
</table></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="reset" name="btn_New2" id="btn_New2" value="New" />
<input type="submit" value="Save" />
<input type="submit" name="btn_DeleteStudent" id="btn_DeleteStudent" value="Delete" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form7" />
</form>
<p> </p>
</div>
<div class="TabbedPanelsContent">
<strong>Teachers</strong>
<form id="form2" name="form2" method="post" action="">
<div align="right"><a href="<?php echo $logoutAction ?>" class="style2">Log out</a></div>
</form>
<form action="" method="get" name="frm_FindTeacher" id="frm_FindTeacher">
<label>Find Teacher
<select name="list_FindTeacher" id="list_FindTeacher" onchange="submitTeacher()">>
<?php
do {
?>
<option value="<?php echo $row_rs_Tchr_TeacherList['teachID']?>"><?php echo $row_rs_Tchr_TeacherList['teacher']?></option>
<?php
} while ($row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList));
$rows = mysql_num_rows($rs_Tchr_TeacherList);
if($rows > 0) {
mysql_data_seek($rs_Tchr_TeacherList, 0);
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
}
?>
</select>
</label>
</form>
<div id="div_Teacher">
<form action="<?php echo $editFormAction; ?>" method="post" name="frm_Teacher" id="frm_Teacher" onsubmit="MM_validateForm('tFirst','','R','tLast','','R','tTelephone','','R');return document.MM_returnValue">
<table align="center" cellpadding="5">
<tr valign="baseline">
<td nowrap="nowrap" align="right"><span class="style1">First Name</span></td>
<td><input name="tFirst" type="text" id="tFirst" value="<?php echo $row_rs_Tchr_TeacherList['tFirst']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><span class="style1">Last Name</span></td>
<td><input name="tLast" type="text" id="tLast" value="<?php echo $row_rs_Tchr_TeacherList['tLast']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><span class="style1">Cell Phone</span></td>
<td><input name="tTelephone" type="text" id="tTelephone" value="<?php echo $row_rs_Tchr_TeacherList['tTelephone']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><span class="style1">Instrument 1</span></td>
<td><select name="tSpecialty1" title="<?php echo $row_rs_Tchr_TeacherList['tSpecialty1']; ?>">
<option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Bass Guitar</option>
<option value="Cello" <?php if (!(strcmp("Cello", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Cello</option>
<option value="Clarinet" <?php if (!(strcmp("Clarinet", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Clarinet</option>
<option value="Flute" <?php if (!(strcmp("Flute", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Flute</option>
<option value="Guitar" <?php if (!(strcmp("Guitar", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Guitar</option>
<option value="Piano" <?php if (!(strcmp("Piano", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Piano</option>
<option value="Saxophone" <?php if (!(strcmp("Saxophone", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Saxophone</option>
<option value="Trombone" <?php if (!(strcmp("Trombone", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Trombone</option>
<option value="Trumpet" <?php if (!(strcmp("Trumpet", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Trumpet</option>
<option value="Violin" <?php if (!(strcmp("Violin", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Violin</option>
<option value="Voice" <?php if (!(strcmp("Voice", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Voice</option>
<option value="value" <?php if (!(strcmp("value", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>label</option>
</select> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><span class="style1">Instrument 2</span></td>
<td><select name="tSpecialty2" title="<?php echo $row_rs_Tchr_TeacherList['tSpecialty2']; ?>">
<option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Bass Guitar</option>
<option value="Cello" <?php if (!(strcmp("Cello", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Cello</option>
<option value="Clarinet" <?php if (!(strcmp("Clarinet", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Clarinet</option>
<option value="Flute" <?php if (!(strcmp("Flute", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Flute</option>
<option value="Guitar" <?php if (!(strcmp("Guitar", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Guitar</option>
<option value="Piano" <?php if (!(strcmp("Piano", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Piano</option>
<option value="Saxophone" <?php if (!(strcmp("Saxophone", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Saxophone</option>
<option value="Trombone" <?php if (!(strcmp("Trombone", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Trombone</option>
<option value="Trumpet" <?php if (!(strcmp("Trumpet", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Trumpet</option>
<option value="Violin" <?php if (!(strcmp("Violin", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Violin</option>
<option value="Voice" <?php if (!(strcmp("Voice", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Voice</option>
</select> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="button" name="btn_New" id="btn_New" value="New" />
<input type="submit" value="Submit" />
<input type="button" name="btn_Delete" id="btn_Delete" value="Delete" /></td>
</tr>
</table>
<input name="teachID" type="hidden" id="teachID" value="<?php echo $row_rs_Tchr_TeacherList['teachID']; ?>" />
<input type="hidden" name="MM_insert2" value="New Teacher" />
</form>
</div>
</div>
<div class="TabbedPanelsContent">
<label><strong>Users</strong><br />
</label>
<form id="form5" name="form4" method="post" action="">
<div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
</form>
<label>
<form action="<?php echo $editFormAction; ?>" method="post" name="form3" id="form3">
<table align="center" cellpadding="5">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Username</td>
<td><input type="text" name="name" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Password</td>
<td><input type="text" name="pass" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Teacher:</td>
<td><select name="teacherID">
<?php
do {
?>
<option value="<?php echo $row_rs_Tchr_TeacherList['teachID']?>"><?php echo $row_rs_Tchr_TeacherList['teacher']?></option>
<?php
} while ($row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList));
$rows = mysql_num_rows($rs_Tchr_TeacherList);
if($rows > 0) {
mysql_data_seek($rs_Tchr_TeacherList, 0);
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
}
?>
</select>
</td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Administrator Privileges:</td>
<td valign="baseline"><table>
<tr>
<td><input type="radio" name="adminpriv" value="y" <?php if (!(strcmp("n","y"))) {echo "CHECKED";} ?> />
Yes</td>
</tr>
<tr>
<td><input type="radio" name="adminpriv" value="n" <?php if (!(strcmp("n","No"))) {echo "CHECKED";} ?> />
No</td>
</tr>
</table></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Save" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form3" />
</form>
<p> </p>
<br />
<br />
<br />
<br />
<br />
</label>
</div>
<div class="TabbedPanelsContent">
<strong>Lessons</strong>
<form id="form6" name="form4" method="post" action="">
<div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
</form>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input name="RadioGroup1" type="radio" id="RadioGroup1_0" value="C" checked="checked" />
Cancel Lesson</label>
<label>
<input type="radio" name="RadioGroup1" value="M" id="RadioGroup1_1" />
Make-Up Lesson</label>
</p>
<p>
<label>Find Student
<select name="list_Students" id="list_Students">
<?php
do {
?>
<option value="<?php echo $row_rs_StudentList['stuID']?>"><?php echo $row_rs_StudentList['student']?></option>
<?php
} while ($row_rs_StudentList = mysql_fetch_assoc($rs_StudentList));
$rows = mysql_num_rows($rs_StudentList);
if($rows > 0) {
mysql_data_seek($rs_StudentList, 0);
$row_rs_StudentList = mysql_fetch_assoc($rs_StudentList);
}
?>
</select>
</label>
</p>
<p>
<label>Find Teacher
<select name="list_Teacher" id="list_Teacher">
<?php
do {
?>
<option value="<?php echo $row_rs_Tchr_TeacherList['teachID']?>"><?php echo $row_rs_Tchr_TeacherList['teacher']?></option>
<?php
} while ($row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList));
$rows = mysql_num_rows($rs_Tchr_TeacherList);
if($rows > 0) {
mysql_data_seek($rs_Tchr_TeacherList, 0);
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
}
?>
</select>
</label>
</p>
<p>
<label>Find Day
<select name="list_Day" id="list_Day">
</select>
</label>
<br />
</p>
</form>
<p><br />
</p>
</div>
<div class="TabbedPanelsContent">
<table width="650" border="0">
<tr>
<td colspan="2"><label>Student
<select name="list_Student" id="list_Student">
</select>
</label></td>
</tr>
<tr>
<td width="302"><label></label></td>
<td width="338"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="650" border="0">
<tr>
<td colspan="2"><label>Student
<select name="list_Student2" id="list_Student2">
</select>
</label></td>
</tr>
<tr>
<td colspan="2"><label>Teacher
<select name="list_Teacher2" id="list_Teacher2">
</select>
</label></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><p>
<label>
<input type="radio" name="rd_ExtraTime" value="15Start" id="rd_ExtraTime_0" />
Add 15 to Start</label>
<br />
<label>
<input type="radio" name="rd_ExtraTime" value="15End" id="rd_ExtraTime_1" />
Add 15 to End</label>
<br />
<label>
<input type="radio" name="rd_ExtraTime" value="30Start" id="rd_ExtraTime_2" />
Add 30 to Start</label>
<br />
<label>
<input type="radio" name="rd_ExtraTime" value="30End" id="rd_ExtraTime_0" />
Add 30 to End</label>
<br />
</p></td>
</tr>
<tr>
<td colspan="2"><label>Reschedule?
<input type="checkbox" name="cb_Reschedule" id="cb_Reschedule" />
</label></td>
</tr>
<tr>
<td height="28" colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
</body>
</html>
<?php
mysql_free_result($rs_Student);
mysql_free_result($rs_StudentList);
mysql_free_result($rs_TeacherInfo);
mysql_free_result($rs_StudentInfo);
mysql_free_result($rs_Tchr_TeacherList);
mysql_free_result($Recordset1);
mysql_free_result($rs_checkStudent);
?>
|