Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reikia rimtų žmonių pagalbos!
Parašė 0php0· 2011 Rugp. 30 21:08:22
#1
Sveiki,
dabar atsitiko tokia bėda, bandant instaliuoti modą viskas susiintaliuoja be problemų sukūrus kategorijas irgi be problemų. Visas užklausas rodo duombaze.
O bėda yra tokia, įdėjus siuntinį ir pan viska rodo tvarkingai, tik norint ant siuntinio paspaudus įeiti t.y. Parsisiųsti rašo
invalid addon_id bandžiau visaip žiūrėti, ne tik vienas stebet ir keli asmenys, suprantu gal vienas prametu nežinau gi visko, nu bet kai tryse žmonės sprendžia ir neišsisprendžia bėdą tai tenka jau visų prašytu pagalbos, tikriausiai bus bėda su GET Funkcija, neranda kelio iki siuntinio. Čia mano pamastymui, tad duodu kodą galbūt Jūs rasit kame klaida, ar ir bus klaidų jame.
FAILO KODAS:
if (isset($_GET['addon_id']) && isnum($_GET['addon_id'])) {
redirect("view.php?addon_id=".$_GET['addon_id']);
} else {
redirect("index.php");
}
Redagavo 0php0· 2011 Rugp. 30 21:08:48
Parašė Ponas24· 2011 Rugp. 30 22:08:33
#2
Parodyk kaip nuoroda atrodo iki siuntinio
Parašė Ponas24· 2011 Rugp. 30 23:08:14
#4
Na čia viskas tvarkoj, kažkur kitur klaida turbūt ;]
Parašė weberiz· 2011 Rugp. 31 00:08:56
#5
o tai kas daros pačiam faile view kišk visa moda čia bandysim sprest
Parašė weberiz· 2011 Rugp. 31 03:08:16
#7
pirlna error'a parašyk
Parašė Creatium· 2011 Rugp. 31 09:08:54
#8
Atsimenu ir aš buvau susidūręs su tokia problema, kai norėjau išbandyt šitą modą. Pilna klaida taip ir skamba: Invalid addon_id. Daugiau nieko nerašo. Tas ir keisčiausia, sunku taip kažką surasti.
Parašė 0php0· 2011 Rugp. 31 09:08:23
#9
Undefined index: addon_id
kodas tos eilutės kur netinka: $addon_id = stripinput($_GET['addon_id']);
Parašė Ponas24· 2011 Rugp. 31 10:08:09
#10
Duok nuorodą kur šitas modas įdiegtas ;]
Parašė 0php0· 2011 Rugp. 31 10:08:59
#11
O kam reikia, jeigu viską pateikiau normaleei. Daviau net modą visą nes buvo prašymas manau užtenka ir to.
Plius tinklalapis uždarytas nemanau, kad man apsimoka dalinėti ir pan.
Redagavo 0php0· 2011 Rugp. 31 10:08:10
Parašė Ponas24· 2011 Rugp. 31 10:08:57
#12
Tai siūlai siųstis modą? Baik juokus, tau juk reikia.
Parašė 0php0· 2011 Rugp. 31 10:08:20
#13
Tiesiog, aš nenr dalinėti nurodų į saitą. Jis uždarytas visą problemą matai erroruose
Parašė Ponas24· 2011 Rugp. 31 10:08:03
#14
Tai nuorodas įdomu pažiūrėt, ar visus perduodamas normaliai tas ID
Parašė Jaunelis· 2011 Rugp. 31 11:08:29
#15
nesupranta kaip ir sakei GET bandyk kažką keist :)
Parašė Gugiss· 2011 Rugp. 31 11:08:06
#16
$addon_id = stripinput($_GET['addon_id']);
pakeisk į:
@$addon_id = stripinput($_GET['addon_id']);
Problema išspręsta, klaidos nerodys
Redagavo Gugiss· 2011 Rugp. 31 11:08:24
Parašė Ponas24· 2011 Rugp. 31 11:08:41
#17
Čia ne problemos išsprendimas, čia klaidos užslėpimas ;]
Parašė 0php0· 2011 Rugp. 31 11:08:52
#18
Niekas nepasikeičia gugi :D
Parašė iGolf· 2011 Rugp. 31 14:08:26
#19
Man irgi lygei taspats buvo prieš kelis mėnesius neradau kame problema. Gal padės šiam žmogui ir išsispręs problema mums :)
Parašė weberiz· 2011 Rugp. 31 14:08:31
#20
if(isset($_GET['addon_id'])) {
$addon_id = @stripinput($_GET['addon_id']);
}
pabandyk
arba
po <?php
Redagavo weberiz· 2011 Rugp. 31 15:08:36
Parašė iGolf· 2011 Rugp. 31 14:08:42
#21
Pats suintaliavau tą modą, ir taspats pakeitus tą kodą
Parašė weberiz· 2011 Rugp. 31 14:08:23
#22
reiškias modas skirtas
PHP 4.3< nes skaičiau daugumai kas naudojo 4.3< nerodidavo tokios klaidos kai 5v naudot praded klaida tokia daugumai rodit praded
pabandykit error_reporting(0); ikišt
Redagavo weberiz· 2011 Rugp. 31 14:08:04
Parašė iGolf· 2011 Rugp. 31 15:08:10
#23
Niekas nepasikeičia, jeigu gali plačiau parašyk dėl to error logo kur dėti jį tikslei nes dėjau po kodo apačia pačiame kode ir nieko.
Parašė iGolf· 2011 Rugp. 31 16:08:32
#24
weberiz - nerodo tų errorų.
Parašė avice· 2011 Rugp. 31 17:08:54
#25
paciame virsuje kisi:
ir nerodys klaidu del $_GET , $_POST ir t.t.
Parašė iGolf· 2011 Rugp. 31 17:08:52
#26
Man reikia, kad išsispręstu o ne, kad nerodytu..
Parašė avice· 2011 Rugp. 31 23:08:19
#27
taigi koks tau skirtumas?
Modas veiks kuo puikiausiai.
O jei eitum adresu : adresas.lt/modas.php?addon_id=x klaidos nebutu.
Tad uzsidek ta error_reporting .
Parašė Creatium· 2011 Rugp. 31 23:08:14
#28
Tai kaip modas veiks, jeigu meta klaidą invalid addon_id kad ir ką beįrašytum į adresą? O jeigu klaidą paslėpsi, tai juk ji vistiek bus, o modas toliau neveiks. Ar aš kažko nesuprantu? :D
Parašė avice· 2011 Rugp. 31 23:08:58
#29
susimaisiau pagalvojau , kad snekat apie Undefined Index addon_id xD
numesk pilna koda...
Parašė iGolf· 2011 Rugp. 31 23:08:15
#30
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: addon_view.php
| Author: PHP-Fusion Addons Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
require_once INFUSIONS."addondb/infusion_db.php";
require_once INFUSIONS."addondb/inc/inc.functions.php";
include INFUSIONS."addondb/locale/".LOCALESET."addon_view.php";
if (isset($_GET['download']) && isnum($_GET['download'])) {
$data = dbarray(dbquery("SELECT * FROM ".DB_ADDON_CATS." JOIN ".DB_ADDONS." USING(addon_cat_id) WHERE addon_id='".$_GET['download']."'"));
if (checkgroup($data['addon_cat_access'])) {
$result = dbquery("UPDATE ".DB_ADDONS." SET addon_download_count=(addon_download_count+1) WHERE addon_id='".$_GET['download']."'");
require_once INCLUDES."class.httpdownload.php";
redirect($addon_upload_dir.$data['addon_download']);
ob_end_clean();
$object = new httpdownload;
$object->set_byfile($addon_upload_dir.$data['addon_download']);
$object->use_resume = true;
$object->download();
exit;
}
}
$addon_id = stripinput($_GET['addon_id']);
$q_addons = dbquery("SELECT * FROM ".DB_ADDON_CATS." JOIN ".DB_ADDONS." tm USING(addon_cat_id) JOIN ".DB_ADDON_VERSIONS." USING(version_id) JOIN ".DB_USERS." tu ON tm.addon_approved_user=tu.user_id WHERE addon_id='".$addon_id."'");
$d_addons = dbarray($q_addons);
if (!isnum($addon_id) || dbrows($q_addons) == 0 || ($d_addons['addon_status'] != 0 && !iSUPERADMIN && $d_addons['addon_status'] != 0)) {
opentable($locale['addondb430']);
echo "<center><br>".$locale['addondb431']."<br><br><a href='index.php'>".$locale['addondb433']."</a><br><br></center>";
closetable();
} elseif (!checkgroup($d_addons['addon_cat_access'])) {
opentable($locale['addondb430']);
echo "<center><br>".$locale['addondb432']."<br><br><a href='index.php'>".$locale['addondb433']."</a><br><br></center>";
closetable();
} else {
$ver = "v".$d_addons['version_h'].".".$d_addons['version_l'].($d_addons['version_s'] != "" ? " ".$d_addons['version_s'] : "");
$d_rating = dbarray(dbquery("SELECT SUM(rating_vote) sum_rating, COUNT(rating_item_id) count_votes FROM ".DB_RATINGS." WHERE rating_item_id='".$addon_id."' AND rating_type='M'"));
$num_votes = $d_rating['count_votes'];
if ($num_votes == 0) {
$votecount = " [".$locale['addondb416']."]";
} elseif ($num_votes == 1) {
$votecount = " [1 ".$locale['addondb417']."]";
} else {
$votecount = " [".$num_votes." ".$locale['addondb418']."]";
}
$rating = ($num_votes > 0 ? str_repeat("<img src='".ADDON_IMG."star.png' alt='".$locale['addondb414']."'>",ceil($d_rating['sum_rating']/$num_votes)).$votecount : $votecount);
$staff_rating = str_repeat("<img src='".ADDON_IMG."star.png' alt='".$locale['addondb414']."' />",$d_addons['addon_approved_rating']);
$urlprefix = !strstr($d_addons['addon_author_www'], "http://") ? "http://" : "";
$urlprefix_demo = !strstr($d_addons['addon_demo_url'], "http://") ? "http://" : "";
if ($d_addons['addon_download_count'] == 0) {
$download_count = "[0 ".$locale['addondb422']."]";
} elseif ($d_addons['addon_download_count'] == 1) {
$download_count = "[1 ".$locale['addondb407']."]";
} else {
$download_count = "[".$d_addons['addon_download_count']." ".$locale['addondb422']."]";
}
include ADDON_INC."view_nav.php";
opentable($locale['addondb400'].$d_addons['addon_name']);
if ($d_addons['addon_date'] + $settings_global['set_new_time'] > time() + ($settings['timeoffset'] * 3600)) { $new = "<img src='".ADDON_IMG."new.png' border='0' alt='' />";
} else {
$new = "";
}
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td width='155'>
";
if($d_addons['addon_img'] == "" || !file_exists(ADDON_SCRN."t_".$d_addons['addon_img'])) {
echo "<img src='".ADDON_IMG."addon_logo.png'>";
} else {
add_to_head("<script type='text/javascript' src='lightbox/prototype.js'></script>
<script type='text/javascript' src='lightbox/scriptaculous.js?load=effects,builder'></script>
<script type='text/javascript' src='lightbox/lightbox.js'></script>
<link rel='stylesheet' href='lightbox/lightbox.css' type='text/css' media='screen' />");
echo"<div align='center'><a href='img/screenshots/".$d_addons['addon_img']."' rel='lightbox' style='outline: none;border:none;'>
<img src='".ADDON_SCRN."t_".$d_addons['addon_img']."' style='outline: none;border:none;'></a></div>\n";
}
$status_check = dbarray(dbquery("SELECT addon_author_status FROM ".DB_ADDONS." WHERE addon_author_name = '".$d_addons['addon_author_name']."'"));
if ($status_check['addon_author_status'] == '2') { echo"<br />\n<center><img src='".ADDON_IMG."approved_addon.png' alt='' border='0' /></center>\n"; }
if ($d_addons['addon_share_status']) {include ADDON_INC."share_links_include.php";}
echo "</td>
<td>
<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2' width='80' nowrap><b>".$locale['addondb401'].":</b></td>
<td class='tbl1' nowrap>".$new." ".$d_addons['addon_name']."</td>
<td class='tbl1' nowrap rowspan='9' align='center'><b>".$locale['addondb421'].$d_addons['addon_name']."</b><br />
<a href='".FUSION_SELF."?download=".$d_addons['addon_id']."' title='".$locale['addondb502']."'><img border='0' src='".ADDON_IMG."download.png' alt='' /></a><br />".$download_count."
<br /><br />";
echo $locale['addondb440']."[".parsebytesize(filesize(ADDON."files/".$d_addons['addon_download']))."]";
echo "</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb402'].":</b></td>
<td class='tbl1' nowrap>".$d_addons['addon_version']."</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb403'].":</b></td>
<td class='tbl1' nowrap>".$d_addons['addon_cat_name']."</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb404'].":</b></td>
<td class='tbl1' nowrap>".$ver." (".$addon_types[$d_addons['addon_type']].")</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb405'].":</b></td>\n";
$user_auth = dbarray(dbquery("SELECT
user_id,
user_name,
user_hide_email,
user_status
FROM ".DB_USERS."
WHERE
user_name = '".$d_addons['addon_author_name']."'
"));
if ($user_auth['user_hide_email'] != "1" && $d_addons['addon_author_email'] != "") {
$author_email = "<a href='mailto:".$d_addons['addon_author_email']."' title='".$locale['addondb500']."' class='button'><span>".$locale['addondb419']."</span></a>";
} else { $author_email = ""; }
if ($d_addons['addon_author_www'] != "") { $author_www = " <a href='".$urlprefix.$d_addons['addon_author_www']."' target='_blank' title='".$locale['addondb501']."' class='button'><span>".$locale['addondb420']."</span></a>";
} else { $author_www = ""; }
echo "<td class='tbl1' nowrap>".(isset($user_auth['user_name']) ? profile_link($user_auth['user_id'], $user_auth['user_name'], $user_auth['user_status']) : $d_addons['addon_author_name'])." ".$author_email." ".$author_www."</td>
</tr>\n";
if ($d_addons['addon_co_author_name'] != "") {
echo "<tr>
<td class='tbl2' nowrap><b>".$locale['addondb405c'].":</b></td>
<td class='tbl1' nowrap>".$d_addons['addon_co_author_name']."</td>
</tr>\n"; }
echo "<tr>
<td class='tbl2' nowrap><b>".$locale['addondb406'].":</b></td>
<td class='tbl1' nowrap>".strftime($settings['forumdate'],$d_addons['addon_date']+($settings['timeoffset']*3600))."</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb408'].":</b></td>
<td class='tbl1' nowrap>".$rating."</td>
</tr>
<tr>
<td class='tbl2' nowrap><b>".$locale['addondb429a']."</b></td>
<td class='tbl1' nowrap>";
if ($d_addons['addon_demo_url']) { echo "<a target='_blank' href='".$urlprefix_demo.$d_addons['addon_demo_url']."'>".trimlink($d_addons['addon_demo_url'],40)."</a>"; } else { echo "---"; }
echo "</td>
</tr>
</table>
</td>
</tr>
</table>
<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$locale['addondb409']."</b></td>
</tr>
<tr>
<td class='tbl1'>".nl2br(parsesmileys(parseubb($d_addons['addon_description'])))."</td>
</tr>";
echo "</table>";
if ($d_addons['addon_copyright'] != "") {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$locale['addondb410']."</b></td>
</tr>
<tr>
<td class='tbl1'>".nl2br(parsesmileys(parseubb($d_addons['addon_copyright'])))."</td>
</tr>
</table>";
}
if ($d_addons['addon_approved_user'] != 0) {
$user_approve = dbarray(dbquery("SELECT
user_id,
user_name,
user_status
FROM ".DB_USERS."
WHERE
user_name = '".$d_addons['user_name']."'
"));
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2' width='12%' nowrap><b>".$locale['addondb411'].":</b></td>
<td class='tbl1' width='*'>".profile_link($user_approve['user_id'], $d_addons['user_name'], $user_approve['user_status'])."</td>
<td class='tbl2' width='12%' nowrap><b>".$locale['addondb412'].":</b></td>
<td class='tbl1' width='20%'>".str_repeat("<img src='".INFUSIONS."addondb/img/star.png' alt='".$locale['addondb414']."'>",$d_addons['addon_approved_rating'])."</td>
</tr>
<tr>\n";
echo "<td class='tbl2' valign='top' nowrap><b>".$locale['addondb413'].":</b></td>
<td class='tbl1' colspan='3'>";
if ($d_addons['addon_approved_comment']) { echo nl2br(parsesmileys(parseubb($d_addons['addon_approved_comment']))); } else { echo $locale['addondb439']; }
echo "</td>";
echo "</tr>";
$result = dbquery("SELECT t.forum_id, t.thread_id, t.thread_author, t.thread_subject, a.addon_name, a.addon_submitter_name
FROM ".DB_THREADS." t
LEFT JOIN ".DB_ADDONS." a
ON t.thread_author=a.addon_submitter_name
WHERE t.thread_subject ='".$d_addons['addon_name']."'
AND (t.forum_id = '77' OR t.forum_id = '78' OR t.forum_id = '79' OR t.forum_id = '80')
ORDER BY thread_id DESC LIMIT 1
");
if (dbrows($result) != 0) {
echo "<tr><td class='tbl2' width='12%' nowrap><b>".$locale['addondb429']."</b></td>";
echo "<td class='tbl2' colspan='3'>";
while ($data = dbarray($result)) {
echo "<a href='".BASEDIR."forum/viewthread.php?thread_id=".$data['thread_id']."' class='button'><span>".$data['thread_subject']."</span></a>"; }
echo "</td></tr>"; }
echo"<tr>
<td class='tbl2' width='12%' nowrap><b>".$locale['addondb427']."</b></td>
<td class='tbl1' width='*'>";
$trans="";
$result1 = dbquery("SELECT * FROM ".DB_ADDON_TRANS." WHERE trans_mod='".$d_addons['addon_id']."' ORDER BY trans_type ASC");
if (dbrows($result1)) {
while ($data1 = dbarray($result1)) {
$trans .= "<a href='".$trans_upload_dir.$data1['trans_file']."' target='_BLANK'>".get_addon_language($data1['trans_type'])."</a>, ";
}
} else {
$trans = $locale['addondb511'];
}
echo"$trans</td>
<td class='tbl2' width='12%' nowrap><b>".$locale['addondb428']."</b></td>
<td class='tbl1' width='20%'>";
if (iMEMBER) {
echo "<img src='".ADDON_IMG."error.png' border='0' alt='".$locale['addondb503']."' />
<a href ='".ADDON."error.php?error=1&addon_id=".$d_addons['addon_id']."' title='".$locale['addondb503']."' class='button'><span>".$locale['addondb503']."</span></a><br /><br />
<img src='".ADDON_IMG."translate.png' border='0' alt='".$locale['addondb506']."' />
<a href ='".ADDON."error.php?error=4&addon_id=".$d_addons['addon_id']."' title='".$locale['addondb506']."' class='button'><span>".$locale['addondb506']."</span></a>\n"; } else { echo $locale['addondb438']; }
echo "</td>
</tr>
";
if (checkrights("ADNX")) {
if ($d_addons['addon_status'] != 3) {
$suspended = " | <a href='admin/index.php".$aidlink."&action=suspend&addon_id=".$d_addons['addon_id']."' class='button'><span>".$locate['addondb425']."</span></a>";
} else {
$suspended = " | <span style='color:red;font-weight:bold;'>".$locate['addondb426']."</span>";
}
echo "<tr>
<td class='tbl2' valign='top'><b>".$locale['addondb423'].":</b></td>
<td class='tbl1' colspan='3'><a href='admin/index.php".$aidlink."&action=edit&addon_cat_id=".$d_addons['addon_cat_id']."&addon_id=".$d_addons['addon_id']."' class='button'><span>".$locate['addondb424']."</span></a>".$suspended." | <a href='admin/submissions.php".$aidlink."&tran=".$d_addons['addon_id']."' title='".$locale['addondb510']."' class='button'><span>".$locale['addondb509']."</span></a></td>
</tr>";
}
echo "</table>";
}
closetable();
// Other Addons by...
$result = dbquery("SELECT * FROM ".DB_ADDONS." WHERE addon_author_name = '".$d_addons['addon_author_name']."' AND addon_id != '".$d_addons['addon_id']."' AND addon_status = '0' ORDER BY addon_download_count DESC");
if (dbrows($result) != 0) {
opentable($locale['addondb512'].$d_addons['addon_author_name']);
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'><tr>\n";
echo "<th class='forum-caption'><b>".$locale['addondb403']."</b></th>\n
<th class='forum-caption'><b>".$locale['addondb401']."</b></th>\n
<th class='forum-caption'><b>".$locale['addondb422']."</b></th>\n
<th class='forum-caption' width='120'><b>".$locale['addondb412']."</b></th>\n</tr>\n";
while ($data = dbarray($result)) {
$sf_rating = str_repeat("<img src='".ADDON_IMG."star.png' alt='".$locale['addondb414']."' />",$data['addon_approved_rating']);
$cat_data = dbarray(dbquery("SELECT addon_cat_name FROM ".DB_ADDON_CATS." WHERE addon_cat_id = '".$data['addon_cat_id']."'"));
echo "<tr>\n<td class='tbl2'>".$cat_data['addon_cat_name']."</td>\n";
echo "<td class='tbl2'> <a href='".ADDON."view.php?addon_id=".$data['addon_id']."'> ".$data['addon_name']."</a></td>\n";
echo "<td align='center' class='tbl2'>".$data['addon_download_count']."</td>\n";
echo "<td align='center' class='tbl2'>".$sf_rating."</td>\n</tr>";
}
echo "</table>\n";
closetable();
}
// Addons Co-Authored by...
$result = dbquery("SELECT * FROM ".DB_ADDONS." WHERE addon_co_author_name = '".$d_addons['addon_author_name']."' AND addon_id != '".$d_addons['addon_id']."' AND addon_status = '0' ORDER BY addon_download_count DESC");
if (dbrows($result) != 0) {
opentable($locale['addondb513'].$d_addons['addon_author_name']);
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'><tr>\n";
echo "<th class='forum-caption'><b>".$locale['addondb403']."</b></th>\n
<th class='forum-caption'><b>".$locale['addondb401']."</b></th>\n
<th class='forum-caption'><b>".$locale['addondb405']."</b></th>\n
<th class='forum-caption'><b>".$locale['addondb422']."</b></td>\n
<th class='forum-caption' width='120'><b>".$locale['addondb412']."</b></td>\n</tr>\n";
while ($data = dbarray($result)) {
$sf_rating = str_repeat("<img src='".ADDON_IMG."star.png' alt='".$locale['addondb414']."' />",$data['addon_approved_rating']);
$cat_data = dbarray(dbquery("SELECT addon_cat_name FROM ".DB_ADDON_CATS." WHERE addon_cat_id = '".$data['addon_cat_id']."'"));
echo "<tr>\n<td class='tbl2'>".$cat_data['addon_cat_name']."</td>\n
<td class='tbl2'> <a href='".ADDON."view.php?addon_id=".$data['addon_id']."'> ".$data['addon_name']."</a></td>\n
<td class='tbl2'>".$data['addon_author_name']."</td>\n
<td align='center' class='tbl2'>".$data['addon_download_count']."</td>\n
<td align='center' class='tbl2'>".$sf_rating."</td>\n</tr>\n";
}
echo "</table>\n";
closetable();
}
showratings("M", $addon_id, FUSION_SELF."?addon_id=".$d_addons['addon_id']);
if ($settings_global['set_addondb_comm'] == '0') {
showcomments("M", DB_ADDONS, "addon_id", $d_addons['addon_id'], FUSION_SELF."?addon_id=".$d_addons['addon_id']);}
}
if (!iGUEST) {
add_to_title ($locale['addondb507'].$locale['addondb508'].$locale['addondb507'].$d_addons['addon_name']);
} else {
add_to_title ($locale['addondb507'].$locale['addondb508'].$locale['addondb507']);
}
require_once THEMES."templates/footer.php";
?>
Redagavo iGolf· 2011 Rugp. 31 23:08:48
Parašė avice· 2011 Rugs. 1 11:09:36
#31
Kur butent meta ta invalid addon_in , galbut local'e yra "invalid addon_id" ?Tai jei yra parasyk kokia eilute .
Parašė Creatium· 2011 Rugs. 1 15:09:02
#32
Meta kai tik paspaudi ant addono pavadinimo, kad įkeltu į puslapį su pilnu aprašymu, atsisiuntimo nuoroda, komentarais ir t.t. Tuomet ir išmeta tą Invalid addon_id ir apačio nuoroda berods yra, kad grįžti į pagr. puslapį (jeigu gerai atsimenu).
Parašė avice· 2011 Rugs. 1 17:09:47
#33
Neturiu to modo tai nelabai galiu pasakyt ;]
be man rodo cia klaida:
$addon_id = stripinput($_GET['addon_id']);
$q_addons = dbquery("SELECT * FROM ".DB_ADDON_CATS." JOIN ".DB_ADDONS." tm USING(addon_cat_id) JOIN ".DB_ADDON_VERSIONS." USING(version_id) JOIN ".DB_USERS." tu ON tm.addon_approved_user=tu.user_id WHERE addon_id='".$addon_id."'");
$d_addons = dbarray($q_addons);
if (!isnum($addon_id) || dbrows($q_addons) == 0 || ($d_addons['addon_status'] != 0 && !iSUPERADMIN && $d_addons['addon_status'] != 0)) {
opentable($locale['addondb430']);
echo "<center><br>".$locale['addondb431']."<br><br><a href='index.php'>".$locale['addondb433']."</a><br><br></center>";
closetable();
} elseif (!checkgroup($d_addons['addon_cat_access'])) {
opentable($locale['addondb430']);
echo "<center><br>".$locale['addondb432']."<br><br><a href='index.php'>".$locale['addondb433']."</a><br><br></center>";
closetable();
} else {
galbut addon_status yra 0 ar psn xD
Parašė iGolf· 2011 Rugs. 1 18:09:12
#34
$locale['addondb431'] = "Invalid addon_id";
Prašau štai ta eilutė :)
Šiame pilname kode kur daviau yra eilutė su locale431 rasi :)
Parašė avice· 2011 Rugs. 1 21:09:40
#35
SELECT * FROM ".DB_ADDON_CATS." JOIN ".DB_ADDONS." tm USING(addon_cat_id) JOIN ".DB_ADDON_VERSIONS." USING(version_id) JOIN ".DB_USERS." tu ON tm.addon_approved_user=tu.user_id WHERE addon_id='".$addon_id."'"
cia blogai kasnors. arba tu nesi superadmin ir arba addon_status nera lygus 0
Parašė Creatium· 2011 Rugs. 1 23:09:18
#36
Žemiau esančiame ife pašalinus dbrows($q_addons) == 0 klaidos nebemeta ir išmeta visą lentelę, kurioj turėtų būti surašyta addono info. Bet tos info nėra, visi laukeliai tušti. Tad problema gal kažkur kitur... ar ne? Manyčiau, kad neišgauna informacijos apie egzistuojančius addonus.
Parašė avice· 2011 Rugs. 1 23:09:45
#37
bloga uzklausa arba nera to addon'o su tokiu id kuris rasomas nuorodoj.
Patikrink addon lentele ar viskas atitinka pagal uzklausa..
P.S kas cia per modas , ka jis cia turi atvaizduot ? xD
Redagavo avice· 2011 Rugs. 1 23:09:24