</head>

<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>";
        }
            <div style="margin-top:20px;"><center><input type="submit" value="Submit"><input type="reset" value="Reset"/></center></div>      
        	</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>
Example #3
0
<html><head><meta charset="utf-8"></head>
<?php 
$url = "student_search.php";
if ($_REQUEST["aluno"] && $_REQUEST["cpf"] && $_REQUEST["newCompany"] && $_REQUEST["inicio"] && $_REQUEST["fim"]) {
    $nome = $_REQUEST["aluno"];
    $cpf = $_REQUEST["cpf"];
    $novaEmp = $_REQUEST["newCompany"];
    $inicio = $_REQUEST["inicio"];
    $fim = $_REQUEST["fim"];
    include "dbfunctions.php";
    $c = beginConnection("localhost/root//diemp");
    $sql = "select";
    if (querySql($c, $sql, "find") == false) {
        // Se estágio ainda não existe, criar
        $sql = "select a.id as id\n\t\t\t\t  from aluno a\n\t\t\t\t  where(a.aluno='{$nome}' and a.cpf='{$cpf}')";
        $line = querySql($c, $sql, "getline");
        $id = $line["id"];
        $sql = "insert into ";
    }
    $url .= "?nome=" . $nome . "&cpf=" . $cpf;
}
header("location:{$url}");
?>
</html>