本文整理汇总了PHP中GWF_HTML::message方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_HTML::message方法的具体用法?PHP GWF_HTML::message怎么用?PHP GWF_HTML::message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_HTML
的用法示例。
在下文中一共展示了GWF_HTML::message方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Upgrade_Slaytags_1_01
function Upgrade_Slaytags_1_01(Module_Slaytags $module)
{
GWF_Website::addDefaultOutput(GWF_HTML::message('Slaytags', "BPM and Key"));
$songs = GDO::table('Slay_Song');
$songs->createColumn('ss_bpm');
$songs->createColumn('ss_key');
}
示例2: wccgpg_doit
function wccgpg_doit(WC_Challenge $chall, $user)
{
if ($user === false) {
echo GWF_HTML::error('GPG', $chall->lang('err_login'), false);
return;
}
if (!$user->hasValidMail()) {
echo GWF_HTML::error('GPG', $chall->lang('err_no_mail'));
return;
}
$receiver = $user->getValidMail();
if (!function_exists('gnupg_init')) {
echo GWF_HTML::error('GPG', $chall->lang('err_server'));
return;
}
if (false === ($fingerprint = GWF_PublicKey::getFingerprintForUser($user))) {
$url = GWF_WEB_ROOT . 'account';
echo GWF_HTML::error('GPG', $chall->lang('err_no_gpg', $url), false);
return;
}
$solution = WC_CryptoChall::generateSolution('OHOYOUGOTGPG!', true, false);
$mail = new GWF_Mail();
$mail->setSubject($chall->lang('mail_s'));
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($receiver);
$mail->setBody($chall->lang('mail_b', array($user->displayUsername(), $solution)));
if (false === $mail->sendToUser($user)) {
echo GWF_HTML::err('ERR_MAIL_SENT');
} else {
echo GWF_HTML::message('GPG', $chall->lang('msg_mail_sent', array(htmlspecialchars($receiver))));
}
}
示例3: display
public function display($title = 'Error')
{
if ($this->is_error) {
return GWF_HTML::error($title, $this->message);
} else {
return GWF_HTML::message($title, $this->message);
}
}
示例4: dldc_cleanup
function dldc_cleanup()
{
$table = GDO::table('DLDC_User');
$table->deleteWhere("wechall_userid=" . GWF_Session::getUserID());
if ($table->affectedRows() > 0) {
echo GWF_HTML::message('Disclosures', 'We have deleted your old account for this challenge!', false);
}
}
示例5: display
public function display($title = 'Error')
{
if ($this->isError()) {
return GWF_HTML::error($title, (array) $this->msg);
} else {
return GWF_HTML::message($title, (array) $this->msg);
}
}
示例6: Upgrade_Language_1_02
function Upgrade_Language_1_02(Module_Language $module)
{
echo GWF_HTML::message('GWF', 'Triggering Upgrade_Language_1_02');
echo GWF_HTML::message('GWF', 'Removing some outdated module vars ...');
echo GWF_HTML::message('GWF', 'Removing edit_time');
if (false === GWF_ModuleLoader::removeModuleVar($module, 'edit_time')) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
return '';
}
示例7: Upgrade_Register_1_01
function Upgrade_Register_1_01(Module_Register $module)
{
echo GWF_HTML::message('GWF', 'Triggering Upgrade_Register_1_01');
echo GWF_HTML::message('GWF', 'The email field in user activation database is now UTF8.');
echo GWF_HTML::message('GWF', 'I simply re-created the table!');
if (false === GDO::table('GWF_UserActivation')->createTable(true)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
return '';
}
示例8: the_preg_match
/**
* We don't like the text "evilfunction" and "badmethod".
*/
function the_preg_match(WC_Challenge $chall, $text)
{
if (1 === preg_match('#^.*((?:badmethod)|(?:evilfunction)).*$#s', $text, $matches)) {
echo GWF_HTML::error($chall->lang('title'), $chall->lang('evil', array($matches[1])));
return false;
} else {
echo GWF_HTML::message($chall->lang('title'), $chall->lang('lovely'));
return true;
}
}
示例9: Upgrade_GWF_1_04
function Upgrade_GWF_1_04(Module_GWF $module)
{
$db = gdo_db();
$country = GWF_TABLE_PREFIX . 'country';
$query = "ALTER TABLE {$country} ADD COLUMN country_pop INT(11) UNSIGNED NOT NULL DEFAULT 0";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
GWF_HTML::message('GWF', '[+] GWF 1.04 (country population)', true, true);
return '';
}
示例10: Upgrade_Profile_1_01
function Upgrade_Profile_1_01(Module_Profile $module)
{
$db = gdo_db();
$profile = GWF_TABLE_PREFIX . 'profile';
$query = "ALTER TABLE {$profile} ADD COLUMN prof_irc VARCHAR(255) CHARACTER SET ascii COLLATE ascii_bin";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
echo GWF_HTML::message('Profile', '[+] Profile IRC', false);
return '';
}
示例11: fixFavCats
private function fixFavCats()
{
require_once GWF_CORE_PATH . 'module/WeChall/WC_FavCats.php';
$cats = GWF_TABLE_PREFIX . 'wc_sitecat';
$table = GDO::table('WC_FavCats');
if (false === $table->deleteWhere("IF((SELECT 1 FROM {$cats} WHERE sitecat_name=wcfc_cat LIMIT 1), 0, 1)")) {
echo GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
$num_deleted = $table->affectedRows();
echo GWF_HTML::message('WC', sprintf('Deleted %d invalid favcat links!', $num_deleted));
}
示例12: Upgrade_WeChall_1_06
function Upgrade_WeChall_1_06(Module_WeChall $module)
{
GWF_Website::addDefaultOutput(GWF_HTML::message('WC5', "Regat table now stores challs_solved. (thx Jinx)"));
$db = gdo_db();
$regat = GWF_TABLE_PREFIX . 'wc_regat';
$query = "ALTER TABLE {$regat} ADD COLUMN regat_challsolved INT(11) NOT NULL DEFAULT -1";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
return '';
}
示例13: Upgrade_Profile_1_02
function Upgrade_Profile_1_02(Module_Profile $module)
{
$db = gdo_db();
$profile = GWF_TABLE_PREFIX . 'profile';
$query = "ALTER TABLE {$profile} ADD COLUMN prof_poi_score INT(11) DEFAULT 0";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
echo GWF_HTML::message('Profile', '[+] Profile POI Score', false);
return '';
}
示例14: Upgrade_PM_1_04
function Upgrade_PM_1_04(Module_PM $module)
{
echo GWF_HTML::message('PM', 'Triggering Upgrade_PM_1_04');
echo GWF_HTML::message('PM', 'PM ignore reasons');
$db = gdo_db();
$pmi = GWF_TABLE_PREFIX . 'pm_ignore';
$query = "ALTER TABLE {$pmi} ADD COLUMN pmi_reason TEXT CHARACTER SET utf8 COLLATE utf8_general_ci";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
return '';
}
示例15: Upgrade_PM_1_05
function Upgrade_PM_1_05(Module_PM $module)
{
echo GWF_HTML::message('PM', 'Triggering Upgrade_PM_1_05');
echo GWF_HTML::message('PM', 'PMO_user_level');
$db = gdo_db();
$pmo = GWF_TABLE_PREFIX . 'pm_options';
$query = "ALTER TABLE {$pmo} ADD COLUMN pmo_level INT(11) UNSIGNED DEFAULT 0";
if (false === $db->queryWrite($query)) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
return '';
}