|
<!--#include file=config.asp-->
<!--#include file=adojavas.inc-->
<%
//---- AllowNullsEnum Values ----
var adIndexNullsAllow = 0x00000000;
var adIndexNullsDisallow = 0x00000001;
var adIndexNullsIgnore = 0x00000002;
var adIndexNullsIgnoreAny = 0x00000004
//---- KeyTypeEnum Values ----
var adKeyPrimary = 0x00000001;
var adKeyForeign = 0x00000002;
var adKeyUnique = 0x00000003;
//---- RuleEnum Values ----
var adRICascade = 0x00000001;
var adRINone = 0x00000000;
var adRISetDefault = 0x00000003;
var adRISetNull = 0x00000002;
%>
<script language=javascript runat=server>
function Out(s) {
Response.Write(s);
}
function DebugOut(s) {
Response.Write("<div style=\"background-color:#FFC0C0; border: 1px solid black; padding: 4px; margin:2px\">" + s + "</div>");
}
function ErrorOut(s) {
Response.Write("<div class=\"bgriderror\">" + s + "</div>");
}
function PageSetup() {
Response.Buffer = true;
Response.Expires = 0;
CheckSecurity();
Object.Conn = Server.CreateObject("ADODB.Connection");
Object.Conn.Open(Config("connstr"));
Object.Conn.CursorLocation = adUseClient;
jsSetLocale(Config('locale'));
}
function PageCleanup() {
Object.Conn.Close();
Object.Conn = null;
}
function NewPageHeader() {
Out('<html>\n');
Out('<head>\n');
Out('<title>' + Config('title') + '</title>\n');
Out('<meta http-equiv="expires" content="-1">\n');
Out('<meta http-equiv="pragma" content="no-cache">\n');
Out('<meta http-equiv="cache-control" content="no-cache">\n');
Out('<link rel="stylesheet" type="text/css" href="style.css">\n');
Out('<scr'+'ipt type="text/javascript" src="netdb.js"></scri'+'pt>\n');
Out('</head>\n');
Out('<body onload="body_onload()">\n');
Out('<form method="post" action="' + Request.ServerVariables("SCRIPT_NAME").Item + '?'+Request.QueryString+'">\n');
_TableMenu();
}
function NewPageFooter() {
Out('<hr>\n');
Out('<em>Copyright © 2002 Bj�rnar Henden</em>\n');
Out('</form>\n');
Out('<iframe name="cmdfrm" style="display:none"/>\n');
Out('</body>\n');
Out('</html>\n');
}
function EndPage(sRedirect) {
NewPageFooter();
PageCleanup();
if(sRedirect!="") Response.Redirect(sRedirect);
Response.End();
}
function GetFormValue(varname,vardef) {
if(Request.Form(varname).Count==1)
return Request.Form(varname).Item;
else
return vardef;
}
function PutFormValue(varname,varvalue) {
Out("<input type=\"hidden\" name=\"" + varname + "\" value=\"" + varvalue + "\"/>\n");
}
function IsJet(oConn) {
try {
return (""+oConn.Properties("DBMS Name")).indexOf("Jet")>=0;
}
catch(e) {
return oConn.ConnectionString.indexOf("Jet")>=0;
}
}
function _TableMenu() {
Out('<table width="100%"><tr>');
Out('<td align="left"><b>' + Config("Title") + '</b> - '+Config('database')+'</td>');
Out('<td align="right">');
Out('<a href="." target="_top">Home</a>\n');
Out('| <a href=".." target="_top">Parent</a>\n');
Out('| <a href="http://www.bhenden.org/" target="_top">www.bhenden.org</a>\n');
Out('</td>');
Out('</tr></table><hr>');
}
</script>
<script language="vbscript" runat="server">
sub jsSetLocale(loc)
SetLocale(loc)
end sub
</script>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.