示例#1
0
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td width="247" valign="top">
            <?php 
$this->renderPartial('/transportation/trans_left');
?>
        </td>
        <td valign="top">
            <div class="cont_right">
                <h1>
                    <?php 
echo Yii::t('transport', 'Driver Details');
?>
                </h1>
                <?php 
$driver = DriverDetails::model()->findByAttributes(array('id' => $_REQUEST['id']));
?>
			<div class="pdtab_Con">
                <table width="80%" border="0" cellspacing="0" cellpadding="0" style="text-align:center;">
                    <tr class="pdtab-h" style="font-weight:bold;">
                        <td>
                            <?php 
echo Yii::t('transport', 'First Name');
?>
                        </td>
                        <td>
                            <?php 
echo Yii::t('transport', 'Last Name');
?>
                        </td>
                        <td>
示例#2
0
?>
</td>
            <td align="center"><?php 
echo Yii::t('transport', 'Route');
?>
</td>
            <td align="center"><?php 
echo Yii::t('transport', 'Action');
?>
</td>
        </tr>
        <?php 
if ($vehicle != NULL) {
    foreach ($vehicle as $vehicle_1) {
        $route = RouteDetails::model()->findByAttributes(array('vehicle_id' => $vehicle_1->id));
        $driver = DriverDetails::model()->findByAttributes(array('vehicle_id' => $vehicle_1->id));
        ?>
                <tr>
                	<td align="center"><?php 
        echo $vehicle_1->vehicle_no;
        ?>
</td>
                    <td align="center"><?php 
        echo $vehicle_1->no_of_seats;
        ?>
</td>
                    <td align="center"><?php 
        echo $vehicle_1->maximum_capacity;
        ?>
</td>
                    <td align="center"><?php 
示例#3
0
    <td valign="top"> 
    <div class="cont_right">
     <h1><?php 
echo Yii::t('transport', 'Driver Details');
?>
</h1>
      <div class="edit_bttns" style="top:20px; right:20px;">
    <ul>
    <li> <?php 
echo CHtml::link('<span>' . Yii::t('transport', 'Enter Driver Details') . '</span>', array('/transport/DriverDetails/create'), array('class' => 'addbttn last '));
?>
</li>
    </ul>
    </div>
    <?php 
$drive = DriverDetails::model()->findAll();
?>
         <div class="pdtab_Con">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr class="pdtab-h">
        	<td align="center"><?php 
echo Yii::t('transport', 'Name');
?>
</td>
        	<td align="center"><?php 
echo Yii::t('transport', 'DOB');
?>
</td>
            <td align="center"><?php 
echo Yii::t('transport', 'Age');
?>
 public function actionDeletedetails($id)
 {
     $vehicle = VehicleDetails::model()->findByAttributes(array('id' => $id));
     $vehicle->is_deleted = '1';
     $vehicle->save();
     $driver = DriverDetails::model()->findByAttributes(array('vehicle_id' => $id));
     $driver->status = NULL;
     $driver->save();
     $fuel = FuelConsumption::model()->DeleteAllByAttributes(array('vehicle_id' => $id));
     $bus = BusLog::model()->DeleteAllByAttributes(array('vehicle_id' => $id));
     $this->redirect(array('manage'));
 }
 /**
  * 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 = DriverDetails::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }