$p->getAllByPK($row['package']); $project = $p->getNext(); $reporter = $b->getReporter($row['bID']); $owner = $b->getOwner($row['bID']); $project = $b->getProject($row['bID']); if (!isset($owner['uID'])) { $owner_info = "No owner!"; } $TITLE = "Bug #" . $row['bID'] . " | " . format($row['title']); if (loggedIn()) { $CONTENT .= "\n<h1>" . $row['title'] . "</h1>\n<div class = 'shade' >\n<table class = 'center' >\n\t<tr>\n\t\t<td><img id = 'edit-bug-control' src = '" . $SITE_PREFIX . "imgs/edit.png' alt = 'edit' /></td>\n\t\t<td>\n\t\t\t<a href = '" . $SITE_PREFIX . "t/new-comment/" . $row['bID'] . "' >\n\t\t\t\t<img id = 'comment-control' src = '" . $SITE_PREFIX . "imgs/new.png' alt = 'design' />\n\t\t\t</a>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>Edit this bug</td>\n\t\t<td>Add a comment</td>\n\t</tr>\n</table>\n</div>\n\n<div id = 'edit-bug' >\n<div class = 'lookatme' >\n\t<div id = 'edit-interface' class = 'container' >\n\t\t<div class = 'prompt' >\n\t\t\t<div class = 'content' >\n<img id = 'edit-close' src = '" . $SITE_PREFIX . "imgs/close.png' alt = 'Close' />\n<h1>Edit this bug: </h1>\n\t<form action = '" . $SITE_PREFIX . "l/bug-callback' method = 'post' >\n\t\t<p><input type = 'hidden' value = '" . $row['bID'] . "' name = 'bID' /></p>\n\n<table>\n\t<tr>\n\t\t<td>Project</td>\n\t\t<td><div id = 'project-ok' ><img src = '" . $SITE_PREFIX . "imgs/no.png' alt = '' /></div></td>\n\t\t<td><input type = 'text' value = '" . $project['project_name'] . "' id = 'project' name = 'project' size = '20' /></td>\n\t</tr>\n\t<tr>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td><div id = 'project-descr' > </div></td>\n\t</tr>\n\t<tr>\n\t\t<td>Private</td>\n\t\t<td></td>\n\t\t<td><input type = 'checkbox' value = 'true' name = 'private' "; if ($row['private']) { $CONTENT .= " checked='true' "; } $CONTENT .= "/></textarea></td>\n\t</tr>\n\n\t<tr>\n\t\t<td>Title</td>\n\t\t<td></td>\n\t\t<td><input value = \"" . $row['title'] . "\" type = 'text' name = 'title' /></td>\n\t</tr>\n\t<tr>\n\t\t<td>Status</td>\n\t\t<td></td>\n\t\t<td><select name = 'status' >\n"; $status = getAllStatus(); foreach ($status as $key) { $hook = ""; if ($key['statusID'] == $row['bug_status']) { $hook = ' selected = "selected" '; } $CONTENT .= "<option value = '" . $key['statusID'] . "' {$hook} >" . $key['status_name'] . "</option>\n"; } $CONTENT .= "\n</select></td>\n\t</tr>\n\t<tr>\n\t\t<td>Severity</td>\n\t\t<td></td>\n\t\t<td><select name = 'severity' >"; $severity = getAllSeverity(); foreach ($severity as $key) { $hook = ""; if ($key['severityID'] == $row['bug_severity']) { $hook = ' selected = "selected" '; } $CONTENT .= "<option value = '" . $key['severityID'] . "' {$hook} >" . $key['severity_name'] . "</option>\n";
function searchDetail($pp_kod) { $product = "SELECT * FROM p_product\n WHERE pp_kod='{$pp_kod}'"; $p_result = selQuery($product); $p_row = mysqli_fetch_assoc($p_result); $manu = "SELECT * FROM p_product_manu\n WHERE ppm_pp_kod='{$pp_kod}' AND ppm_rmr_kod=1"; $m_result = selQuery($manu); $m_row = mysqli_fetch_assoc($m_result); $manu = $m_row['ppm_osa_kod']; $m_sykt = "SELECT os_sykt,osa_alamat1,osa_alamat2,osa_alamat3,osa_poskod,osa_email,osa_notel FROM o_syarikat_add\n JOIN o_syarikat ON o_syarikat.os_kod=o_syarikat_add.osa_os_kod\n WHERE osa_kod='{$manu}'"; $ms_result = selQuery($m_sykt); $ms_row = mysqli_fetch_assoc($ms_result); $holder = $p_row['pp_osa_kod_holder']; $h_sykt = "SELECT os_sykt,osa_alamat1,osa_alamat2,osa_alamat3,osa_poskod,osa_email,osa_notel FROM o_syarikat_add\n JOIN o_syarikat ON o_syarikat.os_kod=o_syarikat_add.osa_os_kod\n WHERE osa_kod='{$holder}'"; $hs_result = selQuery($h_sykt); $hs_row = mysqli_fetch_assoc($hs_result); $dca = "SELECT pskm_no_msykt,pskm_tkh_msykt FROM p_product,p_skr_kmesyuarat\n WHERE pp_kod='{$pp_kod}' AND p_product.pp_pskm_no_msykt=p_skr_kmesyuarat.pskm_kod"; $dca_result = selQuery($dca); $dca_row = mysqli_fetch_assoc($dca_result); ?> <div class="row" id="preview"> <div class="tab-content pn br-n admin-form"> <div class="col-md-12"> <blockquote class="blockquote-primary">Product Details</blockquote> </div> <div class="col-md-12"> <div class="panel"> <div class="panel-body"> <table class="table" width="100%" cellspacing="0"> <tr> <td width="24%">DCA Meeting No</td> <td width="1%">:</td> <td width="25%"><?php echo isEmpty($dca_row['pskm_no_msykt']); ?> </td> <td width="24%">Product Name</td> <td width="1%">:</td> <td width="25%"><?php echo isEmpty($p_row['pp_nama']); ?> </td> </tr> <tr> <td>DCA Meeting Date</td> <td>:</td> <td><?php echo displayDate($dca_row['pskm_tkh_msykt']); ?> </td> <td>Registration Date</td> <td>:</td> <td><?php echo displayDate($p_row['pp_tkh_reg']); ?> </td> </tr> <tr> <td>Registration No</td> <td>:</td> <td><?php echo isEmpty($p_row['pp_reg_no']); ?> </td> <td>Dosage Form</td> <td>:</td> <td><?php echo getDosage($p_row['pp_rd_kod'], 1); ?> </td> </tr> <tr> <td>Reference No</td> <td>:</td> <td><?php echo isEmpty($p_row['pp_ref_no']); ?> </td> <td>Registration Status</td> <td>:</td> <td><?php echo isEmpty($p_row['pp_reg_no']); ?> </td> </tr> <tr> <td>Product Classification</td> <td>:</td> <td><?php echo productClass($p_row['pp_rkatp_kod']); ?> </td> <td>Product Category</td> <td>:</td> <td><?php echo productCategory($p_row['pp_rkatp_kod']); ?> </td> </tr> <tr> <td>Product Status</td> <td>:</td> <td><?php echo getAllStatus($p_row['pp_rs_kod'], $p_row['pp_status_nopayment']); ?> </td> <td>Lab Status</td> <td>:</td> <td><?php echo getAllStatus($p_row['pp_rs_kod_lab'], $p_row['pp_status_nopayment']); ?> </td> </tr> </table> </div> </div> </div> <div class="col-md-12"> <div class="panel"> <div class="panel-body"> <table width="100%" class="table" cellpadding="5"> <tr> <td width="24%">Manufacturer</td> <td width="1%">:</td> <td width="25%"><?php echo $ms_row['os_sykt']; ?> </td> <td width="24%">Holder</td> <td width="1%">:</td> <td width="25%"><?php echo $hs_row['os_sykt']; ?> </td> </tr> <tr> <td>Address Manufacturer</td> <td>:</td> <td><?php echo $ms_row['osa_alamat1'] . "<br/>" . $ms_row['osa_alamat2'] . "<br/>" . $ms_row['osa_alamat3'] . "<br/>" . $ms_row['osa_poskod']; ?> </td> <td>Address Holder</td> <td>:</td> <td><?php echo $hs_row['osa_alamat1'] . "<br/>" . $hs_row['osa_alamat2'] . "<br/>" . $hs_row['osa_alamat3'] . "<br/>" . $hs_row['osa_poskod']; ?> </td> </tr> <tr> <td>Email Manufacturer</td> <td>:</td> <td><?php echo isEmpty($ms_row['osa_email']); ?> </td> <td>Email Holder</td> <td>:</td> <td><?php echo isEmpty($hs_row['osa_email']); ?> </td> </tr> <tr> <td>Phone No Manufacturer</td> <td>:</td> <td><?php echo isEmpty($ms_row['osa_notel']); ?> </td> <td>Phone No Holder</td> <td>:</td> <td><?php echo isEmpty($hs_row['osa_notel']); ?> </td> </tr> <tr> <td>Contract Manufacturer</td> <td>:</td> <td> <?php if ($m_row['ppm_contract'] == "Y") { echo "<i class='fa fa-check text-success'></i>'"; } else { echo "<i class='fa fa-close text-danger'></i>"; } ?> </td> <td>Repacker</td> <td>:</td> <td> <?php if ($p_row['pp_repacker'] == "Y") { echo "<i class='fa fa-check text-success'></i>"; } else { echo "<i class='fa fa-close text-danger'></i>"; } ?> </td> </tr> </table> </div> </div> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Attachment</blockquote> </div> <div class="col-md-12"> <div class="panel panel-primary"> <div class="panel-body"> <table width="100%" class="table" cellpadding="5"> <tr> <td width="24%">COA Finished Product</td> <td width="1%">:</td> <td width="25%"><?php getFile($pp_kod, 110, "product"); ?> </td> <td width="24%">Protocol of Analysis</td> <td width="1%">:</td> <td width="25%"><?php getFile($pp_kod, 45, "product"); ?> </td> </tr> <tr> <td>COA API</td> <td>:</td> <td><?php getFile($pp_kod, 45, "product"); ?> </td> <td>Summary of Validation</td> <td>:</td> <td><?php getFile($pp_kod, "sumofMethod"); ?> </td> </tr> <tr> <td>Additional Info</td> <td>:</td> <td colspan="4"><?php getFile($pp_kod, "otherDoc"); ?> </td> </tr> </table> </div> </div> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Active Ingredient</blockquote> </div> <div class="col-md-12"> <table id="tbl_ai" class="table table-striped table-hover" width="100%" cellspacing="0"> <thead> <tr align="center" class="primary"> <td width="5%">No</td> <td width="60%">Active Ingredient</td> <td width="15%">Strength</td> <td width="20%">Remarks</td> </tr> </thead> <tbody> <?php $count = 1; $the = "SELECT ras_desc,pba_kekuatan,rbab_desc,pba_catatan\n FROM p_bhn_aktif\n \tLEFT JOIN ref_aktif_substance ON ras_kod = pba_ras_kod\n \tLEFT JOIN ref_bhn_aktif_bhgn ON rbab_kod = pba_rbab_kod\n WHERE pba_pp_kod ='{$pp_kod}'"; $t_result = selQuery($the); while ($t_row = mysqli_fetch_assoc($t_result)) { ?> <tr align="center"> <td><?php echo $count++; ?> </td> <td align="left"><?php echo $t_row['ras_desc']; ?> </td> <td><?php echo $t_row['pba_kekuatan']; ?> </td> <td align="left"><?php echo $t_row['pba_catatan']; ?> </td> </tr> <?php } ?> </tbody> </table> </div> <div class="col-md-12"> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Excipient</blockquote> </div> <div class="col-md-12"> <table id="tbl_exp" class="table table-striped table-hover" width="100%" cellspacing="0"> <thead> <tr align="center" class="primary"> <td width="5%">No</td> <td width="40%">Excipients</td> <td width="15%">Strength</td> <td width="20%">Function</td> <td width="20%">Remarks</td> </tr> </thead> <tbody> <?php $count = 1; $query = "SELECT res_desc,ref_desc,pe_kekuatan,pe_remarks FROM p_eksipien\n LEFT JOIN ref_eksipien_substance ON res_kod = pe_res_kod\n LEFT JOIN ref_eksipien_fungsi ON ref_kod = pe_ref_kod\n WHERE pe_pp_kod='{$pp_kod}'"; $t_result = selQuery($query); while ($t_row = mysqli_fetch_assoc($t_result)) { ?> <tr align="center"> <td><?php echo $count++; ?> </td> <td align="left"><?php echo $t_row['res_desc']; ?> </td> <td><?php echo $t_row['pe_kekuatan']; ?> </td> <td align="left"><?php echo $t_row['ref_desc']; ?> </td> <td align="left"><?php echo $t_row['pe_remarks']; ?> </td> </tr> <?php } ?> </tbody> </table> </div> <div class="col-md-12"> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Therapeutical</blockquote> </div> <div class="col-md-12"> <table id="tbl_the" class="table table-striped table-hover" width="100%" cellspacing="0"> <thead> <tr align="center" class="primary"> <td width="5%">No</td> <td width="25%">Therapeutical Code</td> <td width="70%">Therapeutical Description</td> </tr> </thead> <tbody> <?php $count = 1; $the = "SELECT pth_kod,pth_thera_code FROM p_therapeutical"; $the .= " WHERE pth_pp_kod='{$pp_kod}'"; $t_result = selQuery($the); while ($t_row = mysqli_fetch_assoc($t_result)) { ?> <tr align="center"> <td><?php echo $count++; ?> </td> <td><?php echo $t_row['pth_kod']; ?> </td> <td><?php echo $t_row['pth_thera_code']; ?> </td> </tr> <?php } ?> </tbody> </table> </div> <div class="col-md-12"> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Product Indication</blockquote> </div> <div class="col-md-12"> <div class="section"> <?php $ind = "SELECT pp_indication FROM p_product_sec_a"; $ind .= " WHERE ppa_pp_kod='{$pp_kod}'"; $i_result = selQuery($ind); $i_row = mysqli_fetch_assoc($i_result); ?> <label class="field prepend-icon"> <textarea class="gui-textarea" readonly=""></textarea> <label for="comment" class="field-icon"> <i class="fa fa-comments"></i> </label> <span class="input-footer">Product Indication</span> </label> </div> </div> <div class="col-md-12"> <blockquote class="blockquote-primary">Packaging Details</blockquote> </div> <div class="col-md-12"> <div class="panel panel-primary"> <div class="panel-body"> <table width="100%" class="table" cellpadding="5"> <tr> <td width="24%">Pack Size</td> <td width="1%">:</td> <td width="25%"></td> <td width="24%">Package Insert</td> <td width="1%">:</td> <td width="25%"><?php getFile($pp_kod, 45, "product"); ?> </td> </tr> <tr> <td>Container Type</td> <td>:</td> <td></td> <td>Mockup Label</td> <td>:</td> <td><?php getFile($pp_kod, 45, "product"); ?> </td> </tr> <tr> <td>Container Description</td> <td>:</td> <td colspan="4"></td> </tr> </table> </div> </div> </div> </div> </div> <?php }
<?php /** This is an example script for running tasks. The idea is to set a cron job to call this page via CURL or WGET every minute or even 30 seconds. **/ $debug = $_GET["debug"]; if ($debug = "1") { $debug = true; } require 'ajax/functions.php'; $getAllStatus = getAllStatus("null", "array"); /** Example of, if the bathroom (idx 43) is 15 or more percentage points more humid than the rest of the house (idx 15), then turn the fan on. **/ if ($getAllStatus["comfort"]["43"]["Humidity"] - $getAllStatus["comfort"]["15"]["Humidity"] >= 15) { setStatus("41", "On"); setStatus("44", "On"); //Set the dummy switch on so we know we turned the fan on } elseif ($getAllStatus["comfort"]["43"]["Humidity"] - $getAllStatus["comfort"]["15"]["Humidity"] < 15 && $getAllStatus["dummy"]["44"]["Status"] == "On") { setStatus("41", "Off"); setStatus("44", "Off"); //Set the dummy switch off so we know we turned the fan off }
} elseif ($action == "setDimmerStatus") { $result = setDimmerStatus($idx, $command, "true", $level); echo $result; } elseif ($action == "setStatus") { $result = setStatus($idx, $command, "true"); echo $result; } elseif ($action == "getDoorStatus") { $ret_md5 = getDoorStatus("true"); $ii = 0; while ($ret_md5 == $get_md5 && $ii <= 20) { $ii++; sleep(1); $ret_md5 = getDoorStatus("true"); } $result = getDoorStatus("false"); echo $result; } elseif ($action == "getAllStatus") { $ret_md5 = getAllStatus("true"); $ii = 0; while ($ret_md5 == $get_md5 && $ii <= 20) { $ii++; sleep(1); $ret_md5 = getAllStatus("true"); } $result = getAllStatus("false"); echo $result; } elseif ($action == "setSceneStatus") { setSceneStatus($scene); } elseif ($action == "setSecurity") { setSecurity($command); }
<?php require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '../template/header.php'; showHeader(); require_once BASE_PATH . 'public/status-atividade/queries.php'; require_once BASE_PATH . 'src/pagination.php'; //configurções para montar a paginação $recordsPerPage = 10; $totalRows = countRowsStatus(); $limit = returnLimitToQuery(['recordsPerPage' => $recordsPerPage]); $status = getAllStatus(['limit' => $limit, 'offset' => $recordsPerPage]); $params = ['recordsPerPage' => $recordsPerPage, 'totalRows' => $totalRows, 'url' => SITE_URL . 'status-atividade/index.php']; showMessage(); ?> <div class="container"> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"><h2>Listagem de status de atividade</h2></div> <div class="panel-body text-right"> <a href="<?php echo SITE_URL; ?> status-atividade/form.php" class="btn btn-primary" title="Novo registro"> <span class="glyphicon glyphicon-plus"></span> Novo </a> <?php showTotalRegisters($totalRows); ?> </div>