本文整理汇总了PHP中Notify::getByHash方法的典型用法代码示例。如果您正苦于以下问题:PHP Notify::getByHash方法的具体用法?PHP Notify::getByHash怎么用?PHP Notify::getByHash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notify
的用法示例。
在下文中一共展示了Notify::getByHash方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
}
} else {
foreach ($templateData as $k => $i){
$newTemplateData[$k] = $templateData[$k];
}
}
*/
if (!($update = $saved->update_JSON($template, $templateData))) {
Ajax::outputError('JSON file couldn\'t be updated');
}
//!copy original messages
$savedJSON = $saved->getJSONContent();
$savedData = json_decode($savedJSON, true);
$savedData['configs']['notify'] = $initialData['configs']['notify'];
$savedData['configs']['displayRulesFlag'] = $initialData['configs']['displayRulesFlag'];
$savedData['display_rules'] = $initialData['display_rules'];
//$savedData['configs']['notify']['message'] = $initialData['configs']['notify']['message'];
if (!$saved->updateJSON_Data($savedData)) {
Ajax::outputError('JSON file couldn\'t be updated');
}
//!end
$notif = Notify::getByHash($hash);
if (!($reload = $notif->getJSONContent())) {
Ajax::output('Can\'t reload json data!');
}
if ($xmlTemplate) {
Ajax::output($customize->getHtml($xmlTemplate, $reload));
} else {
Ajax::outputError('Internal server error. Try again later');
}
示例2: isset
<?php
Ajax::requireLoggedIn();
$message = isset($_GET['message']) ? $_GET['message'] : '';
if (!isset($message) || empty($message)) {
Ajax::outputError("Empty message!");
}
$hash = isset($_GET['hash']) ? $_GET['hash'] : '';
if (!isset($hash) || empty($hash)) {
Ajax::outputError("Empty hash!");
}
$user = User::getLogged();
$notification = Notify::getByHash($hash);
$feedback = new UserFeedback();
$feedback->user_id = $user->id;
$feedback->message = $message;
$feedback->date_added = getDateMysql();
$feedback->ip = $_SERVER['REMOTE_ADDR'];
$feedback->notification_id = $notification->id;
$feedback->save();
$message = '<p>' . nl2br(str_replace(' ', ' ', $message)) . '</p><hr/>';
$message .= '<br/><h4>User info</h4>';
$message .= '<span>Screen name: ' . $user->screenname . '</span>';
$message .= '<br/><span>User email: ' . $user->email . '</span>';
$message .= '<br/><span>Account id: ' . $user->id . '</span>';
$message .= '<br/><span>Notification ID: ' . $notification->id . '</span>';
$message .= '<br/><span>Notification hash: ' . $notification->hash . '</span>';
$message .= '<br/><span>Notification name: ' . $notification->name . '</span>';
$message .= '<br/><span>Notification parent hash: ' . $notification->parent_hash . '</span>';
$mail = new PHPMailer();
$mail->CharSet = "UTF-8";