From 942c3353ff1b9f9522c8770d737469592b54a542 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 5 Oct 2015 16:41:05 +0300 Subject: [PATCH] more bootstrap, minor code clean --- call_interface2.php | 67 +++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/call_interface2.php b/call_interface2.php index ceeb8ce6..22706a79 100644 --- a/call_interface2.php +++ b/call_interface2.php @@ -121,25 +121,14 @@ function display_outcomes($contacted,$ca,$case_id) print "
".T_("CONTACTED").""; print "".T_("NOT CONTACTED")."
"; - if (isset ($_GET['contacted'])){ - - $contacted = bigintval($_GET['contacted']); - - $sql = "SELECT outcome_id,description,contacted - FROM outcome - WHERE contacted = '$contacted' - AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)"; - } + if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']); } - else - { - $contacted = bigintval($contacted); + else $contacted = bigintval($contacted); - $sql = "SELECT outcome_id,description,contacted - FROM outcome - WHERE contacted = '$contacted' - AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)"; - } + $sql = "SELECT outcome_id,description,contacted + FROM outcome + WHERE contacted = '$contacted' + AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)"; } } $rs = $db->GetAll($sql); @@ -153,15 +142,13 @@ function display_outcomes($contacted,$ca,$case_id) foreach($rs as $r) { if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = ""; - if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = "text-primary"; else $highlight = "text-default"; - print "
  • "; + if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = ""; else $highlight = "style='color:black;'"; + print "
    "; } $_POST['confirm'] = true; } print ""; - - } @@ -308,7 +295,7 @@ if (isset($_GET['newstate'])) if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js"; -xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"/* ,"css/call.css" */),array($js,"include/jquery/jquery-1.4.2.min.js")); +xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"),array($js,"include/jquery/jquery-1.4.2.min.js")); $state = is_on_call($operator_id); switch($state) @@ -327,8 +314,8 @@ switch($state) { //end the case if (!isset($_GET['end'])) print "
    " . T_("End work") . "
    "; - print "

    " . T_("End case") . "

    "; - print "

    " . T_("End work") . "

    "; + print "

    " . T_("End case") . "

    "; + print "

    " . T_("End work") . "

    "; } else { @@ -354,9 +341,11 @@ switch($state) print "
    " . T_("Press the call button to dial the number for this appointment:") . "
    "; - print "
    "; - print "

    " . T_("Number to call:") . " {$r['phone']} - {$r['description']}

    "; - print "
    "; + print "
    +

    " . T_("Number to call:") . " {$r['phone']} - {$r['description']}

    + +
    +
    "; } else print "
    " . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "
    "; @@ -427,7 +416,7 @@ switch($state) { print ""; } - print "
    "; + print "
    "; } else print "
    " . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "
    "; @@ -443,13 +432,13 @@ switch($state) //give focus on load print ''; //put these lower on the screen so they don't get "automatically" clicked - print "

    " . T_("End case") . "

    "; - print "

    " . T_("End work") . "

    "; + print "

    " . T_("End case") . "

    "; + print "

    " . T_("End work") . "

    "; } else { - print "

    " . T_("End case") . "

    "; - print "

    " . T_("End work") . "" . T_("End case") . "

    "; + print "

    " . T_("End work") . "



    "; + print "


    "; print ''; - print "

    " . T_("End case") . "

    "; - print "

    " . T_("End work") . "

    "; + print "

    " . T_("End case") . "

    "; + print "

    " . T_("End work") . "

    "; } else { - if (!isset($_GET['end'])) print "
    " . T_("The last call completed this call attempt") . "
    "; - print "

    " . T_("End case") . "

    "; - print "

    " . T_("End work") . "

    "; + if (!isset($_GET['end'])) print "
    " . T_("The last call completed this call attempt") . "
    "; + print "

    " . T_("End case") . "

    "; + print "

    " . T_("End work") . "

    "; } } } @@ -489,7 +478,7 @@ switch($state) break; case 5: //done -- shouldn't come here as should be coded + done default: - print "
    " . T_("Error: Close window") . "
    "; + print "
    " . T_("Error: Close window") . "
    "; break; }