Location: PHPKode > projects > Astmail - Asterisk web voicemail > index.php
<?php
/*

 Copyright (c) 2005-2006 Colorado State Univeristy
 All rights reserved.

Please contact Kyle Haefner hide@address.com
for changes, bug notices or feature requests

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
session_start();
//include config file
include_once ("config/vmail_conf.php");
?>
<html>
<head>
<link rel='stylesheet' type='text/css' href='vmail1.css' />
<title><?php print $page_title;?>- Login</title>
<script language="javascript">
function login()
{
document.login.submit();
}

//Fix png display in IE
function correctPNG()
   {
   for(var i=0; i<document.images.length; i++)
      {
          var img = document.images[i]
          var imgName = img.src.toUpperCase()
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
             {
                 var imgID = (img.id) ? "id='" + img.id + "' " : ""
                 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
                 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
                 var imgStyle = "display:inline-block;" + img.style.cssText
                 if (img.align == "left") imgStyle = "float:left;" + imgStyle
                 if (img.align == "right") imgStyle = "float:right;" + imgStyle
                 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
                 var strNewHTML = "<span " + imgID + imgClass + imgTitle
                 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
             + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
                 img.outerHTML = strNewHTML
                 i = i-1
             }
      }
   }
window.attachEvent("onload", correctPNG);
</script>
</head>
<body>
<div id="login">
<table width=100% align=center cellpadding=0px cellspacing=0px border=0>
<FORM METHOD="POST"  name="login" ACTION="authenticate.php">
<tr><td valign=top align=center rowspan=8 bgcolor="#255014">
 	<div id="logo">
		<?php print "<a href=\"$login_logo_url\"><img src=\"$login_logo\" border=0></a>";?>
	</div>
</td><td rowspan=8><img align=center border=0 src="images/shadow.png"></td></tr>
<tr><td align=left colspan=2><font size=+2><?php print $login_title ?></font></td><td colspan=2 rowspan=2 align="right">
<a href='_asterisk/help/help.php'><img src='images/help.gif' border=0></a>
&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td><br></td></tr>
<tr><td><strong>Mailbox:</strong></td><td>
<?php
print "<input type='text' name='mailbox' value='$_SESSION[mailbox]'>";
?>
</td>
<td><div class="loginmsg">
<?php
if(!$_SESSION[mailboxmsg]=="")
{
 print "$_SESSION[mailboxmsg]" ;
 //session_destroy();
 unset($_SESSION[mailbox]);
 unset($_SESSION[password]);
 }
 else if (!$_GET[mailboxmsg]=="")
 {
 print "$_GET[mailboxmsg]";
 }
 ?></div></td>
</tr>
<tr><td><br></td>
</tr>
<tr><td>Password:</td><td ><input type="password" name="password"></td>
<td><div class="loginmsg">
<?php
if(!$_SESSION[passmsg]=="")
{
 print "$_SESSION[passmsg]" ;
 session_destroy();
 unset($_SESSION[mailbox]);
 unset($_SESSION[password]);
 }
 ?></div></td></tr>
<tr><td><br></td><td align=right>
<input type="submit" name="submit" value="Login">
</td><td align="center" width="25%"></td></tr>
<tr><td><br></td><td><br></td><td><br></td></tr>
</FORM>
</table>
</div>
</body>

</html>
Return current item: Astmail - Asterisk web voicemail