Location: PHPKode > projects > StreamOnTheFly > node/code/templates/editContact.htm
<h3>{#edit_contact#}</h3>

<table class="tab">
  <tr> 
    <td nowrap class="tab">{#general_data#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
<table>
<tr><td>
	<form method="post">
            <input type="hidden" name="id" value="{$CONTACT_ID}">
	<table>
		<tr valign="top">
			<td>{#name#}:</td>
			<td>{$CONTACT_DATA.name}</td>
		</tr>
		<tr valign="top">
			<td>{#alias#}:</td>
			<td><input size="50" maxlength="100" name="alias" value="{$CONTACT_DATA.alias}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#acronym#}:</td>
			<td><input size="30" maxlength="30" name="acronym" value="{$CONTACT_DATA.acronym}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#intro#}:</td>
			<td><textarea cols="50" rows="10" name="intro" onChange="if(value != defaultValue) data_changed++;" >{$CONTACT_DATA.intro}</textarea></td>
		</tr>
		<tr valign="top">
			<td>{#email#}:</td>
			<td><input size="50" maxlength="100" name="email" value="{$CONTACT_DATA.email}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#address#}:</td>
			<td><input size="50" maxlength="255" name="address" value="{$CONTACT_DATA.address}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#phone#}:</td>
			<td><input size="50" maxlength="50" name="phone" value="{$CONTACT_DATA.phone}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#cellphone#}:</td>
			<td><input size="50" maxlength="50" name="cellphone" value="{$CONTACT_DATA.cellphone}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#fax#}:</td>
			<td><input size="50" maxlength="50" name="fax" value="{$CONTACT_DATA.fax}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
		<tr valign="top">
			<td>{#url#}:</td>
			<td><input size="50" maxlength="255" name="url" value="{$CONTACT_DATA.url|default:"http://"}" onChange="if(value != defaultValue) data_changed++;" ></td>
		</tr>
	</table>
	<input type="submit" name="save" value="{#save#}">
	<input type="submit" name="finish1" value="{#finish#}">
  {if hasPerm($CONTACT_ID,'delete')}
              &nbsp;&nbsp;&nbsp;&nbsp;<input class="action" type="button" name="b1" value="{#delete_contact#}" onClick="if(deleteConfirm('{#delete_contact_confirm#}'))redir(this.form, 'editContact.php?id={$CONTACT_ID}&delete=1')" />
  {/if}
	</form>
</td></tr>
</table>

</td></tr>
</table>

<p></p>

{if hasPerm($CONTACT_DATA, 'authorize') }
<a name="perms"></a>
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#access_permissions#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
        {if $PERMISSIONS}
        <form>
        <table>
          <tr class="listhead"><th>{#username#}</th><th>{#permissions#}</th><th>{#actions#}</th></tr>
          {cycle name="perms" values="list1,list2" print=false advance=false}
          {foreach item=user key=userid from=$PERMISSIONS}
          <tr class="{cycle name=perms}">
            <td>{$user.name}</td>
            <td>
              {section name=i loop=$user.permissions}
              {$user.permissions[i]}{if ! $smarty.section.i.last}, {/if}
              {/section}
            </td>
            <td nowrap>
                {if $USERNAME ne $user.name}
                <input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editPermissions.php?context=contact&objectid={$CONTACT_ID}&objectname={$CONTACT_DATA.name|escape}&userid={$userid}','Permissions',350,400,false)" />
                  <input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'editContact.php?delperm=1&userid={$userid}&id={$CONTACT_ID}')" />
                {/if}
            </td>
          </tr>
          {/foreach}
          <tr class="{cycle name=perms}">
            <td colspan="3">{#inherited_perms#}</td>
          </tr>
        </table>
        </form>
        {else}
        <p>{#inherited_perms#}</p>
        {/if}
        <input type="button" name="addperm" value="{#change_perm#}" onClick="popup('editPermissions.php?context=contact&objectid={$CONTACT_ID}&objectname={$CONTACT_DATA.name|escape}','Permissions',450,450, false)">
      </td>
    </tr>
</table>
{/if}

<p></p>

<a name="icon"></a>

<table class="tab">
  <tr> 
    <td nowrap class="tab">{#icon#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea">

	{if $ICON}
		<img align="left" src="{$CACHE_URL}/{$CONTACT_ID}.png" border="1">
	{else}
		<table><tr><td>{#no_icon#}</td></tr></table>
	{/if}

	{if $USERFILES}
	<form method="post" name="userfiles">
{literal}<script language="javascript">
function getSelected() {
     return document.userfiles['filename'].options[document.userfiles['filename'].selectedIndex].value;
}
</script>{/literal}

	<input type="hidden" name="id" value="{$CONTACT_ID}">
	<p>{#userfiles#}:	<select name="filename">{html_options values=$USERFILES output=$USERFILES}</select>
	<input type="button" name="view" value="{#view#}" onClick="var file=getSelected(); popup('getUserFile.php/'+escape(file)+'?filename='+escape(file),'UserFile',400,400,false)">
	<input type="submit" name="seticon" value="{#set_icon#}" onClick="return confirmUnsaved()" >
<br \><small>{#userfiles_expl#}</small>
	</form>
	{else}
	<p>{#no_files#}</p>
	{/if}
  <small>
          <form enctype="multipart/form-data" method="post">
            <input type="hidden" name="MAX_FILE_SIZE" value="15000000" />
            <input name="userfile" type="file" />
            <input type="submit" name="uploadicon" value="{#set_icon#}" onClick="return checkIfEmpty(this.form.userfile,'{#select_file#}') && confirmUnsaved()"  />
            <br />{#upload_expl#}
          </form>
  </small>
<!--
  <form method="post">
      <input type="hidden" name="id" value="{$CONTACT_ID}">
      <input type="submit" name="finish2" value="{#finish#}">
  </form>
-->


</td></tr>
</table>
Return current item: StreamOnTheFly