예제 #1
0
                if ($i == $count - 1) {
                    $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />';
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_source':
        $source_id = $_REQUEST['id'];
        $source_name = $_REQUEST['name'];
        if ($source_name != '') {
            if (!ChecksourceExist($source_name, $source_id)) {
                if ($source_id == '') {
                    Addsource($source_name);
                } else {
                    Savesource($source_id, $source_name);
                }
            } else {
                $error = '"' . $source_name . '" უკვე არის სიაში!';
            }
        }
        break;
    case 'disable':
        $source_id = $_REQUEST['id'];
        Disablesource($source_id);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
예제 #2
0
            $data['aaData'][] = $row;
        }
        break;
    case 'save_source':
        $source_id = $_REQUEST['id'];
        $source_name = $_REQUEST['name'];
        $content = $_REQUEST['content'];
        if ($source_name != '') {
            if ($source_id == '') {
                if (!ChecksourceExist($source_name, $source_id)) {
                    Addsource($source_name, $content);
                } else {
                    $error = '"' . $source_name . '" უკვე არის სიაში!';
                }
            } else {
                Savesource($source_id, $source_name, $content);
            }
        }
        break;
    case 'disable':
        $source_id = $_REQUEST['id'];
        Disablesource($source_id);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
 *	Category Functions
* ******************************