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 a 'Format SQL' button to query textarea. | |
* | |
* @link https://www.adminer.org/plugins/#use | |
* @uses SQL Formatter, https://www.npmjs.com/package/sql-formatter | |
* @author Craig Rodway | |
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) |
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
<!-- application/views/bookings/table/cols_periods.php --> | |
<td align="center" width="<?php echo $width ?>"> | |
<strong><?php echo html_escape($name) ?></strong><br /> | |
<span style="font-size:90%"> | |
<?php echo date('H:i', strtotime($time_start)).'-'.date('H:i', strtotime($time_end)) ?> | |
</span> | |
</td> |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Bookings extends MY_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Basic shell of a module for generating Gravatar URLs for ProcessWire users. | |
* | |
* Mostly based on official implementation guidance here: | |
* https://en.gravatar.com/site/implement/images/php/ | |
* | |
* | |
* Use it like this: |
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
#!/bin/bash | |
# | |
# ProcessWire upgrade script | |
# | |
# Upgrades ProcessWire ./wire directory. | |
# Use either master of dev branch. | |
# | |
# |
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 | |
/** | |
* ProcessWire Form Fieldtype. | |
* Stores reference to a single FormBuilder Form to allow easy selection on pages. | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2012 by Ryan Cramer | |
* Licensed under GNU/GPL v2, see LICENSE.TXT | |
* |
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 <head> | |
*/ | |
var jsq = (function(){ | |
var q = []; // internal queue of functions that are added | |
var fs = {}; // public exportable functions | |
// Add a function to the queue |
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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class collection | |
{ | |
var $CI; | |
function __construct() | |
{ | |
$this->CI =& get_instance(); | |
$this->CI->load->model('Settings_model'); |
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
$.fn.cbtristate = function(settings) { | |
var config = { | |
yes: { img: "img/ico/check-yes.png", val: "1" }, | |
no: { img: "img/ico/check-no.png", val: "0" }, | |
empty: { img: "img/ico/check-empty.png", val: "" } | |
}; | |
if (settings) $.extend(config, settings); |
NewerOlder