Beispiel #1
0
function personlige_valg()
{
    global $sprog_id;
    global $popup;
    global $bruger_id;
    global $bgcolor;
    global $bgcolor5;
    global $nuance;
    $gl_menu = NULL;
    $sidemenu = NULL;
    $topnemu = NULL;
    $r = db_fetch_array(db_select("select * from grupper where art = 'USET' and kodenr = '{$bruger_id}'", __FILE__ . " linje " . __LINE__));
    $id = $r['id'];
    $jsvars = $r['box1'];
    $r['box2'] ? $popup = 'checked' : ($popup = NULL);
    if ($r['box3'] == 'S') {
        $sidemenu = 'checked';
    } elseif ($r['box3'] == 'T') {
        $topmenu = 'checked';
    } else {
        $gl_menu = 'checked';
    }
    $r['box4'] ? $bgcolor = $r['box4'] : ($bgcolor = NULL);
    $r['box5'] ? $nuance = $r['box5'] : ($nuance = NULL);
    $nuancefarver[0] = findtekst(418, $sprog_id);
    $nuancekoder[0] = "+00-22-22";
    $nuancefarver[1] = findtekst(419, $sprog_id);
    $nuancekoder[1] = "-22+00-22";
    $nuancefarver[2] = findtekst(420, $sprog_id);
    $nuancekoder[2] = "-22-22+00";
    $nuancefarver[3] = findtekst(421, $sprog_id);
    $nuancekoder[3] = "+00+00-33";
    $nuancefarver[4] = findtekst(422, $sprog_id);
    $nuancekoder[4] = "+00-33+00";
    $nuancefarver[5] = findtekst(423, $sprog_id);
    $nuancekoder[5] = "-33+00+00";
    print "<form name=personlige_valg action=diverse.php?sektion=personlige_valg&popup={$popup} method=post>";
    print "<tr><td colspan='6'><hr></td></tr>";
    print "<tr bgcolor='{$bgcolor5}'><td colspan='6'><b><u>Personlige valg</u></b></td></tr>";
    print "<tr><td colspan='6'><br></td></tr>";
    print "<input type=hidden name=id value='{$id}'>";
    #	print "<input type=hidden name=id value='$id'>";
    print "<tr><td title='" . findtekst(207, $sprog_id) . "'>" . findtekst(208, $sprog_id) . "</td><td><input class='inputbox' type='checkbox' name='popup' {$popup}></td></tr>";
    if (strpos($_SERVER['SERVER_NAME'], 'ateway') || strpos($_SERVER['SERVER_NAME'], 'sl3')) {
        #	print "<tr><td title='".findtekst(316,$sprog_id)."'><!--Tekst 523-->".findtekst(315,$sprog_id)."<!--Tekst 315--></td><td><input class='inputbox' type='radio' name='menu' value='sidemenu' $sidemenu></td></tr>";
        print "<tr><td title='" . findtekst(523, $sprog_id) . "'><!--Tekst 523-->" . findtekst(522, $sprog_id) . "<!--Tekst 522--></td><td><input class='inputbox' type='radio' name='menu' value='topmenu' {$topmenu}></td></tr>";
    } else {
        $gl_menu = 'checked';
    }
    print "<tr><td title='" . findtekst(525, $sprog_id) . "'><!--Tekst 525-->" . findtekst(524, $sprog_id) . "<!--Tekst 524--></td><td><input class='inputbox' type='radio' name='menu'  value='gl_menu' {$gl_menu}></td></tr>";
    print "<tr><td title='" . findtekst(209, $sprog_id) . "'>" . findtekst(210, $sprog_id) . "</td><td colspan='4'><input class='inputbox' type='text' style='width:600px' name='jsvars' value='{$jsvars}'></td></tr>";
    print "<tr><td title='" . findtekst(318, $sprog_id) . "'>" . findtekst(317, $sprog_id) . "</td><td colspan='4'><input class='inputbox' type='text' style='width:100px' name='bgcolor' value='" . substr($bgcolor, 1, 6) . "'></td></tr>";
    print "<tr><td title='" . findtekst(416, $sprog_id) . "'>" . findtekst(415, $sprog_id) . "</td><td colspan='4'><select name='nuance' title='" . findtekst(417, $sprog_id) . "'>\n";
    if (!$nuance) {
        $valgt = "selected='selected'";
    } else {
        $valgt = "";
    }
    print "   <option {$valgt} value='' style='background:{$bgcolor}'>Intet</option>\n";
    $antal_nuancer = count($nuancefarver);
    for ($x = 0; $x <= $antal_nuancer; $x++) {
        if ($nuance === $nuancekoder[$x]) {
            $valgt = "selected='selected'";
        } else {
            $valgt = "";
        }
        print "   <option {$valgt} value='{$nuancekoder[$x]}' style='background:" . farvenuance($bgcolor, $nuancekoder[$x]) . "'>{$nuancefarver[$x]}</option>\n";
    }
    print "</select></td></tr>\n";
    print "<tr><td><br></td></tr>\n";
    print "<tr><td><br></td></tr>\n";
    print "<tr><td><br></td><td><br></td><td><br></td><td align = center><input type=submit accesskey='g' value='Gem/opdat&eacute;r' name='submit'></td></tr>\n";
    print "</form>";
}
Beispiel #2
0
 function linjefarve($linjefarve, $ulige_bg, $lige_bg, $stdnuance = 0, $nuance = 0)
 {
     if ($linjefarve === $ulige_bg || $linjefarve === farvenuance($ulige_bg, $stdnuance)) {
         if ($nuance) {
             $retur = farvenuance($lige_bg, $nuance);
         } else {
             $retur = $lige_bg;
         }
     } else {
         if ($nuance) {
             $retur = farvenuance($ulige_bg, $nuance);
         } else {
             $retur = $ulige_bg;
         }
     }
     return $retur;
 }