本文整理汇总了PHP中CASHSystem::getBrowserIdJS方法的典型用法代码示例。如果您正苦于以下问题:PHP CASHSystem::getBrowserIdJS方法的具体用法?PHP CASHSystem::getBrowserIdJS怎么用?PHP CASHSystem::getBrowserIdJS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CASHSystem
的用法示例。
在下文中一共展示了CASHSystem::getBrowserIdJS方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMarkup
public function getMarkup()
{
// define $markup to store all screen output
$markup = '';
// the default form and basic elements:
$default_markup = '<form id="cash_' . self::type . '_form_' . $this->element_id . '" class="cash_form ' . self::type . '" method="post" action="">';
if ($this->options->display_title) {
$default_markup .= '<h2 class="cash_title">' . $this->options->display_title . '</h2>';
}
if ($this->options->display_message) {
$default_markup .= '<p class="cash_message">' . $this->options->display_message . '</p>';
}
$default_markup .= '' . '<div class="cash_address_container"><label for="address">Email</label>' . '<input type="email" name="address" placeholder="Your Email Address" value="" class="cash_input cash_input_address" /></div>' . '<div class="cash_password_container"><label for="password">Password</label>' . '<input type="password" name="password" value="" class="cash_input cash_input_password" /></div>' . '<div class="cash_hidden"><input type="hidden" name="cash_request_type" value="people" />' . '<input type="hidden" name="cash_action" value="signintolist" />' . '<input type="hidden" name="list_id" value="' . $this->options->email_list_id . '" class="cash_input cash_input_list_id" />' . '<input type="hidden" name="element_id" value="' . $this->element_id . '" class="cash_input cash_input_element_id" />' . '<input type="hidden" id="browseridassertion_' . $this->element_id . '" name="browseridassertion" value="" class="cash_input cash_input_element_id" /></div>' . '<input type="submit" value="log in" class="button" /> <span class="cash_divider_text"> - or - </span> <a href="javascript:void(0)" id="browserid_login_link_' . $this->element_id . '"><img src="' . CASH_PUBLIC_URL . 'assets/images/browserid.png" alt="log in with browser id" class="cash_browserid_button" /></a>' . '</form>';
$default_markup .= CASHSystem::getBrowserIdJS($this->element_id);
switch ($this->status_uid) {
case 'people_signintolist_400':
// error, likely in the email format. error message + default form
$markup = '<div class="cash_error ' . self::type . '">' . 'We could not verify your login. Please try again.' . '</div>' . $default_markup;
break;
case 'empty':
$markup = '';
break;
default:
// default form
$markup = $default_markup;
}
return $markup;
}
示例2: getData
public function getData()
{
if ($this->options['skip_login']) {
$show_final_message = true;
} else {
$show_final_message = false;
$this->element_data['browserid_js'] = CASHSystem::getBrowserIdJS($this->element_id);
if ($this->status_uid == 'people_signintolist_200') {
$show_final_message = true;
} elseif ($this->status_uid == 'people_signintolist_400') {
// sign-in failed, try element-specific password and check that the
// address is for realy realz on the list
if (trim($this->original_request['password']) == trim($this->options['alternate_password'])) {
$status_request = new CASHRequest(array('cash_request_type' => 'people', 'cash_action' => 'getaddresslistinfo', 'address' => $this->original_request['address'], 'list_id' => $this->options['email_list_id']));
if ($status_request->response['payload']) {
$show_final_message = true;
}
}
}
}
if ($show_final_message) {
if ($this->options['asset_id'] != 0) {
// first we "unlock" the asset, telling the platform it's okay to generate a link for non-private assets
$unlock_request = new CASHRequest(array('cash_request_type' => 'asset', 'cash_action' => 'unlock', 'id' => $this->options['asset_id']));
// next we make the link
$asset_request = new CASHRequest(array('cash_request_type' => 'asset', 'cash_action' => 'getasset', 'id' => $this->options['asset_id']));
$this->element_data['asset_title'] = $asset_request->response['payload']['title'];
$this->element_data['asset_description'] = $asset_request->response['payload']['description'];
}
$this->setTemplate('success');
}
return $this->element_data;
}
示例3: getData
public function getData()
{
if ($this->unlocked || $this->hide) {
$this->setTemplate('empty');
} else {
if ($this->status_uid == 'people_signintolist_400') {
$this->element_data['error_message'] = 'Could not verify your login. Please try again.';
}
$this->element_data['browserid_js'] = CASHSystem::getBrowserIdJS($this->element_id);
}
return $this->element_data;
}
示例4: elseif
$cash_admin->page_data['specialcolor'] = ' usecolor4';
} elseif ($exploded_base[0] == 'elements') {
$cash_admin->page_data['specialcolor'] = ' usecolor5';
}
// set true/false for each section being current
$cash_admin->page_data['ui_current_elements'] = $exploded_base[0] == 'elements' ? true : false;
$cash_admin->page_data['ui_current_assets'] = $exploded_base[0] == 'assets' ? true : false;
$cash_admin->page_data['ui_current_people'] = $exploded_base[0] == 'people' ? true : false;
$cash_admin->page_data['ui_current_commerce'] = $exploded_base[0] == 'commerce' ? true : false;
$cash_admin->page_data['ui_current_calendar'] = $exploded_base[0] == 'calendar' ? true : false;
// include controller for current page
include $pages_path . 'controllers/' . $include_filename;
if (file_exists($pages_path . 'views/' . $include_filename)) {
// phasing this out:
include $pages_path . 'views/' . $include_filename;
} else {
// the right way:
$cash_admin->page_data['page_content_markup'] = $cash_admin->mustache_groomer->render($cash_admin->page_content_template, $cash_admin->page_data);
// temporary fix. we'll ditch the buffering when all pages have been converted:
echo $cash_admin->page_data['page_content_markup'];
}
// push buffer contents to "content" and stop buffering
$cash_admin->page_data['content'] = ob_get_contents();
ob_end_clean();
// now let's get our {{mustache}} on
echo $cash_admin->mustache_groomer->render(file_get_contents(ADMIN_BASE_PATH . '/ui/default/template.mustache'), $cash_admin->page_data);
} else {
$cash_admin->page_data['browser_id_js'] = CASHSystem::getBrowserIdJS();
// magnum p.i. = sweet {{mustache}} > don draper
echo $cash_admin->mustache_groomer->render(file_get_contents(ADMIN_BASE_PATH . '/ui/default/login.mustache'), $cash_admin->page_data);
}