@ 2013-06-12T11:21:15Z <!-- <div id="right-col" class ='form' style="overflow:auto; width:210px; height:300px;">
</div> -->
<?php
$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();
$cs->registerCssFile($baseUrl.'/css/booking.css');
$cs->registerCssFile($baseUrl.'/css/navigation.css');
?>
<html>
<head>
<script type='text/javascript'>
var myWindow;
function openWindow(url)
{
//var windowFeatures = "width=600,height=500,status,resizable=no,scrollbars=0";
// myWindow = window.open(url, "welcome", windowFeatures);
myWindow = window.open(url, "welcome");
}
</script>
</head>
<div id="right-col" class ='form' style="overflow:auto; width:200px; height:480px;" />
<div id="navContainer">
<h3 class="headerbar">Vehicles Available</h3>
</div>
<table align='center'>
<thead align='center'>
<tr> <td><b><FONT COLOR='1452f3'>Area</td><td><b><FONT COLOR='1452f3'>Vehicle</td></tr>
</thead>
<?php
echo "<tbody align='center'>";
$sql1="SELECT IMEI,substr(lat,1,9)/100 AS latitude,substr(longt,1,9)/100 AS longitude FROM mdt_data GROUP BY IMEI ";
$connection=Yii::app()->db;
$command=$connection->createCommand($sql1);
$rows1=$command->queryAll();
foreach ($rows1 as $value) {
flush();
$lat=$value['latitude'];
$lng = $value['longitude'];
$IMEI = $value['IMEI'];
$endpoint="http://maps.googleapis.com/maps/api/geocode/json?latlng=".trim($lat).",".trim($lng)."&sensor=false";
$raw=@file_get_contents($endpoint);
$json_data=json_decode($raw);
if ($json_data->status=="OK") {
//this is human readable address --> getting province name
echo "<tr><td>";
echo ($json_data->results[0]->address_components[0]->long_name); //dumping result
// echo" <a class='download_now'><img src='gpsforms/jscripts/map.png'></a>";
// echo "<div id='kk'>";
// echo "<img src='http://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng&zoom=14&size=180x180&maptype=roadmap&markers=color:blue%7Clabel:U%7C$lat,$lng&sensor=false' />";
// echo "</div>";
// echo "<br>";
} else {
//if no result found, status would be ZERO_RESULTS
$json_data->status;
}
}
?>
</table>
<a href="#"><img src="images/map.jpg" height='50' width='40' onclick=openWindow('index.php?r=bookingDetails/map') /></a>
</div>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'myform',
'enableAjaxValidation'=>false,
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<?php
$blackListNumber = Yii::app()->db->createCommand("SELECT * FROM {{customer_details}} where customer_phno='$model->phno' AND black_list=1 OR alt_phno ='$model->phno' AND black_list=1 AND alt_phno != 0")->queryScalar();
if($blackListNumber){
echo'<script language="javascript">';
echo "alert('This is not a genuine person')";
echo "</script>";
}
?>
<table id="table">
<caption>Booking</caption>
<tbody>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'Search By PhoneNumber'); ?> </td>
<td class="cls2"><?php echo $form->textField($model1,'customer_phno',array('class'=>'searchBox')); ?>
<?php echo $form->error($model1,'customer_phno'); ?></td>
</tr>
<tr class="cls3">
<td class="cls1" colspan="3"><input type="submit" name="login_submit" id="login_submit" value="Submit" onclick="formvalidation(myform)"></td>
</tr>
</tbody>
</table>
</table>
<?php $this->endWidget(); ?>
</div><!-- form -->
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'dispatcher-details-model-form',
'enableAjaxValidation'=>false,
)); ?>
<table id="table" >
<caption>Booking Details</caption>
<tbody>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'contact_name'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'contact_name',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'contact_name'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'phno'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'phno',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'phno'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'alt_phno'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'alt_phno',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'alt_phno'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'email'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'email',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'email'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'vehicle'); ?></td>
<td class="cls2"><?php $vehicleBrandArray = CHtml::listData(VehicleCategoryModel::model()->findAll(),'vehicle_cat_model','vehicle_cat_model');
echo $form->dropDownList($model,'vehicle',$vehicleBrandArray,
array(
'class'=>'cls4',
'prompt'=>'Select Vehicle',
'onChange'=>CHtml::ajax(array('type'=>'POST',
'url'=>array("BookingDetails/getPackageDetails"),
'update'=>'#'.CHtml::activeId($model,'package'))))
);
?>
<?php echo $form->error($model,'vehicle'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'package'); ?></td>
<td class="cls2"><?php echo $form->dropDownList($model,'package',array('prompt'=>'Select Package'),array('class'=>'cls4')); ?>
<?php echo $form->error($model,'package'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'reqdate'); ?></td>
<td class="cls2"><?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$model,
'attribute'=>'reqdate',
'themeUrl' => Yii::app()->baseUrl.'/css/jquery-ui-themes-1.8/themes',
'theme'=>'base',
'cssFile'=>array('jquery-ui.css'),
// additional javascript options for the date picker plugin
'options'=>array(
'buttonImage'=>Yii::app()->baseUrl.'/images/cal.jpg',
'showOn'=>'both',
'dateFormat'=>'yy-m-d',
'changeYear'=>true,
'changeMonth'=>true,
),
'htmlOptions'=>array(
'class'=>'cls4',
'value'=>date('Y-m-d'),
),
)); ?>
<?php echo $form->error($model,'reqdate'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'time'); ?></td>
<td class="cls2">
<?php
$this->widget('application.extensions.jui_timepicker.JTimePicker', array(
'model'=>$model,
'attribute'=>'time',
'options'=>array(
'showPeriod'=>false,
),
'htmlOptions'=>array(
'class'=>'cls4',
'size'=>8,'maxlength'=>8 ),
));
?>
<?php echo $form->error($model,'time',array('inputID' => 'time')); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'passengers'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'passengers',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'passengers'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'pickup_addr'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'pickup_addr',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'pickup_addr'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'landmark'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'landmark',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'landmark'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'drop_addr'); ?></td>
<td class="cls2"><?php echo $form->textField($model,'drop_addr',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'drop_addr'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'circle_name'); ?></td>
<td class="cls2"><?php
$models=AreaMasterModel::model()->findAll();
$data = array();
foreach ($models as $rows1)
$data[$rows1->postal_code] = $rows1->area_name.' '.$rows1->postal_code;
echo $form->dropDownList($model,'circle_name',$data,array('class'=>'cls4','size'=>4)); ?>
<?php echo $form->error($model,'circle_name'); ?>
</td>
</tr>
<tr>
<td class="cls1"><?php echo $form->labelEx($model,'remarks'); ?></td>
<td class="cls2"><?php echo $form->textArea($model,'remarks',array('class'=>'cls4')); ?>
<?php echo $form->error($model,'remarks'); ?>
</td>
</tr>
<tr class="cls3">
<td class="cls1" colspan="3"><input type="submit" name="submit" id="login_submit" value="Submit"></td>
</tr>
</tbody>
</table>
<?php $this->endWidget(); ?>
</div><!-- form -->
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks <!-- <div id="right-col" class ='form' style="overflow:auto; width:210px; height:300px;">
</div> -->
Fatal error: Uncaught Error: Class "Yii" not found in /in/0M5P0:7
Stack trace:
#0 {main}
thrown in /in/0M5P0 on line 7
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
38.67 ms | 401 KiB | 8 Q