This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT co.*, | |
COALESCE(mod.moduleCount,0) AS moduleCount, | |
COALESCE(vid.vidCount,0) AS vidCount | |
FROM courses AS co | |
LEFT JOIN ( | |
SELECT COUNT(*) AS moduleCount, course_id AS courseId | |
FROM modules | |
GROUP BY course_id | |
) AS mod | |
ON mod.courseId = co.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
endAndStartTimer(); | |
var timer; | |
function endAndStartTimer() { | |
window.clearTimeout(timer); | |
//var millisecBeforeRedirect = 10000; | |
timer = window.setTimeout(function(){ | |
resize_iframe(); | |
},500); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$foo = trim(preg_replace( '/\s+/', ' ', $foo )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$included_files = get_included_files(); | |
foreach ($included_files as $filename) { | |
echo "$filename\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('../../../connect.php'); | |
$id = (isset($_POST['id']) && $_POST['id'] != '') ? mysql_real_escape_string($_POST['id']) : ''; | |
$value = (isset($_POST['value']) && $_POST['value'] != '') ? mysql_real_escape_string($_POST['value']) : ''; | |
$ERROR=0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_query("DELETE FROM example WHERE age='15'")or die(mysql_error()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$table="|"; | |
$sql="update from $table set = , = where id=$id"; | |
$result=mysql_query($sql) or die ("<h3>Error</h3><p><b>".mysql_error()."</b></p>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sql="insert into table () values ( , , , ) where id='$id'"; | |
$result=mysql_query($sql) or die ("<h3>Error</h3><p><b>".mysql_error()."</b></p>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: 'ajaxCalls/remove_printer.php', | |
type: 'POST', | |
data: { | |
'id': id | |
}, | |
dataType:"json", | |
success: function(response) { | |
if(response.status === "success") { |