Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
008612ad
Commit
008612ad
authored
May 18, 2000
by
Dries Buytaert
Browse files
Imported sources
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
index.php
0 → 100644
View file @
008612ad
<?PHP
include
"functions.inc"
;
### Log valid referers:
if
((
$url
)
&&
(
strstr
(
getenv
(
"HTTP_REFERER"
),
$url
)))
{
addRefer
(
$url
);
}
include
"theme.inc"
;
$theme
->
header
();
dbconnect
();
if
(
isset
(
$cookie
[
3
]))
$number
=
$cookie
[
3
];
else
$number
=
10
;
$result
=
mysql_query
(
"SELECT * FROM stories ORDER BY sid DESC LIMIT
$number
"
);
while
(
$story
=
mysql_fetch_object
(
$result
))
{
### Compose more-link:
$morelink
=
"[ "
;
if
(
$story
->
article
)
{
$morelink
.
=
"<A HREF=
\"
article.php?sid=
$story->sid
"
;
if
(
isset
(
$cookie
[
4
]))
{
$morelink
.
=
"&mode=
$cookie[4]
"
;
}
else
{
$morelink
.
=
"&mode=threaded"
;
}
if
(
isset
(
$cookie
[
5
]))
{
$morelink
.
=
"&order=
$cookie[5]
"
;
}
else
{
$morelink
.
=
"&order=0"
;
}
$bytes
=
strlen
(
$story
->
article
);
$morelink
.
=
"
\"
><FONT COLOR=
\"
$theme->hlcolor2
\"
><B>read more</B></FONT></A> |
$bytes
bytes in body | "
;
}
$query
=
mysql_query
(
"SELECT sid FROM comments WHERE sid =
$story->sid
"
);
if
(
!
$query
)
{
$count
=
0
;
}
else
{
$count
=
mysql_num_rows
(
$query
);
}
$morelink
.
=
"<A HREF=
\"
article.php?sid=
$story->sid
"
;
if
(
isset
(
$cookie
[
4
]))
{
$morelink
.
=
"&mode=
$cookie[4]
"
;
}
else
{
$morelink
.
=
"&mode=threaded"
;
}
if
(
isset
(
$cookie
[
5
]))
{
$morelink
.
=
"&order=
$cookie[5]
"
;
}
else
{
$morelink
.
=
"&order=0"
;
}
if
(
isset
(
$cookie
[
6
]))
{
$morelink
.
=
"&thold=
$cookie[6]
"
;
}
else
{
$morelink
.
=
"&thold=0"
;
}
$morelink
.
=
"
\"
><FONT COLOR=
\"
$theme->hlcolor2
\"
>
$count
comments</FONT></A> ]"
;
$theme
->
abstract
(
$story
->
aid
,
$story
->
informant
,
$story
->
time
,
stripslashes
(
$story
->
subject
),
stripslashes
(
$story
->
abstract
),
stripslashes
(
$story
->
comments
),
$story
->
category
,
$story
->
department
,
$morelink
);
}
mysql_free_result
(
$result
);
$theme
->
footer
();
?>
\ No newline at end of file
Neil Drumm
@drumm
mentioned in merge request
drupalorg!144 (merged)
·
Nov 29, 2022
mentioned in merge request
drupalorg!144 (merged)
mentioned in merge request drupalorg!144
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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