Exemple #1
0
function emailPassword($user_id)
{
    $user = db_grab('SELECT u.email, l.code language FROM users u JOIN languages l ON u.language_id = l.id WHERE u.is_active = 1 AND u.id = ' . $user_id);
    $message = getString('email_password_message', $user['language']);
    $message = str_replace('%LINK%', url_base() . '/login/password_reset.php?id=' . $user_id, $message);
    emailUser($user['email'], getString('email_password_subject', $user['language']), $message);
}
Exemple #2
0
						f.description' . langExt($lang) . ' description,
						ISNULL(u.nickname, u.firstname) firstname, 
						u.lastname
					FROM bb_followups f
					JOIN users u ON f.created_user = u.id
					WHERE f.id = ' . $id);
            $channels_text = db_array('SELECT c.title' . langExt($lang) . ' FROM bb_topics_to_channels t2c JOIN channels c ON t2c.channel_id = c.id WHERE t2c.topic_id = ' . $_POST['topic_id']);
            $channels_text = implode(', ', $channels_text);
            $message = '<p style="font-weight:bold;">' . $reply['firstname'] . ' ' . $reply['lastname'] . ' ' . getString('bb_followup', $lang) . '</p>
				<p>' . getString('title', $lang) . ': ' . draw_link(url_base() . '/bb/topic.php?id=' . $id, $topic['title']) . '</p>
				<p>' . getString('channels_label', $lang) . ': ' . $channels_text . '</p>';
            if ($topic['type']) {
                $message .= '<p>' . getString('category', $lang) . ': ' . $topic['type'] . '</p>';
            }
            $message .= '<div style="color:#555; border-top:1px dotted #555; padding-top:5px; margin-top:5px;">' . $reply['description'] . '</div>';
            emailUser($emails, 'RE: ' . $topic['title'], $message);
        }
    }
    bbDrawRss();
    url_change();
} elseif (isset($_GET['delete'])) {
    db_delete('bb_topics');
    bbDrawRss();
    url_change('/bb/');
} elseif (isset($_GET['deleteFollowupID'])) {
    db_delete('bb_followups', $_GET['deleteFollowupID']);
    bbDrawRss();
    url_query_drop('deleteFollowupID');
}
//get topic data
if (!($r = bbDrawTopic($_GET['id']))) {
function createUser($name, $email, $phone, $shirt, $pass)
{
    mysql_query("INSERT INTO `players_2015` (`name`, `email`, `phone`, `shirt`, `password`) values ('{$name}', '{$email}', '{$phone}', '{$shirt}', '{$pass}')") or die(mysql_error());
    emailUser($email, $name);
}
Exemple #4
0
	break;

	case "banProfile":
	case "banprofile":
	$oldignoreuserabort = ignore_user_abort(true);
	banUser($option,$uid,$form,$act);
	break;

	case "viewReports":
	case "viewreports":
	viewReports($option,$uid,$act);
	break;

	case "emailUser":
	case "emailuser":
	emailUser($option,$uid);
	break;

	case "pendingApprovalUser":
	case "pendingapprovaluser":
	pendingApprovalUsers($option);
	break;

	case "approveUser":
	case "approveuser":
	$oldignoreuserabort = ignore_user_abort(true);
	approveUser(cbGetParam($_POST,'uids'));
	break;

	case "rejectUser":
	case "rejectuser":
Exemple #5
0
						u.lastname, 
						t.title' . langExt($l['code']) . ' title, 
						t.description' . langExt($l['code']) . ' description, 
						y.title' . langExt($l['code']) . ' type,
						t.created_date
					FROM bb_topics t
					LEFT JOIN bb_topics_types y ON t.type_id = y.id
					JOIN users u ON t.created_user = u.id
					WHERE t.id = ' . $id);
            $channels_text = db_array('SELECT title' . langExt($l['code']) . ' FROM channels WHERE id IN (' . implode(',', $channels) . ')');
            $channels_text = implode(', ', $channels_text);
            $message = '<p style="font-weight:bold;">' . $topic['firstname'] . ' ' . $topic['lastname'] . ' ' . getString('bb_notify', $l['code']) . '</p>
				<p>' . getString('title', $l['code']) . ': ' . draw_link(url_base() . '/bb/topic.php?id=' . $id, $topic['title']) . '</p>
				<p>' . getString('channels_label', $l['code']) . ': ' . $channels_text . '</p>';
            if ($topic['type']) {
                $message .= '<p>' . getString('category', $l['code']) . ': ' . $topic['type'] . '</p>';
            }
            $message .= '<div style="color:#555; border-top:1px dotted #555; padding-top:5px; margin-top:5px;">' . $topic['description'] . '</div>';
            emailUser($addresses, $topic['title'], $message);
        }
    }
    bbDrawRss();
    url_change();
}
echo drawTop(drawSyndicateLink('bb'));
echo draw_div('bb_topics', bbDrawTable(15));
echo draw_javascript('function_attach(setInterval(refreshBB, 60000));');
//add new topic
echo '<a name="bottom"></a>';
echo drawTopicForm();
echo drawBottom();