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
$(".drop_area").droppable({ | |
tolerance: "intersect", | |
accept: ".drop_item", | |
greedy: true, | |
drop : function(event, ui) { | |
$(this).droppable( "option", "disabled", true ); | |
}, | |
out : function(event, ui) { | |
$(this).droppable( "option", "disabled", false ); | |
}, |
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 | |
$count = 1; | |
while($count <= 20) { | |
$path = "D:\\web\\www\\website\\folder\\"; | |
$filename = $count.".html"; | |
$file = fopen($path.$filename, "w"); | |
echo $filename." has been created! <br />"; | |
$count++; | |
} | |
?> |
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 | |
/* Database Info */ | |
$server = "localhost"; | |
$username = "username"; | |
$password = "password"; | |
$databaseName = "databaseName"; | |
/* Table we want to export */ | |
$tableName = "tableName"; | |
/* Optional WHERE Statement */ | |
//$whereStatement = "WHERE field = value"; |
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
/* | |
* Controller for Projects | |
*/ | |
public function addProject() { | |
$this->load->helper('form'); | |
$this->load->library('form_validation'); | |
$config = array( | |
array( | |
'field' => 'client', | |
'label' => 'Client Name', |
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
/* | |
* Model for Projects | |
*/ | |
function addProject($client, $projectName, $price, $deadline, $notes) { | |
$project = array( | |
"client_id" => $client, | |
"user_id" => $this->session->userdata('user_id'), | |
"name" => $projectName, | |
"price" => $price, | |
"deadline" => $deadline, |
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 | |
/* Gets the count of all votes for a specific poll */ | |
public function totalVoteCount($pollId) { | |
$this->db->select("*"); | |
$this->db->where("poll_id", $pollId); | |
$count = $this->db->count_all_results('votes'); | |
return $count; | |
} | |
/* Returns the percentage of votes a contestant has in a specific poll */ | |
public function getContestantPercentage($pollId, $contestantId) { |
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 | |
public function uploadImage() { | |
$this->load->library('upload'); | |
$imageFolder = 'assets/images/features'; | |
if (!file_exists($imageFolder)) { | |
mkdir($imageFolder, DIR_WRITE_MODE, true); | |
} | |
$this->upload_config = array( | |
'upload_path' => $imageFolder, | |
'allowed_types' => '*', |
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: Education Session Plugin | |
Plugin URI: http://coder.ie/ | |
Description: Custom Plugin for IFAN | |
Version: 1.0 | |
Author: Sean McNamara | |
Author URI: http://seanmcn.com/ | |
*/ | |
register_activation_hook(__FILE__,'edusession_plugin_install'); |
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: Sean McNamara | |
* Some legacy code from OTS | |
*/ | |
$tr_date = strtotime($options['tr_date']); | |
$fest_date = strtotime($options['fest_date']); | |
$games_date = strtotime($options['games_date']); | |
$now = strtotime("now"); |
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
/* | |
* Product Customiser for Celtic Commemorations | |
* @Documentation: http://lmgtfy.com/?q=jquery+documentationl=1 | |
*/ | |
var popupStatus = 0; //0 means disabled; 1 means enabled; | |
var page = 0; | |
var text = 0; | |
var textAreaStatus = 0; | |
var currentTextAreas = 0; | |
var maxTextAreas = 3; |
OlderNewer