예제 #1
0
     $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_country` ON T_country.Iso = T_entry.Country ";
     $sql .= "GROUP BY T_massif.Id ";
     $columns_params = array(0 => "[hidden]|[hidden]Id", 1 => "[hidden]|[hidden]Locked", 2 => "[hidden]|<convert>#label=551<convert><br /><convert>#label=98<convert>", 3 => "T_massif*Name|[hidden]<convert>#label=551<convert>", 4 => "T_entry*Country|[hidden]<convert>#label=98<convert>|SELECT Iso AS value," . $_SESSION['language'] . "_name AS text FROM T_country ORDER BY text", 5 => "[hidden]|[hidden]5");
     $param_link = "JavaScript:massifOnClick(event,'<Id>');";
     $links = array(2 => array('conditions' => array(1 => '0'), 'parameters' => array('<Id>' => 0), 'link' => $param_link, 'target' => 'onclick'));
     $input_type = array('type' => 'radio', 'conditions' => array(1 => '0'));
     $style = array(2 => array('tag' => 'div', 'class' => 'plt_warning', 'conditions' => array(5 => '1')));
     $default_order = 3;
     $length_page = 10;
     $records_by_page_array = array(5, 10, 15, 20, 25, 30, 40, 50);
     $records_by_page = isset($_POST['records_by_page']) ? $_POST['records_by_page'] : 15;
     $filter_form = "automatic_form";
     $list_form = "result_form";
     $result = getRowsFromSQL($sql, $columns_params, $links, $records_by_page, $filter_form, $list_form, $_POST, $input_type, $style, $default_order, true, true, "");
     $resource_id = $result['resource_id'];
     $filter_fields = getFilterFields($sql, $columns_params, $_POST, $filter_form, "<convert>#label=542<convert>", true, $resource_id);
     //Tous
     $rows = $result['rows'];
     $total_count = $result['total_count'];
     $local_count = $result['local_count'];
     $count_page = ceil($total_count / $records_by_page);
     $current_page = isset($_POST['current']) ? $_POST['current'] : 1;
     $order = isset($_POST['order']) ? $_POST['order'] : '';
     $by = isset($_POST['by']) ? $_POST['by'] : $default_order;
     if ($total_count > 0) {
         $navigator = getPageNavigator($length_page, $current_page, $count_page, $filter_form);
     } else {
         $navigator = "";
     }
     ?>
 <div>
예제 #2
0
     $records_by_page_array = array(5, 10, 15, 20, 25, 30, 40, 50);
     $records_by_page = isset($_POST['records_by_page']) ? $_POST['records_by_page'] : 10;
     $filter_form = "automatic_form";
     $list_form = "result_form";
     $default_array = array('submit_filter' => '1');
     if (allowAccess(request_approve_all)) {
         //$default_array[idEncode("IF(((T_request*Id_author='".$_sess_user_id."'@AND@T_status*Name@IN@(".implode(",",$rw_array_for_walk)."))@OR@(T_status*Name@IN@(".implode(",",$manage_array_for_walk).")@AND@T_caver*Login='******'user_login'])."')),'<convert>#label=626<convert>','<convert>#label=627<convert>')")] = '<convert>#label=626<convert>'; //Oui
         $default_array[idEncode("IF(((T_request*Id_author='" . $_sess_user_id . "'@AND@T_status*Name@IN@(" . implode(",", $rw_array_for_walk) . "))@OR@(T_status*Name@IN@(" . implode(",", $manage_array_for_walk) . ")@AND@T_request*Id_recipient='" . $_sess_user_id . "')),'<convert>#label=626<convert>','<convert>#label=627<convert>')")] = '<convert>#label=626<convert>';
         //Oui
         $default_array[idEncode("(SELECT@Language@FROM@" . $_SESSION['Application_host'] . "*T_caver@WHERE@Id=T_request*Id_author)")] = $_SESSION['language'];
     } elseif (allowAccess(request_edit_mine)) {
         $default_array[idEncode('T_status*Name')] = $def_status_array;
     }
     $result = getRowsFromSQL($sql, $columns_params, $links, $records_by_page, $filter_form, $list_form, $_POST, $input_type, $style, $default_order, true, true, "", $default_array, $images);
     $resource_id = $result['resource_id'];
     $filter_fields = getFilterFields($sql, $columns_params, $_POST, $filter_form, "<convert>#label=542<convert>", false, $resource_id, $default_array);
     //Tous
     $rows = $result['rows'];
     $total_count = $result['total_count'];
     $local_count = $result['local_count'];
     $count_page = ceil($total_count / $records_by_page);
     $current_page = isset($_POST['current']) ? $_POST['current'] : 1;
     $order = isset($_POST['order']) ? $_POST['order'] : '';
     $by = isset($_POST['by']) ? $_POST['by'] : $default_order;
     if ($total_count > 0) {
         $navigator = getPageNavigator($length_page, $current_page, $count_page, $filter_form);
     } else {
         $navigator = "";
     }
     ?>
 <div>