aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-01-05 14:43:33 +0100
committerKevin Chabowski <kevin@kch42.de>2012-01-05 14:43:33 +0100
commitc4cc87d9d1557ddd4cae4b06b79696712f61a2ad (patch)
tree081b31be890c484040a63f626063e846ef583680
parente99281261767710f96b9967a0ab03a3ea24a05e0 (diff)
downloadr7r-repo-c4cc87d9d1557ddd4cae4b06b79696712f61a2ad.tar.gz
r7r-repo-c4cc87d9d1557ddd4cae4b06b79696712f61a2ad.tar.bz2
r7r-repo-c4cc87d9d1557ddd4cae4b06b79696712f61a2ad.zip
New directory hierachy. index and setup implemented.
-rw-r--r--.gitignore2
-rw-r--r--.htaccess4
-rw-r--r--index.php24
-rwxr-xr-x[-rw-r--r--]packagelist0
-rw-r--r--r7r_repo/.htaccess4
-rw-r--r--r7r_repo/config.php (renamed from config.php)2
-rw-r--r--r7r_repo/css/common.css54
-rw-r--r--r7r_repo/css/images/error.pngbin0 -> 1072 bytes
-rw-r--r--r7r_repo/css/images/error.svg44
-rw-r--r--r7r_repo/css/images/notice.pngbin0 -> 1320 bytes
-rw-r--r--r7r_repo/css/images/notice.svg106
-rw-r--r--r7r_repo/css/images/success.pngbin0 -> 1518 bytes
-rw-r--r--r7r_repo/css/images/success.svg102
-rw-r--r--r7r_repo/css/main.css114
-rw-r--r--r7r_repo/css/setup.css11
-rw-r--r--r7r_repo/db.php (renamed from db.php)2
-rw-r--r--r7r_repo/main.php201
-rw-r--r--r7r_repo/models.php (renamed from models.php)30
-rw-r--r--r7r_repo/pluginpackage.php (renamed from pluginpackage.php)0
-rw-r--r--r7r_repo/pwhash.php (renamed from pwhash.php)0
-rw-r--r--r7r_repo/stupid_template_engine.php (renamed from stupid_template_engine.php)0
-rwxr-xr-xr7r_repo/templates/.htaccess (renamed from templates/.htaccess)0
-rw-r--r--r7r_repo/templates/src/home.html35
-rw-r--r--r7r_repo/templates/src/master.html90
-rw-r--r--r7r_repo/templates/src/setup.html53
-rw-r--r--r7r_repo/urlprocess.php (renamed from urlprocess.php)0
-rw-r--r--r7r_repo/utils.php (renamed from utils.php)0
-rwxr-xr-x[-rw-r--r--]repometa1
28 files changed, 840 insertions, 39 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c1ac727
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+packagelist
+repometa
diff --git a/.htaccess b/.htaccess
index 7db1e17..130e733 100644
--- a/.htaccess
+++ b/.htaccess
@@ -8,7 +8,3 @@ RewriteRule ^(.+) - [PT,L]
RewriteRule (.*) index.php?action=$1 [QSA,L]
-<Files *.php>
- Order Allow,Deny
- Deny from all
-</Files>
diff --git a/index.php b/index.php
index 3ce0daa..f7b8629 100644
--- a/index.php
+++ b/index.php
@@ -1,23 +1 @@
-<?php
-
-/* Load and check config */
-require_once(dirname(__FILE__) . "/config.php");
-if(!defined("CONFIG_FILLED_OUT"))
- die("Config file not filled out.");
-
-/* Include more files... */
-require_once(dirname(__FILE__) . "/stupid_template_engine.php");
-require_once(dirname(__FILE__) . "/db.php");
-require_once(dirname(__FILE__) . "/models.php");
-require_once(dirname(__FILE__) . "/urlprocess.php");
-require_once(dirname(__FILE__) . "/pwhash.php");
-
-/* init STE */
-$tpl_basedir = dirname(__FILE__). "/templates";
-$ste = new \ste\STECore(new \ste\FilesystemStorageAccess("$tpl_basedir/src", "$tpl_basedir/transc"));
-
-/* start session and check auth. */
-session_start();
-
-
-?>
+<?php require_once(dirname(__FILE__) . "/r7r_repo/main.php"); ?>
diff --git a/packagelist b/packagelist
index e69de29..e69de29 100644..100755
--- a/packagelist
+++ b/packagelist
diff --git a/r7r_repo/.htaccess b/r7r_repo/.htaccess
new file mode 100644
index 0000000..dec4e25
--- /dev/null
+++ b/r7r_repo/.htaccess
@@ -0,0 +1,4 @@
+<FilesMatch "\.php$">
+ Order Allow,Deny
+ Deny from all
+</FilesMatch>
diff --git a/config.php b/r7r_repo/config.php
index 83efe05..7a05f24 100644
--- a/config.php
+++ b/r7r_repo/config.php
@@ -1,7 +1,9 @@
<?php
define("CONFIG_FILLED_OUT", True);
+define("SKIP_TABLE_CREATION", False);
+$config["mysql"]["server"] = "localhost";
$config["mysql"]["db"] = "s_db_47";
$config["mysql"]["user"] = "dbuser_47";
$config["mysql"]["passwd"] = "DfXVQBoVOBPbLlL";
diff --git a/r7r_repo/css/common.css b/r7r_repo/css/common.css
new file mode 100644
index 0000000..767d017
--- /dev/null
+++ b/r7r_repo/css/common.css
@@ -0,0 +1,54 @@
+* {
+ font-family: sans-serif;
+ font-size: 10pt;
+}
+
+html {
+ margin: 0px;
+ padding: 0px;
+}
+
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+#maincontainer {
+ width: 80%;
+ margin: 0px auto 0px;
+ padding: 0px;
+}
+
+div.error {
+ border: 1px solid #8d8d8d;
+ background: #ddd url(images/error.png) no-repeat top left;
+ min-height: 40px;
+ color: #222;
+ padding: 1em;
+ margin: 3mm 0mm 3mm;
+ text-align: center;
+}
+
+div.notice {
+ border: 1px solid #8d8d8d;
+ background: #ddd url(images/notice.png) no-repeat top left;
+ min-height: 40px;
+ color: #222;
+ padding: 1em;
+ margin: 3mm 0mm 3mm;
+ text-align: center;
+}
+
+div.success {
+ border: 1px solid #8d8d8d;
+ background: #ddd url(images/success.png) no-repeat top left;
+ min-height: 40px;
+ color: #222;
+ padding: 1em;
+ margin: 3mm 0mm 3mm;
+ text-align: center;
+}
+
+.fullwidth {
+ width: 100%;
+}
diff --git a/r7r_repo/css/images/error.png b/r7r_repo/css/images/error.png
new file mode 100644
index 0000000..de5e5f9
--- /dev/null
+++ b/r7r_repo/css/images/error.png
Binary files differ
diff --git a/r7r_repo/css/images/error.svg b/r7r_repo/css/images/error.svg
new file mode 100644
index 0000000..6ebe085
--- /dev/null
+++ b/r7r_repo/css/images/error.svg
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="50"
+ height="50"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1002.3622)"
+ id="layer1">
+ <path
+ d="M -14.344328,1046.3622 46,1046.3622 15.827836,986.0179 z"
+ id="path3763"
+ style="fill:none;stroke:#000000;stroke-width:5.80233908;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.36078431;stroke-dasharray:none" />
+ <g
+ id="text3765"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:0.75294118;stroke:none;font-family:Tahoma;-inkscape-font-specification:Tahoma">
+ <path
+ d="m 16.069878,1032.1201 c -2.367352,0 -4.316941,1.9034 -4.316941,4.1777 0,2.4602 1.903169,4.4096 4.270521,4.4096 2.367354,0 4.316942,-1.9494 4.316942,-4.3168 0,-2.3671 -1.90317,-4.2705 -4.270522,-4.2705 m 1.903166,-5.5654 c 0.324932,-4.456 0.603443,-6.3594 1.624656,-10.9085 0.928372,-3.899 1.114049,-4.8739 1.114049,-6.1736 0,-3.1099 -1.810333,-5.106 -4.595453,-5.106 -2.645864,0 -4.68829,2.0425 -4.68829,4.6417 0,1.5318 0.185675,2.6462 1.114049,6.9164 0.789118,3.5743 1.206886,6.3133 1.624656,10.63 l 3.806333,0"
+ id="path3770"
+ style="font-size:20px;font-weight:bold;fill:#000000;fill-opacity:0.36078431;font-family:URW Bookman L;-inkscape-font-specification:URW Bookman L Bold" />
+ </g>
+ </g>
+</svg>
diff --git a/r7r_repo/css/images/notice.png b/r7r_repo/css/images/notice.png
new file mode 100644
index 0000000..30957e8
--- /dev/null
+++ b/r7r_repo/css/images/notice.png
Binary files differ
diff --git a/r7r_repo/css/images/notice.svg b/r7r_repo/css/images/notice.svg
new file mode 100644
index 0000000..1025847
--- /dev/null
+++ b/r7r_repo/css/images/notice.svg
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="50"
+ height="50"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ inkscape:export-filename="/home/skadu42/Desktop/notice.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="notice.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#dddddd"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.2"
+ inkscape:cx="13.477603"
+ inkscape:cy="32.102921"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1680"
+ inkscape:window-height="1000"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2985"
+ empspacing="2"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ dotted="false" />
+ <sodipodi:guide
+ orientation="-0.70710678,0.70710678"
+ position="30,30"
+ id="guide3755" />
+ <sodipodi:guide
+ orientation="0.70710678,0.70710678"
+ position="0,50"
+ id="guide3757" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="25,25"
+ id="guide3759" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="25,25"
+ id="guide3761" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1002.3622)">
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:0.36078431;stroke:#dddddd;stroke-width:4.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none"
+ id="path3862"
+ sodipodi:cx="25"
+ sodipodi:cy="25"
+ sodipodi:rx="25"
+ sodipodi:ry="25"
+ d="M 50,25 A 25,25 0 1 1 0,25 25,25 0 1 1 50,25 z"
+ transform="matrix(1.1227732,0,0,1.1227732,-9,994.06606)" />
+ <g
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#dddddd;fill-opacity:1;stroke:none;font-family:Tahoma;-inkscape-font-specification:Tahoma"
+ id="text3854"
+ transform="matrix(1.2475258,0,0,1.2475258,-13.441193,-256.15217)">
+ <path
+ d="m 30.068001,1034.1142 1.056,0.672 c -1.69601,2.528 -3.104009,4.256 -4.224,5.184 -1.088006,0.896 -2.352005,1.344 -3.792,1.344 -0.992003,0 -1.792002,-0.272 -2.4,-0.816 -0.608001,-0.576 -0.912,-1.312 -0.912,-2.208 0,-0.768 0.207999,-1.872 0.624,-3.312 l 2.784,-10.32 c 0.223996,-0.96 0.335996,-1.6 0.336,-1.92 -4e-6,-0.512 -0.224004,-0.864 -0.672,-1.056 -0.416003,-0.224 -1.136002,-0.336 -2.16,-0.336 l 0,-1.296 c 3.711995,-0.288 6.943992,-0.736 9.696,-1.344 l -4.368,16.032 c -0.288006,1.152 -0.432006,1.984 -0.432,2.496 -6e-6,0.192 0.06399,0.368 0.192,0.528 0.159994,0.128 0.335993,0.192 0.528,0.192 0.767992,0 1.791991,-0.96 3.072,-2.88 l 0.672,-0.96 m -1.056,-26.112 c 0.89599,0 1.663989,0.32 2.304,0.96 0.671987,0.64 1.007987,1.408 1.008,2.304 -1.3e-5,0.896 -0.320013,1.664 -0.96,2.304 -0.640011,0.608 -1.42401,0.912 -2.352,0.912 -0.896009,0 -1.648008,-0.32 -2.256,-0.96 -0.608007,-0.64 -0.912006,-1.424 -0.912,-2.352 -6e-6,-0.832 0.319993,-1.568 0.96,-2.208 0.639992,-0.64 1.375991,-0.96 2.208,-0.96"
+ style="font-size:48px;font-style:italic;font-weight:bold;fill:#dddddd;fill-opacity:1;font-family:FreeSerif;-inkscape-font-specification:FreeSerif Bold Italic"
+ id="path3867"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+</svg>
diff --git a/r7r_repo/css/images/success.png b/r7r_repo/css/images/success.png
new file mode 100644
index 0000000..dc79180
--- /dev/null
+++ b/r7r_repo/css/images/success.png
Binary files differ
diff --git a/r7r_repo/css/images/success.svg b/r7r_repo/css/images/success.svg
new file mode 100644
index 0000000..39a606d
--- /dev/null
+++ b/r7r_repo/css/images/success.svg
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="50"
+ height="50"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ inkscape:export-filename="/home/skadu42/Desktop/success.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="success.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#dddddd"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.9195959"
+ inkscape:cx="27.664243"
+ inkscape:cy="33.687243"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1680"
+ inkscape:window-height="1000"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2985"
+ empspacing="2"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ dotted="false" />
+ <sodipodi:guide
+ orientation="-0.70710678,0.70710678"
+ position="30,30"
+ id="guide3755" />
+ <sodipodi:guide
+ orientation="0.70710678,0.70710678"
+ position="0,50"
+ id="guide3757" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="25,25"
+ id="guide3759" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="25,25"
+ id="guide3761" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1002.3622)">
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:0.36078431;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none"
+ id="path3828"
+ sodipodi:cx="25"
+ sodipodi:cy="25"
+ sodipodi:rx="23"
+ sodipodi:ry="23"
+ d="M 48,25 A 23,23 0 1 1 2,25 23,23 0 1 1 48,25 z"
+ transform="matrix(1.2564831,0,0,1.2564831,-12.124007,989.84923)" />
+ <path
+ style="fill:none;stroke:#dddddd;stroke-width:5.65417433;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 5.4667569,1021.2614 11.3083491,16.3342 21.360213,-32.6686"
+ id="path3832"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
diff --git a/r7r_repo/css/main.css b/r7r_repo/css/main.css
new file mode 100644
index 0000000..7061c42
--- /dev/null
+++ b/r7r_repo/css/main.css
@@ -0,0 +1,114 @@
+#heading {
+ text-align: center;
+ border-bottom: 1px solid black;
+ margin: 0px auto 0px;
+ padding: 10mm 3mm 5mm
+}
+
+h1 {
+ font-size: 24pt;
+ font-weight: bold;
+ padding: 0px;
+ margin: 0px auto 2mm;
+}
+
+h2 {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+#mainmenu {
+ border-bottom: 1px solid black;
+ list-style: none;
+ height: 10mm;
+ padding: 0px;
+ margin: 0px 0px 2mm;
+ overflow: hidden;
+}
+
+#mainmenu li {
+ float: left;
+ margin: 0px 0px 2mm;
+}
+
+#mainmenu li a {
+ color: #444;
+ text-decoration: none;
+ font-size: 12pt;
+ margin: 0px;
+ padding: 2mm 7.5mm 0px;
+ background: white;
+ display: block;
+ height: 10mm;
+}
+
+#mainmenu li.active a {
+ color: black;
+ font-weight: bold;
+}
+
+#mainmenu li a:hover {
+ background: #eee;
+ color: #000;
+}
+
+#metabar {
+ float: right;
+ width: 50mm;
+ margin: 0px;
+ padding: 0px 0px 0px 5mm;
+ border-left: 1px solid black;
+}
+
+div.metabar_module {
+ border-top: 1px solid black;
+ padding: 2mm 0px 0px;
+ margin: 2mm 0px 0px;
+}
+
+div.metabar_module:first-child {
+ border-top: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+div.metabar_module h2 {
+ font-size: 10pt;
+ font-weight: bold;
+ padding: 0px;
+ margin: 0px 0px 2mm;
+}
+
+#content {
+ border-right: 1px solid black;
+ margin: 0px 55mm 0px 0px;
+ padding: 0px 2mm 0px 0px;
+}
+
+#footer {
+ clear: both;
+ height: 5mm;
+}
+
+table.listtab {
+ border-collapse: collapse;
+}
+
+table.listtab th {
+ font-weight: bold;
+ color: black;
+ text-align: left;
+ padding-left: 1ex;
+}
+
+table.listtab td {
+ border-top: 1px solid #eee;
+}
+
+table.listtab tr:first-child td {
+ border-top: 1px solid #666;
+}
+
+table.listtab tbody tr:hover {
+ background: #eee;
+}
diff --git a/r7r_repo/css/setup.css b/r7r_repo/css/setup.css
new file mode 100644
index 0000000..2466a4a
--- /dev/null
+++ b/r7r_repo/css/setup.css
@@ -0,0 +1,11 @@
+body {
+ text-align: center;
+}
+
+h1 {
+ font-weight: bold;
+ font-size: 16pt;
+ border-bottom: 1px solid gray;
+ margin: 0px 0px 1em;
+ padding: 1em 0px 0.5em;
+}
diff --git a/db.php b/r7r_repo/db.php
index 6add093..459a973 100644
--- a/db.php
+++ b/r7r_repo/db.php
@@ -10,7 +10,7 @@
* See "ratatoeskr/licenses/ratatoeskr" for more information.
*/
-require_once(dirname(__FILE__) . "/../config.php");
+require_once(dirname(__FILE__) . "/config.php");
require_once(dirname(__FILE__) . "/utils.php");
/*
diff --git a/r7r_repo/main.php b/r7r_repo/main.php
new file mode 100644
index 0000000..af19397
--- /dev/null
+++ b/r7r_repo/main.php
@@ -0,0 +1,201 @@
+<?php
+
+/* Load and check config */
+require_once(dirname(__FILE__) . "/config.php");
+if(!defined("CONFIG_FILLED_OUT"))
+ die("Config file not filled out.");
+
+/* Include database functions... */
+require_once(dirname(__FILE__) . "/db.php");
+db_connect();
+
+/* create tables */
+if(!SKIP_TABLE_CREATION)
+{
+ $db_structure = "CREATE TABLE IF NOT EXISTS `PREFIX_packages` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` text COLLATE utf8_unicode_ci NOT NULL,
+ `lastversion` int(11) NOT NULL,
+ `user` int(11) NOT NULL,
+ `description` text COLLATE utf8_unicode_ci NOT NULL,
+ `lastupdate` bigint(20) NOT NULL,
+ `txtversion` text COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+CREATE TABLE IF NOT EXISTS `PREFIX_settings_kvstorage` (
+ `key` text COLLATE utf8_unicode_ci NOT NULL,
+ `value` text COLLATE utf8_unicode_ci NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+CREATE TABLE IF NOT EXISTS `PREFIX_users` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` text COLLATE utf8_unicode_ci NOT NULL,
+ `pwhash` text COLLATE utf8_unicode_ci NOT NULL,
+ `isadmin` tinyint(4) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
+ $queries = explode(";", $db_structure);
+ foreach($queries as $q)
+ {
+ if(!empty($q))
+ qdb($q);
+ }
+}
+
+/* Include more files... */
+require_once(dirname(__FILE__) . "/stupid_template_engine.php");
+require_once(dirname(__FILE__) . "/models.php");
+require_once(dirname(__FILE__) . "/urlprocess.php");
+require_once(dirname(__FILE__) . "/pwhash.php");
+require_once(dirname(__FILE__) . "/pluginpackage.php");
+require_once(dirname(__FILE__) . "/utils.php");
+
+/* init STE */
+$tpl_basedir = dirname(__FILE__). "/templates";
+$ste = new \ste\STECore(new \ste\FilesystemStorageAccess("$tpl_basedir/src", "$tpl_basedir/transc"));
+
+$ste->register_tag(
+ "loremipsum",
+ function($ste, $params, $sub)
+ {
+ $repeats = empty($params["repeat"]) ? 1 : $params["repeat"] + 0;
+ return implode("\n\n", array_repeat("<p>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n\n<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>\n\n<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>\n\n<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>\n\n<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>\n\n<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>\n\n<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>", $repeats));
+ }
+);
+
+/* start session and check auth. */
+session_start();
+$user = NULL;
+if(isset($_SESSION["r7r_repo_login_name"]))
+{
+ try
+ {
+ $user = User::by_name($_SESSION["r7r_repo_login_name"]);
+ }
+ catch(DoesNotExistError $e)
+ {
+ unset($_SESSION["r7r_repo_login_name"]);
+ }
+}
+
+/* url handlers */
+$url_handlers = array(
+ "_prelude" => function(&$data, $url_now, &$url_next)
+ {
+ global $ste, $settings, $user;
+
+ if(@$settings["setup_finished"])
+ $ste->vars["repo"] = array(
+ "name" => $settings["repo_name"],
+ "description" => $settings["repo_description"],
+ "baseurl" => $settings["repo_baseurl"],
+ "public" => ($settings["repo_mode"] == "public")
+ );
+
+ if($user === NULL)
+ $ste->vars["user"] = array(
+ "logged_in" => False,
+ "admin" => False
+ );
+ else
+ $ste->vars["user"] = array(
+ "logged_in" => True,
+ "name" => $user->name,
+ "admin" => $user->isadmin
+ );
+ },
+ "_notfound" => url_action_simple(function($data)
+ {
+ header("HTTP/1.1 404 Not Found");
+ header("Content-Type: text/plain");
+ echo "404 Not Found\nThe resource \"{$_SERVER["REQUEST_URI"]}\" could not be found.\n";
+ }),
+ "_index" => url_action_alias(array("index")),
+ "index" => function(&$data, $url_now, &$url_next)
+ {
+ global $ste;
+ $url_next = array();
+
+ $ste->vars["menu"] = "home";
+
+ $latest = Package::latest();
+ $ste->vars["latest_pkgs"] = array_map(function($pkg) { return array(
+ "name" => $pkg->get_name(),
+ "version" => $pkg->txtversion,
+ "description" => $pkg->description,
+ "last_update" => $pkg->lastversion
+ ); }, $latest);
+
+ echo $ste->exectemplate("home.html");
+ },
+ "setup" => function(&$data, $url_now, &$url_next)
+ {
+ global $settings, $ste;
+
+ /* If initial setup was already finished, nobody should be allowed to access this. */
+ if(@$settings["setup_finished"])
+ throw new NotFoundError();
+
+ $url_next = array();
+
+ /* Test file permissions */
+ $permissions_missing = array_filter(array("/packages", "/packagelist", "/repometa"), function($f) { return !@is_writable(dirname(__FILE__) . "/..$f"); });
+ if(!empty($permissions_missing))
+ $ste->vars["error"] = "No writing permissions on these files/directories: \"" . implode("\", \"", $permissions_missing) . "\"";
+ else
+ {
+ /* Check input */
+ if(!empty($_POST["send_data"]))
+ {
+ if(empty($_POST["admin_name"]) or empty($_POST["admin_password"]) or empty($_POST["repo_name"]) or empty($_POST["repo_description"]) or empty($_POST["repo_baseurl"]) or (($_POST["repo_mode"] != "public") and ($_POST["repo_mode"] != "private")))
+ $ste->vars["error"] = "Form not filled out completely";
+ else
+ {
+ /* Insert data */
+ $admin = User::create($_POST["admin_name"]);
+ $admin->pwhash = PasswordHash::create($_POST["admin_password"]);
+ $admin->isadmin = True;
+ $admin->save();
+ $settings["repo_name"] = $_POST["repo_name"];
+ $settings["repo_description"] = $_POST["repo_description"];
+ $settings["repo_baseurl"] = $_POST["repo_baseurl"];
+ $settings["repo_mode"] = $_POST["repo_mode"];
+
+ update_repometa();
+
+ $settings["setup_finished"] = True;
+
+ $url_next = array("index");
+ return;
+ }
+ }
+ }
+
+ $ste->vars["baseurl_predicted"] = self_url();
+ echo $ste->exectemplate("setup.html");
+ }
+);
+
+/* bootstrapping... */
+$urlpath = explode("/", $_GET["action"]);
+$rel_path_to_root = implode("/", array_merge(array("."), array_repeat("..", count($urlpath) - 1)));
+$GLOBALS["rel_path_to_root"] = $rel_path_to_root;
+$data = array("rel_path_to_root" => $rel_path_to_root);
+$ste->vars["rel_path_to_root"] = $rel_path_to_root;
+/* Enforce setup */
+if(!@$settings["setup_finished"])
+ $urlpath = array("setup");
+/*try
+{*/
+ url_process($urlpath, $url_handlers, $data);
+/*}
+catch(Exception $e)
+{
+ header("HTTP/1.1 500 Internal Server Error");
+ header("Content-Type: text/plain");
+ echo "Internal Server Error\nReason: " . get_class($e) . "(" . $e->getMessage() . ") thrown.\n";
+}*/
+
+/* save settings */
+$settings->save();
+
+?>
diff --git a/models.php b/r7r_repo/models.php
index 62e541d..1eb7caf 100644
--- a/models.php
+++ b/r7r_repo/models.php
@@ -2,7 +2,6 @@
require_once(dirname(__FILE__) . "/db.php");
require_once(dirname(__FILE__) . "/utils.php");
-db_connect();
/* Exceptions copied from Ratatöskr */
class DoesNotExistError extends Exception { }
@@ -178,8 +177,8 @@ class User extends BySQLRowEnabled
$obj->name = $name;
$obj->pwhash = "";
$obj->isadmin = False;
- qdb("INSERT INTO `PREFIX_users` (`name`, `pwhash`, isadmin`) VALUES ('%s', '', 0)", $name);
- $this->id = mysql_insert_id();
+ qdb("INSERT INTO `PREFIX_users` (`name`, `pwhash`, `isadmin`) VALUES ('%s', '', 0)", $name);
+ $obj->id = mysql_insert_id();
return $obj;
}
}
@@ -281,7 +280,7 @@ class Package extends BySQLRowEnabled
qdb("INSERT INTO `PREFIX_packages` (`name`, `user`, `lastupdate`, `lastversion`, `txtversion`, description`, `description`) VALUES ('%s', %d, UNIX_TIMESTAMP(), 0, '', '')", $name, $user->get_id());
$obj->id = mysql_insert_id();
- mkdir(dirname(__FILE__) . "/packages/" . $this->name);
+ mkdir(dirname(__FILE__) . "/../packages/" . $this->name);
return $obj;
}
@@ -311,7 +310,7 @@ class Package extends BySQLRowEnabled
$result = qdb("SELECT `id`, `name`, `user`, `lastversion`, `description`, `lastupdate`, `txtversion` FROM `PREFIX_packages` WHERE 1");
while($sqlrow = mysql_fetch_assoc($result))
$packagelist[] = array($sqlrow["name"], $sqlrow["lastversion"], $sqlrow["description"]);
- file_put_contents(dirname(__FILE__) . "/packagelist", serialize($packagelist));
+ file_put_contents(dirname(__FILE__) . "/../packagelist", serialize($packagelist));
}
public static function all()
@@ -351,10 +350,10 @@ class Package extends BySQLRowEnabled
$pkg->updatepath = $settings["root_url"] . "/packages/" . urlencode($this->name) . "/update";
$pkg_ser = $pkg->save();
- file_put_contents(dirname(__FILE__) . "/packages/" . urlencode($this>name) . "/versions/" . $pkg->versioncount, $pkg_ser);
- file_put_contents(dirname(__FILE__) . "/packages/" . urlencode($this>name) . "/versions/current", $pkg_ser);
+ file_put_contents(dirname(__FILE__) . "/../packages/" . urlencode($this>name) . "/versions/" . $pkg->versioncount, $pkg_ser);
+ file_put_contents(dirname(__FILE__) . "/../packages/" . urlencode($this>name) . "/versions/current", $pkg_ser);
$meta = $pkg->extract_meta();
- file_put_contents(dirname(__FILE__) . "/packages/" . urlencode($this>name) . "/meta", serialize($meta));
+ file_put_contents(dirname(__FILE__) . "/../packages/" . urlencode($this>name) . "/meta", serialize($meta));
$this->lastversion = $pkg->versioncount;
$this->txtversion = $pkg->versiontext;
@@ -364,10 +363,10 @@ class Package extends BySQLRowEnabled
$update_info = array(
"current-version" => $this->lastversion,
- "dl-path" => $settings["root_url"] . "/packages/" . urlencode($this->name) . "/versions/" . $this->lastversion;
+ "dl-path" => $settings["root_url"] . "/packages/" . urlencode($this->name) . "/versions/" . $this->lastversion
);
- file_put_contents(dirname(__FILE__) . "/packages/" . urlencode($this>name) . "/update", serialize($update_info));
+ file_put_contents(dirname(__FILE__) . "/../packages/" . urlencode($this>name) . "/update", serialize($update_info));
self::update_lists();
}
@@ -380,9 +379,18 @@ class Package extends BySQLRowEnabled
public function delete()
{
qdb("DELETE FROM `PREFIX_packages` WHERE `id` = %d", $this->id);
- delete_directory(dirname(__FILE__) . "/packages/" . $this->name);
+ delete_directory(dirname(__FILE__) . "/../packages/" . $this->name);
self::update_lists();
}
}
+function update_repometa()
+{
+ global $settings;
+ file_put_contents(dirname(__FILE__) . "/../repometa", serialize(array(
+ "name" => $settings["repo_name"],
+ "description" => $settings["repo_description"]
+ )));
+}
+
?>
diff --git a/pluginpackage.php b/r7r_repo/pluginpackage.php
index d8ce170..d8ce170 100644
--- a/pluginpackage.php
+++ b/r7r_repo/pluginpackage.php
diff --git a/pwhash.php b/r7r_repo/pwhash.php
index 8ec4762..8ec4762 100644
--- a/pwhash.php
+++ b/r7r_repo/pwhash.php
diff --git a/stupid_template_engine.php b/r7r_repo/stupid_template_engine.php
index 0edb880..0edb880 100644
--- a/stupid_template_engine.php
+++ b/r7r_repo/stupid_template_engine.php
diff --git a/templates/.htaccess b/r7r_repo/templates/.htaccess
index 19469bf..19469bf 100755
--- a/templates/.htaccess
+++ b/r7r_repo/templates/.htaccess
diff --git a/r7r_repo/templates/src/home.html b/r7r_repo/templates/src/home.html
new file mode 100644
index 0000000..bf9623a
--- /dev/null
+++ b/r7r_repo/templates/src/home.html
@@ -0,0 +1,35 @@
+<ste:load name="master.html" />
+<ste:block name="content">
+ <h2>Latest Packages</h2>
+ <table class="listtab fullwidth">
+ <thead>
+ <tr>
+ <th>Package Name</th>
+ <th>Version</th>
+ <th>Description</th>
+ <th>Last update</th>
+ </tr>
+ </thead>
+ <tbody>
+ <ste:if>
+ <ste:set var="pkgs_n"><ste:arraylen array="latest_pkgs" /></ste:set>
+ ~{$pkgs_n|gt|0}
+ <ste:then>
+ <ste:foreach array="latest_pkgs" value="pkg">
+ <tr>
+ <td><ste:escape>$pkg[name]</ste:escape></td>
+ <td><ste:escape>$pkg[version]</ste:escape></td>
+ <td><ste:escape>$pkg[description]</ste:escape></td>
+ <td><ste:date format="%d. %h. %Y, %H:%M:%S">$pkg[last_update]</ste:date></td>
+ </tr>
+ </ste:foreach>
+ </ste:then>
+ <ste:else>
+ <tr>
+ <td style="text-align: center; font-style: italic;" colspan="4">No Packages available.</td>
+ </tr>
+ </ste:else>
+ </ste:if>
+ </tbody>
+ </table>
+</ste:block>
diff --git a/r7r_repo/templates/src/master.html b/r7r_repo/templates/src/master.html
new file mode 100644
index 0000000..a2dbd58
--- /dev/null
+++ b/r7r_repo/templates/src/master.html
@@ -0,0 +1,90 @@
+<ste:mktag name="menu_elem" mandatory="name|path">
+ <li?{~{$menu|eq|$_tag_parameters[name]}| class="active"|}>
+ <a href="${rel_path_to_root}${_tag_parameters[path]}"><ste:tagcontent /></a>
+ </li>
+</ste:mktag>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <title><ste:escape>?{$title|$title - $repo[name]|$repo[name]}</ste:escape></title>
+ <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/common.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/main.css" />
+</head>
+<body>
+ <div id="maincontainer">
+ <div id="heading">
+ <h1><ste:escape>$repo[name]</ste:escape></h1>
+ <span id="subheading"><ste:escape>$repo[description]</ste:escape></span>
+ </div>
+ <ul id="mainmenu">
+ <ste:menu_elem name="home" path="">Home</ste:menu_elem>
+ <ste:if>
+ $user[logged_in]
+ <ste:then>
+ <ste:if>
+ $user[admin]
+ <ste:then>
+ <ste:menu_elem name="admin" path="/admin">Administration</ste:menu_elem>
+ <ste:menu_elem name="upload" path="/upload">Upload Package</ste:menu_elem>
+ </ste:then>
+ <ste:else>
+ ?{$repo[public]|<ste:menu_elem name="upload" path="/upload">Upload Package</ste:menu_elem>|}
+ </ste:else>
+ </ste:if>
+ <ste:menu_elem name="my_plugins" path="/my_plugins">My Plugins</ste:menu_elem>
+ <ste:menu_elem name="account" path="/account">My Account</ste:menu_elem>
+ <ste:menu_elem name="logout" path="/logout">Logout</ste:menu_elem>
+ </ste:then>
+ <ste:else>
+ ?{$repo[public]|<ste:menu_elem name="register" path="/register">Register</ste:menu_elem>|}
+ </ste:else>
+ </ste:if>
+ </ul>
+ <div id="contentwrapper">
+ <div id="metabar">
+ <div class="metabar_module">
+ <h2>Repository Base URL</h2>
+ <input type="text" readonly="readonly" value="<ste:escape>$repo[baseurl]</ste:escape>" />
+ </div>
+ <div class="metabar_module">
+ <form action="$rel_path_to_root/search" method="POST" accept-charset="UTF-8">
+ <h2>Search</h2>
+ <input type="text" name="searchterm" /><br />
+ <input type="submit" />
+ </form>
+ </div>
+ <div class="metabar_module">
+ <ste:if>
+ $user[logged_in]
+ <ste:then>
+ Welcome, <strong><ste:escape>$user[name]</ste:escape></strong>!
+ </ste:then>
+ <ste:else>
+ <form action="$rel_path_to_root/login" method="POST" accept-charset="UTF-8">
+ <h2>Login</h2>
+ <p>
+ <strong>Name:</strong><br />
+ <input type="text" name="username" />
+ </p>
+ <p>
+ <strong>Password:</strong><br />
+ <input type="password" name="password" />
+ </p>
+ <p><input type="submit" name="login" /></p>
+ ?{$repo[public]|No account? <a href="$rel_path_to_root/register">Register for a new account.</a>|}
+ </form>
+ </ste:else>
+ </ste:if>
+ </div>
+ <ste:block name="additional_metabar_modules" />
+ </div>
+ <div id="content">
+ <ste:block name="content" />
+ </div>
+ </div>
+ <div id="footer"></div>
+ </div>
+</body>
+</html>
diff --git a/r7r_repo/templates/src/setup.html b/r7r_repo/templates/src/setup.html
new file mode 100644
index 0000000..c73abb4
--- /dev/null
+++ b/r7r_repo/templates/src/setup.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <title>Setup</title>
+ <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/common.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/setup.css" />
+</head>
+<body>
+ <div id="maincontainer">
+ <h1>Setup</h1>
+ <ste:if>
+ $error
+ <ste:then>
+ <div class="error">
+ <ste:escape>$error</ste:escape>
+ </div>
+ </ste:then>
+ </ste:if>
+ <form action="$rel_path_to_root/setup" method="POST" accept-charset="UTF-8">
+ <p>
+ <strong>Admin username</strong><br />
+ <input type="text" name="admin_name" value="" />
+ </p>
+ <p>
+ <strong>Admin initial password</strong><br />
+ <input type="password" name="admin_password" />
+ </p>
+ <p>
+ <strong>Repository name</strong><br />
+ <input type="text" name="repo_name" />
+ </p>
+ <p>
+ <strong>Repository description</strong><br />
+ <input type="text" name="repo_description" />
+ </p>
+ <p>
+ <strong>Repostory Base URL</strong><br />
+ <input type="text" name="repo_baseurl" value="<ste:escape>$baseurl_predicted</ste:escape>"/>
+ </p>
+ <p>
+ <strong>Repository mode</strong><br />
+ <select name="repo_mode">
+ <option value="public" selected="selected">Public - Everyone (ie. registered users) is allowed to publish packages.</option>
+ <option value="private"> Private - Only administrators are allowed to publish packages.</option>
+ </select>
+ </p>
+ <input type="submit" name="send_data" />
+ </form>
+ </div>
+</body>
+</html>
diff --git a/urlprocess.php b/r7r_repo/urlprocess.php
index 14d67c1..14d67c1 100644
--- a/urlprocess.php
+++ b/r7r_repo/urlprocess.php
diff --git a/utils.php b/r7r_repo/utils.php
index d6093ca..d6093ca 100644
--- a/utils.php
+++ b/r7r_repo/utils.php
diff --git a/repometa b/repometa
index e69de29..7d782a4 100644..100755
--- a/repometa
+++ b/repometa
@@ -0,0 +1 @@
+a:2:{s:4:"name";s:4:"test";s:11:"description";s:18:"A test repository.";} \ No newline at end of file