chore: record iqon legacy selected steps

This commit is contained in:
Sergei Vasilev
2026-05-20 21:32:17 +03:00
parent 1eb0852b63
commit e5f716fbd0
8 changed files with 1220 additions and 0 deletions
@@ -0,0 +1,139 @@
<?php
/**
* Template Name: CONTACTKZ
*/
?>
<?php
function rpHash($value) {
$hash = 5381;
$value = strtoupper($value);
for($i = 0; $i < strlen($value); $i++) {
$hash = (leftShift32($hash, 5) + $hash) + ord(substr($value, $i));
}
return $hash;
}
// Perform a 32bit left shift
function leftShift32($number, $steps) {
// convert to binary (string)
$binary = decbin($number);
// left-pad with 0's if necessary
$binary = str_pad($binary, 32, "0", STR_PAD_LEFT);
// left shift manually
$binary = $binary.str_repeat("0", $steps);
// get the last 32 bits
$binary = substr($binary, strlen($binary) - 32);
// if it's a positive number return it
// otherwise return the 2's complement
return ($binary[0] == "0" ? bindec($binary) :
-(pow(2, 31) - bindec(substr($binary, 1))));
}
if (!empty($_POST)) {
$nume = $_POST['nume'] ?? '';
$email = $_POST['email'] ?? '';
$message = $_POST['mesaj'] ?? '';
$subject = $_POST['subject'] ?? '';
$validation_code = $_POST['validation'] ?? '';
$hash = $_POST['hash'] ?? '';
$hash_not_valid = false;
if ($hash != rpHash($validation_code)) {
$hash_not_valid = true;
}
else {
require_once 'class.phpmailer.php';
$new_mail = new PHPMailer(true);
try {
$new_mail->AddReplyTo($email, $nume);
$admin_email = get_option('admin_email');
//dv($admin_email);die();
$new_mail->AddAddress($admin_email);
//$new_mail->AddAddress('gabriel.ilie@gmail.com', 'Gabriel Ilie');
$new_mail->SetFrom('contact@iqon.com', 'CONTACT FORM');
$new_mail->Subject = '[IQON CONTACT FORM] '.$nume.' has sent you a message. Subject: '.$subject;
$new_mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
//$new_mail->MsgHTML(file_get_contents('contents.html'));
$html = $nume.' has sent you an message.<br /><b>E-mail:</b> '.$email.'<br /><b>Subject:</b> '.$subject.'<br /><b>Message:</b> '.$message;
$new_mail->MsgHTML($html);
$new_mail->Send();
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage(); //Boring error messages from anything else!
}
echo '<script>top.location = "'.get_permalink(12).'?sent=ok";</script>';
die();
}
}
?>
<?php $ascunde_services = true; ?>
<?php get_header(); ?>
<div class="contentleft">
<p><h1 class="fontsize20 marginbottom20">Bucharest Office:</h1>
10th Montreal Sq. <br />
3rd Floor 3.01 bis Office <br />
011469 Bucharest, Romania <br />
<div id="linie-punctata"></div>
<a href="mailto:office@iqon.com">office@iqon.com</a><br />
<a href="https://t.me/infobidgebot">@infobidgebot</a></p>
</div>
<div class="contentright">
<iframe width="700" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=str+montreal+bucuresti+iqon&amp;aq=&amp;sll=44.475036,26.07116&amp;sspn=0.006546,0.016512&amp;t=m&amp;g=str+montreal+bucuresti+nr+10&amp;ie=UTF8&amp;hq=iqon&amp;hnear=Pia%C5%A3a+Montreal,+Sector+1,+Bucure%C8%99ti,+Romania&amp;ll=44.475732,26.069977&amp;spn=0.003828,0.014999&amp;z=16&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=str+montreal+bucuresti+iqon&amp;aq=&amp;sll=44.475036,26.07116&amp;sspn=0.006546,0.016512&amp;t=m&amp;g=str+montreal+bucuresti+nr+10&amp;ie=UTF8&amp;hq=iqon&amp;hnear=Pia%C5%A3a+Montreal,+Sector+1,+Bucure%C8%99ti,+Romania&amp;ll=44.475732,26.069977&amp;spn=0.003828,0.014999&amp;z=16" target="_blank" style="color:#0000FF;text-align:left">View Larger Map</a></small>
<h2 class="margintop40">Please fill in the form below <?php if (($_GET['sent'] ?? '') == 'ok') { ?>[Your message has been sent.]<?php } ?></h2>
<form action="" method="POST" id="formular_contact">
<div class="rowInput">
<label id="label_name">Your name (required):</label>
<input type="text" name="nume" id="name" />
</div>
<div class="rowInput">
<label id="label_email">Your email (required):</label>
<input type="text" name="email" id="email" />
</div>
<div class="clear"></div>
<!--<div class="rowInput">
<label>Category:</label>
<input type="text" name="name" id="name" />
</div>-->
<div class="rowInput">
<label id="label_subject">Subject:</label>
<input type="text" name="subject" id="subject" />
</div>
<div class="clear"></div>
<div class="rowTextarea">
<label id="label_mesaj">Message:</label>
<textarea name="mesaj" id="mesaj"></textarea>
</div>
<div class="rowInput" style="width: 600px!important;">
<label id="label_validation">Validation code(required):</label>
<input type="text" name="validation" id="validation" value="" data-default="validation code" class="text validation" style="width: 100px!important; text-transform: uppercase;" />
</div>
<div class="clear"></div>
<input type="submit" class="submitMessage" value="" />
</form>
<script type="text/javascript">
$(document).ready(function() {
$('#validation').realperson({length: 5, includeNumbers: false, hashName: 'hash'});
$('#formular_contact').submit(function(event) {
if (!$('#name').val()) {
$('#label_name').addClass('notCompleted');
event.preventDefault();
}
else $('#label_name').removeClass('notCompleted');
if (!$('#email').val()) {
$('#label_email').addClass('notCompleted');
event.preventDefault();
}
else $('#label_email').removeClass('notCompleted');
if (!$('#validation').val()) {
$('#label_validation').addClass('notCompleted');
event.preventDefault();
}
else $('#label_validation').removeClass('notCompleted');
});
});
</script>
<div class="disclaimer">
<strong>Disclaimer:</strong> IQON Romania takes all necessary measures to keep your personal information private and secure. Only authorized IQON Romania staff, Third Party companies (i.e. service providers) staff or our business partners' authorized staff (who have contractually agreed to keep all information secure) have access to your personal information.
</div>
</div>
<?php get_footer(); ?>
@@ -0,0 +1,185 @@
@charset "utf-8";
/* RESET */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {margin:0;padding:0;}
table {border-collapse:collapse;border-spacing:0;}
fieldset,img { border:0;}
address,caption,cite,code,dfn,th,var {font-style:normal;font-weight:normal;}
ol,ul {list-style:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}
q:before,q:after {content:'';}
abbr,acronym {border:0;}
a {text-decoration:none;}
a:hover {text-decoration:underline;}
.clear{clear:both; margin:0 !important; padding:0 !important; border:0 none !important; line-height:0 !important; height:0 !important; font-size:0 !important}
/* IQON */
body {font-family: arial; font-size: 12px; line-height: 16px; color: #4c4c4c}
#line {position: absolute; width: 100%; height: 1px; background-color: #fbc100; top: 163px}
.line-homepage {top: 501px !important;}
#wrapper {width: 960px; margin: auto auto;}
#header {width: 960px; height: 120px; position: relative;}
#logo {position: absolute; top: 16px; left: 0px;}
#language-selector {position: absolute; bottom: 0px; right: 0px; height: 20px; width: 530px; background-color: #c2c2c2; display: none;}
#menu {width: 960px; height: 40px; position: relative; background-color: #fbc100; background-image: url('/wp-content/themes/iqon/images/bg-menu.png'); background-repeat: no-repeat; background-position: top left; }
#menu a {display: block; height: 40px; line-height: 40px; float: left; padding: 0px 30px; font-family: 'HelveticaNeueLTPro45LtRegular'; font-size: 15px; color: #000000; text-decoration: none;}
#menu a:hover, #menu a.active {background-image: url('/wp-content/themes/iqon/images/bg-menu-active.png'); background-repeat: repeat-x; background-position: top left;}
#header-image-home {width: 960px; height: 335px; margin-top: 3px;}
#header-image {width: 960px; height: 190px; margin-top: 10px;}
#menu-services {margin-top: 12px;}
#menu-services a {display: block; float: left; width: 160px; height: 93px; background-color: #e5e5e5; margin-left: 10px; background-image: url('/wp-content/themes/iqon/images/submeniu-inactive.png'); background-repeat: no-repeat; background-position: top left; font-family: 'HelveticaNeueLTPro45LtRegular'; font-size: 20px; color: #000000; text-decoration: none; padding: 15px 10px 0px 10px; line-height: 20px;}
#menu-services a:hover, #menu-services a.active {background-color: #fbc100; margin-left: 10px; background-image: url('/wp-content/themes/iqon/images/submeniu-active.png'); background-repeat: no-repeat; background-position: top left; }
#linie-interior {width: 100%; height: 1px; background-color: #fbc100;}
#content {padding: 0px 10px; margin: 30px 0px; position: relative;}
#content p {padding: 7px 0px;}
#content h1 {font-family: 'HelveticaNeueLTPro45LtRegular'; font-size: 23px; color: #000000; line-height: 26px; margin-bottom: 15px;}
#content h1 a {color: #000000;}
#content h2 {font-family: 'HelveticaNeueLTPro45LtRegular'; font-size: 16px; color: #000000; line-height: 20px; margin-bottom: 30px;}
.contentleft {float: left; width: 240px; position: relative;}
.contentleft a {font-family: arial; text-decoration: none; color: #4c4c4c; line-height: 16px; height: 20px;}
.contentleft a.active {font-weight: bold; color: black;}
.submeniu {margin-bottom:10px;}
.submeniuLeft {float:left; width:16px;}
.submeniuRight {float:left; width:200px;margin-top:2px;}
.contentright {float: right; width: 700px;}
.contentright ul { list-style-image:url('/wp-content/themes/iqon/images/icon-arrow.png') !important;list-style-position:outside; }
.contentright ol { list-style-type:decimal !important;list-style-position:outside; }
.contentright ul, ol {margin:0 0 15px 25px;}
.contentright li {margin-bottom:4px;}
.contentright strong {color:#000;}
.clear {clear: both;}
.homeleft {float: left}
.homeright {float: right; width: 700px;}
#content-footer {padding: 0px 30px; margin: 40px 0px; position: relative;}
#content-footer div.cf {float: left; width: 279px; border-right: 1px solid #b2b2b2; margin-right: 20px; position: relative; min-height: 160px;}
#content-footer div.cf h3 {font-family: 'HelveticaNeueLTPro45LtRegular'; font-size: 18px; color: #000000; text-decoration: none; margin-bottom: 20px;}
#content-footer div.cf a {font-family: arial; text-decoration: none; color: #4c4c4c; line-height: 20px; height: 20px;}
#content-footer-bottom {padding: 0px 10px; margin: 35px 0px; position: relative;font-family: arial; font-size: 11px; line-height: 18px; color: #444444}
#content-footer-bottom a {font-family: arial; font-size: 11px; line-height: 18px; color: #444444}
#logo-bottom {position: absolute; right: 0px; top: 0px;}
.iconite-contact {position: absolute; bottom: -10px; left: -2px;}
#breadcrumb {width: 950px; height: 27px; padding-left: 10px; padding-top: 3px}
#breadcrumb a {text-decoration: none; line-height: 30px; color: #4c4c4c}
#linie-punctata {line-height: 1px; height: 1px; border-top: 1px dotted black; width: 200px; margin: 5px 0px}
#download_brosura {display: block; margin-top: 35px; margin-left: 10px;}
.container_imagine {border: 5px solid #cccccc; padding: 1px; width: 208px; height: 142px;}
#content p {font-family: arial; font-size: 12px; line-height: 16px; color: #4c4c4c}
h2 a {text-decoration: none; color: black;}
.caseStudyRow h2 {margin-bottom: 15px!important}
.caseStudyRow {margin-bottom: 40px; position: relative;}
.readCaseStudy {position: absolute; bottom: 0px; left: 240px;}
.imagine_study_interior {float: right; margin-left: 20px; margin-bottom: 20px;}
.timp {position: absolute; top: -52px; right: 10px;}
h1.single {font-size: 32px!important; line-height: 34px!important; margin-bottom: 40px!important}
h2.single {color: #4c4c4c!important;}
.download_case_file {width: 960px; height: 50px; background-color: #ededed; margin-bottom: 20px; font-size: 14px; font-style: italic; color: black; line-height: 50px;}
.download_case_file .link {margin-left: 10px; margin-top: 10px; float: left; width: 200px;}
.disclaimer {font-size: 10px; font-style: italic; margin-top: 50px; line-height: 12px;}
.rowInput {float: left; width: 350px; margin-bottom: 25px;}
.rowInput label, .rowTextarea label {display: block; font-style: italic}
.rowInput input {border: 0px; margin: 0px; height: 30px; width: 320px; border: 1px solid #dcdcdc; background-color: #ececee; color: black;}
.rowTextarea textarea {border: 0px; margin: 0px; height: 210px; width: 670px; border: 1px solid #dcdcdc; background-color: #ececee; color: black;margin-bottom: 25px;}
.submitMessage {border: 0px; margin: 0px;background-image: url('/wp-content/themes/iqon/images/send_message.png');background-repeat: no-repeat; width: 140px; height: 30px; margin-top: 0px; cursor: pointer}
#search {position: absolute; right: 0px; top: 28px;}
#search input {border: 0px; margin: 0px; background-color: white; border: 1px solid #feaf31; height: 25px; font-size: 11px; padding: 0px 10px}
.noborder {border: 0px !important}
.lineheight14 {line-height: 14px !important}
.fontsize20 {font-size: 20px!important}
.marginbottom20 {margin-bottom: 20px!important}
.margintop10 {margin-top:10px!important}
.margintop40 {margin-top:40px!important}
.floatleft {float: left;}
.marginright20 {margin-right: 20px;}
.notCompleted {color: red!important}
html {-webkit-text-size-adjust: 100%;}
img, iframe {max-width: 100%;}
.skip-link {
position: absolute;
left: -999px;
top: 8px;
z-index: 100000;
background: #fbc100;
color: #000;
padding: 8px 12px;
}
.skip-link:focus {left: 8px;}
a:focus, input:focus, textarea:focus {
outline: 2px solid #fbc100;
outline-offset: 2px;
}
@media (max-width: 980px) {
body {min-width: 0;}
#wrapper, #header, #menu, #header-image-home, #header-image, #breadcrumb, .download_case_file {
width: auto;
max-width: 960px;
}
#wrapper {margin: 0 12px;}
#header {height: auto; min-height: 112px;}
#search {position: static; float: right; margin: 28px 0 12px;}
#flags_language_selector {clear: both;}
#menu {height: auto; overflow: hidden; background-repeat: repeat-x;}
#menu a {padding: 0 16px;}
#header-image-home, #header-image {height: auto;}
#header-image-home img, #header-image img {width: 100%; height: auto;}
#menu-services a {width: 27%; margin-bottom: 10px;}
.contentleft, .contentright, .homeleft, .homeright {
float: none;
width: auto;
}
.contentright {margin-top: 20px;}
#content-footer {padding: 0; margin: 30px 0;}
#content-footer div.cf {
width: 30%;
margin-right: 3%;
}
.download_case_file {height: auto; line-height: 20px; padding: 12px 0;}
.download_case_file .link {float: none; width: auto;}
.rowInput {width: 48%;}
.rowInput input {width: 90%;}
.rowTextarea textarea {width: 96%;}
}
@media (max-width: 640px) {
#line {display: none;}
#wrapper {margin: 0 10px;}
#logo, #search {
position: static;
float: none;
}
#logo {padding-top: 16px;}
#search input[type="text"] {width: 68%;}
#menu a {
float: none;
height: 36px;
line-height: 36px;
padding: 0 12px;
border-bottom: 1px solid rgba(0,0,0,.12);
}
#menu-services a {
float: none;
width: auto;
margin-left: 0;
}
#content {padding: 0; margin: 22px 0;}
#breadcrumb {height: auto; line-height: 18px; padding: 8px 0;}
.rowInput, .rowTextarea {float: none; width: auto!important;}
.rowInput input, .rowTextarea textarea {width: 96%!important;}
#content-footer div.cf {
float: none;
width: auto;
border-right: 0;
border-bottom: 1px solid #b2b2b2;
margin: 0 0 20px;
padding-bottom: 20px;
min-height: 0;
}
#content-footer div.cf.noborder {border-bottom: 0;}
#content-footer-bottom {padding: 0 0 70px;}
#logo-bottom {left: 0; right: auto; top: auto; bottom: 0;}
}
@@ -0,0 +1,119 @@
<?php global $meniu, $case_file; ?>
<div class="clear"></div>
</div>
<?php if ($case_file) { ?>
<div class="download_case_file">
<div class="link"><a target="_blank" href="<?=$case_file;?>"><img src="/wp-content/themes/iqon/images/download_case_study.png" /></a></div>If you would like to read this material later, download the case study's full PDF.
</div>
<?php } ?>
<div id="footer">
<div id="linie-interior"></div>
<div id="content-footer">
<div class="cf">
<?php $domain = $_SERVER['SERVER_NAME'];
switch($domain) {
default :?>
<h3>Latest Case Studies</h3>
<?php break;
case 'www.iqon.kz' :?>
<h3>Latest Case Studies RU</h3>
<?php break;} ?>
<?php
wp_reset_query();
$args = array( 'posts_per_page' => 5, 'cat' => 1, 'post_type' => 'post', 'post_status' => 'publish' );
$latests_case = query_posts($args);
wp_reset_query();
?>
<?php foreach($latests_case as $case) { ?>
<a href="<?=get_permalink($case->ID);?>">&raquo; <?=$case->post_title;?></a><br />
<?php } ?>
</div>
<div class="cf">
<?php $domain = $_SERVER['SERVER_NAME'];
switch($domain) {
default :?>
<h3>Our Services</h3>
<?php break;
case 'www.iqon.kz' :?>
<h3>Наши услуги</h3>
<?php break; }?>
<?php
$mainMeniu = $meniu[74];
$mainMeniu_ru = isset($meniu[279]) ? $meniu[279] : null;
$mainMeniu_kz = isset($meniu[282]) ? $meniu[282] : null; ?>
<?php if ($mainMeniu){foreach ($mainMeniu->childrens as $services) {
?>
<a href="<?=$services->url;?>" title="<?php echo $services->attr_title; ?>">&raquo; <?=$services->title;?></a><br />
<? }}
?>
<?php if ($mainMeniu_ru){foreach ($mainMeniu_ru->childrens as $services) {
?>
<a href="<?=$services->url;?>" title="<?php echo $services->attr_title; ?>">&raquo; <?=$services->title;?></a><br />
<? }}
?>
<?php if ($mainMeniu_kz){foreach ($mainMeniu_kz->childrens as $services) {
?>
<a href="<?=$services->url;?>" title="<?php echo $services->attr_title; ?>">&raquo; <?=$services->title;?></a><br />
<? }}
?>
</div>
<?php $domain = $_SERVER['SERVER_NAME'];
switch($domain) {
default :?>
<div class="cf noborder lineheight14">
<h3>Contact</h3>
10th Montreal Sq. 3rd Floor 3.01 bis Office, 011469 Bucharest, Romania
<br /><br /><a href="mailto:office@iqon.com">office@iqon.com</a>
<br /><a href="https://t.me/infobidgebot">@infobidgebot</a>
<?php if(1==0) { ?>
<div class="iconite-contact">
<a href="#"><img src="/wp-content/themes/iqon/images/twitter.png" /></a>
<a href="#"><img src="/wp-content/themes/iqon/images/facebook.png" /></a>
<a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>/feed"><img src="/wp-content/themes/iqon/images/rss.png" /></a>
</div>
<?php } ?>
</div>
<?php break;
case 'www.iqon.kz' :?>
<div class="cf noborder lineheight14">
<h3>Контакт</h3>
10th Montreal Sq. 3rd Floor 3.01 bis Office, 011469 Bucharest, Romania
<br /><br /><a href="mailto:office@iqon.com">office@iqon.com</a>
<br /><a href="https://t.me/infobidgebot">@infobidgebot</a>
<?php if(1==0) { ?>
<div class="iconite-contact">
<a href="#"><img src="/wp-content/themes/iqon/images/twitter.png" /></a>
<a href="#"><img src="/wp-content/themes/iqon/images/facebook.png" /></a>
<a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>/feed"><img src="/wp-content/themes/iqon/images/rss.png" /></a>
</div>
<?php } ?>
</div>
<?php break;} ?>
<div class="clear"></div>
</div>
<div id="linie-interior"></div>
<div id="content-footer-bottom">
<a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>" title="<?php bloginfo('name'); ?>">Home</a>
<?php if ($meniu) { ?>
<?php foreach ($meniu as $key=>$mainMenu) { ?>
| <a id="mainMenu_<?php echo $mainMenu->ID;?>" href="<?php echo $mainMenu->url; ?>" title="<?php echo $mainMenu->attr_title; ?>" <?php if ($mainMenu->selected) echo 'class="active"'; ?>><?php echo $mainMenu->title; ?></a>
<?php } ?>
<?php } ?>
<br />
<?php $domain = $_SERVER['SERVER_NAME'];
switch($domain) {
default :?>
<div id="copy">2011-2026 &copy; Copyright IQON. All rights reserved.</div>
<?php break;
case 'www.iqon.kz' :?>
<div id="copy">2016 &copy; Авторское IQON. Все права защищены.</div>
<?php break;} ?>
<div id="logo-bottom">
<a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/logo-footer.png" alt="<?php bloginfo('name'); ?>" /></a>
</div>
</div>
</div>
</div>
<?php include_once("analyticstracking.php") ?>
</body>
</html>
@@ -0,0 +1,484 @@
<?php
define('JS_URL', '/wp-content/themes/iqon/js');
define('CSS_URL', '/wp-content/themes/iqon/css');
define('IMAGE_URL', '/wp-content/themes/iqon/images');
register_nav_menus( array('principal' => 'Meniu principal') );
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size(208,142, true);
add_image_size('case-study', 435);
/*add_image_size('home-slider', 700, 495, true);
add_image_size('article-page', 320, 226, true);
add_image_size('listing-article', 160, 113, true);
add_image_size('product-image', 560, 420, false);
add_image_size('gallery', 9999, 600, false);
*/
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', ('https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js'), false, '3.7.1');
wp_register_script('jquery-ui', ('https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js'), array('jquery'), '1.13.2');
wp_enqueue_script('jquery-ui');
}
show_admin_bar(false);
add_editor_style();
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
automatic_feed_links(false);
if ( class_exists("global_posts_ordering") ) {
$global_posts_ordering = new global_posts_ordering(array("product"));
}
function image_src($img_tag)
{
preg_match("/src=\"(.*?)\"/i", $img_tag, $matches);
return $matches[1];
}
function short_text($text, $len=200, $puncte = ""){
$text = strip_tags($text);
if( (mb_strlen($text) > $len) ) {
$whitespaceposition = mb_strpos($text," ",$len)-1;
if( $whitespaceposition > 0 ) {
$chars = count_chars(mb_substr($text, 0, ($whitespaceposition+1)), 1);
if (isset($chars[ord('<')]) && $chars[ord('<')] > (isset($chars[ord('>')]) ? $chars[ord('>')] : 0))
$whitespaceposition = mb_strpos($text,">",$whitespaceposition)-1;
$text = mb_substr($text, 0, ($whitespaceposition+1));
}
// close unclosed html tags
if( preg_match_all("|<([a-zA-Z]+)|",$text,$aBuffer) ) {
if( !empty($aBuffer[1]) ) {
preg_match_all("|</([a-zA-Z]+)>|",$text,$aBuffer2);
if( count($aBuffer[1]) != count($aBuffer2[1]) ) {
foreach( $aBuffer[1] as $index => $tag ) {
if( empty($aBuffer2[1][$index]) || $aBuffer2[1][$index] != $tag)
$text .= '</'.$tag.'>';
}
}
}
}
}
return $text.$puncte;
}
/*
returneaza data in format:
- pt postare de azi 'azi la {ora}'
- pt anul asta, dar nu azi '{ziua} {luna} la {ora}
- pt alt an '{ziua} {luna} {anul} la {ora}
*/
function afiseaza_data($data=false)
{
if (!$data) return false;
// verifica daca este data in format corect
if (($data_timestamp = strtotime($data)) === false) {
// daca nu este corecta si nu am ce face cu ea returnez valoarea inapoi
return $data;
}
else {
//@setlocale(LC_TIME, 'ro_RO');
/*if (date("Y")==date("Y",$data_timestamp)) {
// acelasi an
if (date('d')==date('d',$data_timestamp)) {
// aceeasi zi
return strftime('azi la %H:%M',$data_timestamp);
}
else
{
// zi diferite
return strftime('%d %b la %H:%M',$data_timestamp);
}
}
else {
// ani diferiti
return strftime('%d %b %Y la %H:%M',$data_timestamp);
}*/
return strftime("%b %d",$data_timestamp);
}
}
function afiseaza_data_cu_an($data=false)
{
if (!$data) return false;
// verifica daca este data in format corect
if (($data_timestamp = strtotime($data)) === false) {
// daca nu este corecta si nu am ce face cu ea returnez valoarea inapoi
return $data;
}
else {
//@setlocale(LC_TIME, 'ro_RO');
/*if (date("Y")==date("Y",$data_timestamp)) {
// acelasi an
if (date('d')==date('d',$data_timestamp)) {
// aceeasi zi
return strftime('azi la %H:%M',$data_timestamp);
}
else
{
// zi diferite
return strftime('%d %b la %H:%M',$data_timestamp);
}
}
else {
// ani diferiti
return strftime('%d %b %Y la %H:%M',$data_timestamp);
}*/
return strftime("%b %d, %Y",$data_timestamp);
}
}
function arrangeMenuIqon($menu, $selected_object_id = 0, $selected_object_type, $homeID) {
global $object_id, $object_id_child, $object_id_child_child;
$arranged_menu = array();
$mainLevel = array();
$secondLevel = array();
$thirdLevel = array();
foreach ($menu as $m)
if ($m->menu_item_parent == 0) {
$key = $m->ID;
$arranged_menu[$key] = new stdClass;
$arranged_menu[$key]->ID = $m->ID;
$arranged_menu[$key]->object_id = $m->object_id;
$arranged_menu[$key]->object_id_en = function_exists('icl_object_id') ? icl_object_id($m->object_id, $m->object, true, 'en') : $m->object_id;
$arranged_menu[$key]->parrent = 0;
$arranged_menu[$key]->title = $m->title;
$arranged_menu[$key]->attr_title = $m->attr_title;
$arranged_menu[$key]->object = $m->object;
if (empty($arranged_menu[$key]->attr_title)) $arranged_menu[$key]->attr_title = $arranged_menu[$key]->title;
$arranged_menu[$key]->url = $m->url;
$arranged_menu[$key]->has_childrens = false;
$arranged_menu[$key]->selected = false;
if ($selected_object_type == 'home') {
if ($selected_object_id == $arranged_menu[$key]->object_id_en && $m->object == 'page')
$arranged_menu[$key]->selected = true;
$object_id = $key;
}
elseif ($selected_object_type == $m->object && $selected_object_id == $m->object_id) {
$arranged_menu[$key]->selected = true;
$object_id = $key;
}
$mainLevel[] = $m->ID;
}
elseif (in_array($m->menu_item_parent, $mainLevel)) {
$key_parent = $m->menu_item_parent;
$arranged_menu[$key_parent]->has_childrens = true;
$key_child = $m->ID;
$objectToModify = &$arranged_menu[$key_parent]->childrens;
$objectToModify[$key_child] = new stdClass;
$objectToModify[$key_child]->ID = $m->ID;
$objectToModify[$key_child]->object_id = $m->object_id;
$objectToModify[$key_child]->object_id_en = function_exists('icl_object_id') ? icl_object_id($m->object_id, $m->object, true, 'en') : $m->object_id;
$objectToModify[$key_child]->parrent = $key_parent;
$objectToModify[$key_child]->title = $m->title;
$objectToModify[$key_child]->attr_title = $m->attr_title;
$objectToModify[$key_child]->object = $m->object;
if (empty($objectToModify[$key_child]->attr_title)) $objectToModify[$key_child]->attr_title = $objectToModify[$key_child]->title;
$objectToModify[$key_child]->url = $m->url;
if (($arranged_menu[$key_parent]->object_id_en == 8) && sizeof($arranged_menu[$key_parent]->childrens) == 1) $arranged_menu[$key_parent]->url = $objectToModify[$key_child]->url;
$objectToModify[$key_child]->selected = false;
if ($selected_object_type == $m->object && $selected_object_id == $m->object_id) {
$objectToModify[$key_child]->selected = true;
$arranged_menu[$key_parent]->selected = true;
$object_id = $key_parent;
$object_id_child = $key_child;
}
$objectToModify[$key_child]->has_childrens = false;
$secondLevel[] = $m->ID;
if ($arranged_menu[$key_parent]->object_id_en == 8) {
wp_reset_query();
$args_pages = array('post_type' => 'page', 'order' => 'ASC', 'orderby' => 'menu_order', 'post_status' => 'publish', 'nopaging' => true, 'post_parent' => $objectToModify[$key_child]->object_id);
$pages = query_posts($args_pages);
//dv($pages);
if ($pages) {
$objectToModifyChild = &$objectToModify[$key_child]->childrens;
$objectToModify[$key_child]->has_childrens = true;
foreach ($pages as $p) {
$key_child_child = $p->ID;
$objectToModifyChild[$key_child_child] = new stdClass;
$objectToModifyChild[$key_child_child]->ID = $p->ID;
$objectToModifyChild[$key_child_child]->object_id = $p->ID;
$objectToModifyChild[$key_child_child]->object_id_en = function_exists('icl_object_id') ? icl_object_id($p->ID, $p->post_type, true, 'en') : $p->ID;
$objectToModifyChild[$key_child_child]->parrent = $key_child;
$objectToModifyChild[$key_child_child]->title = $p->post_title;
$objectToModifyChild[$key_child_child]->attr_title = $p->post_title;
$objectToModifyChild[$key_child_child]->object = $p->post_type;
$objectToModifyChild[$key_child_child]->url = get_permalink($p->ID);
$objectToModifyChild[$key_child_child]->selected = false;
if ($selected_object_type == $p->post_type && $selected_object_id == $p->ID) {
$objectToModifyChild[$key_child_child]->selected = true;
$objectToModify[$key_child]->selected = true;
$arranged_menu[$key_parent]->selected = true;
$object_id = $key_parent;
$object_id_child = $key_child;
$object_id_child_child = $key_child_child;
}
$objectToModifyChild[$key_child_child]->has_childrens = false;
}
}
wp_reset_query();
}
unset($objectToModify);
}
return $arranged_menu;
}
function arrangeMenu($menu, $selected_object_id = 0, $selected_object_type, $homeID) {
global $object_id, $object_id_child, $object_id_child_child;
$arranged_menu = array();
// get level 1 menus
foreach ($menu as $m)
if ($m->menu_item_parent == 0) {
$i = $m->ID;
$arranged_menu[$i] = new stdClass;
$arranged_menu[$i]->ID = $m->ID;
$arranged_menu[$i]->object_id = $m->object_id;
$arranged_menu[$i]->title = $m->title;
$arranged_menu[$i]->attr_title = $m->attr_title;
if (empty($arranged_menu[$i]->attr_title)) $arranged_menu[$i]->attr_title = $arranged_menu[$i]->title;
$arranged_menu[$i]->parrent = 0;
$arranged_menu[$i]->url = $m->url;
$arranged_menu[$i]->selected = false;
if ($selected_object_id == $m->object_id) {
$object_id = $i;
$arranged_menu[$i]->selected = true;
}
$arranged_menu[$i]->has_childrens = false;
}
if ($selected_object_type == 'home') $arranged_menu[$homeID]->selected = true;
return $arranged_menu;
}
function dv($var, $var_type = '') {
dump_var($var, $var_type);
}
function dump_var($var, $var_type = '') {
$ip=$_SERVER['REMOTE_ADDR'];
$local=false;
//if(preg_match("/192\.168\.([0-9]+)\.([0-9]+)/", $ip))$local=true;
//if(preg_match("/10\.([0-9]+)\.([0-9]+)\.([0-9]+)/", $ip))$local=true;
if($ip == "89.36.30.26") $local=true;
$local=true;
$rand = rand(0,9999);
echo "<div id='dv_".$rand."' style='position:absolute; z-index:10000; top:0; left:0;' onclick='document.getElementById(\"dv_".$rand."\").style.display=\"none\";'>";
if($local==true) {
print_var($var, $var_type);
}
echo "</div>";
}
function print_var(&$var, $var_type, $return=false)
{
global $html;
$html="<style>
.printvar {
background-color: #fdf8db;
border: 1px dashed #000;
padding:10px;
width: 90%;
word-wrap: break-word;
margin-left:auto;
margin-right:auto;
}
.printvar *{
color:#000;
font-size:12px;
font-family:Courier New;
align:left;
}
.printvar .var {
color: #0066CC;
}
.printvar .string {
color: #DD0000;
}
.printvar .numeric {
color: #0000BB;
}
.printvar .object {
color: #0080FF;
}
.printvar .button {
width:10px;
height:10px;
cursor:pointer;
}
</style>
<script>
function showHidePrintVar(id) {
elem = document.getElementById(id);
img = document.getElementById('img'+id);
if(elem.style.display=='none') {
elem.style.display='block';
} else {
elem.style.display='none';
}
}
</script>
<div class='printvar'>";
if(!isset($var))$var="%NULL%";
$old = $var;
$var = '0unique'.rand().'value';
$var_name = array_search($var, $GLOBALS, true);
$var=$old;
if($var_name) {
print_content($var, "$".$var_name, 1, "$".$var_name);
} else {
print_content($var, $var_type, 1, $var_type);
}
$html.="</div>";
if($return)return $html;
else echo $html;
}
function print_content($var, $var_name, $level, $parent) {
if(!isset($var))$var="%NULL%";
global $html;
for($i=0;$i<$level;$i++)$html.="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
if(strpos($var_name, "$")===0) {
$html.="<span class='var'>$var_name</span> = ";
} elseif(strpos($parent, "->$var_name")==strlen($parent)-strlen($var_name)-2) {
$html.="-><span title=\"$parent\" class='object'>$var_name</span> = ";
} else {
$html.="[";
if(is_numeric($var_name)) {
$html.="<span title=\"$parent\" onclick=\"prompt('Path:','".addslashes($parent)."');\" class='numeric'>$var_name</span>";
} else {
$html.="<span title=\"$parent\" onclick=\"prompt('Path:','".addslashes($parent)."');\" class='string'>\"$var_name\"</span>";
}
$html.="] = ";
}
if(is_array($var)) {
$id=base64_encode(microtime());
$html.=" Array <span onclick=\"showHidePrintVar('$id');\" class='button'></span> {<br/>";
$html.="<div id='$id'>";
foreach ($var as $k=>$v) {
print_content($v, $k, $level+1, $parent."['$k']");
}
$html.="</div>";
for($i=0;$i<$level;$i++)$html.="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$html.=" }<br/>";
} elseif(is_object($var)) {
$id=base64_encode(microtime());
$html.=" Object <span onclick=\"showHidePrintVar('$id');\" class='button'><img id='img$id' src='".IMGURL."close.png' width='10px' height='10px' /></span> {<br/>";
$html.="<div id='$id'>";
foreach ($var as $k=>$v) {
print_content($v, $k, $level+1, $parent."->$k");
}
$html.="</div>";
for($i=0;$i<$level;$i++)$html.="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$html.=" }<br/>";
} else {
if (is_string($var)) {
$var=htmlentities($var, ENT_QUOTES, "UTF-8");
}
if(is_numeric($var)) {
$html.="<span class='numeric'>$var</span>;<br/>";
} elseif($var=="%NULL%") {
$html.="<span class='numeric'>NULL</span>;<br/>";
} else {
$html.="<span class='string'>\"$var\"</span>;<br/>";
}
}
}
function fileVersion($filename) {
//check if the file exists
if (file_exists($filename)) {
// return the time the file was last modified
echo filemtime($filename);
} else {
// let them know the file wasn't found
echo 'FileNotFound';
}
}
// IQON legacy live hardening, 2026-05-20.
function iqon_legacy_security_headers() {
if (headers_sent()) return;
header("X-Content-Type-Options: nosniff");
header("X-Frame-Options: SAMEORIGIN");
header("Referrer-Policy: strict-origin-when-cross-origin");
header("Permissions-Policy: camera=(), microphone=(), geolocation=()");
}
add_action("send_headers", "iqon_legacy_security_headers", 100);
add_filter("xmlrpc_enabled", "__return_false");
function iqon_legacy_restrict_rest_users($endpoints) {
if (isset($endpoints["/wp/v2/users"])) unset($endpoints["/wp/v2/users"]);
if (isset($endpoints["/wp/v2/users/(?P<id>[\\d]+)"])) unset($endpoints["/wp/v2/users/(?P<id>[\\d]+)"]);
return $endpoints;
}
add_filter("rest_endpoints", "iqon_legacy_restrict_rest_users", 20);
function iqon_legacy_site_name($name = "") {
return "IQON";
}
add_filter("wpseo_opengraph_site_name", "iqon_legacy_site_name", 20);
function iqon_legacy_title($title) {
if (function_exists("is_front_page") && is_front_page()) return "IQON | IT Strategy and Transformation Consulting";
return $title;
}
add_filter("wpseo_title", "iqon_legacy_title", 20);
add_filter("wpseo_opengraph_title", "iqon_legacy_title", 20);
function iqon_legacy_metadesc($description) {
if (function_exists("is_front_page") && is_front_page()) return "IQON helps organizations align IT strategy, transformation programs, and governance with measurable business outcomes.";
return $description;
}
add_filter("wpseo_metadesc", "iqon_legacy_metadesc", 20);
add_filter("wpseo_opengraph_desc", "iqon_legacy_metadesc", 20);
function iqon_legacy_https_url($value) {
if (!is_string($value)) return $value;
return str_replace(
array("http://www.iqon.com", "http://iqon.com", "http://maps.google.com", "http://maps.googleapis.com", "http:\\/\\/www.iqon.com", "http:\\/\\/iqon.com", "http:\\/\\/maps.google.com", "http:\\/\\/maps.googleapis.com", "\"name\":\"- IQON\"", "property=\"og:title\" content=\"Hows business?\"", "\"name\":\"Hows business?\""),
array("https://www.iqon.com", "https://iqon.com", "https://maps.google.com", "https://maps.googleapis.com", "https:\\/\\/www.iqon.com", "https:\\/\\/iqon.com", "https:\\/\\/maps.google.com", "https:\\/\\/maps.googleapis.com", "\"name\":\"IQON\"", "property=\"og:title\" content=\"IQON | IT Strategy and Transformation Consulting\"", "\"name\":\"IQON | IT Strategy and Transformation Consulting\""),
$value
);
}
add_filter("wpseo_opengraph_image", "iqon_legacy_https_url", 20);
function iqon_legacy_rewrite_recursive_urls($data) {
if (is_string($data)) return iqon_legacy_https_url($data);
if (is_array($data)) {
foreach ($data as $key => $value) $data[$key] = iqon_legacy_rewrite_recursive_urls($value);
}
return $data;
}
add_filter("wpseo_json_ld_output", "iqon_legacy_rewrite_recursive_urls", 20);
function iqon_legacy_output_buffer_start() {
if (is_admin()) return;
ob_start("iqon_legacy_https_url");
}
add_action("template_redirect", "iqon_legacy_output_buffer_start", 0);
?>
@@ -0,0 +1,139 @@
<?php session_start(); ?>
<?php
global $selected_object_id, $selected_object_type, $meniu, $object_id, $object_id_child, $object_id_child_child, $ascunde_services, $selected_department, $selected_department_name;
wp_reset_query();
$languages = function_exists('icl_get_languages')?icl_get_languages():array();
if (is_page()) {
$selected_object_id = get_the_ID();
$selected_object_type = 'page';
$imagine_header = get_post_meta($selected_object_id, 'wpcf-header-image', true);
$header_link = get_post_meta($selected_object_id, 'wpcf-header-link', true);
if (is_page(array(70, function_exists('icl_object_id') ? icl_object_id(70, 'page', false) : 70))) {
$selected_object_type = 'home';
}
}
else if (is_category()) {
$ascunde_services = true;
$selected_object_id = get_cat_id(single_term_title("", false));
//dv($selected_object_id);
//dv(get_term_by('id', $selected_object_id, 'category'));
$selected_object_type = 'category';
if ($selected_object_id == 1 || $selected_object_id == 25 || $selected_object_id == 26) $imagine_header = '/wp-content/uploads/2012/05/header-case-study.png';
else {
$imagine_header = '/wp-content/uploads/2012/05/header-careers.png';
$selected_department = $selected_object_id;
$selected_department_name = get_term_by('id', $selected_object_id, 'category')->name;
$selected_object_id = get_term_by('id', $selected_object_id, 'category')->parent;
}
}
else if (is_single()) {
$ascunde_services = true;
if (get_queried_object()->post_type == 'post') {
$taxonomy = get_the_terms(get_the_ID(),'category');
$selected_object_type = 'category';
$title_bread = get_queried_object()->post_title;
if ($taxonomy[1]->term_id == 1) $selected_object_id = 1;
else {
$pas = 0;
foreach ($taxonomy as $tax) {
$pas++;
if ($pas==1) {
$selected_object_id = $tax->term_id;
}
else {
$selected_department = $tax->term_id;
$selected_department_name = $tax->name;
}
}
}
}
}
else if (is_search()) {
}
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php if (!defined('WPSEO_VERSION')) { ?><title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?> | <?php bloginfo('description'); ?></title><?php } ?>
<?php wp_head(); ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/style.css?v=<?php fileVersion(ABSPATH.CSS_URL.'/style.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/fonts/fonts.css?v=<?php fileVersion(ABSPATH.CSS_URL.'/fonts/fonts.css'); ?>" />
<?php if ($selected_object_id == 12 && $selected_object_type == 'page') { ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/jquery.realperson.css?v=<?php fileVersion(ABSPATH.CSS_URL.'/jquery.realperson.css'); ?>" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.realperson.min.js?v=<?php fileVersion(ABSPATH.JS_URL.'/jquery.realperson.min.js'); ?>"></script>
<?php } ?>
</head>
<body>
<a class="skip-link" href="#content">Skip to content</a>
<div id="line" class="<?php if ($selected_object_type == 'home') { ?>line-homepage<?php }?>"></div>
<div id="wrapper">
<div id="header">
<div id="logo">
<a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" /></a>
</div>
<div id="search">
<form action="<?php bloginfo('url'); ?>" method="GET" id="searchForm">
<input type="text" value="<?php echo isset($_GET['s']) ? $_GET['s'] : '';?>" data-default="Search" name="s" />
<input type="submit" value="GO" class="submit" />
</form>
</div>
<?php
function language_selector_flags(){
$languages = function_exists('icl_get_languages') ? icl_get_languages('skip_missing=0&orderby=code') : array();
if(!empty($languages)){
foreach($languages as $l){
if(!$l['active']) echo '<a href="'.$l['url'].'">';
echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" /> ';
if(!$l['active']) echo '</a>';
}
}
}
?>
<div id="flags_language_selector" style="margin:10px;text-align:right"><?php language_selector_flags(); ?></div >
</div>
<div id="menu"><?php include 'meniu.php'; ?></div>
<?php if ($selected_object_type == 'home') { ?>
<div id="header-image-home">
<?php if ($header_link) { ?><a href="<?=$header_link;?>"><?php } ?>
<img src="<?=$imagine_header;?>" alt="IQON" />
<?php if ($header_link) { ?></a><?php } ?>
</div>
<?php } else { ?>
<div id="breadcrumb">
&raquo; <a href="<?php echo function_exists('icl_get_home_url') ? icl_get_home_url() : home_url(); ?>" title="IQON">Home</a>
<?php if ($object_id) { ?>
/ <a href="<?php echo $meniu[$object_id]->url;?>" <?php if (!$object_id_child) echo 'class="last"'; ?>><?php echo $meniu[$object_id]->title;?></a>
<?php } ?>
<?php if ($object_id_child) { ?>
/ <a href="<?php echo $meniu[$object_id]->childrens[$object_id_child]->url;?>"><?php echo $meniu[$object_id]->childrens[$object_id_child]->title;?></a>
<?php } ?>
<?php if ($object_id_child_child) { ?>
/ <a href="<?php echo $meniu[$object_id]->childrens[$object_id_child]->childrens[$object_id_child_child]->url;?>"><?php echo $meniu[$object_id]->childrens[$object_id_child]->childrens[$object_id_child_child]->title;?></a>
<?php } ?>
<?php if (!empty($selected_department_name)) { ?>
/ <?php if (empty($title_bread)) { ?><strong><?php echo $selected_department_name; ?></strong><?php } else { ?><a href="<?php echo get_category_link($selected_department);?>"><?php echo $selected_department_name; ?></a><?php } ?>
<?php } ?>
<?php if (!empty($title_bread)) { ?>
/ <strong><?php echo $title_bread; ?></strong>
<?php } ?>
</div>
<div id="linie-interior"></div>
<?php if ($imagine_header) { ?>
<div id="header-image">
<img src="<?=$imagine_header;?>" alt="IQON" />
</div>
<?php } ?>
<?php } ?>
<?php if (!$ascunde_services) { ?>
<div id="menu-services">
<?php include 'meniu-services.php'; ?>
<div class="clear"></div>
</div>
<?php } ?>
<?php if ($imagine_header) { ?>
<div id="linie-interior" class="margintop10"></div>
<?php } ?>
<div id="content">