<?php
$baseUrl	=	Yii::app()->getBaseUrl(true); 
?>
<center>
<table align="center" border="0" cellpadding="5" cellspacing="0" id="container" style="font-family:Arial; font-size:12px; color:#333;backgroud-color:#e6e6e6; background:url(<?php echo $baseUrl; ?>/media/newsletter/images/news-letter.-bg_01.jpg) no-repeat right top" width="90%">
	<tbody>
		<tr>
			<td bgcolor="#dcdcdc">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tbody>
					<tr>
						<td align="left" valign="top" width="51%">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td style="padding-top:50px; padding-left:40px;"><img height="73" src="<?php echo $baseUrl; ?>/images/mail_logo.png" width="251" /></td>
								</tr>
								<tr>
									<td style="padding-top:50px; padding-left:40px;"><span style="font-family:Arial;font-size:18px; color:#2693cd"><?php echo date("F j, Y");  ?></span><br />
									<span style="font-family:Arial;font-size:25px; color:#016193; font-weight:bolder;">Newsletter</span></td>
								</tr>
							</tbody>
						</table>
						</td>
						<td align="right" style="padding-top:20px; padding-right:100px;" valign="top" width="49%"><img height="194" src="<?php echo $baseUrl; ?>/media/newsletter/images/1.png" width="252" /></td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
		<tr>
			<td align="left" bgcolor="#FFFFFF" style="padding:20px 20px; " valign="top">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tbody>
					<tr>
						<td align="left" valign="top" width="24%">
						<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom:20px;" width="200">
							<tbody>
								<tr>
									<td style="border:1px solid #999; padding:10px; border-radius:5px; margin-bottom:20px 0px">
									<h1 style="font-family:Arial;font-size:20px; font-weight:bold; ">My Account</h1>
									
                                    <a style="font-family:Arial;color:#666; text-decoration:none" href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/viewprofile">View Profile</a><br />
          <a style="font-family:Arial;color:#666; text-decoration:none" href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/editprofile">Edit Profile</a><br />
          <a style="font-family:Arial;color:#666; text-decoration:none"  href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/changepassword">Change Password</a><br />
          <a style="font-family:Arial;color:#666; text-decoration:none"  href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/pointstable">Points Table</a><br />
          <a style="font-family:Arial;color:#666; text-decoration:none"  href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/mywallet">My Wallet</a><br />
          <a style="font-family:Arial;color:#666; text-decoration:none"  href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/redeempoints">Redeem Point</a>
                                    </td>
								</tr>
							</tbody>
						</table>

						<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom:20px;" width="200">
							<tbody>
								<tr>
									<td style="border:1px solid #999; padding:10px; border-radius:5px; margin-bottom:20px 0px">
									<h1 style="font-family:Arial;font-size:20px; font-weight:bold; ">New Products</h1><?php foreach($newProducts as $eachProduct) : ?>
          <a style="font-family:Arial;color:#666; text-decoration:none" href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/productdetails/<?php echo $eachProduct->id; ?>"><?php echo $eachProduct->product_name; ?> </a><br />
          <?php endforeach; ?>
                                    </td>
								</tr>
							</tbody>
						</table>
						</td>
						<td align="left" style="padding:0px 25px" valign="top" width="76%">
                        <?php foreach ($model as $eachModel): ?>
						<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom:20px" width="100%">
							<tbody>
								<tr>
									<td bgcolor="#016193" style="padding:10px; margin-bottom:20px">
									<table border="0" cellpadding="10" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td bgcolor="#FFFFFF">
												<h1 style="font-family:Arial;font-size:20px; font-weight:bold; "><?php echo $eachModel->title_of_the_paper; ?></h1><?php echo substr($eachModel->content,0,300); ?>..<br />
												<br />
												<a href="<?php echo Yii::app()->getBaseUrl(true); ?>/site/casestudy"><img height="35" src="<?php echo $baseUrl; ?>/media/newsletter/images/readmore_14.jpg" width="104" /></a></td>
												<td align="left" bgcolor="#FFFFFF" valign="top"><img height="156" src="<?php echo $baseUrl; ?>/media/newsletter/images/news-img_11.jpg" width="220" /></td>
											</tr>
										</tbody>
									</table>
									</td>
								</tr>
							</tbody>
						</table>
                        <?php endforeach; ?>
						</td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
		<tr>
			<td align="center" bgcolor="#cccccc" valign="middle">Copyright &copy; <?php echo date('Y'); ?> D-Link Corporation/ D-Link Middle East &amp; Africa</td>
		</tr>
	</tbody>
</table>
</center>