| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?PHP
- include "../pcdl/html_head.php";
- ?>
- <body>
- <?php
- require_once("../pcdl/head_bar.php");
- ?>
- <style>
- .content_block{
- flex: 0 0 auto;
- width: 25%;
- padding: 10px;
- }
- .index_inner{
- width: 960px;
- margin-left: auto;
- margin-right: auto;
- }
- .content_inner{
- display:flex;
- }
- .h3{
- font-size: 16px;
- }
- .index_list_categories{
- margin: 2em 0;
- }
-
- .index_list_categories a:hover{
- color: var(--tool-link-hover-color);
- }
- /*.index_list_categories a,a:link{
- color: var(--main-color);
- }*/
- .index_list_categories button{
- border: none;
- }
-
- .pd-10{
- padding:10px;
- }
- .card li{
- white-space: unset;
- }
- .card code{
- white-space: unset;
- }
- </style>
- <div class="index_inner" >
-
- <div class="index_list_categories">
- <div class="title_bar">
- <span class="title h3"><?php echo $_local->gui->speaker ?></span>
- <span class="title_more"><a href="../course"><?php echo $_local->gui->more ?></a></span>
- </div>
- <div class="content">
- <div id="course_list_new" class="content_inner">
- </div>
- </div>
- </div>
- <script>
- $.get("../course/teacher_list.php",function(data,status){
- let xDiv = document.getElementById("course_list_new");
- if(xDiv){
- xDiv.innerHTML=data;
- }
- });
- </script>
- <div class="course_block">
- <div class="title" >
- <?php echo $_local->gui->in_progress; ?>
- </div>
- <div id="course_list_ongoing">
- </div >
- </div>
- <div class="course_block">
- <div class="title" >
- <?php echo $_local->gui->already_over; ?>
- </div>
- <div id="course_list_complete">
- </div >
- </div>
- <script>
- $.get("../course/course_list.php",function(data,status){
- let arrData = JSON.parse(data);
- let html_complete="";
- let html_ongoing="";
-
- for (const iterator of arrData) {
- let html="";
- html += '<div class="card" style="display:flex;margin:1em;padding:10px;">';
- html += '<div style="flex:3;max-width:15em;">';
- html += '<img src="../../tmp/images/course/'+iterator.id+'.jpg" alt="cover" width="200" height="200">'
- html += '</div>';
- html += '<div style="flex:7;padding:5px;">';
- html += '<div class="title" style="padding-bottom:5px;font-size:110%;font-weight:600;"><a href="../course/course.php?id='+iterator.id+'">'+iterator.title+'</a></div>';
- html += '<div class="summary" style="padding-bottom:5px;">'+iterator.subtitle+'</div>';
- let summary = "";
- try{
- summary = marked(iterator.summary);
- }
- catch(e){
- }
- html += '<div class="summary" style="padding-bottom:5px;">'+summary+'</div>';
- html += '</div>';
- html += '<div style="flex:3;max-width:15em;">';
- html += '</div>';
- html += '</div>';
- if(iterator.status==40){
- html_complete += html;
- }
- else if(iterator.status==30 || iterator.status==20 ){
- html_ongoing += html;
- }
- }
- $("#course_list_complete").html(html_complete);
- $("#course_list_ongoing").html(html_ongoing);
- $("img").one("error", function(){
- $(this).attr("src", "../course/img/default.jpg");
- });
- });
- </script>
- </div>
- <?php
- include "../pcdl/html_foot.php";
- ?>
|