case "update_record":
$li = new table();
if($li->hasAdminRight())
{
$obj = explode("##",trim($_POST['id']));
$li->record_id = $obj[0];
$li->field = $obj[1];
$data = trim($_POST['value']);
# make sure field and primary id are set
if($li->field!='' && $li->record_id!='')
{
//echo "PRIMARY KEY: " .$li->record_id;
mssql_select_db(DB_NAME) or exit(mssql_error());
//Mirar lo que devuelve el select de abajo y como almacenarlo en un array
//echo "RESULT:" .mssql_query("Select id_estado FROM ref WHERE n_incidencia= '".$li->record_id. "'");
if (mssql_query("Select id_estado FROM ref WHERE n_incidencia= '".$li->record_id. "'")!='3')
{