本文整理汇总了PHP中output_message函数的典型用法代码示例。如果您正苦于以下问题:PHP output_message函数的具体用法?PHP output_message怎么用?PHP output_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了output_message函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: CheckKey
function CheckKey()
{
global $user, $DB, $Account;
if (isset($_GET['key'])) {
if (isset($_GET['id'])) {
$lock = $DB->selectCell("SELECT `locked` FROM account WHERE id='" . $_GET['id'] . "'");
if ($user['id'] > 0 && $lock == 0) {
output_message('info', 'Your account is already active!');
} else {
$check_key = $Account->isValidActivationKey($_GET['key']);
if ($check_key != FALSE) {
if ($_GET['id'] == $check_key) {
$DB->query("UPDATE account SET locked=0 WHERE id='" . $_GET['id'] . "' LIMIT 1");
$DB->query("UPDATE account_extend SET activation_code=NULL WHERE account_id='" . $_GET['id'] . "' LIMIT 1");
output_message('success', '<b>Account successfully activated! You may now log into the server and play.</b>');
} else {
output_message('error', 'This Activation Key does not belong to this account id!');
}
} else {
output_message('error', 'Not a valid activation key.');
}
}
}
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:25,代码来源:account.activate.php
示例2: addLink
function addLink()
{
global $DB, $Core, $lang;
$DB->query("INSERT INTO mw_menu_items(\r\n\t\t`menu_id`,\r\n\t\t`link_title`,\r\n\t\t`link`,\r\n\t\t`guest_only`,\r\n\t\t`account_level`)\r\n\t VALUES(\r\n\t\t'" . $_POST['menu_id'] . "', \r\n\t\t'" . $_POST['link_title'] . "', \r\n\t\t'" . $_POST['link'] . "', \r\n\t\t'" . $_POST['guest_only'] . "', \r\n\t\t'" . $_POST['account_level'] . "')\r\n\t");
$Core->clearCache();
output_message('success', $lang['link_add_success']);
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:7,代码来源:admin.fplinks.php
示例3: databaseErrorHandler
function databaseErrorHandler($message, $info)
{
if (!error_reporting()) {
return;
}
output_message('alert', "SQL Error: {$message}<br><pre>" . print_r($info, true) . "</pre>");
}
开发者ID:space77,项目名称:mwfv3_sp,代码行数:7,代码来源:index.php
示例4: delNews
function delNews($idzz)
{
global $DB, $Core;
$DB->query("DELETE FROM `mw_news` WHERE `id`='{$idzz}'");
$Core->clearCache();
output_message('success', 'Deleted News Item.');
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:7,代码来源:admin.news.php
示例5: addFaq
function addFaq()
{
global $DB, $Core, $lang;
$DB->query("INSERT INTO mw_faq(\r\n\t\t`question`,\r\n\t\t`answer`)\r\n\t VALUES(\r\n\t\t'" . $_POST['question'] . "', \r\n\t\t'" . $_POST['answer'] . "'\r\n\t\t)\r\n\t");
$Core->clearCache();
output_message('success', $lang['faq_add_success']);
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:7,代码来源:admin.faq.php
示例6: changeName
function changeName()
{
global $Config, $DB, $lang, $user;
include 'core/SDL/class.character.php';
$Character = new Character();
if (empty($_POST['newname'])) {
output_message('error', $lang['char_rename_newname']);
return FALSE;
}
if ($Config->get('module_charrename') == 0) {
output_message('error', 'Nice try hacking, but not good enough.');
return FALSE;
}
if ($user['web_points'] >= $Config->get('module_charrename_pts')) {
if ($Character->checkNameExists($_POST['newname']) == FALSE) {
if ($Character->isOnline($_POST['id']) == FALSE) {
if ($Character->setName($_POST['id'], $_POST['newname']) == TRUE) {
$DB->query("UPDATE `mw_account_extend` SET \n\t\t\t\t\t\t`web_points`=(`web_points` - " . $Config->get('module_charrename_pts') . "), \n\t\t\t\t\t\t`points_spent`=(`points_spent` + " . $Config->get('module_charrename_pts') . ") \n\t\t\t\t\t WHERE `account_id` = " . $user['id'] . " LIMIT 1");
output_message('success', $lang['char_rename_success'] . ' Redirecting...<meta http-equiv=refresh content="3;url=?p=account&sub=rename">');
}
} else {
output_message('validation', $lang['char_is_online']);
}
} else {
output_message('validation', $lang['char_name_exists']);
}
} else {
output_message('validation', $lang['not_enough_points']);
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:30,代码来源:account.rename.php
示例7: process
function process()
{
global $lang, $DB, $Account;
if ($_POST['retr_login'] && $_POST['retr_email'] && $_POST['secretq1'] && $_POST['secretq2'] && $_POST['secreta1'] && $_POST['secreta2']) {
//set return as true - we will make false if something is wrong
$return = TRUE;
/*Check 1*/
$username = strip_if_magic_quotes($_POST['retr_login']);
if (check_for_symbols($username, 1) == TRUE) {
$return = FALSE;
} else {
if ($DB->selectRow("SELECT * FROM `account` WHERE username='" . $username . "'") == false) {
$username == FALSE;
$return = FALSE;
} else {
$d = $DB->selectRow("SELECT * FROM `account` WHERE username='" . $username . "'");
$username =& $d['id'];
$username_name =& $d['username'];
$email =& $d['email'];
$posted_email =& $_POST['retr_email'];
/*Check 2*/
if ($email != $posted_email) {
$return = FALSE;
}
}
}
$secreta1 =& $_POST['secreta1'];
$secreta2 =& $_POST['secreta2'];
/*Check 3*/
if (check_for_symbols($_POST['secreta1']) || check_for_symbols($_POST['secreta2'])) {
$return = FALSE;
}
if ($return == FALSE) {
output_message('error', $lang['restore_pass_fail'] . '<meta http-equiv=refresh content="3;url=index.php?p=account&sub=restore">');
} elseif ($return == TRUE) {
$rp_sq1 = strip_if_magic_quotes($_POST['secretq1']);
$rp_sq2 = strip_if_magic_quotes($_POST['secretq2']);
$rp_sa1 = strip_if_magic_quotes($_POST['secreta1']);
$rp_sa2 = strip_if_magic_quotes($_POST['secreta2']);
$we = $DB->selectRow("SELECT account_id FROM `mw_account_extend` WHERE account_id='" . $username . "' AND secret_q1='" . $rp_sq1 . "' AND secret_q2='" . $rp_sq2 . "' AND secret_a1='" . $rp_sa1 . "' AND secret_a2='" . $rp_sa2 . "'");
if ($we !== FALSE) {
$pas = random_string(7);
$c_pas = $Account->sha_password($username_name, $pas);
$DB->query("UPDATE `account` SET sha_pass_hash='" . $c_pas . "' WHERE id='" . $username . "'");
$DB->query("UPDATE `account` SET sessionkey=NULL WHERE id='" . $username . "'");
output_message('success', $lang['restore_pass_success'] . '<br /> New password: ' . $pas);
} else {
output_message('error', $lang['restore_pass_fail'] . '<meta http-equiv=refresh content="3;url=index.php?n=account&sub=restore">');
}
}
} else {
output_message('error', $lang['restore_pass_fail'] . '<meta http-equiv=refresh content="3;url=index.php?p=account&sub=restore">');
echo "<br />";
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:55,代码来源:account.restore.php
示例8: clearLogFile
function clearLogFile()
{
global $lang;
$handle = fopen('core/logs/error_log.txt', 'w+');
if ($handle) {
fclose($handle);
output_message('success', $lang['error_log_cleared'] . '<meta http-equiv=refresh content="3;url=?p=admin&sub=errorlog">');
} else {
output_message('error', 'Unable to open the errorlog!');
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:11,代码来源:admin.errorlog.php
示例9: index
public function index()
{
output_message('success', 'testing');
output_message('warning', 'testing');
output_message('error', 'testing');
output_message('info', 'testing');
// Get news posts
$data['news'] = $this->news->get_news_posts();
// Load the page, and we are done :)
$this->load->view('index', $data);
}
开发者ID:Kheros,项目名称:Plexis,代码行数:11,代码来源:news.php
示例10: saveConfig
function saveConfig()
{
global $Config, $lang;
foreach ($_POST as $item => $val) {
$key = explode('__', $item);
if ($key[0] == 'cfg') {
$Config->set($key[1], $val);
}
}
$Config->Save();
output_message('success', $lang['cache_settings_saved'] . '<meta http-equiv=refresh content="3;url=?p=admin&sub=cache">');
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:12,代码来源:admin.cache.php
示例11: log_action
public static function log_action($action, $message = "")
{
$path_to_logs = SITE_ROOT . DS . 'logs';
$log = $path_to_logs . DS . "log.txt";
$new = file_exists($log) ? false : true;
if ($handle = fopen($log, 'a')) {
$timestamp = strftime("%Y-%m-%d %H:%M:%S", time());
$content = "{$timestamp} | {$action}: {$message}\n";
fwrite($handle, $content);
fclose($handle);
if ($new) {
chmod($log, 0755);
}
} else {
output_message("Log file is not writable.");
}
}
开发者ID:ryanhightower,项目名称:gallery,代码行数:17,代码来源:logger.php
示例12: confirmPayment
function confirmPayment()
{
global $DB, $user, $lang;
$pay = $DB->selectRow("SELECT * FROM `mw_donate_transactions` WHERE `account`='" . $user['id'] . "' AND `item_given`='0' LIMIT 1");
if ($pay == FALSE) {
output_message('validation', $lang['donate_no_trans']);
echo '<br /><br /><center><b><u>Redirecting...</u></b></center> <meta http-equiv=refresh content="8;url=?p=donate">';
} else {
if ($pay['payment_status'] == 'Completed') {
$item = $DB->selectRow("SELECT * FROM `mw_donate_packages` WHERE `id`='" . $pay['item_number'] . "'");
if ($item['cost'] > $pay['amount']) {
output_message('error', $lang['donate_not_face_value']);
} else {
$DB->query("UPDATE `mw_donate_transactions` SET `item_given`='1' WHERE `account`='" . $user['id'] . "' AND `id`='" . $pay['id'] . "' LIMIT 1");
$DB->query("UPDATE `mw_account_extend` SET \r\n\t\t\t\t\t`web_points` = (`web_points` + " . $item['points'] . "),\r\n\t\t\t\t\t`points_earned` = (`points_earned` + " . $item['points'] . "),\r\n\t\t\t\t\t`total_donations` = (`total_donations` + " . $pay['amount'] . ")\r\n\t\t\t\t WHERE `account_id`='" . $user['id'] . "'");
output_message('success', $lang['donate_points_given']);
}
} else {
output_message('warning', $lang['donate_status_not_complete']);
}
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:22,代码来源:donate.index.php
示例13: reCustomize
function reCustomize()
{
global $Config, $DB, $lang, $user;
include 'core/SDL/class.character.php';
$Character = new Character();
if ($Config->get('module_charcustomize') == 0) {
output_message('error', 'Nice try hacking, but not good enough.');
return FALSE;
}
// Check to see the user has enough points
if ($user['web_points'] >= $Config->get('module_charcustomize_pts')) {
if ($Character->setCustomize($_POST['id']) == TRUE) {
$DB->query("UPDATE `mw_account_extend` SET \n\t\t\t\t`web_points`=(`web_points` - " . $Config->get('module_charcustomize_pts') . "), \n\t\t\t\t`points_spent`=(`points_spent` + " . $Config->get('module_charcustomize_pts') . ") \n\t\t\t WHERE `account_id` = " . $user['id'] . " LIMIT 1");
output_message('success', $lang['char_recustomize_success']);
echo "<br /><br />";
} else {
output_message('warning', $lang['char_recustomize_already_set']);
echo "<br /><br />";
}
} else {
output_message('validation', $lang['not_enough_points']);
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:23,代码来源:account.customize.php
示例14: saveConfig
function saveConfig()
{
global $lang;
$conffile = "config/config-protected.php";
$build = '';
$build .= "<?php\n";
$build .= "\$db = array(\n";
$build .= "'db_host' => '" . $_POST['db_host'] . "',\n";
$build .= "'db_port' => '" . $_POST['db_port'] . "',\n";
$build .= "'db_username' => '" . $_POST['db_username'] . "',\n";
$build .= "'db_password' => '" . $_POST['db_password'] . "',\n";
$build .= "'db_name' => '" . $_POST['db_name'] . "',\n";
$build .= "'db_encoding' => 'utf8',\n";
$build .= ");\n";
$build .= "?>";
if (is_writeable($conffile)) {
$openconf = fopen($conffile, 'w+');
fwrite($openconf, $build);
fclose($openconf);
output_message('success', $lang['config_updated_successfully']);
} else {
output_message('error', 'Couldn\'t open main-config.php for editing, it must be writable by webserver! <br /><a href="javascript: history.go(-1)">Go back, and try again.</a>');
}
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:24,代码来源:admin.dbconfig.php
示例15: redirect_to
<?php
if (!isset($_SESSION['user_id'])) {
redirect_to(SITE_URL . DS . 'login' . DS);
}
require_once INCLUDES . DS . 'header.inc.php';
?>
<div id="content">
<?php
echo output_message($session->message);
?>
<h2>contexts<br />
<span>@<?php
echo stripslashes($page3);
?>
</h2>
<ul id="items">
<?php
$mit = new Task();
?>
<?php
$i = 1;
foreach ($contexts as $context) {
$mit = Task::find_by_id($context->task_id);
if ($mit->archived != 1) {
?>
<li class="<?php
if ($mit->completed == 1) {
echo 'dull';
开发者ID:nope,项目名称:zentodoneapp,代码行数:31,代码来源:contexts.php
示例16: unset
if (isset($_POST['profile']['g_id'])) {
unset($_POST['profile']['g_id']);
}
$_POST['profile']['signature'] = htmlspecialchars($_POST['profile']['signature']);
$DB->query("UPDATE account_extend SET ?a WHERE account_id=?d LIMIT 1", RemoveXSS($_POST['profile']), $user['id']);
redirect('index.php?n=account&sub=manage', 1);
} elseif ($_GET['action'] == 'changesecretq') {
if (check_for_symbols($_POST['secreta1']) == FALSE && check_for_symbols($_POST['secreta2']) == FALSE && $_POST[secretq1] != '0' && $_POST[secretq2] != '0' && isset($_POST[secreta1]) && isset($_POST[secreta2]) && strlen($_POST[secreta1]) > 4 && strlen($_POST[secreta2]) > 4 && $_POST['secreta1'] != $_POST['secreta2'] && $_POST['secretq1'] != $_POST['secretq2']) {
$DB->query("UPDATE account_extend SET secretq1=?,secretq2=?,secreta1=?,secreta2=? WHERE account_id=?d", strip_if_magic_quotes($_POST['secretq1']), strip_if_magic_quotes($_POST['secretq2']), strip_if_magic_quotes($_POST['secreta1']), strip_if_magic_quotes($_POST['secreta2']), $user['id']);
output_message('notice', '<b>' . $lang['changed_secretq'] . '</b><meta http-equiv=refresh content="4;url=index.php?n=account&sub=manage">');
} else {
output_message('alert', '<b>' . $lang['fail_change_secretq'] . '</b><meta http-equiv=refresh content="3;url=index.php?n=account&sub=manage">');
}
} elseif ($_GET['action'] == 'resetsecretq') {
if ($_POST['reset_secretq']) {
$DB->query("UPDATE account_extend SET secretq1='0',secretq2='0',secreta1='0',secreta2='0' WHERE account_id=?d", $user['id']);
output_message('notice', '<b>' . $lang['reset_succ_secretq'] . '</b><meta http-equiv=refresh content="4;url=index.php?n=account&sub=manage">');
}
} elseif ($_GET['action'] == 'change_gameplay') {
if ($_POST['switch_wow_type'] == 'wotlk') {
$DB->query("UPDATE `account` SET expansion='2' WHERE `id`=?d", $user['id']);
output_message('notice', '<b>' . $lang['exp_set'] . '</b><meta http-equiv=refresh content="4;url=index.php?n=account&sub=manage">');
} elseif ($_POST['switch_wow_type'] == 'tbc') {
$DB->query("UPDATE `account` SET expansion='1' WHERE `id`=?d", $user['id']);
output_message('notice', '<b>' . $lang['exp_set'] . '</b><meta http-equiv=refresh content="4;url=index.php?n=account&sub=manage">');
} elseif ($_POST['switch_wow_type'] == 'classic') {
$DB->query("UPDATE `account` SET expansion='0' WHERE `id`=?d", $user['id']);
output_message('notice', '<b>' . $lang['exp_set'] . '</b><meta http-equiv=refresh content="4;url=index.php?n=account&sub=manage">');
}
}
}
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:31,代码来源:account.manage.php
示例17: output_message
" />
<p class="field_help">Cost in Web Points for users to change the race of their characters</p>
</div>
<br />
<!-- In Forum Module Settings -->
<table>
<thead>
<tr>
<th><center><a name="forum"></a>Forum Integration Settings</center></th>
</tr>
</thead>
</table>
<br />
<?php
output_message('warning', 'Forum bridges have been disabled due to compatibility issues.');
?>
<br />
<div class="field">
<label for="Site module_phpbb3">PhpBB3 Forum: </label>
<select id="type" class="small" name="cfg__module_phpbb3">
<?php
if ($Config->get('module_phpbb3') == 1) {
$e_pbbf = 'selected="selected"';
$e_pbbf2 = '';
} else {
$e_pbbf2 = 'selected="selected"';
$e_pbbf = '';
}
?>
<option value="1" <?php
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:31,代码来源:admin.siteconfig.php
示例18: print_r
}
} else
{
$req_tpl = true ;
@include ( $script_file ) ;
}
}
}
if ( empty( $_GET['nobody'] ) )
{
// DEBUG //
if ( ( int )$MW->getConfig->generic->debuginfo )
{
output_message( 'debug', 'DEBUG://' . $DB->_statistics['count'] ) ;
output_message( 'debug', '<pre>' . print_r( $_SERVER, true ) . '</pre>' ) ;
}
// =======//
// Start Loading Of Template Files
include ( '' . $offtmp . '/body_functions.php' );
ob_start() ;
include ( '' . $offtmp . '/body_header.php' );
ob_end_flush() ;
if ( $req_tpl )
{
if ( file_exists( $template_file ) )
{
// Only cache if user is not logged in.
if ( $user['id'] < 0 && ( int )$MW->getConfig->generic->cache_expiretime != 0 )
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:31,代码来源:index.php
示例19: isset
<?php
$stylesheets = "";
$fluid_view = true;
$javascript = "";
$incl_message_error = true;
?>
<?php
include HEADER;
include NAV;
?>
<?php
echo isset($valid) ? $valid->form_errors() : "";
echo isset($message) ? output_message($message) : "";
?>
<!--<body class="gray-bg">-->
<div class="passwordBox animated fadeInDown">
<div class="row">
<div class="col-md-12">
<div class="ibox-content">
<h2 class="font-bold">Forgot password</h2>
<p>
Enter your user name and your password will be reset and emailed to you.
</p>
开发者ID:kamy333,项目名称:rajah,代码行数:30,代码来源:login_forgot_password_username.php
示例20: get_realm_byid
if ($_GET['realm']) {
$realm_info = get_realm_byid($_GET['realm']);
$pathway_info[] = array('title' => $realm_info['name'], '');
$cc = 0;
$rid = $realm_info['cloneid'] == -1 ? $realm_info['id'] : $realm_info['cloneid'];
$rrealm_info = get_realm_byid($rid);
AddMangosFields($rrealm_info['Version']);
$charinfo_link = $rrealm_info['WowdCharInfoLink'];
$faction_alliance = 0;
$faction_horde = 0;
$total = 0;
if (check_port_status($rrealm_info['address'], $rrealm_info['port']) !== true) {
output_message('alert', 'Realm <b>' . $rrealm_info['name'] . '</b> is offline <img src="images/downarrow2.gif" border="0" align="top">');
} else {
if (!$rrealm_info['CharacterDatabaseInfo']) {
output_message('alert', 'Check field <u>CharacterDatabaseInfo</u> in table `realmlist` for realm id=' . $realm_info['id']);
}
$wsdb_info = parse_worlddb_info($rrealm_info['CharacterDatabaseInfo']);
if ($DB) {
$query = $DB->select("SELECT c.*, a.* FROM " . $wsdb_info['db'] . ".`characters` as c, `account` as a \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE ((c.`online`='1') AND (c.`account`=a.`id`)) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY c.`name`");
}
$faction_alliance = 0;
$faction_horde = 0;
$total = 0;
foreach ($query as $result) {
if ($res_color == 1) {
$res_color = 2;
} else {
$res_color = 1;
}
$cc++;
开发者ID:space77,项目名称:mwfv3_sp,代码行数:31,代码来源:server.playersonline.php
注:本文中的output_message函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论