$showDetail = true; $editDetail = true; edit_practice($smarty, trim($_REQUEST['id'])); break; case "secondstroke": $showSecond = true; editScore($smarty, $_REQUEST['id']); break; case "savesecond": saveSecond(); $showDetail = true; $editDetail = true; edit_practice($smarty, trim($_REQUEST['id'])); break; default: refreshList($smarty, $showList); break; } $date_first = trim($_POST['awal']); $date_last = trim($_POST['akhir']); if ($date_first == "") { $date_first = date("Y/m/d"); } if ($date_last == "") { $date_last = date("Y/m/d"); } // assign template $smarty->assign('awal', $date_first); $smarty->assign('akhir', $date_last); $smarty->assign('judul', "Members's Practice List"); $smarty->assign('aksi2', $aksi2);
function printMonitor() { global $server_status, $server_db_isLocal; ?> <div class="tabLinks" style="display:none;"> <a href="#pauseCharts"> <?php echo PMA_getImage('play.png'); ?> <?php echo __('Start Monitor'); ?> </a> <a href="#settingsPopup" rel="popupLink" style="display:none;"> <?php echo PMA_getImage('s_cog.png'); ?> <?php echo __('Settings'); ?> </a> <?php if (!PMA_DRIZZLE) { ?> <a href="#monitorInstructionsDialog"> <?php echo PMA_getImage('b_help.png'); ?> <?php echo __('Instructions/Setup'); ?> </a> <?php } ?> <a href="#endChartEditMode" style="display:none;"> <?php echo PMA_getImage('s_okay.png'); ?> <?php echo __('Done rearranging/editing charts'); ?> </a> </div> <div class="popupContent settingsPopup"> <a href="#addNewChart"> <?php echo PMA_getImage('b_chart.png'); ?> <?php echo __('Add chart'); ?> </a> <a href="#rearrangeCharts"><?php echo PMA_getImage('b_tblops.png'); echo __('Rearrange/edit charts'); ?> </a> <div class="clearfloat paddingtop"></div> <div class="floatleft"> <?php echo __('Refresh rate') . '<br />'; refreshList('gridChartRefresh', 5, array(2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200)); ?> <br /> </div> <div class="floatleft"> <?php echo __('Chart columns'); ?> <br /> <select name="chartColumns"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> </select> </div> <div class="clearfloat paddingtop"> <b><?php echo __('Chart arrangement'); ?> </b> <?php echo PMA_showHint(__('The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.')); ?> <br/> <a href="#importMonitorConfig"><?php echo __('Import'); ?> </a> <a href="#exportMonitorConfig"><?php echo __('Export'); ?> </a> <a href="#clearMonitorConfig"><?php echo __('Reset to default'); ?> </a> </div> </div> <div id="monitorInstructionsDialog" title="<?php echo __('Monitor Instructions'); ?> " style="display:none;"> <?php echo __('The phpMyAdmin Monitor can assist you in optimizing the server configuration and track down time intensive queries. For the latter you will need to set log_output to \'TABLE\' and have either the slow_query_log or general_log enabled. Note however, that the general_log produces a lot of data and increases server load by up to 15%'); ?> <?php if (PMA_MYSQL_INT_VERSION < 50106) { ?> <p> <?php echo PMA_getImage('s_attention.png'); ?> <?php echo __('Unfortunately your Database server does not support logging to table, which is a requirement for analyzing the database logs with phpMyAdmin. Logging to table is supported by MySQL 5.1.6 and onwards. You may still use the server charting features however.'); ?> </p> <?php } else { ?> <p></p> <img class="ajaxIcon" src="<?php echo $GLOBALS['pmaThemeImage']; ?> ajax_clock_small.gif" alt="Loading" /> <div class="ajaxContent"></div> <div class="monitorUse" style="display:none;"> <p></p> <?php echo '<strong>'; echo __('Using the monitor:'); echo '</strong><p>'; echo __('Your browser will refresh all displayed charts in a regular interval. You may add charts and change the refresh rate under \'Settings\', or remove any chart using the cog icon on each respective chart.'); echo '</p><p>'; echo __('To display queries from the logs, select the relevant time span on any chart by holding down the left mouse button and panning over the chart. Once confirmed, this will load a table of grouped queries, there you may click on any occuring SELECT statements to further analyze them.'); echo '</p>'; ?> <p> <?php echo PMA_getImage('s_attention.png'); ?> <?php echo '<strong>'; echo __('Please note:'); echo '</strong><br />'; echo __('Enabling the general_log may increase the server load by 5-15%. Also be aware that generating statistics from the logs is a load intensive task, so it is advisable to select only a small time span and to disable the general_log and empty its table once monitoring is not required any more.'); ?> </p> </div> <?php } ?> </div> <div id="addChartDialog" title="<?php echo __('Add chart'); ?> " style="display:none;"> <div id="tabGridVariables"> <p><input type="text" name="chartTitle" value="<?php echo __('Chart Title'); ?> " /></p> <input type="radio" name="chartType" value="preset" id="chartPreset" /> <label for="chartPreset"><?php echo __('Preset chart'); ?> </label> <select name="presetCharts"></select><br/> <input type="radio" name="chartType" value="variable" id="chartStatusVar" checked="checked" /> <label for="chartStatusVar"><?php echo __('Status variable(s)'); ?> </label><br/> <div id="chartVariableSettings"> <label for="chartSeries"><?php echo __('Select series:'); ?> </label><br /> <select id="chartSeries" name="varChartList" size="1"> <option><?php echo __('Commonly monitored'); ?> </option> <option>Processes</option> <option>Questions</option> <option>Connections</option> <option>Bytes_sent</option> <option>Bytes_received</option> <option>Threads_connected</option> <option>Created_tmp_disk_tables</option> <option>Handler_read_first</option> <option>Innodb_buffer_pool_wait_free</option> <option>Key_reads</option> <option>Open_tables</option> <option>Select_full_join</option> <option>Slow_queries</option> </select><br /> <label for="variableInput"><?php echo __('or type variable name:'); ?> </label> <input type="text" name="variableInput" id="variableInput" /> <p></p> <input type="checkbox" name="differentialValue" id="differentialValue" value="differential" checked="checked" /> <label for="differentialValue"><?php echo __('Display as differential value'); ?> </label><br /> <input type="checkbox" id="useDivisor" name="useDivisor" value="1" /> <label for="useDivisor"><?php echo __('Apply a divisor'); ?> </label> <span class="divisorInput" style="display:none;"> <input type="text" name="valueDivisor" size="4" value="1" /> (<a href="#kibDivisor"><?php echo __('KiB'); ?> </a>, <a href="#mibDivisor"><?php echo __('MiB'); ?> </a>) </span><br /> <input type="checkbox" id="useUnit" name="useUnit" value="1" /> <label for="useUnit"><?php echo __('Append unit to data values'); ?> </label> <span class="unitInput" style="display:none;"> <input type="text" name="valueUnit" size="4" value="" /> </span> <p> <a href="#submitAddSeries"><b><?php echo __('Add this series'); ?> </b></a> <span id="clearSeriesLink" style="display:none;"> | <a href="#submitClearSeries"><?php echo __('Clear series'); ?> </a> </span> </p> <?php echo __('Series in Chart:'); ?> <br/> <span id="seriesPreview"> <i><?php echo __('None'); ?> </i> </span> </div> </div> </div> <!-- For generic use --> <div id="emptyDialog" title="Dialog" style="display:none;"> </div> <?php if (!PMA_DRIZZLE) { ?> <div id="logAnalyseDialog" title="<?php echo __('Log statistics'); ?> " style="display:none;"> <p> <?php echo __('Selected time range:'); ?> <input type="text" name="dateStart" class="datetimefield" value="" /> - <input type="text" name="dateEnd" class="datetimefield" value="" /></p> <input type="checkbox" id="limitTypes" value="1" checked="checked" /> <label for="limitTypes"> <?php echo __('Only retrieve SELECT,INSERT,UPDATE and DELETE Statements'); ?> </label> <br/> <input type="checkbox" id="removeVariables" value="1" checked="checked" /> <label for="removeVariables"> <?php echo __('Remove variable data in INSERT statements for better grouping'); ?> </label> <?php echo '<p>'; echo __('Choose from which log you want the statistics to be generated from.'); echo '</p><p>'; echo __('Results are grouped by query text.'); echo '</p>'; ?> </div> <div id="queryAnalyzerDialog" title="<?php echo __('Query analyzer'); ?> " style="display:none;"> <textarea id="sqlquery"> </textarea> <p></p> <div class="placeHolder"></div> </div> <?php } ?> <table border="0" class="clearfloat" id="chartGrid"> </table> <div id="logTable"> <br/> </div> <script type="text/javascript"> variableNames = [ <?php $i = 0; foreach ($server_status as $name => $value) { if (is_numeric($value)) { if ($i++ > 0) { echo ", "; } echo "'" . $name . "'"; } } ?> ]; </script> <?php }
// pilih aksi2 $aksi2 = @preg_replace("@[^0-9a-z]@i", "", $_GET['aksi2']); if (strtolower(trim($_POST['filterbtn'])) == "process") { $aksi2 = "process"; } else { if (strtolower(trim($_POST['backlist'])) == "close & back to criteria form") { $aksi2 = "reload"; } } // Process aksi2 switch ($aksi2) { case "process": process($smarty, $showList, $showStatistic, $showError); break; default: refreshList($smarty, $showList, $showStatistic, $showError); break; } $usn = $_SESSION['usn']; $games = new games_factory(); $memberid = $games->getMemberIDByUSN($usn); $date_first = trim($_POST['awal']); $date_last = trim($_POST['akhir']); if ($date_first == "") { $date_first = date("Y/m/d"); } if ($date_last == "") { $date_last = date("Y/m/d"); } // assign template $smarty->assign('member_id', $memberid);