예제 #1
0
				</tr>
				<?php 
        }
        if (($arAnswer["FIELD_TYPE"] == "4" or $arAnswer["FIELD_TYPE"] == "5") and is_array($arGroupAnswers[$arAnswer["ID"]])) {
            reset($arGroupAnswers[$arAnswer["ID"]]);
            $u_total = count($arGroupAnswers[$arAnswer["ID"]]);
            while (list(, $arM) = each($arGroupAnswers[$arAnswer["ID"]])) {
                if ($max_relation > 0) {
                    $w = round($arM["COUNTER"] * 100 / $max_relation);
                }
                if ($sum > 0) {
                    $q = $arM["COUNTER"] * 100 / $sum;
                    //								if ($q<1) continue;
                    $q = number_format($q, 2, ',', '');
                }
                GetNextColor($color1, $color1, $u_total, "66CC00", "FFFF99");
                ?>
				<tr>
					<td width="30%" valign="top"><font class="smalltext"><?php 
                echo nl2br(TruncateText($arM["MESSAGE"], 100)) . "&nbsp;";
                ?>
</font></td>
					<td width="70%" valign="top" nowrap><table cellspacing=0 cellpadding=0 width="100%">
							<tr>
								<td width="<?php 
                echo $max_width;
                ?>
%"><table align="left" cellspacing=0 cellpadding=0 width="<?php 
                echo $w == 0 ? "0%" : $w . "%";
                ?>
"><tr><td width="100%" style="background-color: <?php 
예제 #2
0
                return -1;
            }
            return 0;
        }
    }
    uasort($arrAnswers, "__main_page_vote_sort");
    reset($arrAnswers);
    while (list(, $arAnswer) = each($arrAnswers)) {
        if ($max_relation > 0) {
            $w = round($arAnswer["COUNTER"] * 100 / $max_relation);
        }
        if ($sum > 0) {
            $q = number_format($arAnswer["COUNTER"] * 100 / $sum, 2, ',', '');
        }
        if (strlen($arAnswer["COLOR"]) <= 0) {
            GetNextColor($color, $def_color, $a_total, "0066CC", "FFFF00");
        } else {
            $color = $arAnswer["COLOR"];
        }
        ?>
				<tr>
					<td width="30%" valign="top"><font class="smalltext"><?php 
        echo $arAnswer["MESSAGE"];
        ?>
</font></td>
					<td width="70%" valign="top" nowrap><table cellspacing="0" cellpadding="0" width="100%" border="0">
							<tr>
								<td width="<?php 
        echo $max_width;
        ?>
%"><table border="0" align="left" cellspacing="0" cellpadding="0" width="100%">