?> &child_id=<?php echo $row['child_id']; ?> ">View</a>]<br> <?php } ?> <br clear="all" /> <br clear="all" /> <h2>The <?php echo $family['family_name']; ?> 's Schedule</h2> <?php draw_graph(0, $_GET['family_id']); # draw_calendar(0,$_GET['family_id']); } elseif ($_GET['op'] == 'edit') { if (isset($_POST['submit'])) { $sql = "UPDATE nanny_family SET \n\t\t\tfamily_name\t= '" . $_POST['family_name'] . "',\n\t\t\tpayment_rate\t= '" . $_POST['payment_rate'] . "',\n\t\t\tpayment_amount \t= '" . $_POST['payment_amount'] . "'\n\t\t\tWHERE family_id = '" . $_GET['family_id'] . "'"; if (!mysql_query($sql, $db)) { do_error($sql, $db); } header("Location: family.php?op=view&family_id=" . $_GET['family_id']); } $admin_sub_menu = '<h3>Family Admin</h3><ul> <li class="first"><a href="family.php?op=view&family_id=' . $_GET['family_id'] . '">Cancel</a></li> <li><a href="family.php?op=view&family_id=' . $_GET['family_id'] . '">Back to Family</a></li> </ul>'; include "header.php"; $family = mysql_fetch_array(mysql_query("SELECT * FROM nanny_family WHERE family_id = '" . $_GET['family_id'] . "'"));
function show_graph() { require_once "../inc/db.inc"; db_init(); $xaxis = $_GET['xaxis']; $yaxis = $_GET['yaxis']; $granularity = $_GET['granularity']; $active = $_GET['active']; $inactive = $_GET['inactive']; $show_text = $_GET['show_text']; if (!$active && !$inactive) { echo "You must select at least one of (active, inactive)"; exit; } $fields = 'host.id, user.create_time'; if ($xaxis == 'active' || !$active || !$inactive) { $query = "select {$fields}, max(rpc_time) as max_rpc_time from host, user where host.userid=user.id group by userid"; } else { $query = 'select $fields from user'; } $result = mysql_query($query); $yarr = array(); $now = time(); $maxind = 0; $active_thresh = time() - 30 * 86400; while ($user = mysql_fetch_object($result)) { $val = $now - $user->max_rpc_time; if (!$active) { if ($user->max_rpc_time > $active_thresh) { continue; } } if (!$inactive) { if ($user->max_rpc_time < $active_thresh) { continue; } } $life = $user->max_rpc_time - $user->create_time; $ind = $life / $granularity; $ind = (int) $ind; $yarr[$ind]++; if ($ind > $maxind) { $maxind = $ind; } } $xarr = array(); for ($i = 0; $i <= $maxind; $i++) { $xarr[$i] = $i; if (is_null($yarr[$i])) { $yarr[$i] = 0; } } if ($show_text) { show_text($xarr, $yarr); } else { draw_graph($xarr, $yarr); } }
<?php session_start(); $example_data = $_SESSION['array_to_save']; $attribute = $_SESSION['attribute']; include 'line.php'; draw_graph($example_data, $attribute); ?> <<!DOCTYPE html> <html> <head> <title><?php echo $_SESSION['attribute']; ?> variation</title> </head> <body> This is the <?php echo $_SESSION['attribute']; ?> variation you Requested <center> <img src="<?php echo $plot->EncodeImage(); ?> " alt="Plot Image"> </center> </body> </html>
} else { $node_count_seq[] = 0; } } if ($show_comments) { if (array_key_exists($i, $comment_count_values)) { $comment_count_seq[] = $comment_count_values[$i]; } else { $comment_count_seq[] = 0; } } $timestamp = time() - 60 * 60 * $i; $labelx[] = date("H", $timestamp); } if ($show_nodes) { $datay = $node_count_seq; } else { $datay = NULL; } if ($show_comments) { $datay2 = $comment_count_seq; } else { $datay2 = NULL; } if ($show_nodes || $show_comments) { draw_graph($datay, $datay2, $labelx); } } } } //draw_graph($datay, $data2y, $label_x);
$rgb = $colors[$i % count($colors)]; $color = imagecolorallocate($im, $rgb[0], $rgb[1], $rgb[2]); $desc = $data->desc; if (!$g_server_unique && $data->server) { $desc .= " [" . $data->server . "]"; } $y = 13 * $row; if ($i % 2 == 0) { $x = $x0; } else { $x = $x0 + ($full_width - $x0) / 2; $row++; } imageline($im, $x, 9 + $y, $x + 15, 9 + $y, $color); imagestring($im, 2, $x + 20, 2 + $y, $desc, $label_color); draw_graph($im, $data->val, $min_x, $min_y, $data_width, $data_height, $x0, $y0, $width, $height, $color); $i++; } header("Content-Type: image/png"); imagepng($im); function find_stat($stat_service, $name) { foreach ($stat_service->statisticsNames() as $stat) { if ($stat == $name) { $value = null; $value->name = $name; $values = preg_split("/[|]/", $name); $index = array_shift($values); array_shift($values); array_shift($values); $value->description = $index . ": " . join('|', $values);
<h4><b>Civitas Peminjam</b></h4> <h6>(berlaku untuk statistik dengan kelompok user tertentu)<h6> <select id="civitas" class="span1 form-control" name="civitas" disabled="disabled"> <option value = "mahasiswa" selected>Mahasiswa</option> <option value = "dosen">Dosen</option> <option value = "institusi">Institusi</option> </select> <br/> <input class='span1 btn btn-default' id='button_post' type='submit' name="Tampilkan" value="Tampilkan"/> </div> </form> </div> <div class="col-sm-9"> <?php require 'controller/statistik1.php'; if (isset($_POST['Tampilkan'])) { $month = $_POST['month']; $year = $_POST['year']; $permintaan = $_POST['stats']; if (isset($_POST['civitas'])) { $user = $_POST['civitas']; } } draw_graph($month, $year, $permintaan, $user); ?> </div> </div> </div> </body> </html>
?> " disabled="disabled" /></div> <br clear="all" /> <div><label>Last Name</label></div> <div><input class="tf" type="text" name="last_name" alt="First Name" maxlength="50" value="<?php echo $child['last_name']; ?> " disabled="disabled" /></div> <br clear="all" /> <div><label>Notes</label></div> <div><textarea name="notes" disabled="disabled"><?php echo $child['notes']; ?> </textarea></div> <br clear="all" /> <h2><?php echo $child['first_name']; ?> 's Schedule</h2> <?php // draw_calendar($_GET['child_id']); draw_graph($_GET['child_id']); ?> </form> <?php } include "footer.php";
function show_aststats() { global $amp_conf; global $astinfo; global $db; $out = ''; $channels = $astinfo->get_channel_totals(); // figure out max_calls // guess at the max calls: number of users if (!isset($_SESSION["calculated_max_calls"])) { // set max calls to either MAXCALLS in amportal.conf, or the number of users in the system if (isset($amp_conf['MAXCALLS'])) { $_SESSION["calculated_max_calls"] = $amp_conf["MAXCALLS"]; } else { if (function_exists('core_users_list')) { $_SESSION["calculated_max_calls"] = count(core_users_list()); } else { $_SESSION["calculated_max_calls"] = 1; } } } // we currently see more calls than we guessed, increase it if ($channels['total_calls'] > $_SESSION["calculated_max_calls"]) { $_SESSION["calculated_max_calls"] = $channels['total_calls']; } $max_calls = $_SESSION["calculated_max_calls"]; $classes = array(0 => 'graphok'); $max_chans = $max_calls * 2; $out .= "<h3>" . _("FreePBX Statistics") . "</h3>"; $out .= draw_graph(_('Total active calls'), '', $channels['total_calls'], $max_calls, $classes, false, BAR_WIDTH_LEFT); $out .= draw_graph(_('Internal calls'), '', $channels['internal_calls'], $max_calls, $classes, false, BAR_WIDTH_LEFT); $out .= draw_graph(_('External calls'), '', $channels['external_calls'], $max_calls, $classes, false, BAR_WIDTH_LEFT); $out .= draw_graph(_('Total active channels'), '', $channels['total_channels'], $max_chans, $classes, false, BAR_WIDTH_LEFT); $out .= "<h4>" . _("FreePBX Connections") . "</h4>"; /* This is generally very bad style, and we should look at adding this to core_devices_list or another core * function. However, since this is in Ajax lite weight code, it is currently the cleanest way to get the sip and iax2 * devices in a hash format that we would like to pass to the class */ $sql = "SELECT `id` FROM `devices` WHERE `tech` IN ('sip', 'iax2')"; $devices = $db->getCol($sql); if (DB::IsError($devices)) { $devices = false; } else { $devices = array_flip($devices); } $conns = $astinfo->get_connections($devices); if ($conns['users_total'] > 0) { $out .= draw_graph(_('IP Phones Online'), '', $conns['users_online'], $conns['users_total'], $classes, false, BAR_WIDTH_LEFT); } if ($conns['trunks_total'] > 0) { $out .= draw_graph(_('IP Trunks Online'), '', $conns['trunks_online'], $conns['trunks_total'], $classes, false, BAR_WIDTH_LEFT); } if ($conns['registrations_total'] > 0) { $out .= draw_graph(_('IP Trunk Registrations'), '', $conns['registrations_online'], $conns['registrations_total'], $classes, false, BAR_WIDTH_LEFT); } return $out; }
if (!empty($user['picture'])) { ?> <img src="<?php echo MM_UPLOADPATH . $user['picture']; ?> " alt="Profile Picture" /><br /> <?php } ?> </td> </tr> </table> <?php draw_graph($category_count, 480, 240, 5, MM_UPLOADPATH . $_SESSION['user_id'] . '-mymismatchgraph.png'); ?> <h4>Mismatched category breakdown:</h4> <img src="<?php echo MM_UPLOADPATH . $_SESSION['user_id']; ?> -mymismatchgraph.png" alt="Mismatch category graph" /> <h4>You are mismatch on the following <?php echo count($mismatch_topics); ?> topics:</h4> <?php foreach ($mismatch_topics as $topic) { echo $topic . '<br />';
</h1> </div> <div class="col-md-4"> <p class="lead">This page represents the corpus in terms of inter-document distances. Distance in this case refers to the Helsinger distance between documents, based on their topic mixtures. Documents with similar topic mixtures—similar topics in similar concentrations—are closer than those with different mixtures. The graph on the right shows the distribution of distances, the mode being <b><tt>0.76</tt></b>.</p> </div> <div class="col-md-8"> <?php $settings = array('structured_data' => 'true', 'structure' => array('key' => 'd', 'value' => 'n', 'tooltip' => "d", 'label' => 'd'), 'back_colour' => '#fff', 'stroke_colour' => 'blue', 'label_x' => 'Helinger distance', 'label_y' => 'number of document dyads', 'back_stroke_width' => 0, 'pad_top' => 0, 'pad_bottom' => 0, 'pad_left' => 0, 'pad_right' => 0, 'bar_width' => 5, 'axis_font_size' => 12, 'label_font_size' => 14); $colors = array('blue'); $links = array(); $bg = draw_graph('BarGraph', $settings, $helsinger_distro, $colors, $links, 400, 800); print $bg; ?> </div> <div class="col-md-6"> <h2>Most Connected Documents</h2> <p>Top 100 documents with the lowest average Helsinger distance to other documents. These tend to have low topic entropy.</p> <?php foreach ($connectors as $doc) { $doc_url = base_url('doc/item/' . $doc['doc_id']); $dist = round($doc['distance'], 3); print "<div class='data-item'>"; print "<a href='{$doc_url}'>" . $doc['title'] . "</a>"; print progress_bar('success', $dist, 0, 1.4, $dist); print "</div>";
</div> <div class="col-md-4"> <p class="lead">This page shows the most significant words (tokens) in the corpus, based on a supervised nonparametric trend detection algorithm originally developed in the context of social media (Twitter). These results—shown on the right and listed on the left below—suggest terms of potential interest to the user based on their likelihood of embodying significant trends. In addtion, we provide lists of top words based on simple counts, in the middle and right hand columns below.</p> </div> <div class="col-md-8"> <?php $settings = array('structured_data' => 'true', 'structure' => array('key' => 't', 'value' => 'n', 'tooltip' => 't', 'label' => 't'), 'back_colour' => 'white', 'stroke_colour' => 'blue', 'label_x' => 'raw trend value', 'label_y' => 'number of words', 'back_stroke_width' => 0, 'axis_text_angle_h' => -45, 'pad_top' => 0, 'pad_bottom' => 0, 'pad_left' => 0, 'pad_right' => 0, 'increment' => 1, 'axis_font' => 'arial', 'bar_width' => 1, 'axis_font_size' => 12, 'label_font_size' => 14); $colors = array('blue'); $links = array(); $bg = draw_graph('BarGraph', $settings, $trend_distro, $colors, $links, 400, 800); print $bg; ?> </div> <div class="col-md-4"> <h2>Top <?php print $limit; ?> Trending Words</h2> <?php foreach ($trending_words as $word) { $trend = $this->word->get_trend($word['word_str']); # Get an aggregate in the controller! $bg = sparkline($trend, 2005, 2015); #$trendiness = log($word['trendiness']); $trendiness = round($word['trendiness'], 1);