Formular zum post umwandeln mit Tabs

ok jetzt gehts, allerdings öffnet sich nun das gesamte fenster der edit_desc.php ich möchte aber, dass er nur den Creditsteil also $download->data[dl_copyright] öffnet
habe dies auch mit dem $download[id] erstezt aber trotzdem erscheint die komplette edit_desc.php

Wie komme ich das hin das nur der kleine Teil angezeigt wird?
 
ok danke euch für eure Hilfe, ich werde mich mal dran versuchen eine neue Datei zu erstellen und die dann dort mit einbinden zu lassen

sollte ich weitere Probleme haben melde ich mich hier wieder
 
Hallo
Ich habe nochmal eine frage ;)
Ich habe mir jetzt die php genommen die alle im Formular angebenden Daten als Post speichert und diese umbenannt.
Diese soll jetzt mit dem Code von oben aufgerufen werden also so:
PHP:
if(!empty($data['copyright'])) {
?><tr>
    <td class='tbl2' align='center'>
<a href='javascript:window.open("credits.php?id=<?php echo $download->data['dl_copyright']; ?>", "Neuer Titel", "width=500,height=500")'>Credits</a>
</td>
</tr>
<?php
}

Wenn ich jetzt aber im Post auf Credits klicke sehe ich eine leere Site mit folgendem Link:
Code:
http://meineSeite.de/Unterordner/credits.php?id=

Also vermute ich mal, dass der credits.php keine id zugeordnet wird.

Hier habe ich mal den Code zur credits.php:
PHP:
<?php
if(!defined('IN_FUSION')) {
	die;
}
if(!empty($pdp->settings['theme'])) {
	include_once(INFUSIONS.'pro_download_panel/themes/'
		.$pdp->settings['theme'].'/theme.php');
}


if(!function_exists('pdp_render_cats')) {
function pdp_render_cats($catid, $in_down, &$path, &$cats)
{
	global $locale;

	echo '<hr />';

	// path
	$level = 0;
	$bullet = "&raquo";
	foreach($path as $data) {
		if($data['id']==$catid && !$in_down) {
			echo str_repeat("&nbsp;", $level*4).$bullet
				." <b>".$data['name']."</b><br />\n";
		} else {
			echo str_repeat("&nbsp;", $level*4).$bullet
				." <a href='download.php?catid=".$data['id']."'>"
					.$data['name']."</a><br />\n";
		}
		++$level;
	}

	// child cats
	foreach($cats as $id => $data) {
		$more = array();
		if($data['cnt_downs']) {
			$more[] = $data['cnt_downs']." ".$locale['pdp_downloads'];
		}
		if($data['cnt_cats']) {
			$more[] = $data['cnt_cats']." ".$locale['PDP222'];
		}

		echo str_repeat("&nbsp;", $level*4).$bullet
			." <a href='download.php?catid=$id'>".$data['name']."</a>";
		if(count($more)) {
			echo " (".implode(" - ", $more).")";
		}
		echo "<br />\n";
	}
}
}

if(!function_exists('pdp_render_downs')) {
function pdp_render_downs(&$downs, $rowstart, $per_page, $count, $link)
{
	global $locale;

	foreach($downs as $data) {
		if($data['is_new']) {
			$new = " <img src='icons/new.gif'"
				." alt='".$locale['pdp_new']."' />";
		} else {
			$new = "";
		}
		echo "<hr>
<table border='0' width='100%'>
<tr>
	<td width='1%'><img src='icons/project.gif' alt='' /></td>
	<td><b><a href='".$data['href']."'>".$data['name']."</a></b>$new<br />"
		."<span class='small2'>"
			.($data['user_id']
				? $locale['PDP214']." <a href='profile.php?id="
					.$data['user_id']."'>"
					.$data['user_name']."</a> "
				: "")
			.showdate("shortdate", $data['mtime'])."</span>"
	."</td>
	<td align='right' style='white-space:nowrap;'>"
		.$locale['pdp_downloads'].": ".$data['downloads']."<br />"
			.$locale['PDP021'].": ".$data['comments']."</td>
</tr>
<tr>
	<td colspan='3'>".$data['desc']."</td>
</tr>
</table>";
	}

	if($count > $per_page) {
		echo '
<p>
<div style="text-align:center;">'
	.makePageNav($rowstart, $per_page, $count, 3, $link).'
</div>';
	}
}
}



if(!function_exists('pdp_render_download')) {
function pdp_render_download($id, $data, $links, $files, $images, $old_data)
{
	global $locale, $pdp;

	$down_link = '';
	if(!$data['can_download']) {
		;
	} elseif(!empty($old_data['down']) || !empty($old_data['link_extern'])){
		$down_link = array(
			'did'	=> $id,
			'file'	=> 0,
		);
	} elseif(count($files)) {
		$latest_download = array_shift($files);
		$down_link = array(
			'did'	=> $id,
			'file'	=> $latest_download['id'],
		);
		$old_ver = $latest_download['ver'];
		$old_size = $latest_download['size'];
		array_unshift($files, $latest_download);
	}

	if(is_array($down_link)) {
		$down_link = '
<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="submit" class="button" value="'.$locale['PDP201'].'" />
</form>';
	} else {
		$down_link = parseubb($pdp->settings['download_restricted']);
		if(FUSION_VERSION!='FF') {
			$down_link = nl2br($down_link);
		}
	}

	if(!empty($data['pic'])) {
		$pic = $data['pic'];
		$pic_id = 0;
	} elseif(count($images)) {
		$first_pic = $images[0];
		$pic = $first_pic['url'];
		$pic_id = $first_pic['id'];
	} else {
		$pic = "";
	}

	echo "<p><font size='+1'><b>".$data['name']."</b></font>\n";
	echo "<hr />

<table border='0' cellspacing='2' width='100%' cellpadding='0'>
<tr>
	<td valign='top' colspan='2'>".$data['desc']."</td>
	<td width='150' valign='top' rowspan='2'>
	<table class='tbl-border' cellspacing='1' width='100%'>";
// version
if(!empty($old_data['version'])) {
	echo "<tr><td class='tbl2' align='center'>".$locale['PDP018']
		.":<br />".$old_data['version']."</td>";
}
// homepage
if(!empty($data['homepage'])) {
	echo "<tr><td class='tbl2' align='center'><a href='".$data['homepage']."'"
		." target='_blank'>".$locale['PDP020']."</a></td>";
}
// screenshot
if(!empty($pic)) {
	echo "<tr>
	<td align='center' class='tbl2'>"
		."<a href='image.php?did=".$id."&amp;pic_id=$pic_id'>"
			.$locale['PDP028']."</a></td>
</tr>";
}
// download count
echo "<tr>
	<td align='center' class='tbl2'>".$locale['pdp_downloads'].":<br />"
		.pdpCore::format_number($data['count'])."</td>
</tr>";
// FIXME TODO
if(!empty($old_data['size'])) {
	echo "<tr><td align='center' class='tbl2'>"
		.$locale['PDP029'].":<br />".$old_data['size']."</td></tr>";
}
if(!empty($data['license'])) {
	echo "<tr>
	<td align='center' class='tbl2'>".$locale['pdp_license'].': '
		.$data['license']."</td>
</tr>";
}
// who posted and when.
echo "<tr><td align='center' class='tbl2'>"
	.($data['user_id']
		?  "<a href='profile.php?id=".$data['user_id']."'>"
			.$data['user_name']."</a><br />"
		: "")
	.showdate("shortdate", $data['mtime'])."</td>
</tr>\n";
if(!empty($data['copyright'])) {
	echo "<tr>
	<td class='tbl2' align='center'>".$data['copyright']."</td>
</tr>\n";
}
if($data['allow_notify']) {
if($data['can_subscribe']) {
	echo "<tr>
	<td class='tbl2' align='center'>".($data['is_subscribing']
		? "<a href='include/do_did.php?did=".$id."&amp;subscibe=0'>".$locale['PDP060']."</a>"
		: "<a href='include/do_did.php?did=".$id."&amp;subscibe=1'>".$locale['PDP059']."</a>")
		."</td>
</tr>\n";
}
}
echo "</table></td>
</tr>
<tr>
	<td align='center' valign='bottom'>"
		.$down_link."
	</td>
</tr>
</table>
<hr />\n";


	// report broken downloads
	echo "<div align='right'>";
	if(iPDP_BROKEN) {
		echo "[ <a href='broken.php?did=".$id."'>".$locale['PDP024']
			."</a> ]<br />";
	}
	// edit link
	if(count($links)) {
		echo "<b>".$locale['pdp_edit'].":</b> [ "
			.implode(" | ", $links)." ]";
	}

	echo "</div>\n";


	// files
	if(count($files)) {
		echo '<strong>'.$locale['PDP200'].":</strong><ul>\n";
	}
	foreach($files as $row) {
		echo "<li>"
			.showdate("shortdate", $row['timestamp'])
			." - <b>".$row['ver']." - </b>";
		if($data['can_download']) {
			echo " <a href='file.php?did=".$id
				."&amp;file_id=".$row['id']."'"
				." title='".$row['url']."'>"
				.trimlink($row['url'], 40)."</a>";
		} else {
			echo trimlink($row['url'], 40);
		}
		echo " (<span class='small2'>".$row['size']." - "
				.$row['desc'].")</span>"
			."</li>\n";
	}
	if(count($files)) {
		echo "</ul>\n";
	}
}
}


function pdp_menu()
{
	global $locale, $pdp, $userdata;

	$user_links = array();
	$admin_links = array();

	$user_links[] = "<a href='download.php'>".$locale['PDP037']."</a>";
	$user_links[] = "<a href='download.php?catid=0'>"
		.$locale['PDP820']."</a>";
	$user_links[] = "<a href='search.php'>".$locale['PDP040']."</a>";
	if(iMEMBER || iPDP_ADMIN || iPDP_MOD)
	{
		if(ff_db_count('(*)', DB_PDP_CATS,
			groupaccess('cat_upload_access')))
		{
				$user_links[] = "<a href='edit_desc.php'>"
					.$locale['PDP038']."</a>";
		}
		if(ff_db_count('(*)', DB_PDP_DOWNLOADS,
			"user_id='".$userdata['user_id']."'")
			|| ff_db_count('(*)', DB_PDP_NOTIFY,
				"user_id='".$userdata['user_id']."'"))
		{
			$user_links[] = "<a href='profile.php"
				."?id=".$userdata['user_id']."'>"
				.$locale['PDP160']."</a>";
		}
	}

	if(iPDP_MOD) {
		$admin_links[] = '<a href="mod.php">'.$locale['pdp_moderator'].'</a>';
	}
	if(iPDP_ADMIN) {
		$admin_links[] = '<a href="admin/admin.php">'.$locale['PDP016'].'</a>';
	}
	$admin_links[] = '<a href="copyright.php">'.$locale['PDP039'].'</a>';

	pdp_render_menu($user_links, $admin_links);
}



if(!function_exists('pdp_render_menu')) {
function pdp_render_menu($user_links, $admin_links)
{
	global $locale, $stext;

	if(isset($_GET['stext'])) {
		$stext = stripinput($_GET['stext']);
	} else {
		$stext = '';
	}

	echo '
<div style="float:left; padding-right:5px;">'.implode(' | ', $user_links).'</div>
<div style="float:right; padding-left:5px;">'.implode(' | ', $admin_links).'</div>
<div style="clear:both;"></div>

<form action="search.php" method="get">
<input type="text" size="20" maxlength="30" name="stext" class="textbox" value="'.$stext.'" />
<input type="submit" value="'.$locale['PDP040'].'" class="button" />
</form>';
}
}



?>

Frage ist also, wie ich das Problem behoben bekomme
 
Die credits.php kann nicht das Problem sein, da das Problem doch ist, dass dieser Datei keine Parameter übergeben werden. Du solltest dir also mal die Datei ansehen, in der diese Seite aufgerufen wird:
PHP:
<?php if(!empty($data['copyright'])): ?>
<tr>
  <td class="tbl2" align="center">
    <a href="javascript:window.open('credits.php?id=<?php echo $download->data['dl_copyright'] ?>','Neuer Titel','width=500,height=500')">Credits</a>
  </td>
</tr>
<?php endif; ?>
 
Die credits.php habe ich von der php Datei kopiert, die das (wie ich vermute) Formular zum Post macht.
Dort wollte ich dann alles bis auf das copyright raus löschen. womit ich dann erreichen wollte, das eine neue Seite entsteht, die nur die Credits bzw das Copyright anzeigt.

Ausserdem verstehe ich nicht ganz, was du mit deinem Beitrag meinst.

Ich denke aber, du hast mich auch nicht richtig verstanden.

Bedanke mich weiterhin für deine Hilfe
 
Code:
http://meineSeite.de/Unterordner/credits.php?id=
                                 credits.php?id=<?php echo $download->data['dl_copyright'] ?>
Fällt dir was auf?
 
Ja das ist mir auch schon aufegefallen, allerdings weiß ich nicht, was an der $download->data[dl_copyright] falsch sein soll

Darum erlaube ich mir mal diese Stelle hier zu posten:

PHP:
<p>
<label for="copyright">'.$locale['pdp_copyright'].':</label><br />
<textarea rows="15" cols="75" class="textbox" name="copyright" id="copyright">'
	.$download->data['dl_copyright'].'</textarea><br />
</p>

Dann habe ich noch folgenden Eintrag:
PHP:
$download->data['dl_copyright'] = stripinput($_POST['copyright']);

Und auch noch das ;):
PHP:
dl_copyright='".$download->data['dl_copyright']."',

Wo steckt da der Fehler****

Wahrscheinlich kann mnan ohne zusammnhang nix mit den angaben anfangen darum poste ich hier mal die komplette php:
PHP:
<?php

require_once('include/common.php');
if(!iMEMBER) {
	fallback('download.php');
}
if($download->id && !$download->can_edit) {
	$download->fallback_download();
}
require_once('include/edit.php');


$errors = array();



/****************************************************************************
 * ACTION
 */
if(isset($_POST['save'])) {
	$href = FUSION_SELF;
	if($download->id) {
		$href .= '?did='.$download->id;
	}

	$last_cat = $download->data['cat_id'];
	$download->data['cat_id'] = intval($_POST['cat']);
	if(!$download->data['cat_id']) {
		$errors[] = $locale['pdp_errors']['no_cat'];
	} else {
		$res = dbquery("SELECT cat_upload_access"
			." FROM ".DB_PDP_CATS.""
			." WHERE cat_id=".$download->data['cat_id']);
		if(!dbrows($res)) {
			$row = dbarray($res);
			if(!checkgroup($row['cat_upload_access'])) {
				$errors[] = $locale['pdp_errors']['no_cat'];
			}
		}
	}

	$download->data['dl_name'] = trim(stripinput($_POST['name']));
	if(empty($download->data['dl_name'])) {
		$errors[] = $locale['pdp_errors']['no_name'];
	}
	$download->data['copyright'] = trim(stripinput($_POST['copyright']));
	if(empty($download->data['copyright'])) {
		$errors[] = $locale['pdp_errors']['no_credit'];
	}
		$download->data['original_link'] = trim(stripinput($_POST['original_link']));
	if(empty($download->data['original_link'])) {
		$errors[] = $locale['pdp_errors']['no_origi'];
	}
	
	$download->data['dl_homepage'] = stripinput($_POST['homepage']);
	$download->data['dl_desc'] = stripinput($_POST['desc']);
	$download->data['dl_abstract'] = stripinput($_POST['abstract']);
	$download->data['dl_copyright'] = stripinput($_POST['copyright']);
	$download->data['license_id'] = stripinput($_POST['license_id']);
	$download->data['lizenz_okay'] = (isset($_POST['lizenz_okay']) ? 'Y' : 'N');
	$download->data['lizenz_packet'] = (isset($_POST['lizenz_packet']) ? 'Y' : 'N');
	$download->data['original_link'] = stripinput($_POST['original_link']);
	

	$now = time();

	if(count($errors)==0) {
		if(!$download->id) {
			$ok = dbquery("INSERT INTO ".DB_PDP_DOWNLOADS."
				SET
				dl_count='0',
				user_id='".$userdata['user_id']."',
				dl_ctime='".$now."',
				dl_mtime='".$now."',
				dl_desc='',
				max_pics='".$pdp->settings['default_max_pics']."'");
			$download->id = mysql_insert_id();

			$download->set_status(PDP_PRO_NEW);
		} else {
			$download->set_status(PDP_PRO_OFF);
		}

		$ok = dbquery("UPDATE ".DB_PDP_DOWNLOADS."
			SET
			cat_id='".$download->data['cat_id']."',
			dl_name='".$download->data['dl_name']."',
			dl_desc='".$download->data['dl_desc']."',
			dl_abstract='".$download->data['dl_abstract']."',
			dl_copyright='".$download->data['dl_copyright']."',
			license_id='".$download->data['license_id']."',
			lizenz_okay='".$download->data['lizenz_okay']."',
			lizenz_packet='".$download->data['lizenz_packet']."',
			dl_homepage='".$download->data['dl_homepage']."'
			WHERE download_id='".$download->id."'");

		$download->log_event($download->status==PDP_PRO_NEW
			? PDP_EV_NEW : PDP_EV_DESC, 0);

		// update cat downloads
		if($last_cat != $download->data['cat_id']) {
			pdp_update_cat_downloads($last_cat);
			pdp_update_cat_downloads($download->data['cat_id']);
		}

		if($ok) {
			if($download->status==PDP_PRO_NEW) {
				fallback('edit_files.php?did='.$download->id);
			}
			fallback(FUSION_SELF.'?did='.$download->id.'&errno=0');
		}
	}
}



/****************************************************************************
 * CREATE
 */
$all_cats = array();

$res = dbquery("SELECT  cat_name, top_cat, cat_id, cat_upload_access"
	." FROM ".DB_PDP_CATS.""
	.(iPDP_MOD ? "" : " WHERE ".groupaccess("cat_upload_access"))
	." ORDER BY cat_order ASC");
while($data = dbarray($res)) {
	$all_cats[$data['cat_id']] = array(
		"name"		=> $data['cat_name'],
		"parentcat"	=> $data['top_cat'],
		"access"	=> $data['cat_upload_access'],
	);
}

function pdp_tmp_show_cat($parentid, $cat_array, $level, $sel_this) {
	$retval = "";
	foreach($cat_array as $myid => $thiscat) {
		if($thiscat['parentcat']==$parentid
			&& checkgroup($thiscat['access'])) {

			$retval .= "<option value='$myid'"
				.($sel_this==$myid ?
					' selected="selected"'
					: ''
				).'>'.str_repeat("&nbsp;", $level*4)
					.$thiscat['name'].'</option>';

			$retval .= pdp_tmp_show_cat($myid, $cat_array,
				$level+1, $sel_this);
		}
	}
	return $retval;
}

$sel_cats = pdp_tmp_show_cat(0, $all_cats, 0, $download->data['cat_id']);
if(empty($sel_cats)) {
	fallback("error.php?type=cats");
}



/*
 * GUI
 */
 $tabs = array(
	'copyright'	=> $locale['pdp_copyright'],
);

pdp_tabs($tabs);


pdp_open_tab('copyright', $locale['pdp_copyright']);
if(!$download->id || $download->status==PDP_PRO_NEW) {
	pdp_upload_step(1, $download->id ? "edit_files.php" : "");
	$button = $locale['PDP044']." 2";
	$caption = $locale['PDP103'];
} else {
	$button = $locale['PDP010'];
	$caption = $locale['PDP025'];
}

opentable($caption);
if(isset($_GET['errno'])) {
	pdp_process_errno($_GET['errno']);
}


if(count($errors)) {
	show_info($errors);
//	echo "<p><div style='text-align:center;'><strong>".$locale['PDP011']
//		."</strong></div></p>\n";
}


$res = dbquery("SELECT license_id, license_name
	FROM ".DB_PDP_LICENSES);
$sel_licenses = '<option value="0">'.$locale['PDP101'].'</option>';
while($data = dbarray($res)) {
	$sel_licenses .= '
	<option value="'.$data['license_id'].'"'
		.($download->data['license_id']==$data['license_id']
			? ' selected="selected"'
			: ''
		).'>'.$data['license_name'].'</option>';
}



$action = FUSION_SELF;
if($download->id) {
	$action .= '?did='.$download->id;
}


echo '
<form action="'.$action.'" method="post" name="inputform">

<p>
<label for="name">'.$locale['PDP002'].': *</label><br />
<input type="text" value="'.$download->data['dl_name'].'" size="50"
	maxlength="200" class="textbox" name="name" id="name" />
</p>

<p>
<label for="cat">'.$locale['PDP012'].' *</label><br />
<select size="1" name="cat" id="cat" class="textbox">
	<option value="0">'.$locale['PDP033'].'</option>
	'.$sel_cats.'
</select>
</p>

<p>
<label for="homepage">'.$locale['PDP020'].':</label><br />
<input type="text" value="'.$download->data['dl_homepage'].'" size="50"
	maxlength="200" size="60" class="textbox" name="homepage"
	id="homepage" /><br />
<span class="small2">'.$locale['PDP216'].'</span>
</p>

<p>
<label for="copyright">'.$locale['pdp_copyright'].':</label><br />
<textarea rows="15" cols="75" class="textbox" name="copyright" id="copyright">'
	.$download->data['dl_copyright'].'</textarea><br />
</p>

<p>
<fieldset>
<legend>'.$locale['PDP108'].':</legend>
<span class="small2">'.$locale['PDP109'].'</span><br />
<textarea rows="5" cols="75" class="textbox" name="abstract">'
	.$download->data['dl_abstract'].'</textarea><br />
'.pdp_get_bb_smileys('abstract', 0, false).'
</fieldset>
</p>

<p>
<fieldset>
<legend>'.$locale['PDP025'].':</legend>
<textarea rows="10" cols="75" class="textbox" name="desc">'
	.$download->data['dl_desc'].'</textarea><br />
'.pdp_get_bb_smileys('desc', 0, false).'
</fieldset>
</p>
<p>
<div>
<label><input type="checkbox" name="original_link"'
	.($download->data['original_link']=='Y'
		? ' checked="checked"'
		: ''
	).'> '.$locale['PDP500'].'
	
</div>
</p>
<p>
	<input type="submit" class="button" value="'.$button.'" name="save">
</p>

</form>';

closetable();


require_once('include/die.php');
?>

Danke für deine Mühe
 
Zurück