Files
globelus.pl/templates_user/globelus/adverts/advert-details.php
2024-11-11 15:28:20 +01:00

417 lines
24 KiB
PHP

<? global $lang; ?>
<div class="row">
<div class="col-12 col-lg-9">
<div class="advert-details">
<div class="top">
<h1 class="name"><?= $this->advert['title']; ?></h1>
<div class="top-content">
<div class="row">
<div class="col-md-6">
<div class="advert-details-top-right">
<div class="firm">
<a href="/pracodawca/<?= $this->advert['user_id']; ?>/<?= \S::seo($this->advert['firm_name_profile'], true); ?>"><?= $this->advert['firm_name_profile']; ?></a>
</div>
<div class="info">
<span class="date">
<i class="fa fa-calendar"></i><?= ucfirst($lang['opublikowano']); ?>: <?= date('Y-m-d', strtotime($this->advert['date_add'])); ?>
</span>
</div>
<div class="info-second">
<span class="place">
<a href="/oferty-pracy/<?= \S::seo($this->advert['country_name'], true); ?>" title="oferty pracy <?= $this->advert['country_name']; ?>"><?= $this->advert['country_name']; ?></a>
<? if ($this->advert['id_voivodeship']) : ?> - <?= \front\factory\Globelus::get_voivodeship_name($this->advert['id_voivodeship']); ?><? endif; ?> -
<?= $this->advert['city']; ?>
</span><br>
<span class="category">
<a href="/oferty-pracy/<?= \S::seo($this->advert['category_name'], true); ?>" title="oferty pracy <?= $this->advert['category_name']; ?>"><?= $this->advert['category_name']; ?></a>
</span>
<? if ( $this -> advert['id_position'] ):?><br>
<span class="position"><?= \front\factory\Globelus::position_name( $this -> advert['id_position'] );?></span>
<? endif;?>
</div>
<? if ($this->g_user and !$this->g_user['type']) : ?>
<form method="POST" action="<? if (in_array($this->advert['id'], $this->g_user['adverts'])) : ?>/globelusAdverts/remove_from_favorite/<? else : ?>/globelusAdverts/add_to_favorite/<? endif; ?>" id="advert-favorite">
<input type="hidden" name="redirect_url" value="<?= $_SERVER['REQUEST_URI']; ?>">
<input type="hidden" name="advert_id" value="<?= $this->advert['id']; ?>">
<a href="#" <? if (in_array($this->advert['id'], $this->g_user['adverts'])) : ?>class="active" <? endif; ?> onclick="$( '#advert-favorite' ).submit(); return false;">
<i class="fa fa-star" title="<? if (in_array($this->advert['id'], $this->g_user['adverts'])) : ?><?= $lang['usun-z-obserwowanych']; ?><? else : ?><?= $lang['dodaj-do-obserwowanych']; ?><? endif; ?>"></i>
<? if (in_array($this->advert['id'], $this->g_user['adverts'])) : ?><?= $lang['usun-z-obserwowanych']; ?><? else : ?><?= $lang['dodaj-do-obserwowanych']; ?><? endif; ?>
</a>
</form>
<? endif; ?>
</div>
</div>
<div class="col-md-6">
<div class="logo-container">
<div class="logo ">
<? if (file_exists(\front\factory\GlobelusFirms::logo_url($this->advert['user_id']))) : ?>
<img src="/logo/<?= $this->advert['user_id']; ?>/<?= \S::get_token(); ?>">
<? else : ?>
<img src="/images/no-logo.jpg">
<? endif; ?>
</div>
</div>
</div>
</div>
</div>
<div class="icons row no-gutters">
<div class="col-12 col-lg-10 offset-lg-1">
<? if ($this->advert['salary']) : ?>
<div class="icon">
<img src="/layout/images/oferta-wynagrodzenie-gray.svg">
<?= $this->advert['salary']; ?>
</div>
<? endif; ?>
<? if ($this->advert['overtime']) : ?>
<div class="icon small">
<img src="/layout/images/nadgodziny-gray.svg">
<?= $this->advert['overtime_quantity']; ?>
</div>
<? endif; ?>
<? if ($this->advert['accommodation']) : ?>
<div class="icon small">
<img src="/layout/images/zakwaterowanie-gray.svg">
<?= $this->advert['accommodation_cost']; ?>
</div>
<? endif; ?>
<? if ($this->advert['travel_refund']) : ?>
<div class="icon">
<img src="/layout/images/przejazd-gray.svg">
refundacja przejazdu
</div>
<? endif; ?>
<? if ($this->advert['from_now']) : ?>
<div class="icon">
<img src="/layout/images/praca-od-zaraz-gray.svg">
<?= \S::lang('praca-od-zaraz'); ?>
</div>
<? endif; ?>
<? if ($this->advert['work_type']) : ?>
<div class="icon small">
<img src="/layout/images/oferta-rodzaj-umowy-gray.svg">
<? $work_type = \front\factory\Globelus::work_types();
echo $work_type[$this->advert['work_type']]; ?>
</div>
<? endif; ?>
<? if ($this->advert['without_experience']) : ?>
<div class="icon small">
<img src="/layout/images/oferta-doswiadczenie-gray.svg">
<?= \S::lang('bez-doswiadczenia'); ?>
</div>
<? endif; ?>
<? if ($this->advert['without_language']) : ?>
<div class="icon">
<img src="/layout/images/bez-znajomosci-jezyka-gray.svg">
<?= \S::lang('bez-znajomosci-jezyka'); ?>
</div>
<? endif; ?>
<? if ($this->advert['for_couples']) : ?>
<div class="icon small">
<img src="/layout/images/oferta-dla-par-gray.svg">
<?= \S::lang('dla-par'); ?>
</div>
<? endif; ?>
<? if ($this->advert['outside_ue']) : ?>
<div class="icon small">
<img src="/layout/images/ue-gray.svg">
dla obywateli spoza UE
</div>
<? endif; ?>
<? if ($this->advert['without_driving_license']) : ?>
<div class="icon small">
<img src="/layout/images/prawojazdy-gray.svg">
bez prawa jazdy
</div>
<? endif; ?>
</div>
</div>
</div>
<?
$img_header_url = \front\factory\GlobelusFirms::img_header_url( $this -> g_user['id'] );
$advert_add_img_top = \front\factory\GlobelusFirms::advert_add_img_top_url( $this -> advert['id'] );
if ( file_exists( $advert_add_img_top ) ):
echo '<div class="image_header"><img src="/advert_add_img_top/' . $this->advert['id'] . '/'. \S::get_token() . '"></div>';
elseif ( file_exists( $img_header_url ) and !$this -> advert ):
echo '<div class="image_header"><img src="/img_header/' . $this->g_user['id'] . '/'. \S::get_token() . '"></div>';
endif;
?>
<div class="content">
<?
$text = $this->advert['text'];
if (!$this->g_user) :
$text = preg_replace('/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i', ' <a href="/logowanie">Zaloguj się aby zobaczyć adres email</a> ', $text);
$text = preg_replace(
'/(\+[0-9]{11}|\+[0-9]{2} [0-9]{9}|\+[0-9]{2} [0-9]{3} [0-9]{3} [0-9]{3}|\+[0-9]{2} [0-9]{3}-[0-9]{3}-[0-9]{3}|[0-9]{3} [0-9]{3} [0-9]{3}|[0-9]{4} [0-9]{8})/i',
' <a href="/logowanie">Zaloguj się aby zobaczyć numer telefonu</a> ',
$text
);
endif;
echo $text;
?>
</div>
<?
$img_bottom_url = \front\factory\GlobelusFirms::img_bottom_url( $this -> g_user['id'] );
$advert_add_img_bottom = \front\factory\GlobelusFirms::advert_add_img_bottom_url( $this -> advert['id'] );
if ( file_exists( $advert_add_img_bottom ) ):
echo '<div class="image_bottom"><img src="/advert_add_img_bottom/' . $this->advert['id'] . '/'. \S::get_token() . '"></div>';
elseif ( file_exists( $img_bottom_url ) ):
echo '<div class="image_bottom"><img src="/img_bottom/' . $this->g_user['id'] . '/'. \S::get_token() . '"></div>';
endif;
?>
<? if ($this->advert['clauses']) : ?>
<div class="content clauses">
<?= $this->advert['clauses']; ?>
</div>
<? endif; ?>
<? if ($this->advert['contact_person'] or $this->advert['contact_person2']) : ?>
<div class="content person">
<div class="row">
<? if ($this->advert['contact_person']) : ?>
<div class="col-12 col-md-6">
<p><strong>Osoba rekrutująca na stanowisko:</strong></p>
<p><?= $this->advert['contact_person']; ?><br />
<? if (!$this->g_user) : ?>
<a href="/logowanie">Zaloguj się aby zobaczyć adres email</a><br />
<a href="/logowanie">Zaloguj się aby zobaczyć numer telefonu</a><br />
<? else : ?>
<?= $this->advert['phone']; ?><br />
<?= $this->advert['email']; ?><br />
<? endif; ?>
</p>
</div>
<? endif; ?>
<? if ($this->advert['contact_person2']) : ?>
<div class="col-12 col-md-6">
<p><strong>Osoba rekrutująca na stanowisko:</strong></p>
<p><?= $this->advert['contact_person2']; ?><br />
<? if (!$this->g_user) : ?>
<a href="/logowanie">Zaloguj się aby zobaczyć adres email</a><br />
<a href="/logowanie">Zaloguj się aby zobaczyć numer telefonu</a><br />
<? else : ?>
<?= $this->advert['phone2']; ?><br />
<?= $this->advert['email2']; ?><br />
<? endif; ?>
</p>
</div>
<? endif; ?>
</div>
</div>
<? endif; ?>
<? if ($this->advert['aplication_link']) : ?>
<div class="form form--aplication-link application">
<a href="<?= $this->advert['aplication_link'] ?>" target="_blank" class="aplication-link btn btn-success">Aplikuj teraz</a>
<? else : ?>
<div class="form application">
<h3><?= $lang['zainteresowany-nie-zwlekaj-aplikuj']; ?></h3>
<div class="row">
<div class="col-12 col-md-10 offset-md-1">
<form method="POST" action="/globelusAdverts/send_message/" id="advert-contact" enctype="multipart/form-data">
<input type="hidden" name="redirect_url" value="<?= $_SERVER['REQUEST_URI']; ?>">
<input type="hidden" name="advert_id" value="<?= $this->advert['id']; ?>">
<div class="row">
<div class="col-12 col-md-6">
<div class="form-group row">
<label form="name" class="col-12 col-sm-4"><?= ucfirst($lang['imie']); ?>:</label>
<div class="col-12 col-sm-8">
<input type="text" id="name" name="name" class="form-control" value="<?= $this->g_user['name'] ? htmlspecialchars($this->g_user['name']) : htmlspecialchars(\S::get_session('advert_answer_name')); ?>">
</div>
</div>
</div>
<div class="col-12 col-md-6">
<div class="form-group row">
<label form="surname" class="col-12 col-sm-4"><?= ucfirst($lang['nazwisko']); ?>:</label>
<div class="col-12 col-sm-8">
<input type="text" id="surname" name="surname" class="form-control" value="<?= $this->g_user['surname'] ? htmlspecialchars($this->g_user['surname']) : htmlspecialchars(\S::get_session('advert_answer_surname')); ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-md-6">
<div class="form-group row">
<label form="email" class="col-12 col-sm-4"><?= ucfirst($lang['email']); ?><span class="red">*</span>:</label>
<div class="col-12 col-sm-8">
<input type="text" required id="email" name="email" class="form-control" value="<?= $this->g_user['email'] ? htmlspecialchars($this->g_user['email']) : htmlspecialchars(\S::get_session('advert_answer_email')); ?>">
</div>
</div>
</div>
<div class="col-12 col-md-6">
<div class="form-group row">
<label form="phone" class="col-12 col-sm-4"><?= ucfirst($lang['telefon']); ?><span class="red">*</span>:</label>
<div class="col-12 col-sm-8">
<input type="text" required id="phone" name="phone" class="form-control" value="<?= $this->g_user['phone'] ? htmlspecialchars($this->g_user['phone']) : htmlspecialchars(\S::get_session('advert_answer_phone')); ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-group row">
<label form="text" class="col-12 col-sm-4 col-md-2"><?= ucfirst($lang['wiadomosc']); ?>:</label>
<div class="col-12 col-sm-8 col-md-10">
<textarea id="text" name="text" class="form-control">Witam,<?= PHP_EOL; ?>Państwa oferta pracy wydaje mi się interesująca. Bardzo proszę o kontakt.<?= PHP_EOL; ?>Pozdrawiam<?= PHP_EOL; ?><?= htmlspecialchars($this->g_user['surname']); ?> <?= htmlspecialchars($this->g_user['name']); ?>
</textarea>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-group row">
<label form="cv" class="col-12 col-sm-4 col-md-2"><?= strtoupper($lang['cv']); ?><span class="red">*</span>:</label>
<div class="col-12 col-sm-8 col-md-10 pt10">
<? if ($this->g_user and file_exists(\front\factory\GlobelusCandidates::cv_url($this->g_user['id']))) : ?>
<p class="small-info mt0 text-success">Nie musisz dodawać CV, chyba, że chcesz użyć innego cv niż to zarejestrowane w Profilu Kandydata?</p>
<input type="file" id="cv" name="cv">
<? elseif (!$this->g_user and \S::get_session('advert_answer_cv')) : ?>
<p class="small-info mt0 text-success">Dodaj nowe CV, lub skorzystaj z wcześniej wysłanego.</p>
<input type="file" id="cv" name="cv">
<? else : ?>
<input type="file" id="cv" name="cv" required="required">
<? endif; ?>
</div>
</div>
</div>
</div>
<? if (!$this->g_user) : ?>
<div class="form-group row agremment">
<div class="col-12 col-sm-10 offset-sm-2">
<input type="checkbox" required id="agremment">
<?
$text = str_replace('[LINK-REGULAMIN]', '<a href="/regulamin">' . $lang['regulamin'] . '</a>', $lang['rejestracja-akceptacja-regulaminu']);
echo $text = str_replace('[LINK-POLITYKA-PRYWATNOSCI]', '<a href="/polityka-prywatnosci">' . $lang['polityke-prywatnosci'] . '</a>', $text);
?>
</div>
</div>
<div class="form-group row agremment mt20">
<div class="col-12 col-sm-10 offset-sm-2">
<input type="checkbox" name="register"> Zgadzam się na dopasowanie mojego cv również do innych ofert pracy oraz udostepnienie mojego cv innym pracodawcom zarejestrowanym na globelus.pl
</div>
</div>
<? endif; ?>
<div class="form-group row">
<div class="col-12 col-sm-8 offset-sm-4 offset-md-2 mt20">
<input type="submit" value="<?= ucfirst($lang['aplikuj-na-oferte']); ?>" class="btn btn-success">
</div>
</div>
<div class="form-group row agremment mt20">
<div class="col-12 col-sm-10 offset-sm-2">
Jeśli dałeś nam swoją zgodę i możemy dopasować Twoje cv również do innych ofert pracy oraz udostępnić Twoje cv innym pracodawcom zarejestrowanym na globelus.pl to zalecamy abyś uzupełnij swój <a href="/jakiej-pracy-szukasz">Profil Kandydata</a>.
<!--<input type="checkbox" name="register"> Zgadzam się na dopasowanie mojego cv również do innych ofert pracy oraz udostepnienie mojego cv innym pracodawcom zarejestrowanym na globelus.pl-->
</div>
</div>
</form>
</div>
</div>
<? endif; ?>
</div>
</div>
</div>
<div class="col-12 col-lg-3">
<div class="row advert_details_boxes">
<? if (count($this->similar_adverts)) : ?>
<div class="col-12">
<div class="mini-box vertical similar-adverts">
<div class="title small">
Podobne oferty
</div>
<ul>
<? foreach ($this->similar_adverts as $advert_id) : ?>
<? $advert = \front\factory\GlobelusAdverts::advert_details($advert_id); ?>
<li>
<a href="/oferta/<?= $advert['id']; ?>/<?= \S::seo($advert['title'], true); ?>" title="Ogłoszenie: <?= addslashes($advert['title']); ?>"><?= $advert['title']; ?></a>
<div class="place">
<i class="fa fa-map-marker"></i>
<a href="/oferty-pracy/<?= \S::seo($advert['country_name'], true); ?>" title="oferty pracy <?= $advert['country_name']; ?>"><?= $advert['country_name']; ?></a>
<? if ($advert['id_voivodeship']) : ?> - <?= \front\factory\Globelus::get_voivodeship_name($advert['id_voivodeship']); ?><? endif; ?> -
<?= $advert['city']; ?>
</div>
</li>
<? endforeach; ?>
</ul>
</div>
</div>
<? endif; ?>
<div class="col-12">
<div class="mini-box mt10 text-center">
<form method="POST" action="/oferty-pracy">
<input type="hidden" name="filtr" value="t">
<input type="hidden" name="k" value="<?= $this->advert['firm_name_profile']; ?>">
<a href="#" class="action" onclick="$( this ).parent( 'form' ).submit(); return false;">
<i class="fa fa-bars"></i>
<?= ucfirst($lang['inne-oferty-tego-pracodawcy']); ?>
</a>
</form>
</div>
</div>
<div class="col-12">
<div class="mini-box mt10 text-center">
<a href="/pracodawca/<?= $this->advert['user_id']; ?>/<?= \S::seo($this->advert['firm_name_profile'], true); ?>" class="action">
<i class="fa fa-user"></i>
<?= ucfirst($lang['zobacz-profil-pracodawcy']); ?>
</a>
</div>
</div>
<div class="col-12">
<div class="mini-box mt10 text-center">
<div class="social-icons">
<a class="fb" href="http://www.facebook.com/sharer.php?u=<?= \S::get_domain_url($_SERVER['SERVER_NAME']); ?>/oferta/<?= $this->advert['id']; ?>/<?= \S::seo($this->advert['title'], true); ?>/" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
<img src="/images/system/logo-facebook.jpg" alt="facebook" />
</a>
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?= \S::get_domain_url($_SERVER['SERVER_NAME']); ?>/oferta/<?= $this->advert['id']; ?>/<?= \S::seo($this->advert['title'], true); ?>/" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="pinterest" target="_blank" rel="nofollow">
<img src="/images/system/logo-pinterest.jpg" alt="pinterest" />
</a>
<a class="twitter" href="http://twitter.com/share?url=<?= \S::get_domain_url($_SERVER['SERVER_NAME']); ?>/oferta/<?= $this->advert['id']; ?>/<?= \S::seo($this->advert['title'], true); ?>/" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=600');return false;" title="twitter" target="_blank" rel="nofollow">
<img src="/images/system/logo-twitter.jpg" alt="twitter" />
</a>
<a class="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?= \S::get_domain_url($_SERVER['SERVER_NAME']); ?>/oferta/<?= $this->advert['id']; ?>/<?= \S::seo($this->advert['title'], true); ?>/" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=850');return false;" title="linked in" target="_blank" rel="nofollow">
<img src="/images/system/logo-linkedin.jpg" alt="linkedin" />
</a>
<a class="gp" href="https://plus.google.com/share?url=<?= \S::get_domain_url($_SERVER['SERVER_NAME']); ?>/oferta/<?= $this->advert['id']; ?>/<?= \S::seo($this->advert['title'], true); ?>/" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="google+" target="_blank" rel="nofollow">
<img src="/images/system/logo-google.jpg" alt="google+" />
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<a href="javascript:history.go(-1);" class="btn btn-dark btn-back"><?= $lang['wstecz']; ?></a>
</div>
</div>
<script class="footer" type="text/javascript">
$(function() {
$('body').on('submit', '#advert-contact', function(e) {
if (!($('#cv')[0].files[0].size < 5242880)) {
e.preventDefault();
$.alert({
title: '<?= ucfirst($lang['blad']); ?>',
icon: 'fa fa-exclamation',
content: '<?= $lang['plik-cv-jest-zbyt-duzy']; ?>',
type: 'blue',
closeIcon: true,
closeIconClass: 'fa fa-close',
typeAnimated: true,
animation: 'opacity',
autoClose: 'confirm|10000',
columnClass: 'large',
theme: 'modern',
buttons: {
confirm: {
text: '<?= $lang['zamknij']; ?>',
btnClass: 'btn-blue',
keys: ['enter'],
action: function() {}
}
}
});
}
});
});
</script>
<?
if (!$this->g_user['id'] or $this->g_user['id'] != $this->advert['user_id'])
\front\factory\GlobelusAdverts::advert_visits_increase($this->advert['id']);
?>