0,0 → 1,37 |
<?php |
|
include_once('includes/common.php'); |
Prolog(); |
|
if(array_key_exists('delete', $_POST)) { |
$id = $_POST['id']; |
$db->query_params("delete from telbook_categories where category_id=$1", array($id)); |
|
header("Location: telbook_categories_list.php"); |
$g_display->add_text('Information deleted successfully'); |
} |
else if(array_key_exists('update', $_POST)) { |
$id = $_POST['id']; |
$category_name = $_POST['category_name']; |
$category_comment = $_POST['category_comment']; |
$category_export_key = ($_POST['category_export_key'] ? $_POST['category_export_key'] : NULL); |
|
if($id) { |
$db->query_params("update telbook_categories set" |
. " category_name=$2, category_comment=$3, category_export_key=$4" |
. " where category_id=$1", |
array($id, $category_name, $category_comment, $category_export_key)); |
} |
else { |
$db->query_params("insert into telbook_categories" |
. " (category_name, category_comment, category_export_key) values ($1, $2, $3)", |
array($category_name, $category_comment, $category_export_key)); |
} |
|
header("Location: telbook_categories_list.php"); |
$g_display->add_text('Information saved successfully'); |
} |
|
Epilog(); |
|
?> |
Property changes: |
Added: svn:mergeinfo |