addreview.php, new icons, and more
|
@ -44,7 +44,7 @@ Overview:* <input type="text" size="70" name="mod_ov" placeholder="a short one l
|
||||||
|
|
||||||
<!--Description-->
|
<!--Description-->
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<p>Description:* <Br /><textarea name="mod_desc" cols="105" placeholder="The Entries Description. See help > description mark up link at top of page. this is like an article" rows="25"><?php
|
<p>Description:* <Br /><textarea name="mod_desc" cols="105" rows="25" placeholder="The Entries Description. See help > description mark up link at top of page. this is like an article"><?php
|
||||||
if ($desc==""){
|
if ($desc==""){
|
||||||
?><!--This is a template on how you should layout mod pages.
|
?><!--This is a template on how you should layout mod pages.
|
||||||
The description should feature all these things, but not necessarily in this order
|
The description should feature all these things, but not necessarily in this order
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
include "scripts/setup.php";
|
||||||
|
$id=$_GET['id'];
|
||||||
|
require_login();
|
||||||
|
|
||||||
|
// Validate the mod
|
||||||
|
if (is_numeric($id)==false)
|
||||||
|
SQLerrorFancy("Mod Error","Unable to find extension <i>(extension id not valid)</i>");
|
||||||
|
|
||||||
|
$mres = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerrorFancy("Mod Error","Unable to find extension <i>(sql query error)</i>");
|
||||||
|
$mod = mysql_fetch_array($mres) or SQLerrorFancy("Mod Error","Unable to find mod");
|
||||||
|
|
||||||
|
// Validate the user
|
||||||
|
$user_id = getUserId($_SESSION['user'],$handle);
|
||||||
|
$ures = mysql_query("SELECT * FROM reviews WHERE owner_id=$user_id AND mod_id=$id",$handle);
|
||||||
|
if ( mysql_num_rows($ures) > 0){
|
||||||
|
SQLerrorFancy("You have already reviewed this!","You can only review an extension once.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get data
|
||||||
|
$overview = $_POST['overview'];
|
||||||
|
$desc = $_POST['description'];
|
||||||
|
|
||||||
|
// Submit code
|
||||||
|
if ($overview != "" && $desc != ""){
|
||||||
|
require_once "scripts/entry_adders_sql_safe.php";
|
||||||
|
|
||||||
|
// Insert the data into table
|
||||||
|
mysql_query("INSERT INTO reviews (mod_id,owner_id,overview,description)
|
||||||
|
VALUES ($id,$user_id,'$overview','$desc')") or die('insert error');
|
||||||
|
|
||||||
|
// Get the id
|
||||||
|
$the_id=mysql_insert_id($handle);
|
||||||
|
|
||||||
|
// Display the extension
|
||||||
|
header("location: review.php?id=$the_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write page
|
||||||
|
$page_title="Review '".$mod['name']."'";
|
||||||
|
include "scripts/pageheader.php";
|
||||||
|
?>
|
||||||
|
|
||||||
|
Help: <a href="help/markup.php" target="_blank">Description Markup</a> - Not creating? Make sure you filled in all sections.
|
||||||
|
<hr />
|
||||||
|
<form action="addreview.php?id=<?php echo $id;?>" method="post">
|
||||||
|
<p>
|
||||||
|
Overview: <input type="text" name="overview" maxlength="500" size="100" placeholder="A basic paragraph summarising your review" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<textarea name="description" cols="105" rows="25" placeholder="Your article that will appear when the user clicks see more"></textarea>
|
||||||
|
|
||||||
|
<center><input type="submit" value="Add Review" /></center>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include "scripts/pagefooter.php";
|
||||||
|
?>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
include "scripts/setup.php";
|
include "scripts/setup.php";
|
||||||
$page_title="Edit a Mod";
|
$page_title="Delete an extension";
|
||||||
|
|
||||||
require_login();
|
require_login();
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ include "scripts/pageheader.php";
|
||||||
$res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerror("MySQL Query Error","Error finding entry $id");
|
$res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerror("MySQL Query Error","Error finding entry $id");
|
||||||
$row = mysql_fetch_array($res) or die("row error");
|
$row = mysql_fetch_array($res) or die("row error");
|
||||||
|
|
||||||
if (is_member_moderator($_SESSION['user'],$handle) || $_SESSION['user']==$row['owner']){
|
if (is_member_moderator($_SESSION['user'],$handle) || getUserId($_SESSION['user'],$handle)==$row['owner']){
|
||||||
}else{
|
}else{
|
||||||
SQLerror("Deleting Denied","You do not own that entry, and you are not a moderator");
|
SQLerror("Deleting Denied","You do not own that extension, and you are not a moderator");
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------
|
// --------------------------
|
||||||
|
@ -38,8 +38,8 @@ if ($do==true){
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form method="post" action="<?php echo curPageURL();?>">
|
<form method="post" action="<?php echo curPageURL();?>">
|
||||||
<h1>Delete an Entry</h1>
|
<h1>Delete an extension</h1>
|
||||||
<input type="text" name="mod_name" readonly="true" style="background-color:#EEEEEE;" value="<?php echo $name;?>"> will be permanatly deleted<br /><br />
|
<input type="text" name="mod_name" readonly="true" style="background-color:#EEEEEE;" value="<?php echo $name;?>"> will be permanently deleted<br /><br />
|
||||||
<input type="submit" value="OK">
|
<input type="submit" value="OK">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 248 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.9 KiB |
75
index.php
|
@ -35,35 +35,12 @@ include "scripts/pageheader.php";
|
||||||
<h2>Welcome to Minetest Extensions</h2>
|
<h2>Welcome to Minetest Extensions</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Welcome to Minetest Extensions, the Mod, texture pack, sound pack and other things database.
|
Minetest's full potential can only be obtained by installing mods, and other stuff. So shall we get started?
|
||||||
|
|
||||||
<a href="#" onClick="toggle('bar_stat');">Statistics</a>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
function tabCol($title,$msg){
|
|
||||||
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<p><div id='bar_stat' style=\"display:none;\">";
|
|
||||||
|
|
||||||
echo "<p>\n77 <b>users</b> contributing ".getNoTopics("",$handle)." <b>extensions</b>\n</p>\n";
|
|
||||||
|
|
||||||
echo "<table><tbody>\n";
|
|
||||||
|
|
||||||
tabCol("Mods",getNoTopics("mod",$handle));
|
|
||||||
tabCol("Games",getNoTopics("game",$handle));
|
|
||||||
tabCol("Code Mods",getNoTopics("code",$handle));
|
|
||||||
tabCol("Texture Packs",getNoTopics("texture",$handle));
|
|
||||||
tabCol("Visitors","380 a week");
|
|
||||||
tabCol("Extension Views","unknown");
|
|
||||||
tabCol("Downloads","unknown");
|
|
||||||
echo "</tbody></table></div></p>\n";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have any questions at all, do not hesitate to contact us on <a href="http://tinyurl.com/mtmdfrm">this project's forum topic</a>
|
Here's how to install:
|
||||||
|
<a href="http://minetest.net/wiki/doku.php?id=installing_mods">mods</a>,
|
||||||
|
<a href="http://forum.minetest.net/viewtopic.php?id=1592">texture packs</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,7 +49,12 @@ echo "</tbody></table></div></p>\n";
|
||||||
<div id="home_reco">
|
<div id="home_reco">
|
||||||
<div class="constrain">
|
<div class="constrain">
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<h3>Featured</h3>
|
<h3><a style="color:white;" href="viewmod.php?id=random">Random Extension</a></h3>
|
||||||
|
<p>
|
||||||
|
Why dont you try something new? Click the above link to go randomly to one of our extensions.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!--<h3>Featured</h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -80,7 +62,7 @@ echo "</tbody></table></div></p>\n";
|
||||||
<td style="background-image:url('http://multa.bugs3.com/minetest/my_mods/food/banner.png');"><a href="viewmod.php?id=12">Food</a></td>
|
<td style="background-image:url('http://multa.bugs3.com/minetest/my_mods/food/banner.png');"><a href="viewmod.php?id=12">Food</a></td>
|
||||||
<td style="background-image:url('http://www.zimg.eu/i/944678586');"><a href="viewmod.php?id=16">Farming</a></td>
|
<td style="background-image:url('http://www.zimg.eu/i/944678586');"><a href="viewmod.php?id=16">Farming</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -88,11 +70,11 @@ echo "</tbody></table></div></p>\n";
|
||||||
<div class="constrain">
|
<div class="constrain">
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
|
|
||||||
<h3><a href="viewmod.php?id=random">Random Extension</a></h3>
|
<!--<h3><a href="viewmod.php?id=random">Random Extension</a></h3>
|
||||||
<p>
|
<p>
|
||||||
Why dont you try something new? Click the above link to go randomly to one of our extensions.
|
Why dont you try something new? Click the above link to go randomly to one of our extensions.
|
||||||
</p>
|
</p>
|
||||||
<br><br>
|
<br><br>-->
|
||||||
|
|
||||||
<h3>Hottest Extensions</h3>
|
<h3>Hottest Extensions</h3>
|
||||||
<table style="border-spacing: 0; margin: 0; padding: 0; border: 0; width: 100%;">
|
<table style="border-spacing: 0; margin: 0; padding: 0; border: 0; width: 100%;">
|
||||||
|
@ -126,6 +108,37 @@ echo "</tbody></table></div></p>\n";
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="#statistics" onClick="toggle('bar_stat');">Statistics</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function tabCol($title,$msg){
|
||||||
|
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<p><div id='bar_stat' style=\"display:none;\">";
|
||||||
|
|
||||||
|
echo "<p>\n77 <b>users</b> contributing ".getNoTopics("",$handle)." <b>extensions</b>\n</p>\n";
|
||||||
|
|
||||||
|
echo "<table id='statistics'><tbody>\n";
|
||||||
|
|
||||||
|
tabCol("Mods",getNoTopics("mod",$handle));
|
||||||
|
tabCol("Games",getNoTopics("game",$handle));
|
||||||
|
tabCol("Code Mods",getNoTopics("code",$handle));
|
||||||
|
tabCol("Texture Packs",getNoTopics("texture",$handle));
|
||||||
|
tabCol("Visitors","380 a week");
|
||||||
|
tabCol("Extension Views","unknown");
|
||||||
|
tabCol("Downloads","unknown");
|
||||||
|
echo "</tbody></table></div></p>\n";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you have any questions at all, do not hesitate to contact us on <a href="http://tinyurl.com/mtmdfrm">this project's forum topic</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include "scripts/pagefooter.php";
|
include "scripts/pagefooter.php";
|
||||||
?>
|
?>
|
|
@ -12,8 +12,8 @@ $row = mysql_fetch_array($res) or SQLerrorFancy("Row Error","No results where fo
|
||||||
if (!$row)
|
if (!$row)
|
||||||
SQLerrorFancy("Result error","No results where found for a review with the id $id");
|
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'");
|
$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 '{$row['mod_id']}'");
|
||||||
$mod = mysql_fetch_array($mres) or SQLerrorFancy("Row Error","No results where found for a mod with the id $gen_num");
|
$mod = mysql_fetch_array($mres) or SQLerrorFancy("Row Error","No results where found for a mod with the id {$row['mod_id']}");
|
||||||
|
|
||||||
if (!$mod)
|
if (!$mod)
|
||||||
SQLerrorFancy("Result error","No results where found for a mod with the id {$row['mod_id']}");
|
SQLerrorFancy("Result error","No results where found for a mod with the id {$row['mod_id']}");
|
||||||
|
|
|
@ -173,15 +173,15 @@ return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDownload($mod){
|
function getDownload($mod){
|
||||||
if ($mod['repotype']=="git"){
|
if ($mod['repotype']=="git"){
|
||||||
return $mod['file']."/zipball/master";
|
return $mod['file']."/zipball/master";
|
||||||
}else if ($mod['repotype']=="archive"){
|
}else if ($mod['repotype']=="archive"){
|
||||||
if (strstr($mod['tags'],"code")==true){
|
if (strstr($mod['tags'],"code")==true){
|
||||||
return "code_mod.php?url=".$mod[9];
|
return "code_mod.php?url=".$mod[9];
|
||||||
}else{
|
}else{
|
||||||
return $mod['file'];
|
return $mod['file'];
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -1,39 +1,45 @@
|
||||||
<?php
|
<?php
|
||||||
require_once('formatcode.php');
|
require_once('formatcode.php');
|
||||||
|
|
||||||
|
$startrow = $_GET['page'];
|
||||||
|
|
||||||
if (is_numeric($id)==false)
|
if (is_numeric($id)==false)
|
||||||
return;
|
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'");
|
$res = mysql_query("SELECT * FROM reviews WHERE mod_id=$id",$handle);
|
||||||
|
|
||||||
echo "<table id='review'>\n";
|
|
||||||
|
|
||||||
$reviews=false;
|
$reviews=false;
|
||||||
while ($hash = mysql_fetch_assoc($res)){
|
|
||||||
|
|
||||||
|
if ($res){
|
||||||
|
echo "<table id='review'>\n";
|
||||||
|
|
||||||
$reviews=true;
|
while ($hash = mysql_fetch_assoc($res)){
|
||||||
|
$reviews = true;
|
||||||
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
|
|
||||||
$owner="";
|
$owner="";
|
||||||
if (is_numeric($hash['owner_id'])==true){
|
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");
|
$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);
|
$ra = mysql_fetch_array($r);
|
||||||
$owner = $ra['name'];
|
$owner = $ra['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<td><div style=\"height:100%;\"><a href=\"user.php?id={$hash['owner_id']}\" >$owner</a></div></td>\n";
|
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 "<td>".$hash['overview']."\n";
|
||||||
echo "<p><a href=\"review.php?id={$hash['id']}\">Read More</a></p>";
|
echo "<p><a href=\"review.php?id={$hash['id']}\">Read More</a></p>";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
if ($reviews==false){
|
if ($reviews==false){
|
||||||
echo "<i>No reviews available</i>";
|
echo "<i>No reviews available</i>";
|
||||||
|
|
||||||
|
echo "<p>\n\tBe the first to <a href=\"addreview.php?id=$id\">review this mod</a>\n</p>";
|
||||||
|
}else{
|
||||||
|
echo "<p>\n\t<a href=\"addreview.php?id=$id\">Review this mod</a>\n</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
20
style.css
|
@ -269,4 +269,24 @@
|
||||||
top:-18px;
|
top:-18px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.like_button{
|
||||||
|
display:block;
|
||||||
|
width:93px;
|
||||||
|
height:32px;
|
||||||
|
background-size:cover;
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left:20px;
|
||||||
|
margin-right:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big_link{
|
||||||
|
display:block;
|
||||||
|
width:61px;
|
||||||
|
height:24px;
|
||||||
|
padding-left:32px;
|
||||||
|
padding-top:8px;
|
||||||
}
|
}
|
73
viewmod.php
|
@ -3,9 +3,11 @@ include "scripts/setup.php";
|
||||||
|
|
||||||
include "scripts/voters.php";
|
include "scripts/voters.php";
|
||||||
|
|
||||||
|
// Get commands
|
||||||
$id=$_GET['id'];
|
$id=$_GET['id'];
|
||||||
$act=$_GET['action'];
|
$act=$_GET['action'];
|
||||||
|
|
||||||
|
// Check action
|
||||||
if ($act=="like"){
|
if ($act=="like"){
|
||||||
echo "Liking";
|
echo "Liking";
|
||||||
likeMod($id,$_SESSION['user'],$handle,true);
|
likeMod($id,$_SESSION['user'],$handle,true);
|
||||||
|
@ -14,9 +16,11 @@ if ($act=="like"){
|
||||||
header("location: viewmod.php?id=$id");
|
header("location: viewmod.php?id=$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mod handlers
|
||||||
$res=0;
|
$res=0;
|
||||||
$gen_num=$id;
|
$gen_num=$id;
|
||||||
|
|
||||||
|
// Get the mod query
|
||||||
if ($id=="random"){
|
if ($id=="random"){
|
||||||
$gen_num= rand(0,getNoTopics("",$handle));
|
$gen_num= rand(0,getNoTopics("",$handle));
|
||||||
$res = mysql_query("SELECT * FROM mods LIMIT $gen_num, 1",$handle);
|
$res = mysql_query("SELECT * FROM mods LIMIT $gen_num, 1",$handle);
|
||||||
|
@ -26,74 +30,76 @@ if ($id=="random"){
|
||||||
SQLerror("Non Integer","Non integers are not allowed in the id field. <br /> <a href=\"index.php\">Back to home</a>");
|
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 SQLerrorFancy("Row Error","No results where found for a mod with the id $gen_num");
|
// Get the mod row
|
||||||
$page_title="View mod - {$row['name']}";
|
$row = mysql_fetch_array($res) or SQLerrorFancy("Unable to display extension","No results where found for an extension with the id $gen_num");
|
||||||
$id=$row['mod_id'];
|
$id=$row['mod_id'];
|
||||||
$page_keywords=$row['tags'];
|
$page_keywords=$row['tags'];
|
||||||
|
|
||||||
// Substitute owner ID with owner name (by Phitherek_):
|
// Get the owner's name
|
||||||
if (is_numeric($row['owner'])==true){
|
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");
|
$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);
|
$ra = mysql_fetch_array($r);
|
||||||
$owner = $ra['name'];
|
$owner = $ra['name'];
|
||||||
}else{
|
}else{
|
||||||
$owner = $row['owner'];
|
$owner = $row['owner'];
|
||||||
}
|
}
|
||||||
// End of Phitherek_' s code
|
|
||||||
|
|
||||||
|
// Get the page description
|
||||||
$page_description=$row['overview'];
|
$page_description=$row['overview'];
|
||||||
|
|
||||||
|
// Set pageheader.php attributes
|
||||||
|
$page_title="View mod - {$row['name']}";
|
||||||
$dnw_content=true;
|
$dnw_content=true;
|
||||||
|
|
||||||
|
// Run pageheader.php
|
||||||
include "scripts/pageheader.php";
|
include "scripts/pageheader.php";
|
||||||
|
|
||||||
|
// Get control panel content
|
||||||
if (is_member_moderator($_SESSION['user'],$handle) || getUserId($_SESSION['user'],$handle)==$row['owner']){
|
if (is_member_moderator($_SESSION['user'],$handle) || getUserId($_SESSION['user'],$handle)==$row['owner']){
|
||||||
|
$links="<li><a href=\"editentry.php?id=$id\">Edit</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=\"3mrelinc.php?id=$id\">Increase 3m Release</a></li>";
|
$links.="<li><a href=\"deleteentry.php?id=$id\">Delete</a></li>";
|
||||||
$links.="<li><a href=\"deleteentry.php?id=$id\">Delete</a></li>";
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$links="";
|
$links="";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extension banner
|
||||||
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:center;padding:20px;\">";
|
echo "<div width=\"900\" style=\"background-color:#E8E8E8;text-align:center;padding:20px;\">";
|
||||||
|
|
||||||
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 "<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>";
|
echo "</div>";
|
||||||
|
|
||||||
if ($row['mod_id']==38){
|
|
||||||
echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.<hr>";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div class="constrain" style="max-width:1000px;width:975px;">
|
<div class="constrain" style="max-width:1000px;width:975px;">
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Write the mod bar
|
||||||
echo "\n<div id='mod_bar'>\n";
|
echo "\n<div id='mod_bar'>\n";
|
||||||
|
|
||||||
|
// Download section
|
||||||
echo "<div id='bar_download'>\n";
|
echo "<div id='bar_download'>\n";
|
||||||
echo "<a href='".getDownload($row)."'>Download</a>\n";
|
echo "<a href='".getDownload($row)."'>Download</a>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
|
$like_ext="";
|
||||||
|
|
||||||
if (is_logged_in()==true){
|
if (is_logged_in()==true){
|
||||||
$like_ext="";
|
|
||||||
if (likeMod($id,$_SESSION['user'],$handle,false)==true)
|
if (likeMod($id,$_SESSION['user'],$handle,false)==true)
|
||||||
$like_ext="_high";
|
$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 "<p class='bar_p'><div class=\"like_button\" style=\"background-image:url('images/like{$like_ext}.png');\"><a class=\"big_link\" href=\"viewmod.php?id={$row['mod_id']}&action=like\">{$row['likes']}</a></div></p>";
|
||||||
|
}else{
|
||||||
|
echo "<p class='bar_p'><div class=\"like_button\" style=\"background-image:url('images/like_high.png');\"><span class=\"big_link\">{$row['likes']}</span></div></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<p class='bar_p'>{$row['overview']}</p>";
|
echo "<p class='bar_p'>{$row['overview']}</p>";
|
||||||
|
|
||||||
|
|
||||||
function tabCol($title,$msg){
|
function tabCol($title,$msg){
|
||||||
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Details section
|
||||||
echo "<div class='bar_title'>\n";
|
echo "<div class='bar_title'>\n";
|
||||||
echo "Details\n";
|
echo "Details\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
@ -112,7 +118,7 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
||||||
progressBar($row['progress'],260,$row['progress']."% completed");
|
progressBar($row['progress'],260,$row['progress']."% completed");
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
|
// Control panel section
|
||||||
if ($links!=""){
|
if ($links!=""){
|
||||||
echo "<div class='bar_title'>\n";
|
echo "<div class='bar_title'>\n";
|
||||||
echo "Control Panel\n";
|
echo "Control Panel\n";
|
||||||
|
@ -120,6 +126,8 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
||||||
|
|
||||||
echo "<div class='bar_p'><ul>$links</ul></div>\n";
|
echo "<div class='bar_p'><ul>$links</ul></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Admin section
|
||||||
if (is_member_moderator($_SESSION['user'],$handle)){
|
if (is_member_moderator($_SESSION['user'],$handle)){
|
||||||
echo "<div class='bar_title'>\n";
|
echo "<div class='bar_title'>\n";
|
||||||
echo "Admin Scripts\n";
|
echo "Admin Scripts\n";
|
||||||
|
@ -131,12 +139,12 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
||||||
echo "</ul></div>\n";
|
echo "</ul></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Recommended section
|
||||||
echo "<p>";
|
echo "<p>";
|
||||||
|
|
||||||
include_once "scripts/recommend.php";
|
include_once "scripts/recommend.php";
|
||||||
|
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
|
|
||||||
|
// Reviews section
|
||||||
echo "<div class='bar_title'>\n";
|
echo "<div class='bar_title'>\n";
|
||||||
echo "<a name='reviews'>Reviews</a>\n";
|
echo "<a name='reviews'>Reviews</a>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
@ -145,16 +153,18 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
||||||
include "scripts/show_reviews.php";
|
include "scripts/show_reviews.php";
|
||||||
echo "</p>";
|
echo "</p>";
|
||||||
|
|
||||||
|
// End of the mod bar
|
||||||
echo "</div>\n\n";
|
echo "</div>\n\n";
|
||||||
?>
|
?>
|
||||||
<div id="mod_main">
|
<div id="mod_main">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// Parse the bbcode in the description
|
||||||
|
require_once('scripts/formatcode.php');
|
||||||
|
$parser = new parser;
|
||||||
|
$parsed = $parser->p($row['description'],1);
|
||||||
|
|
||||||
require_once('scripts/formatcode.php');
|
// Write the description
|
||||||
$parser = new parser;
|
|
||||||
$parsed = $parser->p($row['description'],1);
|
|
||||||
|
|
||||||
echo "<p>$parsed</p>";
|
echo "<p>$parsed</p>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -165,5 +175,6 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Write the footer
|
||||||
include "scripts/pagefooter.php";
|
include "scripts/pagefooter.php";
|
||||||
?>
|
?>
|
||||||
|
|