include('inc/conf.inc.php'); ?>
include('inc/db.inc.php'); ?>
include('inc/authorize.inc.php'); ?>
include('inc/session.inc.php'); ?>
include('inc/lang.inc.php'); ?>
include('inc/func.inc.php'); ?>
if($_GET['add_to_main']){
$res = mysql_query("SELECT id FROM ".$tbl."list_rel WHERE user_id = '".$user_id."' AND company_id = '".$_GET['id']."'");
if(mysql_num_rows($res) == 0){
$res = mysql_query("SELECT id FROM ".$tbl."list WHERE title = 'Main list' AND user_id = '".$user_id."'");
$row = mysql_fetch_array($res);
mysql_query("INSERT INTO ".$tbl."list_rel (`user_id`, `company_id`, `list_id`) VALUES('".$user_id."', '".$_GET['id']."', '".$row['id']."')");
}
}
/*Sitas greiciausiai nebenaudojamas
if($_GET['contact'] == 1){
$error = '';
if($_POST['sender_name'] == ''){
$error .= 'No sender name.\r\n';
}
if(!is_valid_email($_POST['sender_email'])){
$error .= 'Sender email not vadlid.\r\n';
}
if($_POST['sender_company'] == ''){
$error .= 'No sender company.\r\n';
}
if($_POST['message'] == ''){
$error .= 'No Message.\r\n';
}
if($error == ''){
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: <'.$_POST['sender_email'].'>' . "\r\n";
$body = 'This message was sent through WeldLit.eu system.
';
$body .= 'Sender name: '.$_POST['sender_name'].'
';
$body .= 'Sender email: '.$_POST['sender_email'].'
';
$body .= 'Sender company: '.$_POST['sender_company'].'
';
$body .= nl2br($_POST['message']);
mysql_query("INSERT INTO ".$tbl."inbox (`sender_name`, `sender_email`, `sender_company`, `user_id`, `email`, `message`, `date`) VALUES('".$_POST['sender_name']."', '".$_POST['sender_email']."', '".$_POST['sender_company']."', '".$_GET['id']."', '".$_POST['email']."', '".$_POST['message']."', NOW())");
//mail($_POST['email'], 'Message through WeldLit.eu', $body, $headers);
}
}
*/
$res = mysql_query("SELECT * FROM ".$tbl."user WHERE id = '".$_GET['id']."'");
$row = mysql_fetch_array($res);
$res_text = mysql_query("SELECT * FROM ".$tbl."text WHERE user_id = '".$row['id']."'");
while($row_text = mysql_fetch_array($res_text)){
$txt[$row_text['type']][$row_text['language']] = $row_text['text'];
}
$main_title = $row['company_name'].', '.$row['legal_form'].' | WeldLit.eu';
if($txt['1'][$sel_lang] == ''){ $main_desc = $txt['1']['en']; } else { $main_desc = $txt['1'][$sel_lang]; }
?>
include('inc/top.inc.php'); ?>
if(substr($row['website'], 0,4) != 'http'){ $row['website'] = 'http://'.$row['website']; }
?>
}else{?>
}?>
}?>
}?>
}?>
}?>
$res2 = mysql_query("SELECT * FROM ".$tbl."picture WHERE user = '".$row['id']."'");
if(mysql_num_rows($res2) != 0){?>
$i = 1;
while($row2 = mysql_fetch_array($res2)){
if($i == 1){?>}
elseif($i == 2){?> | }
elseif($i == 3){?> | }
elseif($i == 4){?> |
}
?>
30){?>...}else{?>}?>
if($i == 4){ $i = 1; }
$i = $i + 1;
}
if($i == 2){?> | | |
}
if($i == 3){?> | }
if($i == 4){?>}
?>
}
?>
$title = 'title_'.$sel_lang;
$text = 'text_'.$sel_lang;
$res2 = mysql_query("SELECT * FROM ".$tbl."equip WHERE user = '".$row['id']."'");
if(mysql_num_rows($res2) != 0){?>
while($row2 = mysql_fetch_array($res2)){
?>
}else{?>}?>
}else{?>}?>
|
}?>
|
}
?>
}?>
|
|
|
if($row['legal_form'] != ''){
?>
|
|
}
?>
|
}?>
}?>
}?>
}?>
}?>
}?>
|
|
|
}?>
if($row['turnover'] != '0'){
?>
|
|
}
?>
if($row['year_if_foundation'] != ''){
?>
|
|
}
?>
if($row['country'] != ''){
?>
|
|
}
?>
|
PDF |
$res2 = mysql_query("SELECT * FROM ".$tbl."assoc WHERE user = '".$row['id']."'");
if(mysql_num_rows($res2) != 0){
?>
|
$i = 0;
while($row2 = mysql_fetch_array($res2)){
if($i == 0){ $i = 1; }else{ echo ', '; }
echo $row2['title'];
}
?>
|
}
?>
$res2 = mysql_query("SELECT * FROM ".$tbl."cert WHERE user = '".$row['id']."' AND standart <> '' ORDER by id");
if(mysql_num_rows($res2) != 0){
?>
|
while($row2 = mysql_fetch_array($res2)){
?>
|
|
}
?>
}
?>
if($row['workshop_indoor'] != '' || $row['workshop_outdoor'] != '' || $row['closed_storage_area'] != '' || $row['open_storage_area'] != '' || $row['cranes_indoor_h'] != '' || $row['cranes_indoor_c'] != '' || $row['cranes_outdoor_h'] != '' || $row['cranes_outdoor_c'] != ''){?>
|
if($row['workshop_indoor'] != ''){
?>
|
|
}
?>
if($row['workshop_outdoor'] != ''){
?>
|
|
}
?>
if($row['closed_storage_area'] != ''){
?>
|
|
}
?>
if($row['open_storage_area'] != ''){
?>
|
|
}
?>
if($row['cranes_indoor_h'] != '' || $row['cranes_indoor_c'] != ''){
?>
|
if($row['cranes_indoor_h'] != ''){
?>
: |
(m) |
}
?>
if($row['cranes_indoor_c'] != ''){
?>
: |
(t) |
}
?>
|
}
?>
if($row['cranes_outdoor_h'] != '' || $row['cranes_outdoor_c'] != ''){
?>
|
if($row['cranes_outdoor_h'] != ''){
?>
: |
(m) |
}
?>
if($row['cranes_outdoor_c'] != ''){
?>
: |
(t) |
}
?>
|
}
?>
}?>
}?>
$res2 = mysql_query("SELECT title, date, id FROM ".$tbl."news WHERE company_id = '".$_GET['id']."' ORDER by date DESC LIMIT 0, 3");
if(mysql_num_rows($res2) != 0){
?>
Latest news |
while($row2 = mysql_fetch_array($res2)){
?>
}?>
|
|
}?>
$title = 'title';
if($sel_lang != 'en'){ $title .= '_'.$sel_lang; }
$res2 = mysql_query("SELECT A.".$title." AS title, A.id AS id FROM ".$tbl."categ AS A, ".$tbl."categ_rel AS B WHERE B.user_id = '".$_GET['id']."' AND A.id = B.categ_id");
if(mysql_num_rows($res2) != 0){
?>
|
while($row2 = mysql_fetch_array($res2)){
?>
}?>
|
|
$tag = 'tag';
if($sel_lang != 'en'){ $tag .= '_'.$sel_lang; }
$res2 = mysql_query("SELECT A.".$tag." AS tag, A.id AS id FROM ".$tbl."tag AS A, ".$tbl."tag_rel AS B WHERE B.user_id = '".$_GET['id']."' AND A.id = B.tag_id AND A.main = '1'");
while($row2 = mysql_fetch_array($res2)){
?>
}?>
|
|
}?>
include('inc/btm.inc.php'); ?>