<?php $this->renderPartial('_top_banner'); ?>
<div class="main_content">
      <div class="content_outerbox">
        <div class="content_leftbox">
          <h1> Welcome to D-Link Partner Portal</h1>Enjoy the benefits of being a D-Link Partner, and broaden your business portfolio, increase your profitability, and get the solutions to the market faster.
As a D-Link Partner, you will have access to all D-Link's partner-specific resources at your fingertips. You will also be able to enhance your business profile by adding D-Link's business class solutions to your product portfolio.
At D-Link Partner Center, we are committed to providing you, useful tools, resources, and the know-how of managing and growing your business.
        </div>
        <div class="content_rightbox">
          <div class="findout_outer">
            <form action="" method="get">
              <table width="270" border="0" cellspacing="5" cellpadding="5">
                <tr>
                  <td>Find out...</td>
                </tr>
                <tr>
                  <td><label for="select" style="float:left;"></label>
                    <select name="select" id="select" style=" width:200px" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
                      <option>Select</option>
                      <?php
                      $findouts =   Findout::model()->findAll(array('condition'=>'isActive="Y"'));
                      foreach($findouts as $eachFindout):
                      ?>
                      <option value="<?php echo $eachFindout->link ?>"> <?php echo $eachFindout->title ?></option>
                      <?php endforeach; ?>                      
                    </select>
                    <input name="" type="button" class="go_button" /></td>
                </tr>
              </table>
            </form>
          </div>
        </div>
      </div>
      <div class="content2_outerbox">
          <?php 
            $model  =   PartnerFrontPage::model()->findAll(array('condition'=>'isActive="Y"'));
            foreach($model as $eachModel):
                $image  =   ($eachModel->image_name!='')?$eachModel->image_name:'no_image.png';
            if($eachModel->isLink=="Y")
                    $link   =   '<a href="'.$eachModel->href.'">Click here</a>';
            else
                    $link   =   '<a href="'.Yii::app()->createUrl('site/readmore',array('id'=>$eachModel->id)).'">Click here</a>';
          ?>
          <?php
			if (file_exists('media/banner/'.$image)) 
			{
				$thumb=Yii::app()->phpThumb->create('media/banner/'.$image);
				$thumb->resize(290,180);
				$thumb->save('media/banner/290_165'.$image);
                                $image  =  '290_165'.$image; 
			}
	  ?>
        <div class="dlink_box">
          <div class="dlink_imgbox"><img height="150" width="280" alt="loading.." title="<?php echo $eachModel->title; ?>" src="<?php echo Yii::app()->baseUrl; ?>/media/banner/<?php echo $image; ?>"  /></div>
          <div class="dlink_matterbox">
            <h3><?php echo $eachModel->title; ?></h3>
            <?php echo substr(strip_tags($eachModel->content),0,100); ?>..<br />
            <span class="more"><?php echo $link; ?></span></div>
        </div>
          <?php endforeach; ?>
          
      </div>
      <div class="content_outerbox">
        <div class="case_study_outer">
          <div class="case_study_box">
            <div class="case_study_matter">
              <h1>Case Studies</h1>
              View our featured case studies </div>
              
              <?php foreach ( $caseStudies as $eachCaseStudy): ?>
              <?php if(is_array(getimagesize("media/paper/".$eachCaseStudy->filename))): ?>
            <img src="<?php echo Yii::app()->baseUrl; ?>/media/paper/<?php echo $eachCaseStudy->filename;  ?>" width="210" height="118" alt="<?php echo $eachCaseStudy->title_of_the_paper; ?>" /><br />
            <?php endif; ?>
            <h3><?php echo $eachCaseStudy->title_of_the_paper; ?></h3>
            <?php echo substr(strip_tags($eachCaseStudy->content),0,180); ?>.. <span class="more"><br />
            <a href="<?php echo Yii::app()->createUrl('site/casestudy_readmore',array('id'=>$eachCaseStudy->id)); ?>">Read more</a></span>
            <hr />
            <?php endforeach; ?>
            
            </div>
          <div class="case_study_more"> <a href="<?php echo Yii::app()->createUrl('site/Casestudy'); ?>">More Case Studies </a></div>
        </div>
        <div class="news_outer">
          <div class="news_box">
            <div class="news_matter">
              <h1> News</h1>
              View our featured news<br />
              <br />
            </div>
            
            <?php foreach($news as $eachNews): ?>
            <h3> <?php echo substr(strip_tags($eachNews->title_of_news.':'.$eachNews->content),0,40); ?></h3>
            <span class="more"><a href="<?php echo Yii::app()->createUrl('site/news_details',  array('id'=>$eachModel->id,'name'=>'details')); ?>">Read more</a></span>
            <hr />
            <?php endforeach; ?>
            
            
            </div>
          <div class="news_more"> <a href="<?php echo Yii::app()->createUrl('site/pressreleases') ?>">Press Releases</a></div>
        </div>
        <!--Image hover -->
    <div class="whitepaper_outer">
    	
        <div class="boxgrid captionfull">
				<img src="<?php echo Yii::app()->baseUrl; ?>/images/jareck.jpg"/>
				<div class="cover boxcaption">
                                    <a  <?php if(!Yii::app()->user->isGuest){ ?> href="javascript:;" onclick="webui_form.submit();" <?php }else{ ?> href="<?php echo Yii::app()->createUrl('site/login'); ?>"<?php } ?>><h2>Web UI EMULATOR</h2>
					New way to get familiar with <br />
Web UI</a>
				</div>		
			</div>
    <div class="boxgrid captionfull">
				<img src="<?php echo Yii::app()->baseUrl; ?>/images/video.jpg"/>
				<div class="cover boxcaption">
					<a href="http://partner.eip.tw/resource_video.asp"><h2>Video Center</h2>
                                        Click Here to View</a>
				</div>		
			</div>	
    
    
    <div class="boxgrid captionfull">
				<img width="215" src="<?php echo Yii::app()->baseUrl; ?>/images/bandwidthcalc.png"/>
				<div class="cover boxcaption">
                                    <a onclick="bac_form.submit(); return false;" href="#"><h2>Bandwidth and capacity calculator</h2>
					A handy RF tool to simulate<br />
 WLAN deployment</a>
				</div>		
			</div>
			
			   <div class="boxgrid captionfull">
				<img width="215" src="<?php echo Yii::app()->baseUrl; ?>/images/dlinkIcon.png"/>
				<div class="cover boxcaption">
					<a href="<?php echo Yii::app()->createUrl('site/toolsMenuDetails') ?>"><h2>Dlink Tools</h2>
                                        Click Here to View</a>
				</div>			
			</div>
            
            
    </div>  
      </div>