$navtitle = $article['subject'] . ' - ' . $article['author']; break; case 'new': if ($_B['ajax'] && $_GET['type'] == 'new') { $status = 1; $data = ''; if (!$_B['uid']) { jsonOutput(2, 'login'); } $subject = $_GET['subject']; $content = $_GET['content']; if ($subject == '' || $content == '') { jsonOutput(2, '标题或内容不能为空'); } //以后添加审核内容关键词 $res_content = html2ubb($content, 1); $image = 0; if ($res_content['image']) { $tmpimgs = $res_content['image']; $image = array_shift($tmpimgs); } $insert = array('subject' => $subject, 'content' => $res_content['content'], 'authorid' => $_B['uid'], 'author' => $_B['username'], 'dateline' => TIMESTAMP, 'image' => $image, 'views' => 1); $aid = J::t('article')->insert($insert); if ($aid && $image) { $str_ids = join(',', $res_content['image']); J::t('image')->update(array('aid' => $aid, 'status' => 1), "uid=" . $_B['uid'] . " AND id IN({$str_ids})"); $data = $_B['siteurl'] . 'index.php?m=article&do=view&id=' . $aid; } else { if (!$aid) { $status = 2; $data = '添加失败';
$row['doubanid'] = $value_item['doubanid']; $row['tid'] = $tid; $row['filename'] = $value_item['title']; $row['name'] = $value_item['title']; $small_descr = ''; if (preg_match($pattern_name, $value_item['title'], $matches)) { $small_descr = $matches[1]; } else { $small_descr = $value_item['title']; } $row['small_descr'] = $small_descr; $row['name'] = str_replace("[" . $small_descr . "]", '', $row['name']); $row['url'] = $value_item['link']; $row['dl_url'] = $value_item['enclosure_url'] . $tail; $row['length'] = $value_item['enclosure_length']; $row['descr'] = html2ubb($value_item['description']); $row['type'] = '401'; if (preg_match($pimdb, $value_item['description'], $matches)) { $imdb = $matches[0]; } else { $imdb = " "; } $row['imdb'] = $imdb; $row['downloaded'] = 0; $row['uploaded'] = 0; $row['completed'] = 0; $row['hash'] = ''; //print_r($row); $ret = get_torrent_bytid($row['tid']); if (mysql_affected_rows()) { printf("torrent " . $row['name'] . "alreay exist \n");
<html> <body> <?php include_once 'rss.class.php'; include_once 'curl.download.php'; include_once 'uploadFile.php'; //include_once('download.class.php'); include_once 'html2ubb.php'; include_once 'html2bbc.php'; $tail = "&passkey=292f839cc1c4dcd3da580eb23963e105"; $url = "http://bt.6xvod.com/torrentrss.php?rows=10"; $url_detail = 'http://bt.6xvod.com/torrentrss.php?rows=10&linktype=dl&passkey=292f839cc1c4dcd3da580eb23963e105'; $rss = new ReadRSS($url); $values = $rss->RSS(10); //print_r($values); foreach ($values as $value) { echo "</br>*********************************************************************\n</br>"; echo "*********************************************************************\n</br>"; echo $value['title'] . " "; echo "url->" . $value['enclosure_url'] . "|" . "size->" . $value['enclosure_length'] . "\n"; /****************begin download torrent *********************/ //$fn=curlTool::downloadFile($value['enclosure_url'],'/root/autoseed/release/torrents/'); //uploadTorrent($fn); echo html2ubb($value['description']) . "\n"; echo html2bbc($value['description']) . "\n"; // downloadFile($value['link'].$tail,"test"); } ?> </body> </html>