?> </td> <td class="text-center"><?php echo $detail['trans_id']; ?> </td> <td class="text-center"><?php echo displayData($detail['last_payment_amt'], 'money'); ?> </td> <td class="text-right"><?php echo $detail['status']; ?> </td> <td class="text-right"><?php echo displayData($detail['created_date'], 'datetime'); ?> </td> </tr> <?php $sno++; } } ?> </tbody> </table> </div> </div> </div> </div>
function prepareData() { $module = JModuleHelper::getModule('mod_pf_time'); $params = new JRegistry(); $params->loadString($module->params); $action = JRequest::getVar('action', null); $filter_author = $params->get('filter_own', null); $filter_start_date = JRequest::getVar('filter_start_date', null); $filter_end_date = JRequest::getVar('filter_end_date', null); $filter_project = JRequest::getVar('filter_project', null); $app = JFactory::getApplication(); $db = JFactory::getDBO(); $query = $db->getQuery(true); $user = JFactory::getUser(); $access = PFtasksHelper::getActions(); $taskdata = null; // Select the required fields from the table. $query->select('a.id, a.project_id, a.task_id, a.task_title, a.description, ' . 'a.checked_out, a.checked_out_time, a.state, a.access, a.rate, a.billable,' . 'a.created, a.created_by, a.log_date, a.log_time '); $query->from('#__pf_timesheet AS a'); // Join over the users for the checked out user. $query->select('uc.name AS editor'); $query->join('LEFT', '#__users AS uc ON uc.id = a.checked_out'); // Join over the asset groups. $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Join over the users for the author. $query->select('ua.name AS author_name'); $query->join('LEFT', '#__users AS ua ON ua.id = a.created_by'); // Join over the projects for the project title. $query->select('p.title AS project_title, p.alias AS project_alias'); $query->join('LEFT', '#__pf_projects AS p ON p.id = a.project_id'); // Join over the tasks for the task title. $query->select('t.id AS task_exists, t.alias AS task_alias, t.estimate'); $query->join('LEFT', '#__pf_tasks AS t ON t.id = a.task_id'); // Join over the milestones for the milestone alias. $query->select('m.id AS milestone_id, m.alias AS milestone_alias'); $query->join('LEFT', '#__pf_milestones AS m ON m.id = t.milestone_id'); // Join over the task lists for the list alias. $query->select('l.id AS list_id, l.alias AS list_alias'); $query->join('LEFT', '#__pf_task_lists AS l ON l.id = t.list_id'); // Implement View Level Access if (!$user->authorise('core.admin')) { $levels = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $levels . ')'); } // Calculate billable amount $query->select('CASE WHEN (a.billable = 1 AND a.rate > 0 AND a.log_time > 0) ' . 'THEN ((a.log_time / 60) * (a.rate / 60)) ' . 'ELSE "0.00"' . 'END AS billable_total'); // Filter fields $filters = array(); $filters['a.project_id'] = array('INT-NOTZERO', $filter_project); if ($filter_author == 1) { $filters['a.created_by'] = array('INT-NOTZERO', $user->get('id')); } // Apply Filter PFQueryHelper::buildFilter($query, $filters); //finally add our own date range filter if ($filter_start_date && $filter_end_date) { $query->where("a.log_date between '{$filter_start_date}' AND '{$filter_end_date}'"); } else { if ($filter_start_date) { $query->where("a.log_date >= '{$filter_start_date}'"); } else { if ($filter_end_date) { $query->where("a.log_date <= '{$filter_end_date}'"); } } } // Add the list ordering clause. $order_col = 'a.log_date'; $order_dir = 'desc'; $query->order($db->escape($order_col . ' ' . $order_dir)); $query->group('a.id'); $db->setQuery($query); $taskdata = $db->loadObjectList(); if ($action == 'export') { exportData($taskdata); } else { displayData($taskdata); } }
<td><?php echo form_checkbox("op_select[]", $item['id'], '', "id='op_select{$item['id']}'"); ?> </td> <?php foreach ($fields as $field => $row) { ?> <?php if ($row['default_view'] == '0') { continue; } ?> <td> <?php echo displayData($item[$field], $row['data_type'], $item); ?> </td> <?php } ?> <td> <?php if (strcmp($listing_action, '') === 0) { ?> <a class="btn btn-small" href="<?php echo site_url($this->uri->segment(1, 'index') . "/view/" . $item['id']); ?> " data-placement="top" data-toggle="tooltip"
</tr> </thead> <tbody class="white_bg"> <?php if (count($list)) { ?> <?php foreach ($list as $item) { ?> <tr class="txt_11"> <td><?php echo $item['action']; ?> </td> <td><?php echo displayData($item['created_time'], 'datetime'); ?> </td> <td><?php echo strcmp(trim($item['admin_user']), '') === 0 ? 'HMS' : $item['admin_user']; ?> </td> </tr> <?php } ?> <?php } ?> </tbody>
</tr> <tr><td colspan=4><hr/></td></tr> <?php foreach ($product_details as $product_detail) { ?> <tr> <td align="center"><?php echo $product_detail['sku']; ?> </td> <td align="center"><?php echo $product_detail['name']; ?> </td> <td align="center"><?php echo displayData($product_detail['sell_price'], 'money'); ?> </td> <td align="center"><?php echo $product_detail['quantity']; ?> </td> </tr> <tr><td colspan=4><hr/></td></tr> <?php } ?> <?php if (count($so_details)) {
<!DOCTYPE html> <!-- Development by Ryan Ilg - http://ryanilg.com - v1:2007-09-30 v4:2011-04-09 --> <html dir="ltr" lang="en-US"> <head> <meta charset="utf-8"> <title><?php displayData($PAGE_TITLE, GLOBAL_TITLE, " - "); ?> </title> <meta name="author" content="Ryan Ilg - http://ryanilg.com" /> <meta name="description" content="<?php displayData($PAGE_DESCRIPTION, GLOBAL_DESC, ". "); ?> " /> <meta name="keywords" content="<?php displayData($PAGE_KEYWORDS, GLOBAL_KEYWORDS, ". "); ?> " /> <link rel="stylesheet" href="<?php _E($STYLES); ?> global.css" type="text/css" media="all" /> <link rel="stylesheet" href="<?php _E($STYLES); ?> content.css" type="text/css" media="all" /> <link rel="stylesheet" href="<?php _E($STYLES); ?> framework.css" type="text/css" media="all" /> <link rel="stylesheet" href="<?php
table.stats { width: 280px; margin: 4px 16px; display: inline-block; } th.machine { color: darkcyan; padding: 16px 0px 0px 0px; text-align: left; border-bottom: 1px solid gray; } th.gpu { color: white; padding: 3px 3px; font: bolder; text-align: left; background: rgba(65, 65, 65, 0.85); } td.key { width: 99px; max-width: 180px; } td.val { width: 40px; max-width: 100px; color: white; } div.totals { margin: 16px; padding-bottom: 16px; } div.totals h2 { color: darkcyan; font-size: 16px; margin-bottom: 4px; } div.totals li { list-style-type: none; font-size: 16px; margin-left: 4px; margin-bottom: 8px; } li span.algo { display: inline-block; width: 100px; max-width: 180px; } </style> </head> <body> <div id="header"> <h1>cpuminer monitoring API RIG sample</h1> </div> <div id="page"> <?php echo displayData($data); ?> </div> <div id="footer"> <p>© 2014 <a href="https://github.com/JayDDee/cpuminer-opt">jayddee246@gmail.com</a></p> </div> </body> </html>
<tr> <td><?php echo $sno++; ?> </td> <td class="text-center"><?php echo $product_detail['sku']; ?> </td> <td class="text-center"><?php echo $product_detail['product_name']; ?> </td> <td class="text-right"><?php echo displayData($product_detail['unit_price'], 'money'); ?> </td> <td class="text-right"><?php echo $product_detail['quantity']; ?> </td> </tr> <?php } ?> <?php if (count($so_details)) { ?> <?php $sub_total = (double) $so_details['cart_total'];
//check the connection print "Failed to connect to MySQL: (" . $mysqli_conn->connect_errno . ") " . $mysqli_conn->connect_error; } //string to drop the table if (isset($_GET["search"])) { $searchTerm = $_GET["search"]; $query = "select * from film where title like'%{$searchTerm}%' OR director like '%{$searchTerm}%'"; } else { $query = "select * from film"; } //echo "$query"; $result = $mysqli_conn->query($query); //print_r($result); //print " Query returned ". $result->num_rows . " rows "; //The function to display data is below displayData($result); //The function to display the data function displayData($result) { if ($result != null) { print "<table class=\"table\" >"; while ($row = $result->fetch_assoc()) { print " <tr>"; print " <td>" . $row["id"] . "</td>"; print " <td>" . $row["title"] . "</td>"; print " <td>" . $row["year"] . "</td>"; print " <td>" . $row["director"] . "</td>"; print " <td>" . $row["genre"] . "</td>"; print " </tr>"; } print "</table>";
function parseRSS($url) { global $tag, $chanTitle, $chanLink, $chanDesc, $rss, $items, $itemCount, $imgTitle, $imgLink, $imgUrl; $chanTitle = ''; $chanLink = ''; $chanDesc = ''; $imgTitle = ''; $imgLink = ''; $imgUrl = ''; $tag = ''; $rss = ''; global $items, $itemCount; $itemCount = 0; $items = array(0 => array('title' => '', 'link' => '', 'desc' => '', 'pubdate' => '')); $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); @$fp = fopen($url, "r"); $data = ""; while (true) { @$datas = fread($fp, 4096); if (strlen($datas) == 0) { break; } $data .= $datas; } @fclose($fp); if ($data != '') { $xmlresult = xml_parse($xml_parser, $data); $xmlerror = xml_error_string(xml_get_error_code($xml_parser)); $xmlcrtline = xml_get_current_line_number($xml_parser); if ($xmlresult) displayData(); else print("Error parsing this feed !<br />Error: ".@$xmlError." , at line: ".@$xmlCrtline.""); } else { print("Error while retriving feed ".$url.""); } xml_parser_free($xml_parser); }
} ?> <font face="arial" color="FFFFFF"> <h1>Devops Fortune Cookie - Database Maintenance </h1> </font> <font face="arial" color="FFFFFF"> <h2>Current Fortune List</h2> </font> <!-- Display data table --> <font face="arial" color="000000"> <table border=1 bgcolor="DDDDDD" cellspacing=0 cellpadding=3> <?php echo displayData(); ?> </table> <br> <p> </font> <!-- Add new fortune form --> <font face="arial" color="FFFFFF"> <h2>Add a new Fortune</h2> </font> <font face="arial" color="FFFFFF"> <form action="dbmaint.php" method=post> <table>
echo "This \nspans\noutput as well"; if (true) { echo ' 20 '; } $variable = 1995; echo 'Muutuja on ' . gettype($variable) . '.<br/>'; settype($variable, 'String'); echo 'Muutuja on ' . gettype($variable) . '.<br/>'; echo 'Kas muutuja on täisarv?' . is_int($variable); $data = 'väljas'; function displayData() { $data = 'sees'; echo $data; } displayData(); echo $data; function incrementStatic() { static $static = 0; $static++; if ($static < 10) { incrementStatic(); } else { echo ' 48: ', $static; } } incrementStatic(); define("NUMBER", 1995); echo '<br/>' . NUMBER; echo '<br/>' . chr(13) . 'jou';
/** * Displays the data in hopefully readable format. * @param mixed $data * @param int $level * @param int $indent * @return string - readable deescription of the data */ function displayData($data, $level = 0, $indent = 2) { $offset = str_repeat(' ', $level * $indent); if (is_null($data)) return "NULL"; $type = typeOf($data); if (is_bool($data)) if ($data) return 'TRUE'; else return 'FALSE'; if (is_scalar($data)) return "$type:{{$data}}"; if (is_array($data)) { if (!$data) return "[]"; $retStr = "[\n"; $level ++; $newoffset = str_repeat(' ', $level * $indent); foreach ($data as $key => $val) { $retStr .= "{$newoffset}$key=>" . displayData($val, $level, $indent) . "\n"; } return "$retStr$offset]"; } #Something else - obj, probably return $offset . $type . ':' . pkvardump($data); }
function rpt_negative_format_set_excel($val, $neg_no_type) { if ($val < 0) { switch ($neg_no_type) { case 'in_parentheses': $return_val = "(" . $val . ")"; break; case 'with_trailing_minus': $return_val = abs($val) . "-"; break; default: $return_val = displayData($val, 'money'); break; } } else { $return_val = displayData($val, 'money'); } return $return_val; }