Location: PHPKode > projects > HypatiaDB > hypatiadb/js/dbcreate.php
<?php header("Content-Type: text/javascript");
include('../common_db.php');
include('../functions.php');
dbconnect($host, $username, $password);
$strings = loadStrings($lang, 'CDBF');
?>
function validDBName(dbForm)
{
   invalidChars = "/.\\*?"

   if(dbForm.db_name.value.length > 64)
   {
      alert("<?php echo($strings['CDB_ERR_TOOLONG']); ?>")
      return false
   }
   
   if(dbForm.db_name.value == "")
   {
      alert("<?php echo($strings['CDB_ERR_NONAME']); ?>")
      return false
   }
   
   for(i=0; i<invalidChars.length; i++)
   {
      badChar = invalidChars.charAt(i)
      if(dbForm.db_name.value.indexOf(badChar,0) > -1)
      {
	 alert("<?php printf($strings['CDB_ERR_INVALIDCHAR'],'" + badChar + "'); ?>") 
	 return false
      }
   }

   return true

}
Return current item: HypatiaDB