-
1 Attachment(s)
[Release] Simple Clan Emblem Upload Script
This is an simple clan emblem upload script.
Things you need to do:
- Edit the config.php
- Place the files in you webpage like htdocs/gunz/upload
- Open the page with this index.php?step=1
You can change the file size limit and the file extensions in the index.php
Note: If you load the page just with index.php without the ?step=1 the page will be blank...
This page is tested and works fine for me.
-
1 Attachment(s)
Re: [Release] Simple Clan Emblem Upload Script
New Version.
-New
Fixed for some people that doesnt have php headers enabled.
Uses clan as an image storage folder
Credits to Rotana and me
Enjoy.
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
godofthestaf
Its probelly an php problem. Its works fine for me
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
why do u have a submit botton. Just Put userName , Password , Clan Name , Upload and done. It would be better but Im Just giveing you idea's
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
eh, i have errors.
Code:
Warning: mssql_query() [function.mssql-query]: message: Login failed for user ''. The user is not associated with a trusted SQL Server connection. (severity 14) in C:\AppServ\www\upload\index.php on line 42
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\upload\index.php on line 42
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\upload\index.php on line 42
Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in C:\AppServ\www\upload\index.php on line 43
The user thing is blank since I use Windows Auth. But it still say that the "blank" is not trusted with connection D:
And lol, it blocks sql-injection (was messing aroung with the address bar and found out lol)
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
godofthestaf
I get the same thing. I have no idea why it didnt work for me. I did everything right in config.php.
-
Re: [Release] Simple Clan Emblem Upload Script
Well i get a blank page whit a black line >..> but i did everything good to
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
WGFreak
I get the same thing. I have no idea why it didnt work for me. I did everything right in config.php.
This is an error in your php.ini and not in the webpage,
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
Rotana
This is an error in your php.ini and not in the webpage,
I've got the latest php.ini. Whats wrong with that?
-
Re: [Release] Simple Clan Emblem Upload Script
WgFreak can u send ur php.ini mine kinda sucks i got the oldest one
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
WGFreak
I've got the latest php.ini. Whats wrong with that?
I need to check that.
I have tested this webpage in Xampp and wamp works fine in both.
-
Re: [Release] Simple Clan Emblem Upload Script
Maybe thats why it dosnt work for me i use appserv
-
I found out how to fix it. Change all the <? to <?php.
-
Re: [Release] Simple Clan Emblem Upload Script
and where excatly do whe put <php?
-
Re: [Release] Simple Clan Emblem Upload Script
WGFreak That doesn't really matter Just Enable Short Open tags : ) and if its or that wouldn't matter.
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
Antv912
WGFreak That doesn't really matter Just Enable Short Open tags : ) and if its
or
that wouldn't matter.
yes it does. Some people's script is not working because of that.
-
Re: [Release] Simple Clan Emblem Upload Script
maybe you should edit your php.ini to allow short open tags .
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
Hahahaha. Maybe It's Cause You Didnt Do. index.php?step=1
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
sexy fire slash
Hahahaha. Maybe It's Cause You Didnt Do. index.php?step=1
who??
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
WGFreak
I get the same thing. I have no idea why it didnt work for me. I did everything right in config.php.
For Fix
In index.php:
Code:
<link href="default.css" rel="stylesheet" type="text/css" />
<div align="center">
<br />
<br />
<hr />
<?
include ("config.php");
include ("sec.php");
$conn = @mssql_connect($DBHost, $DBUser, $DBPass);
@mssql_select_db($DB);
if (isset($_GET['step'])) {
$argv = explode('-',$_GET['step']);
settype($argv,'array');
$_GET['step'] = @$argv[0];
$_GET['url'] = @$argv[1];
$_GET['do'] = @$argv[2];
$_GET['mess'] = @$argv[3];
}
$step = !isset($_GET['step']) ? home : $_GET['step'] ;
if ($step == '1') { echo'
<FORM METHOD=POST ACTION="?emblem=index&step=2">
<p>Enter your user ID:
<input name="user" type="textfield" /> <BR />
Enter your password:
<input name="pass" type="textfield" />
</p>
<p><br />
<input type="submit" value="submit" />
</p>
</form> ';
} if ($step == '2') {
$user1 = anti_injection($_POST['user']);
$pass1 = anti_injection($_POST['pass']);
if (valida(Array($user1,$pass1)) == TRUE)
{
$query = mssql_query("SELECT AID From Login Where UserID = '$user1' AND Password = '$pass1' ");
while($r = mssql_fetch_array($query)){
if (mssql_num_rows($query) == 1){
$query2 = mssql_query("
SELECT Login.UserID, Login.Password, ClanMember.Grade, Clan.EmblemUrl, Clan.Name, Clan.CLID
FROM ClanMember INNER JOIN
Clan ON ClanMember.CLID = Clan.CLID INNER JOIN
Login INNER JOIN
Character ON Login.AID = Character.AID ON ClanMember.CID = Character.CID Where Login.UserID = '$user1' and Login.Password = '$pass1' and ClanMember.Grade = '1' ");
if (mssql_num_rows($query2) >= '1'){
echo '<form enctype="multipart/form-data" action="?emblem=index&step=done" method="POST">
<p>Please choose a file:
<input name="uploaded" type="file" />
</p>
<p><br />
<input type="submit" value="Upload" />
</p><select name="clan">'
;
for($i='';$i < @mssql_num_rows($query2);++$i){
$row = @mssql_fetch_row($query2);
$ClanName = $row[4];
echo '<option value="'.$row[4].'">';echo $row[4];echo'</option>' ;
}echo'</select></form>';
}}else { echo " ERROR GEEN CLAN ";} }
}
;
}
;
if ($step == 'done') {
$emblem = $_POST['uploaded'] ;
$CLID = $_POST['clan'];
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if (!($_FILES['uploaded']['size'] > '9500'))
{
//echo "Your file is too large.<br>";
$ok=1;
if(($_FILES['uploaded']['type'] == "image/jpeg"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
if(($_FILES['uploaded']['type'] == "image/GIF"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
if(($_FILES['uploaded']['type'] == "image/PNG"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
}
else { $ok=0;}
//
if ($ok==0)
{
echo "Sorry your file was not uploaded<br />";
echo "Please check the file size or file type";
}
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ".basename( $_FILES['uploadedfile']['name']). " has been uploaded<br />";
echo "You may close this window now";
mssql_query ("UPDATE Clan SET EmblemChecksum = EmblemChecksum + 1 WHERE Name = '$CLID'");
mssql_query ("UPDATE Clan SET EmblemUrl = 'upload/".$target."' WHERE Name = '$CLID'");
}
else
{
echo "Sorry, there was a problem uploading your file.";
}}
};
?>
</div>
<hr />
change <? to <?php
for me work xD
But in Step 2 Give me:
Fatal error: Call to undefined function anti_injection() in C:\wamp\www\GunzWeb\emblem\index.php on line 37
lol
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
mitor
For Fix
In index.php:
Code:
<link href="default.css" rel="stylesheet" type="text/css" />
<div align="center">
<br />
<br />
<hr />
<?
include ("config.php");
include ("sec.php");
$conn = @mssql_connect($DBHost, $DBUser, $DBPass);
@mssql_select_db($DB);
if (isset($_GET['step'])) {
$argv = explode('-',$_GET['step']);
settype($argv,'array');
$_GET['step'] = @$argv[0];
$_GET['url'] = @$argv[1];
$_GET['do'] = @$argv[2];
$_GET['mess'] = @$argv[3];
}
$step = !isset($_GET['step']) ? home : $_GET['step'] ;
if ($step == '1') { echo'
<FORM METHOD=POST ACTION="?emblem=index&step=2">
<p>Enter your user ID:
<input name="user" type="textfield" /> <BR />
Enter your password:
<input name="pass" type="textfield" />
</p>
<p><br />
<input type="submit" value="submit" />
</p>
</form> ';
} if ($step == '2') {
$user1 = anti_injection($_POST['user']);
$pass1 = anti_injection($_POST['pass']);
if (valida(Array($user1,$pass1)) == TRUE)
{
$query = mssql_query("SELECT AID From Login Where UserID = '$user1' AND Password = '$pass1' ");
while($r = mssql_fetch_array($query)){
if (mssql_num_rows($query) == 1){
$query2 = mssql_query("
SELECT Login.UserID, Login.Password, ClanMember.Grade, Clan.EmblemUrl, Clan.Name, Clan.CLID
FROM ClanMember INNER JOIN
Clan ON ClanMember.CLID = Clan.CLID INNER JOIN
Login INNER JOIN
Character ON Login.AID = Character.AID ON ClanMember.CID = Character.CID Where Login.UserID = '$user1' and Login.Password = '$pass1' and ClanMember.Grade = '1' ");
if (mssql_num_rows($query2) >= '1'){
echo '<form enctype="multipart/form-data" action="?emblem=index&step=done" method="POST">
<p>Please choose a file:
<input name="uploaded" type="file" />
</p>
<p><br />
<input type="submit" value="Upload" />
</p><select name="clan">'
;
for($i='';$i < @mssql_num_rows($query2);++$i){
$row = @mssql_fetch_row($query2);
$ClanName = $row[4];
echo '<option value="'.$row[4].'">';echo $row[4];echo'</option>' ;
}echo'</select></form>';
}}else { echo " ERROR GEEN CLAN ";} }
}
;
}
;
if ($step == 'done') {
$emblem = $_POST['uploaded'] ;
$CLID = $_POST['clan'];
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if (!($_FILES['uploaded']['size'] > '9500'))
{
//echo "Your file is too large.<br>";
$ok=1;
if(($_FILES['uploaded']['type'] == "image/jpeg"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
if(($_FILES['uploaded']['type'] == "image/GIF"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
if(($_FILES['uploaded']['type'] == "image/PNG"))
{
$ok=1;
//echo "Wrong file type.<br>";
}
}
else { $ok=0;}
//
if ($ok==0)
{
echo "Sorry your file was not uploaded<br />";
echo "Please check the file size or file type";
}
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ".basename( $_FILES['uploadedfile']['name']). " has been uploaded<br />";
echo "You may close this window now";
mssql_query ("UPDATE Clan SET EmblemChecksum = EmblemChecksum + 1 WHERE Name = '$CLID'");
mssql_query ("UPDATE Clan SET EmblemUrl = 'upload/".$target."' WHERE Name = '$CLID'");
}
else
{
echo "Sorry, there was a problem uploading your file.";
}}
};
?>
</div>
<hr />
change <? to <?php
for me work xD
But in Step 2 Give me:
Fatal error: Call to undefined function anti_injection() in C:\wamp\www\GunzWeb\emblem\index.php on line 37
lol
DO the same on sec.php. Change <? to <?php
-
Re: [Release] Simple Clan Emblem Upload Script
LMFAO!
i tested and came up with ":: You have attempt to SQL inject. Log saved and sended to the webmaster ::
error"
EDIT: ok got it working for page 1 but page 2 gives nothing but 2 links across the page
-
Re: [Release] Simple Clan Emblem Upload Script
-
Re: [Release] Simple Clan Emblem Upload Script
That's Plain and simple you don't have a Clan or your not the Clan Leader ..
-
Re: [Release] Simple Clan Emblem Upload Script
But that happens when I go to the page, not when entering data
PS: This well-alike?
PS2: Sorry for my bad English XD
-
Re: [Release] Simple Clan Emblem Upload Script
Quote:
Originally Posted by
darkxl
But that happens when I go to the page, not when entering data
PS: This well-alike?
PS2: Sorry for my bad English XD
When you go into the page. You will need to login, then u will be able to upload emblem for your own clan.
-
Re: [Release] Simple Clan Emblem Upload Script
can I ask 1 thing? 4 works perfectly and uploads the images the problem is: how to see it in game
-
Re: [Release] Simple Clan Emblem Upload Script
hi,i've got the same problem, i got upload to work, it said uploaded sucessfuly, but then i see nothing in game.
-
Re: [Release] Simple Clan Emblem Upload Script
This is an older version of mine page, working on a new one, with easier to use options and install
-
Re: [Release] Simple Clan Emblem Upload Script
o_O? so when could i get this
-
Re: [Release] Simple Clan Emblem Upload Script
Appears so how these two lines
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------