Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800' rel='stylesheet' type='text/css'>
- <link href='https://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'>
- <style type="text/css">
- html, body{
- height: 100%;
- text-decoration: none;
- font-family: 'Open Sans', sans-serif;
- background-color: #000000;
- }
- textarea,h1{
- resize:none;
- color: #4099FF ;
- border: 1px solid #3B5998;
- font-family: 'Orbitron', sans-serif;
- }
- h3{
- color: #33CCFF;
- }
- input {
- color: ##33CCFF;
- border:1px dotted #33CCFF;
- width: 20%;
- font-family: 'Orbitron'; color:red;
- }
- h4{
- color:red;
- }
- </style>
- <center>
- <h1> Calculate GPA without F's </h1>
- <form action="" method="POST">
- </br>
- <textarea name="wholecode" rows="26" cols="130" placeholder="Copy Source Code Of Your IULMS Transcript page : http://iulms.iunc.edu.pk/iulms/sic/iu_transcript.php Here ">
- </textarea>
- </br></br>
- <input type="submit" name="GO">
- </form>
- <?php
- function getGPA($score_arr) {
- $count = count($score_arr);
- $sum = array_sum($score_arr);
- $gpa = $sum / $count;
- return $gpa;
- }
- if (isset($_POST['GO'])) {
- $no = $_POST['wholecode'];
- // <td style="width: 70%;"></td>
- //echo $no;
- $a = array();
- preg_match_all('/<td class=\'center\'>(.*?)<\/td>/s',$no,$matches);
- for ($i=2; $i <count($matches[1]) ; $i+=3) {
- if(!($matches[1][$i] == 0)){
- array_push($a,$matches[1][$i]);
- }
- }
- echo "<h3> Your CGPA IS : ".getGPA($a)."</h3>";
- }
- ?>
- <h4>Created By Mohammad.Ali.Mian https://www.facebook.com/ali.mian.969 </h4>
Add Comment
Please, Sign In to add comment