Example #1
0
    /**
     * This function is used to Display the User Wishlist
     * @param mixed $arr
     * @param int $paging
     * @param int $prev
     * @param int $next	
     * @param int $val
     * @param mixed $result
     * @return string
     */
    function showDigitalProduct($arr, $paging, $prev, $next, $val, $result)
    {
        $output .= $result . '<div class="title_fnt">
		<h1>' . Core_CLanguage::_('MY_DOWNLOADS') . '</h1>
		</div>
		<div id="myaccount_div">
		
		<table class="rt cf" id="rt1">
			<thead class="cf">
				<tr>
					
					<th>' . Core_CLanguage::_('ORDER') . '</th>
					<th>' . Core_CLanguage::_('PRODUCT') . ' </th>
					<th>' . Core_CLanguage::_('ORDER_DATE') . '</th>
					<th>' . Core_CLanguage::_('EXPIRE_DATE') . '</th>
					<th>' . Core_CLanguage::_('DOWNLOAD') . '</th>	
				</tr>
			</thead>
			<tbody>';
        if (count($arr) > 0) {
            for ($i = 0; $i < count($arr); $i++) {
                if (file_exists($arr[$i]['image'])) {
                    $img = $arr[$i]['image'];
                } else {
                    $img = "'" . $_SESSION['base_url'] . "/index.phpimages/noimage.jpg";
                }
                $output .= '<tr>
					
					<td>#' . $arr[$i]['orders_id'] . '</td><td><a href="?do=prodetail&action=showprod&prodid=' . $arr[$i]['product_id'] . '">' . $arr[$i]['title'] . '</a></td>
					<td>' . $arr[$i]['pdate'] . '</td>';
                if (Display_DUserAccount::dateDiff("/", date("j/n/Y"), $arr[$i]['expdate']) > 0) {
                    $output .= '<td bgcolor="#FFFFFF" >Download Expired</td>';
                } else {
                    $output .= '<td bgcolor="#FFFFFF" >' . $arr[$i]['expdate'] . '</td>';
                }
                $output .= '<td><a class="btn btn-mini" href="?do=prodown&rid=' . $arr[$i]['orders_id'] . '&pid=' . $arr[$i]['product_id'] . '">Download</a></td></tr>';
            }
        } else {
            $output .= '<tr><td colspan="6"><div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				<strong>' . Core_CLanguage::_('NO_PRODUCT_FOUND') . '</strong> 
				</div></td></tr>';
        }
        $output .= '</tbody>
					</table>
					</div>';
        $_SESSION['wishList'] = $output;
        return $output;
    }