Files
rockowa.com/templates/site-contact.php
2023-05-08 09:03:09 +02:00

91 lines
3.4 KiB
PHP

<? global $lang , $sys; ?>
<div id='contact_full'>
<?
if ( isset( $this -> _firm_name ) && $this -> _firm_name )
echo '<div class="contact_line" style="color: #FFC900;">' . $this -> _firm_name . '</div>';
if ( isset( $this -> _street ) || isset( $this -> _postal_code ) || isset( $this -> _city ) )
echo '<div class="contact_line">ul. ' . $this -> _street . '<br />' . $this -> _postal_code . ' ' . $this -> _city . '</div>';
if ( isset( $this -> _phone ) && $this -> _phone )
echo '<div class="contact_line">' . $lang -> getTrans( 'T_TEL' ) . ' ' . $this -> _phone . '</div>';
if ( isset( $this -> _fax ) && $this -> _fax )
echo '<div class="contact_line">' . $lang -> getTrans( 'T_FAX' ) . ' ' . $this -> _fax . '</div>';
if ( isset( $this -> _email ) && $this -> _email )
echo '<div class="contact_line"><a href="mailto:' . $this -> _email . '">' . $this -> _email . '</a></div>';
if ( isset( $this -> _nip ) && $this -> _nip )
echo '<div class="contact_line">' . $lang -> getTrans( 'T_NIP' ) . ': ' . $this -> _nip . '</div>';
?>
<div class="contact_line" style="display: none;">
<p>BOŚ S.A. o/Rzeszów</p>
<p>Nr konta: <a href="#" style="color: #FFC900;">94 1540 1131 2113 9101 3626 0001</a></p>
</div>
</div>
<div id="contact">
<?
if ( isset( $this -> _contact_form ) && $this -> _contact_form == 1 )
{
?>
<div class="contact_line">
<?=ucfirst( $lang -> getTrans( 'T_TWOJ_EMAIL' ) );?>:
</div>
<div class="contact_line">
<input type='text' id="email" name='email'>
</div>
<div class="contact_line">
<?=ucfirst( $lang -> getTrans( 'T_TEMAT' ) );?>:
</div>
<div class="contact_line">
<input type='text' id="subject" name='subject'>
</div>
<div class="contact_line">
<?=ucfirst( $lang -> getTrans( 'T_TRESC' ) );?>:
</div>
<div class="contact_line">
<textarea name='text' id="text" cols='35' rows='6'></textarea>
</div>
<div class="contact_line">
<a class='button' onClick='sendContactForm();' style="float: right;"><?=$lang -> getTrans( 'T_WYSLIJ' );?></a>
</div>
<?
}
?>
</div>
<div class="clearfix"></div>
<?
if ( $sys -> getSystemSettings( 'google_map_key' ) && $user_tmp == true )
{
?>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?=$sys -> getSystemSettings( 'google_map_key' );?>' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function()
{
map = new GMap2(document.getElementById( 'mapa' ));
var geo = new GClientGeocoder();
var adres = '<?=$sys -> getSystemSettings( 'street' ) . ' ' . $sys -> getSystemSettings( 'city' );?>';
geo.getLatLng(adres,function(punkt){
map.setCenter(punkt,16);
map.addOverlay(new GMarker(punkt));
map.panTo(punkt);
map.setUIToDefault();
});
});
</script>
<div id='mapa' style='width: 490px; height: 260px; border: 1px solid black; position: relative; top: -200px; right: -440px;'></div>
<?
}
?>
<script type='text/javascript'>
function sendContactForm()
{
var email = $("#email").val();
var subject = $("#subject").val();
var text = $("#text").val();
$.prompt('<?=$lang -> getTrans( 'T_TRWA_WYSYLANIE_FORMULARZA' );?>');
xajax_sendContactForm( email , subject , text , '<?=date( "Y-m-d H:i:s" );?>' , '<?=$sys -> getSessionVar( 'token' );?>' );
}
</script>