summaryrefslogtreecommitdiff
path: root/htdocs/index_orig.php
blob: 3edb8a4066efbb4f7d14bd95e343be06831dc067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
// the home page
require_once("include/init.inc");
require_once("include/string_utils.inc");
require_once("scripts/include/script.inc");
require_once("tips/include/tip.inc");
require_once("news/include/news.inc");

$page_title = "welcome home";
$page_sid = "sid_index.php";
$page_foot = "foot_index.php";
$page_foot_top = "foot_top_index.php";

include("header.php");
?>

<?php

// report database problems
if(!$CONN){
?>
    <h1>Sourceforge Project Database Problems</h1>
<p>
<span class="newsdate">[<?=date('d-M-Y')?>]</span> 
Sourceforge is currently experiencing sporadic problems with their 
project database and web server. This means news, scripts and tips 
are currently unavailable. Thank you for your patience.
 (<i>Scott Johnston</i>) 
<br clear="all">
</p>
<?php
}
?>

<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr>
    <td class="lightbg"><span class="txth1">&nbsp;&nbsp;News</span></td>
    <td nowrap class="lightbg" align="right"><small>&nbsp;Vim
<?php
include("version.txt")
?>
    is the current version&nbsp;</small></td>
</tr>
</table>

<?php
$news = getRecentNewsItems(2);
for($i=0;$i<sizeof($news);$i++){
    $news_data = $news[$i];
?>
<h1><?=$news_data{"title"}?></h1>
<p>
<span class="newsdate">[<?=formatNewsDate($news_data{"creation_date"})?>]</span> 
<?=$news_data{"news"}?>
 (<i><?=$news_data{"first_name"}?> <?=$news_data{"last_name"}?></i>) 
<br clear="all">
</p>
<?php
}
?>
&nbsp;

<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr>
<td><a href="news/news.php">more news...</a></td>
<td align="right">
<h1>
Protest Against Software Patents!&nbsp;&nbsp;
<a href="http://www.nosoftwarepatents.com/">www.nosoftwarepatents.com</a></h1>
</td>
</tr>
</table>

<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
<tr>
    <td class="lightbg"><span class="txth1">&nbsp;&nbsp;Recent Script Updates</span></td>
    <td nowrap class="lightbg" align="right"><small>&nbsp;<?=number_format(getScriptCount())?> scripts, <?=number_format(getTotalScriptDownloads())?> downloads&nbsp;</small></td>
</tr>
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
</table>
<table cellpadding="0" cellspacing="0" border="0">
<?php
    $recent_scripts = getRecentScriptUpdates(4);
    for($i=0;$i<sizeof($recent_scripts);$i++){
        $script_data = $recent_scripts[$i];
?>
<tr>
    <td class="newsdate" nowrap valign="top">[<?=formatNewsDate($script_data{"creation_date"})?>]</td>
    <td>&nbsp;<a href="scripts/script.php?script_id=<?=$script_data{"script_id"}?>"><?=$script_data{"script_name"}?></a> : <?=escapeForHTML($script_data{"summary"})?></td>
</tr>
<tr>
    <td><img src="<?=$IMAGES?>/spacer.gif" width="1" height="1" alt=""></td>
    <td>(<?=$script_data{"script_version"}?>) <?=escapeForHTMLNoBreaks(limitStrLength($script_data{"version_comment"}))?> - <i><?=$script_data{"first_name"}?> <?=$script_data{"last_name"}?></i></td>
</tr>
<?php
    }
?>
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
<tr><td colspan="2"><a href="scripts/index.php">more recent</a> | 
                    <a href="scripts/script_search_results.php?order_by=downloads">most downloaded</a> | 
                    <a href="scripts/script_search_results.php?order_by=rating">top rated</a></td></tr>
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
</table>

<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
<tr>
    <td class="lightbg"><span class="txth1">&nbsp;&nbsp;Recent Tip Additions</span></td>
    <td nowrap class="lightbg" align="right"><small>&nbsp;<?=number_format(getTipCount())?> tips, <?=number_format(getTotalTipViews())?> tip views&nbsp;</small></td>
</tr>
<tr><td colspan="2"><img src="<?=$IMAGES?>/spacer.gif" width="1" height="10" alt=""></td></tr>
</table>
<?php
    $recent_tips = getRecentTipAdditions(4);
    for($i=0;$i<sizeof($recent_tips);$i++){
        $tip_data = $recent_tips[$i];
?>
    <p>
    <span class="newsdate">[<?=formatNewsDate($tip_data{"creation_date"})?>]</span> 
    <a href="tips/tip.php?tip_id=<?=$tip_data{"tip_id"}?>">tip #<?=$tip_data{"tip_id"}?></a> - <?=escapeForHTML($tip_data{"summary"})?>
     (<?=($tip_data{'created_by_email'}==null)?"Anonymous":$tip_data{'created_by_email'}?>)
    </p>
<?php
    }
?>
<p><a href="tips/index.php">more recent</a> |
                    <a href="tips/tip_search_results.php?order_by=views">most viewed</a> | 
                    <a href="tips/tip_search_results.php?order_by=rating">top rated</a>

<?php
include("footer.php");
?>