public function validate(Student $student) { $this->validateFirstName($student->getFirstName()); $this->validateLastName($student->getLastName()); $this->validateGroupNumber($student->getGroupNumber()); $this->validateEmail($student->getEmail()); $this->validateMark($student->getMark()); $this->validateBirthYear($student->getBirthYear()); $this->validateSexOpt($student->getSex()); $this->validateLocalityOpt($student->getLocality(true)); }
EOF; } echo "</table></form>"; } break; case "sendemail": include "../system/class/SendMessage.php.inc"; include "../system/class/Mail.php"; include "../hes/class/Student.php"; $m = new SendMessage(); $st = new Student(); $st->isselected = $isselected; $m->emailtitle = $_POST['emailtitle']; $m->message = $_POST['msg']; $m->textlength = $_POST['textlength']; $m->receipient = $st->getEmail(); $headers = array('Subject' => $m->emailtitle, 'From' => $smtpuser, 'To' => $m->receipient); $smtp = Mail::factory('smtp', array('host' => "{$m->smtpserver}", 'auth' => true, 'username' => $m->smtpuser, 'password' => $m->smtppassword)); $mail = $smtp->send($m->receipient, $headers, $m->message); if (PEAR::isError($mail)) { echo "<p>" . $mail->getMessage() . "</p>"; } else { echo "<p>Message sent! click <a href='index.php'>here</a> for back to home.</p> The receipient as below:<br>{$m->receipient}"; } // $m->sendemail(); break; case "sendsms": include_once "../system/class/SendMessage.php.inc"; include "../hes/class/Student.php"; $m = new SendMessage(); $st = new Student();
$stds = $appt->getEnrolledID(); $stds = trim($stds); // had some side white spaces sometimes $stds = split(" ", $stds); if ($debug) { var_dump("\n<BR>EMAILS ARE: {$stds} \n<BR>"); } // foreach($stds as $element) { echo("->".$element."\n"); } if ($stds[0]) { foreach ($stds as $element) { $element = trim($element); $sql = "UPDATE `Proj2Students` SET `Status`='C' WHERE `StudentID` = '{$element}'"; $rs = $COMMON->executeQuery($sql, "Advising Appointments"); // Get student info from database $student = new Student($COMMON, $element); $eml = $student->getEmail(); $message = "The following group appointment has been deleted by the adminstration of your advisor: " . "\r\n" . "Time: " . $appt->getTime() . "\r\n" . "To schedule for a new appointment, please log back into the UMBC COEIT Engineering and Computer Science Advising webpage." . "\r\n" . "http://coeadvising.umbc.edu -> COEIT Advising Scheduling \r\n Reminder, this is only accessible on campus."; mail($eml, "Your COE Advising Appointment Has Been Deleted", $message); } } $sql = "DELETE FROM `Proj2Appointments` WHERE `id`='{$appID}'"; $rs = $COMMON->executeQuery($sql, "Advising Appointments"); echo "Time: " . date('l, F d, Y g:i A', strtotime($appt->getTime())) . "<br>"; echo "Majors included: "; if ($appt->getMajor()) { echo $appt->convertMajor(', ') . "<br>"; } else { echo "Available to all majors<br>"; } echo "Number of students enrolled: " . $appt->getEnrolledNum() . "<br>"; echo "Student limit: " . $appt->getMax();
<?php if (!loggedIn() || privilege() == NULL) { Redirect::to('logout.php'); } $s = new Student(); $s->getInfo(Session::get('sn')); ?> <section class="content-header"> <h1> Public Profile <small>Your Public Profile</small> <b><small>http://nits.ac.in/s/<?php $username = explode('@', $s->getEmail())[0]; echo "{$username}"; ?> </small></b> </h1> <ol class="breadcrumb"> <li><a href="home.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active"><a href="#">Public Profile</a></li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row" id="preview"> </div> <div class="row"> <div class="col-md-12">
<?php require_once 'student_class.php'; require_once 'pdofactory_class.php'; $strDSN = 'mysql:dbname=cloud;host=localhost'; $objPDO = PDOfactory::GetPDO($strDSN, "root", "", array()); $objPDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $objUser = new Student($objPDO); $objUser->setRollNo("admin"); $objUser->setName("admin"); $objUser->setEmail("*****@*****.**"); $objUser->setPassword("827ccb0eea8a706c4c34a16891f84e7b"); $objUser->setPhone("2346"); $objUser->setacctType("admin"); $objUser->save(); echo $objUser->getName(); echo $objUser->getEmail(); echo $objUser->getPassword(); echo $objUser->getPhone(); //$objUser->markForDeletion();
<input id="lastN" size="30" maxlength="50" type="text" name="lastN" required value=<?php echo $student->getLastName(); ?> > </div> <div class="field"> <label for="studID">Student ID</label> <input id="studID" size="30" maxlength="7" type="text" pattern="[A-Za-z]{2}[0-9]{5}" title="AB12345" name="studID" disabled value=<?php echo $student->getStudentId(); ?> > </div> <div class="field"> <label for="email">E-mail</label> <input id="email" size="30" maxlength="255" type="email" name="email" required value=<?php echo $student->getEmail(); ?> > </div> <div class="field"> <label for="major">Major</label> <select id="major" name = "major"> <option <?php if ($student->getMajor() == 'CMPE') { echo "selected"; } ?> >Computer Engineering</option> <option <?php if ($student->getMajor() == 'CMSC') { echo "selected";