Example #1
0
					<span class="right_poll"></span>
				</li>
<?php 
            }
            ?>
			</ul>
			<br />
			<strong>Votes:</strong> <?php 
            echo number_format($TotalVotes);
            ?>
<br /><br />
<?php 
        } else {
            //Staff forum, output voters, not percentages
            include SERVER_ROOT . '/sections/staff/functions.php';
            $Staff = get_staff();
            $StaffNames = array();
            foreach ($Staff as $Staffer) {
                $StaffNames[] = $Staffer['Username'];
            }
            $DB->query("\n\t\t\t\tSELECT\n\t\t\t\t\tfpv.Vote AS Vote,\n\t\t\t\t\tGROUP_CONCAT(um.Username SEPARATOR ', ')\n\t\t\t\tFROM users_main AS um\n\t\t\t\t\tLEFT JOIN forums_polls_votes AS fpv ON um.ID = fpv.UserID\n\t\t\t\tWHERE TopicID = {$ThreadID}\n\t\t\t\tGROUP BY fpv.Vote");
            $StaffVotesTmp = $DB->to_array();
            $StaffCount = count($StaffNames);
            $StaffVotes = array();
            foreach ($StaffVotesTmp as $StaffVote) {
                list($Vote, $Names) = $StaffVote;
                $StaffVotes[$Vote] = $Names;
                $Names = explode(', ', $Names);
                $StaffNames = array_diff($StaffNames, $Names);
            }
            ?>
Example #2
0
function get_support()
{
    return array(get_fls(), get_forum_staff(), get_staff(), 'fls' => get_fls(), 'forum_staff' => get_forum_staff(), 'staff' => get_staff());
}
        add_staff();
        break;
    case 'get_manager':
        get_manager();
        break;
    case 'edit_staff':
        edit_staff();
        break;
    case 'delete_product':
        delete_product();
        break;
    case 'update_product':
        update_product();
        break;
    case 'get_staff':
        get_staff();
        break;
}
function add_staff()
{
    $data = json_decode(file_get_contents("php://input"));
    $fullName = mysql_real_escape_string($data->name);
    $address = mysql_real_escape_string($data->address);
    $gender = mysql_real_escape_string($data->gender);
    $nic = mysql_real_escape_string($data->nic);
    $phone = mysql_real_escape_string($data->phone);
    $position = mysql_real_escape_string($data->position);
    $email = mysql_real_escape_string($data->email);
    //$upswd = mysql_real_escape_string($data->pswd);
    //$uemail = mysql_real_escape_string($data->email);
    $con = mysql_connect('localhost', 'root', '');
Example #4
0
    if ($has_attendees && $session->datetimeknown && facetoface_has_session_started($session, time())) {
       // $available_actions[] = 'takeattendance';
    }

    if (in_array('attendees', $available_actions) || in_array('cancellations', $available_actions) || in_array('waitlist', $available_actions)) {
        $available_actions[] = 'messageusers';
    }
//}

$attendees = array();
$cancellations = array();
$requests = array();

// Check if the user is manager with staff
if (($facetoface->approvalreqd && $staff = get_staff()) ||
        ($facetoface->approvalreqd && is_siteadmin())) {
    // Lets check to see what state their staff are in

    // Check if any staff have requests awaiting approval
    $get_requests = facetoface_get_requests($session->id);
    if ($get_requests) {
        $requests = (is_siteadmin() ? $get_requests : array_intersect_key($get_requests, array_flip($staff)));

        if ($requests) {
            $allowed_actions[] = 'approvalrequired';
            $available_actions[] = 'approvalrequired';
        }
    }

    // Check if any staff are attending