本文整理汇总了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';
}
示例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';
}