</fieldset> </form> </div> </div> <div style="width:50%;height:inherit;background-color:#FFFF99;float:left;"> <div style="font-size:20px;margin-top:10px;height:30px;"><center>Important News</center></div> <div style="margin-top:20px;margin-left:40px;"> <fieldset> <legend>News</legend> <marquee direction="up" scrolldelay="300"> <ul> <?php include "ConnectionUtil.php"; $conn = beginConnection(); $result = getMyResult("SELECT * from news order by date desc;"); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { echo "<li>" . $row["name"] . "</li>"; } } else { echo "<div>No news to display.</div>"; } ?> </ul> </marquee> </fieldset> </div>
<body bgcolor="FFFF99"> <div class="container"> <div class="header"> <div style="margin-top:10px;"><center>E-Mail Format </center></div> <div style="float:left; font-size:20px;margin-left:20px;"><a href="admin.php">Home</a></div> </div> <div id="bottom"> <div style="float:right;margin-right:20px;"><a href="editformat.php?hiddentype=new">Add new e-mail format</a></div> <div style="margin-top:20px;"> <?php include "ConnectionUtil.php"; beginConnection(); $result = getMyResult("Select * from mailview;"); if (mysqli_num_rows($result) > 0) { //echo ""; //display all list generated based on criteria while ($row = mysqli_fetch_assoc($result)) { echo "<div style=\" clear:both;\"><b>" . $row['name'] . "</b></div><div style=\"float:right;margin-top:10px;\"><a style=\"margin-right:40px;\" href=\"editformat.php?hidden=" . $row['name'] . "& hiddentype=update\">edit</a><a href=\"deleteformat.php?hidden=" . $row['name'] . "\" style= \"margin-right:10px;\">"; if ($row['name'] != "Wish Happy Birthday" && $row['name'] != "Appointment Reminder") { echo "delete"; } echo "</a></div>"; echo "<div style=\" height:30px;width:inherit;border:solid;margin-top:10px;\"><b>Subject :</b> " . $row['subject'] . "</div>"; echo "<div style=\" height:100px;width:inherit;border:solid;margin-bottom:30px;\"><div>Dear {Student},</div>"; echo "<div style=\"margin-left:100px;\">" . $row['body'] . "</div>"; echo "</div>"; } }
$from = "From:phpcsulbtest@gmail.com"; $sql = "SELECT * from mailview where name='Wish Happy Birthday';"; $result = getMyResult($sql); if (mysqli_num_rows($result) > 0) { echo "hi"; while ($row = mysqli_fetch_assoc($result)) { $subject = $row['subject']; $msg = $row['body']; $msg = wordwrap($msg, 70); } //while end } //if end*/ //$msg = wordwrap($msg,70); $sql = "SELECT * from appscheduler_bookings;"; $result = getMyResult($sql); $currentdate = date_parse(date('Y-m-d')); //current date echo $currentdate["day"] . $currentdate["month"]; if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { $birthdate = date_parse($row["student_dob"]); //echo $birthdate; if ($currentdate["month"] == $birthdate["month"] && $currentdate["day"] == $birthdate["day"]) { $to = $row["student_email"]; if (mail($to, $subject, $msg, $from)) { echo "Successfully send"; } else { echo "not successful"; } }
<div style="float:right; font-size:20px;"><a href="searchstudent.php">create new student list based on criteria</a></div> <div style="float:left; font-size:20px;margin-left:20px;"><a href="admin.php">Home</a></div> </div> <div id="bottom"> <div style="margin-top:20px;"> <form action="savetosystem.php" method="post"> <?php include "fetchlist.php"; error_reporting(0); $hidden = $_GET["hidden"]; //echo $hidden; if ($hidden == "simplequery") { //echo $_GET['query']; $result = getMyResult($_GET["query"]); } else { //echo "in else"; $result = getResult($hidden); $criteria = getCriteria(); } $query = getQuery(); //echo $criteria; //echo $query; if (mysqli_num_rows($result) > 0) { echo "<div style=\"font-size:20px;font-weight:bold;margin-bottom:20px;\"><u>" . $criteria . "</u></div>"; echo "<table id=\"myTable\" class=\"tablesorter\" border=\"1\"><thead><tr><th>Student ID</th><th>Name</th><th>Birthdate</th><th>Email</th><th>Phone</th><th>Appointment Date</th><th>Appointment Time</th><th>Address</th><th>Reason</th><th>Appointment ID</th></tr></thead><tbody>"; while ($row = mysqli_fetch_assoc($result)) { echo "<tr><td>" . $row["student_id"] . "</td><td>" . $row["student_name"] . "</td><td> " . $row["student_dob"] . "</td><td>" . $row["student_email"] . "</td><td>" . $row["student_phone"] . "</td><td>" . $row["appointment_d"] . "</td><td>" . $row["appointment_t"] . "<td>" . $row["student_add1"] . "," . $row["student_add2"] . "," . $row["student_city"] . "," . $row["student_state"] . "," . $row["student_zip"] . "</td><td>" . $row["student_notes"] . "</td><td>" . $row["appointment_id"] . "</td></tr>"; } echo "</tbody></table>";