Exemplo n.º 1
0
    $server->register('get_titles', array('return' => 'xsd:anyType'), 'urn:SciELOService', 'urn:SciELOService#get_titles', 'SOAP-ENC:Array', 'encoded', 'Return titles from title database [de acordo com o tipo e parametro]');
    // Use the request to (try to) invoke the service
    $server->service($HTTP_RAW_POST_DATA);
} else {
    switch ($_REQUEST["service"]) {
        case "search":
            $response = search($_REQUEST["expression"], $_REQUEST["from"], $_REQUEST["count"], $_REQUEST["lang"]);
            break;
        case "new_titles":
            $response = new_titles($_REQUEST["count"]);
            break;
        case "new_issues":
            $response = new_issues($_REQUEST["count"]);
            break;
        case "get_titles":
            $response = get_titles($_REQUEST["type"], $_REQUEST["param"]);
            break;
    }
    print $response;
}
// Define the method as a PHP function
function search($expression, $from, $count, $lang)
{
    global $applServer, $output;
    $from = $from != "" ? $from : "1";
    $count = $count != "" ? $count : "10";
    if ($lang == "es") {
        $iahLang = "e";
    } else {
        if ($lang == "en") {
            $iahLang = "i";
Exemplo n.º 2
0
/** J\"{a}rjest\"{a} kysymykset tagin mukaan
 */
function organize_questions_by_tag()
{
    /* $end_array array
     * $tags_and_Qid array
     * $titles_and_Qid array
     * $titles array
     * $was_sent_at_times array
     * $usernames array
     * $user_ids array
     */
    $end_array = get_tags();
    $tags_and_Qid = get_tags();
    $titles_and_Qid = get_titles();
    $titles = get_titles();
    $was_sent_at_times = get_was_sent_at_times();
    $usernames = get_usernames();
    $user_ids = get_user_ids();
    if ($_GET['tab_tag'] == 'oldest') {
        organize_questions($end_array, $tags_and_Qid, $titles_and_Qid, $titles, $was_sent_at_times, $usernames, $user_ids);
    } else {
        organize_questions(array_reverse($end_array, true), $tags_and_Qid, $titles_and_Qid, $titles, $was_sent_at_times, $usernames, $user_ids);
    }
}
Exemplo n.º 3
0
include "../core.php";
$postdata = json_decode(file_get_contents('php://input'));
$action = $postdata->action;
$result = array();
/* Подключение к БД */
$connection = oci_connect($db_user, $db_password, $db_host, 'AL32UTF8');
if (!$connection) {
    oci_close($connection);
    $error = oci_error();
    $result = new DBError($error["code"], $error["message"]);
    echo json_encode($result);
} else {
    switch ($action) {
        /* Получение всех титулов */
        case "getTitles":
            get_titles();
            break;
            /* Добавление титула */
        /* Добавление титула */
        case "addTitle":
            add_title($postdata);
            break;
            /* Изменение титула */
        /* Изменение титула */
        case "editTitle":
            edit_title($postdata);
            break;
            /* Получение узлов титула */
        /* Получение узлов титула */
        case "getTitleNodes":
            get_title_nodes($postdata);