%@LANGUAGE=JAVASCRIPT%> <% var usr; usr = Request.ServerVariables("UNMAPPED_REMOTE_USER"); if (usr == "") { Response.Buffer=0; Response.Status = "401 access denied"; } else { %> <% if (!supervisor()) { Response.Redirect("/sorry.asp"); Response.Close(); } } %> <% var sort,ado,RS,RSS,what,i,j,netv; var id,parent,nev,ip,szint,soa,ns1,ns2,ns3,mx1,mx2,mx3,www,tulaj,adminc,techc,zonec,nichandle,ido,felvette,modosit,megjegyzes,valid,checktime,live; var copy,postmaster,serno,userid; var ipat=new Array(100); var ipbt=new Array(100); var ipct=new Array(100); var ipdt=new Array(100); var maxn; ado=new ActiveXObject("ADODB.Connection"); ado.Open("Provider=SQLOLEDB;Data Source=BIGNT;Initial Catalog=domain;User ID=domusr;Password=dom123;"); //ado.Open(Application("ConnString"); sort=parseInt(Session("sort")); if (isNaN(sort)) { sort=0; Session("sort")=0; } else if (!isNaN(parseInt(Request.Querystring("sort"))) ) { sort=parseInt(Request.Querystring("sort")); Session("sort")=sort; } netv=parseInt(Session("netv")); if (isNaN(netv)) { netv=0; Session("netv")=0; } else if (!isNaN(parseInt(Request.Querystring("netv"))) ) { netv=parseInt(Request.Querystring("netv")); Session("netv")=netv; } what=new String(Request.Querystring("what")); id=parseInt(Request.Querystring("id")); if (isNaN(id)) id=0; userid=1; %>
Tulajdonos
<%
// }
}
//----------> add, edit, delete Szemely tabla
if (what == "szemely"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from szemely WHERE val=" + id);
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("vezetek");
RS(2)=Request.Form("kereszt");
RS(3)=Request.Form("cim");
RS(4)=Request.Form("telefon");
RS(5)=Request.Form("fax");
RS(6)=Request.Form("email");
RS(7)=Request.Form("megjegyzes");
RS(8)=modos(1);
RS(9)=Request.Form("admin");
RS(10)=Request.Form("azonosito");
RS(11)=Request.Form("nichandle");
RS(12)=Request.Form("ripehandle");
RS(13)=Request.Form("passwd");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from szemely WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from szemely WHERE id=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
var vezetek,kereszt,cim,telefon,fax,email,megjegyzes,modosit,admin,nichande,ripehandle,passwd,opt;
SQL="SELECT * FROM szemely WHERE id="+id;
RS=ado.Execute(SQL);
if (! RS.Eof) {
vezetek=new String(RS(1)); kereszt=new String(RS(2));
cim=parseInt(RS(3));
telefon=new String(RS(4)); fax=new String(RS(5));
email=new String(RS(6)); megjegyzes=new String(RS(7));
modosit=parseInt(RS(8)); admin=parseInt(RS(9));
nichandle=new String(RS(10)); ripehandle=new String(RS(11));
passwd=new String(RS(12));
opt=parseInt(RS(13));
} else { vezetek=kereszt=telefon=fax=email=megjegyzes=nichandle=ripehandle=passwd=""; cim=modosit=opt=0; }
RS.Close();
%>
Személy
<%
}
}
//----------> add, edit, delete Bcim tabla
if (what == "bcim"){
var Irszam,Varos,Utca_nev,Utca_typ, Haz_szam,Emelet_ajto,Pf_Irszam,Pf;
Irszam=""; Varos=""; Utca_nev=""; Utca_typ=""; Haz_szam=""; Emelet_ajto=""; Pf_Irszam=""; Pf="";
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from bcim WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("Irszam");
RS(2)=Request.Form("Varos");
RS(3)=Request.Form("Utca_nev");
RS(4)=Request.Form("Utca_typ");
RS(5)=Request.Form("Haz_szam");
RS(6)=Request.Form("Emelet_ajto");
RS(7)=Request.Form("Pf_Irszam");
RS(8)=Request.Form("Pf");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from bcim WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from bcim WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM bcim WHERE val=" + val;
RS=ado.Execute(SQL);
Irszam=new String(RS(1));
Varos=new String(RS(2));
Utca_nev=new String(RS(3));
Utca_typ=new String(RS(4));
Haz_szam=new String(RS(5));
Emelet_ajto=new String(RS(6));
Pf_Irszam=new String(RS(7));
Pf=new String(RS(8));
RS.Close();
}
%>
Cím
<%
// }
}
//----------> add, edit, delete CNAME
if (what == "cname"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from cname WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("nev");
RS(2)=Request.Form("hosta");
RS(3)=Request.Form("domain");
RS(4)=Request.Form("modosit");
RS(5)=Request.Form("mejegyzes");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from cname WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from cname WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM cname WHERE val=" + val;
RS=ado.Execute(SQL);
nev=new String(RS(1));
hosta=new String(RS(2));
domain=new String(RS(3));
modosit=new String(RS(4));
megjegyzes=new String(RS(5));
RS.Close();
}
%>
CNAME rekord
<%
// }
}
//----------> add, edit, delete NS
if (what == "ns"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from ns WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("nev");
RS(2)=Request.Form("ip");
RS(3)=Request.Form("mejegyzes");
RS(4)=Request.Form("modosit");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from ns WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from ns WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM ns WHERE val=" + val;
RS=ado.Execute(SQL);
nev=new String(RS(1));
ip=new String(RS(2));
megjegyzes=new String(RS(3));
modosit=new String(RS(4));
RS.Close();
}
%>
NS rekord
<%
// }
}
//----------> add, edit, delete MX
if (what == "mx"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from mx WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("mxserver");
RS(2)=Request.Form("ip");
RS(3)=Request.Form("mejegyzes");
RS(4)=Request.Form("modosit");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from mx WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from mx WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM mx WHERE val=" + val;
RS=ado.Execute(SQL);
mxserver=new String(RS(1));
ip=new String(RS(2));
megjegyzes=new String(RS(3));
modosit=new String(RS(4));
RS.Close();
}
%>
MX rekord
<%
// }
}
//----------> add, edit, delete WWW
if (what == "www"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from www WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("serverip");
RS(2)=Request.Form("url");
RS(3)=Request.Form("modosit");
RS(4)=Request.Form("mejegyzes");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from www WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from www WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM www WHERE val=" + val;
RS=ado.Execute(SQL);
serverip=new String(RS(1));
url=new String(RS(2));
modosit=new String(RS(3));
megjegyzes=new String(RS(4));
RS.Close();
}
%>
WWW rekord
<%
// }
}
//----------> add, edit, delete A_
if (what == "a_"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from a_ WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("domain");
RS(2)=Request.Form("net");
RS(3)=Request.Form("ip");
RS(4)=Request.Form("nev");
RS(5)=Request.Form("modosit");
RS(6)=Request.Form("megjegyzes");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from a_ WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from a_ WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM a_ WHERE val=" + val;
RS=ado.Execute(SQL);
domain=new String(RS(1));
net=new String(RS(2));
ip=new String(RS(3));
nev=new String(RS(4));
modosit=new String(RS(5));
megjegyzes=new String(RS(6));
RS.Close();
}
%>
A rekord
<%
// }
}
//----------> add, edit, delete SOA
if (what == "soa"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from soa WHERE val=" + Request.Form("id"));
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("postmaster");
RS(2)=Request.Form("serial");
RS(3)=Request.Form("param");
RS(4)=Request.Form("modosit");
RS.Update();
RS.Close();
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from soa WHERE id=" + Request.Form("id"));
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i>0) ado.Execute("DELETE from soa WHERE val=" + Request.Form("id"));
}
if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
SQL="SELECT * FROM soa WHERE val=" + val;
RS=ado.Execute(SQL);
postmaster=new String(RS(1));
serial=new String(RS(2));
param=new String(RS(3));
modosit=new String(RS(4));
RS.Close();
}
%>
SOA rekord
<%
// }
}
//----------> add, edit, delete DOMAIN
if (what == "domain"){
if (Request.Querystring("dothis") == "update") { // ----------------------- update & insert
var dt= new Date(datin(Request.Form("start")));
RS=new ActiveXObject("ADODB.RecordSet");
RS.ActiveConnection=ado;
RS.CursorType=1;
RS.LockType=3;
RS.Open("SELECT * from domain WHERE id=" + id);
if (RS.Eof) RS.AddNew();
RS(1)=Request.Form("parent");
RS(2)=Request.Form("nev");
RS(3)=Request.Form("ip");
RS(4)=Request.Form("szint");
RS(5)=Request.Form("soa");
RS(6)=Request.Form("ns1");
RS(7)=Request.Form("ns2");
RS(8)=Request.Form("ns3");
RS(9)=Request.Form("mx1");
RS(10)=Request.Form("mx2");
RS(11)=Request.Form("mx3");
RS(12)=Request.Form("www");
RS(13)=Request.Form("tulaj");
RS(14)=Request.Form("adminc");
RS(15)=Request.Form("techc");
RS(16)=Request.Form("zonec");
RS(17)=Request.Form("nichandle");
// RS(18)=new Date(datin(Request.Form("ido")));
RS(18)=new Date(datin(Request.Form("ido"))).toLocaleString();
RS(19)=Request.Form("felvette");
RS(20)=modos(1);
RS(21)=Request.Form("megjegyzes");
// RS(22)=Request.Form("valid");
// RS(23)=new Date(Request.Form("checktime")).toLocaleString();
RS(24)=Request.Form("live");
RS(25)=Request.Form("copy");
RS(26)=Request.Form("serno");
RS(27)=Request.Form("postmaster");
RS.Update();
RS.Close();
ado.Execute("domainnev");
Response.Clear();
Response.Redirect("domain.asp?what=show");
}
else if (Request.Querystring("dothis") == "delete") { // ----------------------- delete
RS=ado.Execute("Select * from domain WHERE id=" + id);
i=0;
if (RS.Eof) i=1;
RS.Close();
if (i==0) ado.Execute("DELETE from domain WHERE id=" + id);
ado.Execute("domainnev");
Response.Clear();
Response.Redirect("domain.asp?what=show");
}
else if (Request.Querystring("dothis") == "set") { // ----------------------- update & insert form
id= Request.QueryString("id");
if (isNaN(id)) { id=0;
tulaj=parent=szint=soa=ns1=ns2=ns3=mx1=mx2=0;
mx3=www=techc=zonec=felvette=modosit=checktime=copy=serno=ido=0;
postmaster=nev=ip=""; felvette=userid;
} else {
SQL="SELECT * FROM domain WHERE id=" + id;
RS=ado.Execute(SQL);
parent=parseInt(RS(1));
nev=new String(RS(2));
ip=new String(RS(3));
szint=parseInt(RS(4));
soa=parseInt(RS(5));
ns1=parseInt(RS(6));
ns2=parseInt(RS(7));
ns3=parseInt(RS(8));
mx1=parseInt(RS(9));
mx2=parseInt(RS(10));
mx3=parseInt(RS(11));
www=parseInt(RS(12));
tulaj=parseInt(RS(13));
adminc=parseInt(RS(14));
techc=parseInt(RS(15));
zonec=parseInt(RS(16));
nichandle=new String(RS(17));
ido=new Date(RS(18));
felvette=parseInt(RS(19));
modosit=parseInt(RS(20));
megjegyzes=new String(RS(21));
valid=new String(RS(22));
checktime=new Date(RS(23));
live=new String(RS(24));
copy=parseInt(RS(25));
serno=parseInt(RS(26));
postmaster=new String(RS(27));
RS.Close();
}
%>
IP címe: | . . . | net mérete: | |
tulajdonosa: | |||
utoljára módosítva: | <% SQL="SELECT szemely.vezetek,szemely.kereszt,mikor,honnan FROM modosit,szemely where szemely.id=modosit.szemely and modosit.id="+modosit; RS=ado.Execute(SQL); if (!RS.Eof) { j=RS(0)+" "+RS(1) +"<%=j%> | utoljára ellenőrizve: | |
hibátlan: checked<%;%> > | megjegyzés: | élő bejegyzés: checked<%;%> > | |
Módosítás |
Edit | Domain név | Hosts | IP cím | Tulajdonos | Élő | Hibátlan | <% SQL="SELECT domain.id,domtmp.nev,domain.szint,domain.ip,tulaj.nev,domain.valid,domain.dead,s1,s2,s3,s4,s5 FROM domtmp,domain,tulaj WHERE domtmp.id=domain.id and domain.tulaj=tulaj.id "; SQL=SQL +" ORDER BY "; switch (sort) { case 0: SQL += "domtmp.nev"; break; case 1: SQL += "domain.parent"; break; case 2: SQL += "domain.ip"; break; case 3: SQL += "tulaj.nev"; break; case 4: SQL += "domain.valid"; break; case 5: SQL += "domain.dead"; break; case 6: SQL += "s1,s2,s3,s4,s5"; break; } i=0; RS=ado.Execute(SQL); while (! RS.Eof) { i += 1; RSS=ado.Execute("SELECT Count(A_.id) FROM A_,doma WHERE doma.aid=A_.id and doma.domid="+RS(0)); j=parseInt(RSS(0)); RSS.Close(); %>
<%for (k=0;k |
<%=j%> | <%=RS(3)%> | <%=RS(4)%> | <%=RS(5)%> | <%=RS(6)%> |
Net név | Hosts | IP cím | Tulajdonos | Élő | Hibátlan | <% SQL="SELECT net.id,net.nev,ipa,ipb,ipc,ipd,tulaj.nev,net.valid,net.dead,net.parent FROM net,tulaj WHERE net.tulaj=tulaj.id "; SQL=SQL +" ORDER BY "; switch (sort) { case 0: SQL += "net.nev"; break; case 1: SQL += "net.parent"; break; case 3: SQL += "tulaj.nev"; break; case 4: SQL += "net.valid"; break; case 5: SQL += "net.dead"; break; default: case 2: SQL += "ipa,ipb,ipc,ipd"; break; } i=0; RS=ado.Execute(SQL); while (! RS.Eof) { i += 1; RSS=ado.Execute("SELECT Count(id) FROM A_ WHERE net="+RS(0)); j=parseInt(RSS(0)); RSS.Close(); %>|
<% if (RS("parent")==0) {%><%=RS(1)%><% } else { %><%=RS(1)%><% }%> | <%=j%> | <%=RS(2)+"."+RS(3)+"."+RS(4)+"."+RS(5)%> | <%=RS(6)%> | <%=RS(7)%> | <%=RS(8)%> |