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


PHP FrmAppHelper::frm_get_main_message方法代码示例

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


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

示例1: display_list

 function display_list($params = false, $message = '', $page_params_ov = false, $current_page_ov = false, $errors = array())
 {
     global $wpdb, $frmprodb, $frmpro_display, $frm_form, $frm_app_helper, $frm_page_size;
     if (!$params) {
         $params = $this->get_params();
     }
     if ($message == '') {
         $message = FrmAppHelper::frm_get_main_message();
     }
     $form = $params['form'];
     if (class_exists('WP_List_Table')) {
         require_once FRMPRO_PATH . '/classes/helpers/FrmProListHelper.php';
         $wp_list_table = new FrmProListHelper(array('singular' => 'display', 'plural' => 'displays', 'table_name' => $frmprodb->displays, 'page_name' => 'entry-templates', 'params' => $params));
         $pagenum = $wp_list_table->get_pagenum();
         $wp_list_table->prepare_items();
         $total_pages = $wp_list_table->get_pagination_arg('total_pages');
         if ($pagenum > $total_pages && $total_pages > 0) {
             wp_redirect(add_query_arg('paged', $total_pages));
             exit;
         }
     } else {
         $page_params = '&action=0&frm_action=0';
         $where_clause = '';
         $form_vars = $this->get_form_sort_vars($params, $where_clause);
         $current_page = $current_page_ov ? $current_page_ov : $params['paged'];
         $page_params = $page_params_ov ? $page_params_ov : $form_vars['page_params'];
         $sort_str = $form_vars['sort_str'];
         $sdir_str = $form_vars['sdir_str'];
         $search_str = $form_vars['search_str'];
         $form = $form_vars['form'];
         $record_count = $frm_app_helper->getRecordCount($form_vars['where_clause'], $frmprodb->displays);
         $page_count = $frm_app_helper->getPageCount($frm_page_size, $record_count, $frmprodb->displays);
         $displays = $frm_app_helper->getPage($current_page, $frm_page_size, $form_vars['where_clause'], $form_vars['order_by'], $frmprodb->displays);
         $page_last_record = $frm_app_helper->getLastRecordNum($record_count, $current_page, $frm_page_size);
         $page_first_record = $frm_app_helper->getFirstRecordNum($record_count, $current_page, $frm_page_size);
     }
     require_once FRMPRO_VIEWS_PATH . '/displays/list.php';
 }
开发者ID:edelkevis,项目名称:git-plus-wordpress,代码行数:38,代码来源:FrmProDisplaysController.php

示例2: display_forms_list

 function display_forms_list($params = false, $message = '', $page_params_ov = false, $current_page_ov = false, $errors = array())
 {
     global $wpdb, $frmdb, $frm_app_helper, $frm_form, $frm_entry, $frm_page_size, $frmpro_is_installed;
     if (!$params) {
         $params = $this->get_params();
     }
     if ($message == '') {
         $message = FrmAppHelper::frm_get_main_message();
     }
     $page_params = '&action=0&&frm_action=0&page=formidable';
     if ($params['template']) {
         $default_templates = $frm_form->getAll(array('default_template' => 1));
         $all_templates = $frm_form->getAll(array('is_template' => 1), 'name');
     }
     if (class_exists('WP_List_Table')) {
         require_once FRM_PATH . '/classes/helpers/FrmListHelper.php';
         $args = array('table_name' => $frmdb->forms, 'params' => $params);
         $args['page_name'] = $params['template'] ? '-template' : '';
         $wp_list_table = new FrmListHelper($args);
         unset($args);
         $pagenum = $wp_list_table->get_pagenum();
         $wp_list_table->prepare_items();
         $total_pages = $wp_list_table->get_pagination_arg('total_pages');
         if ($pagenum > $total_pages && $total_pages > 0) {
             wp_redirect(add_query_arg('paged', $total_pages));
             exit;
         }
         if (!empty($_REQUEST['s'])) {
             $page_params .= '&s=' . urlencode($_REQUEST['s']);
         }
     } else {
         $where_clause = " (status is NULL OR status = '' OR status = 'published') AND default_template=0 AND is_template = " . $params['template'];
         $form_vars = $this->get_form_sort_vars($params, $where_clause);
         $current_page = $current_page_ov ? $current_page_ov : $params['paged'];
         $page_params .= $page_params_ov ? $page_params_ov : $form_vars['page_params'];
         $sort_str = $form_vars['sort_str'];
         $sdir_str = $form_vars['sdir_str'];
         $search_str = $form_vars['search_str'];
         $record_count = $frm_app_helper->getRecordCount($form_vars['where_clause'], $frmdb->forms);
         $page_count = $frm_app_helper->getPageCount($frm_page_size, $record_count, $frmdb->forms);
         $forms = $frm_app_helper->getPage($current_page, $frm_page_size, $form_vars['where_clause'], $form_vars['order_by'], $frmdb->forms);
         $page_last_record = $frm_app_helper->getLastRecordNum($record_count, $current_page, $frm_page_size);
         $page_first_record = $frm_app_helper->getFirstRecordNum($record_count, $current_page, $frm_page_size);
     }
     require FRM_VIEWS_PATH . '/frm-forms/list.php';
 }
开发者ID:edelkevis,项目名称:git-plus-wordpress,代码行数:46,代码来源:FrmFormsController.php


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