<style>
.hidden_text
{
	display:none;
}
</style>
<div class="main_content">
<div class="innercontent_outerbox">
  <h1>Events</h1>
  <table width="885" border="1" align="center" cellpadding="5" cellspacing="5" bordercolor="#e0e0e0">
    <tr>
      <td width="150" align="center" valign="middle" bgcolor="#e8eaeb"><h3>Title</h3></td>
      <td width="400" align="center" valign="middle" bgcolor="#e8eaeb"><h3>Description</h3></td>
      <td width="170" align="center" valign="middle" bgcolor="#e8eaeb"><h3>Start Date &amp; Time</h3></td>
      <td width="170" align="center" valign="middle" bgcolor="#e8eaeb"><h3>End Date &amp; Time</h3></td>
      <td width="15" align="center" valign="middle" bgcolor="#e8eaeb"></td>
    </tr>
    <?php 
    //$bgcolor="";
    foreach($events as $eachEvent): 
        //$bgcolor	=	($bgcolor=="#fefefe")?"":"#fefefe";
        $bgcolor="#fefefe";
        ?>
    <tr>
      <td align="left" valign="top" bgcolor="<?php echo $bgcolor; ?>"><?php echo $eachEvent->event_title; ?></td>
      <td align="left" valign="top" bgcolor="<?php echo $bgcolor; ?>"><span class="visible_text"><?php echo substr(strip_tags($eachEvent->description),0,100); ?>..</span><span class="hidden_text"><?php echo $eachEvent->description; ?></span></td>
      <td align="left" valign="top" bgcolor="<?php echo $bgcolor; ?>"><?php echo $eachEvent->event_date; ?><br/><?php echo date('h:m a',strtotime($eachEvent->event_time)); ?></td>
      <td align="left" valign="top" bgcolor="<?php echo $bgcolor; ?>"><?php echo $eachEvent->event_end_date; ?><br/><?php echo date('h:m a',strtotime($eachEvent->event_end_time)); ?></td>
      <td align="left" valign="top" bgcolor="<?php echo $bgcolor; ?>">
      <?php if($eachEvent->file!=''): ?>
      <?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl."/images/event_pdf.png","",array("width"=>"25","height"=>"25")),Yii::app()->request->getBaseUrl(true).'/media/events/'.$eachEvent->file,array('target'=>'_balnk')); ?>
      <?php endif; ?>
      </td>
    </tr>
    <?php endforeach; ?>
  </table>
</div>
<?php echo $this->renderPartial('_bottom_common_user_product_group'); ?> 