Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Vip grupe

Parašė JaWa· 2010 Bir. 20 15:06:51
#1

Sveiki. Bandau daryti toki dalyka, jei narys priklauso vip grupei, prie jo niko zenkliukas yra.

$result5 = dbrows(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_groups='2'"));
if($result5 = 2) {
$gr=explode('.',$data['user_groups']);
if(in_array('2',$gr)) {
$vipas = "<img src='".IMAGES."vip.gif' alt='VIP Narys' title='VIP Narys'>";
}
}



Taciau kaikuriuose failuose susiduriu su tokia problema : pavyzdziui news.php

kodo iskirpa:
$result5 = dbrows(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_groups='2'"));
if($result5 = 2) {
$gr=explode('.',$data['user_groups']);
if(in_array('2',$gr)) {
$vipas = "<img src='".IMAGES."vip.gif' alt='VIP Narys' title='VIP Narys'>";
} else {
$vipas = "";
}
}

         if ($settings['news_style'] == "1") {
            if ($rows <= 2 || $ncount == 1) {
               $news_[0] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> $vipas<a href='".BASEDIR.'profile.php?lookup='.$news_info['user_id']."'><span style='color:#".$news_info['user_color']."'>".$news_info['user_prefix'].$news_info['user_name']."</span></a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }




Man ta vip zenkliuka rodo ant visu nariu (nors jis ne vip). gal del sito kad cia taip :.
..$vipas <a href='".BASEDIR.'profile.php?lookup='.$news_info['user_id']."'>



galite paaiskinti kaip istaisyti ?