本文整理汇总了PHP中GFEntryDetail类的典型用法代码示例。如果您正苦于以下问题:PHP GFEntryDetail类的具体用法?PHP GFEntryDetail怎么用?PHP GFEntryDetail使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GFEntryDetail类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gform_default_entry_content
function gform_default_entry_content($form, $entry, $entry_ids)
{
$page_break = rgget('page_break') ? 'print-page-break' : false;
// Separate each entry inside a form element so radio buttons don't get treated as a single group across multiple entries.
echo '<form>';
GFEntryDetail::lead_detail_grid($form, $entry);
echo '</form>';
if (rgget('notes')) {
$notes = RGFormsModel::get_lead_notes($entry['id']);
if (!empty($notes)) {
GFEntryDetail::notes_grid($notes, false);
}
}
// output entry divider/page break
if (array_search($entry['id'], $entry_ids) < count($entry_ids) - 1) {
echo '<div class="print-hr ' . $page_break . '"></div>';
}
}
示例2: forms
public static function forms()
{
if (!GFCommon::ensure_wp_version()) {
return;
}
if (self::maybe_display_installation_wizard()) {
return;
}
$id = RGForms::get('id');
$view = RGForms::get('view');
if ($view == 'entries') {
require_once GFCommon::get_base_path() . '/entry_list.php';
GFEntryList::leads_page($id);
} else {
if ($view == 'entry') {
require_once GFCommon::get_base_path() . '/entry_detail.php';
GFEntryDetail::lead_detail_page();
} else {
if ($view == 'notification') {
require_once GFCommon::get_base_path() . '/notification.php';
//GFNotification::notification_page($id);
} else {
if ($view == 'settings') {
require_once GFCommon::get_base_path() . '/form_settings.php';
GFFormSettings::form_settings_page($id);
} else {
if (empty($view)) {
if (is_numeric($id)) {
self::forms_page($id);
} else {
self::form_list_page();
}
}
}
}
}
}
do_action('gform_view', $view, $id);
}
示例3: lead_detail_page
public static function lead_detail_page()
{
global $current_user;
if (!GFCommon::ensure_wp_version()) {
return;
}
echo GFCommon::get_remote_message();
$form = RGFormsModel::get_form_meta(absint($_GET['id']));
$form_id = absint($form['id']);
$form = apply_filters('gform_admin_pre_render_' . $form_id, apply_filters('gform_admin_pre_render', $form));
$lead_id = absint(rgget('lid'));
$filter = rgget('filter');
$status = in_array($filter, array('trash', 'spam')) ? $filter : 'active';
$position = rgget('pos') ? rgget('pos') : 0;
$sort_direction = rgget('dir') ? rgget('dir') : 'DESC';
$sort_field = empty($_GET['sort']) ? 0 : $_GET['sort'];
$sort_field_meta = RGFormsModel::get_field($form, $sort_field);
$is_numeric = $sort_field_meta['type'] == 'number';
$star = $filter == 'star' ? 1 : null;
$read = $filter == 'unread' ? 0 : null;
$search_criteria['status'] = $status;
if ($star) {
$search_criteria['field_filters'][] = array('key' => 'is_starred', 'value' => (bool) $star);
}
if (!is_null($read)) {
$search_criteria['field_filters'][] = array('key' => 'is_read', 'value' => (bool) $read);
}
$search_field_id = rgget('field_id');
if (isset($_GET['field_id']) && $_GET['field_id'] !== '') {
$key = $search_field_id;
$val = rgget('s');
$strpos_row_key = strpos($search_field_id, '|');
if ($strpos_row_key !== false) {
//multi-row likert
$key_array = explode('|', $search_field_id);
$key = $key_array[0];
$val = $key_array[1] . ':' . $val;
}
$search_criteria['field_filters'][] = array('key' => $key, 'operator' => rgempty('operator', $_GET) ? 'is' : rgget('operator'), 'value' => $val);
$type = rgget('type');
if (empty($type)) {
if (rgget('field_id') == '0') {
$search_criteria['type'] = 'global';
}
}
}
$paging = array('offset' => $position, 'page_size' => 1);
if (!empty($sort_field)) {
$sorting = array('key' => $_GET['sort'], 'direction' => $sort_direction, 'is_numeric' => $is_numeric);
} else {
$sorting = array();
}
$total_count = 0;
$leads = GFAPI::get_entries($form['id'], $search_criteria, $sorting, $paging, $total_count);
$prev_pos = !rgblank($position) && $position > 0 ? $position - 1 : false;
$next_pos = !rgblank($position) && $position < $total_count - 1 ? $position + 1 : false;
// unread filter requires special handling for pagination since entries are filter out of the query as they are read
if ($filter == 'unread') {
$next_pos = $position;
if ($next_pos + 1 == $total_count) {
$next_pos = false;
}
}
if (!$lead_id) {
$lead = !empty($leads) ? $leads[0] : false;
} else {
$lead = GFAPI::get_entry($lead_id);
}
if (!$lead) {
esc_html_e("Oops! We couldn't find your entry. Please try again", 'gravityforms');
return;
}
RGFormsModel::update_lead_property($lead['id'], 'is_read', 1);
switch (RGForms::post('action')) {
case 'update':
check_admin_referer('gforms_save_entry', 'gforms_save_entry');
//Loading files that have been uploaded to temp folder
$files = GFCommon::json_decode(stripslashes(RGForms::post('gform_uploaded_files')));
if (!is_array($files)) {
$files = array();
}
GFFormsModel::$uploaded_files[$form_id] = $files;
GFFormsModel::save_lead($form, $lead);
do_action('gform_after_update_entry', $form, $lead['id']);
do_action("gform_after_update_entry_{$form['id']}", $form, $lead['id']);
$lead = RGFormsModel::get_lead($lead['id']);
$lead = GFFormsModel::set_entry_meta($lead, $form);
break;
case 'add_note':
check_admin_referer('gforms_update_note', 'gforms_update_note');
$user_data = get_userdata($current_user->ID);
RGFormsModel::add_note($lead['id'], $current_user->ID, $user_data->display_name, stripslashes($_POST['new_note']));
//emailing notes if configured
if (rgpost('gentry_email_notes_to')) {
GFCommon::log_debug('GFEntryDetail::lead_detail_page(): Preparing to email entry notes.');
$email_to = $_POST['gentry_email_notes_to'];
$email_from = $current_user->user_email;
$email_subject = stripslashes($_POST['gentry_email_subject']);
$body = stripslashes($_POST['new_note']);
$headers = "From: \"{$email_from}\" <{$email_from}> \r\n";
//.........这里部分代码省略.........
示例4: _e
<div><span class="actionlinks"><a href="javascript:;" onclick="window.print();" class="header-print-link">print this page</a> | <a href="javascript:window.close()" class="close_window"><?php
_e("close window", "gravityforms");
?>
</a></span><?php
_e("Print Preview", "gravityforms");
?>
</div>
</div>
<div id="view-container">
<?php
require_once GFCommon::get_base_path() . "/entry_detail.php";
foreach ($lead_ids as $lead_id) {
$lead = RGFormsModel::get_lead($lead_id);
do_action("gform_print_entry_header", $form, $lead);
GFEntryDetail::lead_detail_grid($form, $lead);
if (rgget('notes')) {
$notes = RGFormsModel::get_lead_notes($lead["id"]);
if (!empty($notes)) {
GFEntryDetail::notes_grid($notes, false);
}
}
// output entry divider/page break
if (array_search($lead_id, $lead_ids) < count($lead_ids) - 1) {
echo '<div class="print-hr ' . $page_break . '"></div>';
}
do_action("gform_print_entry_footer", $form, $lead);
}
?>
</div>
</body>
</html>
示例5: lead_detail_page
//.........这里部分代码省略.........
<input type="hidden" name="action" id="action" value=""/>
<input type="hidden" name="screen_mode" id="screen_mode" value="<?php
echo esc_attr(rgpost("screen_mode"));
?>
" />
<div class="wrap gf_entry_wrap">
<h2 class="gf_admin_page_title"><span><?php
echo __("Entry #", "gravityforms") . absint($lead["id"]);
?>
</span><span class="gf_admin_page_subtitle"><span class="gf_admin_page_formid">ID: <?php
echo $form['id'];
?>
</span><?php
echo $form['title'];
$gf_entry_locking = new GFEntryLocking();
$gf_entry_locking->lock_info($lead_id);
?>
</span></h2>
<?php
if (isset($_GET["pos"])) {
?>
<div class="gf_entry_detail_pagination">
<ul>
<li class="gf_entry_count"><span>entry <strong><?php
echo $position + 1;
?>
</strong> of <strong><?php
echo $total_count;
?>
</strong></span></li>
<li class="gf_entry_prev gf_entry_pagination"><?php
echo GFEntryDetail::entry_detail_pagination_link($prev_pos, 'Previous Entry', 'gf_entry_prev_link', "fa fa-arrow-circle-o-left");
?>
</li>
<li class="gf_entry_next gf_entry_pagination"><?php
echo GFEntryDetail::entry_detail_pagination_link($next_pos, 'Next Entry', 'gf_entry_next_link', "fa fa-arrow-circle-o-right");
?>
</li>
</ul>
</div>
<?php
}
?>
<?php
RGForms::top_toolbar();
?>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<div id="side-info-column" class="inner-sidebar">
<?php
do_action("gform_entry_detail_sidebar_before", $form, $lead);
?>
<!-- INFO BOX -->
<div id="submitdiv" class="stuffbox">
<h3>
<span class="hndle"><?php
_e("Entry", "gravityforms");
?>
</span>
</h3>
<div class="inside">
<div id="submitcomment" class="submitbox">
示例6: forms
public static function forms()
{
if (!GFCommon::ensure_wp_version()) {
return;
}
$id = RGForms::get("id");
$view = RGForms::get("view");
if ($view == "entries") {
require_once GFCommon::get_base_path() . "/entry_list.php";
GFEntryList::leads_page($id);
} else {
if ($view == "entry") {
require_once GFCommon::get_base_path() . "/entry_detail.php";
GFEntryDetail::lead_detail_page();
} else {
if ($view == "notification") {
require_once GFCommon::get_base_path() . "/notification.php";
GFNotification::notification_page($id);
} else {
if (is_numeric($id)) {
self::forms_page($id);
} else {
self::form_list_page();
}
}
}
}
}
示例7: load_screen_options
/**
* Loads the screen options for the entry detail page.
*
* @since 2.0
* @access public
* @static
* @see GFEntryDetail::add_meta_boxes
*/
public static function load_screen_options()
{
$screen = get_current_screen();
if (!is_object($screen)) {
return;
}
$page = GFForms::get_page();
if ($page == 'form_list') {
$args = array('label' => __('Forms per page', 'gravityforms'), 'default' => 20, 'option' => 'gform_forms_per_page');
add_screen_option('per_page', $args);
} elseif (in_array($page, array('entry_detail', 'entry_detail_edit'))) {
require_once GFCommon::get_base_path() . '/entry_detail.php';
GFEntryDetail::add_meta_boxes();
}
}
示例8: lead_detail_page
public static function lead_detail_page()
{
global $current_user;
if (!GFCommon::ensure_wp_version()) {
return;
}
echo GFCommon::get_remote_message();
$requested_form_id = absint($_GET['id']);
if (empty($requested_form_id)) {
return;
}
$lead = self::get_current_entry();
if (is_wp_error($lead) || !$lead) {
esc_html_e("Oops! We couldn't find your entry. Please try again", 'gravityforms');
return;
}
$lead_id = $lead['id'];
$form = self::get_current_form();
$form_id = absint($form['id']);
$total_count = self::get_total_count();
$position = rgget('pos') ? rgget('pos') : 0;
$prev_pos = !rgblank($position) && $position > 0 ? $position - 1 : false;
$next_pos = !rgblank($position) && $position < self::$_total_count - 1 ? $position + 1 : false;
$filter = rgget('filter');
// unread filter requires special handling for pagination since entries are filter out of the query as they are read
if ($filter == 'unread') {
$next_pos = $position;
if ($next_pos + 1 == $total_count) {
$next_pos = false;
}
}
RGFormsModel::update_lead_property($lead['id'], 'is_read', 1);
switch (RGForms::post('action')) {
case 'update':
check_admin_referer('gforms_save_entry', 'gforms_save_entry');
//Loading files that have been uploaded to temp folder
$files = GFCommon::json_decode(stripslashes(RGForms::post('gform_uploaded_files')));
if (!is_array($files)) {
$files = array();
}
$original_entry = $lead;
GFFormsModel::$uploaded_files[$form_id] = $files;
GFFormsModel::save_lead($form, $lead);
/**
* Fires after the Entry is updated from the entry detail page.
*
* @param array $form The form object for the entry.
* @param integer $lead['id'] The entry ID.
* @param array $original_entry The entry object before being updated.
*/
gf_do_action(array('gform_after_update_entry', $form['id']), $form, $lead['id'], $original_entry);
$lead = RGFormsModel::get_lead($lead['id']);
$lead = GFFormsModel::set_entry_meta($lead, $form);
self::set_current_entry($lead);
break;
case 'add_note':
check_admin_referer('gforms_update_note', 'gforms_update_note');
$user_data = get_userdata($current_user->ID);
RGFormsModel::add_note($lead['id'], $current_user->ID, $user_data->display_name, stripslashes($_POST['new_note']));
//emailing notes if configured
if (rgpost('gentry_email_notes_to')) {
GFCommon::log_debug('GFEntryDetail::lead_detail_page(): Preparing to email entry notes.');
$email_to = $_POST['gentry_email_notes_to'];
$email_from = $current_user->user_email;
$email_subject = stripslashes($_POST['gentry_email_subject']);
$body = stripslashes($_POST['new_note']);
$headers = "From: \"{$email_from}\" <{$email_from}> \r\n";
GFCommon::log_debug("GFEntryDetail::lead_detail_page(): Emailing notes - TO: {$email_to} SUBJECT: {$email_subject} BODY: {$body} HEADERS: {$headers}");
$is_success = wp_mail($email_to, $email_subject, $body, $headers);
$result = is_wp_error($is_success) ? $is_success->get_error_message() : $is_success;
GFCommon::log_debug("GFEntryDetail::lead_detail_page(): Result from wp_mail(): {$result}");
if (!is_wp_error($is_success) && $is_success) {
GFCommon::log_debug('GFEntryDetail::lead_detail_page(): Mail was passed from WordPress to the mail server.');
} else {
GFCommon::log_error('GFEntryDetail::lead_detail_page(): The mail message was passed off to WordPress for processing, but WordPress was unable to send the message.');
}
if (has_filter('phpmailer_init')) {
GFCommon::log_debug(__METHOD__ . '(): The WordPress phpmailer_init hook has been detected, usually used by SMTP plugins, it can impact mail delivery.');
}
/**
* Fires after a note is attached to an entry and sent as an email
*
* @param string $result The Error message or success message when the entry note is sent
* @param string $email_to The email address to send the entry note to
* @param string $email_from The email address from which the email is sent from
* @param string $email_subject The subject of the email that is sent
* @param mixed $body The Full body of the email containing the message after the note is sent
* @param array $form The current form object
* @param array $lead The Current lead object
*/
do_action('gform_post_send_entry_note', $result, $email_to, $email_from, $email_subject, $body, $form, $lead);
}
break;
case 'add_quick_note':
check_admin_referer('gforms_save_entry', 'gforms_save_entry');
$user_data = get_userdata($current_user->ID);
RGFormsModel::add_note($lead['id'], $current_user->ID, $user_data->display_name, stripslashes($_POST['quick_note']));
break;
case 'bulk':
check_admin_referer('gforms_update_note', 'gforms_update_note');
//.........这里部分代码省略.........
示例9: lead_detail_page
//.........这里部分代码省略.........
</script>
<form method="post" id="entry_form" enctype='multipart/form-data'>
<?php
wp_nonce_field('gforms_save_entry', 'gforms_save_entry');
?>
<input type="hidden" name="action" id="action" value=""/>
<input type="hidden" name="screen_mode" id="screen_mode" value="<?php
echo esc_attr(rgpost("screen_mode"));
?>
" />
<div class="wrap gf_entry_wrap">
<div class="icon32" id="gravity-title-icon"><br></div>
<h2><?php
_e("Entry #", "gravityforms");
echo absint($lead["id"]);
?>
</h2>
<?php
if (isset($_GET["pos"])) {
?>
<div class="gf_entry_detail_pagination">
<ul>
<li class="gf_entry_count"><span>entry <strong><?php
echo $position + 1;
?>
</strong> of <strong><?php
echo $lead_count;
?>
</strong></span></li>
<li class="gf_entry_prev gf_entry_pagination"><?php
echo GFEntryDetail::entry_detail_pagination_link($prev_pos, 'Previous Entry', 'gf_entry_prev_link');
?>
</li>
<li class="gf_entry_next gf_entry_pagination"><?php
echo GFEntryDetail::entry_detail_pagination_link($next_pos, 'Next Entry', 'gf_entry_next_link');
?>
</li>
</ul>
</div>
<?php
}
?>
<?php
RGForms::top_toolbar();
?>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<div id="side-info-column" class="inner-sidebar">
<div id="submitdiv" class="stuffbox">
<h3>
<span class="hndle"><?php
_e("Info", "gravityforms");
?>
</span>
</h3>
<div class="inside">
<div id="submitcomment" class="submitbox">
<div id="minor-publishing" style="padding:10px;">
<br/>
<?php
_e("Entry Id", "gravityforms");
?>
示例10: hide_empty_likert_field
/**
* Helper to determine if the empty field should be displayed when the lead detail grid is processed.
*
* @param array $form The Form object for the current Entry.
* @param string|array $value The field value.
*
* @return bool
*/
public function hide_empty_likert_field($form, $value)
{
$mode = empty($_POST['screen_mode']) ? 'view' : $_POST['screen_mode'];
$allow_display_empty_fields = $mode == 'view';
return GFCommon::is_empty_array($value) && !GFEntryDetail::maybe_display_empty_fields($allow_display_empty_fields, $form, false);
}
示例11: edit_lead_detail
public static function edit_lead_detail($Form, $lead, $options)
{
global $current_user, $_gform_directory_approvedcolumn;
require_once GFCommon::get_base_path() . "/form_display.php";
if (empty($_gform_directory_approvedcolumn)) {
$_gform_directory_approvedcolumn = self::get_approved_column($Form);
}
// We fetch this again, since it may have had some admin-only columns taken out.
#$lead = RGFormsModel::get_lead($lead["id"]);
// If you want to allow users to edit their own approval (?) add a filter and return true.
if (apply_filters('kws_gf_directory_allow_user_edit_approved', false) === false) {
$Form['fields'] = self::remove_approved_column('form', $Form['fields'], $_gform_directory_approvedcolumn);
}
// If this is not the form that should be edited
list($urlformid, $urlleadid) = self::get_form_and_lead_ids();
if (intval($Form['id']) !== intval($urlformid) || intval($lead['id']) !== intval($urlleadid)) {
return;
}
// If either of these two things are false (creator of lead, or admin)
if (!((!empty($options['useredit']) && is_user_logged_in() && intval($current_user->ID) === intval($lead['created_by'])) === true || (!empty($options['adminedit']) && self::has_access("gravityforms_directory")) === true)) {
// Kick them out.
printf(esc_html_e('%sYou do not have permission to edit this form.%s', 'gravity-forms-addons'), '<div class="error">', '</div>');
return;
}
$validation_message = '';
// If the form is submitted
if (RGForms::post("action") === "update") {
check_admin_referer('gforms_save_entry', 'gforms_save_entry');
$lead = apply_filters('kws_gf_directory_lead_being_updated', $lead, $Form);
// We don't DO passwords.
foreach ($Form['fields'] as $key => $field) {
if ($field['type'] === 'password') {
unset($Form['fields'][$key]);
}
}
$is_valid = GFFormDisplay::validate($Form, $lead);
$validation_message = '';
foreach ($Form['fields'] as $field) {
if (!GFCommon::is_product_field($field["type"])) {
$validation_message .= rgget("failed_validation", $field) && !empty($field["validation_message"]) ? sprintf("<li class='gfield_description validation_message'><strong>%s</strong>: %s</li>", $field["label"], $field["validation_message"]) : "";
}
}
if (!empty($validation_message)) {
$validation_message = '<ul>' . $validation_message . '</ul>';
echo esc_html(apply_filters('kws_gf_directory_lead_error_message', sprintf(__("%sThere were errors with the edit you made.%s%s", 'gravity-forms-addons'), "<div class='error' id='message' style='padding:.5em .75em; background-color:#ffffcc; border:1px solid #ccc;'><p>", "</p>", $validation_message . '</div>'), $lead, $Form));
}
// So the form submission always throws an error even though there's no problem.
// Product fields can't be edited, so that doesn't really matter.
if (!empty($is_valid) || empty($is_valid) && empty($validation_message)) {
do_action('kws_gf_directory_pre_update_lead', $lead, $Form);
// since @3.6.1 to enable conditional fields' updates.
self::save_lead($Form, $lead);
$lead = RGFormsModel::get_lead($lead["id"]);
do_action('kws_gf_directory_post_update_lead', $lead, $Form);
echo apply_filters('kws_gf_directory_lead_updated_message', sprintf(esc_html__("%sThe entry was successfully updated.%s", 'gravity-forms-addons'), "<p class='updated' id='message' style='padding:.5em .75em; background-color:#ffffcc; border:1px solid #ccc;'>", "</p>"), $lead, $Form);
return $lead;
}
}
if (isset($_GET['edit']) && wp_verify_nonce($_GET['edit'], 'edit' . $lead['id'] . $Form["id"]) || !empty($validation_message)) {
// The ID of the form needs to be `gform_{form_id}` for the pluploader
?>
<form method="post" id="gform_<?php
echo esc_attr($Form['id']);
?>
" enctype="multipart/form-data" action="<?php
echo remove_query_arg(array('gf_search', 'sort', 'dir', 'pagenum', 'edit'), add_query_arg(array()));
?>
">
<?php
wp_nonce_field('gforms_save_entry', 'gforms_save_entry');
?>
<input type="hidden" name="action" id="action" value="update"/>
<input type="hidden" name="screen_mode" id="screen_mode" value="edit" />
<?php
$form_without_products = $Form;
$post_message_shown = false;
$product_fields = array();
foreach ($Form['fields'] as $key => $field) {
if (GFCommon::is_product_field($field["type"]) || is_numeric($lead["post_id"]) && GFCommon::is_post_field($field)) {
if (is_numeric($lead["post_id"]) && GFCommon::is_post_field($field) && !$message_shown) {
echo apply_filters('kws_gf_directory_edit_post_details_text', sprintf(esc_html__('You can edit post details from the %1$spost page%2$s.', 'gravity-forms-addons'), '<a href="' . admin_url('post.php?action=edit&post=' . $lead["post_id"]) . '">', '</a>'), $field, $lead, $lead['post_id']);
$message_shown = true;
}
unset($form_without_products['fields'][$key]);
$product_fields[] = $field['id'];
if (!empty($field['inputs'])) {
foreach ($field['inputs'] as $input) {
$product_fields[] = $input['id'];
}
}
}
}
$lead_without_products =& $lead;
foreach ($product_fields as $product_field) {
$value = RGFormsModel::get_lead_field_value($lead, $field);
unset($lead_without_products[$product_field]);
}
require_once GFCommon::get_base_path() . "/entry_detail.php";
GFEntryDetail::lead_detail_edit(apply_filters('kws_gf_directory_form_being_edited', $form_without_products, $lead), apply_filters('kws_gf_directory_lead_being_edited', $lead_without_products, $form_without_products));
echo '<input class="button-primary" type="submit" tabindex="4" value="' . esc_attr(apply_filters('kws_gf_directory_update_lead_button_text', __('Update Entry', 'gravity-forms-addons'))) . '" name="save" />';
//.........这里部分代码省略.........
示例12: get_current_entry
/**
* Helper function to get current entry.
*
* @access public
* @return array $entry
*/
public function get_current_entry()
{
if ($this->is_gravityforms_supported('2.0-beta-3')) {
if (!class_exists('GFEntryDetail')) {
require_once GFCommon::get_base_path() . '/entry_detail.php';
}
return GFEntryDetail::get_current_entry();
} else {
$entry_id = rgpost('entry_id') ? absint(rgpost('entry_id')) : absint(rgget('lid'));
if ($entry_id > 0) {
return GFAPI::get_entry($entry_id);
} else {
$position = rgget('pos') ? rgget('pos') : 0;
$paging = array('offset' => $position, 'page_size' => 1);
$entries = GFAPI::get_entries(rgget('id'), array(), null, $paging);
return $entries[0];
}
}
}
示例13: entries_list
function entries_list()
{
$view = rgget('view');
$lead_id = rgget('lid');
if ($view == 'mfentry' && (rgget('lid') || !rgblank(rgget('pos')))) {
//require_once( GFCommon::get_base_path() . '/entry_detail.php' );
include_once TEMPLATEPATH . '/classes/entry_detail_makerfaire.php';
GFEntryDetail::lead_detail_page();
} else {
if ($view == 'entries' || empty($view)) {
include_once TEMPLATEPATH . '/classes/entry_list_makerfaire.php';
if (!class_exists('GFEntryList')) {
require_once GFCommon::get_base_path() . "/entry_list.php";
}
GFEntryList::all_leads_page();
} else {
$form_id = rgget('id');
do_action('gform_entries_view', $view, $form_id, $lead_id);
}
}
}
示例14: forms
public static function forms(){
if(!GFCommon::ensure_wp_version())
return;
$id = RGForms::get("id");
$view = RGForms::get("view");
if($view == "entries"){
require_once(GFCommon::get_base_path() . "/entry_list.php");
GFEntryList::leads_page($id);
} else if($view == "entry"){
require_once(GFCommon::get_base_path() . "/entry_detail.php");
GFEntryDetail::lead_detail_page();
} else if($view == "notification"){
require_once(GFCommon::get_base_path() . "/notification.php");
//GFNotification::notification_page($id);
} else if($view == 'settings') {
require_once(GFCommon::get_base_path() . "/form_settings.php");
GFFormSettings::form_settings_page($id);
} else if(empty($view)){
if(is_numeric($id)){
self::forms_page($id);
} else{
self::form_list_page();
}
}
do_action("gform_view", $view, $id);
}