Ejemplo n.º 1
0
 #
 if ($display == 'sheets') {
     $rsp = search_sheets($_GET, $GLOBALS['cfg']['user']['id'], $more);
     if (!$rsp['ok'] || !count($rsp['sheets'])) {
         $GLOBALS['smarty']->display('page_search_noresults.txt');
         exit;
     }
     $GLOBALS['smarty']->assign_by_ref('sheets', $rsp['sheets']);
 } else {
     $rsp = search_dots($_GET, $GLOBALS['cfg']['user']['id'], $more);
     if (!$rsp['ok'] || !count($rsp['dots'])) {
         $GLOBALS['smarty']->display('page_search_noresults.txt');
         exit;
     }
     $GLOBALS['smarty']->assign_by_ref('dots', $rsp['dots']);
     $dots_indexed = dots_indexed_on($rsp['dots']);
     $GLOBALS['smarty']->assign_by_ref('dots_indexed', $dots_indexed);
 }
 #
 # Display inline
 #
 $page_as_queryarg = 0;
 #
 $args = $_GET;
 $to_remove = array('format');
 foreach ($to_remove as $k) {
     if (isset($args[$k])) {
         unset($args[$k]);
     }
 }
 $query_args = http_build_query($args);
Ejemplo n.º 2
0
            header("location: {$redir}");
            exit;
        }
        $smarty->display('page_sheet_delete.txt');
        exit;
    }
}
# Hey look! At least to start we are deliberately not doing
# any pagination on the 'dots-for-a-sheet' page. We'll see
# how long its actually sustainable but for now it keeps a
# variety of (display) avenues open.
# (20101025/straup)
$more = array('per_page' => $GLOBALS['cfg']['import_max_records']);
$sheet['dots'] = dots_get_dots_for_sheet($sheet, $GLOBALS['cfg']['user']['id'], $more);
$to_index = array($sheet['dots'][0]);
$dots_indexed = dots_indexed_on($to_index);
$GLOBALS['smarty']->assign_by_ref("dots_indexed", $dots_indexed);
# define the selected title field
$title_field = NULL;
#$sheet['dots'][0]['details']['title_internal'][0]['value'] = "{title} on {date}";
if (isset($sheet['dots'][0]['details']['title_internal'])) {
    preg_match_all("/[\\{](.+?)[\\}]/i", $sheet['dots'][0]['details']['title_internal'][0]['value'], $title_matches);
    if (isset($title_matches[1]) && !empty($title_matches[1])) {
        $title_field = $title_matches[1][0];
    }
}
//[\{](.+?)[\}] -- gets all template patterns
$GLOBALS['smarty']->assign_by_ref("assigned_title", $title_field);
if ($is_own) {
    $smarty->assign("permissions_map", dots_permissions_map());
    $smarty->assign("geocoder_map", geo_geocode_service_map());