1
jpco_122122
Help!How to protect a page!

I have a menu named "CrimeMapping Administration" and was linked to "http://proxyserver/crimemapping" it can only be viewed when you are logged as administrator in XOOPS and it works fine but the problem goes here when I typed thehttp://proxyserver/crimemapping in the address bar it shows the whole page meaning even though you are not logged in as administrator you can still view it by typing the exact URL whta can I do enable to protect this page?

Here is the script:

<html>
<head>
<title>Muntinlupa Crime Mapping System - Index</title>
</head>
<frameset rows="78,*,50" cols="*" framespacing="0" frameborder="yes" border="0">
<frame src="HTMLSERVICES/top.htm" name="topFrame" scrolling="NO" noresize >
<frameset cols="*,215,0" framespacing="0" frameborder="NO" border="0" bordercolor="#999999" marginwidth="0" marginheight="0">
<frame src="HTMLSERVICES/map.htm" name="mapframe" noresize scrolling="no" bordercolor="#FFCCFF" frameborder="yes" marginheight="1" marginwidth="1">
<frame src="HTMLSERVICES/intro.htm" name="controlframe" scrolling="auto" noresize marginwidth="0" marginheight="0">
<frame src="HTMLSERVICES/dummy.htm" name="dummy" scrolling="yes" noresize>
</frameset>
<frame src="HTMLSERVICES/bottom.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes><body>
</body></noframes>
</html>

Anyone can help?

2
wtravel
Re: Help!How to protect a page!

As I understand you call this url in a php page (index.php?). I would rather show the url directly within a php page, not calling an external url.

For example:
Quote:

include necessary header files

$display = '<html>
<head>
<title>Muntinlupa Crime Mapping System - Index</title>
</head>
<frameset rows="78,*,50" cols="*" framespacing="0" frameborder="yes" border="0">
<frame src="HTMLSERVICES/top.htm" name="topFrame" scrolling="NO" noresize >
<frameset cols="*,215,0" framespacing="0" frameborder="NO" border="0" bordercolor="#999999" marginwidth="0" marginheight="0">
<frame src="HTMLSERVICES/map.htm" name="mapframe" noresize scrolling="no" bordercolor="#FFCCFF" frameborder="yes" marginheight="1" marginwidth="1">
<frame src="HTMLSERVICES/intro.htm" name="controlframe" scrolling="auto" noresize marginwidth="0" marginheight="0">
<frame src="HTMLSERVICES/dummy.htm" name="dummy" scrolling="yes" noresize>
</frameset>
<frame src="HTMLSERVICES/bottom.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes><body>
</body></noframes>
</html>';
echo $display;

include your footer files

That way you can delete the direct url from your file server.

HTH,

Martijn

3
tjnemez
Re: Help!How to protect a page!
  • 2005/1/6 6:15

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


do you have an XOOPS powered site?

4
jpco_122122
Re: Help!How to protect a page!

@wtravel

What shall I put here: "include necessary header files" & "include your footer files" ?



pls help me..

5
wtravel
Re: Help!How to protect a page!

Standard for including the header is:
Quote:

include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");

And for including the footer:
Quote:

include(XOOPS_ROOT_PATH."/footer.php");

Regards,

Martijn

6
jpco_122122
Re: Help!How to protect a page!

I had tried it but it still doesn't work there is no change on the webpage. What else can I do?

7
wtravel
Re: Help!How to protect a page!

Can you please show me the code of the original php file in which you show the html file (hence there are no passwords or secret codes in that file )? There the page seems to be shown correctly.

Regards,

Martijn

8
jpco_122122
Re: Help!How to protect a page!

Here are the codes:

For HTMLSERVICES/top.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MUNTINLUPA CRIME MAPPING</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
function right(e)
{
if ((navigator.appName == 'Netscape') && (e.which == 3 || e.which == 2))
{
alert("Sorry this operation is not allowed.");
return false;
}
else if ((navigator.appName == 'Microsoft Internet Explorer') && (event.button == 2 || event.button == 3))
{
alert("Sorry this operation is not allowed.");
return false;
}
return false;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
</script>
</head>

<body bgcolor="#000000" background="../Images/crime_mapping_head.jpg">
<div align="center"></div>
</body>
</html>



For HTMLSERVICES/map.htm

<html>
<head>
<title>Muntinlupa Crime Mapping System - Map</title>
<SCRIPT LANGUAGE="VBScript">
Dim pointType
Dim flag

Sub map_onDigitizedPoint(map,point)
onDigitizedPoint map,point
End Sub

Sub map_onSelectionChanged(map)
onSelectionChanged map
End Sub

Sub map_onViewChanged(map)
If flag Then
map.zoomInMode()
flag = false
End If
End Sub

Sub map_onMapLoaded(map)
flag = true
End Sub
</SCRIPT>

<script language="JavaScript">
var mode;
var clockFace = true;
var monthsOfYear = ["January","February","March","April","May","June","July","August","September","October","November","December"];
var daysOfWeek = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var today = new Date();
var year = today.getFullYear();
var strMonth = monthsOfYear[today.getMonth()];
var iMonth = today.getMonth() + 1;
if (iMonth < 10){
iMonth = "0" + iMonth;
}
var iDay = today.getDate();
var curDate = strMonth + " " + iDay + ", " + year;
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var curTime = "";
if(clockFace)
curTime = ((hours > 12) ? (hours - 12) : hours)
else
curTime += ((hours < 10) ? "0" : "") + hours
curTime += ((minutes < 10) ? ":0" : ":") + minutes
curTime += ((seconds < 10) ? ":0" : ":") + seconds
if (clockFace)
curTime += ((hours >= 12) ? " PM " : " AM ")

/*Crime clock category
//Category A 8:00 AM - 1:59 PM
AFrom = TimeDecimal(8,0,"AM");
ATo = TimeDecimal(1,59,"PM");

//Category B 2:00 PM - 7:59 PM
BFrom = TimeDecimal(2,0,"PM");
BTo = TimeDecimal(7,59,"PM");

//Category C 8:00 PM - 1:59 AM
CFrom = TimeDecimal(8,0,"PM");
CTo = TimeDecimal(1,59,"AM");

//Category D 2:00 AM - 7:59 AM
DFrom = TimeDecimal(2,0,"AM");
DTo = TimeDecimal(7,59,"AM");
*/

//Category A 0600 - 1255
AFrom = 6.0;
ATo = 12.0 + 59.0 / 60.0;
//Category B 1300 - 1855
BFrom = 13.0;
BTo = 18 + 59.0 / 60.0;
//Category C 1900 - 2455
CFrom = 19.0;
CTo = 24 + 59.0 / 60.0;
//Category D 0100 - 0555
DFrom = 1.0;
DTo = 5.0 + 59.0 / 60.0;


function TimeDecimal(hrs,mins,mer)
{
var hh = parseFloat(hrs);
var mm = parseFloat(mins);

if(mer == "PM"){
if( hh < 12.0 ){
hh = hh + 12.0;
}
}
else{
if(hh == 12.0){
hh = 0.0;
}
}

var timedecimal = hh + ( mm / 60.0 );
return timedecimal;
//return hh;
}


function onSelectionChanged()
{
}

function waitRebuild(lay1,lay2)
{
if(map.isBusy()){
setTimeOut("waitRebuild()",1000);
}
else{
map.getMapLayer(lay1).setRebuild(true);
map.getMapLayer(lay2).setRebuild(true);
map.refresh();
}
}

function onDigitizedPoint(map,point)
{
if(point != null)
{
var lon = point.getY();
var lat = point.getX();
map.setSelectionMode("Intersection");

var orgExt = map.getMapExtent(false,false); //original extent
var orgWidth = orgExt.getMaxX() - orgExt.getMinX();
var curExt = map.getMapExtent(false,false);
var curWidth = curExt.getMaxX() - curExt.getMinX();

switch(mode)
{
case "Add Vital Installation":
{
var BrgyLayer = map.getMapLayer("Barangay Boundaries");
map.selectRadius(BrgyLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var BrgyObjs = map.getSelection().getMapObjectsEx(null);

if(BrgyObjs.size() > 0)
{
var brgyname = getSelectedKey();
map.getSelection().clear();
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}

var PCPLayer = map.getMapLayer("PCP Coverage");
map.selectRadius(PCPLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var PCPObjs = map.getSelection().getMapObjectsEx(null);

if(PCPObjs.size() > 0)
{
var pcpno = getSelectedKey();
map.getSelection().clear();
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}

var PSLayer = map.getMapLayer("Police Station Coverage");
map.selectRadius(PSLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var PSObjs = map.getSelection().getMapObjectsEx(null);

if(PSObjs.size() > 0)
{
var psname = getSelectedKey();
map.getSelection().clear();
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}

if(vdesc == ""){
alert("Please select description of vital installation");
return;
}
if (vname == "")
{
alert("Please fill in the name field..");
return;
}
if (vstadd == "")
{
alert("Please fill in the street address field..");
return;
}
if (vcontpers == "")
{
alert("Please fill in the contact person field..");
return;
}
if (vtelnocontpers == "")
{
alert("Please fill in the telephone number field..");
return;
}
if (vaddcontpers == "")
{
alert("Please fill in the address field..");
return;
}
if (vmanagername == "")
{
alert("Please fill in the manager name field..");
return;
}
if (vsecagency == "")
{
alert("Please fill in the security agency field..");
return;
}
if (vaddedby == "")
{
alert("Please fill in the added by field..");
return;
}

var curdatetime = curDate + " " + curTime;
var vfulladd = vstadd + ", " + brgyname + ", " + city;

var vstr = "../PHPSERVICES/PostVitalInstallation.php?DESC=" + vdesc;
vstr += "&LON=" + lon;
vstr += "&LAT=" + lat;
vstr += "&VNAME=" + vname;
vstr += "&VSTADD=" + vstadd;
vstr += "&VBRGYADD=" + brgyname;
vstr += "&STAT=" + psname;
vstr += "&PCPNO=" + pcpno;
vstr += "&VFULLADD=" + vfulladd;
vstr += "&VCONTPERS=" + vcontpers;
vstr += "&VTELCONTPERS=" + vtelnocontpers;
vstr += "&VADDCONTPERS=" + vaddcontpers;
vstr += "&VMANAGERNAME=" + vmanagername;
vstr += "&VSECAGENCY=" + vsecagency;
vstr += "&VAOJ=" + vAOJ;
vstr += "&VDATEADDED=" + curdatetime;
vstr += "&VADDEDBY=" + vaddedby;
parent.dummy.document.location.href = vstr;
map.getMapLayer("Vital Installation").setRebuild(true);
map.refresh();
break;
}

case "Add":
{
var BrgyLayer = map.getMapLayer("Barangay Boundaries");
map.selectRadius(BrgyLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var BrgyObjs = map.getSelection().getMapObjectsEx(null);

if(BrgyObjs.size() > 0)
{
var brgyname = getSelectedKey();
map.getSelection().clear();
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}

var PCPLayer = map.getMapLayer("PCP Coverage");
map.selectRadius(PCPLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var PCPObjs = map.getSelection().getMapObjectsEx(null);

if(PCPObjs.size() > 0)
{
var pcpno = getSelectedKey();
map.getSelection().clear();
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}

var type = parent.controlframe.frmControl.rpt_type.value;
var time = parent.controlframe.frmControl.time_occ.value;
var stat = parent.controlframe.frmControl.status.value;
var rep = parent.controlframe.frmControl.rpt_by.value;
var empty=true;
var numFormElements = parent.controlframe.frmControl.elements.length;
for(var elementIndex=0 ;elementIndex < numFormElements;elementIndex++){
var formElement = parent.controlframe.frmControl.elements[elementIndex];
if(formElement.type == "text"){
if(formElement.value != "") empty=false;
}
}

if(empty)
{
alert("Please fill-up Reported By.");
break;
}

var dat = iMonth + "-" + iDay + "-" + year;
var curdatetime = curDate + " " + curTime;
var regexp = /[:\s]/;
var timearray = time.split(regexp);
var timeocc = TimeDecimal(timearray[0],timearray[1],timearray[2]);
var category;

if(timeocc >= AFrom && timeocc < BFrom)
{
category = "A";
}
else if(timeocc >= BFrom && timeocc < CFrom)
{
category = "B";
}
else if(timeocc >= CFrom && timeocc < 23.983333333333333333333333333333)
{
category = "C";
}
else if(timeocc >= 0 && timeocc < DFrom)
{
category = "C";
}
else if(timeocc >= DFrom && timeocc < AFrom)
{
category = "D";
}

var v1lname="-";
var v1fname="-";
var v1mname="-";
var v1alias="-";
var v1st="-";

var str = "../PHPSERVICES/PostIncident.php?TYPE=" + type;
str += "&LON=" + lon;
str += "&LAT=" + lat + " ";
str += "&REP=" + rep;
str += "&TIME=" + time;
str += "&DAT=" + dat;
str += "&STAT=" + stat;
str += "&CURDATETIME=" + curdatetime;
str += "&PCPNO=" + pcpno;
str += "&BRGYNAME=" + brgyname;
str += "&CATEGORY=" + category;
str += "&V1LNAME=" + v1lname;
str += "&V1FNAME=" + v1fname;
str += "&V1MNAME=" + v1mname;
str += "&V1ALIAS=" + v1alias;
str += "&V1ST=" + v1st;

parent.dummy.document.location.href = str;

if(map.isBusy()){
setTimeOut("waitRebuild('Incidents', 'Crime Clock')",1000);
}
else{
map.getMapLayer("Incidents").setRebuild(true);
map.getMapLayer("Crime Clock").setRebuild(true);
map.refresh();
}
break;
}

case "Delete Vital Installation":
{
alert(mode);
var lay = map.getMapLayer("Vital Installation");
map.selectRadius(lay,point.getY(),point.getX(),0.3*curWidth/orgWidth,"M");
var objs = map.getSelection().getMapObjectsEx(null);
if(objs.size() > 0){
var key = getSelectedKey();
map.getSelection().clear();
var res = confirm("Are you sure do you want to delete the vital installation?");
if(res == true){
parent.dummy.document.location.href="../PHPSERVICES/DeleteVitalInstallation.php?VID=" + key;
map.getMapLayer("Vital Installation").setRebuild(true);
map.refresh();
}
else{
alert("Delete vital installation was canceled!");
}
}
else{
alert("No vital installation was selected, please click on the displayed vital installation symbols");
return;
}

break;
}

case "Delete":
{
var lay = map.getMapLayer("Incidents");
map.selectRadius(lay,point.getY(),point.getX(),0.3*curWidth/orgWidth,"M");
var objs = map.getSelection().getMapObjectsEx(null);
if(objs.size() > 0){
var key = getSelectedKey();
map.getSelection().clear();
var res = confirm("Are you sure do you want to delete the incident?");
if(res == true){
parent.dummy.document.location.href="../PHPSERVICES/DeleteIncident.php?INCIDENTID=" + key;
map.getMapLayer("Incidents").setRebuild(true);
map.getMapLayer("Crime Clock").setRebuild(true);
map.refresh();
}
else{
alert("Delete incident was canceled!");
}
}
else{
alert("No incident was selected, please click on the displayed incident symbols");
return;
}
break;
}
case "Pop":
{
var lay = map.getMapLayer("Barangay Boundaries");
map.selectRadius(lay,point.getY(),point.getX(),0.3*curWidth/orgWidth,"M");
var objs = map.getSelection().getMapObjectsEx(null);

if(objs.size() > 0 ){
var key = getSelectedKey();
var obj = lay.getMapObject(key);
var bndryArea = obj.getArea();
map.getSelection().clear();
var loc = "../PHPSERVICES/Demography.php?BRGY=" + key + "&MAPAREA=" + bndryArea;
win = window.open(loc,"Demography","width=400,height=565,top=300,left=300,dependent=yes,resizable=no,status=no,toolbar=no,scrolling=yes,location=no,menubar=no");
}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}
break;
}
case "PS":
{
var lay = map.getMapLayer("Police Stations");
map.selectRadius(lay,point.getY(),point.getX(),0.3*curWidth/orgWidth,"M");
var objs = map.getSelection().getMapObjectsEx(null);

if(objs.size() > 0){
var key = getSelectedKey();
map.getSelection().clear();
var loc = "../PHPSERVICES/PStationInfo.php?PSTAT=" + key;
win = window.open(loc,"PoliceStation","width=450,height=360,top=300,left=300,dependent=yes,resizable=no,status=no,toolbar=no,scrollbars=no,location=no,menubar=no");
}
else{
alert("No selected precinct, please click on visible precinct");
return;
}
break;
}
case "AddVital":
{
var BrgyLayer = map.getMapLayer("Barangay Boundaries");
map.selectRadius(BrgyLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var BrgyObjs = map.getSelection().getMapObjectsEx(null);

if(BrgyObjs.size() > 0)
{
var brgyname = getSelectedKey();
map.getSelection().clear();
var vitalloc = "../PHPSERVICES/AddVitalInstallationForm.php";
win = window.open(vitalloc,"VitalInstallation","titlebar=no,width=400,height=400,top=300,left=300,resizable=no,scrollbars=no,status=no,toolbar=no,location=no,menubar=no,dependent=yes");
win.focus();

}
else{
alert("The clicked point is outside the city boundary, please click within the city boundary");
return;
}
break;
}

}
}
}

//added by rhed 10-18-2004
//for adding of vital installation

var vdesc;
var vname;
var vstadd;
var vcontpers;
var vtelnocontpers;
var vaddcontpers;
var vmanagername;
var vsecagency;
var vAOJ;
var vaddedby;
var city = "Muntinlupa City"


function doAddVitalInstallation()
{
mode = "Add Vital Installation";
map.digitizePoint();
}

function showVitalInstallationForm()
{
var url = "../PHPSERVICES/AddVitalInstallationForm.php";
var win = window.open(url,"Vital_Installation_Form","titlebar=no,width=450,height=450,top=200,left=300,dependent=yes,resizable=no,status=no,toolbar=no,location=no,menubar=no");
}

function doDeleteVitalInstallation()
{
mode = "Delete Vital Installation";
map.digitizePoint();
}

function AddVitalInstallation()
{
//alert(rhed);
var today = new Date();
var mon = today.getMonth() + 1;
if (mon < 10) mon = "0" + mon;
var day = today.getDate();
var year = today.getYear();
var vidate = mon + "-" + day + "-" + year;

var BrgyLayer = map.getMapLayer("Barangay Boundaries");
map.selectRadius(BrgyLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var BrgyObjs = map.getSelection().getMapObjectsEx(null);
if(BrgyObjs.size() > 0)
{
var brgyname = getSelectedKey();
map.getSelection().clear();
}

var StatLayer = map.getMapLayer("Police Station Coverage");
map.selectRadius(StatLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var StatObjs = map.getSelection().getMapObjectsEx(null);
if(StatObjs.size() > 0)
{
var statname = getSelectedKey();
map.getSelection().clear();
}

var PCPLayer = map.getMapLayer("PCP Coverage");
map.selectRadius(PCPLayer,point.getY(),point.getX(),0.1*curWidth/orgWidth,"M");
var PCPObjs = map.getSelection().getMapObjectsEx(null);

if(PCPObjs.size() > 0)
{
var pcpno = getSelectedKey();
map.getSelection().clear();
}


var vstr = "../PHPSERVICES/PostVitalInstallation.php?DESC=" + vdesc;
vstr += "&LON=" + lon;
vstr += "&LAT=" + lat;
vstr += "&VNAME=" + vname;
vstr += "&VSTADD=" + vstadd;
vstr += "&VBRGYADD=" + brgyname;
vstr += "&STAT=" + statname;
vstr += "&PCPNO=" + pcpno;
vstr += "&VCITYADD=" + city;
vstr += "&VCONTPERS=" + vcontpers;
vstr += "&VTELCONTPERS=" + vtelnocontpers;
vstr += "&VADDCONTPERS=" + vaddcontpers;
vstr += "&VMANAGERNAME=" + vmanagername;
vstr += "&VSECAGENCY=" + vsecagency;
vstr += "&VAOJ=" + vAOJ;
vstr += "&VDATEADDED=" + vidate;
vstr += "&VADDEDBY=" + vaddedby;


parent.dummy.document.location.href = vstr;

//parent.dummy.document.location.href="../PHPSERVICES/PostVitalInstallation.php?DESC=" + vdesc + "&VNAME=" + vname + "&LAT=" + lat + "&DES=" + repdes + "&REP=" + repby + "&DAT=" + repdat + "&BRGYNO=" + repbndry;
map.getMapLayer("Vital Installation").setRebuild(true);
map.refresh();

}

function doShowRep()
{

var byBrgy = parent.controlframe.frmControl.filterByBrgy.value;
var byPCP = parent.controlframe.frmControl.filterByPCP.value;
var byType = parent.controlframe.frmControl.filterByType.value;
var byStatus = parent.controlframe.frmControl.filterByStatus.value;
//alert("Filter By:" + "\nBarangay: " + byBrgy + "\nPCP: " + byPCP + "\nType: " + byType + "\nStatus: " + byStatus);
var loc = "../PHPSERVICES/ShowIncidents.php?BRGY=" + byBrgy + "&PCP=" + byPCP + "&TYPE=" + byType + "&STATUS=" + byStatus;
win = window.open(loc,"ShowReportedIncidents","width=700,height=450,top=300,left=300,dependent=yes,resizable=yes,status=no,toolbar=no,scrollbars=yes,location=no,menubar=no");

}
function getSelectedKey()
{
var selectedKey;
if(map.getSelection().getNumObjects() == 0){
selectedKey = null;
}
else{
var sel = map.getSelection();
var objs = sel.getMapObjectsEx(null);
var objsz = objs.size();

for(var i=0;i<objsz;i++){
var obj = objs.item(i);
selectedKey = obj.getKey();
}
return selectedKey;
}
}

function onSearchBrgy()
{
var optlength = parent.controlframe.frmControl.selectBrgy.options.length;
for(var i=0;i<optlength;i++){
if(parent.controlframe.frmControl.selectBrgy.options[i].selected){
var val = parent.controlframe.frmControl.selectBrgy.options[i].value;
}
}
var category = "Barangay Boundaries";
map.ZoomGotoLocation(category,val,5000);
}

function onSearchPCP()
{
var optlength = parent.controlframe.frmControl.selectPCP.options.length;
for(var i=0;i<optlength;i++){
if(parent.controlframe.frmControl.selectPCP.options[i].selected){
var val = parent.controlframe.frmControl.selectPCP.options[i].value;
}
}

var category = "PCP Coverage";
map.ZoomGotoLocation(category,val,5000);
}

//added by rhed november 18, 2004
function onSearchRoad()
{
var optlength = parent.controlframe.frmControl.selectroad.options.length;
for(var i=0;i<optlength;i++){
if(parent.controlframe.frmControl.selectroad.options[i].selected){
var val = parent.controlframe.frmControl.selectroad.options[i].value;
}
}
var category = "Road Network";
map.ZoomGotoLocation(category,val,5000);
}

function doDemography()
{
mode = "Pop";
map.digitizePoint();
}

function makeSelectable(layer)
{
var lays = map.getMapLayersEx();
var laysz= lays.size();
for(var i=0;i < laysz; i++)
{
var lay = lays.item(i);
if(lay.getName() != layer)
lay.setSelectability(false);
else
lay.setSelectability(true);
}
}

function getBndryKey()
{
if(map.getSelection().getNumObjects() == 0)
{
alert("Point is outside the boundary");
return;
}

var sel = map.getSelection();
var objs = sel.getMapObjectsEx(null);
var cnt = objs.size();

for(i=0;i<cnt;i++)
{
var obj = objs.item(i);
var key = obj.getKey();
}
repbndry = key;
map.getSelection().clear();
}
</Script>
</head>
<body>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"> <div align="center">
<object id="map" width="100%" height="100%"
classid="CLSID:62789780-B744-11D0-986B-00609731A21D"
codebase="ftp://adeskftp.autodesk.com/webpub/mapguide/ver6/mgaxctrl.cab#Version=6,0,2,2" >
<param name="URL" value="../CRIMEMWF/Crime.mwf">
<param name="Lat" value="0">
<param name="Lon" value="0">
<param name="MapScale" value="0">
<param name="MapWidth" value="0">
<param name="Units" value="M">
<param name="ToolBar" value="Off">
<param name="StatusBar" value="On">
<param name="LayersViewWidth" value="150">
<param name="URLListState" value="10">
<param name="AutoLinkDelay" value="20">
<embed src="../CRIMEMWF/Crime.mwf?ToolBar=Off&LayersViewWidth=0" width="100%" height="14%" align="baseline" border="0" type="application/x-mwf">
</embed></object>
<br>
</div>
</td>
</tr>
</table>
</body>
</html>


For HTMLSERVICES/intro.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>intro</title>
<link href="css/fontstylehelp.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#0099FF" background="../IMAGES/crime_mapping_ryt_bar.jpg">
<table width="200" height="100%" border="0" cellpadding="0" cellspacing="0" class="fontstyle">
<tr class="helpborder">
<td height="64" valign="top"><img src="images/header_intro.jpg" width="200" height="64" border="0" usemap="#Map" /></td>
</tr>
<tr class="helpborder">
<td align="left" valign="top" background="images/bg.jpg"> <table width="90%" border="0" align="center" cellpadding="5" cellspacing="0" class="fontstyle">
<!--DWLayoutTable-->
<tr>
<td width="400" height="628"><p align="center"><img src="Images/MuntinlupaPNP.gif" width="75" height="89" /></p>
<p align="center"><strong><font size="3" face="Courier New, Courier, mono">WELCOME
TO MUNTINLUPA WEB-BASED CRIMEMAPPING SYSTEM</font></strong></p>
<hr color="#000099" />
<p align="justify"><strong>With the increase of GIS in crime mapping
has come increased public access to crime data. The most accessible
and popular method emerging is through Internet access.</strong></p>
<p align="justify">Probably one of the most invaluable tools available
for effective crime fighting is information. Using maps to display
that information is an old tool. The advent of desktop computers
has significantly increased the role of computer mapping. The availability
of low-cost and user-friendly GIS applications has further served
to increase the use of GIS in crime mapping.</p>
<p align="center"><img src="Images/PNP2.gif" width="75" height="114" /></p>
</td>
</tr>
</table></td>
</tr>
<table cellspacing="0" cellpadding="0" border="0" style="display:none;">
</table>
<table width="204" border="0">
<!--DWLayoutTable-->
<tr>
<td width="198">&nbsp;</td>
</tr>
<tr>
<td><div align="center"><b> </b></div></td>
</tr>
</table>
<b>
<p>&nbsp; </p>
</b>&nbsp;
</table>
<map name="Map" id="Map">
<area shape="rect" coords="74,24,129,41" href="search.htm" />
<area shape="rect" coords="208,36,285,54" href="tag.htm" />
<area shape="rect" coords="61,2,120,20" href="reports.htm" />
<area shape="rect" coords="139,22,187,41" href="tag.htm" />
<area shape="rect" coords="124,1,172,18" href="helptab.htm" />
</map>
</body>
<body><table width="300" height="100%" border="0" cellpadding="0" cellspacing="0" class="fontstyle"><tr class="helpborder"><td width="318" align="center" valign="top" background="../images/body_slice_02.jpg"><table width="76%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><th scope="col"><div name="divTree" style="overflow-X:auto; overflow-Y:auto;"><div><tbody></tbody></div></div>
</th>

</tr></table></td>
</tr></table>
</body>
</html>


For HTMLSERVICES/dummy.htm

<html>
<head>
<title></title>
</head>
</html>


For HTMLSERVICES/bottom.htm

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

function getMap()
{
if (navigator.appName == "Netscape")
return parent.mapframe.document.map;
else
return parent.mapframe.map;
}

function Sel()
{
getMap().SelectMode();
}

function Zprev()
{
getMap().ZoomPrevious();

}

function zoomSelected()
{
var map = getMap();
var selected = map.getSelection().getMapObjectsEx(null);
if (selected.size()>0)
map.zoomSelected();
else
alert("Nothing is selected.Please make a selection first!");
}


function doGetKey()
{
var map = getMap();
if (map.getSelection().getNumObjects() == 0)
{
alert ("Make selection first!");
return;
}
var sel = map.getSelection();
var objs = sel.getMapObjectsEx(null);
var cntObjects = objs.size();
var msg = "Keys of selected features are:\n";
for (i=0;i<cntObjects;i++)
{
var obj=objs.item(i);
var key=obj.getKey();
//msg=msg + obj.getMapLayer().getName() + " " + key + "\n";
msg=msg + obj.getName() + " " + key + "\n";
}
alert(msg);
}
function showPageSetup()
{
getMap().pageSetupDlg();
}

function showPrint()
{
getMap().printDlg();
}

function showZoomScale()
{
getMap().zoomScaleDlg();
}


function runReport()
{
var map = getMap();
if (map.getSelection().getNumObjects() == 0)
{
alert("Select one or more parcel first!")
return;
}
getMap().viewReport('Parcel Data(CF)')
}

function zoomToSelected()
{
var map = getMap();
// Assign collection of selected features to variable
var selected = map.getSelection().getMapObjectsEx(null);
// If collection is not empty, zoom to its members...
if (selected.size() > 0)
map.zoomSelected();
//alert(selected);
// ...otherwise, display alert
else
alert("Please make a selection first.");
}

function measureDistance()
{
var map = getMap();
if (!map.isBusy()) {
map.viewDistance("");
} else {
alert("Wait - map not fully loaded");
}
}

function bufferSetup() //Get Buffer Dialogue
{
var map = getMap();
var theSelection = map.getSelection();
var numSelectedObjects = theSelection.getNumObjects();
if (numSelectedObjects == 0)
{
alert("Please select one or more map features to buffer")
return
}
// Set up buffer attributes
var buffSet = map.getBufferSetup();
buffSet.setUnit("ft");
buffSet.setDistance(300);
buffSet.setLayerName("Buffer");
buffSet.setOneObject(true);
var edge = buffSet.getEdgeAttr();
edge.setColor(4);
edge.setStyle("Solid");
edge.setThickness(3);
edge.setVisible(true);
var fill = buffSet.getFillAttr();
fill.setStyle("Hatch");
fill.setHatchPattern("Diagonal135");
fill.setColor(5);
map.viewBufferDlg();
}

//-->
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#003366" topmargin="0" leftmargin="0" rightmargin="0">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1280" height="50">
<param name="movie" value="../swf/below_bg_muntinlupa.swf">
<param name="quality" value="high">
<embed src="../swf/below_bg_muntinlupa.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1280" height="50"></embed></object>
</body>
</html>

9
tl
Re: Help!How to protect a page!
  • 2005/1/9 14:45

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


It seems that the section is outside the XOOPS realms. XOOPS header and footer will not help in this case. In order to protect the pages using Xoops, you must a module set up and then assign access right under System Admin/Groups.

You may want to try .htaccess to protect the area.

10
jpco_122122
Re: Help!How to protect a page!

@tl

No, we don't need to create it as a module for XOOPS since it is only a link. What I need is how to protect that page like for example if a certain user had guess the correct URL then they can view the whole page without logging in anymore to the XOOPS.

Login

Who's Online

182 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits