Forum Upload Hack Version 2.0

--------------------------------------------------------------------------------------------------------------------
Installation:
--------------------------------------------------------------------------------------------------------------------
!!! Wie immer gilt, zuerst Backup der Originaldateien sowie der Datenbank machen. !!!

Kopiere ausser der Anleitung alle Dateien aus dem Ordner upload_1.6.4 ins Rootverzeichnis vom PHPKIT und fhre die install.php mit folgendem Pfad aus.
http://www.deinedomain.de/zumrootverzeichnis/include.php?path=install
oder
http://www.deinedomain.de/include.php?path=install

Lsche nach der Installation die install.php
Ich habe die Ordnern uploads/forum und uploads/error vorgegeben, bitte diesen die Rechte 0777 geben.


Jetzt msst Ihr folgende Dateien manuell anpassen.
####################################################################################################################
----------->
Editiere die pkinc/admin/config.php
----------->
SUCHE:
	'offline',

FGE DARUNTER DAS EIN:
	'upload',


SUCHE:
			eval("\$config_do.= \"".pkTpl("config_offline")."\";");
			eval("\$config_do.= \"".pkTpl("config_all")."\";");
			}
		}
	}

FGE DARUNTER DAS EIN:
/**************************************** Upload Anfang ****************************************/
 if ($do=="upload" or $do=="all") {
  if ($ACTION==$_POST['save']) {
  if (substr($_POST['upload_path'], -1)<>'/') $_POST['upload_path']=$_POST['upload_path']."/";
  if (substr($_POST['upload_path_nok'], -1)<>'/') $_POST['upload_path_nok']=$_POST['upload_path_nok']."/";
  if (substr($_POST['upload_path_nok'], 0, 1)=='/') $_POST['upload_path_nok']=substr($_POST['upload_path_nok'], 1);
  if (substr($_POST['upload_path_nok_nok'], 0, 1)=='/') $_POST['upload_path_nok_nok']=substr($_POST['upload_path_nok_nok'], 1);
		$SQL->query("UPDATE `".pkSQLTAB_CONFIG."` SET
			`upload_off`='".addslashes($_POST['upload_off'])."',
			`upload_mail`='".addslashes($_POST['upload_mail'])."',
			`upload_ok`='".addslashes($_POST['upload_ok'])."',
			`upload_path`='".addslashes($_POST['upload_path'])."',
			`upload_path_nok`='".addslashes($_POST['upload_path_nok'])."',
			`upload_max`='".addslashes($_POST['upload_max'])."',
			`upload_max_w`='".addslashes($_POST['upload_max_w'])."',
			`upload_status`='".addslashes($_POST['upload_status'])."',
			`upload_max_breite`='".addslashes($_POST['upload_max_breite'])."',
			`upload_max_hoehe`='".addslashes($_POST['upload_max_hoehe'])."'
			");
   }
  else {

 $uploaddir_size=0;
 $dir='./../'.pkGetConfig('upload_path');
 if (@is_dir($dir)) {
  $a=opendir($dir);
  while ($datei=readdir($a)) {
   if ($datei!='index.php' && $datei!='.' && $datei!='..') $uploaddir_size += @filesize($dir.'/'.$datei);
   }
  $uploaddir_size=FileSizeExt('','B',$uploaddir_size);
  closedir($a);
  }

 $uploaddir_nok=0;
 $dir_nok='./../'.pkGetConfig('upload_path_nok');
 if (@is_dir($dir_nok)) {
  $a_nok=opendir($dir_nok);
  while ($datei_nok=readdir($a_nok)) {
   if ($datei_nok!='index.php' && $datei_nok!='.' && $datei_nok!='..') $uploaddir_nok += @filesize($dir_nok.'/'.$datei_nok);
   }
  $uploaddir_nok=FileSizeExt('','B',$uploaddir_nok);
  closedir($a_nok);
  }

   if (pkGetConfig('upload_off')==1) $uploadoff1='checked';
   else $uploadoff0='checked';

   $upload_path_rights = substr(sprintf("%o",@fileperms('./../'.pkGetConfig('upload_path'))), -4);
   if($upload_path_rights=="0777") eval ("\$upload_path= \"".pkTpl("config_path_upload_ok")."\";");
   else eval ("\$upload_path= \"".pkTpl("config_path_upload_nok")."\";");
   if (!@is_dir('./../'.pkGetConfig('upload_path'))) eval ("\$upload_path_error= \"".pkTpl("config_upload_nok")."\";");

   $upload_path_rights_1 = substr(sprintf("%o",@fileperms('./../'.pkGetConfig('upload_path_nok'))), -4);
   if($upload_path_rights_1=="0777") eval ("\$upload_path_1= \"".pkTpl("config_path_upload_ok_1")."\";");
   else eval ("\$upload_path_1= \"".pkTpl("config_path_upload_nok")."\";");
   if (!@is_dir('./../'.pkGetConfig('upload_path_nok'))) eval ("\$upload_path_error_1= \"".pkTpl("config_upload_nok")."\";");

   if (pkGetConfig('upload_status')=="guest") {$upload_status1=" selected";}
   elseif (pkGetConfig('upload_status')=="user") {$upload_status2=" selected";}
   elseif (pkGetConfig('upload_status')=="member") {$upload_status3=" selected";}
   elseif (pkGetConfig('upload_status')=="mod") {$upload_status4=" selected";}
   elseif (pkGetConfig('upload_status')=="admin") {$upload_status5=" selected";}


    if ($do=='all') {
     eval ("\$config_do.= \"".pkTpl("config_upload")."\";");
     eval ("\$config_do.= \"".pkTpl("config_all")."\";");
     }
    }
   }
/**************************************** Upload Ende   ****************************************/
####################################################################################################################
----------->
Editiere die pkinc/cfg/adminnavigation.php
Unbedingt darauf achten, ob es bereits die Zahl 9983 schon gibt. Wenn ja, bitte im Forum mit dem Inhalt nachfragen.
----------->
SUCHE:
9917=>array(
	'pid'=>9900,
	'value'=>'forum_settings',
	'target'=>pkWINDOWNAME_ADMINFRAME_MAIN,
	'link'=>pkLink('config','','do=forum'),
	'permission'=>''
	),

FGE DIREKT DARUNTER DAS EIN:
9983=>array(
	'pid'=>9900,
	'value'=>'uploader',
	'target'=>pkWINDOWNAME_ADMINFRAME_MAIN,
	'link'=>pkLink('config','','do=upload'),
	'permission'=>''
	),
####################################################################################################################
----------->
Editiere die pkinc/lang/de/admin.php
----------->
SUCHE:
'forum_settings'=>'Foreneinstellungen',

FGE DIREKT DARUNTER DAS EIN:
'uploader'=>'Uploader',
####################################################################################################################
----------->
Editiere das Template pkinc/admintpl/main.htm
----------->
SUCHE:
		<option class="small" value="forum">Foren</option>

FGE DARUNTER DAS EIN:
<!-- Upload -->
		<option class="small" value="upload">Forumuploader</option>
<!-- Upload -->
####################################################################################################################
----------->
Editiere das Template pkinc/admintpl/config_all_links.htm
----------->
SUCHE:
		<a class="small" href="#offline">Offline-Modus</a><br />
		<br />

FGE DARUNTER DAS EIN:
<!-- Upload -->
		<a class="small" href="#upload">Forumuploader</a><br />
<!-- Upload -->
####################################################################################################################
----------->
Editiere die pkinc/public/forumseditpost.php
----------->
SUCHE:
eval("\$option_delete= \"".pkTpl("forum/editpost_option_delete")."\";");

FGE DARUNTER DAS EIN:
/**************************************** Upload Anfang ****************************************/
$site_url_upload=trim(htmlentities(stripslashes(pkGetConfig('site_url'))));
$upload_max_breite_upload=trim(htmlentities(stripslashes(pkGetConfig('upload_max_breite'))));
$upload_max_hoehe_upload=trim(htmlentities(stripslashes(pkGetConfig('upload_max_hoehe'))));
if(pkGetConfig('upload_off')==1 AND getrights(pkGetConfig('upload_status'))) eval ("\$post_datei= \"".pkTpl("forum/newpost_datei")."\";");
/**************************************** Upload Ende   ****************************************/
####################################################################################################################
----------->
Editiere die pkinc/public/forumsnewpost.php
----------->
SUCHE:
			$post_autor=$_POST['post_autor'];
			unset($ACTION);
			}
		}

FGE DARUNTER DAS EIN:
/**************************************** Upload Anfang ****************************************/
$site_url_upload=trim(htmlentities(stripslashes(pkGetConfig('site_url'))));
$upload_max_breite_upload=trim(htmlentities(stripslashes(pkGetConfig('upload_max_breite'))));
$upload_max_hoehe_upload=trim(htmlentities(stripslashes(pkGetConfig('upload_max_hoehe'))));
if(pkGetConfig('upload_off')==1 AND getrights(pkGetConfig('upload_status'))) eval ("\$post_datei= \"".pkTpl("forum/newpost_datei")."\";");
/**************************************** Upload Ende   ****************************************/
####################################################################################################################
----------->
Editiere die pkinc/public.php
----------->
SUCHE:
if(pkGetConfig('site_adview'))
	{
	pkLoadClass($admanage,'admanage');
	$adview=$admanage->get();
	}

FGE DARUNTER DAS EIN:
/**************************************** Upload Anfang ****************************************/
if($pkUPLOAD=='true')
	{
	return;
	}
/**************************************** Upload Ende   ****************************************/
####################################################################################################################
----------->
Editiere das Template pkinc/publictpl/forum/editpost.htm
----------->
SUCHE:
$editpost_option

FGE DARUNTER DAS EIN:
<!-- Upload -->
$post_datei
<!-- Upload -->
####################################################################################################################
----------->
Editiere das Template pkinc/publictpl/forum/newpost.htm
----------->
SUCHE:
		$option_vote
	</table>
	</td>
 </tr>

FGE DARUNTER DAS EIN:
<!-- Upload -->
$post_datei
<!-- Upload -->
####################################################################################################################


Das war es auch schon!!!!


Fr Fragen oder Anregungen:
#############################
www.esa-clan.de
esa@esa-clan.de
Gru//Lucky