GetOne("SELECT fk_user_id FROM hosts_profiles WHERE id=".$delid); if ($owner==$user_id) { if ($ns=='') // an den zitise na svisei sigkekrimeno ns svista ola kai to profile { $conn->Execute("DELETE FROM hosts_profiles WHERE id=".$delid); $conn->Execute("DELETE FROM hosts_profiles_hosts WHERE fk_hosts_profiles_id=".$delid); } else //alliws { $conn->Execute("DELETE FROM hosts_profiles_hosts WHERE fk_hosts_profiles_id=".$delid." and fk_hosts_ns='".$ns."'"); $numOfHosts = $conn->GetOne("SELECT count(*) FROM hosts_profiles_hosts WHERE fk_hosts_profiles_id=".$delid); if ($numOfHosts==0) { $conn->Execute("DELETE FROM hosts_profiles WHERE id=".$delid); } } hosts_reorder_num($delid); } } //an den exei ;h ta esvise ola vale tou ta default; hosts_check_if_first(); //An zitise na dei plirofories fere ta ip apo to ITE if (isset($infons)) { echo ''; } // an 8elei na valei host if ($form=='insert_host') { include('inc_hosts_form.php'); } // an 8elei na valei profile if ($form=='insert_profile') { include('inc_hosts_profile_form.php'); } //panta deixne tou ti lista me tous name servers tou $my_hosts=$conn->GetArray("SELECT hosts_profiles.name,hosts_profiles_hosts.fk_hosts_ns,hosts_profiles_hosts.num ,hosts_profiles.id, count(domains.id) as linked FROM hosts_profiles LEFT JOIN hosts_profiles_hosts ON hosts_profiles.id=hosts_profiles_hosts.fk_hosts_profiles_id LEFT JOIN domains ON hosts_profiles.id=domains.fk_host_profile_id WHERE ifnull(fk_hosts_ns,'')<>'' and hosts_profiles.fk_user_id=".$user_id." GROUP BY hosts_profiles.name,hosts_profiles.id,hosts_profiles_hosts.fk_hosts_ns ORDER BY name,num"); //print_r($my_hosts); echo ''; if ($my_hosts) { echo ' '; //$ns='33432'; //for ($i=0;$i '; } else { $ns=' '; } $i++; while ($name==$my_hosts[$i]['name']) { //$ns.='
***'.$my_hosts[$i]['fk_hosts_ns']; if ($my_hosts[$i]['fk_hosts_ns']!='') { $ns.=''; } $i++; } echo ''; } } else { echo ''; } ?>
'; //an 8elei na pros8esei steilto prin kaneis lista wste na exei to neo $error_msg['ipnew']=""; $control_class['ipnew']='control'; if(isset($submit_ipnew)) { if (!is_valid('ip',$ipnew)) { $error_msg['ipnew']=WRONG_IP_txt."
"; $control_class['ipnew']='controlError'; } else { if (!hosts_epp_check_create_update($infons,$ipnew)) { //bgale to minima la8ous $error_msg['ipnew']=ERROR_ITE_txt; $control_class['ipnew']='controlError'; } else { //midenise ta gia na einai etoima gia nea eisagwgi $error_msg['ipnew']=""; $control_class['ipnew']='control'; $ipnew=''; } } } else {} $epp=new eppConn(); if ($result_check_arr=$epp->send_receive('host','check',$infons)) { //print_r($result_check_arr); //echo $result_check_arr[0]["avail"].'ffff'.strpos($result_check_arr[0]["reason"],'Undefined'); if ($result_check_arr[0]["avail"]==0 && strpos($result_check_arr[0]["reason"],'Undefined')!==true) { if ($result_info_arr=$epp->send_receive('host','info',$infons)) { $ip_arr= array(); foreach($result_info_arr[0] as $key=>$val_ite) { if (strpos($key,'addr')!==false) { array_push($ip_arr,$val_ite); } } if (sizeof($ip_arr)>0) { echo Ip_address_for_host_txt.'
'.$infons.'
'; foreach ($ip_arr as $ip_ite) { echo $ip_ite.'
'; } } else { echo NO_Ip_address_for_host_txt.'
'.$infons.'
'; } echo '


'.$error_msg['ipnew'].'
'; } else { echo '

'.ERROR_ITE_txt.'

'; } } else { //print_r($epp); echo '

'.NS_NO_EXISTS_txt.'

'; } } else { echo '

'.ERROR_ITE_txt.'

'; } echo '
'.ADD_NEW_PROFILE_txt.'
'.Profile_Name_txt.' '.Default_txt.' '.NS_Name_txt.' '.Action_txt.'
'.$my_hosts[$i]['fk_hosts_ns'].' '.info_txt.' '.del_txt.'
'.$my_hosts[$i]['num'].' '.$my_hosts[$i]['fk_hosts_ns'].' '.info_txt.' '.del_txt.'
'.$name.' '.$default.' '.$ns.'
'.add_ns_txt.' '; if ($linked>0) { $hosts_domains=$conn->GetArray("SELECT distinct domain FROM domains INNER JOIN hosts_profiles ON hosts_profiles.id=domains.fk_host_profile_id WHERE fk_host_profile_id=".$hosts_profiles_id); $domainsList=''; foreach ($hosts_domains as $host_domain) { $domainsList.=$host_domain['domain']."\n"; } echo ''.LINKED_txt.''; } else { echo ''.Delete_txt.''; } echo '
'.No_hosts_txt.'