Przedszkolak
Postów: 46 Ostrzeżeń: 2
Data rejestracji: 05.07.2007 14:52
|
Hmm z tego co widzę to myślicie ze czekam na gotowca... A wiec tak powiem Wam ze nie.
Na dzisiejszy dzień mój download wygląda tak:
1. Składa sie z 3 a nie 4 etapów
2. Usunąłem parę linijek w kodzie i pozostawiłem tylko to co chce
3. Po kliknięciu w "D O W N L O A D" zaczyna pobierać link do strony a nie jak dotychczas plik dodany podczas uploadu
Plik edit_desc.php wymedytowałem tak:
<?php
/***************************************************************************
* Professional Download System *
* *
* Copyright (C) pirdani *
* *
* http://pirdani.de/ *
* *
* Copyright (C) 2005 EdEdster (Stefan Noss) *
* http://edsterathome.de/ *
* *
* Copyright (C) 2006 Artur Wiebe *
* *
* http://wibix.de/ *
* *
* Released under the terms & conditions of v2 of the *
* GNU General Public License. For details refer to *
* the included gpl.txt file or visit http://gnu.org *
***************************************************************************/
require_once("../../maincore.php");
require_once(BASEDIR."subheader.php");
require_once(BASEDIR."side_left.php");
require_once("include/common.php");
if(!iMEMBER || !pdp_check_access($pdp_settings['uploadbereich'])) {
fallback("download.php");
}
if(isset($pdp_did) && !iPDP_EDIT) {
fallback("download.php?did=$did");
}
require_once("include/edit.php");
?>
<script type="text/javascript">
function verify(frm) {
if(frm.name.value=="" || frm.cat.value=="0") {
alert("<?php echo $locale['PDP011'] ?>");
return false;
}
return true;
}
</script>
<?php
/*
* Action!
*/
if(isset($_POST['save'])) {
$cat = stripinput($_POST['cat']);
if(!$cat) {
fallback(FUSION_SELF);
}
$name = trim(stripinput($_POST['name']));
if(empty($name)) {
fallback(FUSION_SELF);
}
$homepage = stripinput($_POST['homepage']);
$homepage2 = stripinput($_POST['homepage2']);
$homepage3 = stripinput($_POST['homepage3']);
$homepage4 = stripinput($_POST['homepage4']);
$beschreibung = stripinput($_POST['desc']);
$copyright = stripinput($_POST['copyright']);
$license_id = stripinput($_POST['license_id']);
$lizenz_okay = isset($_POST['lizenz_okay']) ? "Y" : "N";
$lizenz_packet = isset($_POST['lizenz_packet']) ? "Y" : "N";
$lizenz_url = stripinput($_POST['lizenz_url']);
$now = time();
if(!isset($did)) {
$ok = dbquery("INSERT INTO ".DB_PREFIX."pdp_downloads"
." SET dl_count='0',"
." user_id='".$userdata['user_id']."',"
." dl_ctime='$now',"
." dl_status='".PDP_PRO_NEW."'");
$pdp_did = mysql_insert_id();
$pdp_dl['dl_status'] = PDP_PRO_NEW;
}
$ok = dbquery("UPDATE ".DB_PREFIX."pdp_downloads"
." SET"
." cat_id='$cat', dl_name='$name',"
." dl_desc='$beschreibung',"
." dl_copyright='$copyright',"
." license_id='$license_id',"
." lizenz_okay='$lizenz_okay',"
." lizenz_packet='$lizenz_packet',"
." lizenz_url='$lizenz_url',"
." dl_homepage='$homepage',"
." dl_homepage2='$homepage2',"
." dl_homepage3='$homepage3',"
." dl_homepage4='$homepage4',"
." dl_mtime='$now'"
." WHERE dl_id='$pdp_did' $pdp_user_access");
if($pdp_dl['dl_status']==PDP_PRO_ON && !iPDP_ADMIN) {
$ok = dbquery("UPDATE ".DB_PREFIX."pdp_downloads"
." SET dl_status='".PDP_PRO_OFF."'"
." WHERE dl_id='$pdp_did' $pdp_user_access");
}
pdp_log_event($pdp_dl['dl_status']==PDP_PRO_NEW
? PDP_EV_NEW : PDP_EV_DESC, 0);
if($ok) {
if($pdp_dl['dl_status']==PDP_PRO_NEW) {
fallback("edit_pics.php?did=$pdp_did");
}
fallback(FUSION_SELF."?did=$pdp_did&errno=0");
}
}
/*
* CREATE
*/
$all_cats = array();
$query_id = dbquery("SELECT cat_name, top_cat, cat_id, cat_access"
." FROM ".DB_PREFIX."pdp_cats"
." ORDER BY top_cat, cat_name ASC");
while($data = dbarray($query_id)) {
$all_cats[$data['cat_id']] = array(
"name" => $data['cat_name'],
"parentcat" => $data['top_cat'],
"access" => $data['cat_access'],
);
}
function pdp_tmp_show_cat($parentid, $cat_array, $level, $prev, $sel_this) {
$retval = "";
foreach($cat_array as $myid => $thiscat) {
if(!pdp_check_access($thiscat['access'])) {
continue;
}
if($myid==$parentid) {
$retval .= "<option value='$myid'"
.($sel_this==$myid ? " selected" : "")
.">$prev"
.$thiscat['name']."</option>";
// $prev .= $thiscat['name']." -> ";
$prev .= " ";
} elseif($thiscat['parentcat']==$parentid) {
$retval .= pdp_tmp_show_cat($myid, $cat_array,
$level+1, $prev, $sel_this);
}
}
return $retval;
}
$sel_cats = pdp_tmp_show_cat(0, $all_cats, 0, "",
isset($pdp_dl) ? $pdp_dl['cat_id'] : 0);
if(empty($sel_cats)) {
fallback("error.php?errno=".PDP_ECATS);
}
/*
* GUI
*/
if(!isset($pdp_did)) {
pdp_upload_step(1);
$button = $locale['PDP044']." 2";
$caption = $locale['PDP103'];
} else {
$button = $locale['PDP010'];
$caption = $locale['PDP102'];
}
opentable($caption);
if(isset($pdp_did)) {
echo $pdp_edit_menu;
}
if(isset($_GET['errno'])) {
pdp_process_errno($_GET['errno']);
}
if(isset($pdp_did)) {
$name = $pdp_dl['dl_name'];
$homepage = $pdp_dl['dl_homepage'];
$homepage2 = $pdp_dl['dl_homepage2'];
$homepage3 = $pdp_dl['dl_homepage3'];
$homepage4 = $pdp_dl['dl_homepage4'];
$desc = $pdp_dl['dl_desc'];
$copy = $pdp_dl['dl_copyright'];
$cat_id = $pdp_dl['cat_id'];
$li_id = $pdp_dl['license_id'];
$li_ok = ($pdp_dl['lizenz_okay']=="Y" ? "checked" : "" );
$li_pa = ($pdp_dl['lizenz_packet']=="Y" ? "checked" : "");
$li_url = $pdp_dl['lizenz_url'];
} else {
$name = "";
$homepage = "";
$homepage2 = "";
$homepage3 = "";
$homepage4 = "";
$desc = "";
$copy = "Copyright (C) ".$userdata['user_name']." ".date("Y");
unset($cat_id, $li_id);
$li_url = "";
$li_ok = "";
$li_pa = "";
}
$query_id = dbquery("SELECT license_id, license_name"
." FROM ".DB_PREFIX."pdp_licenses");
$sel_licenses = "<option value='0'>".$locale['PDP101']."</option>\n";
while($data = dbarray($query_id)) {
$sel_licenses .= "<option value='".$data['license_id']."'"
.(isset($li_id)&&$li_id==$data['license_id'] ? " selected" : "")
.">".$data['license_name']
."</option>\n";
}
$action = FUSION_SELF;
if(isset($did)) {
$action .= "?did=$did";
}
echo "<form action='$action' method='POST' name='inputform'"
." onSubmit='return verify(this);'>
<table width='100%' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2'>".$locale['PDP002'].": *</td>
<td class='tbl1'><input type='text' value='$name' size='50'"
." maxlength='200' class='textbox' name='name'></td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP012']." *</td>
<td class='tbl1'><select size='1' name='cat' class='textbox'>"
."<option value='0'>".$locale['PDP033']."</option>"
.$sel_cats."</select></td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP0200'].": *</td>
<td class='tbl1'><input type='text' value='$homepage' size='50'"
." maxlength='200' style='width:100%;'"
." class='textbox' name='homepage'><span class='small2'>"
.$locale['PDP216']."</td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP0200'].": *</td>
<td class='tbl1'><input type='text' value='$homepage2' size='50'"
." maxlength='200' style='width:100%;'"
." class='textbox' name='homepage'><span class='small2'>"
.$locale['PDP216']."</td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP0200'].": *</td>
<td class='tbl1'><input type='text' value='$homepage3' size='50'"
." maxlength='200' style='width:100%;'"
." class='textbox' name='homepage'><span class='small2'>"
.$locale['PDP216']."</td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP0200'].": *</td>
<td class='tbl1'><input type='text' value='$homepage4' size='50'"
." maxlength='200' style='width:100%;'"
." class='textbox' name='homepage'><span class='small2'>"
.$locale['PDP216']."</td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP025'].": *</td>
<td class='tbl1'><textarea rows='8' class='textbox'"
." name='desc' style='width:100%;'>$desc</textarea><br>"
.pdp_get_bb_smileys("desc", "0", false)."</td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP104']."</td>
<td class='tbl1'><input type='text' value='$copy' size='50'"
." maxlength='255' style='width:100%;'"
." class='textbox' name='copyright'></td>
</tr>
<tr>
<td class='tbl2'>".$locale['PDP105'].":</td>
<td class='tbl1'><br>
".$locale['PDP107'].": <input type='text' value='$li_url'"
." maxlength='255' size='60' class='textbox' name='lizenz_url'>
</td>
</tr>
<tr>
<td colspan='2' class='tbl2' align='center'><input type='submit'"
." class='button' value='$button' name='save'></td>
</tr>
</table>\n";
closetable();
require_once(BASEDIR."side_right.php");
require_once(BASEDIR."footer.php");
?>
Plik did.php
<?php
/***************************************************************************
* Professional Download System *
* *
* Copyright (C) pirdani *
* *
* http://pirdani.de/ *
* *
* Copyright (C) 2005 EdEdster (Stefan Noss) *
* http://edsterathome.de/ *
* *
* Copyright (C) 2006 Artur Wiebe *
* *
* http://wibix.de/ *
* *
* Released under the terms & conditions of v2 of the *
* GNU General Public License. For details refer to *
* the included gpl.txt file or visit http://gnu.org *
***************************************************************************/
if(!defined("IN_FUSION")) {
header("Location:../../index.php");
exit;
}
if(!isset($pdp_did)) {
fallback("download.php");
}
?>
<script type="text/javascript">
function screenshot_open(titel, imageadr, breite, hoehe)
{
var wnd = window.open("", "pro_down_screenshot",
"menubar=0,scrollbars=1,status=0,width="+breite+",height="+hoehe+",toolbar=0")
if(wnd!=null) {
wnd.document.open();
wnd.document.write("<a href='javascript:window.close();'><img src='"+imageadr+"' border='0' alt='' title='"+titel+"'></a>");
wnd.document.close();
wnd.focus();
}
}
function show_license(titel, id)
{
var wnd = window.open("license.php?id="+id, "pro_download_license",
"menubar=0,scrollbars=1,status=0,width=640,height=480,toolbar=0")
if(wnd!=null) {
wnd.focus();
}
}
</script>
<?php
/*
* FUNCS
*/
function pdp_tmp_render_did($name, $body, $homepage,$homepage2,$homepage3,$homepage4, $pic,
$license, $count, $user_id, $user_name, $ctime, $mtime, $copyright,
$files,
$old_down, $old_extern, $old_ver, $old_size)
{
global $locale, $pdp_did, $pdp_settings;
$down_link = "";
if(!empty($old_down) || !empty($old_extern)) {
$down_link = "file.php?did=$pdp_did&file_id=0";
} elseif(count($files)) {
$latest_download = array_shift($files);
$down_link = "file.php?did=$pdp_did"
."&file_id=".$latest_download['id'];
$old_ver = $latest_download['ver'];
$old_size = $latest_download['size'];
array_unshift($files, $latest_download);
}
echo "<font size='+1'><b>$name</b></font>\n";
echo "<hr>\n";
echo "
<table border='0' cellspacing='2' width='100%' cellpadding='0'>
<tr>
<td valign='top' colspan='2'>$body</td>
<td width='100' valign='top' rowspan='2'>
<table class='tbl-border' cellspacing='1' width='100%'>";
// version
if(!empty($old_ver)) {
echo "<tr><td class='tbl2' align='center'>".$locale['PDP018']
.":<br>$old_ver</td>";
}
// homepage
if(!empty($homepage)) {
echo "<tr><td class='tbl2' align='center'><a href='$homepage'"
." target='_blank'>".$locale['PDP0201']."</a></td>";
}
// homepage2
if(!empty($homepage2)) {
echo "<tr><td class='tbl2' align='center'><a href='$homepage2'"
." target='_blank'>".$locale['PDP0201']."</a></td>";
}
// homepage3
if(!empty($homepage3)) {
echo "<tr><td class='tbl2' align='center'><a href='$homepage3'"
." target='_blank'>".$locale['PDP0201']."</a></td>";
}
// homepage4
if(!empty($homepage4)) {
echo "<tr><td class='tbl2' align='center'><a href='$homepage4'"
." target='_blank'>".$locale['PDP0201']."</a></td>";
}
// screenshot
if(!empty($pic) && file_exists($pdp_settings['upload_image'].$pic)) {
$imagepx = getimagesize($pdp_settings['upload_image'].$pic);
echo "<tr>
<td align='center' class='tbl2'>"
."<a href='javascript:screenshot_open(\"".$name."\", \""
.$pdp_settings['upload_image'].$pic."\", \""
.($imagepx[0]+20)."\", \"".($imagepx[1]+20)
."\")'>".$locale['PDP028']."</a></td>
</tr>";
}
// download count
echo "<tr>
<td align='center' class='tbl2'>".$locale['PDP004'].":<br>$count</td>
</tr>";
// FIXME TODO
if(!empty($old_size)) {
echo "<tr><td align='center' class='tbl2'>"
.$locale['PDP029'].":<br>".$old_size."</td></tr>";
}
echo "<tr>
<td align='center' class='tbl2'>$license</td>
</tr>";
// who posted and when.
echo "<tr><td align='center' class='tbl2'>"
."<a href='profile.php?id=$user_id'>$user_name</a>"
."<br>".showdate("shortdate", $mtime)."</td>
</tr>\n";
if(!empty($copyright)) {
echo "<tr>
<td class='tbl2' align='center'>$copyright</td>
</tr>\n";
}
echo "</table></td>
</tr>
<tr>
<td align='center' valign='bottom'><b><a href='$homepage'"
." target='_blank'>".$locale['PDP201']."</a></td>
</tr>
<tr>
<td align='center' valign='bottom'><b><a href='$homepage2'"
." target='_blank'>".$locale['PDP201']."</a></td>
</tr>
<tr>
<td align='center' valign='bottom'><b><a href='$homepage3'"
." target='_blank'>".$locale['PDP201']."</a></td>
</tr>
<tr>
<td align='center' valign='bottom'><b><a href='$homepage4'"
." target='_blank'>".$locale['PDP201']."</a></td>
</tr>
</table>
<hr>\n";
// report broken downloads
echo "<div align='right'>";
if($pdp_settings['defektpm']){//FIXME && !iSUPERADMIN) {
echo "[ <a href='broken.php?did=$pdp_did'>".$locale['PDP024']
."</a> ]<br>";
}
// edit link
if(iPDP_EDIT) {
echo "<b>".$locale['PDP007'].":</b> [ "
."<a href='edit_desc.php?did=$pdp_did'>"
.$locale['PDP025']."</a>\n"
." | <a href='edit_pics.php?did=$pdp_did'>"
.$locale['PDP015']."</a>\n";
if(iPDP_ADMIN) {
echo " | <a href='edit_comments.php?did=$pdp_did'>"
.$locale['PDP021']."</a> ]";
echo " | <a href='edit_admin.php?did=$pdp_did'>"
.$locale['PDP450']."</a> ]";
}
}
echo "</div>\n";
// files
if(count($files)) {
echo "<b>".$locale['PDP200'].":</b><ul>\n";
}
foreach($files as $data) {
echo "<li>"
.showdate("shortdate", $data['timestamp'])
." - <b>".$data['ver']." - </b>"
." <a href='file.php?did=$pdp_did"
."&file_id=".$data['id']."'>"
.$data['url']."</a>"
." (<span class='small2'>".$data['size']." - "
.$data['desc'].")</span>"
// ."<img src='icons/"
// .($data['is_external'] ? "external" : "download")
// .".gif' alt='' border='0'></a> "
."</li>\n";
}
if(count($files)) {
echo "</ul>\n";
}
}
/*
* ACTION
*/
if(isset($_POST['btn_vote']) && iUSER >= $pdp_settings['bewertungen']) {
$ok = dbquery("INSERT INTO ".DB_PREFIX."pdp_votes"
."(dl_id, user_id, vote_opt)"
." VALUES"
."('$pdp_did', '".$userdata['user_id']."',"
." '".$_POST['did_vote']."')");
if($ok) {
fallback("download.php?did=$pdp_did");
}
} elseif(isset($_POST['del_vote']) && iUSER >= $pdp_settings['bewertungen']) {
$ok = dbquery("DELETE"
." FROM ".DB_PREFIX."pdp_votes"
." WHERE dl_id='$pdp_did' AND user_id='".$userdata['user_id']."'");
if($ok) {
fallback("download.php?did=$pdp_did");
}
} elseif(isset($_POST['add_comment']) && iUSER >= $pdp_settings['kommentare']) {
$text = stripinput(censorwords($_POST['comm_text']));
$comment_smileys = (isset($_POST['disable_smileys']) ? "0" : "1");
if(iMEMBER) {
$c_user = $userdata['user_id'];
$c_name = $userdata['user_name'];
} else {
$c_user = "0";
$c_name = stripinput($_POST['comment_name']);
}
$ok = dbquery("INSERT INTO ".DB_PREFIX."pdp_comments"
." SET dl_id='$pdp_did',"
." user_id='$c_user',"
." comment_user_name='$c_name',"
." comment_text='$text',"
." comment_timestamp='".time()."',"
." comment_ip='".USER_IP."',"
." comment_smileys='$comment_smileys'");
if($pdp_settings['new_comm_pm']) {
pdp_send_pm_mail($pdp_dl['user_id'], PDP_PM_COMMENT);
}
fallback("download.php?did=$pdp_did#comm".mysql_insert_id());
}
/*
* GUI
*/
// license
$license = "";
if($pdp_dl['license_id']) {
$query_id = dbquery("SELECT license_id, license_name"
." FROM ".DB_PREFIX."pdp_licenses"
." WHERE license_id='".$pdp_dl['license_id']."'");
if(dbrows($query_id) && $row=dbarray($query_id)) {
$license = "<a href='javascript:show_license(\"".$row['license_name']."\", \"".$row['license_id']."\");'>".$row['license_name']."</a>";
$target = "";
}
} elseif(!empty($pdp_dl['lizenz_url'])) {
$license = "<a target='_blank' href='".$pdp_dl['lizenz_url']."'>"
.$locale['PDP203']."</a>";
} elseif($pdp_dl['lizenz_packet']=="Y") {
$license = "<span class='small2'>".$locale['PDP030']."</span>";
} else {
$license = "<span class='small2'>".$locale['PDP204']."</span>";
}
// files
$files = array();
$query_id = dbquery("SELECT file_id, file_version, file_desc, file_size,"
." file_timestamp, file_url"
." FROM ".DB_PREFIX."pdp_files"
." WHERE dl_id='$pdp_did' AND file_status='0'"
." ORDER BY file_timestamp DESC");
while($data = dbarray($query_id)) {
$files[] = array(
"id" => $data['file_id'],
// obsolete? FIXME
"is_external" => pdp_is_external($data['file_url']),
"url" => $data['file_url'],
"ver" => $data['file_version'],
"timestamp" => $data['file_timestamp'],
"size" => $data['file_size'],
"desc" => $data['file_desc'],
);
}
if(function_exists("pdp_render_download")) {
pdp_render_download($pdp_dl['dl_name'],
nl2br(parseubb(parsesmileys($pdp_dl['dl_desc']))),
$pdp_dl['dl_homepage'],
$pdp_dl['dl_homepage2'],
$pdp_dl['dl_homepage3'],
$pdp_dl['dl_homepage4'],
$pdp_dl['dl_pic'],
$license,
$pdp_dl['dl_count'],
$pdp_dl['user_id'],
$pdp_dl['user_name'],
$pdp_dl['dl_ctime'],
$pdp_dl['dl_mtime'],
$pdp_dl['dl_copyright'],
$files,
// FIXME obsolete
$pdp_dl['down'],
$pdp_dl['link_extern'],
$pdp_dl['version'],//FIXME-obsolete
$pdp_dl['dl_size'] //FIXME-obsolete
);
} else {
pdp_tmp_render_did($pdp_dl['dl_name'],
nl2br(parseubb(parsesmileys($pdp_dl['dl_desc']))),
$pdp_dl['dl_homepage'],
$pdp_dl['dl_homepage2'],
$pdp_dl['dl_homepage3'],
$pdp_dl['dl_homepage4'],
$pdp_dl['dl_pic'],
$license,
$pdp_dl['dl_count'],
$pdp_dl['user_id'],
$pdp_dl['user_name'],
$pdp_dl['dl_ctime'],
$pdp_dl['dl_mtime'],
$pdp_dl['dl_copyright'],
$files,
// FIXME obsolete
$pdp_dl['down'],
$pdp_dl['link_extern'],
$pdp_dl['version'],//FIXME-obsolete
$pdp_dl['dl_size'] //FIXME-obsolete
);
}
closetable();
tablebreak();
/*
* RATINGS
*/
opentable($locale['PDP202']);
$sql_votes = dbquery("SELECT *, COUNT(vote_opt) AS vote_count"
." FROM ".DB_PREFIX."pdp_votes"
." WHERE dl_id='$pdp_did' GROUP BY vote_opt");
if(dbrows($sql_votes)!=0) {
$nr_votes = 0;
$max_val = 0;
$votes = array(0, 0, 0, 0, 0, 0); // index 0 is not used.
$w = array(0, 0, 0, 0, 0, 0);
while($v = dbarray($sql_votes)) {
$votes[$v['vote_opt']] = $v['vote_count'];
if($v['vote_count'] > $max_val) {
$max_val = $v['vote_count'];
}
$nr_votes = $nr_votes + $v['vote_count'];
}
for($i=1; $i<6; $i++) {
$w[$i] = intval($votes[$i] * 100 / $max_val);
}
// $img = THEME."images/pollbar.gif";
echo "<p>
<table cellpadding='3' cellspacing='0' width='100%' class='tbl-border'>\n";
foreach($locale['PDP205'] as $val => $text) {
echo "<tr class='tbl2'>
<td align='right' width='100'>".$locale['PDP205'][$val]."</td>
<td><div class='poll' style='height:12; width:".$w[$val]."%;'></td>
<td align='right' width='1%'>"
.intval($votes[$val]*100/$nr_votes)."%</td>
<td align='left' width='100'>[".$votes[$val]." ".$locale['PDP213']."]</td>
</tr>\n";
}
echo "</tr>
</table>\n";
}
if(iUSER >= $pdp_settings['bewertungen']) {
$query_id = dbquery("SELECT *"
." FROM ".DB_PREFIX."pdp_votes"
." WHERE dl_id=$pdp_did AND user_id='".$userdata['user_id']."'");
if(dbrows($query_id)==0) {
echo "<p>
<form action='".FUSION_SELF."?did=$pdp_did' method='POST'>
<div align='center'>
<select size='1' class='textbox' name='did_vote'>
<option value='1'>".$locale['PDP205']['1']."</option>
<option value='2'>".$locale['PDP205']['2']."</option>
<option value='3'>".$locale['PDP205']['3']."</option>
<option value='4'>".$locale['PDP205']['4']."</option>
<option value='5'>".$locale['PDP205']['5']."</option>
</select>
<input type='submit' value='".$locale['PDP206']
."' class='button' name='btn_vote'>
</div>
</form>";
} else {
$data = dbarray($query_id);
echo "<p>
<form action='".FUSION_SELF."?did=$pdp_did' method='POST'>
<div align='center'>".$locale['PDP210'].": <b>"
.$locale['PDP205'][$data['vote_opt']]."</b><br>
<input type='submit' name='del_vote' class='button'"
." value='".$locale['PDP209']."'></div>
</form>\n";
}
} elseif(dbrows($sql_votes)==0) {
echo "<p>".$locale['PDP208'];
}
closetable();
tablebreak();
/*
*
*/
opentable($locale['PDP021']);
// KOMMENTARE
$query_id = dbquery("SELECT *"
." FROM ".DB_PREFIX."pdp_comments"
." WHERE dl_id='$pdp_did' ORDER BY comment_timestamp");
if(dbrows($query_id)) {
$count = 0;
echo "<table width='100%' class='tbl-border' cellspacing='1'>\n";
while($comm = dbarray($query_id)) {
$name = $comm['comment_user_name'];
if($comm['comment_smileys']=="1") {
$text = parsesmileys($comm['comment_text']);
} else {
$text = $comm['comment_text'];
}
$text = nl2br(parseubb($text));
if($comm['user_id']) {
$name = "<a href='".BASEDIR."profile.php?lookup="
.$comm['user_id']."'>$name</a>";
} else {
$name = "<b>".$name."</b>";
}
echo "<tr><td class='tbl".((++$count%2)+1)
."'><a name='comm".$comm['comment_id']."'></a>$name"
."<span class='small'>".$locale['PDP031']
.showdate("shortdate", $comm['comment_timestamp'])
."</span><br>$text";
}
if(iPDP_ADMIN) {
echo "<tr><td class='tbl".((++$count%2)+1)."' align='right'>"
."<a href='edit_comments.php?did=$pdp_did'>"
.$locale['PDP032']."</a></td></tr>";
}
echo "</table>\n";
}
// show comment form.
if(iUSER >= $pdp_settings['kommentare']) {
if(dbrows($query_id)) {
tablebreak();
}
if(iMEMBER) {
$name_line = "";
} else {
$name_line = "<tr>
<td align='center'>".$locale['PDP002']
.": <input type='text' size='32' maxlength='50'"
." class='textbox' name='comment_name'></td>
</tr>\n";
}
echo "
<form action='".FUSION_SELF."?did=$pdp_did' method='POST'"
." name='inputform'>
<table align='center' cellspacing='1'>
$name_line
<tr>
<td align='center'><textarea cols='60' rows='5'"
." class='textbox' name='comm_text'></textarea><br>"
.pdp_get_bb_smileys("comm_text", "1", true)."</td>
</tr>
<tr>
<td align='center'>"
."<input type='submit' value='".$locale['PDP211']."'"
." class='button' name='add_comment'></td>
</tr>
</table>
</form>";
} elseif(dbrows($query_id)==0) {
echo "<p>".$locale['PDP212'];
}
closetable();
?>
I jeszcze wymedytowałem plik Polish ale to nie jest narazie takie istotne :)
I po wrzuceniu na serwer edit_desc.php (wymedytowanego) i po odpaleniu go mam taki okno:
Po kliknięciu w "Przejdzo do 2" wyskakuje mi błąd [b]"Unkown column 'dl-homepage2' in filed list"[/b] .
Pogrzebie teraz w BD WebAdmin i zobaczę co zdziałam.
Pozdrawiam i jak widzicie nie czekam na gotowca!
Code nie gryzie - Milka
To jak pomoże ktoś??
Edytowane przez goracemajtki dnia 28.01.2008 18:51:29
|