:::

花蓮縣處務公告

2.1 A

套件名稱: 花蓮縣處務公告 1.1
作者 : 吳弘凱
模組網站 :

花蓮縣處務公告 更新說明

更新科室對應的 $cate_id 編號

「 花蓮縣處務公告 」簡介

花蓮縣政府教育局新版處務公告

安裝方式

  1. 到區塊管理,新增一個自訂區塊。
  2. 將底下內容貼到自訂區塊中
    // $page = department(處務公告)、school(學校公告)、teacher(教師甄試)
    $page ="department";
    
    // 若$page ="department" 時 $cate_id 可選:4=處長室, 5=副處長室, 6=專員室, 7=督學室, 8=學務管理科, 9=課程教學科, 10=特殊及幼兒教育科, 11=教育設施科, 12=終身教育科, 13=體育保健科, 14=行政室, 15=教育網路中心, 16=國教輔導團, 17=家庭教育中心, 18=主計處帳務科, 19=主計處會計科, 20=政風處行政科, 21=行研處採購科, 22=花蓮縣家長協會
    $cate_id ="";
    
    // $name = 承辦人姓名(前面兩個參數都不需要,留空白即可)
    $name ="";
    
    // amount 顯示公告數
    $amount=8;
    
    /****************************底下勿動*******************************/
    $json=file_get_contents("https://bulletin.hlc.edu.tw/modules/news/app_api.php?op=news_index&page={$page}&cate_id={$cate_id}&name={$name}&amount={$amount}");
    $all_news=json_decode($json,true);
    
    $main= '
    <style>
    .my-badge {
        border-radius: 4px;
        padding: 3px 6px;
        font-size: 0.8em;
      }
    </style>  
    <table class="table table-light table-striped table-bordered">';
    foreach ($all_news as $id => $news) {
        $tags="";
        foreach ($news['tags'] as $tag_id => $tag) {
            $tags.=" <span class='my-badge' style='background: {$tag['bg_color']}; color: {$tag['color']};'>{$tag['title']}</span>";
        }
        $main.= "
        <tr>
            <td>
            [{$id}]{$tags}<a href='https://bulletin.hlc.edu.tw/modules/news/index.php?page={$news['page']}&id={$id}' target='_blank'>{$news['title']}</a></td>
            <td nowrap>
                <div class='text-center'>" . substr($news['modify_date'], 0, -3) . "</div>
                <a href='https://bulletin.hlc.edu.tw/modules/news/index.php?page={$news['page']}&cate_id={$cate_id}' target='_blank'>{$news['co_unit_name']}</a>
                <span>{$news['name']}</span>
            </td>
        </tr>";
    }
    $main.= "</table>";
    echo $main;
  3. 內容類型請設為PHP腳本
  4. 位置建議放在 下中

花蓮縣處務公告 更新項目

花蓮縣處務公告 1.1 (2022-08-17 19:33:27 起被下載 41 次)
  1. 更新科室對應的 $cate_id 編號
花蓮縣處務公告 1 (2022-07-19 07:41:56 起被下載 47 次)

花蓮縣處務公告區塊

:::

https%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_modules%2Findex.php%3Fmodule_sn%3D145%26update_sn%3D1807

計數器

今天: 3559355935593559
昨天: 3438343834383438
總計: 7393888739388873938887393888739388873938887393888