text:
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 18, 2017 at 12:14 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.5

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `event`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `attend_event` (IN `_event_id` INT(11), IN `_user_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE _accessibility ENUM('PUB','PRI','RSO');
  DECLARE _not_participating INT(1);
  DECLARE _status ENUM('PND','ACT');

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    SELECT e.accessibility, e.status INTO _accessibility, _status
    FROM events e
    WHERE e.event_id = _event_id;

    IF EXISTS (
      SELECT p.user_id
      FROM participating p, events e
      WHERE _user_id = p.user_id
      AND p.event_id = _event_id) THEN

      SET _not_participating = 0;

    ELSE

      SET _not_participating = 1;

    END IF;

    IF _status = "ACT" AND _accessibility = "PUB" AND _not_participating THEN
      INSERT INTO participating (user_id, event_id)
      VALUES (_user_id, _event_id);

    ELSEIF _status = "ACT" AND _accessibility = "PRI" AND _not_participating THEN
      INSERT INTO participating (user_id, event_id)
      SELECT u.user_id, _event_id
      FROM users u, attending a, universities n, private_events pe
      WHERE _user_id = u.user_id
      AND u.user_id = a.user_id
      AND a.uni_id = n.uni_id
      AND n.uni_id = pe.uni_id
      AND pe.event_id = _event_id LIMIT 1;

    ELSEIF _status = "ACT" AND _accessibility = "RSO" AND _not_participating THEN
      INSERT INTO participating (user_id, event_id)
      SELECT u.user_id, _event_id
      FROM users u, is_member m, rso_events re
      WHERE _user_id = u.user_id
      AND u.user_id = m.user_id
      AND m.rso_id = re.rso_id
      AND re.event_id = _event_id LIMIT 1;

    END IF;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `change_event_access` (IN `_event_id` INT(11), IN `_uni_id` INT(11), IN `_rso_id` INT(11), IN `_accessibility` ENUM('PUB','PRI','RSO'), IN `_old_type` ENUM('PUB','PRI','RSO'))  BEGIN

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

  IF _old_type = 'PUB' THEN
    DELETE FROM public_events WHERE event_id = _event_id;

  ELSEIF _old_type = 'PRI' THEN
    DELETE FROM private_events WHERE event_id = _event_id;

  ELSEIF _old_type = 'RSO' THEN
    DELETE FROM rso_events WHERE event_id = _event_id;
    DELETE FROM r_created_e WHERE event_id = _event_id;

  END IF;

  IF _accessibility = 'RSO' THEN

    BEGIN

      IF NOT EXISTS (SELECT rso_id FROM rsos WHERE rso_id = _rso_id) THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The rso specified cannot be found.";

      ELSE
        INSERT INTO rso_events (event_id, rso_id, uni_id)
        VALUES (_event_id, _rso_id, _uni_id);

      END IF;
    END;
  ELSEIF _accessibility = 'PRI' THEN
    BEGIN

      IF NOT EXISTS (SELECT uni_id FROM universities WHERE uni_id = _uni_id) THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The university specified cannot be found.";
      ELSE
        INSERT INTO private_events (event_id, uni_id)
        VALUES (_event_id, _uni_id);
      END IF;
    END;
  ELSE
    BEGIN
        INSERT INTO public_events (event_id, uni_id)
        VALUES (_event_id, _uni_id);
    END;
  END IF;

  UPDATE events SET
  accessibility = _accessibility
  WHERE event_id = _event_id;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `comment_on_event` (IN `_content` TINYTEXT, IN `_event_id` INT(11), IN `_user_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE _accessibility ENUM ('PUB','PRI','RSO');

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    SET _accessibility = (SELECT accessibility FROM events WHERE event_id = _event_id);

    IF _accessibility = "PUB" OR

      ( _accessibility = "PRI" AND EXISTS(
      SELECT a.user_id
      FROM attending a, private_events pe
      WHERE _user_id = a.user_id
      AND a.uni_id = pe.uni_id
      AND pe.event_id = _event_id)) OR

      ( _accessibility = "RSO" AND EXISTS(
      SELECT m.user_id
      FROM is_member m, rso_events re
      WHERE _user_id = m.user_id
      AND m.rso_id = re.rso_id
      AND re.event_id = _event_id)) THEN

      INSERT INTO commented_on (date_posted, content, user_id, event_id)
      VALUES (NOW(), _content, _user_id, _event_id);

      SELECT comment_id FROM commented_on WHERE comment_id = LAST_INSERT_ID();

    END IF;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_event` (IN `_name` VARCHAR(60), IN `_start_time` TIMESTAMP, IN `_end_time` TIMESTAMP, IN `_telephone` VARCHAR(12), IN `_email` VARCHAR(60), IN `_description` TINYTEXT, IN `_location` VARCHAR(60), IN `_lat` DECIMAL(9,6), IN `_lon` DECIMAL(9,6), IN `_accessibility` ENUM('PUB','PRI','RSO'), IN `_user_id` INT(11), IN `_rso_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE _event_id INT(11);

  DECLARE _status ENUM('PND','ACT');

  DECLARE EXIT HANDLER FOR SQLEXCEPTION

  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF _name IS NULL OR _start_time IS NULL OR _end_time IS NULL OR _description IS NULL OR
    _location IS NULL OR _lat IS NULL OR _lon IS NULL OR _accessibility IS NULL THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing from your event";

    END IF;

    IF EXISTS(

      SELECT e.event_id FROM events e

      WHERE e.location = _location

      AND ((_end_time >= e.start_time AND _end_time <= e.end_time) OR

          (_start_time >= e.start_time AND _start_time <= e.end_time))) THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "Your event is occuring at the same time and location as another event";

    END IF;

    INSERT INTO events (name, start_time, end_time, telephone, email, description, location, lat, lon, accessibility)
    VALUES (_name, _start_time, _end_time, _telephone, _email, _description, _location, _lat, _lon, _accessibility);

    SET _event_id = LAST_INSERT_ID();

    INSERT INTO hosting (uni_id, event_id)
    VALUES (_uni_id, _event_id);

    IF _rso_id > 0 THEN

      SET _status = 'ACT';

      IF NOT EXISTS (
        SELECT a.user_id
        FROM administrates a
        WHERE _rso_id = a.rso_id
        AND a.user_id = _user_id) THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You must administrate the RSO selected";

      END IF;

      INSERT INTO r_created_e (rso_id, event_id)
      VALUES (_rso_id, _event_id);

    ELSE

      SET _status = 'PND';

    END IF;

    INSERT INTO u_created_e (user_id, event_id)
    VALUES (_user_id, _event_id);

    UPDATE events SET status = _status WHERE event_id = _event_id;

    IF _accessibility = 'RSO' THEN

      BEGIN

        IF NOT EXISTS (
          SELECT r.rso_id
          FROM rsos r
          WHERE r.rso_id = _rso_id
          AND r.status = 'ACT') THEN

          SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The rso specified cannot be found.";

        ELSE

          INSERT INTO rso_events (event_id, rso_id, uni_id)
          VALUES (_event_id, _rso_id, _uni_id);

        END IF;
      END;
    ELSEIF _accessibility = 'PRI' THEN
      BEGIN

        IF NOT EXISTS (SELECT uni_id FROM universities WHERE uni_id = _uni_id) THEN

          SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The university specified cannot be found.";

        ELSE

          INSERT INTO private_events (event_id, uni_id)
          VALUES (_event_id, _uni_id);
        END IF;
      END;
    ELSE
      BEGIN
          INSERT INTO public_events (event_id, uni_id)
          VALUES (_event_id, _uni_id);
      END;
    END IF;

    SELECT _event_id AS event_id FROM events LIMIT 1;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_rso` (IN `_role` ENUM('SA','ADM','STU'), IN `_user_id` INT(11), IN `_name` VARCHAR(60), IN `_description` TEXT(500), IN `_members` VARCHAR(300), IN `_rso_admin_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE _rso_id INT(11);

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    CREATE TEMPORARY TABLE temp_members (user_id INT(11) UNSIGNED);
    INSERT INTO temp_members (user_id)
    SELECT user_id FROM users WHERE FIND_IN_SET(user_id, _members);

    IF _name IS NULL OR _description IS NULL THEN

      DROP TABLE IF EXISTS temp_members;
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing from your RSO.";

    END IF;

    IF _role = "STU" AND (SELECT COUNT(user_id) FROM temp_members) < 5 THEN
      DROP TABLE IF EXISTS temp_members;
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You must specify at least 5 members";
    END IF;

    IF _role = "STU" AND NOT EXISTS (
      SELECT u.user_id FROM
      users u, attending a, universities n
      WHERE _user_id = u.user_id
      AND u.user_id = a.user_id
      AND a.uni_id = n.uni_id
      AND n.uni_id = _uni_id) THEN
      DROP TABLE IF EXISTS temp_members;
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You may only create an RSO at a university you attend";

    ELSEIF _role = "ADM" AND NOT EXISTS (
      SELECT u.user_id FROM
      users u, affiliated_with a, universities n
      WHERE _user_id = u.user_id
      AND u.user_id = a.user_id
      AND a.uni_id = n.uni_id
      AND n.uni_id = _uni_id) THEN
      DROP TABLE IF EXISTS temp_members;
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You may only create an RSO at a university you're affiliated with";

    END IF;

    INSERT INTO rsos (name, description, status)
    VALUES (_name, _description, 'ACT');

    SET _rso_id = LAST_INSERT_ID();

    INSERT INTO has (uni_id, rso_id)
    VALUES (_uni_id, _rso_id);

    INSERT INTO administrates (user_id, rso_id)
    VALUES (_rso_admin_id, _rso_id);

    INSERT INTO is_member (user_id, rso_id) (SELECT user_id, _rso_id FROM temp_members);
    DROP TABLE temp_members;

    SELECT _rso_id AS rso_id FROM rsos LIMIT 1;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_user` (IN `_user_name` VARCHAR(30), IN `_first_name` VARCHAR(60), IN `_last_name` VARCHAR(60), IN `_email` VARCHAR(60), IN `_role` ENUM("SA","ADM","STU"), IN `_hash` VARCHAR(60), IN `_uni_id` INT(11))  BEGIN

  DECLARE _user_id INT(11);

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF (_role = "STU" OR _role = "ADM") AND (check_uni_emails(_email, _uni_id) < 1) THEN
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'e-mail must match university selected.';
    ELSEIF _role = "STU" THEN

      IF _user_name IS NULL OR _first_name IS NULL OR _last_name IS NULL OR
      _email IS NULL OR _role IS NULL OR _hash IS NULL OR _uni_id IS NULL THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing when creating your account";

      END IF;

      BEGIN
        INSERT INTO users (user_name, first_name, last_name, email, role, hash)
        VALUES (_user_name, _first_name, _last_name, _email, _role, _hash);

        SET _user_id = LAST_INSERT_ID();

        INSERT INTO attending (user_id, uni_id)
        VALUES (_user_id, _uni_id);
      END;

    ELSEIF _role = "ADM" THEN
      BEGIN

        IF _user_name IS NULL OR _first_name IS NULL OR _last_name IS NULL OR
        _email IS NULL OR _role IS NULL OR _hash IS NULL OR _uni_id IS NULL THEN

          SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing when creating your account";

        END IF;

        INSERT INTO users (user_name, first_name, last_name, email, role, hash)
        VALUES (_user_name, _first_name, _last_name, _email, _role, _hash);

        SET _user_id = LAST_INSERT_ID();

        INSERT INTO affiliated_with (user_id, uni_id)
        VALUES (_user_id, _uni_id);
      END;

    ELSEIF _role = "SA"  THEN

        IF _user_name IS NULL OR _first_name IS NULL OR _last_name IS NULL OR
        _email IS NULL OR _role IS NULL OR _hash IS NULL THEN

          SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing when creating your account";

        END IF;
      INSERT INTO users (user_name, first_name, last_name, email, role, hash)
      VALUES (_user_name, _first_name, _last_name, _email, _role, _hash);

      SET _user_id = LAST_INSERT_ID();

    END IF;

    SELECT _user_id AS user_id;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_current_user` (IN `_user_id` INT(11))  BEGIN

  DECLARE _role ENUM('SA','ADM','STU');

  SET _role = (SELECT u.role FROM users u WHERE u.user_id = _user_id LIMIT 1);

  IF _role = "STU" THEN
    SELECT u.user_name, u.email, u.first_name, u.last_name, u.role, a.uni_id
    FROM users u, attending a
    WHERE _user_id = u.user_id
    AND u.user_id = a.user_id
    LIMIT 1;
  ELSEIF _role = "ADM" THEN
    SELECT u.user_name, u.email, u.first_name, u.last_name, u.role, a.uni_id
    FROM users u, affiliated_with a
    WHERE _user_id = u.user_id
    AND u.user_id = a.user_id
    LIMIT 1;
  ELSEIF _role = "SA" THEN
    SELECT u.user_name, u.email, u.first_name, u.last_name, u.role
    FROM users u
    WHERE _user_id = u.user_id
    LIMIT 1;
  END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `join_rso` (IN `_user_id` INT(11), IN `_rso_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF NOT EXISTS (
      SELECT a.uni_id
      FROM attending a
      WHERE a.user_id = _user_id
      AND a.uni_id = _uni_id)
    AND NOT EXISTS (
      SELECT a.uni_id
      FROM affiliated_with a
      WHERE a.user_id = _user_id
      AND a.uni_id = _uni_id) THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'You must belong to this Universities RSO.';

    ELSEIF EXISTS (
      SELECT m.user_id
      FROM is_member m
      WHERE _rso_id = m.rso_id
      AND m.user_id = _user_id) THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'You are already a member of this RSO';

    ELSE

      INSERT INTO is_member (user_id, rso_id)
      VALUES (_user_id, _rso_id);

      IF (SELECT COUNT(m.user_id) FROM is_member m WHERE m.rso_id = _rso_id) >= 5 THEN
        UPDATE rsos SET
        status = 'ACT'
        WHERE rso_id = _rso_id;
      END IF;

      SELECT _user_id AS user_id;

    END IF;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `leave_rso` (IN `_user_id` INT(11), IN `_rso_id` INT(11))  BEGIN

  DECLARE _rso_administrator INT(11);

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    SELECT user_id INTO _rso_administrator
    FROM administrates
    WHERE user_id = _user_id
    AND rso_id = _rso_id;

    IF _rso_administrator = _user_id THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You must mark someone else as the administrator before leaving";

    END IF;

    DELETE FROM is_member
    WHERE user_id = _user_id
    AND rso_id = _rso_id;

    IF (SELECT COUNT(m.user_id) FROM is_member m WHERE m.rso_id = _rso_id) < 5 THEN
      UPDATE rsos SET
      status = 'PND'
      WHERE rso_id = _rso_id;
    END IF;

    SELECT _user_id AS user_id;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `rate_event` (IN `_user_id` INT(11), IN `_event_id` INT(11), IN `_rating` INT(1))  BEGIN

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF NOT EXISTS(
      SELECT r.user_id
      FROM rating r
      WHERE r.user_id = _user_id
      AND r.event_id = _event_id) THEN

      INSERT INTO rating (user_id, event_id, rating)
      VALUES (_user_id, _event_id, _rating);
    ELSE

      UPDATE rating SET
      rating = _rating
      WHERE user_id = _user_id
      AND event_id = _event_id;
    END IF;

    UPDATE events SET
    rating = (
      SELECT AVG(r.rating)
      FROM rating r
      WHERE r.event_id = _event_id)
    WHERE event_id = _event_id;

    SELECT r.rating, e.rating AS total_rating
    FROM rating r, events e
    WHERE r.user_id = _user_id
    AND r.event_id = _event_id
    AND e.event_id = _event_id;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `search_events` (IN `_user_id` INT(11), IN `_uni_id` INT(11), IN `_scope` TINYTEXT, IN `_sort_by` TINYTEXT, IN `_accessibility` ENUM('PUB','PRI','RSO'), IN `_categories` VARCHAR(500))  BEGIN

  DECLARE _is_owner INT(1);
  DECLARE _is_participating INT(1);

  DECLARE _uni_lat DECIMAL(9, 6);
  DECLARE _uni_lon DECIMAL(9, 6);

  SELECT n.lat, n.lon
  INTO _uni_lat, _uni_lon
  FROM universities n
  WHERE n.uni_id = _uni_id;

  IF _scope = "other-uni" THEN
    SELECT DISTINCT e.event_id, e.name, e.start_time, e.end_time, e.description, e.location,
    e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
    _is_participating AS is_participating, e.rating, h.uni_id AS uni_id, n.name AS uni_name,
    manhattan_distance(_uni_lat, _uni_lon, e.lat, e.lon) AS distance
    FROM public_events pe, hosting h, universities n, events e
    LEFT JOIN categorized_as c ON e.event_id = c.event_id
    WHERE _uni_id = n.uni_id
    AND n.uni_id = h.uni_id
    AND h.event_id = e.event_id

    AND e.accessibility = "PUB"
    AND (_categories = "" OR FIND_IN_SET(c.label, _categories))
    ORDER BY
      CASE _sort_by WHEN "date" THEN e.start_time
      WHEN "location" THEN distance
      END;

  ELSEIF _accessibility = "PUB" THEN
    BEGIN
      SELECT DISTINCT e.event_id, e.name, e.start_time, e.end_time, e.description, e.location,
      e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, h.uni_id AS uni_id,
      n.name AS uni_name, manhattan_distance(_uni_lat, _uni_lon, e.lat, e.lon) AS distance
      FROM  public_events pe, hosting h, universities n, events e
      LEFT JOIN categorized_as c ON e.event_id = c.event_id
      WHERE n.uni_id = _uni_id
      AND n.uni_id = h.uni_id
      AND h.event_id = e.event_id
      AND e.event_id = pe.event_id

      AND (_categories = "" OR FIND_IN_SET(c.label, _categories))
      ORDER BY
        CASE _sort_by WHEN "date" THEN e.start_time
        WHEN "location" THEN distance
        END ASC;
    END;

  ELSEIF _accessibility = "PRI" THEN
    BEGIN
      SELECT DISTINCT e.event_id, e.name, e.start_time, e.end_time, e.description, e.location,
      e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, h.uni_id AS uni_id,
      n.name AS uni_name, manhattan_distance(_uni_lat, _uni_lon, e.lat, e.lon) AS distance
      FROM private_events p, attending at, affiliated_with aw, hosting h, universities n, events e
      LEFT JOIN categorized_as c ON e.event_id = c.event_id
      WHERE _uni_id = n.uni_id
      AND n.uni_id = h.uni_id
      AND h.uni_id = p.uni_id
      AND p.event_id = e.event_id

      AND (_categories = "" OR FIND_IN_SET(c.label, _categories))
      ORDER BY
        CASE _sort_by WHEN "date" THEN e.start_time
        WHEN "location" THEN distance
        END ASC;
    END;

  ELSEIF _accessibility = "RSO" THEN
    BEGIN
      SELECT DISTINCT e.event_id, e.name, e.start_time, e.end_time, e.description, e.location,
      e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, h.uni_id AS uni_id,
      n.name AS uni_name, manhattan_distance(_uni_lat, _uni_lon, e.lat, e.lon) AS distance
      FROM rso_events re, hosting h, universities n, events e
      LEFT JOIN categorized_as c ON e.event_id = c.event_id
      WHERE e.event_id = re.event_id
      AND _uni_id = h.uni_id
      AND h.uni_id = n.uni_id

      AND re.rso_id = ANY(
        SELECT r.rso_id
        FROM rsos r, is_member m
        WHERE _user_id = m.user_id AND m.rso_id = r.rso_id)
      AND (_categories = "" OR FIND_IN_SET(c.label, _categories))
      ORDER BY
        CASE _sort_by WHEN "date" THEN e.start_time
        WHEN "location" THEN distance
        END ASC;
    END;

  END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `select_students` ()  BEGIN
  SELECT u.user_id, u.user_name, u.email, u.first_name, u.last_name
  FROM users u
  WHERE u.role = "STU";
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_event` (IN `_event_id` INT(11), IN `_name` VARCHAR(60), IN `_start_time` TIMESTAMP, IN `_end_time` TIMESTAMP, IN `_telephone` VARCHAR(12), IN `_email` VARCHAR(60), IN `_description` TINYTEXT, IN `_location` VARCHAR(60), IN `_lat` DECIMAL(9,6), IN `_lon` DECIMAL(9,6), IN `_accessibility` ENUM('PUB','PRI','RSO'), IN `_user_id` INT(11), IN `_rso_id` INT(11), IN `_status` ENUM('ACT','PND'))  BEGIN

  DECLARE _old_type ENUM('PUB','PRI','RSO');

  DECLARE _current_rso_id INT(11);

  DECLARE _role ENUM('SA','ADM','STU');

  DECLARE _uni_id INT(11);

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF _name IS NULL OR _start_time IS NULL OR _end_time IS NULL OR _description IS NULL OR
    _location IS NULL OR _lat IS NULL OR _lon IS NULL OR _accessibility IS NULL THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing from your event";

    END IF;

    IF EXISTS(

      SELECT e.event_id FROM events e

      WHERE e.event_id <> _event_id AND e.location = _location

      AND ((_end_time >= e.start_time AND _end_time <= e.end_time) OR

          (_start_time >= e.start_time AND _start_time <= e.end_time))) THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "Your event is occuring at the same time and location as another event";

    END IF;

    SELECT h.uni_id INTO _uni_id
    FROM hosting h
    WHERE h.event_id = _event_id;

    IF _role <> "SA" AND NOT EXISTS(
      SELECT e.event_id
      FROM events e, r_created_e c, rsos r, administrates a
      WHERE _user_id = a.user_id
      AND a.rso_id = r.rso_id
      AND r.rso_id = c.rso_id
      AND c.event_id = _event_id) AND

    NOT EXISTS (
      SELECT e.event_id
      FROM events e, u_created_e u
      WHERE e.event_id = _event_id
      AND e.event_id = u.event_id
      AND u.user_id = _user_id) THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You are not authorized to change this event.";

    END IF;

    SET _old_type = (SELECT e.accessibility FROM events e WHERE e.event_id = _event_id LIMIT 1);

    SET _current_rso_id = (
      SELECT r.rso_id
      FROM rsos r, r_created_e re
      WHERE r.rso_id = re.rso_id
      AND re.event_id = _event_id);

    SET _role = (SELECT role FROM users WHERE user_id = _user_id);

    IF _current_rso_id > 0 AND _rso_id = 0 AND _role <> 'SA' THEN

      UPDATE events SET
      status = 'PND'
      WHERE event_id = _event_id;

      DELETE FROM r_created_e
      WHERE event_id = _event_id;

      IF _accessibility = "RSO" THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "An event must be RSO created to have RSO only access";

      END IF;

    ELSEIF _current_rso_id IS NULL AND _rso_id > 0 THEN

      IF NOT EXISTS(
        SELECT r.rso_id
        FROM rsos
        WHERE r.rso_id = _rso_id
        AND r.status = 'ACT') THEN

        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "The RSO specified cannot be found";

      END IF;

      INSERT INTO r_created_e (event_id, rso_id)
      VALUES (_event_id ,_rso_id);

      UPDATE events SET
      status = 'ACT'
      WHERE event_id = _event_id;

    END IF;

    IF _role = "SA" THEN

      UPDATE events SET
      status = _status
      WHERE event_id = _event_id;

    END IF;

    UPDATE events SET
    name = _name,
    start_time = _start_time,
    end_time = _end_time,
    telephone = _telephone,
    email = _email,
    description = _description,
    location = _location,
    lat = _lat,
    lon = _lon

    WHERE events.event_id = _event_id;

    IF _old_type <> _accessibility THEN

      BEGIN

        CALL change_event_access(_event_id, _uni_id, _rso_id, _accessibility, _old_type);

      END;

    END IF;

    SELECT _event_id AS event_id FROM events LIMIT 1;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_rso` (IN `_rso_id` INT(11), IN `_role` ENUM('SA','ADM','STU'), IN `_user_id` INT(11), IN `_name` VARCHAR(60), IN `_description` TEXT(500), IN `_members` VARCHAR(300), IN `_rso_admin_id` INT(11), IN `_uni_id` INT(11))  BEGIN

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF _name IS NULL OR _description IS NULL THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing from your RSO.";

    END IF;

    IF _user_id <> (SELECT a.user_id FROM administrates a WHERE a.rso_id = _rso_id) THEN
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You are not athorized to change this RSO";
    END IF;

    IF _role = "STU" AND NOT EXISTS (
      SELECT u.user_id FROM
      users u, attending a, universities n
      WHERE _user_id = u.user_id
      AND u.user_id = a.user_id
      AND a.uni_id = n.uni_id
      AND n.uni_id = _uni_id) THEN
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You may only create an RSO at a university you attend";

    ELSEIF _role = "ADM" AND NOT EXISTS (
      SELECT u.user_id FROM
      users u, affiliated_with a, universities n
      WHERE _user_id = u.user_id
      AND u.user_id = a.user_id
      AND a.uni_id = n.uni_id
      AND n.uni_id = _uni_id) THEN
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "You may only create an RSO at a university you're affiliated with";
    END IF;

    CREATE TEMPORARY TABLE new_members (user_id INT(11) UNSIGNED);
    CREATE TEMPORARY TABLE gone_members (user_id INT(11) UNSIGNED);

    INSERT INTO new_members (user_id)
    SELECT DISTINCT u.user_id
    FROM users u, is_member m, attending a

    WHERE FIND_IN_SET(u.user_id, _members)
    AND u.user_id = a.user_id
    AND a.uni_id = _uni_id
    AND u.user_id <> ALL(SELECT m.user_id FROM is_member m WHERE m.rso_id = _rso_id);

    INSERT INTO gone_members (user_id)
    SELECT m.user_id
    FROM is_member m
    WHERE m.rso_id = _rso_id
    AND NOT FIND_IN_SET(user_id, _members);

    UPDATE rsos SET
    name = _name,
    description = _description
    WHERE rso_id = _rso_id;

    UPDATE administrates SET
    user_id = _rso_admin_id
    WHERE rso_id = _rso_id;

    IF _role = "SA" OR _role = "ADM" THEN
      BEGIN

      END;
    END IF;

    INSERT INTO is_member (user_id, rso_id) (SELECT user_id, _rso_id FROM new_members);
    DROP TABLE new_members;

    DELETE FROM is_member WHERE user_id IN (SELECT user_id FROM gone_members);
    DROP TABLE gone_members;

    IF (
      SELECT COUNT(m.user_id)
      FROM is_member m
      WHERE m.rso_id = _rso_id) < 5 THEN
        UPDATE rsos SET
        status = 'PND'
        WHERE rso_id = _rso_id;

    ELSE
        UPDATE rsos SET
        status = 'ACT'
        WHERE rso_id = _rso_id;

    END IF;

    SELECT _rso_id AS rso_id FROM rsos LIMIT 1;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_user` (IN `_user_id` INT(11), IN `_user_name` VARCHAR(30), IN `_first_name` VARCHAR(60), IN `_last_name` VARCHAR(60), IN `_email` VARCHAR(60), IN `_role` ENUM("SA","ADM","STU"), IN `_uni_id` INT(11))  BEGIN

  DECLARE EXIT HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE _c_num INT;
    DECLARE _err_msg TEXT;
    ROLLBACK;
    GET DIAGNOSTICS _c_num = NUMBER;
    GET DIAGNOSTICS CONDITION _c_num _err_msg = MESSAGE_TEXT;
    SELECT _err_msg;
  END;

  START TRANSACTION;

    IF _user_name IS NULL OR _first_name IS NULL OR _last_name IS NULL OR
    _email IS NULL OR _role IS NULL OR _uni_id IS NULL THEN

      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "One or more field was missing when updating your account";

    END IF;

    IF _role = "STU" AND (check_uni_emails(_email, _uni_id) < 1) THEN
      SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'e-mail must match university selected.';
    END IF;

    UPDATE users SET
    user_name = _user_name,
    first_name = _first_name,
    last_name = _last_name,
    email = _email,
    role = _role
    WHERE user_id = _user_id;

    IF _role = "STU" THEN
      UPDATE attending SET
      uni_id = _uni_id
      WHERE user_id = _user_id;
    ELSEIF _role = "ADM" OR _role = "SA" THEN
      UPDATE affiliated_with SET
      uni_id = _uni_id
      WHERE user_id = _user_id;
    END IF;

  COMMIT;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `view_event` (IN `_event_id` INT(11), IN `_user_id` INT(11), IN `_role` ENUM('SA','ADM','STU'), IN `_uni_id` INT(11))  BEGIN

  DECLARE _accessibility ENUM ('PUB','PRI','RSO');
  DECLARE _is_owner INT(1);
  DECLARE _is_participating INT(1);

  SET _accessibility = (SELECT accessibility FROM events WHERE event_id = _event_id);

  SET _is_owner = get_is_owner(_user_id, _event_id);

  SET _is_participating = get_is_participating(_user_id, _event_id);

  IF _role = "SA" OR _accessibility = "PUB" THEN
    BEGIN
      SELECT DISTINCT e.name, e.start_time, e.end_time, e.description, e.location,
      e.telephone, e.email, e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, r.rso_id, r.name as rso_name,
      n.name AS uni_name, n.uni_id
      FROM public_events pe, universities n, events e
      LEFT OUTER JOIN r_created_e re ON re.event_id = e.event_id
      LEFT OUTER JOIN rsos r ON r.rso_id = re.rso_id
      WHERE e.event_id = _event_id
      AND e.event_id = pe.event_id
      AND pe.uni_id = n.uni_id
      LIMIT 1;
    END;

  ELSEIF _accessibility = "PRI" THEN
    BEGIN
      SELECT DISTINCT e.name, e.start_time, e.end_time, e.description, e.location,
      e.telephone, e.email, e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, e.event_id, re.rso_id, r.name AS rso_name,
      n.name AS uni_name, n.uni_id
      FROM events e, universities n, private_events p
      LEFT OUTER JOIN r_created_e re ON re.event_id = p.event_id
      LEFT OUTER JOIN rsos r ON r.rso_id = re.rso_id
      WHERE e.event_id = _event_id
      AND e.event_id = p.event_id
      AND p.uni_id = n.uni_id
      AND n.uni_id = _uni_id LIMIT 1;
    END;

  ELSEIF _accessibility = "RSO" THEN
    BEGIN
      SELECT DISTINCT e.name, e.start_time, e.end_time, e.description, e.location,
      e.telephone, e.email, e.lat, e.lon, e.accessibility, e.status, _is_owner AS is_owner,
      _is_participating AS is_participating, e.rating, r.rso_id, r.name AS rso_name,
      n.name AS uni_name, n.uni_id
      FROM events e, universities n, rso_events re, rsos r
      WHERE e.event_id = _event_id
      AND re.event_id = e.event_id
      AND re.rso_id = r.rso_id
      AND re.rso_id = ANY(
        SELECT r.rso_id
        FROM rsos r, is_member m
        WHERE _user_id = m.user_id AND m.rso_id = r.rso_id)
      AND re.uni_id = n.uni_id;
    END;

  END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `view_rso` (IN `_rso_id` INT(11), IN `_user_id` INT(11), IN `_role` ENUM('SA','ADM','STU'))  BEGIN

  DECLARE _uni_id INT(11);

  IF _role = "STU" THEN
    SELECT a.uni_id INTO _uni_id
    FROM attending a
    WHERE a.user_id = _user_id;

  ELSEIF _role = "ADM" THEN
    SELECT a.uni_id INTO _uni_id
    FROM affiliated_with a
    WHERE a.user_id = _user_id;
  END IF;

  IF _role = "SA" THEN

    SELECT r.rso_id, r.name, r.description, r.status, a.user_id AS rso_administrator
    FROM rsos r, administrates a, has h
    WHERE r.rso_id = _rso_id
    AND r.rso_id = a.rso_id;

  ELSE
    SELECT r.rso_id, r.name, r.description, r.status, a.user_id AS rso_administrator
    FROM rsos r, administrates a, has h
    WHERE r.rso_id = _rso_id
    AND r.rso_id = a.rso_id
    AND h.rso_id = r.rso_id
    AND h.uni_id = _uni_id;
  END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `view_user` (IN `_user_id` INT(11))  BEGIN

  DECLARE _role ENUM('SA','ADM','STU');

  SET _role = (SELECT role FROM users WHERE user_id = _user_id);

  IF _role = "STU" THEN
    SELECT u.user_name, u.first_name, u.last_name, n.uni_id, u.email, u.role, n.name AS uni_name
    FROM users u, attending a, universities n
    WHERE u.user_id = _user_id AND _user_id = a.user_id AND a.uni_id = n.uni_id
    LIMIT 1;
  ELSEIF _role = "ADM" THEN
    SELECT u.user_name, u.first_name, u.last_name, n.uni_id, u.email, u.role, n.name AS uni_name
    FROM users u, affiliated_with a, universities n
    WHERE u.user_id = _user_id AND _user_id = a.user_id AND a.uni_id = n.uni_id
    LIMIT 1;
  ELSEIF _role = "SA" THEN
    SELECT u.user_name, u.first_name, u.last_name, u.email, u.role
    FROM users u
    WHERE u.user_id = _user_id LIMIT 1;
  END IF;
END$$

--
-- Functions
--
CREATE DEFINER=`root`@`localhost` FUNCTION `check_uni_emails` (`_email` VARCHAR(60), `_uni_id` INT(11)) RETURNS INT(11) RETURN (
  SELECT COUNT(n.uni_id)
  FROM universities n
  WHERE _uni_id = n.uni_id AND _email LIKE CONCAT("%", n.email_domain))$$

CREATE DEFINER=`root`@`localhost` FUNCTION `get_is_owner` (`_user_id` INT(11), `_event_id` INT(11)) RETURNS INT(1) BEGIN

  DECLARE _is_owner INT(1);
  DECLARE _role ENUM('SA','ADM','STU');

  SELECT u.role INTO _role FROM users u WHERE u.user_id = _user_id;

  IF EXISTS(
    SELECT u.user_id
    FROM u_created_e u, events e
    WHERE u.user_id = _user_id
    AND u.event_id = _event_id) THEN

    SET _is_owner = 1;

  ELSEIF EXISTS(
    SELECT a.user_id
    FROM administrates a, rsos r, r_created_e re
    WHERE a.user_id = _user_id
    AND a.rso_id = r.rso_id
    AND r.rso_id = re.rso_id
    AND re.event_id = _event_id) THEN

    SET _is_owner = 1;

  ELSEIF _role = "SA" THEN

    SET _is_owner = 1;

  ELSE

    SET _is_owner = 0;

  END IF;

  RETURN _is_owner;

END$$

CREATE DEFINER=`root`@`localhost` FUNCTION `get_is_participating` (`_user_id` INT(11), `_event_id` INT(11)) RETURNS INT(1) BEGIN

  DECLARE _is_participating INT(1);

  IF EXISTS(
    SELECT p.user_id
    FROM participating p
    WHERE _user_id = p.user_id
    AND p.event_id = _event_id ) THEN

    SET _is_participating = 1;

  ELSE

    SET _is_participating = 0;

  END IF;

  RETURN _is_participating;

END$$

CREATE DEFINER=`root`@`localhost` FUNCTION `manhattan_distance` (`_lat1` DECIMAL(9,6), `_lon1` DECIMAL(9,6), `_lat2` DECIMAL(9,6), `_lon2` DECIMAL(9,6)) RETURNS DECIMAL(9,6) BEGIN
  RETURN (ABS(_lat1 - _lat2) + ABS(_lon1 - _lon2));
END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `administrates`
--

CREATE TABLE `administrates` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `rso_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `administrates`
--

INSERT INTO `administrates` (`user_id`, `rso_id`) VALUES
(2, 1),
(13, 2),
(11, 3),
(12, 4),
(31, 5);

-- --------------------------------------------------------

--
-- Table structure for table `affiliated_with`
--

CREATE TABLE `affiliated_with` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `uni_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `affiliated_with`
--

INSERT INTO `affiliated_with` (`user_id`, `uni_id`) VALUES
(12, 4),
(13, 1),
(29, 6),
(35, 2);

-- --------------------------------------------------------

--
-- Table structure for table `attending`
--

CREATE TABLE `attending` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `uni_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attending`
--

INSERT INTO `attending` (`user_id`, `uni_id`) VALUES
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 6),
(9, 2),
(10, 3),
(11, 4),
(14, 4),
(15, 4),
(16, 4),
(17, 4),
(18, 4),
(19, 3),
(20, 3),
(21, 3),
(22, 3),
(23, 3),
(24, 6),
(25, 6),
(26, 6),
(27, 6),
(28, 6),
(30, 2),
(31, 2),
(32, 2),
(33, 2),
(34, 2);

-- --------------------------------------------------------

--
-- Table structure for table `categorized_as`
--

CREATE TABLE `categorized_as` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `label` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `commented_on`
--

CREATE TABLE `commented_on` (
  `comment_id` int(11) UNSIGNED NOT NULL,
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `content` tinytext NOT NULL,
  `user_id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(60) NOT NULL,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `telephone` varchar(12) NOT NULL,
  `email` varchar(60) NOT NULL,
  `description` tinytext NOT NULL,
  `location` varchar(60) NOT NULL,
  `lat` decimal(9,6) NOT NULL,
  `lon` decimal(9,6) NOT NULL,
  `accessibility` enum('PUB','PRI','RSO') NOT NULL DEFAULT 'PUB',
  `status` enum('PND','ACT') NOT NULL DEFAULT 'PND',
  `rating` decimal(9,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `events`
--

INSERT INTO `events` (`event_id`, `name`, `start_time`, `end_time`, `telephone`, `email`, `description`, `location`, `lat`, `lon`, `accessibility`, `status`, `rating`) VALUES
(1, 'Pizza Party', '2017-07-11 15:00:00', '2017-07-11 17:00:00', '123-456-7890', 'billabog@knights.ucf.edu', 'Lets get pizza and play pong. Bring your favorite paddle and your appetite. No entry costs.', '1151 University Blvd, Orlando, FL 32817, USA', '28.598338', '-81.219712', 'PUB', 'PND', '0.00'),
(2, 'First Debate', '2017-07-11 15:00:00', '2017-07-11 17:00:00', '123-456-7890', 'billabog@knights.ucf.edu', 'Lets have our first debate. This will be on the topic of foreign policy. How should the United States handle its external affairs, ya know?', 'Health & Public Affairs II, Orlando, FL 32816, USA', '28.603014', '-81.198650', 'PUB', 'ACT', '0.00'),
(3, 'Second Debate', '2017-07-18 15:00:00', '2017-07-18 17:00:00', '123-456-7890', 'billabog@knights.ucf.edu', 'Lets have our second debate. This will be on the topic of ethics in science. Would it be a bad idea to clone humans, ya know?', 'Health & Public Affairs II, Orlando, FL 32816, USA', '28.603014', '-81.198650', 'PUB', 'ACT', '0.00'),
(4, 'Surprise Stakeout', '2017-07-11 16:00:00', '2017-07-11 18:00:00', '123-456-7890', 'sara@knights.ucf.edu', 'Today, we will be hiding by the shrubs of the student union. Bring your maximum stealth.', 'Apollo Cir, Orlando, FL 32816, USA', '28.605335', '-81.198346', 'RSO', 'ACT', '0.00'),
(5, 'First Doctor Meeting', '2017-07-11 15:00:00', '2017-07-11 17:00:00', '123-456-7890', 'ttarmach@mich.ppl.edu', 'Let''s meet at the chipotle''s near campus. Bring your club dues! We will discuss this years plans and how we can best prepare!', '235 S State St, Ann Arbor, MI 48104, USA', '42.279316', '-83.740442', 'PUB', 'ACT', '0.00'),
(6, 'Second Doctors Meeting', '2017-07-18 15:00:00', '2017-07-18 17:00:00', '123-456-7890', 'ttarmach@mich.ppl.edu', 'So we meet again!!! Bring a notebook!', '235 S State St, Ann Arbor, MI 48104, USA', '42.279316', '-83.740442', 'PRI', 'ACT', '0.00'),
(7, 'FSU Event 0', '2017-07-12 19:00:00', '2017-07-12 22:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'Sweet roll cupcake marzipan oat cake macaroon bear claw halvah soufflé macaroon. Gummi bears I love gingerbread. Biscuit I love I love cupcake topping. Icing macaroon bear claw caramels sesame snaps. Tart chupa chups gummi bears sesame snaps ice cream juj', '918 Way, Tallahassee, FL 32306, USA', '30.441878', '-84.298489', 'PUB', 'ACT', '0.00'),
(8, 'FSU Event 1', '2017-07-12 19:00:00', '2017-07-12 22:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'I love I love soufflé toffee pie I love soufflé. Cake danish brownie. Gummies jelly beans I love. Lemon drops carrot cake candy marzipan. Ice cream lemon drops chocolate bar jelly beans lemon drops jujubes. Dessert jelly caramels soufflé cookie sugar plum', '3300 Capital Cir SW, Tallahassee, FL 32310, USA', '30.395407', '-84.345052', 'PRI', 'ACT', '0.00'),
(9, 'FSU Event 2', '2017-07-19 19:00:00', '2017-07-19 22:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'Gummi bears I love carrot cake chocolate bar jujubes toffee jelly beans sesame snaps tart. Fruitcake fruitcake marshmallow. Soufflé jujubes wafer macaroon. Jelly beans ice cream caramels. Candy jujubes candy canes sugar plum jelly liquorice halvah I love.', 'Woodward Ave. Garage, Tallahassee, FL 32304, USA', '30.444573', '-84.298888', 'PUB', 'PND', '0.00'),
(10, 'FSU Event 3', '2017-07-19 23:00:00', '2017-07-20 00:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'Chocolate pudding macaroon tart caramels I love bonbon I love tiramisu. Brownie candy canes lemon drops I love pastry cake tiramisu jelly beans gummies. Bear claw cupcake fruitcake gummi bears. Powder biscuit jelly pastry gummies I love chocolate cake car', '3945 Museum Rd, Tallahassee, FL 32310, USA', '30.410471', '-84.344054', 'RSO', 'ACT', '0.00'),
(11, 'FSU Event 4', '2017-07-20 19:00:00', '2017-07-20 22:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'Sweet pie ice cream brownie. Jujubes brownie macaroon jelly beans brownie. Bonbon macaroon tiramisu I love dragée caramels fruitcake jelly-o. Gummies cookie danish jelly soufflé chupa chups. Cheesecake pudding oat cake toffee. Toffee danish macaroon marsh', '2225 N Monroe St, Tallahassee, FL 32303, USA', '30.470386', '-84.287964', 'PRI', 'PND', '0.00'),
(12, 'FSU Event 5', '2017-07-22 14:00:00', '2017-07-22 15:00:00', '123-456-7890', 'pmappleleaf@noles.flsu.edu', 'Candy cookie candy cheesecake jelly-o. Pastry jelly tiramisu sugar plum jelly bear claw candy candy canes dragée. Marzipan topping caramels croissant. Muffin oat cake lollipop croissant pudding I love I love I love. Ice cream gummi bears cookie topping ca', '600 W College Ave, Tallahassee, FL 32306, USA', '30.441878', '-84.298489', 'PUB', 'PND', '0.00');

-- --------------------------------------------------------

--
-- Table structure for table `has`
--

CREATE TABLE `has` (
  `uni_id` int(11) UNSIGNED NOT NULL,
  `rso_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `has`
--

INSERT INTO `has` (`uni_id`, `rso_id`) VALUES
(1, 1),
(1, 2),
(4, 3),
(4, 4),
(2, 5);

-- --------------------------------------------------------

--
-- Table structure for table `hosting`
--

CREATE TABLE `hosting` (
  `uni_id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `hosting`
--

INSERT INTO `hosting` (`uni_id`, `event_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(4, 5),
(4, 6),
(2, 7),
(2, 8),
(2, 9),
(2, 10),
(2, 11),
(2, 12);

-- --------------------------------------------------------

--
-- Table structure for table `is_member`
--

CREATE TABLE `is_member` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `rso_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `is_member`
--

INSERT INTO `is_member` (`user_id`, `rso_id`) VALUES
(2, 1),
(6, 1),
(3, 1),
(4, 1),
(5, 1),
(2, 2),
(6, 2),
(4, 2),
(5, 2),
(13, 2),
(11, 3),
(15, 3),
(14, 3),
(16, 3),
(12, 3),
(11, 4),
(12, 4),
(31, 5),
(34, 5),
(35, 5),
(32, 5),
(33, 5);

-- --------------------------------------------------------

--
-- Table structure for table `participating`
--

CREATE TABLE `participating` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `private_events`
--

CREATE TABLE `private_events` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `uni_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `private_events`
--

INSERT INTO `private_events` (`event_id`, `uni_id`) VALUES
(6, 4),
(8, 2),
(11, 2);

-- --------------------------------------------------------

--
-- Table structure for table `public_events`
--

CREATE TABLE `public_events` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `uni_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `public_events`
--

INSERT INTO `public_events` (`event_id`, `uni_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(5, 4),
(7, 2),
(9, 2),
(12, 2);

-- --------------------------------------------------------

--
-- Table structure for table `rating`
--

CREATE TABLE `rating` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `rating` tinyint(1) NOT NULL,
  `last_rated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `user_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rsos`
--

CREATE TABLE `rsos` (
  `rso_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(60) NOT NULL,
  `description` text NOT NULL,
  `status` enum('PND','ACT') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `rsos`
--

INSERT INTO `rsos` (`rso_id`, `name`, `description`, `status`) VALUES
(1, 'Surprise Society', 'So, our thing is to hide in innocuous places and startle passerby''s. This may seem like a harmless passtime, but is highly effective at unravling the fabric of civilization as we know it. We meet every third Wednesday of the month... when you''d least expect it.', 'ACT'),
(2, 'Debate Club', 'Do you like to fight people? That might be a problem. But theres good news! Now there''s a club where you can cultivate your contrarian attitudes. At debate club, you''ll learn how to assert your views and make friends at the same time. Travel abroad, enter contests, practice public speaking. Club dues are $5.00 and should be paid upon submitting a request to join', 'ACT'),
(3, 'Michigan Kids Unite', 'Are you in Michigan, and a kid? Look no further! Our club curates the coolest things to do. This club is free to join and plans trips twice a year. No one will be turned away! You are all invited. We love you.', 'ACT'),
(4, 'Mich Doctors club', 'Earning your doctorates? Passionate about your field? We are too. Let''s talk about what fascinates us and make some breakthroughs. Non-doctorate program students are welcome to sit in and participate', 'ACT'),
(5, 'FSU RSO', 'Tootsie roll jelly beans cheesecake cheesecake pie marshmallow sesame snaps ice cream. Muffin cake dessert I love I love sweet roll liquorice ice cream sugar plum. Marshmallow ice cream bear claw bear claw wafer tart lollipop jelly brownie. Marshmallow apple pie jelly beans. Candy canes dragée ice cream sesame snaps dessert jelly beans dessert apple pie liquorice. Danish cheesecake donut gingerbread. Cupcake jelly-o biscuit. Pastry dragée I love candy soufflé gummi bears tootsie roll I love chocolate cake.', 'ACT');

-- --------------------------------------------------------

--
-- Table structure for table `rso_events`
--

CREATE TABLE `rso_events` (
  `event_id` int(11) UNSIGNED NOT NULL,
  `rso_id` int(11) UNSIGNED NOT NULL,
  `uni_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `rso_events`
--

INSERT INTO `rso_events` (`event_id`, `rso_id`, `uni_id`) VALUES
(4, 1, 1),
(10, 5, 2);

-- --------------------------------------------------------

--
-- Table structure for table `r_created_e`
--

CREATE TABLE `r_created_e` (
  `rso_id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `r_created_e`
--

INSERT INTO `r_created_e` (`rso_id`, `event_id`) VALUES
(2, 2),
(2, 3),
(1, 4),
(4, 5),
(4, 6),
(5, 7),
(5, 8),
(5, 10);

-- --------------------------------------------------------

--
-- Table structure for table `universities`
--

CREATE TABLE `universities` (
  `uni_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(60) NOT NULL,
  `description` text NOT NULL,
  `location` varchar(60) NOT NULL,
  `lat` decimal(9,6) NOT NULL,
  `lon` decimal(9,6) NOT NULL,
  `email_domain` varchar(30) NOT NULL,
  `website_url` varchar(60) NOT NULL,
  `population` int(10) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `universities`
--

INSERT INTO `universities` (`uni_id`, `name`, `description`, `location`, `lat`, `lon`, `email_domain`, `website_url`, `population`) VALUES
(1, 'University of Central Florida', 'With more than 64,000 students, UCF is one of the largest universities in the U.S. In addition to its impressive size and strength, UCF is ranked as a best-value university by The Princeton Review and Kiplinger''s, as well as one of the nation''s most affordable colleges by Forbes.', '4000 Central Florida Blvd, Orlando, FL 32816', '28.602427', '-81.200060', '@knights.ucf.edu', 'http://www.ucf.edu', 64318),
(2, 'Florida State University', 'Florida State University (commonly referred to as Florida State or FSU) is an American public space-grant and sea-grant research university. ... It is a senior member of the State University System of Florida. Founded in 1851, it is located on the oldest continuous site of higher education in the state of Florida.', '600 W College Ave, Tallahassee, FL 32306', '30.441878', '-84.298489', '@noles.fsu.edu', 'http://www.fsu.edu', 41867),
(3, 'University of Kansas', 'The University of Kansas, often referred to as KU or Kansas, is a public research university in the U.S. state of Kansas. The main campus in Lawrence, one of the largest college towns in Kansas, is on Mount Oread, the highest elevation in Lawrence.', '1450 Jayhawk Blvd, Lawrence, KS 66045', '38.954344', '-95.255796', '@kansas.ppl.edu', 'http://www.kans.edu', 28401),
(4, 'University of Michigan', 'From research to sports to music to medicine: the University of Michigan has a 200-year-old tradition of excellence. ', '500 S State St, Ann Arbor, MI 48109', '42.278044', '-83.738224', '@mich.ppl.edu', 'http://www.mich.edu', 44718),
(5, 'Cornell University', 'Cornell is a privately endowed research university and a partner of the State University of New York. As the federal land-grant institution in New York State, we have a responsibility—unique within the Ivy League—to make contributions in all fields of knowledge in a manner that prioritizes public engagement to help improve the quality of life in our state, the nation, the world.', 'Ithaca, NY 14850', '42.453449', '-76.473503', '@corn.ppl.edu', 'http://www.corn.edu', 21904),
(6, 'Yale University', 'Yale's reach is both local and international. It partners with its hometown of New Haven, Connecticut to strengthen the city's community and economy. And it engages with people and institutions across the globe in the quest to promote cultural understanding, improve the human condition, delve more deeply into the secrets of the universe, and train the next generation of world leaders.', 'New Haven, CT 06520', '41.316324', '-72.922343', '@yale.ppl.edu', 'http://www.yale.edu', 12385);

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `first_name` varchar(60) NOT NULL,
  `last_name` varchar(60) NOT NULL,
  `user_name` varchar(30) NOT NULL,
  `email` varchar(60) NOT NULL,
  `role` enum('SA','ADM','STU','') NOT NULL DEFAULT 'STU',
  `hash` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`user_id`, `first_name`, `last_name`, `user_name`, `email`, `role`, `hash`) VALUES
(1, 'jeff', 'straney', 'jstraney', 'jeff@gmail.com', 'SA', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(2, 'joe', 'bilabog', 'jbilabog', 'bilabog@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(3, 'robert', 'doorstopper', 'rdoorstopper', 'doorstopper@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(4, 'raymond', 'faust', 'rfaust', 'faust@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(5, 'ross', 'olson', 'rolson', 'rolson@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(6, 'rafael', 'caprese', 'rafaelthepainter', 'rafael@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(7, 'rachel', 'primrose', 'primrose', 'rprimrose@knights.ucf.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(8, 'robert', 'sandcastle', 'rsandcastle', 'sandcastle@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(9, 'josh', 'doorstopper', 'jdoorstopper', 'doorstopper@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(10, 'jonas', 'borg', 'jonasborg', 'jborg@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(11, 'jenifer', 'bosch', 'jbosch', 'jbosch@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(12, 'travis', 'tarmach', 'ttarmach', 'travis@mich.ppl.edu', 'ADM', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(13, 'sara', 'mackley', 'smackley', 'sara@knights.ucf.edu', 'ADM', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(14, 'jacob', 'marshall', 'jsmarshall', 'jmarshall@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(15, 'james', 'march', 'jmarch', 'jmarch@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(16, 'jake', 'tally', 'jtally', 'jtally@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(17, 'joshua', 'porche', 'jporche', 'jporche@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(18, 'jacob', 'bailey', 'jbailey', 'jbailey@mich.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(19, 'marc', 'reilly', 'mreilly', 'mreilly@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(20, 'maxine', 'tosh', 'mtosh', 'mtosh@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(21, 'marco', 'poland', 'mpoland', 'mpoland@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(22, 'marchall', 'slater', 'mslater', 'mslater@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(23, 'michelle', 'travertine', 'mtravertine', 'mtravertine@kansas.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(24, 'freddy', 'chris', 'fchris', 'fchris@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(25, 'fabio', 'olson', 'folson', 'folson@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(26, 'falcon', 'rembrant', 'frembrant', 'frembrant@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(27, 'faust', 'leonardo', 'fleonardo', 'fleonardo@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(28, 'fehey', 'flemming', 'fflemming', 'fflemming@yale.ppl.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(29, 'frank', 'lozenges', 'flozenges', 'flozenges@yale.ppl.edu', 'ADM', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(30, 'pierre', 'alton', 'palton', 'palton@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(31, 'perry', 'mappleleaf', 'pmappleleaf', 'pmappleleaf@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(32, 'picard', 'ramtha', 'pramtha', 'pramtha@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(33, 'penny', 'solomon', 'psolomon', 'psolomon@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(34, 'pete', 'marine', 'pmarine', 'pmarine@noles.fsu.edu', 'STU', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq'),
(35, 'perry', 'plymouth', 'pplymouth', 'pplymouth@noles.fsu.edu', 'ADM', '$2y$12$QJpIgFQA42Lrsk6qjRXZuOTg8MMu4r.zOXfRhL4fKMOZIe8RS/DXq');

-- --------------------------------------------------------

--
-- Table structure for table `u_created_e`
--

CREATE TABLE `u_created_e` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `event_id` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `u_created_e`
--

INSERT INTO `u_created_e` (`user_id`, `event_id`) VALUES
(2, 1),
(13, 2),
(13, 3),
(2, 4),
(12, 5),
(12, 6),
(31, 7),
(31, 8),
(31, 9),
(31, 10),
(31, 11),
(31, 12);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `administrates`
--
ALTER TABLE `administrates`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `rso_id` (`rso_id`);

--
-- Indexes for table `affiliated_with`
--
ALTER TABLE `affiliated_with`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `uni_id` (`uni_id`);

--
-- Indexes for table `attending`
--
ALTER TABLE `attending`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `uni_id` (`uni_id`);

--
-- Indexes for table `categorized_as`
--
ALTER TABLE `categorized_as`
  ADD KEY `event_id` (`event_id`),
  ADD KEY `label` (`label`) USING HASH;

--
-- Indexes for table `commented_on`
--
ALTER TABLE `commented_on`
  ADD PRIMARY KEY (`comment_id`);

--
-- Indexes for table `events`
--
ALTER TABLE `events`
  ADD PRIMARY KEY (`event_id`);

--
-- Indexes for table `has`
--
ALTER TABLE `has`
  ADD KEY `uni_id` (`uni_id`),
  ADD KEY `rso_id` (`rso_id`);

--
-- Indexes for table `hosting`
--
ALTER TABLE `hosting`
  ADD KEY `uni_id` (`uni_id`),
  ADD KEY `event_id` (`event_id`);

--
-- Indexes for table `is_member`
--
ALTER TABLE `is_member`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `rso_id` (`rso_id`);

--
-- Indexes for table `participating`
--
ALTER TABLE `participating`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `event_id` (`event_id`);

--
-- Indexes for table `private_events`
--
ALTER TABLE `private_events`
  ADD KEY `event_id` (`event_id`),
  ADD KEY `uni_id` (`uni_id`);

--
-- Indexes for table `public_events`
--
ALTER TABLE `public_events`
  ADD KEY `event_id` (`event_id`),
  ADD KEY `uni_id` (`uni_id`);

--
-- Indexes for table `rating`
--
ALTER TABLE `rating`
  ADD KEY `event_id` (`event_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `rsos`
--
ALTER TABLE `rsos`
  ADD PRIMARY KEY (`rso_id`);

--
-- Indexes for table `rso_events`
--
ALTER TABLE `rso_events`
  ADD KEY `event_id` (`event_id`),
  ADD KEY `rso_id` (`rso_id`),
  ADD KEY `uni_id` (`uni_id`);

--
-- Indexes for table `r_created_e`
--
ALTER TABLE `r_created_e`
  ADD KEY `rso_id` (`rso_id`),
  ADD KEY `event_id` (`event_id`);

--
-- Indexes for table `universities`
--
ALTER TABLE `universities`
  ADD PRIMARY KEY (`uni_id`),
  ADD UNIQUE KEY `name` (`name`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`user_id`),
  ADD UNIQUE KEY `user_name` (`user_name`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indexes for table `u_created_e`
--
ALTER TABLE `u_created_e`
  ADD KEY `user_id` (`user_id`),
  ADD KEY `event_id` (`event_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `commented_on`
--
ALTER TABLE `commented_on`
  MODIFY `comment_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `events`
--
ALTER TABLE `events`
  MODIFY `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `rsos`
--
ALTER TABLE `rsos`
  MODIFY `rso_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `universities`
--
ALTER TABLE `universities`
  MODIFY `uni_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `user_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `administrates`
--
ALTER TABLE `administrates`
  ADD CONSTRAINT `administrates_uni_id` FOREIGN KEY (`rso_id`) REFERENCES `rsos` (`rso_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `administrates_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `affiliated_with`
--
ALTER TABLE `affiliated_with`
  ADD CONSTRAINT `affiliated_with_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `affiliated_with_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `attending`
--
ALTER TABLE `attending`
  ADD CONSTRAINT `attending_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `attending_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `categorized_as`
--
ALTER TABLE `categorized_as`
  ADD CONSTRAINT `categorized_as_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `has`
--
ALTER TABLE `has`
  ADD CONSTRAINT `has_rso_id` FOREIGN KEY (`rso_id`) REFERENCES `rsos` (`rso_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `has_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `hosting`
--
ALTER TABLE `hosting`
  ADD CONSTRAINT `hosting_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `hosting_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `is_member`
--
ALTER TABLE `is_member`
  ADD CONSTRAINT `is_member_rso_id` FOREIGN KEY (`rso_id`) REFERENCES `rsos` (`rso_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `is_member_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `participating`
--
ALTER TABLE `participating`
  ADD CONSTRAINT `participating_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `participating_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `private_events`
--
ALTER TABLE `private_events`
  ADD CONSTRAINT `private_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `private_event_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `public_events`
--
ALTER TABLE `public_events`
  ADD CONSTRAINT `public_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `public_event_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `rating`
--
ALTER TABLE `rating`
  ADD CONSTRAINT `rating_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `rating_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `rso_events`
--
ALTER TABLE `rso_events`
  ADD CONSTRAINT `rso_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `rso_event_rso_id` FOREIGN KEY (`rso_id`) REFERENCES `rsos` (`rso_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `rso_event_uni_id` FOREIGN KEY (`uni_id`) REFERENCES `universities` (`uni_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `r_created_e`
--
ALTER TABLE `r_created_e`
  ADD CONSTRAINT `r_created_e_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `r_created_e_rso_id` FOREIGN KEY (`rso_id`) REFERENCES `rsos` (`rso_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `u_created_e`
--
ALTER TABLE `u_created_e`
  ADD CONSTRAINT `u_created_e_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `u_created_e_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


text:
Entertainment, Entertainment - International
Disney bets streaming launch on new 'Star Wars', past classics
by Andrew MARSZAL
LOS ANGELES, United States (AFP) — The star of Disney's hugely ambitious new Star Wars television series remembers the moment he first stepped into a galaxy far, far away.
Pedro Pascal was trying on his character's helmet for "The Mandalorian" — the mega-budget, live-action show which launches the Disney+ streaming platform this Tuesday — when he caught a glimpse in the mirror.
"If you grow up playing with Star Wars toys, and seeing the movies, and then you're staring at yourself and you are the image of that childhood imagination — it's a super 'pinch me' moment," recalled Pascal.
Disney is banking heavily on audiences getting that same feeling.
Its new rival to Netflix — costing $6.99 a month in the US — trades heavily on nostalgia, boasting a huge back-catalog from classic Disney animations and Pixar favorites to Marvel superhero films and "The Simpsons."
But Disney+ has relatively few original titles at launch, meaning a lot is riding on "The Mandalorian."
Written and helmed by Jon Favreau, who directed Disney's wildly successful remakes of "The Jungle Book" and "The Lion King," the show brings together a constellation of stars from within and beyond the legendary franchise.
Chilean actor Pascal, familiar to fans of "Game of Thrones" and "Narcos," plays a masked bounty hunter known as The Mandalorian.
Plot details are tightly under wraps. But the story is set five years after "Return of the Jedi," and follows his adventures as a gun-for-hire roaming the galaxy's lawless outer reaches.
"He's cloaked in mystery — an entire story that is literally hidden underneath the armor," Pascal told journalists at a Los Angeles press conference.
He will be joined by veteran action star Carl Weathers ("Rocky"), former martial arts fighter Gina Carano ("Deadpool") and "Breaking Bad" villain Giancarlo Esposito.
Lucas's right hand
Taika Waititi ("Jojo Rabbit," "Thor: Ragnarok") directs an episode as well as voicing a droid, while Nick Nolte and German auteur Werner Herzog also have roles.
But die-hard Star Wars fans will be most excited by the presence of executive producer and director Dave Filoni, described as George Lucas's "right-hand man."
Star Wars creator Lucas sold Lucasfilm to Disney in 2012.
But Filoni worked for almost a decade closely alongside the filmmaker on previous Star Wars projects, and brings some old-school continuity to the project.
"One of the dreams George had even when I worked with him on 'Clone Wars,' he would talk about the future being streaming, the future being episodic, serialized Star Wars," said Filoni.
Huge advances in technology — and Disney's deep pockets — have now brought what was once only possible in blockbuster films to the small screen.
"I tried to offer the knowledge that I've had passed on to me by George for Star Wars, and the way that he likes to shoot things," said Filoni.
Lucas himself even visited the set, appearing in an Instagram photo shared by Favreau last year.
Along with "The Mandalorian," at least two other live-action Star Wars series are in the works for Disney+.
Disney archive
From launch, the platform will also premiere a live-action remake of "Lady and the Tramp."
Post-production of the new movie took place on the same studio lot outside Los Angeles where the 1955 original was created.
It was filmed using real dogs — mainly strays rescued from shelters and foster families — who had mouth movements superimposed onto them with computer-generated visual effects.
Tessa Thompson and Justin Theroux voice the pampered pure-breed and stray mutt who fall deeply in love.
Disney+ will also feature at launch a new mockumentary based on "High School Musical."
The 10-episode scripted series sees pupils at the real Salt Lake City school where the original movie was filmed rehearse a new production of its hit songs 13 years later.
According to Disney, the show has been created "through the lens of 2019's significant cultural sensibilities" — for instance, the lead female character is being raised by two moms.
But fondness for cherished past favorites will be key for Disney+, as it competes in a crowded marketplace with Netflix, Amazon Prime, Apple TV+, HBO Max and more.
The Mouse House is opening its film archive on the streaming platform, with movies from classics "Old Yeller" and "Fantasia" through to "Frozen" and "Iron Man" online from day one.
Subscribers will have to wait longer for a vast pipeline of new projects, from a grown-up "Lizzie McGuire" reboot starring Hilary Duff to multiple Marvel superhero TV shows.
Disney drops 'Fox' name from 20th Century film studio: reports January 18, 2020
Hollywood prepares to toast winners at Golden Globes January 5, 2020
Golden Globes rev up award season with Netflix in pole position January 3, 2020
'Star Wars' stays aloft to again top N.America box office December 30, 2019

redpajama_set_name: RedPajamaCommonCrawl


heard about the cryptocurrency for communities before? We'll write you soon. Our blockchain is able to process 1 000 transactions per second, and each operation is free. 118, Fonecta 020202 tai Eniro 0100100 numeroon tai tekstiviestihaku esim.
Earn Bitcoin instantly by completing tasks, watching videos and taking daily surveys. It's as easy as 123! Earning Bitcoin The Easy Way. Ilmainen numerohaku (numerotiedustelu) on saatavilla verkosta helposti. Et joudu maksamaan numerohauista mitän.
Become a member Our global ecosystem unites communities and organizations, aims to interact with them in a swift, secure and modern way. No transactional charges inside the network. Jos et ole vielä rekisteröitynyt, niin palveluun rekisteröityminen tekstiviestillä maksaa 0,25 euroa. Eco-friendliness BitCoen protocol does not utilize any proof-of-work of proof-of-stake mining, so it does not excessively use electricity as a resource and does not affect global ecology.
BitcoinEarnner is an online rewards site that allows you to earn unlimited Bitcoin. Total supply BEN, active Nodes. Spend them wherever BitCoen is accepted, 600 partner shops in our network. Then, withdraw your bitcoin anytime for instant payments. Cryptocurrency for Communities, when we started in 2017, Jewish community supported. High-speed The technology of BitCoen network is able to process 1 000 transactions per second. For example, the most financial times bitcoin kiina hyped crypto networks Bitcoin and Ethereum are able to process 7 and 20 op/sec. But as the token sale has started, early adopters requested us to support them. Today we are open to every community in the world. BEN on CoinMarketCap, bEN on CryptoCompare, bEN.


text:
El domingo 1° de julio de 1973, se realizaron en México elecciones federales legislativas 1972-1973, en las que se eligieron:

 232 Diputados Miembros de la Cámara Baja del Congreso de la Unión en un período de 400 circunscripciones que comenzó el 1 de septiembre de 1973.

Resultados electorales

Nota: Al tiempo de la elección, el territorio de Quintana Roo solo contaba con un distrito único. Al elevarse a estado de la federación en 1974, Quintana Roo obtuvo el derecho de elegir un segundo diputado. Este diputado fue del PAN para alcanzar la suma de 26 diputados en total.

Partidos
 Partido Acción Nacional (PAN)
 Partido Revolucionario Institucional (PRI)
 Partido Popular Socialista (PPS)
 Partido Auténtico de la Revolución Mexicana (PARM)
 Partido Comunista Mexicano (PCM)

Véase también
 Elecciones federales de México

1973
1973

redpajama_set_name: RedPajamaWikipedia


text:
Q: how to reduce mat-dialog z-index? I implemented a global loader which will be shown every time a http request happens until I get a response.

app.component.html:
<mat-sidenav-content>
    <loader></loader>
    <router-outlet></router-outlet>
</mat-sidenav-content>

But if I do a http request after submitting the form, the loader appears behind the mat-dialog instead in front of it. The loader already has z-index = 9999 !important. I also tried those approaches How can i change the Z-Index of mat-dialog in Angular but sadly it didn't work. Any ideas?

redpajama_set_name: RedPajamaStackExchange


text:
With population growing, Warner Robins looks to hire more firefighters
Tamla Horsford family attorney: 'There's too many inconsistencies'
The attorney for her family said the results of the autopsy are just the first step in a long journey for the family.
Author: Hope Ford
ATLANTA — After months, people in the community of Forsyth County appear to finally have an answer about a Cumming mother's death.
Tamla Hosford became the center of a viral social media controversy after she died last November at an overnight house party surrounded by other adults.
On Wednesday, the Forsyth County Sheriff's Office said its investigation into her death has closed, after 300 hours of manpower and 30 interviews with party guests and others who had a connection to the party.
Police said that Horsford's body was found, fully clothed, in the backyard of a home on Woodlet Court in Cumming on Nov. 4, 2018. Law enforcement said the first 911 call regarding an unresponsive person at the home was made at 8:59 a.m. that morning, after a full night of partying at the home.
Police said Horsford's death was caused by an accidental fall from a deck at the home.
Her death led to many questions on social media, with people calling for a deeper look into the investigation with the hashtag #TamlaHorsford.
READ: Accusations fly about mother's death at overnight party
The attorney for her family, Ralph Hernandez, was very clear. He is saying there are too many inconsistencies.
"I'm not suggesting anything nefarious. I'm saying there's a tone for some of the concerns," Hernandez said. "The fact that there was an investigation into someone who accessed personal information who was very close to law enforcement."
Hernandez is referencing the fact that one partygoer, Jose Barrerra, ended up losing his job in the wake of Horsford's death. Barrera was a Forsyth County Superior Court employee who worked as a pre-trial release services officer.
According to the Forsyth County Sheriff's Office, Barrera accessed police files about Horsford's death, which was a red flag to police.
MORE: Case closed in death of Cumming mom at overnight house party
The attorney discussed what he considered other inconsistencies in a phone interview with 11Alive's Hope Ford.
"The fact that the homeowner put up and posted the fall was not from the deck at the time she had spoken with law enforcement," Hernandez said in a phone interview.
Hernandez added the injuries from the fall don't seem to match the injuries of blunt force trauma listed in the medical examiner's report.
11Alive obtained Horsford's toxicology report. It showed that she had the anti-anxiety drug Xanex in her system, along with marijuana. Her blood-alcohol level was .238, nearly three times the legal limit of .08 percent.
He added he is waiting to review the evidence himself and meet with the sheriff before making any statements as to whether or not the family will ask for any further investigation.
"I think it's critical here for no one to jump the gun, so to speak, and no one to pass judgement and let us do our work," Hernandez urged. "But, beginning this work, it does not appear that it is as clean cut."
"I can tell you as for the family, this is the first step in a long journey," he added.
As for the 911 call made after the body was discovered, Hernandez said one statement claims the call was made immediately, while another statement claimed the call was made up to an hour and a half later. Police said there was a time lapse from when she was found and when the calls were made.
LISTEN: 911 audio released by authorities following Forsyth County mom's backyard death
Hernandez added the fact that the case was closed does not mean law enforcement will not reopen a case if new evidence is found. He plans to request to visit the sheriff soon to go over the case.
In response to accusation and alleged threats posted against the party hosts online, an attorney representing the homeowners stated that everyone at the party was cooperative with police.
"At this time, each of the partygoers and their families have received death threats on various social media postings. The threats need to stop," a statement read. "This tragic accident is exactly that, an accident. It is unfortunate, sad, and unbelievably heartbreaking to her family and friends."
"However, certain very vocal friends and family members of Mrs. Horsford have been describing this accident as a 'murder.' Nothing can be farther from the truth."


Expect Johnson to suit up as the DC supervillain within the next year.
Because of the lightning, you see.
More than 25 years later, we still can't get enough of The Dark Knight's landmark series.
Fans of the 90s and 00s Batman/Superman/Justice League series, this one's for you.
Well this looks to be one fantabulous emancipation.
The spot features a very 'Man of Steel'-looking fight in the sky.
DC Universe's second streaming series will pick up where 'Titans' leaves off.
Will we get to see a Luthor family holiday special?


text:
+1.215.882.0019 [email protected]
Current Destinations
May 6, 2019megghrossBerlin
The East Side Gallery (sometimes shortened to ESG) in Berlin is the longest remaining section of the iconic Berlin Wall. One of the major tourist attractions of the city, it is now a memorial to freedom with artistic contributions from internationally recognized street artists around the world. At 1.3 kilometer (nearly a mile) long, this is...
April 6, 2019megghrossBerlin
The Brandenburg Gate (Brandenburger Tor) in Berlin is one of the first landmarks that come to mind when thinking of Germany. It is not just a symbol for the city, but for the country. German history was made here – many different times with the Brandenburg Gate playing many different roles. It reflects the country's...
March 6, 2019megghrossBerlin
Situated on Berlin's Museum Island, the Pergamon Museum houses original, reconstructed monumental buildings such as the Pergamon Altar and the Market Gate of Miletus. Both of these extraordinary artifacts were transported from Turkey, and since its opening in 1930, there has been controversy over the legitimacy of the acquisition of the collection. Many have suggested...
Monster Kabinett
February 6, 2019megghrossBerlin
January 6, 2019megghrossBerlin
About CityBird Travel
Do not hesitate to give us a call. We are an expert team of professionals and we are happy to talk to you.
Call us: + 1.215.882.0019
Email is: [email protected]birdtravel.com
> Cultural Immersion Experience
> Customer care available 24/7
> Hand-picked Tours & Activities
> Airport Transfer
© 2018 CityBirdTravel LLC. All Rights Reserved.


text:
Q: Lombok in enum : @Setter is giving compile error in enum Error : @Setter is only supported on a class or a field.
lombok version in pom.xml = 1.18.12
want to make this ErrorMessages generic for any type of error.
Need to create getter and setter through lombok and access like : ErrorMessages.MISSING_REQUIRED_FIELD.getErrorMessage()
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public enum ErrorMessages {

    MISSING_REQUIRED_FIELD("Missing required field. Please check documentation for required fields."),
    RECORD_ALREADY_EXISTS("Record already exists");

    private String errorMessage;

//  public String getErrorMessage() {
//      return errorMessage;
//  }
//
//  public void setErrorMessage(String errorMessage) {
//      this.errorMessage = errorMessage;
//  }

    ErrorMessages(String errorMessage) {
        this.errorMessage = errorMessage;

    }

}

A: this should be a class , not an enum, if you wan't the data to be changed otherwise see  Joachim Sauer comment.
Also please note the constructor need to be public as well
@Setter
@Getter
public class ErrorMessages {

    private String errorMessage;

    public ErrorMessages(String errorMessage) {
        this.errorMessage = errorMessage;}
}


The 420 program is an intermediate to advanced sailing program that introduces and furthers the work with trapezes and spinnakers while sailing the 420 sail boat. Developing problem solving abilities, learning how to hike, and learning the theory behind sailing on land. Land classes cover the physics of sailing, sail flow, and sail controls.
Our well-trained instructors follow the sailing fundamental and prepare students to learn and develop the necessary skills to flourish on the water. Typically, sailors spend the entire summer registered, and follow the CanSail 4/5 & 5/6 curriculum. More experienced sailors will be exposed to advanced training by our coaches, as well as have the opportunity to attend various major regattas including CORK in Kingston, Ontario and the 420 North American Championships. Registration for this program will be done by compiling the entire 420 sailor fleet, and coaches will be dividing students into groups based upon their skill level, as well as their desire to progress in the future.
- Must have a CanSail level 3 or prior experience with the White Sail/Bic program at the BCC.
** - Recommended regattas to attend this season.
Any sailor participating in regattas must have the following form on file in the BCC Junior Activities Office (complete information and return our Junior Activities Coordinator. Please note that this form MUST BE NOTARIZED and should be on file at the beginning of the season.


text:
Global Economic and Political Issues
By [email protected]_84Posted on July 6, 2016
In an article written and published by Ed Crooks on January 6, 2011 entitled "America: Riveting Prospects," he writes about why companies in America are opposed to exporting.
To summarize his article, showcased is the Middle River Aircraft systems plant where the world famous Rosie the Riveter, during the second World War, represented the millions of women that joined the manufacturing workforce making the industry a power house, and compared it to today's meager offerings. The plant that is now owned by GE, although still thriving has faced some tough times through the years. Although weathered by the storms, the president of GE's aircraft parts division has hope for a brighter future.
Although some political leaders and some American businesses also have hope in rebuilding growth and employment based on manufacturing, production, exporting and earnings and less on construction, consumption, importing and debt, leaders of some of America's largest manufacturing companies feel that it will be a long hard road to rebuild production in the U.S. GE's chief executive Jeff Immelt, however, shares with Andrew Liveris of Dow Chemical the dream of restoring industrial America to greatness, especially with unemployment at 9.8 and rising. Liveris has even written a book on the topic of how to be competitive on a global basis, "Make It in America: The Case for Reinventing the Economy."
Ed Crooks, however, claims that many U.S. companies, overall, has issues with exporting. Although the world offers many opportunities and America is seeing some of the benefits with emerging markets in China, India and Brazil and creating everything from a-z, Barry Botsworth of the think-tank, Brookings Institution, states that although the U.S. is similar to other developed countries in importing, we are very poor when it comes to exporting manufactured goods. Other industry executives agree that the problems with U.S. manufactures run deep. Ed Crooks has given five reasons to support his view and I summarize them as follows:
* American industries are not familiar with selling internationally. According to the chamber of commerce, only one percent of U.S. companies participate in exporting and 58 percent of those companies only export to one other company.
* The United States has been the most inactive entity at signing agreements to participate in international trade. With about 262 agreements around the world and about 100 in negotiations, the U.S. has only signed 17. In addition, the U.S. is severely affected by tariff barriers and ranks number 8 out of 121 'tariff-faced' exporting countries.
* U.S. manufacturers have inefficiently skilled and inefficiently educated workforces which threaten the industry base to fall into disrepair, job opportunities to dwindle and closing of production lines. Furthermore, without a strong pipeline of industrial talent in the future, there will be no capacity for future opportunities, no chance of developing new market segments, or creating the next innovation in aerospace, which will further deteriorate the industrial base of the U.S.
* With the emerging economies furthering skills and facilities, there us the opportunity for them to replace production in the U.S. and other developed countries. An example is Lewis Chenevert of United Technologies that manufacture Otis Lifts and Pratt & Whitney Jet Lines who stated that by the year 2013 he planned to source 40 percent of his business to Poland, China and Mexico because of the low-cost economy.
* Large U.S. companies like to manufacture where they sell which means the American companies make more money in their foreign operations than they make by exporting goods to other countries. This means that U.S. owned foreign companies make about three times more than the U.S. domestic owned companies that export their goods.
I can totally see the trouble we are in and something must be done. As a business we are in the business to make money. However, it seems that in order to make money you may have to hurt some people along the way. Foreign owned business only seems to help the foreign land they are in and it would seem to me that the only winner is the company that manufactures from those countries. It does nothing to help the U.S. economy.
When it comes to which side of the story I reside between the economist and the industrialist, I believe I would have to side with economists. Everyone cannot be in the manufacturing industry and where we run short in that arena we have other tradable skills that we should sharpen. Although we should never give up on the industry or just give it away, we need to find some balance in order to make the industry strong again. I recently heard about a particular product that salons use on natural hair. The product was created by a woman in her kitchen in 1993 and contained no mineral oil or animal fats. She used the best ingredients but along the way operated in the red. Last year it was reported that the company was filing bankruptcy and people were losing their jobs after 5 stores closed. Yesterday it was announced that L'Oreal has acquired the company, Carol's Daughter. It saves her from going bankrupt, it saves her leadership team, but her production people lost jobs. It will now be available internationally. It seems to me that she had no choice. She is now directing her attention to other services and is in partnership with other companies.
International trade is important, however, how we trade and if we should trade is still debated. In the example that I gave with Carol's Daughter, she took the path that was best for her. However, we can see that unless we are more proficient at trading we will not be able to quantify any real gain for the masses. As usual, some benefit and others don't. As Mr. Franklin Vargo of NAM, the nation's largest industrial trade association stated in the article written by Ed Crooks, "The future is not yet written; it is not black. But it could be disappointing. (Vargas, 2011)"
Crooks, E. (2011). America: Riveting prospects. Financial Times, 1-4.
Vargas, F. (2011). Quote. Financial Times, 3.
Impact of Social Media on Society
Differences Between Formal and Informal Social Control


text:
Her Name Was Breonna Taylor: The Deadly Consequences of No-Knock Warrants
by Brad Polumbo | Jun 15, 2020
mid the nationwide focus on the death of George Floyd, another tragedy has unfortunately fallen by the wayside. We should not forget the death of Breonna Taylor—or the dire need to abolish the "no-knock" warrants that caused her death, trample property rights, and routinely endanger Americans.
Here's the sad story of Taylor's death.
On March 13, police officers broke into the Louisville, Kentucky home of Taylor and her boyfriend, Kenneth Walker, unannounced. The police were executing a "no-knock" warrant, which allows them to conduct a search without identifying themselves as law enforcement, as part of a drug crime investigation into a different suspect—not Taylor or Walker—who was already in police custody.
When Walker heard unknown intruders breaking into his home, he did not know they were police officers. So, quite understandably, Walker grabbed his lawfully-owned firearm and fired a shot at the unknown invaders. The ensuing hail of more than 20 police-fired bullets left Taylor dead, and Walker was arrested for attempted murder of a police officer. (The charge has since been dropped).
Police claim that they knocked at the apartment door and announced themselves, yet that is hard to believe. They were specifically executing a "no-knock" warrant, after all, and not just Walker, but multiple neighbors have confirmed they heard no such announcement.
Neither Taylor nor Walker had a criminal history, and no drugs were found in the raid on their apartment.
Taylor's killing was a grotesque act of police recklessness. It once again exposes the injustice of "no-knock" warrants, which put both police officers and law-abiding Americans in grave and unnecessary danger by creating a situation where a routine law enforcement search can easily turn into a deadly misunderstanding.
And, sadly, Taylor's death is not as unique as one might think.
Law enforcement officers conduct 20,000 "no-knock" raids a year. We don't know exactly how many people are killed or injured as a result, but an analysis from the American Civil Liberties Union does provide some insight. As reported by Vox, the ACLU looked into 818 such "no-knock" raids, and found seven deaths (2 were suicides to evade arrest) and 46 civilian injuries. If these figures are at all representative, that means many, many more Americans are injured or killed across all 20,000 raids.
"No-knock" raids have also resulted in horror stories like a flash-bang grenade being thrown into the crib of a 19-month-old toddler and the shooting of a 7-year-old child.
True, these raids usually don't end in violence. But every single "no-knock" warrant violates the sanctity of the home, the privacy of the individual, and fundamental property rights, all of which are longstanding tenets in the western tradition of liberty and in the founding ideas of America.
As James Bovard wrote for FEE 20 years ago:
Without private property, there is no escape from state power. Property rights are the border guards around an individual's life that deter political invasions.
Few government policies better symbolize the contempt for property rights than the rising number of no-knock raids. "A man's home is his castle" has been an accepted rule of English common law since the early 1600s and required law-enforcement officials to knock on the door and announce themselves before entering a private home. But this standard has increasingly been rejected in favor of another ancient rule—"the king's keys unlock all doors."
The notion that "A man's home is his castle," as Bovard notes, is a fundamental American principle. It is enshrined in our Constitution, particularly through the Fourth Amendment, which recognizes Americans' right to be free from "unreasonable searches and seizures" of their homes. It is hard to imagine any search less "reasonable" than one where armed-to-the-teeth police officers burst into your home in the dead of night—and don't even announce themselves as law enforcement.
And conservatives especially should appreciate the insidious way in which "no-knock" raids undermine the Second Amendment and the right to self-defense. After all, Walker did exactly what many Americans who lawfully own guns would do: protect his home and family from armed intruders. For the exercise of this fundamental right, Taylor paid the ultimate price.
Policies like these compromise the sanctity of every American home. How can anyone exercise their right to self-defense to protect their home and family if they don't know whether or not it's the police breaking down the door?
This is why Breonna Taylor's story must not be allowed to fall through the cracks, and "no-knock" warrants cannot be allowed to stand.
The police officers involved in her case still have not faced any charges, and her mother is calling for justice, saying "I need people to know that her life mattered."
The only way to truly honor Taylor's memory is to make sure this kind of tragedy never happens again—and that means banning "no-knock" warrants across the board. Thankfully, there is some political support across the ideological spectrum for this reform.
Congressional Democrats have introduced a police reform bill that would abolish "no-knock" warrants for federal drug cases, which doesn't go far enough, but is at least a good start.
Meanwhile, Sen. Rand Paul, a libertarian-leaning Kentucky Republican, has led the charge against "no-knocks" from the Right. He was one of the first voices to speak out about Breonna Taylor's tragic death, and has called for reform in no uncertain terms.
"I think it's crazy that we're breaking down people's doors in the middle of the night," the senator said in a conversation with Taylor's aunt. "People are frightened. They don't know what to do. They don't know if it's burglars."
"I want to make sure that we don't forget Breonna," Paul continued. "That we try to make it better, so this doesn't happen again." The only way to do that is to consign "no-knock" warrants to the dustbin of history.
Brad Polumbo is a libertarian-conservative journalist and the Eugene S. Thorpe Writing Fellow at the Foundation for Economic Education. This article was originally featured at the Foundation for Economic Education and is republished with permission.
About Brad Polumbo
War Is Not a Conservative Thing
Ukraine Makes New Bid for Mutual Defense Pact with US
Asset Forfeiture and the Destruction of American Liberty
Will Grigg Was a Mighty Voice for Justice and Liberty
Tags: America, art, CIA, Congress, Conservatives, Constitution, EU, Fourth Amendment, government, History, James Bovard, libertarian, Liberty, property, reported, republic, RT, state, US, war