예제 #1
0
<?php

/*
 * Author: Sarah Hall
 * Date: 12/17/2015
 * Summary: Created for On The Bit Sim game members, in php and mysql for leaderboards
 */
include_once 'functions.php';
if (isset($_POST[Delete])) {
    echo deleteR($dbh, $_POST['id']);
    unset($_POST);
}
if (isset($_POST[Changes])) {
    echo update($dbh, $_POST['result']);
}
$results = allShows($dbh);
?>
<!DOCTYPE>
<html>
	<head>
		<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
	   	<link href="../css/footable.core.min.css" rel="stylesheet" type="text/css" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
		<script src="../js/footable.js" type="text/javascript"></script>
		<script src="../js/footable.sort.js" type="text/javascript"></script>
		<script src="../js/footable.paginate.js" type="text/javascript"></script>
		<script src="../js/footable.filter.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(function () {
				$('.footable').footable();
			});
예제 #2
0
 function deleteR($dirname)
 {
     if (is_dir($dirname)) {
         $dir_handle = opendir($dirname);
     }
     while ($file = readdir($dir_handle)) {
         if ($file !== "." && $file !== "..") {
             if (!is_dir($dirname . "/" . $file)) {
                 unlink($dirname . "/" . $file);
             } else {
                 deleteR($dirname . "/" . $file);
             }
         }
     }
     closedir($dir_handle);
     rmdir($dirname);
 }