function index_onload() { index_load_term_new(); index_load_collect_new(); index_load_course_new(); } function index_load_collect_new() { $.get( "../article/list_new.php", { begin: 0, page: 4, }, function (data, status) { let arrCollectList = JSON.parse(data); let html = ""; for (const iterator of arrCollectList.data) { html += "
"; html += "
" + gLocal.gui.ongoing + "
"; //!!!!!請協助補上頭像代碼!!!!! html += "
"; html += iterator.username.nickname.slice(0, 1); html += "
"; html += "
"; gLocal.gui.ongoing + "
"; html += "
"; html += "" + iterator.title + ""; html += "
"; html += "
"; if (iterator.collect) { html += "" + iterator.collect.title + ""; } else { html += "unkow"; } html += "
"; if (iterator.subtitle) { html += "
" + iterator.subtitle + "
"; } if (iterator.summary) { html += "
" + iterator.summary + "
"; } html += "
" + iterator.username.nickname + "
"; html += "
"; html += ""; } $("#article_new").html(html); } ); } function index_load_term_new() { $.get("../term/new.php", function (data, status) { let xDiv = document.getElementById("pali_pedia"); if (xDiv) { xDiv.innerHTML = data; } }); } function index_load_course_new() { $.get("../course/list_new.php", function (data, status) { let xDiv = document.getElementById("course_list_new"); if (xDiv) { xDiv.innerHTML = data; } }); }