function renderEmployeePageContent($pageName) { //$db = new Database("107.180.51.84","fcncContent","Fcnc@915","fcncContent"); $db = new Database("localhost", "root", "root", "FCNC_v3.0"); $db->setTable("employeePages"); // If varables have not been set, display the home page if ($pageName == '') { $queryString = ['pageName' => 'home']; $pageTileResults = $db->retrieveStrict($queryString); displayContent($pageTileResults->getRow()); } else { $queryString = ['pageName' => $pageName]; $pageTileResults = $db->retrieveStrict($queryString); displayContent($pageTileResults->getRow()); } }
public function icsv() { set_time_limit(0); $this->load->library('csvimport'); $file = $_FILES['Filedata']; $return_data = array('status' => 0); $user_id = $this->session->userdata('user_id'); if ($file) { $field_arr = array('Name' => 'name', 'Email' => 'email', 'Domain' => 'domain', 'Language' => 'language', 'SEO score' => 'seo_score', 'Speed' => 'speed'); $insert_data = array(); $csv_data = $this->csvimport->get_array($file['tmp_name']); $time = time(); foreach ($csv_data as $single_data) { $insert_data_temp = array(); foreach ($field_arr as $key => $field) { $insert_data_temp[$field] = array_key_exists($key, $single_data) ? $this->secure_data($single_data[$key]) : ''; } if (displayContent($insert_data_temp, 'name', '') !== '' && displayContent($insert_data_temp, 'email', '') !== '' && displayContent($insert_data_temp, 'domain', '') !== '') { $insert_data_temp['agent_id'] = $user_id; $insert_data_temp['audit'] = 1; $insert_data_temp['date'] = date('Y-m-d H:i:s', $time); $insert_data[] = $insert_data_temp; } else { print_r($insert_data_temp); exit; } } $last_prev_data = $this->common_model->get_rows(array('where' => array('agent_id' => $user_id), 'orderby' => array('field' => 'id', 'order' => 'desc'), 'row' => 2), 'leads'); $last_prev_id = $last_prev_data ? $last_prev_data['id'] : 0; $table_data = ''; if (count($insert_data) > 0) { $this->common_model->insert_batch('leads', $insert_data); $db_data = $this->common_model->get_rows(array('where' => array('agent_id' => $user_id, 'id >' => $last_prev_id), 'result' => 1), 'leads'); $table_data = $this->load->view('agent/leads/csv_lead', array('leads_data' => $db_data), true); } $return_data['status'] = 1; $return_data['table_data'] = $table_data; $return_data['message'] = 'CSV imported successfully.'; } echo json_encode($return_data); exit; }
if ($condition != null) { $sentenceSQL .= " where category = " . $condition; } $sentenceSQL .= " limit 30"; $results = $connection->select($sentenceSQL); while ($evt = $results->fetch_assoc()) { $event = new Event($evt['id'], $evt['user'], $evt['category'], $evt['name'], $evt['address'], $evt['city'], $evt['description'], $evt['dateStart'], $evt['dateEnd'], $evt['img'], $evt['public'], $evt['offer']); echo '<div class="col s12 m4">'; $event->paintEvent(); echo '</div>'; } } if (!empty($_GET)) { displayContent($_GET['category']); } else { displayContent(); } ?> </div> </div> </main> <?php include 'components/Footer.php'; ?> <?php include 'components/Script.php'; echo Script::JQUERY; echo Script::MATERIALIZE;
<div class="row" id="title"> <div class="medium-1 columns" id="space"> </div> <div class="medium-10 columns"><?php echo displayTitle($category->title); ?> </div> <div class="medium-1 columns" id="space"> </div> </div> <div class="row"> <div class="medium-10 columns medium-centered" id="contents"><?php echo displayContent($category->contents); ?> </div> </div> <div class="row" id="header"> <div class="medium-1 columns" id="space"> </div> <div class="medium-1 columns"> </div> <div class="medium-5 columns">Title</div> <div class="medium-1 columns">Views</div> <div class="medium-1 columns">Replies</div> <div class="medium-2 columns">Last post</div> <div class="medium-1 columns" id="space"> </div> </div> <div class="row" id="forum"> <?php foreach ($posts as $rows) { ?> <div class="medium-1 columns" id="space"> </div>
function showMdlCol($UserType) { if ($UserType == "GMO") { echo '<table> <tr> <td>'; $strContent = displayContent($UserType); echo $strContent; echo '</td> </tr> </table>'; } else { echo '<h3>You are not Authorised to view this page</h3>'; } }
function showMdlCol($authorise, $startdate) { if ($authorise == "DAO" || $authorise == "GMO" || $authorise == "ADMIN") { $edate = ""; $arrSerField = array("By Date", "By District", "By Disease"); $intcount = 0; $Eresult = mysql_query("select * from district ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrDistrictField[$intcount] = $erow['name']; $arrDistrictFieldId[$intcount] = $erow['districtid']; $intcount++; } $intcount = 0; $Eresult = mysql_query("select * from disease ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrDiseaseField[$intcount] = $erow['name']; $arrDiseaseFieldId[$intcount] = $erow['diseaseid']; $intcount++; } echo '<table> <tr> <td> <form action="listbulkcasereport.php" onsubmit="javascript:return validateListCaseReport()" method="GET"> <table class="formSubmitTable"> <tr> <td class="formLabel"> List By </td> <td class="formContent"> <select name="List" id="cmpList" onchange="javascript:displayRow()">'; for ($intCount = 0; $intCount < count($arrSerField); $intCount++) { if (isset($_GET['List'])) { if ($arrSerField[$intCount] == $_GET['List']) { echo '<option selected value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } else { echo '<option value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } } echo '</select> </td> </tr>'; if (isset($_GET['List'])) { if ($_GET['List'] == 'By District') { echo '<tr id="District">'; } else { echo '<tr class="hideTr" id="District">'; } } else { echo '<tr class="hideTr" id="District">'; } echo '<td class="formLabel" >'; echo '<label>District:</label> </td> <td class="formContent">'; echo '<select name="cmpDistrictList" id="cmpDistrictList">'; for ($intCount = 0; $intCount < count($arrDistrictField); $intCount++) { if (isset($_GET['cmpDistrictList'])) { if ($arrDistrictFieldId[$intCount] == $_GET['cmpDistrictList']) { echo '<option selected value="' . $arrDistrictFieldId[$intCount] . '"> ' . $arrDistrictField[$intCount] . '</option>'; } else { echo '<option value="' . $arrDistrictFieldId[$intCount] . '">' . $arrDistrictField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDistrictFieldId[$intCount] . '">' . $arrDistrictField[$intCount] . '</option>'; } } echo '</select> </td> </tr>'; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Disease') { echo '<tr id="Disease">'; } else { echo '<tr class="hideTr" id="Disease">'; } } else { echo '<tr class="hideTr" id="Disease">'; } echo '<td class="formLabel" >'; echo '<label>Disease:</label> </td> <td class="formContent">'; echo '<select name="cmpDiseaseList" id="cmpDiseaseList">'; for ($intCount = 0; $intCount < count($arrDiseaseField); $intCount++) { if (isset($_GET['cmpDiseaseList'])) { if ($arrDiseaseFieldId[$intCount] == $_GET['cmpDiseaseList']) { echo '<option selected value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } else { echo '<option value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } } echo "</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>"; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Date') { echo '<tr id="Date">'; } else { echo '<tr class="hideTr" id="Date">'; } } else { echo '<tr id="Date">'; } echo "\t<td class=\"formLabel\">\n\t\t\t\t\t\t\t\t\t<label id=\"lblStartDate\">Start Date</label>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"formContent\">"; if (isset($_GET['Datestart'])) { $edate = $_GET['Datestart']; } else { if ($edate == null) { $edate = $startdate; } else { $edate = $startdate; } } echo "<input name=\"Datestart\" size=\"8\" type=\"text\" \n\t\t\t\t\t\t\t\t\t\tid=\"txtDatestart\" maxlength=\"10\" value='" . $edate . "' >\n\t\t\t\t\t\t\t\t\t\t[DD/MM/YYYY]\n\t\t\t\t\t\t\t\t\t<div class=\"dsplyWarning\" id=\"errDate1\">\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>"; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Date') { echo '<tr id="Date1">'; } else { echo '<tr class="hideTr" id="Date1">'; } } else { echo '<tr id="Date1">'; } echo "\t<td class=\"formLabel\">"; echo "<label>End Date\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t \t\t<td class=\"formContent\">"; if (isset($_GET['Dateclose'])) { $edate = $_GET['Dateclose']; } else { $edate = date("d/m/Y"); } echo "<input name=\"Dateclose\" size=\"8\" type=\"text\" \n\t\t\t\t\t\t\t\t\t\tid=\"txtDateclose\" maxlength=\"10\" value='" . $edate . "'>\n\t\t\t\t\t\t\t\t\t\t[DD/MM/YYYY]\n\t\t\t\t\t\t\t\t\t<div class=\"dsplyWarning\" id=\"errDate2\">\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t<td class=\"formLabel\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"formContent\">\n\t\t\t\t\t\t\t\t\t<input class=\"subButton\" type=\"submit\" name=\"submit\" value=\"Submit\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t\t<tr id=\"listDisplay\">\n\t\t\t\t<td colspan=\"2\">"; if (isset($_GET['submit'])) { if ($_GET['List'] == 'By Disease') { echo displayContent($authorise, 2); } else { if ($_GET['List'] == 'By District') { echo displayContent($authorise, 3); } else { echo displayContent($authorise, 1); } } } else { echo displayContent($authorise, 1); } echo '</td> </tr> </table>'; } else { echo '<h3>No data is stored in the database or you are not authorised to view this data</h3>'; } }
echo $thispost->id; ?> </div> <div class="medium-1 columns"><a href="<?php echo BASE_URL . 'index.php?c=post&a=deletetoppost&id=' . $thispost->id; ?> "><img src="<?php echo BASE_URL . 'img/delete.png'; ?> " width="20" height="20" alt="Delete"/></a></div> <div class="medium-1 columns" id="space"> </div> </div> <div class="row"> <div class="medium-10 columns medium-centered" id="contents"><?php echo displayContent($thispost->contents); ?> </div> </div> <div class="row"> <div class="medium-1 columns" id="space"> </div> <div class="medium-10 columns"> <a id="backbutton" class="tiny button" href="<?php echo BASE_URL . 'index.php?c=user&a=viewcreatereply&id=' . $thispost->id; ?> ">Post Reply</a> <a id="backbutton" class="tiny button" href="<?php echo BASE_URL . 'index.php?c=user&a=viewcategory&id=' . $thispost->category_id; ?> ">Back</a>
echo form_password(array('name' => 'confirm_password', 'value' => '', 'class' => 'form-control', 'id' => 'confirm_password')); ?> </div> <div class="form-group clearfix"> <?php echo form_label('Agent', 'agent'); ?> <?php echo form_dropdown('agent', $agents, displayContent($data, 'agent', set_value('agent')), 'class="form-control" id="agent"'); ?> </div> <div class="form-group clearfix"> <?php echo form_label('Status', 'status'); ?> <?php echo form_dropdown('status', array(0 => 'Inactive', 1 => 'Active'), displayContent($data, 'status', set_value('status')), 'class="form-control" id="status"'); ?> </div> <div class="form-group clearfix"> <?php echo form_submit('submit', 'Submit', 'class="btn btn-primary"'); ?> </div> </form> </div> </div> </div> </div> </div> </div>
<div class="grid_8"> <!--Content Login Section --> <div class="login"> <?php displayLogin($config); ?> <div class="clear"></div> </div> <div class="divider"></div> <!--Content Section --> <div id="Loading"> <?php displayContent($wts_content, $config); ?> <!--Content Post 2 Section --> <!-- <div class="post"> <div class="thumbnail"><a href="#"><img src="templetes/DarkTemp/images/image.jpg" alt="" /></a></div> <h3><a href="#">Sample Header</a></h3> <p>Sample content wouuld be placed within this paragraph</p> <div class="post_footer"> <div class="comments">left column</div> <div class="more"><a href="#">right column</a></div> </div> <div class="clear"></div> </div> <div class="divider"></div> -->
function gf_collapsible_sections($form, $lead) { /* * 1. Content Include field IDs: 11 [Tell us about your project and exhibit.] 16 [Provide a short description for our website, mobile app, and your sign.] 2. Logistics Include field IDs: 60 [Space Size Request] 61 [Other: List the specific dimensions (__ft x __ft ) and provide additional details about the size of space you require.] 62 [Tables and Chairs] 288 [How many tables and chairs?] */ global $wpdb; $entry_id = $lead['id']; $makerfirstname1 = $lead['160.3']; $makerlastname1 = $lead['160.6']; $makerfirstname2 = $lead['158.3']; $makerlastname2 = $lead['158.6']; $makerfirstname3 = $lead['155.3']; $makerlastname3 = $lead['155.6']; $makerfirstname4 = $lead['156.3']; $makerlastname4 = $lead['156.6']; $makerfirstname5 = $lead['157.3']; $makerlastname5 = $lead['157.6']; $makerfirstname6 = $lead['159.3']; $makerlastname6 = $lead['159.6']; $makerfirstname7 = $lead['154.3']; $makerlastname7 = $lead['154.6']; //email fields $emailArray = array(); if (isset($lead['98']) && $lead['98'] != '') { $emailArray[$lead['98']]['Contact'] = $lead['96.3'] . ' ' . $lead['96.6']; } if (isset($lead['161']) && $lead['161'] != '') { $emailArray[$lead['161']]['Maker 1'] = $makerfirstname1 . ' ' . $makerlastname1; } if (isset($lead['162']) && $lead['162'] != '') { $emailArray[$lead['162']]['Maker 2'] = $makerfirstname2 . ' ' . $makerlastname2; } if (isset($lead['167']) && $lead['167'] != '') { $emailArray[$lead['167']]['Maker 3'] = $makerfirstname3 . ' ' . $makerlastname3; } if (isset($lead['166']) && $lead['166'] != '') { $emailArray[$lead['166']]['Maker 4'] = $makerfirstname4 . ' ' . $makerlastname4; } if (isset($lead['165']) && $lead['165'] != '') { $emailArray[$lead['165']]['Maker 5'] = $makerfirstname5 . ' ' . $makerlastname5; } if (isset($lead['164']) && $lead['164'] != '') { $emailArray[$lead['164']]['Maker 6'] = $makerfirstname6 . ' ' . $makerlastname6; } if (isset($lead['163']) && $lead['163'] != '') { $emailArray[$lead['163']]['Maker 7'] = $makerfirstname7 . ' ' . $makerlastname7; } foreach ($form['fields'] as $field) { $fieldData[$field['id']] = $field; } $data = array('content' => array(11, 16, 320, 321, 66, 67, 293), 'logistics' => array(60, 61, 62, 288, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76), 'additional' => array(123, 130, 287, 134), 'images' => array(22, 217, 224, 223, 222, 220, 221, 219, 111), 'imagesOver' => array(324, 334, 326, 338, 333, 337, 332, 336, 331, 335)); ?> <div id="tabs"> <ul> <li><a href="#tabs-1">Content</a></li> <li><a href="#tabs-2">Logistics/Production</a></li> <li><a href="#additional">Additional Information</a></li> <li><a href="#addForms">Additional Forms</a></li> <li><a href="#tabs-3">Other Entries</a></li> <li><a href="#images">Images</a></li> </ul> <div id="tabs-1"> <?php echo displayContent($data['content'], $lead, $fieldData); ?> </div> <div id="tabs-2"> <?php echo displayContent($data['logistics'], $lead, $fieldData); ?> </div> <div id="additional"> <?php echo displayContent($data['additional'], $lead, $fieldData); ?> </div> <div id="addForms"> <?php echo getmetaData($entry_id); ?> </div> <div id="tabs-3"> <!-- Additional Entries --> <table width="100%"> <tr> <th>Maker Name </th> <th>Maker Type </th> <th>Record ID </th> <th>Project Name</th> <th>Form Name </th> <th>Status </th> </tr> <?php foreach ($emailArray as $key => $email) { $results = $wpdb->get_results('SELECT *, ' . ' (select value from wp_rg_lead_detail detail2 ' . ' where detail2.lead_id = wp_rg_lead_detail.lead_id and ' . ' field_number = 151 ' . ' ) as projectName, ' . ' (select value from wp_rg_lead_detail detail2 ' . ' where detail2.lead_id = wp_rg_lead_detail.lead_id and ' . ' field_number = 303 ' . ' ) as status ' . ' FROM wp_rg_lead_detail ' . ' join wp_rg_form on wp_rg_form.id = wp_rg_lead_detail.form_id ' . ' WHERE value = "' . $key . '"' . ' and lead_id != ' . $entry_id . ' group by lead_id order by lead_id'); $return = array(); foreach ($results as $addData) { $outputURL = admin_url('admin.php') . "?page=mf_entries&view=mfentry&id=" . $addData->form_id . '&lid=' . $addData->lead_id; echo '<tr>'; //only display the first instance of the email foreach ($email as $typeKey => $typeData) { $name = $typeKey; $type = $typeData; if ($name != '') { break; } } echo '<td>' . $type . '</td>'; echo '<td>' . $name . '</td>'; echo '<td><a target="_blank" href="' . $outputURL . '">' . $addData->lead_id . '</a></td>' . '<td>' . $addData->projectName . '</td>' . '<td>' . $addData->title . '</td>' . '<td>' . $addData->status . '</td>' . '</tr>'; } } ?> </table> </div> <div id="images"> <?php echo displayContent($data['images'], $lead, $fieldData, 'grid'); ?> <?php echo displayContent($data['imagesOver'], $lead, $fieldData, 'grid'); ?> </div> </div> <?php }
echo "\n\t<form method=post action=hw2.php>\n\t<select name=\"input\">\n\t\t<option value=\"\">Select...</option>\n\t\t<option value=\"0\">File 1</option>\n\t\t<option value=\"1\">File 2</option>\n\t\t<option value=\"2\">File 3</option>\n\t\t<option value=\"3\">File 4</option>\n\t\t<option value=\"4\">Days of the week</option>\n\t\t<option value=\"5\">Etc Content</option>\n\t<input type=\"submit\" value=\"submit\">\t\n\t</select>\n\t"; } else { $days_of_week = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); if (is_numeric($input)) { switch ($input) { case '0': displayContent('/var/www/html/hw2/file1.txt'); break; case '1': displayContent('/var/www/html/hw2/file2.txt'); break; case '2': displayContent('/var/www/html/hw2/file3.txt'); break; case '3': displayContent('/var/www/html/hw2/file4.txt'); break; case '4': printDays($days_of_week); break; case '5': printContentDirectory('/etc/'); break; default: echo "\n\t\t\t\t\tThere is an error in input\n\t\t\t\t"; break; } } else { echo "\n\t\t\tThere is an error in input\n\t\t"; } }
function showMdlCol($authorise, $startdate) { if ($authorise == "DAO" || $authorise == "GMO" || $authorise == "HOSPITAL" || $authorise == "ADMIN") { $edate = ""; $arrSerField = array("By Date", "By District", "By Disease", "By Age", "By Hospital"); $arrAge = array("0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100", "101-110", "111-120", "121-129"); $intcount = 0; $Eresult = mysql_query("select * from district ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrDistrictField[$intcount] = $erow['name']; $arrDistrictFieldId[$intcount] = $erow['districtid']; $intcount++; } $intcount = 0; $Eresult = mysql_query("select * from disease ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrDiseaseField[$intcount] = $erow['name']; $arrDiseaseFieldId[$intcount] = $erow['diseaseid']; $intcount++; } if ($authorise == "HOSPITAL") { $intcount = 0; $name = $_SESSION['userName']; $Eresult = mysql_query("select * from hospital where username = '******' ") or die(mysql_error()); $erow = mysql_fetch_array($Eresult); $arrHospitalField[$intcount] = $erow['name']; $arrHospitalFieldId[$intcount] = $erow['hospitalid']; } else { if ($authorise == "DAO") { $intcount = 0; $name = $_SESSION['userName']; $Nresult = mysql_query("select * from dao where username = '******' ") or die(mysql_error()); $nrow = mysql_fetch_array($Nresult); $districtid = $nrow['districtid']; $Eresult = mysql_query("select * from hospital where districtid = '" . $districtid . "' ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrHospitalField[$intcount] = $erow['name']; $arrHospitalFieldId[$intcount] = $erow['hospitalid']; $intcount++; } } else { if ($authorise == "GMO") { $intcount = 0; $name = $_SESSION['userName']; $Nresult = mysql_query("select * from gmo where username = '******' ") or die(mysql_error()); $nrow = mysql_fetch_array($Nresult); $districtid = $nrow['districtid']; $Eresult = mysql_query("select * from hospital where districtid = '" . $districtid . "' ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrHospitalField[$intcount] = $erow['name']; $arrHospitalFieldId[$intcount] = $erow['hospitalid']; $intcount++; } } else { $intcount = 0; $Eresult = mysql_query("select * from hospital ") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $arrHospitalField[$intcount] = $erow['name']; $arrHospitalFieldId[$intcount] = $erow['hospitalid']; $intcount++; } } } } echo '<table> <tr> <td> <form action="listcasereport.php" onsubmit="javascript:return validateListCaseReport()" method="GET"> <table class="formSubmitTable"> <tr> <td class="formLabel"> List By </td> <td class="formContent"> <select name="List" id="cmpList" onchange="javascript:displayRow()">'; for ($intCount = 0; $intCount < count($arrSerField); $intCount++) { if (isset($_GET['List'])) { if ($arrSerField[$intCount] == $_GET['List']) { echo '<option selected value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } else { echo '<option value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrSerField[$intCount] . '">' . $arrSerField[$intCount] . '</option>'; } } echo '</select> </td> </tr>'; if (isset($_GET['List'])) { if ($_GET['List'] == 'By District') { echo '<tr id="District">'; } else { echo '<tr class="hideTr" id="District">'; } } else { echo '<tr class="hideTr" id="District">'; } echo '<td class="formLabel" >'; echo '<label>District:</label> </td> <td class="formContent">'; echo '<select name="cmpDistrictList" id="cmpDistrictList">'; for ($intCount = 0; $intCount < count($arrDistrictField); $intCount++) { if (isset($_GET['cmpDistrictList'])) { if ($arrDistrictFieldId[$intCount] == $_GET['cmpDistrictList']) { echo '<option selected value="' . $arrDistrictFieldId[$intCount] . '"> ' . $arrDistrictField[$intCount] . '</option>'; } else { echo '<option value="' . $arrDistrictFieldId[$intCount] . '">' . $arrDistrictField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDistrictFieldId[$intCount] . '">' . $arrDistrictField[$intCount] . '</option>'; } } echo '</select> </td> </tr>'; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Age') { echo '<tr id="Age">'; } else { echo '<tr class="hideTr" id="Age">'; } } else { echo '<tr class="hideTr" id="Age">'; } echo '<td class="formLabel" >'; echo '<label>Age:</label> </td> <td class="formContent">'; echo '<select name="cmpAgeList" id="cmpAgeList">'; for ($intCount = 0; $intCount < count($arrAge); $intCount++) { if (isset($_GET['cmpAgeList'])) { if ($arrAge[$intCount] == $_GET['cmpAgeList']) { echo '<option selected value="' . $arrAge[$intCount] . '">' . $arrAge[$intCount] . '</option>'; } else { echo '<option value="' . $arrAge[$intCount] . '">' . $arrAge[$intCount] . '</option>'; } } else { echo '<option value="' . $arrAge[$intCount] . '">' . $arrAge[$intCount] . '</option>'; } } echo '</select> </td> </tr>'; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Disease') { echo '<tr id="Disease">'; } else { echo '<tr class="hideTr" id="Disease">'; } } else { echo '<tr class="hideTr" id="Disease">'; } echo '<td class="formLabel" >'; echo '<label>Disease:</label> </td> <td class="formContent">'; echo '<select name="cmpDiseaseList" id="cmpDiseaseList">'; for ($intCount = 0; $intCount < count($arrDiseaseField); $intCount++) { if (isset($_GET['cmpDiseaseList'])) { if ($arrDiseaseFieldId[$intCount] == $_GET['cmpDiseaseList']) { echo '<option selected value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } else { echo '<option value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDiseaseFieldId[$intCount] . '">' . $arrDiseaseField[$intCount] . '</option>'; } } echo "</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>"; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Hospital') { echo '<tr id="Hospital">'; } else { echo '<tr class="hideTr" id="Hospital">'; } } else { echo '<tr class="hideTr" id="Hospital">'; } echo '<td class="formLabel" >'; echo '<label>Hospital:</label> </td> <td class="formContent">'; echo '<select name="cmpHospitalList" id="cmpHospitalList">'; for ($intCount = 0; $intCount < count($arrHospitalField); $intCount++) { if (isset($_GET['cmpHospitalList'])) { if ($arrHospitalFieldId[$intCount] == $_GET['cmpHospitalList']) { echo '<option selected value="' . $arrHospitalFieldId[$intCount] . '">' . $arrHospitalField[$intCount] . '</option>'; } else { echo '<option value="' . $arrHospitalFieldId[$intCount] . '">' . $arrHospitalField[$intCount] . '</option>'; } } else { echo '<option value="' . $arrHospitalFieldId[$intCount] . '">' . $arrHospitalField[$intCount] . '</option>'; } } echo "</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>"; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Date') { echo '<tr id="Date">'; } else { echo '<tr class="hideTr" id="Date">'; } } else { echo '<tr id="Date">'; } echo "\t<td class=\"formLabel\">\n\t\t\t\t\t\t\t\t\t<label id=\"lblStartDate\">Start Date</label>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"formContent\">"; if (isset($_GET['Datestart'])) { $edate = $_GET['Datestart']; } else { if ($edate == null) { $edate = $startdate; } else { $edate = $startdate; } } echo "<input name=\"Datestart\" size=\"8\" type=\"text\" \n\t\t\t\t\t\t\t\t\t\tid=\"txtDatestart\" maxlength=\"10\" value='" . $edate . "' >\n\t\t\t\t\t\t\t\t\t\t[DD/MM/YYYY]\n\t\t\t\t\t\t\t\t\t<div class=\"dsplyWarning\" id=\"errDate1\">\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>"; if (isset($_GET['List'])) { if ($_GET['List'] == 'By Date') { echo '<tr id="Date1">'; } else { echo '<tr class="hideTr" id="Date1">'; } } else { echo '<tr id="Date1">'; } echo "\t<td class=\"formLabel\">"; echo "<label>End Date\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t \t\t<td class=\"formContent\">"; if (isset($_GET['Dateclose'])) { $edate = $_GET['Dateclose']; } else { $edate = date("d/m/Y"); } echo "<input name=\"Dateclose\" size=\"8\" type=\"text\" \n\t\t\t\t\t\t\t\t\t\tid=\"txtDateclose\" maxlength=\"10\" value='" . $edate . "'>\n\t\t\t\t\t\t\t\t\t\t[DD/MM/YYYY]\n\t\t\t\t\t\t\t\t\t<div class=\"dsplyWarning\" id=\"errDate2\">\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t<td class=\"formLabel\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"formContent\">\n\t\t\t\t\t\t\t\t\t<input class=\"subButton\" type=\"submit\" name=\"submit\" value=\"Submit\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t\t<tr id=\"listDisplay\">\n\t\t\t\t<td colspan=\"2\">"; if (isset($_GET['submit'])) { if ($_GET['List'] == 'By Disease') { echo displayContent($authorise, 2); } else { if ($_GET['List'] == 'By District') { echo displayContent($authorise, 3); } else { if ($_GET['List'] == 'By Age') { echo displayContent($authorise, 4); } else { if ($_GET['List'] == 'By Hospital') { echo displayContent($authorise, 5); } else { echo displayContent($authorise, 1); } } } } } else { echo displayContent($authorise, 1); } echo '</td> </tr> </table>'; } else { echo '<h3>You are not Authorised to view this page</h3>'; } }
function showInfo() { $diseaseName = ""; if (isset($_GET['strDiseaseName'])) { $diseaseName = $_GET['strDiseaseName']; } $intCount = 0; $Eresult = mysql_query("select * from disease") or die(mysql_error()); while ($erow = mysql_fetch_array($Eresult)) { $content = $erow['name']; $arrDisease[$intCount] = $content; $intCount++; } ?> <table> <tr> <td class="tdSpecial"> <?php displayMenuBar(); ?> </td> </tr> <tr> <td class="tdContent1"> <form action="diseaseinfo.php" method="POST"> <table> <tr> <td class="tdContentDisease"> Disease </td> <td class="tdContentDisease"> <select name="cmbDisease" id="cmbDisease" onchange="javascript:showDiseaseInfo(this);"> <?php for ($intCount = 0; $intCount < count($arrDisease); $intCount++) { if ($arrDisease[$intCount] == $diseaseName) { echo '<option selected value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } else { echo '<option value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } } ?> </select> </td> </tr> </table> </form> </td> </tr> <tr> <td class="tdContentDiseaseInfo"> <?php if (isset($_GET['strDiseaseName'])) { $strDiseaseName = $_GET['strDiseaseName']; echo displayContent($strDiseaseName); } else { echo displayContent($arrDisease[0]); } ?> </td> </tr> </table> <?php }
function showMdlCol($authorise, $filterValue) { if ($authorise == "ADMIN") { $arrFilter = array("All users", "GMO", "DAO", "Hospitals"); echo '<table> <tr> <td> <form action="./listuser.php" method="GET"> <table class="tabFormSubmit"> <tr> <td class="selectOption"> List Users By </td> <td class="selectOption">'; echo '<select name="cboFilter" id="cboFilter">'; for ($intCount = 0; $intCount < count($arrFilter); $intCount++) { if ($arrFilter[$intCount] == $filterValue) { echo '<option selected value="' . $arrFilter[$intCount] . '">' . $arrFilter[$intCount] . '</option>'; } else { echo '<option value="' . $arrFilter[$intCount] . '">' . $arrFilter[$intCount] . '</option>'; } } echo '</select> </td> </tr> <tr> <td class="selectOption"> </td> <td class="selectOption"> <input class="subButton" type="submit" value="Submit" name="Submit"> </td> </tr> </table> </form> </td> </tr> <tr> <td>'; $strContent = displayContent($authorise, $filterValue); echo $strContent; echo '</td> </tr> </table>'; } else { echo '<h3>You are not Authorised to view this page</h3>'; } }
echo displayCreator($user->_userIdtoUsername($reply['user_id'])); ?> </div> <div class="medium-2 columns"><?php echo stampToText($reply['date_created']); ?> </div> <div class="medium-1 columns"><?php echo $reply['id']; ?> </div> <div class="medium-1 columns"><a href="<?php echo BASE_URL . 'index.php?c=post&a=deletepost&id=' . $reply['id']; ?> "><img src=" <?php echo BASE_URL . 'img/delete.png'; ?> " width="20" height="20" alt="Delete"/></a></div> <div class="medium-1 columns" id="space"> </div> </div> <div class="row"> <div class="medium-10 columns medium-centered" id="contents"> <?php echo displayContent($reply['contents']); ?> </div> </div> <?php }
function showMdlCol($authorise) { if ($authorise == "ADMIN" || $authorise == "GMO" || $authorise == "DAO") { echo '<table class="tblForm"> <tr> <td>'; $strContent = displayContent($authorise); echo $strContent; echo '</td> </tr> </table>'; } else { echo '<h3>You are not Authorised to view this page</h3>'; } }
function showFormContent() { $intcount = 0; $resultdis = mysql_query("select * from disease") or die(mysql_error()); while ($rowdis = mysql_fetch_array($resultdis)) { $arrDisease[$intcount] = $rowdis['name']; $intcount++; } if (isset($_GET['popup'])) { ?> <table> <tr> <td style="padding-top:50px;vertical-align:top;"> <div id="map" style="width:675px; height:550px; float:left; border: 1px solid black;"> </div><br /> </td> <td style="vertical-align:top;"> <?php } ?> <table> <tr id="trMenu"> <td class="tdSpecial"> <?php displayMenuBar(); ?> </td> </tr> <tr> <td> <table class="specialTbl" > <tr id="trOption"> <td colspan="2" > <p> <input type="radio" name="rdoType" id="rdoType1" value="By District" checked="checked" onclick="javascript:changeContentDisease(this, '1')"> By District <br><br> <input type="radio" name="rdoType" id="rdoType2" value="By Disease" onclick="javascript:showDiseases('1')"> By Disease <br><br> <input type="radio" name="rdoType" id="rdoType3" value="By Age Group" onclick="javascript:showDiseases('2')"> By Age Group <p/> </td> </tr> <tr class="hideTr" id="hideTrDisease" > <td class="tdmapLabel"> Disease </td> <td class="tdmapContent"> <select name="Disease" id="cmpDisease1" onchange="javascript:changeContentDisease(this, '2')"> <?php for ($intCount = 0; $intCount < count($arrDisease); $intCount++) { if (isset($_GET['Disease'])) { if ($arrDisease[$intCount] == $_GET['Disease']) { echo '<option selected value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } else { echo '<option value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } } ?> </select> </td> </tr> <tr class="hideTr" id="hideTrAgeDisease"> <td class="tdmapLabel"> Disease </td> <td class="tdmapContent"> <select name="Disease" id="cmpDisease2" onchange="javascript:changeContentDisease(this, '4')"> <?php for ($intCount = 0; $intCount < count($arrDisease); $intCount++) { if (isset($_GET['Disease'])) { if ($arrDisease[$intCount] == $_GET['Disease']) { echo '<option selected value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } else { echo '<option value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } } else { echo '<option value="' . $arrDisease[$intCount] . '">' . $arrDisease[$intCount] . '</option>'; } } ?> </select> <br/> </td> </tr> <tr id="contentTr" > <td class="tdContent1" id="contentTd" colspan="2" > <?php if (isset($_GET['popup'])) { $strContent = displayContent($_GET['chrOption'], $_GET['chrVal']); echo $strContent; } else { $strContent = displayContent('Summary', 1); echo $strContent; } ?> </td> </tr> </table> </td> </tr> </table> <?php if (isset($_GET['popup'])) { ?> </td> </tr> </table> <?php } }
function showMdlCol($authorise, $filterValue) { $intCount = ""; if ($authorise == "GMO" || $authorise == "DAO" || $authorise == "ADMIN") { echo '<table> <tr> <td>'; if ($authorise == "ADMIN") { $arrDistrict[0] = "All Districts"; $arrDistrictId[0] = "All Districts"; $intCount = 1; $resultdist = mysql_query("select * from district") or die(mysql_error()); while ($rowdist = mysql_fetch_array($resultdist)) { $arrDistrict[$intCount] = $rowdist['name']; $arrDistrictId[$intCount] = $rowdist['districtid']; $intCount++; } echo '<form action="./listpostoffice.php" method="GET"> <table class="tabFormSubmit"> <tr> <td class="formLabel"> List Post Office By </td> <td class="formContent">'; echo '<select name="cboFilter" id="cboFilter">'; for ($intCount = 0; $intCount < count($arrDistrict); $intCount++) { if ($arrDistrictId[$intCount] == $filterValue) { echo '<option selected value="' . $arrDistrictId[$intCount] . '">' . $arrDistrict[$intCount] . '</option>'; } else { echo '<option value="' . $arrDistrictId[$intCount] . '">' . $arrDistrict[$intCount] . '</option>'; } } echo '</select> </td> </tr> <tr> <td class="formLabel"> </td> <td class="formContent"> <input class="subButton" type="submit" value="Submit" name="Submit"> </td> </tr> </table> </form>'; } echo '</td> </tr> <tr> <td>'; $strContent = displayContent($authorise, $filterValue); echo $strContent; echo '</td> </tr> </table>'; } else { echo '<h3>You are not Authorised to view this page</h3>'; } }
<td>Body:</td> <td> <?php echo form_textarea(array('name' => 'body', 'value' => displayContent($language_template, 'body', ''), 'rows' => 5, 'class' => 'form-control')); ?> </td> </tr> <tr> <td>Close:</td> <td> <?php echo form_input(array('name' => 'close', 'value' => displayContent($language_template, 'close', ''), 'class' => 'form-control')); ?> </td> </tr> <tr> <td>Signature:</td> <td> <?php echo form_input(array('name' => 'signature', 'value' => displayContent($language_template, 'signature', ''), 'class' => 'form-control')); ?> </td> </tr> <tr> <td></td> <td> <?php echo form_submit(array('name' => 'save', 'value' => 'Save Funnel', 'class' => 'btn btn-info btn-small')); ?> </td> </tr>