ispCP - Board - Support
Login form on website. - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Login form on website. (/thread-6352.html)

Pages: 1 2


Login form on website. - Linkforsoad - 04-10-2009 12:04 AM

Hello Everybody! Big Grin

I'm using ispCP for free webhosting Karhost.nl. I'd like to use an login form on my website. The website URL is karhost.nl, and the ispCP url is klant.karhost.nl. I tried so much but it doesn't work. Is there anyone who have a small script to fix this Rolleyes

Thanks for helping me Smile

Linkforsoad (aka Simon).


RE: Login form on website. - BeNe - 04-10-2009 01:59 AM

Quote:I'd like to use an login form on my website
As a PopUp or Wrapper ?

Greez BeNe


RE: Login form on website. - Linkforsoad - 04-10-2009 02:02 AM

Hmm. If you go to Karhost.nl you can see what i mean. There is a login box right of the header. Is it possible to use that for ispCP. I know it can with DirectAdmin...

Gr, Simon.


RE: Login form on website. - Lucan - 04-10-2009 02:18 AM

Delete

Code:
check_login(__FILE__);

from the ispcp index.php and it will work.



Greetings


RE: Login form on website. - Linkforsoad - 04-10-2009 02:53 AM

But... Then can i use a POST thing :-p?

Gr, Simon.
Edit: Which Index.php?


RE: Login form on website. - Lucan - 04-10-2009 03:01 AM

yes.

there is only one index.php for ispcp?


RE: Login form on website. - Linkforsoad - 04-10-2009 03:04 AM

In the /gui map of /gui/admin /gui/reseller and /gui/user ;-) In /gui is there:

Code:
if (check_user_login()) {

That code?


RE: Login form on website. - Lucan - 04-10-2009 03:06 AM

just the normal /gui folder

there u have to remove

check_login(__FILE__);

only that not more.


RE: Login form on website. - Linkforsoad - 04-10-2009 03:52 AM

I cant find it. Here is my index file:

Code:
*  blablabla license blablabla =P
*/

require 'include/ispcp-lib.php';

if (isset($_GET['logout'])) {
        unset_user_login_data();
}

do_session_timeout();

init_login();

if (isset($_POST['uname']) && isset($_POST['upass']) && !empty($_POST['uname'])$

        $uname = encode_idna($_POST['uname']);

        check_input(trim($_POST['uname']));
        check_input(trim($_POST['upass']));

        if (register_user($uname, $_POST['upass'])) {
            redirect_to_level_page();
        }

        header('Location: index.php');
        exit();
}
if (check_user_login()) {
        if (!redirect_to_level_page()) {
                unset_user_login_data();
        }
}

shall_user_wait();
$theme_color = isset($_SESSION['user_theme']) ? $_SESSION['user_theme'] : Confi$

$tpl = new pTemplate();

if ((Config::get('MAINTENANCEMODE') || databaseUpdate::getInstance()->checkUpda$

        $tpl->define_dynamic('page', Config::get('LOGIN_TEMPLATE_PATH') . '/mai$
        $tpl->assign(
                array(
              'TR_PAGE_TITLE'         => tr('ispCP Omega a Virtual Ho$
                        'THEME_COLOR_PATH'      => Config::get('LOGIN_TEMPLATE_$
                        'THEME_CHARSET'         => tr('encoding'),
                        'TR_MESSAGE'            => nl2br(Config::get('MAINTENAN$
                        'TR_ADMINLOGIN'         => tr('Administrator login')
                )
        );

} else {
  $tpl->define_dynamic('page', Config::get('LOGIN_TEMPLATE_PATH') . '/ind$

        $tpl->assign(
                array(
                        'TR_MAIN_INDEX_PAGE_TITLE'      => tr('Karhost.nl Klant$
                        'THEME_COLOR_PATH'                      => Config::get($
                        'THEME_CHARSET'                         => tr('encoding$
                        'TR_LOGIN'                                      => tr('$
                        'TR_USERNAME'                           => tr('Gebruike$
                        'TR_PASSWORD'                           => tr('Wachtwoo$
                        'TR_LOGIN_INFO'                         => tr('Voert u $
                        // @todo: make this configurable by ispcp-lib
                        'TR_SSL_LINK'                           => isset($_SERV$
                        'TR_SSL_IMAGE'                          => isset($_SERV$
                        'TR_SSL_DESCRIPTION'            => !isset($_SERVER['HTT$
                )
        );
}
if (Config::get('LOSTPASSWORD')) {
        $tpl->assign('TR_LOSTPW', tr('Wachtwoord vergeten?'));
} else {
        $tpl->assign('TR_LOSTPW', '');
}

$tpl->define_dynamic('page_message', 'page');
gen_page_message($tpl);

$tpl->parse('PAGE', 'page');
$tpl->prnt();

if (Config::get('DUMP_GUI_DEBUG'))
        dump_gui_debug();

?>



RE: Login form on website. - Lucan - 04-10-2009 04:07 AM

which ispcp version do you use?