Your IP : 10.1.73.149


Current Path : /home/bolconlineco/www/student/
Upload File :
Current File : /home/bolconlineco/www/student/dashbord.php

<?php
ob_start();
session_start();
include('header.php'); ?>
<script src="//cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css">

<?php
if(!isset($_SESSION['studentname'])&& $_SESSION['studentrole'] != 4) {
    header("location:../index.php");
    exit();
} ?>

    <h3 class="page-title">Student Assignments</h3>
    <ul class="page-breadcrumb breadcrumb">

        <li> <i class="fa fa-home"></i> <a href="dashbord.php"> Home </a> <i class="fa fa-angle-right"></i> </li>
        <li class="active">Student Assignments</li>

    </ul>

<?php
if(isset($_GET['msg'])) {
    echo "<div class='alert alert-success'>". $_GET['msg']."</div>";
}

if(isset($_GET['err'])) { ?>
    <div class="alert alert-success">Select A valid type</div>
<?php }
$rollno=$_SESSION['rollno'];

$assign_course = mysql_query("SELECT * FROM assigncourse where rollno='$rollno'") or die(mysql_error());
$assigncourse = mysql_fetch_array($assign_course);
$stcourse = $assigncourse['courseid'];
$gettopic = mysql_query("SELECT * FROM topic where courseId='$stcourse'") or die(mysql_error());

$query="select * from studentassignment where rollno=$rollno";
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) > 0) { ?>

<p style="font-family:Georgia, 'Times New Roman', Times, serif; color:#666; font-size:15px; padding-bottom:5px;">
Download study materials and assignments here. Upload the solved assignments.</p>

    <div class="row">
    <div class="col-md-12">
    <!-- BEGIN EXAMPLE TABLE PORTLET-->
    <div class="portlet box blue">
    <div class="portlet-title">
        <div class="caption"> <i class="fa fa-globe"></i>Student Assignments</div>
    </div>
    <div class="portlet-body">


<table class="tablestyle table table-striped table-bordered table-hover" id="sample_2">
    <thead>
    <tr>
        <th>Topic Name</th>
        <th>Issue Date</th>
        <th>Study Materials</th>
        <th>Download Assignment</th>
        <th>Upload Assignment </th>
    </tr>
    </thead>
    <tbody>
    <?php
    while($row=mysql_fetch_array($gettopic))
    {
        $topicid = $row['topicId'];
        $q2="select * from topicstudy where topicId=".$row['topicId']." and courseId=".$row['courseId'];
        $result1=mysql_query($q2) or die(mysql_error());

        $sql1 = mysql_query("select * from studentassignment where topicId='$topicid' and  rollno=$rollno order by SAid desc limit 1") or die(mysql_error());
        $fetch_row = mysql_fetch_array($sql1);

        $res=mysql_query("select * from topicassignment where courseId=".$row['courseId']." and topicId=".$row['topicId']) or die(mysql_error());
        $rowSet=mysql_fetch_array($res);
        if(mysql_num_rows($sql1) > 0) { ?>
            <tr>
                <td><?php echo $row['topicName']; ?></td>

                <td><?php echo date('d/m/Y',strtotime($fetch_row['issuedate']));?></td>
                <td><?php
                    if(mysql_num_rows($result1) > 0)
                    {
                        $fet=mysql_fetch_array($result1);
                        ?>
                        <a href="download.php?sm=<?php echo urlencode($fet['path']);?>"><img src="../images/btn_03_02.png" /></a>
                    <?php
                    }
                    ?></td>
                <td>

                    <?php
                    if($fetch_row['AssignmentStatus']==1)
                    {
                    ?>
                    <a href="download.php?download_file=<?php echo urlencode($rowSet['path']);?>"><img src="../images/btn_03_02.png" /></a></td>
                <?php
                }
                ?>
                <td>
                    <?php

                    if($fetch_row['AssignmentStatus']==1)
                    {
                        ?>
                        <a href="upload.php?courseId=<?php echo $row['courseId'];?>&topicId=<?php echo $row['topicId'];?>&id=<?php echo $fetch_row['SAid']; ?> & rollno=<?php echo $rollno; ?>">Upload</a>
                    <?php
                    }
                    ?>
                </td>
            </tr>
        <?php }
    }
    }
    else {
        echo "No New Assignment";
    } ?>

    <hr />
    </tbody>
</table>
            <script>
                $(document).ready(function(){
                    $('#mytable1').dataTable({bFilter: false, bInfo: false, "bLengthChange": false});


                });
            </script>

        </div><!-- end row  -->

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

    </div> <!-- end content  -->

    </div><!-- end wrapper -->


<?php include('../includes/footer.php');?>