<div id="communbox" style="width:885px; float:left;">
  <div id="headlines" style="width: 99%; padding-left:2%;"><img src="<?php echo Yii::app()->baseUrl; ?>/images/bg.png" width="12" height="7" class="right5"/>New User</div>
  <div id="communicationsbox" style="height:525px; background-color:#f7eee1;">
    <div id="form_wrapper">
      <form action="" method="get" enctype="multipart/form-data">
        <div id="row">
          <fieldset id="current">
            <legend><strong>Dashboard</strong></legend>
            <div class="table_outer">
              <div class="table_right">
                <table width="400"  cellpadding="5" bordercolor="#666666">
                  <tr>
                    <td colspan="2" align="center" bgcolor="#666666"><strong style="color:#fff">Dashboard</strong></td>
                  </tr>
                  <tr>
                    <td bgcolor="#CCCCCC"><em>User Name</em></td>
                    <td bgcolor="#aeadad"><em>Actions</em></td>
                  </tr>
                  <?php foreach ($newUsers  as $eachUser) : ?>
                  <tr>
                    <td bgcolor="#CCCCCC"><?php echo $eachUser->fullname; ?></td>
                    <td bgcolor="#aeadad">
					<?php echo CHtml::link('View',Yii::app()->createUrl('user/update',array('id'=>$eachUser->id))); ?> | 
					<?php echo CHtml::link('Delete',Yii::app()->createUrl('user/delete',array('id'=>$eachUser->id))); ?> | 
					<?php echo CHtml::link(($eachUser->isActive=='N')?'Approve':'Block',Yii::app()->createUrl('user/frontStatusChange',array('id'=>$eachUser->id))); ?></td>
                  </tr>
                  <?php endforeach; ?>
                  
                  <tr>
                    <td bgcolor="#CCCCCC"><a href="<?php echo Yii::app()->createUrl('user/index'); ?>"> More &gt;&gt;</a></td>
                    <td bgcolor="#CCCCCC">&nbsp;</td>
                  </tr>
                </table>
              </div>
              <div class="table_right">
                <table width="400" cellpadding="5" bordercolor="#666666">
                  <tr>
                    <td colspan="2" align="center" bgcolor="#666666"><strong style="color:#fff">Case studies</strong></td>
                  </tr>
                  <tr>
                    <td bgcolor="#CCCCCC"><em>Title</em></td>
                    <td bgcolor="#AEADAD"><em>Actions</em></td>
                  </tr>
                  <?php foreach ($caseStudies  as $eachCase) : ?>
                  <tr>
                    <td bgcolor="#CCCCCC"><?php echo $eachCase->title_of_the_paper; ?></td>
                    <td bgcolor="#AEADAD"><?php echo CHtml::link('View',Yii::app()->createUrl('caseStudy/update',array('id'=>$eachCase->id))); ?> | <?php echo CHtml::link(($eachCase->isActive=='N')?'Approve':'Disapprove',Yii::app()->createUrl('caseStudy/frontStatusChange',array('id'=>$eachCase->id))); ?></td>
                  </tr>
                  <?php endforeach; ?>
                  
                  <tr>
                    <td bgcolor="#CCCCCC"><a href="<?php echo Yii::app()->createUrl('caseStudy/index'); ?>"> More &gt;&gt;</a></td>
                    <td bgcolor="#AEADAD">&nbsp;</td>
                  </tr>
                </table>
              </div>
            </div>
            <div class="table_outer">
              <div class="table_right">
                <table width="400" cellpadding="5" bordercolor="#666666">
                  <tr>
                    <td colspan="3" align="center" bgcolor="#666666"><strong style="color:#fff">Rewards</strong></td>
                  </tr>
                  <tr>
                    <td bgcolor="#CCCCCC"><em>User Name</em></td>
                    <td bgcolor="#AEADAD"><em>Points</em></td>
                    <td bgcolor="#CCCCCC"><em>Actions</em></td>
                  </tr>
                  <?php foreach($rewards as $eachReward): ?>
                  <tr>
                    <td bgcolor="#CCCCCC"><?php echo $eachReward->user->fullname; ?></td>
                    <td bgcolor="#AEADAD"><?php echo $eachReward->point; ?></td>
                    <td bgcolor="#CCCCCC"><?php echo CHtml::link('View',Yii::app()->createUrl('reward/index',array('id'=>$eachReward->id))); ?> </td>
                  </tr>
                  <?php endforeach; ?>
                  
                  <tr>
                    <td bgcolor="#CCCCCC"><a href="<?php echo Yii::app()->createUrl('reward/index'); ?>"> More &gt;&gt;</a></td>
                    <td bgcolor="#AEADAD">&nbsp;</td>
                    <td bgcolor="#CCCCCC">&nbsp;</td>
                  </tr>
                </table>
              </div>
              <div class="table_right">
               <!-- <table width="400" cellpadding="5" bordercolor="#666666">
                  <tr>
                    <td colspan="2" align="center" bgcolor="#666666"><strong style="color:#fff">News Letters</strong></td>
                  </tr>
                  <tr>
                    <td bgcolor="#CCCCCC"><em>Next Letter</em></td>
                    <td bgcolor="#AEADAD"><em>Actions</em></td>
                  </tr>
                  <?php foreach($newsLetters as $eachNewsLetter) : ?>
                  <tr>
                    <td bgcolor="#CCCCCC"><?php echo $eachNewsLetter->created; ?></td>
                    <td bgcolor="#AEADAD">View | Stop | Edit </td>
                  </tr>
                  <?php endforeach; ?>
                  
                  <tr>
                    <td bgcolor="#CCCCCC"><a href="<?php echo Yii::app()->createUrl('Newsletter/index'); ?>"> More &gt;&gt;</a></td>
                    <td bgcolor="#AEADAD">&nbsp;</td>
                  </tr>
                </table> -->
              </div>
            </div>
          </fieldset>
        </div>
      </form>
    </div>
  </div>
</div>
<script>
/*function () {
    var id = $(this).attr("id");
    var p = this;
    $(this).html("<img src=\"images/admin/loading.gif\" alt=\"\" />");
    $.ajax({url: "<?php Yii::app()->createUrl('user/delete') ?>", success: function (str) {$(p).html(str);}, type: "POST", cache: false, data: {id: id}, dataType: "html"});
    return false;
}*/
</script>