# Privating Pages

**URL:** <https://forum.phpvms.net/t/privating-pages/3283>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [August 23, 2010, 12:14am UTC](https://forum.phpvms.net/t/privating-pages/3283 "2010-08-23T00:14:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![truemo9](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@truemo9](https://forum.phpvms.net/u/truemo9)\
**Post date:** [August 23, 2010, 12:14am UTC](https://forum.phpvms.net/t/privating-pages/3283/1 "2010-08-23T00:14:55Z")

</div>

Hi, I was wondering how you can private pages for such as schedules so members only can see it,

Im using obsess blue and i dont which files to put them in for example schedules.

Thanks

---

<div class="post-metadata">

**Author:** ![Kyle](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kyle](https://forum.phpvms.net/u/Kyle)\
**Post date:** [August 23, 2010, 12:58am UTC](https://forum.phpvms.net/t/privating-pages/3283/2 "2010-08-23T00:58:33Z")

</div>

> Hi, I was wondering how you can private pages for such as schedules so members only can see it,
> 
> Im using obsess blue and i dont which files to put them in for example schedules.
> 
> Thanks

I know how to. Let me get my coding and i’ll post it here for you. Give me a few mins to make sure it works.

---

<div class="post-metadata">

**Author:** ![Kyle](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kyle](https://forum.phpvms.net/u/Kyle)\
**Post date:** [August 23, 2010, 1:27am UTC](https://forum.phpvms.net/t/privating-pages/3283/3 "2010-08-23T01:27:24Z")

</div>

Ok, here the thing. You really need to look and read this careful

This is the part of a code to block non-members to not see the pages.

```
/* Block non-members to access this page */
	if(!Auth::LoggedIn())
	{
		$this->set('message', 'You are not logged in!');
		$this->render('core_error.tpl');
		return;
	}
	/* End of access denined */

```

In the modules folder, like for a example, Schedules.php in the Schedules folder. (core/Modules/Schedules/Schedule.php)

Find this line 26 - 35

```
public function view()
{
	if(isset($this->post->action) && $this->post->action == 'findflight')
	{
		$this->FindFlight();
		return;
	}

	$this->showSchedules();
}

```

Say this is accessible for non-members. Now you want to add the first code above i posted it…

Now here is the new code that non-members won’t see the page.

```
public function view()
{
	/* Block non-members to access this page */
	if(!Auth::LoggedIn())
	{
		$this->set('message', 'You are not logged in!');
		$this->render('core_error.tpl');
		return;
	}
	/* End of access denined */

	if(isset($this->post->action) && $this->post->action == 'findflight')
	{
		$this->FindFlight();
		return;
	}

	$this->showSchedules();
}

```

Then it will block non-members to see the page.

This applies to all skins.

Hope this helps. Just the same as other pages, but put it after public function view just like i posted the code.
