* 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
require_once "../../../config.php";
require "../user_library.php";
require "management_library.php";
if (is_user_admin()) {
    if (!isset($mysqli)) {
        $mysqli = new mysqli($xerte_toolkits_site->database_host, $xerte_toolkits_site->database_username, $xerte_toolkits_site->database_password, $xerte_toolkits_site->database_name);
        if ($mysqli->error) {
            try {
                throw new Exception("0MySQL error {$mysqli->error} <br> Query:<br> {$query}", $mysqli->errno);
            } catch (Exception $e) {
                echo "Error No: " . $e->getCode() . " - " . $e->getMessage() . "<br />";
                echo nl2br($e->getTraceAsString());
            }
        }
    }
    if (!isset($lti)) {
        require_once '../../../LTI/ims-lti/UoN_LTI.php';
        $lti = new UoN_LTI($mysqli);
    }
    $lti->delete_lti_key($_REQUEST['lti_keys_id']);
    include 'site.php';
} else {
    management_fail();
}
예제 #2
0
 * @author Simon Wilkinson
 * @version 1.0
 * @copyright Copyright (c) 2014 The University of Nottingham
 * @package
 */
require '../include/sysadmin_auth.inc';
require_once '../include/errors.inc';
require_once '../LTI/ims-lti/UoN_LTI.php';
$LTIkeysid = check_var('LTIkeysID', 'POST', true, false, true);
$lti = new UoN_LTI();
$lti->init_lti0($mysqli);
if (!$lti->lti_key_exists($LTIkeysid)) {
    $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
    $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
}
$lti->delete_lti_key($LTIkeysid);
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="content-type" content="text/html;charset=<?php 
echo $configObject->get('cfg_page_charset');
?>
" />
  
  <title><?php 
echo $string['ltikeydel'];
?>
</title>