D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
apply.php
back
Copy
<?php require('PHPMailer/mail.php'); try{ $conn = new PDO("mysql:host=localhost;dbname=diafrica_result","diafrica_result","07036543898Ola."); $conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); }catch(PDOException $e){ echo $e->getMessage(); } function create($table,$data){ global $conn; foreach($data as $field => $value){ $fields[] = sprintf("`%s`",$field); $values[] = sprintf("'%s'",$value); $field_list = join(',',$fields); $value_list = join(',',$values); } $query = sprintf("INSERT INTO `%s`(%s)VALUES(%s)",$table,$field_list,$value_list); $stmt = $conn->prepare($query); $stmt->execute(); return true; } function resize_image($file, $w, $h, $crop=false) { list($width, $height) = getimagesize($file); $r = $width / $height; if ($crop) { if ($width > $height) { $width = ceil($width-($width*abs($r-$w/$h))); } else { $height = ceil($height-($height*abs($r-$w/$h))); } $newwidth = $w; $newheight = $h; } else { if ($w/$h > $r) { $newwidth = $h*$r; $newheight = $h; } else { $newheight = $w/$r; $newwidth = $w; } } //Get file extension $exploding = explode(".",$file); $ext = end($exploding); switch($ext){ case "png": $src = imagecreatefrompng($file); break; case "jpeg": case "jpg": $src = imagecreatefromjpeg($file); break; case "gif": $src = imagecreatefromgif($file); break; default: $src = imagecreatefromjpeg($file); break; } $dst = imagecreatetruecolor($newwidth, $newheight); imagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); return $dst; } if (isset($_POST['submit'])) { $haddress = $_POST['haddress']; $caddress = $_POST['caddress']; $saddress = $_POST['saddress']; $fname = $_POST['fname']; $oname = $_POST['oname']; $reason = $_POST['reason']; $phone = $_POST['phone']; $email = $_POST['email']; $dob = $_POST['dob']; $matric = $_POST['matric']; $fromto = $_POST['fromto']; $program = $_POST['program']; $entry = $_POST['entry']; $office = $_POST['office']; $school = $_POST['school']; $semail = $_POST['semail']; $scc = $_POST['scc']; $sig = $_FILES['signature']['tmp_name']; $random = rand(0001,9999); $temporary = explode("." , $_FILES [ "signature" ][ "name" ]); $file_extension = end ($temporary ); $pic = $_FILES['signature']['name']; $picp = $_FILES['signature']['tmp_name']; $pics = $_FILES['signature']['size']; list($width,$height) = getimagesize($sig); $ext1 = pathinfo($pic, PATHINFO_EXTENSION); $ext1 = strtolower($ext1); //$img_to_resize = resize_image($sig, 100, 100, $crop=false); $rando = rand(00001,99999); $hash = sha1($pic); $hash = $hash.$rando; $upload_folder1 = "signature/".$hash.".".$ext1; $uploadpic = $hash.".".$ext1; $in = array('iden' => $random, 'haddress' => $haddress, 'caddress' => $caddress, 'saddress' => $saddress, 'sname' => $fname, 'oname' => $oname, 'reason' => $reason, 'phone' => $phone, 'email' => $email, 'dob' => $dob, 'matric' => $matric, 'fromto' => $fromto, 'program' => $program, 'entry' => $entry, 'office' => $office, 'school' => $school, 'semail' => $semail, 'scc' => $scc, 'signature' => $uploadpic, ); move_uploaded_file($sig, $upload_folder1); $signature = $upload_folder1; include('simpleimage.php'); $image = new SimpleImage($signature); $image->resize(150, 100); $image->save($signature); create('trequest',$in); $to_email= 'records@dominicaninstitute.edu.ng'; $to_email2= 'registrar@dominicaninstitute.edu.ng'; $to_email3= 'info@dominicaninstitute.edu.ng'; $to_name='Registrar'; $subject="Application for Academic Transcript for $fname $oname"; $body ="<html><body style='text-align:center;'>"; $body.="Hello sir, an application for academic transcript has been sent.. Download it <a href='http://result.dominicaninstitute.edu.ng/apply2.php?d=$random' target='_blank' style='text-decoration:none;color:red; padding:5px; background:lightgray'>Here</a>"; $body.="</body></html>"; mail::send_mail($to_email,$to_name,$subject,$body); mail::send_mail($to_email2,$to_name,$subject,$body); mail::send_mail($to_email2,$to_name,$subject,$body); /*mail::send_mail('oladejioreoluwa94@gmail.com','oladejioreoluwa94@gmail.com',$subject,$body);*/ $message = "You have successfully sent a mail to the Registrar with regards to your Transcript click <a href='http://result.dominicaninstitute.edu.ng/apply2.php?d=$random'><button class='btn btn-primary'>Here</button></a> to download your copy of the letter"; } ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous"> <link rel="stylesheet" href="./apply.css"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> <title>Application for Academic Transcript</title> </head> <body class="bg-light"> <header class="text-center"> <a href="http://dominicaninstitute.org/"><img src="./logo2.png" class="d-block mx-auto"></a> <h1 class="my-3 text-uppercase">Application for Academic Transcript</h1> <hr class="bg-danger"> </header> <main class="container shadow-lg pt-5" style="background-color: white;"> <div class="alert-box"> <?php if (isset($message)) { ?> <div class="alert alert-info alert-dismissible fade show" role="alert"> <?=$message; ?> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> </div> <?php } ?> </div> <div> <p>Please fill the form carefully. And supply the information as required</p> </div> <form method="post" enctype="multipart/form-data"> <fieldset class="mt-3"> <div class="shadow-sm mb-3 py-2 px-2"> <h2 class="">Biodata</h2> </div> <div class="row"> <div class="form-group col-md-4 mb-3"> <label for="fname" class="form-label">Surname</label> <input type="text" name="fname" required class="form-control" id="fname" placeholder="Surname"> </div> <div class="form-group col-md-4 mb-3"> <label for="oname" class="form-label">Other Names</label> <input type="text" name="oname" required class="form-control" placeholder="Other names"> </div> <div class="form-group col-md-4 mb-3"> <label for="haddress" class="form-label">House Address</label> <input type="text" name="haddress" class="form-control" required placeholder="e.g NO 1, Zone 1"> </div> </div> <div class="row"> <div class="form-group col-md-4 mb-3"> <label for="caddress" class="form-label">City Address</label> <input type="text" name="caddress" class="form-control" required placeholder="e.g city"> </div> <div class="form-group col-md-4 mb-3"> <label for="saddress" class="form-label">State/Country Address</label> <input type="text" name="saddress" class="form-control" required placeholder="e.g State, Country"> </div> <div class="form-group col-md-4 mb-3"> <label for="phone" class="form-label">Phone Number</label> <input type="text" class="form-control" name="phone" class="form-control" required placeholder="e.g+234..."> </div> </div> <div class="row"> <div class="form-group col-md-4 mb-3"> <label class="form-label">Email</label> <input type="text" name="email" class="form-control" required placeholder="abc@example.com"> </div> <div class="form-group col-md-4 mb-3"> <label class="form-label">Date of Birth</label> <input type="date" name="dob" class="form-control" required placeholder="" min="1901-01-01" max="<?php echo date('Y-m-d');?>"> </div> <div class="form-group col-md-4 mb-3"> <label class="form-label">Nationalty</label> <input type="text" class="form-control" required placeholder=""> </div> </div> </fieldset> <fieldset class="mt-3"> <div class="shadow-sm mb-3 py-2 px-2"> <h2 class="">Domincan Institute Data</h2> </div> <div class="row"> <div class="form-group col-md-3 mb-3"> <label class="form-label">Matric No</label> <input type="text" class="form-control" name="matric" required placeholder="e.g DI/123"> </div> <div class="form-group col-md-3 mb-3"> <label class="form-label">Year of Entry</label> <input class="form-control" type="text" name="entry" required placeholder="e.g 2018/2019"> </div> <div class="form-group col-md-3 mb-3"> <label class="form-label">Year of Graduation </label> <input type="text" class="form-control" name="fromto" required placeholder="e.g 2018/2019"> </div> <div class="form-group col-md-3 mb-3"> <label class="form-label">Program</label> <input type="text" class="form-control" name="program" required placeholder="e.g B.A. Philosophy" > </div> </div> </fieldset> <fieldset class="mt-3"> <div class="shadow-sm mb-3 py-2 px-2"> <h2 class="">Destination of Transcript</h2> <p class="text-danger font-weight-bolder">For Official Use</p> </div> <div class="row"> <div class="form-group col-md-8"> <div class="row"> <div class="form-group col-md-6 mb-3"> <label class="form-label">Reason for Transcript <small>(in pursuit of)</small></label> <input type="text" class="form-control" name="reason" placeholder="eg in pursuit of Postgraduate Studies"> </div> <div class="form-group col-md-6 mb-3"> <label class="form-label">Full Name of Institution</label> <input type="text" name="school" class="form-control" placeholder="e.g Dominican University, Ibadan"> </div> <div class="form-group col-md-6 mb-3"> <label class="form-label">Institution Email </label> <input type="email" class="form-control" name="semail" placeholder="abc@example.com"> </div> <div class="form-group col-md-6 mb-3"> <label class="form-label">Institution City/Country </label> <input type="text" class="form-control" name="scc" placeholder="e.g Ibadan, Nigeria"> </div> </div> </div> <div class="form-group col-md-4 mb-3"> <label class="form-label">Institutional Address </label> <textarea name="office" class="form-control" rows="5" placeholder="e.g The PostGraduate School; Dominican University, Ibadan P.M.B 5361 Oyo State Nigeria."></textarea> </div> </div> </fieldset> <fieldset class="mt-3"> <div class="shadow-sm mb-3 py-2 px-2"> <p class="text-danger font-weight-bolder">For Personnal Use</p> </div> <div class="row"> <div class="form-group col-md-6 mb-3"> <label class="form-label">Email(Valid Personal Email) </label> <input type="email" class="form-control" name="semail" placeholder="abc@example.com"> </div> <div class="form-group col-md-6 mb-3"> <label class="form-label">Signature(size must not be greater than 100X100px) </label> <input type="file" class="form-control" name="signature" placeholder="e.g 2014-2018"> </div> </div> </fieldset> <fieldset class="mt-3"> <button class="btn btn-lg btn-success px-5 push" type="submit" name="submit">Click Here to Submit Application</button> </fieldset> </form> </main> <!--Transcript Alert--> <!-- Modal --> <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-3" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h6 class="modal-title text-danger font-weight-bolder" id="staticBackdropLabel"><strong>Procedures for Application for Transcript of Academic Records</strong></h6> </div> <div class="modal-body px-3"> <p> Dear applicant, <br>You are welcome to the Records Unit of the Registry!</p> <p>To apply for issuance of your transcripts, take the following steps:</p> <ul class="list-group"> <li class="list-group-item border-0">1. Fill form titled “Application for Academic Transcript.</li> <li class="list-group-item border-0">2. In filling the fields of the application, you are required to indicate whether the transcript is either for “Official Use” and/or for “Personal Use.”</li> <li class="list-group-item border-0">3. Transcripts of academic records for personal use may be emailed directly to applicant or given in hard copy to the candidate.</li> <li class="list-group-item border-0">4. However, transcript of academic records for official use is never given to the applicant. It is either sent by courier service or electronically to the requesting educational institution. Please, note that the applicant bears the cost of courier service.</li> <li class="list-group-item border-0">5. Official transcript of academic records costs 4,500 naira only for one institutional postage address only. Applicants who wish to send transcripts to more than one institution must make a fresh application for each new destination. The same cost applies. However, note that cost of transcript does not include cost of postage by courier service. The additional cost of postage varies according to destination as determined yearly by the preferred courier service provider of the Institute.</li> <li class="list-group-item border-0">6. Each personal copy of transcript of academic records cost 3,500 naira only.</li> <li class="list-group-item border-0">7. Payments for transcripts and courier service are to be made to the following bank account:<br> <span class="text-danger">Zenith Bank PLC <br>Account Name: Dominican Institute Administrative Fees <br>Account Number: 1016271552 </span> </li> <li class="list-group-item border-0">8. Payments are not refundable. So, please ensure you have received a payment advice via your email from the Records Unit before you to proceed to make payment.</li> <li class="list-group-item border-0">9. Processing time for transcript application is five (5) working days provided payment has been made.</li> </ul> <p>Thank you. <br>Fr Samuel Onyiba, OP <br> Registrar</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Click Here to Proceed</button> </div> </div> </div> </div> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="crossorigin="anonymous"></script> <?php if(!isset($message)){ ?> <script> $(document).ready(function(){ $("#staticBackdrop").modal('show'); }); </script> <?php } ?> </body> </html>