本文整理匯總了PHP中WC_HTML::message方法的典型用法代碼示例。如果您正苦於以下問題:PHP WC_HTML::message方法的具體用法?PHP WC_HTML::message怎麽用?PHP WC_HTML::message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WC_HTML
的用法示例。
在下文中一共展示了WC_HTML::message方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: insertEntry
public static function insertEntry($siteid, $score, $usercount, $challcount, $comment = '')
{
$entry = new self(array('sitehist_sid' => $siteid, 'sitehist_date' => time(), 'sitehist_score' => $score, 'sitehist_usercount' => $usercount, 'sitehist_challcount' => $challcount, 'sitehist_comment' => $comment));
if (WECHALL_DEBUG_SCORING) {
echo WC_HTML::message('Inserting Site History Item...');
}
return $entry->insert();
}
示例2: insertEntry
public static function insertEntry(GWF_User $user, WC_Site $site, $onsitescore, $comment)
{
$user = GWF_User::getByID($user->getID());
$max = $site->getOnsiteScore();
$perc = $max <= 0 ? 0 : round($onsitescore / $max * 10000);
$entry = new self(array('userhist_uid' => $user->getVar('user_id'), 'userhist_date' => time(), 'userhist_sid' => $site->getVar('site_id'), 'userhist_percent' => $perc, 'userhist_onsitescore' => $onsitescore, 'userhist_rank' => WC_RegAt::calcRank($user), 'userhist_totalscore' => $user->getVar('user_level'), 'userhist_comment' => $comment));
if (WECHALL_DEBUG_SCORING) {
echo WC_HTML::message('Inserting User History entry...');
}
return $entry->insert();
}
示例3: insertEntry
public static function insertEntry(GWF_User $user, WC_Site $site, $type, $onsitescore_new = 0, $onsitescore_old = 0, $scoregain = 0, $onsiterank = 0)
{
$uid = $user->getID();
$user = GWF_User::getByID($uid);
$max = $site->getOnsiteScore();
$perc_new = $max <= 0 ? 0 : round($onsitescore_new / $max * 10000);
$perc_old = $max <= 0 ? 0 : round($onsitescore_old / $max * 10000);
$perc_gain = $perc_new - $perc_old;
$options = 0;
$data = $user->getUserData();
if (isset($data['WC_NO_XSS'])) {
$options |= self::NO_XSS;
}
$entry = new self(array('userhist_uid' => $uid, 'userhist_date' => time(), 'userhist_sid' => $site->getID(), 'userhist_percent' => $perc_new, 'userhist_onsitescore' => $onsitescore_new, 'userhist_rank' => WC_RegAt::calcExactRank($user), 'userhist_totalscore' => $user->getVar('user_level'), 'userhist_gain_perc' => $perc_gain, 'userhist_gain_score' => $scoregain, 'userhist_type' => $type, 'userhist_onsiterank' => $onsiterank, 'userhist_options' => $options));
if (WECHALL_DEBUG_SCORING) {
echo WC_HTML::message('Inserting User History entry...');
}
return $entry->insert();
}
示例4: recalcSite
/**
* Recalc and update all scores for this site.
* @return void
*/
public function recalcSite()
{
require_once 'WC_RegAt.php';
if (WECHALL_DEBUG_SCORING) {
echo WC_HTML::message('msg_site_recalc', array($this->displayName()));
}
$this->recalcAverage();
$this->recalcScore();
WC_RegAt::calcSite($this);
WC_RegAt::calcTotalscores();
}