<?php $this->beginContent('application.views.front.layouts.home');?>
<?php $this->renderPartial('/site/_top_menu1'); ?>
<?php if(Yii::app()->user->isGuest):if(!in_array(Yii::app()->controller->action->id,array('registration','forgotpassword','login'))): ?>
        <!--New user-->
        <div class="login_outer">
        <?php $user_model	=	new User('login'); ?>
          <?php $form=$this->beginWidget('CActiveForm', array('id'=>'login','action' => Yii::app()->createUrl('site/login'),)); ?>
            <table width="420" border="0" cellspacing="3" cellpadding="5">
              <tr>
                <td width="172" align="left" valign="top">User Name
                    <?php echo $form->textField($user_model,'company_email_address',array('style'=>'border:1px #999 solid')); ?>
                    New User?&nbsp;&nbsp; <a href="<?php echo Yii::app()->createUrl('site/registration'); ?>">Register Now</a>
                </td>
                <td width="167" align="left" valign="top"> Password
                <?php echo $form->passwordField($user_model,'password',array('style'=>'border:1px #999 solid')); ?>
                    <a href="<?php echo Yii::app()->createUrl('site/forgotpassword'); ?>">Forgot your password?</a>
                </td>
                <td width="211" align="left" valign="middle">
                <?php echo CHtml::submitButton('Log In',array('class'=>'login_button')); ?>
                </td>
              </tr>
            </table>
          <?php $this->endWidget(); ?>
        </div>
        <?php endif;else: ?>      
        <div class="my_account" >        
         <ul id="my_acc">
             <li class="sub"><a href="#">My Account</a>
                <ul>
                	<li><a href="<?php echo Yii::app()->createUrl('site/viewprofile'); ?>">View Profile</a></li>
                	<li><a href="<?php echo Yii::app()->createUrl('site/editprofile'); ?>">Edit Profile</a></li>
                	<li><a href="<?php echo Yii::app()->createUrl('site/changepassword'); ?>">Change Password</a></li>
                    <?php if(Yii::app()->user->usertype == 'staff' || Yii::app()->user->usertype == 'administrator'|| Yii::app()->user->usertype == 'superadmin' ): ?>
                	<li><a href="<?php echo Yii::app()->createUrl('site/submitpaper'); ?>">Submit a Paper</a></li>
                	<?php else: ?>
                    <li><a href="<?php echo Yii::app()->createUrl('site/pointstable'); ?>">Points Table</a></li>
                    <li><a href="<?php echo Yii::app()->createUrl('site/mywallet'); ?>">My Wallet</a></li>
                    <li><a href="javascript:;" class="request_wallet_password">Request a wallet password</a>
                    <li><a href="<?php echo Yii::app()->createUrl('site/earnpoints'); ?>">Earn Points</a></li>
          			<li><a href="<?php echo Yii::app()->createUrl('site/redeempoints'); ?>">Redeem Points</a></li>
                    <?php endif; ?>
                    <li><a href="<?php echo Yii::app()->createUrl('site/logout'); ?>">Logout</a></li>
                </ul>
            </li>			
            </li>			
		</ul>         
         </div>         
         <?php endif; ?>
        </div>
      <?php $this->renderPartial('/site/_top_menu2'); ?>
    <?php echo $content; ?>
<?php $this->endContent(); ?>