help setting up an easy client area

hope someone can help - I have no coding knowledge but would like to create mutiple password protected folders / files which clients can access via my site.

ideally I’d like to just create a few password protected folders on my ftp for different clients to upload and download work.

so the question is - is there an easy way to create a password protected client/supplier area in freeway - where I can hand out password and username and people can upload and download?

or bypassing freeway - does anyyone know if there is a way of doing that directly on the ftp?

PS if there isn’t way of doing that easily on freeway - via an action for example - why not? surely a lot of people would benefit.

I have searched other threads for this - and all seem very old - so I am hoping something might have changed from having to have php knowledge

thanks!
cam.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Easiest way to do this is server side

If you have access to Cpanel or similar there is a feature there called Password Protected Directories - this allows you to choose any folder on the server and create user/password combinations to control access.

Create your site as normal in FW with the subfolders you want to protect and then upload as normal.

Use Cpanel to create user/pass combos for these folders - job done.

There is an action in FW ‘Password Protected URL’ but it provides very basic protection and doesn’t stop people getting in there by accident.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you have access to Cpanel or similar there is a feature there called Password Protected Directories - this allows you to choose any folder on the server and create user/password combinations to control access.

Create your site as normal in FW with the subfolders you want to protect and then upload as normal.

Use Cpanel to create user/pass combos for these folders - job done.

thanks david - I tried - unfortunately I can’t see anywhere to do it it via my isp’s control panel (one.com) and have askde their support team - nor can I see anyway of doing it direct via Fetch - my ftp client.

not sure if that was what you meant? but thanks for trying.

cam.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you have a cPanel then it will be in there - may just be hidden a
little more. Your support team will get back to you with the answer.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 9 Apr 2009, at 08:52, Joachim Levin wrote:

If you have access to Cpanel or similar there is a feature there
called Password Protected Directories - this allows you to choose
any folder on the server and create user/password combinations to
control access.

Create your site as normal in FW with the subfolders you want to
protect and then upload as normal.

Use Cpanel to create user/pass combos for these folders - job done.

thanks david - I tried - unfortunately I can’t see anywhere to do it
it via my isp’s control panel (one.com) and have askde their support
team - nor can I see anyway of doing it direct via Fetch - my ftp
client.

not sure if that was what you meant? but thanks for trying.

cam.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In my control panel it looks like this http://www.deltadzine.net/cpanel.html

So look for something similar in yours

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Your using the same host and FTP client as me!

No, the Control Panel of One.com looks very different to the standard CPanel, as showen by David.

There is a way to do it with One.com, I went to support and they told me how, but for some reason it didn’t work. If you go to the instant chat bit of their website someone will tell you straight away.

I did do it another way though. I made a page in freeway, added in HTML code that lists all files in a certain directory, added an upload tool to that page (again html code) that would upload to the directory that the list shows the contents of, then I password protected the page using a php script I found somewhere. I’d send a link but my laptops broken and that’s got all the stuff on it. While this way doesn’t protect the actual files in the folder, people could only find it if they had a link to it and knew the file names which is unlikely…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There is a way to do it with One.com, I went to support and they told me how, but for some reason it didn’t work. If you go to the instant chat bit of their website someone will tell you straight away.

I tried that also - using their ht access tool - but it didn’t work.

thansk for your other tip - this is where I stumble as I just don’t know code.

Not to worry - I think I am going to get my site designed by someone pro anyway now. It has out grown my skills :slight_smile:

Thanks all for trying to help.

cam.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I wouldn’t worry about not knowing code…I don’t know a thing, yet still managed to put in a few scripts…it’s pretty much signposted all the way so you can’t go wrong!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s where you can download the script for password protecting a page…
http://www.zubrag.com/scripts/password-protect.php


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s where you can download the script for password protecting a page… :: Web Page Password Protect :: Free PHP Scripts

excellent thanks Fergus - appreciate your help - will try it.

Cam.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s another

http://www.puremango.co.uk/cm_php_pass_81.php

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Joachim, this application looks great but it is windows only. Is there something like this for the Mac?

DeltaDave, This appears to be just the code, how would I use this in Freeway.

Your input is appreciated.

Thanks, TeamSDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

TeamSDA,

Not sure about DeltaDave’s but it’s likely to be the same as the script I posted a link to. Basically, download the script, edit it in a text editor (the areas will be easy to recognise, like username, password etc.) then upload the script to your webspace using a FTP Client (eg. Fetch). Then follow the instructions that came with the script to do something that gives you a code to paste into the pages you want to protect. In freeway just go to (can’t remember off the top of my head) I think it’s ‘Page’ > ‘HTML Markup’ and paste the code ‘before body’.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK Here is what you do. You will need to ensure that your page ends .php and that your server is running PHP. Then in FW page you are protecting, go to Page>HTML Markup and in the dialogue box that opens paste the following code in after you have selected Before from the picker at the bottom.

<?php
/************************************************************
*
*		PHP Pass Copyright 2005 Howard Yeend
*		www.puremango.co.uk
*
*    This file is part of PHP Pass.
*
*    PHP Pass is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    PHP Pass is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with PHP Pass; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*
************************************************************/

session_start();

//--------------------------
// user definable variables:
//--------------------------

// maximum number of seconds user can remain idle without having to re-login:
// use a value of zero for no timeout
$max_session_time = 0;

// type of alert to give on incorrect password:
// eg:
// $alert = "email@hidden";	- sends email to email@hidden
// $alert = "blah";		- appends to file named 'blah'
// $alert = "";			- no alerts
$alert = "./.ht_badlogins";

// acceptable passwords:
$cmp_pass = Array();
$cmp_pass[] = md5("yourpassword");
$cmp_pass[] = md5("anotherpassword");
// add as many as you like

// maximum number of bad logins before user locked out
// use a value of zero for no hammering protection
$max_attempts = 3;

//-----------------------------
// end user definable variables
//-----------------------------


// save session expiry time for later comparision
$session_expires = $_SESSION['mpass_session_expires'];

// have to do this otherwise max_attempts is actually one less than what you specify.
$max_attempts++;

if(!empty($_POST['mpass_pass']))
{
	// store md5'ed password
	$_SESSION['mpass_pass'] = md5($_POST['mpass_pass']);
}

if(empty($_SESSION['mpass_attempts']))
{
	$_SESSION['mpass_attempts'] = 0;
}

// if the session has expired, or the password is incorrect, show login page:
if(($max_session_time>0 && !empty($session_expires) && mktime()>$session_expires) || empty($_SESSION['mpass_pass']) || !in_array($_SESSION['mpass_pass'],$cmp_pass))
{
	if(!empty($alert) && !in_array($_SESSION['mpass_pass'],$cmp_pass))
	{
		// user has submitted incorrect password
		// generate alert:

		$_SESSION['mpass_attempts']++;
		
		$alert_str = $_SERVER['REMOTE_ADDR']." entered ".htmlspecialchars($_POST['mpass_pass'])." on page ".$_SERVER['PHP_SELF']." on ".date("l dS of F Y h:i:s A")."rn";
		
		if(stristr($alert,"@")!==false)
		{
			// email alert
			@mail($alert,"Bad Login on ".$_SERVER['PHP_SELF'],$alert_str,"From: ".$alert);
		} else {
			// textfile alert
			$handle = @fopen($alert,'a');
			if($handle)
			{
				fwrite($handle,$alert_str);
				fclose($handle);
			}
		}
	}
	// if hammering protection is enabled, lock user out if they've reached the maximum
	if($max_attempts>1 && $_SESSION['mpass_attempts']>=$max_attempts)
	{
		exit("Too many login failures.");
	}


	// clear session expiry time
	$_SESSION['mpass_session_expires'] = "";

	?>

You will see in the code there is a section where you can enter your passwords - at the moment these are ‘yourpassword’ and ‘anotherpassword’ - substitute these for your own.

Upload it and give it a go.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is it the "Before " or "Before " tag?

Thanks, Team, SDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi DeltaDave,

I Pasted the above script in the Freeway “HTML Markup” “Before ” for the page I am wanting to protect and changed the page name from .html to .php. My ISP insures me that their servers are running PHP. After uploadin to my ISP I go to that page URL and only get a blank page. No Prompt or such. Please note, we are designers and have limited coding experience.

01 - Am I missing a step?

02 - Do I need to create a prompt layout in Freeway?

03 - How will I be able to customize the password prompt?

Thank You, Team SDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This code needs to go in the Before HTML section – all the way at the
top and before a single character of ordinary HTML is output.

If you see a blank page in PHP, that usually means that your server is
(correctly) configured to hide errors. If you still get the blank page
after you move the code before the page starts, then use Freeway to
preview into a text editor like TextWrangler or BBEdit, copy
everything, visit http://pastie.org and paste the code out of your
clipboard. Change the Language picker to HTML/XML and press the Paste
button. Make note of the URL that returns, and post it here. We’ll be
able to see the raw code of your page before the PHP interpreter
converts it to a blank page, and (maybe) diagnose what’s going wrong
here.

Walter

On Apr 11, 2009, at 11:36 AM, TeamSDA wrote:

Hi DeltaDave,

I Pasted the above script in the Freeway “HTML Markup” “Before

” for the page I am wanting to protect and changed the page name from .html to .php. My ISP insures me that their servers are running PHP. After uploadin to my ISP I go to that page URL and only get a blank page. No Prompt or such. Please note, we are designers and have limited coding experience.

01 - Am I missing a step?

02 - Do I need to create a prompt layout in Freeway?

03 - How will I be able to customize the password prompt?

Thank You, Team SDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi waltd,

Tried putting the code in different places using the Freeway HTML markup tool and did not have any luck. before taking up to much of your time diagnosing what is going on I tried the code that Fergus recommended and it works like a charm. :: Web Page Password Protect :: Free PHP Scripts

By the way I inserted this code "Before " it works but is this OK?

I would still like to know if there is a way to format the username and password prompt in freeway?

Any further input would be appreciated, Team SDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The one I was suggesting, as Walter said, goes before HTML but the HTML bit was lost from my post. Should have read

...selected Before <html> from the picker....

But as long as you have something that works.

I am surprised that one.com do not give you easy access to Password Protected Directories as it is a pretty standard feature (maybe it is just buried in with the rest) as it certainly extremely easy to implement without any coding at all.

As to why my code doesn’t work: if you have copied it from the web forum then it may not be complete. Use the code from the site I directed you to instead.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK I see how this is done and have everything working fine. I see in the markup section of the code where I can formate things differently for both scripts.

I have a concern as I am not a coder. If the entire PHP script is put before the HTML in Freeway will this cause any problems as the final php document that is uploaded will create another section of HTML.

Also It would be great if one of you cool scripting guru’s out there would make an Action for this. Remember we would like to be able to formate any logins or prompts.

Going to be stepping away for about a week but look forward to checking back in with you all here at Freeway Talk.

Team SDA


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options