<?php 
include("../includes/site_config.php");
include("../session_handler.inc");
include("../includes/functions.php");
include("../pop_lists.inc");
include("../error.php");
include("../message.php");

if(isset($_REQUEST['system_name'])){
 $sysname = $_REQUEST['system_name']; 
if($sysname) { 
    
        if(get_magic_quotes_gpc()) { 
            $name = $_REQUEST['system_name']; 
        }else{ 
            $name = addslashes($_REQUEST['system_name']); 
        } 
        $count = mysql_num_rows(mysql_query("SELECT * FROM `vlistbox` WHERE `lst_type` = '".$name."'")); 
       
        if($count > 0) { 
            echo 'This System Name already exists, please select another one.'; 
        }else{ 
            echo 'This System Name is available.'; 
        } 
      } 
   else{ 
        echo 'Error, Can\'t be blank!'; 
   }

}

?>