aboutsummaryrefslogtreecommitdiff
path: root/php/inc
diff options
context:
space:
mode:
Diffstat (limited to 'php/inc')
-rw-r--r--php/inc/admin_nav.php27
-rw-r--r--php/inc/footer.php24
-rw-r--r--php/inc/forms/location.php23
-rw-r--r--php/inc/forms/mirror.php27
-rw-r--r--php/inc/forms/os.php16
-rw-r--r--php/inc/forms/product.php16
-rw-r--r--php/inc/forms/region.php16
-rw-r--r--php/inc/forms/user.php37
-rw-r--r--php/inc/header.php55
-rw-r--r--php/inc/nav.php0
10 files changed, 241 insertions, 0 deletions
diff --git a/php/inc/admin_nav.php b/php/inc/admin_nav.php
new file mode 100644
index 0000000..073ab0a
--- /dev/null
+++ b/php/inc/admin_nav.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Admin navigation.
+ * @package mirror
+ * @subpackage inc
+ */
+?>
+<div id="side">
+<ul id="nav">
+<li><a href="<?php echo WEBPATH; ?>/admin/logout.php" class="logout" title="Logout to end your session.">&laquo; Logout <?php echo $_SESSION['user']['username']?></a></li>
+<li>
+ <a href="<?php echo WEBPATH; ?>/admin/" title="Manage current mirrors.">Mirrors</a>
+ <ul>
+ <li><a href="<?php echo WEBPATH; ?>/admin/regions.php" title="A region is an area that has a set of mirrors.">Regions</a></li>
+ </ul>
+</li>
+<li>
+ <a href="<?php echo WEBPATH; ?>/admin/products.php" title="Products (firefox, thunderbird, etc.)">Products</a>
+ <ul>
+ <li><a href="<?php echo WEBPATH; ?>/admin/locations.php" title="Product file locations based on OS.">File Locations</a></li>
+ <li><a href="<?php echo WEBPATH; ?>/admin/os.php" title="Operating systems.">Operating Systems</a></li>
+ <li><a href="<?php echo WEBPATH; ?>/admin/lstats.php" title="View location statuses.">Location Statuses</a></li>
+ </ul>
+</li>
+<li><a href="<?php echo WEBPATH; ?>/admin/users.php" title="Manage administrator accounts.">Users</a></li>
+</ul>
+</div>
diff --git a/php/inc/footer.php b/php/inc/footer.php
new file mode 100644
index 0000000..efa17e7
--- /dev/null
+++ b/php/inc/footer.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Footer document.
+ * @package mirror
+ * @subpackage inc
+ */
+?>
+</td></tr></table></td></tr></table>
+<hr class="hide">
+</div>
+<?php
+if (!empty($nav)) {
+ echo '</div>';
+}
+?>
+<div id="footer">
+<p class="copyright">Copyright &copy; 2005 The Gentoo Foundation, portions Copyright &copy; 1998-2004 The Mozilla Organization</p>
+</div>
+</div>
+</body>
+</html>
+<?php
+ob_end_flush();
+?>
diff --git a/php/inc/forms/location.php b/php/inc/forms/location.php
new file mode 100644
index 0000000..60e35cb
--- /dev/null
+++ b/php/inc/forms/location.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * File location form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Product', 'product','label-small');
+form_select('product_id','product','',mirror_get_products_select(),$posts['product_id']);
+echo ' [<a href="./products.php">edit products</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('OS', 'os','label-small');
+form_select('os_id','os','',mirror_get_oss_select(),$posts['os_id']);
+echo ' [<a href="./os.php">edit operating systems</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('File Location', 'floc','label-small');
+form_text('location_path', 'floc', '', $posts['location_path'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/mirror.php b/php/inc/forms/mirror.php
new file mode 100644
index 0000000..c1e7dcb
--- /dev/null
+++ b/php/inc/forms/mirror.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Region form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Mirror Name', 'mname','label-small');
+form_text('mirror_name', 'mname', '', $posts['mirror_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Region', 'mregion','label-small');
+form_select('region_id','mregion','',mirror_get_regions_select(),$posts['region_id']);
+echo ' [<a href="./regions.php">edit regions</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('Base URL', 'murl','label-small');
+form_text('mirror_baseurl', 'murl', '', $posts['mirror_baseurl'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Rating', 'mrating','label-small');
+form_text('mirror_rating', 'mrating', '', $posts['mirror_rating'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/os.php b/php/inc/forms/os.php
new file mode 100644
index 0000000..63a7643
--- /dev/null
+++ b/php/inc/forms/os.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * OS form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('OS Name', 'oname','label-small');
+form_text('os_name', 'oname', '', $posts['os_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'p','label-small');
+form_text('os_priority', 'p', '', $posts['os_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/product.php b/php/inc/forms/product.php
new file mode 100644
index 0000000..0dc3c04
--- /dev/null
+++ b/php/inc/forms/product.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Product form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Product Name', 'pname','label-small');
+form_text('product_name', 'pname', '', $posts['product_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'pty','label-small');
+form_text('product_priority', 'pty', '', $posts['product_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/region.php b/php/inc/forms/region.php
new file mode 100644
index 0000000..9262809
--- /dev/null
+++ b/php/inc/forms/region.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Region form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Region Name', 'rname','label-small');
+form_text('region_name', 'rname', '', $posts['region_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'rp','label-small');
+form_text('region_priority', 'rp', '', $posts['region_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/user.php b/php/inc/forms/user.php
new file mode 100644
index 0000000..bfd92bc
--- /dev/null
+++ b/php/inc/forms/user.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * User form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Username', 'uname','label-small');
+form_text('username', 'uname', '', $posts['username'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Password', 'password','label-small');
+form_password('password', 'password', '', 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Re-enter Password', 'rpassword','label-small');
+form_password('rpassword', 'rpassword', '', 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('First Name', 'fname','label-small');
+form_text('user_firstname', 'fname', '', $posts['user_firstname'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Last Name', 'lname','label-small');
+form_text('user_lastname', 'lname', '', $posts['user_lastname'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Email', 'email','label-small');
+form_text('user_email', 'email', '', $posts['user_email'], 30, 100);
+echo '</div><br />';
+
+?>
diff --git a/php/inc/header.php b/php/inc/header.php
new file mode 100644
index 0000000..dbe97b2
--- /dev/null
+++ b/php/inc/header.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Header document.
+ * @package mirror
+ * @subpackage inc
+ */
+ob_start();
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="home" title="Home" href="http://www.gentoo.org/">
+<link rel="stylesheet" type="text/css" href="http://www.gentoo.org/css/main.css" media="all">
+<link rel="stylesheet" type="text/css" href="<?php echo WEBPATH; ?>/css/screen.css" media="screen">
+
+<link rel="icon" href="http://www.gentoo.org/favicon.ico" type="image/png">
+<title><?php echo $title; ?></title>
+<meta name="robots" content="all">
+<meta name="keywords" content="gentoo linux distribution source compile">
+<?php echo (!empty($extra_headers))?$extra_headers:null?>
+</head>
+<body id="www-mozilla-org" class="secondLevel"<?php echo (!empty($body_tags))?' '.$body_tags.' ':null; ?>>
+<div id="container">
+<div id="header">
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+<tr>
+<td valign="top" height="125" width="1%" bgcolor="#45347b"><a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"></a></td>
+<td valign="bottom" align="left" bgcolor="#000000" colspan="2"><p class="menu">
+ <H2><font color="#FFFFFF">&nbsp;&nbsp; Gentoo Mirror Management</font></H2>
+ </p></td>
+</tr>
+<tr>
+<td valign="top" align="right" width="1%" bgcolor="#dddaec"><table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr><td height="1%" valign="top" align="right"><img src="/images/gridtest.gif" alt="Gentoo Spaceship"></td></tr>
+<tr><td height="99%" valign="top" align="right"><table cellspacing="0" cellpadding="5" border="0"><tr><td valign="top">
+<p class="altmenu">
+<?php
+if (!empty($nav)) {
+ require_once($nav);
+}
+?>
+</p>
+
+<br><br>
+</td></tr></table></td></tr></table>
+</td><td><table><tr><td>&nbsp;&nbsp;</td><td>
+
+</div>
+<div id="mBody">
+<?php
+ echo '<div id="mainContent">';
+?>
+
diff --git a/php/inc/nav.php b/php/inc/nav.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/php/inc/nav.php