} ?> --> <?php /* echo "Offset: $next <br>"; echo "Count: $count <br>"; echo "Page: $page <br>"; echo "Pages: $pages <br>"; echo "Front: $front_limit_pages <br>"; echo "back: $back_limit_pages <br>";*/ echo "<div id=\"links\">"; for ($i = 0; $i < sizeof($posts); $i++) { $post = $posts[$i]; echo '<div class="linkbox" >'; $imgUrl = get_screenshot_url($post->url); echo '<div class="blogImage"><img src="' . $imgUrl . '"></img></div>'; echo '<div class="linkcontent">'; echo "<div><a href=\"index.php?r=/post/view&id={$post->id}\"><span class=\"link\">{$post->title}</span></a></div>"; echo "<div class>Clicks: {$post->clicks} </div>"; echo "<div class=\"remarks\">Remarks: {$post->remarks}</div>"; echo "<div class=\"remarks\">Date Updated: {$post->dateUpdated}</div>"; echo "<div class=\"categories\">"; $categories = $post->categories; for ($c = 0; $c < sizeof($categories); $c++) { $category = $categories[$c]; echo $category->name; } echo "</div>"; //close linkcontent echo '</div>';
public function actionView() { $model = null; if (isset($_GET['id'])) { $model = Post::model()->findbyPk($_GET['id']); } else { throw new CHttpException(404, 'The requested page does not exist.'); } $this->render('view', array('model' => $model, 'imageUrl' => get_screenshot_url($model->url))); }