<?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 align="left" bgcolor="#006196" style="font-family:arial; color:#fff; font-size:16px; padding:10px " valign="middle" width="55%">
                                            <a href="#" style="color:#006196;">www.dlinkmea.com/partner</a></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">
                        <?php
                        $i = 0;
                        foreach ($model as $eachModel):
                            ?>
                            <tr style="border-bottom:2px solid #c7dce8; padding-bottom:10px" >
                                <td style="border-bottom:2px solid #c7dce8; padding:15px 0 10px; vertical-align:top"><a href="http://dlinkmea.com/partner/media/paper/<?php echo $eachModel->filename; ?>"><img height="142" src="<?php echo $baseUrl; ?>/nlimages//product-img_03.jpg" width="219" /> </a></td>
                                <td style="font-family:arial; color:#474747; font-size:12px; padding: 0 10px 10px; vertical-align:top; border-bottom:2px solid #c7dce8; line-height:20px;">
                                    <h1 style="font-size:16px; font-weight:bold; color:#006196; padding:15px 0px 0; margin:0; vertical-align:top; font-family:arial;"><?php echo strlen($eachModel->title_of_the_paper) > 20 ? substr($eachModel->title_of_the_paper, 0, 20) . '..' : $eachModel->title_of_the_paper; ?></h1>

                                    <p><?php echo substr(trim(strip_tags($eachModel->content)), 0, 300); ?>..</p>


                                    <a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/casestudy" style="color:#006196; text-decoration:none">Read more</a>
                                </td>
                            </tr> 
                            <?php
                            $i++;
                            if ($i % 2 == 0)
                                echo '</tr><tr>';

                        endforeach;
                        ?>

                    </table>




                    <table width="100%" border="0" cellspacing="0" cellpadding="0">

                        <tr  >
                            <td style="background-color:#e2f0f9; font-family:arial; font-size:12px; line-height:20px; color:#474747; padding:10px 25px; vertical-align:top;" width="50%">
                                <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 style="font-family:arial; color:#474747; font-size:12px;"><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>
                            <td style="background-color:#e2f0f9; border-left:1px solid #c7dce8; font-family:arial; font-size:12px; line-height:20px; color:#474747; padding:10px 25px; vertical-align:top;">
                                <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(http://dlinkmea.com/partner/nlimages//list_03.png); padding-left:20px; margin:0px;">
                                    <li style="font-family:arial; color:#474747; font-size:12px;"><a href="http://dlinkmea.com/partner/index.php/site/casestudy" style="color:#474747; text-decoration:underline">Case Studies</a></li>
                                    <li style="font-family:arial; color:#474747; font-size:12px;"><a href="http://dlinkmea.com/partner/index.php/site/video_center" style="color:#474747; text-decoration:underline">Video Center</a></li>


                                </ul>
                            </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>