コード例 #1
0
 function rexList($qry, $default_order_col = '', $default_order_type = '', $default_search_col = '', $default_stepping = '')
 {
     global $order_col, $order_type;
     $this->steps = array();
     $this->stepping = $default_stepping;
     $this->label = '';
     $this->caption = '';
     $this->name = 'default';
     $this->colgroup = array();
     $this->params = array();
     $this->attributes = '';
     $this->columns = array();
     $this->toolbars = array();
     $this->toolbars['top']['full'] = array();
     $this->toolbars['top']['half'] = array();
     $this->toolbars['bottom']['full'] = array();
     $this->toolbars['bottom']['half'] = array();
     $this->def_stepping = $default_stepping;
     $this->def_order_col = $default_order_col;
     $this->def_order_type = $default_order_type;
     $this->def_search_col = $default_search_col;
     $this->layoutVars = array();
     $this->sql = new sql();
     $this->listsql = new OOSql($qry);
     $this->qry = $qry;
     $this->rows = '';
     $this->num_rows = '';
     $this->curr_rows = '';
     $this->num_current_rows = '';
     $this->debug =& $this->sql->debugsql;
     $this->addGlobalParams(rex_a22_getDefaultGlobalParams());
     // Nur die Parameter anhängen, die vom default Wert abweichen
     if ($order_col != $default_order_col) {
         $this->addGlobalParam('order_col', $order_col);
     }
     if ($order_type != $default_order_type) {
         $this->addGlobalParam('order_type', $order_type);
     }
 }
コード例 #2
0
 function redirect($params = '')
 {
     $url = $this->apply_url;
     $hasParams = strpos($url, '?') !== false;
     if ($params != '') {
         if ($hasParams) {
             $url .= '&' . $params;
         } else {
             $url .= '?' . $params;
             $hasParams = true;
         }
     }
     $hasParams = strpos($url, '?') !== false;
     $def_params = rex_a22_getDefaultGlobalParams();
     if (is_array($def_params)) {
         foreach ($def_params as $name => $value) {
             if (strpos($url, '&' . $name . '=') === false && strpos($url, '?' . $name . '=') === false) {
                 if ($hasParams) {
                     $url .= '&' . $name . '=' . $value;
                 } else {
                     $url .= '?' . $name . '=' . $value;
                     $hasParams = true;
                 }
             }
         }
     }
     if ($this->debug) {
         exit('<hr />Redirect to:' . $url);
     }
     header('Location: ' . $url);
     exit;
 }