public static function readingroot_isWritable()
 {
     if (is_writable(I3GEEK_READING_ROOT)) {
         wxcaiji_i3geek_function::reading_root_init();
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
		<?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();
    ?>
</p>
          </div>
    <?php 
}
?>
         <!-- Nav tabs -->
        <h2 class="nav-tab-wrapper" style="border-bottom: 1px solid #ccc;">
          <a class="nav-tab" href="javascript:;" id="tab-title-qiniutek">文章采集</a>
          <a class="nav-tab" href="javascript:;" id="tab-title-local">公众号采集</a>
          <a class="nav-tab" href="javascript:;" id="tab-title-thumb">历史记录</a>
          <a class="nav-tab" href="http://bbs.i3geek.com" target="_blank" id="tab-title-remote">帮助/论坛</a>
        </h2>
        <div id="tab-qiniutek" class="div-tab hidden" style="display: none;">
          <h3>文章采集</h3>