:::

6-7 blocks/snews_block_focus.php

<?php
function snews_block_focus($options)
{
    include_once XOOPS_ROOT_PATH . "/modules/snews/function_block.php";

    $json      = file_get_contents(XOOPS_URL . "/uploads/snews/focus.json");
    $all_focus = json_decode($json, true);
    $keys      = array_rand($all_focus, $options[0]);

    if (is_array($keys)) {
        foreach ($keys as $k) {
            $all_focus[$k]['content'] = word_cut($all_focus[$k]['content'], $options[1]);
            $block[]                  = $all_focus[$k];
        }
    } else {
        $all_focus[$keys]['content'] = word_cut($all_focus[$keys]['content'], $options[1]);
        $block[]                     = $all_focus[$keys];
    }

    return $block;
}

function snews_block_focus_edit($options)
{
    $form = _MB_SNEWS_BLOCK_OPT0 . "
    <input type='text' name='options[0]' value='{$options[0]}'>
    <br>
    " . _MB_SNEWS_BLOCK_OPT1 . "<input type='text' name='options[1]' value='{$options[1]}'>
    ";
    return $form;
}

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Fmail.tad0616.cp22.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1472%26tbsn%3D44

書籍目錄

展開 | 闔起

線上使用者

362人線上 (144人在瀏覽線上書籍)

會員: 0

訪客: 362

更多…