示例#1
0
文件: view.php 项目: Dvionst/vvfy
					<?php 
echo $blog->content;
?>
					<br>
					<div id="wrapper-tags">
					Tags : <?php 
echo str_replace(",", ", ", $blog->tags);
?>

					</div>
				</div>
				<div id="wrapper-right-side"></div>
				<div id="komentar">
					<div id="list-komentar">
						<?php 
foreach (BlogComment::model()->findAll("blog_id = {$_REQUEST['id']}") as $key) {
    ?>
						
						<div class="user-comment">
							<!-- <div style="height:100%"> -->
								<div class="wrap-user-name">
									<?php 
    $id = $key->name;
    $img = User::model()->find("username='******'")->id . ".jpg";
    $filename = Yii::app()->basePath . "/../img/blog/" . $img;
    if (!file_exists($filename)) {
        $img = "notfound.jpg";
    }
    ?>
									<img  src="<?php 
    echo Yii::app()->request->baseUrl;
示例#2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = BlogComment::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }