本文整理汇总了PHP中SendPress_Data::decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::decrypt方法的具体用法?PHP SendPress_Data::decrypt怎么用?PHP SendPress_Data::decrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::decrypt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data
static function data()
{
$data = '';
if (get_query_var('spms') || get_query_var('sendpress')) {
$action = get_query_var('spms') ? get_query_var('spms') : get_query_var('sendpress');
} else {
$parsed = explode('/', $_SERVER['REQUEST_URI']);
$action = $parsed[count($parsed) - 2];
}
//SendPress_Error::log($action);
$data = SendPress_Data::decrypt($action);
//print_r($data);
return $data;
}
示例2: data
private static function data()
{
$data = '';
if (get_query_var('spms') || get_query_var('sendpress')) {
$action = get_query_var('spms') ? get_query_var('spms') : get_query_var('sendpress');
} else {
$parsed = explode('/', $_SERVER['REQUEST_URI']);
$action = $parsed[count($parsed) - 2];
}
return SendPress_Data::decrypt($action);
}
示例3: template_include
function template_include($template)
{
global $post;
if (get_query_var('sendpress') || isset($_POST['sendpress'])) {
$action = isset($_POST['sendpress']) ? $_POST['sendpress'] : get_query_var('sendpress');
//Look for encrypted data
$data = SendPress_Data::decrypt($action);
$view = false;
if (is_object($data)) {
$view = isset($data->view) ? $data->view : false;
} else {
$view = $action;
}
$view_class = SendPress_Data::get_public_view_class($view);
if (class_exists($view_class)) {
$view_class = new $view_class();
$view_class->data($data);
if (isset($_POST['sp']) && wp_verify_nonce($_POST['sp'], 'sendpress-form-post') && method_exists($view_class, 'save')) {
$view_class->save();
}
$view_class->prerender();
$view_class->render();
}
//$this->load_default_screen($action);
die;
}
if (isset($post)) {
if ($post->post_type == $this->_email_post_type || $post->post_type == $this->_report_post_type) {
$inline = false;
if (isset($_GET['inline'])) {
$inline = true;
}
SendPress_Email_Cache::build_cache_for_email($post->ID);
$message = new SendPress_Email();
$message->id($post->ID);
$message->subscriber_id(0);
$message->list_id(0);
$body = $message->html();
//print_r( $body );
unset($message);
echo $body;
die;
//SendPress_Template::get_instance()->render_html(false, true, $inline );
//return SENDPRESS_PATH. '/template-loader.php';
//return dirname(__FILE__) . '/my_special_template.php';
}
/**
*
* if($post->post_type == 'sp-standard' ){
* return 'You Bet';
* }
**/
}
return $template;
}
示例4: load_page
static function load_page($attr, $content = null)
{
$action = get_query_var('spmanage');
//Look for encrypted data
$info = SendPress_Data::decrypt($action);
//print_r( $info );
?>
<form action="" method="post">
<?php
wp_nonce_field(SendPress_Data::nonce());
?>
<input type="hidden" name="subscriberid" id="subscriberid" value="<?php
echo $info->id;
?>
" />
<input type="hidden" name="action" id="action" value="sendpress-manage-shortcode" />
<table cellpadding="0" cellspacing="0" class="table table-condensed table-striped table-bordered">
<tr>
<th ><?php
_e('Subscribed', 'sendpress');
?>
</th>
<th ><?php
_e('Unsubscribed', 'sendpress');
?>
</th>
<th ><?php
_e('List', 'sendpress');
?>
</th>
<th class="hidden-phone"><?php
_e('Updated', 'sendpress');
?>
</th>
<th class="hidden-phone"><?php
_e('Other Info', 'sendpress');
?>
</th>
</tr>
<?php
$lists = SendPress_Data::get_lists(apply_filters('sendpress_modify_manage_lists', array('meta_query' => array(array('key' => 'public', 'value' => true)))), false);
foreach ($lists as $list) {
$subscriber = SendPress_Data::get_subscriber_list_status($list->ID, $info->id);
?>
<tr>
<?php
$checked = isset($subscriber->statusid) && $subscriber->statusid == 2 ? 'checked' : '';
echo '<td><input type="radio" class="xbutton" data-list="' . $list->ID . '" name="subscribe_' . $list->ID . '" ' . $checked . ' value="2"></td>';
$checked = isset($subscriber->statusid) && $subscriber->statusid == 3 ? 'checked' : '';
echo '<td><input type="radio" class="xbutton" data-list="' . $list->ID . '" name="subscribe_' . $list->ID . '" ' . $checked . ' value="3"></td>';
?>
<td><?php
echo $list->post_title;
?>
</td>
<td class="hidden-phone"><span id="list_<?php
echo $list->ID;
?>
"><?php
if (isset($subscriber->updated)) {
echo $subscriber->updated;
} else {
_e('Never Subscribed', 'sendpress');
}
?>
</span>
</td>
<td class="hidden-phone">
<?php
if (is_object($subscriber)) {
if ($subscriber->statusid != 3 && $subscriber->statusid != 2) {
echo $subscriber->status;
}
}
?>
</td>
<tr>
<?php
}
?>
</table>
<br>
<?php
do_action('sendpress_manage_notifications', $info);
?>
<input type="submit" class="btn btn-primary" value="<?php
_e('Save My Settings', 'sendpress');
?>
"/>
</form><?php
}
示例5: decrypt_data
function decrypt_data($message)
{
_deprecated_function(__FUNCTION__, '0.8.9', 'SendPress_Data::decrypt()');
return SendPress_Data::decrypt($message);
}