Issues (4542)

main.php (18 issues)

Severity
1
<?php
2
session_start();
3
if (empty($_SESSION['userid']) and empty($_SESSION['password'])) {
4
    echo "<script>window.alert('Login first.'); window.location=('index.php')</script>";
5
} else {
6
    date_default_timezone_set('Asia/Jakarta');
7
    include 'config/koneksi.php';
8
    include 'config/fungsi_indobulan.php';
9
    include 'config/browser_detection.php';
10
11
    $userid = $_SESSION['userid'];
12
    $username = $_SESSION['iusername'];
13
    $role = $_SESSION['role'];
14
    $groups = $_SESSION['groups'];
15
    $outlet = $_SESSION['outlet'];
16
    $df_outlet = $_SESSION['outlet'];
17
18
    $tipe_sales = $_SESSION['tipe_sales'];
19
20
    $r_input = $_SESSION['r_input'];
21
    $r_edit = $_SESSION['r_edit'];
22
    $r_delete = $_SESSION['r_delete'];
23
    $r_admin = $_SESSION['r_admin'];
24
25
    $gsql = mysql_query("SELECT a.main_page,b.id_modul FROM groups a inner join modul b
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

25
    $gsql = /** @scrutinizer ignore-deprecated */ mysql_query("SELECT a.main_page,b.id_modul FROM groups a inner join modul b

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
26
                    on a.main_page = b.link
27
                    WHERE id_groups ='$groups'");
28
29
    $g = mysql_fetch_array($gsql);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

29
    $g = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($gsql);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
30
31
    if ($g['main_page']) {
32
        $lmodule = $g['main_page'].'&id_module='.$g['id_modul'];
33
    } else {
34
        $lmodule = 'main.php?module=home&id_module=11';
35
    }
36
37
    $SQL = "SELECT * FROM informasi_perusahaan WHERE id_informasi_perusahaan = '1'";
38
39
    $tampil = mysql_query($SQL);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

39
    $tampil = /** @scrutinizer ignore-deprecated */ mysql_query($SQL);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
40
41
    $r = mysql_fetch_array($tampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

41
    $r = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($tampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
42
43
    $company = $r['company'];
44
45
    $logo_hotel = $r['pict'];
46
    $module = (isset($_GET['module'])) ? trim($_GET['module']) : '';
47
48
    $uSQL = "SELECT pict FROM user where id_user = '$userid' ";
49
50
    $utampil = mysql_query($uSQL);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

50
    $utampil = /** @scrutinizer ignore-deprecated */ mysql_query($uSQL);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
51
52
    $u = mysql_fetch_array($utampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

52
    $u = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($utampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
53
54
    $pict = $u['pict'];
55
56
    $id_module = isset($_GET['id_module']) ? $_GET['id_module'] : '';
57
58
    $sql = mysql_query("select * from modul where id_modul = '$id_module'");
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

58
    $sql = /** @scrutinizer ignore-deprecated */ mysql_query("select * from modul where id_modul = '$id_module'");

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
59
    $r = mysql_fetch_array($sql);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

59
    $r = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($sql);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
60
61
    $imodule = isset($_GET['module']) ? $_GET['module'] : '';
62
    $nmmodule = ucwords($r['nama_modul']);
63
    $id = $r['id_modul'];
64
65
    $psql = mysql_query("select * from modul where id_modul = '$r[parentid]'");
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

65
    $psql = /** @scrutinizer ignore-deprecated */ mysql_query("select * from modul where id_modul = '$r[parentid]'");

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
66
    $p = mysql_fetch_array($psql);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

66
    $p = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($psql);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
67
68
    $p_imodule = $p['nama_modul'];
69
    $p_id = $p['id_modul'];
70
    $p_fa_icon = (isset($p['fa_icon'])) ? $p['fa_icon'] : '';
71
72
    $kode = (isset($_GET['kode'])) ? $_GET['kode'] : '';
73
74
    if (isset($_GET['fdate']) && $_GET['fdate']) {
75
        $fdate = $_GET['fdate'];
76
        $ifdate = $_GET['fdate'];
77
    } else {
78
        $hour = time() - (1 * 1 * 60 * 60);
79
        $fdate = date('Y-m-d', $hour);
80
        $ifdate = date('Y-m-d', $hour);
81
    }
82
83
    if (isset($_GET['ldate']) && $_GET['ldate']) {
84
        $ldate = $_GET['ldate'];
85
        $ildate = $_GET['ldate'];
86
    } else {
87
        $hour = time() - (1 * 1 * 60 * 60) + (168 * 1 * 60 * 60);
88
        $ldate = date('Y-m-d', $hour);
89
        $ildate = date('Y-m-d', $hour);
90
    } ?>
91
92
<?php
93
    $SQL = "SELECT* FROM versi WHERE status = 'A' ";
94
    $tampil = mysql_query($SQL);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

94
    $tampil = /** @scrutinizer ignore-deprecated */ mysql_query($SQL);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
95
    $p = mysql_fetch_array($tampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

95
    $p = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($tampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
96
97
    $app = $p['aplikasi'];
98
99
    $versi = $p['versi']; ?>
100
101
<!DOCTYPE html>
102
<html lang="en">
103
104
<head>
105
    <!-- Meta, title, CSS, favicons, etc. -->
106
    <meta charset="utf-8">
107
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
108
    <meta name="viewport" content="width=device-width, initial-scale=1">
109
110
    <title><?=$app; ?></title>
111
112
    
113
    <!-- Bootstrap core CSS -->
114
   
115
    
116
    <link href="config/css/thickbox.css" rel="stylesheet" type="text/css" />
117
    <link href="config/css/tiny_table.css" rel="stylesheet" type="text/css" />
118
119
    <script language="javascript" src="config/js/jquery.js"></script>
120
    <script language="javascript" src="config/js/thickbox.js"></script>
121
122
    <link href="css/bootstrap.min.css" rel="stylesheet">
123
124
    <link href="fonts/css/font-awesome.min.css" rel="stylesheet">
125
    <link href="css/animate.min.css" rel="stylesheet">
126
127
    <!-- Custom styling plus plugins -->
128
    <link href="css/custom.css" rel="stylesheet">
129
    <link href="css/icheck/flat/green.css" rel="stylesheet">
130
    <link href="css/datatables/tools/css/dataTables.tableTools.css" rel="stylesheet">
131
132
        <script type="text/javascript">
133
134
        function number_format(number,num_decimal_places,dec_separator,thousand_separator)
135
        {
136
        var decimal = '00000';
137
        var negatif = (number.substring(0,1) == '-' ? '-' : '');
138
        number = Math.abs(parseFloat(number)).toString().split('.');
139
        if (number.length == 2)
140
        number[1] = (number[1] + decimal).substring(0,num_decimal_places);
141
        else
142
        number[1] = decimal.substring(0,num_decimal_places);
143
        number[0] = stringreverse(number[0]);
144
        var strdigit = '';
145
        for (i=0;i<number[0].length;i++)
146
        {
147
        if (i % 3 == 0 && i !=0) strdigit += thousand_separator;
148
        strdigit += number[0].charAt(i);
149
        }
150
        return negatif + stringreverse(strdigit) + (num_decimal_places > 0 ? dec_separator + number[1] : '');
151
        }
152
153
        function stringreverse(str)
154
        {
155
        var strlen = str.length;
156
        var strrev = '';
157
        for (i=strlen-1;i>=0;i--)
158
        {
159
        strrev += str.charAt(i);
160
        }
161
        return strrev;
162
        }
163
164
        //alert("Format 175500.235 ==>" + number_format('175500.23', 2,'.',',') );
165
        </script>
166
167
168
169
<?php
170
$mod = '?module='.$module;
171
    $tampil = mysql_query("SELECT orientation FROM modul WHERE link='".$mod."'");
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

171
    $tampil = /** @scrutinizer ignore-deprecated */ mysql_query("SELECT orientation FROM modul WHERE link='".$mod."'");

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
172
    $r = mysql_fetch_array($tampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

172
    $r = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($tampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
173
174
    if ($r['orientation'] == 'P') {
175
        ?>
176
        
177
<SCRIPT TYPE="text/javascript">
178
<!--
179
function popup<?php echo $module?>(myform, windowname)
180
{
181
if (! window.focus)return true;
182
window.open('', 'print_<?php echo $module?>.php', 'height=650,width=700,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no');
183
myform.target='print_<?php echo $module?>.php';
184
return true;
185
}
186
//-->
187
</SCRIPT>
188
189
<?php
190
    } elseif ($r['orientation'] == 'A') {
191
        ?>
192
193
<SCRIPT TYPE="text/javascript">
194
<!--
195
function popup<?php echo $module?>(myform, windowname)
196
{
197
if (! window.focus)return true;
198
window.open('', 'print_<?php echo $module?>.php', 'height=750,width=1020,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no');
199
myform.target='print_<?php echo $module?>.php';
200
return true;
201
}
202
//-->
203
</SCRIPT>
204
205
<?php
206
    } else {
207
        ?>
208
209
<SCRIPT TYPE="text/javascript">
210
<!--
211
function popup<?php echo $module?>(myform, windowname)
212
{
213
if (! window.focus)return true;
214
window.open('', 'print_<?php echo $module?>.php', 'height=650,width=1100,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no');
215
myform.target='print_<?php echo $module?>.php';
216
return true;
217
}
218
//-->
219
</SCRIPT>
220
221
222
<?php
223
    } ?>
224
  
225
226
</head>
227
228
229
<body class="nav-md">
230
231
<?php
232
233
$SQL = "SELECT* FROM versi WHERE status = 'A' ";
234
    $tampil = mysql_query($SQL);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

234
    $tampil = /** @scrutinizer ignore-deprecated */ mysql_query($SQL);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
235
    $p = mysql_fetch_array($tampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

235
    $p = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($tampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
236
237
    $app = $p['aplikasi'];
238
239
    $versi = $p['versi']; ?>
240
241
<div id="dhtmltooltip"></div>
242
<script language="javascript" src="js/dhtml.tooltips.js"></script>
243
244
245
    <div class="container body">
246
247
248
        <div class="main_container ">
249
250
            <div class="col-md-3 left_col ">
251
                <div class="left_col scroll-view ">
252
253
                    <div class="navbar nav_title" style="border: 0;text-align:center;">
254
                       <!--  <a href="#" class="site_title">
255
                           <span style='font-size:14px' class="btn btn-success"><?php echo $app; ?></span>
256
                        </a> -->
257
258
                    </div>
259
                    <div class="clearfix"></div>
260
                      <!-- menu prile quick info -->
261
                   
262
                    <div class="profile">
263
                        <div class="profile_pic">
264
                            <img src="images/profile/<?php echo $pict; ?>" alt="..." class="img-circle profile_img">
265
                        </div>
266
                        <div class="profile_info">                      
267
                            <span>Hallo,</span>                       
268
                            <h2><?php echo $username; ?></h2>
269
                        </div>
270
                    </div>
271
                    <!-- /menu prile quick info -->
272
                    
273
                    <br />
274
275
                    
276
                    <!-- sidebar menu -->
277
                    <div id="sidebar-menu" class="main_menu_side hidden-print main_menu ">
278
                    
279
280
                        <div class="menu_section">
281
                          <h3>&nbsp </h3> 
282
                            <ul class="nav side-menu">
283
284
                           <?php include 'menu.php'; ?> 
285
286
                             </ul>           
287
                        </div>
288
                    </div>
289
                    <!-- /sidebar menu -->
290
291
                    <!-- /menu footer buttons -->
292
                </div>
293
            </div>
294
 -->
295
            <!-- top navigation -->
296
            <div class="top_nav">
297
298
                <div class="nav_menu">
299
                    <nav class="" role="navigation">
300
                        <div class="nav toggle">
301
                            <a id="menu_toggle"><i class="fa fa-bars"></i></a>
302
                </div>
303
                
304
                <div class="nav navbar-nav navbar-left" style="padding-top:18px;font-size:14px;width:92%;">
305
                    <i class="fa fa-home"></i>
306
                    <a href="<?php echo $lmodule?>">Home</a>
307
                    &nbsp   
308
                    <i class="fa fa-angle-right"></i>
309
                    &nbsp
310
                    Halaman Utama
311
312
                    <span class='pull-right'>
313
                     <a href="logout.php" onclick="return confirm('keluar dari aplikasi ?')"><i class="fa fa-sign-out "></i> Keluar</a>
314
                    </span> 
315
316
317
                      </div>
318
                
319
                      
320
                      
321
 
322
                       <!--  <ul class="nav navbar-nav navbar-right">
323
                            <li class="">
324
                                <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
325
                                    <img src="images/profile/<?php echo $pict; ?>" alt=""><?php echo $userid; ?>
326
                                    <span class=" fa fa-angle-down"></span>
327
                                </a>
328
                                <ul class="dropdown-menu dropdown-usermenu animated fadeInDown pull-right">
329
                                    <li><a href="javascript:;">  <i class="fa fa-user pull-right"></i>&nbspProfile</a></li>
330
                                   
331
                                    <li><a href="logout.php" onclick="return confirm('Do you want to logout ?')"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
332
                                </ul>
333
                            </li>                            
334
                        </ul> -->              
335
                </div> 
336
            </div>
337
338
            <!-- /top navigation -->
339
340
341
            <!-- page content -->
342
            <div class="right_col" role="main">
343
344
                 <?php include 'content.php'; ?>
345
                                
346
                <!-- footer content -->
347
          
348
                            
349
                <footer>
350
                    <div class="">
351
                    
352
                    <div class="col-md-9 col-sm-12 col-xs-12 form-group"></div>
353
354
                    <?php
355
                    $SQL = "SELECT* FROM versi WHERE status = 'A' ";
356
    $tampil = mysql_query($SQL);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

356
    $tampil = /** @scrutinizer ignore-deprecated */ mysql_query($SQL);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
357
    $p = mysql_fetch_array($tampil);
0 ignored issues
show
Deprecated Code introduced by
The function mysql_fetch_array() has been deprecated: 5.5 Fetch a result row as an associative array, a numeric array, or both ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

357
    $p = /** @scrutinizer ignore-deprecated */ mysql_fetch_array($tampil);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
358
359
    $app = $p['aplikasi'];
360
361
    $versi = $p['versi']; ?>
362
                
363
                        <div class="col-md-3 col-sm-12 col-xs-12 form-group" >
364
                        </div>
365
                    </div>
366
                    <div class="clearfix"></div>
367
                </footer>
368
                <!-- /footer content -->
369
            </div>
370
            <!-- /page content -->
371
372
        </div>
373
374
    </div>
375
376
    <div id="custom_notifications" class="custom-notifications dsp_none">
377
            <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
378
            </ul>
379
            <div class="clearfix"></div>
380
            <div id="notif-group" class="tabbed_notifications"></div>
381
        </div>
382
383
384
385
        <script src="js/bootstrap.min.js"></script>
386
387
388
        <!-- chart js -->
389
        <script src="js/chartjs/chart.min.js"></script>
390
        <!-- bootstrap progress js -->
391
        <script src="js/progressbar/bootstrap-progressbar.min.js"></script>
392
        <script src="js/nicescroll/jquery.nicescroll.min.js"></script>
393
        <!-- icheck -->
394
        <script src="js/icheck/icheck.min.js"></script>
395
396
        <script src="js/custom.js"></script>
397
398
        <!-- daterangepicker -->
399
        <script type="text/javascript" src="js/moment.min2.js"></script>
400
        <script type="text/javascript" src="js/datepicker/daterangepicker.js"></script>
401
402
        <!-- datepicker -->
403
    <script type="text/javascript">
404
        $(document).ready(function () {
405
406
            var cb = function (start, end, label) {
407
                console.log(start.toISOString(), end.toISOString(), label);
408
                $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
409
                //alert("Callback has fired: [" + start.format('MMMM D, YYYY') + " to " + end.format('MMMM D, YYYY') + ", label = " + label + "]");
410
            }
411
412
            var optionSet1 = {
413
                startDate: moment().subtract(29, 'days'),
414
                endDate: moment(),
415
                minDate: '01/01/2012',
416
                maxDate: '12/31/2015',
417
                dateLimit: {
418
                    days: 60
419
                },
420
                showDropdowns: true,
421
                showWeekNumbers: true,
422
                timePicker: false,
423
                timePickerIncrement: 1,
424
                timePicker12Hour: true,
425
                ranges: {
426
                    'Today': [moment(), moment()],
427
                    'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
428
                    'Last 7 Days': [moment().subtract(6, 'days'), moment()],
429
                    'Last 30 Days': [moment().subtract(29, 'days'), moment()],
430
                    'This Month': [moment().startOf('month'), moment().endOf('month')],
431
                    'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
432
                },
433
                opens: 'left',
434
                buttonClasses: ['btn btn-default'],
435
                applyClass: 'btn-small btn-primary',
436
                cancelClass: 'btn-small',
437
                format: 'MM/DD/YYYY',
438
                separator: ' to ',
439
                locale: {
440
                    applyLabel: 'Submit',
441
                    cancelLabel: 'Clear',
442
                    fromLabel: 'From',
443
                    toLabel: 'To',
444
                    customRangeLabel: 'Custom',
445
                    daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
446
                    monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
447
                    firstDay: 1
448
                }
449
            };
450
            $('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));
451
            $('#reportrange').daterangepicker(optionSet1, cb);
452
            $('#reportrange').on('show.daterangepicker', function () {
453
                console.log("show event fired");
454
            });
455
            $('#reportrange').on('hide.daterangepicker', function () {
456
                console.log("hide event fired");
457
            });
458
            $('#reportrange').on('apply.daterangepicker', function (ev, picker) {
459
                console.log("apply event fired, start/end dates are " + picker.startDate.format('MMMM D, YYYY') + " to " + picker.endDate.format('MMMM D, YYYY'));
460
            });
461
            $('#reportrange').on('cancel.daterangepicker', function (ev, picker) {
462
                console.log("cancel event fired");
463
            });
464
            $('#options1').click(function () {
465
                $('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);
466
            });
467
            $('#options2').click(function () {
468
                $('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);
469
            });
470
            $('#destroy').click(function () {
471
                $('#reportrange').data('daterangepicker').remove();
472
            });
473
        });
474
    </script>
475
    <!-- /datepicker -->
476
477
478
        
479
480
481
    <script type="text/javascript" src="config/js/script.js"></script>
482
    <script type="text/javascript">
483
    var sorter = new TINY.table.sorter('sorter','table',{
484
        headclass:'head',
485
        ascclass:'asc',
486
        descclass:'desc',
487
        evenclass:'evenrow',
488
        oddclass:'oddrow',
489
        evenselclass:'evenselected',
490
        oddselclass:'oddselected',
491
        paginate:true,
492
        size:10,
493
        colddid:'columns',
494
        currentid:'currentpage',
495
        totalid:'totalpages',
496
        startingrecid:'startrecord',
497
        endingrecid:'endrecord',
498
        totalrecid:'totalrecords',
499
        hoverid:'selectedrow',
500
        pageddid:'pagedropdown',
501
        navid:'tablenav',
502
        <!--sortcolumn:1,-->
503
        sortdir:1,
504
        /*sum:[8],
505
        avg:[6,7,8,9],
506
        columns:[{index:7, format:'%', decimals:1},{index:8, format:'$', decimals:0}],*/
507
        init:true
508
    });
509
  </script>
510
511
</body>
512
513
</html>
514
<?php
515
}
516
?>