Ejemplo n.º 1
0
        // Admins get an edit column
        if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)) {
            $is_template = isset($document_data['is_template']) ? $document_data['is_template'] : false;
            // If readonly, check if it the owner of the file or if the user is an admin
            if ($document_data['insert_user_id'] == api_get_user_id() || api_is_platform_admin()) {
                $edit_icons = build_edit_icons($document_data, $key, $is_template, 0, $is_visible);
            } else {
                $edit_icons = build_edit_icons($document_data, $key, $is_template, $document_data['readonly'], $is_visible);
            }
            $row[] = $edit_icons;
        }
        $row[] = $last_edit_date;
        $row[] = $size;
        $row[] = $document_name;
        $total_size = $total_size + $size;
        if (isset($_GET['keyword']) && search_keyword($document_name, $_GET['keyword']) || !isset($_GET['keyword']) || empty($_GET['keyword'])) {
            $sortable_data[] = $row;
        }
    }
} else {
    $sortable_data = '';
    $table_footer = get_lang('NoDocsInFolder');
}
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Type'), get_lang('Name'), get_lang('Size'));
//Column config
$column_model = array(array('name' => 'type', 'index' => 'type', 'width' => '28', 'align' => 'center', 'sortable' => 'false'), array('name' => 'name', 'index' => 'name', 'width' => '500', 'align' => 'left'), array('name' => 'size', 'index' => 'size', 'width' => '35', 'align' => 'right', 'sortable' => 'true'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
Ejemplo n.º 2
0
Archivo: index.php Proyecto: arh922/ain
    case "get_random_news":
        echo get_random_news($_REQUEST['client_id'], $_REQUEST['my_sources'], $_REQUEST['start'] - 1, $_REQUEST['offset']);
        break;
    case "get_breaking_news":
        if (!isset($_REQUEST['sources'])) {
            $_REQUEST['sources'] = '';
        }
        echo get_break_news($_REQUEST['sources'], $_REQUEST['client_id'], $_REQUEST['start'] - 1, $_REQUEST['offset']);
        break;
    case "follow_source":
        follow_source($_REQUEST['udid'], $_REQUEST['sources']);
        break;
    case "update_mobile_for_new_and_updated_categories":
        //for update client(phone)
        echo update_mobile_for_new_and_updated_categories($_REQUEST['uv'], $_REQUEST['av']);
        break;
        //*********************keywords************************
    //*********************keywords************************
    case "search_keyword":
        echo search_keyword($_REQUEST['keyword']);
        break;
    case "add_keyword":
        echo add_keyword($_REQUEST['keyword'], $_REQUEST['udid']);
        break;
    case "get_my_keywords":
        echo get_my_keywords($_REQUEST['udid']);
        break;
    case "get_news_by_keywords_from_mysources":
        echo get_news_by_keywords_from_mysources($_REQUEST['keyword_id'], $_REQUEST['udid'], $_REQUEST['start'] - 1, $_REQUEST['offset']);
        break;
}
Ejemplo n.º 3
0
<?php

require 'include/config.php';
require 'include/functions/main.php';
$allRecsShown = 0;
$keyword = $_REQUEST['query'];
if ($keyword) {
    search_keyword($keyword);
    // update hits
    $displayKeyword = urldecode($keyword);
    $searchIndex = isset($_REQUEST['index']) ? $_REQUEST['index'] : 'All';
    $displaySI = $searchIndex;
    if (!in_array($searchIndex, $categories)) {
        $keyword .= ' ' . $searchIndex;
        $searchIndex = 'All';
        // reassign All
    }
    $keyword = str_replace(" ", " ", $keyword);
    $keyword = rawurlencode($keyword);
    $operation = 'ItemSearch';
    //$searchIndex = 'Speakers';
    $service = 'AWSECommerceService';
    $version = '2011-08-01';
    $responseGroup = 'ItemAttributes,Images';
    $string_to_sign = build_request($keyword, $searchIndex, $operation, $service, $version, $responseGroup);
    $signature = get_signature($string_to_sign);
    $request = $cg['amazonUrl'] . '?' . $string_to_sign;
    $request .= "&Signature=" . $signature;
    $maxPage = $searchIndex == 'All' ? 5 : 10;
    //$response = file_get_contents($request);
    $response = curl_string($request);
Ejemplo n.º 4
0
include 'search.php';
$x = new online_tracker();
$x->tracker();
$gerger = new gerger_timer();
$gerger->start();
$gerger->setprecision(4);
session_start();
if (isset($_POST['searchstr'])) {
    $keywords = $_POST['searchstr'];
    $_SESSION['search_string'] = $keywords;
}
if (isset($_SESSION['search_string'])) {
    $keywords = $_SESSION['search_string'];
}
// Perform the search
$results = search_keyword($keywords);
//search for articles on the keywords table
$ids = combine_ids($results);
//combine all found article ids into one array
$rs = search_item($ids);
//search actuall articles
$searchresults = '';
$totalrows = count($rs);
$limit = 2;
$paging = ceil($totalrows / $limit);
$scroll = 1;
$scrollnumber = 5;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    $page = 1;