<div id="slider_box">
  <div id="slider_left">
    <div id="slider_topshadow"></div>
    <div id="slider_left_shadow"></div>
    <?php $this->renderPartial('slider');  ?>
    <div id="slider_rightshadow"></div>
    <div id="slider_bottomshadow"></div>
  </div>
  <div id="slider_right_box">
    <?php if(Yii::app()->user->isGuest): ?>
    <div id="account_login_button">
      <div id="account_loginbutton_text"> <b style="font-size:14px; color:#26272c; font-weight:normal;">Login to Partner Center</b></div>
      <div id="account_loginbutton"> <a href="<?php echo Yii::app()->createUrl('site/login'); ?>"><img src="<?php echo Yii::app()->baseUrl; ?>/images/front/1/accountlogin_22.jpg" width="169" height="49" alt="login" /></a></div>
      <div id="account_loginbutton_text"> <b style="font-size:12px; color:#6593df; font-weight:normal;">Existing Reseller and Need an Account?</b></div>
    </div>
    <div id="account_login_button">
      <div id="account_loginbutton_text"> <b style="font-size:14px; color:#26272c; font-weight:normal;">Become an D-Link Partner</b></div>
      <div id="account_loginbutton"> <a href="<?php echo Yii::app()->createUrl('site/registration'); ?>"><img src="<?php echo Yii::app()->baseUrl; ?>/images/front/1/applynow_28.jpg" width="169" height="51" alt="login" /></a></div>
      <div id="account_loginbutton_text"> <b style="font-size:12px; color:#6593df; font-weight:normal;"> </b></div>
    </div>
    <?php else: ?>
    <div id="account_login_button">
      <div style="font-size:12px; min-height:245px; font-weight:normal; color:#333;">
        <table width="100%" border="0" cellspacing="5" cellpadding="10">
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/viewprofile'); ?>">View Profile</a></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/editprofile'); ?>">Edit Profile</a></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/changepassword'); ?>">Change Password</a></td>
          </tr>
          <?php if(Yii::app()->user->usertype == 'staff' || Yii::app()->user->usertype == 'administrator'|| Yii::app()->user->usertype == 'superadmin' ): ?>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/submitpaper'); ?>">Submit a paper</a></td>
          </tr>
          <?php else: ?>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/pointstable'); ?>">Points table</a></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/redeempoints'); ?>">Redeem Points</a></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#bcd1e1"><a href="<?php echo Yii::app()->createUrl('site/mywallet'); ?>">My Wallet</a></td>
          </tr>
          <?php endif; ?>
        </table>
      </div>
    </div>
    <?php endif; ?>
  </div>
</div>
<div id="content">
  <div style="font-family:Arial; font-size:12px; color:#333; width:965px; margin-left:20px;">
    <?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
)); ?>
    <?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
    }
?>
    <div id="row">
      <fieldset id="current">
        <legend><strong>Personal Details</strong></legend>
        <br>
        <table width="800" border="0" cellspacing="2" cellpadding="3">
          <tbody>
            <tr>
              <td width="400"><?php echo $form->labelEx($model,'fullname'); ?></td>
              <td width="400"><?php echo $form->labelEx($model,'designation'); ?></td>
            </tr>
            <tr>
              <td><?php echo $form->textField($model,'fullname',array('size'=>20,'maxlength'=>255)); ?> <?php echo $form->error($model,'fullname'); ?></td>
              <td><?php echo $form->textField($model,'designation',array('size'=>20,'maxlength'=>255)); ?> <?php echo $form->error($model,'designation'); ?></td>
            </tr>
            <tr>
              <td width="400"><?php echo $form->labelEx($model,'mobile_number'); ?></td>
              <td width="400"><?php echo $form->labelEx($model,'company_email_address'); ?></td>
            </tr>
            <tr>
              <td><?php echo $form->textField($model,'mobile_number',array('size'=>15,'maxlength'=>15)); ?> <?php echo $form->error($model,'mobile_number'); ?></td>
              <td><?php echo $form->textField($model,'company_email_address',array('size'=>20,'maxlength'=>255)); ?> <?php echo $form->error($model,'company_email_address'); ?></td>
            </tr>
            <?php if($model->isNewRecord):?>
            <tr>
              <td><?php echo $form->labelEx($model,'password'); ?></td>
              <td><?php echo $form->labelEx($model,'repeat_password'); ?></td>
            </tr>
            <tr>
              <td><?php echo $form->passwordField($model,'password',array('size'=>20,'maxlength'=>50,'value'=>'')); ?> <?php echo $form->error($model,'password'); ?></td>
              <td><?php echo $form->passwordField($model,'repeat_password',array('size'=>20,'maxlength'=>255)); ?> <?php echo $form->error($model,'repeat_password'); ?></td>
            </tr>
            <?php endif; ?>
          </tbody>
        </table>
      </fieldset>
    </div>
    <br>
    <div id="row">
      <fieldset id="current">
        <legend><strong>Company Details</strong></legend>
        <br>
        <table width="800" border="0" cellspacing="2" cellpadding="3">
          <tbody>
            <tr>
              <td width="400"><?php echo $form->labelEx($model,'company_name'); ?></td>
              <td width="400"><?php echo $form->labelEx($model,'country_id'); ?></td>
            </tr>
            <tr>
              <td><?php echo $form->textField($model,'company_name',array('size'=>20,'maxlength'=>255)); ?> <?php echo $form->error($model,'company_name'); ?></td>
              <td><label for="textfield2"></label>
                <?php echo $form->dropDownList($model,'country_id',Country::getCountry(),array('style'=>'width:150px')); ?> <?php echo $form->error($model,'country_id'); ?></td>
            </tr>
            <tr>
              <td width="400"><?php echo $form->labelEx($model,'industry_id'); ?></td>
              <td width="400"><?php echo $form->labelEx($model,'postal_address'); ?></td>
            </tr>
            <tr>
              <td align="left" valign="top"><?php echo $form->dropDownList($model,'industry_id',Industry::getIndustry()); ?> <?php echo $form->error($model,'industry_id'); ?></td>
              <td><?php echo $form->textArea($model,'postal_address',array('rows'=>6, 'cols'=>50)); ?> <?php echo $form->error($model,'postal_address'); ?></td>
            </tr>
            <tr>
              <td align="left" valign="top">&nbsp;</td>
              <td><?php echo CHtml::submitButton($model->isNewRecord ? 'Register' : 'Save'); ?></td>
            </tr>
          </tbody>
        </table>
      </fieldset>
    </div>
    <?php $this->endWidget(); ?>
  </div>
</div>
