Beispiel #1
0
/**
* Prints html header
* @param none
*/
function doPrintHeader()
{
    global $conf;
    ?>
<p align="center">
<?php 
    CmnFns::print_language_pulldown();
    ?>
</p>
<h3 align="center">phpScheduleIt v<?php 
    echo $conf['app']['version'];
    ?>
</h3>
<?php 
}
Beispiel #2
0
/**
* Prints out a login form and any error messages
* @param string $msg error messages to display for user
* @param string $resume page to resume on after login
*/
function printLoginForm($msg = '', $resume = '')
{
    global $conf;
    $link = CmnFns::getNewLink();
    $use_logonname = (bool) $conf['app']['useLogonName'] || (bool) $conf['ldap']['authentication'];
    $is_exceeded = false;
    // Check browser information
    echo '<script language="JavaScript" type="text/javascript">checkBrowser();</script>';
    if (isset($_SESSION['loginAttempts']) && $_SESSION['loginAttempts'] >= $conf['app']['loginAttempts']) {
        $msg .= translate('The number of login attempts is exceeded.') . '<br/>';
        $is_exceeded = true;
    }
    if (!empty($msg)) {
        CmnFns::do_error_box($msg, '', false);
    }
    if (!$is_exceeded) {
        ?>

<form name="login" method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
<table width="350px" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
  <td bgcolor="#CCCCCC">
	<table width="100%" border="0" cellspacing="0" cellpadding="3">
	  <tr bgcolor="#EDEDED">
		<td colspan="2" style="border-bottom: solid 1px #CCCCCC;">
		  <h5 align="center"><?php 
        echo translate('Please Log In');
        ?>
</h5>
		</td>
	  </tr>
	<?php 
        if ($conf['app']['wrlc']) {
            ?>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
            echo translate('Last Name');
            ?>
</b></p>
		</td>
		<td>
		  <input type="password" name="name" class="textbox" />
		</td>
	  </tr>
	  <tr bgcolor="#FFFFFF">
		<td width="150">
		  <p><b><?php 
            echo translate("GWId");
            ?>
</b></p>
		</td>
		<td>
		  <input type="password" name="gwid" class="textbox" />
		</td>
	  </tr>  

	<?php 
        } else {
            ?>
	  <tr bgcolor="#FFFFFF">
		<td width="150">
		  <p><b><?php 
            echo translate($use_logonname ? 'Logon name' : 'Email address');
            ?>
</b></p>
		</td>
		<td>
		  <input type="text" name="email" class="textbox" />
		</td>
	  </tr>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
            echo translate('Password');
            ?>
</b></p>
		</td>
		<td>
		  <input type="password" name="password" class="textbox" />
		</td>
	  </tr>
	<!--   AK: language selection is not required at this point
		<tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
            echo translate('Language');
            ?>
</b></p>
		</td>
		<td>
		<?php 
            CmnFns::print_language_pulldown();
            ?>
		</td>
	  </tr> -->
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
            echo translate('Keep me logged in');
            ?>
</b></p>
		</td>
		<td>
		  <input type="checkbox" name="setCookie" value="true" />
		</td>
	  </tr>
		<?php 
        }
        ?>
		
	  <tr bgcolor="#FAFAFA">
		<td colspan="2" style="border-top: solid 1px #CCCCCC;">
		   <p align="center">
			<input type="submit" name="login" value="<?php 
        echo translate('Log In');
        ?>
" class="button" />
			<input type="hidden" name="resume" value="<?php 
        echo $resume;
        ?>
" />
		  </p>
		  <?php 
        if ((bool) $conf['app']['allowSelfRegistration']) {
            ?>
		  <h4 align="center" style="margin-bottom:1px;"><b><?php 
            echo translate('First time user');
            ?>
			<?php 
            $link->doLink('register.php', translate('Click here to register'), '', '', translate('Register for phpScheduleIt'));
            ?>
		  </h4>
		  <?php 
        }
        ?>
		</td>
	  </tr>
	</table>
  </td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
	<td>
	Our login system currently cannot handle hyphenated names. If you have a hyphen in your name, please substitute a space for it when logging in.
	</td>
</tr>
<tr><td>&nbsp;</td></tr>
</table>
<?php 
    }
    ?>
<p align="center">
<?php 
    $link->doLink('roschedule.php', translate('View Schedule'), '', '', translate('View a read-only version of the schedule'));
    ?>
|
<?php 
    if (!$conf['app']['wrlc']) {
        $link->doLink('forgot_pwd.php', translate('I Forgot My Password'), '', '', translate('Retreive lost password'));
        ?>
|
<?php 
    }
    ?>

<?php 
    $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help'));
    ?>
</p>
</form>
<?php 
}
Beispiel #3
0
/**
* Prints out a login form and any error messages
* @param string $msg error messages to display for user
* @param string $resume page to resume on after login
*/
function printLoginForm($msg = '', $resume = '')
{
    global $conf;
    $link = CmnFns::getNewLink();
    // Check browser information
    echo '<script language="JavaScript" type="text/javascript">checkBrowser();</script>';
    if (!empty($msg)) {
        CmnFns::do_error_box($msg, '', false);
    }
    ?>
<form name="login" method="post" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
">
<table width="350px" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
  <td bgcolor="#CCCCCC">
	<table width="100%" border="0" cellspacing="0" cellpadding="3">
	  <tr bgcolor="#EDEDED">
		<td colspan="2" style="border-bottom: solid 1px #CCCCCC;">
		  <h5 align="center"><?php 
    echo translate('Please Log In');
    ?>
</h5>
		</td>
	  </tr>
	  <tr bgcolor="#FFFFFF">
		<td width="150">
		  <p><b><?php 
    echo translate('Login');
    ?>
</b></p>
		</td>
		<td>
		  <input type="text" name="email" class="textbox" />
		</td>
	  </tr>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
    echo translate('Password');
    ?>
</b></p>
		</td>
		<td>
		  <input type="password" name="password" class="textbox" />
		</td>
	  </tr>
	  <?php 
    if ($conf['auth']['serverType'] === 'exchange') {
        ?>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
        echo translate('Domain');
        ?>
</b></p>
		</td>
		<td>
		  <input type="text" name="domain" class="textbox" value="<?php 
        echo $conf['auth']['exch_domain'];
        ?>
"/>
		</td>
	  </tr>
	  <?php 
    }
    if ($conf['app']['selectLanguage']) {
        ?>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
        echo translate('Language');
        ?>
</b></p>
		</td>
		<td>
		<?php 
        CmnFns::print_language_pulldown();
        ?>
		</td>
	  </tr>
	  <?php 
    }
    ?>
	  <tr bgcolor="#FFFFFF">
		<td>
		  <p><b><?php 
    echo translate('Keep me logged in');
    ?>
</b></p>
		</td>
		<td>
		  <input type="checkbox" name="setCookie" value="true" />
		</td>
	  </tr>
	  <tr bgcolor="#FAFAFA">
		<td colspan="2" style="border-top: solid 1px #CCCCCC;">
		   <p align="center">
			<input type="submit" name="login" value="<?php 
    echo translate('Log In');
    ?>
" class="button" />
			<input type="hidden" name="resume" value="<?php 
    echo $resume;
    ?>
" />
		  </p>
		</td>
	  </tr>
	</table>
  </td>
</tr>
</table>
<p align="center">
<?php 
    $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help'));
    ?>
</p>
</form>
<?php 
}