Example #1
0
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_holidays':
        $id = $_REQUEST['id'];
        $name = $_REQUEST['name'];
        $date = $_REQUEST['date'];
        $holidays_category_id = $_REQUEST['holidays_category_id'];
        if ($name != '') {
            if (!CheckHolidaysExist($name, $id)) {
                if ($id == '') {
                    AddHolidays($name, $date, $holidays_category_id);
                } else {
                    SaveHolidays($id, $name, $date, $holidays_category_id);
                }
            } else {
                $error = '"' . $name . '" უკვე არის სიაში!';
            }
        }
        break;
    case 'disable':
        $id = $_REQUEST['id'];
        DisableHolidays($id);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
Example #2
0
                              <label for="callapp_checkbox_cat_' . $aRow[$hidden] . '"></label>
                          </div>';
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_cat':
        $id = $_REQUEST['id'];
        $name = $_REQUEST['name'];
        if ($name != '') {
            if (!CheckHolidaysExist($name, $id)) {
                if ($id == '') {
                    AddHolidays($name);
                } else {
                    SaveHolidays($id, $name);
                }
            } else {
                $error = '"' . $name . '" უკვე არის სიაში!';
            }
        }
        break;
    case 'disable':
        $id = $_REQUEST['id'];
        DisableHolidays($id);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);