Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 12:50 am EST
Geeklog Forums
Upload script don’t work anymore
Status: offline
Sniper12
Forum User
Regular Poster
Registered: 11/25/03
Posts: 81
Location:Denmark
I have been using this script on my page a long time now. I have change to a faster web hotel and it will not work now, I have notes that the php version is 5.* on the new server, and this was 4.* on the old maybe that the problem.
I'm not so good at programming, need some help to figure it out. :pray:
I have used some Danish in the script, to help the users.
If I copy the script code in it says spam, and delete the post.
You can download the file here http://www.sugecrew.dk/billeder/opload/upload.rar
I'm not so good at programming, need some help to figure it out. :pray:
I have used some Danish in the script, to help the users.
If I copy the script code in it says spam, and delete the post.
You can download the file here http://www.sugecrew.dk/billeder/opload/upload.rar
10
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: 1000ideen
Try to disable the plugin spamx and test again. You may install the plugin badbehavior instead.
If I copy the script code in it says spam, and delete the post.
Try to disable the plugin spamx and test again. You may install the plugin badbehavior instead.
What he means was that Spam-X here on geeklog.net caught his attempts to post the script's code. It didn't like the [ img ] tags in it, btw - we're blocking posting of images in the forum here.
Also, to say it again: Bad Behavior is not a replacement for Spam-X! The two complement each other (nicely, I might add).
bye, Dirk
11
12
Quote
Status: offline
Sniper12
Forum User
Regular Poster
Registered: 11/25/03
Posts: 81
Location:Denmark
Dirk is right it is the spam filter here om geeklog.
The script loades and I can select a file, but when I hit upload, It reloads the page. And no upload
// +---------------------------------------------------------------------------+
// | Import 1.0 for Geeklog - The Ultimate Weblog |
// +---------------------------------------------------------------------------+
// | upload.php |
// | |
// | This file is the upload utility for Geeklog. Drop it into your admin |
// | directory -- edit the default download directory -- make sure your |
// | webserver has write access to that directory and upload. |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2002 by the following authors: |
// | |
// | Authors: Tom Willett - tomw@pigstye.net |
// +---------------------------------------------------------------------------+
// | |
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License |
// | as published by the Free Software Foundation; either version 2 |
// | of the License, or (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
//
//
// you will need to edit the path to lib-common.php if you put this file anywhere other than
// the admin directory in a standard install
//
require_once('../lib-common.php');
// Default upload directory
$defdir = "This dir is okay";
$webadresse = "http://www.sugecrew.dk/billeder/opload/";
$img1 = "[ img ]";
$img2 = "[ /img ]";
// Only let Root users access this page
if (!SEC_inGroup('Logged-in Users')) {
// Someone is trying to illegally access this page
COM_errorLog("Nogle har ulovligt prøvet at bruge opload siden. Bruger id: {$_USER['uid']}, Brugernavn: {$_USER['username']}, IP: $REMOTE_ADDR",1);
$display = COM_siteHeader();
$display .= COM_startBlock("Adgang forbudt!!!");
$display .= "Du har ingen adgang til Fil opload siden. Dette forsøg er blevet logget";
$display .= COM_endBlock();
$display .= COM_siteFooter(true);
echo $display;
exit;
}
/*
* Main Function
*/
$msg = "";
if ($import == 'Upload File') {
$buffer='';
if ($impfile == 'none') {
$msg = "FEJL: Ingen fil oploadet";
} else if ($impfile_size == 0) {
$msg = "FEJL: Fil størelse er nul";
} else if (!is_uploaded_file($impfile)) {
$msg = "FEJL: Mulig fil opload angreb";
} else if (!copy($impfile, $directory . $impfile_name)) {
$msg = "FEJL: Kunne ikke kopier fil";
} else {
$msg = "Brug følgene link til at sætte billede ind i forum.<BR><BR>" . $img1 . $webadresse . $impfile_name . $img2;
}
}
$display = COM_siteHeader();
$display .= COM_startBlock("Impotere -- Opload fil til oploade biblotek");
$display .= "<p>Denne side oploader en fil til brug i forumet<BR>NÃ¥r en fil er 1 mdr. gammel vil den blive slettet fra serveren.<p>";
$display .= "<p>$msg</p>";
$display .= "<form method=\"post\" action=\"{$_CONF['site_admin_url']}/upload.php\" enctype=\"multipart/form-data\">";
$display .= "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10000000\">";
$display .= "Fil: <input type=\"file\" name=\"impfile\" size=\"40\"><p>";
$display .= "Opload biblotek (Hvis du ændre noget her kan du ikke oploade filen)<BR><input type=\"text\" name=\"directory\" size=\"40\" value=\"$defdir\"><p>";
$display .= "<p><input type=\"submit\" name=\"import\" value=\"Upload File\"></p>";
$display .= "</form>";
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
The script loades and I can select a file, but when I hit upload, It reloads the page. And no upload
Text Formatted Code
<?php// +---------------------------------------------------------------------------+
// | Import 1.0 for Geeklog - The Ultimate Weblog |
// +---------------------------------------------------------------------------+
// | upload.php |
// | |
// | This file is the upload utility for Geeklog. Drop it into your admin |
// | directory -- edit the default download directory -- make sure your |
// | webserver has write access to that directory and upload. |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2002 by the following authors: |
// | |
// | Authors: Tom Willett - tomw@pigstye.net |
// +---------------------------------------------------------------------------+
// | |
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License |
// | as published by the Free Software Foundation; either version 2 |
// | of the License, or (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
//
//
// you will need to edit the path to lib-common.php if you put this file anywhere other than
// the admin directory in a standard install
//
require_once('../lib-common.php');
// Default upload directory
$defdir = "This dir is okay";
$webadresse = "http://www.sugecrew.dk/billeder/opload/";
$img1 = "[ img ]";
$img2 = "[ /img ]";
// Only let Root users access this page
if (!SEC_inGroup('Logged-in Users')) {
// Someone is trying to illegally access this page
COM_errorLog("Nogle har ulovligt prøvet at bruge opload siden. Bruger id: {$_USER['uid']}, Brugernavn: {$_USER['username']}, IP: $REMOTE_ADDR",1);
$display = COM_siteHeader();
$display .= COM_startBlock("Adgang forbudt!!!");
$display .= "Du har ingen adgang til Fil opload siden. Dette forsøg er blevet logget";
$display .= COM_endBlock();
$display .= COM_siteFooter(true);
echo $display;
exit;
}
/*
* Main Function
*/
$msg = "";
if ($import == 'Upload File') {
$buffer='';
if ($impfile == 'none') {
$msg = "FEJL: Ingen fil oploadet";
} else if ($impfile_size == 0) {
$msg = "FEJL: Fil størelse er nul";
} else if (!is_uploaded_file($impfile)) {
$msg = "FEJL: Mulig fil opload angreb";
} else if (!copy($impfile, $directory . $impfile_name)) {
$msg = "FEJL: Kunne ikke kopier fil";
} else {
$msg = "Brug følgene link til at sætte billede ind i forum.<BR><BR>" . $img1 . $webadresse . $impfile_name . $img2;
}
}
$display = COM_siteHeader();
$display .= COM_startBlock("Impotere -- Opload fil til oploade biblotek");
$display .= "<p>Denne side oploader en fil til brug i forumet<BR>NÃ¥r en fil er 1 mdr. gammel vil den blive slettet fra serveren.<p>";
$display .= "<p>$msg</p>";
$display .= "<form method=\"post\" action=\"{$_CONF['site_admin_url']}/upload.php\" enctype=\"multipart/form-data\">";
$display .= "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10000000\">";
$display .= "Fil: <input type=\"file\" name=\"impfile\" size=\"40\"><p>";
$display .= "Opload biblotek (Hvis du ændre noget her kan du ikke oploade filen)<BR><input type=\"text\" name=\"directory\" size=\"40\" value=\"$defdir\"><p>";
$display .= "<p><input type=\"submit\" name=\"import\" value=\"Upload File\"></p>";
$display .= "</form>";
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
9
8
Quote
Status: offline
Sniper12
Forum User
Regular Poster
Registered: 11/25/03
Posts: 81
Location:Denmark
Please help me, I still trying to get this code to work. I have tried another code and it works fine, but it is not 100% the same and is not made for geeklog.
The code that’s work looks like this.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>eBoxNet Upload Script V1.0 2007</title>
<style type="text/css">
<!--
body {
background-image: url(images/bck.gif);
}
.style1 {color: #FFFFFF}
a:link {
color: #FF6600;
}
a:visited {
color: #FF6600;
}
.style2 {
color: #FF6600;
font-size: 10px;
}
-->
</style></head>
<div id="dHTMLToolTip" style="position: absolute; width:10; height: 10; z-index: 1000; left: 0; top: 0; visibility: visible;"></div>
<body style="PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #000000; PADDING-TOP: 0px;">
<div align="center">
<table cellpadding="0" cellspacing="0" width="596" height="293">
<!-- MSTableType="layout" -->
<tr>
<td width="43" height="64" valign="top">
<a href="http://www.eboxnet.gr/scripts/"><img src="images/main_01.jpg" alt="eBoxNet - Scripts" width="596" height="65" border="0"></a></td>
</tr>
<tr>
<td valign="top" background="images/main_02.jpg" height="141"><form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<div align="center">
<input type="hidden" name="MAX_FILE_SIZE" value="2048000">
File :
<input name="userfile" type="file" />
<br /> <input name="submit" type="submit" value="Upload" />
</div>
</form>
<div align="center">
<?php
if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
copy($_FILES["userfile"]["tmp_name"], "" . $_FILES["userfile"]["name"]);
echo "<p>File uploaded successfully.</p>";
}
?>
</div></td>
</tr>
<tr>
<td valign="top" height="36">
<img border="0" src="images/main_03.gif" width="596" height="36"></td>
</tr>
<tr>
<td valign="top" height="19"><div align="center" class="style1">
<p>Created by <a href="http://www.eboxnet.gr">eBoxNet.gr</a> .This scripts is an Open Source script,you may use it and mod it.</p>
<p>If you found this script usefull pls send a comment to <a href="mailto:info@eboxnet.gr">info@eboxnet.gr</a> </p>
</div></td>
</tr>
<tr>
<td valign="middle" height="32">
<p align="center" class="style2"><a href="http://www.eboxnet.gr">eBoxNet.gr</a> </td>
</tr>
</table>
</div>
</body>
</html>
The code that’s work looks like this.
Text Formatted Code
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>eBoxNet Upload Script V1.0 2007</title>
<style type="text/css">
<!--
body {
background-image: url(images/bck.gif);
}
.style1 {color: #FFFFFF}
a:link {
color: #FF6600;
}
a:visited {
color: #FF6600;
}
.style2 {
color: #FF6600;
font-size: 10px;
}
-->
</style></head>
<div id="dHTMLToolTip" style="position: absolute; width:10; height: 10; z-index: 1000; left: 0; top: 0; visibility: visible;"></div>
<body style="PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #000000; PADDING-TOP: 0px;">
<div align="center">
<table cellpadding="0" cellspacing="0" width="596" height="293">
<!-- MSTableType="layout" -->
<tr>
<td width="43" height="64" valign="top">
<a href="http://www.eboxnet.gr/scripts/"><img src="images/main_01.jpg" alt="eBoxNet - Scripts" width="596" height="65" border="0"></a></td>
</tr>
<tr>
<td valign="top" background="images/main_02.jpg" height="141"><form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<div align="center">
<input type="hidden" name="MAX_FILE_SIZE" value="2048000">
File :
<input name="userfile" type="file" />
<br /> <input name="submit" type="submit" value="Upload" />
</div>
</form>
<div align="center">
<?php
if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
copy($_FILES["userfile"]["tmp_name"], "" . $_FILES["userfile"]["name"]);
echo "<p>File uploaded successfully.</p>";
}
?>
</div></td>
</tr>
<tr>
<td valign="top" height="36">
<img border="0" src="images/main_03.gif" width="596" height="36"></td>
</tr>
<tr>
<td valign="top" height="19"><div align="center" class="style1">
<p>Created by <a href="http://www.eboxnet.gr">eBoxNet.gr</a> .This scripts is an Open Source script,you may use it and mod it.</p>
<p>If you found this script usefull pls send a comment to <a href="mailto:info@eboxnet.gr">info@eboxnet.gr</a> </p>
</div></td>
</tr>
<tr>
<td valign="middle" height="32">
<p align="center" class="style2"><a href="http://www.eboxnet.gr">eBoxNet.gr</a> </td>
</tr>
</table>
</div>
</body>
</html>
11
9
Quote
All times are EST. The time is now 12:50 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content