/**********************************************
The MyReview system for web-based conference management
Copyright (C) 2003-2004 Philippe Rigaux
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
************************************************/
//Management of codes
require_once ("Util.php");
require_once ("Formulaire.class.php");
function MngtCodes ($_POST, $codeName, $context, $db, &$tpl)
{
if (isSet($_POST['label']))
{
$message = InsertCode ($codeName, $_POST, $_POST['mode'], $db);
if (!is_numeric($message))
{
// Error reporting
$tpl->set_var("TITLE", "Error: $message");
$codif = CleanArray ($_POST);
$mode = INSERTION;
}
else
{
$tpl->set_var("TITLE", "Transaction OK");
$mode = INSERTION;
}
// Display the form
$tpl->set_var("FORM_CODIF",
FormCodif ($codeName, array(), $mode, $context));
}
else if (isSet($_GET['id']))
{
if (!isSet ($_GET['do']) or $_GET['do']=="modify")
{
// Ask for code modification
$tpl->set_var("TITLE", "Modify");
$codif = ChercheCodif ($codeName, $_GET['id'], $db);
$tpl->set_var ("FORM_CODIF",
FormCodif($codeName, $codif, MAJ, $context));
}
else
{
// Delete the code
$query = "DELETE FROM $codeName WHERE id=" . $_GET['id'];
$db->execRequete ($query);
$tpl->set_var ("FORM_CODIF",
FormCodif($codeName, array(), INSERTION, $context));
}
}
else
{
// Insert
$tpl->set_var("TITLE", "Add a code in table $codeName");
$tpl->set_var ("FORM_CODIF",
FormCodif($codeName, $_POST, INSERTION, $context));
}
// Always print the list of existing codes
$tpl->set_block("TxtCodes", "DETAIL_CODIF", "CODIFS");
$tpl->set_var ("CODIFS", "");
$query = "SELECT * FROM $codeName";
$result = $db->execRequete ($query);
while ($code = $db->objetSuivant($result))
{
$modLink = Ancre ($context . "&id=$code->id&do=modify", "Modify");
$delLink = Ancre ($context . "&id=$code->id&do=delete", "Delete");
$tpl->set_var("CODIF_LABEL", $code->label);
$tpl->set_var("MODIFY", $modLink);
$tpl->set_var("DELETE", $delLink);
$tpl->parse("CODIFS", "DETAIL_CODIF", true);
}
$tpl->set_var("ADD_CODE", Ancre($context, "Add a new code"));
/* Instanciate CODIFS in BODY */
$tpl->parse("BODY", "TxtCodes");
}
function InsertCode ($nomCodif, $codif, $mode, $db)
{
// Controle
$message = ControleCodif ($codif);
if (!empty($message)) return $message;
// Insertion ou mise à jour
$code = SQLCodif ($nomCodif, $codif, $mode, $db);
return $code;
}
function FormCodif ($nomCodif, $codif, $mode, $target)
{
// Create the form
$form = new Formulaire ("POST", $target, false);
$form->champCache ("mode", $mode);
if ($mode != INSERTION)
{
$form->champCache ("id", $codif['id']);
}
else
$codif['label'] = "";
$form->champTexte ("Label",
"label", $codif['label'], 30, 30);
if ($mode == MAJ)
$form->champValider ("Modify", "submit");
else
$form->champValider ("Insert", "submit");
return $form->fin(false);
}
// Insérer une codification
function SQLCodif ($nomCodif, $codif, $mode, $db)
{
// Get the variables (easier)
$lib = $codif['label'];
if ($mode == INSERTION)
{
// Insert
$query = "INSERT INTO $nomCodif (label) "
. "VALUES ('$lib') ";
$db->execRequete ($query);
$code = $db->idDerniereLigne();
}
else
{
// Update
$code = $codif['id'];
$query = "UPDATE $nomCodif SET label='$lib' "
. " WHERE id='$code'";
$db->execRequete ($query);
}
return $code;
}
function ControleCodif($codif)
{
$message = "";
// Quelques tests...
if (empty ($codif['label'])) $message = "Please provide a label ";
return $message;
}
// Recherche d'une codif
function ChercheCodif ($nomCodif, $code, $db)
{
$query = "SELECT * FROM $nomCodif WHERE id = '$code'" ;
$result = $db->execRequete ($query);
return $db->ligneSuivante ($result);
}
// Recherche de l'intitulé d'une codif
function LibelleCodif ($nomCodif, $code, $db)
{
$query = "SELECT * FROM $nomCodif WHERE id = '$code'" ;
$result = $db->execRequete ($query);
$codif = $db->ligneSuivante ($result);
return $codif['label'];
}
?>
Interaction: Systems, Practice and Theory 2004
INTERACTION: Systems, Practice and Theory
A Creativity & Cognition Symposium hosted by The Dynamic Design Research Group.
Sydney, 16-19 November 2004
Sidney Fels
Sidney Fels,
Associate Professor
Director of the Media and Graphics Interdisciplinary Centre (MAGIC)
Head of the Human Communication Technologies Research Lab
Communication and computing technology is advancing at an accelerated pace. Although this new technology is supposedly made for the benefit of humans, people are finding it difficult to keep up with it.
The Human Communication Technology (HCT) Research Laboratory at UBC researches a number of key issues that put people "back in the loop" and allow us to communicate experiences both to computer systems and each other more effectively. An awareness of individual variations in human cognitive, physical, and emotional capabilities provides a foundation for acquiring, analyzing, representing, storing, retrieving, transmitting, communicating, and ultimately, synthesizing human experience. Faster processing machines, larger data capacity, new algorithms, multimedia, and multimodal systems will combine with developments in psychology, sociology, and art to enhance the communication abilities between people and machines.
In this talk I will introduce many of the projects that are pursuing advances in Human Communication Technologies, and specifically, a framework I have been developing based on intimacy and embodiment, to understand how people interact with these new technologies and each other. As part of the framework, I consider the aesthetics of relationships as key to describing how people and machines develop intimacy. Supporting the framework are projects that span from engineering to science to art. I will describe some of the projects, including artwork such as: Iamascope and Swimming Across the Pacific, musical work with a two person flute, and more technical work on camera based interfaces.
Biography:
Sidney has been in the department of Electrical & Computer Engineering
at the University of British Columbia since 1998. Sidney received his
Ph.D. and M.Sc. in Computer Science at the University of Toronto in 1994
and 1990 respectively. He received his B.A.Sc. in Electrical Engineering
at the University of Waterloo in 1988. He was a visiting research at ATR
Media Integration & Communications Research Laboratories in Kyoto, Japan
from 1996 to 1997. He also worked at Virtual Technologies Inc. in Palo
Alto, CA developing the GesturePlus™ system and the CyberServer™ in
1995. He is internationally known for his work in human-computer
interaction, neural networks, intelligent agents, new interfaces for
musical expression and interactive arts with over 80 scholarly
publications and exhibitions. Some of his research projects include
Glove-TalkII, Glove-Talk, Iamascope, InvenTcl, French Surfaces, Sound
Sculpting and the context-aware mobile assistant project (CMAP). Using
the Glove-TalkII system a person could speak with their hands. The
device was built to be a virtual artificial vocal tract. The person
using the system wore special gloves and used a foot pedal. These
devices controlled a model of a vocal tract so that a person could
"play" speech much as a musician plays music. His collaborative work on
sound sculpting is an extension of this idea to create musical
instruments. The Iamascope is an interactive artwork which explores the
relationship between people and machines. In Iamascope the participant
takes the place of the coloured piece of glass inside the kaleidoscope.
The participant’s movements cause a cascade of imagery and music to
engulf them. Some of his other artwork includes the Forklift Ballet,
Video Cubism, PlesioPhone and Waking Dream. His research on musical
interfaces includes Tooka (a two-person flute), MetaMuse (metaphor based
interface for granular synthesis), Tongue’n Groove (an tongue based
music controller using ultrasound) and 2 Hearts Musical system (uses
heartbeats of two people to navigate in a soundscape).