Exemple #1
0
				{
					for (r in args.output)
					{
						_r = args.output[r];

						var editCellText = perms.Admin_EditTeams ? '<td><div class="selected" style="display:none" id="commandDivSelected_' + _r.team_id + '"><a href="#" id="btnSave_' + _r.team_id + '" class="btnSave">' + saveLinkContent() + '</a><a href="#" class="cancelLink">' + cancelLinkContent() + '</a></div><div class="unselected" id="commandDiv_' + _r.team_id + '"><a href="#" id="editLink_' + _r.team_id + '" class="editLink" >' + editLinkContent() + '</a><?php 
if ($_SESSION["perm_level"] >= 1000) {
    ?>
<a href="#" id="deleteLink_' + _r.team_id + '" class="deleteLink" >' + deleteLinkContent() + '</a></div><?php 
}
?>
</div></td>' : "";


						$('#theTable').append('<tr class="row'+row+'" id="row_' + _r.team_id + '">' + editCellText + '<td><div class="view"><span id="spnTeamId_' + _r.team_id + '">'+_r.team_id+'</span></div><div class="editCell">'+_r.team_id+'</div></td><td><div class="view"><span id="spnTeamLeader">'+_r.firstname+' '+_r.lastname+'</span><input id="spnLeaderID_' + _r.team_id+'" style="display:none" value="'+ _r.team_leader + '"></input></div><div class="editCell"><SELECT id="ddlTeam_'+_r.team_id+'"><?php 
$users = $DB->getUsers();
foreach ($users as $user) {
    ?>
<OPTION value="<?php 
    echo $user["user_id"];
    ?>
"><?php 
    echo $user["FirstName"];
    ?>
 <?php 
    echo $user["LastName"];
    ?>
</option><?php 
}
?>
</SELECT></div></td><td><div class="view"><span style="display:none;" id="spanTeamId_' + _r.team_id +'">'+_r.team_id+'</span><span id="spnTeam_' + _r.team_id + '">'+_r.team_name+'</span></div><div class="editCell"><input type="text" id="tbTeamName_'+ _r.team_id + '" value="'+ _r.team_name + '"></input></div></td><td><div class="view"><span id="spnTeamUsers_' + _r.team_id + '">'+_r.team_users+'</span></div><div class="editCell">'+_r.team_users+'</div></td><td><div class="view">'+ prettyDate( _r.date_added) + '</div></td></tr>');
Exemple #2
0
    $username = $DB->sanitize($_POST["value"]);
    $sql = "Select count(*) from users where username = '******' and status != 'deleted'";
    $result = $DB->query_scalar($sql);
    if ($result > 0) {
        $success = "fail";
        $error = "Username Already Exists!";
    }
    $DB->close();
}
if ($id == "getStorageLocations") {
    $DB = new conn();
    $output = $DB->getStorageLocations();
}
if ($id == "getUsers") {
    $DB = new conn();
    $output = $DB->getUsers();
}
if ($id == "createCustomer") {
    $DB = new conn();
    $DB->connect();
    $firephp->log($_REQUEST);
    $firstname = $DB->sanitize($_REQUEST["FirstName"]);
    $lastname = $DB->sanitize($_REQUEST["LastName"]);
    $displayname = $firstname . " " . $lastname;
    $email = $DB->sanitize($_REQUEST["Email"]);
    $address = $DB->sanitize($_REQUEST["Address"]);
    $address2 = $DB->sanitize($_REQUEST["Address2"]);
    $city = $DB->sanitize($_REQUEST["City"]);
    $state = $DB->sanitize($_REQUEST["State"]);
    $zipcode = $DB->sanitize($_REQUEST["ZipCode"]);
    $country = $DB->sanitize($_REQUEST["Country"]);