} ?> </div> </div> <?php $i++; } } ?> </tr> </table> </td> <td> <?php if (isset($_GET['form']) && $_GET['form'] == 16) { $cartridges = Filedetails::model()->findAllByAttributes(array('fid' => $model->ID)); echo "<table class='table table-bordered'>"; if (count($cartridges) != 0) { echo "<tr style='background:#F5A9A9;'><th colspan='4' style='text-align:center'>File Details</th></tr>"; echo "<tr><th>Content</th><th>Updated By</th><th>Updated On</th></tr>"; foreach ($cartridges as $c) { $cartridgeName4 = $c['id']; $cartridgeName = $c['content']; $cartridgeName2 = $c['updatedby']; $cartridgeName3 = $c['updatedon']; $user = User::model()->findByAttributes(array('id' => $c['updatedby'])); $temp = $user['name']; $i = 1; echo "<tr style='background:#F6E3CE'><td>{$cartridgeName}</td><td>{$temp}</td><td>{$cartridgeName3}</td></tr>"; echo "<tr>"; }
/** * 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 $id the ID of the model to be loaded * @return Filedetails the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Filedetails::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }