<?php
	require("header.php");
	require("connect.php");

?>
<style>
/*#main_tbl{
    width:80em;
    margin:0 auto;
}*/
#main_tbl input{
    width:100%;
}
#main_tbl td{
	min-width:50px;
}
#main_tbl{
    width:99%;
    margin:0 auto;
}
/*#prod_input{
    width:250px !important;
}
#prod_show{
    margin-left:5px;
    width:40px !important;
}
#prod_box{
    position:absolute;
    z-index:999;
    background-color:white;
    height:15%;
    overflow:hidden;
    width:100%;
}
#prod_box_close{
    position:absolute;
    padding:4px 9px 4px 9px;
    z-index:99;
    left:0px;
    cursor:pointer;
    background-color:#5d5d5d !important;
    color:#e3e3e3;
    border-radius:3px;
}
#prod_box_close:hover{
   background-color: #930000 !important;
}
#prod_box_topbar{
    height:28px;
    background-color:#dadada;
    border-radius:2px;
}
#prod_box_content{
	height:100%;
	overflow-x:hidden;
    overflow-y:scroll;
}
#prod_box td{
    max-width:250px;
}
#prod_box input:not([type='button']){
    width:50px;
}*/
</style>
<!-- <script>
$(document).ready(function(){
	$('#prod_show').on('click',function(){
		$('#prod_box_content').load('products_list.php');
		$('#prod_box').draggable();
		$('#prod_box').show();
	})

	$('#prod_box_close').on('click', function(){
		$('#prod_box').hide();
	})
})
</script> -->
<?php 
$qq = "SELECT * FROM visit WHERE KodPel=".$_GET['cID'];
$rr = mysqli_query($dbC, $qq);
$usr_exists = (mysqli_num_rows($rr)==0) ? false : true;
	if(isset($_POST['submit'])){
		if(!$usr_exists){
			$qry = "INSERT INTO visit (KodPel,onoma_epixeirishs,episk_followup,taktikh_episkepsh,emporio_epiplo,emporio_kouzina,emporio_kathistiko,emporio_office,kataskeuasths_epiplo,kataskeuasths_kouzina,kataskeuasths_kathistiko,
			kataskeuasths_office,eidh_diakosmhshs,eidh_oikiak_eksoplismou,ualika,targetgroup_high,targetgroup_med,targetgroup_low,targetgroup_DIY,address,city,nomos,AFM,DOY,email,thl,
			FAX,kinhto,www,website,contact_person,company_position,arithm_ergaz,arithm_katasthm,shop_address1,shop_address2,tetragwnika_katast1,tetragwnika_katast2,tziros,ad_paper,ad_radio,ad_internet,
			ad_other,competitor1,competitor2,like_suntheta,like_kanapedes,like_trapezaria,like_krebatokamara,like_home_office,like_accessories,catalog_like,prices,action_b2b,action_no_net,action_will_visit_again,action_ameses_agores,
			action_will_shop_later,client_comments,seller_comment)
			VALUES ('".$_GET['cID']."','".$_POST['onoma_epixeirishs']."','".$_POST['episk_followup']."','".$_POST['taktikh_episkepsh']."','".$_POST['emporio_epiplo']."','".$_POST['emporio_kouzina']."','".$_POST['emporio_kathistiko']."','".$_POST['emporio_office']."','".$_POST['kataskeuasths_epiplo']."','".$_POST['kataskeuasths_kouzina']."','".$_POST['kataskeuasths_kathistiko']."','".$_POST['kataskeuasths_office']."','".$_POST['eidh_diakosmhshs']."','".$_POST['eidh_oikiak_eksoplismou']."','".$_POST['ualika']."','".$_POST['targetgroup_high']."','".$_POST['targetgroup_med']."','".$_POST['targetgroup_low']."','".$_POST['targetgroup_DIY']."','".$_POST['address']."','".$_POST['city']."','".$_POST['nomos']."','".$_POST['AFM']."','".$_POST['DOY']."','".$_POST['email']."','".$_POST['thl']."','".$_POST['FAX']."','".$_POST['kinhto']."','".$_POST['www']."','".$_POST['website']."','".$_POST['contact_person']."','".$_POST['company_position']."','".$_POST['arithm_ergaz']."','".$_POST['arithm_katasthm']."','".$_POST['shop_address1']."','".$_POST['shop_address2']."','".$_POST['tetragwnika_katast1']."','".$_POST['tetragwnika_katast2']."','".$_POST['tziros']."','".$_POST['ad_paper']."','".$_POST['ad_radio']."','".$_POST['ad_internet']."','".$_POST['ad_other']."','".$_POST['competitor1']."','".$_POST['competitor2']."','".$_POST['like_suntheta']."','".$_POST['like_kanapedes']."','".$_POST['like_trapezaria']."','".$_POST['like_krebatokamara']."','".$_POST['like_home_office']."','".$_POST['like_accessories']."','".$_POST['catalog_like']."','".$_POST['prices']."','".$_POST['action_b2b']."','".$_POST['action_no_net']."','".$_POST['action_will_visit_again']."','".$_POST['action_ameses_agores']."','".$_POST['action_will_shop_later']."','".$_POST['client_comments']."','".$_POST['seller_comment']."')";

			if(mysqli_query($dbC, $qry)){
				echo "<script>alert('Η ενέργεια ολοκληρώθηκε επιτυχώς!')</script>";
			} else {
				echo '<script>console.log("'.mysqli_error($dbC).'")</script>';
			}
		} else {
			$qry = "UPDATE visit SET KodPel='".$_GET['cID']."',onoma_epixeirishs='".$_POST['onoma_epixeirishs']."',episk_followup='".$_POST['episk_followup']."',taktikh_episkepsh='".$_POST['taktikh_episkepsh']."',emporio_epiplo='".$_POST['emporio_epiplo']."',emporio_kouzina='".$_POST['emporio_kouzina']."',emporio_kathistiko='".$_POST['emporio_kathistiko']."',emporio_office='".$_POST['emporio_office']."',kataskeuasths_epiplo='".$_POST['kataskeuasths_epiplo']."',kataskeuasths_kouzina='".$_POST['kataskeuasths_kouzina']."',kataskeuasths_kathistiko='".$_POST['kataskeuasths_kathistiko']."',kataskeuasths_office='".$_POST['kataskeuasths_office']."',eidh_diakosmhshs='".$_POST['eidh_diakosmhshs']."',eidh_oikiak_eksoplismou='".$_POST['eidh_oikiak_eksoplismou']."',ualika='".$_POST['ualika']."',targetgroup_high='".$_POST['targetgroup_high']."',targetgroup_med='".$_POST['targetgroup_med']."',targetgroup_low='".$_POST['targetgroup_low']."',targetgroup_DIY='".$_POST['targetgroup_DIY']."',address='".$_POST['address']."',city='".$_POST['city']."',nomos='".$_POST['nomos']."',AFM='".$_POST['AFM']."',DOY='".$_POST['DOY']."',email='".$_POST['email']."',thl='".$_POST['thl']."',FAX='".$_POST['FAX']."',kinhto='".$_POST['kinhto']."',www='".$_POST['www']."',website='".$_POST['website']."',contact_person='".$_POST['contact_person']."',company_position='".$_POST['company_position']."',arithm_ergaz='".$_POST['arithm_ergaz']."',arithm_katasthm='".$_POST['arithm_katasthm']."',shop_address1='".$_POST['shop_address1']."',shop_address2='".$_POST['shop_address2']."',tetragwnika_katast1='".$_POST['tetragwnika_katast1']."',tetragwnika_katast2='".$_POST['tetragwnika_katast2']."',tziros='".$_POST['tziros']."',ad_paper='".$_POST['ad_paper']."',ad_radio='".$_POST['ad_radio']."',ad_internet='".$_POST['ad_internet']."',ad_other='".$_POST['ad_other']."',competitor1='".$_POST['competitor1']."',competitor2='".$_POST['competitor2']."',like_suntheta='".$_POST['like_suntheta']."',like_kanapedes='".$_POST['like_kanapedes']."',like_trapezaria='".$_POST['like_trapezaria']."',like_krebatokamara='".$_POST['like_krebatokamara']."',like_home_office='".$_POST['like_home_office']."',like_accessories='".$_POST['like_accessories']."',catalog_like='".$_POST['catalog_like']."',prices='".$_POST['prices']."',action_b2b='".$_POST['action_b2b']."',action_no_net='".$_POST['action_no_net']."',action_will_visit_again='".$_POST['action_will_visit_again']."',action_ameses_agores='".$_POST['action_ameses_agores']."',
			action_will_shop_later='".$_POST['action_will_shop_later']."',client_comments='".$_POST['client_comments']."',seller_comment='".$_POST['seller_comment']."' WHERE KodPel=".$_GET['cID'];

			if(mysqli_query($dbC, $qry)){
				echo "<script>alert('Οι Αλλαγές αποθηκεύτηκαν επιτυχώς!')</script>";
			} else {
				echo '<script>console.log("'.mysqli_error($dbC).'")</script>';
			}
		}
		
	}

if(isset($_GET['cID'])){
	$qry = "SELECT * FROM customers WHERE customers_id=".$_GET['cID'];
	$res = mysqli_query($dbC,$qry) or die(mysql_error());
	$customer = '<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">';
	while($row=mysqli_fetch_array($res)){
		$customer.='<tr><th>ID</th><th>Επωνυμία</th></tr>
		<tr><td>'.$row['customers_id'].'</td>
		<td>'.$row['customers_lastname'].'</td></tr>
		<tr><th>Διεύθυνση</th><th>E-mail</th></tr>
		<tr><td>'.$row['customers_address'].'</td>
		<td>'.$row['customers_email_address'].'</td></tr>
		<tr><th>Τηλέφωνο</th><th>FAX</th></tr>
		<tr><td>'.$row['customers_telephone'].'</td>
		<td>'.$row['customers_fax'].'</td>
		</tr><tr><th>ΑΦΜ</th><th>ΔΟΥ</th></tr>
		<tr><td>'.$row['customers_AFM'].'</td>
		<td>'.$row['customers_doy'].'</td>
		</tr>';
	}
	$customer.='</tbody></table>';
	echo $customer;	
}
if($usr_exists){
	$row=mysqli_fetch_array($rr);
	echo '<form method="POST"><fieldset>
<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable" id="main_tbl">
<tr><td>ΟΝΟΜΑ ΕΠΙΧΕΙΡΙΣΗΣ<input type="text" name="onoma_epixeirishs" value="'.$row['onoma_epixeirishs'].'"/></td></tr>
<tr><td>ΕΠΙΣΚΕΨΗ FOLLOW UP <input type="checkbox" name="episk_followup" value="1" '.(($row['episk_followup']==1) ? 'checked' : '').'/></td></tr>
<tr><td>ΤΑΚΤΙΚΗ ΕΠΙΣΚΕΨΗ <input type="checkbox" name="taktikh_episkepsh" value="1" '.(($row['taktikh_episkepsh']==1) ? 'checked' : '').'/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="3">ΔΡΑΣΤΗΡΙΟΤΗΤΑ</th></tr>
		<tr><th>ΕΜΠΟΡΙΟ</th><td colspan="2"></td></tr>
		<tr><td></td><td>ΕΠΙΠΛΟ</td><td><input type="checkbox" name="emporio_epiplo" value="1" '.(($row['emporio_epiplo']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>ΚΟΥΖΙΝΑ</td><td><input type="checkbox" name="emporio_kouzina" value="1" '.(($row['emporio_kouzina']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>ΚΑΘΙΣΤΙΚΟ</td><td><input type="checkbox" name="emporio_kathistiko" value="1" '.(($row['emporio_kathistiko']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>OFFICE</td><td><input type="checkbox" name="emporio_office" value="1" '.(($row['emporio_office']==1) ? 'checked' : '').'/></td></tr>
		<tr><th>ΚΑΤΑΣΚΕΥΑΣΤΗΣ</th><td colspan="2"></td></tr>
		<tr><td></td><td>ΕΠΙΠΛΟ</td><td><input type="checkbox" name="kataskeuasths_epiplo" value="1" '.(($row['kataskeuasths_epiplo']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>ΚΟΥΖΙΝΑ</td><td><input type="checkbox" name="kataskeuasths_kouzina" value="1" '.(($row['kataskeuasths_kouzina']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>ΚΑΘΙΣΤΙΚΟ</td><td><input type="checkbox" name="kataskeuasths_kathistiko" value="1" '.(($row['kataskeuasths_kathistiko']==1) ? 'checked' : '').'/></td></tr>
		<tr><td></td><td>OFFICE</td><td><input type="checkbox" name="kataskeuasths_office" value="1" '.(($row['kataskeuasths_office']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΕΙΔΗ ΔΙΑΚΟΣΜΙΣΗΣ</td><td colspan="2"><input type="checkbox" name="eidh_diakosmhshs" value="1" '.(($row['eidh_diakosmhshs']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΕΙΔΗ ΟΙΚΙΑΚΟΥ ΕΞΟΠΛΙΣΜΟΥ</td><td colspan="2"><input type="checkbox" name="eidh_oikiak_eksoplismou" value="1" '.(($row['eidh_oikiak_eksoplismou']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΥΑΛΙΚΑ</td><td colspan="2"><input type="checkbox" name="ualika" value="1" '.(($row['ualika']==1) ? 'checked' : '').'/></td></tr>
	</table></td>
</tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΑΠΕΥΘΥΝΕΤΑΙ ΣΕ ΚΟΙΝΟ (TARGET GROUP)</th></tr>
		<tr><td>ΨΗΛΟ</td><td><input type="checkbox" name="targetgroup_high" value="1" '.(($row['targetgroup_high']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΜΕΣΑΙΟ</td><td><input type="checkbox" name="targetgroup_med" value="1" '.(($row['targetgroup_med']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΧΑΜΗΛΟ</td><td><input type="checkbox" name="targetgroup_low" value="1" '.(($row['targetgroup_low']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>DIY / ΠΟΛΥΚΑΤΑΣΤΗΜΑ</td><td><input type="checkbox" name="targetgroup_DIY" value="1" '.(($row['targetgroup_DIY']==1) ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΕΔΡΑ</th></tr>
		<tr><td>Δ/ΝΣΗ<input type="text" name="address" value="'.$row['address'].'"/></td></tr>
		<tr><td>ΠΟΛΗ<input type="text" name="city" value="'.$row['city'].'"/></td></tr>
		<tr><td>ΝΟΜΟΣ<input type="text" name="nomos" value="'.$row['nomos'].'"/></td></tr>
	</table>
</td></tr>
<tr><td>ΑΦΜ<input type="text" name="AFM" value="'.$row['AFM'].'"/></td></tr>
<tr><td>Δ.Ο.Υ.<input type="text" name="DOY" value="'.$row['DOY'].'"/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΣΤΟΙΧΕΙΑ ΕΠΙΚΟΙΝΩΝΙΑΣ</th></tr>
		<tr><td>e-mail<input type="text" name="email" value="'.$row['email'].'"/></td></tr>
		<tr><td>ΤΗΛ.<input type="text" name="thl" value="'.$row['thl'].'"/></td></tr>
		<tr><td>FAX<input type="text" name="FAX" value="'.$row['FAX'].'"/></td></tr>
		<tr><td>ΚΙΝΗΤΟ<input type="text" name="kinhto" value="'.$row['kinhto'].'"/></td></tr>
		<tr><td>www.<input type="text" name="www" value="'.$row['www'].'"/></td></tr>
	</table>
</td></tr>
<tr><td>Δ/ΝΣΗ ΙΝΤΕΡΝΕΤ (WEB SITE) ή FB<input type="text" name="website" value="'.$row['onoma_epixeirishs'].'"/></td></tr>
<tr><td>ΠΡΟΣΩΠΟ ΕΠΑΦΗΣ<input type="text" name="contact_person" value="'.$row['contact_person'].'"/></td></tr>
<tr><td>ΘΕΣΗ ΣΤΗΝ ΕΠΙΧΕΙΡΗΣΗ<input type="text" name="company_position" value="'.$row['company_position'].'"/></td></tr>
<tr><td>ΑΡΙΘΜΟΣ ΕΡΓΑΖΟΜΕΝΩΝ<input type="text" name="arithm_ergaz" value="'.$row['arithm_ergaz'].'"/></td></tr>
<tr><td>ΑΡΙΘΜΟΣ ΚΑΤΑΣΤΗΜΑΤΩΝ<input type="text" name="arithm_katasthm" value="'.$row['arithm_katasthm'].'"/></td></tr>
<tr><td>Δ/ΝΣΗ ΚΑΤΑΣΤΗΜΑΤΟΣ 1<input type="text" name="shop_address1" value="'.$row['shop_address1'].'"/></td></tr>
<tr><td>Δ/ΝΣΗ ΚΑΤΑΣΤΗΜΑΤΟΣ 2<input type="text" name="shop_address2" value="'.$row['shop_address2'].'"/></td></tr>
<tr><th>ΤΕΤΡΑΓΩΝΙΚΑ ΚΑΤΑΣΤΗΜΑΤΟΣ</th></tr>
<tr><td>ΚΑΤΑΣΤΗΜΑΤΟΣ 1<input type="text" name="tetragwnika_katast1" value="'.$row['tetragwnika_katast1'].'"/></td></tr>
<tr><td>ΚΑΤΑΣΤΗΜΑΤΟΣ 2<input type="text" name="tetragwnika_katast2" value="'.$row['tetragwnika_katast2'].'"/></td></tr>
<tr><td>ΤΖΙΡΟΣ ΕΠΙΧΕΙΡΗΣΗΣ<input type="text" name="tziros" value="'.$row['tziros'].'"/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΔΙΑΦΗΜΙΖΕΤΑΙ</th></tr>
		<tr><td>ΕΝΤΥΠΟ</td><td><input type="checkbox" name="ad_paper" value="1" '.(($row['ad_paper']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΡΑΔΙΟΦΩΝΟ</td><td><input type="checkbox" name="ad_radio" value="1" '.(($row['ad_radio']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>FB / INTERNET</td><td><input type="checkbox" name="ad_internet" value="1" '.(($row['ad_internet']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΆΛΛΟ</td><td><input type="checkbox" name="ad_other" value="1" '.(($row['ad_other']==1) ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΑΝΤΑΓΩΝΙΣΜΟΣ ΑΠΟ ΠΟΥ ΑΓΟΡΑΖΕΙ</th></tr>
		<tr><td>ΟΝΟΜΑ ΑΝΤΑΓΩΝΙΣΤΗ  1<input type="text" name="competitor1" value="'.$row['competitor1'].'"/></td></tr>
		<tr><td>ΟΝΟΜΑ ΑΝΤΑΓΩΝΙΣΤΗ  2<input type="text" name="competitor2" value="'.$row['competitor2'].'"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΠΟΙΕΣ ΚΑΤΗΓΟΡΙΕΣ ΠΡΟΙΟΝΤΩΝ ΑΡΕΣΑΝ</th></tr>
		<tr><td>ΣΥΝΘΕΤΑ</td><td><input type="checkbox" name="like_suntheta" value="1" '.(($row['like_suntheta']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΚΑΝΑΠΕΔΕΣ</td><td><input type="checkbox" name="like_kanapedes" value="1" '.(($row['like_kanapedes']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΤΡΑΠΕΖΑΡΙΑ</td><td><input type="checkbox" name="like_trapezaria" value="1" '.(($row['like_trapezaria']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΚΡΕΒΑΤΟΚΑΜΑΡΑ</td><td><input type="checkbox" name="like_krebatokamara" value="1" '.(($row['like_krebatokamara']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΗΟΜΕ OFFICE</td><td><input type="checkbox" name="like_home_office" value="1" '.(($row['like_home_office']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΑΞΕΣΟΥΑΡ</td><td><input type="checkbox" name="like_accessories" value="1" '.(($row['like_accessories']==1) ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΑΡΕΣΕ Ο ΚΑΤΑΛΟΓΟΣ ΜΑΣ</th></tr>
		<tr><td>ΝΑΙ</td><td><input type="checkbox" name="catalog_like" value="1" '.(($row['catalog_like']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΟΧΙ</td><td><input type="checkbox" name="catalog_like" value="2" '.(($row['catalog_like']==2) ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΠΩΣ ΕΙΔΕ ΤΙΣ ΤΙΜΕΣ ΜΑΣ</th></tr>
		<tr><td>ΚΑΛΕΣ</td><td><input type="checkbox" name="prices" value="good" '.(($row['prices']=='good') ? 'checked' : '').'/></td></tr>
		<tr><td>ΑΚΡΙΒΕΣ</td><td><input type="checkbox" name="prices" value="high" '.(($row['prices']=='high') ? 'checked' : '').'/></td></tr>
		<tr><td>ΣΤΑ ΠΛΑΙΣΙΑ ΤΗΣ ΑΓΟΡΑΣ</td><td><input type="checkbox" name="prices" value="normal" '.(($row['prices']=='normal') ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΕΠΟΜΕΝΗ ΚΙΝΗΣΗ</th></tr>
		<tr><td>ΑΝΟΙΓΜΑ ΚΩΔΙΚΟΥ B2B</td><td><input type="checkbox" name="action_b2b" value="1" '.(($row['action_b2b']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΔΕΝ ΕΧΕΙ Internet</td><td><input type="checkbox" name="action_no_net" value="1" '.(($row['action_no_net']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΘΑ ΤΟΝ ΕΠΙΣΚΕΦΤΟΥΜΕ ΞΑΝΑ</td><td><input type="checkbox" name="action_will_visit_again" value="1" '.(($row['action_will_visit_again']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΑΜΕΣΕΣ ΑΓΟΡΕΣ</td><td><input type="checkbox" name="action_ameses_agores" value="1" '.(($row['action_ameses_agores']==1) ? 'checked' : '').'/></td></tr>
		<tr><td>ΘΑ ΚΑΝΕΙ ΑΓΟΡΕΣ ΑΡΓΟΤΕΡΑ</td><td><input type="checkbox" name="action_will_shop_later" value="1" '.(($row['action_will_shop_later']==1) ? 'checked' : '').'/></td></tr>
	</table>
</td></tr>
<tr><td>ΣΧΟΛΙΑ ΠΕΛΑΤΗ - ΕΛΕΥΘΕΡΟ ΚΕΙΜΕΝΟ<input type="text" name="client_comments" value="'.$row['client_comments'].'"/></td></tr>
<tr><td>ΣΧΟΛΙΑ ΠΩΛΗΤΗ - ΕΛΕΥΘΕΡΟ ΚΕΙΜΕΝΟ<input type="text" name="seller_comment" value="'.$row['seller_comment'].'"/></td></tr>
<!-- <tr><td>ΠΡΟΙΟΝΤΑ&nbsp<input type="text" name="products" id="prod_input"/><input type="button" name="prod_show" id="prod_show" value="?" /></td></tr> -->
<tr><td colspan="2"><input type="file" name="fileupload" value="fileupload" id="fileupload"><label for="fileupload">ΦΩΤΟΓΡΑΦΙΕΣ ΣΕ ΕΠΙΣΥΝΑΨΗ - ΜΕΣΑΙΑΣ ΑΝΑΛΥΣΗΣ ΚΑΙ SAVE ΜΕ ΤΟ ΟΝΟΜΑ ΤΟΥ ΜΑΓΑΖΙΟΥ ΚΑΙ ΤΗΝ ΠΟΛΗ  Π.Χ  ΧΑΛΚΙΔΑ - ΚΡΙΜΑΤΟΓΛΟΥ 1 </label></td></tr>
<tr><td colspan="2"><input type="submit" name="submit" value="Καταχώρηση" /></td></tr>
</table>
</fieldset>
</form>';

} else {
	echo '<form method="POST">
<fieldset>
<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable" id="main_tbl">
<tr><td>ΟΝΟΜΑ ΕΠΙΧΕΙΡΙΣΗΣ<input type="text" name="onoma_epixeirishs"/></td></tr>
<tr><td>ΕΠΙΣΚΕΨΗ FOLLOW UP <input type="checkbox" name="episk_followup" value="1"/></td></tr>
<tr><td>ΤΑΚΤΙΚΗ ΕΠΙΣΚΕΨΗ <input type="checkbox" name="taktikh_episkepsh" value="1"/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="3">ΔΡΑΣΤΗΡΙΟΤΗΤΑ</th></tr>
		<tr><th>ΕΜΠΟΡΙΟ</th><td colspan="2"></td></tr>
		<tr><td></td><td>ΕΠΙΠΛΟ</td><td><input type="checkbox" name="emporio_epiplo" value="1"/></td></tr>
		<tr><td></td><td>ΚΟΥΖΙΝΑ</td><td><input type="checkbox" name="emporio_kouzina" value="1"/></td></tr>
		<tr><td></td><td>ΚΑΘΙΣΤΙΚΟ</td><td><input type="checkbox" name="emporio_kathistiko" value="1"/></td></tr>
		<tr><td></td><td>OFFICE</td><td><input type="checkbox" name="emporio_office" value="1"/></td></tr>
		<tr><th>ΚΑΤΑΣΚΕΥΑΣΤΗΣ</th><td colspan="2"></td></tr>
		<tr><td></td><td>ΕΠΙΠΛΟ</td><td><input type="checkbox" name="kataskeuasths_epiplo" value="1"/></td></tr>
		<tr><td></td><td>ΚΟΥΖΙΝΑ</td><td><input type="checkbox" name="kataskeuasths_kouzina" value="1"/></td></tr>
		<tr><td></td><td>ΚΑΘΙΣΤΙΚΟ</td><td><input type="checkbox" name="kataskeuasths_kathistiko" value="1"/></td></tr>
		<tr><td></td><td>OFFICE</td><td><input type="checkbox" name="kataskeuasths_office" value="1"/></td></tr>
		<tr><td>ΕΙΔΗ ΔΙΑΚΟΣΜΙΣΗΣ</td><td colspan="2"><input type="checkbox" name="eidh_diakosmhshs" value="1"/></td></tr>
		<tr><td>ΕΙΔΗ ΟΙΚΙΑΚΟΥ ΕΞΟΠΛΙΣΜΟΥ</td><td colspan="2"><input type="checkbox" name="eidh_oikiak_eksoplismou" value="1"/></td></tr>
		<tr><td>ΥΑΛΙΚΑ</td><td colspan="2"><input type="checkbox" name="ualika" value="1"/></td></tr>
	</table></td>
</tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΑΠΕΥΘΥΝΕΤΑΙ ΣΕ ΚΟΙΝΟ (TARGET GROUP)</th></tr>
		<tr><td>ΨΗΛΟ</td><td><input type="checkbox" name="targetgroup_high" value="1"/></td></tr>
		<tr><td>ΜΕΣΑΙΟ</td><td><input type="checkbox" name="targetgroup_med" value="1"/></td></tr>
		<tr><td>ΧΑΜΗΛΟ</td><td><input type="checkbox" name="targetgroup_low" value="1"/></td></tr>
		<tr><td>DIY / ΠΟΛΥΚΑΤΑΣΤΗΜΑ</td><td><input type="checkbox" name="targetgroup_DIY" value="1"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΕΔΡΑ</th></tr>
		<tr><td>Δ/ΝΣΗ<input type="text" name="address"/></td></tr>
		<tr><td>ΠΟΛΗ<input type="text" name="city"/></td></tr>
		<tr><td>ΝΟΜΟΣ<input type="text" name="nomos"/></td></tr>
	</table>
</td></tr>
<tr><td>ΑΦΜ<input type="text" name="AFM"/></td></tr>
<tr><td>Δ.Ο.Υ.<input type="text" name="DOY"/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΣΤΟΙΧΕΙΑ ΕΠΙΚΟΙΝΩΝΙΑΣ</th></tr>
		<tr><td>e-mail<input type="text" name="email"/></td></tr>
		<tr><td>ΤΗΛ.<input type="text" name="thl"/></td></tr>
		<tr><td>FAX<input type="text" name="FAX"/></td></tr>
		<tr><td>ΚΙΝΗΤΟ<input type="text" name="kinhto"/></td></tr>
		<tr><td>www.<input type="text" name="www"/></td></tr>
	</table>
</td></tr>
<tr><td>Δ/ΝΣΗ ΙΝΤΕΡΝΕΤ (WEB SITE) ή FB<input type="text" name="website"/></td></tr>
<tr><td>ΠΡΟΣΩΠΟ ΕΠΑΦΗΣ<input type="text" name="contact_person"/></td></tr>
<tr><td>ΘΕΣΗ ΣΤΗΝ ΕΠΙΧΕΙΡΗΣΗ<input type="text" name="company_position"/></td></tr>
<tr><td>ΑΡΙΘΜΟΣ ΕΡΓΑΖΟΜΕΝΩΝ<input type="text" name="arithm_ergaz"/></td></tr>
<tr><td>ΑΡΙΘΜΟΣ ΚΑΤΑΣΤΗΜΑΤΩΝ<input type="text" name="arithm_katasthm"/></td></tr>
<tr><td>Δ/ΝΣΗ ΚΑΤΑΣΤΗΜΑΤΟΣ 1<input type="text" name="shop_address1"/></td></tr>
<tr><td>Δ/ΝΣΗ ΚΑΤΑΣΤΗΜΑΤΟΣ 2<input type="text" name="shop_address2"/></td></tr>
<tr><th>ΤΕΤΡΑΓΩΝΙΚΑ ΚΑΤΑΣΤΗΜΑΤΟΣ</th></tr>
<tr><td>ΚΑΤΑΣΤΗΜΑΤΟΣ 1<input type="text" name="tetragwnika_katast1"/></td></tr>
<tr><td>ΚΑΤΑΣΤΗΜΑΤΟΣ 2<input type="text" name="tetragwnika_katast2"/></td></tr>
<tr><td>ΤΖΙΡΟΣ ΕΠΙΧΕΙΡΗΣΗΣ<input type="text" name="tziros"/></td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΔΙΑΦΗΜΙΖΕΤΑΙ</th></tr>
		<tr><td>ΕΝΤΥΠΟ</td><td><input type="checkbox" name="ad_paper" value="1"/></td></tr>
		<tr><td>ΡΑΔΙΟΦΩΝΟ</td><td><input type="checkbox" name="ad_radio" value="1"/></td></tr>
		<tr><td>FB / INTERNET</td><td><input type="checkbox" name="ad_internet" value="1"/></td></tr>
		<tr><td>ΆΛΛΟ</td><td><input type="checkbox" name="ad_other" value="1"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th>ΑΝΤΑΓΩΝΙΣΜΟΣ ΑΠΟ ΠΟΥ ΑΓΟΡΑΖΕΙ</th></tr>
		<tr><td>ΟΝΟΜΑ ΑΝΤΑΓΩΝΙΣΤΗ  1<input type="text" name="competitor1"/></td></tr>
		<tr><td>ΟΝΟΜΑ ΑΝΤΑΓΩΝΙΣΤΗ  2<input type="text" name="competitor2"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΠΟΙΕΣ ΚΑΤΗΓΟΡΙΕΣ ΠΡΟΙΟΝΤΩΝ ΑΡΕΣΑΝ</th></tr>
		<tr><td>ΣΥΝΘΕΤΑ</td><td><input type="checkbox" name="like_suntheta" value="1"/></td></tr>
		<tr><td>ΚΑΝΑΠΕΔΕΣ</td><td><input type="checkbox" name="like_kanapedes" value="1"/></td></tr>
		<tr><td>ΤΡΑΠΕΖΑΡΙΑ</td><td><input type="checkbox" name="like_trapezaria" value="1"/></td></tr>
		<tr><td>ΚΡΕΒΑΤΟΚΑΜΑΡΑ</td><td><input type="checkbox" name="like_krebatokamara" value="1"/></td></tr>
		<tr><td>ΗΟΜΕ OFFICE</td><td><input type="checkbox" name="like_home_office" value="1"/></td></tr>
		<tr><td>ΑΞΕΣΟΥΑΡ</td><td><input type="checkbox" name="like_accessories" value="1"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΑΡΕΣΕ Ο ΚΑΤΑΛΟΓΟΣ ΜΑΣ</th></tr>
		<tr><td>ΝΑΙ</td><td><input type="checkbox" name="catalog_like" value="1"/></td></tr>
		<tr><td>ΟΧΙ</td><td><input type="checkbox" /></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΠΩΣ ΕΙΔΕ ΤΙΣ ΤΙΜΕΣ ΜΑΣ</th></tr>
		<tr><td>ΚΑΛΕΣ</td><td><input type="checkbox" name="price_good" value="1"/></td></tr>
		<tr><td>ΑΚΡΙΒΕΣ</td><td><input type="checkbox" name="price_high" value="1"/></td></tr>
		<tr><td>ΣΤΑ ΠΛΑΙΣΙΑ ΤΗΣ ΑΓΟΡΑΣ</td><td><input type="checkbox" name="price_normal" value="1"/></td></tr>
	</table>
</td></tr>
<tr><td>
	<table class="table table-striped table-bordered bootstrap-datatable datatable dataTable">
		<tr><th colspan="2">ΕΠΟΜΕΝΗ ΚΙΝΗΣΗ</th></tr>
		<tr><td>ΑΝΟΙΓΜΑ ΚΩΔΙΚΟΥ B2B</td><td><input type="checkbox" name="action_b2b" value="1"/></td></tr>
		<tr><td>ΔΕΝ ΕΧΕΙ Internet</td><td><input type="checkbox" name="action_no_net" value="1"/></td></tr>
		<tr><td>ΘΑ ΤΟΝ ΕΠΙΣΚΕΦΤΟΥΜΕ ΞΑΝΑ</td><td><input type="checkbox" name="action_will_visit_again" value="1"/></td></tr>
		<tr><td>ΑΜΕΣΕΣ ΑΓΟΡΕΣ</td><td><input type="checkbox" name="action_ameses_agores" value="1"/></td></tr>
		<tr><td>ΘΑ ΚΑΝΕΙ ΑΓΟΡΕΣ ΑΡΓΟΤΕΡΑ</td><td><input type="checkbox" name="action_will_shop_later" value="1"/></td></tr>
	</table>
</td></tr>
<tr><td>ΣΧΟΛΙΑ ΠΕΛΑΤΗ - ΕΛΕΥΘΕΡΟ ΚΕΙΜΕΝΟ<input type="text" name="client_comments"/></td></tr>
<tr><td>ΣΧΟΛΙΑ ΠΩΛΗΤΗ - ΕΛΕΥΘΕΡΟ ΚΕΙΜΕΝΟ<input type="text" name="seller_comment"/></td></tr>
<!-- <tr><td>ΠΡΟΙΟΝΤΑ&nbsp<input type="text" name="products" id="prod_input"/><input type="button" name="prod_show" id="prod_show" value="?" /></td></tr> -->
<tr><td colspan="2"><input type="file" name="fileupload" value="fileupload" id="fileupload"><label for="fileupload">ΦΩΤΟΓΡΑΦΙΕΣ ΣΕ ΕΠΙΣΥΝΑΨΗ - ΜΕΣΑΙΑΣ ΑΝΑΛΥΣΗΣ ΚΑΙ SAVE ΜΕ ΤΟ ΟΝΟΜΑ ΤΟΥ ΜΑΓΑΖΙΟΥ ΚΑΙ ΤΗΝ ΠΟΛΗ  Π.Χ  ΧΑΛΚΙΔΑ - ΚΡΙΜΑΤΟΓΛΟΥ 1 </label></td></tr>
<tr><td colspan="2"><input type="submit" name="submit" value="Καταχώρηση" /></td></tr>
</table>
</fieldset>
</form>';
}
?>
<!-- <div id="prod_box" style="display:none;">
	<div id="prod_box_topbar"><div id="prod_box_close">X</div></div>
	<div id="prod_box_content"></div>
</div> -->

