本文整理汇总了PHP中RM_UI_Strings类的典型用法代码示例。如果您正苦于以下问题:PHP RM_UI_Strings类的具体用法?PHP RM_UI_Strings怎么用?PHP RM_UI_Strings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RM_UI_Strings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: render
public function render($stat_id = null)
{
global $rm_form_diary;
echo '<div class="rmagic">';
//$this->form_number = $rm_form_diary[$this->form_id];
$form = new Form('form_' . $this->form_id . "_" . $this->form_number);
$form->configure(array("prevent" => array("bootstrap", "jQuery", "focus"), "action" => "", "class" => "rmagic-form", "name" => "rm_form", "number" => $this->form_number, "view" => new View_UserForm(), "style" => isset($this->form_options->style_form) ? $this->form_options->style_form : null));
//Render content above the form
if (!empty($this->form_options->form_custom_text)) {
$form->addElement(new Element_HTML('<div class="rmheader">' . $this->form_options->form_custom_text . '</div>'));
}
if ($this->is_expired()) {
if ($this->form_options->form_message_after_expiry) {
echo $this->form_options->form_message_after_expiry;
} else {
echo '<div class="rm-no-default-from-notification">' . RM_UI_Strings::get('MSG_FORM_EXPIRY') . '</div>';
}
echo '</div>';
return;
}
if ($stat_id) {
$form->addElement(new Element_HTML('<div id="rm_stat_container" style="display:none">'));
$form->addElement(new Element_Number('RM_Stats', 'stat_id', array('value' => $stat_id, 'style' => 'display:none')));
$form->addElement(new Element_HTML('</div>'));
}
parent::pre_render();
$this->base_render($form);
parent::post_render();
echo '</div>';
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:30,代码来源:class_rm_frontend_form_contact.php
示例2: __construct
public function __construct($id, $label, $options, $value, $page_no = 1, $is_primary = false, $extra_opts = null)
{
if (isset($options['value'])) {
if (!is_array($options['value'])) {
$options['value'] = RM_Utilities::trim_array(explode(',', $options['value']));
} else {
$options['value'] = $options['value'];
}
}
parent::__construct($id, 'Select', $label, $options, $value, $page_no, $is_primary, $extra_opts);
if (isset($options['multiple'])) {
$multiple = $options['multiple'];
} else {
$multiple = '';
}
$options = array();
if (!is_array($value)) {
$tmp_options = RM_Utilities::trim_array(explode(',', $value));
} else {
$tmp_options = $value;
}
foreach ($tmp_options as $val) {
$options[$val] = trim($val);
}
if ($multiple == 'multiple') {
$options = array(null => RM_UI_Strings::get('SELECT_FIELD_MULTI_OPTION')) + $options;
} else {
$options = array(null => RM_UI_Strings::get('SELECT_FIELD_FIRST_OPTION')) + $options;
}
$this->field_value = $options;
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:31,代码来源:class_rm_frontend_field_select.php
示例3: remove_field
private function remove_field($model, $service, $request, $params)
{
if (isset($request->req['rm_field_id'])) {
$result = $service->remove($request->req['rm_field_id']);
} else {
die(RM_UI_Strings::get('MSG_NO_FIELD_SELECTED'));
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:8,代码来源:class_rm_paypal_field_controller.php
示例4: __construct
public function __construct($message = "")
{
if (!empty($message)) {
$this->message = $message;
} else {
$this->message = RM_UI_Strings::get('FORM_ERR_INVALID');
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:8,代码来源:Validation.php
示例5: manage
public function manage($model, $service, $request, $params)
{
if (!isset($request->req['form_name'])) {
Form::clearErrors('rm_form_quick_add');
}
$sort_by = isset($request->req['rm_sortby']) ? $request->req['rm_sortby'] : null;
$descending = isset($request->req['rm_descending']) ? false : true;
$req_page = isset($request->req['rm_reqpage']) && $request->req['rm_reqpage'] > 0 ? $request->req['rm_reqpage'] : 1;
$items_per_page = 9;
$forms = $service->get_all(null, ($req_page - 1) * $items_per_page, $items_per_page, '*', $sort_by, $descending);
$i = 0;
$data = array();
if (is_array($forms) || is_object($forms)) {
foreach ($forms as $form) {
$data[$i] = new stdClass();
$data[$i]->form_id = $form->form_id;
$data[$i]->form_name = $form->form_name;
$data[$i]->count = $service->count(RM_Submissions::get_identifier(), array('form_id' => $form->form_id));
if ($data[$i]->count > 0) {
$data[$i]->submissions = $service->get(RM_Submissions::get_identifier(), array('form_id' => $form->form_id), array('%d'), 'results', 0, 3, '*', 'submitted_on', true);
$j = 0;
foreach ($data[$i]->submissions as $submission) {
$data[$i]->submissions[$j++]->gravatar = get_avatar($submission->user_email);
}
}
$data[$i]->field_count = $service->count(RM_Fields::get_identifier(), array('form_id' => $form->form_id));
$data[$i]->last_sub = $service->get(RM_Submissions::get_identifier(), array('form_id' => $form->form_id), array('%d'), 'var', 0, 1, 'submitted_on', 'submitted_on', true);
//$data[$i]->last_sub = date('H',strtotime($this->service->get(RM_Submissions::get_identifier(), array('form_id' => $data_single->form_id), array('%d'), 'var', 0, 1, 'submitted_on', 'submitted_on', true)));
$data[$i]->expiry_details = $service->get_form_expiry_stats($form, false);
$i++;
}
}
$total_forms = $service->count($model->get_identifier(), 1);
//New object to consolidate data for view.
$view_data = new stdClass();
$view_data->data = $data;
$view_data->curr_page = $req_page;
$view_data->total_pages = (int) ($total_forms / $items_per_page) + ($total_forms % $items_per_page == 0 ? 0 : 1);
$view_data->rm_slug = $request->req['page'];
$view_data->sort_by = $sort_by;
$view_data->descending = $descending;
$view_data->done_with_review_banner = $service->get_setting('done_with_review_banner') === 'no' ? false : true;
$view_data->def_form_id = $service->get_setting('default_form_id');
if (function_exists('is_multisite') && is_multisite()) {
$nl_subscribed = get_site_option('rm_option_newsletter_subbed', false);
} else {
$nl_subscribed = get_site_option('rm_option_newsletter_subbed', false);
}
if (!$nl_subscribed) {
$view_data->newsletter_sub_link = RM_UI_Strings::get('NEWSLETTER_SUB_MSG');
} else {
$view_data->newsletter_sub_link = null;
}
$view = $this->mv_handler->setView('form_manager');
$view->render($view_data);
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:56,代码来源:class_rm_form_controller.php
示例6: __construct
public function __construct($pattern, $message = "")
{
if (!empty($message)) {
$this->message = $message;
} else {
$this->message = RM_UI_Strings::get('FORM_ERR_INVALID_REGEX');
}
$this->pattern = $pattern;
parent::__construct($this->message);
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:10,代码来源:RegExp.php
示例7: renderRepeatable
private function renderRepeatable($type = "prepend")
{
if ($type === "start") {
echo '<div class="rm_field_type_repeatable_container" id="rm_field_type_repeatable_container_' . $this->_attributes['id'] . '">';
}
if ($type === "prepend") {
echo '<div class="appendable_options">';
}
if ($type === "append") {
echo '<div class="rm_actions" id="rm_add_repeatable_field" onClick="rm_append_field(\'div\',\'rm_field_type_repeatable_container_' . $this->_attributes["id"] . '\')"><a>' . RM_UI_Strings::get("LABEL_ADD") . '</a></div><div class="rm_actions" onClick="rm_delete_appended_field(this,\'rm_field_type_repeatable_container_' . $this->_attributes["id"] . '\')"><a href="javascript:void(0)">' . RM_UI_Strings::get("LABEL_DELETE") . '</a></div></div>';
}
if ($type === "close") {
echo '</div>';
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:15,代码来源:Repeatable.php
示例8: set_otp
public function set_otp($email, $key = null)
{
$response = new stdClass();
$response->error = false;
$response->show = "#rm_otp_kcontact";
$response->hide = "#rm_otp_kcontact";
$response->reload = false;
// Validate key
if ($key) {
$rm_user = $this->get('FRONT_USERS', array('otp_code' => $key), array('%s'), 'row');
if (!$rm_user) {
$response->error = true;
$response->msg = RM_UI_Strings::get('MSG_INVALID_OTP');
} else {
$this->set_auth_params($key, $rm_user->email);
$response->error = false;
$response->msg = RM_UI_Strings::get('MSG_AFTER_OTP_LOGIN');
$response->reload = true;
}
} else {
// Validate email
if (is_email($email)) {
if ($this->is_user($email)) {
$otp_code = $this->generate_otp($email);
$response->msg = RM_UI_Strings::get('MSG_OTP_SUCCESS');
$subject = RM_UI_Strings::get('LABEL_OTP');
$message = RM_UI_Strings::get('OTP_MAIL') . $otp_code;
wp_mail($email, $subject, $message);
} else {
$response->error = true;
$response->msg = RM_UI_Strings::get('MSG_EMAIL_NOT_EXIST');
}
} else {
$response->error = true;
$response->msg = RM_UI_Strings::get('INVALID_EMAIL');
}
}
return json_encode($response);
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:39,代码来源:class_rm_front_service.php
示例9: getPayments
public function getPayments()
{
$rm_services = new RM_Services();
$rm_front_service = new RM_Front_Service();
$user_email = $rm_front_service->get_user_email();
$payments = array();
if (!empty($user_email)) {
$submissions = $rm_services->get_submissions_by_email($user_email);
if (!empty($submissions)) {
foreach ($submissions as $submission) {
$payment = $rm_services->get_payments_by_submission_id($submission->submission_id);
if ($payment) {
$payment->form_name = $rm_services->get('FORMS', array('form_id' => $submission->form_id), array('%d'), 'var', 0, 1, 'form_name');
$payments[] = $payment;
}
}
}
if (!empty($payments)) {
include_once 'html/payments.php';
} else {
echo '<div class="rmnotice-container"><div class="rmnotice">' . RM_UI_Strings::get('MSG_NO_DATA_FOR_EMAIL') . '</div></div>';
}
}
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:24,代码来源:class_rm_widget_helper.php
示例10: notify_users
public function notify_users($note)
{
$gopt = new RM_Options();
if ($gopt->get_value_of('user_notification_for_notes') == "yes") {
if ($note->get_status() != 'publish') {
return;
}
$submission = new RM_Submissions();
$submission->load_from_db($note->get_submission_id());
$email = new stdClass();
//echo '<pre>';
//print_r($submission); die;
$email->to = $submission->get_user_email();
$from_email = $gopt->get_value_of('senders_email_formatted');
$header = "From: {$from_email}\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$email->subject = get_bloginfo('name', 'display') . " Notification from Admin ";
$email->message = RM_UI_Strings::get('MSG_NOTE_FROM_ADMIN') . $note->get_notes();
$email->header = $header;
$email->attachments = array();
RM_Utilities::send_mail($email);
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:24,代码来源:class_rm_note_service.php
示例11: aweber
function aweber($model, $service, $request, $params)
{
if (isset($request->req['rm_form_id']) && (int) $request->req['rm_form_id']) {
$model->load_from_db($request->req['rm_form_id']);
$data = new stdClass();
$data->form_name = $model->form_name;
$data->form_id = $request->req['rm_form_id'];
$view = $this->mv_handler->setView('form_sett_aw');
} else {
$data = RM_UI_Strings::get('MSG_FS_NOT_AUTHORIZED');
$view = $this->mv_handler->setView('show_notice');
}
$view->render($data);
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:14,代码来源:class_rm_form_settings_controller.php
示例12: Element_Textbox
<?php
$form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_USERNAME') . "</b>:", "username", array("required" => "1", "placeholder" => RM_UI_Strings::get('LABEL_USERNAME'))));
/*
* Skip password field if auto generation is on
*/
if (!$is_auto_generate) {
$form->addElement(new Element_Password("<b>" . RM_UI_Strings::get('LABEL_PASSWORD') . "</b>:", "password", array("required" => 1, "longDesc" => RM_UI_Strings::get('HELP_PASSWORD_MIN_LENGTH'), "minLength" => 7, "validation" => new Validation_RegExp("/.{7,}/", "Error: The %element% must be atleast 7 characters long."))));
}
?>
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:10,代码来源:template_rm_register.php
示例13: render
public function render($extra_data_may_needed_in_child_class = null)
{
global $rm_form_diary;
echo '<div class="rmagic">';
//$this->form_number = $rm_form_diary[$this->form_id];
$form = new Form('form_' . $this->form_id . "_" . $this->form_number);
$form->configure(array("prevent" => array("bootstrap", "jQuery", "focus"), "action" => "", "class" => "rmagic-form", "name" => "rm_form", "view" => new View_UserForm(), "number" => $this->form_number, "style" => isset($this->form_options->style_form) ? $this->form_options->style_form : null));
//Render content above the form
if (!empty($this->form_options->form_custom_text)) {
$form->addElement(new Element_HTML('<div class="rmheader">' . $this->form_options->form_custom_text . '</div>'));
}
if (!$this->is_expired()) {
$this->pre_render();
$this->base_render($form);
$this->post_render();
} else {
if ($this->form_options->form_message_after_expiry) {
echo $this->form_options->form_message_after_expiry;
} else {
echo RM_UI_Strings::get('MSG_FORM_EXPIRY');
}
}
echo '</div>';
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:24,代码来源:class_rm_frontend_form_base.php
示例14:
<span><?php
echo $role;
?>
</span>
<span><?php
echo $role_name;
?>
</span>
</div>
<div class="rm-slab-buttons" onclick="delete_role(this,'checkbox_<?php
echo $role;
?>
')">
<a href="javascript:void(0)"><?php
echo RM_UI_Strings::get("LABEL_DELETE");
?>
</a>
</div>
</div>
</li>
<?php
}
}
?>
</form>
</ul>
<div class="rm-upgrade-note-gold">
<div class="rm-banner-title">Upgrade and expand the power of<img src="<?php
echo RM_IMG_URL . 'logo.png';
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:31,代码来源:template_rm_user_roles_manager.php
示例15: login_notice
/**
* returns the message when deactivated user tries to login
*
* @param string $notice
* @return string
*/
public function login_notice($notice)
{
if (isset($_GET['is_disabled']) && $_GET['is_disabled'] === '1') {
$notice = '<div id="login_error"><strong>' . RM_UI_Strings::get('LABEL_ERROR') . ':</strong> ' . apply_filters('rm_login_notice', RM_UI_Strings::get('ACCOUNT_NOT_ACTIVE_YET')) . '</div>';
} elseif (isset($_GET['is_reset']) && $_GET['is_reset'] === '1') {
$notice = '<p id="rm_login_error" class="message">' . apply_filters('rm_login_notice', RM_UI_Strings::get('LOGIN_AGAIN_AFTER_RESET')) . '</p>';
}
return $notice;
}
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:15,代码来源:class_registration_magic.php
示例16: renderSortable
protected function renderSortable($type = "prepend", $suffix = '')
{
if ($type === "start") {
echo '<ul class = "rm_sortable_elements" id = "rm_sortable_elements_' . $suffix . '">';
}
if ($type === "prepend") {
echo '<li class="appendable_options rm-deletable-options"><span class="rm_sortable_handle"><img alt="" src="' . plugin_dir_url(dirname(dirname(dirname(__FILE__)))) . 'images/rm-drag-label.png"></span>';
}
if ($type === "append") {
echo '<div class="rm_actions" onClick ="rm_delete_appended_field(this,rm_sortable_elements_' . $suffix . ')"><a href="javascript:void(0)">' . RM_UI_Strings::get("LABEL_DELETE") . '</a></div></li>';
}
if ($type === "close") {
echo '</ul>';
}
if ($type === "add_action") {
echo '<div class="rm_action_container" id="rm_action_container_id"><div class="rm_action" id="rm_action_field_container" onclick="rm_append_field(\'li\',this)"><input type="text" name="rm_dump" id="rm_append_option" class="rm_action_field" required="" readonly="true" value="' . RM_UI_Strings::get("VALUE_CLICK_TO_ADD") . ' "></div><div id="rmaddotheroptiontextdiv" style="display:none"><div onclick="jQuery.rm_append_textbox_other(this)">' . RM_UI_Strings::get('LABEL_ADD_OTHER') . '</div></div></div>';
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:18,代码来源:Textboxsortable.php
示例17: Form
<?php
$form = new Form("options_users");
$form->configure(array("prevent" => array("bootstrap", "jQuery"), "action" => ""));
$options_sp = array("id" => "id_rm_send_pass_cb", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_SEND_PASS'));
if ($data['auto_generated_password'] === 'yes') {
$options_sp['disabled'] = true;
}
if ($data['send_password'] === 'yes') {
$options_sp['value'] = 'yes';
}
$form->addElement(new Element_HTML('<div class="rmheader">' . RM_UI_Strings::get('GLOBAL_SETTINGS_USER') . '</div>'));
$form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_AUTO_PASSWORD'), "auto_generated_password", array("yes" => ''), $data['auto_generated_password'] === 'yes' ? array("id" => "id_rm_autogen_pass_cb", "value" => "yes", "onchange" => "checkbox_disable_elements(this, 'id_rm_send_pass_cb-0', 1)", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOGEN')) : array("id" => "id_rm_autogen_pass_cb", "onchange" => "checkbox_disable_elements(this, 'id_rm_send_pass_cb-0', 1)", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOGEN'))));
$form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_SEND_PASS_EMAIL'), "send_password", array("yes" => ''), $options_sp));
$form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_REGISTER_APPROVAL'), "buy_pro", array("yes" => ''), array("value" => "yes", 'disabled' => 1, "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOAPPROVAL') . "<br><br>" . RM_UI_Strings::get('MSG_BUY_PRO_INLINE'))));
$form->addElement(new Element_HTMLL('← Cancel', '?page=rm_options_manage', array('class' => 'cancel')));
$form->addElement(new Element_Button(RM_UI_Strings::get('LABEL_SAVE')));
$form->render();
?>
</div>
<div class="rm-upgrade-note-gold">
<div class="rm-banner-title">Upgrade and expand the power of<img src="<?php
echo RM_IMG_URL . 'logo.png';
?>
"> </div>
<div class="rm-banner-subtitle">Choose from two powerful extension bundles</div>
<div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart"><img src="<?php
echo RM_IMG_URL . 'silver-logo.png';
?>
"></a>
</div>
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:31,代码来源:template_rm_options_user.php
示例18:
"><?php
echo RM_UI_Strings::get('LABEL_LAST');
?>
</a></li>
<?php
}
?>
</ul>
<?php
}
} else {
?>
<div class="rmnotice-container">
<div class="rmnotice">
<?php
echo RM_UI_Strings::get('MSG_NO_SUBMISSION_SUB_MAN');
?>
</div>
</div>
<?php
}
?>
<div class="rm-upgrade-note-gold">
<div class="rm-banner-title">Upgrade and expand the power of<img src="<?php
echo RM_IMG_URL . 'logo.png';
?>
"> </div>
<div class="rm-banner-subtitle">Choose from two powerful extension bundles</div>
<div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart"><img src="<?php
echo RM_IMG_URL . 'silver-logo.png';
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:31,代码来源:template_rm_submissions_manager.php
示例19: show_widget
public function show_widget()
{
$this->include_scripts();
global $rm_form_diary;
if (current_user_can('manage_options')) {
?>
<!----Color Switcher---->
<div class="rm-white-box difl rm-color-switcher rm-rounded-corners rm-shadow-10" id="rm-color-switcher">
<div id="rm-theme-box-toggle" style="cursor: pointer; text-align: right; color: grey" onclick="close_theme_box()">x</div>
<div class="rm-color-switcher-note rm-grey-box dbfl rm-pad-10">Welcome! This sticky panel is only visible to you as site admin. You can style RegistrationMagic's front-end panel on the right side, using the options below.</div>
<div class="rm-color-switch-title dbfl rm-accent-bg rm-pad-10">Magic Panel Styler!</div>
<input type="text" class="dbfl rm-grey-box jscolor" placeholder="Panel Accent Color" id="rm-panel-accent">
<select class="dbfl" id="rm-panel-theme">
<option value="Light"><?php
echo RM_UI_Strings::get('LABEL_LIGHT');
?>
</option>
<option value="Dark"><?php
echo RM_UI_Strings::get('LABEL_DARK');
?>
</option>
</select>
<button class="difl" id="rm-color-switch"><?php
echo RM_UI_Strings::get('LABEL_SWITCH');
?>
</button>
</div>
<?php
}
?>
<div class="rm-magic-popup">
<div class="rm-popup-menu rm-rounded-corners rm-white-box rm-shadow-10 dbfl" id="rm-menu">
<?php
if ($this->user_level === 0x4) {
?>
<div class="rm-popup-item dbfl rm-border" id="rm-account-open">
<?php
$av = get_avatar_data($this->user->ID);
?>
<img class="rm-menu-userimage difl" src="<?php
echo $av['url'];
?>
">
<div class="rm-menu-user-details difl">
<div class="dbfl"><b><?php
echo RM_UI_Strings::get('LABEL_WELCOME');
?>
</b></div>
<div class="dbfl"><?php
echo $this->user->first_name . ' ' . $this->user->last_name;
?>
</div>
</div>
</div>
<?php
}
if ($this->user_level === 0x1) {
?>
<div class="rm-popup-item dbfl" id="rm-login-open"><?php
echo RM_UI_Strings::get('LABEL_LOGIN');
?>
</div>
<?php
if (!isset($rm_form_diary[$this->param->default_form])) {
?>
<div class="rm-popup-item dbfl" id="rm-register-open-big"><?php
echo RM_UI_Strings::get('LABEL_REGISTER');
?>
</div>
<?php
} else {
?>
<a href="#form_<?php
echo $this->param->default_form;
?>
_1" id="rm_fab_register_redirect_link"><div class="rm-popup-item dbfl" id="rm-register-open-big"><?php
echo RM_UI_Strings::get('LABEL_REGISTER');
?>
</div></a>
<?php
}
}
?>
<div class="rm-popup-item dbfl" id="rm-submissions-open"><?php
echo RM_UI_Strings::get('LABEL_MY_SUBS');
?>
</div>
<div class="rm-popup-item dbfl" id="rm-transactions-open"><?php
echo RM_UI_Strings::get('LABEL_PAYMENTS');
?>
</div>
<?php
if ($this->user_level === 0x1 || $this->user_level === 0x4) {
?>
<div class="rm-popup-item dbfl" id="rm-account-open"><?php
echo RM_UI_Strings::get('LABEL_MY_DETAILS');
?>
//.........这里部分代码省略.........
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:101,代码来源:class_rm_floating_widget.php
示例20: process
public function process($model, RM_Front_Form_Service $service, $request, $params)
{
$data = new stdClass();
if (isset($params['form_id']) && $params['form_id']) {
$form = new RM_Forms();
$form->load_from_db($params['form_id']);
//echo "<pre>",var_dump($form),die();
} else {
return;
}
//Called from PayPal, straight to processing.
if (isset($request->req['rm_pproc'])) {
if ($request->req['rm_pproc'] == 'success' || $request->req['rm_pproc'] == 'cancel' || $request->req['rm_pproc'] == 'ipn') {
//error_log('rm_pproc = '.$request->req['rm_pproc']);
$paystate = $service->process_payment(null, null, $service, $request);
$params['form'] = $form;
$params['is_payment_form'] = true;
$params['is_payment_done'] = true;
/*else //Pending or cancelation cases
{
$params['form'] = $form;
$params['is_payment_form'] = true;
$params['is_payment_done'] = false;
}*/
$service->save_form($request, $params);
return;
}
}
/*
* If register form type then check if user exists
*/
$user_exists = false;
if ($form->form_type == 1 && !is_user_logged_in()) {
if ($service->user_exists($form, $request)) {
$user_exists = true;
} else {
Form::clearErrors('form_' . $form->form_id);
}
}
if (isset($request->req['stat_id'])) {
$stat_id = $request->req['stat_id'];
} else {
$stat_id = null;
}
/*
* Validates the form in case form is not expired.
*/
if ($this->mv_handler->validateForm('form_' . $form->form_id) && !$service->is_form_expired($form) && !$user_exists && !$service->is_browser_reload_duplication($stat_id)) {
$params['form'] = $form;
// echo "<pre>",var_dump($form),die();
if ($service->is_off_limit_submission($form->form_id)) {
die(RM_UI_Strings::get("ALERT_SUBMISSIOM_LIMIT"));
}
$service->update_stat_entry($stat_id);
if ($service->get_setting('enable_mailchimp') == 'yes') {
$form_options_mc = $form->get_form_options();
//die;
if ($form_options_mc->form_is_opt_in_checkbox == 1) {
$should_subscribe = isset($request->req['rm_subscribe_mc']) && $request->req['rm_subscribe_mc'][0] == 1 ? 'yes' : 'no';
} else {
$should_subscribe = 'yes';
}
if ($should_subscribe == 'yes') {
$mailchimp = new RM_MailChimp_Service();
$mc_member = new stdClass();
if (isset($request->req[$form_options_mc->mailchimp_mapped_email])) {
$mc_member->email = $request->req[$form_options_mc->mailchimp_mapped_email];
if (isset($request->req[$form_options_mc->mailchimp_mapped_first_name])) {
$mc_member->first_name = $request->req[$form_options_mc->mailchimp_mapped_first_name];
} else {
$mc_member->first_name = NULL;
}
if (isset($request->req[$form_options_mc->mailchimp_mapped_last_name])) {
$mc_member->last_name = $request->req[$form_options_mc->mailchimp_mapped_last_name];
} else {
$mc_member->last_name = NULL;
}
$mailchimp->subscribe($mc_member, $form_options_mc->mailchimp_list);
}
}
}
if (isset($request->req['rm_payment_form'])) {
//Do not register user if the payment+registration type form, wait for payment confirmation.
$params['is_payment_form'] = true;
$params['is_payment_done'] = false;
$rd = $service->save_form($request, $params, true, false);
//die("xx");
$res = $service->process_payment($form->get_form_id(), $rd, $service, $request);
if ($res == 'zero_amount') {
$params['is_payment_form'] = true;
$params['is_payment_done'] = true;
$params['za_user_id'] = $rd->user_id;
$rd = $service->save_form($request, $params);
//$submission_id = $rd->submission_id;
}
} else {
$rd = $service->save_form($request, $params);
$submission_id = $rd->submission_id;
}
} else {
//.........这里部分代码省略.........
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:101,代码来源:class_rm_front_form_controller.php
注:本文中的RM_UI_Strings类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论