$catid = "405"; $cid = "3"; $n1 = strpos($getname, '动漫'); if ($n1) { $str2 = substr($getname, $n1); } $name = getComicName($str2); } else { if ($typedes["0"] == "TV Shows") { $catid = "403"; $cid = "4"; $n1 = strpos($getname, '综艺'); if ($n1) { $str2 = substr($getname, $n1); } $name = getShowName($str2); } else { if ($typedes["0"] == "TV Series") { $catid = "402"; $cid = "15"; $n1 = strpos($getname, '剧集'); if ($n1) { $str2 = substr($getname, $n1); } $name = getSeriesName($str2); } } } } } }
} function compile($showPath) { $sourcePath = $showPath . '/' . SOURCE_FILE; if (is_file($sourcePath)) { ob_start(); include $sourcePath; $result = ob_get_clean(); return $result; } else { throw new Exception("Source path {$sourcePath} is not readable."); } } function writeResult($showPath, $result) { $destinationPath = $showPath . '/' . DESTINATION_FILE; if (is_writable($showPath)) { file_put_contents($destinationPath, $result); } else { throw new Exception("Destination path {$destinationPath} is not writable."); } } try { $showPath = getShowPath(getShowName($argv, $argc)); $result = compile($showPath); writeResult($showPath, $result); exit("Show compiled successfully to {$showPath}.\n"); } catch (Exception $e) { fwrite(STDERR, $e->getMessage() . "\n"); exit(1); }
while ($row = mysql_fetch_array($result)) { $array[$i] = $row['id']; $arr[$i] = $row['name']; $arra[$i] = $row['videoname']; //echo $arr[$i]; //$i++; } $imgurl = getImgUrl($getimgdescr); if ($cid == "9") { $name = getMovName($getname); } else { if ($cid == "3") { $name = getComicName($getname); } else { if ($cid == "4") { $name = getShowName($getname); } else { if ($cid == "15") { $name = getSeriesName($getname); } } } } mysql_select_db("ekucms"); for ($j = 0; $j <= $i; $j++) { $a = date("Y-m-d H:i:s"); $b = strtotime($a); $sql = "insert into eku122x_video (nexusphp,title,playurl,vodplay,videoname,addtime,cid,picurl) VALUES ('{$array[$j]}','{$name}','第一集','v6','{$arra[$j]}','{$b}','{$cid}','{$imgurl}')"; $result = mysql_query($sql); } //mysql_close($con);
<h3>Links</h3> <?php getExternLinks(); ?> </div><br> <br> <div id="channelLinks" class=" inTheNews links showLinks external post posts cybercms"> <?php getNewLinks(); getNewNews(); ?> </div> </aside> <section id="main_section" class="post posts"><!-- meet of the website--> <header><div class="title"><h1><?php echo getShowName($_GET['threadId']) . " - "; getThreadTitle(); ?> </h1></div></header> <article id="article1"> <!-- group similar information -- articles can have headers and footers--> <button onclick="show();" class="buttonStyle">Add New Post</button><br> <div id="newPost"> <?php $currPage = $_GET['threadId']; if (!isset($_SESSION['username'])) { echo "You need to log in to post"; } else { ?> <form action="posts.php?threadId=<?php echo $currPage; ?>