// BH 2007.01.30
// Removes file extensions from a file name.
// Initially used to list workload documents
function strip_ext($name){
$ext = strrchr($name, '.');
if($ext !== false){
$name = substr($name, 0, -strlen($ext));
}
return $name;
}
// BH 2007.01.30
// Lists and links files in a directory. Hides extensions
//function list_no_ext($directory){
function list_no_ext($directory){
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$files[] = $file;
}
}
closedir($handle);
sort($files);
print "\n
\n";
foreach($files as $file) {
$name=strip_ext("$file");
print "\n- $name
";
}
print "\n
\n";
}
}
// SJW 2014.02.09
// Sanitize form data (for membership form, or in general)
function qufa_sanitize_form_data($form_data) {
$sanitized_data = $form_data;
$sanitized_data = trim($sanitized_data);
$sanitized_data = strip_tags($sanitized_data);
$sanitized_data = htmlentities($sanitized_data);
$sanitized_data = filter_var($sanitized_data, FILTER_SANITIZE_STRING);
return $sanitized_data;
}
// Sanitize an entire array
function qufa_sanitize_form_data_array($form_data_array) {
$sanitized_form_data_array = array();
foreach($form_data_array as $key => $value) {
$sanitized_form_data_array[$key] = qufa_sanitize_form_data($value);
}
return $sanitized_form_data_array;
}
// Generate a random string for spam check
function qufa_generate_random_string($str_length = -1) {
$character_array = str_split("ABCDEFGHIJKLMNOPQURTUVWXYZabcdefghijklmnopqrstuvwxyz");
$character_array_size = count($character_array);
$random_string_size = $str_length;
$random_string = '';
shuffle($character_array);
if (($random_string_size < 0) || ($random_string_size >= $character_array_size)) {
$random_string_size = $character_array_size - 1;
}
$random_string = array_slice($character_array, 0, $random_string_size);
return implode('', $random_string);
}
function qufa_check_spelling($phrase_to_check) {
$phrase_array = explode(" ", $phrase_to_check);
$pspell_link = pspell_new("en");
if (! $pspell_link) {
return true;
}
$spelled_ok = 0;
$spelled_wrong = 0;
foreach ($phrase_array as $word) {
if (pspell_check($pspell_link, $word)) {
$spelled_ok++;
}
else {
$spelled_wrong++;
}
}
return ($spelled_ok > $spelled_wrong);
}
?>
QUFA - 2009 Financial Update
2009 Financial Update
QUFA and Queen's
- QUFA Exec update on financial situation at Queen's - June 26, 2009
- Op-Ed for the Queen's Journal by Roberta Lamb - June 26, 2009
- QUFA Whig Standard advertisement regarding the projected deficit - May 30, 2009
- Queen's University Administration Halts Discussions on Retirement Incentives - May 8, 2009
- Layoffs already occurring at Queen's University - April 30, 2009
- QUFA's Talks with Administration - April 27, 2009
- Executive Position on Budget Cuts - April 13, 2009
- Financial Report Update - March 12, 2009
- How To Give To Queen's - April 27, 2009
- Announcing QUFA Forum, a blog - March 25, 2009
- QUFA letter to Principal about budget message - November 27, 2008
- What About My Pension? by John Holmes - November 26, 2008
- Adjunct salary-related issues October 3, 2008
Know Your Collective Agreement
QUFA Voices
Other Publications