* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Required configuration files require_once 'abre_verification.php'; ?> <!--Display top navigation--> <header class='mdl-layout__header mdl-color-text--white' style='background-color: <?php echo sitesettings("sitecolor"); ?> '> <div class='mdl-layout__header-row'> <?php if (!isset($_GET["dash"])) { echo "<span class='mdl-layout-title'><div id='titletext' class='truncate'></div></span>"; } else { echo "<span class='mdl-layout-title' style='margin-left:-40px;'><div id='titletext' class='truncate'></div></span>"; } ?> <div class='mdl-layout-spacer'></div> <?php if (!isset($_GET["dash"])) { echo "<a class='mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon modal-viewapps' href='#viewapps'><i class='material-icons'>apps</i></a>"; }
/* * Copyright 2015 Hamilton City School District * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Required configuration files require_once 'abre_verification.php'; require_once 'abre_functions.php'; //Send the feedback email $textarea = $_POST["textarea"]; if ($textarea != "") { $to = sitesettings("siteadminemail"); $subject = "Abre Feedback"; $message = "From: " . $_SESSION['useremail'] . "\r\n\r\n" . $_SESSION['displayName'] . "\r\n\r\n{$textarea}"; $headers = "From: " . $_SESSION['useremail']; mail($to, $subject, $message, $headers); echo "Your feedback has been sent!"; } else { echo "Whoops, you didn't enter any feedback."; }
}, <?php } ?> 'discussion/?:name': function(discussionid){ $(".lean-overlay").hide(); $(".modal-content #streamTitle").text(""); $(".modal-content #streamUrl").val(""); $(".modal-content #streamTitleValue").val(""); //Load Streams $( "#content_holder" ).hide(); $( "#loader" ).show(); $( "#titletext" ).text(""); document.title = '<?php echo sitesettings("sitetitle"); ?> - Stream'; $( "#content_holder" ).load( "modules/stream/stream.php", function() { init_page(loader); $('#addstreamcomment').openModal({ in_duration: 0, out_duration: 0, complete: function() { routie(''); } }); $("#commentloader").show(); $("#streamComments").empty(); var Stream_Title = $(this).data('title'); $(".modal-content #streamTitle").text(Stream_Title);
function vendorLinkGet($call) { $VendorLinkURL = sitesettings("sitevendorlinkurl"); $vendorIdentifier = sitesettings("sitevendorlinkidentifier"); $vendorKey = sitesettings("sitevendorlinkkey"); $userID = ""; $requestDate = gmdate('D, d M Y H:i:s') . ' GMT'; $userName = $vendorIdentifier . "|" . $userID . "|" . $requestDate; $password = $vendorIdentifier . $userID . $requestDate . $vendorKey; $hmacData = $vendorIdentifier . $userID . $requestDate . $vendorKey; $hmacSignature = base64_encode(pack("H*", sha1($hmacData))); $vlauthheader = $vendorIdentifier . "||" . $hmacSignature; $url = $call; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('VL-Authorization: ' . $vlauthheader, 'Date: ' . $requestDate)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); $json = json_decode($result, true); return $json; }
<?php /* * Copyright 2015 Hamilton City School District * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Required configuration files require dirname(__FILE__) . '/../../configuration.php'; require_once dirname(__FILE__) . '/../../core/abre_verification.php'; require_once dirname(__FILE__) . '/../../core/abre_functions.php'; require_once 'permissions.php'; ?> <div class="fixed-action-btn buttonpin"> <?php echo "<a class='btn-floating btn-large waves-effect waves-light' style='background-color: " . sitesettings("sitecolor") . "' id='newentry' data-position='left' href='{$portal_root}/#directory/new'><i class='large material-icons'>add</i></a>"; echo "<div class='mdl-tooltip mdl-tooltip--left' for='newentry'>New</div>"; ?> </div>
$licenseexpirationdate = ${'licenseexpirationdate' . $x}; $licenseexpirationdateid = "licenseexpirationdateid" . $x; echo "<div class='input-field col l3 s12'>"; echo "<input placeholder='Enter Date' type='date' value='{$licenseexpirationdate}' id='{$licenseexpirationdateid}' name='{$licenseexpirationdateid}' class='datepicker'>"; echo "<label class='active' for='{$licenseexpirationdateid}'>Expiration Date</label>"; echo "</div>"; $licenseterm = ${'licenseterm' . $x}; $licensetermid = "licensetermid" . $x; echo "<div class='input-field col l2 s12'>"; echo "<input placeholder='Enter Term' value='{$licenseterm}' id='{$licensetermid}' name='{$licensetermid}' type='text'>"; echo "<label class='active' for='{$licensetermid}'>Term</label>"; echo "</div>"; echo "</div>"; } echo "<div class='col s12'>"; echo "<button class='mdl-button mdl-js-button mdl-button--raised mdl-button--colored' style='background-color: " . sitesettings("sitecolor") . "' id='addlicensebutton'>Add</button>"; echo "</div>"; echo "</div>"; ?> <script> $('.toAdd').hide(); <?php echo "var fillcounter = {$fillcount};"; ?> var count = 0; $('#addlicensebutton').on('click',function(event){ event.preventDefault(); $('.toAdd:eq('+count+')').show(); fillcounter++;
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Add google anaylitics and routing if configuration file exists if (file_exists('configuration.php')) { ?> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); <?php echo "ga('create', '" . sitesettings('siteanalytics') . "', 'auto');"; ?> ga('send', 'pageview'); </script> <?php require_once 'abre_routing.php'; ?> <?php } ?> </body> </html>
* the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Required configuration files require dirname(__FILE__) . '/../../configuration.php'; require dirname(__FILE__) . '/../../core/abre_dbconnect.php'; require dirname(__FILE__) . '/../../core/abre_functions.php'; $VendorLinkURL = sitesettings("sitevendorlinkurl"); $json = vendorLinkGet("{$VendorLinkURL}/GBService/HA/teacher"); //Retrieve employee information from database foreach ($json as $key => $result) { foreach ($result as $key => $result) { $employeeTeacherID = encrypt($result[TeacherID]); $staffrefid = $result[ExternalRefId]; $json2 = vendorLinkGet("{$VendorLinkURL}/SisService/Staff?staffPersonalRefId={$staffrefid}"); foreach ($json2 as $key => $result) { foreach ($result as $key => $result) { $employeeemail = $result[EmailList][0][Value]; $employeeemailencrypted = encrypt($employeeemail, ""); $employeeRefID = encrypt($result[RefId]); $employeeStateID = encrypt($result[StateProvinceId]); //Add information to employee database mysqli_query($db, "UPDATE directory set RefID='{$employeeRefID}', StateID='{$employeeStateID}', TeacherID='{$employeeTeacherID}' where email='{$employeeemailencrypted}'");
?> <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'> <?php //Site title echo "<title>" . sitesettings("sitetitle") . "</title>"; //Site favicon echo "<link rel='icon' type='image/png' href='" . sitesettings("sitelogo") . "'>"; //Chrome icon echo "<meta name='mobile-web-app-capable' content='yes'>"; echo "<link rel='icon' sizes='192x192' href='" . sitesettings("sitelogo") . "'>"; //iOS icon echo "<meta name='apple-mobile-web-app-title' content='" . sitesettings("sitetitle") . "'>"; echo "<link rel='apple-touch-icon' href='" . sitesettings("sitelogo") . "'>"; //Windows icon echo "<meta name='msapplication-TileImage' content='" . sitesettings("sitelogo") . "'>"; echo "<meta name='msapplication-TileColor' content='" . sitesettings("sitecolor") . "'>"; ?> <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900,100' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'> <link rel='stylesheet' href='core/css/materialize.0.97.5.min.css'> <link rel='stylesheet' href='core/css/material.1.1.3.min.css'> <link rel='stylesheet' href='core/css/abre.1.1.9.css'> <link rel='stylesheet' href='core/css/animate.min.css'> <link rel='stylesheet' href='core/css/timepicker.min.css'> <link rel='stylesheet' href='modules/books/css/main.css'> <link rel="stylesheet" href='modules/profile/css/calendar.css'> <script src='core/js/jquery-2.1.4.min.js'></script> <script src='core/js/jquery-ui.min.js'></script> <script src='core/js/materialize.0.97.5.min.js'></script>
<!-- Display the Login --> <div class="mdl-layout mdl-js-layout login-card"> <div class="login_wrapper"> <div class="login-card-square mdl-card animated fadeIn"> <div class="mdl-card__title mdl-card--expand" style='width:200px; height:200px; background: url(<?php echo sitesettings('sitelogo'); ?> ) center center no-repeat; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; margin-left:20px; margin-bottom:5px;'></div> <?php echo "<div class='mdl-card-text mdl-color-text--grey-600'>" . sitesettings('sitelogintext') . "</div>"; ?> <div class="mdl-card__actions"> <?php echo "<a class='waves-effect waves-light btn-large mdl-color-text--white' href='{$authUrl}' style='margin: 0 auto; width:100%; text-transform:none; background-color:" . sitesettings("sitecolor") . "'>Sign in with Google</a>"; ?> </div> </div> </div> </div> <script> //Responsive login view function loginWidthCheck() { if ($(window).width() < 600) { $( ".login-card-square" ).removeClass( "mdl-shadow--2dp" ); $( ".login-card" ).addClass( "mdl-color--white" );
echo "<h6>Primary Logo</h6>"; echo "<img class='sitelogobutton pointer' src='{$sitelogoexisting}' width='125px' height='125px' style='margin-bottom:33px;'>"; echo "<input type='hidden' name='sitelogoexisting' value='{$sitelogoexisting}'>"; echo "<input type='file' name='sitelogo' id='sitelogo' style='display:none;'>"; } echo "</div>"; echo "<div class='input-field col s12'>"; echo "<input placeholder='Enter a Site Color' value='" . sitesettings('sitecolor') . "' id='sitecolor' name='sitecolor' type='text'>"; echo "<label class='active' for='sitecolor'>Site Color</label>"; echo "</div>"; echo "</div>"; echo "</div>"; //Save Button echo "<div class='row'>"; echo "<div class='col s12'><div class='col s12'>"; echo "<button type='submit' class='modal-action waves-effect btn-flat white-text' style='background-color: " . sitesettings("sitecolor") . "'>Apply Changes</button>"; echo "</div></div>"; echo "</div>"; echo "<div class='row'>"; echo "<div class='col s12'><div class='col s12'>"; //Retrieve latest version from public GitHub repo $opts = ['http' => ['method' => 'GET', 'header' => ['User-Agent: PHP']]]; $context = stream_context_create($opts); $content = file_get_contents("https://api.github.com/repos/abreio/Abre/releases/latest", false, $context); $json = json_decode($content, true); $currentversion = $json['name']; if ($abre_version < $currentversion) { $currentlink = "https://github.com/abreio/Abre/archive/" . $currentversion . ".zip"; echo "<a id='updateabre' href='#' data-version='{$currentlink}' style='color:#999'>You have version {$abre_version} installed. Update to {$currentversion}.</a>"; } else { echo "<p style='color:#999'>Release: {$abre_version}</p>";
$query = "SELECT * FROM streams_comments where url='{$link}' and liked='1' and user='******'useremail'] . "'"; $dbreturn = databasequery($query); $num_rows_like_current_user = count($dbreturn); if ($num_rows_like == 0) { echo "<a class='material-icons mdl-color-text--grey-600 likeicon' style='margin-right:30px;' data-title='{$titleencoded}' data-category='{$feedtitle}' data-excerpt='{$excerpt}' data-url='{$linkbase}' data-image='{$imagebase}' title='Like' href='#'>favorite</a>"; } else { if ($num_rows_like_current_user == 0) { echo "<a class='material-icons mdl-color-text--grey-600 likeicon' data-title='{$titleencoded}' data-category='{$feedtitle}' data-excerpt='{$excerpt}' data-url='{$linkbase}' data-image='{$imagebase}' href='#'>favorite</a> <span class='mdl-color-text--grey-600' style='font-size:12px; font-weight:600; width:30px; padding-left:5px;'>{$num_rows_like}</span>"; } else { echo "<a class='material-icons mdl-color-text--red likeicon' data-title='{$titleencoded}' data-category='{$feedtitle}' data-excerpt='{$excerpt}' data-url='{$linkbase}' data-image='{$imagebase}' href='#'>favorite</a> <span class='mdl-color-text--red' style='font-size:12px; font-weight:600; width:30px; padding-left:5px;'>{$num_rows_like}</span>"; } } if ($num_rows_comment == 0) { echo "<a class='material-icons mdl-color-text--grey-600 modal-addstreamcomment commenticon' data-title='{$titleencoded}' data-category='{$feedtitle}' data-excerpt='{$excerpt}' data-url='{$linkbase}' title='Add a comment' href='#addstreamcomment' style='padding-right:30px;'>insert_comment</a>"; } else { echo "<a class='material-icons modal-addstreamcomment commenticon' style='color: " . sitesettings("sitecolor") . "' data-title='{$titleencoded}' data-category='{$feedtitle}' data-excerpt='{$excerpt}' data-url='{$linkbase}' title='Add a comment' href='#addstreamcomment'>insert_comment</a> <span style='font-size:12px; font-weight:600; width:30px; padding-left:5px; color: " . sitesettings("sitecolor") . "'>{$num_rows_comment}</span>"; } } echo "</div>"; //Get Last Comment $querycomment = "SELECT * FROM streams_comments where url='{$link}' and comment!='' order by ID DESC LIMIT 1"; $dbreturncomment = databasequery($querycomment); $dbreturncomment_count = count($dbreturncomment); foreach ($dbreturncomment as $value) { $useremail = htmlspecialchars($value['user'], ENT_QUOTES); $comment = htmlspecialchars($value['comment'], ENT_QUOTES); //Look up name given email from directory $User2 = encrypt($useremail, ""); $picture = ""; $sql = "SELECT firstname, lastname, picture FROM directory where email='{$User2}'"; $dbreturn = databasequery($sql);
$query = "SELECT * FROM streams_comments where url='{$link}' and comment!=''"; $dbreturn = databasequery($query); $num_rows_comment = count($dbreturn); //Like count $query2 = "SELECT * FROM streams_comments where url='{$link}' and comment='' and liked='1'"; $dbreturn2 = databasequery($query2); $num_rows_like = count($dbreturn2); echo "<div class='likes_{$counter}'>"; $imagepath = $portal_root . "/" . $image; echo "<div class='col l3 m4 s6 nopaddingmarginsmall' style='margin-bottom:20px;'>"; echo "<div class='mdl-card mdl-card__media mdl-shadow--2dp waves-effect waves-light' style='background-image: url({$imagepath}); background-color:#999; width:100%; height:100%;'>"; echo "<div class='mdl-color-text--white center-align likedpost' data='{$link}' style='position:absolute; bottom:0; top: 0; left: 0; right: 0; padding:20px; background-color: rgba(0, 0, 0, 0.7);'>"; echo "<span style='font-size:16px; line-height:22px;'>{$title}</span>"; echo "</div>"; echo "<a class='material-icons mdl-color-text--red likeicon' style='position:absolute; bottom:10px; right:100px;' data-title='{$titleencoded}' data-url='{$linkbase}' data-image='{$imagebase}' data-page='likes' data-resultcounter='likes_{$counter}' href='#'>favorite</a> <span class='mdl-color-text--white truncate' style='position:absolute; bottom:12px; right:10px; font-size:12px; font-weight:600; width:90px; padding-left:5px; text-align: left;'>{$num_rows_like}</span>"; echo "<a class='material-icons modal-addstreamcomment commenticon' style='position:absolute; bottom:10px; right:40px; color: " . sitesettings("sitecolor") . "' data-title='{$titleencoded}' data-url='{$linkbase}' title='Add a comment' href='#addstreamcomment'>insert_comment</a> <span class='mdl-color-text--white' style='position:absolute; bottom:12px; right:10px; font-size:12px; font-weight:600; width:30px; padding-left:5px; text-align: left;'>{$num_rows_comment}</span>"; echo "</div>"; echo "</div>"; echo "</div>"; } if ($counter == 0) { echo "<div class='row center-align'><div class='col s12'><h6>No Likes yet</h6></div><div class='col s12'>Click the like button on a stream card to save the post to this page.</div></div>"; } echo "</div></div>"; ?> <script> //Make the Likes clickable $( ".likedpost" ).click(function() {
* You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ //Required configuration files require dirname(__FILE__) . '/../../configuration.php'; require_once dirname(__FILE__) . '/../../core/abre_verification.php'; require_once 'permissions.php'; if ($pageaccess == 1) { echo "<div class='row'><div class='col s12'>"; if ($superadmin == 1) { echo "<form action='modules/directory/csvimportfile.php' method='post' enctype='multipart/form-data' name='form-upload' id='form-upload'>"; echo "<input name='csv_data' type='file' id='csv_data' />"; echo "<br><br><input type='submit' class='mdl-button mdl-js-button mdl-button--raised mdl-button--colored' style='background-color: " . sitesettings("sitecolor") . "' name='Submit' value='Import' />"; echo "</form>"; } echo "<br><a href='{$portal_root}/modules/directory/csvexportfile.php' class='mdl-button mdl-js-button mdl-button--raised mdl-button--colored' style='background-color: " . sitesettings("sitecolor") . "'>Export</a>"; echo "</div><div>"; ?> <script> //Process the Form $(function() { var form = $('#form-upload'); var formMessages = $('#form-messages'); $(form).submit(function(event) { event.preventDefault(); var notification = document.querySelector('.mdl-js-snackbar'); var data = { message: 'Uploading...' };