new admin link always ask for login
#1
Posted 27 June 2012 - 02:56 PM
I have a quick question for an experienced OSCommercer.
I have made a few custom admin pages for my website which work pretty well.
However, when I link these pages to my existing default admins pages OSCommerce always ask me to login a second time.
I would like to know what to add to my links (<a href="..." ></a> ) in order to prevent a re-login from the administrator.
Thank you,
GLime
#2 ONLINE
Posted 27 June 2012 - 03:01 PM
To keep that info, you would need to use the tep_href_link() function of osCommerce
#3
Posted 27 June 2012 - 03:18 PM
#4 ONLINE
Posted 27 June 2012 - 03:26 PM
#5
Posted 27 June 2012 - 03:34 PM
By the way I am developping on a local server.
#6 ONLINE
Posted 27 June 2012 - 04:19 PM
Are your extra files within folder admin/ ?
#7
Posted 27 June 2012 - 05:02 PM
#8 ONLINE
Posted 27 June 2012 - 05:11 PM
#9
Posted 27 June 2012 - 05:22 PM
<a href="<?php tep_href_link('custom_page.php', '', 'SSL')?>">Click here</a>
And it stills ask me for a login, even worst it bring me back to the admin index. Do I have to add the custom_page somewhere else in the code for it to work?
#10
Posted 27 June 2012 - 08:55 PM
Edited by germ, 27 June 2012 - 08:57 PM.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#11
Posted 27 June 2012 - 08:58 PM
#12
Posted 28 June 2012 - 05:31 PM
#13
Posted 28 June 2012 - 10:09 PM
action="<?php echo basename( $_SERVER['SCRIPT_FILENAME'] );?>"
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#14
Posted 28 June 2012 - 10:34 PM
action="<?php echo tep_href_link(basename( $_SERVER['SCRIPT_FILENAME'] ), '', 'SSL');?>"
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#15
Posted 29 June 2012 - 01:42 PM
#16
Posted 30 June 2012 - 02:49 PM
We're using the same code you said worked perfectly 3 posts ago.
The only difference is it's in a <form> instead of an anchor (<a href....></a>).
Unless you want to post your code or PM it to me I really don't have any idea how to "debug" something I can't see...
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#17
Posted 06 July 2012 - 03:59 PM
<form method="GET" action="<?php echo tep_href_link(basename($_SERVER['SCRIPT_FILENAME']), '', 'SSL');?>" id="frmNewModule" name="frmNewModule">
#18
Posted 06 July 2012 - 04:53 PM
When I get home this evening I'll do some testing on my WAMP server with a PHP form I've written and see if I can duplicate your problem.
It still doesn't make any sense to me at all why it isn't working.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#19
Posted 06 July 2012 - 10:24 PM
<?php
require('includes/application_top.php');
if ( $_GET[ 'fname' ] ) {
echo $_GET[ 'fname' ] . '<br>';
}
if ( $_GET[ 'lname' ] ) {
echo $_GET[ 'lname' ] . '<br>';
}
?>
<center>
<br><br><br><br><br><br><br>
<form method="GET" action="<?php echo tep_href_link(basename($_SERVER['SCRIPT_FILENAME']), '', 'SSL');?>" id="frmNewModule" name="frmNewModule">
First name: <input type="text" name="fname" /><br />
Last name: <input type="text" name="lname" /><br />
<input type="submit" value="Submit" />
</form>
<br><br>
<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">Home' . '</a>'; ?>
</center>
I put a link to the PHP file containing the code above in the footer of the admin so I can click it after I login to the admin.
Works great - never asks for login.
Not sure what it proves other than the code you're using for the form link isn't at fault.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
Also tagged with one or more of these keywords: link, admin, intern, new, page, login, href
osCommerce Online Merchant v2.x →
General Support →
301 redirect stops admin logon?Started by Jordanjd, 07 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
Installation and Configuration →
Bought out a company. Need help merging stores.Started by svavrek, 06 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
General Support →
What's new problemStarted by Jordanjd, 05 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
Installation and Configuration →
Catalog Admin screen not accessing the CSSStarted by DonStone, 02 May 2013 |
|
|
||
osCommerce Online Merchant v2.x →
General Support →
Customer unable to login and editing multiple productsStarted by fting, 18 Apr 2013 |
|
|









