<?php $DEV = strpos($_SERVER['REQUEST_URI'], '~') != 0; set_include_path(get_include_path() . PATH_SEPARATOR . ($DEV ? '/home/mgorman/public_html/_resources/php' : '/var/www/php.iwu.edu/htdocs/_resources/php')); require_once '_class.IWU_DB.php'; require_once '_class.IWU_DataRow.php'; require_once '_class.IWU_Auth.php'; require_once '_class.IWU_Template.php'; require_once '_class.IWU_Paginate.php'; require_once '_db.php'; IWU_Auth::forceAuthentication(); if (userHasRole(IWU_Auth::getUser(), 'admin') && isset($_GET['impersonate'])) { $user = $_GET['impersonate']; } else { $user = IWU_Auth::getUser(); } $roles = getRoles($user); class Channel { protected $slug = ''; protected $heading = ''; protected $styles = array(); protected $classes = array('highlight'); protected $context = ''; protected $contexts = array(); protected $contentHTML = ''; public function __construct($slug, $heading, $content = '', $max_height = NULL) { $this->slug = $slug; $this->heading = $heading; $this->contentHTML = $content;
$channels['jobs']->addClass('blocks'); //$channels['weekly'] = new Channel('weekly', 'Campus Weekly'); //$channels['weekly']->addContext('default', '_channel.weekly.php'); $channels['athletics'] = new Channel('athletics', 'Titan Athletics'); $channels['athletics']->addContext('default', '_channel.athletics.php'); $channels['dosa_forms'] = new Channel('dosa_forms', 'Online Forms'); $channels['dosa_forms']->addContext('default', '_channel.dosa_forms.php'); $channels['service_requests'] = new Channel('service_requests', 'Service Requests'); $channels['service_requests']->addContext('default', '_channel.service_requests.php'); $channels['physical_plant'] = new Channel('physical_plant', 'Physical Plant'); $channels['physical_plant']->addContext('default', '_channel.physical_plant.php'); $channels['helpdesk'] = new Channel('helpdesk', 'ITS Helpdesk'); $channels['helpdesk']->addContext('default', '_channel.helpdesk.php'); $channels['media'] = new Channel('media', 'Media & Publications'); $channels['media']->addContext('default', '_channel.media.php'); $channels['student_life'] = new Channel('student_life', 'Student Life'); $channels['student_life']->addContext('default', '_channel.student_life.php'); $channels['departments'] = new Channel('departments', 'Departments & Offices'); $channels['departments']->addContext('default', '_channel.departments.php'); foreach ($channels as $name => $channel) { if ($db->getChannelStatus($name, IWU_Auth::getUser()) === 'hidden') { $channel->addClass('hiddenChannel'); } echo $channel; } ?> </div> <div class="clearfix" style="clear: both;"></div> <?php $page->contentPrimary = ob_get_clean(); echo $page;
public function getRolesForCurrentUser() { $roles = array(); $roles[] = 'Everyone'; if (IWU_Auth::isStudent()) { $roles[] = 'All Students'; if (IWU_Auth::isMale()) { $roles[] = 'Male Students'; } if (IWU_Auth::isFemale()) { $roles[] = 'Female Students'; } $cohort = IWU_Auth::getCohort(); if ($cohort === 'Senior') { $roles[] = 'Seniors'; } elseif ($cohort === 'Junior') { $roles[] = 'Juniors'; } elseif ($cohort === 'Sophomore') { $roles[] = 'Sophomores'; } elseif ($cohort === 'First-Year') { $roles[] = 'First-Year Students'; } elseif ($cohort === 'Incoming First-Year') { $roles[] = 'First-Year Students'; // TODO: should this be its own target audience? } } if (IWU_Auth::isStaff() || IWU_Auth::isFaculty()) { $roles[] = 'All Faculty/Staff'; if (IWU_Auth::isExemptStaff()) { $roles[] = 'Staff - exempt'; } if (IWU_Auth::isNonExemptStaff()) { $roles[] = 'Staff - non-exempt'; } if (IWU_Auth::isFullTimeFaculty()) { $roles[] = 'Faculty - full-time'; } if (IWU_Auth::isPartTimeFaculty()) { $roles[] = 'Faculty - part-time'; } } if (IWU_Auth::isRetired()) { $roles[] = 'Retirees'; } if (IWU_Auth::isAffiliate()) { $roles[] = 'Affiliates'; } if (IWU_Auth::isOrg()) { $roles[] = 'Organizations'; } if (IWU_Auth::isAlum()) { $roles[] = 'Alumni'; } echo '<!-- roles:' . "\n"; var_dump($roles); echo '-->'; return $roles; }
<a href="https://php.iwu.edu/accounts/">Account Requests</a> <br /> (Email, OmniUpdate, Blogs, etc.) <br /> <a href="https://print.iwu.edu/DSF/">Digital Storefront</a> <br /> (Prints from your original; supplies) <br /> <a href="https://www.iwu.edu/publications/joborder.html">Printing & Design Order Form</a> <br /> (New & reprints; envelope printing) <br /> <a href="http://answers.iwu.edu/3900/ask">ITS Help Desk</a> <br /> (Computer, Network & Phone) <br /> <a href="https://www.iwu.edu/physical-plant/">Physical Plant</a> <br /> (SchoolDude Work Order Requests) <br /> <a href="https://webviewer.collegenet.com/iwu/">R25 Room Scheduler</a> <br /> <a href="https://php.iwu.edu/classrooms/">Classroom Database</a> <br /> <a href="https://www.myschoolbuilding.com/myschoolbuilding/mytriprequestiframe.asp?acctnum=589502976">Trip Direct</a> <br /> (Vehicle Request) <?php if (IWU_Auth::isFaculty() || IWU_Auth::isStaff()) { ?> <br /><a href="http://luna.iwu.edu:9110/wfpprd">Banner Workflow</a><br />(authorized users only) <?php }
$start_time = date('Ymd\\THis\\Z', strtotime('2016-12-31 00:00:00')); $end_time = date('Ymd\\THis\\Z', strtotime('2016-12-31 23:59:59')); $now = date('Ymd\\THis\\Z'); $UID = "announcement-{$AnnouncementID}@php.iwu.edu"; $email_message = <<<EOT BEGIN:VCALENDAR VERSION:2.0 PRODID:PHP METHOD:REQUEST BEGIN:VEVENT DTSTART:{$start_time} DTEND:{$end_time} DESCRIPTION:{$announcement_data['Body']} SUMMARY:{$announcement_data['Headline']} ORGANIZER;CN=Tommy Titan:MAILTO:ttitan@iwu.edu LOCATION:{$announcement_data['Where']} UID:{$UID} SEQUENCE:0 DTSTAMP:{$now} END:VEVENT END:VCALENDAR EOT; mail($DEV ? '*****@*****.**' : '*****@*****.**', 'New Announcement for Calendar', $email_message, $email_headers); } } if (isset($_POST['Action']) && $_POST['Action'] === 'Approve' && $announcements_db->isApprover(IWU_Auth::getUser())) { $announcements_db->approveAnnouncement($_POST['AnnouncementID']); header('Location: _channel.announcements.approve.php'); die; } header('Location: _channel.announcements.php');
} </style> <form onsubmit="submitForm($(this), 'post'); return false;"> <div class="post <?php echo $lost_type; ?> "> <h1 class="ItemName">Short Description</h1> <h2><?php echo IWU_Auth::getAttribute('displayName'); ?> <br /><a href="mailto:<?php echo IWU_Auth::getUser(); ?> @iwu.edu"><?php echo IWU_Auth::getUser(); ?> @iwu.edu</a></h2> <h3><span class="type"><?php echo $lost_type; ?> </span> <span class="Date_Month"><?php echo date('F'); ?> </span> <span class="Date_Day"><?php echo date('j'); ?> </span></h3> <p class="description"><em>Description:</em> <span class="Description"></span></p> <p class="location"><em>Where was it?</em> <span class="Location"></span></p> <div>
<?php require_once '_class.IWU_Auth.php'; IWU_Auth::logout();
?> '}); return false;" href=""> <h3><?php echo $announcement['Headline']; ?> </h3> </a> </article> <?php } if ($announcements_pagination->pageCount() > 1) { ?> <div class="pagination"> <?php echo $announcements_pagination->getLinks(); ?> </div> <?php } ?> <div class="bottom"> <a onclick="changeChannel($(this).closest('section'), 'create'); return false;" href="">Submit an Announcement</a> <?php if ($announcements_db->isApprover(IWU_Auth::getUser())) { ?> <br /><a onclick="changeChannel($(this).closest('section'), 'approve'); return false;" href="">Approve Announcements</a> <?php } ?> </div>
<?php require_once '_db.php'; require_once '_db.classified.php'; require_once '_functions.php'; $classified_db = new ClassifiedDB(); $Headline = $_POST['Headline']; $Description = $_POST['Description']; $Email = IWU_Auth::getUser() . '@iwu.edu'; $Name = IWU_Auth::getAttribute('displayName'); $classified_db->addAd(array('Headline' => $Headline, 'Description' => $Description, 'Email' => $Email, 'Name' => $Name)); header('Location: _channel.classified.php');
<p><a href="https://php.iwu.edu/concern/">Student Concern Form</a></p> <p>Report your concern about a student. This report will be reviewed by the Dean of Students office and/or the Director of Academic Advising.</p> <p><a href="https://docs.google.com/a/iwu.edu/spreadsheet/viewform?usp=drive_web&formkey=dFJWd1ZQYXh1ajNjbjhpdGtLZ3JSb3c6MQ#gid=0">Bias Incident Report</a></p> <p>A Bias Incident is any activity against a person or property that is motivated by the offender's bias against race, color, ethnicity, national origin, sex, gender identity or expression, sexual orientation, disability, age or religion.</p> <p><a href="https://iwu.co1.qualtrics.com/jfe5/preview/SV_cU6scuJmRRFIZjn">Confidential or Anonymous Report of Sexual or Gender-based Misconduct</a></p> <p>This form may be used to submit complaints, reports or concerns about sexual or gender-based misconduct, including sexual harassment, sexual assault, stalking, and dating/domestic violence.</p> <?php if (IWU_Auth::isStudent()) { ?> <p><a href="https://php.iwu.edu/clearinghouse/">Verify Enrollment</a></p> <p>Allows you to provide enrollment documentation to insurance companies, loan agencies, and other organizations.</p> <p><a href="https://docs.google.com/a/iwu.edu/forms/d/1ZsLU-RXVmEf33geKKZr9NAO3B17AquyvNYNbc1vUjb4/viewform">Mental Health Emergency Contact</a></p> <p>You have the opportunity designate a mental health emergency contact person. This person, if you so designate, must be at least 18 years of age.</p> <p><a href="https://www.iwu.edu/residential-life/info/ea.html">Early Arrival Housing Request Form</a></p> <p>Request to return to campus before officially scheduled move-in dates.</p> <?php }