Пример #1
0
    <?php 
if (isset($_POST['Event_ID'])) {
    ?>
<div class="warning warnc" style="font-size:1.5em;
                                                                              padding-top: 10px;
                                                                              font-weight:bold;
                                                                              background: rgba(255, 255, 255, .75);"
                                                                >Event Deleted!</div><?php 
}
?>
    <main>
        <section>
            <div class="container">
                <div class="row">
                    <form method="post" action="<?php 
echo pure_it($_SERVER['PHP_SELF']);
?>
">
                        <?php 
$DB = new Database();
$sql = "SELECT * FROM events ORDER BY TimeNDate DESC";
$result = $DB->query($sql);
while ($Data = $DB->fetch($result)) {
    extract($Data);
    $date = new DateTime($TimeNDate);
    $TimeNDate = $date->format('h:i A, dS F, Y');
    ?>
                        <div class="columns six">
                            <div class="box">
                                <div class="title"><?php 
    echo $Title;
<?php

require_once "../includes/config.php";
if (isset($_POST['passret'])) {
    $uid = strtoupper(pure_it($_POST['uid']));
    if (empty($uid)) {
        $uid_missing = "Enter Your User Name";
        header("Location: ../login.php?fp=1&uid_missing={$uid_missing}");
        exit;
    }
    if (!empty($uid)) {
        require_once BASE_PATH . "/classes/Member.php";
        if (!Member::getUser($uid)) {
            $uid_err = "User Id Not Found";
            header("Location: ../login.php?fp=1&uid={$uid}&uid_err={$uid_err}");
            exit;
        } else {
            $M = new Member($uid);
            $M->mailPassword();
            header('Location: ' . BASE_URL . "?passsend=1");
            exit;
        }
    }
}
Пример #3
0
$mail_error = "";
$c_values = array('email' => '', 'subject' => '', 'message' => '');
extract($c_values);
if (isset($_POST['contactus'])) {
    $suspect = false;
    $pattern = '/Content-Type:|Bcc:|Cc:/i';
    function isSuspect($val, $pattern, &$suspect)
    {
        foreach ($val as $item) {
            $suspect = preg_match($pattern, $item) ? true : false;
        }
    }
    isSuspect($_POST, $pattern, $suspect);
    if (!$suspect) {
        foreach ($_POST as $key => $value) {
            $value = pure_it($value);
            empty($value) ? $m_missing = "Please fill out all the fileds." : (${$key} = $value);
        }
    }
    $headers = "";
    if (!$suspect && !empty($email)) {
        $validemail = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
        if ($validemail) {
            $headers .= "From: {$validemail}\r\n";
        } else {
            $mail_error = "Invalid email address!";
        }
    }
    if (!$suspect && !$m_missing && !$mail_error) {
        $to = '*****@*****.**';
        $headers .= "Content-type: text/plain; charset=utf-8";
Пример #4
0
<?php

require_once "includes/config.php";
require_once "classes/Event.php";
require_once "classes/Member.php";
$page = isset($_GET['page']) ? pure_it($_GET['page']) : 1;
$to = intval($page) * 4;
$from = $to - 3;
$first = 1;
$last = ceil(PastEvent::count() / 4);
function getWinner($UID)
{
    $ret = explode(', ', $UID);
    if (count($ret) > 1) {
        foreach ($ret as $value) {
            echo getWinner($value) . "<br>";
        }
    }
    if (preg_match("/^UIC-/", $UID)) {
        $Member = new Member($UID);
        if ($Member->getFacebook()) {
            return "<a href='" . $Member->getFacebook() . "' style='color:#3091BA'>" . $Member->getTotalFullName() . "</a>";
        } else {
            return $Member->getTotalFullName();
        }
    } elseif (count($ret) == 1) {
        return $UID;
    }
}
?>
<!DOCTYPE html>
Пример #5
0
    ?>
				</div>
				<?php 
}
?>
				<div class="row">
					<?php 
$DB = new Database();
foreach (PanelMember::$Designations as $key => $value) {
    if (isset($_GET['from']) && isset($_GET['to'])) {
        $sql = "SELECT UID FROM panelmembers WHERE Responsibility = '" . $key . "' AND session_from = '" . pure_it($_GET['from']) . "' AND session_to = '" . pure_it($_GET['to']) . "'";
        $result = $DB->query($sql);
        $row = $DB->fetch($result);
        $PanelMember = new Member($row['UID']);
    } elseif (isset($_GET['group'])) {
        $sql = "SELECT UID FROM panelmembers WHERE Responsibility = '" . $key . "' AND session_group = '" . pure_it($_GET['group']) . "'";
        $result = $DB->query($sql);
        $row = $DB->fetch($result);
        $PanelMember = new Member($row['UID']);
    } else {
        $PanelMember = new PanelMember($key);
    }
    ?>
					<div class="columns three">
						<div class="person">
							<div class="img" style="background: url('<?php 
    echo $PanelMember->getImage();
    ?>
') no-repeat; background-size: 100% 100%;"></div>
							<p class="info italic"><?php 
    echo $PanelMember->getTotalFullName();
Пример #6
0
        die;
    }
    extract($Event->EventInfo);
    $D = new DateTime($TimeNDate);
    $Time = $D->format('h:i A');
    $Date = $D->format('Y-m-d');
    ?>
        <section id="form-container" class="form-container">
            <div class="container">
                <div class="row">
                    <div class="columns twelve">
                        <div class="box">
                            <h2>Update Event</h2>
                            <form class="form" enctype="multipart/form-data" name="UpdateEvent" method="post"
                                action="<?php 
    echo pure_it($_SERVER['PHP_SELF']) . '?Event_ID=' . pure_it($_GET['Event_ID']);
    ?>
">
                                <?php 
    if ($e_success) {
        ?>
<div class="success warnc ">Event updated succesfully!</div><?php 
    }
    ?>
                                <?php 
    if ($e_missing) {
        ?>
<div class="warning warnc"><?php 
        echo $e_missing;
        ?>
</div><?php 
Пример #7
0
<?php

require_once "../includes/config.php";
// Login Validation & Action Script
if (isset($_POST['ac'])) {
    $uid = strtoupper(pure_it($_POST['uid']));
    $pwd = pure_it($_POST['pwd']);
    if (empty($uid)) {
        $uid_missing = "Enter Your User Name";
        header("Location: ../login.php?fp=0&uid_missing={$uid_missing}");
        exit;
    }
    if (empty($pwd)) {
        $pwd_missing = "Enter Your Password";
        header("Location: ../login.php?fp=0&uid={$uid}&pwd_missing={$pwd_missing}");
        exit;
    }
    if (!empty($uid) && !empty($pwd)) {
        require_once BASE_PATH . "/classes/Member.php";
        if (!Member::getUser($uid)) {
            $uid_err = "User Id Not Found";
            header("Location: ../login.php?fp=0&uid={$uid}&uid_err={$uid_err}");
            exit;
        } elseif (Member::checkPassword($uid) != ROT13($pwd)) {
            $pwd_err = "Wrong Password!";
            header("Location: ../login.php?fp=0&uid={$uid}&pwd_err={$pwd_err}");
            exit;
        } elseif (!$uid_err && !$pwd_err) {
            $Member = new Member($uid);
            $_SESSION["user_name"] = $Member->getFirstName();
            $_SESSION["user_id"] = $Member->getUserID();
Пример #8
0
<span class="warning"><?php 
        echo $pwd_err;
        ?>
</span><br/><?php 
    }
    ?>
				                
				                <label><input type="checkbox" name="keepme" style="width:20px;"> Keep me logged in</label>
				                <label class="frgtpass">Forget Password?</label>
				                <input type="submit" value="Login" name="ac">
				            </form>
				        <?php 
}
?>
                        	<form class="form fpfrom" name="pass_ret" method="post" action="actions/PasswordRetrieveAction.php" <?php 
if (!isset($_GET['fp']) || !pure_it($_GET['fp'])) {
    echo "style='display:none'";
}
?>
>
				                <label>Username:</label>
				                <input type="text" name="uid" id="uid" placeholder="username" value="<?php 
echo $uid;
?>
">
				                <?php 
if ($uid_missing) {
    ?>
<span class="warning"><?php 
    echo $uid_missing;
    ?>
Пример #9
0
<?php

require_once "../includes/config.php";
require_once "../classes/Member.php";
require_once "../classes/PanelMember.php";
if (isset($_POST['update_panel'])) {
    foreach (PanelMember::$Designations as $key => $value) {
        $Member = new Member($_POST[$key]);
        if ($Member->isPanelMember() && $Member->getPosition() != $key) {
            header("Location: ../admin/panelmember.php?updateError=1");
            exit;
        }
    }
    foreach (PanelMember::$Designations as $key => $value) {
        $Panel = new PanelMember($key);
        $memberid = pure_it($_POST[$key]);
        $Panel->updateResponsibility($key, $memberid);
    }
    header("Location: ../admin/panelmember.php?updateSuccess=1");
    exit;
}
Пример #10
0
<?php

require_once "../includes/config.php";
require_once "../classes/Member.php";
require_once "../classes/PanelMember.php";
if (isset($_POST['archive_panel'])) {
    $DB = new Database();
    $session_group = PanelMember::count() + 1;
    foreach (PanelMember::$Designations as $key => $value) {
        $PanelMember = new PanelMember($key);
        if ($PanelMember->isArchived()) {
            header("Location: ../admin/panelmember.php?archiveError=1");
            exit;
        }
    }
    if (!$archiveError) {
        foreach (PanelMember::$Designations as $key => $value) {
            $PanelMember = new PanelMember($key);
            $data = array();
            $data['UID'] = $PanelMember->getUserID();
            $data['Responsibility'] = $PanelMember->getPosition();
            $data['session_from'] = pure_it($_POST['session_from']);
            $data['session_to'] = pure_it($_POST['session_to']);
            $data['session_group'] = $session_group;
            $DB->insert('panelmembers', $data);
        }
        $DB->close();
        header("Location: ../admin/panelmember.php?archiveSuccess=1");
        exit;
    }
}
Пример #11
0
        } else {
            ${$key} = $value;
        }
    }
    if (!$e_missing) {
        if ($_FILES["Image"]["size"]) {
            // Checking if File Size Exceded Limit:
            $ImageSize_err = validate_image_size($_FILES["Image"]["size"], $e_error);
            // Checking if the File is Invalid:
            $ImageType_err = validate_image_type($_FILES["Image"]["type"], $e_error);
        }
    }
    if (!$e_missing && !$e_error) {
        $date = new DateTime($Date . $Time);
        $TimeNDate = $date->format('Y-m-d H:i');
        $Event = new Event(pure_it($_GET['Event_ID']));
        move_uploaded_file($_FILES["Image"]["tmp_name"], '../' . $Event->EventInfo["Image"]);
        $data = array();
        $data['Title'] = $Title;
        $data['TimeNDate'] = $TimeNDate;
        $data['Venue'] = $Venue;
        $data['Rules'] = nl2br($Rules);
        $data['LinkName'] = $LinkName;
        $data['Link'] = $Link;
        $data['Description'] = nl2br($Description);
        $data['FirstPlace'] = $FirstPlace;
        $data['SecondPlace'] = $SecondPlace;
        $data['ThirdPlace'] = $ThirdPlace;
        $e_success = $Event->updateEventInfo($data);
    }
}
Пример #12
0
    echo pure_it($_GET['Invalid_Pass']);
    ?>
</div><?php 
}
?>
			                    
			                    <label for="NEW_PWD">New Password</label>
			                    <input type="password" id="NEW_PWD" name="NEW_PWD" placeholder="enter new password" />
			                    
			                    <label for="RE_PWD">Re-Type New Password</label>
			                    <input type="password" id="RE_PWD" name="RE_PWD" placeholder="re-type new password" />
			                    <?php 
if (isset($_GET['Miss_Match'])) {
    ?>
<div class="warning"><?php 
    echo pure_it($_GET['Miss_Match']);
    ?>
</div><?php 
}
?>
			                                
			                    <input type="submit" name="Save_Settings" value="Save Settings" />
							</form>
                		</div>
            		</div>
            	</div>
            </div>
		</section>
	</main>
	<!--<script src="ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>-->
	<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
Пример #13
0
 $contest_config = json_decode($contest_json, true);
 $contest_config['PCONTEST'] = isset($_POST['PCONTEST']) ? true : false;
 $contest_config['GCONTEST'] = isset($_POST['GCONTEST']) ? true : false;
 $contest_config['QUIZ'] = isset($_POST['QUIZ']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['NFSM'] = isset($_POST['NFSM']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['FIFA'] = isset($_POST['FIFA']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['COD4'] = isset($_POST['COD4']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['CHESS'] = isset($_POST['CHESS']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['CARROM'] = isset($_POST['CARROM']) && isset($_POST['GCONTEST']) ? true : false;
 $contest_config['TTENNIS'] = isset($_POST['TTENNIS']) && isset($_POST['GCONTEST']) ? true : false;
 file_put_contents($file, json_encode($contest_config));
 extract($contest_config);
 // Password:
 $OLD_PWD = pure_it($_POST['OLD_PWD']);
 $NEW_PWD = pure_it($_POST['NEW_PWD']);
 $RE_PWD = pure_it($_POST['RE_PWD']);
 if ($OLD_PWD) {
     // Password Check:
     require_once "../includes/functions.php";
     $Invalid_Pass = passwordMatch($_SESSION['user_id'], ROT13($OLD_PWD), $error);
     if ($Invalid_Pass) {
         header("Location: ../admin/index.php?Invalid_Pass={$Invalid_Pass}");
         exit;
     }
     // Password Match Check:
     if ($NEW_PWD != $RE_PWD) {
         header("Location: ../admin/index.php?Miss_Match=Password doesn't match!");
         exit;
     }
     // Updating Password:
     $data = array();
Пример #14
0
                                    <option value="">Year</option>
                                    <?php 
for ($i = 2000; $i >= 1980; $i--) {
    echo "<option value=\"{$i}\"";
    if ($YOB == $i) {
        echo 'selected';
    }
    echo ">" . $i . "</option>";
}
?>
                                </select>
                                
                                <label for="StudentID">Student ID:</label>
                                <input type="text" id="StudentID" name="StudentID" value="<?php 
if (isset($_GET["StudentID"])) {
    echo pure_it($_GET["StudentID"]);
} else {
    echo $StudentID;
}
?>
" placeholder="Student ID" required />
                                <?php 
if ($NonDept_err) {
    ?>
<div class="warning"><?php 
    echo $NonDept_err;
    ?>
</div><?php 
}
?>
                                <?php