Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1385 → Rev 1389

/asterisk-stats/trunk/telbook_update.php
5,8 → 5,10
 
if(array_key_exists('delete', $_POST)) {
$id = $_POST['id'];
$db->begin_transaction();
$db->query_params("delete from telbook_entries where entry_person=$1", array($id));
$db->query_params("delete from telbook_persons where person_id=$1", array($id));
$db->commit_transaction();
 
header("Location: telbook_list.php");
$g_display->add_text('Information deleted successfully');
17,6 → 19,8
$person_comment = $_POST['person_comment'];
$person_category = ($_POST['person_category'] == '' ? NULL : $_POST['person_category']);
 
$db->begin_transaction();
 
if($id) {
$db->query_params("update telbook_persons set"
. " person_name=$2, person_comment=$3, person_category=$4"
52,6 → 56,8
}
}
 
$db->commit_transaction();
 
header("Location: telbook_list.php");
$g_display->add_text('Information saved successfully');
}