{if $qsearchon}
{include file="$gentemplates/_header.tpl" js="onLoad=document.f1.searchterm.focus()" pagetitle="$contentheader"}
{else}
{include file="$gentemplates/_header.tpl" pagetitle="$contentheader"}
{/if}
{include file="$gentemplates/_navi.tpl" pagetitle="$contentheader"}

<script type="text/javascript" src="{$rooturl}modules/contact/templates/{$theme}/js/overdiv_style.js"></script>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr class="formhead">
    <td class="subnav" colspan="3">&nbsp;&nbsp;
      {if $hascreaterights}
      <a href="index.php?mod=contact&amp;obj=person&amp;view=newform&amp;{$SESSION}">{$new}</a>&nbsp;
      {/if}
    </td>
  </tr>
  <tr><td class="lines2" height="2" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2"></td></tr>
<tr>
<td colspan="2">
<form name="f1" action="index.php" method="POST">
<input type="hidden" name="op" value="qsearch">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">
<input type="hidden" name="mod" value="contact">
<input type="hidden" name="obj" value="person">

<table border="0" align="right">
  <tr>
    <td rowspan="2" valign="top">{$at|smarty:nodefaults}</td>
    <td class="stand" align="right">
      {if $qsearchon}
      &nbsp; {$quicksearch}:</td>
      <td align="right"> <input type="text" size="20" name="searchterm">
<!--      &nbsp;<input type="submit" value="{$hashmap.search}" name="search" class="submit"> -->
      {else}
      &nbsp;</td><td>&nbsp;
      {/if}
      </td>
  </tr>
  <tr>
    <td class="stand" align="right">&nbsp; {$group}:</td>
    <td align="right">
      <select size="1" name="_group">
	<option value="*">{$hashmap.all}</option>
	  {html_options options=$groups selected=$actgroup}
      </select>
      <br><input type="submit" value="{$hashmap.search}" name="search" class="submit">
    </td>
  </tr>
</td>
  </tr>
</table>
</form>
</table>

<form name="f2" action="index.php" method="POST" onsubmit="return confirm('{$hashmap.massupdateconfirm}');">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">
<input type="hidden" name="mod" value="contact">
<input type="hidden" name="obj" value="person">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="contenttable">
  <tr>
    <th></th>
    <th>
      <a href="{$columns[0].url}&amp;{$SESSION}">{$hashmap.private}</a>
    </th>
    {if $namedisplay eq 'lastfirst'}
    <th>
      <a href="{$columns[1].url}&amp;{$SESSION}">{$hashmap.lastname}</a>
    </th>
    <th>
      <a href="{$columns[2].url}&amp;{$SESSION}">{$hashmap.firstname}</a>
    </th>
    {else}
    <th>
      <a href="{$columns[2].url}&amp;{$SESSION}">{$hashmap.firstname}</a>
    </th>
    <th>
      <a href="{$columns[1].url}&amp;{$SESSION}">{$hashmap.lastname}</a>
    </th>
    {/if}
    <th>
      <a href="{$columns[3].url}&amp;{$SESSION}">{$hashmap.phone_company}</a>
    </th>
    <th>
      <a href="{$columns[4].url}&amp;{$SESSION}">{$hashmap.email}</a>
    </th>
    <th>
      <a href="#">{$hashmap.occupation}</a>
    </th>
    <th>
      <a href="{$columns[5].url}&amp;{$SESSION}">{$hashmap.company}</a>
    </th>
  </tr>

{section name=row loop=$td}
<script type="text/javascript">
function pop{$td[row].id}(){literal}{{/literal}
  {if $namedisplay eq 'lastfirst'}
  return overlib('<table width=\'100%\' cellspacing=\'0\' cellpadding=\'3\' border=\'0\'><tr><td>{$td[row].action|smarty:nodefaults}</td></tr></table>', STICKY, CAPTION, '{$td[row].lastname|escape}, {$td[row].firstname|escape}')
  {else}
  return overlib('<table width=\'100%\' cellspacing=\'0\' cellpadding=\'3\' border=\'0\'><tr><td>{$td[row].action|smarty:nodefaults}</td></tr></table>', STICKY, CAPTION, '{$td[row].firstname|escape} {$td[row].lastname|escape}')
  {/if}
{literal}}{/literal}
  </script>
  <tr class="normal" onmouseover="this.className='hilite';" onmouseout="this.className='normal';nd();">
    <td><input type="checkbox" name="cids[]" value="{$td[row].id}" /></td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].pimg|smarty:nodefaults}</td>
    {if $namedisplay eq 'lastfirst'}
    <td onmouseover="return pop{$td[row].id}();">{$td[row].lastname}</a></td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].firstname}</td>
    {else}
    <td onmouseover="return pop{$td[row].id}();">{$td[row].firstname}</td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].lastname}</a></td>
    {/if}
    <td onmouseover="return pop{$td[row].id}();">{$td[row].tel_company}</td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].email}</td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].function}</td>
    <td onmouseover="return pop{$td[row].id}();">{$td[row].company}</td>
  </tr>
{/section}
</table>

<table width="50%">
  <tr>
    <td align="right" class="stand">
      {if $_prev} <a href="index.php?mod=contact&amp;obj=person&amp;view=list&amp;compid={$compid}&amp;searchterm={$searchterm}&amp;list={$list}&amp;npage={$ppage}&amp;{$SESSION}">{$prevsym|smarty:nodefaults}</a>{/if}
      {if $_next}&nbsp;&nbsp;&nbsp;<a href="index.php?mod=contact&amp;obj=person&amp;view=list&amp;compid={$compid}&amp;searchterm={$searchterm}&amp;list={$list}&amp;npage={$npage}&amp;{$SESSION}">{$nextsym|smarty:nodefaults}</a>{/if}
    </td>
  </tr>
</table>

{$hashmap.withselected}<br />
<table>
  <tr>
    <td>
      <select size="1" name="action">
	<option value="0">-- {$hashmap.action} --</option>
	<option value="delete">{$hashmap.delete}</option>
	<option value="private">{$hashmap.private}</option>
	<option value="public">{$hashmap.public}</option>
      </select>
    </td>
    <td>
      <select size="1" name="group">
	<option value="0">-- {$hashmap.group} --</option>
	  {html_options options=$groups}
      </select>
    </td>
    </td>
    <td>
      <input type="submit" name="massupdate" value="{$hashmap.ok}!" />
    </td>
  </tr>
</table>
</form>

{include file="$gentemplates/_footer.tpl" aktUser=$username}
