Core, Style and efficiency changes
10
admin.php
|
@ -8,12 +8,18 @@ include "scripts/pageheader.php";
|
|||
|
||||
echo "<h1>Admin</h1>\n";
|
||||
|
||||
$id=$_GET['id'];
|
||||
$mode=$_GET['mode'];
|
||||
|
||||
if ($id=="clear"){
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
if (is_member_moderator($_SESSION['user'],$handle)==false){
|
||||
die ("You do not have admin or moderator position on this forum.");
|
||||
}
|
||||
|
||||
$id=$_GET['id'];
|
||||
$mode=$_GET['mode'];
|
||||
|
||||
|
||||
if($mode=="owner"){
|
||||
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../../";
|
||||
|
||||
include "../../scripts/setup.php";
|
||||
|
||||
$id=$_GET['id'];
|
||||
$id= mysql_real_escape_string ($id);
|
||||
$res = mysql_query("SELECT * FROM mods WHERE basename='$id'",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||
$res = mysql_query("SELECT * FROM mods WHERE basename='$id' AND tags LIKE '%mod%' AND tags NOT LIKE '%dns%'",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||
header("Content-type: text/plain");
|
||||
$row = mysql_fetch_array($res) or die("error");
|
||||
$row = mysql_fetch_array($res) or die("");
|
||||
|
||||
|
||||
echo "{{$row['basename']}}\n";
|
||||
|
@ -33,6 +27,10 @@ for($i=0; $i < strlen($deps); $i++) {
|
|||
$parseddeps .= $deps[$i];
|
||||
}
|
||||
}
|
||||
|
||||
if ($parseddeps == ""){
|
||||
echo "none";
|
||||
}
|
||||
echo "{$parseddeps}\n";
|
||||
echo "[depsend]\n";
|
||||
echo "[repotype]\n";
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../../";
|
||||
|
||||
include "../../scripts/setup.php";
|
||||
$id=$_GET['id'];
|
||||
if ($id==""){
|
||||
$id="mod";
|
||||
}
|
||||
$res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$id%' ORDER BY mod_id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.tags for '$query'");
|
||||
$res = mysql_query("SELECT * FROM mods WHERE basename != '' AND tags LIKE '%mod%' AND tags LIKE '%$id%' ORDER BY mod_id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.tags for '$query'");
|
||||
|
||||
header("Content-type: text/plain");
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../../";
|
||||
|
||||
include "../../scripts/setup.php";
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../../";
|
||||
|
||||
include "../../scripts/setup.php";
|
||||
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../../";
|
||||
|
||||
include "../../scripts/setup.php";
|
||||
$id=$_GET['id'];
|
||||
if ($id==""){
|
||||
$id="mod";
|
||||
}
|
||||
$res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$id%' ORDER BY mod_id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.tags for '$query'");
|
||||
|
||||
$res = mysql_query("SELECT * FROM mods WHERE basename != '' AND tags LIKE '%$id%' AND tags LIKE '%mod%' ORDER BY mod_id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.tags for '$query'");
|
||||
|
||||
header("Content-type: text/plain");
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="About - Help";
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="Articles - Help";
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="Adding and Entry - Help";
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="Index - Help";
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="Mark Up - Help";
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
$punbb_relative="../";
|
||||
|
||||
include "../scripts/setup.php";
|
||||
$page_title="Tags - Help";
|
||||
|
@ -25,31 +19,37 @@ $color="FFFFFF";
|
|||
if ($switch==1)
|
||||
$color="FFFFBD";
|
||||
|
||||
echo "<tr bgcolor=\"#$color\"><td style=\"text-align:center;\">$tag</td><td>$desc</td></tr>";
|
||||
echo "<tr bgcolor=\"#$color\"><td width=20><img src=\"../icon/$tag.png\" width=20></td><td style=\"text-align:center;\">$tag</td><td>$desc</td></tr>";
|
||||
}
|
||||
echo "<p><table>\n<tr><th width=30%>Tag</th><th>Description</th></tr>";
|
||||
echo "<p><table>\n<tr><th colspan=2 width=30%>Tag</th><th>Description</th></tr>";
|
||||
|
||||
add_tag("mod","A Mod (use \"type\" radio buttons)");
|
||||
add_tag("modpack","A Mod pack (use \"type\" radio buttons)");
|
||||
//add_tag("modpack","A Mod pack (use \"type\" radio buttons)");
|
||||
add_tag("code","A C++ Code Modification (use \"type\" radio buttons)");
|
||||
add_tag("texture","A texture pack (use \"type\" radio buttons)");
|
||||
add_tag("sound","A sound pack (use \"type\" radio buttons)");
|
||||
seperator(2);
|
||||
seperator(3);
|
||||
add_tag("deco","Adds decorative blocks");
|
||||
add_tag("tech","Adds technical mods");
|
||||
add_tag("fun","Experiemental Mods");
|
||||
add_tag("server","Mods ideal for servers (low lag, tools)");
|
||||
add_tag("food","Mods that add food");
|
||||
add_tag("growing","Mods that add Plants");
|
||||
add_tag("mobs","Mods that add mobs");
|
||||
add_tag("util","Mods that add new features and actions to the game (eg: bones,falling_items,throwing)");
|
||||
add_tag("3d","Mods that use Node Boxes");
|
||||
add_tag("* graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)");
|
||||
add_tag("* adventure","Mods that add an adventurous theme to the game (eg: traps, magic)");
|
||||
seperator(2);
|
||||
add_tag("* adventure","(Role Playing) Mods that add an adventurous theme to the game (eg: traps, magic)");
|
||||
seperator(3);
|
||||
add_tag("admin","Admin tools");
|
||||
add_tag("grief","Griefing defence, and PvP mods");
|
||||
add_tag("* server","Mods ideal for servers (low lag, tools)");
|
||||
add_tag("* info","Informational - For those who love knowing all sorts of useful stuff about the server");
|
||||
add_tag("* econ","Economy - money and trading");
|
||||
add_tag("* chat","Chat Related - more commands, stuff like the IRC Mod");
|
||||
seperator(3);
|
||||
add_tag("envir","Changes the map generator");
|
||||
add_tag("biome","Adds a new biome to the game");
|
||||
seperator(2);
|
||||
seperator(3);
|
||||
add_tag("comic-txt","Cartoon Style Texture Packs");
|
||||
add_tag("real-txt","Realistic Style Texture Packs");
|
||||
add_tag("hd-txt","HD Texture Packs");
|
||||
|
|
After Width: | Height: | Size: 157 B |
After Width: | Height: | Size: 894 B |
After Width: | Height: | Size: 238 B |
After Width: | Height: | Size: 560 B |
After Width: | Height: | Size: 500 B |
After Width: | Height: | Size: 598 B |
After Width: | Height: | Size: 298 B |
46
listing.php
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
include "scripts/setup.php";
|
||||
|
||||
function listSearch($query,$title,$description,$handle,$icon){
|
||||
if (!$icon)
|
||||
function listSearch($query,$title,$description,$handle){
|
||||
if (file_exists("icon/$query.png")==true)
|
||||
$icon="icon/$query.png";
|
||||
else
|
||||
$icon="images/topicicon_read.jpg";
|
||||
|
||||
echo "<tr><td width=16><img width=16 height=16 src=\"$icon\" /></td><td>";
|
||||
|
@ -39,43 +41,43 @@
|
|||
|
||||
//List Categories
|
||||
if ($id=="")
|
||||
listSearch("","All","All Items in order of popularity",$handle,"");
|
||||
listSearch("","All","All Items in order of popularity",$handle);
|
||||
if ($id=="mod" || $id==""){
|
||||
listSearch("mod","All Mods","All Mods in order of popularity",$handle,"");
|
||||
listSearch("modpack","All Mod Packs","All Mod Packs in order of popularity",$handle,"");
|
||||
listSearch("code","All C++ Code Mods","All C++ Code Mods in order of popularity",$handle,"");
|
||||
listSearch("mod","All Mods","All Mods in order of popularity",$handle);
|
||||
//listSearch("modpack","All Mod Packs","All Mod Packs in order of popularity",$handle);
|
||||
listSearch("code","All C++ Code Mods","All C++ Code Mods in order of popularity",$handle);
|
||||
}
|
||||
|
||||
if ($id=="texture" || $id=="")
|
||||
listSearch("texture","All Texture Packs","All Texture Packs in order of popularity",$handle,"");
|
||||
listSearch("texture","All Texture Packs","All Texture Packs in order of popularity",$handle);
|
||||
|
||||
if ($id=="")
|
||||
listSearch("sound","All Sound Packs","All Sound Packs and Sound Mods in order of popularity",$handle,"");
|
||||
listSearch("sound","All Sound Packs","All Sound Packs and Sound Mods in order of popularity",$handle);
|
||||
|
||||
|
||||
if ($id=="mod" || $id==""){
|
||||
seperator(4);
|
||||
listSearch("deco","Block Adder Mods","Adds basic decorating blocks to the game (eg: moreblocks, homedecor)",$handle,"");
|
||||
listSearch("deco","Block Adder Mods","Adds basic decorating blocks to the game (eg: moreblocks, homedecor)",$handle);
|
||||
listSearch("tech","Technical Mods","Technical Mods (eg: Mesecons, Technic)",$handle,"icon/mesecon.png");
|
||||
listSearch("fun","Experimental Mods","Experimental mods for the game (eg: Chess, Mesecons, Carts)",$handle,"icon/carts.png");
|
||||
listSearch("server","Server Interaction Mods","Mods ideal for servers (low lag, tools)(eg: antigrief, money)",$handle,"icon/worldedit.png");
|
||||
listSearch("food","Food Mods","Mods that add food",$handle,"icon/food.png");
|
||||
listSearch("growing","Growing Mods","Mods that add Plants",$handle,"icon/farming.png");
|
||||
listSearch("mobs","Mob Mods","Mods that add Mobs",$handle,"");
|
||||
listSearch("graphics","Graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)",$handle,"");
|
||||
listSearch("util","Utility Mods","Mods that add new feature and actons to the game (eg: bones,falling_items,throwing)",$handle,"");
|
||||
listSearch("3d","3D Object Mods","Mods that use NodeBoxes",$handle,"");
|
||||
listSearch("fun","Experimental Mods","Experimental mods for the game (eg: Chess, Mesecons, Carts)",$handle);
|
||||
listSearch("server","Server Interaction Mods","Mods ideal for servers (low lag, tools)(eg: antigrief, money)",$handle);
|
||||
listSearch("food","Food Mods","Mods that add food",$handle);
|
||||
listSearch("growing","Growing Mods","Mods that add Plants",$handle);
|
||||
listSearch("mobs","Mob Mods","Mods that add Mobs",$handle);
|
||||
listSearch("graphics","Graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)",$handle);
|
||||
listSearch("util","Utility Mods","Mods that add new feature and actons to the game (eg: bones,falling_items,throwing)",$handle);
|
||||
listSearch("3d","3D Object Mods","Mods that use NodeBoxes",$handle);
|
||||
|
||||
seperator(4);
|
||||
listSearch("envir","Enviroment Mods","Changes the map generator",$handle,"icon/moreores.png");
|
||||
listSearch("biome","Biome Mods","Adds a new biome to the game",$handle,"icon/snow.png");
|
||||
listSearch("envir","Enviroment Mods","Changes the map generator",$handle);
|
||||
listSearch("biome","Biome Mods","Adds a new biome to the game",$handle);
|
||||
}
|
||||
|
||||
if ($id=="texture" || $id==""){
|
||||
seperator(4);
|
||||
listSearch("comic-txt","Comic Style Textures","Cartoon Style Texture Packs",$handle,"icon/haven.png");
|
||||
listSearch("real-txt","Realistic Textures","Realistic Styled Texture Packs",$handle,"icon/haven.png");
|
||||
listSearch("hd-txt","HD Textures","HD Texture packs",$handle,"icon/haven.png");
|
||||
listSearch("comic-txt","Comic Style Textures","Cartoon Style Texture Packs",$handle);
|
||||
listSearch("real-txt","Realistic Textures","Realistic Styled Texture Packs",$handle);
|
||||
listSearch("hd-txt","HD Textures","HD Texture packs",$handle);
|
||||
}
|
||||
|
||||
/*seperator(4);
|
||||
|
|
42
login.php
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
include "scripts/setup.php";
|
||||
|
||||
$user=$_POST['user'];
|
||||
$pass=$_POST['pass'];
|
||||
$redir=$_GET['redir'];
|
||||
|
||||
$message="";
|
||||
|
||||
if (authcheck($user,$pass,$handle)==true){
|
||||
login($user);
|
||||
if ($redir==""){
|
||||
if ($pass=="temp_pass"){
|
||||
header("location: user_password.php?auto=true&redir=user_email.php");
|
||||
}else{
|
||||
header("location: index.php");
|
||||
}
|
||||
}else{
|
||||
header("location: $redir");
|
||||
}
|
||||
}else{
|
||||
$message="Incorrect username/password";
|
||||
}
|
||||
|
||||
if ($user=="" || $pass==""){
|
||||
$message="Enter your login details or <a href=\"signup.php\">Sign Up</a>";
|
||||
}
|
||||
|
||||
$page_title="Log In - Minetest Mods";
|
||||
include "scripts/pageheader.php";
|
||||
echo "<p>$message</p>";
|
||||
?>
|
||||
|
||||
<form action="<?php echo curPageURL();?>" method="post">
|
||||
Username: <input type="text" name="user"><br />
|
||||
Password: <input type="password" name="pass"><br />
|
||||
<input type="submit" value="Log In">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include "scripts/pagefooter.php";
|
||||
?>
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
session_destroy();
|
||||
|
||||
header("location: index.php");
|
||||
?>
|
|
@ -0,0 +1,479 @@
|
|||
html {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #503000;
|
||||
color: #000000;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.constrain {
|
||||
max-width: 60em;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Navbar
|
||||
*/
|
||||
|
||||
.navbar {
|
||||
position: fixed;
|
||||
/*margin: 0.2em 0 2.0em 0;*/
|
||||
height: 32px;
|
||||
background: #333333;
|
||||
/*width: auto;*/
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.navbarbottom1 {
|
||||
position: fixed;
|
||||
top: 32px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
height: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.inbar_main {
|
||||
float: left;
|
||||
}
|
||||
.inbar_separator {
|
||||
float: left;
|
||||
padding-top: 4px;
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.inbar_other {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navbar ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.navbar ul li {
|
||||
display: inline-block;
|
||||
padding: 0px 7px 0px 7px;
|
||||
padding-top: 4px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#navbar ul li a {
|
||||
color: #cccccc;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#navbar ul li a:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.navlink_normal {
|
||||
}
|
||||
|
||||
.navlink_special {
|
||||
}
|
||||
|
||||
.navlink_special2 {
|
||||
}
|
||||
|
||||
.contribclass {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*
|
||||
Logo
|
||||
*/
|
||||
|
||||
#logo {
|
||||
/*text-align: center;*/
|
||||
/*background: url("images/logo1.png") center top no-repeat;*/
|
||||
/*background: url("images/minetest-icon-120.png") left top no-repeat;*/
|
||||
background: #61ad6d;
|
||||
color: #ffffff;
|
||||
display: block;
|
||||
height: 120px;
|
||||
width: auto;
|
||||
margin: 0px;
|
||||
padding: 3em 0 1em 0;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#logoimage {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bigheader {
|
||||
text-align: left;
|
||||
display: block;
|
||||
padding: 15px 10px 10px 150px;
|
||||
}
|
||||
|
||||
.bigheader h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 60px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bigheader h2 {
|
||||
margin: 0 0 0 4px;
|
||||
padding: 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#headercomment {
|
||||
text-align: right;
|
||||
/*display: block;*/
|
||||
padding: 5px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#headercomment a {
|
||||
color: #ffa;
|
||||
/*text-decoration: none;*/
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*
|
||||
Content
|
||||
*/
|
||||
|
||||
#content {
|
||||
font-size: 90%;
|
||||
margin: 0;
|
||||
padding: 1em 0 2em 0;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
#content img {
|
||||
margin: 0.5em;
|
||||
}
|
||||
|
||||
#content a img {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
#content a:hover img {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
#content a {
|
||||
text-decoration: none;
|
||||
/*color: #61ad6d;*/
|
||||
/*color: #30569c;*/
|
||||
/*color: #1d34c4;*/
|
||||
/*color: #1d34a4;*/
|
||||
}
|
||||
|
||||
#content a:visited {
|
||||
/*color: #;*/
|
||||
/*color: #636893;*/
|
||||
/*color: #8844B9;*/
|
||||
/*color: #682469;*/
|
||||
}
|
||||
|
||||
#content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#content h2 h3 h4 {
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
/*
|
||||
Footer
|
||||
*/
|
||||
|
||||
#footer {
|
||||
display: block;
|
||||
padding: 0em 0.2em 2em 0.2em;
|
||||
margin-top: 1em;
|
||||
clear: both;
|
||||
background: #503000;
|
||||
/*color: #edb;*/
|
||||
color: #ba9;
|
||||
text-shadow: #210 -1px -1px 0px;
|
||||
}
|
||||
|
||||
.footerlogo {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
/*margin-top: 3em;*/
|
||||
}
|
||||
|
||||
.footerlogo img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.footerlogo span {
|
||||
vertical-align: middle;
|
||||
margin: 1em;
|
||||
}
|
||||
.footermainlist {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#footer ul {
|
||||
list-style: none;
|
||||
padding: 0 0 0 1.5em;
|
||||
}
|
||||
#footer ul .the_li {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
/*color: #fec;*/
|
||||
color: #edb;
|
||||
font-weight: bold;
|
||||
}
|
||||
#footer a:hover {
|
||||
background-color: #201800;
|
||||
}
|
||||
|
||||
/*
|
||||
Random stuff
|
||||
*/
|
||||
|
||||
.bigdownload {
|
||||
font-size: 130%;
|
||||
/*background-color: #cfa;*/
|
||||
}
|
||||
|
||||
.osdownload h3 {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.osdownload {
|
||||
/*background-color: #eeeeff;*/
|
||||
border-bottom: 1px solid #888888;
|
||||
margin: 10px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.sourcetable {
|
||||
margin: 1em;
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
.sourcetable tr {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.sourcetable td {
|
||||
border: 0px;
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
border-bottom: 1px solid #888888;;
|
||||
}
|
||||
|
||||
.serverinfo h3 {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.serverinfo {
|
||||
/*background-color: #eeeeff;*/
|
||||
margin: 10px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.buyitem h3 {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.buyitem {
|
||||
background-color: #333;
|
||||
color: #ddd;
|
||||
margin: 50px 10px 50px 10px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
.buyprice {
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
padding: 0 0.5em 0 0;
|
||||
margin: 0.5em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.buytd {
|
||||
padding: 0em 2em 0em 2em;
|
||||
width: 11em;
|
||||
}
|
||||
|
||||
.catbuybutton {
|
||||
/*display: inline-block;*/
|
||||
/*padding: 0 0 0 9px;*/
|
||||
}
|
||||
|
||||
.paypalcatbuybuttonimage {
|
||||
padding: 0 0 0 1.5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.buydesc {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
padding: 0 1em 0 0;
|
||||
margin: 1em 0 0 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: red;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.smalltext {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
#features li {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.newsdate {
|
||||
font-size: 70%;
|
||||
float: left;
|
||||
margin: 0em 1em 1em 0em;
|
||||
padding: 0.1em;
|
||||
background: #ffff33;
|
||||
}
|
||||
|
||||
.commentsdate {
|
||||
font-size: 70%;
|
||||
float: left;
|
||||
margin: 0em 1em 1em 0em;
|
||||
padding: 0.1em;
|
||||
background: #ffff33;
|
||||
}
|
||||
|
||||
.commentsname {
|
||||
font-weight: bold;
|
||||
/*float: left;
|
||||
margin: 0em 1em 1em 0em;
|
||||
padding: 0.1em;
|
||||
background: #ffff33;*/
|
||||
}
|
||||
|
||||
.comment {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.examplecode {
|
||||
border: 2px solid #dddddd;
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
.reply {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.warning {
|
||||
font-weight: bold;
|
||||
color: #aa0000;
|
||||
}
|
||||
|
||||
.donationlistdiv {
|
||||
/*background-color: #ddccff;*/
|
||||
border: solid #888888 1px;
|
||||
padding: 0 0.5em 0.5em 0.5em;
|
||||
margin: 0 0 2em 0;
|
||||
/*float: right;
|
||||
margin: -2em 1em 1em 1em;
|
||||
width: 16em;
|
||||
display: block;*/
|
||||
}
|
||||
|
||||
.donationlistdiv h3 {
|
||||
margin: 0.5em auto 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.donationtable {
|
||||
/*margin: 0 auto 0 auto;*/
|
||||
margin: 0 0 0 0;
|
||||
border-collapse: collapse;
|
||||
border-width: 0px;
|
||||
/*border-width: 1px;
|
||||
border-color: #888888;*/
|
||||
/*border-style: solid;*/
|
||||
/*width: 100%;*/
|
||||
}
|
||||
|
||||
.donationtable th {
|
||||
text-align: left;
|
||||
/*padding: 1px 0.5em 3px 1em;*/
|
||||
padding: 1px 0.5em 3px 0.5em;
|
||||
}
|
||||
|
||||
.donationtable tr {
|
||||
/*border-width: 1px;
|
||||
border-color: #888888;
|
||||
border-style: solid;*/
|
||||
/*border-width: 4px;
|
||||
border-color: #ffffff;
|
||||
border-style: solid;*/
|
||||
}
|
||||
|
||||
.donationtable td {
|
||||
border-width: 0px;
|
||||
/*border-width: 1px;
|
||||
border-color: #888888;*/
|
||||
/*border-style: solid;*/
|
||||
margin: 1px 0 0 0;
|
||||
/*padding: 1px 5px 1px 5px;*/
|
||||
/*padding: 0px 5px 0px 5px;*/
|
||||
padding: 3px 5px 3px 5px;
|
||||
/*background-color: #ffffaa;*/
|
||||
/*background-color: #ffffff;*/
|
||||
}
|
||||
|
||||
.donationtable .amount {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.donor_ul {
|
||||
list-style-type: none;
|
||||
padding-left: 0.5em;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.donor_ul li {
|
||||
/*padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;*/
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
display: table-cell;
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
include "scripts/setup.php";
|
||||
|
||||
$id=$_GET['id'];
|
||||
|
||||
if (is_numeric($id)==false)
|
||||
SQLerrorFancy("Id error","Id needs to be numeric");
|
||||
|
||||
$res = mysql_query("SELECT * FROM reviews WHERE id=$id",$handle) or SQLerrorFancy("MySQL Query Error","Error on searching database.reviews.id for '$id'");
|
||||
$row = mysql_fetch_array($res) or SQLerrorFancy("Row Error","No results where found for a mod with the id $id");
|
||||
|
||||
if (!$row)
|
||||
SQLerrorFancy("Result error","No results where found for a review with the id $id");
|
||||
|
||||
$mres = mysql_query("SELECT * FROM mods WHERE mod_id={$row['mod_id']}",$handle) or SQLerrorFancy("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||
$mod = mysql_fetch_array($mres) or SQLerrorFancy("Row Error","No results where found for a mod with the id $gen_num");
|
||||
|
||||
if (!$mod)
|
||||
SQLerrorFancy("Result error","No results where found for a mod with the id {$row['mod_id']}");
|
||||
|
||||
$page_title="Review of '{$mod['name']}'";
|
||||
$id=$row['id'];
|
||||
|
||||
// Substitute owner ID with owner name (by Phitherek_):
|
||||
if (is_numeric($row['owner_id'])==true){
|
||||
$r = mysql_query("SELECT name FROM users WHERE id=".$row['owner_id'],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
|
||||
$ra = mysql_fetch_array($r);
|
||||
$owner = $ra['name'];
|
||||
}
|
||||
// End of Phitherek_' s code
|
||||
|
||||
$page_description=$row['overview'];
|
||||
|
||||
$dnw_content=true;
|
||||
|
||||
include "scripts/pageheader.php";
|
||||
|
||||
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:center;padding:20px;\">";
|
||||
|
||||
echo "<h1 style=\"margin: 0;padding:0;text-align:center;\">A review of '<a href='viewmod.php?id={$mod['mod_id']}'>{$mod['name']}</a>' - by <a href=\"user.php?id={$row['owner_id']}\">{$owner}</a></h1></th></tr>\n"; // Title and User Link
|
||||
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
<div id="content">
|
||||
<div class="constrain" style="max-width:1200px;width:1150px;">
|
||||
<div style="clear: both;"></div>
|
||||
<?php
|
||||
|
||||
echo "\n<div id='mod_bar'>\n";
|
||||
|
||||
/*echo "<div class='bar_title'>\n";
|
||||
echo "Details\n";
|
||||
echo "</div>\n";*/
|
||||
|
||||
echo "<div id='bar_download'>\n";
|
||||
echo "<a href='viewmod.php?id={$mod['mod_id']}'>Back to '{$mod['name']}'</a>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<p class='bar_p'>{$mod['overview']}</p>";
|
||||
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Summary\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<p class='bar_p'>{$row['overview']}</p>";
|
||||
|
||||
|
||||
echo "</div>\n\n";
|
||||
|
||||
echo "<div id='mod_main'>";
|
||||
|
||||
|
||||
require_once('scripts/formatcode.php');
|
||||
$parser = new parser;
|
||||
$parsed = $parser->p($row['description'],1);
|
||||
|
||||
echo "<p>$parsed</p>";
|
||||
|
||||
include "scripts/pagefooter.php";
|
||||
?>
|
|
@ -1119,7 +1119,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
$s = preg_replace("#\[url\](.*)\[\/url\]#Ui", "<a href=\"$1\" target=\"_blank\">$1</a>", $s);
|
||||
|
||||
$s = preg_replace("#\[img\](.*)\[\/img\]#Ui", "<img src=\"$1\" border=\"0\" style=\"max-width:860px;\" />", $s);
|
||||
$s = preg_replace("#\[img\](.*)\[\/img\]#Ui", "<img src=\"$1\" border=\"0\" style=\"max-width:760px;\" />", $s);
|
||||
|
||||
$s = preg_replace("#\[email\=(.*)\](.*)\[\/email\]#Ui", "<a href=\"mailto: $1\">$2</a>", $s);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ echo "<table width=\"100%\"><tr><th colspan=2>Mod Name</th><th>Description</th><
|
|||
$query= mysql_real_escape_string ($query);
|
||||
|
||||
if ($mode=="tags"){
|
||||
$qu_str="SELECT * FROM mods WHERE tags LIKE '%$query%'";
|
||||
$qu_str="SELECT * FROM mods WHERE tags LIKE '%$query%' AND tags NOT LIKE '%dns%'";
|
||||
}else if ($mode=="sb"){
|
||||
if (is_numeric($query)==true){
|
||||
echo "<!--is numeric-->";
|
||||
|
@ -50,7 +50,7 @@ while ($hash = mysql_fetch_assoc($res)){
|
|||
// End of Phitherek_' s change
|
||||
$overview=str_replace("\\'","'",$hash['overview']);
|
||||
echo "<td>$overview</td>";
|
||||
echo "<td>{$hash['tags']}</td>";
|
||||
echo "<td>".tagLinks($hash['tags'])."</td>";
|
||||
echo "<td>{$hash['likes']}</td></tr>\n";
|
||||
|
||||
$alternate=1-$alternate;
|
||||
|
|
|
@ -14,6 +14,14 @@ if ($_SESSION['msg']==0){
|
|||
}
|
||||
|
||||
if ($_SESSION['user']=="RAPHAEL"){
|
||||
printNotice("Message to RAPHAEL from the admin","You have not specified many tags for your mods.<br>Tags group similar mods together, and help users search for and find them. For help, see the <a href=\"help/tags.php\">tags reference</a>");
|
||||
printNotice("Message to RAPHAEL from the admin","Some of your mods do not have their basename/names spaces defined, and so have been hidden from the listings. <a href=\"http://multa.bugs3.com/minetest/forum/search.php?mode=sb&id=dns\">Hidden Mods</a>\n<p>In addition to this, you have not specified many tags for your mods.<br>Tags group similar mods together, and help users search for and find them. For help, see the <a href=\"help/tags.php\">tags reference</a>\n<p></p>");
|
||||
}
|
||||
|
||||
if ($_SESSION['user']=="Zeg9"){
|
||||
printNotice("Message to Zeg9 from the admin","Some of your mods do not have their basename/names spaces defined, and so have been hidden from the listings. <a href=\"http://multa.bugs3.com/minetest/forum/search.php?mode=sb&id=dns\">Hidden Mods</a>\n<p>");
|
||||
}
|
||||
|
||||
if ($_SESSION['user']=="hansuke123"){
|
||||
printNotice("Message to hansuke123 from the admin","One of your mods has been deleted as it is not applicable on this website");
|
||||
}
|
||||
?>
|
|
@ -20,7 +20,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Minetest Mods by: Andrew "rubenwardy" Ward<br>
|
||||
Minetest Extensions by: Andrew "rubenwardy" Ward<br>
|
||||
Website by: Perttu Ahola, celeron55 @ IRCnet, Freenode, gmail.com
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
echo $page_description;
|
||||
?>" />
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<link rel="stylesheet" href="http://minetest.net/style_v2.css" type="text/css" />
|
||||
<link rel="stylesheet" href="<?php echo $serverpath;?>/mineteststyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="<?php echo $serverpath;?>/style.css" type="text/css" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="bookmark icon" href="/favicon.ico" />
|
||||
<title><?php echo $page_title;?> - Minetest Extensions</title>
|
||||
|
@ -21,9 +22,6 @@
|
|||
}
|
||||
|
||||
#notice_bar {
|
||||
/*text-align: center;*/
|
||||
/*background: url("images/logo1.png") center top no-repeat;*/
|
||||
/*background: url("images/minetest-icon-120.png") left top no-repeat;*/
|
||||
background: #FACF73;
|
||||
color: #000000;
|
||||
display: block;
|
||||
|
@ -32,6 +30,12 @@
|
|||
padding: 1em 0 1em 0;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#review td
|
||||
{
|
||||
vertical-align:top;
|
||||
padding-left:10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -73,10 +77,8 @@ if ($forum_user['username']!="Guest"){
|
|||
echo "<li class=\"navlink_special\"><a href=\"".FORUM_ROOT."profile.php?id={$forum_user['id']}\">{$forum_user['username']}</a></li>";
|
||||
echo "<li class=\"navlink_special\"><a href=\"".FORUM_ROOT."login.php?action=out&id={$forum_user['id']}\">Log Out</a></li>";
|
||||
}else{
|
||||
?>
|
||||
<li class="navlink_special"><a href="login.php">Login</a></li>
|
||||
<li class="navlink_special"><a href="signup.php">Sign Up</a></li>
|
||||
<?php
|
||||
echo "<li class=\"navlink_special\"><a href=\"".FORUM_ROOT."login.php\">Login</a></li>";
|
||||
echo "<li class=\"navlink_special\"><a href=\"".FORUM_ROOT."register.php\">Register</a></li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
@ -92,12 +94,13 @@ echo "<li class=\"navlink_special\"><a href=\"".FORUM_ROOT."login.php?action=out
|
|||
<div style="float:right;vertical-align:top;">
|
||||
<form method="get" action="<?php echo $serverpath;?>/search.php">
|
||||
<input type="hidden" name="mode" value="sb">
|
||||
<input type="text" placeholder="search for something" name="id"> <input type="submit" value="Search">
|
||||
<input type="text" placeholder="search for something" name="id" size=11> <input type="submit" value="Search">
|
||||
</form>
|
||||
</div>
|
||||
<span class="bigheader">
|
||||
<h1>Minetest Extensions</h1>
|
||||
<h2>Mods, Texture Packs and Sound Packs.</h2>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
@ -116,6 +119,10 @@ function toggle(id) {
|
|||
<?php
|
||||
include_once "messages.php";
|
||||
?>
|
||||
<?php
|
||||
if ($dnw_content==true) // if the caller has told us not to do the following tags
|
||||
return;
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<div class="constrain">
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
|
||||
<?php
|
||||
if (!($row[23]=="")){
|
||||
echo "<b>Perfect companions for this mod</b><br>";
|
||||
echo "<center><table>\n";
|
||||
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Recommended\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<table>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
$rec=explode(",",$row[23]);
|
||||
|
||||
$count=0;
|
||||
|
||||
for ($i=0;$i<count($rec);$i++){
|
||||
$id_i = $rec[$i];
|
||||
if (is_numeric($id)){
|
||||
|
@ -18,6 +24,13 @@ for ($i=0;$i<count($rec);$i++){
|
|||
$image="icon/".$row_i[20];
|
||||
|
||||
echo "<td style=\"text-align:center;\"><a href=\"viewmod.php?id=$id_i\"><img height=64 width=64 src=\"$image\" title=\"{$row_i[1]}\" /></a><br /><b>{$row_i[1]}</b></td>\n";
|
||||
|
||||
$count++;
|
||||
|
||||
if ($count>2){
|
||||
$count=0;
|
||||
echo "</tr><tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,16 +9,18 @@
|
|||
$game="Minetest"; // The game's name
|
||||
$game_sh="MT"; // The game's name in short hand
|
||||
$logo=""; // The game's logo
|
||||
$serverpath="http://localhost/minetest-forum"; // The base url to the mod forum
|
||||
$serverpath="http://multa.bugs3.com/minetest/forum"; // The base url to the mod forum
|
||||
|
||||
|
||||
// SQL Database
|
||||
// Settings needed to connect to the MySql Database
|
||||
|
||||
$sql_url="localhost"; // The URL to the MySql Server
|
||||
$sql_user="root"; // The username for the MySql Server
|
||||
$sql_pass=""; // The password for the MySql Server
|
||||
$sql_db="minetest";
|
||||
$sql_url="mysql.serversfree.com"; // The URL to the MySql Server
|
||||
$sql_user="u372522788_admin"; // The username for the MySql Server
|
||||
$sql_pass="password"; // The password for the MySql Server
|
||||
$sql_db="u372522788_minetest";
|
||||
|
||||
$punbb_directory="../punbb";
|
||||
|
||||
|
||||
// Email Address Settings
|
||||
|
@ -29,5 +31,5 @@ $emailver_mod=true; // Require Email Vertification to post
|
|||
$emailver_login=false; // Require Email Vertification to log in
|
||||
|
||||
$mt_lock_down=false; // if true, only admins can access forum
|
||||
$mt_lock_msg="";
|
||||
$mt_lock_msg="Message from Rubenwardy: Changing several things involving viewmod.php";
|
||||
?>
|
|
@ -21,6 +21,17 @@ function SQLerror($title,$msg){
|
|||
die("$msg");
|
||||
}
|
||||
|
||||
function SQLerrorFancy($title,$msg){
|
||||
global $serverpath;
|
||||
global $forum_user;
|
||||
|
||||
$page_title=$title;
|
||||
include_once "pageheader.php";
|
||||
|
||||
echo "<h1>$title</h1>\n $msg";
|
||||
|
||||
include_once "pagefooter.php";
|
||||
}
|
||||
|
||||
$handle = mysql_pconnect($sql_url,$sql_user,$sql_pass) or SQLerror("MySQL Database", "Error connecting to the MySQL database");
|
||||
|
||||
|
@ -30,6 +41,26 @@ SQLerror("MySQL Database", "Error connecting to the MySQL database");
|
|||
mysql_select_db($sql_db,$handle) or die("Error Switching DB");
|
||||
|
||||
|
||||
|
||||
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', $punbb_relative.$punbb_directory.'/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
|
||||
if ($forum_user['username']!="Guest"){
|
||||
if (user_exists($forum_user['username'],$handle)==false){
|
||||
addUser($forum_user['username'],"x","x",$forum_user['email'],$handle);
|
||||
}
|
||||
login($forum_user['username']);
|
||||
}else{
|
||||
$_SESSION['user']=="";
|
||||
$_SESSION['auth']=="";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($mt_lock_down==true){
|
||||
if (is_logged_in()==false || is_member_moderator($_SESSION['user'],$handle)==false){
|
||||
echo "<style>body{\nfont-family:arial;\n}</style>";
|
||||
|
@ -71,7 +102,8 @@ function login($user){
|
|||
}
|
||||
|
||||
function is_logged_in(){
|
||||
if ($_SESSION['auth']=="somerandomkey"){
|
||||
global $forum_user;
|
||||
if ($forum_user['username']!="Guest"){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -96,7 +128,7 @@ function require_login(){
|
|||
|
||||
function getNoTopics($tag,$handle){
|
||||
$qu = mysql_real_escape_string ($tag);
|
||||
$res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$qu%' ORDER BY likes DESC",$handle);
|
||||
$res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$qu%' AND tags NOT LIKE '%dns%'",$handle);
|
||||
return mysql_num_rows($res);
|
||||
}
|
||||
|
||||
|
@ -170,24 +202,15 @@ if ($mod[19]=="git"){
|
|||
return "";
|
||||
}
|
||||
|
||||
if ($pun_decl==false){
|
||||
$pun_decl=true;
|
||||
//define('FORUM_QUIET_VISIT', 1);
|
||||
//define('FORUM_TURN_OFF_MAINT', 1);
|
||||
define('FORUM_DISABLE_CSRF_CONFIRM', 1);
|
||||
define('FORUM_ROOT', '../forum/');
|
||||
require FORUM_ROOT.'include/common.php';
|
||||
}
|
||||
|
||||
if ($forum_user['username']!="Guest"){
|
||||
if (user_exists($forum_user['username'],$handle)==false){
|
||||
addUser($forum_user['username'],"x","x",$forum_user['email'],$handle);
|
||||
}
|
||||
login($forum_user['username']);
|
||||
}else{
|
||||
$_SESSION['user']=="";
|
||||
$_SESSION['auth']=="";
|
||||
}
|
||||
function tagLinks($tags){
|
||||
$array=explode(",",$tags);
|
||||
$result="";
|
||||
|
||||
foreach ($array as &$a){
|
||||
$result.=" <a href=\"search.php?id=$a\">$a</a>";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
require_once('formatcode.php');
|
||||
|
||||
if (is_numeric($id)==false)
|
||||
return;
|
||||
|
||||
$res = mysql_query("SELECT * FROM reviews WHERE mod_id=$id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.id for '$query'");
|
||||
|
||||
echo "<table id='review'>\n";
|
||||
|
||||
$reviews=false;
|
||||
while ($hash = mysql_fetch_assoc($res)){
|
||||
|
||||
|
||||
$reviews=true;
|
||||
|
||||
echo "<tr>";
|
||||
|
||||
$owner="";
|
||||
if (is_numeric($hash['owner_id'])==true){
|
||||
$r = mysql_query("SELECT name FROM users WHERE id=".$hash['owner_id'],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
|
||||
$ra = mysql_fetch_array($r);
|
||||
$owner = $ra['name'];
|
||||
}
|
||||
|
||||
echo "<td><div style=\"height:100%;\"><a href=\"user.php?id={$hash['owner_id']}\" >$owner</a></div></td>\n";
|
||||
echo "<td>".$hash['overview']."\n";
|
||||
echo "<p><a href=\"review.php?id={$hash['id']}\">Read More</a></p>";
|
||||
echo "</td>\n";
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
if ($reviews==false){
|
||||
echo "<i>No reviews available</i>";
|
||||
}
|
||||
|
||||
?>
|
53
signup.php
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
include "scripts/setup.php";
|
||||
|
||||
$user=$_POST['user'];
|
||||
$pass=$_POST['pass'];
|
||||
$passcon=$_POST['passcon'];
|
||||
$email=$_POST['email'];
|
||||
|
||||
$page_title="Sign Up";
|
||||
include "scripts/pageheader.php";
|
||||
$message="Enter your details below.";
|
||||
|
||||
$res=addUser($user,$pass,$passcon,$email,$handle);
|
||||
|
||||
if ($res==1){
|
||||
login($user);
|
||||
header("location: reg_complete.php");
|
||||
}
|
||||
|
||||
if ($res==2)
|
||||
$message="Passwords do not match";
|
||||
|
||||
if ($res==3)
|
||||
$message="Account Creation Failed";
|
||||
|
||||
if ($res==4)
|
||||
$message="User already exists.<br />If you did not create an account, then it is likely an admin did to add your entry. Ask an admin for your password";
|
||||
?>
|
||||
<table><tr><td width="50%">
|
||||
<?php
|
||||
echo "<p>$message</p>";
|
||||
?>
|
||||
<form method="post" action="signup.php">
|
||||
<b>Email:</b> <input type="email" name="email"><br /><br />
|
||||
<b>Username:</b> <input type="text" name="user"><br /><br />
|
||||
<b>Password:</b> <input type="password" name="pass"><br /><br />
|
||||
<b>Confirm:</b> <input type="password" name="passcon"><br /><br />
|
||||
<input type="submit" value="Create">
|
||||
</form>
|
||||
<td><td width="50%">
|
||||
<h2>Sign Up for a Minetest Mod Forum account</h2>
|
||||
<h3>Vote</h3>
|
||||
Vote on which mod, mod pack, texture pack or sound pack is the best
|
||||
<h3>Add a Mod</h3>
|
||||
Add a mod, mod pack, texture pack or sound pack to this database
|
||||
<h3>Secure</h3>
|
||||
Your password is safe with SHA-1 encrypton, and we will never share your email address or other details
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
include "scripts/pagefooter.php";
|
||||
?>
|
|
@ -0,0 +1,12 @@
|
|||
// Slider Copyright (c) to Andrew Ward
|
||||
|
||||
// get the slider div
|
||||
var slider = document.getElementById('slider');
|
||||
|
||||
function slideLeft(){
|
||||
|
||||
}
|
||||
|
||||
function slideRight(){
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
#mod_main{
|
||||
max-width:800px;
|
||||
}
|
||||
|
||||
#mod_bar{
|
||||
float:right;
|
||||
width:300px;
|
||||
background-color:#E8E8E8;
|
||||
text-align:center;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.bar_title{
|
||||
width:100%;
|
||||
height:42px;
|
||||
background-color: #333333;
|
||||
padding-top:12px;
|
||||
color: #cccccc;
|
||||
font-size:x-large;
|
||||
}
|
||||
#bar_download{
|
||||
width:100%;
|
||||
height:42px;
|
||||
padding-top:12px;
|
||||
font-size:x-large;
|
||||
background-color:#61AD6D;
|
||||
color:white;
|
||||
margin-bottom:0;
|
||||
background-image: url('images/feather.png');
|
||||
background-position: bottom;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
#bar_download a {
|
||||
color: #ffffff;
|
||||
font-size:x-large;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#bar_download a:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
#bar_stat{
|
||||
margin-left:20px;
|
||||
}
|
||||
|
||||
#mod_bar td {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.bar_p {
|
||||
text-align:left;
|
||||
padding-left:20px;
|
||||
}
|
||||
|
||||
.bar_p ul {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.bar_p ul li {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#slider {
|
||||
width:640px;
|
||||
height:280px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.slideItem {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.slideTitle {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:0px;
|
||||
width:630px;
|
||||
min-height:32px;
|
||||
padding:5px;
|
||||
color:white;
|
||||
background: rgba(97, 173, 109, 0.4);
|
||||
}
|
||||
|
||||
.slideTitle a {
|
||||
color: #cccc00;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.slideTitle a:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.slideTitle img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
#slideLeft {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:124px;
|
||||
width:32px;
|
||||
height:32px;
|
||||
background: rgba(97, 173, 109, 0.4);
|
||||
}
|
||||
|
||||
#slideRight {
|
||||
position:absolute;
|
||||
left:608px;
|
||||
top:124px;
|
||||
width:32px;
|
||||
height:32px;
|
||||
background: rgba(97, 173, 109, 0.4);
|
||||
}
|
168
viewmod.php
|
@ -3,130 +3,148 @@ include "scripts/setup.php";
|
|||
|
||||
include "scripts/voters.php";
|
||||
|
||||
|
||||
$id=$_GET['id'];
|
||||
$act=$_GET['action'];
|
||||
|
||||
|
||||
if ($act=="like"){
|
||||
echo "Liking";
|
||||
likeMod($id,$_SESSION['user'],$handle);
|
||||
likeMod($id,$_SESSION['user'],$handle);
|
||||
}
|
||||
|
||||
$res=0;
|
||||
$gen_num=0;
|
||||
$gen_num=$id;
|
||||
|
||||
if ($id=="random"){
|
||||
$gen_num= rand(0,getNoTopics("",$handle));
|
||||
$res = mysql_query("SELECT * FROM mods LIMIT $gen_num, 1",$handle);
|
||||
}else if (is_numeric($id)){
|
||||
$res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||
$res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerrorFancy("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||
}else{
|
||||
SQLerror("Non Integer","Non integers are not allowed in the id field. <br /> <a href=\"index.php\">Back to home</a>");
|
||||
}
|
||||
|
||||
$row = mysql_fetch_array($res) or SQLerror("Row Error","No results where found for a mod with the id $gen_num");
|
||||
$page_title="View mod - {$row[1]}";
|
||||
$id=$row[0];
|
||||
$row = mysql_fetch_array($res) or SQLerrorFancy("Row Error","No results where found for a mod with the id $gen_num");
|
||||
$page_title="View mod - {$row['name']}";
|
||||
$id=$row['mod_id'];
|
||||
|
||||
|
||||
// Substitute owner ID with owner name (by Phitherek_):
|
||||
if (is_numeric($row[3])==true){
|
||||
$r = mysql_query("SELECT name FROM users WHERE id=".$row[3],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
|
||||
if (is_numeric($row['owner'])==true){
|
||||
$r = mysql_query("SELECT name FROM users WHERE id=".$row['owner'],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
|
||||
$ra = mysql_fetch_array($r);
|
||||
$owner = $ra['name'];
|
||||
}else{
|
||||
$owner = $row[3];
|
||||
$owner = $row['owner'];
|
||||
}
|
||||
// End of Phitherek_' s code
|
||||
|
||||
$page_description=$row[22];
|
||||
$page_description=$row['overview'];
|
||||
|
||||
$dnw_content=true;
|
||||
|
||||
include "scripts/pageheader.php";
|
||||
|
||||
|
||||
if (is_member_moderator($_SESSION['user'],$handle)){
|
||||
$links="<a href=\"admin.php?mode=owner&id=$id\">Change Owner</a> - <a href=\"editentry.php?id=$id\">Edit</a> <a href=\"3mrelinc.php?id=$id\">Increase 3m Release</a> <a href=\"deleteentry.php?id=$id\">Delete</a>";
|
||||
}elseif (getUserId($_SESSION['user'],$handle)==$row[3]){
|
||||
$links="<a href=\"editentry.php?id=$id\">Edit</a> <a href=\"3mrelinc.php?id=$id\">Increase 3m Release</a> <a href=\"deleteentry.php?id=$id\">Delete</a>";
|
||||
|
||||
$links="<li><a href=\"admin.php?mode=owner&id=$id\">Change Owner</a></li>";
|
||||
$links.="<li><a href=\"editentry.php?id=$id\">Edit</a></li>";
|
||||
$links.="<li><a href=\"3mrelinc.php?id=$id\">Increase 3m Release</a></li>";
|
||||
$links.="<li><a href=\"deleteentry.php?id=$id\">Delete</a></li>";
|
||||
|
||||
}elseif (getUserId($_SESSION['user'],$handle)==$row['owner']){
|
||||
|
||||
$links="<li><a href=\"editentry.php?id=$id\">Edit</a></li>";
|
||||
$links.="<li><a href=\"3mrelinc.php?id=$id\">Increase 3m Release</a></li>";
|
||||
$links.="<li><a href=\"deleteentry.php?id=$id\">Delete</a></li>";
|
||||
|
||||
}else{
|
||||
$links="";
|
||||
}
|
||||
|
||||
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:left;\">";
|
||||
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:center;padding:20px;\">";
|
||||
|
||||
|
||||
|
||||
echo "<table style=\"max-width:700px;\" align=\"center\">\n";
|
||||
echo "<tr><th colspan=3 width=\"650\">\n";
|
||||
echo "<h1 style=\"margin: 0;padding:0;text-align:center;\">{$row[1]} - by <a href=\"user.php?id={$row[3]}\">{$owner}</a></h1></th></tr>\n"; // Title and User Link
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td width=\"33%\"><b>Download:</b> <a href=\"".getDownload($row)."\">Latest</a></td>";
|
||||
echo "<td width=\"33%\"><b>Version:</b> {$row['version']}</td>\n"; // Version
|
||||
echo "<td width=\"33%\"><b>Name:</b> {$row['basename']}</td>\n"; // Version
|
||||
|
||||
echo "<tr id=\"extra_info\">";
|
||||
|
||||
echo "<td><b>Download Type:</b> {$row['repotype']}</td>";
|
||||
echo "<td><b>3M Release:</b> {$row['3m_rele']}</td>";
|
||||
echo "<td><b>License:</b> {$row['license']}</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr id=\"extra_info_2\">";
|
||||
|
||||
echo "<td colspan=2><b>Tags:</b> {$row['tags']}</td>";
|
||||
echo "<td><b>Depends:</b> {$row['depend']}</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan=3>";
|
||||
|
||||
include_once "scripts/recommend.php";
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "<h1 style=\"margin: 0;padding:0;text-align:center;\">{$row['name']} - by <a href=\"user.php?id={$row['owner']}\">{$owner}</a></h1></th></tr>\n"; // Title and User Link
|
||||
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function toggleCode() {
|
||||
toggle('extra_info');
|
||||
toggle('extra_info_2');
|
||||
if ($row['mod_id']==38){
|
||||
echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.<hr>";
|
||||
}
|
||||
toggleCode();
|
||||
</script>
|
||||
?>
|
||||
<div id="content">
|
||||
<div class="constrain" style="max-width:1200px;width:1150px;">
|
||||
<div style="clear: both;"></div>
|
||||
<?php
|
||||
|
||||
require_once('scripts/formatcode.php');
|
||||
// load Recruiting Parsers' file
|
||||
$parser = new parser;
|
||||
// start Recruiting Parser...
|
||||
// output $text using all arguments available
|
||||
//$p_text=$parser->p($row[4], 1, 1, 0, 0, 0, 1, "");
|
||||
$parsed = $parser->p($row[4],1);
|
||||
echo "\n<div id='mod_bar'>\n";
|
||||
|
||||
echo "<div style=\"float:right;text-align:right;\">";
|
||||
echo "<div id='bar_download'>\n";
|
||||
echo "<a href='".getDownload($row)."'>Download</a>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<a href=\"#\" onClick=\"javascript:toggleCode();\"><u>Show/Hide More</u></a><br>";
|
||||
if (is_logged_in()==true){
|
||||
$like_ext="";
|
||||
if (checkLike($_SESSION['user'],$id,5,$handle)==true)
|
||||
$like_ext="_high";
|
||||
|
||||
if (is_logged_in()==true){
|
||||
$like_ext="";
|
||||
if (checkLike($_SESSION['user'],$id,5,$handle)==true)
|
||||
$like_ext="_high";
|
||||
echo "<p><a href=\"viewmod.php?id=$id&action=like\"><img src=\"images/like_mod$like_ext.png\" alt=\"like\" /></a></p>";
|
||||
}
|
||||
|
||||
echo "<a href=\"viewmod.php?id=$id&action=like\"><img src=\"images/like_mod$like_ext.png\" alt=\"like\" /></a>";
|
||||
}
|
||||
|
||||
echo "</div>"; // Likes
|
||||
echo "<p class='bar_p'>{$row['overview']}</p>";
|
||||
|
||||
|
||||
echo "<p>$parsed</p>";
|
||||
function tabCol($title,$msg){
|
||||
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:center;height:32px;line-height:32px;\">$links    </div>\n";
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Details\n";
|
||||
echo "</div>\n";
|
||||
|
||||
include "scripts/loadposts.php";
|
||||
echo "<p><table id='bar_stat'><tbody>\n";
|
||||
tabCol("Name",$row['basename']);
|
||||
tabCol("Version",$row['version']); // Version
|
||||
tabCol("Release",$row['3m_rele']);
|
||||
tabCol("License",$row['license']);
|
||||
tabCol("Method",$row['repotype']);
|
||||
tabCol("Depends",$row['depend']);
|
||||
tabCol("Tags",tagLinks($row['tags']));
|
||||
echo "</tbody></table></p>\n";
|
||||
|
||||
|
||||
if ($links!=""){
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Control Panel\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<p class='bar_p'><ul>$links</ul></p>\n";
|
||||
}
|
||||
|
||||
echo "<p>";
|
||||
|
||||
include_once "scripts/recommend.php";
|
||||
|
||||
echo "</p>";
|
||||
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Reviews\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<p>";
|
||||
include "scripts/show_reviews.php";
|
||||
echo "</p>";
|
||||
|
||||
echo "</div>\n\n";
|
||||
|
||||
echo "<div id='mod_main'>";
|
||||
|
||||
|
||||
require_once('scripts/formatcode.php');
|
||||
$parser = new parser;
|
||||
$parsed = $parser->p($row['description'],1);
|
||||
|
||||
echo "<p>$parsed</p>";
|
||||
|
||||
include "scripts/pagefooter.php";
|
||||
?>
|
||||
|
|