Exemplo n.º 1
0
<?php

//Session Info
session_start();
if (!isset($_SESSION['emanager_logged'])) {
    header('Location: login.php');
}
include 'db_connection.php';
include 'classes/employee.php';
include 'classes/team.php';
include 'header.html';
$connection = new db_connection();
$employee = employee::loadEmployee($connection, $_SESSION['emanager_user_id']);
$connection->close();
?>

<script type="text/javascript">

jQuery.validator.addMethod("combobox", function(value, element) { 
	return this.optional(element) || value > 0; 
}, jQuery.format("Please select a valid option."));

jQuery.validator.addMethod("combobox_md5", function(value, element) { 
	return this.optional(element) || value != -1; 
}, jQuery.format("Please select a valid option."));

jQuery.validator.addMethod("pass_change", function(value, element) {
	return this.optional(element) || value > 0; 	
}, jQuery.format("Please select a valid option."));

function checkAll(){
Exemplo n.º 2
0
<?php

//Session Info
session_start();
if (!isset($_SESSION['emanager_logged'])) {
    header('Location: login.php');
}
if ($_SESSION['emanager_user_type'] != 1) {
    header('Location: index.php');
}
include 'db_connection.php';
include 'classes/employee.php';
include 'classes/team.php';
include 'header.html';
$connection = new db_connection();
$employee = employee::loadEmployee($connection, $_GET['id']);
$connection->close();
?>

<script type="text/javascript">

jQuery.validator.addMethod("combobox", function(value, element) { 
	return this.optional(element) || value > 0; 
}, jQuery.format("Please select a valid option."));

jQuery.validator.addMethod("combobox_md5", function(value, element) { 
	return this.optional(element) || value != -1; 
}, jQuery.format("Please select a valid option."));

jQuery.validator.addMethod("pass_change", function(value, element) {
	return this.optional(element) || value > 0;