Пример #1
0
 /**
  * Last method to run if another methods not found
  * @param string $action
  */
 public function _action($action)
 {
     if ($action == $this->_widgetAction) {
         $this->preloadWidgets();
         $actions = $this->_relativeUri->getPath();
         array_shift($actions);
         $widgetId = array_shift($actions);
         if ($widget = widgets::get($widgetId, false)) {
             $widget->setWidgetMode();
             $widget->run();
             exit;
         } else {
             widgets::dump();
             echo '<hr />';
             var_dump($this->_relativeUri->getPath());
             throw new Exception('widget ' . $widgetId . ' not found at ' . $_SERVER['REQUEST_URI']);
         }
         //var_dump($this->_relativeUri);
     }
     return response::notFound();
 }
Пример #2
0
<?
    ob_start();
    session_start();
    include('globals.php');
    include('layout/class.widgets.php');      
    include('scripts/class.querydb.php');

    $widconn = new widgets();
    $queryconn = new querydb();

	if($_POST[sel_class]!=0):
	//	$queryconn->init_set_vars($_POST[sel_class],$_POST[sel_ques]);
		$_SESSION[cat] = $_POST[sel_class];
	endif;

	if($_POST[sel_ques]!=0):
		$_SESSION[ques] = $_POST[sel_ques];
	endif;	
	
?>


<html>
<head>
<title>CHITS QUERY BROWSER</title>

<script language="JavaScript">

function autoSubmit()
{
	var formObject = document.forms['form_cat'];
Пример #3
0
" name="form_widget_<?php 
echo $widget->id_name();
?>
" method="post" action="<?php 
echo Route::url('oc-panel', array('controller' => 'widget', 'action' => 'save'));
?>
" >
                    
                    <div class="form-group">
                        <label class="control-label col-sm-4" for="placeholder_form"><?php 
echo __('Where do you want the widget displayed?');
?>
</label>
                        <div class="col-sm-5">
                            <?php 
echo FORM::select('placeholder', array_combine(widgets::get_placeholders(TRUE), widgets::get_placeholders(TRUE)), $widget->placeholder);
?>
                        </div>
                    </div>

            		<?php 
foreach ($tags as $tag) {
    ?>
                        <div class="form-group">
                            <?php 
    echo $tag;
    ?>
                        </div>
            		<?php 
}
?>
Пример #4
0
 /**
  * saves current widget data into the DB config
  * @param string $old_placeholder
  * @return boolean 
  */
 public function save($old_placeholder = NULL)
 {
     //stores $data array as json in the config. We need the placeholder?
     $save = array('class' => get_class($this), 'created' => time(), 'placeholder' => $this->placeholder, 'data' => $this->data);
     //since was not loaded we assume is new o generate a new name that doesn't exists
     if (!$this->loaded) {
         $this->widget_name = $this->gen_name();
     }
     // save widget to DB
     $confw = new Model_Config();
     $confw->where('group_name', '=', 'widget')->where('config_key', '=', $this->widget_name)->limit(1)->find();
     if (!$confw->loaded()) {
         $confw->group_name = 'widget';
         $confw->config_key = $this->widget_name;
     }
     $confw->config_value = json_encode($save);
     try {
         $confw->save();
         //remove from previous placeholder, only if they are different
         if ($this->placeholder !== $old_placeholder and $old_placeholder !== NULL) {
             $confp = new Model_Config();
             $confp->where('group_name', '=', 'placeholder')->where('config_key', '=', $old_placeholder)->limit(1)->find();
             if ($confp->loaded()) {
                 $confp->group_name = 'placeholder';
                 $confp->config_key = $old_placeholder;
                 //remove the key
                 $wid = json_decode($confp->config_value);
                 $key = array_search($this->widget_name, $wid);
                 if ($key !== FALSE) {
                     unset($wid[$key]);
                 }
                 $confp->config_value = json_encode($wid);
                 $confp->save();
             }
         }
         //adding the widget to the placeholder
         //get widgets in the placeholder array
         $w_placeholders = widgets::get($this->placeholder, TRUE);
         //if name exists in placeholder don't change anything
         if (!in_array($this->widget_name, $w_placeholders)) {
             //if doesnt exists add it to the end and save
             $w_placeholders[] = $this->widget_name;
             // save palceholder to DB
             $confp = new Model_Config();
             $confp->where('group_name', '=', 'placeholder')->where('config_key', '=', $this->placeholder)->limit(1)->find();
             if (!$confp->loaded()) {
                 $confp->group_name = 'placeholder';
                 $confp->config_key = $this->placeholder;
             }
             $confp->config_value = json_encode($w_placeholders);
             $confp->save();
         }
         $this->loaded = TRUE;
         return TRUE;
     } catch (Exception $e) {
         throw HTTP_Exception::factory(500, $e->getMessage());
     }
     return FALSE;
 }
Пример #5
0
  <a href="?route=widgets.php&amp;zone=' . $zone_id . '&amp;id=' . $ID . '&amp;add&amp;token=' . $token . '">' . $LANG['add'] . '</a>
  </div>';
            if (!empty($widget['description'])) {
                echo '<div style="color: #000; font-size: 13px; margin-top: 10px;">' . $widget['description'] . '</div>';
            }
            echo '</li>';
        }
        echo '</ul>

<ul class="elements-list el-two">

<li class="head">' . htmlspecialchars($zone['name']) . '
<span>' . (empty($zone['description']) ? $LANG['widgets_no_description'] : htmlspecialchars($zone['description'])) . '</span></li>';
        if (empty($zone_widgets)) {
            echo '<li>' . $LANG['widgets_no_widgets'] . '</li>';
        } else {
            foreach ($zone_widgets as $widget) {
                echo '<li>
  <div class="info-div">' . widgets::widget_from_id($widget['widget_id'])->name . '</div>
  <div class="options">
  <a href="?route=widgets.php&amp;action=edit&amp;id=' . $widget['ID'] . '">' . $LANG['edit'] . '</a>
  <a href="?route=widgets.php&amp;zone=' . $zone_id . '&amp;id=' . $widget['ID'] . '&amp;delete&amp;token=' . $token . '">' . $LANG['delete'] . '</a>
  </div>
  </li>';
            }
        }
        echo '</ul>

</div>';
        break;
}
Пример #6
0
<?php

ob_start();
session_start();
include 'globals.php';
include 'layout/class.widgets.php';
include 'scripts/class.querydb.php';
//include('scripts/dbcleanup.php');
$widconn = new widgets();
$queryconn = new querydb();
//$cleanup = new dbcleanup();
if ($_POST[sel_class] != 0) {
    //	$queryconn->init_set_vars($_POST[sel_class],$_POST[sel_ques]);
    $_SESSION[cat] = $_POST[sel_class];
}
if ($_POST[sel_ques] != 0) {
    $_SESSION[ques] = $_POST[sel_ques];
}
?>

<link rel=StyleSheet href="design.css" type="text/css">
<html>
<head>
<title>QUERY BROWSER -- Report Generator for Philippine Health Programs</title>

<script language="JavaScript">

function autoSubmit()
{
	var formObject = document.forms['form_cat'];
	if(formObject!=0){
Пример #7
0
 /**
  * returns placeholders names + widgets
  * @param bool $only_names, returns only an array with the placeholders names, if not array with widgets instances
  * @return array 
  */
 public static function get_placeholders($only_names = FALSE)
 {
     $placeholders = array();
     $list = array_unique(array_merge(widgets::$default_placeholders, widgets::$theme_placeholders));
     //This is a forced placeholders for those widgets that we don't want to lose.
     $list[] = 'inactive';
     if ($only_names) {
         return $list;
     }
     //get the widgets for the placeolders
     foreach ($list as $placeholder) {
         $placeholders[$placeholder] = widgets::get($placeholder);
     }
     return $placeholders;
 }
Пример #8
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
/**
 * initiating the Widgets modules
 *
 */
/**
 * placeholders that exists in the default module
 * @var array
 */
widgets::$default_placeholders = array('sidebar');
Пример #9
0
<?php

defined('SYSPATH') or die('No direct script access.');
?>
<hr>

<footer>
<div class="row">
<?php 
foreach (widgets::get('footer') as $widget) {
    ?>
<div class="col-md-3">
    <?php 
    echo $widget->render();
    ?>
</div>
<?php 
}
?>
</div>

<!--This is the license for Open Classifieds, do not remove -->
<div class="center-block">
	<p>&copy;
	<?php 
if (Theme::get('premium') != 0) {
    ?>
	    Web Powered by <a href="http://open-classifieds.com?utm_source=<?php 
    echo URL::base();
    ?>
&utm_medium=oc_footer&utm_campaign=<?php 
Пример #10
0
<?php

include "../../common/top_without_includes.php";
include "../../../view/controller/CORE/Utils.php";
include "../../../view/controller/CORE/widgetSystem.php";
$widgets = new widgets();
if ($_REQUEST["callback"] == "getFormula") {
    if ($_REQUEST["widget_id"] != "") {
        $formula = $widgets->getFormulaWidget($_POST["widget_id"], $_POST["widget_condition"], $_POST['img_settings'], $_POST['link_settings'], $_POST["extra_ordering"]);
        echo json_encode(array(1, $formula));
    }
}
if ($_REQUEST["callback"] == "processWidget") {
    echo $widgetProcessed = $widgets->replaceFormulaWithWidget($_POST["formula"]);
}
Пример #11
0
 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
 |                                                                         |
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
include "include/widgets.php";
$thetable = new widgets($db, "tbld:2ad5146c-d4c0-db8e-592a-c0cc2f3c2c21");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Widget";
$phpbms->cssIncludes[] = "pages/base/widgets.css";
//$phpbms->jsIncludes[] = "modules/base/javascript/menu.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("title", $therecord["title"], NULL, true);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$temparray = array("Large Side" => "big", "Smaller Side" => "little");
$theinput = new inputBasiclist("type", $therecord["type"], $temparray, "Area");
Пример #12
0
 public static function available_list($available = array())
 {
     return array_diff_key(widgets::widgets_list(), array_flip($available));
 }
Пример #13
0
<?php

defined('SYSPATH') or die('No direct script access.');
?>
<div class="col-md-3 col-sm-12 col-xs-12"> 
<?php 
foreach (widgets::get('sidebar') as $widget) {
    ?>
    <?php 
    if (get_class($widget) != 'Widget_Contact') {
        ?>
        <div class="category_box_title custom_box">
        </div>
        <div class="well custom_box_content" >
            <?php 
        echo $widget->render();
        ?>
        </div>
   <?php 
    } else {
        ?>
        <?php 
        if (Request::current()->controller() == 'ad' and Request::current()->action() == 'view') {
            ?>
            <div class="category_box_title custom_box">
            </div>
            <div class="well custom_box_content" >
                <?php 
            echo $widget->render();
            ?>
            </div>
Пример #14
0
 <?php 
session_start();
ob_start();
include '../chits_query/layout/class.widgets.php';
$widconn = new widgets();
$dbconn = mysql_connect('localhost', $_SESSION["dbuser"], $_SESSION["dbpass"]) or die("Cannot query 4 " . mysql_error());
mysql_select_db($_SESSION["dbname"], $dbconn) or die("cannot select db");
$arr_px_id = array();
$arr_px_id = unserialize(stripslashes($_GET["id"]));
$cat = stripslashes($_GET["cat"]);
//$arr_date_mc = array("Pregnant Women with 4 or more prenatal visits"=>"Pertains to the prenatal visit date wherein the 1-1-2 format visit has been achieved. This date would fall on the client's 3rd trimester","Pregnant Women given 2 doses of TT"=>"Pertains to the date wherein the 2nd dosage of Tetanus Toxoid was given. The administration should happened during the pregnancy of the client.","Pregnant Women given TT2 plus"=>"Pertains to the date wherein any of the 3rd,4th or 5th Tetanus Toxoid dosage has been given thereby achieving the TT2 plus status. The administration should happened during the pregnancy of the client.","Pregnant given complete iron with folic acid"=>"Pertains to the date wherein the 180 required tablet intakes for Iron with folic acid was completed. The completion of intake should happened during the pregnancy of the client","Pregnant given Vit. A"=>"Pertains to the date wherein the 200,000 IU intakes for Vitamin A was completed. The completion of intake should happened during the pregnancy of the client","Postpartum women with at least 2 PPV"=>"Pertains to the date of the second postpartum visit. To qualify, the first postpartum visit should happened 24 hours within the date of delivery and the second postpartum visit between 4 to 10 days from the date of delivery.","Postpartum women given complete iron"=>"Pertains to the date wherein the Vitamin A intake during postpartum phase was completed. To qualify, the postpartum client should be able to complete 200,000 of Vitamin A within 4 weeks (28 days) from the date of delivery.","Postpartum women given Vit. A"=>"Pertains to the date wherein the iront with folic acid intake during postpartum phase was completed. To qualify, the postpartum client should be able to complete 90 tablets of iron with folic acid within 3 months from the date of delivery.","Postpartum women initiated breastfeeding"=>"Pertains to the date wherein the the first breastfeeding session was done. To qualify, the date of breastfeeding coincide with the date of delivery.");
$arr_date_mc = array("Pregnant Women with 4 or more prenatal visits" => "Pertains to the prenatal visit date wherein the 1-1-2 format visit has been achieved. This date would fall on the client's 3rd trimester", "Pregnant Women given 2 doses of TT" => "Pertains to the date wherein the 2nd dosage of Tetanus Toxoid was given. The administration should happened during the pregnancy of the client.", "Pregnant Women given TT2 plus" => "Pertains to the date wherein any of the 3rd,4th or 5th Tetanus Toxoid dosage has been given thereby achieving the TT2 plus status. The administration should happened during the pregnancy of the client.", "Pregnant given complete iron with folic acid" => "Pertains to the date wherein the 180 required tablet intakes for Iron with folic acid was completed. The completion of intake should happened during the pregnancy of the client", "Pregnant given Vit. A" => "Pertains to the date wherein the 200,000 IU intakes for Vitamin A was completed. The completion of intake should happened during the pregnancy of the client", "Postpartum women with at least 2 PPV" => "Pertains to the date of the second postpartum visit. To qualify, the first postpartum visit should happened 24 hours within the date of delivery and the second postpartum visit between 4 to 10 days from the date of delivery.", "Postpartum women given complete iron" => "Pertains to the date wherein the iront with folic acid intake during postpartum phase was completed. To qualify, the postpartum client should be able to complete 90 tablets of iron with folic acid within 3 months from the date of delivery.", "Postpartum women given Vit. A" => "Pertains to the date wherein the Vitamin A intake during postpartum phase was completed. To qualify, the postpartum client should be able to complete 200,000 of Vitamin A within 4 weeks (28 days) from the date of delivery.", "Postpartum women initiated breastfeeding" => "Pertains to the date wherein the the first breastfeeding session was done. To qualify, the date of breastfeeding coincide with the date of delivery.", "Women 10-49 years old women given iron supplementation" => "", "Number of deliveries" => "Total number of NSD deliveries recorded.", "Number of pregnant women" => "Refers to the active pregnancies during the month being queried. Active pregnancy is between the last menstual period until the EDC or date of delivery.", "Number of pregnant women tested for syphilis" => "Pregnant women tested for syphilis as recorded under the MC Services", "Number of pregnant women positive for syphilis" => "Pregnant women tested positive for Syphilis. Recorded by checking the result checkbox in the MC services.", "Number of pregnant women given penicillin" => "Pregnant women given penicillin as recorded under the MC Services.");
$arr_date_epi = array("BCG" => "Pertains to the date wherein the BCG vaccine was administered", "DPT1" => "Pertains to the date wherein the DPT1 vaccine was administered", "BCG" => "Pertains to the date wherein the BCG vaccine was administered", "DPT2" => "Pertains to the date wherein the DPT2 vaccine was administered", "DPT3" => "Pertains to the date wherein the DPT3 vaccine was administered", "OPV1" => "Pertains to the date wherein the OPV1 vaccine was administered", "OPV2" => "Pertains to the date wherein the OPV2 vaccine was administered", "OPV3" => "Pertains to the date wherein the OPV3 vaccine was administered", "Hepa B1 w/in 24 hrs" => "Pertains to the date wherein the Hepa B1 w/in 24 hours vaccine was administered. To qualify, Hepa B1 should have been given at the date of birth or the day after.", "Hepa B1 > 24 hrs" => "Pertains to the date wherein the Hepa B1 more than 24 hours vaccine was administered.", "Hepatitis B2" => "Pertains to the date wherein the Hepa B2 vaccine was administered", "Hepatitis B3" => "Pertains to the date wherein the Hepa B3 vaccine was administered", "Measles" => "Pertains to the date wherein the Measles vaccine was administered", "Rotavirus" => "Pertains to the date wherein the Rotavirus vaccine was administered", "Rotavirus 2" => "Pertains to the date wherein the Rotavirus 2 vaccine was administered", "Fully Immunized Child" => "Pertains to the date wherein child was fully immunized. To qualify, all 11 antigens should have been provided before the age of 1. The last antigen that was administered to make the child FIC will be the basis of the FIC date", "Completely Immunized Child (12-23 mos)" => "Pertains to the date wherein child was completely immunized. To qualify, all 11 antigens should have been provided more than the age of 1. The last antigen that was administered to make the child CIC will be the basis of the CIC date");
$arr_date_fp = array("Date of Registration" => "Pertains to the date wherein the client was enrolled into the method.");
$i = 1;
if (!empty($_SESSION["arr_px_labels"])) {
    echo "<a href='javascript: history.go(-1)'><< Back to the Query Browser</a>";
    echo "<table><tr><td valign='top'>";
    echo "<table width='650' border='1' style=\"font-family: arial\">";
    echo "<tr align='center'><td colspan='7' style='background-color: #666666;color: #FFFF66;text-align: center;font-weight: bold;font-size:12pt;'><b>" . $cat . " from " . $_SESSION["sdate2"] . " to " . $_SESSION["edate2"] . "<b></td></tr>";
    echo "<tr style=\"background-color: #666666;color: #FFFF66;text-align: center;font-weight: bold;font-size:11pt;\"><td>#</td><td>Last Name</td><td>First Name</td><td>Patient ID</td><td>Date of Birth</td><td>Date Happened<sup>*</sup></td><td>Barangay</td></tr>";
    foreach ($arr_px_id as $key => $value) {
        list($pxid, $date_happened) = explode('*', $value);
        $q_px = mysql_query("SELECT * FROM m_patient WHERE patient_id='{$pxid}' ORDER by patient_dob ASC") or die("Cannot query: 78");
        if (mysql_num_rows($q_px) != 0) {
            while ($r_px = mysql_fetch_array($q_px)) {
                $q_brgy = mysql_query("SELECT a.barangay_name FROM m_lib_barangay a, m_family_members b, m_family_address c WHERE b.patient_id='{$pxid}' AND b.family_id=c.family_id AND a.barangay_id = c.barangay_id") or die("Cannot query 20: " . mysql_error());
                list($brgy_name) = mysql_fetch_array($q_brgy);
                echo "<tr style='background-color: #666666; color: #FFFFFF; font-weight:bold; white-space: nowrap; font-size: 12pt;' align='center'><td>{$i}</td><td>" . $r_px[patient_lastname] . "</td>";
                echo "<td>" . $r_px[patient_firstname] . "</td>";
                echo "<td>" . $pxid . "</td>";