function approve_ia()
    {
        global $db, $user, $form, $group, $games, $config, $array;
        echo '
			<div class="green_contentbox">
			<div class="green_content_top">
				<h3 class="content_box_header">Approving User IA Request</h3>
			</div>
			<div class="green_content">

					<form action="process.php" method="post">
					<input type="hidden" name="cmd" value="approve_ia" />
					<table class="minor_header">
					<tr>
						<td width="5%">
						</td>
						<td class="minor_header" width="25%">
							<h4 class="content_box_minor_header">
								Username
							</h4>
						</td>
						<td class="minor_header" width="70%">
							<h4 class="content_box_minor_header">
								Reason
							</h4>
						</td>
						<td class="minor_header" width="25%">
							<h4 class="content_box_minor_header">
								Time
							</h4>
						</td>
					</tr>
					';
        $sql = 'select id 
			from ia_request
			;';
        $result = mysql_query($sql);
        while ($row = mysql_fetch_array($result)) {
            $request = new Ia($row['id']);
            if (!$request->exists) {
                echo 'There are no pending Requests.';
            } else {
                echo '
				<tr>
					<td>
						<input type="radio" name="id" value="' . $row['id'] . '" />
					</td>
					<td>
						<a class="members" href="index.php?view=profile&user='******'&ref=ia_list.php">' . $request->username . '</a>
					</td>
					<td>
						<p>' . $request->reason . '</p>
					</td>
					<td>
						' . dateFromTimestamp($request->time) . '
					</td>
				</tr>
				';
            }
        }
        echo '
					</table>
					<br />
					<input type="submit" value="Approve Selected" />
					<div>' . $form->error("security") . '</div>
					<div>' . $_SESSION['event'] . '</div>
					</form>
					<hr class="cb" />		
			<br />
<div><a class="return" href="index.php?view=console">Click Here to return to your console</a></div>
						</div>
			<div class="green_content_bottom">
			</div>
		</div>
			';
    }
示例#2
0
/**
 * Get end of day time from timestamp.
 *
 * @param $timestamp
 *
 * @return Carbon\Carbon
 */
function endOfDay($timestamp)
{
    return dateFromTimestamp($timestamp)->endOfDay();
}
示例#3
0
    function displayInbox()
    {
        global $db, $form, $user;
        echo '
<div class="green_contentbox">
			<div class="green_content_top">
				<h3 class="content_box_header">Personal Messaging System - Inbox</h3>
			</div>
			<div class="green_content">
					<form action="process.php" method="post">
					<input type="hidden" name="cmd" value="delete_message" />
					<table class="general_info" width="95%" cellpadding="0" cellspacing="0">
					<tr>
						<td width="5%">
						</td>
						<td class="minor_header" width="25%">
							<h4 class="content_box_minor_header">
								Title
							</h4>
						</td>
						<td class="minor_header" width="25%">
							<h4 class="content_box_minor_header">
								Preview
							</h4>
						</td>
						<td class="minor_header" width="25%">
							<h4 class="content_box_minor_header">
								From
							</h4>
						</td>
						<td class="minor_header" width="10%">
							<h4 class="content_box_minor_header">
								Date
							</h4>
						</td>
						<td class="minor_header" width="10%" >
							<h4 class="content_box_minor_header">
								Read?
							</h4>
						</td>
					</tr>
					';
        $sql = 'select id 
			from messages
			where messages.to = "' . $user->username . '"
			order by date desc
			;';
        $result = mysql_query($sql);
        while ($row = mysql_fetch_array($result)) {
            $message = new Message();
            $message->getInfo($user->username, $row['id']);
            if ($db->messages($user->username) == 0) {
                echo 'You do not have any messages.';
            } else {
                echo '
				<tr>
					<td>
						<input type="checkbox" name="delete[]" value="' . $message->id . '" />
					</td>
					<td>
						<a class="' . $message->class . '" href="index.php?view=user_personal&cmd=displayInbox&mid=' . $message->id . '">' . $message->title . '</font>
					</td>
					<td>
						' . trunc($message->text, 5) . '
					</td>
					<td>
						' . $db->titleFromUsername($message->from) . '
					</td>
					<td>
						' . dateFromTimestamp($message->date) . '
					</td>
					<td>
						';
                if ($message->read == 1) {
                    echo 'Yes';
                }
                if ($message->read == 0) {
                    echo 'No';
                }
                echo '
					</td>
				</tr>
				';
            }
        }
        echo '
					</table>
					<br />
					<hr class="cb" />	
					<input type="submit" value="Delete Selected" />
					<div>' . $form->error("security") . '</div>
					<div>' . $_SESSION['event'] . '</div>
					</form>
					<hr class="cb" />	
						<a class="return" href="index.php?view=console">Click Here to return to your Console</a>
			</div>
			<div class="green_content_bottom">
			</div>
		</div>


			';
    }
示例#4
0
        if (!$request->exists) {
            echo 'There are no pending Requests.';
        } else {
            echo '
				<tr>
					<td>
						<input type="radio" name="id" value="' . $row['id'] . '" />
					</td>
					<td>
						<a class="members" href="index.php?view=profile&user='******'&ref=ia_list.php">' . $request->username . '</a>
					</td>
					<td>
						<p>' . $request->reason . '</p>
					</td>
					<td>
						' . dateFromTimestamp($request->time) . '
					</td>
				</tr>
				';
        }
    }
    echo '
					</table>
					<br />
					<input type="submit" value="Approve Selected" />
					<div>' . $form->error("security") . '</div>
					<div>' . $_SESSION['event'] . '</div>
					</form>
					<hr class="cb" />		
			<br />
		<div><a class="return" href="index.php?view=console">Click Here to return to your console</a></div>