ΠΑΡΑΡΤΗΜΑ Α Τα προγράμματα σε ASP που χρησιμοποιήθηκαν για την υλοποίηση της διαχείρισης των μαθημάτων. Αρχική σελίδα (home.asp) <html> <body background="multi/acindstr.gif"> <p align="center"><font face="times New Roman" size="6"><strong>πανεπιστημιο ΜΑΚΕΔΟΝΙΑΣ</strong></font> <p align="center"><a href="http://www.uom.gr"><img src="multi/image.gif" alt="πληροφορίες που αφορούν το Πανεπιστήμιο Μακεδονίας" width="112" height="80" border="2" style="background-color: rgb(0,0,128); border: medium none"></a> <p> <p align="center"><big><big><strong><font face="times New Roman">ΤΜΗΜΑ ΜΕΤΑΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ ΣΤΑ ΠΛΗΡΟΦΟΡΙΑΚΑ ΣΥΣΤΗΜΑΤΑ </font></strong></big></big> <p align="center"><big><big><strong><font face="times New Roman">(MIS MASTER IN INFORMATION SYSTEMS)</font></strong></big></big> <p> <p align="center"><big><big><font face="times New Roman"><strong>ON LINE ΜΑΘΗΜΑΤΑ ΗΛΕΚΤΡΟΝΙΚΟΥ ΕΜΠΟΡΙΟΥ</strong></font></big></big> <p> <p align="center"><a href="http://www.ithaca.uom.gr/mis"><big><big><font face="times New Roman"><strong>ΓΕΝΙΚΕΣ YΠΗΡΕΣΙΕΣ</strong></font></big></big> </a> Κεντρική σελίδα διαχείρισης (diax.asp) <html> <body background="multi/acindstr.gif"> <p align="center"><u><strong><big><big>γενικεσ ΥΠΗΡΕΣΙΕΣ ΔΙΑΧΕΙΡΙΣΗΣ ΜΑΘΗΜΑΤΩΝ </big></big></strong></u> <p align="center"><u><strong><big><big>για ΤΟ ΗΛΕΚΤΡΟΝΙΚΟ<br> ΕΜΠΟΡΙΟ<br> </big></big></strong></u><br> <br> <strong><big> </a><a href=search.asp>αναζητηση ΜΑΘΗΤΗ<br> <a href=anna/newstudent.asp>προσθηκη ΜΑΘΗΤΗ<br> </a><a href=anna/delstudent.asp>διαγραφη ΜΑΘΗΤΗ<br> </a><a href=anna/modifystudent.asp>αλλαγη ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΗ<br> 299
</a><br> </big><img src="multi/anim2.gif" alt="επιλέξτε είτε προσθήκη είτε διαγραφή είτε αλλαγή είτε αναζήτηση" WIDTH="156" HEIGHT="125"><big><br> </big></strong> <p align="center"><strong><big> </a><a href=searchteach.asp>αναζητηση ΚΑΘΗΓΗΤΗ<br> <a href=anna/newteacher.asp>προσθηκη ΚΑΘΗΓΗΤΗ<br> </a><a href=anna/delteacher.asp>διαγραφη ΚΑΘΗΓΗΤΗ<br> </a><a href=anna/modifyteacher.asp>αλλαγη ΣΤΟΙΧΕΙΩΝ ΚΑΘΗΓΗΤΗ<br> </a></big></strong> <p align="center"><font color="#ff0000"><strong>οι εργασίες της προσθήκης και της διαγραφής τόσο του μαθητή όσο και του καθηγητή αφορούν το διαχειριστή και απαιτούν password. </strong></font> <p align="center"><font color="#ff0000"><strong>η αναζήτηση όμως τόσο του καθηγητή όσο και του μαθητή, μπορεί να γίνει από τον οποιονδήποτε.</strong></font> Αναζήτηση μαθητή (search.asp) <html> <p><u><big><big><strong>σελιδα ΑΝΑΖΗΤΗΣΗΣ ΜΑΘΗΤΗ </strong></big></big></u> <p><big><strong>πληκτρολογήστε ολόκληρο το ΕΠΙΘΕΤΟ ή μερικούς από τους χαρακτήρες που αυτό περιλαμβάνει.</strong></big> <form name=searchform method="post" action="actionsearch.asp"> Κείμενο: <INPUT TYPE="TEXT" NAME="searchtext" SIZE="60"> <TD align=center colspan=2><input type=submit name=btnsubmit value="αποστολή"> <input type=reset value="καθαρισμός Πεδίων"</TD> </form> href="http://www.ithaca.uom.gr/mis/allstudents.asp"><big><strong>εμφανιση ΟΛΩΝ ΤΩΝ ΜΑΘΗΤΩΝ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionsearch.asp 300
oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSstudent=Server.CreateObject("ADODB.RecordSet") stext=request.form("searchtext") SQL="select * from tablestudents where lastname LIKE '" &stext& "%'" RSstudent.open SQL, oconn, 1 If RSstudent.recordcount=0 then Response.write " " <html> <p><strong><big><big>δεν ΒΡΕΘΗΚΑΝ ΕΓΓΡΑΦΕΣ! </big></big></strong> Else <p><strong><big><big>βρεθηκαν ΟΙ ΠΑΡΑΚΑΤΩ ΕΓΓΡΑΦΕΣ: </big></big></strong> <p><strong><big>αν θέλετε περισσότερες πληροφορίες για κάποιον μαθητή, πατήστε στο επίθετό του.</big></strong> <p><strong><big>επωνυμο &n bsp; ΟΝΟΜΑ</big></strong> do while not RSStudent.EOF <p> <a href=actionsearch_one.asp?id==rsstudent("id")> =RSStudent("lastname") </a> &nbs p; &n bsp; =RSStudent("firstname") Loop End If RSStudent.MoveNext Response.write "<br>" 301
href="http://www.ithaca.uom.gr/mis/search.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΜΑΘΗΤΗ</strong></big></a> href="http://www.ithaca.uom.gr/mis/diax.asp"><big><strong>επιστροφη ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionsearch_one.asp oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSstudent=Server.CreateObject("ADODB.RecordSet") stext=request.form("searchtext") SQL="select * from tablestudents where lastname LIKE '" &stext& "%'" RSstudent.open SQL, oconn, 1 If RSstudent.recordcount=0 then Response.write " " <html> <p><strong><big><big>δεν ΒΡΕΘΗΚΑΝ ΕΓΓΡΑΦΕΣ! </big></big></strong> Else <p><strong><big><big>βρεθηκαν ΟΙ ΠΑΡΑΚΑΤΩ ΕΓΓΡΑΦΕΣ: </big></big></strong> <p><strong><big>αν θέλετε περισσότερες πληροφορίες για κάποιον μαθητή, πατήστε στο επίθετό του.</big></strong> <p><strong><big>επωνυμο &n bsp; ΟΝΟΜΑ</big></strong> do while not RSStudent.EOF <p> <a href=actionsearch_one.asp?id==rsstudent("id")> =RSStudent("lastname") </a> 302
&nbs p; &n bsp; =RSStudent("firstname") RSStudent.MoveNext Response.write "<br>" Loop End If href="http://www.ithaca.uom.gr/mis/search.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΜΑΘΗΤΗ</strong></big></a> href="http://www.ithaca.uom.gr/mis/diax.asp"><big><strong>επιστροφη ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Εμφάνιση όλων των μαθητών allstudents.asp oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSstudent=Server.CreateObject("ADODB.RecordSet") SQL="select * from tablestudents order by lastname, firstname" RSstudent.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΕΜΦΑΝΙΣΗΣ ΟΛΩΝ ΤΩΝ ΜΑΘΗΤΩΝ<br> </big></strong></u> <big>όλοι οι μαθητές φαίνονται παρακάτω. Αν θέλετε περισσότερες πληροφορίες για κάποιον μαθητή, πατήστε με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. <p><br> <br> <table> 303
<big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSstudent.EOF Response.write "" Response.write "<a href=actionsearch_one.asp?id="&rsstudent("id")&">" Response.write RSstudent("lastname") Response.write "</a>" Response.write RSstudent("firstname") Response.write RSstudent("email") Response.write "" RSstudent.MoveNext Loop </table> href="http://www.ithaca.uom.gr/mis/search.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Αναζήτηση καθηγητή searchteach.asp <html> 304
<body> <p><u><big><big><strong>σελιδα ΑΝΑΖΗΤΗΣΗΣ ΚΑΘΗΓΗΤΗ </strong></big></big></u> <p><big><strong>πληκτρολογήστε ολόκληρο το ΕΠΙΘΕΤΟ ή μερικούς από τους χαρακτήρες που αυτό περιλαμβάνει.</strong></big> <form name=searchform method="post" action="actionsearch_teach.asp"> Κείμενο: <INPUT TYPE="TEXT" NAME="searchtext" SIZE="60"> <TD align=center colspan=2><input type=submit name=btnsubmit value="αποστολή"> <input type=reset value="καθαρισμός Πεδίων"</TD> </form> href="http://www.ithaca.uom.gr/mis/allteachers.asp"><big><strong>εμφανιση ΟΛΩΝ ΤΩΝ ΚΑΘΗΓΗΤΩΝ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionsearch_teach.asp oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSteacher=Server.CreateObject("ADODB.RecordSet") stext=request.form("searchtext") SQL="select * from tableteachers where lastname LIKE '" &stext& "%' order by lastname, firstname" RSteacher.open SQL, oconn, 1 If RSteacher.recordcount=0 then Response.write " " <html> <p><strong><big><big>δεν ΒΡΕΘΗΚΑΝ ΕΓΓΡΑΦΕΣ! </big></big></strong> Else 305
<p><strong><big><big>βρεθηκαν ΟΙ ΠΑΡΑΚΑΤΩ ΕΓΓΡΑΦΕΣ: </big></big></strong> <p><strong><big>αν θέλετε περισσότερες πληροφορίες για κάποιον καθηγητή, πατήστε στο επίθετό του.</big></strong> <p><strong><big>επωνυμο &n bsp; ΟΝΟΜΑ</big></strong> do while not RSteacher.EOF <p> <a href=actionsearchteach_one.asp?id==rsteacher("id")> =RSteacher("lastname") </a> &nbs p; &n bsp; =RSteacher("firstname") RSteacher.MoveNext Response.write "<br>" Loop End If href="http://www.ithaca.uom.gr/mis/searchteach.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> href="http://www.ithaca.uom.gr/mis/diax.asp"><big><strong>επιστροφη ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionsearchteach_one.asp oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSteacher=Server.CreateObject("ADODB.RecordSet") sid=request.querystring("id") SQL="select tableteachers.lastname as lastname, tableteachers.firstname as firstname, tableteachage.age as age1, tableteachers.address as address, tableteachers.tel as tel, 306
tableteachers.email as email, tableteachers.comments as comments from tableteachers inner join tableteachage on tableteachage.id=tableteachers.age where tableteachers.id="&sid RSteacher.open SQL, oconn, 1 <html> <p><strong><big>οι πληροφορίες που αφορούν τον καθηγητή που επιλέξατε εμφανίζονται παρακάτω:</big></strong> <table> Επώνυμο: =RSteacher("lastname") Όνομα: =RSteacher("firstname") Ηλικία: =RSteacher("age1") Διεύθυνση =RSteacher("address") Τηλέφωνο: =RSteacher("tel") Email: =RSteacher("email") Σχόλια: =RSteacher("comments") </table> href="http://www.ithaca.uom.gr/mis/allteachers.asp"><strong>εμφανιση ΟΛΩΝ ΤΩΝ ΚΑΘΗΓΗΤΩΝ</strong></big></a> href="http://www.ithaca.uom.gr/mis/searchteach.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> href="http://www.ithaca.uom.gr/mis/diax.asp"><big><strong>επιστροφη ΣΤΗ 307
ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> 308
Εμφάνιση όλων των καθηγητών allteachers.asp oconn.open "DSN=dbpublicmis; UID=publicuser; PWD=" set RSteachers=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableteachers order by lastname, firstname" RSteachers.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΕΜΦΑΝΙΣΗΣ ΟΛΩΝ ΤΩΝ ΚΑΘΗΓΗΤΩΝ<br> </big></strong></u> <big>όλοι οι καθηγητές φαίνονται παρακάτω. Αν θέλετε περισσότερες πληροφορίες για κάποιον καθηγητή, πατήστε με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. <p><br> <br> <table> <big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSteachers.EOF Response.write "" Response.write "<a href=actionsearchteach_one.asp?id="&rsteachers("id")&">" Response.write RSteachers("lastname") Response.write "</a>" Response.write RSteachers("firstname") 309
Loop </table> Response.write RSteachers("email") Response.write "" RSteachers.MoveNext href="http://www.ithaca.uom.gr/mis/searchteach.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΝΑΖΗΤΗΣΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Εισαγωγή στοιχείων μαθητή newstudent.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSage=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableage" RSage.open SQL, oconn <html> <form name="formnewstudent" method="post" action="actionnewstudent.asp"> <p><big><font face="times New Roman"><big><u><strong>ΠΡΟΣΘΗΚΗ ΜΑΘΗΤΗ</strong></u></big></font></big> <table border="1" width="100%"> <td width="30%">επώνυμο: <td width="70%"><input type="text" name="lastname" size="60"> <td width="30%">όνομα: <td width="70%"><input type="text" name="firstname" size="60"> 310
<td width="30%">ηλικία: <td width="70%"><select name="age" size="1"> <OPTION>Επιλέξτε</OPTION> do while not RSage.EOF <option value==rsage("id")>=rsage("age")</option> RSage.MoveNext Loop </select> <td width="30%">διεύθυνση: <td width="70%"><input type="text" name="address" size="60"> <td width="30%">τηλέφωνο: <td width="70%"><input type="text" name="tel" size="60"> <td width="30%">email: <td width="70%"><input type="text" name="email" size="60"> <td width="30%">σχόλια: <td width="70%"><textarea rows="5" name="comments" cols="75"></textarea> </table> <TD align=center colspan=2><input type=button name=btnsubmit value="αποστολή" onclick="validateform()"> <input type=reset value="καθαρισμός Πεδίων"</TD> </TR> </form> RSage.close set RSage=nothing oconn.close set oconn=nothing ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> <p> <p> <p> <p> 311
<p> <script language="javascript"> function validateform() { if (document.formnewstudent.lastname.value=="") { alert ("Εισάγετε Επώνυμο"); document.formnewstudent.lastname.focus(); return; } if (document.formnewstudent.firstname.value=="") { alert ("Εισάγετε Όνομα"); document.formnewstudent.firstname.focus(); return; } if (document.formnewstudent.age.options.selectedindex==0) { alert ("Εισάγετε Ηλικία"); document.formnewstudent.age.focus(); return; } if (document.formnewstudent.email.value=="") { alert ("Εισάγετε Email"); document.formnewstudent.email.focus(); return; } document.formnewstudent.submit(); } </script> actionnewstudent.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") Set ocmd=server.createobject("adodb.command") adcmdtext=1 ocmd.activeconnection=oconn lastname=request.form("lastname") lastname=replace(lastname,"'","''") firstname=request.form("firstname") firstname=replace(firstname,"'","''") address=request.form("address") address=replace(address,"'","''") tel=request.form("tel") tel=replace(tel,"'","''") email=request.form("email") email=replace(email,"'","''") comments=request.form("comments") comments=replace(comments,"'","''") comments=replace(comments,vbcrlf,"<br>") strsql="insert INTO tablestudents (lastname, firstname, age, address, tel, email, comments)" strvalues="values ('"&lastname&"','" & firstname & "','" & Request.Form("age") & "','" & address & "','" & tel &"','" &_ 312
email &"','" &_ comments &"')" ocmd.commandtext=strsql & strvalues ocmd.commandtype=adcmdtext ocmd.execute Set ocmd=nothing oconn.close Set oconn=nothing if err.number=0 then Response.write " " end if <p><strong><big><big>η προσθήκη μαθητή ήταν επιτυχής!</big></big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/newstudent.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΠΡΟΣΘΗΚΗΣ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Εισαγωγή στοιχείων καθηγητή newteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSteachage=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableteachage" RSteachage.open SQL, oconn <html> 313
<form name="formnewteacher" method="post" action="actionnewteacher.asp"> <p><big><font face="times New Roman"><big><u><strong>ΠΡΟΣΘΗΚΗ ΚΑΘΗΓΗΤΗ</strong></u></big></font></big> <table border="1" width="100%"> <td width="30%">επώνυμο: <td width="70%"><input type="text" name="lastname" size="60"> <td width="30%">όνομα: <td width="70%"><input type="text" name="firstname" size="60"> <td width="30%">ηλικία: <td width="70%"><select name="age" size="1"> <OPTION>Επιλέξτε</OPTION> do while not RSteachage.EOF <option value==rsteachage("id")>=rsteachage("age")</option> RSteachage.MoveNext Loop </select> <td width="30%">διεύθυνση: <td width="70%"><input type="text" name="address" size="60"> <td width="30%">τηλέφωνο: <td width="70%"><input type="text" name="tel" size="60"> <td width="30%">email: <td width="70%"><input type="text" name="email" size="60"> <td width="30%">σχόλια: <td width="70%"><textarea rows="5" name="comments" cols="75"></textarea> </table> <TD align=center colspan=2><input type=button name=btnsubmit value="αποστολή" onclick="validateform()"> <input type=reset value="καθαρισμός Πεδίων"</TD> </TR> </form> RSteachage.close set RSteachage=nothing 314
oconn.close set oconn=nothing ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> <p> <p> <p> <p> <p> <script language="javascript"> function validateform() { if (document.formnewteacher.lastname.value=="") { alert ("Εισάγετε Επώνυμο"); document.formnewteacher.lastname.focus(); return; } if (document.formnewteacher.firstname.value=="") { alert ("Εισάγετε Όνομα"); document.formnewteacher.firstname.focus(); return; } if (document.formnewteacher.age.options.selectedindex==0) { alert ("Εισάγετε Ηλικία"); document.formnewteacher.age.focus(); return; } if (document.formnewteacher.email.value=="") { alert ("Εισάγετε Email"); document.formnewteacher.email.focus(); return; } } </script> document.formnewteacher.submit(); actionnewteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") Set ocmd=server.createobject("adodb.command") adcmdtext=1 ocmd.activeconnection=oconn lastname=request.form("lastname") lastname=replace(lastname,"'","''") 315
firstname=request.form("firstname") firstname=replace(firstname,"'","''") address=request.form("address") address=replace(address,"'","''") tel=request.form("tel") tel=replace(tel,"'","''") email=request.form("email") email=replace(email,"'","''") comments=request.form("comments") comments=replace(comments,"'","''") comments=replace(comments,vbcrlf,"<br>") strsql="insert INTO tableteachers (lastname, firstname, age, address, tel, email, comments)" strvalues="values ('"&lastname&"','" & firstname & "','" & Request.Form("age") & "','" & address & "','" & tel &"','" &_ email & "','" &_ comments & "')" ocmd.commandtext=strsql & strvalues ocmd.commandtype=adcmdtext ocmd.execute Set ocmd=nothing oconn.close Set oconn=nothing if err.number=0 then Response.write " " end if <p><strong><big><big>η προσθήκη καθηγητή ήταν επιτυχής!</big></big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/newteacher.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΠΡΟΣΘΗΚΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Διαγραφή μαθητή delete.asp 316
oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") id=request.form("id") todo=request.form("confirm") SQL="delete from tablestudents where id="&id if todo=1 then oconn.execute SQL if err.number=0 then Response.write " " end if oconn.close set oconn=nothing end if if todo=0 then oconn.close set oconn=nothing Response.redirect "delstudent.asp" end if <p><strong><big><big>η διαγραφή πραγματοποιήθηκε με επιτυχία</big>!</big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/delstudent.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΔΙΑΓΡΑΦΗΣ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> deleteconfirm.asp <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> </HEAD> <BODY> sid=request.querystring("sid") <BR> <TABLE width=640> 317
<TR> <TD align=center> <FORM METHOD=post ACTION="delete.asp"> <INPUT TYPE=hidden Name=id Value==sid> <INPUT TYPE=radio NAME=confirm value=0 checked>οχι <INPUT TYPE=radio NAME=confirm value=1>ναι <INPUT TYPE=submit value="διαγραφή"> </TD> </TR> </TABLE> </BODY> </FORM> href="http://www.ithaca.uom.gr/mis/anna/delstudent.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΔΙΑΓΡΑΦΗΣ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> </HTML> delstudent.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSStudents=Server.CreateObject("ADODB.RecordSet") SQL="select * from tablestudents order by lastname, firstname" RSstudents.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΔΙΑΓΡΑΦΗΣ ΜΑΘΗΤΗ<br> </big></strong></u> <big>όλοι οι μαθητές φαίνονται παρακάτω. Μπορείτε να επιλέξετε αυτόν που θέλετε να διαγράψετε, πατώντας με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. Η διαδικασία της διαγραφής ολοκληρώνεται πατώντας το κουμπί <strong>διαγραφη</strong>.<br> <p><br> <br> 318
<table> <big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSstudents.EOF Response.write "" Response.write "<a href=deleteconfirm.asp?sid="&rsstudents("id")&">" Response.write RSStudents("lastname") Response.write "</a>" Response.write RSStudents("firstname") Response.write RSStudents("email") Response.write "" RSStudents.MoveNext Loop </table> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Διαγραφή καθηγητή deleteteach.asp 319
oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") id=request.form("id") todo=request.form("confirm") SQL="delete from tableteachers where id="&id if todo=1 then oconn.execute SQL if err.number=0 then Response.write " " end if oconn.close set oconn=nothing end if if todo=0 then oconn.close set oconn=nothing Response.redirect "delteacher.asp" end if <p><strong><big><big>η διαγραφή πραγματοποιήθηκε με επιτυχία</big>!</big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/delteacher.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΔΙΑΓΡΑΦΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> deleteconfirm_teach.asp <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> </HEAD> <BODY> sid=request.querystring("sid") <BR> <TABLE width=640> 320
<TR> <TD align=center> <FORM METHOD=post ACTION="delete_teach.asp"> <INPUT TYPE=hidden Name=id Value==sid> <INPUT TYPE=radio NAME=confirm value=0 checked>οχι <INPUT TYPE=radio NAME=confirm value=1>ναι <INPUT TYPE=submit value="διαγραφή"> </TD> </TR> </TABLE> </BODY> </FORM> href="http://www.ithaca.uom.gr/mis/anna/delteacher.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΔΙΑΓΡΑΦΗΣ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> </HTML> delteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSteachers=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableteachers order by lastname, firstname" RSteachers.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΔΙΑΓΡΑΦΗΣ ΚΑΘΗΓΗΤΗ<br> </big></strong></u> <big>όλοι οι καθηγητές φαίνονται παρακάτω. Μπορείτε να επιλέξετε αυτόν που θέλετε να διαγράψετε, πατώντας με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. Η διαδικασία της διαγραφής ολοκληρώνεται πατώντας το κουμπί <strong>διαγραφη</strong>.<br> <p><br> <br> 321
<table> <big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSteachers.EOF Response.write "" Response.write "<a href=deleteconfirm_teach.asp?sid="&rsteachers("id")&">" Response.write RSteachers("lastname") Response.write "</a>" Response.write RSteachers("firstname") Response.write RSteachers("email") Response.write "" RSteachers.MoveNext Loop </table> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> Αλλαγή στοιχείων μαθητή modifystudent.asp 322
oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSStudents=Server.CreateObject("ADODB.RecordSet") SQL="select * from tablestudents order by lastname, firstname" RSstudents.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΗ<br> </big></strong></u> <big>όλοι οι μαθητές φαίνονται παρακάτω. Μπορείτε να επιλέξετε αυτόν που θέλετε να αλλάξετε τα στοιχεία του, πατώντας με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. <p><br> <br> <table> <big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSstudents.EOF Response.write "" Response.write "<a href=updatestudent.asp?sid="&rsstudents("id")&">" Response.write RSStudents("lastname") Response.write "</a>" Response.write RSStudents("firstname") Response.write RSStudents("email") Response.write "" RSStudents.MoveNext Loop 323
</table> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionupstudent.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") Set ocmd=server.createobject("adodb.command") adcmdtext=1 ocmd.activeconnection=oconn sid=request.form("sid") lastname=request.form("lastname") lastname=replace(lastname,"'","''") firstname=request.form("firstname") firstname=replace(firstname,"'","''") address=request.form("address") address=replace(address,"'","''") tel=request.form("tel") tel=replace(tel,"'","''") email=request.form("email") email=replace(email,"'","''") comments=request.form("comments") comments=replace(comments,"'","''") comments=replace(comments,vbcrlf,"<br>") strsql="update tablestudents set lastname='"&lastname&"', firstname='"&firstname&"',age='" & Request.Form("age") & "',address='"&address&"',tel='"&tel&"',email='"&email&"',comments='"&comments&"' where id="&sid ocmd.commandtext=strsql ocmd.execute Set ocmd=nothing oconn.close Set oconn=nothing if err.number=0 then Response.write " " end if 324
<p><strong><big><big>η αλλαγή στοιχείων μαθητή ήταν επιτυχής!</big></big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/modifystudent.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> updatestudent.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSage=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableage" RSage.open SQL, oconn set RSStudents=Server.CreateObject("ADODB.RecordSet") sid=request.querystring("sid") SQL="select tablestudents.lastname as lastname, tablestudents.firstname as firstname, tableage.age as age1, tablestudents.address as address, tablestudents.tel as tel, tablestudents.email as email, tablestudents.comments as comments from tablestudents inner join tableage on tableage.id=tablestudents.age where tablestudents.id="&sid RSstudents.open SQL, oconn <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> </HEAD> <BODY> <p><big><font face="times New Roman"><big><u><strong>ΑΛΛΑΓΗ ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΗ</strong></u></big></font></big> <form name="formupdatestudent" method="post" action="actionupstudent.asp"> <input type=hidden name="sid" value==sid> <BR> <table border="1" width="100%"> <td width="30%">επώνυμο: 325
<td width="70%"><input type="text" name="lastname" size="60" value==rsstudents("lastname")> <td width="30%">όνομα: <td width="70%"><input type="text" name="firstname" size="60" value==rsstudents("firstname")> <td width="30%">ηλικία: <td width="70%"> <select name="age" size="1"> <OPTION>Επιλέξτε</OPTION> do while not RSage.EOF <option value==rsage("id") if RSage("age")=RSstudents("age1") then Response.write " selected" End If >=RSage("age")</option> RSage.MoveNext Loop </select> <td width="30%">διεύθυνση: <td width="70%"><input type="text" name="address" size="60" value="=rsstudents("address")"> <td width="30%">τηλέφωνο: <td width="70%"><input type="text" name="tel" size="60" value==rsstudents("tel")> <td width="30%">email: <td width="70%"><input type="text" name="email" size="60" value==rsstudents("email")> <td width="30%">σχόλια: <td width="70%"><textarea rows="5" name="comments" cols="75">=rsstudents("comments")</textarea> </table> <TD align=center colspan=2><input type=submit name=btnsubmit value="ενημέρωση" onclick="validateform()"> <input type=reset value="επαναφορά"</td> </TR> </FORM> 326
href="http://www.ithaca.uom.gr/mis/anna/modifystudent.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> </HTML> 327
Αλλαγή στοιχείων καθηγητή modifyteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSteachers=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableteachers order by lastname, firstname" RSteachers.open SQL, oconn <html> <p><big><u><strong><big>σελιδα ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΚΑΘΗΓΗΤΗ<br> </big></strong></u> <big>όλοι οι καθηγητές φαίνονται παρακάτω. Μπορείτε να επιλέξετε αυτόν που θέλετε να αλλάξετε τα στοιχεία του, πατώντας με το αριστερό πλήκτρο του ποντικιού πάνω στο <strong>επιθετο</strong>. <p><br> <br> <table> <big><strong>επιθετο<strong><big> <big><strong>ονομα<big><strong> <big><strong>email<big><strong> do while not RSteachers.EOF Response.write "" Response.write "<a href=updateteacher.asp?sid="&rsteachers("id")&">" Response.write RSteachers("lastname") Response.write "</a>" Response.write RSteachers("firstname") 328
Response.write RSteachers("email") Response.write "" RSteachers.MoveNext Loop </table> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> actionupteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") Set ocmd=server.createobject("adodb.command") adcmdtext=1 ocmd.activeconnection=oconn sid=request.form("sid") lastname=request.form("lastname") lastname=replace(lastname,"'","''") firstname=request.form("firstname") firstname=replace(firstname,"'","''") address=request.form("address") address=replace(address,"'","''") tel=request.form("tel") tel=replace(tel,"'","''") email=request.form("email") email=replace(email,"'","''") comments=request.form("comments") comments=replace(comments,"'","''") comments=replace(comments,vbcrlf,"<br>") strsql="update tableteachers set lastname='"&lastname&"', firstname='"&firstname&"',age='" & Request.Form("age") & "',address='"&address&"',tel='"&tel&"',email='"&email&"',comments='"&comments&"' where id="&sid ocmd.commandtext=strsql ocmd.execute Set ocmd=nothing oconn.close Set oconn=nothing if err.number=0 then 329
Response.write " " end if <p><strong><big><big>η αλλαγή στοιχείων καθηγητή ήταν επιτυχής!</big></big></strong> <p> href="http://www.ithaca.uom.gr/mis/anna/modifyteacher.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> updateteacher.asp oconn.open "DSN=dbmis; UID="&request.serverVariables("AUTH_USER") & " ; " & "PWD=" & request.servervariables("auth_password") set RSteachage=Server.CreateObject("ADODB.RecordSet") SQL="select * from tableteachage" RSteachage.open SQL, oconn set RSteachers=Server.CreateObject("ADODB.RecordSet") sid=request.querystring("sid") SQL="select tableteachers.lastname as lastname, tableteachers.firstname as firstname, tableteachage.age as age1, tableteachers.address as address, tableteachers.tel as tel, tableteachers.email as email, tableteachers.comments as comments from tableteachers inner join tableteachage on tableteachage.id=tableteachers.age where tableteachers.id="&sid RSteachers.open SQL, oconn <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> </HEAD> <BODY> <p><big><font face="times New Roman"><big><u><strong>ΑΛΛΑΓΗ ΣΤΟΙΧΕΙΩΝ ΚΑΘΗΓΗΤΗ</strong></u></big></font></big> <form name="formupdateteacher" method="post" action="actionupteacher.asp"> <input type=hidden name="sid" value==sid> 330
<BR> <table border="1" width="100%"> <td width="30%">επώνυμο: <td width="70%"><input type="text" name="lastname" size="60" value==rsteachers("lastname")> <td width="30%">όνομα: <td width="70%"><input type="text" name="firstname" size="60" value==rsteachers("firstname")> <td width="30%">ηλικία: <td width="70%"> <select name="age" size="1"> <OPTION>Επιλέξτε</OPTION> do while not RSteachage.EOF <option value==rsteachage("id") if RSteachage("age")=RSteachers("age1") then Response.write " selected" End If >=RSteachage("age")</option> RSteachage.MoveNext Loop </select> <td width="30%">διεύθυνση: <td width="70%"><input type="text" name="address" size="60" value="=rsteachers("address")"> <td width="30%">τηλέφωνο: <td width="70%"><input type="text" name="tel" size="60" value==rsteachers("tel")> <td width="30%">email: <td width="70%"><input type="text" name="email" size="60" value==rsteachers("email")> <td width="30%">σχόλια: <td width="70%"><textarea rows="5" name="comments" cols="75">=rsteachers("comments")</textarea> </table> 331
<TD align=center colspan=2><input type=submit name=btnsubmit value="ενημέρωση" onclick="validateform()"> <input type=reset value="επαναφορά"</td> </TR> </FORM> href="http://www.ithaca.uom.gr/mis/anna/modifyteacher.asp"><big><strong>επιστροφη ΣΤΗ ΣΕΛΙΔΑ ΑΛΛΑΓΗΣ ΣΤΟΙΧΕΙΩΝ ΚΑΘΗΓΗΤΗ</strong></big></a> ΔΙΑΧΕΙΡΙΣΗ</strong></big></a> ΑΡΧΙΚΗ ΣΕΛΙΔΑ</strong></big></a> </HTML> 332