D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
back_up
/
Filename :
dstu.php
back
Copy
<?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; if(isset($acc) && ($acc=="studentoftheuniversity2015byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php //include("forall.php"); function getst($theValue) { //unset($temp); $theValue = trim($theValue); $theValue = stripslashes($theValue); //if($theValue!=""){ //if(preg_match('/^[a-zA-Z0-9^$.*+\[\]{,}]/u',$theValue)) $temp=$theValue; //if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} //} //$theValue=$temp; //$new_string=urlencode ($theValue); //$new_string=ereg_replace("%0D", "<br>", $new_string); //$new_string=ereg_replace("%22", """, $new_string); //$new_string=ereg_replace("%27", "'", $new_string); //$new_string=ereg_replace("%5C", "", $new_string); //$theValue=urldecode ($new_string); return $theValue; } if(isset($_POST['addnew'])){ $titler=getst($_POST['titler']); $contenter=getst($_POST['contenter']); $dater=getst($_POST['dater']); $matric=getst($_POST['matric']); $archived="No"; $sql=sprintf("insert into transcripts (institute, address, dater, archived, matric) VALUES ('%s', '%s', '$dater', '$archived', '$matric')", mysql_real_escape_string($titler), mysql_real_escape_string($contenter)); if (mysql_query($sql)){ $bb="<p>Transcript Request Successfully added</p>"; } else { $bb="<p>Unable to add your Transcript Request: " . mysql_error() . "</p>"; } } ?> <?php $sqlspe="select * from students where sn=$yto"; $resultspe=mysql_query($sqlspe); $rowspe=mysql_fetch_array($resultspe); $mat=$rowspe['matric']; $pro=$rowspe['programmesn']; $yea=$rowspe['yearofentry']; $dde=$rowspe['de']; ?> <!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" /> <?php include("head.php"); ?> </head> <body> <?php include("top.php"); ?> <?php include("dtable0.php"); ?> <?php include("nav.php"); ?> <?php include("dtable1.php"); ?> <?php include("topcontainer.php"); ?> <!--Content Goes Here--> <div> </div> <div class="headingbigger">Welcome Student,</div> <p> </p> <div><?php echo $bb; ?></div> <hr /> <a href="changepass3.php">Change Password</a><br /> <br /> <a href="registercourses.php">Register for Courses</a><br /> <a href="checkresults.php">Check Results</a><br /> <a href="requesttranscript.php">Request Transcript</a><br /> <br /> <a href="logout.php">Log Out</a><br /> <!--Content Ends Here--> <?php include("bottomcontainer.php"); ?> <?php include("dtable2.php"); ?> <?php include("side.php"); ?> <?php include("dtable3.php"); ?> <?php include("foot.php"); ?> </body> </html> <?php } else { include("student.php"); }?>