-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalculoinfo.php
777 lines (647 loc) · 20.9 KB
/
calculoinfo.php
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
<?php
// Global variable for table object
$calculo = NULL;
//
// Table class for calculo
//
class ccalculo {
var $TableVar = 'calculo';
var $TableName = 'calculo';
var $TableType = 'TABLE';
var $fechahoy;
var $fechahasta;
var $diasresta;
var $diaslleva;
var $diasllevalab;
var $fields = array();
var $UseTokenInUrl = EW_USE_TOKEN_IN_URL;
var $Export; // Export
var $ExportOriginalValue = EW_EXPORT_ORIGINAL_VALUE;
var $ExportAll = TRUE;
var $SendEmail; // Send email
var $TableCustomInnerHtml; // Custom inner HTML
var $BasicSearchKeyword; // Basic search keyword
var $BasicSearchType; // Basic search type
var $CurrentFilter; // Current filter
var $CurrentOrder; // Current order
var $CurrentOrderType; // Current order type
var $RowType; // Row type
var $CssClass; // CSS class
var $CssStyle; // CSS style
var $RowAttrs = array(); // Row custom attributes
var $TableFilter = "";
var $CurrentAction; // Current action
var $UpdateConflict; // Update conflict
var $EventName; // Event name
var $EventCancelled; // Event cancelled
var $CancelMessage; // Cancel message
//
// Table class constructor
//
function ccalculo() {
global $Language;
// fechahoy
$this->fechahoy = new cField('calculo', 'calculo', 'x_fechahoy', 'fechahoy', '`fechahoy`', 200, -1, FALSE, '`fechahoy`', FALSE);
$this->fields['fechahoy'] =& $this->fechahoy;
// fechahasta
$this->fechahasta = new cField('calculo', 'calculo', 'x_fechahasta', 'fechahasta', '`fechahasta`', 200, -1, FALSE, '`fechahasta`', FALSE);
$this->fields['fechahasta'] =& $this->fechahasta;
// diasresta
$this->diasresta = new cField('calculo', 'calculo', 'x_diasresta', 'diasresta', '`diasresta`', 3, -1, FALSE, '`diasresta`', FALSE);
$this->diasresta->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['diasresta'] =& $this->diasresta;
// diaslleva
$this->diaslleva = new cField('calculo', 'calculo', 'x_diaslleva', 'diaslleva', '`diaslleva`', 3, -1, FALSE, '`diaslleva`', FALSE);
$this->diaslleva->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['diaslleva'] =& $this->diaslleva;
// diasllevalab
$this->diasllevalab = new cField('calculo', 'calculo', 'x_diasllevalab', 'diasllevalab', '`diasllevalab`', 3, -1, FALSE, '`diasllevalab`', FALSE);
$this->diasllevalab->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['diasllevalab'] =& $this->diasllevalab;
}
// Table caption
function TableCaption() {
global $Language;
return $Language->TablePhrase($this->TableVar, "TblCaption");
}
// Page caption
function PageCaption($Page) {
global $Language;
$Caption = $Language->TablePhrase($this->TableVar, "TblPageCaption" . $Page);
if ($Caption == "") $Caption = "Page " . $Page;
return $Caption;
}
// Export return page
function ExportReturnUrl() {
$url = @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL];
return ($url <> "") ? $url : ew_CurrentPage();
}
function setExportReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL] = $v;
}
// Records per page
function getRecordsPerPage() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE];
}
function setRecordsPerPage($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE] = $v;
}
// Start record number
function getStartRecordNumber() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC];
}
function setStartRecordNumber($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC] = $v;
}
// Search highlight name
function HighlightName() {
return "calculo_Highlight";
}
// Advanced search
function getAdvancedSearch($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld];
}
function setAdvancedSearch($fld, $v) {
if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] <> $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] = $v;
}
}
// Basic search keyword
function getSessionBasicSearchKeyword() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH];
}
function setSessionBasicSearchKeyword($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH] = $v;
}
// Basic search type
function getSessionBasicSearchType() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE];
}
function setSessionBasicSearchType($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE] = $v;
}
// Search WHERE clause
function getSearchWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE];
}
function setSearchWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE] = $v;
}
// Single column sort
function UpdateSort(&$ofld) {
if ($this->CurrentOrder == $ofld->FldName) {
$sSortField = $ofld->FldExpression;
$sLastSort = $ofld->getSort();
if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") {
$sThisSort = $this->CurrentOrderType;
} else {
$sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC";
}
$ofld->setSort($sThisSort);
$this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session
} else {
$ofld->setSort("");
}
}
// Session WHERE clause
function getSessionWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE];
}
function setSessionWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE] = $v;
}
// Session ORDER BY
function getSessionOrderBy() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY];
}
function setSessionOrderBy($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY] = $v;
}
// Session key
function getKey($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld];
}
function setKey($fld, $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld] = $v;
}
// Table level SQL
function SqlFrom() { // From
return "`calculo`";
}
function SqlSelect() { // Select
return "SELECT * FROM " . $this->SqlFrom();
}
function SqlWhere() { // Where
$sWhere = "";
$this->TableFilter = "";
if ($this->TableFilter <> "") {
if ($sWhere <> "") $sWhere = "(" . $sWhere . ") AND (";
$sWhere .= "(" . $this->TableFilter . ")";
}
return $sWhere;
}
function SqlGroupBy() { // Group By
return "";
}
function SqlHaving() { // Having
return "";
}
function SqlOrderBy() { // Order By
return "";
}
// Check if Anonymous User is allowed
function AllowAnonymousUser() {
switch (EW_PAGE_ID) {
case "add":
case "register":
case "addopt":
return ;
case "edit":
case "update":
return ;
case "delete":
return ;
case "view":
return ;
case "search":
return ;
default:
return ;
}
}
// Apply User ID filters
function ApplyUserIDFilters($sFilter) {
return $sFilter;
}
// Get SQL
function GetSQL($where, $orderby) {
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$where, $orderby);
}
// Table SQL
function SQL() {
$sFilter = $this->CurrentFilter;
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$sFilter, $sSort);
}
// Table SQL with List page filter
function SelectSQL() {
$sFilter = $this->getSessionWhere();
if ($this->CurrentFilter <> "") {
if ($sFilter <> "") $sFilter = "(" . $sFilter . ") AND ";
$sFilter .= "(" . $this->CurrentFilter . ")";
}
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),
$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);
}
// Try to get record count
function TryGetRecordCount($sSql) {
global $conn;
$cnt = -1;
if ($this->TableType == 'TABLE' || $this->TableType == 'VIEW') {
$sSql = "SELECT COUNT(*) FROM" . substr($sSql, 13);
} else {
$sSql = "SELECT COUNT(*) FROM (" . $sSql . ") EW_COUNT_TABLE";
}
if ($rs = $conn->Execute($sSql)) {
if (!$rs->EOF && $rs->FieldCount() > 0) {
$cnt = $rs->fields[0];
$rs->Close();
}
}
return intval($cnt);
}
// Get record count based on filter (for detail record count in master table pages)
function LoadRecordCount($sFilter) {
$origFilter = $this->CurrentFilter;
$this->CurrentFilter = $sFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $this->LoadRs($this->CurrentFilter)) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// Get record count (for current List page)
function SelectRecordCount() {
global $conn;
$origFilter = $this->CurrentFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SelectSQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $conn->Execute($this->SelectSQL())) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// INSERT statement
function InsertSQL(&$rs) {
global $conn;
$names = "";
$values = "";
foreach ($rs as $name => $value) {
$names .= $this->fields[$name]->FldExpression . ",";
$values .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($names, -1) == ",") $names = substr($names, 0, strlen($names)-1);
if (substr($values, -1) == ",") $values = substr($values, 0, strlen($values)-1);
return "INSERT INTO `calculo` ($names) VALUES ($values)";
}
// UPDATE statement
function UpdateSQL(&$rs) {
global $conn;
$SQL = "UPDATE `calculo` SET ";
foreach ($rs as $name => $value) {
$SQL .= $this->fields[$name]->FldExpression . "=";
$SQL .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($SQL, -1) == ",") $SQL = substr($SQL, 0, strlen($SQL)-1);
if ($this->CurrentFilter <> "") $SQL .= " WHERE " . $this->CurrentFilter;
return $SQL;
}
// DELETE statement
function DeleteSQL(&$rs) {
$SQL = "DELETE FROM `calculo` WHERE ";
$SQL .= ew_QuotedName('fechahoy') . '=' . ew_QuotedValue($rs['fechahoy'], $this->fechahoy->FldDataType) . ' AND ';
$SQL .= ew_QuotedName('fechahasta') . '=' . ew_QuotedValue($rs['fechahasta'], $this->fechahasta->FldDataType) . ' AND ';
if (substr($SQL, -5) == " AND ") $SQL = substr($SQL, 0, strlen($SQL)-5);
if ($this->CurrentFilter <> "") $SQL .= " AND " . $this->CurrentFilter;
return $SQL;
}
// Key filter WHERE clause
function SqlKeyFilter() {
return "`fechahoy` = '@fechahoy@' AND `fechahasta` = '@fechahasta@'";
}
// Key filter
function KeyFilter() {
$sKeyFilter = $this->SqlKeyFilter();
$sKeyFilter = str_replace("@fechahoy@", ew_AdjustSql($this->fechahoy->CurrentValue), $sKeyFilter); // Replace key value
$sKeyFilter = str_replace("@fechahasta@", ew_AdjustSql($this->fechahasta->CurrentValue), $sKeyFilter); // Replace key value
return $sKeyFilter;
}
// Return page URL
function getReturnUrl() {
$name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL;
// Get referer URL automatically
if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page
$_SESSION[$name] = ew_ServerVar("HTTP_REFERER"); // Save to Session
if (@$_SESSION[$name] <> "") {
return $_SESSION[$name];
} else {
return "calculolist.php";
}
}
function setReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
}
// List URL
function ListUrl() {
return "calculolist.php";
}
// View URL
function ViewUrl() {
return $this->KeyUrl("calculoview.php", $this->UrlParm());
}
// Add URL
function AddUrl() {
$AddUrl = "calculoadd.php";
$sUrlParm = $this->UrlParm();
if ($sUrlParm <> "")
$AddUrl .= "?" . $sUrlParm;
return $AddUrl;
}
// Edit URL
function EditUrl() {
return $this->KeyUrl("calculoedit.php", $this->UrlParm());
}
// Inline edit URL
function InlineEditUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
}
// Copy URL
function CopyUrl() {
return $this->KeyUrl("calculoadd.php", $this->UrlParm());
}
// Inline copy URL
function InlineCopyUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
}
// Delete URL
function DeleteUrl() {
return $this->KeyUrl("calculodelete.php", $this->UrlParm());
}
// Add key value to URL
function KeyUrl($url, $parm = "") {
$sUrl = $url . "?";
if ($parm <> "") $sUrl .= $parm . "&";
if (!is_null($this->fechahoy->CurrentValue)) {
$sUrl .= "fechahoy=" . urlencode($this->fechahoy->CurrentValue);
} else {
return "javascript:alert(ewLanguage.Phrase(\"InvalidRecord\"));";
}
if (!is_null($this->fechahasta->CurrentValue)) {
$sUrl .= "&fechahasta=" . urlencode($this->fechahasta->CurrentValue);
} else {
return "javascript:alert(ewLanguage.Phrase(\"InvalidRecord\"));";
}
return $sUrl;
}
// Sort URL
function SortUrl(&$fld) {
if ($this->CurrentAction <> "" || $this->Export <> "" ||
in_array($fld->FldType, array(128, 204, 205))) { // Unsortable data type
return "";
} elseif ($fld->Sortable) {
$sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort());
return ew_CurrentPage() . "?" . $sUrlParm;
} else {
return "";
}
}
// Add URL parameter
function UrlParm($parm = "") {
$UrlParm = ($this->UseTokenInUrl) ? "t=calculo" : "";
if ($parm <> "") {
if ($UrlParm <> "")
$UrlParm .= "&";
$UrlParm .= $parm;
}
return $UrlParm;
}
// Load rows based on filter
function &LoadRs($sFilter) {
global $conn;
// Set up filter (SQL WHERE clause) and get return SQL
$this->CurrentFilter = $sFilter;
$sSql = $this->SQL();
return $conn->Execute($sSql);
}
// Load row values from recordset
function LoadListRowValues(&$rs) {
$this->fechahoy->setDbValue($rs->fields('fechahoy'));
$this->fechahasta->setDbValue($rs->fields('fechahasta'));
$this->diasresta->setDbValue($rs->fields('diasresta'));
$this->diaslleva->setDbValue($rs->fields('diaslleva'));
$this->diasllevalab->setDbValue($rs->fields('diasllevalab'));
}
// Render list row values
function RenderListRow() {
global $conn, $Security;
// Call Row Rendering event
$this->Row_Rendering();
// Common render codes
// fechahoy
$this->fechahoy->CellCssStyle = ""; $this->fechahoy->CellCssClass = "";
$this->fechahoy->CellAttrs = array(); $this->fechahoy->ViewAttrs = array(); $this->fechahoy->EditAttrs = array();
// fechahasta
$this->fechahasta->CellCssStyle = ""; $this->fechahasta->CellCssClass = "";
$this->fechahasta->CellAttrs = array(); $this->fechahasta->ViewAttrs = array(); $this->fechahasta->EditAttrs = array();
// diasresta
$this->diasresta->CellCssStyle = ""; $this->diasresta->CellCssClass = "";
$this->diasresta->CellAttrs = array(); $this->diasresta->ViewAttrs = array(); $this->diasresta->EditAttrs = array();
// diaslleva
$this->diaslleva->CellCssStyle = ""; $this->diaslleva->CellCssClass = "";
$this->diaslleva->CellAttrs = array(); $this->diaslleva->ViewAttrs = array(); $this->diaslleva->EditAttrs = array();
// diasllevalab
$this->diasllevalab->CellCssStyle = ""; $this->diasllevalab->CellCssClass = "";
$this->diasllevalab->CellAttrs = array(); $this->diasllevalab->ViewAttrs = array(); $this->diasllevalab->EditAttrs = array();
// fechahoy
if (strval($this->fechahoy->CurrentValue) <> "") {
switch ($this->fechahoy->CurrentValue) {
case "Lunes":
$this->fechahoy->ViewValue = "Lunes";
break;
case "Martes":
$this->fechahoy->ViewValue = "Martes";
break;
case "Miercoles":
$this->fechahoy->ViewValue = "Miercoles";
break;
case "Jueves":
$this->fechahoy->ViewValue = "Jueves";
break;
case "Viernes":
$this->fechahoy->ViewValue = "Viernes";
break;
case "Sabado":
$this->fechahoy->ViewValue = "Sabado";
break;
case "Domingo":
$this->fechahoy->ViewValue = "Domingo";
break;
default:
$this->fechahoy->ViewValue = $this->fechahoy->CurrentValue;
}
} else {
$this->fechahoy->ViewValue = NULL;
}
$this->fechahoy->CssStyle = "";
$this->fechahoy->CssClass = "";
$this->fechahoy->ViewCustomAttributes = "";
// fechahasta
$this->fechahasta->ViewValue = $this->fechahasta->CurrentValue;
$this->fechahasta->CssStyle = "";
$this->fechahasta->CssClass = "";
$this->fechahasta->ViewCustomAttributes = "";
// diasresta
$this->diasresta->ViewValue = $this->diasresta->CurrentValue;
$this->diasresta->CssStyle = "";
$this->diasresta->CssClass = "";
$this->diasresta->ViewCustomAttributes = "";
// diaslleva
$this->diaslleva->ViewValue = $this->diaslleva->CurrentValue;
$this->diaslleva->CssStyle = "";
$this->diaslleva->CssClass = "";
$this->diaslleva->ViewCustomAttributes = "";
// diasllevalab
$this->diasllevalab->ViewValue = $this->diasllevalab->CurrentValue;
$this->diasllevalab->CssStyle = "";
$this->diasllevalab->CssClass = "";
$this->diasllevalab->ViewCustomAttributes = "";
// fechahoy
$this->fechahoy->HrefValue = "";
$this->fechahoy->TooltipValue = "";
// fechahasta
$this->fechahasta->HrefValue = "";
$this->fechahasta->TooltipValue = "";
// diasresta
$this->diasresta->HrefValue = "";
$this->diasresta->TooltipValue = "";
// diaslleva
$this->diaslleva->HrefValue = "";
$this->diaslleva->TooltipValue = "";
// diasllevalab
$this->diasllevalab->HrefValue = "";
$this->diasllevalab->TooltipValue = "";
// Call Row Rendered event
$this->Row_Rendered();
}
// Aggregate list row values
function AggregateListRowValues() {
}
// Aggregate list row (for rendering)
function AggregateListRow() {
}
// Row styles
function RowStyles() {
$sAtt = "";
$sStyle = trim($this->CssStyle);
if (@$this->RowAttrs["style"] <> "")
$sStyle .= " " . $this->RowAttrs["style"];
$sClass = trim($this->CssClass);
if (@$this->RowAttrs["class"] <> "")
$sClass .= " " . $this->RowAttrs["class"];
if (trim($sStyle) <> "")
$sAtt .= " style=\"" . trim($sStyle) . "\"";
if (trim($sClass) <> "")
$sAtt .= " class=\"" . trim($sClass) . "\"";
return $sAtt;
}
// Row attributes
function RowAttributes() {
$sAtt = $this->RowStyles();
if ($this->Export == "") {
foreach ($this->RowAttrs as $k => $v) {
if ($k <> "class" && $k <> "style" && trim($v) <> "")
$sAtt .= " " . $k . "=\"" . trim($v) . "\"";
}
}
return $sAtt;
}
// Field object by name
function fields($fldname) {
return $this->fields[$fldname];
}
// Table level events
// Recordset Selecting event
function Recordset_Selecting(&$filter) {
// Enter your code here
}
// Recordset Selected event
function Recordset_Selected(&$rs) {
//echo "Recordset Selected";
}
// Recordset Search Validated event
function Recordset_SearchValidated() {
// Example:
//$this->MyField1->AdvancedSearch->SearchValue = "your search criteria"; // Search value
}
// Recordset Searching event
function Recordset_Searching(&$filter) {
// Enter your code here
}
// Row_Selecting event
function Row_Selecting(&$filter) {
// Enter your code here
}
// Row Selected event
function Row_Selected(&$rs) {
//echo "Row Selected";
}
// Row Rendering event
function Row_Rendering() {
// Enter your code here
}
// Row Rendered event
function Row_Rendered() {
// To view properties of field class, use:
//var_dump($this-><FieldName>);
}
// Row Inserting event
function Row_Inserting(&$rs) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Inserted event
function Row_Inserted(&$rs) {
//echo "Row Inserted"
}
// Row Updating event
function Row_Updating(&$rsold, &$rsnew) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Updated event
function Row_Updated(&$rsold, &$rsnew) {
//echo "Row Updated";
}
// Row Update Conflict event
function Row_UpdateConflict(&$rsold, &$rsnew) {
// Enter your code here
// To ignore conflict, set return value to FALSE
return TRUE;
}
// Row Deleting event
function Row_Deleting(&$rs) {
// Enter your code here
// To cancel, set return value to False
return TRUE;
}
// Row Deleted event
function Row_Deleted(&$rs) {
//echo "Row Deleted";
}
// Email Sending event
function Email_Sending(&$Email, &$Args) {
//var_dump($Email); var_dump($Args); exit();
return TRUE;
}
}
?>