Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php include"D:/hosting/5984986/html/linkgen/linklok.php"; ?>
<html>
<head>
<title>Linklok URL form demo</title>
<script language="JavaScript">
<!-- JavaScript
function validateform(form)
{
  if (form.name.value=="")
  {
    alert("Please enter your name")
    form.name.focus()
    return (false)
  }
  if (validateemail(form.email.value)==false)
  {
    alert("Please enter a valid email address")
    form.email.focus()
    return (false)
  }
  return(true);
}

function validateemail (emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null)
 return false
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null)
    return false
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
  for (var i=1;i<=4;i++)
  {
    if (IPArray[i]>255)
      return false
  }
  return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null)
    return false
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
    domArr[domArr.length-1].length>4)
   return false
if (len<2)
   return false
return true;
}
// - JavaScript - -->
</script>
</head>
<body>
<p>Before trying this demo you must set up linklokurl.php and place a file called file1.zip in the secure directory.<br>Currently 
the form will redirect to <a href="http://www.vibralogix.com">www.vibralogix.com</a> 
after submit is pressed and will send a link valid for 60<br>minutes and not 
IP address locked. You can change these settings of course.</p>
<form name="form1" action="demoform.php" method="get" onSubmit="return validateform(this)">
<p>Name <input type="text" name="name"><br><br>Email &nbsp;<input type="text" name="email"></p>
    <p><input type="submit" name="button1" value="Submit"></p>
<?php linklokemail('index.html',60,0,'http://www.vibralogix.com/index.htm',0); ?>
</form>
<p>&nbsp;</p>
</body>
</html>