function wxcaiji_i3geek_insert($name = 'undefined', $source, $type) { require_once 'wxcaiji_i3geek_function.php'; $wxcaiji_i3geek_fun = new wxcaiji_i3geek_function(); global $wpdb; $site_url = network_site_url('/'); //站点URL if ($wxcaiji_i3geek_fun->readingroot_isWritable() == true) { if ($type == 'wx') { $link = $wxcaiji_i3geek_fun->down2file($source, $site_url); } else { $link = $wxcaiji_i3geek_fun->down2blog($source, $site_url); } } else { return false; } if (!$link) { return false; } $table = $wpdb->prefix . "wxcaiji_i3geek"; $data_array = array('name' => $name, 'link' => $link, 'source' => $source); $wpdb->insert($table, $data_array); return true; }
$table_page = $_GET['table_page']; } $total_page = wxcaiji_i3geek_queryCount($pageMax); if ($table_page < 2) { $table_page = 1; } if ($table_page > $total_page) { $table_page = $total_page; } wp_enqueue_script('jquery'); wp_enqueue_script('wxcaiji-i3geek-script'); ?> <div> <h2>微信文章采集设置</h2> <?php if (!wxcaiji_i3geek_function::readingroot_isWritable()) { ?> <div id="message" class="updated" style="border-left-color: #d54e21;background: #fef7f1;"> <p>目录没有写权限!请设置根目录权限777,或根目录创建文件夹reading并设置目录权限777 <a href="http://www.i3geek.com" target="_blank">查看帮助</a></p> </div> <?php } ?> <?php if (wxcaiji_i3geek_function::getNoticeMsg() != -1) { ?> <div id="notice_msg" class="updated" style="border-left-color: #00a0d2;background: #f7fcfe;"> <p><strong>公告</strong>: <?php echo wxcaiji_i3geek_function::getNoticeMsg(); ?>