<?php include_once $BL->props->get_page("templates/alp_admin/html/header.php"); ?>
<div id="content">
    <div id="display_list">
      <div class="tabs2" name='tt1' id='tt1' onmouseover="javascript:this.className='tabs1';" onmouseout="javascript:this.className='tabs2';" ><?php echo $BL->props->lang['~specials']; ?></div>
      <div class="tab_separator">&nbsp;</div>
      <div class="tabs" name='tt2' id='tt2' onmouseover="javascript:this.className='tabs1';" onmouseout="javascript:this.className='tabs';" ><a href="admin.php?cmd=add_special" class="add_link"><?php echo $BL->props->lang['Add_Special']; ?></a></div>
      <div class="tab_separator">&nbsp;</div>
    </div>
	<div id="display_list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table">
					<tr> 
                      <td colspan="4" class="tdheading">
					  <b>&nbsp;</b>
					  </td>
                    </tr>
					<tr> 
                      <td colspan="4" class="text_grey">
					  <img src="elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>spacer.gif" alt="" width="100%" height="1" />
					  </td>
                    </tr>
		          <?php if (!count($specials)) { ?>
    				<tr>
    					<td class="text_grey" colspan="4">
                        	<div align='center'>
                        	<?php echo $BL->props->lang['No_specials']; ?>
                        	</div>
    					</td>
    				</tr>
		          <?php } else { ?>														
                    <tr> 
					  <td class="text_grey" width="10%"><b>&nbsp;<?php echo $BL->props->lang['Nu']; ?></b></td>
                      <td class="text_grey"><b><?php echo $BL->props->lang['Name']; ?></b></td>
                      <td class="text_grey"><b><?php echo $BL->props->lang['Status']; ?></b></td>
                      <td class="text_grey" width="10%"><div align="left"><b></b></div></td>
                    </tr>
                    <script language="JavaScript" type="text/javascript">
                    function changeTaxStatus(special_id,special_active){
                        <?php $url = "'admin.php?cmd=".$cmd."&action=changestatus&special_id='+special_id"; ?>
                        var url = <?php echo $url; ?>;
                            url = url+"&special_active="+special_active
                            eval("parent.location='"+url+"'");
                    }
                    </script>
                     <form method="POST" name='form1' id='form1' action="<?php echo $PHP_SELF; ?>">
                    <?php foreach ($specials as $temp) { ?>
					<tr>
                      <td colspan='4' class='text_grey'>
					  <img src="elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>menu_line_lightgreen-long.jpg" width="100%" height="1"></td>
                    </tr>					
					<tr>
					  <td class='text_grey'><div align='left'>&nbsp;<?php echo $temp['special_id']; ?></div></td>
		  			  <td class='text_grey'><div align='left'><?php echo $temp['special_name']; ?></div></td>
                      <td class='text_grey'><div align='left'>
						<select name='special_active' class='search' id='special_active' onchange="javascript:changeTaxStatus(<?php echo $temp['special_id']; ?>,this.options[this.selectedIndex].value);">
							<option value='0' <?php if($temp['special_active']==0)echo "selected=\"selected\""; ?>><?php echo $BL->props->lang['inactive']; ?></option>
							<option value='1' <?php if($temp['special_active']==1)echo "selected=\"selected\""; ?>><?php echo$BL->props->lang['active']; ?></option>
						</select> 					  
					  </div></td>
                      <td class='text_grey'><div align='right'>
				      <?php if($BL->getCmd("edit_special")){ ?> 
                      <a href='<?php echo $PHP_SELF; ?>?cmd=edit_special&special_id=<?php echo $temp['special_id']; ?>'><img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>edit_all.gif' alt='<?php echo $BL->props->lang['Edit']; ?>' border='0'></a>
                      &nbsp;
                      <?php } ?>
                      <?php if($BL->getCmd("del_special")){ ?> 
                      <a href="javascript:if(confirm('<?php echo $BL->props->lang['Do_you_want_to_delete_this_special']; ?>'))document.location='<?php echo $PHP_SELF; ?>?cmd=del_special&special_id=<?php echo $temp['special_id']; ?>'"><img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>delete.gif' alt='<?php echo $BL->props->lang['Delete']."?"; ?>' border='0'></a>
                      &nbsp;
                      <?php } ?>                       
						</div>
                      </td>
                    </tr>
                    <?php } ?>   
                    </form> 
                    <?php } ?>   
					<tr> 
                      <td colspan="4" class="text_grey"><img src="elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>spacer.gif" alt="" width="100%" height="1" /></td>
                    </tr>	
                  </table>
				  <br />
					<table width="100%" border="0" cellspacing="2" cellpadding="2" class="list_table">				
					<tr> 
                      <td class="text_grey" align="center">
					  <img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>edit_all.gif'> <?php echo $BL->props->lang['Edit']; ?>
					  &nbsp;
					  <img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>delete.gif'> <?php echo $BL->props->lang['Delete']; ?>
					  </td>
                    </tr>
					</table>					  
	</div>
</div>
<!--end content -->
<div id="navBar">
<?php include_once $BL->props->get_page("templates/alp_admin/html/_sidepanel.php"); ?>
</div>
<!--end navbar -->
<?php include_once $BL->props->get_page("templates/alp_admin/html/footer.php"); ?>