diagnostic.php'
);
}
if ( ( $mode === 'after_install' && User( 'STAFF_ID' ) === '1' )
|| $mode === 'force_password_change' )
{
$_ROSARIO['allow_edit'] = true;
// Set password on first login.
$fields[] = PasswordInput(
'',
'first_login[PASSWORD]',
_( 'New Password' ),
'required strength autofocus'
);
}
return $fields;
}
}
if ( ! function_exists( 'FirstLoginPoll' ) )
{
/**
* Get First Login Poll
*
* @since 4.6
* @since 5.2 Add Organization radio inputs.
*
* @return array Poll HTML array.
*/
function FirstLoginPoll()
{
global $locale,
$_ROSARIO;
if ( User( 'STAFF_ID' ) !== '1' )
{
return false;
}
// Check if client has Internet connection.
$has_connection = @file_get_contents( 'https://www.rosariosis.org/installation-poll/poll-submit.php' );
if ( ! $has_connection )
{
// Server may be down?
return false;
}
$fields = array();
$fields[] = '';
$fields[] = '';
$_ROSARIO['allow_edit'] = true;
$usage_options = array(
'testing' => _( 'Testing' ),
'production' => _( 'Production' ),
);
$fields[] = RadioInput( '', 'usage', _( 'Usage' ), $usage_options, false );
$school_options = array(
'primary' => _( 'Primary' ),
'secondary' => _( 'Secondary' ),
'superior' => _( 'Superior' ),
'other' => _( 'Other' ),
);
$fields[] = RadioInput( '', 'school', _( 'School' ), $school_options, false );
$organization_options = array(
'private' => _( 'Private' ),
'public' => _( 'Public' ),
'non-profit' => _( 'Non-profit' ),
);
$fields[] = RadioInput( '', 'organization', _( 'Organization' ), $organization_options, false );
$fields[] = TextInput(
'0',
'students',
_( 'Students' ),
'type="number" min="0" max="99999" length="4"',
false
);
$_ROSARIO['allow_edit'] = false;
$fields[] = '' . Buttons( _( 'Submit' ), _( 'Cancel' ) ) . '
';
$url_lang = '';
if ( $locale === 'es_ES.utf8'
|| $locale === 'fr_FR.utf8' )
{
$url_lang = substr( $locale, 0, 2 ) . '/';
}
$fields[] = sprintf(
_( 'Poll answers are anonymous. Consult installation statistics online.' ),
URLEscape( 'https://www.rosariosis.org/' . $url_lang . 'installation-poll/' )
);
ob_start(); ?>
';
$title = '';
return $form . '' . $js;
}
}