:::

9-3-4-2 blocks\action_signup.php 套用語系

您沒有觀看影片的權限

您沒有觀看影片的權限

請先登入,登入後,確認您的權限後,即可觀看影片。

<?php
use XoopsModules\Tadtools\Utility;
use XoopsModules\Tad_signup\Tad_signup_actions;
use XoopsModules\Tad_signup\Tad_signup_data;

// 活動報名焦點
function action_signup($options)
{
    $block = Tad_signup_actions::get($options[0], true);
    $block['signup_count'] = count(Tad_signup_data::get_all($options[0], null, true));
    return $block;
}

// 活動報名焦點的編輯函式
function action_signup_edit($options)
{
    $actions = Tad_signup_actions::get_all(true);
    $opt = '';
    foreach ($actions as $action) {
        $selected = Utility::chk($options[0], $action['id'], '', "selected");
        $opt .= "<option value='{$action['id']}' $selected>{$action['action_date']} {$action['title']}</option>";
    }
    $form = "
    <ol class='my-form'>
        <li class='my-row'>
            <lable class='my-label'>" . _MB_TAD_SIGNUP_SELECT_ACTION . "</lable>
            <div class='my-content'>
                <select name='options[0]' class='my-input'>
                $opt
                </select>
            </div>
        </li>
    </ol>
    ";
    return $form;
}

link to https://github.com/tadlearn/tad_signup/commit/69ed6d9c3bb16873bb1cb270b7b941992e7f0e42 \ 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1802%26tbsn%3D48

書籍目錄

展開 | 闔起

線上使用者

28人線上 (6人在瀏覽線上書籍)

會員: 0

訪客: 28

更多…