Exemplo n.º 1
0
        ?>
</div>
					<div class="help-info">
						<p>图片来源:<?php 
        echo $dataParser->getImageSource();
        ?>
</p>
					</div>
				</div>
				<div class="read-main-content"><?php 
        echo $allContents;
        ?>
</div>
				<div class="read-footer">
					<span class="read-copyright">版权声明:除非注明,本站文章均为原创或编译,转载请注明: 文章来自 <a href="http://zhihu.com" target="_blank">知乎</a></span>
				</div>
			</div>
			<div class="read-right">
				<img src="<?php 
        echo $dataParser->getImages();
        ?>
" alt="125152" width="339" height="200">
			</div>
		</div>
<?php 
    }
}
?>

<?php 
require "footer.php";
Exemplo n.º 2
0
//ini
$im = infoMgr::getInstance();
$tm = new detailMgr($im);
$gb = new getBase();
//print today
$jsonData = $tm->getJSON($gb);
$jsonArray = $tm->getContext(new decodeJSON($jsonData));
//print_r($jsonArray);
$dataParser = new DataObj($jsonArray, DataObj::_LIST);
//echo $dataParser->getDate();
$stories = $dataParser->getStories();
foreach ($stories as $key => $value) {
    $singleNew = $dataParser->getSingleNew($key);
    echo '			<div class="content-main-box">
				<div class="main-box-img">
					<img src="' . $dataParser->getImages() . '" alt="' . $dataParser->getID() . '" />
				</div>
				<div class="main-box-content">
					<div class="main-title">
						<a href="read.php?av=' . $dataParser->getID() . '">' . $dataParser->getTitle() . '</a>
					</div>
					<div class="main-time">' . $dataParser->getDate() . '</div>
				</div>
				<div class="main-box-footer">
					<div class="main-box-postscript">来自:<a href="http://zhihu.com">zhihu.com</a></div>
				</div>
			</div>';
}
?>

		</div>