Remove unnecessary database connection parameter from all functions
[aur.git] / web / html / home.php
blob8fccc7ff896f0ec4a6b9f99f73699c1d56be66f3
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
5 include_once("aur.inc.php");
6 set_lang();
7 check_sid();
9 include_once('stats.inc.php');
11 html_header( __("Home") );
13 $dbh = DB::connect();
17 <div id="content-left-wrapper">
18 <div id="content-left">
19 <div id="intro" class="box">
20 <h2>AUR <?= __("Home"); ?></h2>
21 <p>
22 <?php
23 echo __(
24 'Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU Guidelines%s for more information.',
25 '<a href="https://wiki.archlinux.org/index.php/AUR_User_Guidelines">',
26 '</a>',
27 '<a href="https://wiki.archlinux.org/index.php/AUR_Trusted_User_Guidelines">',
28 '</a>'
31 </p>
32 <p>
33 <?php
34 echo __(
35 'Contributed PKGBUILDs %smust%s conform to the %sArch Packaging Standards%s otherwise they will be deleted!',
36 '<strong>', '</strong>',
37 '<a href="https://wiki.archlinux.org/index.php/Arch_Packaging_Standards">',
38 '</a>'
41 </p>
42 <p>
43 <?= __('Remember to vote for your favourite packages!'); ?>
44 <?= __('Some packages may be provided as binaries in [community].'); ?>
45 </p>
46 <h4><?= __('Discussion') ?></h4>
47 <p>
48 <?php
49 echo __(
50 'General discussion regarding the Arch User Repository (AUR) and Trusted User structure takes place on %saur-general%s. This list can be used for package orphan requests, merge requests, and deletion requests. For discussion relating to the development of the AUR, use the %saur-dev%s mailing list.',
51 '<a href="https://mailman.archlinux.org/mailman/listinfo/aur-general">',
52 '</a>',
53 '<a href="https://mailman.archlinux.org/mailman/listinfo/aur-dev">',
54 '</a>'
57 </p>
58 <h4><?= __('Bug Reporting') ?></h4>
59 <p>
60 <?php
61 echo __(
62 'If you find a bug in the AUR, please fill out a bug report on our %sbug tracker%s. Use the tracker to report bugs in the AUR %sonly%s. To report packaging bugs contact the package maintainer or leave a comment on the appropriate package page.',
63 '<a href="https://bugs.archlinux.org/index.php?project=2">',
64 '</a>',
65 '<strong>',
66 '</strong>'
69 </p>
71 <h4><?= __('DISCLAIMER') ?></h4>
72 <div class="important">
73 <?= __('Unsupported packages are user produced content. Any use of the provided files is at your own risk.'); ?>
74 </div>
75 </div>
76 <?php if (!empty($_COOKIE["AURSID"])): ?>
77 <div id="pkg-updates" class="widget box">
78 <table>
79 <tr>
80 <td class="pkg-name">
81 <?php
82 $userid = uid_from_sid($_COOKIE["AURSID"]);
83 user_table($userid);
85 </td>
86 </tr>
87 </table>
88 </div>
89 <?php endif; ?>
90 </div>
91 </div>
92 <div id="content-right">
93 <div id="pkgsearch" class="widget">
94 <form id="pkgsearch-form" method="get" action="<?= get_uri('/packages/'); ?>">
95 <fieldset>
96 <label for="pkgsearch-field"><?= __('Package Search') ?>:</label>
97 <input type="hidden" name="O" value="0" />
98 <input id="pkgsearch-field" type="text" name="K" size="30" value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength="35" />
99 </fieldset>
100 </form>
101 </div>
102 <div id="pkg-updates" class="widget box">
103 <?php updates_table(); ?>
104 </div>
105 <div id="pkg-stats" class="widget box">
106 <?php general_stats_table(); ?>
107 </div>
109 </div>
110 <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
111 <script type="text/javascript" src="/js/bootstrap-typeahead.js"></script>
112 <script type="text/javascript">
113 $(document).ready(function() {
114 $('#pkgsearch-field').typeahead({
115 source: function(query, callback) {
116 $.getJSON('<?= get_uri('/rpc'); ?>', {type: "suggest", arg: query}, function(data) {
117 callback(data);
120 matcher: function(item) { return true; },
121 sorter: function(items) { return items; },
122 menu: '<ul class="pkgsearch-typeahead"></ul>',
123 items: 20
124 }).attr('autocomplete', 'off');
126 </script>
127 <?php
128 html_footer(AUR_VERSION);