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 | |
/* | |
* author: Tres Finocchiaro transposed to PHP by Johan van de Merwe | |
* date: 2020-08-10 | |
* license: Public Domain; Use as you wish. | |
* source: http://qz.io | |
* | |
* usage: | |
* | |
* $data = '^XA...your zpl data.. XZ'; |
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( $, plugin ) { | |
"use strict"; | |
// Working with promises to bubble event later than core. | |
$.when( someObjectWithEvents ).done( function() { | |
console.log( 'AJAX request done.' ); | |
} ) | |
.then( function() { | |
setTimeout( function() { | |
console.log( 'AJAX requests resolved.' ); |
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
/* | |
In the functoin below you have to find your store | |
in your own object. If the function below is in a grid class | |
you can use it as it is put here | |
I like to keep things clear, therefor I address every object | |
in a seperate field for clarity. | |
*/ | |
function IterateThisStore() { |
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
jQuery('#grid').w2grid({ | |
name: 'grid', | |
recordsPerPage: 25, | |
fixedRecord: false, | |
url: '/wp-content/plugins/GarageSoftware/ajax/AjaxLoadOccasions.php', | |
show: { | |
header: true, | |
footer: true, | |
toolbar: true | |
}, |
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 | |
if (isset($_POST['zip_file'])) { | |
$filename = $_POST['zip_file']; | |
$source = $_POST['zip_file']; | |
$type = 'zip'; | |
$name = explode(".", $filename); | |
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed'); |
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 | |
/* Simple script to upload a zip file to the webserver and have it unzipped | |
Saves tons of time, think only of uploading Wordpress to the server | |
Thanks to c.bavota (www.bavotasan.com) | |
I have modified the script a little to make it more convenient | |
Modified by: Johan van de Merwe (12.02.2013) | |
*/ | |
function rmdir_recursive($dir) { | |
foreach (scandir($dir) as $file) { |