You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 144 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Auktion 2.0 [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
lunchbox
Corporal
Corporal


Joined: Oct 28, 2003
Posts: 56


PostPosted: Sun Aug 29, 2004 5:49 pm Reply with quoteBack to top

i was wondering if anyone has any idea how to upload other pics then a "JPEG" to this module? here it is if someone can give me some edit tips i would appreciate it...i am hoping it this one.
Code:
?php

/************************************************************************/
/* NUKE-Auktion                                                         */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 ATrösch                                           */
/* http://www.nukemodule.de                                             */
/* http://www.webdesign-troesch.de                                      */
/* ================================                                     */
/*                                                                      */
/************************************************************************/

if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");

$module_name = basename(dirname(__FILE__));
get_lang($module_name);

include("modules/$module_name/nafunction.php");

include("header.php");


$index=1;


opentable();


if (!$gfxfile_name == "") {

$ext = substr($gfxfile_name, (strrpos($gfxfile_name,'.') +  1));

$pos = strpos("gifGIFjpgJPGbmpBMPpngPNG",$ext);

if($pos == false)
 {
  header("Location: index.php");
 }

 move_uploaded_file($_FILES['gfxfile']['tmp_name'],"modules/$module_name/pictures/$gfxfile_name");
}

else
  $gfxfile_name = "nopic.gif";



  $result = $db->sql_query("select gfx, content, nabgcolor from ".$prefix."_auction_config");
  list($gfx,$message,$nabgcolor) = $db->sql_fetchrow($result);

  if ($gfx == 1) {
    echo "<table width=\"100%\">\n"
        ."<td></td><td align=\"right\">\n"
        ."<a href=\"modules.php?name=auktion\">"._NAHOME."</a> | "
        ."<a href=\"modules.php?name=Your_Account\">"._NAREGISTER."</a> | "
        ."<a href=\"modules.php?name=auktion&file=rules\">"._NARULES."</a>&nbsp;&nbsp;</td>"
        ."<tr><td align=\"center\"><img src=\"modules/auktion/images/auktionlogo.gif\" border=\"0\">\n"
        ."</td><td align=\"right\" valign=\"top\">\n"
        ."<script type=\"text/javascript\" src=\"modules/auktion/images/auktion.js\"></script>\n"
        ."</td><tr>\n"
        ."<td colspan=2 align=\"right\"><br>";
  }

  elseif ($gfx == 0) {
    echo "<table width=\"100%\">\n"
        ."<td></td><td align=\"right\">\n"
        ."<a href=\"modules.php?name=auktion\">"._NAHOME."</a> | "
        ."<a href=\"modules.php?name=Your_Account\">"._NAREGISTER."</a> | "
        ."<a href=\"modules.php?name=auktion&file=rules\">"._NARULES."</a>&nbsp;&nbsp;</td>"
        ."<tr><td align=\"center\"><b>"._NAAUCTIONS."</b>\n"
        ."</td><td align=\"right\" valign=\"top\" bgcolor=$bgcolor1>\n"
        ."<b>&middot;</b> <a href=\"modules.php?name=auktion&file=account\">"._NAACCOUNT."</a>"
        ."<b> &middot;</b> <a href=\"modules.php?name=auktion&file=sell\">"._NASELL."</a>"
        ."<b> &middot;</b> <a href=\"modules.php?name=auktion&file=search\">"._NASEARCH."</a>"
        ."<b> &middot;</b> <a href=\"modules.php?name=auktion&file=help\">"._NAHELP."</a> <b>&middot;</b>\n"
        ."</td><tr>\n"
        ."<td colspan=2 align=\"right\"><br>";
  }


  $result = $db->sql_query("select * from ".$prefix."_auction_categories where parentid='0' order by title ASC");
  while (list($cid, $title) = $db->sql_fetchrow($result)) {
    echo "<a href=modules.php?name=auktion&file=catlist&catid=$cid&startpos=0&catnow=$title>$title</a> ";
  }

    echo "</td>"
        ."</td><tr>\n"
        ."<td colspan=2><hr></td><tr>"
        ."</table>";


    $leer = 0;

    if (!is_numeric($startprice) or !is_numeric($buynowprice)) {
     $leer = 1;
     echo "<br><br><center><b>Please Add Price!</b><br></center>";
    }


    if ($titel == "") {
     $leer = 1;
     echo "<br><br><center><b>Please Add Title!</b><br></center>";
    }

    if ($place == "") {
     $leer = 1;
     echo "<center><b>Please Add Location!</b><br></center>";
    }

    if ($buynowprice < $startprice && $buynowprice <> "0.00") {
     $leer = 1;
     echo "<center>Please Add Starting Price!</center>";
    }

    if ($startprice == "")
     $startprice=1;


if ($leer == 0) {

    $desc = stripslashes(FixQuotes($desc));
    $titel = stripslashes(FixQuotes($titel));

    echo "<form action=\"modules.php\" method=\"POST\">"
        ."<input type=\"hidden\" name=\"file\" value=\"newitem\">"
        ."<input type=\"hidden\" name=\"name\" value=\"auktion\">"
        ."<input type=\"hidden\" name=\"seller\" value=\"$seller\">"
        ."<input type=\"hidden\" name=\"titel\" value=\"$titel\">"
        ."<input type=\"hidden\" name=\"catid\" value=\"$catid\">"
        ."<input type=\"hidden\" name=\"startprice\" value=\"$startprice\">"
        ."<input type=\"hidden\" name=\"buynowprice\" value=\"$buynowprice\">"
        ."<input type=\"hidden\" name=\"desc\" value=\"$desc\">"
        ."<input type=\"hidden\" name=\"place\" value=\"$place\">"
        ."<input type=\"hidden\" name=\"gfxfile\" value=\"$gfxfile_name\">"
        ."<input type=\"hidden\" name=\"transfer\" value=\"$transfer\">"
        ."<input type=\"hidden\" name=\"cash\" value=\"$cash\">"
        ."<input type=\"hidden\" name=\"card\" value=\"$cadr\">"
        ."<input type=\"hidden\" name=\"bill\" value=\"$bill\">"
        ."<input type=\"hidden\" name=\"byname\" value=\"$byname\">"
        ."<input type=\"hidden\" name=\"shipinfo\" value=\"$shipinfo\">"
        ."<input type=\"hidden\" name=\"time\" value=\"$time\">"

        ."<b>"._NAITEMNAME.":</b><br>"
        ."$titel<br><br>"
        ."<b>"._NACATEGORIE.":</b><br>";

    $result = $db->sql_query("select * from ".$prefix."_auction_categories where cid='$catid'");
    list($cid, $title, $parentid) = $db->sql_fetchrow($result);
    if ($parentid!=0) $title=getparent($parentid,$title);
    echo "$title<br><br>";


    echo "<b>"._NASTARTPRICE.":</b><br>\n"
        ."$startprice "._NACURR."<br><br>";

if ($buynowprice <> "0.00") {
    echo "<b>"._NABUYITNOW."</b><br>\n"
        ."$buynowprice "._NACURR."<br><br>";
    $buyitnow = 1;
}

    echo "<b>"._NADESC.":</b><br>\n"
        ."$desc<br><br>"
        ."<b>"._NAPICTUREFILE.":</b><br>\n"
        ."<img src=modules/$module_name/pictures/$gfxfile_name><br><br>"
        ."<b>"._NAPAYWAY.":</b><br>\n";

    if ($transfer == on) {
        echo ""._NATRANSFER."<br>";
    }

    if ($cash == on) {
        echo ""._NACASH."<br>";
    }

    if ($card == on) {
        echo ""._NACARD."<br>";
    }

    if ($bill == on) {
        echo ""._NABILL."<br>";
    }

    if ($byname == on) {
        echo ""._NABYNAME."<br>";
    }

    echo "<br><b>"._NASHIPNOTE.":</b><br>"
        ."$shipinfo<br><br>"
        ."<b>"._NAAUCTIONTIME.":</b><br>"
        ."$time "._NADAYS."<br><br>";

    echo "<input type=\"hidden\" name=\"buyitnow\" value=\"$buyitnow\">";
    echo "<input type=\"submit\" value=\""._NANEWITEM."\">"
        ."</form>";

}

else
 echo "<br><br><center><a a href=\"javascript:history.back()\">[Go Back]</a></center>";

# DO´NT REMOVE THIS LINE!!!!!!!

  echo "<p align=\"right\"><a href=\"http://www.nukemodule.de\" target=\"_blank\">Nuke Auction 2.0</a>
      (C) 2003 <a href=\"http://www.webdesign-troesch.de\" target=\"_blank\">A.Trösch</a></p>";


closetable();
include("footer.php");

?>
Find all posts by lunchboxView user's profileSend private message
Syenna
Private
Private


Joined: Aug 27, 2004
Posts: 47


PostPosted: Mon Aug 30, 2004 3:44 am Reply with quoteBack to top

It looks to me like you need to change this line:

Code:
$pos = strpos("gifGIFjpgJPGbmpBMPpngPNG",$ext);


To include the extensions (in both upper and lower case) of other files you want users to be able to upload. For example, if you want them to also have the ability to upload .TXT files, you would change it to:

Code:
$pos = strpos("gifGIFjpgJPGbmpBMPpngPNGtxtTXT",$ext);


Good luck!
Syenna
Find all posts by SyennaView user's profileSend private message
lunchbox
Corporal
Corporal


Joined: Oct 28, 2003
Posts: 56


PostPosted: Mon Aug 30, 2004 6:51 am Reply with quoteBack to top

i think you misunderstood my question...

I can only upload JPEG's when i try GIF's or anything else it does not work correctly and will not upload them...but that code has that right in there..
Find all posts by lunchboxView user's profileSend private message
azism
Captain
Captain


Joined: May 20, 2004
Posts: 317

Location: Tucson, AZ

PostPosted: Fri Sep 03, 2004 5:15 pm Reply with quoteBack to top

If you are getting jpegs to upload, you are doing better than I am. I can't get anything to upload.

_________________
Tom Wills
TI-99/4A On-Line UG Administrator
http://www.ti99ers.org/
Find all posts by azismView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.628 Seconds - 125 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::