<?php
$baseUrl = Yii::app()->getBaseUrl(true);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>News Letter</title>
    </head>
    <body style="padding:0px; margin:0px">
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><table width="100%" border="0" cellspacing="5" cellpadding="5">
                                    <tr>
                                        <td align="left" valign="middle"><img src="<?php echo $baseUrl; ?>/nlimages//logo.jpg"/></td>
                                        <td align="right" valign="top"><span style="font-family:arial; color:#f1840e; font-size:16px;"><?php echo date("F j, Y"); ?></span><br />
                                            <span style="font-family:arial; color:#006196; font-size:12px;">Visit: <a href="http://www.dlinkmea.com/partner/"  style="color:#006196; text-decoration:underline">www.dlinkmea.com/partner</a></span></td>
                                    </tr>
                                </table></td>
                        </tr>
                        <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="55%" bgcolor="#006196" >&nbsp;</td>
                                        <td width="55%" align="right" valign="middle" bgcolor="#38a642" style="font-family:arial; color:#fff; font-size:16px; padding:10px " >
                                            <a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/viewprofile" style="color:#fff; text-decoration:underline">My Account</a>&nbsp;&nbsp;&nbsp;
                                            <a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/page/55/academy_overview" style="color:#fff; text-decoration:underline">Academy</a>&nbsp;&nbsp;&nbsp;
                                            <a href="#" style="color:#fff; text-decoration:underline">Press release</a></td>
                                    </tr>
                                </table></td>
                        </tr>
                    </table></td>
            </tr>
            <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="50%">
                                <table width="96%" border="0" cellspacing="5" cellpadding="5">
                                    <tr>
                                        <?php
                                        $i = 0;
                                        foreach ($model as $eachModel):
                                            ?>
                                            <td width="50%" style="font-family:arial; color:#474747; font-size:12px; border-right:2px solid #c7dce8; padding: 0 10px;">
                                                <h1 style="font-size:16px; font-weight:bold; color:#006196; padding:5px 0px; vertical-align:top;">
                                                    <?php echo strlen($eachModel->title_of_the_paper)>20?substr($eachModel->title_of_the_paper, 0,20).'..':$eachModel->title_of_the_paper; ?></h1>
                                                <a href="http://dlinkmea.com/partner/media/paper/<?php echo $eachModel->filename; ?>">
                                                    <img src="<?php echo $baseUrl; ?>/nlimages//product-img_03.jpg" width="219" height="142" />
                                                </a>
                                                <br />
                                                <span><?php echo substr(trim(strip_tags($eachModel->content)), 0, 300); ?>..</span><br />
                                                <br />
                                                <h3 style="color:#006196; text-align:right; font-size:12px;"><a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/casestudy" style="color:#006196; text-decoration:underline">Read more</a></h3>
                                            </td>
                                            <?php
                                            $i++;
                                            if ($i % 2 == 0)
                                                echo '</tr><tr>';

                                        endforeach;
                                        ?>
                                    </tr>
                                </table>
                            </td>
                            <td width="50%" align="left" valign="top" style="background-color:#e2f0f9; border-left:1px solid #c7dce8; font-family:arial; font-size:12px; line-height:20px; color:#474747"> <table width="100%" border="0" cellspacing="5" cellpadding="5" >
                                    <tr>
                                        <td ><h1 style="font-size:16px; font-family:arial; font-weight:bold; color:#38a642; padding:5px 0px;">New Products</h1>
                                            <ul style="font-size:12px; list-style:url(<?php echo $baseUrl; ?>/nlimages//list_03.png); padding-left:20px; margin:0px;">
                                                <?php foreach ($newProducts as $eachProduct) : ?>
                                                    <li> <a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/productdetails/<?php echo $eachProduct->id; ?>" style="color:#474747; text-decoration:underline"><?php echo $eachProduct->product_name; ?></a></li>
                                                <?php endforeach; ?>                                                
                                            </ul>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td ><h1 style="font-size:16px; font-family:arial; font-weight:bold; color:#38a642; padding:5px 0px;">Resource Links</h1>
                                            <!--<ul style="font-size:12px; list-style:url(<?php echo $baseUrl; ?>/nlimages//list_03.png); padding-left:20px; margin:0px;">
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/DownloadableResources/1/user_manual">User Manual</a></li>
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/DownloadableResources/2/firmware">Firmware</a></li>
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/index.php/site/DownloadableResources/6/installation_guide">Installation Guide</a></li>
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/DownloadableResources/7/datasheet">Data sheet</a></li>
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/video_center">Video Center</a></li>              
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/download_center">Download Center</a></li>              
                                                <li><a style="color:#474747; text-decoration:underline" href="<?php echo $baseUrl; ?>/site/casestudy">Case Studies</a></li>
                                            </ul>-->
                                            lorem ipsum type your text here
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td bgcolor="#006196"><table width="100%" border="0" cellspacing="0" cellpadding="5" style="font-family:arial; font-size:11px; line-height:20px; color:#fff">
                        <tr>
                            <td align="left" valign="middle">
                                <a href="<?php echo $baseUrl; ?>" style="color:#fff; text-decoration:underline">Product Tools</a> |
                                <a href="<?php echo $baseUrl; ?>/site/contact" style="color:#fff; text-decoration:underline">Contact Us</a></td>
                            <td align="center" valign="middle"><!--<a href="mailto:some@one.name?subject=New+email&body=Blahblah"><img src="<?php //echo $baseUrl; ?>/nlimages//forward_07.jpg" width="164" height="31" /></a>--></td>
                            <td align="right" valign="middle">Copyright &copy; <?php echo date('Y'); ?> D-Link Middle East &amp; Africa</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>