Jump to content

is it possible to "login to cPanel" button on another page?


Anders

Recommended Posts

Hi guys,

 

I can see when an order have been made the customer get automatic logged in to clientarea what is good :)

 

now on that page complete.tpl is it possible to add the "Login to CPanel" button?

 

 

this code:

 

{if $producttype=="hostingaccount"}
   <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2083{else}2082{/if}/login/" method="post" target="_blank">
 <input type="hidden" name="user" value="{$username}" />
 <input type="hidden" name="pass" value="{$password|htmlentities}" />
 <input type="submit" value="{$LANG.cpanellogin}" class="modulebutton" />
 <input type="button" value="{$LANG.cpanelwebmaillogin}" onClick="window.open('http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2096{else}2095{/if}/')" class="modulebutton" />
 </form>
{elseif $producttype=="reselleraccount"}
   <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2087{else}2086{/if}/login/" method="post" target="_blank">
 <input type="hidden" name="user" value="{$username}" />
 <input type="hidden" name="pass" value="{$password|htmlentities}" />
 <input type="submit" value="{$LANG.cpanelwhmlogin}" class="modulebutton" />
 </form>
{/if}

 

 

I have tried but seem not work.

any ideas why?

 

warm regards B

Link to comment
Share on other sites

Hi guys,

 

I can see when an order have been made the customer get automatic logged in to clientarea what is good :)

 

now on that page complete.tpl is it possible to add the "Login to CPanel" button?

 

 

this code:

 

{if $producttype=="hostingaccount"}
   <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2083{else}2082{/if}/login/" method="post" target="_blank">
 <input type="hidden" name="user" value="{$username}" />
 <input type="hidden" name="pass" value="{$password|htmlentities}" />
 <input type="submit" value="{$LANG.cpanellogin}" class="modulebutton" />
 <input type="button" value="{$LANG.cpanelwebmaillogin}" onClick="window.open('http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2096{else}2095{/if}/')" class="modulebutton" />
 </form>
{elseif $producttype=="reselleraccount"}
   <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2087{else}2086{/if}/login/" method="post" target="_blank">
 <input type="hidden" name="user" value="{$username}" />
 <input type="hidden" name="pass" value="{$password|htmlentities}" />
 <input type="submit" value="{$LANG.cpanelwhmlogin}" class="modulebutton" />
 </form>
{/if}

 

 

I have tried but seem not work.

any ideas why?

 

warm regards B

 

I don't believe you can copy the code and have it work, as some of the variables would not be loaded. You can however create your own login buttons by doing a query of the database and building the login form manually.

 

I've done that for a few of my customers on various areas of their account manager.

Link to comment
Share on other sites

I don't believe you can copy the code and have it work, as some of the variables would not be loaded. You can however create your own login buttons by doing a query of the database and building the login form manually.

 

I've done that for a few of my customers on various areas of their account manager.

 

 

 

Hi Josh,

 

That sounds fanastic :) do you want to share an example of the html code, and have you done it with the cpanel login button also?

 

Warm regards Anders

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated