Location: PHPKode > projects > TPEngine > tpengine-1.87beta/fileupload.php
<?php
/* $Id: register.php,v 0.9 drscream Exp $ */
/*
          TPEngine - PHP/MySQL Protocol System
        ==============================================
            (c) 2005 by
               Thomas Merkel      <hide@address.com>
               David Hoess	  <hide@address.com>
	       Uwe Schiber	  <hide@address.com>

          download the latest version:
            http://tpengine.sourceforge.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.

        ==============================================

*/

include "./inc/header.inc.php";

	$Tupload = new Template("templates/" . $style['styletemplate'] . "/upload.html");
	$navpath .= "User Upload &raquo; Eingabe";

	$boardid = $HTTP_GET_VARS['boardid'];
	$saveid = $HTTP_GET_VARS['save'];
 	// if($saveid != 1){
 	// $dataup = tp_query("SELECT * from ".$pref."upload_tmp");
 	// while($xdataup = mysql_fetch_object($dataup)){
           // $tdataup[$xdataup->board_id] = '<a href="'.$config[board_baseurl].'/upload/'.$xdataup->filename.'">'.$xdataup->filename.'</a>';
      	// }
 	// }
 	// else {

	// $tmpdataup = tp_query("SELECT * from ".$pref."thread_tmp, ".$pref."board WHERE ".$pref."board.pid = ".$pref."thread_tmp.pid and ".$pref."board.boardname = ".$pref."thread_tmp.bname");
	//$tmpdataup = tp_query("SELECT * from ".$pref."thread_tmp");
	// while($xtmpdataup = mysql_fetch_object($tmpdataup)){
          // $tdataup[$xtmpdataup->boardid] = '<a href="'.$config[board_baseurl].'/upload/'.$xtmpdataup->upload.'">'.$xtmpdataup->upload.'</a>';
     	// }
	// }
		if($saveid == 1){
			$tmpdataup = tp_query("SELECT * from ".$pref."thread_tmp, ".$pref."board WHERE ".$pref."board.pid = ".$pref."thread_tmp.pid and ".$pref."board.boardname = ".$pref."thread_tmp.bname");
			//$tmpdataup = tp_query("SELECT * from ".$pref."thread_tmp");
			while($xtmpdataup = mysql_fetch_object($tmpdataup)){
          		$tdataup[$xtmpdataup->boardid] = substr($xtmpdataup->upload, 11);
     		}
		}
		$dataup = tp_query("SELECT * from ".$pref."upload_tmp WHERE board_id = $boardid");
		if(mysql_num_rows($dataup) > 0){
			while($xdataup = mysql_fetch_object($dataup)){
				$tdataup[$boardid] = '<a href="'.$config[board_baseurl].'/upload/'.$xdataup->filename.'" value="'.$xdataup->filename.'" name="xdataup">'.substr($xdataup->filename, 11).'</a>';
			}
		}
	
	
	eval($Tupload->GetTemplate());
?>
Return current item: TPEngine