<?php

/*

  osCommRes, Services Online
  http://www.oscommres.com

  Copyright (c) 2005 osCommRes

  Released under the GNU General Public License
  
  Freeway eCommerce from ZacWare
http://www.zac-ware.com/freeway

Copyright 2007 ZacWare Pty. Ltd
*/
// Set flag that this is a parent file
	define( '_FEXEC', 1 );
require('includes/application_top.php');?>
<html>
<head>
<title>Valid Events List</title>
<style type="text/css">
<!--
h4 {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; text-align: center}
p {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
th {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
td {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
-->
</style>
<head>
<body>
<table width="550" border="1" cellspacing="1" bordercolor="gray">
<tr>
<td colspan="3">
<h4>Valid Subscription List</h4>
</td>
</tr>
<?
   $coupon_get=tep_db_query("select restrict_to_service from " . TABLE_COUPONS . "  where coupon_id='".$HTTP_GET_VARS['cid']."'");
   $get_result=tep_db_fetch_array($coupon_get);

    echo "<tr><th>Service ID</th><th>ServiceName</th></tr><tr>";
    $pr_ids = split("[,]", $get_result['restrict_to_service']);
    for ($i = 0; $i < count($pr_ids); $i++) {
	$result= mysql_query("select * from services s ,services_description sd where s.service_id=sd.service_id and language_id = '" . $languages_id . "' order by sd.service_name");
      if ($row = mysql_fetch_array($result)) {
            echo "<td align='center'>".$row["service_id"]."</td>\n";
            echo "<td align='center'>".$row["service_name"]."</td>\n";
            echo "</tr>\n";
      }
    }
      echo "</table>\n";
?>
<br>
<table width="550" border="0" cellspacing="1">
<tr>
<td align=middle><input type="button" value="Close Window" onClick="window.close()"></td>
</tr></table>
</body>
</html>

