$out .= '<hr><h1>Access Point Vendors</h1><br/>
		<div class="charts_container">
            <canvas id="vendorsCanvas" width="600" height="600">
                Your web-browser does not support the HTML 5 canvas element.
            </canvas>
		</div>';
$datas = "";
$labels = "";
$vendors = array();
$vendorinfo = array();
$i = 0;
foreach ($stats['macprefixes'] as $mac => $count) {
    if ($i > 9) {
        break;
    }
    $vendor = getVendor($mac);
    if (empty($vendors[$vendor['brand']])) {
        $i++;
        $vendors[$vendor['brand']] = $count;
    } else {
        $vendors[$vendor['brand']] += $count;
    }
    $vendorinfo[$vendor['brand']] = $vendor['description'];
}
array_multisort($vendors, SORT_DESC);
foreach ($vendors as $vendor => $count) {
    if ($datas == "") {
        $datas .= $count;
        $labels .= "'{$vendor}'";
    } else {
        $datas .= ',' . $count;
                        <td align="left"><?php 
            echo $val['panellist_id'];
            ?>
</td>
                        <td align="left"><?php 
            echo getVendor($val['vendor_project_id']);
            ?>
</td>
                        <td align="right"><?php 
            echo $val['project_id'];
            ?>
</td>
                    </tr>
                    <?php 
            $odd = !$odd;
            $filebody .= $val['ID'] . "," . $val['redirect_status_name'] . ",," . $val['panellist_id'] . "," . getVendor($val['vendor_project_id']) . "," . $val['project_id'];
            $filebody .= "\n";
        }
    }
    $query = 'DROP TABLE {{temptranslate}}';
    Yii::app()->db->createCommand($query)->query();
    ?>
        </table>
    </div>
    <textarea name="filebody" style="display:none;"><?php 
    echo $filebody;
    ?>
</textarea>
    </form>
    <?php 
} else {
Beispiel #3
0
         if ($askPrescreener == "1") {
             $ex = explode(";", $val['DataOnRedirect']);
             $Email = isset($ex[0]) ? $ex[0] : "";
             $Zip = isset($ex[1]) ? $ex[1] : "";
             $Age = isset($ex[2]) ? $ex[2] : "";
             $Gender = isset($ex[3]) ? $ex[3] : "";
             echo '<td align="left" >' . $Email . '</td>';
             echo '<td align="left" >' . $Zip . '</td>';
             echo '<td align="right" >' . $Age . '</td>';
             echo '<td align="left" >' . $Gender . '</td>';
         }
         ?>
                 </tr>
                 <?php 
         $odd = !$odd;
         $filebody .= $val['panellist_redirect_id'] . "," . $val['redirect_status_name'] . ",," . $val['panellist_id'] . "," . getVendor($val['vendor_project_id']) . "," . $TimeStamp . "," . $val['StartIP'];
         if ($askExt == "1") {
             $filebody .= "," . $val['foreign_misc'];
         }
         if ($askLOI == "1") {
             $filebody .= "," . $val['LOS'];
         }
         if ($askReferrer == "1") {
             $filebody .= "," . $val['Referrer'];
         }
         if ($askPrescreener == "1") {
             $filebody .= "," . $Email . "," . $Zip . "," . $Age . "," . $Gender;
         }
         $filebody .= "\n";
     }
 }
Beispiel #4
0
        $result = Yii::app()->db->createCommand($query)->query()->readAll();
        foreach ($result as $row) {
            $TimeStamp = $row['created_datetime'];
            $filebody .= $row['blocked_redirect_id'] . "," . $row['panellist_redirect_id'] . "," . $row['status'] . ",," . $row['panellist_id'] . "," . getVendor($row['vendor_project_id']) . "," . $TimeStamp . "," . $row['StartIP'] . "\n";
        }
        $query = 'SELECT vendor_project_id, status, Count(blocked_redirect_id) AS Total  FROM {{blocked_redirects}} WHERE project_id =' . $prjid . ' GROUP BY vendor_project_id, status  ORDER BY vendor_project_id,status';
        $result = Yii::app()->db->createCommand($query)->query()->readAll();
        $odd = FALSE;
        foreach ($result as $row) {
            if ($odd) {
                $cls = 'class="odd"';
            } else {
                $cls = 'class="even"';
            }
            echo '<tr ' . $cls . '>
                    <td align="left">' . getVendor($row['vendor_project_id']) . '</td>
                    <td align="left">' . $row['status'] . '</td>
                    <td align="right">' . $row['Total'] . '</td>
                </tr>';
            $odd = !$odd;
        }
        ?>

            </table>
        </div>
        <textarea name="filebody" style="display:none;"><?php 
        echo $filebody;
        ?>
</textarea>
        </form>
        <?php