/lms_debug/protected/views/dashboard/dashboard_4dec2014.php
PHP | 717 lines | 596 code | 75 blank | 46 comment | 37 complexity | 56301842f6010ce10c9ad0aaa98208bc MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, LGPL-2.0
- <?php if(Yii::app()->session['isRenewalUser']=='yes'){
- @$this->redirect(array('dashboard/renewal'));
- }
- ?>
- <style>
- #fancybox-wrap{
- z-index:9999999 !important;
- }
- </style>
-
- <div class="rightSection">
- <div class="toolbarheaderContainer"> Dashboard
-
- <table border="0" cellspacing="0" cellpadding="0" class="toolbarheaderContainer_date">
- <?php $form=$this->beginWidget('CActiveForm',array(
- 'id'=>'dashboard_update',
- 'action'=> Yii::app()->createUrl('dashboard/dashboard'),
- ));
- ?>
-
- <tr>
- <td>Select Date :</td>
- <td>
- <?php
- $this->widget('zii.widgets.jui.CJuiDatePicker', array(
- 'name' => 'searchDashboard',
- 'id' => 'textfield2',
- 'value'=>''.@$_POST['searchDashboard']?stripslashes($_POST['searchDashboard']):'Select Date'.'',
- 'options' => array(
- // how to change the input format? see http://docs.jquery.com/UI/Datepicker/formatDate
- 'dateFormat'=>'dd-M-yy',
- // user will be able to change month and year
- 'changeMonth' => 'true',
- 'changeYear' => 'true',
- // speed at which the datepicker appears, time in ms or "slow", "normal" or "fast"
- 'duration'=>'fast',
- // animation effect, see http://docs.jquery.com/UI/Effects
- 'showAnim' =>'slide',
- ),
- 'htmlOptions' => array(
- 'maxlength' => '10', // textField maxlength
- 'class'=>'txtfield_calendericon_select',
- 'onclick'=>'javascript:this.value=""',
- 'onblur'=> 'this.value = ( this.value == "" ) ? "Select Date" : this.value;',
-
- ),
- ));
- ?>
- </td>
- <td><input name="image" type="image" img src="<?php echo Yii::app()->request->baseUrl;?>/images/go.png" border="none" class="go"/></td>
- </tr>
- <?php $this->endWidget(); ?>
- </table>
- <div class="cl"></div>
- </div>
- <script src="js/excanvas.js"></script>
- <?php
- $relationManager = $_SESSION['relationalManager'];
- $managerMemberId = implode(",",array_unique(@$relationManager));
- Yii::app()->getClientScript()->registerScriptFile(Yii::app()->baseUrl.'/js/fullcalendar.js');
- $todayTime = strtotime(date('d M Y'));
- $timbefore3days = strtotime('-3 days', time());
- $timafter3days = strtotime('+3 days', time());
- $models = Yii::app()->db->createCommand("SELECT startDate, count(*) AS total,leadFollowupId FROM leadFollowup WHERE
- userId IN (".@$managerMemberId.") AND STATUS = 'Pending' AND (actionType = 'Meeting' OR actionType = 'Follow Up') AND (startDate >= $timbefore3days and startDate <= $timafter3days ) GROUP BY startDate DESC")->queryAll();
- $meetingArray = array();
- for($i=0;$i<count($models);$i++){
- $meetingDate = @$models[$i]['startDate'];
- $totalCount = @$models[$i]['total'];
- $monthValue = date('m',@$models[$i]['startDate']);
-
- $meetingArray[$i]['totalCount'] = @$totalCount;
- $meetingArray[$i]['day'] = date('d',@$models[$i]['startDate']);
- $meetingArray[$i]['month'] = $monthValue-1;
- $meetingArray[$i]['year'] = date('Y',@$models[$i]['startDate']);
- $meetingArray[$i]['leadFollowupId'] = @$models[$i]['leadFollowupId'];
-
- //$meetingModels = LeadFollowup::model()->findAll(array("condition"=>"startDate = '".@$meetingDate."' AND userId = '".@$_SESSION['id']."' AND STATUS = 'Pending' AND (actionType = 'Meeting' OR actionType = 'Follow Up') ORDER BY hour DESC"));
- $meetingModels = LeadFollowup::model()->findAll(array("condition"=>"startDate = '".@$meetingDate."' AND userId IN(".@$managerMemberId.") AND STATUS = 'Pending' AND (actionType = 'Meeting' OR actionType = 'Follow Up') ORDER BY hour DESC"));
-
- $meetingArray[$i]['finalDescription'] = '';
-
- for($j=0;$j<count($meetingModels);$j++) {
- $srno = $j+1;
- $meetingArray[$i]['finalDescription'] = @$meetingDate;
- }
- }
-
- ?>
- <link href="<?php echo Yii::app()->request->baseUrl;?>/css/fullcalendar.css" rel="stylesheet" type="text/css" />
- <link href="<?php echo Yii::app()->request->baseUrl;?>/css/fullcalendar.print.css" rel="stylesheet" type="text/css" />
- <script>
- $(document).ready(function() {
- var date = new Date();
- var d = date.getDate();
- var m = date.getMonth();
- var y = date.getFullYear();
- //alert(y+'-'+m+'-'+d);
- $('#calendar').fullCalendar({
- theme: true,
- header: {
- left: 'prev today',
- center: 'title',
- right: 'next'
- },
- editable: true,
-
- events: [
- <?php
- $g=1;
- for($i=0;$i<count($meetingArray);$i++) { ?>
- {
- title: '<?php echo @$meetingArray[$i]['totalCount']?>',
- start: new Date(<?php echo @$meetingArray[$i]['year']?>, <?php echo @$meetingArray[$i]['month']?>, <?php echo @$meetingArray[$i]['day']?>, 0),
- allDay: false,
- rel: "myrel",
- 'class': 'class-link',
- url: '<?php echo Yii::app()->request->baseUrl;?>/index.php?r=leads/ViewCalenderActs&id=<?php echo $meetingArray[$i]['finalDescription']; ?>',
- }
- <?php if(count($meetingArray) > $g){
- echo ",";
- }
- $g++;
- } ?>
- ],
-
- eventClick : function(event) {
- //parent.$.fancybox.close();
- $.fancybox(
- {
- 'autoDimensions' : false,
- 'type' : 'iframe',
- 'href' : event.url,
- 'width' : 700,
- 'height' : 316,
- 'transitionIn' : 'none',
- 'transitionOut' : 'none',
- 'onClosed' : function(){
- $.fn.yiiGridView.update("acc-payment-recei-grid2");
- $.fn.yiiGridView.update("acc-payment-recei-grid4");
- }
- }
- );
- return false;
- }
- });
- $('a.tstf').fancybox({
- type: "iframe",
- width:700,
- height:500,
- });
-
- });
- </script>
- <?php $cs = Yii::app()->getClientScript(); $cs->registerCoreScript('jquery');
- $cs = Yii::app()->clientScript;
- $cs->coreScriptPosition = CClientScript::POS_HEAD;
- $baseUrl = Yii::app()->getModule('gii')->assetsUrl; //the assets of existing module
- //$cs->registerCoreScript('jquery');
- //$cs->registerCoreScript('jquery.ui');
- $cs->registerScriptFile($baseUrl . '/js/fancybox/jquery.fancybox-1.3.1.pack.js');
- $cs->registerCssFile($baseUrl . '/js/fancybox/jquery.fancybox-1.3.1.css');
- $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/popup.js');
-
- ?>
- <div class="opentaskside fl">
- <div class="fullcontainer items">
- <p> Leads for Today</p>
- <?php
-
- $form=$this->beginWidget('CActiveForm',array(
- 'id'=>'leadfortoday_filter',
- 'action'=> Yii::app()->createUrl('dashboard/dashboard'),
- ));
- ?>
-
- <table class="items" style="width:55%;border:none;">
- <tr><td>Financial year <div class="dropdownBox">
- <select name="financialyear" class="styled">
- <?php
- $u=0;
- for($i=date('Y')-5; $i<=date('Y'); $i++){
- $res = date('Y')-$u++;
- ?>
- <option value="<?php echo $res; ?>" <?php if(@$_POST['financialyear']==$res){ echo "selected='true'"; } ?> ><?php echo $res;?></option>;
-
- <?php
- }
- ?>
- </select>
- </div></td><td> <input name="image" type="image" src="images/go.png" /></td></tr>
- </table>
- <?php $this->endWidget();
-
- if(isset($dataProviderc) && !empty($dataProviderc)) {
-
- $alert="Are you sure you want to Change Status? ";
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id'=>'acc-payment-recei-grid11',
- 'htmlOptions' => array('class' => ''),
- 'ajaxUpdate'=>false,
- 'enablePagination' => true,
- 'pager' => array(
- 'header' => ' ',
- 'prevPageLabel' => 'Prev',
- 'nextPageLabel' => 'Next',
- ),
- 'dataProvider'=>@$dataProviderc,
- 'columns'=>array(
- array( // display 'create_time' using an expression
- 'header'=>'Disposition',
- 'name'=>'leadStatus',
- 'value'=>'@$data[leadstatus]',
- ),
- array( // display 'create_time' using an expression
- 'header'=>'Count(MTD)',
- 'name'=>'getparent',
- //'value'=>array($this,'getMTD'),
- 'value'=>function($data){
- $res = DashboardController::getMTD($data['leadstatusId']);
- if($res > 0){
- $financialyear = @$_POST['financialyear']?@$_POST['financialyear']:date('Y',time());
- echo CHtml::ajaxLink(DashboardController::getMTD($data['leadstatusId']), Yii::app()->createUrl( 'dashboard/ViewLeadSummaryData',array('leadStatusId'=>$data['leadstatusId'],'Y'=>@$financialyear,'type'=>'M') ),
- array( // ajaxOptions
- 'type' => 'POST',
- ),
- array( //htmlOptions
- 'href' => Yii::app()->createUrl( 'dashboard/ViewLeadSummaryData',array('leadStatusId'=>$data['leadstatusId'],'Y'=>@$financialyear,'type'=>'M') ),
- 'class'=>'tstf',
- )
- );
- } else {
- echo DashboardController::getMTD($data['leadstatusId']);
- }
- },
- ),
- array( // display 'create_time' using an expression
- 'header'=>'Count(YTD)',
- 'name'=>'getparent',
- 'type'=>'html',
- // 'value'=>array($this,'getYTD'),
- 'value'=>function($data){
- $res = DashboardController::getYTD($data['leadstatusId']);
- if($res > 0){
- $financialyear = @$_POST['financialyear']?@$_POST['financialyear']:date('Y',time());
- echo CHtml::ajaxLink(DashboardController::getYTD($data['leadstatusId']), Yii::app()->createUrl( 'dashboard/ViewLeadSummaryData',array('leadStatusId'=>$data['leadstatusId'],'Y'=>@$financialyear) ),
- array( // ajaxOptions
- 'type' => 'POST',
- ),
- array( //htmlOptions
- 'href' => Yii::app()->createUrl( 'dashboard/ViewLeadSummaryData',array('leadStatusId'=>$data['leadstatusId'],'Y'=>@$financialyear) ),
- 'class'=>'tstf',
- )
- );
- } else {
- echo DashboardController::getYTD($data['leadstatusId']);
- }
- },
- ),
- array( // display 'create_time' using an expression
- 'header'=>'Priority',
- 'name'=>'sortOrder',
- 'value'=>'@$data[sortOrder]',
-
- ),
- array( // display 'create_time' using an expression
- 'header'=>'View',
- 'name'=>'total',
- 'visible'=>0,
- 'value'=>function($data){
- echo '<a href="'.Yii::app()->createUrl('dashboard/ViewLeadSummaryData',array('leadStatusId'=>$data['leadstatusId'])).'" class=" class-link" style="color:#134BDB; text-decoration:none;cursor:pointer;">Details</a>';
- },
- ),
-
- ),
-
- ));
- }
-
- ?>
- </div>
-
- <div id="myteamworkload">
- <p>Workload</p>
- <?php
- if(Yii::app()->session->get('type')=='superadmin' or Yii::app()->session->get('roleId')==2){
- $form=$this->beginWidget('CActiveForm',array(
- 'id'=>'team_filter',
- 'action'=> Yii::app()->createUrl('dashboard/dashboard'),
- ));
- ?>
-
- <table class="items">
- <tr><td>Caller <div class="dropdownBox"><?php
- $models = User::model()->fetchCallersList();
- $caller_list = CHtml::listData($models,'id', 'userName');
- $modelUser=new User();
- $modelLead=new Lead();
- echo $form->dropDownList($modelUser,'userName',@$caller_list, array('id'=>'userName','class'=>'styled','empty' => 'Select Caller','options'=>array(@$_REQUEST['User']['userName']=>array('selected'=>'selected'))));
- ?></div></td><td><div class="dropdownBox010"><?php
- $modelnew = new leadSourceMaster();
- $modelstatus = leadSourceMaster::model()->findAll();
- // format models as $key=>$value with listData
- //echo $model->set_status;
- $status_list = CHtml::listData($modelstatus,'leadSourceId', 'leadSourceTitle');
-
- echo $form->dropDownList($modelnew,'leadSourceId',@$status_list, array('id'=>'status','class'=>'styled','empty' => 'Select Source','options'=>array(@$_REQUEST['LeadSourceMaster']['leadSourceId']=>array('selected'=>'selected'))));?></div></td><td> <input name="image" type="image" src="images/go.png" /></td></tr>
- <tr style="display:none;">
- <td style="display:none;">From : <?php
- $this->widget('zii.widgets.jui.CJuiDatePicker', array(
- 'model' =>@$modelLead,
- 'attribute' => 'createdOn',
- 'id'=>'period1',
-
- 'language'=>Yii::app()->language=='et' ? 'et' : null,
- // optional: jquery Datepicker options
- 'options' => array(
- // how to change the input format? see http://docs.jquery.com/UI/Datepicker/formatDate
- 'dateFormat'=>'dd-mm-yy',
- 'onSelect'=>'js:function(selected) {
- $("#period2").datepicker("option","minDate", selected)
-
- }',
- // user will be able to change month and year
-
- 'changeMonth' => 'true',
- 'changeYear' => 'true',
- // speed at which the datepicker appears, time in ms or "slow", "normal" or "fast"
- 'duration'=>'fast',
- // animation effect, see http://docs.jquery.com/UI/Effects
- 'showAnim' =>'slide',
- ),
- 'htmlOptions'=>array(
- 'style'=>'width:60%',
- 'class'=>'txtfield_calendericon','autocomplete'=>'off','value'=>@$_REQUEST['Lead']['createdOn']
- ),
- ));
- ?></td>
- <td style="display:none;">To <?php
- $this->widget('zii.widgets.jui.CJuiDatePicker', array(
- 'model' =>@$modelLead,
- 'attribute' => 'createdOn2',
- 'id'=>'period2',
- 'name'=>'period2',
-
- 'language'=>Yii::app()->language=='et' ? 'et' : null,
- // optional: jquery Datepicker options
- 'options' => array(
- // how to change the input format? see http://docs.jquery.com/UI/Datepicker/formatDate
- 'dateFormat'=>'dd-mm-yy',
-
- // user will be able to change month and year
-
- 'changeMonth' => 'true',
- 'changeYear' => 'true',
- // speed at which the datepicker appears, time in ms or "slow", "normal" or "fast"
- 'duration'=>'fast',
- // animation effect, see http://docs.jquery.com/UI/Effects
- 'showAnim' =>'slide',
- ),
- 'htmlOptions'=>array(
- 'style'=>'width:60%',
- 'class'=>'txtfield_calendericon','autocomplete'=>'off','value'=>@$_REQUEST['Lead']['createdOn2']
- ),
- ));
- ?> <td> <input name="image" type="image" src="images/go.png" /></td></td>
- </tr>
- </table>
- <?php $this->endWidget();
- }
- ?>
- <?php
- if(Yii::app()->session->get('isAllocator')=='yes' or Yii::app()->session->get('type')=='superadmin' or Yii::app()->session->get('roleId')==1 or Yii::app()->session->get('roleId')==4 ){
-
- if(isset($dataProviderWorkload) && !empty($dataProviderWorkload)) {
-
- $alert="Are you sure you want to Change Status? ";
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id'=>'acc-payment-recei-grid11',
- 'htmlOptions' => array('class' => ''),
- 'ajaxUpdate'=>false,
-
- 'pager' => array(
- 'header' => ' ',
- 'prevPageLabel' => 'Prev',
- 'nextPageLabel' => 'Next',
- ),
-
- 'dataProvider'=>@$dataProviderWorkload,
- 'columns'=>array(
- array( // display 'create_time' using an expression
- 'header'=>'Team Members',
- 'name'=>'leadStatus',
- 'value'=>function($data){
- echo '<a href="'.Yii::app()->createUrl('dashboard/ViewWorkLoadData',array('id'=>$data['Id'])).'" class=" class-link" style="color:#545454; text-decoration:none;cursor:pointer;">'.CHtml::encode($data["firstName"]." ".$data["lastName"]).'</a>';
- },
- //'value'=>'CHtml::encode($data["firstName"]." ".$data["lastName"])',
- ),
- array( // display 'create_time' using an expression
- 'header'=>'T',
- 'name'=>'getparent',
- 'value'=>'@$data[T]',
-
- ),
- array( // display 'create_time' using an expression
- 'header'=>'Y',
- 'name'=>'getparent',
- 'value'=>'@$data[Y]',
-
- ),
-
- array( // display 'create_time' using an expression
- 'header'=>'M',
- 'name'=>'sortOrder',
- 'value'=>'@$data[M]',
-
- ),
- array( // display 'create_time' using an expression
- 'header'=>'LM',
- 'name'=>'total',
- 'value'=>'@$data[LM]',
- ),
-
- ),
-
- ));
- }
-
- }
- if(isset($dataProvidercaller) && !empty($dataProvidercaller)) {
- //for caller display records
- if(Yii::app()->session->get('roleId')==3 ){
-
- $this->widget('zii.widgets.CListView', array(
- 'dataProvider'=>$dataProvidercaller,
- 'itemView'=>'_view',
- 'template'=>'{items}<br/>{pager}'
- ));
- }
- }
- if(Yii::app()->session->get('roleId')==2 ){
- $today12PM = mktime(0,0,0,date("m"),date("d"),date("Y"));
- $tomorrow12PM = mktime(0,0,0,date("m"),date("d"),date("Y"))+86400;
- $yesterday12PM = mktime(0,0,0,date("m"),date("d"),date("Y"))-86400;
- $CurrentMonth_first_minute = mktime(0, 0, 0, date("n"), 1);
- $CurrentMonth_last_minute = mktime(23, 59, 0, date("n"), date("t"));
- $LastMonth_first_minute = mktime(0, 0, 0, date("n")-1, 1);
-
- $adminUniqueT=Yii::app()->db->createCommand("Select Count(*) as TotalUnique from (SELECT count(*) from lead where lead.updatedOn >= '".@$today12PM."' and lead.updatedOn <= '".@$tomorrow12PM."' and lead.currentAllocatedId IN (".$impresuser.") group by mobile) as lm ")->queryAll();
- $adminUniqueY=Yii::app()->db->createCommand("Select Count(*) as TotalUnique from (SELECT count(*) from lead where lead.updatedOn >= '".@$yesterday12PM."' and lead.updatedOn <= '".@$today12PM."' and lead.currentAllocatedId IN (".$impresuser.") group by mobile) as lm ")->queryAll();
- $adminUniqueL=Yii::app()->db->createCommand("Select Count(*) as TotalUnique from (SELECT count(*) from lead where lead.updatedOn >= '".@$CurrentMonth_first_minute."' and lead.updatedOn <= '".@$CurrentMonth_last_minute."' and lead.currentAllocatedId IN (".$impresuser.") group by mobile) as lm ")->queryAll();
- $adminUniqueLM=Yii::app()->db->createCommand("Select Count(*) as TotalUnique from (SELECT count(*) from lead where lead.updatedOn >= '".@$LastMonth_first_minute."' and lead.updatedOn <= '".@$CurrentMonth_first_minute."' and lead.currentAllocatedId IN (".$impresuser.") group by mobile) as lm ")->queryAll();
-
-
- $adminTotalT=Yii::app()->db->createCommand("SELECT count(*) as TotalUnique from lead where lead.updatedOn >= '".@$today12PM."' and lead.updatedOn <= '".@$tomorrow12PM."' and lead.currentAllocatedId IN (".$impresuser.")")->queryAll();
- $adminTotalY=Yii::app()->db->createCommand("SELECT count(*) as TotalUnique from lead where lead.updatedOn >= '".@$yesterday12PM."' and lead.updatedOn <= '".@$today12PM."' and lead.currentAllocatedId IN (".$impresuser.")")->queryAll();
- $adminTotalL=Yii::app()->db->createCommand("SELECT count(*) as TotalUnique from lead where lead.updatedOn >= '".@$CurrentMonth_first_minute."' and lead.updatedOn <= '".@$CurrentMonth_last_minute."' and lead.currentAllocatedId IN (".$impresuser.")")->queryAll();
- $adminTotalLM=Yii::app()->db->createCommand("SELECT count(*) as TotalUnique from lead where lead.updatedOn >= '".@$LastMonth_first_minute."' and lead.updatedOn <= '".@$CurrentMonth_first_minute."' and lead.currentAllocatedId IN (".$impresuser.")")->queryAll();
-
- ?>
- <table class="items">
- <thead>
- <tr>
- <th> </th><th>Total</th><th>Unique</th>
- </tr>
- </thead>
- <tbody>
- <tr><td>T</td><td><?php echo @$adminTotalT[0]['TotalUnique']?@$adminTotalT[0]['TotalUnique']:0; ?></td><td><?php echo @$adminUniqueT[0]['TotalUnique']?@$adminUniqueT[0]['TotalUnique']:0; ?></td></tr>
- <tr><td>Y</td><td><?php echo @$adminTotalY[0]['TotalUnique']?@$adminTotalY[0]['TotalUnique']:0; ?></td><td><?php echo @$adminUniqueY[0]['TotalUnique']?@$adminUniqueY[0]['TotalUnique']:0; ?></td></tr>
- <tr><td>M</td><td><?php echo @$adminTotalL[0]['TotalUnique']?@$adminTotalL[0]['TotalUnique']:0; ?></td><td><?php echo @$adminUniqueL[0]['TotalUnique']?@$adminUniqueL[0]['TotalUnique']:0; ?></td></tr>
- <tr><td>LM</td><td><?php echo @$adminTotalLM[0]['TotalUnique']?@$adminTotalLM[0]['TotalUnique']:0; ?></td><td><?php echo @$adminUniqueLM[0]['TotalUnique']?@$adminUniqueLM[0]['TotalUnique']:0; ?></td></tr>
- </tbody>
- </table>
- <?php
- }
- ?>
-
- </div>
- <div class="fullcontainer">
- <p>Speedometer</p>
- <?php $form=$this->beginWidget('CActiveForm',array(
- 'id'=>'speedometer',
- 'action'=>Yii::app()->createUrl('dashboard/dashboard'),
- 'htmlOptions'=>array(
- 'name'=>'speedometer_form'
- )
- ));
- ?>
- <div class="dropdownBoxdash fr mrgnDropbox">
- <select class="styled" name="speedmeterUser" onchange="this.form.submit();">
- <option value="">Select User</option>
- <?php if(count($managerDetailsArr) > 0 && isset($managerDetailsArr) && !empty($managerDetailsArr)){
- foreach($managerDetailsArr as $key=>$value){
- ?>
- <option value="<?php echo @$value['id']; ?>" <?php if(@$_REQUEST['speedmeterUser']==@$value['id']) { echo "selected"; } ?>><?php echo @$value['firstName']." ".@$value['lastName']; ?></option>
- <?php }
- } ?>
-
- </select>
- </div>
- <?php $this->endWidget();
- $totalClosedAmount=intval(@$totalAmountOfSpeedometer[0]['totalAmount']);
- if($totalClosedAmount > 1000000){
- $totalClosedAmount=1000000;
- }
- $totalclosedAmount=1000000;
- if($totalClosedAmount > 0){
- $totalClosedAmount = $totalClosedAmount;
- } else {
- $totalClosedAmount = 1;
- }
- $chartAmount=intval($totalclosedAmount-$totalClosedAmount);
- ?>
- <div class="barnotation">
-
- <div class="barnotationheading"><span class="followBoxDashboard" style="background-color:#FFFF01;"> </span> Close Lead Amount (<?php if($totalClosedAmount=='1') { echo 0; } else { echo @$totalClosedAmount; } ?>) </div>
- <div class="barnotationheading"><span class="followBoxDashboard" style="background-color:#4D4D4D;"> </span> Target 10 Lakh </div>
-
- </div>
- <?php
- $graphbg = Yii::app()->image->createUrl('images',YiiBase::getPathOfAlias('webroot.images').'/graphBg.png');
-
- ?>
- <div class="dashboardBox" style="background:url(<?php echo $graphbg;?>) center center no-repeat;">
-
-
- <?php
- $this->widget(
- 'chartjs.widgets.ChPie',
-
- array(
- 'width' => 400,
- 'height' => 189,
- 'datasets' => array(
- array(
- 'value'=>$totalClosedAmount,
- 'color'=>'#FFFF01',
- ),
- array(
- 'value'=>$chartAmount,
- 'color'=>'#4d4d4d',
- ),
-
- ),
-
- 'options' => array('centerTop'=>830, // Distance from widget's left side to the center of pie chart
- 'centerLeft'=>130, // Distance from widget's top side to the center of pie chart
- 'radius'=>100)
- )
- );
- ?>
- <span class="fr">
- </span>
- </div>
- </div>
- </div>
- <?php $form=$this->beginWidget('CActiveForm',array(
- 'id'=>'add_plan_type',
- 'action'=>'',
- 'htmlOptions'=>array(
- 'name'=>'plan_type_form'
- )
- ));
- ?>
-
- <div class="opentaskside fr">
- <div class="formHeadContainerrght">
- <h1>Meetings/Followups</h1>
- </div>
- <div class="formBox">
- <div class="formBoxScrollrght">
- <div id='calendar'></div>
- <div>
- <?php echo CHtml::link('View All Calenders Follow-Up/Call-later',array('dashboard/fullcalender'),array('style'=>'color:#545454;font:13px Calibri,Helvetica Neue,Tahoma,sans-serif;','target'=>'_blank'));?>
- </div>
-
- </div>
- </div>
-
- <div class="fullcontainer">
- <p>Performance</p>
- <?php
- if(isset($dataProviderPerf) && !empty($dataProviderPerf)) {
-
- $alert="Are you sure you want to Change Status? ";
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id'=>'acc-payment-recei-grid11',
- 'htmlOptions' => array('class' => ''),
- 'ajaxUpdate'=>false,
- 'pager' => array(
- 'header' => ' ',
- 'prevPageLabel' => 'Prev',
- 'nextPageLabel' => 'Next',
- ),
- 'dataProvider'=>@$dataProviderPerf,
- 'columns'=>array(
- array( // display 'create_time' using an expression
- 'header'=>'Team Member',
- 'name'=>'leadStatus',
- 'value'=>'CHtml::encode($data["firstName"]." ".$data["lastName"])',
- ),
- array( // display 'create_time' using an expression
- 'header'=>'MTD',
- 'name'=>'getparent',
- 'value'=>'@$data[MTD]',
-
- ),
-
-
- array( // display 'create_time' using an expression( add by me)
- 'header'=>'Amount',
- 'name'=>'getparent',
- 'value'=>'@$data[mtdpremium]',
-
- ),
-
-
- /*
- array( // display 'create_time' using an expression
- 'header'=>'Closures',
- 'name'=>'getparent',
- 'value'=>'@$data[closeLeads]',
-
- ),
- array( // display 'create_time' using an expression(add comment by me)
- 'header'=>'Amount',
- 'name'=>'getparent',
- 'value'=>'@$data[premium]',
-
- ), */
- array( // display 'create_time' using an expression
- 'header'=>'YTD',
- 'name'=>'getparent',
- 'value'=>'@$data[YTD]',
-
- ),
-
- array( // display 'create_time' using an expression(add new collom by me)
- 'header'=>'Amount',
- 'name'=>'getparent',
- 'value'=>'@$data[premium]',
-
- ),
-
-
- /*array( // display 'create_time' using an expression
- 'header'=>'Detalis',
- 'name'=>'total',
- 'value'=>function($data){
- echo '<a href="'.Yii::app()->createUrl('dashboard/ViewFancyboxData',array('id'=>$data['Id'])).'" class="viewNav class-link" style="color:#134BDB; text-decoration:none;cursor:pointer;">View</a>';
- },
- ),*/
-
- ),
-
- ));
- }
- ?>
-
- </div>
- <div class="fullcontainer">
- <p>Announcements</p>
- <table cellspacing="0" cellpadding="0" class="items">
- <?php
- if(count(@$notifications)>0 && isset($notifications) && !empty($notifications)){
- foreach(@$notifications as $key2=>$value2){
- if($notifications[$key2]['type']=='TEXT'){
- if($notifications[$key2]['description']!=''){
- $data=str_replace("<p>","",$notifications[$key2]['description']);
- $data=str_replace("</p>","",$data);
- ?>
- <tr>
- <td><?php echo stripslashes(@$data); ?></td>
- </tr>
- <?php } }
- }
- } else {
- ?>
- <tr>
- <td>No Data Available</td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- <div class="fullcontainer">
- <p>leads count</p>
- <table cellspacing="0" cellpadding="0" class="items">
- <tr>
- <td><?php echo CHtml::ajaxLink('Source Wise', Yii::app()->createUrl( 'dashboard/showLeadCount' ),
- array( // ajaxOptions
- 'type' => 'POST',
- ),
- array( //htmlOptions
- 'href' => Yii::app()->createUrl( 'dashboard/showLeadCount' ),
- 'class'=>'tstf',
- )
- ); ?>
- </td>
- <td><?php echo CHtml::ajaxLink('Disposition Wise', Yii::app()->createUrl( 'dashboard/showleadcountdisp' ),
- array( // ajaxOptions
- 'type' => 'POST',
- ),
- array( //htmlOptions
- 'href' => Yii::app()->createUrl( 'dashboard/showleadcountdisp' ),
- 'class'=>'tstf',
- )
- ); ?></td>
- </tr>
- </table>
- </div>
- </div>
-
- <?php $this->endWidget(); ?>
- <div class="cl"></div>
- </div>