Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
9bfb8f6c
Commit
9bfb8f6c
authored
Nov 26, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use password field in installation
Also clean up HTML a little
parent
2d5a5982
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
qa-install.php
qa-include/qa-install.php
+15
-4
No files found.
qa-include/qa-install.php
View file @
9bfb8f6c
...
...
@@ -101,8 +101,11 @@
body
,
input
{
font
:
16px
Verdana
,
Arial
,
Helvetica
,
sans-serif
;
}
body
{
text-align
:
center
;
width
:
640px
;
margin
:
64px
auto
;
}
table
{
margin
:
16px
auto
;
}
th
,
td
{
padding
:
2px
;
}
th
{
text-align
:
right
;
font-weight
:
normal
;
}
td
{
text-align
:
left
;
}
.msg-success
{
color
:
#080
;
}
.msg-error
{
color
:
#
9
00
;
}
.msg-error
{
color
:
#
b
00
;
}
</style>
</head>
<body>
...
...
@@ -239,7 +242,11 @@
if
(
(
!
QA_FINAL_EXTERNAL_USERS
)
&&
(
qa_db_count_users
()
==
0
)
)
{
$errorhtml
.=
"There are currently no users in the Question2Answer database.
\n\n
Please enter your details below to create the super administrator:"
;
$fields
=
array
(
'handle'
=>
'Username:'
,
'password'
=>
'Password:'
,
'email'
=>
'Email address:'
);
$fields
=
array
(
'handle'
=>
array
(
'label'
=>
'Username:'
,
'type'
=>
'text'
),
'password'
=>
array
(
'label'
=>
'Password:'
,
'type'
=>
'password'
),
'email'
=>
array
(
'label'
=>
'Email address:'
,
'type'
=>
'text'
),
);
$buttons
=
array
(
'super'
=>
'Create Super Administrator'
);
}
else
{
...
...
@@ -301,10 +308,14 @@
if
(
count
(
$fields
))
{
echo
'<table>'
;
foreach
(
$fields
as
$name
=>
$prompt
)
{
echo
'<tr><td>'
.
qa_html
(
$prompt
)
.
'</td><td><input type="text" size="24" name="'
.
qa_html
(
$name
)
.
'" value="'
.
qa_html
(
@
$
{
'in'
.
$name
})
.
'"></td>'
;
foreach
(
$fields
as
$name
=>
$field
)
{
echo
'<tr>'
;
echo
'<th>'
.
qa_html
(
$field
[
'label'
])
.
'</th>'
;
echo
'<td><input type="'
.
qa_html
(
$field
[
'type'
])
.
'" size="24" name="'
.
qa_html
(
$name
)
.
'" value="'
.
qa_html
(
@
$
{
'in'
.
$name
})
.
'"></td>'
;
if
(
isset
(
$fielderrors
[
$name
]))
echo
'<td class="msg-error"><small>'
.
qa_html
(
$fielderrors
[
$name
])
.
'</small></td>'
;
else
echo
'<td></td>'
;
echo
'</tr>'
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment