{include file="$gentemplates/_header.tpl"}

<script type="text/javascript">
var err_no_participant = "{$temp_err_no_participant}";

{literal}

function check_form(){
if ( 1 
{/literal}
{section name=part loop=$partie}
{if $partie[part].can_be_deleted}
&& document.forms['delete'].elements['del_{$partie[part].id}'].checked == false
{/if}
{/section}
{literal}
	){ 
 alert(err_no_participant);
 return false;
 }
 else return true;
}

function select_all_part(value){
{/literal}
{section name=partsel loop=$partie}
{if $partie[partsel].can_be_deleted}
document.forms['delete'].elements['del_{$partie[partsel].id}'].checked = value;
{/if}
{/section}
{literal}
}
</script>
{/literal}

<form name="delete" action="{$phpself}" method="post">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">	
<input type="hidden" name="date" value="{$date}">			
<input type="hidden" name="id" value="{$id}">			

{include file="$gentemplates/_navi.tpl"}

{include file="$gentemplates/_contentheader.tpl" title="$temp_appdelete"}

<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr><td class="lines2" height="2" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	<tr align="left">
		<td class="category" height="20"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="category">{$temp_commonsettings}</td>
		<td class="category" width="70%">&nbsp;</td>
	</tr>

	{* time *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_time}</td>
		<td class="formhead">{$appointment_day}, {if $scheduling.id==0} {$from} - {$to} {else} {$scheduling.type} ({$from} - {$to}){/if}</td>
	</tr>
	
	{* type *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_appt_type}</td>
		<td class="formhead"><FONT STYLE="background-color:{$appt_type.color};">{$appt_type.text}</FONT></td>
	</tr>
	
	
	{* place *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_loc}</td>
		<td class="formhead"><u>{$location_type}</u>{if $location} :&nbsp; {$location} {/if}</td>
	</tr>
  
	{* private *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_private}</td>
		<td class="formhead">{if $private.id==0}{$private.text}{else}<FONT color="red">{$private.text}</FONT>{/if}</td>
	</tr>
	
	{* availability *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_availability}</td>
		<td class="formhead">{$availability}{if $telephone != ""}&nbsp;au&nbsp;{$telephone}{/if}</td>
	</tr>
	
	{* subject *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr align="left">
		<td class="category" height="20"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="category">{$temp_subject}</td>
		<td class="category" width="70%">&nbsp;</td>
	</tr>
	
	{* subject summarized*}		
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_subject_summarized}</td>
		<td class="formhead">{$subject_summ|smarty:nodefaults}</td>
	</tr>
	
	{* subject detailed*}		
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_subject_detailed}</td>
		<td class="tab">{$subject|smarty:nodefaults}</td>
	</tr>
	
	
	
<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
		<tr align="left">
			<td class="category" height="2" width="100%" COLSPAN="3"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		</tr>
		
		{* creator (inituser) *}
		<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
		<tr class="tab" align="left">
			<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
			<td class="formhead">{$temp_inituser}</td>
			<td class="formhead">{$inituser}</td>
		</tr>

		{* parties *}
		<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
		<tr class="tab" align="left">
			<td class="tab" height="35"><img src="{$imgpathmaster}/space.gif" alt="" width="35" height="1" hspace="0" vspace="0" border="0"></td>
			<td class="tab">{$temp_parties}</td>
			<td class="tab">
				<table border="0" cellpadding="0" cellspacing="0">
				<tr align="left">
				<td WIDTH="150"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td>
				<td class="tab" WIDTH="50">{if $delete!="all"}{$temp_row_action_label_delete}{/if}</td>
				</tr>		
				{section name=pt loop=$partie}
		   		 <tr align="left">
				 <td class="tab" WIDTH="150">	{if $partie[pt].already_aborted}
				 					<I>{$partie[pt].name}</I>
				 					{else}
									{$partie[pt].name}
									{/if}
									</td>
				 <td class="tab" WIDTH="50">
				 	{if $partie[pt].can_be_deleted}
				 	<INPUT TYPE="CHECKBOX" NAME="del_{$partie[pt].id}" {$partie[pt].chk} {if $delete=="all"} style="display:none;" {/if}/>
					{else}
					<img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0">
					{/if}
				 </td>
				 </tr>
				{/section}
				</table>
			</td>
		</tr>
		<tr class="tab">
		<td class="tab" height="35"><img src="{$imgpathmaster}/space.gif" alt="" width="35" height="1" hspace="0" vspace="0" border="0"></td>
			<td class="tab"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td>
			<td class="tab">
				{if $delete!="all"}
				<a class="edit" HREF="javascript:select_all_part(true)">{$select_all}</a>
				&nbsp;/&nbsp;
				<a class="edit" HREF="javascript:select_all_part(false)">{$unselect_all}</a>
				{else}
				<img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0">
				{/if}
			</td>
		</tr>
		<!--	
		{* parties *}
		<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
		<tr align="left">
			<td class="tab" height="35"><img src="{$imgpathmaster}/space.gif" alt="" width="35" height="1" hspace="0" vspace="0" border="0"></td>
			<td class="tab">{$temp_parties}</td>
			<td class="tab">
				{section name=pt loop=$partie}
		   		 {$partie[pt].name}<br>
				{/section}
			</td>
		</tr>
		
	{if $showdelopt}
	<tr align="left">
	  <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
	  <td class="tab">&nbsp;</td>
	  <td class="tab">
	    <table border="0" cellpadding="0" cellspacing="0" >
	      <tr class="tab"><td height="10">&nbsp;</td></tr>
	      <tr class="tab"><td><input type="radio" name="tn_opt" checked value="0">{$temp_onlyminedelete}</td></tr>
	      <tr class="tab"><td><input type="radio" name="tn_opt" value="1">{$temp_allpartdelete}</td></tr>
	      <tr class="tab"><td height="10">&nbsp;</td></tr>
	    </table>
	  </td>
	</tr>
	{/if}
	-->
	
	{* ext. parties *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_extparticipants}&nbsp;</td>
		<td class="formhead">{$external}&nbsp;</td>
	</tr>

<!-- 
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead">{$temp_privatetext}</td>
		<td class="tab">{$private}&nbsp;</td>
	</tr>


	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathgeneral}/space.gif" alt="" width="1" height="1" /></td></tr>
	<tr align="left">
		<td class="category" height="20"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="category">{$temp_repititions}</td>
		<td class="category" width="70%">&nbsp;</td>
	</tr>
-->

	{* repeater *}
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="35"><img src="{$imgpathmaster}/space.gif" alt="" width="35" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="tab">{$temp_appointmentrepeat}</td>
		<td class="tab">{$repeater}</td>
	</tr>


 	<tr class="tab" align="left">
	  <td class="tab"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
	  <td class="formhead">&nbsp;</td>
	  <td class="tab">
	    {if $repeater_0 eq "no"}
	    <table border="0" cellpadding="0" cellspacing="0" >
	      <tr class="tab"><td height="10">&nbsp;</td></tr>
	      <tr class="tab"><td><input type="radio" name="rep_opt" checked value="0" id="rep_opt_0"><LABEL FOR="rep_opt_0">{$temp_onlythisappdelete}</LABEL></td></tr>
	      <tr class="tab"><td><input type="radio" name="rep_opt" value="2"  id="rep_opt_2"><LABEL FOR="rep_opt_2">{$temp_allappfromtodaydelete}</LABEL></td></tr>
	      <tr class="tab"><td><input type="radio" name="rep_opt" value="3"  id="rep_opt_3"><LABEL FOR="rep_opt_3">{$temp_allappdelete}</LABEL></td></tr>
	      <tr class="tab"><td height="10">&nbsp;</td></tr>
	    </table>
	    {else}
	    &nbsp;
	    {/if}
	  </td>
	</tr>

	<tr><td class="lines2" height="2" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr class="tab" align="left">
		<td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1" hspace="0" vspace="0" border="0"></td>
		<td class="formhead"><a class="edit" href="{$back}">{$temp_abort} </a></td>
		<td class="formhead"><input class="submit" type="submit" value="{$temp_appdelete}" name="db_delete" ONCLICK="return check_form();" ></td>
	</tr>
		
	<tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
</table>
</form>

{if $delete=="all"}
<SCRIPT language="javascript">
select_all_part(true);
</SCRIPT>
{/if}
{include file="$gentemplates/_footer.tpl" aktUser=$username}