#is', 'zhaiyuedu.com', $book['intro']); $book['intro'] = preg_replace('#QQ\S{1,2}\d+#is', '', $book['intro']); // 替换固定变量 $book['intro'] = str_replace(['宅阅读', 'zhaiyuedu.com'], [core::$conf['app_name'], fake::domain()], $book['intro']); // 防止乱码 $book['intro'] = strip_tags($book['intro']); $book['intro'] = str_replace('"', '"', $book['intro']); // 1/2 机率使用点评文案 if (($book['id'] + fake::id()) % 4 < 2) { $book['intro'] = html_decode(TPL::DP($book, $book['id'] + fake::id())); } $fake = $fake[fake::id() % count($fake)]; // $fake = 'html'; switch ($fake) { case 'desc': $data = TPL::DESC($book, $book['intro'], $book['id'] + fake::id()); $data = '

' . str_replace("\n", "

", $data) . '

'; break; case 'html': $data = TPL::C($book['intro'], $book['id'] + fake::id()); break; case 'org': $data = nl2br($book['intro']); break; } return $data; }); // 作品小提示 fake::reg('txt_book_tip', function ($data) { $rands = [ '' . rand(10000, 99999) . '人在看', '' . rand(10000, 99999) . '人喜欢', '' . date('m-d H:i', $data['faketime']) . '', ]; return $rands[fake::id() % count($rands)]; }); // 随机分类推荐标题 fake::reg('htm_relate_cate_title', [ '

相关分类推荐

', '

推荐分类

', '分类推荐' ]); $domain = get_top_domain($conf['jump_domain'] ?: explode(':', $_SERVER['HTTP_HOST'])[0]); fake::reg('txt_share_text', [ '为你推荐非常棒的小说网站:' . $domain . ',更新及时,小说非常全,而且还免费', '给你推荐:' . $domain . ',[' . core::$conf['app_name'] . ']更新及时,海量小说免费阅读', '你知道精品[' . core::$conf['app_name'] . ']吗?' . $domain . ' 更新及时,海量小说免费阅读', '精品小说站-[' . core::$conf['app_name'] . ']:' . $domain . ' 更新及时,海量小说免费阅读', '强烈推荐[' . core::$conf['app_name'] . ']:' . $domain . ' 更新及时,海量小说免费阅读', '这个站小说太全啦,强烈推荐!' . core::$conf['app_name'] . ':' . $domain . ' 更新及时,海量小说免费阅读', '快去这个小说网看看!' . core::$conf['app_name'] . ':' . $domain . ' 更新及时,海量小说可阅读', ]); // 注册域名 fake::reg('domain', [$domain]); // 高亮域名 fake::reg('domain_highlight', function () { $data = fake::domain(); if (core::$conf['pinyin']) { $rand_color = [ 'var(--menu-bg);text-shadow:-1px -1px 0 #FFF,1px -1px 0 #FFF,-1px 1px 0 #FFF,1px 1px 0 #FFF;margin-right: 1px;', '#FF8040;text-shadow: 1px 1px 1px #494949;', '#FF0000;text-shadow: 1px 1px 1px #494949;', '#FF00FF;text-shadow: 1px 1px 1px #494949;', 'darkgreen;text-shadow: 1px 1px 1px #494949;', ]; $rand_color = $rand_color[fake::id() % count($rand_color)]; $data = str_replace(core::$conf['pinyin'], '' . core::$conf['pinyin'] . '', $data); } return $data; }); //fake::reg('domain_tw', [core::$conf['tw_domain'] . '.' . $domain]); fake::reg('txt_tw', ['台湾版', '繁体版', '繁体中文']); $cdn_url = core::$conf['cover_url']; // fake::reg('cdn_url', [$cdn_url]); // 必须要有 close 标签 // wap url 和 www url 构建 $protocol = core::$conf['https'] ? 'https' : 'http'; $wap_url = (strpos(core::$conf['wap_url'], '//') === 0 ? $protocol . ':' : '') . rtrim(core::$conf['wap_url'], '/') . '/'; $www_url = preg_replace('#//(m|wap)\.#is', '//www.', $wap_url); fake::reg('wap_url', function ($path = '') use ($wap_url) { return $wap_url . ltrim($path, '/'); }); fake::reg('www_url', function ($path = '') use ($www_url) { return $www_url . ltrim($path, '/'); }); fake::reg('mlogo', function ($data) use ($domain, $cdn_url, $conf) { $fake_id = fake::id(); $rand_num = $fake_id % 999; $rand_place = $fake_id % 2; $rand_array = [ $rand_place => $rand_num ];/* if ($fake_id % 10 >= 5) { $rand_array[2] = explode('.', $domain)[0]; }*/ $path = $rand_array[0] . 'img' . $rand_array[1] . '/' . $rand_array[2] . 'mlogo.png'; switch (fake::id() % 2) { case 0: return '' . $conf['app_name'] . ''; default: return '' . $conf['app_name'] . ''; } }); // 动态根据方法或者数组随机生成页面 tdk fake::reg('page_tdk', function ($titles) use ($domain) { if (is_string($titles)) { $titles = explode("\n", $titles); } seed_shuffle($titles); $title = $titles[0]; // 内嵌数组 if (!is_array($title)) { $title = [$title]; } foreach ($title as &$_title) { if (strpos($_title, 'fake::') !== false) { $_title = call_user_func($_title); } } $title = implode(fake::rand(' - ', '_', '|'), $title); $title = replace_rand($title); // 替换一些常用变量 return str_replace( ['%domain%', '%app_name%'], [$domain, core::$conf['app_name']], $title); }); fake::reg('txt_style', function ($seed) { $rand = [ 3 => 'color:#1325a9', 0 => 'font-weight:900', 2 => 'color:darkgreen', 6 => 'text-decoration: underline', 8 => 'color:#49898a;color:var(--border-color)', ]; return $rand[(fake::id() + $seed) % 12] ?? ''; }); fake::reg('time_date', function ($time) { return date(fake::time_format(), (int)$time); }); fake::reg('ad_type', ['Boolean', 'Number', 'String', 'Object']); // 地图名称 fake::reg('map_name', [ 'google', 'baidu', 'sm', 'sogou', 'bing', 'yahoo', 'youdao', 'soso', ]); _time('RandOver'); // 初始化分类 $cates = &$conf['cates']; $cates = array_column($cates, NULL, 'id'); _time('CatesInited'); ?> 霍格沃茨的默然者1-315章小说txt下载_免费全文下载 -丝文网