コード例 #1
0
ファイル: tavling.php プロジェクト: krillo/motiomera
}
if (isset($_POST['procent_pro'])) {
    $per = $_POST['procent_pro'];
} else {
    $per = 1.0;
}
//get the array of companys
!empty($_REQUEST['company']) ? $companyArray = $_REQUEST['company'] : ($companyArray = '');
//get all active companys, make checkboxes
$copmArray = Foretag::getAllActiveCompanys();
$checkbox = '<input type="checkbox" value="alla" id="all" name="all-companys" checked><label for="all">Alla eller ingen</label><br/><br/>';
foreach ($copmArray as $id => $comp) {
    $checkbox .= '<input type="checkbox" value="' . $id . '" id="' . $id . '" name="company[]" checked><label for="' . $id . '">' . $id . ' <a href="/pages/editforetag.php?fid=' . $id . '&tab=2" >' . $comp[namn] . '</a></label><br/>';
}
$smarty->assign('checkbox', $checkbox);
$userArray = Medlem::getTavlingMedlemmar($stt, $slt, $am, $as, $per, $companyArray);
//print_r($userArray);
if (count($userArray) > 0) {
    $att = null;
    $emaillist = '';
    $html = "<h2>";
    foreach ($userArray as $arr) {
        foreach ($arr as $key => $value) {
            $att .= $value . "\t";
        }
        $att .= "\n";
        $html .= "<a href=\"" . $urlHandler->getUrl('Medlem', URL_VIEW, $arr['id']) . "\">" . $arr['aNamn'] . "</a><br />";
        $emaillist .= $arr['epost'] . ", ";
    }
    $html .= "</h2>";
    //get company name