This topic is locked

embed HTML page

4/4/2010 5:15:47 AM
PHPRunner General questions
T
tropnevad author

Hi
I am new to asp runner, I am only using a demo, but I would like to konw if it will be possible to embed html web pages into asprunner pages? This might not be clear so I will give an example below
Using ASPrunner I will create a login page, after the user logs in there will be a normal html page that i created using other software with whatever content, and then there will not only be links to other html pages, but also some links to different tables/database pages/reports/ charts that were made with asprunner.
I konw I could do it the other way around were i just have an html website that does not need any login, and then when the user clicks on a link to the database they need to log in, however i dont want this as its annoying to have to login each time a certain database application.
I am also sure its possible to display a nice website using ASPrunner/PHPrunner however I think its easier to get relay nice looking webpages using other webdesign software like Dreamweaver since i already have one etc..
Thanks for any help

P
procheck 4/4/2010



Hi
I am new to asp runner, I am only using a demo, but I would like to konw if it will be possible to embed html web pages into asprunner pages? This might not be clear so I will give an example below
Using ASPrunner I will create a login page, after the user logs in there will be a normal html page that i created using other software with whatever content, and then there will not only be links to other html pages, but also some links to different tables/database pages/reports/ charts that were made with asprunner.
I konw I could do it the other way around were i just have an html website that does not need any login, and then when the user clicks on a link to the database they need to log in, however i dont want this as its annoying to have to login each time a certain database application.
I am also sure its possible to display a nice website using ASPrunner/PHPrunner however I think its easier to get relay nice looking webpages using other webdesign software like Dreamweaver since i already have one etc..
Thanks for any help


Hi,

I'm also new to phprunner so my help here is limited. Try searching for "formatting" in the help file and click on formatting options. There is a section on Hyperlinks which may or may not be what you're looking for.

Sergey Kornilov admin 4/4/2010

As far as I understand you are looking for a way to present user with your own custom menu page. To do so you can use AfterSuccessfulLogin event and the following code:

header("Location: mymenupage.html");

exit();
T
tropnevad author 4/8/2010



As far as I understand you are looking for a way to present user with your own custom menu page. To do so you can use AfterSuccessfulLogin event and the following code:

header("Location: mymenupage.html");

exit();



Thanks I think that will work, because I basically want to have a series of html pages in html that are interlinked which can only be navigated after login. and then once the user reaches a certain html page it will link to an appropriate form /chart.
Will this be done by using the command that you mentioned after login, and then on the html page I include the link to the various asp page?. and this will remember that the user has logged in correctly? And will this limit anyone who has not logged in from accessing the html pages if they know the direct link?
I am faily new to all this and am doing some background reading as to how this is done, but if anyone can help point me in the right direction to find info that would also be helpful.
Thanks for all the help already <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=49067&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 4/8/2010

HTML pages cannot be password protected. If you need to protect all pages you can have better luck modifying menu page in Visual Editor.

C
chaintm 4/8/2010



HTML pages cannot be password protected. If you need to protect all pages you can have better luck modifying menu page in Visual Editor.


That or if your really savy, go into the actual datafiles, add a page , password it then save that and keep it aside each time php re-generates your site, then add as needed. I don't recommend this thou unless you know what you really are doing.

T
tropnevad author 4/13/2010

Thanks for the help, I was hoping there was a way to simply put a bunch static pages within my php/asprunner website after the user has logged in but i guess this is not realy possible.
Would it maybe be easier to convert my html stuff into a flash .sfw and display that on the first page after login?
The reason why is for my navigation I would like to replace the default menu page to represent a image map type menu where the user will click on different parts of the image to navigate. It would look fine if it was only one level, but the menu consists of a few levels so when the user clicks the first time, a second level menu image will load then after a form/table will open. Any suggestions will be appreciated on how i can do this <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=49113&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I know i can add static content on via the editor, but I dont konw how to create any new pages, do i need to base all of my pages on a table?

HJB 4/13/2010

quote excerpt ex http://www.asprunner.com/forums/index.php?showtopic=5275
You cannot protect HTML page.
Rename your page to index2.php and add the following code snippet in the beginning of the page:
<?php

if(!@$_SESSION["UserID"])

{

$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];

header("Location: login.php?message=expired");

return;

}

?>

T
tropnevad author 4/14/2010



quote excerpt ex http://www.asprunner.com/forums/index.php?showtopic=5275
You cannot protect HTML page.
Rename your page to index2.php and add the following code snippet in the beginning of the page:
<?php

if(!@$_SESSION["UserID"])

{

$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];

header("Location: login.php?message=expired");

return;

}

?>


Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=49141&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> i will give this a go

A
acpan 4/14/2010

Hi, I need the same solution. I tried using the solution mentioned but

it always directed me to the login page and said session expired even i was already logged in.
To check, I tried to echo the $_SESSION["UserID"] in the index2.php and it was empty.
I then tried to insert extra line: include_once("include/dbcommon.php") as below and it worked:

<?php

include_once("include/dbcommon.php");

if(!@$_SESSION["UserID"])

{

$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];

header("Location: login.php?message=expired");

return;

}

?>
however, using the above, when i am not logged in and tried to access the page index2.php directly,

it threw an error to the web page:
Technical information

Error type 256

Error description You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

URL X.X.X.X/domain/index2.php?

Error file \htdocs\domain\include\dbconnection.php

Error line 35

SQL query SELECT z_used from mytable where z_used= 1 AND user_id =

Solution

This is a general error. It occurs when there is an error in event code or in SQL.
Any advise ?
Thanks

acp

A
acpan 4/16/2010

Any advice, Sergey and Jane ?

J
Jane 4/23/2010

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

J
Jepsen 4/24/2010
<?php

if(!@$_SESSION["UserID"])

{

$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];

header("Location: login.php?message=expired");

return;

}

?>


The above code does not work here. I am just sent to the login all the time.
But the following code works:

<?php

session_start();

if (!@$_SESSION['UserID']) {

$_SESSION['MyURL'] = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];

header('Location: login.php?message=expired');

die();

}
?>
HJB 4/24/2010

Morten,
TUSEN TAKK!
YOU MADE MY DAY ...
Har de bra - vennligst "walk2fly"

A
acpan 4/25/2010

Morten,
Thanks, this works for me too!
acp