Menu

[f1bb48]: / pme-run.php  Maximize  Restore  History

Download this file

173 lines (155 with data), 5.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php
//global $debug_query; $debug_query = true;
$template = $_REQUEST['template'];
if (isset($template) && ($template != '')) {
// TODO: try to load template
if ($template == 'WPCSS') {
echo '
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" href="css/phpMyEdit.css" />
<link rel="stylesheet" href="css/phpMyEdit-multireport.css" type="text/css" />
</head>
<body class="pme-main pme-report">
';
}
} else {
// this is the default
echo '
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Report</title>
<link rel="shortcut icon" type="image/x-icon" href="images/pme-icon.png" />
<link rel="stylesheet" href="css/phpMyEdit.css" />
<link rel="stylesheet" href="css/phpMyEdit-multireport.css" type="text/css" />
<script type="text/javascript" src="js/phpMyEdit.js"></script>
<style type="text/css">
</style>
</head>
<body class="pme-main pme-report">
';
}
function phpMyEditPageHeader($inst) {
global $debug_query;
echo "<div class='pme-report'>\n";
if (in_array($inst->{'page_type'}, array('L', 'A', 'C', 'V', 'D'))) {
$report = $inst->{'fdd'}['rd_reportcode']['default'];
if (isset($report)) {
if ($debug_query) {
$sql = "SELECT `re_name` AS 'Report Name', `re_title` AS 'Report Title'
FROM `pme_reports`
WHERE `re_code` = '" . $report . "'";
$inst->PrintAssociateTable($sql);
$sql = "SELECT `rd_sequence` AS 'Sequence',
`rd_title` AS 'Section Title',
`rd_sql` AS 'SQL'
FROM `pme_repdetails`
WHERE `rd_reportcode` = '" . $report . "'
ORDER BY `rd_sequence` ASC";
$inst->PrintAssociateTable($sql);
}
$sql = "SELECT `re_title` FROM `pme_reports`
WHERE `re_code` = '" . $report . "'";
$row = $inst->QueryDB($sql);
if (isset($row['re_title'])) {
echo "<h3>{$row['re_title']}</h3>\n";
}
$sql = "SELECT `rd_title`,`rd_sql` FROM `pme_repdetails`
WHERE `rd_reportcode` = '" . $report . "'
ORDER BY `rd_sequence` ASC";
$rows = $inst->FetchDB($sql, 'a');
if ($rows) {
foreach ($rows as $row) {
if (isset($row['rd_title'])) {
echo "<h4>{$row['rd_title']}</h4>\n";
}
if (isset($row['rd_sql'])) {
$inst->PrintAssociateTable($row['rd_sql']);
}
}
}
}
}
}
function phpMyEditPageFooter($inst) {
echo "</div>\n";
}
/*
* IMPORTANT NOTE: This generated file contains only a subset of huge amount
* of options that can be used with phpMyEdit. To get information about all
* features offered by phpMyEdit, please check the documentation. It is available
* on the phpMyEdit pages or in the manuals folder. Some information can also be
* found in the examples/configoptions.md file.
*
* https://sourceforge.net/projects/phpmariaedit/
*
* This file was generated by:
*
* phpMyEdit version: 5.7.6
* lib/phpMyEdit.class.php class: 5.7.6
* phpMyEditSetup.php script: 5.7.6
* generated script: 5.7.6
*
* This file was manually updated.
*/
require_once(dirname(__FILE__).'/lib/extensions/phpMyEdit-multireport.class.php');
require_once(dirname(__FILE__).'/lib/phpMyEditDB.php');
require_once(dirname(__FILE__).'/phpMyEditDefaults.php');
if (isset($_REQUEST['report'])) {
$opts['cgi']['persist'] = array('report' => $_REQUEST['report']);
}
if (isset($opts['cgi']['persist']['report'])) {
$report = $opts['cgi']['persist']['report'];
$opts['filters'] = "`re_code` = '" . $report . "'";
} else {
$report = '';
$opts['filters'] = "`re_code` != ''";
}
$opts['tb'] = 'pme_reports';
// custom settings overwriting general edit defaults
$opts['options'] = '';
$opts['navigation'] = 'GD';
$opts['execute'] = 0;
// Name of field which is the unique key
$opts['key'] = 're_code';
// Type of key field (int/real/string/date etc.)
$opts['key_type'] = 'string';
// Sorting field(s)
$opts['sort_field'] = array('re_code');
$opts['fdd']['rowid'] = array(
'name' => 'ID',
'select' => 'T',
'options' => 'ACH',
'maxlen' => '10',
'js' => array('required' => true),
'default' => '0'
);
$opts['fdd']['rd_reportcode'] = array(
'name' => 'Report',
'select' => 'T',
'options' => 'ACH',
'maxlen' => '10',
'js' => array('required' => true),
'values' => array('table' => 'pme_reports',
'column' => 're_code'
)
);
if ($report != '') {
$opts['fdd']['rd_reportcode']['options'] = 'ADR';
$opts['fdd']['rd_reportcode']['default'] = $report;
}
if (isset($template) && ($template != '') && ($template != 'WPCSS')) {
echo '
<script>
PME_js_setPageTitle("Run report - ' . $report. '");
</script>
';
}
// Now important call to phpMyEdit_MultiReport
new phpMyEdit_MultiReport($opts);
//eof
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.