Example #1
0
function plugin_update_tinycode_do()
{
    global $defaultpage;
    //dbがなければ、自動的に作られる
    add_tinycode($defaultpage);
    //file add
    $exists = get_existpages();
    $tcodes = get_tiny_table();
    $list = array_diff($exists, $tcodes);
    foreach ($list as $v) {
        add_tinycode($v);
    }
    //file del
    $tcodes = get_tiny_table();
    $list = array_diff($tcodes, $exists);
    foreach ($list as $v) {
        del_tinycode($v);
    }
}
Example #2
0
File: file.php Project: big2men/qhm
function get_tiny_page($code)
{
    $table = get_tiny_table();
    if (isset($table[$code])) {
        return $table[$code];
    } else {
        return '';
    }
}