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 | |
/** | |
* @package Carleton Gallery | |
*/ | |
/* | |
Plugin Name: Carleton Gallery | |
Plugin URI: http://carleton.ca/webservices | |
Description: Override Default WP Gallery Shortcode with something better. | |
Version: 1 | |
Author: Mike Corkum |
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
$query = "INSERT INTO tableName VALUES (DEFAULT,'$fullname', '$email', '$comment')"; | |
or: | |
$query = "INSERT INTO tableName (fullname, email, comment) VALUES ('$fullname', '$email', '$comment')"; |
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 feedback (name, email, comment) VALUES ('$fn', '$em', '$comm')"; | |
if ($conn->query($sql) === TRUE) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $sql . "<br>" . $conn->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
$query = "INSERT INTO feedback (name, email, comment) VALUES ('$fn', '$em', '$comm')"; | |
if (mysqli_query($conn, $query)) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $query . "<br>" . mysqli_error($conn); | |
} | |
mysqli_close($conn); |
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
function handleComments() { | |
global $conn; | |
$success = false; | |
$err = ""; | |
if(isset($_POST["send"])) { | |
//echo "you have pressed submit </br>"; | |
if (!empty($_POST["fullname"])) { | |
$fn = sanitize_input($_POST["fullname"]); | |
//echo "You have entered your name. </br>"; |
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
include("db-connect.php"); | |
include("handle-form.php"); | |
$errors = handleComments(); |
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
$(document).ready(function(){ | |
function getRandomPosition(element) { | |
var x = 400; | |
var y = 400; | |
var randomX = Math.floor(Math.random()*x+50); | |
var randomY = Math.floor(Math.random()*y-200); | |
return [randomX,randomY]; | |
} | |
window.onload = function() { |
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 | |
/* | |
Plugin Name: Emit Musk | |
Plugin URI: https://mantelope.io | |
Description: Adds musk to your content. | |
Version: 9,000,000,000.7684728 ½ | |
Author: Industry | |
Author URI: https://mantelope.io | |
License: Yes. | |
*/ |
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
$secret_iv = '3434977318554001'; | |
$iv = substr( hash( 'sha256', $secret_iv ), 0, 16 ); | |
$file_contents = get_file_contents( 'file_to_decrypt.aes' ); | |
$output = openssl_decrypt( base64_decode( $file_contents ), 'AES128', $key, 0, $iv); | |
file_put_contents( 'file_to_decrypt.pdf' ); |
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 | |
/** | |
* Add custom metadata to the columns for export | |
* | |
* @param array $data Current data in the export | |
* @param array $payment Array containing payment metadata | |
* | |
* @return array $data - Modified data | |
*/ | |
function add_data_to_export( $data, $payment ) { |
OlderNewer