当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils_RecordBrowserCommon::get_records_count方法代码示例

本文整理汇总了PHP中Utils_RecordBrowserCommon::get_records_count方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon::get_records_count方法的具体用法?PHP Utils_RecordBrowserCommon::get_records_count怎么用?PHP Utils_RecordBrowserCommon::get_records_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils_RecordBrowserCommon的用法示例。


在下文中一共展示了Utils_RecordBrowserCommon::get_records_count方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: QFfield_select

 public static function QFfield_select(&$form, $field, $label, $mode, $default, $desc, $rb_obj)
 {
     if (self::QFfield_static_display($form, $field, $label, $mode, $default, $desc, $rb_obj)) {
         return;
     }
     $record = $rb_obj->record;
     $comp = array();
     $param = explode(';', $desc['param']);
     $crits_callback = isset($param[1]) ? $param[1] : null;
     $multi_adv_params_callback = isset($param[2]) ? explode('::', $param[2]) : null;
     $multi_adv_params = array();
     if (is_callable($multi_adv_params_callback)) {
         $multi_adv_params = call_user_func($multi_adv_params_callback, $record);
     }
     // check multi_adv_params structure and fill empty values
     if (!is_array($multi_adv_params)) {
         $multi_adv_params = array();
     }
     if (!isset($multi_adv_params['order'])) {
         $multi_adv_params['order'] = array();
     }
     if (!isset($multi_adv_params['cols'])) {
         $multi_adv_params['cols'] = array();
     }
     if (!isset($multi_adv_params['format_callback'])) {
         $multi_adv_params['format_callback'] = array();
     }
     $reference = explode('::', $param[0]);
     $tab = $reference[0];
     $columns = isset($reference[1]) ? $reference[1] : null;
     if (!isset($columns)) {
         trigger_error("Columns not set for field: {$field}");
     }
     if ($tab == '__COMMON__') {
         $order = isset($reference[2]) ? $reference[2] : 'value';
         $data = Utils_CommonDataCommon::get_translated_tree($columns, $order == 'key');
         if (!is_array($data)) {
             $data = array();
         }
         $comp = $comp + $data;
         $rec_count = 0;
         $label = Utils_RecordBrowserCommon::get_field_tooltip($label, 'commondata', $columns);
     } else {
         if (isset($crits_callback)) {
             $crit_callback = explode('::', $crits_callback);
             if (is_callable($crit_callback)) {
                 $crits = call_user_func($crit_callback, false, $record);
                 $adv_crits = call_user_func($crit_callback, true, $record);
             } else {
                 $crits = $adv_crits = array();
             }
             if ($adv_crits === $crits) {
                 $adv_crits = null;
             }
             if ($adv_crits !== null) {
                 $crits = $adv_crits;
             }
         } else {
             $crits = array();
         }
         if ($tab == '__RECORDSETS__') {
             $tabs = DB::GetCol('SELECT tab FROM recordbrowser_table_properties');
         } else {
             $tabs = explode(',', $tab);
         }
         $single_tab = count($tabs) == 1;
         if (!$single_tab && empty($crits)) {
             foreach ($tabs as $tab) {
                 $crits[$tab] = array();
             }
         }
         // get related records with proper columns
         $col_id = array();
         if ($single_tab) {
             $columns = array_filter(explode('|', $columns));
             foreach ($columns as $c) {
                 $col_id[] = self::get_field_id($c);
             }
         }
         $rec_count = 0;
         foreach ($tabs as $t) {
             if (!empty($crits) && !$single_tab && !isset($crits[$t])) {
                 continue;
             }
             $rec_count += Utils_RecordBrowserCommon::get_records_count($t, $single_tab ? $crits : $crits[$t], null);
         }
         if ($rec_count <= Utils_RecordBrowserCommon::$options_limit) {
             $records = array();
             foreach ($tabs as $t) {
                 if (!empty($crits) && !$single_tab && !isset($crits[$t])) {
                     continue;
                 }
                 $access = self::get_access($t, 'selection', null, true);
                 if ($access === false) {
                     continue;
                 }
                 if ($access !== true && is_array($access)) {
                     if ($single_tab) {
                         $crits = self::merge_crits($crits, $access);
                     } elseif (isset($crits[$t]) && is_array($crits[$t]) && $crits[$t]) {
//.........这里部分代码省略.........
开发者ID:cretzu89,项目名称:EPESI,代码行数:101,代码来源:RecordBrowserCommon_0.php

示例2: mini_view

    public function mini_view($cols, $crits, $order, $info=null, $limit=null, $conf = array('actions_edit'=>true, 'actions_info'=>true), & $opts = array()){
        unset($_SESSION['client']['recordbrowser']['admin_access']);
        $this->init();
        $gb = $this->init_module('Utils/GenericBrowser',$this->tab,$this->tab);
        $field_hash = array();
        foreach($this->table_rows as $field => $args)
            $field_hash[$args['id']] = $field;
        $header = array();
        $callbacks = array();
        foreach($cols as $k=>$v) {
            if (isset($v['callback'])) $callbacks[] = $v['callback'];
            else $callbacks[] = null;
            if (is_array($v)) {
                $arr = array('name'=>_V($field_hash[$v['field']])); // TRSL
				if (isset($v['width'])) $arr['width'] = $v['width'];
                $cols[$k] = $v['field'];
            } else {
                $arr = array('name'=>_V($field_hash[$v])); // TRSL
                $cols[$k] = $v;
            }
            if (isset($v['label'])) $arr['name'] = $v['label'];
            $arr['wrapmode'] = 'nowrap';
            $header[] = $arr;
        }
        $gb->set_table_columns($header);
        $gb->set_fixed_columns_class($this->fixed_columns_class);

        $clean_order = array();
        foreach($order as $k=>$v) {
    	    if ($k==':Visited_on') $field_hash[$k] = $k;
    	    if ($k==':Fav') $field_hash[$k] = $k;
    	    if ($k==':Edited_on') $field_hash[$k] = $k;
            if ($k==':id') $field_hash[$k] = $k;
            $clean_order[] = array('column'=>$field_hash[$k],'order'=>$field_hash[$k],'direction'=>$v);
        }
        if ($limit!=null && !isset($conf['force_limit'])) {
            $limit = array('offset'=>0, 'numrows'=>$limit);
            $records_qty = Utils_RecordBrowserCommon::get_records_count($this->tab, $crits);
            if ($records_qty>$limit['numrows']) {
                if ($this->get_module_variable('no_limit_in_mini_view',false)) {
                    $opts['actions'][] = '<a '.Utils_TooltipCommon::open_tag_attrs(__('Display first %d records', array($limit['numrows']))).' '.$this->create_callback_href(array($this, 'set_no_limit_in_mini_view'), array(false)).'><img src="'.Base_ThemeCommon::get_template_file('Utils_RecordBrowser','show_some.png').'" border="0"></a>';
                    $limit = null;
                } else {
                    print(__('Displaying %s of %s records', array($limit['numrows'], $records_qty)));
                    $opts['actions'][] = '<a '.Utils_TooltipCommon::open_tag_attrs(__('Display all records')).' '.$this->create_callback_href(array($this, 'set_no_limit_in_mini_view'), array(true)).'><img src="'.Base_ThemeCommon::get_template_file('Utils_RecordBrowser','show_all.png').'" border="0"></a>';
                }
            }
        }
        $records = Utils_RecordBrowserCommon::get_records($this->tab, $crits, array(), $clean_order, $limit);
        foreach($records as $v) {
            $gb_row = $gb->get_new_row();
            $arr = array();
            foreach($cols as $k=>$w) {
                if (!isset($callbacks[$k])) $s = $this->get_val($field_hash[$w], $v, false, $this->table_rows[$field_hash[$w]]);
                else $s = call_user_func($callbacks[$k], $v);
                $arr[] = $s;
            }
            $gb_row->add_data_array($arr);
            if (is_callable($info)) {
                $additional_info = call_user_func($info, $v);
            } else $additional_info = '';
            if (!is_array($additional_info) && isset($additional_info)) $additional_info = array('notes'=>$additional_info);
            if (isset($additional_info['notes'])) $additional_info['notes'] = $additional_info['notes'].'<hr />';
            if (isset($additional_info['row_attrs'])) $gb_row->set_attrs($additional_info['row_attrs']);
            if (isset($conf['actions_info']) && $conf['actions_info']) $gb_row->add_info($additional_info['notes'].Utils_RecordBrowserCommon::get_html_record_info($this->tab, $v['id']));
            if (isset($conf['actions_view']) && $conf['actions_view']) $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_entry', 'view',$v['id'])),'View');
            if (isset($conf['actions_edit']) && $conf['actions_edit']) if ($this->get_access('edit',$v)) $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_entry', 'edit',$v['id'])),'Edit');
            if (isset($conf['actions_delete']) && $conf['actions_delete']) if ($this->get_access('delete',$v)) $gb_row->add_action($this->create_confirm_callback_href(__('Are you sure you want to delete this record?'),array($this,'delete_record'),array($v['id'], false)),'Delete');
            if (isset($conf['actions_history']) && $conf['actions_history']) {
                $r_info = Utils_RecordBrowserCommon::get_record_info($this->tab, $v['id']);
                if ($r_info['edited_on']===null) $gb_row->add_action('','This record was never edited',null,'history_inactive');
                else $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_edit_history', $v['id'])),'View edit history',null,'history');
            }
            $this->call_additional_actions_methods($v, $gb_row);
        }
        $this->display_module($gb);
    }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:77,代码来源:RecordBrowser_0.php

示例3: ob_start

$rb->construct($tab);
$rb->set_inline_display();
$rb->set_header_properties($more_table_properties);
$rb->disable_pagination();

ob_start();
$rb->show_data($crits, $cols, $order, $admin, false, true, $limit);
$html = ob_get_clean();

$limit_info = '';
if (is_array($limit)) {
    $offset = $limit['offset'];
    $per_page = $limit['numrows'];
    $start = $offset + 1;
    $end = $offset + $per_page;
    $total = Utils_RecordBrowserCommon::get_records_count($tab, $crits, $admin, $order);
    if ($end > $total)
        $end = $total;
    $limit_info = __('Records %s to %s of %s', array($start, $end, $total)) . "\n";
}

$tcpdf = Libs_TCPDFCommon::new_pdf();

$filters = implode(' ',Utils_RecordBrowserCommon::crits_to_words($tab, $crits));
$filters = strip_tags($filters);
$filters = str_replace('&nbsp;', ' ', $filters);
$filters = str_replace(' and ', "\n", $filters);
$filters = str_replace(' is equal to', ':', $filters);

$subject = $limit_info . $filters;
Libs_TCPDFCommon::prepare_header($tcpdf, _V(DB::GetOne('SELECT caption FROM recordbrowser_table_properties WHERE tab=%s', array($tab))), $subject, false);
开发者ID:62BRAINS,项目名称:EPESI,代码行数:31,代码来源:print.php

示例4: archive

 private function archive($uids, $verbose = true)
 {
     global $E_SESSION;
     $rcmail = rcmail::get_instance();
     $path = getcwd();
     chdir(str_replace(array('/modules/CRM/Roundcube/RC', '\\modules\\CRM\\Roundcube\\RC'), '', $path));
     $msgs = array();
     if (!is_array($uids)) {
         $uids = $uids->get();
     }
     foreach ($uids as $uid) {
         $msg = new rcube_message($uid);
         if ($msg === null || empty($msg->headers)) {
             if ($verbose) {
                 $rcmail->output->command('display_message', 'messageopenerror', 'error');
             }
             return false;
         } else {
             $msgs[$uid] = $msg;
         }
     }
     $map = array();
     foreach ($msgs as $k => $msg) {
         $sends = $rcmail->storage->decode_address_list($msg->headers->to);
         $map[$k] = array();
         foreach ($sends as $send) {
             $addr = $send['mailto'];
             $ret = $this->look_contact($addr);
             $map[$k] = array_merge($map[$k], $ret);
         }
         $addr = $rcmail->storage->decode_address_list($msg->headers->from);
         if ($addr) {
             $addr = array_shift($addr);
         }
         if (!isset($addr['mailto']) || !$addr['mailto']) {
             $map[$k] = false;
             continue;
         }
         $ret = $this->look_contact($addr['mailto']);
         $map[$k] = array_merge($map[$k], $ret);
     }
     if (!isset($_SESSION['force_archive'])) {
         $_SESSION['force_archive'] = array();
     }
     foreach ($map as $k => $ret) {
         if (!$ret && !isset($_SESSION['force_archive'][$k]) && $verbose) {
             $_SESSION['force_archive'][$k] = 1;
             $rcmail->output->command('display_message', $this->gettext('contactnotfound'), 'error');
             return false;
         }
     }
     $attachments_dir = DATA_DIR . '/CRM_Roundcube/attachments/';
     $epesi_mails = array();
     if (!file_exists($attachments_dir)) {
         mkdir($attachments_dir);
     }
     foreach ($msgs as $k => $msg) {
         $contacts = $map[$k];
         $mime_map = array();
         foreach ($msg->mime_parts as $mid => $m) {
             $mime_map[$m->mime_id] = md5($k . microtime(true) . $mid);
         }
         if ($msg->has_html_part()) {
             //            $body = $msg->first_html_part();
             foreach ($msg->mime_parts as $mime_id => $part) {
                 $mimetype = strtolower($part->ctype_primary . '/' . $part->ctype_secondary);
                 if ($mimetype == 'text/html') {
                     $body = $rcmail->storage->get_message_part($msg->uid, $mime_id, $part);
                     if (isset($part->replaces)) {
                         $cid_map = $part->replaces;
                     } else {
                         $cid_map = array();
                     }
                     break;
                 }
             }
             foreach ($cid_map as $k => &$v) {
                 if (preg_match('/_part=(.*?)&/', $v, $matches)) {
                     $mid = $matches[1];
                     if (isset($mime_map[$mid])) {
                         $v = 'get.php?' . http_build_query(array('mail_id' => '__MAIL_ID__', 'mime_id' => $mime_map[$mid]));
                     }
                 } else {
                     unset($cid_map[$k]);
                 }
             }
             $body = rcmail_wash_html($body, array('safe' => true, 'inline_html' => true), $cid_map);
         } else {
             $body = '<pre>' . $msg->first_text_part() . '</pre>';
         }
         $date = rcube_imap_generic::strToTime($msg->get_header('DATE'));
         $headers = array();
         foreach ($msg->headers as $k => $v) {
             if (is_string($v) && $k != 'from' && $k != 'to' && $k != 'body_structure') {
                 $headers[] = $k . ': ' . rcube_mime::decode_mime_string((string) $v);
             }
         }
         $message_id = str_replace(array('<', '>'), '', $msg->get_header('MESSAGE-ID'));
         if (Utils_RecordBrowserCommon::get_records_count('rc_mails', array('message_id' => $message_id)) > 0) {
             $rcmail->output->command('display_message', $this->gettext('archived_duplicate'), 'warning');
//.........这里部分代码省略.........
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:epesi_archive.php

示例5: get_records_count

 /**
  * Get records count from recordset.
  * @param array $crits
  * @param bool $admin Admin mode - count deleted records also
  * @param array $order
  * @return int records count
  */
 public function get_records_count($crits = null, $admin = false, $order = array())
 {
     return Utils_RecordBrowserCommon::get_records_count($this->tab, $crits, $admin, $order);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:11,代码来源:Recordset.php

示例6: QFfield_company

 public static function QFfield_company(&$form, $field, $label, $mode, $default, $desc, $rb, $display_callbacks)
 {
     static $showed_create_company = false;
     if (($mode == 'add' || $mode == 'edit') && is_object($rb) && $rb->tab === 'contact' && !$showed_create_company) {
         $showed_create_company = true;
         if (self::$paste_or_new == 'new') {
             $access = Utils_RecordBrowserCommon::get_access('contact', $mode, Utils_RecordBrowser::$last_record);
             $c_access = Utils_RecordBrowserCommon::get_access('company', 'add');
             if ($c_access && $access['company_name']) {
                 $form->addElement('checkbox', 'create_company', __('Create new company'), null, 'onClick="document.getElementById(\'company_name\').disabled = this.checked;document.getElementsByName(\'create_company_name\')[0].disabled=!this.checked;" ' . Utils_TooltipCommon::open_tag_attrs(__('Create a new company for this contact')));
                 $form->addElement('text', 'create_company_name', __('New company name'), array('disabled' => 1));
                 $form->addFormRule(array('CRM_ContactsCommon', 'check_new_company_name'));
                 if (isset($rb) && isset($rb->record['last_name']) && isset($rb->record['first_name'])) {
                     $form->setDefaults(array('create_company_name' => $rb->record['last_name'] . ' ' . $rb->record['first_name']));
                 }
                 eval_js('Event.observe(\'last_name\',\'change\', update_create_company_name_field);' . 'Event.observe(\'first_name\',\'change\', update_create_company_name_field);' . 'function update_create_company_name_field() {' . 'document.forms[\'' . $form->getAttribute('name') . '\'].create_company_name.value = document.forms[\'' . $form->getAttribute('name') . '\'].last_name.value+" "+document.forms[\'' . $form->getAttribute('name') . '\'].first_name.value;' . '}');
                 eval_js('$("company_name").disabled = document.getElementsByName("create_company")[0].checked;document.getElementsByName("create_company_name")[0].disabled=!document.getElementsByName("create_company")[0].checked;');
             }
         } else {
             $comp = self::get_company(self::$paste_or_new);
             foreach ($comp as &$cf) {
                 if (is_string($cf)) {
                     $cf = escapeJS($cf);
                 }
             }
             $paste_company_info = 'document.getElementsByName(\'address_1\')[0].value=\'' . $comp['address_1'] . '\';' . 'document.getElementsByName(\'address_2\')[0].value=\'' . $comp['address_2'] . '\';' . 'document.getElementsByName(\'work_phone\')[0].value=\'' . $comp['phone'] . '\';' . 'document.getElementsByName(\'fax\')[0].value=\'' . $comp['fax'] . '\';' . 'document.getElementsByName(\'city\')[0].value=\'' . $comp['city'] . '\';' . 'document.getElementsByName(\'postal_code\')[0].value=\'' . $comp['postal_code'] . '\';' . 'var country = $(\'country\');' . 'var k = 0; while (k < country.options.length) if (country.options[k].value==\'' . $comp['country'] . '\') break; else k++;' . 'country.selectedIndex = k;' . 'country.fire(\'e_u_cd:load\');' . 'setTimeout(\'' . 'var zone = $(\\\'zone\\\'); k = 0; while (k < zone.options.length) if (zone.options[k].value==\\\'' . $comp['zone'] . '\\\') break; else k++;' . 'zone.selectedIndex = k;' . '\',900);' . 'document.getElementsByName(\'web_address\')[0].value=\'' . $comp['web_address'] . '\';';
             Base_ActionBarCommon::add('add', __('Paste Company Info'), 'href="javascript:void(0);" onclick="' . $paste_company_info . '"');
         }
     }
     $comp = array();
     $param = explode(';', $desc['param']);
     if ($mode == 'add' || $mode == 'edit') {
         if (isset($param[1]) && $param[1] != '::') {
             $crits = call_user_func(explode('::', $param[1]), false, isset($rb->record) ? $rb->record : null);
         } else {
             $crits = array();
         }
         if (isset($crits['_no_company_option'])) {
             $no_company_option = true;
             unset($crits['_no_company_option']);
         } else {
             $no_company_option = false;
         }
         $count = Utils_RecordBrowserCommon::get_records_count('company', $crits);
         if ($count > Utils_RecordBrowserCommon::$options_limit) {
             $companies = array();
         } else {
             $companies = self::get_companies($crits);
             if (!is_array($default)) {
                 if ($default != '') {
                     $default = array($default);
                 } else {
                     $default = array();
                 }
             }
             $ext_rec = array_flip($default);
             foreach ($companies as $v) {
                 $comp[$v['id']] = $v['company_name'];
                 unset($ext_rec[$v['id']]);
             }
             foreach ($ext_rec as $k => $v) {
                 $c = CRM_ContactsCommon::get_company($k);
                 $comp[$k] = $c['company_name'];
             }
             natcasesort($comp);
             $key = '';
             if ($no_company_option) {
                 $comp = array('' => '[' . __('w/o company') . ']') + $comp;
                 $key = -1;
             }
             if ($desc['type'] !== 'multiselect') {
                 $comp = array($key => '---') + $comp;
             }
         }
         $label = Utils_RecordBrowserCommon::get_field_tooltip($label, $desc['type'], 'company', $crits);
         if ($count > Utils_RecordBrowserCommon::$options_limit) {
             $callback = array('CRM_ContactsCommon', 'display_company');
             if ($desc['type'] !== 'multiselect') {
                 $form->addElement('autoselect', $field, $label, array(), array(array('CRM_ContactsCommon', 'autoselect_company_suggestbox'), array($crits, $callback)), $callback, array('id' => $field));
             } else {
                 $form->addElement('automulti', $field, $label, array('CRM_ContactsCommon', 'autoselect_company_suggestbox'), array($crits, $callback), $callback);
             }
             //                  $form->addElement($desc['type'], $field, $label, $comp, array('id'=>$field));
         } else {
             $form->addElement($desc['type'], $field, $label, $comp, array('id' => $field));
         }
         if ($mode !== 'add') {
             $form->setDefaults(array($field => $default));
         }
     } else {
         /*$def = '';
           $first = true;
           if (is_numeric($default) || is_array($default)) {
               if (!is_array($default)) $default = array($default);
               foreach($default as $k=>$v){
                   if ($v=='') break;
                   if ($first) $first = false;
                   else $def .= '<br>';
                   $def .= Utils_RecordBrowserCommon::no_wrap(Utils_RecordBrowserCommon::create_linked_label('company', 'Company Name', $v));
               }
//.........这里部分代码省略.........
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:ContactsCommon_0.php

示例7: count

	public static function count($group=null,$group_starts_with=false) {
		return Utils_RecordBrowserCommon::get_records_count('utils_attachment',array('id'=>self::get_where($group,$group_starts_with)));
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:3,代码来源:AttachmentCommon_0.php

示例8: attachment_getters

 public static function attachment_getters()
 {
     $ret = Utils_RecordBrowserCommon::get_records_count('rc_accounts', array('epesi_user' => Acl::get_user()));
     if ($ret) {
         return array(_M('Mail') => array('func' => 'mail_file', 'icon' => Base_ThemeCommon::get_template_file(CRM_Roundcube::module_name(), 'icon.png')));
     }
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:RoundcubeCommon_0.php

示例9: get_slots

 public static function get_slots($tab, $tray_settings)
 {
     if (!isset($tray_settings['__title__']) || !isset($tray_settings['__slots__'])) {
         return array();
     }
     $ret = array();
     foreach ($tray_settings['__slots__'] as $slot) {
         if (!isset($slot['__name__'])) {
             continue;
         }
         $crits = self::get_slot_crits($slot, $tray_settings);
         $slot_id = Utils_RecordBrowserCommon::get_field_id($slot['__name__']);
         $ret[$slot_id] = $slot + array('__id__' => $slot_id, '__count__' => Utils_RecordBrowserCommon::get_records_count($tab, $crits), '__crits__' => $crits);
     }
     return $ret;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:16,代码来源:TrayCommon_0.php

示例10: array

        $open = self::record_link_open_tag($table, $v['id'], false);
        $close = self::record_link_close_tag();
        $row = $open . $row_sort . $close . $open . $row_info . $close;
        print '<li class="arrow">' . $row . '</li>';
    } else {
        $data_out[] = $row;
    }
}
//display table
if (IPHONE) {
    print '</ul>';
} else {
    Utils_GenericBrowserCommon::mobile_table($cols_out, $data_out, false);
}
//display paging
$cur_num_rows = Utils_RecordBrowserCommon::get_records_count($table, $crits);
if ($offset > 0) {
    print '<a ' . (IPHONE ? 'class="button red" ' : '') . 'href="mobile.php?' . http_build_query(array_merge($_GET, array('rb_offset' => $offset - 1))) . '">' . __('Prev') . '</a>';
}
if ($offset < $cur_num_rows / $num_rows - 1) {
    print ' <a ' . (IPHONE ? 'class="button green" ' : '') . 'href="mobile.php?' . http_build_query(array_merge($_GET, array('rb_offset' => $offset + 1))) . '">' . __('Next') . '</a>';
}
if ($cur_num_rows > $num_rows) {
    $qf = new HTML_QuickForm('rb_page', 'get', 'mobile.php?' . http_build_query($_GET));
    $qf->addElement('text', 'rb_offset', __('Page(0-%d)', array($cur_num_rows / $num_rows)));
    $qf->addElement('submit', 'submit_button', __('OK'), IPHONE ? 'class="button white"' : '');
    $qf->addRule('rb_offset', __('Field required'), 'required');
    $qf->addRule('rb_offset', __('Invalid page number'), 'numeric');
    $renderer =& $qf->defaultRenderer();
    /*	if(IPHONE) {
    		$renderer->setFormTemplate("<form{attributes}>{hidden}<ul>{content}</ul></form>");
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:mobile.php


注:本文中的Utils_RecordBrowserCommon::get_records_count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。