Pradinis
Pagalba
Užsisakyk!
- Reklamą
- Hostingą
- El. pašto dėžutę
Užsisakyk!
Įrankiai
Pasidalink
- Visos temos
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Bendri PHP-F klausimai |
Autorius: Yuuu | Peržiūrų: 453 |
Yuuu Narys Spalvotas Pranešimai: 56 Įstojęs: 2012 Sau. 17 14:01:08 | |
Sveiki, as isikeliau musicwishbox_panel tai muzikos pageidavimo panele. Ir stai kas vyksta: [cĮSPĖJIMAS: Įvyko klaida generuojant puslapį. Norėdami sužinoti platesnę informaciją, peržiūrėkite PHP-Fusion klaidų žurnalą.][/c] Spaudziu klaidu zurnalas: Detalės Klaida: mysql_result() expects parameter 1 to be resource, boolean given Eilutė: 29 Failas: infusions/musicwishbox_panel/musicwishbox_panel.php Puslapyje: /news.php Vartotojas-Lygis: 103 šeities kodas (Eilutė: 19 - 39) 19 include INFUSIONS."musicwishbox_panel/locale/".$settings['locale'].".php"; 20 } else { 21 include INFUSIONS."musicwishbox_panel/locale/Lithuanian.php"; 22 } 23 24 // Gruppe-ID der DJ-Gruppe angeben: 25 $dj_groupid = 2; 26 27 function wishexists_user($userid) { 28 global $db_prefix; 29 $user_found = mysql_result(mysql_query("SELECT COUNT(*) FROM `".$db_prefix."musicwishbox` WHERE `musicwish_from` = '$userid'"),0); 30 if ($user_found > 0) return TRUE; 31 else return FALSE; 32 } 33 34 openside("<img src='".INFUSIONS."musicwishbox_panel/paveiksliukai/music-note.jpg' height='90%'> ".$locale['mwb_100']); 35 if(!iMEMBER) { 36 echo $locale['mwb_102']; 37 }else{ 38 if(isset($_POST['wishbox_submit'])) { 39 [Puslapyje: /news.php 1 <?php 2 /*-------------------------------------------------------+ 3 | PHP-Fusion Content Management System 4 | Copyright (C) 2002 - 2011 Nick Jones 5 | http://www.php-fusion.co.uk/ 6 +--------------------------------------------------------+ 7 | Filename: news.php 8 | Author: Nick Jones (Digitanium) 9 +--------------------------------------------------------+ 10 | This program is released as free software under the 11 | Affero GPL license. You can redistribute it and/or 12 | modify it under the terms of this license which you 13 | can read by viewing the included agpl.txt or online 14 | at www.gnu.org/licenses/agpl.html. Removal of this 15 | copyright header is strictly prohibited without 16 | written permission from the original author(s). 17 +--------------------------------------------------------*/ 18 require_once "maincore.php"; 19 require_once THEMES."templates/header.php"; 20 21 // Predefined variables, do not edit these values 22 $i = 0; 23 24 // Number of news displayed 25 $items_per_page = $settings['newsperpage']; 26 27 add_to_title($locale['global_200'].$locale['global_077']); 28 29 if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) { 30 $rows = dbcount( 31 "(news_id)", 32 DB_NEWS, 33 groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") 34 AND (news_end='0'||news_end>=".time().") 35 AND news_draft='0'" 36 ); 37 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } 38 if ($rows) { 39 $result = dbquery( 40 "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status 41 FROM ".DB_NEWS." tn 42 LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id 43 LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id 44 WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") 45 AND (news_end='0'||news_end>=".time().") AND news_draft='0' 46 GROUP BY news_id 47 ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page 48 ); 49 $numrows = dbrows($result); 50 while ($data = dbarray($result)) { 51 $i++; 52 $comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['news_id']."'"); 53 $news_cat_image = ""; 54 $news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']); 55 $news_cat_image = "<a href='".($settings['news_image_link'] == 0 ? "news_cats.php?cat_id=".$data['news_cat'] 56 : FUSION_SELF."?readmore=".$data['news_id'] )."'>"; 57 if ($data['news_image_t2'] && $settings['news_image_frontpage'] == 0) { 58 $news_cat_image .= "<img src='".IMAGES_N_T.$data['news_image_t2']."' alt='".$data['news_subject']."' class='news-category' /></a>"; 59 } elseif ($data['news_cat_image']) { 60 $news_cat_image .= "<img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>"; 61 } else { 62 $news_cat_image = ""; 63 } 64 $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']); 65 66 $news_info = array( 67 "news_id" => $data['news_id'], 68 "user_id" => $data['user_id'], 69 "user_name" => $data['user_name'], 70 "user_status" => $data['user_status'], 71 "news_date" => $data['news_datestamp'], 72 "cat_id" => $data['news_cat'], 73 "cat_name" => $data['news_cat_name'], 74 "cat_image" => $news_cat_image, 75 "news_subject" => $data['news_subject'], 76 "news_ext" => $data['news_extended'] ? "y" : "n", 77 "news_reads" => $data['news_reads'], 78 "news_comments" => $comments, 79 "news_allow_comments" => $data['news_allow_comments'], 80 "news_sticky" => $data['news_sticky'] 81 ); 82 83 echo "<!--news_prepost_".$i."-->\n"; 84 render_news($news_subject, $news_news, $news_info); 85 } 86 echo "<!--sub_news_idx-->\n"; 87 if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n"; 88 } else { 89 opentable($locale['global_077']); 90 echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n"; 91 closetable(); 92 } 93 } else { 94 $result = dbquery( 95 "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn 96 LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id 97 LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id 98 WHERE ".groupaccess('news_visibility')." AND news_id='".$_GET['readmore']."' AND news_draft='0' 99 LIMIT 1" 100 ); 101 if (dbrows($result)) { 102 include INCLUDES."comments_include.php"; 103 include INCLUDES."ratings_include.php"; 104 $data = dbarray($result); 105 if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) { 106 $result2 = dbquery("UPDATE ".DB_NEWS." SET news_reads=news_reads+1 WHERE news_id='".$_GET['readmore']."'"); 107 $data['news_reads']++; 108 } 109 $news_cat_image = ""; 110 $news_subject = $data['news_subject']; 111 if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") { 112 $img_size = @getimagesize(IMAGES_N.$data['news_image']); 113 $news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('".IMAGES_N.$data['news_image']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($img_size[0]+20).",height =".($img_size[1]+20)."')\"><img src='".IMAGES_N_T.$data['news_image_t1']."' alt='".$data['news_subject']."' class='news-category' /></a>"; 114 } elseif ($data['news_cat_image']) { 115 $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat']."'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>"; 116 } 117 $news_news = stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']); 118 if ($data['news_breaks'] == "y") { $news_news = nl2br($news_news); } 119 $news_info = array( 120 "news_id" => $data['news_id'], 121 "user_id" => $data['user_id'], 122 "user_name" => $data['user_name'], 123 "user_status" => $data['user_status'], 124 "news_date" => $data['news_datestamp'], 125 "cat_id" => $data['news_cat'], 126 "cat_name" => $data['news_cat_name'], 127 "cat_image" => $news_cat_image, 128 "news_subject" => $data['news_subject'], 129 "news_ext" => "n", 130 "news_reads" => $data['news_reads'], 131 "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."' AND comment_hidden='0'"), 132 "news_allow_comments" => $data['news_allow_comments'], 133 "news_sticky" => $data['news_sticky'] 134 ); 135 add_to_title($locale['global_201'].$news_subject); 136 echo "<!--news_pre_readmore-->"; 137 render_news($news_subject, $news_news, $news_info); 138 echo "<!--news_sub_readmore-->"; 139 if ($data['news_allow_comments']) { showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); } 140 if ($data['news_allow_ratings']) { showratings("N", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); } 141 } else { 142 redirect(FUSION_SELF); 143 } 144 } 145 146 require_once THEMES."templates/footer.php"; 147 ?> Kaip man sita makalyne istaisyti? AWAY |
Peršokti į forumą: |