personSearch.tpl.php 2.49 KB
<script language="javascript">
//<![CDATA[
	var names       = new Array ();

	<? foreach ($this->names as $surname => $data): ?>
		names['<?=$surname?>'] = new Array ();
		<? foreach ($data as $d): ?>
			names['<?=$surname?>'].push (
				new Array ('<?=$d[0]?>',
					new c_person (
						<?=$d[1]->get_personId ()?>,
						<?=(($val=$d[1]->get_photographerId ()) !== NULL)?$val:-1?>,
						<?=(($val=$d[1]->get_ownerId ()) !== NULL)?$val:-1?>,
						'<?=$d[1]->get_firstname ()?>',
						'<?=$d[1]->get_surname ()?>',
						'<?=$d[1]->get_company ()?>',
						'<?=$d[1]->get_email ()?>',
						'<?=$d[1]->get_url ()?>',
						<?=(($val=$d[1]->get_cameraId ()) !== NULL)?$val:-1?>,
						'<?=(($val=$d[1]->get_wmWidth ()) !== NULL)?$val:''?>',
						'<?=(($val=$d[1]->get_wmHeight ()) !== NULL)?$val:''?>',
						'<?=(($val=$d[1]->get_wmXPos ()) !== NULL)?$val:''?>',
						'<?=(($val=$d[1]->get_wmYPos ()) !== NULL)?$val:''?>')));
		<? endforeach ?>
	<? endforeach ?>

	pSearch = new c_personSearch (
		'personSearch_fname', 'personSearch_sname',
		'personSearch_fBestFit', 'personSearch_sBestFit', names, person);
//]]>
</script>

<div class="bgc-bg1 d-bg1">
	<div class="bgc-grp1 d-grp1">
		<form id="personForm" onSubmit="return false">
			<div class="bgc-grp-head1 f-grp-head1 d-grp-head1">
				<?=_('search')?>
			</div>
			<div class="bgc-box1 f-box1 d-box1">
				<div style="position: relative; z-index: 1">
					<input type="text" style="width: 200px" maxlength="255"
						id="personSearch_sname" value=""
						onKeyUp="return pSearch.altSurnames ()" 
						onBlur="return pSearch.hide ('personSearch_sBestFit')" />
					<?=_('surname')?>
					<div class="bgc-tt1 d-tt1"
						style="position: absolute; top: 20px; left: 0px">
						<ul id="personSearch_sBestFit" class="d-tt1" />
					</div>
				</div>
				<div style="position: relative; z-index: 0">
					<input type="text" style="width: 200px" maxlength="255"
						id="personSearch_fname" value=""
						onKeyUp="return pSearch.altFirstnames ()" 
						onBlur="return pSearch.hide ('personSearch_fBestFit')" />
					<?=_('firstname')?>
					<div class="bgc-tt1 d-tt1"
						style="position: absolute; top: 20px; left: 0px">
						<ul id="personSearch_fBestFit" class="d-tt1" />
					</div>
				</div>
			</div>
		</form>
	</div>
</div>

<script language="javascript">
//<![CDATA[
	document.getElementById ('personSearch_sname').onkeyup =
		personSearchAltSurnameHandler;
	document.getElementById ('personSearch_fname').onkeyup =
		personSearchAltFirstnameHandler;
//]]>
</script>