function display()
 {
     if (isset($_REQUEST['close_window'])) {
         echo "<script>window.close();</script>";
     }
     parent::display();
 }
Ejemplo n.º 2
0
 public function display()
 {
     global $current_user;
     if (!$current_user->is_admin) {
         sugar_die(translate("LBL_MUST_BE_ADMIN"));
     }
     parent::display();
 }
Ejemplo n.º 3
0
    function display()
    {
        global $mod_strings;
        $javascript = <<<EOF
<script>
</script> 
EOF;
        echo $javascript;
        parent::display();
    }
Ejemplo n.º 4
0
 function display()
 {
     $smarty = new Sugar_Smarty();
     parent::display();
     $db = DBManagerFactory::getInstance();
     //$myquery = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid, tab5.location_c location, tab5.active_c active, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.last_uts_c,"%m/%d/%Y") uts1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink ) last_uts , ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ,  (SELECT DATE_FORMAT(tab3.next_pcp_visit_c,"%m/%d/%Y") pcp11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  next_pcp,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname, ( SELECT risklvl_c risk1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  risk FROM reg_patient tab4, reg_patient_cstm tab5, reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3 WHERE  tab5.id_c = tab4.id  AND tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb  AND tab4.id = tab2.pat';
     $myquery = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid, tab5.location_c location, tab5.active_c active, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.last_uts_c,"%m/%d/%Y") uts1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink ) last_uts , ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ,  (SELECT DATE_FORMAT(tab3.next_pcp_visit_c,"%m/%d/%Y") pcp11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  next_pcp,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname, ( SELECT risklvl_c risk1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  risk FROM reg_patient tab4, reg_patient_cstm tab5 WHERE  tab5.id_c = tab4.id ';
     $result = $db->query($myquery);
     $mydata = null;
     while ($row = $db->fetchRow($result)) {
         $mydata[] = $row;
     }
     global $cal_strings, $current_language;
     $cal_strings = return_module_language($current_language, 'Calendar');
     if (empty($_REQUEST['view'])) {
         $_REQUEST['view'] = SugarConfig::getInstance()->get('calendar.default_view', 'week');
     }
     $cal = new Calendar($_REQUEST['view']);
     if (in_array($cal->view, array('day', 'week', 'month'))) {
         $cal->add_activities($GLOBALS['current_user']);
     } else {
         if ($cal->view == 'shared') {
             $cal->init_shared();
             global $shared_user;
             $shared_user = new User();
             foreach ($cal->shared_ids as $member) {
                 $shared_user->retrieve($member);
                 $cal->add_activities($shared_user);
             }
         }
     }
     if (in_array($cal->view, array("day", "week", "month", "shared"))) {
         $cal->load_activities();
     }
     if (!empty($_REQUEST['print']) && $_REQUEST['print'] == 'true') {
         $cal->setPrint(true);
     }
     $display = new CalendarDisplay($cal);
     $smarty->assign("mydata", $mydata);
     echo "<table><tr><td>";
     $smarty->display($this->lv->tpl);
     echo "</td>";
     echo "<td style='width:100%;vertical-align:top'>";
     $caltest = new caltest();
     $caltest->test();
     echo "</td></tr></table>";
 }
Ejemplo n.º 5
0
 function display()
 {
     $smarty = new Sugar_Smarty();
     parent::display();
     $db = DBManagerFactory::getInstance();
     $restrict_query = "";
     global $current_user;
     //var_dump(get_defined_vars());
     //if(isset($current_user) AND $current_user->check_role_membership('WASSER_PATIENTS')) { echo "This user is in role"; $location_query = " AND location_c  IN ('BMC_WALLEY') ";}
     //elseif (isset($current_user) AND $current_user->check_role_membership('ALL_PATIENTS')) { echo "Super user"; $location_query = "  ";}
     //else { echo "This user is not in role"; $location_query = " AND location_c  NOT IN ('BMC_WALLEY') ";}
     if (isset($current_user) and $current_user->check_role_membership('PRESCRIBER_ONLY')) {
         $provider = GetProviders();
         //echo "GOT providers";
         $restrict_query = " AND provpat.reg_provider_reg_patientreg_provider_ida IN (" . $provider . ") ";
     }
     if (isset($current_user) and $current_user->check_role_membership('MULTI_LOCATION')) {
         $location = GetLocations();
         $restrict_query = " AND tab5.location_c IN ({$location}) ";
     }
     if (isset($current_user) and $current_user->check_role_membership('ALL_LOCATIONS')) {
         $restrict_query = "  ";
     }
     echo "restrict is " . $restrict_query . "<<<<";
     //$myquery = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid, tab5.location_c location, tab5.active_c active, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.last_uts_c,"%m/%d/%Y") uts1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink ) last_uts , ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ,  (SELECT DATE_FORMAT(tab3.next_pcp_visit_c,"%m/%d/%Y") pcp11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  next_pcp,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname, ( SELECT risklvl_c risk1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  risk FROM reg_patient tab4, reg_patient_cstm tab5, reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3 WHERE  tab5.id_c = tab4.id  AND tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb  AND tab4.id = tab2.pat';
     // <<<<<<< HEAD
     //02/25//$myquery = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid, tab5.location_c location, tab5.active_c active, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.last_uts_c,"%m/%d/%Y") uts1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink ) last_uts , ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ,  (SELECT DATE_FORMAT(tab3.next_pcp_visit_c,"%m/%d/%Y") pcp11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  next_pcp,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid AND p2b.deleted = 0) provname, ( SELECT risklvl_c risk1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  risk FROM reg_patient tab4, reg_patient_cstm tab5 WHERE  tab5.id_c = tab4.id ';
     $myquery = 'SELECT tab4.first_name fname, tab4.last_name lname, DATE_FORMAT(tab4.dob,"%m/%d/%Y")  dob, tab4.primary_address_postalcode zip, tab5.mrn_c mrn, tab5.audit_flag_c audit_flag, tab5.reg_patient_status_c status, tab4.id patid, tab5.location_c location, tab5.active_c active, DATE_FORMAT(tab5.pmp_date_c,"%m/%d/%Y")  pmp_date, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid)  LIMIT 1 )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill, ( SELECT DATE_FORMAT(MAX(tabuts.test_date),"%m/%d/%Y") uts1 FROM reg_patient_uts_import tabuts where tabuts.patient_mrn = mrn )  last_uts,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid AND p2b.deleted = 0) provname, ( SELECT finalscore from reg_patient_risk where pid = tab4.id LIMIT 1 )  risk FROM reg_patient tab4, reg_patient_cstm tab5, reg_provider_reg_patient_c provpat  WHERE  tab5.id_c = tab4.id AND provpat.reg_provider_reg_patientreg_patient_idb = tab4.id ' . $restrict_query;
     // =======
     /* 		$myquery = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid, tab5.location_c location, tab5.active_c active, ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.last_uts_c,"%m/%d/%Y") uts1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink ) last_uts , ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ,  (SELECT DATE_FORMAT(tab3.next_pcp_visit_c,"%m/%d/%Y") pcp11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  next_pcp,  (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname, ( SELECT finalscore risk1 FROM reg_patient_risk where pid = patid )  risk FROM reg_patient tab4, reg_patient_cstm tab5 WHERE  tab5.id_c = tab4.id ';   */
     // >>>>>>> 3097a71433de82fec730df252659026274347e46
     $start = microtime(true);
     $result = $db->query($myquery);
     $mydata = null;
     while ($row = $db->fetchRow($result)) {
         $mydata[] = $row;
     }
     $smarty->assign("mydata", $mydata);
     $smarty->display($this->lv->tpl);
     printf("Total time cached query: %.6fs\n", microtime(true) - $start);
 }
Ejemplo n.º 6
0
 function display()
 {
     parent::display();
     echo '<div id="map_div" style="display:none;position:fixed;width:100%; height:95%;padding:0;top:0px;left:0px;z-index:100;">';
     $map_html = '<style>';
     $map_html .= ' .ui-autocomplete {';
     $map_html .= ' background-color: white;';
     $map_html .= ' width: 300px;';
     $map_html .= ' border: 1px solid #cfcfcf;';
     $map_html .= ' list-style-type: none;';
     $map_html .= ' padding-left: 0px;}';
     $map_html .= ' </style>';
     $map_html .= ' <input id="address" type="hidden"/>';
     $map_html .= ' <div id="map_canvas" style="width:100%; height:100%; border: 1px solid; margin:0;"></div></div>';
     echo $map_html;
     //       echo('<div type="button" id="map_knopke" value="Карта Google" title="Карта Google" style="position:fixed; top:200px;right: 0px;z-index:200;width:1em; line-height:1em;border:1px solid black;background-color:#58b;opacity:0.6;-moz-opacity:0.6;color:white;font-weight:bold;padding:3px;cursor:pointer;">К А Р Т А &nbsp; &nbsp; G O O G L E</div>');
     echo '<div type="button" id="map_knopke" value="Карта Google" title="Карта Google" style="
        position:fixed;
        top:250px;
        right: -37px;
        z-index:200;
        line-height:1em;
        border:1px solid black;
        background-color:#356B83;
        background-image:linear-gradient(to bottom, #609EB9, #356B83);
        border-color: #356B83 #356B83 #002A80;
        transform: rotate(90deg);
        -webkit-transform: rotate(90deg);
        -o-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        color:white;
        padding:5px;
        font-size: 15px;
        border-radius: 3px;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
        cursor:pointer;">Карта Google</div>';
     echo '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>';
     echo '<script type="text/javascript" src="https://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.11/src/infobox.js"></script>';
     echo "<script src='custom/modules/Realty/js/listview.js'></script>";
 }
Ejemplo n.º 7
0
 function display()
 {
     $smarty = new Sugar_Smarty();
     parent::display();
     $db = DBManagerFactory::getInstance();
     $myquery = 'SELECT tab4.first_name fname, tab4.last_name lname, tab1.date_modified, tab3.next_rx_refill_due_c refill, tab2.pat patid, tab5.mrn_c mrn FROM reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3, reg_patient tab4, reg_patient_cstm tab5 WHERE tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb AND tab4.id = tab2.pat AND tab5.id_c = tab4.id UNION SELECT tab4a.first_name fname, tab4a.last_name lname, null datemod, null refill, tab4a.id patid, tab5a.mrn_c mrn FROM reg_patient  tab4a , reg_patient_cstm tab5a where tab4a.id not in (select reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c )and tab4a.id = tab5a.id_c ORDER BY refill DESC';
     if ($_POST['mysort'] == 'week') {
         $myquery = 'SELECT tab4.first_name fname, tab4.last_name lname, tab1.date_modified, tab3.next_rx_refill_due_c refill, tab2.pat patid, tab5.mrn_c mrn FROM reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3, reg_patient tab4, reg_patient_cstm tab5 WHERE tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb AND tab4.id = tab2.pat AND tab5.id_c = tab4.id  AND tab3.next_rx_refill_due_c BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 7 DAY) ';
     }
     $result = $db->query($myquery);
     while ($row = $db->fetchRow($result)) {
         $mydata[] = $row;
     }
     $smarty->assign("mydata", $mydata);
     $db1 = DBManagerFactory::getInstance();
     $provquery = 'SELECT p1b.name provname  from reg_provider p1b';
     $resultprov = $db1->query($provquery);
     while ($provrow = $db1->fetchRow($resultprov)) {
         $provdata[] = $provrow;
     }
     $smarty->assign("provdata", $provdata);
     $smarty->display($this->lv->tpl);
 }
Ejemplo n.º 8
0
 public function display()
 {
     $GLOBALS['log']->info("JrMis_DepartmentsViewList.display");
     $GLOBALS['log']->debug("JrMis_DepartmentsViewList.display, this: " . print_r($this, TRUE));
     global $app_list_strings;
     $province_list = array();
     $city_list = array();
     $province_list[''] = '';
     $province_list = array_merge($province_list, $app_list_strings['jrmis_province_list']);
     $city_list[''] = '';
     $GLOBALS['log']->debug("JrMis_DepartmentsViewList.display, city_list: " . print_r($city_list, TRUE));
     $this->ss->assign('PROVINCE_LIST', $province_list);
     $this->ss->assign('CITY_LIST', $city_list);
     parent::display();
 }
Ejemplo n.º 9
0
    function display()
    {
        global $mod_strings, $sugar_config;
        $bean = BeanFactory::getBean('xeBayAccounts');
        $ebay_account_options = "<select name='ebay_account_name' id='ebay_account_name' title=''>";
        $resp = $bean->get_list("", "ebay_auth_token<>''", 0, -1, -1, 0, false, array('name'));
        if ($resp['row_count'] > 0) {
            $ebay_account_options = "<select name='ebay_account_name' id='ebay_account_name' title=''>";
            if ($resp['row_count'] > 1) {
                $ebay_account_options .= "<option value='All'>All</option>";
            }
            foreach ($resp['list'] as &$account) {
                $name = $account->name;
                $ebay_account_options .= "<option value='{$name}'>{$name}</option>";
            }
        }
        $ebay_account_options .= "</select>";
        $express_carrier_options = get_select_options_with_id(getExpressCarrierDropDown(), isset($sugar_config['ebay_express_carrier']) ? $sugar_config['ebay_express_carrier'] : 'default');
        $shortcuts_unhandled = <<<EOF
<script>
var OO = {};
OO.get = YAHOO.util.Dom.get;
OO.importorderDialog = false;\t
OO.toggle_importorder = function (){
\tvar sd = OO.get("importorder_dialog");
\tif(!OO.importorderDialog){\t
\t\tOO.importorderDialog = new YAHOO.widget.Dialog("importorder_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.importorderDialog.cancel();} } );
\t\tOO.importorderDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.importorderDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_importorder").reset();
\t});
\tsd.style.display = "block";\t
\tOO.importorderDialog.render();
\tOO.importorderDialog.show();
}
OO.printallDialog = false;\t
OO.toggle_printall = function (){
\tvar sd = OO.get("printall_dialog");
\tif(!OO.printallDialog){\t
\t\tOO.printallDialog = new YAHOO.widget.Dialog("printall_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.printallDialog.cancel();} } );
\t\tOO.printallDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.printallDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_printall").reset();
\t});
\tsd.style.display = "block";\t
\tOO.printallDialog.render();
\tOO.printallDialog.show();
}
OO.exportallDialog = false;\t
OO.toggle_exportall = function (){
\tvar sd = OO.get("exportall_dialog");
\tif(!OO.exportallDialog){\t
\t\tOO.exportallDialog = new YAHOO.widget.Dialog("exportall_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.exportallDialog.cancel();} } );
\t\tOO.exportallDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.exportallDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_exportall").reset();
\t});
\tsd.style.display = "block";\t
\tOO.exportallDialog.render();
\tOO.exportallDialog.show();
}
OO.completeallDialog = false;\t
OO.toggle_completeall = function (){
\tvar sd = OO.get("completeall_dialog");
\tif(!OO.completeallDialog){\t
\t\tOO.completeallDialog = new YAHOO.widget.Dialog("completeall_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.completeallDialog.cancel();} } );
\t\tOO.completeallDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.completeallDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_completeall").reset();
\t});
\tsd.style.display = "block";\t
\tOO.completeallDialog.render();
\tOO.completeallDialog.show();
}
function automessage()
{
   var href="index.php?module=xeBayOrders&action=automessage&eturn_module=xeBayOrders&return_action=index";
   window.location.href=href;
}
</script> 
<div id="importorder_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_IMPORT_TITLE']}</div>
\t<div class="bd">
\t<form name="importorder" id="form_importorder" method="POST" action="index.php?module=xeBayOrders&action=importorder">
\t\t<table class='edit view tabForm'>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top" width="55%">
\t\t\t\t\t{$mod_strings['LBL_EBAY_ACCOUNT']}
\t\t\t\t</td>
\t\t\t\t<td width="45%">\t
\t\t\t\t\t<input type="hidden" name="ebay_account_name" value="">{$ebay_account_options}
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_NUMBER_OF_DAYS']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="number_of_days" value="">
\t\t\t        <select name='number_of_days' id='number_of_days' title=''>
\t\t\t\t        <option value='1'>1</option>
\t\t\t\t        <option value='2' selected>2</option>
\t\t\t\t        <option value='3'>3</option>
\t\t\t\t        <option value='5'>5</option>
\t\t\t\t        <option value='7'>7</option>
\t\t\t\t        <option value='15'>15</option>
\t\t\t\t        <option value='30'>30</option>
\t\t\t\t        <option value='90'>90</option>
\t\t\t        </select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-importorderDialog" class="button" type="button" onclick="OO.get('form_importorder').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-importorderDialog" class="button" type="button" onclick="OO.importorderDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
<div id="printall_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_PRINTALL_TITLE']}</div>
\t<div class="bd">
\t<form name="printall" id="form_printall" method="POST" action="index.php?module=xeBayOrders&action=printall">
\t\t<table class='edit view tabForm'>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top" width="55%">
\t\t\t\t\t{$mod_strings['LBL_STOCKOUT_CHECKED']}
\t\t\t\t</td>
\t\t\t\t<td width="45%">\t
\t\t\t\t\t<input type="hidden" name="stockout_checked" value="">
\t\t\t\t\t<input type="checkbox" id="stockout_checked" name="stockout_checked" checked value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_AUTO_MERGE']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="automerge" value="">
\t\t\t\t\t<input type="checkbox" id="automerge" name="automerge" checked value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_PRINTED_ORDER_INCLUDED']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="printed_order_included" value="">
\t\t\t\t\t<input type="checkbox" id="printed_order_included" name="printed_order_included" value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-printallDialog" class="button" type="button" onclick="OO.get('form_printall').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-printallDialog" class="button" type="button" onclick="OO.printallDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
<div id="exportall_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_EXPORTALL_TITLE']}</div>
\t<div class="bd">
\t<form name="exportall" id="form_exportall" method="POST" action="index.php?module=xeBayOrders&action=exportall">
\t\t<table class='edit view tabForm'>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top" width="55%">
\t\t\t\t\t{$mod_strings['LBL_STOCKOUT_CHECKED']}
\t\t\t\t</td>
\t\t\t\t<td width="45%">\t
\t\t\t\t\t<input type="hidden" name="stockout_checked" value="">
\t\t\t\t\t<input type="checkbox" id="stockout_checked" name="stockout_checked" checked value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_AUTO_MERGE']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="automerge" value="">
\t\t\t\t\t<input type="checkbox" id="automerge" name="automerge" checked value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_PRINTED_ORDER_INCLUDED']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="printed_order_included" value="">
\t\t\t\t\t<input type="checkbox" id="printed_order_included" name="printed_order_included" checked value="1" tabindex="">
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_EXPRESS_CARRIER']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type='hidden' name='express_carrier' value='0'>
\t\t\t\t\t<select name='express_carrier'>{$express_carrier_options}</select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-exportallDialog" class="button" type="button" onclick="OO.get('form_exportall').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-exportallDialog" class="button" type="button" onclick="OO.exportallDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
<div id="completeall_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_COMPLETEALL_TITLE']}</div>
\t<div class="bd">
\t<form name="completeall" id="form_completeall" method="POST" action="index.php?module=xeBayOrders&action=completeall">
\t\t<table class='edit view tabForm'>
\t\t\t\t<tr>
\t\t\t\t\t<td scope="row" valign="top" width="55%">
\t\t\t\t\t\t{$mod_strings['LBL_UNPRINTED_ORDER_INCLUDED']}
\t\t\t\t\t</td>
\t\t\t\t\t<td width="45%">\t
\t\t\t\t\t\t<input type="hidden" name="unprinted_order_included" value="">
\t\t\t\t\t\t<input type="checkbox" id="unprinted_order_included" name="unprinted_order_included" checked value="1" tabindex="">
\t\t\t\t\t</td>
\t\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-completeallDialog" class="button" type="button" onclick="OO.get('form_completeall').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-completeallDialog" class="button" type="button" onclick="OO.completeallDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_IMPORT_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_IMPORT']}" id="import_order" onclick="OO.toggle_importorder()">
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_PRINT_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_PRINT_ALL']}" id="print_all" onclick="OO.toggle_printall()">
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_EXPORT_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_EXPORT_ALL']}" id="export_all" onclick="OO.toggle_exportall()">
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_COMPLERE_ALL_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_COMPLERE_ALL']}" id="complete_all" onclick="OO.toggle_completeall()">
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_AUTO_MESSAGE_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_AUTO_MESSAGE']}" id="auto_message" onclick="return automessage()">
<br/>
<br/>
EOF;
        $result = $GLOBALS['db']->query("SELECT count(*) c FROM xeBayOrders WHERE handled_status = 'unhandled' AND deleted = 0");
        $assoc = $GLOBALS['db']->fetchByAssoc($result);
        $lbl_list_unhandled = $mod_strings['LNK_LIST_UNHANDLED'] . '(<span style="color:red">' . $assoc['c'] . '</span>)';
        $result = $GLOBALS['db']->query("SELECT count(*) c FROM xeBayOrders WHERE handled_status = 'handled' AND deleted = 0");
        $assoc = $GLOBALS['db']->fetchByAssoc($result);
        $lbl_list_handled = $mod_strings['LNK_LIST_HANDLED'] . '(<span style="color:red">' . $assoc['c'] . '</span>)';
        $result = $GLOBALS['db']->query("SELECT count(*) c FROM xeBayOrders WHERE handled_status = 'suspended' AND deleted = 0");
        $assoc = $GLOBALS['db']->fetchByAssoc($result);
        $lbl_list_suspended = $mod_strings['LNK_LIST_SUSPENDED'] . '(<span style="color:red">' . $assoc['c'] . '</span>)';
        $result = $GLOBALS['db']->query("SELECT count(*) c FROM xeBayOrders WHERE handled_status = 'deleted' AND deleted = 0");
        $assoc = $GLOBALS['db']->fetchByAssoc($result);
        $lbl_list_deleted = $mod_strings['LNK_LIST_DELETED'] . '(<span style="color:red">' . $assoc['c'] . '</span>)';
        switch ($_REQUEST['handled_status_advanced'][0]) {
            case 'handled':
                $lbl_list_handled = "<b>{$lbl_list_handled}</b>";
                break;
            case 'suspended':
                $lbl_list_suspended = "<b>{$lbl_list_suspended}</b>";
                break;
            case 'deleted':
                $lbl_list_deleted = "<b>{$lbl_list_deleted}</b>";
                break;
            case 'unhandled':
                $lbl_list_unhandled = "<b>{$lbl_list_unhandled}</b>";
                break;
            default:
                break;
        }
        if (isset($this->options['show_title']) && $this->options['show_title']) {
            echo $shortcuts_unhandled;
            echo "{$lbl_list_unhandled}&nbsp{$lbl_list_handled}&nbsp{$lbl_list_suspended}&nbsp{$lbl_list_deleted}<br/>";
        }
        parent::display();
    }
Ejemplo n.º 10
0
 public function display()
 {
     parent::display();
 }
Ejemplo n.º 11
0
    function display()
    {
        global $mod_strings, $sugar_config;
        $bean = BeanFactory::getBean('xeBayAccounts');
        $ebay_account_options = "<select name='ebay_account_name' id='ebay_account_name' title=''>";
        $resp = $bean->get_list("", "ebay_auth_token<>''", 0, -1, -1, 0, false, array('name'));
        if ($resp['row_count'] > 0) {
            $ebay_account_options = "<select name='ebay_account_name' id='ebay_account_name' title=''>";
            if ($resp['row_count'] > 1) {
                $ebay_account_options .= "<option value='All'>All</option>";
            }
            foreach ($resp['list'] as &$account) {
                $name = $account->name;
                $ebay_account_options .= "<option value='{$name}'>{$name}</option>";
            }
        }
        $ebay_account_options .= "</select>";
        $shortcuts = <<<EOF
<script>
var OO = {};
OO.get = YAHOO.util.Dom.get;
OO.checkDialog = false;\t
OO.toggle_check = function (){
\tvar sd = OO.get("check_dialog");
\tif(!OO.checkDialog){\t
\t\tOO.checkDialog = new YAHOO.widget.Dialog("check_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.checkDialog.cancel();} } );
\t\tOO.checkDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.checkDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_check").reset();
\t});
\tsd.style.display = "block";\t
\tOO.checkDialog.render();
\tOO.checkDialog.show();
}
</script> 
<div id="check_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_CHECK_TITLE']}</div>
\t<div class="bd">
\t<form name="check" id="form_check" method="POST" action="index.php?module=xeBayMessages&action=check">
\t\t<table class='edit view tabForm'>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top" width="55%">
\t\t\t\t\t{$mod_strings['LBL_EBAY_ACCOUNT']}
\t\t\t\t</td>
\t\t\t\t<td width="45%">\t
\t\t\t\t\t<input type="hidden" name="ebay_account_name" value="">{$ebay_account_options}
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_NUMBER_OF_DAYS']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="number_of_days" value="">
\t\t\t        <select name='number_of_days' id='number_of_days' title=''>
\t\t\t\t        <option value='1'>1</option>
\t\t\t\t        <option value='2' selected>2</option>
\t\t\t\t        <option value='3'>3</option>
\t\t\t\t        <option value='5'>5</option>
\t\t\t\t        <option value='7'>7</option>
\t\t\t\t        <option value='15'>15</option>
\t\t\t\t        <option value='30'>30</option>
\t\t\t\t        <option value='90'>90</option>
\t\t\t        </select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top">
\t\t\t\t\t{$mod_strings['LBL_MESSAGE_STATUS']}
\t\t\t\t</td>
\t\t\t\t<td>\t
\t\t\t\t\t<input type="hidden" name="message_status" value="">
\t\t\t        <select name='message_status' id='message_status' title=''>
\t\t\t\t        <option value=''></option>
\t\t\t\t        <option value='Unanswered' selected>{$mod_strings['LBL_UNANSWERED']}</option>
\t\t\t\t        <option value='Answered'>{$mod_strings['LBL_ANSWERED']}</option>
\t\t\t        </select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-checkDialog" class="button" type="button" onclick="OO.get('form_check').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-checkDialog" class="button" type="button" onclick="OO.checkDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_CHECK_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_CHECK']}" id="check_btn" onclick="OO.toggle_check()">
<br/>
<br/>
EOF;
        echo $shortcuts;
        parent::display();
    }
Ejemplo n.º 12
0
 function display()
 {
     $smarty = new Sugar_Smarty();
     parent::display();
     $db = DBManagerFactory::getInstance();
     $myquery = 'SELECT tab4.first_name fname, tab4.last_name lname, tab1.date_modified, tab3.next_rx_refill_due_c refill, tab2.pat patid, tab5.mrn_c mrn FROM reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3, reg_patient tab4, reg_patient_cstm tab5 WHERE tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb AND tab4.id = tab2.pat AND tab5.id_c = tab4.id UNION SELECT tab4a.first_name fname, tab4a.last_name lname, null datemod, null refill, tab4a.id patid, tab5a.mrn_c mrn FROM reg_patient  tab4a , reg_patient_cstm tab5a where tab4a.id not in (select reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c )and tab4a.id = tab5a.id_c ORDER BY refill DESC';
     $select_base = 'SELECT tab4.first_name fname, tab4.last_name lname,  tab5.mrn_c mrn, tab4.id patid ';
     $from_base = ' FROM reg_patient tab4, reg_patient_cstm tab5';
     $where_base = ' WHERE tab5.id_c = tab4.id ';
     $select_refill = ' , DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") refill,  DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts ';
     $from_refill = ' , reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3 ';
     $where_refill = ' AND tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb  AND tab4.id = tab2.pat ';
     $select_norefill = ', ( SELECT tab1.reg_patient_reg_encounterreg_encounter_idb enclink  FROM reg_patient_reg_encounter_c tab1 WHERE  tab1.reg_patient_reg_encounterreg_patient_ida = patid AND tab1.date_modified = (SELECT max( date_modified ) dat FROM reg_patient_reg_encounter_c enc1 WHERE  enc1.reg_patient_reg_encounterreg_patient_ida = patid) )  enclink, ( SELECT DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") ref1 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  refill,  ( SELECT DATE_FORMAT(tab3.next_uts_due_c,"%m/%d/%Y") uts11 FROM reg_encounter_cstm tab3 where tab3.id_c = enclink )  uts ';
     $select_noprovider = ', (SELECT p1b.name provname  from reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname ';
     $select_provider = ' ,p1b.name provname';
     $from_provider = ' ,reg_provider p1b, reg_provider_reg_patient_c p2b ';
     $where_provider = ' AND p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = tab4.id ';
     $testselect = $select_base;
     $testfrom = $from_base;
     $testwhere = $where_base;
     //when week filter need to add week interval
     //when provfilter need to add prov
     //if ($_POST['mysort'] == 'week')
     if (!empty($_POST['mysort']) and $_POST['mysort'] != 'all' and $_POST['mysort'] != 'none') {
         $testselect .= $select_refill;
         $testfrom .= $from_refill;
         if ($_POST['mysort'] != 'cust') {
             $testwhere .= $where_refill . ' AND tab3.next_rx_refill_due_c BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL ' . $_POST['mysort'] . ' DAY) ';
         } else {
             $testwhere .= $where_refill . ' AND tab3.next_rx_refill_due_c BETWEEN str_to_date("' . $_POST['last_pcp_visit_c1'] . '", "%m/%d/%Y") AND str_to_date("' . $_POST['last_pcp_visit_c2'] . '", "%m/%d/%Y") ';
         }
     } else {
         $testselect .= $select_norefill;
     }
     if (!empty($_POST['provsort']) and $_POST['provsort'] != "none") {
         $testselect .= $select_provider;
         $testfrom .= $from_provider;
         $testwhere .= $where_provider . " AND p1b.name = '" . $_POST['provsort'] . "' ";
     } else {
         $testselect .= $select_noprovider;
     }
     $testquery = $testselect . $testfrom . $testwhere . ' ORDER BY refill DESC, provname  ASC';
     //var_dump($testquery);
     //$myquery = 'SELECT tab4.first_name fname, tab4.last_name lname, tab1.date_modified, DATE_FORMAT(tab3.next_rx_refill_due_c,"%m/%d/%Y") refill, tab2.pat patid, tab5.mrn_c mrn, p1b.name provname FROM reg_patient_reg_encounter_c tab1, ( SELECT max( date_modified ) dat, reg_patient_reg_encounterreg_patient_ida pat FROM reg_patient_reg_encounter_c GROUP BY reg_patient_reg_encounterreg_patient_ida) tab2, reg_encounter_cstm tab3, reg_patient tab4, reg_patient_cstm tab5, reg_provider p1b, reg_provider_reg_patient_c p2b  WHERE tab1.date_modified = tab2.dat AND tab1.reg_patient_reg_encounterreg_patient_ida = tab2.pat AND tab3.id_c = tab1.reg_patient_reg_encounterreg_encounter_idb AND tab4.id = tab2.pat AND tab5.id_c = tab4.id  AND p2b.reg_provider_reg_patientreg_provider_ida = p1b.id  AND p2b.reg_provider_reg_patientreg_patient_idb = tab4.id ';
     //if ($_POST['mysort'] == 'week') $myquery.= ' AND tab3.next_rx_refill_due_c BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 60 DAY) ';
     //if (!empty($_POST['provsort']) AND $_POST['provsort'] != "none") $myquery.= " AND p1b.name = '" . $_POST['provsort'] . "' ";
     //var_dump($_POST);
     //var_dump($myquery);
     $result = $db->query($testquery);
     $mydata[] = "";
     while ($row = $db->fetchRow($result)) {
         $mydata[] = $row;
     }
     $smarty->assign("mydata", $mydata);
     //query for all providers
     $db1 = DBManagerFactory::getInstance();
     $provquery = 'SELECT p1b.name provname  from reg_provider p1b';
     $resultprov = $db1->query($provquery);
     $provdata[] = "";
     while ($provrow = $db1->fetchRow($resultprov)) {
         $provdata[] = $provrow;
     }
     $smarty->assign("provdata", $provdata);
     $smarty->display($this->lv->tpl);
 }
Ejemplo n.º 13
0
 public function display()
 {
     parent::display();
     $this->seed->displayCronInstructions();
 }
Ejemplo n.º 14
0
    function display()
    {
        global $mod_strings, $sugar_config;
        $shortcuts = <<<EOF
<script>
var OO = {};
OO.get = YAHOO.util.Dom.get;
OO.importlistDialog = false;\t
OO.toggle_importlist = function (){
\tvar sd = OO.get("importlist_dialog");
\tif(!OO.importlistDialog){\t
\t\tOO.importlistDialog = new YAHOO.widget.Dialog("importlist_dialog",{
\t\t\t  \tfixedcenter: true,
\t\t\t  \tdraggable: false,
\t\t\t  \tvisible : false, 
\t\t\t \tmodal : true,
\t\t\t  \tclose: true
\t\t});
\t\tvar listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { OO.importlistDialog.cancel();} } );
\t\tOO.importlistDialog.cfg.queueProperty("keylisteners", listeners);
\t}
\tOO.importlistDialog.cancelEvent.subscribe(function(e, a, o){
\t\tOO.get("form_importlist").reset();
\t});
\tsd.style.display = "block";\t
\tOO.importlistDialog.render();
\tOO.importlistDialog.show();
}
</script> 
<div id="importlist_dialog" style="width: 450px; display: none;">
\t<div class="hd">{$mod_strings['LBL_IMPORT_TITLE']}</div>
\t<div class="bd">
\t<form name="importlist" id="form_importlist" method="POST" action="index.php?module=xeBaySellerSurveys&action=importlist">
\t\t<table class='edit view tabForm'>
\t\t\t<tr>
\t\t\t\t<td scope="row" valign="top" width="25%">
\t\t\t\t\t{$mod_strings['LBL_EBAY_ACCOUNT']}
\t\t\t\t</td>
\t\t\t\t<td width="45%">
\t\t\t\t\t<input type="text" name="user_id" id="user_id" value="" />
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</form>
\t<div style="text-align: right;">
\t\t<button id="btn-save-importlistDialog" class="button" type="button" onclick="OO.get('form_importlist').submit()">{$mod_strings['LBL_APPLY_BUTTON']}</button>&nbsp;
\t\t<button id="btn-cancel-importlistDialog" class="button" type="button" onclick="OO.importlistDialog.cancel()">{$mod_strings['LBL_CANCEL_BUTTON']}</button>&nbsp;
\t</div>
\t</div>
</div>
&nbsp;&nbsp;
<input title="{$mod_strings['LBL_IMPORT_TIPS']}"  class="button" type="submit" name="button" value="{$mod_strings['LBL_IMPORT']}" id="import_order" onclick="OO.toggle_importlist()">
<br/>
<br/>
EOF;
        // echo $shortcuts;
        parent::display();
    }
Ejemplo n.º 15
0
 public function testdisplay()
 {
     $view = new ViewList();
     //test without setting bean attibute. it shuold return no access html.
     ob_start();
     $view->display();
     $renderedContent1 = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent1));
     //test with bean, seed and other arrtibutes set. it shuold return html.
     $view->bean = new User();
     $view->seed = new User();
     $view->module = 'Users';
     $view->prepareSearchForm();
     $view->preDisplay();
     ob_start();
     $view->display();
     $renderedContent2 = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent2));
 }
Ejemplo n.º 16
0
 function display()
 {
     echo '<form method="POST" action="index.php?module=REG_Patient&action=topcare">Choose an option to filter:	<select name="mysort" onchange="this.form.submit()"><option value="none"></option><option value="all">All Refills</option><option value="week">Next Seven Days</option></select></form>';
     parent::display();
 }
Ejemplo n.º 17
0
    function display()
    {
        global $mod_strings;
        $javascript = <<<EOF
<script>
function open_popup_preview(id)
{
\tif (typeof(popupCount) == "undefined" || popupCount == 0)
\t   popupCount = 1;

\t//globally changing width and height of standard pop up window from 600 x 400 to 800 x 800
\twidth = 1024;
\theight = 600;

\t// launch the popup
\tURL = 'index.php?'
\t\t+ 'module=xeBayListings'
\t\t+ '&action=preview'
\t\t+ '&record=' + id;

\twindowName = 'Seller List Preview' + '_popup_window' + popupCount;
\tpopupCount++;

\twindowFeatures = 'width=' + width
\t\t+ ',height=' + height
\t\t+ ',resizable=1,scrollbars=1';

\twin = SUGAR.util.openWindow(URL, windowName, windowFeatures);

\tif(window.focus)
\t{
\t\t// put the focus on the popup if the browser supports the focus() method
\t\twin.focus();
\t}

\twin.popupCount = popupCount;

\treturn win;
}
</script> 
EOF;
        echo $javascript;
        parent::display();
    }