Corrected some stuff
parent
429eed5cb7
commit
39925850dd
10
3mrelinc.php
10
3mrelinc.php
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
// 3m Release increasing (by Phitherek_)
|
// 3m Release increasing (by Phitherek_)
|
||||||
include "scripts/setup.php";
|
include "scripts/setup.php";
|
||||||
$page_title="3m Release Increasing (by Phitherek_)";
|
|
||||||
require_login();
|
require_login();
|
||||||
$id=$_GET['id'];
|
$id=$_GET['id'];
|
||||||
|
|
||||||
|
@ -9,14 +8,11 @@ if (is_numeric($id)==false){
|
||||||
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>");
|
||||||
}
|
}
|
||||||
|
|
||||||
include "scripts/pageheader.php";
|
$mmmres = mysql_query("SELECT rel FROM mods WHERE mod_id=".$id, $handle) or SQLerror("SQL Error", "Could not find the entry!");
|
||||||
|
|
||||||
$mmmres = mysql_query("SELECT rel FROM 3m_specific WHERE id=".$id, $handle) or SQLerror("SQL Error", "Could not find the entry!");
|
|
||||||
$mmmarr = mysql_fetch_array($mmmres);
|
$mmmarr = mysql_fetch_array($mmmres);
|
||||||
$mmmrel = $mmmarr['rel'];
|
$mmmrel = $mmmarr['3m_rele'];
|
||||||
$mmmrel = $mmmrel + 1;
|
$mmmrel = $mmmrel + 1;
|
||||||
$q = mysql_query("UPDATE 3m_specific SET rel=".$mmmrel." WHERE id=".$id, $handle) or SQLerror("SQL Error", "Could not increase 3m release value!");
|
$q = mysql_query("UPDATE mods SET 3m_rele=".$mmmrel." WHERE mod_id=".$id, $handle) or SQLerror("SQL Error", "Could not increase 3m release value!");
|
||||||
echo("3m Release increased!<br />");
|
|
||||||
|
|
||||||
header("location: viewmod.php?id=$id");
|
header("location: viewmod.php?id=$id");
|
||||||
// End of Phitherek_' s code
|
// End of Phitherek_' s code
|
||||||
|
|
22
addentry.php
22
addentry.php
|
@ -25,13 +25,15 @@ if (is_member_moderator($_SESSION['user'])==true){
|
||||||
<tr>
|
<tr>
|
||||||
<td width="60%">Mod Name:* <input type="text" size="50" name="mod_name" value="<?php echo $name;?>"></td>
|
<td width="60%">Mod Name:* <input type="text" size="50" name="mod_name" value="<?php echo $name;?>"></td>
|
||||||
<!-- 3m release (by Phitherek_) -->
|
<!-- 3m release (by Phitherek_) -->
|
||||||
<td width="20%">Version:* <input type="text" size="30" name="mod_version" value="<?php echo $version;?>"></td>
|
<td width="40%">
|
||||||
<td width="20%">3m Release:* <input type="text" size="30" name="mmmrel" value="<?php echo $mmmrel;?>"></td>
|
<table width="100%"><tr><td>Version:* <input type="text" size="10" name="mod_version" value="<?php echo $version;?>"></td><td>
|
||||||
<!-- End of Phitherek_' s change -->
|
3m Release:* <input type="text" size="10" name="mmmrel" value="<?php echo $mmmrel;?>"></td>
|
||||||
</tr>
|
<!-- End of Phitherek_ s change -->
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
|
||||||
<!--Description-->
|
<!--Description-->
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<p>* Description<Br /><textarea name="mod_desc" cols="105" rows="25">
|
<p>* Description<Br /><textarea name="mod_desc" cols="105" rows="25">
|
||||||
<?php
|
<?php
|
||||||
|
@ -72,9 +74,15 @@ Delete these notes before adding the entry-->
|
||||||
<option value="archive" selected>Archive</option>
|
<option value="archive" selected>Archive</option>
|
||||||
<option value="git">Git</option>
|
<option value="git">Git</option>
|
||||||
</select></td>
|
</select></td>
|
||||||
<!--End of Phitherek_' s code-->
|
<!--End of Phitherek_ s code-->
|
||||||
<td>File URL*: <input type="text" size="50" name="mod_file" value="<?php echo $file;?>"></td>
|
<td>File URL*: <input type="text" size="50" name="mod_file" value="<?php echo $file;?>"></td>
|
||||||
<td>License: <input type="text" size="30" name="mod_lic" value="<?php echo $license;?>"></td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan=2>
|
||||||
|
<br />
|
||||||
|
License: <input type="text" size="60" name="mod_lic" value="<?php echo $license;?>">
|
||||||
|
<br /><br />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!--Depends and Basename-->
|
<!--Depends and Basename-->
|
||||||
|
|
|
@ -5,16 +5,14 @@ $id=$_GET['id'];
|
||||||
$id= mysql_real_escape_string ($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'",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
|
||||||
header("Content-type: text/plain");
|
header("Content-type: text/plain");
|
||||||
$row = mysql_fetch_array($res) or die("Name:\nDepends:\nFile:\nVersion:\n");
|
$row = mysql_fetch_array($res) or die("error");
|
||||||
$mmmres = mysql_query("SELECT * FROM 3m_specific WHERE id=".$row['id']);
|
|
||||||
$mmmarr = mysql_fetch_array($mmmres);
|
|
||||||
|
|
||||||
|
|
||||||
echo "{{$row['basename']}}\n";
|
echo "{{$row['basename']}}\n";
|
||||||
echo "[description]\n";
|
echo "[description]\n";
|
||||||
echo "{$row['desc']}\n";
|
echo "{$row['desc']}\n";
|
||||||
echo "[release]\n";
|
echo "[release]\n";
|
||||||
echo "{$mmmres['rel']}\n";
|
echo "{$row['3m_rele']}\n";
|
||||||
echo "[deps]\n";
|
echo "[deps]\n";
|
||||||
$deps = $row['depend'];
|
$deps = $row['depend'];
|
||||||
$parseddeps = "";
|
$parseddeps = "";
|
||||||
|
@ -30,7 +28,7 @@ for($i=0; $i < strlen($deps); $i++) {
|
||||||
echo "{$parseddeps}\n";
|
echo "{$parseddeps}\n";
|
||||||
echo "[depsend]\n";
|
echo "[depsend]\n";
|
||||||
echo "[repotype]\n";
|
echo "[repotype]\n";
|
||||||
echo "{$mmmres['repotype']}\n";
|
echo "{$row['repotype']}\n";
|
||||||
echo "[repoaddr]\n";
|
echo "[repoaddr]\n";
|
||||||
echo "{$row['file']}\n";
|
echo "{$row['file']}\n";
|
||||||
echo "{end}\n";
|
echo "{end}\n";
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ($version=="")
|
||||||
//3m release (by Phitherek_)
|
//3m release (by Phitherek_)
|
||||||
$mmmrel=$_POST['mmmrel'];
|
$mmmrel=$_POST['mmmrel'];
|
||||||
if ($mmrel=="")
|
if ($mmrel=="")
|
||||||
return 0;
|
$mmrel=1;
|
||||||
//End of Phitherek_' s code
|
//End of Phitherek_' s code
|
||||||
|
|
||||||
$desc=$_POST['mod_desc'];
|
$desc=$_POST['mod_desc'];
|
||||||
|
@ -29,6 +29,7 @@ if ($tags_msc=="")
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
$license=$_POST['mod_lic'];
|
$license=$_POST['mod_lic'];
|
||||||
|
|
||||||
//3m repotype
|
//3m repotype
|
||||||
$mmmrt=$_POST['mmmrt'];
|
$mmmrt=$_POST['mmmrt'];
|
||||||
if($mmmrt=="")
|
if($mmmrt=="")
|
||||||
|
@ -60,15 +61,11 @@ $tags = "$tags_type,$tags_msc,";
|
||||||
if (entry_exists($name,$handle))
|
if (entry_exists($name,$handle))
|
||||||
return 1;
|
return 1;
|
||||||
//Substitute owner with ownerid (by Phitherek_)
|
//Substitute owner with ownerid (by Phitherek_)
|
||||||
mysql_query("INSERT INTO mods (name,version,owner,description,tags,likes,dislikes,license,file,depend,basename,date_released)
|
mysql_query("INSERT INTO mods (name,version,owner,description,tags,likes,dislikes,license,file,depend,basename,date_released,repotype,3m_rele)
|
||||||
VALUES ('$name','$version',$ownerid,'$desc','$tags',0,0,'$license','$file','$depend','$basename','$date')");
|
VALUES ('$name','$version',$ownerid,'$desc','$tags',0,0,'$license','$file','$depend','$basename','$date','$mmmrt','$mmmrel')");
|
||||||
//End of Phitherek_' s change
|
//End of Phitherek_' s change
|
||||||
|
|
||||||
$the_id=mysql_insert_id($handle);
|
$the_id=mysql_insert_id($handle);
|
||||||
|
|
||||||
//3m specific adding (by Phitherek_)
|
|
||||||
mysql_query("INSERT INTO 3m_specific VALUES($the_id,$mmmrel,'$mmmrt')");
|
|
||||||
//End of Phitherek_' s code
|
|
||||||
|
|
||||||
header("location: viewmod.php?id=$the_id");
|
header("location: viewmod.php?id=$the_id");
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue