diff --git a/about/card.php b/about/card.php new file mode 100644 index 00000000..b37e8416 --- /dev/null +++ b/about/card.php @@ -0,0 +1,53 @@ +' . + "" . + ''; + } + if($linkedin_url !== null){ + $contact_links_html .= '
  • ' . + "" . + '
  • '; + } + if($github_url !== null){ + $contact_links_html .= '
  • ' . + "" . + '
  • '; + } + if($twitter_url !== null){ + $contact_links_html .= '
  • ' . + "" . + '
  • '; + } + + echo '
    ' . + '
    ' . + '
    ' . + "" . + '
    ' . + '
    ' . + '
    ' . + "

    {$name}

    {$title}
    " . + "

    {$description}

    " . + '
      ' . + $contact_links_html . + '
    ' . + '
    ' . + '
    ' . + '
    ' . + '
    '; +} \ No newline at end of file diff --git a/about/our-alumni.php b/about/our-alumni.php index c0d08842..ac3d4dd9 100644 --- a/about/our-alumni.php +++ b/about/our-alumni.php @@ -1,14 +1,51 @@ 'Nick Tindle', + 'title'=>'1st President', + 'description'=>"I am a Computer Engineering Student, The first president, and still an active member of the group", + 'picture_uri'=>'/images/bio-pics/nick-tindle.jpg', +]; +$members[] = [ + 'name'=>'Juan Ruiz', + 'title'=>'2nd President', + 'description'=>"I am a Computer Engineering Student, I.T. Support Technician, and Undergrad Research Assistant at The University of North Texas. I am an active member of The Alpha Tau Omega Fraternity, Society of Hispanic Professional Engineers, Engineers without Borders, IEEE, and National Society of Professional Engineers. I have also interned at NASA, U.S. Department of Energy, and iOLAP. My focus is Embedded Systems but I have a strong passion for robotics, automation, machine learning, and artificial intelligence.", + 'picture_uri'=>'/images/bio-pics/juan-ruiz.jpg', +]; +$members[] = [ + 'name'=>'Katie Lee', + 'title'=>'Former Secretary', + 'description'=>"I’m a transfer student from UH. I’m studying Computer Engineering because I want to be on the front of the newest technology development, and I’m the secretary for UNT Robotics.", + 'picture_uri'=>'/images/bio-pics/katie-lee.jpg', +]; +$members[] = [ + 'name'=>'Michelle Rosal Vargas', + 'title'=>'Former Event Coordinator', + 'description'=>"Mechanical Engineer | Event Coordinator at UNT Robotics", + 'picture_uri'=>'/images/bio-pics/michelle-vargas.jpg', +]; +$members[] = [ + 'name'=>'Andrew Jarrett', + 'title'=>'Former Public Relations', + 'description'=>"Mechanical Engineer | Public Relations at UNT Robotics", + 'picture_uri'=>'/images/bio-pics/andrew-jarrett.jpg', +]; +$members[] = [ + 'name'=>'Nicole Kohm', + 'title'=>'Former Project Manager', + 'description'=>"I am an adaptive problem-solver with a lifetime of scientific passion. I enjoy applying what I learn to make new ideas and possibilities come to fruition. I have a strong track record of careful attention to detail and thinking outside the box. I frequently invent new technologies and methods to quickly solve multidisciplinary problems.", + 'picture_uri'=>'/images/bio-pics/nicole-kohm.jpg', +]; +$members[] = [ + 'name'=>'Jesse Sullivan', + 'title'=>'Former Aerospace Division Lead', + 'description'=>"Jesse is a senior mechanical engineering student interested in all things that fly and go fast. He has 4 years of experience in amateur high-power rocketry and currently holds an L1 certification with the National Association of Rocketry. He founded the Aerospace Division with UNT Robotics in order to foster interest in the hobby and provide a learning experience for anyone to become a part of.", + 'picture_uri'=>'/images/bio-pics/jesse-sullivan.jpg', +]; ?> -
    diff --git a/about/our-team.php b/about/our-team.php index 524427a9..a59a78a2 100644 --- a/about/our-team.php +++ b/about/our-team.php @@ -1,14 +1,112 @@ 'Sebastian King', + 'title'=>'Co-President', + 'description'=>"Sebastian is a post-baccalaureate world languages student, with a degree in Computer Science. His role is to oversee the day-to-day running of the organisation and help ensure the organisation best serves the students at UNT. His expertise are programming and electrical engineering and he specialises in networking and remote control systems. He is also responsible for a lot of the more ambitious projects around campus, including the famous Sofabot and our re-usable weather balloon project.", + 'picture_uri'=>'/images/bio-pics/sebastian-king.jpg', + 'email'=>'president@untrobotics.com', + 'linkedin_url'=>'https://www.linkedin.com/in/sebastian-king', + 'github_url'=>'https://www.github.com/sebastian-king', + 'twitter_url'=>'https://www.twitter.com/@thekingseb' +]; +//co-president2 +$members[] = [ + 'name'=>'Lauren Caves', + 'title'=>'Co-President', + 'description'=> "She’s a woman of action, eternal optimist, and a passionate speaker. As an undergraduate mechanical engineering student, her enthusiasm for the art of engineering is vast and the hunger for discovery drives her motivation which has led to many successes during her undergraduate years. Although not easily. She has gone through many failures and complicated situations which shaped a new passion to inspire the youth and other students to overcome diversity and really fight for their dreams. She believes everyone is destined for greatness, and that it's important to not let the minor roadblocks we stumble upon crush the stars we wish upon.", + 'picture_uri'=>'/images/bio-pics/lauren-caves.jpg', + 'email'=>'president@untrobotics.com', + 'linkedin_url'=>'https://www.linkedin.com/in/lauren-caves', +]; +//vice president +$members[] = [ + 'name'=>'Tyler Adam Martinez', + 'title'=>'Vice President and Financial Director', + 'description'=>'Tyler is a junior currently studying electrical engineering with a minor in biomedical engineering. He focuses on robotics and automation, and loves designing cool circuits and building electronics.', + 'picture_uri'=>'/images/bio-pics/tyler-adam-martinez.jpg', + 'email'=>'vice-president@untrobotics.com', + 'linkedin_url'=>'https://www.linkedin.com/in/tyleradammartinez', + 'github_url'=>'https://www.github.com/TylerAdamMartinez', +]; + +// deputy financial director +$members[] = [ + 'name'=>'Andrew Paul', + 'title'=>'Deputy Financial Director', + 'description'=>'The Eagle Scout, Black Belt and Rescue scuba diver brings his vast experience keeping the funds up, and in check for the the future development of the robotics club. Andrew Paul is a freshman mechanical engineering student and lover of innovation. New to the scene with charisma to spare and a passion for engineering. He can be found climbing at the UNT Rockwall, or in his dorm finding out new ways to build and code his next project while assisting in club finances.', + 'picture_uri'=>'/images/bio-pics/andrew-paul.jpg', + 'email'=>'deputy-financial-director@untrobotics.com', +]; +// Public Relations +$members[] = [ + 'name'=>'Jacob Gomez', + 'title'=>'Public Relations', + 'description'=>'Jacob is a current Computer Science student at UNT.Although he balances school and work he finds time for extracurriculars.He has always enjoyed being apart of different organizations and getting to know new people. He loves using all the different software to model, create and design things for the club or for his own personal projects.', + 'picture_uri'=>'/images/bio-pics/jacob-gomez.jpg', + 'email'=>'public-relations@untrobotics.com', +]; + +// Event Coordinator +$members[] = [ + 'name'=>'Abdus Samee', + 'title'=>'Event Coordinator', + 'description'=>"Abdus Samee is an ECE graduate whose love for engineering must be seen to be believed. Being a former Toastmaster, he has a flair for speaking which convinces the listener to accept the facts that he puts forward. His never ending hunger for knowledge has enabled him to achieve a lot in a short time. Education is an ornament in prosperity and a refuge in adversity is what he says. Progress never comes without struggles, but his persistence helped him reach his dream destination. He is also the Vice Chair for UNT IEEE Robotics and Automation Society, and a IEEE Eta Kappa Nu Honor Student. The words of Ford inspired him to keep going. 'When everything seems to be going against you, remember that the airplane takes off against the wind and not with it.", + 'picture_uri'=>'/images/bio-pics/abdus-samee.jpg', + 'email'=>'event-coordinator@untrobotics.com', +]; + +// Social Media Manager +$members[] = [ + 'name'=>'Ally Flores', + 'title'=>'Social Media Manager', + 'description'=>"Ally is a freshman majoring in mechanical engineering technology. She’s been in robotics since high school and is excited to continue it through college. She loves trying new hobbies and making new friends!", + 'picture_uri'=>'/images/bio-pics/ally-flores.jpg', + 'email'=>'corp-relations@untrobotics.com', +]; + +// (lead) Webmaster +$members[] = [ + 'name'=>'Peyton Thibodeaux', + 'title'=>'Webmaster', + 'description'=>"Peyton is a junior, studying computer science with a minor in mathematics. He's the webmaster for UNT Robotics and in charge of the website that you see in front of you. He enjoys learning and using new technologies and have a passion for creating things.", + 'picture_uri'=>'/images/bio-pics/peyton-thibodeaux.jpg', + 'email'=>'webmaster@untrobotics.com', + 'linkedin_url'=>'https://www.linkedin.com/in/peyton-thibodeaux', +]; + +// Project Manager +$members[] = [ + 'name'=>'Nicholas Tindle', + 'title'=>'Project Manager', + 'description'=>"Nicholas Tindle is a Computer Engineering student at UNT. He works in software engineering and loves hackathons. You can generally find him wearing a hat and probably a sweatshirt. He has a long history of collaboration with UNT Robotics as the first president, a loyal advisor, and now Project Manager. He has also served as an advisor to the Dean and is currently an officer of Engineering United. Nick has helped host numerous events at the university over the years. In his professional life, he works in data analysis, web development, and python scripting.", + 'picture_uri'=>'/images/bio-pics/nick-tindle.jpg', + 'email'=>'project-manager@untrobotics.com', +]; + +// Corporate Relations +$members[] = [ + 'name'=>'Ashank Annam', + 'title'=>'Corporate Relations', + 'description'=>"Ashank is a freshman studying Business Computer Information Systems. He has been interested in robotics since high school. He loves to meet new people and learn new technologies.", + 'picture_uri'=>'/images/bio-pics/ashank-annam.jpg', + 'email'=>'corp-relations@untrobotics.com', +]; + +// Joe +$members[] = [ + 'name'=>'Joseph moore', + 'title'=>'Aerospace Division Lead', + 'description'=>"Joseph is a Junior Mechanical Engineering student. Formerly a US Marine Master Explosive Ordnance Disposal Technician (EOD), he has always tried to tinker with things and figure out how they work and is passionate about establishing and growing our High-Power Rocketry team into a nationally competitive force. Both through STEM outreach efforts and internal events, he hopes to generate interest and encourage everyone to get into hobby rocketry, and the sport of high power rocketry.", + 'picture_uri'=>'/images/bio-pics/joe-moore.jpg', + 'email'=>'aerospace@untrobotics.com', +]; ?> -
    diff --git a/about/our-web-team.php b/about/our-web-team.php index 60470306..5191d5a7 100644 --- a/about/our-web-team.php +++ b/about/our-web-team.php @@ -1,17 +1,138 @@ 'Peyton Thibodeaux', + 'title'=>'Webmaster | Team Member', + 'description'=>"Peyton is a junior, studying computer science with a minor in mathematics. He's the webmaster for UNT Robotics and in charge of the website that you see in front of you. He enjoys learning and using new technologies and have a passion for creating things.", + 'picture_uri'=>'/images/web-team-pics/peyton-thibodeaux.jpg', + 'email'=>'webmaster@untrobotics.com', + 'linkedin_url'=>'https://www.linkedin.com/in/peyton-thibodeaux', + 'github_url'=>'https://www.github.com/peyton232', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Sebastian King', + 'title'=>'Alumni | Team Member', + 'description'=>"Sebastian is a post-baccalaureate world languages student, with a degree in Computer Science. His role is to oversee the day-to-day running of the organisation and help ensure the organisation best serves the students at UNT. His expertise are programming and electrical engineering and he specialises in networking and remote control systems. He is also responsible for a lot of the more ambitious projects around campus, including the famous Sofabot and our re-usable weather balloon project.", + 'picture_uri'=>'/images/web-team-pics/sebastian-king.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/sebastian-king', + 'github_url'=>'https://www.github.com/sebastian-king', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Nicholas Tindle', + 'title'=>'President | Team Member', + 'description'=>"Nicholas Tindle is a Computer Engineering student at UNT. He works in software engineering and loves hackathons. You can generally find him wearing a hat and probably a sweatshirt. He has a long history of collaboration with UNT Robotics as the first president, a loyal advisor, and now Project Manager. He has also served as an advisor to the Dean and is currently an officer of Engineering United. Nick has helped host numerous events at the university over the years. In his professional life, he works in data analysis, web development, and python scripting.", + 'picture_uri'=>'/images/web-team-pics/nick-tindle.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/ntindle', + 'github_url'=>'https://www.github.com/ntindle', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Henry Legay', + 'title'=>'Team Member', + 'description'=>"Henry Legay is a Computer Science Student at UNT focused on web development. He is a web developer in Robotics with ready applicable experience and a willingness to learn.", + 'picture_uri'=>'/images/web-team-pics/henry-legay.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/henrylegay', + 'github_url'=>'https://www.github.com/henlegay', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Mason Besmer', + 'title'=>'Team Member', + 'description'=>"Mason Besmer is a Computer Science student at UNT. He is a webmaster for UNT Robotics and participates in many student orgs. He creates many things and comes up with ideas for even more. In his free time, he likes to create environments for games and program the website in front of you. He likes organization and loves to tinker with things. Creator of his own magic mirror, Mason is a advocate for building his own electronics. Currently, he is working on a software solution for his Starcube. You can find out more about it on his LinkedIn.", + 'picture_uri'=>'/images/web-team-pics/mason-besmer.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/masonbesmer', + 'github_url'=>'https://www.github.com/shotbyapony', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Aryan Damle', + 'title'=>'Team Member', + 'description'=>"Aryan Damle is a Computer Science student at UNT. He is an aspiring full stack web developer and an avid Home Assistant enthusiast. He mentors a high school robotics team and loves to work on robots in his free time. You can find him at your local car meet on weekends if he isn't busy working on a robot or fixing something in his garage.", + 'picture_uri'=>'/images/web-team-pics/aryan-damle.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/aryan-damle-8691b11bb', + 'github_url'=>'https://www.github.com/aryan-damle', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Mary Plana', + 'title'=>'Team Member', + 'description'=>"Mary Plana is a Computer Science Student at UNT with studies focused on Front End Development. She loves designing and implementing the user interface of a project. She has a natural curiosity about the world and loves to learn and improve her skills. She is currently the president of Application Development Organization. She facilitates the meeting and leads student UI designers to design, implement, and improve the user interface of projects.", + 'picture_uri'=>'/images/web-team-pics/mary-plana.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/mary-plana', + 'github_url'=>'https://www.github.com/mcp31', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'David Thompson', + 'title'=>'Team Member', + 'description'=>"David Thompson is a Computer Science Student at UNT with studies focused on Full Stack Development. He loves solving problems, learning new things, and is currently working with a start up on a social media application that is currently in Apple's TestFlight.", + 'picture_uri'=>'/images/web-team-pics/david-thompson.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/david-thompson-000', + 'github_url'=>'https://www.github.com/davidkt99', +// 'twitter_url'=>'' +]; + +$members[] = [ + 'name'=>'Samin Yasar', + 'title'=>'Team Member', + 'description'=>"Samin Yasar is a senior Computer Science student at UNT. He is a team member of UNT Robotics webmaster helping maintain UNT Robotics website. He is also a part of the Application Development Organization as a team member. He likes to learn new things and solve complex problems.", + 'picture_uri'=>'/images/web-team-pics/samin-yasar.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/samin2668', + 'github_url'=>'https://www.github.com/samin2668', +// 'twitter_url'=>'' +]; + +$members[] = [ + 'name'=>'Kenneth Chen', + 'title'=>'Team Member', + 'description'=>"Kenneth Chen is a Computer Science and Accounting student at UNT. As part of UNT Robotics, he's programmed helpful things, such as the controller connections for Botathon Season 3. He is also the financial director of UNT Robotics. He enjoys learnings and helping others and hopes to make the website more accessible.", + 'picture_uri'=>'/images/bio-pics/kenneth-chen.jpg', +// 'email'=>'', + 'linkedin_url'=>'https://www.linkedin.com/in/kenneth-w-chen', + 'github_url'=>'https://www.github.com/kenneth-w-chen', +// 'twitter_url'=>'' +]; +$members[] = [ + 'name'=>'Truitt Crozier', + 'title'=>'Team Member', + 'description'=>"Truitt Crozier is a sophomore Computer Science student at UNT. His passions are learning about video game console architecture, collecting music, and playing Tetris. As a part of UNT Robotics, he is involved with programming and electronics.", + 'picture_uri'=>'/images/bio-pics/truitt-crozier.jpg', + 'linkedin_url'=>'https://www.linkedin.com/in/truitt-crozier-719355293', + 'github_url'=>'https://github.com/tjcrozier', +]; + +$members[] = [ + 'name'=>'Willow Houchin', + 'title'=>'Team Member', + 'description'=>"Willow Houchin is a Computer Science student at UNT. As a member of UNT Robotics, she has worked on the rover, creating test scripts and debugging motor connections. She enjoys all kinds of both computer science and engineering and loves learning new things", + 'picture_uri'=>'/images/bio-pics/willow-houchin.jpg', + 'linkedin_url'=>'https://www.linkedin.com/in/willow-houchin-127147252', + 'github_url'=>'https://www.github.com/WillowHouchin', +]; + +$members[] = [ + 'name'=>'Logan Brewer', + 'title'=>'Team Member', + 'description'=>"Logan Brewer is a Computer Science student at UNT. He is an aspiring software developer with a passion for building things. He enjoys working on electronics projects and tinkering and always approaches problems with eagerness to learn.", + 'picture_uri'=>'/images/bio-pics/logan-brewer.jpg', + 'linkedin_url'=>'https://www.linkedin.com/in/logan-brewer-26a872256/', + 'github_url'=>'https://github.com/loganthebrewer', +]; + ?> -
    diff --git a/api/discord/bot.php b/api/discord/bot.php index 678a0c0d..e6c03a0a 100644 --- a/api/discord/bot.php +++ b/api/discord/bot.php @@ -5,7 +5,7 @@ class DiscordBot { protected static function send_api_request($URI, $method = 'GET', $content_type = "application/json", $data = null, $files = null) { $ch = curl_init(); - + $headers = array(); $headers[] = 'Authorization: Bot ' . static::AUTH_TOKEN; $headers[] = 'Content-Type: ' . $content_type; //multipart/form-data'; @@ -41,18 +41,18 @@ protected static function send_api_request($URI, $method = 'GET', $content_type if (curl_errno($ch)) { throw new DiscordBotException("Error occurred when making API request: '" . curl_error($ch) . "'" . "(" . curl_errno($ch) . ")"); } - + $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - + curl_close($ch); - + $response = new stdClass(); $response->result = json_decode($result); $response->status_code = $status_code; return $response; } - + public static function send_message($message, $channel_id, $attachments = null) { if (is_string($message)) { $data = new stdClass(); // can't be bothered right now to make a class @@ -61,43 +61,66 @@ public static function send_message($message, $channel_id, $attachments = null) $data = $message; } + // Add files to array $files = array(); + $tmp_files = []; // needed if more than 1 attachment to prevent gc for deleting the temp files if ($attachments) { - foreach ($attachments as $k => $attachment) { - $file = tmpfile(); - $path = stream_get_meta_data($file)['uri']; - - //$content = file_get_contents($attachment['url']); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $attachment['url']); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $content = curl_exec($ch); - - //error_log($content); - - file_put_contents($path, $content); - //error_log($attachment['url']); - //error_log($path); - //error_log($content); - - $files["attachment{$k}"] = new CURLFile($path, $attachment['type'], "attachment{$k}." . mime2ext($attachment['type'])); - } - } + foreach ($attachments as $k => $attachment) { + if(isset($attachment['bin'])) // Function caller passed the raw data to the arg + { + // Since we have the data, we need to create a tmpfile to store that data for the CURLFile + $tmp_files[$k] = tmpfile(); + $path = stream_get_meta_data($tmp_files[$k])['uri']; + file_put_contents($path,$attachment['bin']); + $file_type = $attachment['type']; + $file_mime = ext2mime($file_type); + } + else if(isset($attachment['path'])) // File exists on local machine + { + $path = $attachment['path']; + $file_type = $attachment['type']; + $file_mime = ext2mime($file_type); + } + else // We assume the attachment is an online file that we need to download + { // sebastian only insane people put curly braces on the same line + //$content = file_get_contents($attachment['url']); + $tmp_files[$k] = tmpfile(); + $path = stream_get_meta_data($tmp_files[$k])['uri']; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $attachment['url']); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $content = curl_exec($ch); + + //error_log($content); + + file_put_contents($path, $content); + $file_mime = $attachment['type']; + $file_type = mime2ext($file_mime); + //error_log($attachment['url']); + //error_log($path); + //error_log($content); + + /*$files["attachment{$k}"] = new CURLFile($path, $attachment['type'], "attachment{$k}." . mime2ext($attachment['type']));*/ + } + + // CURLFile is a file with a bunch of delimiters in the binary so it can be sent as Form-data + $files["attachment{$k}"] = new CURLFile($path, $file_mime, "attachments{$k}." . $file_type); + } + } //error_log(var_export($files, true)); - + return static::send_api_request("/channels/{$channel_id}/messages", 'POST', 'multipart/form-data', $data, $files); } - + public static function add_user_role($guild_id, $user_id, $role_id) { return static::send_api_request("/guilds/{$guild_id}/members/{$user_id}/roles/{$role_id}", 'PUT'); } - + public static function remove_user_role($guild_id, $user_id, $role_id) { return static::send_api_request("/guilds/{$guild_id}/members/{$user_id}/roles/{$role_id}", 'DELETE'); } - + public static function type($channel_id) { return static::send_api_request("/channels/{$channel_id}/typing", 'POST'); } @@ -111,7 +134,7 @@ public static function hasHitRateLimit($result) { return $result->status_code == 429; } } - + class DiscordBotException extends Exception { public function __construct($message, $code = 0, Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/botathon/index.php b/botathon/index.php index af017bb0..ca404f4d 100644 --- a/botathon/index.php +++ b/botathon/index.php @@ -95,14 +95,17 @@ .robot-kit-row { } + .robot-kit-entry > div { height: 100%; border: 1px dotted black; margin: 2px; } + .robot-kit-entry h4 { text-align: center; } + .robot-kit-list li { background-color: #e1e1e1; padding: 5px; @@ -591,68 +594,19 @@ class="rd-parallax-layer section-top-75 section-md-top-150 section-lg-top-260"> footer(false); ?> diff --git a/css/style.css b/css/style.css index 6d120f37..7cc47575 100644 --- a/css/style.css +++ b/css/style.css @@ -48054,4 +48054,12 @@ header nav.rd-navbar-static.rd-navbar-secondary .rd-navbar-nav > li.thin { display: inline-block; margin: 0 auto; } -/*# sourceMappingURL=style.css.map */ \ No newline at end of file + +/*Adds a line above the bios in about/our-team, about/our-dev-team, and about/our-alumni*/ +.bio-area { + border-top: 2px solid #ececec; + margin-top: 10px; + padding-top: 10px; +} + +/*# sourceMappingURL=style.css.map */ diff --git a/images/bio-pics/logan-brewer.jpg b/images/bio-pics/logan-brewer.jpg new file mode 100644 index 00000000..7c36c40c Binary files /dev/null and b/images/bio-pics/logan-brewer.jpg differ diff --git a/images/bio-pics/willow-houchin.jpg b/images/bio-pics/willow-houchin.jpg new file mode 100644 index 00000000..5fbf7e39 Binary files /dev/null and b/images/bio-pics/willow-houchin.jpg differ diff --git a/merch/product.php b/merch/product.php index 17bb7af2..e9494ca2 100644 --- a/merch/product.php +++ b/merch/product.php @@ -63,6 +63,11 @@ $back_file = $selected_variant->get_file_by_type(PrintfulVariantFilesTypes::BACK); head("Buy {$product->get_name()}", true); + $category_name = strtolower(preg_replace('@^.*\(([^()]+)\)$@i', '$1', $product->get_name())); + if($category_name !== 'gear' && $category_name[-1]!=='s'){ + $category_name .= 's'; + } + } else { head("Invalid Product", true); } @@ -98,8 +103,8 @@ function get_variant_variant($variant_name) { width: 100%; } .merch-section h6 { - border-bottom: 1px solid #a7a7a7; - margin-bottom: 5px; + border-bottom: 1px solid #a7a7a7; + margin-bottom: 5px; } .product-price { color: red; @@ -125,9 +130,9 @@ function get_variant_variant($variant_name) { } .variant-btn-container { display: block; - height: 50px; - width: 100px; - position: relative; + height: 50px; + width: 100px; + position: relative; } .variant-btn { border: 1px solid #d8d8d8; @@ -159,9 +164,9 @@ function get_variant_variant($variant_name) { @@ -320,7 +325,7 @@ class="btn variant-btn" //echo $button['btn']; $button = $payment_button->get_button(); if ($button->error === false) { - echo "button success"; + echo "button success"; echo $payment_button->get_button()->button; } else { // TODO: Alert diff --git a/sql/migrations/urw-64.sql b/sql/migrations/urw-64.sql index 30631c63..91239695 100644 --- a/sql/migrations/urw-64.sql +++ b/sql/migrations/urw-64.sql @@ -7,7 +7,4 @@ MODIFY name char(128) NOT NULL; ALTER TABLE ftpusers MODIFY passwd char(128) NOT NULL; - - - - +CREATE TABLE ftpinvites (id int primary key auto_increment, email varchar(255), registration_token varchar(16)); diff --git a/template/functions/mime2ext.php b/template/functions/mime2ext.php index 91310c73..17e04c24 100644 --- a/template/functions/mime2ext.php +++ b/template/functions/mime2ext.php @@ -1,12 +1,128 @@ array("image/png","image/x-png"), + "bmp"=>array("image/bmp","image/x-bmp","image/x-bitmap","image/x-xbitmap","image/x-win-bitmap","image/x-windows-bmp","image/ms-bmp","image/x-ms-bmp","application/bmp","application/x-bmp","application/x-win-bitmap"), + "gif"=>array("image/gif"), + "jpeg"=>array("image/jpeg","image/pjpeg"), + "jpg"=>array("image/jpg","image/pjpg"), + "xspf"=>array("application/xspf+xml"), + "vlc"=>array("application/videolan"), + "wmv"=>array("video/x-ms-wmv","video/x-ms-asf"), + "au"=>array("audio/x-au"), + "ac3"=>array("audio/ac3"), + "flac"=>array("audio/x-flac"), + "ogg"=>array("audio/ogg","video/ogg","application/ogg"), + "kmz"=>array("application/vnd.google-earth.kmz"), + "kml"=>array("application/vnd.google-earth.kml+xml"), + "rtx"=>array("text/richtext"), + "rtf"=>array("text/rtf"), + "jar"=>array("application/java-archive","application/x-java-application","application/x-jar"), + "zip"=>array("application/x-zip","application/zip","application/x-zip-compressed","application/s-compressed","multipart/x-zip"), + "7zip"=>array("application/x-compressed"), + "xml"=>array("application/xml","text/xml"), + "svg"=>array("image/svg+xml"), + "3g2"=>array("video/3gpp2"), + "3gp"=>array("video/3gp","video/3gpp"), + "mp4"=>array("video/mp4"), + "m4a"=>array("audio/x-m4a"), + "f4v"=>array("video/x-f4v"), + "flv"=>array("video/x-flv"), + "webm"=>array("video/webm"), + "aac"=>array("audio/x-acc"), + "m4u"=>array("application/vnd.mpegurl"), + "pdf"=>array("application/pdf","application/octet-stream"), + "pptx"=>array("application/vnd.openxmlformats-officedocument.presentationml.presentation"), + "ppt"=>array("application/powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-office","application/msword"), + "docx"=>array("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), + "xlsx"=>array("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"), + "xl"=>array("application/excel"), + "xls"=>array("application/msexcel","application/x-msexcel","application/x-ms-excel","application/x-excel","application/x-dos_ms_excel","application/xls","application/x-xls"), + "xsl"=>array("text/xsl"), + "mpeg"=>array("video/mpeg"), + "mov"=>array("video/quicktime"), + "avi"=>array("video/x-msvideo","video/msvideo","video/avi","application/x-troff-msvideo"), + "movie"=>array("video/x-sgi-movie"), + "log"=>array("text/x-log"), + "txt"=>array("text/plain"), + "css"=>array("text/css"), + "html"=>array("text/html"), + "wav"=>array("audio/x-wav","audio/wave","audio/wav"), + "xhtml"=>array("application/xhtml+xml"), + "tar"=>array("application/x-tar"), + "tgz"=>array("application/x-gzip-compressed"), + "psd"=>array("application/x-photoshop","image/vnd.adobe.photoshop"), + "exe"=>array("application/x-msdownload"), + "js"=>array("application/x-javascript"), + "mp3"=>array("audio/mpeg","audio/mpg","audio/mpeg3","audio/mp3"), + "rar"=>array("application/x-rar","application/rar","application/x-rar-compressed"), + "gzip"=>array("application/x-gzip"), + "hqx"=>array("application/mac-binhex40","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"), + "cpt"=>array("application/mac-compactpro"), + "bin"=>array("application/macbinary","application/mac-binary","application/x-binary","application/x-macbinary"), + "oda"=>array("application/oda"), + "ai"=>array("application/postscript"), + "smil"=>array("application/smil"), + "mif"=>array("application/vnd.mif"), + "wbxml"=>array("application/wbxml"), + "wmlc"=>array("application/wmlc"), + "dcr"=>array("application/x-director"), + "dvi"=>array("application/x-dvi"), + "gtar"=>array("application/x-gtar"), + "php"=>array("application/x-httpd-php","application/php","application/x-php","text/php","text/x-php","application/x-httpd-php-source"), + "swf"=>array("application/x-shockwave-flash"), + "sit"=>array("application/x-stuffit"), + "z"=>array("application/x-compress"), + "mid"=>array("audio/midi"), + "aif"=>array("audio/x-aiff","audio/aiff"), + "ram"=>array("audio/x-pn-realaudio"), + "rpm"=>array("audio/x-pn-realaudio-plugin"), + "ra"=>array("audio/x-realaudio"), + "rv"=>array("video/vnd.rn-realvideo"), + "jp2"=>array("image/jp2","video/mj2","image/jpx","image/jpm"), + "tiff"=>array("image/tiff"), + "eml"=>array("message/rfc822"), + "pem"=>array("application/x-x509-user-cert","application/x-pem-file"), + "p10"=>array("application/x-pkcs10","application/pkcs10"), + "p12"=>array("application/x-pkcs12"), + "p7a"=>array("application/x-pkcs7-signature"), + "p7c"=>array("application/pkcs7-mime","application/x-pkcs7-mime"), + "p7r"=>array("application/x-pkcs7-certreqresp"), + "p7s"=>array("application/pkcs7-signature"), + "crt"=>array("application/x-x509-ca-cert","application/pkix-cert"), + "crl"=>array("application/pkix-crl","application/pkcs-crl"), + "pgp"=>array("application/pgp"), + "gpg"=>array("application/gpg-keys"), + "rsa"=>array("application/x-pkcs7"), + "ics"=>array("text/calendar"), + "zsh"=>array("text/x-scriptzsh"), + "cdr"=>array("application/cdr","application/coreldraw","application/x-cdr","application/x-coreldraw","image/cdr","image/x-cdr","zz-application/zz-winassoc-cdr"), + "wma"=>array("audio/x-ms-wma"), + "vcf"=>array("text/x-vcard"), + "srt"=>array("text/srt"), + "vtt"=>array("text/vtt"), + "ico"=>array("image/x-icon","image/x-ico","image/vnd.microsoft.icon"), + "csv"=>array("text/x-comma-separated-values","text/comma-separated-values","application/vnd.msexcel"), + "json"=>array("application/json","text/json") +); function mime2ext($mime){ - $all_mimes = '{"png":["image\/png","image\/x-png"],"bmp":["image\/bmp","image\/x-bmp","image\/x-bitmap","image\/x-xbitmap","image\/x-win-bitmap","image\/x-windows-bmp","image\/ms-bmp","image\/x-ms-bmp","application\/bmp","application\/x-bmp","application\/x-win-bitmap"],"gif":["image\/gif"],"jpeg":["image\/jpeg","image\/pjpeg"],"xspf":["application\/xspf+xml"],"vlc":["application\/videolan"],"wmv":["video\/x-ms-wmv","video\/x-ms-asf"],"au":["audio\/x-au"],"ac3":["audio\/ac3"],"flac":["audio\/x-flac"],"ogg":["audio\/ogg","video\/ogg","application\/ogg"],"kmz":["application\/vnd.google-earth.kmz"],"kml":["application\/vnd.google-earth.kml+xml"],"rtx":["text\/richtext"],"rtf":["text\/rtf"],"jar":["application\/java-archive","application\/x-java-application","application\/x-jar"],"zip":["application\/x-zip","application\/zip","application\/x-zip-compressed","application\/s-compressed","multipart\/x-zip"],"7zip":["application\/x-compressed"],"xml":["application\/xml","text\/xml"],"svg":["image\/svg+xml"],"3g2":["video\/3gpp2"],"3gp":["video\/3gp","video\/3gpp"],"mp4":["video\/mp4"],"m4a":["audio\/x-m4a"],"f4v":["video\/x-f4v"],"flv":["video\/x-flv"],"webm":["video\/webm"],"aac":["audio\/x-acc"],"m4u":["application\/vnd.mpegurl"],"pdf":["application\/pdf","application\/octet-stream"],"pptx":["application\/vnd.openxmlformats-officedocument.presentationml.presentation"],"ppt":["application\/powerpoint","application\/vnd.ms-powerpoint","application\/vnd.ms-office","application\/msword"],"docx":["application\/vnd.openxmlformats-officedocument.wordprocessingml.document"],"xlsx":["application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application\/vnd.ms-excel"],"xl":["application\/excel"],"xls":["application\/msexcel","application\/x-msexcel","application\/x-ms-excel","application\/x-excel","application\/x-dos_ms_excel","application\/xls","application\/x-xls"],"xsl":["text\/xsl"],"mpeg":["video\/mpeg"],"mov":["video\/quicktime"],"avi":["video\/x-msvideo","video\/msvideo","video\/avi","application\/x-troff-msvideo"],"movie":["video\/x-sgi-movie"],"log":["text\/x-log"],"txt":["text\/plain"],"css":["text\/css"],"html":["text\/html"],"wav":["audio\/x-wav","audio\/wave","audio\/wav"],"xhtml":["application\/xhtml+xml"],"tar":["application\/x-tar"],"tgz":["application\/x-gzip-compressed"],"psd":["application\/x-photoshop","image\/vnd.adobe.photoshop"],"exe":["application\/x-msdownload"],"js":["application\/x-javascript"],"mp3":["audio\/mpeg","audio\/mpg","audio\/mpeg3","audio\/mp3"],"rar":["application\/x-rar","application\/rar","application\/x-rar-compressed"],"gzip":["application\/x-gzip"],"hqx":["application\/mac-binhex40","application\/mac-binhex","application\/x-binhex40","application\/x-mac-binhex40"],"cpt":["application\/mac-compactpro"],"bin":["application\/macbinary","application\/mac-binary","application\/x-binary","application\/x-macbinary"],"oda":["application\/oda"],"ai":["application\/postscript"],"smil":["application\/smil"],"mif":["application\/vnd.mif"],"wbxml":["application\/wbxml"],"wmlc":["application\/wmlc"],"dcr":["application\/x-director"],"dvi":["application\/x-dvi"],"gtar":["application\/x-gtar"],"php":["application\/x-httpd-php","application\/php","application\/x-php","text\/php","text\/x-php","application\/x-httpd-php-source"],"swf":["application\/x-shockwave-flash"],"sit":["application\/x-stuffit"],"z":["application\/x-compress"],"mid":["audio\/midi"],"aif":["audio\/x-aiff","audio\/aiff"],"ram":["audio\/x-pn-realaudio"],"rpm":["audio\/x-pn-realaudio-plugin"],"ra":["audio\/x-realaudio"],"rv":["video\/vnd.rn-realvideo"],"jp2":["image\/jp2","video\/mj2","image\/jpx","image\/jpm"],"tiff":["image\/tiff"],"eml":["message\/rfc822"],"pem":["application\/x-x509-user-cert","application\/x-pem-file"],"p10":["application\/x-pkcs10","application\/pkcs10"],"p12":["application\/x-pkcs12"],"p7a":["application\/x-pkcs7-signature"],"p7c":["application\/pkcs7-mime","application\/x-pkcs7-mime"],"p7r":["application\/x-pkcs7-certreqresp"],"p7s":["application\/pkcs7-signature"],"crt":["application\/x-x509-ca-cert","application\/pkix-cert"],"crl":["application\/pkix-crl","application\/pkcs-crl"],"pgp":["application\/pgp"],"gpg":["application\/gpg-keys"],"rsa":["application\/x-pkcs7"],"ics":["text\/calendar"],"zsh":["text\/x-scriptzsh"],"cdr":["application\/cdr","application\/coreldraw","application\/x-cdr","application\/x-coreldraw","image\/cdr","image\/x-cdr","zz-application\/zz-winassoc-cdr"],"wma":["audio\/x-ms-wma"],"vcf":["text\/x-vcard"],"srt":["text\/srt"],"vtt":["text\/vtt"],"ico":["image\/x-icon","image\/x-ico","image\/vnd.microsoft.icon"],"csv":["text\/x-comma-separated-values","text\/comma-separated-values","application\/vnd.msexcel"],"json":["application\/json","text\/json"]}'; - $all_mimes = json_decode($all_mimes,true); - foreach ($all_mimes as $key => $value) { + foreach (MIMES as $key => $value) { if(array_search($mime,$value) !== false) { return $key; } } return false; } + +function ext2mime($ext) +{ + global $mimes; + foreach(MIMES as $key=>$value) + { + if($key===$ext) + { + return $value[0]; + } + } + return false; +} ?> \ No newline at end of file