Mini Shell

Direktori : /proc/self/root/proc/self/root/home/rizant5/public_html_old/development/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/home/rizant5/public_html_old/development/admin/get-subject-ajax.php

<?php 

require_once("../config.php");

$course_id=$_POST['course_id'];

$datas=$conn->prepare("select * from courses where course_id='$course_id'");

$datas->execute();$results=$datas->fetch();?>

<div class="box-header with-border">

              <h3 class="box-title">Subjects</h3>

              <div class="box-tools pull-right">

               <a href="subject-new.php?course_id=<?php echo $course_id;?>" class="btn btn-primary btn-sm" ><i class="fa fa-plus"></i> Add New Subject</a>

              </div>

            </div>

<div class="box-body">

              

			   <?php

echo "<h4 style='color:red'>$results[course_name]</h4>";

?><style>/*#subject-table_wrapper{    margin-top: -35px;}*/</style>

 <table class="table table-bordered table-striped dataTable" id="subject-table">

                <thead><tr><th>Subject Name</th><th>Action</th></tr></thead>

                 <tbody>

                 	<?php  $data=$conn->prepare("select * from subjects where course_id='$course_id'");

					$data->execute();$result=$data->fetchall();

					foreach($result as $row){

						echo "<tr>";

						echo "<td>$row[subject_name]</td>";

						echo "<td><a href='subject-edit.php?subid=$row[subject_id]' title='Edit Subject' class='btn btn-info btn-xs'>Edit</a>&nbsp;&nbsp;";?><button onclick="deletetopic('<?php echo $row['subject_id'];?>','<?php echo $course_id;?>')" title='Delete Chapter' class='btn btn-danger btn-xs'>Delete</button><?php echo "&nbsp;&nbsp;<a href='chapters.php?subid=$row[subject_id]' title='View Chapters' class='btn btn-warning btn-xs'>Chapters</a></td>";

						echo "</tr>";

					}

					?>

                 </tbody>

                 </table>

             

            </div><!-- /.box-body -->                 

                 <script>

$('#subject-table').dataTable({

     responsive: true,

     "dom": 'T<"clear">lfrtip',

	  "ordering": false,

	 "bFilter" : false,               

	"bLengthChange": false,

	"bInfo":false,

	"bPaginate":false,

     "tableTools": {

           "sSwfPath": "../apptheme/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",

		   "aButtons": [

            {

                "sExtends": "copy",

                "mColumns": [0]

            },

   			{

                "sExtends": "xls",

                 "mColumns": [0]

            },

                        {

                "sExtends": "pdf",

                 "mColumns": [0]

            },

        ]

      }

});

</script>

Zerion Mini Shell 1.0