function editall() { global $db; $t_id = be("arr", "ids"); $ids = explode(",", $t_id); foreach ($ids as $id) { $t_flag = be("post", "t_flag" . $id); $t_sort = be("post", "disp_order" . $id); if (isN($t_sort)) { $t_sort = $db->getOne("SELECT MAX(disp_order) FROM {pre}vod_topic_items") + 1; } if (!isNum($t_sort)) { echo "信息填写不完整!"; exit; } $db->Update("{pre}vod_topic_items", array("flag", "disp_order"), array($t_flag, $t_sort), "id=" . $id); } updateCacheFile(); $topic_id = getBody(getReferer(), 'topic_id=', '&'); if (isN($topic_id)) { $topic_id = getBodys(getReferer(), 'topic_id='); } if (!isN($topic_id)) { replaceTopRecommend($topic_id); } echo "修改完毕"; }
public function parseAndroidVideoUrl($url, $p_coding, $p_script) { // echo $url; $vid = getBodys($url, $this->htmlparmStart); // var_dump($vid); // $vid=null; if (!isN($vid) && count(explode("/", $vid)) === 2) { return $this->getAndroidVideoUrl($vid); } $content = getPageWindow($url, "UTF-8"); // var_dump($content); return $this->parseAndroidVideoUrlByContent($content, $p_coding, $p_script); }
function parseChannel($area, $url, $stationname) { global $db; $contents = getPage($url, ""); $content = getBody($contents, '<div class="listmenu2" >', '<div class="listmenu" >'); if ($content === false || isN($content)) { $content = getBodys($contents, '<div class="listmenu2" >'); } // var_dump($content); $codes = getArray($content, "/program/", '</a>'); // $codesArray = explode("{Array}", $codes); ////http://epg.tvsou.com/program/ $channels = array(); $currentStation = getBody($content, '<font color="#FF6600">', '</font>'); $channels[$area . '{Array}' . $stationname . '{Array}' . $currentStation] = $url; foreach ($codesArray as $code) { $ste = explode('"class=blue2>', $code); if (!isN($ste[1])) { $channels[$area . '{Array}' . $stationname . '{Array}' . $ste[1]] = 'http://epg.tvsou.com/program/' . $ste[0]; } } //var_dump($channels); return $channels; }
public function getCommentsByUrl($url) { $content = getPage($url, "utf-8"); if (isset($content) && !is_null($content)) { // echo $content; $content = getBodys($content, AutoDouBanParseScore::COMMENT_CONTENT_START); $dates = getArray($content, AutoDouBanParseScore::DATE_START, AutoDouBanParseScore::DATE_END); $coments = getArray($content, AutoDouBanParseScore::CONTENT_START, AutoDouBanParseScore::CONTENT_END); $coments = replaceStr($coments, """, "\""); $USERS = getArray($content, AutoDouBanParseScore::USERS_START, AutoDouBanParseScore::USERS_END); $USERS = filterScriptStar($USERS, '8191'); $USERS = replaceStr($USERS, ",", ""); // var_dump($USERS);var_dump($dates); if (isset($coments) && !is_null($coments)) { $coments = filterScriptStar($coments, '8191'); // var_dump($coments); return array('dates' => $dates, 'comments' => $coments, 'authors' => $USERS); } } return false; }
function del() { global $db, $action, $flag, $show, $id, $name, $ajaxcontent, $tid, $ttype, $thit, $ttopic; $tab = be("all", "tab"); $flag = be("all", "flag"); $upcache = false; switch ($tab) { case "{pre}link": $col = "l_id"; $ids = be("get", "l_id"); if (isN($ids)) { $ids = be("arr", "l_id"); } break; case "apk_master_items": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } break; case "{pre}vod_type": $col = "t_id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "apk_company": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "apk_master_temp": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "apk_category": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "{pre}vod_topic": $col = "t_id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; if (!isN($ids)) { $db->Delete("{pre}vod_topic_items", "topic_id" . " in (" . $ids . ")"); } break; case "apk_master_base": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; if (!isN($ids)) { $db->Delete("apk_master_items", "apk_id" . " in (" . $ids . ")"); } break; case "{pre}art": $col = "a_id"; $ids = be("get", "a_id"); if (isN($ids)) { $ids = be("arr", "a_id"); } break; case "{pre}art_type": $col = "t_id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "{pre}art_topic": $col = "t_id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } $upcache = true; break; case "{pre}gbook": $col = "g_id"; $ids = be("get", "g_id"); if (isN($ids)) { $ids = be("arr", "g_id"); } break; case "{pre}manager": $col = "m_id"; $ids = be("get", "m_id"); if (isN($ids)) { $ids = be("arr", "m_id"); } break; case "{pre}thirdpart_config": $col = "id"; $ids = be("get", "m_id"); if (isN($ids)) { $ids = be("arr", "m_id"); } break; case "{pre}user_group": $col = "ug_id"; $ids = be("get", "ug_id"); if (isN($ids)) { $ids = be("arr", "ug_id"); } $upcache = true; break; case "{pre}user": $col = "u_id"; $ids = be("get", "u_id"); if (isN($ids)) { $ids = be("arr", "u_id"); } break; case "{pre}user_card": $col = "c_id"; $ids = be("get", "c_id"); if (isN($ids)) { $ids = be("arr", "c_id"); } break; case "{pre}comment": $col = "c_id"; $ids = be("get", "c_id"); if (isN($ids)) { $ids = be("arr", "c_id"); } break; case "{pre}tv_play": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } break; case "{pre}vod_topic_items": $col = "id"; $ids = be("get", "ids"); if (isN($ids)) { $ids = be("arr", "ids"); } break; case "{pre}vod_pasre_item": $col = "id"; $ids = be("get", "ids"); if (isN($ids)) { $ids = be("arr", "ids"); } break; case "{pre}vod_popular": $col = "id"; $ids = be("get", "t_id"); if (isN($ids)) { $ids = be("arr", "t_id"); } break; } if (!isN($ids)) { $db->Delete($tab, $col . " in (" . $ids . ")"); if ($tab === '{pre}vod_topic_items') { $topic_id = getBody(getReferer(), 'topic_id=', '&'); if (isN($topic_id)) { $topic_id = getBodys(getReferer(), 'topic_id='); } if (!isN($topic_id)) { replaceTopRecommend($topic_id); } } } if ($upcache) { updateCacheFile(); } if (isN($flag)) { redirect(getReferer()); } else { echo "删除完毕"; } }
function getRealUrls($url) { $url = getBodys($url, TudouContent::ENCODE_URL_STAT); try { return base64_decode($url); } catch (Exception $e) { return false; } }