Acessar Webmail
#1
Posted 24/09/2004, 22:22
Gostaria de saber se alguém tem ou sabe fazer um sistema de login que ligue uma pagina de login ao webmail no cpanel ?
tipo a pessoa prenche o login e senha e ele abri ou o horde ou neomail ou squirremail .
Obrigado a todos
#2
Posted 25/09/2004, 01:04
PHP |
<?php #Login Configuration #cPanel $protocol = 'http'; $port = 2082; #Secure cPanel #$protocol = 'https'; #$port = 2083; #WHM #$protocol = 'http'; #$port = 2086; #Secure WHM #$protocol = 'https'; #$port = 2087; #Webmail #$protocol = 'http'; #$port = 2095; #Secure Webmail #$protocol = 'https'; #$port = 2096; ?> <html> <h1>[Web Hosting Company Name Here]</h1> <b>cPanel Login</b><br> <?php if ($_GET['failed'] == "1") { ?> <font color=#FF0000>Your login attempt failed!</font> <?php } print "<form action=\"" . $protocol . "://" . $_SERVER['HTTP_HOST'] . ":" . $port . "/login/\" method=POST>"; ?> User: <input type=text name=user><br> Pass: <input type=password name=pass><br> <?php print "<input type=hidden name=failurl value=\"http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">"; ?> <input type=submit value=Login> </form><br> <a href="cpanel-login.phps">Source</a><br> Note: This examples requires cPanel 9.4.1 or later! </html> |
Não se esqueça de cuztomizar e traduzir
Se algum mod puder pendurar essee código....
Abraços.
Edição feita por: brunoalves, 25/09/2004, 01:05.
Projetos
• Bruno Alves • WebLugar.net •
Fórums
• Ajuda Linux • BrClube • Forum cPanel • webforum • WMS •
#3
Posted 25/09/2004, 01:08
Eu fiz um "atalho" na minha pagina, para a pessoa acessar o webmail do meu servidor..... mas quando a pessoa entra com login e senha... vai parar na tela q escolhe um dos 3 serviços de email (horde ou neomail ou squirremail).
Portando axo q n dah n cara. Mas se isso for possivel... tb quero saber
Edição feita por: _Samuca_, 25/09/2004, 01:10.
#4
Posted 25/09/2004, 01:10
Abraços.
Projetos
• Bruno Alves • WebLugar.net •
Fórums
• Ajuda Linux • BrClube • Forum cPanel • webforum • WMS •
#5
Posted 25/09/2004, 01:14
tah aih o código:
<form action=http://www.NOME DO SEU SITE.com.br:2095/login/ method=POST>
<br>
<table cellpadding="1" cellspacing="1" >
<tr>
<td width="40%" align="right" class="normal">Login:</td>
<td width="60%"> <input name=user type=text size=20> </td>
</tr>
<tr>
<td width="40%" align="right" class="normal">Senha:</td>
<td width="60%"> <input type=password name=pass
size=20> </td>
</tr>
<tr>
<td colspan=2> <div align="center">
<input name="submit" type=submit
value="Entrar">
</div></td>
</tr>
<tr align="center" valign="top">
<td colspan=2 class="normal"> <div align="center">Coloque
seu endereço completo.</div></td>
</tr>
</table>
</form>
É assim q faço p ir direto p tela do horde, neomeio ow squirremail.... daih eh soh escolher o serviço q vc usa... e acessar
T+
Edição feita por: _Samuca_, 25/09/2004, 01:16.
#6
Posted 25/09/2004, 09:16
#7
Posted 25/09/2004, 11:13
não é bem isso, o que to querendo é que apos o login ele já acesse um determinado sistema , tipo eu configuro para ele acessar o horde, então apos o login ele já entra direto no horde, sem precisar fazer a escolha ...Pelo q entendi da pergunta ele queria justamente a tela para escolher um dos tres, mas já logado.
Abraços.
Entederam ?
#8
Posted 25/09/2004, 11:27
eu tenho até um codigo desse tipo, ele foi feito para acessar o horde, só que tá dando erro
se vcs quiserem testar aí para saber qual é o erro:
<? /************************* coloque o dominio, sem www. ex:*/ $domain = "seusite.com"; /*************************/ //$domain=""; # insert client ip (work with shared ip too) /************************ coloque o ip do servidor ex: */ $ip = "111.11.111.111"; /************************/ //$ip = ""; # insert user /****************** deixe em branco ******************/ $user = ""; # #NAO MUDE MAIS NADA # If you are using CheckIt on you can extract above data using # Cpanel tags . ################################################ if (isset($loginssl) && $loginssl == 1){ $hordessl=2096; $urlhttp="s"; } else { $hordessl=2095; $urlhttp=""; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <!-- IMP: Copyright 2001, The Horde Project. IMP is under the GPL. --> <!-- Horde Project: http://horde.org/ | IMP: http://horde.org/imp/ --> <!-- GNU Public License: http://www.fsf.org/copyleft/gpl.html --> <html lang="en-US"> <head> <title>Web Mail Login</title> <style type="text/css"> <!-- .wemail { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; border: 1px solid #FF6600; } --> </style> </head> <body onload="setFocus()"> <div align="center"> <script language="JavaScript" type="text/javascript"> <!-- function setFocus() { document.implogin.imapuser.focus(); } function submit_login() { if (document.implogin.imapuser.value == "") { alert('Please provide your username and password'); document.implogin.imapuser.focus(); return false; } else if (document.implogin.pass.value == "") { alert('Please provide your username and password'); document.implogin.pass.focus(); return false; } else { return true; } } //--> </script> <script language="JavaScript1.2" type="text/javascript"> <!-- function enter_key_trap(e) { var keyPressed; if (document.layers) { keyPressed = String.fromCharCode(e.which); } else if (document.all) { keyPressed = String.fromCharCode(window.event.keyCode); } else if (document.getElementById) { keyPressed = String.fromCharCode(e.keyCode); } if ((keyPressed == "\r" || keyPressed == "\n") && (submit_login())) { document.implogin.submit(); } } //--> </script> </div> <div align="center"> <center> <table style="border-collapse: collapse" bordercolor="#000000" cellspacing="0" cellpadding="0" width="170" border="0"> <tr> <td valign="top" width="50%" height="16"> <form action="login.php" method="post" name="implogin" id="implogin"> <input type="hidden" name="actionID" value="105" /> <input type="hidden" name="url" value="" /> <input type="hidden" name="mailbox" value="INBOX" /> <div align="center"> <center> <table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0"> <tr> <td align="center" colspan="2" class="header"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#000000">Confira seu email:</font></b></font></td> </tr> <tr> <td height="24" align="right" valign="middle" class="light"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Email: </b></font></td> <td align="left"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input name="imapuser" type="text" class="wemail" style="color: #666666;border: 1px solid black; font-weight: bold; background-color: #F2F2F2; width: 120px" maxlength="90" getemail()"/> </font></td> </tr> <tr> <td align="right" class="light" valign="top"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Senha: </b> </font></td> <td align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input name="pass" type="password" class="wemail" style="color: #666666;border: 1px solid black; font-weight: bold; background-color: #F2F2F2; width: 120px" maxlength="20" getemail()" /> </font></td> </tr> <tr> <td colspan="2" valign="top"> <font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input type="hidden" name="server" value="localhost" /> <input type="hidden" name="port" value="143" /> <input type="hidden" name="namespace" value="" /> <input type="hidden" name="maildomain" value="<? echo $domain; ?>" /> <input type="hidden" name="protocol" value="imap/notls" /> <input type="hidden" name="realm" value="" /> <input type="hidden" name="urlhttp" value="<? echo $urlhttp; ?>" /> <input type="hidden" name="ip" value="<? echo $ip; ?>" /> <input type="hidden" name="domain" value="<? echo $domain; ?>" /> <input type="hidden" name="user" value="<? echo $user; ?>" /> <input type="hidden" name="hordessl" value="<? echo $hordessl; ?>" /> <input type="hidden" name="new_lang" value="pt_BR" /> </font> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input type="hidden" name="folders" value="" /> </font></td> </tr> <tr> <td valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td align="left" class="light"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <input type="submit" class="wemail" name="button" tabindex="4" value="Entrar" onclick="return submit_login()" /> <br /> <? if (isset($loginssl) && $loginssl == 1){ ?> <b><font color="#999999">Modo login: <a href="webmail/index.php?loginssl="><font color="#333333">Normal</font></a> | Seguro</font></b> <? } else { ?> <b><font color="#999999">Modo login: Normal | <a href="webmail/index.php?loginssl=1"><font color="#333333">Seguro</font></a></font></b> <? } ?> </font></td> </tr> </table> </center> </div> </form> <script language="JavaScript" type="text/javascript"> <!-- function selectLang() { // We need to reload the login page here, but only if the user hasn't // already entered a username and password. if (document.implogin.imapuser.value == '' && document.implogin.pass.value == '') { var lang_page = 'login.php?new_lang=' + document.implogin.new_lang[document.implogin.new_lang.selectedIndex].value; self.location = lang_page; } } //--> </script> <script language="JavaScript1.2" type="text/javascript"> <!-- // Setup the enter keytrap code if (window.document.captureEvents != null) { window.document.captureEvents(Event.KEYPRESS); window.document.onkeypress = enter_key_trap; } //--> </script> <!-- This file contains any "Message Of The Day" Type information --> <!-- It will be included below the log-in form on the login page. --> <script language="JavaScript" type="text/javascript"> <!-- if (parent.frames.horde_main) parent.document.title = 'Mail :: Welcome to Horde'; //--> </script> </td> </tr> </table> </center> </div> </body> </html>
#9
Posted 25/09/2004, 17:31
Abraço.
Projetos
• Bruno Alves • WebLugar.net •
Fórums
• Ajuda Linux • BrClube • Forum cPanel • webforum • WMS •
#10
Posted 25/09/2004, 20:18
eu não entendi direito, aí se vcs "puderem" testar o script aí
#11
Posted 26/09/2004, 17:29
Abraço.
Projetos
• Bruno Alves • WebLugar.net •
Fórums
• Ajuda Linux • BrClube • Forum cPanel • webforum • WMS •
#12
Posted 15/03/2005, 16:25
Funcionou bem este código, mas alguem saberia quando o usuário digitar o login ou senha invalido aparecer a mensagem abaixo dos campos em vez de ir pra pagina em inglês com outro campo de login e senha?se for soh isso mesmo.....
tah aih o código:
<form action=http://www.NOME DO SEU SITE.com.br:2095/login/ method=POST>
<br>
<table cellpadding="1" cellspacing="1" >
<tr>
<td width="40%" align="right" class="normal">Login:</td>
<td width="60%"> <input name=user type=text size=20> </td>
</tr>
<tr>
<td width="40%" align="right" class="normal">Senha:</td>
<td width="60%"> <input type=password name=pass
size=20> </td>
</tr>
<tr>
<td colspan=2> <div align="center">
<input name="submit" type=submit
value="Entrar">
</div></td>
</tr>
<tr align="center" valign="top">
<td colspan=2 class="normal"> <div align="center">Coloque
seu endereço completo.</div></td>
</tr>
</table>
</form>
É assim q faço p ir direto p tela do horde, neomeio ow squirremail.... daih eh soh escolher o serviço q vc usa... e acessar
T+
Otavio Boari
#13
Posted 16/03/2005, 09:03
<form action=http://www.NOME DO SEU SITE.com.br:2095/login/ method=POST>
<br>
<table cellpadding="1" cellspacing="1" >
<tr>
<td width="40%" align="right" class="normal">Login:</td>
<td width="60%"> <input name=user type=text size=20> </td>
</tr>
<tr>
<td width="40%" align="right" class="normal">Senha:</td>
<td width="60%"> <input type=password name=pass
size=20> </td>
</tr>
<tr>
<td colspan=2> <div align="center">
<input name="submit" type=submit
value="Entrar">
</div></td>
</tr>
<tr align="center" valign="top">
<td colspan=2 class="normal"> <div align="center">Coloque
seu endereço completo.</div></td>
</tr>
</table>
</form>
tem como concatenar??? tipo no campo usuario digita so o nome e depois acrescenta via codigo o @seusite.com
#14
Posted 26/04/2005, 00:18
Dêem uma olhada!
Até mais Santos
#15
Posted 26/04/2005, 11:39
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)