本文整理汇总了PHP中reset_language函数的典型用法代码示例。如果您正苦于以下问题:PHP reset_language函数的具体用法?PHP reset_language怎么用?PHP reset_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reset_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->authenticate->redirect_except();
reset_language(current_language());
$this->form_validation->set_error_delimiters('<p class="error">', '</p>');
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->authenticate->redirect_except();
reset_language(current_language());
$this->form_validation->set_error_delimiters('<label class="error">', '</label>');
// Uploading experiment attachments
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'pdf';
$this->load->library('upload', $config);
}
示例3: __construct
public function __construct()
{
parent::__construct();
reset_language(L::Dutch);
$this->load->model('NCDICheckModel');
$this->form_validation->set_error_delimiters('<p class="error">', '</p>');
$config['upload_path'] = './uploads/';
$config['max_size'] = '100';
$config['allowed_types'] = '*';
$this->load->library('upload', $config);
}
示例4: callers
/**
* Sends out reminders for callers.
*/
public function callers()
{
if (!$this->input->is_cli_request()) {
echo "This script can only be accessed via the command line" . PHP_EOL;
return;
}
$users = $this->userModel->get_all_callers();
foreach ($users as $user) {
reset_language(user_language($user));
$this->email->clear();
$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);
$this->email->to(in_development() ? TO_EMAIL_OVERRIDE : $user->email);
$this->email->subject(lang('rem_subject'));
$call_messages = array();
$experiments = $this->callerModel->get_experiments_by_caller($user->id);
foreach ($experiments as $experiment) {
if ($experiment->archived != 1) {
$count = count($this->participantModel->find_participants($experiment));
if ($count > 0) {
array_push($call_messages, sprintf(lang('rem_exp_call'), $experiment->name, $count));
}
}
}
if ($call_messages) {
$message = sprintf(lang('mail_heading'), $user->username);
$message .= br(2);
$message .= lang('rem_body');
$message .= br(1);
$message .= ul($call_messages);
$message .= lang('mail_ending');
$message .= br(2);
$message .= lang('mail_disclaimer');
$this->email->message($message);
$this->email->send();
// DEBUG: echo $this->email->print_debugger();
}
}
}
示例5: forgot_password_submit
/**
*
* Submits the password reset request
* @param $language
*/
public function forgot_password_submit($language = L::English)
{
reset_language($language);
// Validation rules
$this->form_validation->set_rules('email', lang('email'), 'trim|required|valid_email|callback_email_exists|callback_reset_request_sent');
// Run validation
if ($this->form_validation->run() == FALSE) {
// If not succeeded, show form again with error messages
$this->forgot_password();
} else {
// If succeeded, lookup user by e-mail address and send password reset e-mail.
$user = $this->userModel->get_user_by_email($this->input->post('email'));
$url = bin2hex(openssl_random_pseudo_bytes(8));
$reset_request = array('activated' => NULL, 'resetrequeststring' => $url, 'resetrequesttime' => input_datetime());
$this->userModel->update_user($user->id, $reset_request);
// Send out reset e-mail
reset_language(user_language($user));
$this->email->clear();
$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);
$this->email->to(in_development() ? TO_EMAIL_OVERRIDE : $user->email);
$this->email->subject(lang('resetpw_subject'));
$message = sprintf(lang('mail_heading'), $user->username);
$message .= br(2);
$message .= sprintf(lang('resetpw_body'), anchor(base_url() . 'resetpw/' . $url));
$message .= br(2);
$message .= lang('mail_ending');
$message .= br(2);
$message .= lang('mail_disclaimer');
$this->email->message($message);
$this->email->send();
// Show success
flashdata(sprintf(lang('forgot_pw_sent'), $user->email));
redirect('login', 'refresh');
}
}
示例6: deactivate
/** Deactivates the specified participant */
public function deactivate($participant_id)
{
$this->participantModel->deactivate($participant_id, DeactivateReason::Manual);
$p = $this->participantModel->get_participant_by_id($participant_id);
// Inform all admins of this deactivation
$url = $this->config->site_url() . 'participant/get/' . $participant_id;
$users = $this->userModel->get_all_admins();
foreach ($users as $user) {
reset_language(user_language($user));
$this->email->clear();
$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);
$this->email->to(in_development() ? TO_EMAIL_OVERRIDE : $user->email);
$this->email->subject(lang('dereg_pp_subject'));
$message = sprintf(lang('mail_heading'), $user->username);
$message .= br(2);
$message .= sprintf(lang('deac_pp_body'), name($p), $p->phone, current_username(), $url, $url);
$message .= br(2);
$message .= lang('mail_ending');
$message .= br(2);
$message .= lang('mail_disclaimer');
$this->email->message($message);
$this->email->send();
}
flashdata(sprintf(lang('p_deactivated'), name($p)));
redirect($this->agent->referrer(), 'refresh');
}
示例7: email_replace
/**
* This method creates an e-mail by referring to a view and replacing the variables.
* TODO: refactor to use less parameters (all in one array)?
*/
function email_replace($view, $participant = NULL, $participation = NULL, $experiment = NULL, $testinvite = NULL, $comb_experiment = NULL, $auto = FALSE, $message = "", $language = L::Dutch)
{
$CI =& get_instance();
$user = $CI->userModel->get_user_by_id(current_user_id());
reset_language($language);
$message_data = array();
$message_data['auto'] = $auto;
$message_data['message'] = $message;
$message_data['combination'] = FALSE;
$message_data['longitudinal'] = FALSE;
$message_data['survey_link'] = FALSE;
if ($user) {
$message_data['user_username'] = $user->username;
$message_data['user_email'] = $user->email;
}
if ($participant) {
$message_data['name'] = name($participant);
$message_data['name_first'] = $participant->firstname;
$message_data['name_parent'] = parent_name($participant);
$message_data['gender'] = gender_child($participant->gender);
$message_data['gender_pos'] = gender_pos($participant->gender);
$message_data['gender_plural'] = gender_sex($participant->gender) . 's';
$message_data['phone'] = $participant->phone;
}
if ($participation) {
$leader = $CI->userModel->get_user_by_id($participation->user_id_leader);
$message_data['appointment'] = format_datetime($participation->appointment);
if ($leader) {
$message_data['leader_name'] = $leader->firstname;
}
}
if ($experiment) {
$location = $CI->locationModel->get_location_by_experiment($experiment);
$message_data['exp_name'] = $experiment->name;
$message_data['type'] = $experiment->type;
$message_data['duration'] = $experiment->duration;
$message_data['duration_total'] = $experiment->duration + INSTRUCTION_DURATION;
$message_data['description'] = $experiment->description;
$message_data['location'] = sprintf('%s (%s)', $location->name, $location->roomnumber);
$message_data['caller_contacts'] = extract_callers($experiment, $comb_experiment);
}
if ($comb_experiment) {
$location = $CI->locationModel->get_location_by_experiment($comb_experiment);
$comb_participation = $CI->participationModel->get_participation($comb_experiment->id, $participant->id);
$relation = $CI->relationModel->get_relation_by_experiments($experiment->id, $comb_experiment->id);
$message_data['combination'] = $relation->relation === RelationType::Combination;
$message_data['longitudinal'] = $relation->relation === RelationType::Prerequisite;
$message_data['comb_exp_name'] = $comb_experiment->name;
$message_data['comb_type'] = $comb_experiment->type;
$message_data['comb_duration'] = $comb_experiment->duration;
$message_data['comb_duration_total'] = $comb_experiment->duration + INSTRUCTION_DURATION;
$message_data['comb_description'] = $comb_experiment->description;
$message_data['comb_location'] = sprintf('%s (%s)', $location->name, $location->roomnumber);
$message_data['comb_appointment'] = format_datetime($comb_participation->appointment);
}
if ($participant && $experiment) {
$data = get_min_max_days($participant, $experiment);
$message_data['min_date'] = format_date($data['min_date_js']);
$message_data['max_date'] = format_date($data['max_date_js']);
}
if ($testinvite) {
$test = $CI->testInviteModel->get_test_by_testinvite($testinvite);
$testsurvey = $CI->testInviteModel->get_testsurvey_by_testinvite($testinvite);
$message_data['survey_name'] = testsurvey_name($testsurvey);
$message_data['survey_link'] = survey_link($testsurvey->limesurvey_id, $testinvite->token);
$message_data['results_link'] = results_link($test->code, $testinvite->token);
$message_data['whennr'] = $testsurvey->whennr;
}
return $CI->load->view($view, $message_data, TRUE);
}
示例8: load_user_preferences
function load_user_preferences($guest = '')
{
global $ALLOW_COLOR_CUSTOMIZATION, $browser, $DATE_FORMAT, $DATE_FORMAT_MD, $DATE_FORMAT_MY, $DATE_FORMAT_TASK, $has_boss, $is_assistant, $is_nonuser, $is_nonuser_admin, $lang_file, $LANGUAGE, $login, $prefarray, $user, $views;
$browser = get_web_browser();
$browser_lang = get_browser_language();
$colors = array('BGCOLOR' => 1, 'CELLBG' => 1, 'H2COLOR' => 1, 'HASEVENTSBG' => 1, 'MYEVENTS' => 1, 'OTHERMONTHBG' => 1, 'POPUP_BG' => 1, 'POPUP_FG' => 1, 'TABLEBG' => 1, 'TEXTCOLOR' => 1, 'THBG' => 1, 'THFG' => 1, 'TODAYCELLBG' => 1, 'WEEKENDBG' => 1, 'WEEKNUMBER' => 1);
$lang_found = false;
$prefarray = array();
// Allow __public__ pref to be used if logging in or user not validated.
$tmp_login = empty($guest) ? $login : ($guest == 'guest' ? '__public__' : $guest);
$rows = dbi_get_cached_rows('SELECT cal_setting, cal_value
FROM webcal_user_pref WHERE cal_login = ?', array($tmp_login));
if ($rows) {
for ($i = 0, $cnt = count($rows); $i < $cnt; $i++) {
$row = $rows[$i];
$setting = $row[0];
$value = $row[1];
if ($setting == 'LANGUAGE') {
$lang_found = true;
}
if ($ALLOW_COLOR_CUSTOMIZATION == 'N' && isset($colors[$setting])) {
continue;
}
// $sys_setting = 'sys_' . $setting;
// Save system defaults.
if (!empty($GLOBALS[$setting])) {
$GLOBALS['sys_' . $setting] = $GLOBALS[$setting];
}
$GLOBALS[$setting] = $prefarray[$setting] = $value;
}
}
// Set users timezone.
if (isset($GLOBALS['TIMEZONE'])) {
set_env('TZ', $GLOBALS['TIMEZONE']);
}
// Get views for this user and global views.
// If NUC and not authorized by UAC, disallow global views.
$rows = dbi_get_cached_rows('SELECT cal_view_id, cal_name, cal_view_type,
cal_is_global, cal_owner FROM webcal_view WHERE cal_owner = ? ' . ($is_nonuser && (!access_is_enabled() || access_is_enabled() && !access_can_access_function(ACCESS_VIEW, $guest)) ? '' : ' OR cal_is_global = \'Y\' ') . 'ORDER BY cal_name', array($tmp_login));
if ($rows) {
$views = array();
for ($i = 0, $cnt = count($rows); $i < $cnt; $i++) {
$row = $rows[$i];
$url = 'view_';
if ($row[2] == 'E') {
$url .= 'r.php?';
} elseif ($row[2] == 'S') {
$url .= 't.php?';
} elseif ($row[2] == 'T') {
$url .= 't.php?';
} else {
$url .= strtolower($row[2]) . '.php?';
}
$v = array('cal_view_id' => $row[0], 'cal_name' => $row[1], 'cal_view_type' => $row[2], 'cal_is_global' => $row[3], 'cal_owner' => $row[4], 'url' => $url . 'id=' . $row[0]);
$views[] = $v;
}
}
// If user has not set a language preference and admin has not specified a
// language, then use their browser settings to figure it out
// and save it in the database for future use (email reminders).
$lang = 'none';
if (!$lang_found && strlen($tmp_login) && $tmp_login != '__public__') {
if ($LANGUAGE == 'none') {
$lang = $browser_lang;
}
dbi_execute('INSERT INTO webcal_user_pref ( cal_login, cal_setting,
cal_value ) VALUES ( ?, ?, ? )', array($tmp_login, 'LANGUAGE', $lang));
}
reset_language(!empty($LANGUAGE) && $LANGUAGE != 'none' ? $LANGUAGE : $browser_lang);
if (empty($DATE_FORMAT) || $DATE_FORMAT == 'LANGUAGE_DEFINED') {
$DATE_FORMAT = translate('__month__ __dd__, __yyyy__');
}
if (empty($DATE_FORMAT_MY) || $DATE_FORMAT_MY == 'LANGUAGE_DEFINED') {
$DATE_FORMAT_MY = translate('__month__ __yyyy__');
}
if (empty($DATE_FORMAT_MD) || $DATE_FORMAT_MD == 'LANGUAGE_DEFINED') {
$DATE_FORMAT_MD = translate('__month__ __dd__');
}
if (empty($DATE_FORMAT_TASK) || $DATE_FORMAT_TASK == 'LANGUAGE_DEFINED') {
$DATE_FORMAT_TASK = translate('__mm__/__dd__/__yyyy__');
}
$has_boss = user_has_boss($tmp_login);
$is_assistant = empty($user) ? false : user_is_assistant($tmp_login, $user);
$is_nonuser_admin = $user ? user_is_nonuser_admin($tmp_login, $user) : false;
// if ( $is_nonuser_admin ) load_nonuser_preferences ($user);
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->authenticate->redirect_except();
reset_language(current_language());
}
示例10: send_reminder
function send_reminder($id, $event_date)
{
global $names, $emails, $site_extras, $debug, $only_testing, $server_url, $languages, $tzoffset, $application_name;
global $EXTRA_TEXT, $EXTRA_MULTILINETEXT, $EXTRA_URL, $EXTRA_DATE, $EXTRA_EMAIL, $EXTRA_USER, $EXTRA_REMINDER, $LANGUAGE, $LOG_REMINDER;
global $allow_external_users, $external_reminders;
$pri[1] = translate("Low");
$pri[2] = translate("Medium");
$pri[3] = translate("High");
// get participants first...
$sql = "SELECT cal_login FROM webcal_entry_user " . "WHERE cal_id = {$id} AND cal_status IN ('A','W') " . "ORDER BY cal_login";
$res = dbi_query($sql);
$participants = array();
$num_participants = 0;
if ($res) {
while ($row = dbi_fetch_row($res)) {
$participants[$num_participants++] = $row[0];
}
}
// get external participants
$ext_participants = array();
$num_ext_participants = 0;
if (!empty($allow_external_users) && $allow_external_users == "Y" && !empty($external_reminders) && $external_reminders == "Y") {
$sql = "SELECT cal_fullname, cal_email FROM webcal_entry_ext_user " . "WHERE cal_id = {$id} AND cal_email IS NOT NULL " . "ORDER BY cal_fullname";
$res = dbi_query($sql);
if ($res) {
while ($row = dbi_fetch_row($res)) {
$ext_participants[$num_ext_participants] = $row[0];
$ext_participants_email[$num_ext_participants++] = $row[1];
}
}
}
if (!$num_participants && !$num_ext_participants) {
if ($debug) {
echo "No participants found for event id: {$id} <br />\n";
}
return;
}
// get event details
$res = dbi_query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, " . "cal_mod_time, cal_duration, cal_priority, cal_type, cal_access, " . "cal_name, cal_description FROM webcal_entry WHERE cal_id = {$id}");
if (!$res) {
echo "Db error: could not find event id {$id}.\n";
return;
}
if (!($row = dbi_fetch_row($res))) {
echo "Error: could not find event id {$id} in database.\n";
return;
}
// send mail. we send one user at a time so that we can switch
// languages between users if needed.
$mailusers = array();
$recipients = array();
if (isset($single_user) && $single_user == "Y") {
$mailusers[] = $emails[$single_user_login];
$recipients[] = $single_user_login;
} else {
for ($i = 0; $i < count($participants); $i++) {
if (strlen($emails[$participants[$i]])) {
$mailusers[] = $emails[$participants[$i]];
$recipients[] = $participants[$i];
} else {
if ($debug) {
echo "No email for user {$participants[$i]} <br />\n";
}
}
}
for ($i = 0; $i < count($ext_participants); $i++) {
$mailusers[] = $ext_participants_email[$i];
$recipients[] = $ext_participants[$i];
}
}
if ($debug) {
echo "Found " . count($mailusers) . " with email addresses <br />\n";
}
for ($j = 0; $j < count($mailusers); $j++) {
$recip = $mailusers[$j];
$user = $participants[$j];
if (!empty($languages[$user])) {
$userlang = $languages[$user];
} else {
$userlang = $LANGUAGE;
}
// system default
if ($userlang == "none") {
$userlang = "English-US";
}
// gotta pick something
if ($debug) {
echo "Setting language to \"{$userlang}\" <br />\n";
}
reset_language($userlang);
// reset timezone setting for current user
if (empty($tzoffset[$user])) {
$GLOBALS["TZ_OFFSET"] = 0;
} else {
$GLOBALS["TZ_OFFSET"] = $tzoffset[$user];
}
$body = translate("This is a reminder for the event detailed below.") . "\n\n";
$create_by = $row[0];
$name = $row[9];
$description = $row[10];
//.........这里部分代码省略.........
示例11: clearstatcache
$fileDir = '../includes';
//change this path if needed
$firebird_path = 'c:/program files/firebird/firebird_1_5/examples/employee.fdb';
clearstatcache();
// We may need time to run extensive database loads
if (!get_php_setting('safe_mode')) {
set_time_limit(240);
}
// If we're using SQLLite, it seems that magic_quotes_sybase must be on
//ini_set('magic_quotes_sybase', 'On');
// Check for proper auth settings
if (!empty($_SERVER['PHP_AUTH_USER'])) {
$PHP_AUTH_USER = $_SERVER['PHP_AUTH_USER'];
}
//We'll always use browser defined languages
reset_language('none');
//Some common translations used in the install script
// translate ( 'WebCalendar Installation Wizard' ) translate ( 'Step' )
$wizardStr = translate('WebCalendar Installation Wizard Step XXX');
$passwordStr = translate('Password');
$singleUserStr = translate('Single-User');
$loginStr = translate('Login');
$failureStr = '<b>' . translate('Failure Reason') . ': </b>';
$manualStr = translate('You must manually create database');
$cachedirStr = translate('Database Cache Directory');
$logoutStr = translate('Logout');
$testSettingsStr = translate('Test Settings');
$createNewStr = translate('Create New');
$datebaseNameStr = translate('Database Name');
$backStr = translate('Back');
$nextStr = translate('Next');
示例12: validate
/** Validates username and password. */
public function validate($language)
{
reset_language($language);
// Set validation rules
$this->form_validation->set_rules('username', lang('username'), 'trim|required|callback_authenticate');
$this->form_validation->set_rules('password', lang('password'), 'trim|required');
// Rewrite error messages
$this->form_validation->set_message('authenticate', lang('invalid_login'));
return $this->form_validation->run();
}
示例13: check_completed
/**
* Checks if surveys have been completed
*/
public function check_completed()
{
if (!$this->input->is_cli_request()) {
echo "This script can only be accessed via the command line" . PHP_EOL;
return;
}
// Set the language to Dutch (TODO: set to language of participant?)
reset_language(L::Dutch);
// Get all testinvites that have not yet been completed
$testinvites = $this->testInviteModel->get_not_completed_testinvites();
foreach ($testinvites as $testinvite) {
$testsurvey = $this->testInviteModel->get_testsurvey_by_testinvite($testinvite);
// If the survey still exists in LimeSurvey...
if ($this->surveyModel->get_survey_by_id($testsurvey->limesurvey_id)) {
// Check with LimeSurvey whether the survey has actually been completed
$result = $this->surveyModel->get_result_by_token($testsurvey->limesurvey_id, $testinvite->token);
if ($result) {
// If there is actually a result row, set the survey to completed
$this->testInviteModel->set_completed($testinvite->id, $result->submitdate);
}
}
}
}
示例14: send_reminder
function send_reminder($id, $event_date)
{
global $ALLOW_EXTERNAL_USERS, $debug, $def_tz, $emails, $EXTERNAL_REMINDERS, $attachics, $htmlmail, $is_task, $LANGUAGE, $languages, $names, $only_testing, $SERVER_URL, $site_extras, $t_format, $tz;
$ext_participants = $participants = array();
$num_ext_participants = $num_participants = 0;
$pri[1] = translate('High');
$pri[2] = translate('Medium');
$pri[3] = translate('Low');
// Get participants first...
$res = dbi_execute('SELECT cal_login, cal_percent FROM webcal_entry_user
WHERE cal_id = ? AND cal_status IN ( \'A\',\'W\' ) ORDER BY cal_login', array($id));
if ($res) {
while ($row = dbi_fetch_row($res)) {
$participants[$num_participants++] = $row[0];
$percentage[$row[0]] = $row[1];
}
}
$partcnt = count($participants);
// Get external participants.
if (!empty($ALLOW_EXTERNAL_USERS) && $ALLOW_EXTERNAL_USERS == 'Y' && !empty($EXTERNAL_REMINDERS) && $EXTERNAL_REMINDERS == 'Y') {
$res = dbi_execute('SELECT cal_fullname, cal_email
FROM webcal_entry_ext_user WHERE cal_id = ? AND cal_email IS NOT NULL
ORDER BY cal_fullname', array($id));
if ($res) {
while ($row = dbi_fetch_row($res)) {
$ext_participants[$num_ext_participants] = $row[0];
$ext_participants_email[$num_ext_participants++] = $row[1];
}
}
}
$ext_partcnt = count($ext_participants);
if (!$num_participants && !$num_ext_participants) {
if ($debug) {
echo 'No participants found for event id' . ": {$id}<br />\n";
}
return;
}
// Get event details.
$res = dbi_execute('SELECT cal_create_by, cal_date, cal_time, cal_mod_date,
cal_mod_time, cal_duration, cal_priority, cal_type, cal_access, cal_name,
cal_description, cal_due_date, cal_due_time FROM webcal_entry
WHERE cal_id = ?', array($id));
if (!$res) {
echo translate('Database error') . ': ' . translate('could not find event id') . " {$id}.\n";
return;
}
if (!($row = dbi_fetch_row($res))) {
echo translate('Error') . ': ' . str_replace('XXX', $id, translate('could not find event id XXX in database.')) . "\n";
return;
}
// Send mail. We send one user at a time so that we can switch
// languages between users if needed (as well as HTML vs plain text).
$mailusers = $recipients = array();
if (isset($single_user) && $single_user == 'Y') {
$mailusers[] = $emails[$single_user_login];
$recipients[] = $single_user_login;
} else {
for ($i = 0; $i < $partcnt; $i++) {
if (strlen($emails[$participants[$i]])) {
$mailusers[] = $emails[$participants[$i]];
$recipients[] = $participants[$i];
} else {
if ($debug) {
echo "No email for user {$participants[$i]}.<br />\n";
}
}
}
for ($i = 0; $i < $ext_partcnt; $i++) {
$mailusers[] = $ext_participants_email[$i];
$recipients[] = $ext_participants[$i];
}
}
$mailusercnt = count($mailusers);
if ($debug) {
echo 'Found ' . $mailusercnt . " with email addresses<br />\n";
}
for ($j = 0; $j < $mailusercnt; $j++) {
$recip = $mailusers[$j];
$user = $recipients[$j];
$isExt = !in_array($user, $participants);
$userlang = empty($languages[$user]) ? $LANGUAGE : $languages[$user];
$userTformat = !empty($t_format[$user]) ? $t_format[$user] : 24;
// Gotta pick something.
if ($userlang == 'none') {
$userlang = 'English-US';
}
// Gotta pick something.
if ($debug) {
echo "Setting language to \"{$userlang}\".<br />\n";
}
reset_language($userlang);
$adminStr = translate('Administrator');
// Reset timezone setting for current user.
if (!empty($tz[$user])) {
$display_tzid = 2;
// Display TZ.
$user_TIMEZONE = $tz[$user];
} else {
if (!empty($def_tz)) {
$display_tzid = 2;
//.........这里部分代码省略.........
示例15: validate_email
/** Validates an e-mail */
public function validate_email($language)
{
reset_language($language);
// Set validation rules
$this->form_validation->set_rules('email', lang('email'), 'trim|required|valid_email|callback_participant_exists');
return $this->form_validation->run();
}