Initial commit
This commit is contained in:
commit
461b1b7060
1
libs/data/logs/dcb/xml_response_2024_09.log
Normal file
1
libs/data/logs/dcb/xml_response_2024_09.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
20240920154256|15:42:56|UploadOMSWaybill|200|<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><UploadOMSWaybillResponse xmlns="http://tempuri.org/"><UploadOMSWaybillResult>SUCCESS : Waybill AISF_7408 created successfully</UploadOMSWaybillResult></UploadOMSWaybillResponse></s:Body></s:Envelope>|
|
||||
1
libs/data/logs/dcb/xml_response_2024_11.log
Normal file
1
libs/data/logs/dcb/xml_response_2024_11.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
20241108150407|15:04:07|TracknTrace|200|<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><TracknTraceResponse xmlns="http://tempuri.org/"><TracknTraceResult xmlns:a="http://schemas.datacontract.org/2004/07/OMSIntegrate.Response" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:ErrorCode i:nil="true"/><a:ErrorMessage>Invalid encrypted text. The text was not encrypted with the correct credentials. Please contact FreightWare Support.</a:ErrorMessage><a:Waybill i:nil="true"/></TracknTraceResult></TracknTraceResponse></s:Body></s:Envelope>|
|
||||
0
libs/data/logs/dcb/xml_response_2025_01.log
Normal file
0
libs/data/logs/dcb/xml_response_2025_01.log
Normal file
1
libs/data/logs/dcb/xml_send_2024_09.log
Normal file
1
libs/data/logs/dcb/xml_send_2024_09.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
20240920154256|15:42:56|UploadOMSWaybill|https://dcboms.co.za/API/OMSIntegrate.svc|http://tempuri.org/IOMSIntegrate/UploadOMSWaybill|<?xml version="1.0" encoding="utf-8"?><Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><UploadOMSWaybill xmlns="http://tempuri.org/"><request><accountNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">DI31F</accountNumber><invoices xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"><WaybillInvoices xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities"><InvAmount></InvAmount><InvDescription></InvDescription><InvNum></InvNum><InvUnits></InvUnits><WaybillId>0</WaybillId></WaybillInvoices></invoices><numParcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">1</numParcels><parcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"><WaybillParcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities"><LoadType>STD</LoadType><RateType>G</RateType><WaybillId>0</WaybillId><breadth>1</breadth><description>1 x Tripod</description><height>1</height><length>1</length><mass>1</mass><parcelNumber>1</parcelNumber><qty>1</qty></WaybillParcels></parcels><recieversAddress1 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">53 Tiverton Rd, Plumstead</recieversAddress1><recieversAddress2 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Cape Town</recieversAddress2><recieversCity xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Cape Town</recieversCity><recieversContactPerson xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Blaine Bahnemann</recieversContactPerson><recieversContactTel xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">0619691846</recieversContactTel><recieversName xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">AISA CPT</recieversName><recieversPostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">7801</recieversPostalCode><recieversRouteCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">CPTSOUTH</recieversRouteCode><recieversSuburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Plumstead</recieversSuburb><sendersAddress1 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Paul Roos, La Colline</sendersAddress1><sendersAddress2 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Stellenbosch</sendersAddress2><sendersCity xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Stellenbosch</sendersCity><sendersContactPerson xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">test23</sendersContactPerson><sendersContactTelephone xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">test324</sendersContactTelephone><sendersName xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Paul Roos</sendersName><sendersPostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">7599</sendersPostalCode><sendersRouteCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">CPTBOL</sendersRouteCode><sendersSuburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">La Colline</sendersSuburb><serviceType xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">OE</serviceType><specialInstructions xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">Event end : 2025-02-28 17:00:00. </specialInstructions><waybillNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">AISF_7408</waybillNumber></request></UploadOMSWaybill></Body></Envelope>|
|
||||
1
libs/data/logs/dcb/xml_send_2024_11.log
Normal file
1
libs/data/logs/dcb/xml_send_2024_11.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
20241108150407|15:04:07|TracknTrace|https://dcboms.co.za/API/OMSIntegrate.svc|http://tempuri.org/IOMSIntegrate/TracknTrace|<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><TracknTrace xmlns="http://tempuri.org/"><!-- Optional --><request><enPassword xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"></enPassword><enUsername xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"></enUsername><waybillNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">AIST_740812312</waybillNumber></request></TracknTrace></soap:Body></soap:Envelope>|
|
||||
0
libs/data/logs/dcb/xml_send_2025_01.log
Normal file
0
libs/data/logs/dcb/xml_send_2025_01.log
Normal file
0
libs/data/logs/dcb/xml_send_2025_02.log
Normal file
0
libs/data/logs/dcb/xml_send_2025_02.log
Normal file
2
libs/data/logs/events/changes.dat
Normal file
2
libs/data/logs/events/changes.dat
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
202520251125092027|2025-11-25 09:20:27|event_quote_id='10857'|user_id='140'|changed_from|club_ids='758;897;755',event_system_id_multiple='350;352;190
|
||||
202520251125092027|2025-11-25 09:20:27|event_quote_id='10857'|user_id='140'|changed_from|club_ids='758;897;755',event_system_id_multiple='350;352;190'
|
||||
46
libs/data/logs/events/changes_analytics.dat
Normal file
46
libs/data/logs/events/changes_analytics.dat
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
202520251119123641|2025-11-19 12:36:41|analytics_event_booking_id='1017'|user_id='452'|changed_from|fixtures_saved_values='2025-11-18 08:00:00;;open;;5606;;5125|;;open;;5606;;5125|;;open;;5606;;5125'
|
||||
202520251119123431|2025-11-19 12:34:31|analytics_event_booking_id='1017'|user_id='452'|changed_from|fixtures_saved_values=';;open;;5606;;5125'
|
||||
202520251114124411|2025-11-14 12:44:11|analytics_event_booking_id='1016'|user_id='112'|changed_from|analytics_saved_values='',fixtures_saved_values=''
|
||||
202520251028140046|2025-10-28 14:00:46|analytics_event_booking_id='1015'|user_id='25'|changed_from|fixtures_saved_values='2025-10-25 09:00:00;5;u19;a;6993;;2600;s;s|2025-10-25 11:00:00;5;u19;a;7697;;8458;s;s|2025-10-25 14:00:00;5;u19;a;2799;;6978;s;s|2025-10-26 08:00:00;5;u19;a;6993;;2600;s;s|2025-10-26 12:00:00;5;u19;a;7697;;6978;s;s|2025-10-26 15:00:00;5;u19;a;2799;;2600;s;s|2025-10-27 10:00:00;5;u19;a;6993;;8458;s;s|2025-10-27 13:00:00;5;u19;a;7697;;6978;s;s|2025-10-27 14:00:00;5;u19;a;2799;;2600;s;s|2025-10-28 08:00:00;5;u19;a;6993;;8458;s;s|2025-10-28 10:00:00;5;u19;a;7697;;8458;s;s|2025-10-28 11:00:00;5;u19;a;2799;;6978;s;s'
|
||||
202520251024102525|2025-10-24 10:25:25|analytics_event_booking_id='1014'|user_id='112'|changed_from|fixtures_saved_values='2025-10-25 09:00:00;5;u19;a;;3;2600;s;s|2025-10-25 11:00:00;5;u19;a;;1;8458;s;s|2025-10-25 14:00:00;5;u19;a;;2;6978;s;s|2025-10-26 08:00:00;5;u19;a;;4;2600;s;s|2025-10-26 12:00:00;5;u19;a;;3;6978;s;s|2025-10-26 15:00:00;5;u19;a;;1;2600;s;s|2025-10-27 10:00:00;5;u19;a;;2;8458;s;s|2025-10-27 13:00:00;5;u19;a;;4;6978;s;s|2025-10-27 14:00:00;5;u19;a;;3;2600;s;s|2025-10-28 08:00:00;5;u19;a;;2;8458;s;s|2025-10-28 10:00:00;5;u19;a;;1;8458;s;s|2025-10-28 11:00:00;5;u19;a;;1;6978;s;s'
|
||||
202520251024102410|2025-10-24 10:24:10|analytics_event_booking_id='1014'|user_id='112'|changed_from|fixtures_saved_values='2025-10-25 09:00:00;5;u19;a;6993;3;2600;s;s|2025-10-25 11:00:00;5;u19;a;7697;1;8458;s;s|2025-10-25 14:00:00;5;u19;a;2799;2;6978;s;s|2025-10-26 08:00:00;5;u19;a;6993;4;2600;s;s|2025-10-26 12:00:00;5;u19;a;7697;3;6978;s;s|2025-10-26 15:00:00;5;u19;a;2799;1;2600;s;s|2025-10-27 10:00:00;5;u19;a;6993;2;8458;s;s|2025-10-27 13:00:00;5;u19;a;7697;4;6978;s;s|2025-10-27 14:00:00;5;u19;a;2799;3;2600;s;s|2025-10-28 08:00:00;5;u19;a;6993;2;8458;s;s|2025-10-28 10:00:00;5;u19;a;7697;1;8458;s;s|2025-10-28 11:00:00;5;u19;a;2799;1;6978;s;s'
|
||||
202520251023093105|2025-10-23 09:31:05|analytics_event_booking_id='1001'|user_id='25'|changed_from|analytics_saved_values='1;123123 skj asd k sd aksd as asdk l 123 sad;123123123|2|1;123;123'
|
||||
202520251023083716|2025-10-23 08:37:16|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';8;u19;a;6797;;4490|;5;u17;b;6797;;4159|;8;u16;b;6797;;4159|;8;u15;c;6797;;3895'
|
||||
202520251022162102|2025-10-22 16:21:02|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';8;u19;a;6797;;573|;5;u17;b;6797;;4159|;8;u16;b;6797;;4159|;8;u15;c;6797;;3895'
|
||||
202520251022142723|2025-10-22 14:27:23|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';8;u19;a;6797;;573|;5;u17;b;6797;;3260|;8;u16;b;6797;;3172|;8;u15;c;6797;;549'
|
||||
202520251022134707|2025-10-22 13:47:07|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';8;u19;a;7070;;4337|;5;u17;b;6797;;3260|;8;u16;b;6797;;3172|;8;u15;c;6797;;549'
|
||||
202520251022134621|2025-10-22 13:46:21|analytics_event_booking_id='1001'|user_id='25'|changed_from|analytics_saved_values='1;123123;123123123|2|1;123;123'
|
||||
202520251022134532|2025-10-22 13:45:32|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';8;u19;a;6797;;728|;5;u17;b;6797;;3260|;8;u16;b;6797;;3172|;8;u15;c;6797;;549'
|
||||
202520251022133852|2025-10-22 13:38:52|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=';;;;6797;;728|;;;;6797;;3260|;;;;6797;;3172|;;;;6797;;549'
|
||||
202520251022133639|2025-10-22 13:36:39|analytics_event_booking_id='1001'|user_id='25'|changed_from|fixtures_saved_values=''
|
||||
202520251014161504|2025-10-14 16:15:04|analytics_event_booking_id='1001'|user_id='296'|changed_from|analytics_saved_values='1;123123;123123123|2|1'
|
||||
202520251014161451|2025-10-14 16:14:51|analytics_event_booking_id='1001'|user_id='296'|changed_from|analytics_saved_values='1;Rewr wm afoxnzif eioc apru d4 sdke w a g 8 ff j i f g l y w q w 4 v u 7 6 n o09p;Click Here|2|1'
|
||||
202520251014122540|2025-10-14 12:25:40|analytics_event_booking_id='1013'|user_id='452'|changed_from|fixtures_saved_values='2025-10-16 07:00:00;;u19;a;6797;;3135;s;s|2025-10-16 11:20:00;;u19;a;6797;;8299;s;s|2025-10-17 08:40:00;;u19;a;6797;;2599;s|2025-10-17 13:40:00;;u19;a;6797;;2772;s|2025-10-18 08:00:00;;u19;a;6797;;3135;s|2025-10-19 08:00:00;;u19;a;6797;;3135;s'
|
||||
202520251014122508|2025-10-14 12:25:08|analytics_event_booking_id='1013'|user_id='452'|changed_from|fixtures_saved_values='2025-10-16 07:00:00;;u19;a;6797;;3135;s;s|2025-10-16 11:20:00;;u19;a;6797;;8299;s;s'
|
||||
202520251010102741|2025-10-10 10:27:41|analytics_event_booking_id='1010'|user_id='25'|changed_from|analytics_saved_values='1|1'
|
||||
202520251003122036|2025-10-03 12:20:36|analytics_event_booking_id='1012'|user_id='112'|changed_from|analytics_saved_values='',fixtures_saved_values=''
|
||||
202520251002145232|2025-10-02 14:52:32|analytics_event_booking_id='1011'|user_id='112'|changed_from|fixtures_saved_values=''
|
||||
202520251002101504|2025-10-02 10:15:04|analytics_event_booking_id='1010'|user_id='452'|changed_from|analytics_saved_values='1'
|
||||
202520251002101448|2025-10-02 10:14:48|analytics_event_booking_id='1010'|user_id='452'|changed_from|analytics_saved_values='2'
|
||||
202520250929081707|2025-09-29 08:17:07|analytics_event_booking_id='1006'|user_id='25'|changed_from|fixtures_saved_values=''
|
||||
202520250925144211|2025-09-25 14:42:11|analytics_event_booking_id='1009'|user_id='452'|changed_from|fixtures_saved_values='2025-09-27 09:15:00;;open;a;8471;1;8458;p;s|2025-09-27 14:00:00;;open;a;8471;1;3136;p;s|;;;;8471|;;;;8471|;;;;8471|;;;;8471|;;;;8471'
|
||||
202520250925143852|2025-09-25 14:38:52|analytics_event_booking_id='1009'|user_id='452'|changed_from|fixtures_saved_values='2025-09-27 09:15:00;;open;a;;1;8458;p;s'
|
||||
202520250925142535|2025-09-25 14:25:35|analytics_event_booking_id='1009'|user_id='112'|changed_from|fixtures_saved_values='2025-09-27 09:15:00;;open;a;8470;1;8458;p;s|;;;;8470|;;;;8470|;;;;8470|;;;;8470|;;;;8470|;;;;8470',analytics_saved_values=''
|
||||
202520250925142514|2025-09-25 14:25:14|analytics_event_booking_id='1009'|user_id='112'|changed_from|fixtures_saved_values='2025-09-27 09:15:00;;open;a'
|
||||
202520250925142400|2025-09-25 14:24:00|analytics_event_booking_id='1009'|user_id='112'|changed_from|fixtures_saved_values=''
|
||||
202520250915160908|2025-09-15 16:09:08|analytics_event_booking_id='1007'|user_id='25'|changed_from|analytics_saved_values=''
|
||||
202520250909165743|2025-09-09 16:57:43|analytics_event_booking_id='1010'|user_id='25'|changed_from|analytics_saved_values='1;123122;12312322'
|
||||
202520250909165739|2025-09-09 16:57:39|analytics_event_booking_id='1010'|user_id='25'|changed_from|analytics_saved_values='1;123122;123123'
|
||||
202520250909165735|2025-09-09 16:57:35|analytics_event_booking_id='1010'|user_id='25'|changed_from|analytics_saved_values='1;12312;123123'
|
||||
202520250905110442|2025-09-05 11:04:42|analytics_event_booking_id='1008'|user_id='112'|changed_from|fixtures_saved_values=';;u19;a;4373;3;2772;p;s|;;u16;a;4373;3;2772;p;r|;;u15;a;4373;3;2772;s;s|;;u14;a;4373;3;2772;s;r'
|
||||
202520250905103635|2025-09-05 10:36:35|analytics_event_booking_id='1008'|user_id='112'|changed_from|fixtures_saved_values=''
|
||||
202520250811124104|2025-08-11 12:41:04|event_quote_id='1006'|user_id=112|changed_from|home_teams_built_on_regions='1',client_id='131',region_id='3',sport_type_ids='2'
|
||||
202520250811124030|2025-08-11 12:40:30|event_quote_id='1006'|user_id=112|changed_from|home_teams_built_on_regions='1',sport_type_ids='2',client_id='131'
|
||||
202520250811122909|2025-08-11 12:29:09|event_quote_id='1006'|user_id=112|changed_from|event_quote_id='0'
|
||||
202520250811122416|2025-08-11 12:24:16|event_quote_id='1006'|user_id=112|changed_from|fixtures_saved_values='|||||||||'
|
||||
202520250712060441|2025-07-12 06:04:41|analytics_event_booking_id='1005'|user_id=112|changed_from|event_accepted='0'
|
||||
202520250712060338|2025-07-12 06:03:38|analytics_event_booking_id='1005'|user_id=112|changed_from|event_quote_id='0'
|
||||
202520250712060311|2025-07-12 06:03:11|analytics_event_booking_id='1005'|user_id=112|changed_from|fixtures_saved_values=''
|
||||
202520250712054926|2025-07-12 05:49:26|analytics_event_booking_id='1004'|user_id=112|changed_from|event_quote_id='0'
|
||||
202520250701174455|2025-07-01 17:44:55|analytics_event_booking_id='1001'|user_id=1|changed_from|start_date_time='2025-07-01 08:00:00'
|
||||
202520250701174441|2025-07-01 17:44:41|analytics_event_booking_id='1001'|user_id=1|changed_from|contact_name='',client_id='',event_to='',email='',tel='',address=''
|
||||
1
libs/data/logs/events/changes_demos.dat
Normal file
1
libs/data/logs/events/changes_demos.dat
Normal file
|
|
@ -0,0 +1 @@
|
|||
202520250830100545|2025-08-30 10:05:45|demo_id='1017'|user_id='160'|changed_from|brief_description='2x matches University of Pretoria v Richmond United 13:00 Kickoff Tuks Main Stadium (Pretoria) UWC v TUT 15:00 UWC Stadium (Cape Town) Streaming to AI Sport app and stream forwarding to SAFA Youtube page ',events_operator_allocated='86;433'
|
||||
106
libs/data/logs/events/changes_quotes.dat
Normal file
106
libs/data/logs/events/changes_quotes.dat
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
20251117161905|2025-11-17 16:19:05|quote_id='416'|user_id=25|changed_from|annual_invoice='0',last_update='2025-11-17 16:19:00'
|
||||
20251117161900|2025-11-17 16:19:00|quote_id='416'|user_id=25|changed_from|costing_photos='',last_update='2025-11-17 16:18:40'
|
||||
20250417044251|2025-04-17 04:42:51|quote_id='413'|user_id=24|changed_from|total_1_purchase_summary='7616.00',total_one_time_fee='7616.00',grand_total='8214.00',subtotal_one_time_fee='7616.00',year_1_1_purchase_summary='7616.00',sub_total='8214.00',last_update='2025-04-17 04:41:52',usd_amnt_costing_other=';;;;;;;;;;;',item_ttl_costing_other='0.00;0.00;0.00;0.00;0.00;;;;;;;',item_costing_other=';;;;;;;;;;;',curr_amnt_costing_other=';;;;;;;;;;;',qty_costing_other=';;;;;;;;;;;',excl_costing_other='1;1;1;1;1;;;;;;;'
|
||||
20250417044152|2025-04-17 04:41:52|quote_id='413'|user_id=24|changed_from|last_update='2025-04-17 04:40:24',other_included='',usd_amnt_costing_rental='598;;;;;;;;;;;',item_ttl_costing_software_licence='0.00;0.00;0.00;;;;;;;;;',excl_costing_software_licence='1;1;1;;;;;;;;;',qty_costing_software_licence=';;;;;;;;;;;',item_costing_rental='S3 Monthly Software License Fee;;;;;;;;;;;',curr_amnt_costing_software_licence=';;;;;;;;;;;',usd_amnt_costing_software_licence=';;;;;;;;;;;',qty_costing_rental='1;;;;;;;;;;;',item_costing_software_licence=';;;;;;;;;;;',item_ttl_costing_rental='598.00;0.00;;;;;;;;;;',excl_costing_rental=';1;;;;;;;;;;'
|
||||
20250417044024|2025-04-17 04:40:24|quote_id='413'|user_id=24|changed_from|last_update='2025-04-17 04:36:17',item_costing_rental=';;;;;;;;;;;',qty_costing_software_licence='1;;;;;;;;;;;',excl_costing_rental='1;1;;;;;;;;;;',item_costing_software_licence='70:0.00:299.00:598.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_ttl_costing_software_licence='598.00;0.00;0.00;;;;;;;;;',usd_amnt_costing_software_licence='598.00;;;;;;;;;;;',curr_amnt_costing_software_licence='598.00;;;;;;;;;;;',curr_amnt_costing_rental=';;;;;;;;;;;',excl_costing_software_licence=';1;1;;;;;;;;;',usd_amnt_costing_rental=';;;;;;;;;;;',item_ttl_costing_rental='0.00;0.00;;;;;;;;;;',qty_costing_rental=';;;;;;;;;;;'
|
||||
20250416112020|2025-04-16 11:20:20|quote_id='412'|user_id=24|changed_from|year_1_1_purchase_summary='3655.00',note_8='School to provide fast and stable data/internet connection to system during use',activetab='Notes',sub_total='3850.00',total_one_time_fee='3655.00',delivery_time_1='2 to 3 weeks from date of receipt of payment',subtotal_one_time_fee='3655.00',total_1_purchase_summary='3655.00',last_update='2025-04-16 05:15:44',grand_total='3850.00',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',item_ttl_costing_additional_services='2205.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',curr_amnt_costing_additional_services='44.10;;;;;;;;;;;'
|
||||
20250416111840|2025-04-16 11:18:40|quote_id='411'|user_id=24|changed_from|subtotal_one_time_fee='15786.00',last_update='2025-04-16 05:13:57',total_1_purchase_summary='15786.00',sub_total='16424.00',activetab='Notes',note_8='School to provide fast and stable data/internet connection to system during use',total_one_time_fee='15786.00',delivery_time_1='2 to 3 weeks from date of receipt of payment',grand_total='16424.00',year_1_1_purchase_summary='15786.00',curr_amnt_costing_installation_kits=';2800.00;;;;;;;;;;',usd_amnt_costing_installation_kits=';2800.00;;;;;;;;;;',excl_costing_installation_kits='1;;1;1;1;1;1;;;;;',item_costing_installation_kits=';14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',item_ttl_costing_installation_kits='0.00;5600.00;0.00;0.00;0.00;0.00;0.00;;;;;',usd_amnt_costing_additional_services='48.00;;;;;;;;;;;',qty_costing_installation_kits=';2;;;;;;;;;;',item_ttl_costing_additional_services='2400.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',curr_amnt_costing_additional_services='48.00;;;;;;;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;'
|
||||
20250416111457|2025-04-16 11:14:57|quote_id='410'|user_id=24|changed_from|last_update='2025-04-16 05:04:48',delivery_time_1='2 to 3 weeks from date of receipt of payment',activetab='Costing',total_1_purchase_summary='84065.00',grand_total='88550.00',sub_total='77000.00',year_1_1_purchase_summary='84065.00',subtotal_one_time_fee='73100.00',vat_one_time_fee='10965.00',total_one_time_fee='84065.00',note_8='School to provide fast and stable data/internet connection to system during use',vat_total='11550.00',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',excl_costing_additional_services=';1;1;1;1;1;1;;;;;'
|
||||
20250416111206|2025-04-16 11:12:06|quote_id='409'|user_id=24|changed_from|year_1_1_purchase_summary='358593.00',vat_one_time_fee='46773.00',note_8='School to provide fast and stable data/internet connection to system during use',sub_total='324580.00',total_one_time_fee='358593.00',last_update='2025-04-16 05:03:35',subtotal_one_time_fee='311820.00',grand_total='373267.00',total_1_purchase_summary='358593.00',delivery_time_1='2 to 3 weeks from date of receipt of payment',vat_total='48687.00',curr_amnt_costing_installation_kits=';56000.00;;;;;;;;;;',excl_costing_installation_kits='1;;1;1;1;1;1;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',item_costing_installation_kits=';14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',item_ttl_costing_installation_kits='0.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',vat_costing_installation_kits=';1;1;1;1;1;1;;;;;',qty_costing_installation_kits=';2;;;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',usd_amnt_costing_installation_kits=';2800.00;;;;;;;;;;'
|
||||
20250416110848|2025-04-16 11:08:48|quote_id='408'|user_id=24|changed_from|vat_total='11550.00',vat_one_time_fee='10965.00',note_8='School to provide fast and stable data/internet connection to system during use',grand_total='88550.00',delivery_time_1='2 to 3 weeks from date of receipt of payment',total_one_time_fee='84065.00',total_1_purchase_summary='84065.00',year_1_1_purchase_summary='84065.00',activetab='Purchase Summary',subtotal_one_time_fee='73100.00',last_update='2025-04-16 04:58:38',sub_total='77000.00',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;'
|
||||
20250416110408|2025-04-16 11:04:08|quote_id='407'|user_id=24|changed_from|total_1_purchase_summary='358593.00',vat_total='48687.00',grand_total='373267.00',vat_one_time_fee='46773.00',total_one_time_fee='358593.00',activetab='Purchase Summary',note_8='School to provide fast and stable data/internet connection to system during use',delivery_time_1='2 to 3 weeks from date of receipt of payment',sub_total='324580.00',year_1_1_purchase_summary='358593.00',subtotal_one_time_fee='311820.00',last_update='2025-04-16 04:57:44',qty_costing_installation_kits=';2;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',item_costing_installation_kits=';14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',vat_costing_installation_kits=';1;1;1;1;1;1;;;;;',excl_costing_installation_kits='1;;1;1;1;1;1;;;;;',item_ttl_costing_installation_kits='0.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',usd_amnt_costing_installation_kits=';2800.00;;;;;;;;;;',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',curr_amnt_costing_installation_kits=';56000.00;;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;'
|
||||
20250416105311|2025-04-16 10:53:11|quote_id='406'|user_id=24|changed_from|last_update='2025-04-16 10:52:02',excl_purchase_summary='1',activetab='Costing'
|
||||
20250416105202|2025-04-16 10:52:02|quote_id='406'|user_id=24|changed_from|vat_total='11550.00',vat_one_time_fee='10965.00',last_update='2025-04-16 04:52:53',sub_total='77000.00',total_one_time_fee='84065.00',year_1_1_purchase_summary='84065.00',subtotal_one_time_fee='73100.00',grand_total='88550.00',total_1_purchase_summary='84065.00',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_additional_services='50;;;;;;;;;;;'
|
||||
20250416101625|2025-04-16 10:16:25|quote_id='402'|user_id=24|changed_from|activetab='Notes',last_update='2025-04-16 10:16:07'
|
||||
20250416100526|2025-04-16 10:05:26|quote_id='402'|user_id=24|changed_from|activetab='Purchase Summary',note_8='School to provide fast and stable data/internet connection to system during use',last_update='2025-04-16 10:04:55'
|
||||
20250416100455|2025-04-16 10:04:55|quote_id='402'|user_id=24|changed_from|activetab='Costing',last_update='2025-04-16 10:04:25',excl_purchase_summary='1',item_purchase_summary='Hardware ;Monthly Fees;Annual Fees;;;;;;;;;'
|
||||
20250416100425|2025-04-16 10:04:25|quote_id='402'|user_id=24|changed_from|sub_total='324580.00',total_one_time_fee='358593.00',subtotal_one_time_fee='311820.00',vat_total='48687.00',last_update='2025-04-16 04:53:54',total_1_purchase_summary='358593.00',vat_one_time_fee='46773.00',year_1_1_purchase_summary='358593.00',grand_total='373267.00',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',qty_costing_additional_services='50;;;;;;;;;;;',excl_costing_additional_services=';1;1;1;1;1;1;;;;;',qty_costing_installation_kits=';2;;;;;;;;;;',curr_amnt_costing_installation_kits=';56000.00;;;;;;;;;;',item_purchase_summary='Hardware /Once Off;Monthly Fees;Annual Fees;;;;;;;;;',vat_costing_installation_kits=';1;1;1;1;1;1;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_costing_installation_kits=';14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',item_ttl_costing_installation_kits='0.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',excl_costing_installation_kits='1;;1;1;1;1;1;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',usd_amnt_costing_installation_kits=';2800.00;;;;;;;;;;'
|
||||
20250416051544|2025-04-16 05:15:44|quote_id='412'|user_id=24|changed_from|subtotal_one_time_fee='73100.00',year_2_2_purchase_summary='53820.00',vat_monthly_recurring_fee='585.00',total_one_time_fee='84065.00',address='Waterval Farm, R45, Franschhoek, 7690',quote_to='126',currency='ZAR',country_shipped='242',last_update='2025-04-16 05:04:48',year_1_1_purchase_summary='84065.00',grand_total='88550.00',activetab='Costing',sub_total='77000.00',subtotal_monthly_recurring_fee='3900.00',total_2_purchase_summary='161460.00',total_monthly_recurring_fee='4485.00',year_1_2_purchase_summary='53820.00',contact_name='Jacques Le Roux ',email='jacler@bridgehouse.org.za ',tel='0832877111',total_1_purchase_summary='84065.00',note_4='Delivery costs Included to CPT',other_included='Operator cost - per day Full Day = R 1300 ( >5 hours) Half Day = R950 ( <5 hours) ',vat_one_time_fee='10965.00',vat_total='11550.00',roe='20.00',year_3_2_purchase_summary='53820.00',curr_amnt_costing_systems='22000.00;;;;;;;;;;;',vat_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',curr_amnt_costing_hardware_add_ons='7000.00;;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',curr_amnt_costing_software_licence='3100.00;800.00;;;;;;;;;;',vat_costing_other='1;1;1;1;1;;;;;;;',item_ttl_costing_software_licence='3100.00;800.00;0.00;;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',excl_notes='0;0;1;0;1;0;0;0;0;0;0;0',vat_costing_systems='1;1;1;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',vat_costing_installation_kits=';;1;1;1;1;1;;;;;',item_ttl_costing_systems='22000.00;0.00;0.00;;;;;;;;;',vat_costing_rental='1;1;;;;;;;;;;',vat_costing_game_breakdown_analytics='1;1;;;;;;;;;;',item_ttl_costing_hardware_add_ons='7000.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',vat_costing_software_licence='1;1;1;;;;;;;;;',excl_roes=';;;;;;;;;;;',vat_costing_match_credits=';1;1;1;;;;;;;;'
|
||||
20250416051357|2025-04-16 05:13:57|quote_id='411'|user_id=24|changed_from|last_update='2025-04-16 05:12:52',note_4='Delivery costs Included to CPT'
|
||||
20250416051252|2025-04-16 05:12:52|quote_id='411'|user_id=24|changed_from|last_update='2025-04-16 05:12:16',currency='GBP',roe='1.00'
|
||||
20250416051216|2025-04-16 05:12:16|quote_id='411'|user_id=24|changed_from|sub_total='324580.00',email='jacler@bridgehouse.org.za ',vat_one_time_fee='46773.00',country_shipped='242',tel='0832877111',other_included='Operator cost - per day Full Day = R1300 ( >5 hours) Half Day = R950 ( <5 hours) ',last_update='2025-04-16 05:03:35',grand_total='373267.00',quote_to='126',total_1_purchase_summary='358593.00',vat_total='48687.00',year_3_2_purchase_summary='176088.00',total_2_purchase_summary='528264.00',year_2_2_purchase_summary='176088.00',total_one_time_fee='358593.00',year_1_2_purchase_summary='176088.00',currency='ZAR',address='Waterval Farm, R45, Franschhoek, 7690',vat_monthly_recurring_fee='1914.00',roe='20.00',total_monthly_recurring_fee='14674.00',year_1_1_purchase_summary='358593.00',subtotal_one_time_fee='311820.00',contact_name='Jacques Le Roux ',subtotal_monthly_recurring_fee='12760.00',item_ttl_costing_software_licence='11960.00;800.00;0.00;;;;;;;;;',item_ttl_costing_installation_kits='0.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',vat_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',excl_notes='0;0;1;0;1;0;0;0;0;0;0;0',vat_costing_systems='1;1;1;;;;;;;;;',vat_costing_match_credits='1;1;1;1;;;;;;;;',excl_roes=';;;;;;;;;;;',vat_costing_installation_kits=';1;1;1;1;1;1;;;;;',curr_amnt_costing_match_credits='160.00;;;;;;;;;;;',vat_costing_software_licence='1;1;1;;;;;;;;;',vat_costing_game_breakdown_analytics='1;1;;;;;;;;;;',curr_amnt_costing_systems='147720.00;;;;;;;;;;;',usd_amnt_costing_additional_services='44.10;;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',vat_costing_rental='1;1;;;;;;;;;;',curr_amnt_costing_installation_kits=';56000.00;;;;;;;;;;',item_ttl_costing_additional_services='44100.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_ttl_costing_systems='147720.00;0.00;0.00;;;;;;;;;',vat_costing_other='1;1;1;1;1;;;;;;;',item_ttl_costing_match_credits='8000.00;0.00;0.00;0.00;;;;;;;;',curr_amnt_costing_additional_services='882.00;;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;800.00;;;;;;;;;;'
|
||||
20250416050448|2025-04-16 05:04:48|quote_id='410'|user_id=24|changed_from|contact_name='Mariette Nel',email='mariettenel19@gmail.com',activetab='Purchase Summary',tel='071 790 3276',address='14 Nested Street, Nxuba, 5880, Eastern Cape',quote_to='125',last_update='2025-04-16 04:58:38'
|
||||
20250416050312|2025-04-16 05:03:12|quote_id='409'|user_id=24|changed_from|quote_to='125',email='mariettenel19@gmail.com',address='14 Nested Street, Nxuba, 5880, Eastern Cape',other_included='Operator cost - per day Full Day = R 1300 ( >5 hours) Half Day = R950 ( <5 hours) ',activetab='Purchase Summary',tel='071 790 3276',last_update='2025-04-16 04:57:44',contact_name='Mariette Nel'
|
||||
20250416045838|2025-04-16 04:58:38|quote_id='408'|user_id=24|changed_from|activetab='Costing',address='Reddam Avenue, Constantia, 7806, Cape Town',email='alex.gitlin@reddam.house',excl_purchase_summary='1',quote_to='122',contact_name='Alex Gitlin',tel='',last_update='2025-04-16 04:52:53'
|
||||
20250416045744|2025-04-16 04:57:44|quote_id='407'|user_id=24|changed_from|last_update='2025-04-16 04:57:01',excl_purchase_summary='1',activetab='Costing'
|
||||
20250416045701|2025-04-16 04:57:01|quote_id='407'|user_id=24|changed_from|address='Reddam Avenue, Constantia, 7806, Cape Town',tel='',contact_name='Alex Gitlin',quote_to='122',email='alex.gitlin@reddam.house',last_update='2025-04-16 04:53:54'
|
||||
20250416045354|2025-04-16 04:53:54|quote_id='402'|user_id=24|changed_from|last_update='2025-04-16 04:44:55',other_included='Operator cost - per day Full Day = R 1300 (> 5hours) Half Day = R950 (<5 hours) '
|
||||
20250416045242|2025-04-16 04:52:42|quote_id='406'|user_id=24|changed_from|other_included='Operator cost - per day Full Day = R 1300 (> 5hours) Half Day = R950 (<5 hours) ',last_update='2025-04-16 04:51:50'
|
||||
20250416045150|2025-04-16 04:51:50|quote_id='406'|user_id=24|changed_from|activetab='Notes',last_update='2025-04-16 04:51:28',vat_costing_systems=';1;1;;;;;;;;;'
|
||||
20250416045128|2025-04-16 04:51:28|quote_id='406'|user_id=24|changed_from|year_2_2_purchase_summary='176088.00',sub_total='324580.00',total_1_purchase_summary='358593.00',grand_total='373267.00',subtotal_one_time_fee='311820.00',year_1_1_purchase_summary='358593.00',last_update='2025-04-16 04:44:55',total_monthly_recurring_fee='14674.00',total_2_purchase_summary='528264.00',subtotal_monthly_recurring_fee='12760.00',year_1_2_purchase_summary='176088.00',year_3_2_purchase_summary='176088.00',vat_one_time_fee='46773.00',vat_total='48687.00',camera_system_id='21',total_one_time_fee='358593.00',vat_monthly_recurring_fee='1914.00',activetab='Costing',excl_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',item_ttl_costing_hardware_add_ons='0.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',curr_amnt_costing_match_credits='160.00;;;;;;;;;;;',vat_costing_installation_kits=';1;1;1;1;1;1;;;;;',curr_amnt_costing_software_licence='11960.00;800.00;;;;;;;;;;',curr_amnt_costing_installation_kits=';56000.00;;;;;;;;;;',curr_amnt_costing_hardware_add_ons=';;;;;;;;;;;',usd_amnt_costing_match_credits='8.00;;;;;;;;;;;',usd_amnt_costing_systems='7386.00;;;;;;;;;;;',item_ttl_costing_systems='147720.00;0.00;0.00;;;;;;;;;',item_costing_systems='69:0.00:0.00:8206.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_costing_installation_kits=';14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',qty_costing_hardware_add_ons=';;;;;;;;;;;',usd_amnt_costing_installation_kits=';2800.00;;;;;;;;;;',qty_costing_installation_kits=';2;;;;;;;;;;',excl_costing_match_credits=';1;1;1;;;;;;;;',item_ttl_costing_match_credits='8000.00;0.00;0.00;0.00;;;;;;;;',item_costing_match_credits='63:0.00:5.00:8.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_ttl_costing_software_licence='11960.00;800.00;0.00;;;;;;;;;',excl_costing_installation_kits='1;;1;1;1;1;1;;;;;',item_ttl_costing_installation_kits='0.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_costing_hardware_add_ons=';;;;;;;;;;;',vat_costing_systems='1;1;1;;;;;;;;;',item_costing_software_licence='70:0.00:299.00:598.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;12:0.00:79.00:158.00:0.00:163.00:167.00:169.00:172.00:176.00:186.00:198.00;;;;;;;;;;',vat_costing_match_credits='1;1;1;1;;;;;;;;',qty_costing_match_credits='50;;;;;;;;;;;',usd_amnt_costing_hardware_add_ons=';;;;;;;;;;;',curr_amnt_costing_systems='147720.00;;;;;;;;;;;',usd_amnt_costing_software_licence='598.00;40.00;;;;;;;;;;'
|
||||
20250416044425|2025-04-16 04:44:25|quote_id='402'|user_id=24|changed_from|other_included='Full Day = R 1300 (> 5hours) Half Day = R950 (<5 hours) ',activetab='Notes',last_update='2025-04-16 04:42:54'
|
||||
20250416044254|2025-04-16 04:42:54|quote_id='402'|user_id=24|changed_from|year_2_2_purchase_summary='374256.00',note_8='',payment_term_3='SportVot Credits can be bought in packages. Payment due on invoice',payment_term_4='Analytics packages can be bought in bulk at 50x credits per package. Payment due on invoice',total_one_time_fee='484934.30',grand_total='516122.30',total_2_purchase_summary='1122768.00',subtotal_monthly_recurring_fee='27120.00',total_monthly_recurring_fee='31188.00',subtotal_one_time_fee='421682.00',activetab='Quote Details',year_3_2_purchase_summary='374256.00',last_update='2025-04-16 04:35:12',vat_monthly_recurring_fee='4068.00',note_5='Fixed Installation costs and site inspection not included',other_included='',vat_one_time_fee='63252.30',year_1_1_purchase_summary='484934.30',total_1_purchase_summary='484934.30',year_1_2_purchase_summary='374256.00',note_7='All prices incl VAT',sub_total='448802.00',vat_total='67320.30',item_costing_installation_kits='13:0.00:165.00:330.00:0.00:341.00:348.00:352.00:359.00:367.00:389.00:413.00;14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;',item_ttl_costing_installation_kits='13200.00;112000.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_ttl_costing_match_credits='160.00;0.00;0.00;0.00;;;;;;;;',curr_amnt_costing_installation_kits='6600.00;56000.00;;;;;;;;;;',qty_costing_installation_kits='2;2;;;;;;;;;;',item_purchase_summary='Hardware Once Off;Monthly Fees;Annual Fees;;;;;;;;;',qty_costing_additional_services='1;;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;1600.00;;;;;;;;;;',usd_amnt_costing_installation_kits='330.00;2800.00;;;;;;;;;;',item_costing_other=';;;;;;;;;;;',item_ttl_costing_software_licence='23920.00;3200.00;0.00;;;;;;;;;',qty_costing_software_licence='2;2;;;;;;;;;;',usd_amnt_costing_software_licence='598.00;80.00;;;;;;;;;;',excl_notes='0;0;1;0;0;0;1;0;0;0;0;0',vat_costing_installation_kits='1;1;1;1;1;1;1;;;;;',qty_costing_systems='2;;;;;;;;;;;',qty_costing_match_credits='1;;;;;;;;;;;',item_ttl_costing_additional_services='882.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',excl_costing_installation_kits=';;1;1;1;1;1;;;;;',excl_roes='1;;;;;;;;;;;',item_ttl_costing_systems='295440.00;0.00;0.00;;;;;;;;;'
|
||||
20250416043512|2025-04-16 04:35:12|quote_id='402'|user_id=24|changed_from|last_update='2025-04-04 12:19:25',email='',address='',quote_date='2025-04-04',activetab='Costing',contact_name='',quote_expiry='2025-04-18'
|
||||
20250415131005|2025-04-15 13:10:05|quote_id='401'|user_id=24|changed_from|last_update='2025-03-28 11:14:18',total_one_time_fee='140.00',sub_total='140.00',grand_total='140.00',year_1_1_purchase_summary='140.00',subtotal_one_time_fee='140.00',total_1_purchase_summary='140.00',activetab='Notes',curr_amnt_costing_additional_services='60.00;80.00;;;;;;;;;;',qty_costing_additional_services='1;1;;;;;;;;;;',usd_amnt_costing_additional_services='60.00;80.00;;;;;;;;;;',item_costing_additional_services='87:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;88:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;',item_ttl_costing_additional_services='60.00;80.00;0.00;0.00;0.00;0.00;0.00;;;;;',excl_costing_additional_services=';;1;1;1;1;1;;;;;'
|
||||
20250404121925|2025-04-04 12:19:25|quote_id='402'|user_id=24|changed_from|quote_date='2025-03-31',last_update='2025-04-04 12:18:31',activetab='Notes',quote_expiry='2025-04-14'
|
||||
20250404121831|2025-04-04 12:18:31|quote_id='402'|user_id=24|changed_from|activetab='Purchase Summary',last_update='2025-04-04 12:17:30',excl_notes='0;0;1;0;0;0;0;0;0;0;0;0'
|
||||
20250404121730|2025-04-04 12:17:30|quote_id='402'|user_id=24|changed_from|payment_term_4='',last_update='2025-04-04 12:15:55',payment_term_3='SportVot Credits can be bought in packages. Payment on date of order',activetab='Costing',excl_purchase_summary='0',excl_purchase_summary='0;0;0;0;0;0;0;0;0;0;0;0'
|
||||
20250404121555|2025-04-04 12:15:55|quote_id='402'|user_id=24|changed_from|grand_total='515108.00',vat_one_time_fee='63120.00',subtotal_one_time_fee='420800.00',vat_total='67188.00',total_one_time_fee='483920.00',last_update='2025-03-31 09:05:06',activetab='Notes',total_1_purchase_summary='483920.00',sub_total='447920.00',year_1_1_purchase_summary='483920.00',usd_amnt_costing_additional_services=';;;;;;;;;;;',item_costing_additional_services=';;;;;;;;;;;',item_ttl_costing_additional_services='0.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',curr_amnt_costing_additional_services=';;;;;;;;;;;',qty_costing_additional_services=';;;;;;;;;;;',excl_costing_additional_services='1;1;1;1;1;1;1;;;;;'
|
||||
20250331090506|2025-03-31 09:05:06|quote_id='402'|user_id=24|changed_from|note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',activetab='Costing',last_update='2025-03-31 08:55:24',item_costing_match_credits='63:0.00:5.00:10.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;'
|
||||
20250331085524|2025-03-31 08:55:24|quote_id='402'|user_id=24|changed_from|last_update='2025-03-31 08:53:29',note_4='',activetab='Notes',item_costing_match_credits='80:0.00:4.50:10.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;'
|
||||
20250331085329|2025-03-31 08:53:29|quote_id='402'|user_id=24|changed_from|payment_term_1='Hardware due on date of PO on presentation of Invoice',last_update='2025-03-31 08:50:52',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',terms='0',activetab='Costing',note_5='Installation costs and site inspection not included',payment_term_3='Game Breakdown and Analytics: Annually in Advance',excl_roes=';;;;;;;;;;;',item_purchase_summary='Hardware Purchase;Monthly Fees;Annual Fees;;;;;;;;;',excl_notes='0;0;0;0;0;0;0;0;0;0;0;0'
|
||||
20250328111018|2025-03-28 11:10:18|quote_id='400'|user_id=24|changed_from|year_2_3_purchase_summary='140.00',last_update='2025-03-28 11:08:42',total_1_purchase_summary='0.00',subtotal_annual_fee='140.00',subtotal_one_time_fee='0.00',total_one_time_fee='0.00',grand_total='140.00',total_annual_fee='140.00',year_1_1_purchase_summary='0.00',note_4='',payment_term_3='Game Breakdown and Analytics: Packages due in advance',sub_total='140.00',year_3_3_purchase_summary='140.00',total_3_purchase_summary='280.00',item_ttl_costing_game_breakdown_analytics='60.00;80.00;;;;;;;;;;',item_ttl_costing_additional_services='0.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_costing_game_breakdown_analytics='84:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;Analysis Package - Premuim;;;;;;;;;;',curr_amnt_costing_game_breakdown_analytics='60.00;80.00;;;;;;;;;;',usd_amnt_costing_additional_services=';;;;;;;;;;;',excl_costing_additional_services='1;1;1;1;1;1;1;;;;;',excl_costing_game_breakdown_analytics=';;;;;;;;;;;',usd_amnt_costing_game_breakdown_analytics='60.00;80.00;;;;;;;;;;',item_costing_additional_services=';;;;;;;;;;;',qty_costing_additional_services=';;;;;;;;;;;',qty_costing_game_breakdown_analytics='1;1;;;;;;;;;;',curr_amnt_costing_additional_services=';;;;;;;;;;;'
|
||||
20250320142904|2025-03-20 14:29:04|quote_id='399'|user_id=24|changed_from|last_update='2025-03-20 14:28:52',activetab='Purchase Summary'
|
||||
20250320142852|2025-03-20 14:28:52|quote_id='399'|user_id=24|changed_from|activetab='Costing',last_update='2025-03-20 14:28:02',item_purchase_summary='Hardware Purchase;Monthly Fees;Annual Fees;;;;;;;;;'
|
||||
20250320142802|2025-03-20 14:28:02|quote_id='399'|user_id=24|changed_from|last_update='2025-03-20 14:26:12',vat_total='294474.00',year_3_2_purchase_summary='3367752.00',vat_monthly_recurring_fee='36606.00',total_monthly_recurring_fee='280646.00',total_2_purchase_summary='10103256.00',year_1_2_purchase_summary='3367752.00',sub_total='1963160.00',subtotal_monthly_recurring_fee='244040.00',year_2_2_purchase_summary='3367752.00',grand_total='2257634.00',item_ttl_costing_software_licence='11960.00;232080.00;0.00;;;;;;;;;',usd_amnt_costing_software_licence='598.00;232.08;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;4641.60;;;;;;;;;;'
|
||||
20250320142612|2025-03-20 14:26:12|quote_id='399'|user_id=24|changed_from|year_1_2_purchase_summary='38598048.00',sub_total='4516080.00',activetab='Notes',year_3_2_purchase_summary='38598048.00',grand_total='5193492.00',vat_total='677412.00',year_2_2_purchase_summary='38598048.00',total_monthly_recurring_fee='3216504.00',vat_monthly_recurring_fee='419544.00',total_2_purchase_summary='115794144.00',last_update='2025-03-20 14:23:23',subtotal_monthly_recurring_fee='2796960.00',usd_amnt_costing_software_licence='598.00;2785.00;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;55700.00;;;;;;;;;;',item_ttl_costing_software_licence='11960.00;2785000.00;0.00;;;;;;;;;'
|
||||
20250320142323|2025-03-20 14:23:23|quote_id='399'|user_id=24|changed_from|year_2_2_purchase_summary='23224848.00',vat_total='510312.00',payment_term_3='Game Breakdown and Analytics: Annually in Advance',grand_total='3912392.00',last_update='2025-03-20 14:22:22',payment_term_2='Software License Fee due annually in advance for duration of contract period',subtotal_monthly_recurring_fee='1682960.00',total_2_purchase_summary='69674544.00',vat_monthly_recurring_fee='252444.00',activetab='Costing',sub_total='3402080.00',total_monthly_recurring_fee='1935404.00',year_1_2_purchase_summary='23224848.00',year_3_2_purchase_summary='23224848.00',usd_amnt_costing_software_licence='598.00;1671.00;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;33420.00;;;;;;;;;;',item_ttl_costing_software_licence='11960.00;1671000.00;0.00;;;;;;;;;',excl_payment_terms=';;1;;;;;;;;;'
|
||||
20250320142222|2025-03-20 14:22:22|quote_id='399'|user_id=24|changed_from|total_monthly_recurring_fee='68494.00',subtotal_one_time_fee='859720.00',total_2_purchase_summary='2465784.00',year_3_2_purchase_summary='821928.00',year_2_2_purchase_summary='821928.00',vat_total='137892.00',vat_one_time_fee='128958.00',total_1_purchase_summary='988678.00',grand_total='1057172.00',vat_monthly_recurring_fee='8934.00',last_update='2025-03-19 16:49:31',year_1_1_purchase_summary='988678.00',sub_total='919280.00',year_1_2_purchase_summary='821928.00',subtotal_monthly_recurring_fee='59560.00',total_one_time_fee='988678.00',qty_costing_software_licence='1;20;;;;;;;;;;',usd_amnt_costing_hardware_add_ons='499.00;;;;;;;;;;;',item_ttl_costing_hardware_add_ons='199600.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_hardware_add_ons='20;;;;;;;;;;;',item_ttl_costing_software_licence='11960.00;47600.00;0.00;;;;;;;;;',item_ttl_costing_systems='164120.00;440000.00;0.00;;;;;;;;;',usd_amnt_costing_software_licence='598.00;119.00;;;;;;;;;;',curr_amnt_costing_hardware_add_ons='9980.00;;;;;;;;;;;',qty_costing_systems='1;20;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;2380.00;;;;;;;;;;'
|
||||
20250319164621|2025-03-19 16:46:21|quote_id='399'|user_id=24|changed_from|year_3_2_purchase_summary='1020648.00',activetab='Notes',vat_total='74052.00',total_one_time_fee='482678.00',grand_total='567732.00',year_2_2_purchase_summary='1020648.00',total_1_purchase_summary='482678.00',subtotal_one_time_fee='419720.00',subtotal_monthly_recurring_fee='73960.00',year_1_2_purchase_summary='1020648.00',vat_one_time_fee='62958.00',sub_total='493680.00',payment_term_2='Software License Fee due annualy in advance by 1st of each month for duration of contract period',vat_monthly_recurring_fee='11094.00',year_1_1_purchase_summary='482678.00',total_monthly_recurring_fee='85054.00',total_2_purchase_summary='3061944.00',last_update='2025-03-19 16:45:04',item_ttl_costing_systems='164120.00;0.00;0.00;;;;;;;;;',item_ttl_costing_software_licence='11960.00;62000.00;0.00;;;;;;;;;',excl_costing_systems=';1;1;;;;;;;;;',curr_amnt_costing_systems='164120.00;NaN;;;;;;;;;;',usd_amnt_costing_software_licence='598.00;155.00;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;3100.00;;;;;;;;;;',usd_amnt_costing_systems='8206.00;NaN;;;;;;;;;;'
|
||||
20250319164504|2025-03-19 16:45:04|quote_id='399'|user_id=24|changed_from|vat_monthly_recurring_fee='7194.00',total_one_time_fee='1080678.00',year_1_1_purchase_summary='1080678.00',sub_total='987680.00',vat_one_time_fee='140958.00',note_4='Shipment terms: Excl freight and applicable taxes/duties into destination country',vat_total='148152.00',total_1_purchase_summary='1080678.00',year_3_2_purchase_summary='661848.00',year_2_2_purchase_summary='661848.00',payment_term_2='Software License Fee due monthly in advance by 1st of each month for duration of contract period',total_2_purchase_summary='1985544.00',grand_total='1135832.00',year_1_2_purchase_summary='661848.00',total_monthly_recurring_fee='55154.00',subtotal_one_time_fee='939720.00',subtotal_monthly_recurring_fee='47960.00',last_update='2025-03-19 16:17:27',usd_amnt_costing_software_licence='598.00;90.00;;;;;;;;;;',curr_amnt_costing_software_licence='11960.00;1800.00;;;;;;;;;;',item_costing_systems='69:0.00:0.00:8206.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;Air;;;;;;;;;;',item_ttl_costing_systems='164120.00;520000.00;0.00;;;;;;;;;',usd_amnt_costing_systems='8206.00;1300.00;;;;;;;;;;',item_ttl_costing_software_licence='11960.00;36000.00;0.00;;;;;;;;;',excl_costing_systems=';;1;;;;;;;;;',curr_amnt_costing_systems='164120.00;26000.00;;;;;;;;;;'
|
||||
20250319161727|2025-03-19 16:17:27|quote_id='399'|user_id=24|changed_from|last_update='2025-03-19 16:15:43',delivery_time_1='2 to 3 weeks from date of receipt of payment',activetab='Costing',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',payment_term_1='Hardware due on date of order',note_7='All prices incl VAT',excl_notes='0;0;1;0;0;0;0;0;0;0;0;0'
|
||||
20250319161543|2025-03-19 16:15:43|quote_id='399'|user_id=24|changed_from|total_1_purchase_summary='1050738.00',year_1_1_purchase_summary='1050738.00',last_update='2025-03-19 16:15:16',vat_total='118212.00',grand_total='1105892.00',vat_one_time_fee='111018.00',total_one_time_fee='1050738.00',vat_costing_hardware_add_ons=';1;1;1;1;1;1;;;;;'
|
||||
20250319161514|2025-03-19 16:15:14|quote_id='399'|user_id=24|changed_from|last_update='2025-03-19 16:13:50',subtotal_one_time_fee='740120.00',year_1_1_purchase_summary='851138.00',total_one_time_fee='851138.00',sub_total='788080.00',total_1_purchase_summary='851138.00',grand_total='906292.00',qty_costing_hardware_add_ons=';;;;;;;;;;;',item_costing_hardware_add_ons=';;;;;;;;;;;',excl_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',item_ttl_costing_hardware_add_ons='0.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',usd_amnt_costing_hardware_add_ons=';;;;;;;;;;;',curr_amnt_costing_hardware_add_ons=';;;;;;;;;;;'
|
||||
20250228145359|2025-02-28 14:53:59|quote_id='398'|user_id=24|changed_from|year_1_2_purchase_summary='7176.00',payment_term_2='Software License Fee due monthly in advance by 1st of each month for duration of contract period',year_1_1_purchase_summary='11006.00',total_2_purchase_summary='21528.00',camera_system_id='21',subtotal_monthly_recurring_fee='598.00',year_3_2_purchase_summary='7176.00',total_one_time_fee='11006.00',year_2_2_purchase_summary='7176.00',total_monthly_recurring_fee='598.00',total_1_purchase_summary='11006.00',grand_total='11604.00',sub_total='11604.00',last_update='2025-02-28 14:52:01',subtotal_one_time_fee='11006.00',activetab='Costing',usd_amnt_costing_systems='8206.00;;;;;;;;;;;',item_ttl_costing_installation_kits='2800.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',curr_amnt_costing_systems='8206.00;;;;;;;;;;;',excl_costing_installation_kits=';1;1;1;1;1;1;;;;;',usd_amnt_costing_software_licence='598.00;;;;;;;;;;;',qty_costing_installation_kits='1;;;;;;;;;;;',usd_amnt_costing_installation_kits='2800.00;;;;;;;;;;;',curr_amnt_costing_software_licence='598.00;;;;;;;;;;;',curr_amnt_costing_installation_kits='2800.00;;;;;;;;;;;',item_costing_installation_kits='14:0.00:2200.00:4400.00:0.00:4537.00:4632.00:4681.00:4783.00:4889.00:5177.00:5500.00;;;;;;;;;;;',item_ttl_costing_systems='8206.00;0.00;0.00;;;;;;;;;',item_costing_software_licence='70:0.00:299.00:598.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_costing_systems='69:0.00:0.00:8206.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;',item_ttl_costing_software_licence='598.00;0.00;0.00;;;;;;;;;'
|
||||
20250205153129|2025-02-05 15:31:29|quote_id='396'|user_id=24|changed_from|last_update='2025-02-05 15:29:23',excl_notes='0;0;1;0;0;0;0;0;0;0;0;0'
|
||||
20250205152923|2025-02-05 15:29:23|quote_id='396'|user_id=24|changed_from|delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',last_update='2025-02-05 15:28:09',payment_term_2='Software License Fee due monthly in advance by 1st of each month for duration of contract period',item_purchase_summary='Hardware Purchase;Monthly Fees;Annual Fees;;;;;;;;;'
|
||||
20250205152809|2025-02-05 15:28:09|quote_id='396'|user_id=24|changed_from|payment_term_3='Game Breakdown and Analytics: Annually in Advance',last_update='2025-02-05 15:27:37',payment_term_1='Hardware due on date of PO on presentation of Invoice',terms='0',activetab='Purchase Summary',excl_notes='0;0;0;0;0;0;0;0;0;0;0;0'
|
||||
20250129111401|2025-01-29 11:14:01|quote_id='395'|user_id=24|changed_from|note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',note_8='',last_update='2025-01-29 11:12:59'
|
||||
20250129111259|2025-01-29 11:12:59|quote_id='395'|user_id=24|changed_from|grand_total='305992.00',vat_total='39912.00',delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',total_1_purchase_summary='292238.00',sub_total='266080.00',last_update='2025-01-29 11:11:20',subtotal_one_time_fee='254120.00',payment_term_1='Hardware due on date of PO on presentation of Invoice',vat_one_time_fee='38118.00',total_one_time_fee='292238.00',year_1_1_purchase_summary='292238.00',activetab='Purchase Summary',curr_amnt_costing_installation_kits='70000.00;;;;;;;;;;;',usd_amnt_costing_installation_kits='3500.00;;;;;;;;;;;',item_ttl_costing_installation_kits='70000.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_costing_installation_kits='79:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00:0.00;;;;;;;;;;;'
|
||||
20241206162202|2024-12-06 16:22:02|quote_id='394'|user_id=24|changed_from|last_update='2024-12-06 16:21:19',activetab='Notes'
|
||||
20241206162119|2024-12-06 16:21:19|quote_id='394'|user_id=24|changed_from|activetab='Costing',note_4='Shipment terms: Excl clearing charges and applicable taxes into Kenya ',payment_term_2='Software License Fee due annually in Advnace - payable',last_update='2024-12-06 16:19:38'
|
||||
20241122125052|2024-11-22 12:50:52|quote_id='375'|user_id=24|changed_from|last_update='2024-11-22 12:49:23',activetab='Costing'
|
||||
20241122124923|2024-11-22 12:49:23|quote_id='375'|user_id=24|changed_from|year_3_2_purchase_summary='19200.00',year_1_1_purchase_summary='21500.00',total_1_purchase_summary='21500.00',subtotal_one_time_fee='21500.00',last_update='2024-11-22 06:11:00',activetab='Quote Details',total_monthly_recurring_fee='1600.00',subtotal_monthly_recurring_fee='1600.00',total_2_purchase_summary='57600.00',year_2_2_purchase_summary='19200.00',total_one_time_fee='21500.00',year_1_2_purchase_summary='19200.00',item_costing_other='OTT Monthly Management Fee;;;;;;;;;;;',curr_amnt_costing_rental=';;;;;;;;;;;',item_costing_rental=';;;;;;;;;;;',qty_costing_other='1;;;;;;;;;;;',usd_amnt_costing_other='1500;;;;;;;;;;;',excl_costing_other=';1;1;1;1;;;;;;;',item_ttl_costing_other='1500.00;0.00;0.00;0.00;0.00;;;;;;;',item_ttl_costing_rental='0.00;0.00;;;;;;;;;;',usd_amnt_costing_rental=';;;;;;;;;;;',qty_costing_rental=';;;;;;;;;;;',excl_costing_rental='1;1;;;;;;;;;;'
|
||||
20241122073411|2024-11-22 07:34:11|quote_id='373'|user_id=24|changed_from|last_update='2024-11-22 06:11:39',quote_accepted='1',quote_pending='0'
|
||||
20241122063402|2024-11-22 06:34:02|quote_id='344'|user_id=24|changed_from|year_1_1_purchase_summary='85410.00',sub_total='92600.00',activetab='Quote Details',total_1_purchase_summary='85410.00',subtotal_one_time_fee='85410.00',total_one_time_fee='85410.00',last_update='2024-11-22 06:18:22',grand_total='92600.00',item_ttl_costing_installation_kits='2520.00;9000.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_installation_kits='7;3;;;;;;;;;;'
|
||||
20241122062238|2024-11-22 06:22:38|quote_id='223'|user_id=24|changed_from|last_update='2024-08-13 05:23:41',sub_total='21201.00',year_2_2_purchase_summary='1068.00',year_1_2_purchase_summary='1068.00',total_monthly_recurring_fee='89.00',grand_total='21201.00',quote_to='26',activetab='Costing',year_3_2_purchase_summary='1068.00',subtotal_monthly_recurring_fee='89.00',total_2_purchase_summary='3204.00',contact_name='',curr_amnt_costing_software_licence='89.00;;;;;;;;;;;',excl_costing_software_licence=';1;1;;;;;;;;;',item_costing_software_licence='12:0.00:79.00:158.00:0.00:163.00:167.00:169.00:172.00:176.00:186.00:198.00;;;;;;;;;;;',usd_amnt_costing_software_licence='89.00;;;;;;;;;;;',qty_costing_software_licence='1;;;;;;;;;;;',item_ttl_costing_software_licence='89.00;0.00;0.00;;;;;;;;;'
|
||||
20241122061822|2024-11-22 06:18:22|quote_id='344'|user_id=24|changed_from|activetab='Costing',last_update='2024-11-22 06:14:40'
|
||||
20241122061440|2024-11-22 06:14:40|quote_id='344'|user_id=24|changed_from|quote_to='26',contact_name='',subtotal_one_time_fee='85050.00',total_1_purchase_summary='85050.00',quote_accepted='0',total_one_time_fee='85050.00',last_update='2024-10-08 16:08:49',grand_total='92240.00',sub_total='92240.00',year_1_1_purchase_summary='85050.00',quote_pending='1',item_ttl_costing_installation_kits='2160.00;9000.00;0.00;0.00;0.00;0.00;0.00;;;;;',qty_costing_installation_kits='6;3;;;;;;;;;;'
|
||||
20241122061207|2024-11-22 06:12:07|quote_id='386'|user_id=24|changed_from|activetab='Notes',last_update='2024-10-25 10:47:45'
|
||||
20241122061139|2024-11-22 06:11:39|quote_id='373'|user_id=24|changed_from|quote_pending='1',activetab='Notes',last_update='2024-08-05 11:05:28',quote_accepted='0'
|
||||
20241122061126|2024-11-22 06:11:26|quote_id='374'|user_id=24|changed_from|quote_accepted='0',last_update='2024-08-05 11:08:36',quote_pending='1',activetab='Costing'
|
||||
20241122061100|2024-11-22 06:11:00|quote_id='375'|user_id=24|changed_from|quote_pending='1',last_update='2024-08-06 09:40:37',activetab='Costing',quote_accepted='0'
|
||||
20241122061030|2024-11-22 06:10:30|quote_id='376'|user_id=24|changed_from|activetab='Notes',last_update='2024-08-05 11:23:44',quote_accepted='0',quote_pending='1'
|
||||
20241121101033|2024-11-21 10:10:33|quote_id='389'|user_id=24|changed_from|address='',contact_name='',quote_to='113',last_update='2024-11-12 09:38:58',activetab='Costing'
|
||||
20241121100949|2024-11-21 10:09:49|quote_id='388'|user_id=24|changed_from|quote_to='113',contact_name='',address='',activetab='Notes',last_update='2024-11-12 09:32:53'
|
||||
20241121100808|2024-11-21 10:08:08|quote_id='387'|user_id=24|changed_from|contact_name='',address='',quote_to='113',last_update='2024-11-12 09:28:30'
|
||||
20241114150222|2024-11-14 15:02:22|quote_id='393'|user_id=24|changed_from|country_shipped='113',last_update='2024-11-12 11:48:40',payment_term_2='Monthly Management Fees due within 14 days of invoice',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',quote_to='114',excl_notes='0;0;0;1;1;1;1;0;0;0;0;0'
|
||||
20241114145939|2024-11-14 14:59:39|quote_id='392'|user_id=24|changed_from|country_shipped='113',activetab='Costing',year_3_2_purchase_summary='342720.00',subtotal_one_time_fee='555450.00',total_2_purchase_summary='1028160.00',year_2_2_purchase_summary='342720.00',sub_total='584010.00',total_one_time_fee='555450.00',last_update='2024-11-14 14:58:46',year_1_2_purchase_summary='342720.00',grand_total='584010.00',quote_to='110',qty='30',year_1_1_purchase_summary='555450.00',subtotal_monthly_recurring_fee='28560.00',total_monthly_recurring_fee='28560.00',total_1_purchase_summary='555450.00',qty_costing_software_licence='30;;;;;;;;;;;',qty_costing_systems='30;;;;;;;;;;;',item_ttl_costing_systems='555450.00;0.00;0.00;;;;;;;;;',item_ttl_costing_software_licence='28560.00;0.00;0.00;;;;;;;;;'
|
||||
20241114145826|2024-11-14 14:58:26|quote_id='391'|user_id=24|changed_from|grand_total='350406.00',qty='18',total_1_purchase_summary='333270.00',subtotal_monthly_recurring_fee='17136.00',activetab='Notes',year_1_1_purchase_summary='333270.00',subtotal_one_time_fee='333270.00',year_1_2_purchase_summary='205632.00',total_monthly_recurring_fee='17136.00',last_update='2024-11-14 14:56:32',total_one_time_fee='333270.00',sub_total='350406.00',total_2_purchase_summary='616896.00',year_2_2_purchase_summary='205632.00',year_3_2_purchase_summary='205632.00',country_shipped='202',quote_to='115',item_ttl_costing_software_licence='17136.00;0.00;0.00;;;;;;;;;',qty_costing_software_licence='18;;;;;;;;;;;',item_ttl_costing_systems='333270.00;0.00;0.00;;;;;;;;;',qty_costing_systems='18;;;;;;;;;;;'
|
||||
20241114145632|2024-11-14 14:56:32|quote_id='391'|user_id=24|changed_from|subtotal_one_time_fee='555450.00',country_shipped='113',quote_to='110',quote_date='2024-11-12',sub_total='584010.00',subtotal_monthly_recurring_fee='28560.00',year_2_2_purchase_summary='342720.00',total_monthly_recurring_fee='28560.00',total_one_time_fee='555450.00',year_1_1_purchase_summary='555450.00',qty='30',year_1_2_purchase_summary='342720.00',last_update='2024-11-12 11:57:04',quote_expiry='2024-11-26',total_2_purchase_summary='1028160.00',year_3_2_purchase_summary='342720.00',total_1_purchase_summary='555450.00',grand_total='584010.00',excl_roes=';;;;;;;;;;;',item_ttl_costing_software_licence='28560.00;0.00;0.00;;;;;;;;;',qty_costing_systems='30;;;;;;;;;;;',item_ttl_costing_systems='555450.00;0.00;0.00;;;;;;;;;',qty_costing_software_licence='30;;;;;;;;;;;'
|
||||
20241112115641|2024-11-12 11:56:41|quote_id='391'|user_id=24|changed_from|last_update='2024-11-12 11:56:03',activetab='Costing',excl_notes='0;0;1;1;0;0;0;0;0;0;0;0'
|
||||
20241112115603|2024-11-12 11:56:03|quote_id='391'|user_id=24|changed_from|activetab='Quote Details',last_update='2024-11-12 11:55:37'
|
||||
20241112115537|2024-11-12 11:55:37|quote_id='391'|user_id=24|changed_from|last_update='2024-11-12 11:55:05',activetab='Costing'
|
||||
20241112115505|2024-11-12 11:55:05|quote_id='391'|user_id=24|changed_from|grand_total='582570.00',year_1_2_purchase_summary='325440.00',year_3_2_purchase_summary='325440.00',sub_total='582570.00',total_monthly_recurring_fee='27120.00',year_2_2_purchase_summary='325440.00',total_2_purchase_summary='976320.00',subtotal_monthly_recurring_fee='27120.00',last_update='2024-11-12 11:53:38',usd_amnt_costing_software_licence='904.00;;;;;;;;;;;',curr_amnt_costing_software_licence='904.00;;;;;;;;;;;',item_ttl_costing_software_licence='27120.00;0.00;0.00;;;;;;;;;'
|
||||
20241112115338|2024-11-12 11:53:38|quote_id='391'|user_id=24|changed_from|year_3_2_purchase_summary='7017300.00',year_1_2_purchase_summary='7017300.00',last_update='2024-11-12 09:28:30',subtotal_monthly_recurring_fee='508500.00',vat_total='1654087.50',activetab='Notes',vat_one_time_fee='1577812.50',year_2_2_purchase_summary='7017300.00',year_1_1_purchase_summary='12096562.50',currency='ZAR',total_one_time_fee='12096562.50',total_monthly_recurring_fee='584775.00',roe='1.00',sub_total='11027250.00',grand_total='12681337.50',total_1_purchase_summary='12096562.50',subtotal_one_time_fee='10518750.00',note_4='Shipment terms: Ex JHB',total_2_purchase_summary='21051900.00',country_shipped='242',vat_monthly_recurring_fee='76275.00',quote_to='113',item_ttl_costing_software_licence='508500.00;0.00;0.00;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',vat_costing_game_breakdown_analytics='1;1;;;;;;;;;;',vat_costing_software_licence='1;1;1;;;;;;;;;',item_ttl_costing_systems='10518750.00;0.00;0.00;;;;;;;;;',usd_amnt_costing_software_licence='16950.00;;;;;;;;;;;',curr_amnt_costing_software_licence='16950.00;;;;;;;;;;;',vat_costing_other='1;1;1;1;1;;;;;;;',excl_notes='0;0;1;0;0;0;0;0;0;0;0;0',curr_amnt_costing_systems='350625.00;;;;;;;;;;;',usd_amnt_costing_systems='350625.00;;;;;;;;;;;',vat_costing_rental='1;1;;;;;;;;;;',vat_costing_match_credits='1;1;1;1;;;;;;;;',vat_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',vat_costing_systems='1;;1;;;;;;;;;',vat_costing_installation_kits='1;1;1;1;1;1;1;;;;;'
|
||||
20241112114747|2024-11-12 11:47:47|quote_id='390'|user_id=24|changed_from|country_shipped='242',sub_total='550000.00',last_update='2024-11-12 09:38:58',year_1_1_purchase_summary='575000.00',roe='1.00',vat_monthly_recurring_fee='7500.00',total_monthly_recurring_fee='57500.00',vat_one_time_fee='75000.00',total_one_time_fee='575000.00',year_1_2_purchase_summary='690000.00',subtotal_monthly_recurring_fee='50000.00',grand_total='632500.00',year_2_2_purchase_summary='690000.00',quote_to='113',total_2_purchase_summary='2070000.00',activetab='Costing',currency='ZAR',subtotal_one_time_fee='500000.00',vat_total='82500.00',total_1_purchase_summary='575000.00',year_3_2_purchase_summary='690000.00',curr_amnt_costing_systems='250000.00;;;;;;;;;;;',curr_amnt_costing_additional_services='250000.00;;;;;;;;;;;',item_ttl_costing_systems='250000.00;0.00;0.00;;;;;;;;;',vat_costing_rental='1;1;;;;;;;;;;',usd_amnt_costing_systems='250000.00;;;;;;;;;;;',curr_amnt_costing_rental='50000.00;;;;;;;;;;;',usd_amnt_costing_rental='50000;;;;;;;;;;;',vat_costing_systems='1;1;1;;;;;;;;;',excl_notes='0;0;1;1;1;1;0;0;0;0;0;0',vat_costing_software_licence='1;1;1;;;;;;;;;',vat_costing_hardware_add_ons='1;1;1;1;1;1;1;;;;;',item_ttl_costing_rental='50000.00;0.00;;;;;;;;;;',item_ttl_costing_additional_services='250000.00;0.00;0.00;0.00;0.00;0.00;0.00;;;;;',vat_costing_installation_kits='1;1;1;1;1;1;1;;;;;',usd_amnt_costing_additional_services='250000.00;;;;;;;;;;;',vat_costing_match_credits='1;1;1;1;;;;;;;;',vat_costing_game_breakdown_analytics='1;1;;;;;;;;;;',vat_costing_additional_services='1;1;1;1;1;1;1;;;;;',vat_costing_other='1;1;1;1;1;;;;;;;'
|
||||
20241112093848|2024-11-12 09:38:48|quote_id='389'|user_id=24|changed_from|activetab='Notes',last_update='2024-11-12 09:37:40',item_costing_rental='Montly OTT Management Fee;;;;;;;;;;;'
|
||||
20241112093253|2024-11-12 09:32:53|quote_id='388'|user_id=24|changed_from|activetab='Purchase Summary',terms='0',payment_term_2='Software License Fee due monthly in advance by 1st of each month for duration of contract period',payment_term_1='Hardware due on date of PO on presentation of Invoice',last_update='2024-11-12 09:31:57',excl_delivery_times=';;;;;;;;;;;',excl_notes='0;0;0;0;0;0;0;0;0;0;0;0',excl_roes=';;;;;;;;;;;',excl_payment_terms=';;;;;;;;;;;'
|
||||
20241112093157|2024-11-12 09:31:57|quote_id='388'|user_id=24|changed_from|rental_included='',last_update='2024-11-12 09:31:16',activetab='Costing'
|
||||
20241112093116|2024-11-12 09:31:16|quote_id='388'|user_id=24|changed_from|vat_monthly_recurring_fee='4001400.00',sub_total='26676000.00',total_monthly_recurring_fee='30677400.00',year_1_2_purchase_summary='368128800.00',year_2_2_purchase_summary='368128800.00',year_3_2_purchase_summary='368128800.00',grand_total='30677400.00',last_update='2024-11-12 09:30:27',subtotal_monthly_recurring_fee='26676000.00',activetab='Purchase Summary',vat_total='4001400.00',total_2_purchase_summary='1104386400.00',qty_costing_rental='36;;;;;;;;;;;',item_ttl_costing_rental='26676000.00;0.00;;;;;;;;;;'
|
||||
20241112092830|2024-11-12 09:28:30|quote_id='387'|user_id=24|changed_from|last_update='2024-11-12 09:25:59',note_7='All prices incl VAT'
|
||||
20241112092559|2024-11-12 09:25:59|quote_id='387'|user_id=24|changed_from|last_update='2024-11-12 09:25:30',delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',terms='0',excl_payment_terms=';;;;;;;;;;;'
|
||||
20241112092530|2024-11-12 09:25:30|quote_id='387'|user_id=24|changed_from|activetab='Costing',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',last_update='2024-11-12 09:18:13',payment_term_1='Hardware due on date of PO on presentation of Invoice',excl_notes='0;0;0;0;0;0;0;0;0;0;0;0'
|
||||
20241025104745|2024-10-25 10:47:45|quote_id='386'|user_id=24|changed_from|last_update='2024-10-25 10:46:33',camera_system_id='11'
|
||||
20241025104633|2024-10-25 10:46:33|quote_id='386'|user_id=24|changed_from|last_update='2024-10-25 10:45:32',excl_notes='0;0;0;0;0;0;0;0;0;0;0;0'
|
||||
20241025104532|2024-10-25 10:45:32|quote_id='386'|user_id=24|changed_from|note_10='Viewing hours: 8350 annually per Solo device',note_11='-reflecting 5 viewing hours per 1 production hour',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',note_12='',last_update='2024-10-25 10:35:53'
|
||||
20241025103553|2024-10-25 10:35:53|quote_id='386'|user_id=24|changed_from|note_9='',delivery_time_1='+-8 weeks from date of receipt of payment',note_8='',note_10='',last_update='2024-10-25 10:33:44',note_11='',payment_term_1='Hardware due on date of PO on presentation of Invoice'
|
||||
20241025103344|2024-10-25 10:33:44|quote_id='386'|user_id=24|changed_from|delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',subtotal_monthly_recurring_fee='0.00',total_2_purchase_summary='0.00',year_1_2_purchase_summary='0.00',total_monthly_recurring_fee='0.00',year_3_2_purchase_summary='0.00',terms='0',activetab='Camera Details',year_2_2_purchase_summary='0.00',grand_total='14888.00',sub_total='14888.00',last_update='2024-10-25 10:30:14',item_costing_software_licence=';;;;;;;;;;;',usd_amnt_costing_software_licence=';;;;;;;;;;;',excl_payment_terms=';;;;;;;;;;;',curr_amnt_costing_software_licence=';;;;;;;;;;;',qty_costing_software_licence=';;;;;;;;;;;',excl_roes=';;;;;;;;;;;',item_ttl_costing_software_licence='0.00;0.00;0.00;;;;;;;;;',excl_costing_software_licence='1;1;1;;;;;;;;;'
|
||||
20241008160849|2024-10-08 16:08:49|quote_id='344'|user_id=24|changed_from|year_1_1_purchase_summary='73840.00',grand_total='81030.00',subtotal_one_time_fee='73840.00',last_update='2024-10-08 11:08:45',total_one_time_fee='73840.00',sub_total='81030.00',total_1_purchase_summary='73840.00',qty_costing_installation_kits='6;2;;;;;;;;;;',qty_costing_systems='8;;;;;;;;;;;',item_ttl_costing_systems='65680.00;0.00;0.00;;;;;;;;;',item_ttl_costing_installation_kits='2160.00;6000.00;0.00;0.00;0.00;0.00;0.00;;;;;'
|
||||
20241008110845|2024-10-08 11:08:45|quote_id='344'|user_id=24|changed_from|activetab='Notes',last_update='2024-09-10 17:00:23',total_one_time_fee='90980.00',year_1_1_purchase_summary='90980.00',subtotal_one_time_fee='90980.00',sub_total='98170.00',total_1_purchase_summary='90980.00',grand_total='98170.00',qty_costing_systems='10;;;;;;;;;;;',item_ttl_costing_installation_kits='2880.00;6000.00;0.00;0.00;0.00;0.00;0.00;;;;;',item_ttl_costing_systems='82100.00;0.00;0.00;;;;;;;;;',qty_costing_installation_kits='8;2;;;;;;;;;;'
|
||||
20241003160003|2024-10-03 16:00:03|quote_id='384'|user_id=24|changed_from|last_update='2024-10-03 15:57:15',activetab='Costing',item_purchase_summary='Hardware Purchase;Monthly Fees;Annual Fees;;;;;;;;;'
|
||||
20241003155715|2024-10-03 15:57:15|quote_id='384'|user_id=24|changed_from|grand_total='434160.00',activetab='Notes',sub_total='434160.00',subtotal_one_time_fee='411320.00',total_1_purchase_summary='411320.00',year_1_1_purchase_summary='411320.00',payment_term_4='',total_one_time_fee='411320.00',last_update='2024-10-03 15:52:50',excl_costing_match_credits='1;1;1;1;;;;;;;;',item_ttl_costing_match_credits='0.00;0.00;0.00;0.00;;;;;;;;',curr_amnt_costing_match_credits=';;;;;;;;;;;',usd_amnt_costing_match_credits=';;;;;;;;;;;',item_costing_match_credits=';;;;;;;;;;;',qty_costing_match_credits=';;;;;;;;;;;'
|
||||
20241003155250|2024-10-03 15:52:50|quote_id='384'|user_id=24|changed_from|payment_term_3='Game Breakdown and Analytics: Annually in Advance',last_update='2024-10-03 15:51:48',note_4='Shipment terms: Excl freight and applicable taxies/duties into destination country',activetab='Costing',payment_term_1='Hardware and OTT due on date of order',roe_1='Monthly & Annual Fees billed subject to currency fluctuations',excl_payment_terms=';;1;;;;;;;;;'
|
||||
20241003155148|2024-10-03 15:51:48|quote_id='384'|user_id=24|changed_from|year_1_1_purchase_summary='415760.00',sub_total='438600.00',subtotal_one_time_fee='415760.00',total_one_time_fee='415760.00',grand_total='438600.00',total_1_purchase_summary='415760.00',last_update='2024-10-03 14:42:17',usd_amnt_costing_systems='13192.00;10000.00;;;;;;;;;;',curr_amnt_costing_systems='13192.00;10000.00;;;;;;;;;;',item_ttl_costing_systems='395760.00;10000.00;0.00;;;;;;;;;',item_costing_rental='OTT Monthly Management Fee ;;;;;;;;;;;'
|
||||
20241003144217|2024-10-03 14:42:17|quote_id='384'|user_id=24|changed_from|total_1_purchase_summary='440750.00',sub_total='463590.00',year_1_1_purchase_summary='440750.00',last_update='2024-10-03 14:36:24',grand_total='463590.00',total_one_time_fee='440750.00',subtotal_one_time_fee='440750.00',item_ttl_costing_systems='420750.00;10000.00;0.00;;;;;;;;;',usd_amnt_costing_systems='14025.00;10000.00;;;;;;;;;;',curr_amnt_costing_systems='14025.00;10000.00;;;;;;;;;;'
|
||||
20241003143624|2024-10-03 14:36:24|quote_id='384'|user_id=24|changed_from|payment_term_1='Hardware due on date of PO on presentation of Invoice',total_2_purchase_summary='732240.00',year_1_2_purchase_summary='244080.00',sub_total='461090.00',grand_total='461090.00',total_monthly_recurring_fee='20340.00',delivery_time_1='2 to 3 weeks from date of receipt of PO/payment',year_2_2_purchase_summary='244080.00',year_3_2_purchase_summary='244080.00',delivery_time_2='',subtotal_monthly_recurring_fee='20340.00',last_update='2024-10-03 14:32:57',qty_costing_rental=';;;;;;;;;;;',excl_costing_rental='1;1;;;;;;;;;;',usd_amnt_costing_rental=';;;;;;;;;;;',item_costing_rental=';;;;;;;;;;;',item_ttl_costing_rental='0.00;0.00;;;;;;;;;;',curr_amnt_costing_rental=';;;;;;;;;;;'
|
||||
99
libs/html/401.pm
Normal file
99
libs/html/401.pm
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href='http://fonts.googleapis.com/css?family=Creepster|Audiowide' rel='stylesheet' type='text/css'>
|
||||
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAUElEQVQYV2NkYGAwBuKzQAwDID4IoIgxIikAMZE1oRiArBDdZBSNMIXoJiFbDZYDKcSmCOYimDuNSVKIzRNYrUYOFuQgweoZbIoxgoeoAAcAEckW11HVTfcAAAAASUVORK5CYII=) repeat;
|
||||
background-color: #212121;
|
||||
color: white;
|
||||
font-size: 28px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
font-family: 'Creepster', cursive, arial, helvetica, sans-serif;
|
||||
font-size: 200px;
|
||||
color: white;
|
||||
color: rgba(255, 255, 255, 0.98);
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
margin-top: 5%;
|
||||
text-shadow: 5px 5px hsl(0, 0%, 25%);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.not-found {
|
||||
font-family: 'Audiowide', cursive, arial, helvetica, sans-serif;
|
||||
width: 45%;
|
||||
float: right;
|
||||
margin-top: 5%;
|
||||
font-size: 50px;
|
||||
color: white;
|
||||
text-shadow: 2px 2px 5px hsl(0, 0%, 61%);
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
.clear {
|
||||
float: none;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
border: hsl(247, 89%, 72%) solid 1px;
|
||||
outline: none;
|
||||
padding: 5px 3px;
|
||||
font-size: 16px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #9ECDFF;
|
||||
text-shadow: 0px 0px 2px white;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p class="error-code">
|
||||
401
|
||||
</p>
|
||||
|
||||
<p class="not-found">Unauthorised</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
You are not authorised to view this page
|
||||
<br>
|
||||
<br>
|
||||
<a href="/">Click here to go back to your Dashboard</a>
|
||||
<br>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
ENDOFTEXT
|
||||
#
|
||||
82
libs/html/_FromProd/login.pm
Normal file
82
libs/html/_FromProd/login.pm
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="$useropts{'css'}/bootstrap-itv.min.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/charisma-app.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/login_screen.css" rel="stylesheet">
|
||||
<link rel="shortcut icon" href="$useropts{'img'}/favicon.ico">
|
||||
<style>
|
||||
body { background-color:#ffffff; color:#222222; }
|
||||
.well { background-color: #e5e4e6; }
|
||||
.input-group-addon { background-color: #c6c1c1; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-container bg-colour"style="overflow:hidden;">
|
||||
<div class="ch-container">
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 center login-header">
|
||||
<img src="$useropts{'img'}/$useropts{logo}" style="height:76px;">
|
||||
</div>
|
||||
<!--/span-->
|
||||
</div><!--/row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="well col-md-5 center login-box">
|
||||
<div id="loginResult" class="alert alert-info" style="margin-bottom:20px;">
|
||||
Please login with your Username and Password.
|
||||
</div>
|
||||
<!-- <form class="form-horizontal" action="index.html" method="post"> -->
|
||||
<form class="form-horizontal" id="loginForm" name="loginForm" method="post" action="" style="margin-top:12px;">
|
||||
<fieldset>
|
||||
<div class="input-group input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-user red"></i></span>
|
||||
<input type="text" name="username" id="username" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<div class="clearfix"></div><br>
|
||||
|
||||
<div class="input-group input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-lock red"></i></span>
|
||||
<input type="password" name="password" id="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<!-- <div class="input-prepend">
|
||||
<label class="remember" for="remember"><input type="checkbox" id="remember"> Remember me</label>
|
||||
</div> <div class="clearfix"></div> -->
|
||||
|
||||
<p class="center col-md-5">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Login</button>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!--/span-->
|
||||
</div><!--/row-->
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
</div><!--/.fluid-container-->
|
||||
|
||||
<script src="$useropts{'js'}/jquery-1.4.4.min.js"></script>
|
||||
<script type="text/javascript" src="$useropts{'js'}/login.js"></script>
|
||||
|
||||
<script>
|
||||
try {
|
||||
parent.reloadForLogin();
|
||||
parent.BootstrapDialog.closeAll();
|
||||
}
|
||||
catch(err) { // do nothing
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="position:absolute;right:10px;bottom:10px;"><a href="https://kre8it.co.za" target="_blank" style="color:#ded6d6;">Built by Kre8IT Programming</a></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
42
libs/html/_blank.pm
Normal file
42
libs/html/_blank.pm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
require header ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
$useropts{'breadcrumbs'}
|
||||
|
||||
$alert
|
||||
|
||||
<div class="row">
|
||||
<div class="box col-md-12">
|
||||
<div class="box-inner">
|
||||
<div class="box-header well" data-original-title="">
|
||||
<h2><i class="glyphicon glyphicon-$glyphicon"></i> $page_title</h2>
|
||||
$box_icon
|
||||
</div>
|
||||
<div class="box-content">
|
||||
$print_box_content_rows
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
$print_more_boxes
|
||||
</div><!--/#content.col-md-0-->
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
$print_footer_jscript
|
||||
|
||||
</body>
|
||||
|
||||
$print_footer_forms
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
32
libs/html/_blank_3.pm
Normal file
32
libs/html/_blank_3.pm
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
require header ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
$useropts{'breadcrumbs'}
|
||||
|
||||
$alert
|
||||
|
||||
$print_box_content_rows
|
||||
|
||||
</div><!--/#content.col-md-0-->
|
||||
|
||||
$print_more_boxes
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
$print_footer_jscript
|
||||
|
||||
</body>
|
||||
|
||||
$print_footer_forms
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
88
libs/html/_blank_4.pm
Normal file
88
libs/html/_blank_4.pm
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
# require header ;
|
||||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- The styles -->
|
||||
<link href="$useropts{'css'}/bootstrap-itv.min.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/custom-itv.css" rel="stylesheet">
|
||||
$extra_css
|
||||
<link href="$useropts{'css'}/charisma-app.css" rel="stylesheet">
|
||||
<link href="$useropts{'bower_components'}/fullcalendar/dist/fullcalendar.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/fullcalendar/dist/fullcalendar.print.css" rel='stylesheet' media='print'>
|
||||
<link href="$useropts{'bower_components'}/chosen/chosen.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/colorbox/example3/colorbox.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/responsive-tables/responsive-tables.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/bootstrap-tour/build/css/bootstrap-tour.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/jquery.noty.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/noty_theme_default.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.theme.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/jquery.iphone.toggle.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/uploadify.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/animate.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/bootstrap-dialog.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/bootstrap-datetimepicker.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/datepicker.css" rel='stylesheet'>
|
||||
$typeahead_css
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
|
||||
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- The fav icon -->
|
||||
<link rel="shortcut icon" href="$useropts{'img'}/favicon.ico">
|
||||
|
||||
<style>
|
||||
$useropts{'common'}{'css'}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$fullcalendar_events
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body $onload>
|
||||
|
||||
|
||||
ENDOFTEXT
|
||||
#
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
|
||||
$alert
|
||||
|
||||
$print_box_content_rows
|
||||
|
||||
</div><!--/#content.col-md-0-->
|
||||
|
||||
$print_more_boxes
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
$print_footer_jscript
|
||||
|
||||
</body>
|
||||
|
||||
$print_footer_forms
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
26
libs/html/_return.pm
Normal file
26
libs/html/_return.pm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
unless ($goaction) { $goaction = 'list' ; }
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#list-form').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="listform" id="list-form" method="post" action="admin-$goaction-$lcpage\s">
|
||||
<input type="hidden" name="iaction" value="$goaction">
|
||||
<input type="hidden" name="isaved" value="$success">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
95
libs/html/archive.pm
Normal file
95
libs/html/archive.pm
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
require header ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
$useropts{'breadcrumbs'}
|
||||
|
||||
$alert
|
||||
|
||||
$print_usage
|
||||
|
||||
$print_download
|
||||
|
||||
$print_delete_uploads_form
|
||||
|
||||
$print_buttons
|
||||
|
||||
<!-- content ends -->
|
||||
</div><!--/#content.col-md-0-->
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
<hr>
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
</body>
|
||||
<style>
|
||||
.progress { height: 30px; }
|
||||
.progress .progress-bar {
|
||||
font-size: 12px;
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
function zipDelete ()
|
||||
{
|
||||
BootstrapDialog.confirm({
|
||||
title: 'Confirm Delete',
|
||||
message: 'Are you sure you want to delete <b>' + \$("#selectZip").val() + '</b> uploads?',
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
\$('#delete-uploads-selection').val(\$("#selectZip").val());
|
||||
\$('#delete-uploads-form').submit();
|
||||
BootstrapDialog.closeAll() ;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function zipUploads ()
|
||||
{
|
||||
BootstrapDialog.confirm({
|
||||
title: 'Confirm Zip',
|
||||
message: 'Are you sure you want to ZIP and send <b>' + \$("#selectZip").val() + '</b>!',
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
\$('#zip-uploads-selection').val(\$("#selectZip").val());
|
||||
\$('#zip-form').submit();
|
||||
BootstrapDialog.closeAll() ;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$download_zip_after_delete
|
||||
|
||||
</script>
|
||||
|
||||
<form role="form" id="delete-uploads-form" method="post">
|
||||
<input type="hidden" name="iaction" value="deluploads">
|
||||
<input type="hidden" name="izip" value="" id="delete-uploads-selection">
|
||||
</form>
|
||||
|
||||
<form role="form" name="zip" id="zip-form" method="post">
|
||||
<input type="hidden" name="iaction" value="zip">
|
||||
<input type="hidden" name="izip" value="" id="zip-uploads-selection">
|
||||
</form>
|
||||
|
||||
<form role="form" id="open-zip" action="$g_archiveziplink" target="_blank">
|
||||
<input type="hidden" name="iaction" value="">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
37
libs/html/calendar.pm
Normal file
37
libs/html/calendar.pm
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
require header ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
$useropts{'breadcrumbs'}
|
||||
|
||||
<div class="row">
|
||||
<div class="box col-md-12">
|
||||
<div class="box-inner">
|
||||
<div class="box-header well" data-original-title="">
|
||||
<h2><i class="glyphicon glyphicon-calendar"></i> Calendar</h2>
|
||||
$box_icon
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div id="calendar" class="fc fc-ltr"></div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
</body>
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/fixedsystems.pm
Normal file
23
libs/html/fixedsystems.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#redirect-form').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="redirectform" id="redirect-form" method="post" action="/fixed-systems-report">
|
||||
<input type="hidden" name="iaction" value="">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
103
libs/html/footer.pm
Normal file
103
libs/html/footer.pm
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
print <<ENDOFTEXT;
|
||||
|
||||
<footer class="row">
|
||||
<p class="col-md-9 col-sm-9 col-xs-12 copyright">© <a href="http://itvadmin.co.za" target="_blank">$useropts{short}</a></p>
|
||||
|
||||
<p class="col-md-3 col-sm-3 col-xs-12 powered-by"><a href="http://kre8it.co.za" target="_blank">Kre8IT Programming (Pty) Ltd</a><br>062 133 6754<br><a href="mailto:info\@kre8it.co.za">info\@kre8it.co.za</a></p>
|
||||
</footer>
|
||||
|
||||
</div><!--/.fluid-container-->
|
||||
|
||||
<!-- external javascript -->
|
||||
|
||||
<script src="$useropts{'bower_components'}/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- library for cookie management -->
|
||||
<script src="$useropts{'js'}/jquery.cookie.js"></script>
|
||||
<!-- calender plugin -->
|
||||
<script src="$useropts{'bower_components'}/moment/min/moment.min.js"></script>
|
||||
<script src="$useropts{'bower_components'}/fullcalendar/dist/fullcalendar.min.js"></script>
|
||||
<!-- data table plugin -->
|
||||
<script src="$useropts{'js'}/jquery.dataTables.min.js"></script>
|
||||
<!-- select or dropdown enhancer -->
|
||||
<script src="$useropts{'bower_components'}/chosen/chosen.jquery.min.js"></script>
|
||||
<!-- plugin for gallery image view -->
|
||||
<script src="$useropts{'bower_components'}/colorbox/jquery.colorbox-min.js"></script>
|
||||
<!-- notification plugin -->
|
||||
<script src="$useropts{'js'}/jquery.noty.js"></script>
|
||||
<!-- library for making tables responsive -->
|
||||
<script src="$useropts{'bower_components'}/responsive-tables/responsive-tables.js"></script>
|
||||
<!-- tour plugin -->
|
||||
<script src="$useropts{'bower_components'}/bootstrap-tour/build/js/bootstrap-tour.min.js"></script>
|
||||
<!-- star rating plugin -->
|
||||
<script src="$useropts{'js'}/jquery.raty.min.js"></script>
|
||||
<!-- for iOS style toggle switch -->
|
||||
<script src="$useropts{'js'}/jquery.iphone.toggle.js"></script>
|
||||
<!-- autogrowing textarea plugin -->
|
||||
<script src="$useropts{'js'}/jquery.autogrow-textarea.js"></script>
|
||||
<!-- history.js for cross-browser state change on ajax -->
|
||||
<script src="$useropts{'js'}/jquery.history.js"></script>
|
||||
<!-- application script for Charisma demo -->
|
||||
<script src="$useropts{'js'}/charisma.js"></script>
|
||||
<!-- application script for bootstrap dialog customisation -->
|
||||
<script src="$useropts{'js'}/bootstrap-dialog.js"></script>
|
||||
<script src="$useropts{'js'}/bootstrap-datetimepicker.min.js"></script>
|
||||
<script src="$useropts{'js'}/bootstrap-datepicker.js"></script>
|
||||
<script src="$useropts{'js'}/jquery.form-validator.min.js"></script>
|
||||
$extra_js
|
||||
|
||||
<script>
|
||||
|
||||
\$.validate();
|
||||
|
||||
function dlgMdl(url,titl,cssfh,csscl){
|
||||
// if (!cssfh) { cssfh = 'height:' + (screen.height - (screen.height / 3) - 30) + 'px' }
|
||||
if (!cssfh) { cssfh = 'height:' + (\$(window).height() * 0.87) + 'px' }
|
||||
BootstrapDialog.show({
|
||||
title: titl,
|
||||
message: \$('<iframe src="' + url + '" style="position:relative;background-color:transparent;border:0px;width:100%;' + cssfh + ';" frameborder="0"></iframe>') ,
|
||||
cssClass: csscl
|
||||
});
|
||||
}
|
||||
|
||||
function editQuote (id)
|
||||
{
|
||||
\$('#quote-edit-id').val(id);
|
||||
\$('#quote-edit-form').submit();
|
||||
}
|
||||
|
||||
function editEventQuote (id)
|
||||
{
|
||||
\$('#event-quote-edit-id').val(id);
|
||||
\$('#event-quote-edit-form').submit();
|
||||
}
|
||||
|
||||
\$('[data-toggle="tooltip"]').tooltip({html:true}) ;
|
||||
|
||||
\$(document).ready(function(){ $trigger_jquery });
|
||||
|
||||
$trigger_jquery_raw
|
||||
|
||||
function sendEmail(inv,mnid) {
|
||||
dlgMdl("$useropts{'scripts'}/dialog/email.pl?"+inv+"&"+mnid,"Pre-alert",'height:550px;','') ;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form role="form" id="quote-edit-form" method="post" action="$useropts{'folder'}/edit-quotes">
|
||||
<input type="hidden" name="iaction" value="edit">
|
||||
<input type="hidden" name="id" id="quote-edit-id" value="">
|
||||
</form>
|
||||
|
||||
<form role="form" id="event-quote-edit-form" method="post" action="$useropts{'folder'}/edit-event-quotes">
|
||||
<input type="hidden" name="iaction" value="edit">
|
||||
<input type="hidden" name="id" id="event-quote-edit-id" value="">
|
||||
</form>
|
||||
|
||||
$extra_form_footer
|
||||
|
||||
ENDOFTEXT
|
||||
#
|
||||
|
||||
# <!-- multiple file upload plugin -->
|
||||
# <script src="$useropts{'js'}/jquery.uploadify-3.1.min.js"></script>
|
||||
618
libs/html/header.pm
Normal file
618
libs/html/header.pm
Normal file
|
|
@ -0,0 +1,618 @@
|
|||
|
||||
my $manage_quote_defaults_menu = '' ;
|
||||
my $manage_price_list_menu = '' ;
|
||||
|
||||
my $rma_list_menu = ($usertype eq 'it' || $usertype eq 'senior_manager' || $usertype eq 'manager' || $usertype eq 'support' || $usertype eq 'casual_c') ? qq~<li><a href="$useropts{'folder'}/list-rma">RMA List</a></li>~ : '' ;
|
||||
|
||||
my $manage_price_list_menu_top = '' ;
|
||||
|
||||
my $manage_logistics_report_menu_top = qq~<li><a href="$useropts{'folder'}/logistics-report"><i class="glyphicons glyphicons-transfer"></i>Logistics</a></li>~ ;
|
||||
my $manage_leave_menu = '' ;
|
||||
my $reports_menu_top = '' ;
|
||||
my $accounts_menu_top = '' ;
|
||||
|
||||
my $analytics_reports = ($glod_user_level >= 5) ? qq~
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Analytics</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="$useropts{'folder'}/fixtures-report">Fixtures Report</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
~ : qq~~ ;
|
||||
|
||||
# my $calibration_menu_top = qq~<li><a href="$useropts{'folder'}/calibration-report"><i class="glyphicon glyphicon-signal"></i> Calibration</a></li>~ ;
|
||||
my $calibration_menu_top = qq~<li><a href="$useropts{'folder'}/calibration-report"><i class="glyphicon glyphicon-signal"></i> Calibration</a></li>~ ;
|
||||
|
||||
|
||||
|
||||
my $fixedsystem_menu_top = qq~<li><a href="$useropts{'folder'}/fixed-systems-report"><i class="glyphicon glyphicon-indent-left"></i>Fixed System</a></li>~ ;
|
||||
my $home_menu_top = '' ;
|
||||
my $search_menu_top = '' ;
|
||||
my $quotes_menu_top = '' ;
|
||||
my $events_menu_top = qq~<li><a href="$useropts{'folder'}/list-event-quotes"><i class="glyphicon glyphicon-th"></i> Events</a></li>~;
|
||||
# my $analytics_menu_top = ($glod_user_level >= 5) ? qq~<li><a href="$useropts{'folder'}/filter-analytics-event-bookings"><i class="glyphicon glyphicon-th-list"></i> Analytics</a></li>~ : qq~~ ;
|
||||
|
||||
|
||||
my $analytics_menu_top = ($glod_user_level >= 5) ? qq~
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicon glyphicon-th-list"></span> Analytics <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="$useropts{'folder'}/filter-analytics-event-bookings">Bookings</a></li>
|
||||
<li><a href="$useropts{'folder'}/filter-analytics-event-credits">Credits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
~ : qq~~ ;
|
||||
|
||||
|
||||
|
||||
# my $events_filter = qq~<li><a href="$useropts{'folder'}/filter-event-quotes">Search Events</a></li>~;
|
||||
# my $events_systems = '' ;
|
||||
my $cameras_menu_top = qq~<li><a href="$useropts{'folder'}/search-cameras"><i class="glyphicon glyphicon-camera"></i> Cameras</a></li>~;
|
||||
my $documents_menu_top = '' ;
|
||||
my $calendar_menu_top = qq~<li><a href="$useropts{'folder'}/calendar"><i class="glyphicon glyphicon-calendar"></i> Calendar</a></li>~;
|
||||
my $manage_camera_systems_menu = '' ;
|
||||
my $manage_users_menu = '' ;
|
||||
my $manage_operators_menu = '' ;
|
||||
my $manage_installation_partners_menu = '' ;
|
||||
my $manage_analytics_client_menu = '' ;
|
||||
my $manage_coding_providers_menu = '' ;
|
||||
my $manage_customers_menu = '' ;
|
||||
my $manage_archive_menu = '' ;
|
||||
my $manage_event_systems = '' ;
|
||||
my $manage_logistics_suppliers = '' ;
|
||||
my $manage_logistics_locations = '' ;
|
||||
my $manage_logistics_items = '' ;
|
||||
my $manage_sport_types = '' ;
|
||||
my $manage_cities = '' ;
|
||||
my $manage_organisations = '' ;
|
||||
my $manage_regions = '' ;
|
||||
my $manage_teams = '' ;
|
||||
my $manage_operator_payments = '' ;
|
||||
my $manage_monitor_payments = '' ;
|
||||
my $manage_troubleshoot_monitor_payments = '' ;
|
||||
my $manage_temp_calibrator_payments = '' ;
|
||||
my $manage_event_invoicing = '' ;
|
||||
my $manage_logistics_report = '' ;
|
||||
|
||||
my $manage_logistics_payments_report = '' ;
|
||||
my $manage_logistics_shipment_costs_report = '' ;
|
||||
|
||||
my $quote_search_menu_top = '' ;
|
||||
my $reports_event_quotes = qq~<li><a href="$useropts{'folder'}/event-quotes-report">Event Quotes Report</a></li>~;
|
||||
my $reports_management_report = '' ;
|
||||
my $logistics_costs_report = '' ;
|
||||
my $events_reports = '' ;
|
||||
my $reports_active_camera = '' ;
|
||||
my $reports_active_camera = qq~<li><a href="$useropts{'folder'}/cameras-report">Active Cameras Report</a></li>~;
|
||||
# my $reports_stock_report = '' ;
|
||||
my $reports_delivered_report = qq~<li><a href="$useropts{'folder'}/delivered-report">Delivered Report</a></li>~;
|
||||
# my $reports_delivered_report = '' ;
|
||||
my $reports_warranty_report = '' ;
|
||||
my $reports_match_credits = '' ;
|
||||
my $manage_fixedsystem = '' ;
|
||||
# my $monitor_report_menu_top = qq~<li><a href="$useropts{'folder'}/monitor-report"><i class="glyphicons glyphicons-eye"></i>Monitor Report</a></li>~ ;
|
||||
|
||||
my $schedule_menu_top = '' ;
|
||||
my $reports_monitor_report = ($glod_user_level >= 3) ? qq~<li><a href="$useropts{'folder'}/monitoring-report">Monitor Allocations</a></li>~ : '' ;
|
||||
my $reports_temp_calibration = ($glod_user_level >= 3) ? qq~<li><a href="$useropts{'folder'}/temp-calibrator-report">Temp Calibrator Allocations</a></li>~ : '' ;
|
||||
my $reports_troubleshoot_monitor_report = ($glod_user_level >= 3) ? qq~<li><a href="$useropts{'folder'}/troubleshoot-monitoring-report">Troubleshoot Monitor Allocations</a></li>~ : '' ;
|
||||
my $reports_site_surveys = ($glod_user_level >= 3) ? qq~<li><a href="$useropts{'folder'}/mobile-site-surveys-report">Mobile Site Surveys</a></li>~ : '' ;
|
||||
my $reports_set_up_groups = ($glod_user_level >= 2) ? qq~<li><a href="$useropts{'folder'}/set-up-groups-report">Set Up Groups</a></li>~ : '' ;
|
||||
my $mobile_tracking_system = ($glod_user_level >= 3) ? qq~<li><a href="$useropts{'folder'}/mobile-system-tracking-report">Mobile System Tracking</a></li>~ : qq~~ ;
|
||||
|
||||
my $report_audit_trial = ($glod_user_level > 3) ? qq~<li><a href="$useropts{'folder'}/search-audit-trial">Audit Trial</a></li>~ : '' ;
|
||||
|
||||
if ($useropts{super}{$username} and $pixellot_limit{$username}!=1 and $events_limit{$username}!=1) {
|
||||
# $manage_quote_defaults_menu = qq~<li><a href="$useropts{'folder'}/list-quote-defaults">Quote Defaults</a></li>~ ;
|
||||
$manage_quote_defaults_menu = qq~<li><a href="$useropts{'folder'}/list-quote-notes">Quote Defaults</a></li>~ ;
|
||||
$manage_price_list_menu = qq~<li><a href="$useropts{'folder'}/summary-price-list">Price List</a></li>~ ;
|
||||
$manage_price_list_menu_top = qq~<li><a href="$useropts{'folder'}/summary-price-list"><i class="glyphicon glyphicon-list"></i> Price List</a></li>~ ;
|
||||
# $manage_leave_menu = qq~<li class="divider"></li>
|
||||
# <li><a href="$useropts{'folder'}/list-leave">List Leave</a></li>
|
||||
# <li><a href="$useropts{'folder'}/list-leave-settings">Leave Settings</a></li>
|
||||
# <li><a href="$useropts{'folder'}/leave-report">Leave Report</a></li>~ ;
|
||||
|
||||
# $events_systems = qq~<li><a href="$useropts{'folder'}/list-event-systems"> Event Systems</a></li>~;
|
||||
}
|
||||
|
||||
# unless ($pixellot_limit{$username} || $events_limit{$username} || $is_operator || $usertype eq 'external' || $usertype eq 'schools_manager') {
|
||||
if ($glod_user_level >= 4) {
|
||||
$reports_stock_report = qq~<li><a href="$useropts{'folder'}/stock-report">Stock Report</a></li>~;
|
||||
}
|
||||
|
||||
if ($glod_user_level >= 5) {
|
||||
# $reports_delivered_report = qq~<li><a href="$useropts{'folder'}/delivered-report">Delivered Report</a></li>~;
|
||||
$reports_warranty_report = qq~<li><a href="$useropts{'folder'}/warranty-report">Extended Warranty Report</a></li>~;
|
||||
$reports_match_credits = qq~<li><a href="$useropts{'folder'}/match-credits-report">Match Credits Report</a></li>~;
|
||||
$reports_management_report = qq~<li><a href="$useropts{'folder'}/management-report">Management Report</a></li>~;
|
||||
$logistics_costs_report = qq~<li><a href="$useropts{'folder'}/logistics-costs-report">Logistics Costs Report</a></li>~;
|
||||
# $reports_operators_report = qq~<li><a href="$useropts{'folder'}/operators-report">Operators Report</a></li>~;
|
||||
$events_reports = qq~<li class="divider"></li>
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Events Reports</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="$useropts{'folder'}/events-summary-report">Event Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/operators-booking-summary-report">Operators Booking Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/costings-detailed-report">Costings Detailed</a></li>
|
||||
<li><a href="$useropts{'folder'}/costings-summary-report">Costings Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/events-detailed-report">Events Detailed</a></li>
|
||||
<li><a href="$useropts{'folder'}/operators-summary-report">Operators Report</a></li>
|
||||
<li><a href="$useropts{'folder'}/operators-report">Operators Payments Report</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
~;
|
||||
|
||||
|
||||
|
||||
$events_menu_top = qq~<li><a href="$useropts{'folder'}/filter-event-quotes"><i class="glyphicon glyphicon-th"></i> Events</a></li>~;
|
||||
$home_menu_top = qq~<li><a href="$useropts{'folder'}/list-event-quotes"><i class="glyphicon glyphicon-home"></i></a></li>~;
|
||||
# $search_menu_top = qq~<li><a href="$useropts{'folder'}/search-quotes"><i class="glyphicon glyphicon-search"></i> Search</a></li>~;
|
||||
$quotes_menu_top = qq~<li><a href="$useropts{'folder'}/search-quotes"><i class="glyphicon glyphicon-th-large"></i> Quotes</a></li>~ unless $usertype eq 'manager' ;
|
||||
# $documents_menu_top = qq~<li><a href="$useropts{'folder'}/search-documents"><i class="glyphicon glyphicon-list-alt"></i> Documents</a></li>~;
|
||||
# $calendar_menu_top = qq~<li><a href="$useropts{'folder'}/calendar"><i class="glyphicon glyphicon-calendar"></i> Calendar</a></li>~;
|
||||
|
||||
$manage_camera_systems_menu = qq~<li><a href="$useropts{'folder'}/list-camera-systems">Camera Systems</a></li>~;
|
||||
$manage_users_menu = qq~<li><a href="$useropts{'folder'}/list-users">All Users</a></li>~;
|
||||
$manage_operators_menu = qq~<li><a href="$useropts{'folder'}/list-operators">Operators</a></li>~;
|
||||
$manage_school_managers_menu = qq~<li><a href="$useropts{'folder'}/list-school-managers">School Managers</a></li>~;
|
||||
|
||||
$manage_installation_partners_menu = qq~<li><a href="$useropts{'folder'}/list-installation-partners">Installation Partners</a></li>~;
|
||||
$manage_analytics_client_menu = ($glod_user_level >= 5) ? qq~<li><a href="$useropts{'folder'}/list-analytics-clients">Analytics Clients</a></li>~ : qq~~ ;
|
||||
$manage_coding_providers_menu = ($glod_user_level >= 5) ? qq~<li><a href="$useropts{'folder'}/list-coding-providers">Coding Providers</a></li>~ : qq~~ ;
|
||||
|
||||
# $manage_logistics_shipment_costs_report = qq~<li><a href="$useropts{'folder'}/list-logistics-shipment-costs">Logistics Shipment Costs</a></li>~ ;
|
||||
|
||||
$manage_customers_menu = qq~<li><a href="$useropts{'folder'}/list-customers">Customers</a></li>~;
|
||||
$manage_archive_menu = qq~<li class="divider"></li><li><a href="/archive">Archive</a></li><li class="divider"></li>~;
|
||||
$manage_event_systems = qq~<li><a href="$useropts{'folder'}/list-event-systems">Event Systems</a></li>
|
||||
<li><a href="$useropts{'folder'}/list-event-types">Event Types</a></li>
|
||||
<li><a href="$useropts{'folder'}/list-event-cost-items">Event Cost Items</a></li>
|
||||
$manage_logistics_shipment_costs_report
|
||||
<li class="divider"></li>~;
|
||||
|
||||
# $manage_logistics_report = qq~<li><a href="$useropts{'folder'}/logistics-report">Logistics Report</a></li>~ ;
|
||||
$manage_event_invoicing = qq~<li><a href="$useropts{'folder'}/event-invoicing-report">Event Invoicing</a></li>~ ;
|
||||
$manage_operator_payments = qq~<li><a href="$useropts{'folder'}/operator-payments">Operator Payments</a></li>~ ;
|
||||
$manage_monitor_payments = qq~<li><a href="$useropts{'folder'}/monitor-payments-report">Monitor Payments</a></li>~ ;
|
||||
$manage_troubleshoot_monitor_payments = qq~<li><a href="$useropts{'folder'}/troubleshoot-monitor-payments-report">Troubleshoot Monitor Payments</a></li>~ ;
|
||||
$manage_temp_calibrator_payments = qq~<li><a href="$useropts{'folder'}/temp-calibrator-payments-report">Temp Calibrator Payments</a></li>~ ;
|
||||
|
||||
$manage_logistics_payments_report = qq~<li><a href="$useropts{'folder'}/logistics-payments">Logistics Payments</a></li>~ ;
|
||||
|
||||
|
||||
$manage_regions = qq~<li><a href="$useropts{'folder'}/list-regions">Regions</a></li>~ ;
|
||||
$manage_teams = qq~<li><a href="$useropts{'folder'}/list-teams">Teams</a></li>~ if $glod_user_level >= 5 ;
|
||||
$manage_cities = qq~<li><a href="$useropts{'folder'}/list-cities">Cities</a></li>~ ;
|
||||
$manage_organisations = qq~<li><a href="$useropts{'folder'}/list-venue">Venue</a></li>~ ;
|
||||
$manage_sport_types = qq~<li><a href="$useropts{'folder'}/list-sport-types">Sport Types</a></li> ~;
|
||||
$manage_logistics_suppliers = qq~<li><a href="$useropts{'folder'}/list-logistics-suppliers">Logistics Suppliers</a></li>~ ;
|
||||
$manage_logistics_items = qq~<li><a href="$useropts{'folder'}/list-logistics-items">Logistics Items</a></li> ~;
|
||||
$manage_logistics_locations = qq~<li><a href="$useropts{'folder'}/list-logistics-locations">Logistics Locations</a></li>~ ;
|
||||
|
||||
|
||||
# $manage_fixedsystem = qq~<li><a href="$useropts{'folder'}/fixed-systems-report">Fixed System</a></li><li class="divider"></li>~ ;
|
||||
|
||||
$quote_search_menu_top = qq~<li>
|
||||
<form class="navbar-search pull-left" method="post" action="/search-event-quotes">
|
||||
<input placeholder="Event Nr Search" class="search-query form-control col-md-10" name="quote_nr" type="text">
|
||||
<input name="iaction" type="hidden" value="report">
|
||||
</form>
|
||||
</li>~;
|
||||
|
||||
# $reports_monitor_report = qq~<li><a href="$useropts{'folder'}/monitor-report">Monitor Report</a></li>~ ;
|
||||
# $reports_temp_calibration = qq~<li><a href="$useropts{'folder'}/temp-calibration-report">Temp Calibration Report</a></li>~ ;
|
||||
|
||||
# $accounts_menu_top = qq~<li class="dropdown">
|
||||
# <a href="#" data-toggle="dropdown"><span class="glyphicons glyphicons-bank"></span>Accounts <span class="caret"></span></a>
|
||||
# <ul class="dropdown-menu" role="menu">
|
||||
# $manage_event_invoicing
|
||||
# $manage_operator_payments
|
||||
# $manage_monitor_payments
|
||||
# $manage_temp_calibrator_payments
|
||||
# $manage_logistics_payments_report
|
||||
# $manage_logistics_shipment_costs_report
|
||||
# </ul>
|
||||
# </li>~;
|
||||
$accounts_menu_top = qq~
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Accounts</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
$manage_event_invoicing
|
||||
$manage_operator_payments
|
||||
$manage_monitor_payments
|
||||
$manage_troubleshoot_monitor_payments
|
||||
$manage_temp_calibrator_payments
|
||||
$manage_logistics_payments_report
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
~;
|
||||
|
||||
}
|
||||
|
||||
if ($events_limit{$username}) {
|
||||
$events_reports = qq~<li class="divider"></li>
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Events Reports</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="$useropts{'folder'}/events-summary-report">Event Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/operators-booking-summary-report">Operators Booking Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/costings-detailed-report">Costings Detailed</a></li>
|
||||
<li><a href="$useropts{'folder'}/costings-summary-report">Costings Summary</a></li>
|
||||
<li><a href="$useropts{'folder'}/events-detailed-report">Events Detailed</a></li>
|
||||
<li><a href="$useropts{'folder'}/operators-summary-report">Operators Report</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
~;
|
||||
}
|
||||
|
||||
|
||||
if ($pixellot_limit{$username} || $usertype eq 'external') {
|
||||
$events_filter = '' ;
|
||||
$reports_event_quotes = '' ;
|
||||
$calendar_menu_top = '' ;
|
||||
$reports_management_report = '' ;
|
||||
$logistics_costs_report = '' ;
|
||||
$events_menu_top = '' if $glod_user_level < 2 ;
|
||||
}
|
||||
|
||||
if ($events_limit{$username}) {
|
||||
$cameras_menu_top = '' ;
|
||||
$manage_operators_menu = qq~<li><a href="$useropts{'folder'}/list-operators">Operators</a></li>~;
|
||||
}
|
||||
|
||||
if ($glod_user_level < 5) {
|
||||
$quotes_menu_top = '' ;
|
||||
}
|
||||
|
||||
$reports_menu_top = qq~<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicons glyphicons-charts"></span>Reports <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
$report_audit_trial
|
||||
$reports_active_camera
|
||||
$reports_stock_report
|
||||
$reports_delivered_report
|
||||
$reports_warranty_report
|
||||
$reports_match_credits
|
||||
$reports_event_quotes
|
||||
$reports_management_report
|
||||
$logistics_costs_report
|
||||
$events_reports
|
||||
$accounts_menu_top
|
||||
$analytics_reports
|
||||
</ul>
|
||||
</li>~;
|
||||
|
||||
$schedule_menu_top = qq~<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicons glyphicons-list-numbered"></span>Allocations <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
$reports_monitor_report
|
||||
$reports_temp_calibration
|
||||
$reports_troubleshoot_monitor_report
|
||||
$reports_site_surveys
|
||||
$reports_set_up_groups
|
||||
$mobile_tracking_system
|
||||
</ul>
|
||||
</li>~;
|
||||
#
|
||||
|
||||
# $calibration_menu_top = qq~<li><a href="$useropts{'folder'}/calibration-report"><i class="glyphicon glyphicon-signal"></i> Calibration</a></li>~ ;
|
||||
|
||||
|
||||
my $pre_sales_and_sales_menu_top = ($glod_user_level >= 5 || $usertype eq 'support') ? qq~
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicons glyphicons-money"></span>Pre-Sales & Sales <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="$useropts{'folder'}/filter-demos">Demos</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
~ : qq~~ ;
|
||||
|
||||
# $calibration_menu_top = qq~<li><a href="$useropts{'folder'}/calibration-report"><i class="glyphicon glyphicon-signal"></i> Calibration</a></li>~ ;
|
||||
|
||||
# # if ($useropts{super}{$username} || $useropts{boss}{$username} || $useropts{it}{$username} || $useropts{tickets}{$username}) {
|
||||
# my $msgtxt = ($activetickets > 1) ? 'messages' : 'message' ;
|
||||
# my $notif = ($activetickets > 0) ? qq~<span class="notification red" style="font-size:11px;">$activetickets</span>~ : '' ;
|
||||
# my $tooltip = ($activetickets > 0) ? qq~data-toggle="tooltip" data-title="$activetickets new $msgtxt" data-placement="left"~ : '' ;
|
||||
# my $top = ($activetickets > 0) ? '10px' : '6px' ;
|
||||
# $tickets_menu_top = qq~<div class="fleft top-block" style="margin:$top 15px 0 0;padding-bottom:2px;" $tooltip>
|
||||
# <a href="/active-tickets">
|
||||
# <i class="glyphicon glyphicon-envelope" style="font-size:18px;"></i>
|
||||
# $notif
|
||||
# </a>
|
||||
# </div>~ ;
|
||||
# # }
|
||||
|
||||
if ($useropts{tickets}{$username} || $usertype eq 'nonquotes') {
|
||||
$search_menu_top = '' ;
|
||||
$quotes_menu_top = '' ;
|
||||
$manage_price_list_menu = '' ;
|
||||
$manage_price_list_menu_top = '' ;
|
||||
}
|
||||
|
||||
# if ($usertype eq 'schools_manager') {
|
||||
if ($glod_user_level < 3) {
|
||||
$home_menu_top = '' ;
|
||||
$search_menu_top = '' ;
|
||||
$quotes_menu_top = '' ;
|
||||
$cameras_menu_top = '' ;
|
||||
$documents_menu_top = '' ;
|
||||
# $calendar_menu_top = '' ;
|
||||
$reports_menu_top = '' ;
|
||||
$schedule_menu_top = '' if $glod_user_level < 2 ;
|
||||
$manage_price_list_menu_top = '' ;
|
||||
# $manage_logistics_report_menu_top = '' ;
|
||||
$quote_search_menu_top = '' ;
|
||||
# unless ($usertype eq 'support') {
|
||||
if (($usertype eq 'schools_manager' || $glod_user_level < 2) && !$is_temp_calibrator) {
|
||||
$calibration_menu_top = '' ;
|
||||
# $fixedsystem_menu_top = '' ;
|
||||
}
|
||||
$events_menu_top = qq~<li><a href="$useropts{'folder'}/list-event-quotes"><i class="glyphicon glyphicon-th"></i> Events</a></li>~;
|
||||
}
|
||||
|
||||
if ($is_operator) {
|
||||
$events_menu_top = '' if $glod_user_level < 2 ;
|
||||
$reports_event_quotes = '' ;
|
||||
$cameras_menu_top = '' ;
|
||||
$reports_menu_top = '' ;
|
||||
# $schedule_menu_top = '' ;
|
||||
$reports_management_report = '' ;
|
||||
$logistics_costs_report = '' ;
|
||||
# $calibration_menu_top = '' ;
|
||||
|
||||
if ($glod_user_level == 3) {
|
||||
$manage_operators_menu = qq~<li><a href="$useropts{'folder'}/list-operators">Operators</a></li>~;
|
||||
$events_menu_top = qq~<li><a href="$useropts{'folder'}/filter-event-quotes"><i class="glyphicon glyphicon-th"></i> Events</a></li>~;
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_installation_partner) {
|
||||
$calendar_menu_top = '' ;
|
||||
$events_menu_top = '' ;
|
||||
}
|
||||
|
||||
if ($is_temp_calibrator) {
|
||||
$fixedsystem_menu_top = '' ;
|
||||
}
|
||||
|
||||
if ($is_dcb_partner) {
|
||||
$events_menu_top = '' ;
|
||||
$calendar_menu_top = '' ;
|
||||
$fixedsystem_menu_top = '' ;
|
||||
}
|
||||
|
||||
my $section_1 = ($manage_camera_systems_menu || $manage_customers_menu || $manage_quote_defaults_menu || $manage_price_list_menu || $rma_list_menu || $manage_leave_menu) ? qq~
|
||||
$manage_camera_systems_menu
|
||||
$manage_customers_menu
|
||||
$manage_quote_defaults_menu
|
||||
$manage_price_list_menu
|
||||
$rma_list_menu
|
||||
$manage_leave_menu
|
||||
<li class="divider"></li>
|
||||
~ : qq~~ ;
|
||||
|
||||
my $users_section = ($manage_users_menu || $manage_analytics_client_menu || $manage_coding_providers_menu || $manage_installation_partners_menu || $manage_operators_menu || $manage_school_managers_menu) ? qq~
|
||||
|
||||
<li class="dropdown-submenu open-left">
|
||||
<a tabindex="-1" href="#">Users</a>
|
||||
<ul class="dropdown-menu">
|
||||
$manage_users_menu
|
||||
$manage_analytics_client_menu
|
||||
$manage_coding_providers_menu
|
||||
$manage_installation_partners_menu
|
||||
$manage_operators_menu
|
||||
$manage_school_managers_menu
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
||||
~ : qq~~ ;
|
||||
|
||||
my $credits_section = ($glod_user_level >= 5) ? qq~
|
||||
|
||||
<li class="dropdown-submenu open-left">
|
||||
<a tabindex="-1" href="#">Credits</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="$useropts{'folder'}/list-allocate-credits">Allocate Credits</a></li>
|
||||
<li><a href="$useropts{'folder'}/list-credits-bought">Credits Bought</a></li>
|
||||
<li><a href="$useropts{'folder'}/list-live-reacon">Live Reacon</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
||||
~ : qq~~ ;
|
||||
|
||||
my $section4 = ($manage_regions || $manage_cities || $manage_organisations || $manage_teams || $manage_sport_types) ? qq~
|
||||
$manage_regions
|
||||
$manage_cities
|
||||
$manage_organisations
|
||||
$manage_teams
|
||||
$manage_sport_types
|
||||
<li class="divider"></li>
|
||||
~ : qq~~ ;
|
||||
|
||||
my $event_specifics = ($username eq 'handre' || $username eq 'rory' || $username eq 'vivian' || $usertype eq 'schools_manager' || $usertype eq 'manager' || $usertype eq 'senior_manager') ? qq~
|
||||
<li class="dropdown-submenu open-left">
|
||||
<a tabindex="-1" href="#">Event Specifics</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="$useropts{'folder'}/list-pocs">POCs</a></li>
|
||||
<li><a href="$useropts{'folder'}/list-recipients">Recipients</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>~ : qq~~ ;
|
||||
|
||||
my $logistics_sub_menu = ($manage_logistics_suppliers || $manage_logistics_items || $manage_logistics_locations) ? qq~
|
||||
|
||||
<li class="dropdown-submenu open-left">
|
||||
<a tabindex="-1" href="#">Logistics</a>
|
||||
<ul class="dropdown-menu">
|
||||
$manage_logistics_suppliers
|
||||
$manage_logistics_items
|
||||
$manage_logistics_locations
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
||||
~ : qq~~ ;
|
||||
|
||||
my $calibration_status_report = ($calibration_menu_top || $usertype eq 'support') ? qq~<li><a href="$useropts{'folder'}/calibration-status-report">Calibration Status Report</a></li>~ : qq~~ ;
|
||||
|
||||
$calibration_menu_top = qq~
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicon glyphicon-signal"></span> Calibration <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="$useropts{'folder'}/calibration-report">Calibration Report</a></li>
|
||||
$calibration_status_report
|
||||
</ul>
|
||||
</li>~ if $calibration_menu_top ;
|
||||
|
||||
$calibration_menu_top = qq~
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><span class="glyphicon glyphicon-signal"></span> Calibration <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
$calibration_status_report
|
||||
</ul>
|
||||
</li>~ if $calibration_status_report && !$calibration_menu_top ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- The styles -->
|
||||
<link href="$useropts{'css'}/bootstrap-itv.min.css?1.0" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/custom-itv.css" rel="stylesheet">
|
||||
$extra_css
|
||||
<link href="$useropts{'css'}/charisma-app.css" rel="stylesheet">
|
||||
<link href="$useropts{'bower_components'}/fullcalendar/dist/fullcalendar.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/fullcalendar/dist/fullcalendar.print.css" rel='stylesheet' media='print'>
|
||||
<link href="$useropts{'bower_components'}/chosen/chosen.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/colorbox/example3/colorbox.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/responsive-tables/responsive-tables.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/bootstrap-tour/build/css/bootstrap-tour.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/jquery.noty.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/noty_theme_default.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.theme.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/jquery.iphone.toggle.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/uploadify.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/animate.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/bootstrap-dialog.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/bootstrap-datetimepicker.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/datepicker.css" rel='stylesheet'>
|
||||
$typeahead_css
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
|
||||
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- The fav icon -->
|
||||
<link rel="shortcut icon" href="$useropts{'img'}/favicon.ico">
|
||||
|
||||
<style>
|
||||
$useropts{'common'}{'css'}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$fullcalendar_events
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body $onload>
|
||||
<!-- topbar starts -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
|
||||
<div class="navbar-inner">
|
||||
<button type="button" class="navbar-toggle pull-left animated flip">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"> <img class="logfav" alt="ITV Logo" src="$useropts{'img'}/50_ITV.png" class="hidden-xs"/>
|
||||
<!-- <span><img class="logotext" alt="ITV Admin Text" src="$useropts{'img'}/headerFinal.png" class="hidden-xs"/></span></a> -->
|
||||
</a>
|
||||
<!-- user dropdown starts -->
|
||||
<div class="btn-group pull-right">
|
||||
$tickets_menu_top
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="glyphicon glyphicon-user"></i><span class="hidden-sm hidden-xs"> admin</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
$section_1
|
||||
$users_section
|
||||
$credits_section
|
||||
$manage_event_systems
|
||||
$section4
|
||||
$logistics_sub_menu
|
||||
$event_specifics
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- user dropdown ends -->
|
||||
|
||||
<ul class="collapse navbar-collapse nav navbar-nav top-menu">
|
||||
$home_menu_top
|
||||
$search_menu_top
|
||||
$quotes_menu_top
|
||||
$events_menu_top
|
||||
$analytics_menu_top
|
||||
$cameras_menu_top
|
||||
$documents_menu_top
|
||||
$calendar_menu_top
|
||||
$reports_menu_top
|
||||
$calibration_menu_top
|
||||
$fixedsystem_menu_top
|
||||
$manage_logistics_report_menu_top
|
||||
$schedule_menu_top
|
||||
$pre_sales_and_sales_menu_top
|
||||
$quote_search_menu_top
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:69px;"></div>
|
||||
<!-- topbar ends -->
|
||||
<div class="ch-container">
|
||||
<div class="row">
|
||||
|
||||
<!-- left menu starts -->
|
||||
<div class="col-sm-2 col-lg-2" id="leftsidebar">
|
||||
<div class="sidebar-nav">
|
||||
<div class="nav-canvas">
|
||||
<div class="nav-sm nav nav-stacked">
|
||||
</div>
|
||||
<ul class="nav nav-pills nav-stacked main-menu">
|
||||
<li class="nav-header"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/span-->
|
||||
<!-- left menu ends -->
|
||||
|
||||
<noscript>
|
||||
<div class="alert alert-block col-md-12">
|
||||
<h4 class="alert-heading">Warning!</h4>
|
||||
|
||||
<p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a>
|
||||
enabled to use this site.</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
ENDOFTEXT
|
||||
#
|
||||
65
libs/html/index.pm
Normal file
65
libs/html/index.pm
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
require header ;
|
||||
|
||||
local $index_menu = qq~<div class="col-md-8">
|
||||
<div class="dash-tray">
|
||||
<a href="$useropts{'folder'}/search-cameras">
|
||||
<div><i class="glyphicons glyphicons-security-camera" title="Cameras" data-toggle="tooltip" data-placement="left"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>~ ;
|
||||
|
||||
if (substr($usertype,0,6) eq 'casual') {
|
||||
$index_menu = qq~<div class="col-md-8">
|
||||
<div class="dash-tray">
|
||||
<a href="$useropts{'folder'}/calendar">
|
||||
<div><i class="glyphicons glyphicons-calendar" title="Calendar" data-toggle="tooltip" data-placement="left"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>~ ;
|
||||
}
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
<div id="content" class="col-lg-12 col-sm-12">
|
||||
<!-- content starts -->
|
||||
$useropts{'breadcrumbs'}
|
||||
|
||||
<div class="row">
|
||||
<div class="box col-md-12">
|
||||
<div class="box-inner">
|
||||
<div class="box-header well" data-original-title="">
|
||||
<h2><i class="glyphicon glyphicon-home"></i> Dashboard</h2>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div class="row"><div class="col-md-12"> </div></div>
|
||||
<div class="row">
|
||||
<div class="col-md-2"> </div>
|
||||
$index_menu
|
||||
<div class="col-md-2"> </div>
|
||||
</div>
|
||||
<div class="row"><div class="col-md-12"> </div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!--/row-->
|
||||
|
||||
<!-- content ends -->
|
||||
</div><!--/#content.col-md-0-->
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
ENDOFTEXT
|
||||
|
||||
require footer ;
|
||||
|
||||
print <<ENDOFTEXT;
|
||||
|
||||
$chart_js
|
||||
|
||||
</body>
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
84
libs/html/login.pm
Normal file
84
libs/html/login.pm
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="$useropts{'css'}/bootstrap-itv.min.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/charisma-app.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/login_screen.css" rel="stylesheet">
|
||||
<link rel="shortcut icon" href="$useropts{'img'}/favicon.ico">
|
||||
<style>
|
||||
body { background-color:#ffffff; color:#222222; }
|
||||
.well { background-color: #e5e4e6; }
|
||||
.input-group-addon { background-color: #c6c1c1; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-container bg-colour"style="overflow:hidden;">
|
||||
<div class="ch-container">
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 center login-header">
|
||||
<img src="$useropts{'img'}/$useropts{logo}" style="height:76px;">
|
||||
</div>
|
||||
<!--/span-->
|
||||
</div><!--/row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="well col-md-5 center login-box">
|
||||
<div id="loginResult" class="alert alert-info" style="margin-bottom:20px;">
|
||||
Please login with your Username and Password.
|
||||
</div>
|
||||
<!-- <form class="form-horizontal" action="index.html" method="post"> -->
|
||||
<form class="form-horizontal" id="loginForm" name="loginForm" method="post" action="" style="margin-top:12px;">
|
||||
<fieldset>
|
||||
<div class="input-group input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-user red"></i></span>
|
||||
<input type="text" name="username" id="username" class="form-control" placeholder="Username">
|
||||
</div>
|
||||
<div class="clearfix"></div><br>
|
||||
|
||||
<div class="input-group input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-lock red"></i></span>
|
||||
<input type="password" name="password" id="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<!-- <div class="input-prepend">
|
||||
<label class="remember" for="remember"><input type="checkbox" id="remember"> Remember me</label>
|
||||
</div> <div class="clearfix"></div> -->
|
||||
|
||||
<p class="center col-md-5">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Login</button>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!--/span-->
|
||||
</div><!--/row-->
|
||||
</div><!--/fluid-row-->
|
||||
|
||||
</div><!--/.fluid-container-->
|
||||
|
||||
<script src="$useropts{'js'}/jquery-1.4.4.min.js"></script>
|
||||
|
||||
<script>
|
||||
try {
|
||||
parent.reloadForLogin();
|
||||
parent.BootstrapDialog.closeAll();
|
||||
}
|
||||
catch(err) { // do nothing
|
||||
}
|
||||
|
||||
var scripts = '$useropts{'scripts'}' ;
|
||||
</script>
|
||||
<script type="text/javascript" src="$useropts{'js'}/login.js?no_cache=1.0"></script>
|
||||
|
||||
<div style="position:absolute;right:10px;bottom:10px;"><a href="https://kre8it.co.za" target="_blank" style="color:#ded6d6;">Built by Kre8IT Programming</a></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/redirect.pm
Normal file
23
libs/html/redirect.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#quotelist').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="listquotes" id="quotelist" method="post" action="/list-event-quotes">
|
||||
<input type="hidden" name="iaction" value="list">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/redirectcalibrator.pm
Normal file
23
libs/html/redirectcalibrator.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#redirect-form').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="redirectform" id="redirect-form" method="post" action="/calibration-report">
|
||||
<input type="hidden" name="iaction" value="">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/redirectfixed.pm
Normal file
23
libs/html/redirectfixed.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#redirect-form').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="redirectform" id="redirect-form" method="post" action="/fixed-systems-report">
|
||||
<input type="hidden" name="iaction" value="">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/redirectlogistics.pm
Normal file
23
libs/html/redirectlogistics.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#redirect-form').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" name="redirectform" id="redirect-form" method="post" action="/logistics-report">
|
||||
<input type="hidden" name="iaction" value="">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
23
libs/html/tickets.pm
Normal file
23
libs/html/tickets.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
print <<ENDOFTEXT;
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{title}</title>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
\$(document).ready(function(){ \$('#activetickets').submit(); })
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<form role="form" id="activetickets" method="post" action="/active-tickets">
|
||||
<input type="hidden" name="iaction" value="active">
|
||||
</form>
|
||||
|
||||
</html>
|
||||
ENDOFTEXT
|
||||
#
|
||||
241
libs/modules/_FromProd/cfg_paths.pm
Normal file
241
libs/modules/_FromProd/cfg_paths.pm
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
sub config_set_vars {
|
||||
|
||||
# $useropts{title} = 'AI Sport Africa Admin | ' . ucfirst $username ;
|
||||
# $title = $useropts{title} ;
|
||||
|
||||
$useropts{acronym} = 'AISA' ;
|
||||
$useropts{short} = 'AI Sport Africa' ;
|
||||
$useropts{title} = "$useropts{short} Admin | " . ucfirst $username ;
|
||||
$title = $useropts{title} ;
|
||||
$useropts{salt} = '1Tv4dM1n' ;
|
||||
$useropts{company} = "$useropts{short} (Pty) Ltd" ;
|
||||
$useropts{lc} = lc $useropts{acronym} ;
|
||||
# $useropts{logo} = 'itv_logo.jpg' ;
|
||||
$useropts{logo} = 'aisa_logo.jpg' ;
|
||||
$useropts{domainpart} = 'itvadmin' ;
|
||||
$useropts{table_id} = 'itv-table' ;
|
||||
$useropts{web} = 'itvadmin.co.za' ;
|
||||
$useropts{address1} = '16 Wessel Road, Unit 3' ;
|
||||
$useropts{address2} = 'Eden Gardens' ;
|
||||
$useropts{address3} = 'Rivonia' ;
|
||||
$useropts{city} = 'Johannesburg' ;
|
||||
$useropts{post_code} = '2128' ;
|
||||
# $useropts{cell} = '+27 83 653 9151' ;
|
||||
$useropts{tel} = '+27 10 534 7011' ;
|
||||
$useropts{vat_nr} = '4280292691' ;
|
||||
$useropts{co_reg} = '2020/535585/07' ;
|
||||
$useropts{email} = 'info@aisport.africa' ;
|
||||
# $useropts{linkcolor} = '#0092dc' ;
|
||||
# $useropts{infocolor} = '#039deb' ;
|
||||
# $useropts{primarycolor} = '#00559b' ;
|
||||
# $useropts{pdfcolor} = '#0098e3' ;
|
||||
|
||||
$useropts{boss}{'vivian'} = 1 ;
|
||||
$useropts{boss}{'shaun'} = 1 ;
|
||||
$useropts{boss}{'rory'} = 1 ;
|
||||
|
||||
$useropts{super}{'rory'} = 1 ;
|
||||
$useropts{super}{'handre'} = 1 ;
|
||||
$useropts{super}{'vivian'} = 1 ;
|
||||
$useropts{super}{'shaun'} = 1 ;
|
||||
|
||||
# $useropts{tickets}{'dom'} = 1 ;
|
||||
# $useropts{tickets}{'erin'} = 1 ;
|
||||
# $useropts{tickets}{'cristy'} = 1 ;
|
||||
|
||||
$useropts{it}{'rory'} = 1 ;
|
||||
$useropts{it}{'handre'} = 1 ;
|
||||
$useropts{it}{'jean'} = 1 ;
|
||||
|
||||
$pixellot_limit{'connor'} = 1 ;
|
||||
|
||||
$events_limit{$username} = 1 if ($usertype eq 'nonquote');
|
||||
|
||||
our $glod_user_level = ($usertype eq 'manager' || $usertype eq 'senior_manager' || $usertype eq 'it') ? 5 : 0 ; # max
|
||||
|
||||
our $is_installation_partner = ($usertype eq 'installation_partner') ? 1 : 0 ;
|
||||
our $is_dcb_partner = ($usertype eq 'dcb_partner') ? 1 : 0 ;
|
||||
our $is_schools_manager = ($usertype eq 'schools_manager') ? 1 : 0 ;
|
||||
our $is_operator = (substr($usertype,0,6) eq 'casual') ? 1 : 0 ;
|
||||
our $is_temp_calibrator = ($usertype eq 'casual_calibrator') ? 1 : 0 ;
|
||||
our $operator_level = ($is_operator && (substr($usertype,-1,1) eq 'a' || substr($usertype,-10,10) eq 'calibrator')) ? 1 : ($is_operator && substr($usertype,-1,1) eq 'b') ? 2 : ($is_operator && substr($usertype,-1,1) eq 'c') ? 3 : 0 ;
|
||||
|
||||
if ($is_operator && $operator_level) {
|
||||
$glod_user_level = $operator_level ;
|
||||
} elsif ($usertype eq 'external' || $usertype eq 'installation_partner' || $usertype eq 'dcb_partner') {
|
||||
$glod_user_level = 1 ;
|
||||
} elsif ($usertype eq 'schools_manager' || $usertype eq 'support') {
|
||||
$glod_user_level = 2 ;
|
||||
# } elsif ($events_limit{$username} || $usertype eq 'permanent' || $username eq 'cristy' || $username eq 'dom') {
|
||||
} elsif ($events_limit{$username} || $usertype eq 'permanent') {
|
||||
$glod_user_level = 4 ;
|
||||
}
|
||||
|
||||
our $smtp_server = 'smtp.interactivetvafrica.com';
|
||||
$email_add{'tickets'} = 'tickets@interactivetvafrica.com' ;
|
||||
our $send_mail_psw = 'vf1VBE6AGuPE' ;
|
||||
$email_add{'events'} = 'events@interactivetvafrica.com' ;
|
||||
our $send_mail_psw_events = 'ickxadYgbZ)X' ;
|
||||
our $email_reply_to = 'marizen@aisport.africa' ;
|
||||
our %email_events = () ;
|
||||
$email_events{1} = 'marizen@aisport.africa' ;
|
||||
$email_events{2} = 'cristy@aisport.africa' ;
|
||||
$email_events{3} = 'dom@aisport.africa' ;
|
||||
$email_events{4} = 'erin@aisport.africa' ;
|
||||
$email_events{5} = 'techsupport@aisport.africa' ;
|
||||
$email_events{6} = 'dan@aisport.africa' ;
|
||||
$email_events{7} = 'mitheel@aisport.africa' ;
|
||||
$email_events{8} = 'mikhaar@aisport.africa' ;
|
||||
$email_events{9} = 'daniel@aisport.africa' ;
|
||||
$email_events{10} = 'events@kre8it.co.za' ;
|
||||
our $email_it_1 = 'rory@kre8it.co.za' ;
|
||||
our $email_it_2 = 'handre@kre8it.co.za' ;
|
||||
our $email_accounts = 'viv@aisport.africa' ;
|
||||
|
||||
our $afrihost_smtp = 'mail.aisport.africa';
|
||||
our $afrihost_psw = 'Events@2025' ;
|
||||
our $afrihost_port = 465 ;
|
||||
our $afrihost_from = 'events@aisport.africa' ;
|
||||
|
||||
our $gmail_smtp = 'smtp.googlemail.com';
|
||||
our $gmail_psw = 'AISA@Events1+' ;
|
||||
our $gmail_port = 465 ;
|
||||
our $gmail_from = 'aisportafrica@gmail.com' ;
|
||||
|
||||
our ($subdomain,$domain,$ext) = split(/\./,$ENV{SERVER_NAME}) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_set_paths {
|
||||
|
||||
$cgipath = "/home/libs" ;
|
||||
$htmlpath = "/var/www/html" ;
|
||||
$htmlpath_sss = "/var/www/sssadmin.co.za/public_html" ;
|
||||
|
||||
$useropts{'scripts'} = '/cgi-bin/scripts';
|
||||
$useropts{'folder'} = '';
|
||||
|
||||
$useropts{'js'} = '/js' ;
|
||||
$useropts{'css'} = '/css' ;
|
||||
$useropts{'img'} = '/img' ;
|
||||
$useropts{'fonts'} = '/fonts' ;
|
||||
$useropts{'bower_components'} = '/bower_components' ;
|
||||
$useropts{'mail'} = '/mail' ;
|
||||
|
||||
$mailpath = "$cgipath/data/mail" ;
|
||||
|
||||
our $mysqlbakpath = "/home/mysqlbak";
|
||||
|
||||
our $pdfpath = $htmlpath . '/pdf' ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_common_html {
|
||||
|
||||
# .controls .form-control { height:24px; } .chosen-container { position:relative;max-width:100%; }
|
||||
|
||||
# ---------------- spacelab --------------------------------------------------------------------------
|
||||
|
||||
# $useropts{'common'}{'css'} = qq(tbody tr td { font-size: 11px; }
|
||||
# .control-label { font-size:12px; } .controls .form-control { height:24px;font-size:12px; } .controls span.input-group-addon { padding:0px 5px 0px 5px;font-size:12px; } textarea.form-control { font-size:12px; } .chosen-container { position:relative;max-width:100%; } .controls table { font-size:12px; }
|
||||
# .waybill-dialog .modal-dialog { width: 94%; }
|
||||
# .medium-dialog .modal-dialog { width: 76%; }
|
||||
# .table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#EAEAEA}
|
||||
# label { margin-top:5px; }
|
||||
# form-control{ padding:8px 12px; }
|
||||
# ) ;
|
||||
|
||||
# ---------------- darkly ----------------------------------------------------------------------------
|
||||
|
||||
$useropts{'common'}{'css'} = qq~tbody tr td { font-size: 11px; }
|
||||
.control-label { font-size:12px; } .controls .form-control { height:24px;font-size:12px; } .controls span.input-group-addon { padding:0px 5px 0px 5px;font-size:12px; } textarea.form-control { font-size:12px; } .chosen-container { position:relative;max-width:100%; }
|
||||
.controls table { font-size:12px; }
|
||||
.label { font-size:12px; }
|
||||
.fc-event { font-size:12px; }
|
||||
.form-control, input, textarea { border: 1px solid #AAAAAA; }
|
||||
.max-dialog .modal-dialog { width: 99%; }
|
||||
.waybill-dialog .modal-dialog { width: 94%; }
|
||||
.medium-dialog .modal-dialog { width: 76%; }
|
||||
.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#EAEAEA; color:#222222; }
|
||||
.table-striped>tbody>tr:nth-child(even)>td,.table-striped>tbody>tr:nth-child(even)>th{ background-color:#a4a2a2; color:#ffffff; }
|
||||
.table-striped>tbody>tr:nth-child(odd)>td a:not(.btn) { text-decoration: none; color: #708399; font-weight: bold; }
|
||||
.table-striped>tbody>tr:nth-child(even)>td a:not(.btn) { text-decoration: none; color: #708399; }
|
||||
.chosen-container, .help-block { color:#222222; }
|
||||
label { margin-top:5px; }
|
||||
form-control{ padding:8px 12px; }
|
||||
.box-header { background: #5e5e5e ; }
|
||||
.modal-body, .modal-footer { background-color: #ffffff ; border-top: 1px solid #ffffff; }
|
||||
.modal-header { border-bottom: 1px solid #ffffff; }
|
||||
.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}
|
||||
hr { border-top: 2px solid #5E5E5E; }
|
||||
body { background-color:#ffffff; color:#222222; }
|
||||
.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}
|
||||
.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}
|
||||
.ffinline { display:inline-block; }
|
||||
.form-control { height:12px;padding:2px 8px;font-size:12px; }
|
||||
.search-query { height: 35px; padding: 10px 15px; font-size: 13px; width: 75%; margin-top: 4px; }
|
||||
.alert-info a { color:#80BEE8 ;}
|
||||
.alert-info a:hover { color:#ffffff;text-decoration:none;}
|
||||
th.dt-center, td.dt-center { text-align: center; }
|
||||
th.dt-right, td.dt-right { text-align: right; }
|
||||
#atalist .form-control,#spinvlist .form-control,#clientvatlist .form-control,#clientinvlist .form-control,#storagelist .form-control { height:25px;padding:2px 5px;font-size:12px;color:#464545; }
|
||||
.saccidate { width: 120px; }
|
||||
.tooltip {white-space:normal}
|
||||
~ ;
|
||||
|
||||
# $useropts{'common'}{'css'} .= qq~
|
||||
# .buttons .glyphicons:before { padding: 0px; }
|
||||
# ~;
|
||||
|
||||
# .search-query { height:43px;padding:10px 15px;font-size:14px;width:70%; }
|
||||
|
||||
my $menu_list_leave = qq(<li><a href="$useropts{'folder'}/list-leave">List Leave</a></li>);
|
||||
my $menu_leave_settings = qq(<li><a href="$useropts{'folder'}/list-leave-settings">Leave Settings</a></li>);
|
||||
my $menu_leave_report = qq(<li><a href="$useropts{'folder'}/leave-report">Leave Report</a></li>);
|
||||
our $menu_leave = '' ;
|
||||
|
||||
my $menu_list_weekend = qq(<li><a href="$useropts{'folder'}/list-weekend">Weekend Work</a></li>);
|
||||
my $menu_weekend_report = qq(<li><a href="$useropts{'folder'}/weekend-report">Weekend Report</a></li>);
|
||||
our $menu_weekend = '' ;
|
||||
|
||||
# if ($useropts{super}{lc $username}){
|
||||
if ($useropts{boss}{lc $username}){
|
||||
$menu_leave = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_leave
|
||||
$menu_leave_settings
|
||||
$menu_leave_report
|
||||
);
|
||||
$menu_weekend = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_weekend
|
||||
$menu_weekend_report
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu_leave = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_leave_report
|
||||
);
|
||||
$menu_weekend = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_weekend
|
||||
);
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_set_breadcrumbs {
|
||||
|
||||
our $curr_crumb = $ENV{REQUEST_URI} ;
|
||||
$curr_crumb =~ s/\///g ;
|
||||
@curr_crumb = split(/\-/,$curr_crumb) ;
|
||||
@curr_crumb_ucf = map(ucfirst, map(lc,@curr_crumb));
|
||||
$curr_crumb = join(' ', @curr_crumb_ucf);
|
||||
|
||||
$useropts{'breadcrumbs'} = qq(<div><ul class="breadcrumb"><li><a href="$useropts{'folder'}/">Home</a></li>$insert_crumbs<li><a href="$useropts{'folder'}$ENV{REQUEST_URI}">$curr_crumb</a></li></ul></div>) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
84
libs/modules/_FromProd/db.pm
Normal file
84
libs/modules/_FromProd/db.pm
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
use db_min ;
|
||||
|
||||
sub db_open_ro {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
my ($db,$dbhost,$dbuser,$dbpass) = &ops_db_credentials($sys) ;
|
||||
|
||||
my $connstr = "DBI:mysql:database=$db;host=$dbhost;" ;
|
||||
|
||||
$dbh = DBI->connect($connstr,$dbuser,$dbpass) or die $DBI::errstr;
|
||||
|
||||
&common_debug("db_open_ro:$connstr") ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_open_upd {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
my ($db,$dbhost,$dbuser,$dbpass) = &ops_db_credentials($sys) ;
|
||||
|
||||
my $connstr = "DBI:mysql:database=$db;host=$dbhost;" ;
|
||||
|
||||
$dbh = DBI->connect($connstr,$dbuser,$dbpass, { RaiseError => 1, AutoCommit => 1 } ) or die "Unable to connect, $DBI::errstr";
|
||||
$dbh->{LongReadLen} = 1000 ;
|
||||
|
||||
&common_debug("db_open_upd:$connstr") ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_close_conn {
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
$dbh->disconnect();
|
||||
|
||||
&common_debug('db_close_conn:$dbh->disconnect();') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_switch_conn {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
$db_ignore_open_close = 0 ;
|
||||
&db_close_conn ;
|
||||
&db_open_upd($sys) ;
|
||||
$db_ignore_open_close = 1 ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub ops_db_credentials {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
my $db = "itv_admin_db";
|
||||
my $dbhost = "localhost";
|
||||
my $dbuser = "itv_admin_user";
|
||||
my $dbpass = '!Ja16Q7P0X3SVTWr';
|
||||
|
||||
if ($sys eq 'sss') {
|
||||
$db = "sss_admin_db";
|
||||
$dbhost = "localhost";
|
||||
$dbuser = "sss_admin_user";
|
||||
$dbpass = 'bVrC2kyGJ8ZO0oVe!';
|
||||
}
|
||||
|
||||
return ($db,$dbhost,$dbuser,$dbpass) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_uniq {
|
||||
|
||||
my %seen;
|
||||
grep !$seen{$_}++, @_;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
2029
libs/modules/analytics_event_booking_tabs.pm
Normal file
2029
libs/modules/analytics_event_booking_tabs.pm
Normal file
File diff suppressed because it is too large
Load Diff
2082
libs/modules/analytics_event_booking_tabs_test.pm
Normal file
2082
libs/modules/analytics_event_booking_tabs_test.pm
Normal file
File diff suppressed because it is too large
Load Diff
797
libs/modules/calibration.pm
Normal file
797
libs/modules/calibration.pm
Normal file
|
|
@ -0,0 +1,797 @@
|
|||
sub calibration_load_list_vars {
|
||||
|
||||
my ($where) = @_ ;
|
||||
|
||||
our %quote_status = () ;
|
||||
|
||||
our %calibrator_users = () ;
|
||||
|
||||
# &db_min_ro('users','id,name,user_type',"",'','') ;
|
||||
# &db_min_ro('users','id,name,user_type,username',"(user_type = 'support' OR user_type = 'manager' OR user_type = 'casual_calibrator') AND name NOT LIKE 'Rory%'",'','') ;
|
||||
&db_min_ro('regions','*','','','') ;
|
||||
|
||||
&db_min_ro('users','id,name,user_type,username,region_ids',"name NOT LIKE 'Rory%' AND name NOT LIKE 'Handre%'",'','') ;
|
||||
$opts{calibrator} .= qq~<option value="none">>>>None<<<</option>~ ;
|
||||
$opts{head_operator} .= qq~<option value="none">>>>None<<<</option>~ ;
|
||||
foreach my $_uid (sort {$db{users}{$a}{name} cmp $db{users}{$b}{name}} keys %{$db{users}}) {
|
||||
next if $useropts{it}{$db{users}{$_uid}{username}} ;
|
||||
next if $db{users}{$_uid}{username} =~ m/test/i ;
|
||||
next if $db{users}{$_uid}{username} =~ m/handre/i ;
|
||||
|
||||
my $regions = join(",",map{"$db{regions}{$_}{code}"} split(/\,/,$db{users}{$_uid}{region_ids})) ;
|
||||
|
||||
$regions = "[" . $regions . "]" if $regions ;
|
||||
|
||||
# if ($db{users}{$_uid}{user_type} eq 'support' || $db{users}{$_uid}{user_type} eq 'manager' || $db{users}{$_uid}{user_type} eq 'casual_calibrator' || $monitoring_report) {
|
||||
if ($db{users}{$_uid}{user_type} eq 'support' || $db{users}{$_uid}{user_type} eq 'manager' || $db{users}{$_uid}{user_type} eq 'casual_calibrator') {
|
||||
$calibrator_users{$_uid} = $db{users}{$_uid}{name} ;
|
||||
$opts{calibrator} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ if lc $db{users}{$_uid}{username} eq lc $db{users}{$_uid}{name} ;
|
||||
$opts{calibrator} .= qq~<option value="$_uid">$db{users}{$_uid}{name} [$db{users}{$_uid}{username}]</option>~ if lc $db{users}{$_uid}{username} ne lc $db{users}{$_uid}{name} ;
|
||||
# $opts{calibrator} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ if !$regions ;
|
||||
}
|
||||
if ($db{users}{$_uid}{user_type} eq 'casual_c' || ($db{users}{$_uid}{user_type} eq 'casual_b' && $lcpage eq 'set-up-groups-report')) {
|
||||
$opts{head_operator} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ if lc $db{users}{$_uid}{username} eq lc $db{users}{$_uid}{name} ;
|
||||
$opts{head_operator} .= qq~<option value="$_uid">$db{users}{$_uid}{name} [$db{users}{$_uid}{username}]</option>~ if lc $db{users}{$_uid}{username} ne lc $db{users}{$_uid}{name} ;
|
||||
# $opts{head_operator} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ if !$regions ;
|
||||
}
|
||||
}
|
||||
|
||||
# my $event_systems_sql_where = ($monitoring_report) ? "" : "system_type = 'mobile'" ;
|
||||
|
||||
&db_min_ro('event_systems','*',"system_type = 'mobile' OR system_type = 'solo'",'','') if $set_up_groups;
|
||||
&db_min_ro('event_systems','*',"system_type = 'mobile'",'','') if !$set_up_groups;
|
||||
|
||||
my @event_quote_ids = () ;
|
||||
|
||||
# &db_min_ro($table,"id,ref,organisation_ids,quote_accepted,event_system_id_multiple,region_id,sport_type_ids,operator_ids,date_from,date_to,if(date_from < '$now_year-$now_mm-$now_dd 00:00:00',0,1) AS 'after_start_date',event_system_calibration_ids,event_system_calibration_status","$where AND `quote_accepted` = '1'",'','') ;
|
||||
&db_min_ro($table,"id,ref,organisation_ids,quote_accepted,event_system_id_multiple,region_id,sport_type_ids,operator_ids,date_from,date_to,event_system_calibration_ids,event_system_calibration_status,event_system_head_operator_ids,times_from,times_to,daily_operator_ids,days_active,monitor_ids,temp_calibrator_ids,set_up_groups_status_ids,set_up_groups_head_operator_ids","$where AND `quote_accepted` = '1'",'','') ;
|
||||
|
||||
unless ($set_up_group) {
|
||||
|
||||
my $calibration_status_report_where = join(" OR ", map { "event_quote_id='$_'" } grep { $_ } keys %{$db{$table}});
|
||||
&db_min_ro('calibration_status_report','event_quote_id,request_sent',$calibration_status_report_where,'','') ;
|
||||
|
||||
}
|
||||
|
||||
# calibration_status_report
|
||||
|
||||
my $min_id = 0 ; my $max_id = 0 ; my @all_event_ids = () ;
|
||||
|
||||
our %event_system_calibration_ids = () ; our %event_system_calibration_status = () ; our %event_system_head_operator_id = () ; our %default_vaules = () ; our %event_system_request_sent = () ;
|
||||
|
||||
foreach my $id (keys %{$db{$table}}) {
|
||||
|
||||
# &common_debug(">>>>>>>>> 1. [$id] $db{$table}{$id}{ref}") ;
|
||||
|
||||
next unless $id ; my $cnt = 0 ;
|
||||
|
||||
push @all_event_ids,"`id` = '$id'" ;
|
||||
|
||||
my @ed_from = &common_split_sql_time($db{$table}{$id}{date_from}) ;
|
||||
my @ed_to = &common_split_sql_time($db{$table}{$id}{date_to}) ;
|
||||
|
||||
&common_date_array("$ed_from[0]$ed_from[1]$ed_from[2]","$ed_to[0]$ed_to[1]$ed_to[2]") ;
|
||||
|
||||
# $sort_calibration_by_time_ref{"$ed_from[0]$ed_from[1]$ed_from[2]$ed_from[3]$ed_from[4]-$db{$table}{$id}{ref}"} = $id ;
|
||||
$sort_calibration_by_time_ref{"$ed_from[0]$ed_from[1]$ed_from[2]$ed_from[3]$ed_from[4]-$id"} = $id ;
|
||||
|
||||
# my @event_sys_calibration_status = split(";",$db{$table}{$id}{event_system_calibration_status}) ;
|
||||
my @event_sys_calibration_status = ($set_up_groups) ? split(/\;/,$db{$table}{$id}{set_up_groups_status_ids}) : split(/\;/,$db{$table}{$id}{event_system_calibration_status}) ;
|
||||
my @event_system_ids = split(/\;/,$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
my @calibration_ids = split(/\;/,$db{$table}{$id}{event_system_calibration_ids}) ;
|
||||
my @head_operator_ids = ($set_up_groups) ? split(/\;/,$db{$table}{$id}{set_up_groups_head_operator_ids}) : split(/\;/,$db{$table}{$id}{event_system_head_operator_ids}) ;
|
||||
my @request_sent = ($set_up_groups) ? () : split(/\|/,$db{calibration_status_report}{$id}{request_sent}) ;
|
||||
|
||||
my $evntday = 0 ; my $evntsys = 0 ; my $system_id = 0 ;
|
||||
|
||||
foreach my $_cid (@calibration_ids) {
|
||||
|
||||
if ($_cid =~ /~/) {
|
||||
($system_id,$_cid) = split(/\~/,$_cid) ;
|
||||
} else {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
}
|
||||
$evntsys++ ;
|
||||
|
||||
next unless $system_id ;
|
||||
|
||||
next unless $db{event_systems}{$system_id}{system_type} ;
|
||||
|
||||
my (@calibrator_ids_per_event_day) = split(/\-/,$_cid);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cid_pd (@calibrator_ids_per_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cid_pd ;
|
||||
$event_system_calibration_ids{$id}{$system_id}{$evntday} = $_cid_pd ;
|
||||
$default_vaules{calibrator}{$id}{$system_id}{$evntday} = $_cid_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_ids{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
foreach my $_cstatus (@event_sys_calibration_status) {
|
||||
|
||||
if ($_cstatus =~ /~/) {
|
||||
($system_id,$_cstatus) = split(/\~/,$_cstatus) ;
|
||||
} else {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
}
|
||||
$evntsys++;
|
||||
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} ;
|
||||
|
||||
my (@calibrator_status_per_event_day) = split(/\-/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@calibrator_status_per_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$event_system_calibration_status{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
$default_vaules{status}{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
foreach my $_cstatus (@head_operator_ids) {
|
||||
|
||||
if ($_cstatus =~ /~/) {
|
||||
($system_id,$_cstatus) = split(/\~/,$_cstatus) ;
|
||||
} else {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
}
|
||||
$evntsys++ ;
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} ;
|
||||
|
||||
my (@head_operator_id_event_day) = split(/\-/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@head_operator_id_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$event_system_head_operator_id{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
$default_vaules{head_operator}{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
foreach my $data_per_system (@request_sent) {
|
||||
|
||||
($system_id,$data_per_system) = split(/\~/,$data_per_system) ;
|
||||
next unless $system_id ;
|
||||
|
||||
next unless $db{event_systems}{$system_id}{system_type} ;
|
||||
|
||||
my @request_sent_event_day = split(/\;/,$data_per_system) ;
|
||||
$evntday = 0 ;
|
||||
foreach my $_cstatus_pd (@request_sent_event_day) {
|
||||
$evntday++ ;
|
||||
next unless $_cstatus_pd ;
|
||||
$event_system_request_sent{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
$default_vaules{request_sent}{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# &db_min_ro('event_systems','*',"system_type = 'mobile'",'','') ;
|
||||
|
||||
# &calibration_check_for_overlapping_dates('event_systems',"event_system_id_multiple") ;
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
$min_id = $id if not $min_id or $min_id > $id ;
|
||||
$max_id = $id if $max_id < $id ;
|
||||
}
|
||||
|
||||
my $id_sql = qq~(`id` <= '$max_id' AND `id` >= '$min_id')~ ;
|
||||
# $id_sql = qq~ AND $id_sql~ if $where_2 or $where_3 ;
|
||||
|
||||
|
||||
# my $id_sql = join (" OR " ,@all_event_ids) ;
|
||||
|
||||
# &db_min_ro('event_quotes_min','*',"$where_2$where_3$id_sql",'','') ;
|
||||
# &db_min_ro('event_quotes_min','*',"$id_sql",'','') ;
|
||||
# &db_min_ro('event_cost_items','id,name','','','') ;
|
||||
&db_min_ro('event_cost_items','id,name',"excl_from_expenses < 1",'','') ;
|
||||
&db_min_ro('calibration_status',"id,status",'','','') unless $calibration_status ;
|
||||
|
||||
foreach (sort {$db{calibration_status}{$a}{status} cmp $db{calibration_status}{$b}{status}} keys %{$db{calibration_status}}) {
|
||||
$db{calibration_status}{$_}{name} = $db{calibration_status}{$_}{status} ;
|
||||
$opts{status} .= qq~<option value="$_">$db{calibration_status}{$_}{status}</option>~ ;
|
||||
}
|
||||
|
||||
&db_min_ro('sport_types','id,name','','','') ;
|
||||
&db_min_ro('organisations','id,name','','','') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_build_table_and_or_excel {
|
||||
|
||||
my ($report) = @_ ;
|
||||
|
||||
# our @sql_col_display = ($monitoring_report) ? ("event_nr","event","date","day","start_date","start_time","end_time","venue","region","type","system","sport","operator") : ($temp_calibrator_report) ? ("count","event","date","day","start_date","start_time","end_time","venue","region","type","system","sport","operator","shift_1_(07:00-10:00)","shift_2_(10:00-13:00)","shift_3_(13:00-16:00)","shift_4_(16:00-19:00)") : ("count","event","calibration_date","day","start_date","start_time","venue","region","system","sport","operator","head_operator","calibrator","status","update") ;
|
||||
# our @sql_col_display = ("count","event","calibration_date","day","start_date","start_time","venue","region","system","sport","operator","head_operator","calibrator","status","update") ;
|
||||
|
||||
our @sql_col_display = ("count","event","calib_date","day","start_date","start_time","venue","region","system","sport","operator","head_operator","request_sent","calibrator","status","frames") ;
|
||||
|
||||
@sql_col_display = grep { $_ ne "calibrator" } @sql_col_display if $set_up_groups ;
|
||||
@sql_col_display = grep { $_ ne "request_sent" } @sql_col_display if $set_up_groups ;
|
||||
@sql_col_display = grep { $_ ne "frames" } @sql_col_display if $set_up_groups ;
|
||||
@sql_col_display = grep { $_ ne "head_operator" } @sql_col_display if $calibration_report ;
|
||||
|
||||
$custom_column_styles{calibrator} = qq~style="min-width:150px;"~ ;
|
||||
$custom_column_styles{head_operator} = qq~style="min-width:150px;"~ ;
|
||||
$custom_column_styles{status} = qq~style="min-width:150px;"~ ;
|
||||
|
||||
&report_xlsx_export_header("$xlsxreportname",$xlsxdir,'',$xlsx_title_heading) ;
|
||||
|
||||
push @sql_col_display,"update" ;
|
||||
|
||||
my $nr_of_cols = scalar @sql_col_display ;
|
||||
|
||||
my @rev_sql_col_display = reverse @sql_col_display ;
|
||||
|
||||
foreach (@rev_sql_col_display) { $lastchild++ ; $last_child{$_} = $lastchild ; } # &common_debug("last-child : $_ [$last_child{$_}]");
|
||||
|
||||
$xlsxrow-- ;
|
||||
|
||||
my $cali_cnt = 0 ; my $found_editable = 0 ; my @all_select_ids = () ;
|
||||
|
||||
$format84 -> set_align("center") ;
|
||||
|
||||
my $found_editable_status = 0 ;
|
||||
|
||||
our $max_frame_width = 0 ;
|
||||
|
||||
my %default_val_id = () ;
|
||||
|
||||
# foreach my $id (sort {$db{$table}{$a}{date_from} cmp $db{$table}{$b}{date_from}} keys %{$db{$table}}) {
|
||||
foreach my $date_ref (sort {$sort_calibration_by_time_ref{$b} <=> $sort_calibration_by_time_ref{$a}} keys %sort_calibration_by_time_ref) {
|
||||
|
||||
my $id = $sort_calibration_by_time_ref{$date_ref} ;
|
||||
|
||||
next unless $id ;
|
||||
|
||||
my $system_count = 0 ; my $system_day_cnt = 0 ;
|
||||
|
||||
my %system_has_daily_op = () ; my %default_op_ids = () ;
|
||||
|
||||
foreach my $system_row (split(/\|/,$db{$table}{$id}{daily_operator_ids})) {
|
||||
$system_count++ ;
|
||||
next unless $system_row ;
|
||||
$system_day_cnt = 0 ;
|
||||
foreach my $col (split(/\;/,$system_row)) {
|
||||
$system_day_cnt++ ;
|
||||
next unless $col ;
|
||||
$default_op_ids{$system_count}{$system_day_cnt} = $col if $col ;
|
||||
$system_has_daily_op{$system_count} = 1 if $col ;
|
||||
}
|
||||
}
|
||||
$system_count = 0 ;
|
||||
|
||||
unless (&common_check_if_string_contains_an_integer($db{$table}{$id}{event_system_id_multiple})) {
|
||||
$db{$table}{$id}{event_system_id_multiple} = ";none;" ;
|
||||
}
|
||||
|
||||
my @system_name_ids = split(/\;/,$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
my @club_ids = split(/\;/,$db{$table}{$id}{club_ids}) ;
|
||||
my @op_ids = ($db{$table}{$id}{operator_ids} =~ /,/) ? split(/\,/,$db{$table}{$id}{operator_ids}) : ($db{$table}{$id}{operator_ids} =~ /;/) ? split(/\;/,$db{$table}{$id}{operator_ids}) : $db{$table}{$id}{operator_ids} ;
|
||||
my @start_times = split(/\;/,";".$db{$table}{$id}{times_from}) ;
|
||||
my @end_times = split(/\;/,$db{$table}{$id}{times_to}.";") ;
|
||||
my @days_active = split(/\;/,$db{$table}{$id}{days_active}) ;
|
||||
|
||||
my $cnt_rows = 0 ;
|
||||
for (1 .. 50) {
|
||||
$cnt_rows = $_ if $system_name_ids[$_ - 1] or $club_ids[$_ - 1] ;
|
||||
}
|
||||
|
||||
$system_count = 0 ;
|
||||
|
||||
$colname_to_id{head_operator} = "head_operator" ;
|
||||
$colname_to_id{calibrator} = "calibrator_id" ;
|
||||
$colname_to_id{status} = "calibration_status" ;
|
||||
$colname_to_id{request_sent} = "request_sent" ;
|
||||
|
||||
$preferred_title{head_operator} = "Head Operator" ;
|
||||
$preferred_title{calibrator} = "Calibrator" ;
|
||||
$preferred_title{status} = "Calibration Status" ;
|
||||
|
||||
$default_val_table{head_operator} = 'users' ;
|
||||
$default_val_table{calibrator} = 'users' ;
|
||||
$default_val_table{status} = 'calibration_status' ;
|
||||
# $default_val_table{request_sent} = 'calibration_status_report' ;
|
||||
|
||||
&calibration_get_status_frames($id) ;
|
||||
|
||||
foreach my $event_sys_id (@system_name_ids) {
|
||||
|
||||
$system_count++ ;
|
||||
|
||||
next unless $event_sys_id ;
|
||||
|
||||
next unless $db{event_systems}{$event_sys_id}{system_type} ;
|
||||
|
||||
$system_day_cnt = 0 ;
|
||||
|
||||
foreach my $cal_date (sort keys %day_of_week) {
|
||||
|
||||
my $srch_date_from_comp = $i{date_from} ; $srch_date_from_comp =~ s/\-//g ;
|
||||
my $srch_date_to_comp = $i{date_to} ; $srch_date_to_comp =~ s/\-//g ;
|
||||
my $date_from_comp = substr($db{$table}{$id}{date_from},0,10) ; $date_from_comp =~ s/\-//g ;
|
||||
my $date_to_comp = substr($db{$table}{$id}{date_to},0,10) ; $date_to_comp =~ s/\-//g ;
|
||||
my $cal_date_comp = $cal_date ; # $cal_date_comp =~ s/\-//g ;
|
||||
$cal_date = substr($cal_date,0,4) . '-' . substr($cal_date,4,2) . '-' . substr($cal_date,6,2) ;
|
||||
my $date_from = substr($db{$table}{$id}{date_from},0,10) ;
|
||||
$system_day_cnt++ ;
|
||||
|
||||
next if $cal_date_comp < $date_from_comp ;
|
||||
|
||||
next if $cal_date_comp > $date_to_comp ;
|
||||
|
||||
$cnt{$event_sys_id}{$id}++ ;
|
||||
|
||||
next if $db{$table}{$id}{days_active} && !$days_active[$cnt{$event_sys_id}{$id}-1] ;
|
||||
|
||||
next if $cal_date_comp > $srch_date_to_comp ;
|
||||
|
||||
next if $cal_date_comp < $srch_date_from_comp ;
|
||||
|
||||
next if $i{calibration_status} && $i{calibration_status} ne 'all' && $i{calibration_status} ne $default_vaules{status}{$id}{$event_sys_id}{$cnt{$event_sys_id}{$id}} ;
|
||||
|
||||
$cali_cnt++;
|
||||
|
||||
$xlsxcol = 0 ;
|
||||
$print_tbody .= qq~<tr id="$id$dow">~ if $report ;
|
||||
|
||||
my $nr_of_cols_cnt = $nr_of_cols + 1 ;
|
||||
|
||||
our $default_javascript = qq~~ ;
|
||||
|
||||
my $contains_select = 0 ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
|
||||
$nr_of_cols_cnt-- ;
|
||||
|
||||
next unless $_ ; # blank for the buttons column
|
||||
|
||||
my $formatting = $format84 ;
|
||||
my $val = $db{$table}{$id}{$_} ;
|
||||
our $val_min = $val ;
|
||||
my $align = qq~ class="dt-center"~ ;
|
||||
my $nowrap = '' ;
|
||||
|
||||
my $sys_day_cnt = $cnt{$event_sys_id}{$id} ;
|
||||
|
||||
my $field = "" ; my $default_val = $default_vaules{$_}{$id}{$event_sys_id}{$sys_day_cnt} ; my $only_display_val = 0 ; my $background_color ="#424949" ; my $default_val_is_saved = ($default_val) ? 1 : 0 ;
|
||||
|
||||
if ($_ eq 'head_operator' || $_ eq 'calibrator' || $_ eq 'status' || $_ eq 'request_sent') {
|
||||
|
||||
$val_min = '' ;
|
||||
|
||||
$formatting = $format91 ;
|
||||
|
||||
if ($report) {
|
||||
|
||||
$field = "$colname_to_id{$_}\_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
|
||||
if (($cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "-1") || (!$default_val)) {
|
||||
$preferred_title{$field} = $preferred_title{$_} ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
# $useropts{'common'}{'css'} .= qq~.$_ { min-width:180px; } ~ ; ????
|
||||
$val_min = $db{$default_val_table{$_}}{$default_val}{name} if $default_val_table{$_} ;
|
||||
if ($_ eq 'status') {
|
||||
if ($default_val) {
|
||||
if ($default_val eq '1') { #calibrating
|
||||
$background_color = "#FFA500" ;
|
||||
$formatting = $format89 ;
|
||||
} elsif ($default_val eq '2') { #cancelled
|
||||
$background_color = "#AD0502" ;
|
||||
$formatting = $format90 ;
|
||||
} elsif ($default_val eq '3') { #done
|
||||
$background_color = "#2ECC71" ;
|
||||
$formatting = $format88 ;
|
||||
} elsif ($default_val eq '4') {
|
||||
$background_color = "#424949" ;
|
||||
}
|
||||
} else {
|
||||
$default_val = 4 ;
|
||||
}
|
||||
}
|
||||
$found_editable = 1 ;
|
||||
$contains_select = 1 ;
|
||||
} else {
|
||||
$default_val_id{$_}{$db{$default_val_table{$_}}{$default_val}{name}} = $default_val if $default_val_table{$_} ;
|
||||
$default_val = $db{$default_val_table{$_}}{$default_val}{name} if $default_val_table{$_} ;
|
||||
$default_val = "None" if $default_val eq 'none' ;
|
||||
$only_display_val = 1 ;
|
||||
}
|
||||
} else {
|
||||
$default_val_id{$_}{$db{$default_val_table{$_}}{$default_val}{name}} = $default_val if $default_val_table{$_} ;
|
||||
$default_val = $db{$default_val_table{$_}}{$default_val}{name} if $default_val_table{$_} ;
|
||||
$default_val = "None" if $default_val eq 'none' ;
|
||||
$only_display_val = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_ eq 'count') {
|
||||
$val = $cali_cnt ;
|
||||
} elsif ($_ eq 'event') {
|
||||
$val = "$db{$table}{$id}{ref} [$id]" ;
|
||||
} elsif ($_ eq 'calib_date' || $_ eq 'date') {
|
||||
# $val = "$cal_date [$day_of_week{$cal_date}]" ;
|
||||
$val = "$cal_date" ;
|
||||
$nowrap = "nowrap" ;
|
||||
} elsif ($_ eq 'day') {
|
||||
$val = "$sys_day_cnt" ;
|
||||
} elsif ($_ eq 'start_date') {
|
||||
$nowrap = "nowrap" ;
|
||||
$val = $date_from ;
|
||||
} elsif ($_ eq 'venue') {
|
||||
my @oids = split(/\,/,$db{$table}{$id}{organisation_ids}) ;
|
||||
foreach $_oid (@oids) {
|
||||
$val .= $db{organisations}{$_oid}{name} . '<br>' ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ; ;
|
||||
# $nowrap = "nowrap" ;
|
||||
} elsif ($_ eq 'region') {
|
||||
$val = $db{regions}{$db{$table}{$id}{region_id}}{code} ;
|
||||
} elsif ($_ eq 'type') {
|
||||
$val = (lc $db{event_systems}{$event_sys_id}{description} =~ /cricket/) ? "C" :
|
||||
($db{event_systems}{$event_sys_id}{system_type} eq 'mobile') ? "M" :
|
||||
($db{event_systems}{$event_sys_id}{system_type} eq 'fixed') ? "F" : "";
|
||||
} elsif ($_ eq 'system') {
|
||||
$val = '' ;
|
||||
$val = qq~$db{event_systems}{$event_sys_id}{name}~ ;
|
||||
$val .= qq~ ($db{event_systems}{$event_sys_id}{description})~ if $db{event_systems}{$event_sys_id}{description} ;
|
||||
# $nowrap = "nowrap" ;
|
||||
} elsif ($_ eq 'sport') {
|
||||
$val = '' ;
|
||||
foreach my $sport_id (split(",",$db{$table}{$id}{sport_type_ids})) {
|
||||
$db{sport_types}{$sport_id}{name} = uc $db{sport_types}{$sport_id}{name} ;
|
||||
$val .= qq~$db{sport_types}{$sport_id}{name}<br>~ ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ;
|
||||
} elsif ($_ eq 'operator') {
|
||||
$nowrap = "nowrap" ;
|
||||
$val = '' ;
|
||||
# $val = $db{users}{$table_op_ids[$system_count - 1]}{name} if $table_op_ids[$system_count - 1] ;
|
||||
$val = ($default_op_ids{$system_count}{$cnt{$event_sys_id}{$id}}) ? $db{users}{$default_op_ids{$system_count}{$cnt{$event_sys_id}{$id}}}{name} : (!$default_op_ids{$system_count}{$system_day_cnt} && $system_has_daily_op{$system_count}) ? "None" : $db{users}{$op_ids[$system_count - 1]}{name} ;
|
||||
# $formatting = $format92 if $event_cnt == 2 ;
|
||||
$formatting = $format92 if $cali_cnt == 2 ;
|
||||
} elsif ($_ eq 'start_time') {
|
||||
if ($sys_day_cnt == 1 or ($sys_day_cnt > 1 and not $start_times[$sys_day_cnt-1])) {
|
||||
$val = substr($db{$table}{$id}{date_from},11,5) ;
|
||||
} else {
|
||||
$val = substr($start_times[$sys_day_cnt-1],0,5) ;
|
||||
}
|
||||
} elsif ($_ eq 'end_time') {
|
||||
if ($start_times[$sys_day_cnt-1] && !$end_times[$sys_day_cnt-1]) {
|
||||
$val = substr($db{$table}{$id}{date_to},11,5) ;
|
||||
} else {
|
||||
$val = substr($end_times[$sys_day_cnt-1],0,5) ;
|
||||
}
|
||||
} elsif ($_ eq 'head_operator') {
|
||||
# $val = ($only_display_val && $default_val) ? qq~<input name='$field' value='$default_val_id{$_}{$default_val}' type='hidden'>~ : qq~~ ;
|
||||
$val .= &common_min_table_select($field,$default_val,$only_display_val,$cali_cnt,$nr_of_cols_cnt,$background_color,$default_val_is_saved,$_) ;
|
||||
} elsif ($_ eq 'request_sent') {
|
||||
$val_min = $default_val ;
|
||||
# $val = ($only_display_val && $default_val) ? qq~<input name='$field' value='$default_val' type='hidden'>~ : qq~~ ;
|
||||
$default_val = "$now_hour:$now_min:$now_sec" unless $default_val ;
|
||||
$val .= &common_min_table_timepicker($field,$default_val,$only_display_val,$cali_cnt,$nr_of_cols_cnt,$background_color,$default_val_is_saved,$_) ;
|
||||
} elsif ($_ eq 'calibrator') {
|
||||
# $val = ($only_display_val && $default_val) ? qq~<input name='$field' value='$default_val_id{$_}{$default_val}' type='hidden'>~ : qq~~ ;
|
||||
$val .= &common_min_table_select($field,$default_val,$only_display_val,$cali_cnt,$nr_of_cols_cnt,$background_color,$default_val_is_saved,$_) ;
|
||||
} elsif ($_ eq 'status') {
|
||||
$found_editable_status = 1 if !$only_display_val ;
|
||||
# $val = ($only_display_val && $default_val) ? qq~<input name='$field' value='$default_val_id{$_}{$default_val}' type='hidden'>~ : qq~~ ;
|
||||
$val .= &common_min_table_select($field,$default_val,$only_display_val,$cali_cnt,$nr_of_cols_cnt,$background_color,$default_val_is_saved,$_) ;
|
||||
$val_min = '' if $val_min == 4 ;
|
||||
} elsif ($_ eq 'frames') {
|
||||
$nowrap = "nowrap" ;
|
||||
$val .= &calibration_get_frames($id,$event_sys_id,$sys_day_cnt) ;
|
||||
} elsif ($_ eq 'update') {
|
||||
if (($report && $cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "-1") || $contains_select) {
|
||||
$val = &common_min_table_checkbox("update_$id\_$event_sys_id\_$sys_day_cnt") ;
|
||||
chop $default_javascript if $default_javascript ;
|
||||
if ($default_javascript) {
|
||||
push @default_javascript_by_id, qq~"$id\_$event_sys_id\_$sys_day_cnt":{$default_javascript}~ ;
|
||||
push @all_update_field_ids,"#selectHead_operator\_$id\_$event_sys_id\_$sys_day_cnt,#selectCalibrator_id\_$id\_$event_sys_id\_$sys_day_cnt,#selectCalibration_status\_$id\_$event_sys_id\_$sys_day_cnt,#timepickerRequest_sent\_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
}
|
||||
} else {
|
||||
$val = '' ;
|
||||
}
|
||||
}
|
||||
if ($_ ne 'frames' && $_ ne 'request_sent' && $_ ne 'head_operator' && $_ ne 'status' && $_ ne 'calibrator' && substr($_,0,5) ne 'shift' && $_ ne 'update') {
|
||||
$val_min = $val ;
|
||||
$val_min =~ s/\<br>/\;/g ;
|
||||
}
|
||||
|
||||
$print_tbody .= qq~<td $align $nowrap>$val</td>~ if $report ;
|
||||
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val_min,$formatting) if $val_min && $_ ne 'update' ;
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,"",$format84) if !$val_min && ($_ eq 'head_operator' || $_ eq 'calibrator' || $_ eq 'status' || $_ eq 'request_sent') ;
|
||||
$xlsxcol++ ;
|
||||
|
||||
}
|
||||
|
||||
$print_tbody .= qq~</tr>~ if $report ;
|
||||
|
||||
$xlsxrow++ ;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
my $all_select_ids_string = join(",",@all_select_ids) ;
|
||||
$trigger_jquery_raw .= qq~\$("$all_select_ids_string").chosen({allow_single_deselect:true});~ ;
|
||||
|
||||
if (!$found_editable) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} ").find("th:last").remove() ;
|
||||
\$("#$useropts{table_id} tr").each(function() {
|
||||
\$(this).find("td:last").remove() ;
|
||||
}) ;
|
||||
~ ;
|
||||
} elsif ($set_up_groups) {
|
||||
&common_min_table_select_jquery("#$useropts{table_id} td:nth-last-child(3),#$useropts{table_id} td:nth-last-child(2)") ;
|
||||
&common_min_table_update_checkbox_col("3") ;
|
||||
} else {
|
||||
&common_min_table_select_jquery("#$useropts{table_id} td:nth-last-child(4),#$useropts{table_id} td:nth-last-child(3)") ;
|
||||
&common_min_table_update_checkbox_col("3") ;
|
||||
}
|
||||
|
||||
if ($found_editable) {
|
||||
$trigger_jquery .= qq~\$("#$useropts{table_id} td:nth-last-child(3)").css("width","12.5%"); ~ ;
|
||||
$trigger_jquery .= ($set_up_groups) ? qq~\$("#$useropts{table_id} td:nth-last-child(2)").css("width","12.5%");~ : qq~\$("#$useropts{table_id} td:nth-last-child(4)").css("width","12.5%");~ ;
|
||||
}
|
||||
|
||||
if (!$found_editable_status) {
|
||||
$trigger_jquery .= qq~\$("#$useropts{table_id} td:nth-last-child(3)").css("width","");~ if !$set_up_groups ;
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_column(0,0,10) ;
|
||||
$worksheet{$ws}->set_column(1,1,30) ;
|
||||
$worksheet{$ws}->set_column(2,2,15) ;
|
||||
$worksheet{$ws}->set_column(3,3,5) ;
|
||||
$worksheet{$ws}->set_column(4,5,13) ;
|
||||
$worksheet{$ws}->set_column(6,6,30) ;
|
||||
$worksheet{$ws}->set_column(7,7,8 );
|
||||
$worksheet{$ws}->set_column(8,12,30) ;
|
||||
$worksheet{$ws}->set_column(13,13,30) unless $set_up_groups ;
|
||||
$worksheet{$ws}->set_column(14,14,$max_frame_width/7) unless $set_up_groups ;
|
||||
|
||||
&common_min_table_timepicker_jquery("[id^='timepickerRequest_sent_']") ;
|
||||
|
||||
&report_xlsx_export_footer('L',15,$xlsxdir) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_check_for_overlapping_dates {
|
||||
|
||||
my ($check_table,$checked_column,$date_from_input,$date_to_input,$sys_ids_input,$get_periods) = @_ ;
|
||||
|
||||
my %seen_system_id = () ; my %checked_system_id = () ; my %system_start_date = () ; my %system_end_date = () ;
|
||||
|
||||
my $sys_ids = "" ;
|
||||
|
||||
if ($get_periods) {
|
||||
$sys_ids = $sys_ids_input ;
|
||||
}
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
foreach (split(";",$sys_ids)) {
|
||||
|
||||
$system_start_date{$_}{$id} = $db{$table}{$id}{date_from} ;
|
||||
$system_end_date{$_}{$id} = $db{$table}{$id}{date_to} ;
|
||||
}
|
||||
}
|
||||
|
||||
if ($date_from_input and $date_to_input and $sys_ids_input) {
|
||||
|
||||
foreach (split(";",$sys_ids_input)) {
|
||||
|
||||
$system_start_date{$_}{none} = $date_from_input ;
|
||||
$system_end_date{$_}{none} = $date_to_input ;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
|
||||
foreach my $sys_id (split(";",$sys_ids)) {
|
||||
|
||||
next unless $sys_id ;
|
||||
|
||||
if ($seen_system_id{$sys_id} and not $checked_system_id{$sys_id}) {
|
||||
|
||||
$checked_system_id{$sys_id} = 1 ;
|
||||
foreach my $id2 (keys %{$system_start_date{$sys_id}}) {
|
||||
|
||||
next if $id2 eq $id ;
|
||||
my $t1 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 21<12
|
||||
my $t2 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 22<12
|
||||
my $t3 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 21<11
|
||||
my $t4 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 22<11
|
||||
|
||||
if (($t1 and not $t2) or ($t3 and not $t4) or (not $t3 and $t2) or ($t3 and not $t2)) {
|
||||
my $system_name = qq~$db{$check_table}{$sys_id}{name}~ ;
|
||||
$system_name .= qq~ ($db{$check_table}{$sys_id}{description})~ if $db{$check_table}{$sys_id}{description} ;
|
||||
|
||||
if ($get_periods) {
|
||||
$overlap_dates{$sys_id}{$id2} = "$db{$table}{$id2}{date_from} - $db{$table}{$id2}{date_to}" ;
|
||||
} else {
|
||||
$trigger_jquery_raw .= qq~
|
||||
noty({text:'System $system_name and cannot be used in both event $db{$table}{$id}{ref} and $db{$table}{$id2}{ref} as the times ovelap!!',layout:"center",type:"error",timeout:30000}) ;
|
||||
~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$seen_system_id{$sys_id} = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_get_frames {
|
||||
|
||||
my ($id,$event_sys_id,$sys_day_cnt) = @_ ;
|
||||
|
||||
$nowrap = "nowrap" ;
|
||||
my $attachments = "" ; my $attach_butt = "" ;
|
||||
|
||||
if ($gallery{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
|
||||
my $margin = 5 ; my $scaled_height = 100 ; my $total_width = 0 ; my $max_height = 350 ; my $max_image_height = 0 ;
|
||||
|
||||
foreach my $img_name (split(/\;/,$gallery{$id}{$event_sys_id}{$sys_day_cnt})) {
|
||||
|
||||
my $file_path = "$htmlpath/uploads/calibration_status_uploads/$id/$img_name";
|
||||
|
||||
my ($width, $height) = imgsize($file_path);
|
||||
|
||||
if ($height && -f $file_path) {
|
||||
|
||||
my $final_file = $file_path; # default: use original
|
||||
# my $scaled_width = $width;
|
||||
# my $scaled_height = $height;
|
||||
|
||||
if ($height > $max_height) {
|
||||
|
||||
$max_image_height = $max_height if $max_image_height < $height ;
|
||||
|
||||
# Load and resize with fixed height = 500
|
||||
my $img = Image::Magick->new ;
|
||||
$img->Read($file_path) ;
|
||||
|
||||
my $scale = $max_height / $height;
|
||||
$width = int($width * $scale);
|
||||
$height = $max_height;
|
||||
|
||||
$img->Resize(geometry => "${width}x${height}");
|
||||
|
||||
# Write to temporary file
|
||||
my ($fh, $tempfile) = tempfile(SUFFIX => '.jpg');
|
||||
$img->Write(filename => $tempfile, quality => 70);
|
||||
|
||||
$final_file = $tempfile;
|
||||
$temp_files{$tempfile} = 1; # track temp file for cleanup
|
||||
} else {
|
||||
$max_image_height = $height if $max_image_height < $height ;
|
||||
}
|
||||
|
||||
($width,$height) = imgsize($final_file);
|
||||
|
||||
$total_width += $margin;
|
||||
|
||||
&xlsxcreator_insert_image($ws,$xlsxrow,$xlsxcol,$final_file,$total_width,$margin,150/$height,150/$height) if $height > 150 ;
|
||||
&xlsxcreator_insert_image($ws,$xlsxrow,$xlsxcol,$final_file,$total_width,$margin) if $height <= 150 ;
|
||||
|
||||
$total_width += $width*150/$height;
|
||||
}
|
||||
|
||||
$total_width += $margin;
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_row($xlsxrow,(2*$margin+150)*(83/110)) if $max_image_height ;
|
||||
|
||||
$max_frame_width = $total_width if $total_width && $max_frame_width < $total_width ;
|
||||
|
||||
$attachments .= &calibration_get_uploads_list($db{calibration_status_report}{$id}{event_quote_id},$gallery{$id}{$event_sys_id}{$sys_day_cnt}) ;
|
||||
}
|
||||
|
||||
if ($attachments) {
|
||||
|
||||
$attach_butt = qq~
|
||||
|
||||
<a href="#" data-toggle="popover" data-placement="left" data-content="$attachments" title="Uploads" data-html="true" data-trigger="focus" class="btn btn-round btn-default">
|
||||
<i class="glyphicon glyphicon-paperclip" style="top:4px;"></i>
|
||||
</a>
|
||||
~ ;
|
||||
|
||||
}
|
||||
|
||||
my $val_return = qq~
|
||||
$attach_butt
|
||||
<a href="javascript:dlgMdl('$useropts{scripts}/dialog/calibration_status_report_uploads.pl?$id&$event_sys_id&$sys_day_cnt','Edit Images','','medium-dialog');" class="btn btn-round btn-info" data-toggle="tooltip" data-placement="left" title="" data-original-title="Edit Images">
|
||||
<i class="glyphicon glyphicon-edit" style="top:4px;">
|
||||
</i>
|
||||
</a>
|
||||
~ ;
|
||||
|
||||
return $val_return ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_get_status_frames {
|
||||
|
||||
my ($event_id) = @_ ;
|
||||
|
||||
return unless $event_id ;
|
||||
|
||||
my %frames_hash = () ;
|
||||
|
||||
foreach my $system_frames (split(/\|/,$db{calibration_status_report}{$event_id}{upload_names})) {
|
||||
|
||||
next unless $system_frames ;
|
||||
my ($system_id,$system_frames_2) = split(/\~/,$system_frames) ;
|
||||
my $day_cnt = 0 ;
|
||||
|
||||
foreach my $day_frames (split(/\:/,$system_frames_2)) {
|
||||
$day_cnt++ ;
|
||||
next unless $day_frames ;
|
||||
$gallery{$event_id}{$system_id}{$day_cnt} = $day_frames ;
|
||||
}
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_get_uploads_list {
|
||||
|
||||
my ($id,$uploads) = @_ ;
|
||||
|
||||
my $attachments = '' ;
|
||||
|
||||
return '' unless $id ;
|
||||
|
||||
my @uploads_arr = split(/\;/,$uploads) ;
|
||||
|
||||
my $uploads_cnt = 0 ;
|
||||
|
||||
foreach (@uploads_arr) {
|
||||
|
||||
$uploads_cnt++ ;
|
||||
|
||||
next unless $_ ;
|
||||
|
||||
my $url_prefix = qq~/uploads/calibration_status_uploads/$id~ ;
|
||||
|
||||
my ($width,$height) = imgsize("$htmlpath/$url_prefix/$_");
|
||||
|
||||
next unless $height ;
|
||||
|
||||
$width = 100*($width/$height) ;
|
||||
$height = 100 ;
|
||||
$attachments .= qq~<a target='_blank' href='$url_prefix/$_'><img src='$url_prefix/$_' style='width:$width\px;height:$height\px;border:1px solid #ccc;margin:2px;max-width:100%;display:block;'></a>~ ;
|
||||
|
||||
}
|
||||
|
||||
return $attachments ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
1 ;
|
||||
688
libs/modules/calibrator_payments.pm
Normal file
688
libs/modules/calibrator_payments.pm
Normal file
|
|
@ -0,0 +1,688 @@
|
|||
sub calibration_load_list_vars {
|
||||
|
||||
my ($where,$for_payments) = @_ ;
|
||||
|
||||
our %quote_status = () ;
|
||||
|
||||
our %calibrator_users = () ;
|
||||
|
||||
# &db_min_ro('users','id,name,user_type',"",'','') ;
|
||||
# &db_min_ro('users','id,name,user_type,username',"(user_type = 'support' OR user_type = 'manager' OR user_type = 'casual_calibrator') AND name NOT LIKE 'Rory%'",'','') ;
|
||||
|
||||
&db_min_ro('users','id,name,user_type,username',"`name` NOT LIKE 'Rory%'",'','') ;
|
||||
|
||||
if (!$for_payments) {
|
||||
$opts{calibration_users} .= qq~<option value="none">>>>None<<<</option>~ ;
|
||||
$opts{head_operator} .= qq~<option value="none">>>>None<<<</option>~ ;
|
||||
foreach my $_uid (sort {$db{users}{$a}{name} cmp $db{users}{$b}{name}} keys %{$db{users}}) {
|
||||
next if $useropts{it}{$db{users}{$_uid}{username}} ;
|
||||
if ($db{users}{$_uid}{user_type} eq 'support' || $db{users}{$_uid}{user_type} eq 'manager' || $db{users}{$_uid}{user_type} eq 'casual_calibrator') {
|
||||
$calibrator_users{$_uid} = $db{users}{$_uid}{name} ;
|
||||
$opts{calibration_users} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ ;
|
||||
}
|
||||
if ($db{users}{$_uid}{user_type} eq 'casual_c') {
|
||||
$opts{head_operator} .= qq~<option value="$_uid">$db{users}{$_uid}{name}</option>~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&db_min_ro('event_systems','*',"system_type = 'mobile'",'','') ;
|
||||
|
||||
my @event_quote_ids = () ;
|
||||
|
||||
# &db_min_ro($table,"id,ref,organisation_ids,quote_accepted,event_system_id_multiple,region_id,sport_type_ids,operator_ids,date_from,date_to,if(date_from < '$now_year-$now_mm-$now_dd 00:00:00',0,1) AS 'after_start_date',event_system_calibration_ids,event_system_calibration_status","$where AND `quote_accepted` = '1'",'','') ;
|
||||
&db_min_ro($table,"id,ref,organisation_ids,quote_accepted,event_system_id_multiple,region_id,sport_type_ids,operator_ids,date_from,date_to,event_system_calibration_ids,event_system_calibration_status,event_system_head_operator_ids,times_from","$where AND `quote_accepted` = '1'",'','') ;
|
||||
|
||||
my $min_id = 0 ; my $max_id = 0 ;
|
||||
|
||||
our %event_system_calibration_ids = () ; our %event_system_calibration_status = () ; our %event_system_head_operator_id = () ;
|
||||
|
||||
foreach my $id (keys %{$db{$table}}) {
|
||||
|
||||
# &common_debug(">>>>>>>>> 1. [$id] $db{$table}{$id}{ref}") ;
|
||||
|
||||
next unless $id ; my $cnt = 0 ;
|
||||
|
||||
my @ed_from = &common_split_sql_time($db{$table}{$id}{date_from}) ;
|
||||
my @ed_to = &common_split_sql_time($db{$table}{$id}{date_to}) ;
|
||||
|
||||
&common_date_array("$ed_from[0]$ed_from[1]$ed_from[2]","$ed_to[0]$ed_to[1]$ed_to[2]") ;
|
||||
|
||||
# $sort_calibration_by_time_ref{"$ed_from[0]$ed_from[1]$ed_from[2]$ed_from[3]$ed_from[4]-$db{$table}{$id}{ref}"} = $id ;
|
||||
$sort_calibration_by_time_ref{"$ed_from[0]$ed_from[1]$ed_from[2]$ed_from[3]$ed_from[4]-$id"} = $id ;
|
||||
|
||||
# my @event_sys_calibration_status = split(";",$db{$table}{$id}{event_system_calibration_status}) ;
|
||||
my @event_sys_calibration_status = split(/\;/,$db{$table}{$id}{event_system_calibration_status}) ;
|
||||
my @event_system_ids = split(/\;/,$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
my @calibration_ids = split(/\;/,$db{$table}{$id}{event_system_calibration_ids}) ;
|
||||
my @head_operator_ids = split(/\;/,$db{$table}{$id}{event_system_head_operator_ids}) ;
|
||||
|
||||
my $evntday=0; my $evntsys=0;
|
||||
|
||||
foreach my $_cid (@calibration_ids) {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
$evntsys++;
|
||||
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} eq 'mobile' ;
|
||||
|
||||
my (@calibrator_ids_per_event_day) = split(/\-/,$_cid);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
|
||||
foreach my $_cid_pd (@calibrator_ids_per_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cid_pd ;;
|
||||
$event_system_calibration_ids{$id}{$system_id}{$evntday} = $_cid_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_ids{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
foreach my $_cstatus (@event_sys_calibration_status) {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
$evntsys++;
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} eq 'mobile' ;
|
||||
|
||||
|
||||
my (@calibrator_status_per_event_day) = split(/\-/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@calibrator_status_per_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$event_system_calibration_status{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
foreach my $_cstatus (@head_operator_ids) {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
$evntsys++;
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} eq 'mobile' ;
|
||||
|
||||
my (@head_operator_id_event_day) = split(/\-/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@head_operator_id_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$event_system_head_operator_id{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
if ($for_payments) {
|
||||
|
||||
my @calibrator_amounts_paid = split(/\;/,$db{$table}{$id}{calibrator_amounts_paid}) ;
|
||||
my @calibrator_dates_paid = split(/\;/,$db{$table}{$id}{calibrator_dates_paid}) ;
|
||||
|
||||
foreach my $_cstatus (@calibrator_amounts_paid) {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
$evntsys++;
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} eq 'mobile' ;
|
||||
|
||||
my (@amounts_paid_event_day) = split(/\-/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@amounts_paid_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$calibrator_amounts_paid_hash{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
|
||||
$evntsys=0;
|
||||
|
||||
foreach my $_cstatus (@calibrator_dates_paid) {
|
||||
$system_id = $event_system_ids[$evntsys] ;
|
||||
$evntsys++;
|
||||
next unless $system_id ;
|
||||
next unless $db{event_systems}{$system_id}{system_type} eq 'mobile' ;
|
||||
|
||||
my (@dates_paid_event_day) = split(/\:/,$_cstatus);
|
||||
$evntday=0; # set the event day back to zero for each set of calibrators
|
||||
foreach my $_cstatus_pd (@dates_paid_event_day) {
|
||||
$evntday++;
|
||||
next unless $_cstatus_pd ;
|
||||
$calibrator_dates_paid_hash{$id}{$system_id}{$evntday} = $_cstatus_pd ;
|
||||
# &common_debug("1. >>> $event_system_calibration_status{$id}{$system_id}{$evntday} [$id] [$system_id] [$evntday]") ;
|
||||
}
|
||||
# $evntsys++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# &db_min_ro('event_systems','*',"system_type = 'mobile'",'','') ;
|
||||
|
||||
&calibration_check_for_overlapping_dates('event_systems',"event_system_id_multiple") ;
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
$min_id = $id if not $min_id or $min_id > $id ;
|
||||
$max_id = $id if $max_id < $id ;
|
||||
}
|
||||
|
||||
my $id_sql = qq~(`id` <= '$max_id' AND `id` >= '$min_id')~ ;
|
||||
# $id_sql = qq~ AND $id_sql~ if $where_2 or $where_3 ;
|
||||
|
||||
# &db_min_ro('event_quotes_min','*',"$where_2$where_3$id_sql",'','') ;
|
||||
&db_min_ro('event_quotes_min','*',"$id_sql",'','') ;
|
||||
&db_min_ro('event_cost_items','id,name',"excl_from_expenses < 1",'','') ;
|
||||
&db_min_ro('calibration_status','id,status','','','') unless $calibration_status ;
|
||||
|
||||
foreach (sort {$db{calibration_status}{$a}{status} cmp $db{calibration_status}{$b}{status}} keys %{$db{calibration_status}}) {
|
||||
$opts{calibration_status} .= qq~<option value="$_">$db{calibration_status}{$_}{status}</option>~ ;
|
||||
}
|
||||
|
||||
&db_min_ro('sport_types','*','','','') ;
|
||||
&db_min_ro('regions','*','','','') ;
|
||||
&db_min_ro('organisations','id,name','','','') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_build_table_and_or_excel {
|
||||
|
||||
my ($report,$for_payments) = @_ ;
|
||||
|
||||
our @sql_col_display = ("count","event","calibration_date","day","start_date","start_time","venue","region","system","sport","operator","head_operator","calibrator","status","update") ;
|
||||
|
||||
@sql_col_display = ("count","event","calibration_date","day","start_date","start_time","venue","region","system","sport","operator","head_operator","calibrator","status","date_payable","amount_payable","paid") if $for_payments ;
|
||||
|
||||
&report_xlsx_export_header("$xlsxreportname",$xlsxdir,'',$xlsx_title_heading) ;
|
||||
|
||||
$xlsxrow-- ;
|
||||
|
||||
my $cali_cnt = 0 ; our $found_after_date = 0 ; my $found_editable = 0 ;
|
||||
|
||||
# foreach my $id (sort {$db{$table}{$a}{date_from} cmp $db{$table}{$b}{date_from}} keys %{$db{$table}}) {
|
||||
foreach my $date_ref (sort keys %sort_calibration_by_time_ref) {
|
||||
|
||||
my $id = $sort_calibration_by_time_ref{$date_ref} ;
|
||||
|
||||
next unless $id ;
|
||||
unless (&common_check_if_string_contains_an_integer($db{$table}{$id}{event_system_id_multiple})) {
|
||||
$db{$table}{$id}{event_system_id_multiple} = ";none;" ;
|
||||
}
|
||||
|
||||
# my @system_name_ids = split(";",$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
|
||||
my @system_name_ids = split(/\;/,$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
my @club_ids = split(/\;/,$db{$table}{$id}{club_ids}) ;
|
||||
my @op_ids = split(/\,/,$db{$table}{$id}{operator_ids}) ;
|
||||
my @start_times = split(/\;/,$db{$table}{$id}{times_from}) ;
|
||||
|
||||
my $cnt_rows = 0 ;
|
||||
for (1 .. 50) {
|
||||
$cnt_rows = $_ if $system_name_ids[$_ - 1] or $club_ids[$_ - 1] ;
|
||||
}
|
||||
|
||||
# my @table_op_ids = () ;
|
||||
|
||||
# for (1 .. $cnt_rows) {
|
||||
# push @table_op_ids,$op_ids[$_ - 1] if $op_ids[$_ - 1] ;
|
||||
# push @table_op_ids,0 unless $op_ids[$_ - 1] ;
|
||||
# }
|
||||
|
||||
my $system_count = 0 ;
|
||||
|
||||
# foreach my $event_sys_id (split(";",$db{$table}{$id}{event_system_id_multiple})) {
|
||||
# foreach my $event_sys_id (sort { $a <=> $b } @system_name_ids) {
|
||||
foreach my $event_sys_id (@system_name_ids) {
|
||||
|
||||
$system_count++ ;
|
||||
|
||||
next unless $event_sys_id ;
|
||||
next unless $db{event_systems}{$event_sys_id}{system_type} eq 'mobile' ;
|
||||
|
||||
|
||||
# &common_debug(">>>>>>>>> 2. $system_count [$id] $db{$table}{$id}{ref} [$db{event_systems}{$event_sys_id}{system_type}]") ;
|
||||
|
||||
# $event_cnt++ ;
|
||||
|
||||
# foreach my $cal_date (sort {$day_of_week{$a} cmp $day_of_week{$b}} keys %day_of_week) {
|
||||
foreach my $cal_date (sort keys %day_of_week) {
|
||||
|
||||
|
||||
my $srch_date_from_comp = $i{date_from} ; $srch_date_from_comp =~ s/\-//g ;
|
||||
my $srch_date_to_comp = $i{date_to} ; $srch_date_to_comp =~ s/\-//g ;
|
||||
my $date_from_comp = substr($db{$table}{$id}{date_from},0,10) ; $date_from_comp =~ s/\-//g ;
|
||||
my $date_to_comp = substr($db{$table}{$id}{date_to},0,10) ; $date_to_comp =~ s/\-//g ;
|
||||
my $cal_date_comp = $cal_date ; # $cal_date_comp =~ s/\-//g ;
|
||||
$cal_date = substr($cal_date,0,4) . '-' . substr($cal_date,4,2) . '-' . substr($cal_date,6,2) ;
|
||||
my $date_from = substr($db{$table}{$id}{date_from},0,10) ;
|
||||
|
||||
# &common_debug("[$cnt{$event_sys_id}{$id}] : $event_sys_id [$id] $cal_date") ;
|
||||
|
||||
# &common_debug("1. DATE >>> $cal_date_comp < $date_from_comp") if !$report ;
|
||||
next if $cal_date_comp < $date_from_comp ;
|
||||
# &common_debug("2. DATE >>> $cal_date_comp > $date_to_comp") if !$report ;
|
||||
next if $cal_date_comp > $date_to_comp ;
|
||||
|
||||
$cnt{$event_sys_id}{$id}++ ; ## WHY HERE???????????????
|
||||
next if $for_payments && ($db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$cnt{$event_sys_id}{$id}}}{user_type} ne 'casual_calibrator' || $db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$cnt{$event_sys_id}{$id}}}{status} ne 'Done' || ($i{paid_status} eq 'paid' && !$calibrator_amounts_paid_hash{$id}{$system_id}{$evntday}) || ($i{paid_status} eq 'outstanding' && $calibrator_amounts_paid_hash{$id}{$system_id}{$evntday})) ;
|
||||
|
||||
|
||||
# &common_debug("3. DATE >>> $cal_date_comp > $srch_date_to_comp") if !$report ;
|
||||
next if $cal_date_comp > $srch_date_to_comp ;
|
||||
# &common_debug("4. DATE >>> $cal_date_comp < $srch_date_from_comp") if !$report ;
|
||||
next if $cal_date_comp < $srch_date_from_comp ;
|
||||
|
||||
# &common_debug(">>>>>>>>> 3. $system_count [$id] $db{$table}{$id}{ref} [$db{event_systems}{$event_sys_id}{system_type}]") ;
|
||||
|
||||
# &common_debug("[$cnt{$event_sys_id}{$id}] : $event_sys_id [$id] $cal_date [$cal_date_comp > $srch_date_to_comp]") ;
|
||||
|
||||
|
||||
|
||||
$cali_cnt++;
|
||||
|
||||
$xlsxcol = 0 ;
|
||||
$print_tbody .= qq~<tr id="$id$dow">~ if $report ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
|
||||
# &common_debug("1. XLSX >>> $_") if !$report ;
|
||||
|
||||
next unless $_ ; # blank for the buttons column
|
||||
|
||||
my $formatting = $format84 ;
|
||||
my $val = $db{$table}{$id}{$_} ;
|
||||
my $val_min = $val ;
|
||||
my $align = qq~ class="dt-center"~ ;
|
||||
my $nowrap = '' ;
|
||||
|
||||
# &common_debug("2. XLSX >>> val_min=$val_min") if !$report ;
|
||||
|
||||
my $sys_day_cnt = $cnt{$event_sys_id}{$id} ;
|
||||
|
||||
if ($_ eq 'count') {
|
||||
# $val = $event_cnt ;
|
||||
$val = $cali_cnt ;
|
||||
} elsif ($_ eq 'event') {
|
||||
$val = "$db{$table}{$id}{ref} ($id)" ;
|
||||
} elsif ($_ eq 'calibration_date') {
|
||||
# $val = "$cal_date [$day_of_week{$cal_date}]" ;
|
||||
$val = "$cal_date" ;
|
||||
} elsif ($_ eq 'day') {
|
||||
$val = "$sys_day_cnt" ;
|
||||
} elsif ($_ eq 'start_date') {
|
||||
$val = $date_from ;
|
||||
} elsif ($_ eq 'venue') {
|
||||
my @oids = split(/\,/,$db{$table}{$id}{organisation_ids}) ;
|
||||
foreach $_oid (@oids) {
|
||||
$val .= $db{organisations}{$_oid}{name} . '<br>' ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ; ;
|
||||
} elsif ($_ eq 'region') {
|
||||
$val = $db{regions}{$db{$table}{$id}{region_id}}{code} ;
|
||||
} elsif ($_ eq 'system') {
|
||||
$val = '' ;
|
||||
$val = qq~$db{event_systems}{$event_sys_id}{name}~ ;
|
||||
$val .= qq~ ($db{event_systems}{$event_sys_id}{description})~ if $db{event_systems}{$event_sys_id}{description} ;
|
||||
} elsif ($_ eq 'sport') {
|
||||
$val = '' ;
|
||||
foreach my $sport_id (split(",",$db{$table}{$id}{sport_type_ids})) {
|
||||
$db{sport_types}{$sport_id}{name} = uc $db{sport_types}{$sport_id}{name} ;
|
||||
$val .= qq~$db{sport_types}{$sport_id}{name}<br>~ ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ;
|
||||
} elsif ($_ eq 'operator') {
|
||||
$val = '' ;
|
||||
# $val = $db{users}{$table_op_ids[$system_count - 1]}{name} if $table_op_ids[$system_count - 1] ;
|
||||
$val = $db{users}{$op_ids[$system_count - 1]}{name} if $op_ids[$system_count - 1] ;
|
||||
# $formatting = $format92 if $event_cnt == 2 ;
|
||||
$formatting = $format92 if $cali_cnt == 2 ;
|
||||
} elsif ($_ eq 'start_time') {
|
||||
if ($sys_day_cnt == 1 or ($sys_day_cnt > 1 and not $start_times[$sys_day_cnt-2])) {
|
||||
$val = substr($db{$table}{$id}{date_from},11,5) ;
|
||||
} else {
|
||||
$val = substr($start_times[$sys_day_cnt-2],0,5) ;
|
||||
}
|
||||
} elsif ($_ eq 'head_operator') {
|
||||
if ($report && !$for_payments) {
|
||||
# if ($db{$table}{$id}{after_start_date} and $event_sys_id ne "-1") {
|
||||
# &common_debug("=== $cal_date_comp >= $now_ccyymmdd && $event_sys_id ne -1") ;
|
||||
|
||||
my $field = "head_operator_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
if ($cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "-1") {
|
||||
$found_after_date = 1 ;
|
||||
|
||||
$preferred_title{$field} = "Head Operator" ;
|
||||
$opts{$field} = $opts{head_operator} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$val = &common_min_form_select_col($field,'') ;
|
||||
|
||||
# &common_debug("2. >>> $event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt} [$id] [$event_sys_id] [$sys_day_cnt] [$field]") ;
|
||||
|
||||
|
||||
if ($event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#selectHead_operator_$id\_$event_sys_id\_$sys_day_cnt").val("$event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt}") ;
|
||||
\$("#selectHead_operator_$id\_$event_sys_id\_$sys_day_cnt").trigger("chosen:updated") ;
|
||||
\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(4)").css("background-color","#424949") ;
|
||||
~ ;
|
||||
}
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#selectHead_operator_$id\_$event_sys_id\_$sys_day_cnt\_chosen").css("width","100%") ;~ ;
|
||||
# $val_min = $db{users}{$db{event_systems}{$event_sys_id}{calibrator_id}}{name} ;
|
||||
$val_min = $db{users}{$event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
} else {
|
||||
$val = $db{users}{$event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val = "None" if $event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt} eq 'none' ;
|
||||
# # $val = "$db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} [$sys_day_cnt]" ;
|
||||
# $readonly{$field} = 'READONLY' ;
|
||||
# $val = qq~<div style="display:none;">~ . &common_min_form_input_col($field,$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}) . qq~</div>~ ;
|
||||
# $val .= $db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
# $val = "None" unless $val ;
|
||||
# $val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
|
||||
# $val = $db{users}{$db{event_systems}{$id}{calibrator_id}}{name} ;
|
||||
$val = $db{users}{$event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val = "None" if $event_system_head_operator_id{$id}{$event_sys_id}{$sys_day_cnt} eq 'none' ;
|
||||
# $val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$formatting = $format91 ;
|
||||
} elsif ($_ eq 'calibrator') {
|
||||
|
||||
if ($report && !$for_payments) {
|
||||
# if ($db{$table}{$id}{after_start_date} and $event_sys_id ne "-1") {
|
||||
# &common_debug("=== $cal_date_comp >= $now_ccyymmdd && $event_sys_id ne -1") ;
|
||||
|
||||
my $field = "calibrator_id_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
if ($cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "none") {
|
||||
$found_after_date = 1 ;
|
||||
|
||||
$preferred_title{$field} = "Calibrator" ;
|
||||
$opts{$field} = $opts{calibration_users} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$val = &common_min_form_select_col($field,'') ;
|
||||
|
||||
# &common_debug("2. >>> $event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt} [$id] [$event_sys_id] [$sys_day_cnt] [$field]") ;
|
||||
|
||||
if ($event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#selectCalibrator_id_$id\_$event_sys_id\_$sys_day_cnt").val("$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}") ;
|
||||
\$("#selectCalibrator_id_$id\_$event_sys_id\_$sys_day_cnt").trigger("chosen:updated") ;
|
||||
\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(3)").css("background-color","#424949") ;
|
||||
~ ;
|
||||
}
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#selectCalibrator_id_$id\_$event_sys_id\_$sys_day_cnt\_chosen").css("width","100%") ;~ ;
|
||||
# $val_min = $db{users}{$db{event_systems}{$event_sys_id}{calibrator_id}}{name} ;
|
||||
$val_min = $db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
} else {
|
||||
$val = $db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val = "None" if $event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt} eq 'none' ;
|
||||
# # $val = "$db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} [$sys_day_cnt]" ;
|
||||
# $readonly{$field} = 'READONLY' ;
|
||||
# $val = qq~<div style="display:none;">~ . &common_min_form_input_col($field,$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}) . qq~</div>~ ;
|
||||
# $val .= $db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
# $val = "None" unless $val ;
|
||||
# $val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
# $val = $db{users}{$db{event_systems}{$id}{calibrator_id}}{name} ;
|
||||
|
||||
$val = $db{users}{$event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt}}{name} ;
|
||||
$val = "None" if $event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt} eq 'none' ;
|
||||
# $val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$formatting = $format91 ;
|
||||
} elsif ($_ eq 'status') {
|
||||
if ($report && !$for_payments) {
|
||||
# if ($db{$table}{$id}{after_start_date} and $event_sys_id ne "-1") {
|
||||
my $field = "calibration_status_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
if ($cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "none") {
|
||||
$opts{$field} = $opts{calibration_status} ;
|
||||
$preferred_title{$field} = "Calibration Status" ;
|
||||
$allow_deselect{$field} = 1;
|
||||
$val = &common_min_form_select_col($field,'') ;
|
||||
|
||||
# &common_debug("STATUS >>> $event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} [$id] [$event_sys_id] [$sys_day_cnt] [$field]") ;
|
||||
|
||||
if ($event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$trigger_jquery_raw .= qq~\$("#selectCalibration_status_$id\_$event_sys_id\_$sys_day_cnt").val("$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}") ;~ ;
|
||||
if ($event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} eq '1') { #calibrating
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(2)").css("background-color","#FFA500");~ ;
|
||||
}
|
||||
elsif ($event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} eq '2') { #cancelled
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(2)").css("background-color","#AD0502");~ ;
|
||||
}
|
||||
elsif ($event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} eq '3') { #done
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(2)").css("background-color","#2ECC71");~ ; #D5EDBB
|
||||
}
|
||||
elsif ($event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} eq '4') { #done
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($cali_cnt) td:nth-last-child(2)").css("background-color","#424949");~ ; #D5D8DC
|
||||
}
|
||||
} else {
|
||||
$trigger_jquery_raw .= qq~\$("#selectCalibration_status_$id\_$event_sys_id\_$sys_day_cnt").val("4") ;~ ;
|
||||
}
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#selectCalibration_status_$id\_$event_sys_id\_$sys_day_cnt").trigger("chosen:updated") ;
|
||||
\$("#selectCalibration_status_$id\_$event_sys_id\_$sys_day_cnt\_chosen").css("width","100%");
|
||||
~ ;
|
||||
$val_min = $db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} ;
|
||||
} else {
|
||||
# $val = $db{calibration_status}{$db{event_systems}{$event_sys_id}{calibration_status}}{status} ;
|
||||
$val = $db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} ;
|
||||
$val = "None" if !$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} ;
|
||||
# $readonly{$field} = 'READONLY' ;
|
||||
# $val = qq~<div style="display:none;">~ . &common_min_form_input_col($field,$db{event_systems}{$event_sys_id}{calibration_status}) . qq~</div>~ ;
|
||||
# $val .= $db{calibration_status}{$db{event_systems}{$event_sys_id}{calibration_status}}{status} ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
# $val = "None" unless $val ;
|
||||
# $val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
# $val = $db{calibration_status}{$db{event_systems}{$event_sys_id}{calibration_status}}{status} ;
|
||||
$val = $db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} ;
|
||||
$val = "None" if !$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt} ;
|
||||
# $val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
# if ($db{calibration_status}{$db{event_systems}{$event_sys_id}{calibration_status}}{status} eq "Calibrating") {
|
||||
if ($db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} eq "Calibrating") {
|
||||
$formatting = $format89 ;
|
||||
} elsif ($db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} eq "Cancelled") {
|
||||
$formatting = $format90 ;
|
||||
} elsif ($db{calibration_status}{$event_system_calibration_status{$id}{$event_sys_id}{$sys_day_cnt}}{status} eq "Done") {
|
||||
$formatting = $format88 ;
|
||||
} else {
|
||||
$formatting = $format91 ;
|
||||
}
|
||||
} elsif ($_ eq 'update') {
|
||||
|
||||
if ($report && $cal_date_comp >= $now_ccyymmdd && $event_sys_id ne "none") {
|
||||
$found_editable = 1 ;
|
||||
my $field = "update_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
$val = &common_min_form_checkbox_col($field,'') ;
|
||||
# $val .= qq~<span id="update_history_$id\_$event_sys_id\_$sys_day_cnt" style="display:none;"></span>~ ; #
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#selectCalibration_status_$id\_$event_sys_id\_$sys_day_cnt,#selectCalibrator_id_$id\_$event_sys_id\_$sys_day_cnt,#selectHead_operator_$id\_$event_sys_id\_$sys_day_cnt").change(function () {
|
||||
\$("#checkboxUpdate_$id\_$event_sys_id\_$sys_day_cnt").prop("checked",true) ;
|
||||
// \$("#update_history_$id\_$event_sys_id\_$sys_day_cnt").text("1") ;
|
||||
}) ;
|
||||
~ ;
|
||||
|
||||
} else {
|
||||
$val = '' ;
|
||||
}
|
||||
$formatting = $format91 ;
|
||||
} elsif ($_ eq 'date_payable') {
|
||||
my $field = "date_payable_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
|
||||
if ($calibrator_dates_paid_hash{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$val = $calibrator_amounts_paid_hash{$id}{$event_sys_id}{$sys_day_cnt} ;
|
||||
$val_min = $val ;
|
||||
$val = &common_min_form_input_col($field,"$calibrator_dates_paid_hash{$id}{$event_sys_id}{$sys_day_cnt}") ;
|
||||
} else {
|
||||
$val = &common_min_form_input_col($field,"$cal_date") ;
|
||||
$val_min = $cal_date ;
|
||||
}
|
||||
|
||||
} elsif ($_ eq 'amount_payable') {
|
||||
my $field = "amount_payable_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
if ($calibrator_amounts_paid_hash{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$val = "Paid" ;
|
||||
$val_min = "None" ;
|
||||
} else {
|
||||
$val = &common_min_form_input_col($field,'500.00') ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("input[name='$field']").change( function () {
|
||||
let input = \$(this).val() ;
|
||||
input = parseFloat(input) ;
|
||||
if (!input) { input = 0 ; }
|
||||
\$(this).val(input.toFixed(2)) ;
|
||||
}) ;
|
||||
~ ;
|
||||
$val_min = "500.00" ;
|
||||
}
|
||||
|
||||
} elsif ($_ eq 'paid') {
|
||||
if ($calibrator_amounts_paid_hash{$id}{$event_sys_id}{$sys_day_cnt}) {
|
||||
$val = '<i class="glyphicons glyphicons-tick"></i>' ;
|
||||
$val_min = "Paid" ;
|
||||
} else {
|
||||
$paid_fields .= qq~$id\_$event_sys_id\_$sys_day_cnt:$cali_cnt,~ ;
|
||||
my $field = "paid_$id\_$event_sys_id\_$sys_day_cnt" ;
|
||||
$val = &common_min_form_checkbox_col($field,'') ;
|
||||
}
|
||||
}
|
||||
if ($_ ne 'status' and $_ ne 'calibrator' and $_ ne 'update' and $_ ne 'date_payable' and $_ ne 'amount_payable') {
|
||||
$val_min = $val ;
|
||||
$val_min =~ s/\<br>/\;/g ;
|
||||
}
|
||||
$print_tbody .= qq~<td $align>$val</td>~ if $report ;
|
||||
|
||||
# &common_debug("XLSX >>> $event_system_calibration_ids{$id}{$event_sys_id}{$sys_day_cnt} [$id] [$event_sys_id] [$sys_day_cnt] [$field]") ;
|
||||
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val_min,$formatting) ;
|
||||
$xlsxcol++ ;
|
||||
}
|
||||
|
||||
$print_tbody .= qq~</tr>~ if $report ;
|
||||
$xlsxrow++ ;
|
||||
}
|
||||
|
||||
# next if $i{calibration_status} ne 'all' and $i{calibration_status} and $i{calibration_status} ne $db{event_systems}{$event_sys_id}{calibration_status} ;
|
||||
# next if $i{calibrator_id} ne 'all' and $i{calibrator_id} and $i{calibrator_id} ne $db{event_systems}{$event_sys_id}{calibrator_id} ;
|
||||
|
||||
}
|
||||
}
|
||||
# \$("#itv-table tr th:nth-last-child(1)").css("width","0%") ;
|
||||
# \$("#itv-table tr th:nth-last-child(1)").css("display","none") ;
|
||||
|
||||
if (!$found_editable && !$for_payments) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#itv-table").find("th:last").remove() ;
|
||||
\$("#itv-table tr").each(function() {
|
||||
\$(this).find("td:last").remove() ;
|
||||
}) ;
|
||||
~ ;
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_column(0,0,10);
|
||||
$worksheet{$ws}->set_column(1,1,30);
|
||||
$worksheet{$ws}->set_column(2,2,15);
|
||||
$worksheet{$ws}->set_column(3,3,5);
|
||||
$worksheet{$ws}->set_column(4,5,13);
|
||||
$worksheet{$ws}->set_column(6,6,30);
|
||||
$worksheet{$ws}->set_column(7,7,8);
|
||||
$worksheet{$ws}->set_column(8,10,30);
|
||||
$worksheet{$ws}->set_column(11,12,15);
|
||||
|
||||
&report_xlsx_export_footer('L',15,$xlsxdir) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub calibration_check_for_overlapping_dates {
|
||||
|
||||
my ($check_table,$checked_column,$date_from_input,$date_to_input,$sys_ids_input,$get_periods) = @_ ;
|
||||
|
||||
my %seen_system_id = () ; my %checked_system_id = () ; my %system_start_date = () ; my %system_end_date = () ;
|
||||
|
||||
my $sys_ids = "" ;
|
||||
|
||||
if ($get_periods) {
|
||||
$sys_ids = $sys_ids_input ;
|
||||
}
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
foreach (split(";",$sys_ids)) {
|
||||
|
||||
$system_start_date{$_}{$id} = $db{$table}{$id}{date_from} ;
|
||||
$system_end_date{$_}{$id} = $db{$table}{$id}{date_to} ;
|
||||
}
|
||||
}
|
||||
|
||||
if ($date_from_input and $date_to_input and $sys_ids_input) {
|
||||
|
||||
foreach (split(";",$sys_ids_input)) {
|
||||
|
||||
$system_start_date{$_}{none} = $date_from_input ;
|
||||
$system_end_date{$_}{none} = $date_to_input ;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
|
||||
foreach my $sys_id (split(";",$sys_ids)) {
|
||||
|
||||
next unless $sys_id ;
|
||||
|
||||
if ($seen_system_id{$sys_id} and not $checked_system_id{$sys_id}) {
|
||||
|
||||
$checked_system_id{$sys_id} = 1 ;
|
||||
foreach my $id2 (keys %{$system_start_date{$sys_id}}) {
|
||||
|
||||
next if $id2 eq $id ;
|
||||
my $t1 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 21<12
|
||||
my $t2 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 22<12
|
||||
my $t3 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 21<11
|
||||
my $t4 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 22<11
|
||||
|
||||
if (($t1 and not $t2) or ($t3 and not $t4) or (not $t3 and $t2) or ($t3 and not $t2)) {
|
||||
my $system_name = qq~$db{$check_table}{$sys_id}{name}~ ;
|
||||
$system_name .= qq~ ($db{$check_table}{$sys_id}{description})~ if $db{$check_table}{$sys_id}{description} ;
|
||||
|
||||
if ($get_periods) {
|
||||
$overlap_dates{$sys_id}{$id2} = "$db{$table}{$id2}{date_from} - $db{$table}{$id2}{date_to}" ;
|
||||
} else {
|
||||
$trigger_jquery_raw .= qq~
|
||||
noty({text:'System $system_name and cannot be used in both event $db{$table}{$id}{ref} and $db{$table}{$id2}{ref} as the times ovelap!!',layout:"center",type:"error",timeout:30000}) ;
|
||||
~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$seen_system_id{$sys_id} = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
159
libs/modules/cfg.pm
Normal file
159
libs/modules/cfg.pm
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
require cfg_paths ;
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
$useropts{domain} = "https://$ENV{SERVER_NAME}" ;
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
use session ;
|
||||
&check_session ;
|
||||
&session_state ;
|
||||
&config_set_vars;
|
||||
&check_access;
|
||||
&config_set_paths ;
|
||||
&config_set_breadcrumbs ;
|
||||
&config_common_html ;
|
||||
# &check_ticket_inbox ;
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
sub check_ticket_inbox {
|
||||
|
||||
# return unless $useropts{super}{$username} || $useropts{boss}{$username} || $useropts{it}{$username} ;
|
||||
|
||||
my $xtra_sql_where = (!$useropts{super}{$username} && !$useropts{boss}{$username} && !$useropts{it}{$username} && !$useropts{tickets}{$username}) ? " AND staff_id = '$userid'" : '' ;
|
||||
|
||||
&db_min_ro('tickets','COUNT(unique_id) AS ActiveTickets',"completed = '0' AND responded = '0'$xtra_sql_where",'','') ;
|
||||
|
||||
foreach my $count (keys %{$db{tickets}}) {
|
||||
our $activetickets = "$db{tickets}{$count}{ActiveTickets}" ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub session_state {
|
||||
|
||||
if ($ENV{SCRIPT_NAME} =~ m/index.pl/gi) { return ; }
|
||||
if ($ENV{SCRIPT_NAME} =~ m/cron/gi) { return ; }
|
||||
if ($ENV{SCRIPT_NAME} =~ m/get/gi) { return ; }
|
||||
|
||||
unless ($session_state eq 'active') { print 'Status: 302 Moved', "\r\n", "Location: https://$ENV{SERVER_NAME}/", "\r\n\r\n" ; }
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_session_state {
|
||||
|
||||
# if ($ENV{SCRIPT_NAME} eq '/index.pl') { return ; }
|
||||
# if (($ENV{SCRIPT_NAME} =~ m/admin/g) or ($skip_relocate)) { $skip_relocate = 1 ; return ; }
|
||||
|
||||
# if (($session_state eq 'expired') or ($session_state eq 'empty')) {
|
||||
# print 'Status: 302 Moved', "\r\n", "Location: http://$ENV{SERVER_NAME}/", "\r\n\r\n" ;
|
||||
# }
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub check_access {
|
||||
|
||||
# return unless $pixellot_limit{$username} || $events_limit{$username} || $is_operator || $usertype eq 'external' || $usertype eq 'schools_manager' ;
|
||||
return if $glod_user_level >= 5 ;
|
||||
|
||||
# my $path_prefix_ = '/cgi-bin/scripts/' ;
|
||||
my $path_prefix_ = $useropts{'scripts'} . '/' ;
|
||||
|
||||
if ($events_limit{$username} || $glod_user_level >= 4){
|
||||
$exempt_script{$path_prefix_ . 'costings_detailed_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'costings_summary_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'events_detailed_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'events_summary_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'operators_summary_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'operators_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'event_quotes_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'pdf/event_quote_pdf.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'stock_report.pl'} = 1 ;
|
||||
}
|
||||
|
||||
$exempt_script{$path_prefix_ . 'index.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'cameras.pl'} = 1 if ($pixellot_limit{$username} || $events_limit{$username}) ;
|
||||
$exempt_script{$path_prefix_ . 'cameras_report.pl'} = 1 if ($pixellot_limit{$username} || $events_limit{$username}) ;
|
||||
$exempt_script{$path_prefix_ . 'delivered_report.pl'} = 1 if ($pixellot_limit{$username} || $events_limit{$username}) ;
|
||||
|
||||
$exempt_query{''} = 1 ;
|
||||
$exempt_query{'list'} = 1 ;
|
||||
|
||||
if ($glod_user_level > 0) {
|
||||
$exempt_script{$path_prefix_ . 'logistics_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'logistics_report_test.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'calendar.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_db_cal_events.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'fixed_systems_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/events.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'calibration_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'calibration_report_test.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'calibration_status_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/calibration_status_report_uploads.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_logistics_item.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_poc.pl'} = 1 ;
|
||||
$exempt_query{$ENV{QUERY_STRING}} = 1 ;
|
||||
}
|
||||
|
||||
if ($glod_user_level > 1) {
|
||||
$exempt_script{$path_prefix_ . 'event_quotes.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'event_quotes_test.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_event_quote_conflicts.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_event_quote_conflicts_test.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_venues_from_region.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_cities_from_region.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_delete_attach.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_roe.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_city.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_school.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_sport_type.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_club.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/add_operator.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/event_email.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'dialog/email.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'pdf/event_details_pdf.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_poc_or_recipient_contact_nr.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_country_from_region.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_region_country_from_client.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_sss_teams_from_client.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_regions_from_country.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_sss_teams_from_region.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_region_from_city.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'get/get_country_and_region_from_city.pl'} = 1 ;
|
||||
# $exempt_script{$path_prefix_ . 'get/get_cities_from_country.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'set_up_groups_report.pl'} = 1 ;
|
||||
|
||||
$exempt_query{$ENV{QUERY_STRING}} = 1 ;
|
||||
$exempt_query{'edit'} = 1 ;
|
||||
$exempt_query{'add'} = 1 ;
|
||||
$exempt_query{'view'} = 1 ;
|
||||
$exempt_query{'copy'} = 1 ;
|
||||
$exempt_query{'search'} = 1 ;
|
||||
}
|
||||
|
||||
if ($glod_user_level > 2) {
|
||||
$exempt_script{$path_prefix_ . 'operators.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'monitoring_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'temp_calibrator_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'mobile_site_surveys_report.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'mobile_system_tracking_report.pl'} = 1 ;
|
||||
}
|
||||
|
||||
if ($usertype eq 'support') {
|
||||
$exempt_script{$path_prefix_ . 'demos.pl'} = 1 ;
|
||||
}
|
||||
|
||||
if ($is_dcb_partner) {
|
||||
%exempt_script = () ;
|
||||
$exempt_script{$path_prefix_ . 'index.pl'} = 1 ;
|
||||
$exempt_script{$path_prefix_ . 'logistics_report.pl'} = 1 ;
|
||||
}
|
||||
|
||||
unless ($exempt_script{$ENV{SCRIPT_NAME}}) { print "Content-type: text/html\n\n"; require '401.pm' ; exit ; }
|
||||
unless ($exempt_query{$ENV{QUERY_STRING}} || length($ENV{QUERY_STRING}) > 10) { print "Content-type: text/html\n\n"; require '401.pm' ; exit ; }
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
246
libs/modules/cfg_paths.pm
Normal file
246
libs/modules/cfg_paths.pm
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
sub config_set_vars {
|
||||
|
||||
# $useropts{title} = 'AI Sport Africa Admin | ' . ucfirst $username ;
|
||||
# $title = $useropts{title} ;
|
||||
|
||||
$useropts{acronym} = 'AISA' ;
|
||||
$useropts{short} = 'AI Sport Africa' ;
|
||||
$useropts{title} = ($env eq 'DEV') ? "*DEV* " : '' ;
|
||||
$useropts{title} .= "$useropts{short} Admin | " . ucfirst $username ;
|
||||
$title = $useropts{title} ;
|
||||
$useropts{salt} = '1Tv4dM1n' ;
|
||||
$useropts{company} = "$useropts{short} (Pty) Ltd" ;
|
||||
$useropts{lc} = lc $useropts{acronym} ;
|
||||
# $useropts{logo} = 'itv_logo.jpg' ;
|
||||
$useropts{logo} = 'aisa_logo.jpg' ;
|
||||
$useropts{domainpart} = 'itvadmin' ;
|
||||
$useropts{table_id} = 'itv-table' ;
|
||||
$useropts{web} = 'itvadmin.co.za' ;
|
||||
$useropts{address1} = '16 Wessel Road, Unit 3' ;
|
||||
$useropts{address2} = 'Eden Gardens' ;
|
||||
$useropts{address3} = 'Rivonia' ;
|
||||
$useropts{city} = 'Johannesburg' ;
|
||||
$useropts{post_code} = '2128' ;
|
||||
# $useropts{cell} = '+27 83 653 9151' ;
|
||||
$useropts{tel} = '+27 10 534 7011' ;
|
||||
$useropts{vat_nr} = '4280292691' ;
|
||||
$useropts{co_reg} = '2020/535585/07' ;
|
||||
$useropts{email} = 'info@aisport.africa' ;
|
||||
# $useropts{linkcolor} = '#0092dc' ;
|
||||
# $useropts{infocolor} = '#039deb' ;
|
||||
# $useropts{primarycolor} = '#00559b' ;
|
||||
# $useropts{pdfcolor} = '#0098e3' ;
|
||||
|
||||
$useropts{boss}{'vivian'} = 1 ;
|
||||
$useropts{boss}{'shaun'} = 1 ;
|
||||
$useropts{boss}{'rory'} = 1 ;
|
||||
|
||||
$useropts{super}{'rory'} = 1 ;
|
||||
$useropts{super}{'handre'} = 1 ;
|
||||
$useropts{super}{'vivian'} = 1 ;
|
||||
$useropts{super}{'shaun'} = 1 ;
|
||||
|
||||
# $useropts{tickets}{'dom'} = 1 ;
|
||||
# $useropts{tickets}{'erin'} = 1 ;
|
||||
# $useropts{tickets}{'cristy'} = 1 ;
|
||||
|
||||
$useropts{it}{'rory'} = 1 ;
|
||||
$useropts{it}{'handre'} = 1 ;
|
||||
$useropts{it}{'jean'} = 1 ;
|
||||
|
||||
$pixellot_limit{'connor'} = 1 ;
|
||||
|
||||
$events_limit{$username} = 1 if ($usertype eq 'nonquote');
|
||||
|
||||
our $glod_user_level = ($usertype eq 'manager' || $usertype eq 'senior_manager' || $usertype eq 'it') ? 5 : 0 ; # max
|
||||
|
||||
our $is_installation_partner = ($usertype eq 'installation_partner') ? 1 : 0 ;
|
||||
our $is_dcb_partner = ($usertype eq 'dcb_partner') ? 1 : 0 ;
|
||||
our $is_schools_manager = ($usertype eq 'schools_manager') ? 1 : 0 ;
|
||||
our $is_operator = (substr($usertype,0,6) eq 'casual') ? 1 : 0 ;
|
||||
our $is_temp_calibrator = ($usertype eq 'casual_calibrator') ? 1 : 0 ;
|
||||
our $operator_level = ($is_operator && (substr($usertype,-1,1) eq 'a' || substr($usertype,-10,10) eq 'calibrator')) ? 1 : ($is_operator && substr($usertype,-1,1) eq 'b') ? 2 : ($is_operator && substr($usertype,-1,1) eq 'c') ? 3 : 0 ;
|
||||
|
||||
if ($is_operator && $operator_level) {
|
||||
$glod_user_level = $operator_level ;
|
||||
} elsif ($usertype eq 'external' || $usertype eq 'installation_partner' || $usertype eq 'dcb_partner') {
|
||||
$glod_user_level = 1 ;
|
||||
} elsif ($usertype eq 'schools_manager' || $usertype eq 'support') {
|
||||
$glod_user_level = 2 ;
|
||||
# } elsif ($events_limit{$username} || $usertype eq 'permanent' || $username eq 'cristy' || $username eq 'dom') {
|
||||
} elsif ($events_limit{$username} || $usertype eq 'permanent') {
|
||||
$glod_user_level = 4 ;
|
||||
}
|
||||
|
||||
our $smtp_server = 'smtp.interactivetvafrica.com';
|
||||
$email_add{'tickets'} = 'tickets@interactivetvafrica.com' ;
|
||||
our $send_mail_psw = 'vf1VBE6AGuPE' ;
|
||||
$email_add{'events'} = 'events@interactivetvafrica.com' ;
|
||||
our $send_mail_psw_events = 'ickxadYgbZ)X' ;
|
||||
our $email_reply_to = 'marizen@aisport.africa' ;
|
||||
our %email_events = () ;
|
||||
$email_events{1} = 'marizen@aisport.africa' ;
|
||||
$email_events{2} = 'cristy@aisport.africa' ;
|
||||
$email_events{3} = 'dom@aisport.africa' ;
|
||||
$email_events{4} = 'erin@aisport.africa' ;
|
||||
$email_events{5} = 'techsupport@aisport.africa' ;
|
||||
$email_events{6} = 'dan@aisport.africa' ;
|
||||
$email_events{7} = 'mitheel@aisport.africa' ;
|
||||
$email_events{8} = 'mikhaar@aisport.africa' ;
|
||||
$email_events{9} = 'daniel@aisport.africa' ;
|
||||
$email_events{10} = 'events@kre8it.co.za' ;
|
||||
our $email_it_1 = 'rory@kre8it.co.za' ;
|
||||
our $email_it_2 = 'handre@kre8it.co.za' ;
|
||||
our $email_accounts = 'viv@aisport.africa' ;
|
||||
|
||||
our $afrihost_smtp = 'mail.aisport.africa';
|
||||
our $afrihost_psw = 'Events@2025' ;
|
||||
our $afrihost_port = 465 ;
|
||||
our $afrihost_from = 'events@aisport.africa' ;
|
||||
|
||||
our $gmail_smtp = 'smtp.googlemail.com';
|
||||
our $gmail_psw = 'AISA@Events1+' ;
|
||||
our $gmail_port = 465 ;
|
||||
our $gmail_from = 'aisportafrica@gmail.com' ;
|
||||
|
||||
our ($subdomain,$domain,$ext) = split(/\./,$ENV{SERVER_NAME}) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_set_paths {
|
||||
|
||||
# $cgipath = "/home/libs" ;
|
||||
# $htmlpath = "/var/www/html" ;
|
||||
# $htmlpath_sss = "/var/www/sssadmin.co.za/public_html" ;
|
||||
|
||||
# $useropts{'scripts'} = '/cgi-bin/scripts';
|
||||
$useropts{'folder'} = '';
|
||||
|
||||
$useropts{'js'} = '/js' ;
|
||||
$useropts{'css'} = '/css' ;
|
||||
$useropts{'img'} = '/img' ;
|
||||
$useropts{'fonts'} = '/fonts' ;
|
||||
$useropts{'bower_components'} = '/bower_components' ;
|
||||
$useropts{'mail'} = '/mail' ;
|
||||
|
||||
$mailpath = "$cgipath/data/mail" ;
|
||||
|
||||
our $mysqlbakpath = "/home/mysqlbak";
|
||||
|
||||
our $pdfpath = $htmlpath . '/pdf' ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_common_html {
|
||||
|
||||
# .controls .form-control { height:24px; } .chosen-container { position:relative;max-width:100%; }
|
||||
|
||||
# ---------------- spacelab --------------------------------------------------------------------------
|
||||
|
||||
# $useropts{'common'}{'css'} = qq(tbody tr td { font-size: 11px; }
|
||||
# .control-label { font-size:12px; } .controls .form-control { height:24px;font-size:12px; } .controls span.input-group-addon { padding:0px 5px 0px 5px;font-size:12px; } textarea.form-control { font-size:12px; } .chosen-container { position:relative;max-width:100%; } .controls table { font-size:12px; }
|
||||
# .waybill-dialog .modal-dialog { width: 94%; }
|
||||
# .medium-dialog .modal-dialog { width: 76%; }
|
||||
# .table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#EAEAEA}
|
||||
# label { margin-top:5px; }
|
||||
# form-control{ padding:8px 12px; }
|
||||
# ) ;
|
||||
|
||||
# ---------------- darkly ----------------------------------------------------------------------------
|
||||
|
||||
our $main_bg_color = ($env eq 'DEV') ? 'red' : '#5e5e5e' ;
|
||||
|
||||
$useropts{'common'}{'css'} = qq~tbody tr td { font-size: 11px; }
|
||||
.control-label { font-size:12px; } .controls .form-control { height:24px;font-size:12px; } .controls span.input-group-addon { padding:0px 5px 0px 5px;font-size:12px; } textarea.form-control { font-size:12px; } .chosen-container { position:relative;max-width:100%; }
|
||||
.controls table { font-size:12px; }
|
||||
.label { font-size:12px; }
|
||||
.fc-event { font-size:12px; }
|
||||
.form-control, input, textarea { border: 1px solid #AAAAAA; }
|
||||
.max-dialog .modal-dialog { width: 99%; }
|
||||
.waybill-dialog .modal-dialog { width: 94%; }
|
||||
.medium-dialog .modal-dialog { width: 76%; }
|
||||
.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#EAEAEA; color:#222222; }
|
||||
.table-striped>tbody>tr:nth-child(even)>td,.table-striped>tbody>tr:nth-child(even)>th{ background-color:#a4a2a2; color:#ffffff; }
|
||||
.table-striped>tbody>tr:nth-child(odd)>td a:not(.btn) { text-decoration: none; color: #708399; font-weight: bold; }
|
||||
.table-striped>tbody>tr:nth-child(even)>td a:not(.btn) { text-decoration: none; color: #708399; }
|
||||
.chosen-container, .help-block { color:#222222; }
|
||||
label { margin-top:5px; }
|
||||
form-control{ padding:8px 12px; }
|
||||
.box-header { background: #5e5e5e ; }
|
||||
.modal-body, .modal-footer { background-color: #ffffff ; border-top: 1px solid #ffffff; }
|
||||
.modal-header { border-bottom: 1px solid #ffffff; }
|
||||
.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}
|
||||
hr { border-top: 2px solid #5e5e5e; }
|
||||
body { background-color:#ffffff; color:#222222; }
|
||||
.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}
|
||||
.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}
|
||||
.ffinline { display:inline-block; }
|
||||
.form-control { height:12px;padding:2px 8px;font-size:12px; }
|
||||
.search-query { height: 35px; padding: 10px 15px; font-size: 13px; width: 75%; margin-top: 4px; }
|
||||
.alert-info a { color:#80BEE8 ;}
|
||||
.alert-info a:hover { color:#ffffff;text-decoration:none;}
|
||||
th.dt-center, td.dt-center { text-align: center; }
|
||||
th.dt-right, td.dt-right { text-align: right; }
|
||||
#atalist .form-control,#spinvlist .form-control,#clientvatlist .form-control,#clientinvlist .form-control,#storagelist .form-control { height:25px;padding:2px 5px;font-size:12px;color:#464545; }
|
||||
.saccidate { width: 120px; }
|
||||
.tooltip {white-space:normal}
|
||||
~ ;
|
||||
|
||||
$useropts{'common'}{'css'} .= qq~.navbar-default { background-color: $main_bg_color; } .navbar-default .navbar-nav > li > a { color: white; }~ if $env eq 'DEV' ;
|
||||
|
||||
# $useropts{'common'}{'css'} .= qq~
|
||||
# .buttons .glyphicons:before { padding: 0px; }
|
||||
# ~;
|
||||
|
||||
# .search-query { height:43px;padding:10px 15px;font-size:14px;width:70%; }
|
||||
|
||||
my $menu_list_leave = qq(<li><a href="$useropts{'folder'}/list-leave">List Leave</a></li>);
|
||||
my $menu_leave_settings = qq(<li><a href="$useropts{'folder'}/list-leave-settings">Leave Settings</a></li>);
|
||||
my $menu_leave_report = qq(<li><a href="$useropts{'folder'}/leave-report">Leave Report</a></li>);
|
||||
our $menu_leave = '' ;
|
||||
|
||||
my $menu_list_weekend = qq(<li><a href="$useropts{'folder'}/list-weekend">Weekend Work</a></li>);
|
||||
my $menu_weekend_report = qq(<li><a href="$useropts{'folder'}/weekend-report">Weekend Report</a></li>);
|
||||
our $menu_weekend = '' ;
|
||||
|
||||
# if ($useropts{super}{lc $username}){
|
||||
if ($useropts{boss}{lc $username}){
|
||||
$menu_leave = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_leave
|
||||
$menu_leave_settings
|
||||
$menu_leave_report
|
||||
);
|
||||
$menu_weekend = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_weekend
|
||||
$menu_weekend_report
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu_leave = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_leave_report
|
||||
);
|
||||
$menu_weekend = qq(
|
||||
<li class="divider"></li>
|
||||
$menu_list_weekend
|
||||
);
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub config_set_breadcrumbs {
|
||||
|
||||
our $curr_crumb = $ENV{REQUEST_URI} ;
|
||||
$curr_crumb =~ s/\///g ;
|
||||
@curr_crumb = split(/\-/,$curr_crumb) ;
|
||||
@curr_crumb_ucf = map(ucfirst, map(lc,@curr_crumb));
|
||||
$curr_crumb = join(' ', @curr_crumb_ucf);
|
||||
|
||||
$useropts{'breadcrumbs'} = qq(<div><ul class="breadcrumb"><li><a href="$useropts{'folder'}/">Home</a></li>$insert_crumbs<li><a href="$useropts{'folder'}$ENV{REQUEST_URI}">$curr_crumb</a></li></ul></div>) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
1912
libs/modules/common.pm
Normal file
1912
libs/modules/common.pm
Normal file
File diff suppressed because it is too large
Load Diff
3123
libs/modules/common_min.pm
Normal file
3123
libs/modules/common_min.pm
Normal file
File diff suppressed because it is too large
Load Diff
1428
libs/modules/common_test.pm
Normal file
1428
libs/modules/common_test.pm
Normal file
File diff suppressed because it is too large
Load Diff
54
libs/modules/csv.pm
Normal file
54
libs/modules/csv.pm
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
sub csv_create_new_file {
|
||||
|
||||
my ($filepath,$filename,$seperator) = @_ ;
|
||||
|
||||
use Text::CSV;
|
||||
|
||||
return if !$filepath || !$filename ;
|
||||
|
||||
unlink "$filepath/$filename" or die "Cannot remove $filepath/$filename: $!" if -e "$filepath/$filename" ;
|
||||
|
||||
$seperator = ';' unless $seperator ;
|
||||
|
||||
our $csv = Text::CSV->new({ binary => 1, sep_char => $seperator, eol => "\n" }) or die "Cannot use CSV: " . Text::CSV->error_diag();
|
||||
|
||||
open(our $fh, ">", "$filepath/$filename") or die "Cannot open $filepath/$filename: $!";
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub csv_write_in_file {
|
||||
|
||||
my ($row) = @_ ;
|
||||
$csv->print($fh, $row);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub csv_close_file {
|
||||
|
||||
my ($filepath) = @_ ;
|
||||
close $fh or die "Cannot close $filepath: $!";
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub csv_clear_folder {
|
||||
|
||||
my ($path,$name_to_look_for) = @_ ;
|
||||
|
||||
return unless -d $path ;
|
||||
|
||||
opendir(DIR, "$path") or die "cant open Directory $path: $!\n";
|
||||
|
||||
while(defined($folder = readdir(DIR))) {
|
||||
if (length $folder > 2) {
|
||||
my ($file,$type) = split(/\./,$folder) ;
|
||||
if ((-e "$path/$file.csv" && !$name_to_look_for) || ($name_to_look_for && -e "$path/$file.csv" && $file =~ /$name_to_look_for/)) {
|
||||
unlink ("$path/$file.csv") or print "unable to unlink - $path/$file.csv : $!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(DIR) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
98
libs/modules/db.pm
Normal file
98
libs/modules/db.pm
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
use db_min ;
|
||||
|
||||
sub db_open_ro {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
my ($db,$dbhost,$dbuser,$dbpass) = &ops_db_credentials($sys) ;
|
||||
|
||||
my $connstr = "DBI:mysql:database=$db;host=$dbhost;" ;
|
||||
|
||||
$dbh = DBI->connect($connstr,$dbuser,$dbpass) or die $DBI::errstr;
|
||||
|
||||
&common_debug("db_open_ro:$connstr") ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_open_upd {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
my ($db,$dbhost,$dbuser,$dbpass) = &ops_db_credentials($sys) ;
|
||||
|
||||
my $connstr = "DBI:mysql:database=$db;host=$dbhost;" ;
|
||||
|
||||
$dbh = DBI->connect($connstr,$dbuser,$dbpass, { RaiseError => 1, AutoCommit => 1 } ) or die "Unable to connect, $DBI::errstr";
|
||||
$dbh->{LongReadLen} = 1000 ;
|
||||
|
||||
&common_debug("db_open_upd:$connstr") ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_close_conn {
|
||||
|
||||
if ($db_ignore_open_close) { return ; }
|
||||
|
||||
$dbh->disconnect();
|
||||
|
||||
&common_debug('db_close_conn:$dbh->disconnect();') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_switch_conn {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
$db_ignore_open_close = 0 ;
|
||||
&db_close_conn ;
|
||||
&db_open_upd($sys) ;
|
||||
$db_ignore_open_close = 1 ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub ops_db_credentials {
|
||||
|
||||
my ($sys) = @_ ;
|
||||
|
||||
my $db = "itv_admin_db";
|
||||
my $dbhost = "localhost";
|
||||
my $dbuser = "itv_admin_user";
|
||||
my $dbpass = '!Ja16Q7P0X3SVTWr';
|
||||
|
||||
if ($env eq 'DEV') {
|
||||
$db = 'dev_aisa' ;
|
||||
$dbhost = 'localhost' ;
|
||||
$dbuser = 'dev_aisa_user' ;
|
||||
$dbpass = 'L0rdJ35u5R31gN51vQow*!' ;
|
||||
}
|
||||
|
||||
if ($sys eq 'sss') {
|
||||
$db = "sss_admin_db";
|
||||
$dbhost = "localhost";
|
||||
$dbuser = "sss_admin_user";
|
||||
$dbpass = 'bVrC2kyGJ8ZO0oVe!';
|
||||
|
||||
if ($env eq 'DEV') {
|
||||
$db = 'dev_sss' ;
|
||||
$dbhost = 'localhost' ;
|
||||
$dbuser = 'dev_sss_user' ;
|
||||
$dbpass = 'L0rdJ35u5R31gN51vQow*!' ;
|
||||
}
|
||||
}
|
||||
|
||||
return ($db,$dbhost,$dbuser,$dbpass) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_uniq {
|
||||
|
||||
my %seen;
|
||||
grep !$seen{$_}++, @_;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
269
libs/modules/db_min.pm
Normal file
269
libs/modules/db_min.pm
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
sub db_min_upd {
|
||||
|
||||
my ($table,$where) = @_ ;
|
||||
|
||||
our $set = '' ;
|
||||
|
||||
foreach (keys %i) {
|
||||
if (substr($_,0,3) eq 'new') { next ; }
|
||||
if ($ignore{$_}) { next ; }
|
||||
if ($hidden{$_} == 1) { next ; }
|
||||
if ($i{$_} =~ /\"/) { $set .= qq(`$_`='$i{$_}',) ; } elsif ($i{$_} eq 'NULL') { $set .= qq(`$_`=$i{$_},) ; } else { $set .= qq(`$_`="$i{$_}",) ; }
|
||||
}
|
||||
|
||||
$set = substr($set,0,-1) ;
|
||||
|
||||
unless ($set) { return ; }
|
||||
|
||||
&db_open_upd ;
|
||||
|
||||
my $sql = qq(UPDATE $table SET $set WHERE $where) ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
if ($testing == 1 && $useropts{it}{$username}) { &common_debug(">>>>>> *** TESTING, DB NOT UPDATED *** <<<<<<") ; return ; }
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
$success = qq($i{id} SUCCESSFULLY SAVED) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_insert {
|
||||
|
||||
my ($table) = @_ ;
|
||||
|
||||
my $columns = '' ;
|
||||
my $values = '' ;
|
||||
|
||||
foreach (keys %i) {
|
||||
if ($ignore{$_}) { next ; }
|
||||
if ($hidden{$_} == 1) { next ; }
|
||||
$columns .= qq(`$_`,) ;
|
||||
if ($i{$_} =~ /\"/) { $values .= qq('$i{$_}',) ; } elsif ($i{$_} eq 'NULL') { $values .= qq(`$_`=$i{$_},) ; } else { $values .= qq("$i{$_}",) ; }
|
||||
}
|
||||
|
||||
$columns = substr($columns,0,-1) ;
|
||||
$values = substr($values,0,-1) ;
|
||||
|
||||
&db_open_upd ;
|
||||
|
||||
my $sql = qq(INSERT INTO $table ($columns) VALUES ($values) ;) ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
if ($testing == 1 && $useropts{it}{$username}) { &common_debug(">>>>>> *** TESTING, DB NOT UPDATED *** <<<<<<") ; return ; }
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
our $new_row_id = $dbh->last_insert_id(undef, undef, $table, 'id') ; # or die "no insert id?";
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
$success = qq($i{id} SUCCESSFULLY SAVED) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_delete {
|
||||
|
||||
my ($table,$where) = @_ ;
|
||||
|
||||
&db_open_upd ;
|
||||
|
||||
my $sql = qq(DELETE FROM $table WHERE $where) ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
if ($testing == 1 && $useropts{it}{$username}) { &common_debug(">>>>>> *** TESTING, DB NOT UPDATED *** <<<<<<") ; return ; }
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
$success = qq($i{id} SUCCESSFULLY DELETED) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_ro {
|
||||
|
||||
my ($table,$select,$where,$orderby,$limit) = @_ ;
|
||||
|
||||
if ($where) { $where = 'WHERE ' . $where ; }
|
||||
if ($limit) { $limit = 'LIMIT ' . $limit ; }
|
||||
if ($orderby) { $orderby = 'ORDER BY ' . $orderby ; }
|
||||
|
||||
&db_open_ro ;
|
||||
|
||||
my $sql = qq(SELECT $select FROM $table $where $orderby $limit) ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
my $sth = $dbh->prepare($sql) ;
|
||||
|
||||
$sth -> execute() or die "Could not execute SQL statement $sql ... maybe invalid? $!";
|
||||
|
||||
$col_cnt=0;
|
||||
|
||||
foreach $col (@{$sth->{NAME}}) { $col_name{$col_cnt}=$col; $col_cnt++; } # &common_debug($col); NB *** must be before fetchall_arrayref
|
||||
|
||||
my $rows_array_ref = $sth->fetchall_arrayref();
|
||||
|
||||
$sth->finish();
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
$db{$table} = () ; $done_col_val{$table} = () ;
|
||||
|
||||
foreach $row (@$rows_array_ref) {
|
||||
for (0 .. $col_cnt){
|
||||
if ($done_col_val{$table}{@$row[0]}{$col_name{$_}}) { next; }
|
||||
# &common_debug("db_common_ro - [$_] [$table] [@$row[0]] [$col_name{$_}] [@$row[$_]]") ;
|
||||
$db{$table}{@$row[0]}{$col_name{$_}} = @$row[$_] ;
|
||||
$done_col_val{$table}{@$row[0]}{$col_name{$_}} = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_raw {
|
||||
|
||||
my ($sql) = @_ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
if ($testing == 1 && $useropts{it}{$username}) { &common_debug(">>>>>> *** TESTING, DB NOT UPDATED *** <<<<<<") ; return ; }
|
||||
|
||||
my $sth = $dbh->prepare($sql) ;
|
||||
|
||||
$sth->execute() or die "Could not execute SQL statement $sql ... maybe invalid? $!";
|
||||
|
||||
our $col_cnt=0;
|
||||
|
||||
foreach $col (@{$sth->{NAME}}) { $col_name{$col_cnt}=$col; $col_cnt++; } # &common_debug($col); NB *** must be before fetchall_arrayref
|
||||
|
||||
our $rows_array_ref = $sth->fetchall_arrayref();
|
||||
|
||||
$sth->finish();
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_copy {
|
||||
|
||||
my ($table,$id) = @_ ;
|
||||
|
||||
&db_open_upd ;
|
||||
|
||||
our $db_ignore_open_close = 1 ; # do one open and one close instead of repeating it
|
||||
|
||||
$i{id} = &db_min_get_max($table,'id') ;
|
||||
|
||||
my $add_upd_sql = '' ;
|
||||
if ($table eq 'quotes' or $table eq 'event_quotes'){
|
||||
$i{quote_nr} = &db_min_get_max($table,'quote_nr') ;
|
||||
$add_upd_sql = qq~, `quote_nr`='$i{quote_nr}'~;
|
||||
}
|
||||
|
||||
if ($table eq 'cameras'){
|
||||
$i{camera_nr} = &db_min_get_max_camera_nr($table,'camera_nr',$id) ;
|
||||
$add_upd_sql = qq~, `camera_nr`='$i{camera_nr}'~;
|
||||
}
|
||||
|
||||
my $sql = qq~CREATE TEMPORARY TABLE `#temp` SELECT * FROM $table WHERE `id`='$id';~ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
$sql = qq~UPDATE `#temp` SET `id`='$i{id}'$add_upd_sql WHERE `id`='$id';~ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
$sql = qq~INSERT INTO $table SELECT * FROM `#temp` WHERE `id`='$i{id}';~ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
$sql = qq~DROP TEMPORARY TABLE IF EXISTS `#temp`;~ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
$sth = $dbh -> do ($sql) or die "could not execute :<BR>$sql<BR>$!" ;
|
||||
|
||||
$db_ignore_open_close = 0 ; # do one open and one close instead of repeating it
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
$success = qq($id SUCCESSFULLY COPIED TO $i{id}) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_get_max_camera_nr {
|
||||
|
||||
my ($table,$orderby,$camera_id) = @_ ;
|
||||
|
||||
&db_min_ro($table,'id,camera_system_id',"`id`='$camera_id'",'','') ;
|
||||
# &db_min_ro($table,'id,camera_nr',"`camera_system_id`='$db{$table}{$camera_id}{camera_nr}'",'`id` DESC',1) ;
|
||||
&db_min_ro($table,'id,camera_nr',"`camera_system_id`='$db{$table}{$camera_id}{camera_system_id}'",'`id` DESC',1) ;
|
||||
|
||||
my $max_cam_cnt = 0 ;
|
||||
|
||||
foreach my $id (keys %{$db{$table}}) {
|
||||
($cam_type,$cam_cnt) = split(/\-/,$db{$table}{$id}{camera_nr});
|
||||
$max_cam_cnt = $cam_cnt unless $max_cam_cnt > $cam_cnt;
|
||||
}
|
||||
|
||||
$max_cam_cnt++;
|
||||
|
||||
my $camera_nr = $cam_type . '-' . sprintf("%04s", $max_cam_cnt) ; # e.g. S1-0001
|
||||
|
||||
return ($camera_nr) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub db_min_get_max {
|
||||
|
||||
my ($table,$orderby,$where) = @_ ;
|
||||
|
||||
&db_open_ro ;
|
||||
|
||||
if ($where) { $where = 'WHERE ' . $where ; }
|
||||
|
||||
my $sql = qq~SELECT * FROM $table $where ORDER BY $orderby DESC LIMIT 1~ ;
|
||||
|
||||
&common_debug($sql) ;
|
||||
|
||||
my $sth = $dbh->prepare($sql) ;
|
||||
|
||||
$sth -> execute() or die "Could not execute SQL statement $sql ... maybe invalid? $!";
|
||||
|
||||
$col_cnt=0;
|
||||
|
||||
foreach $col (@{$sth->{NAME}}) { $col_name{$col_cnt}=$col; $col_cnt++; } # &common_debug($col); NB *** must be before fetchall_arrayref
|
||||
|
||||
my $rows_array_ref = $sth->fetchall_arrayref();
|
||||
|
||||
$sth->finish();
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
my $new_id = 1 ;
|
||||
|
||||
$db{$table} = () ;
|
||||
|
||||
foreach $row (@$rows_array_ref) {
|
||||
for (0 .. $col_cnt){
|
||||
$db{$table}{@$row[0]}{$col_name{$_}} = @$row[$_] ;
|
||||
}
|
||||
$new_id = $db{$table}{@$row[0]}{$orderby} ;
|
||||
$new_id++ ;
|
||||
}
|
||||
|
||||
return ($new_id) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
525
libs/modules/dcb.pm
Normal file
525
libs/modules/dcb.pm
Normal file
|
|
@ -0,0 +1,525 @@
|
|||
|
||||
sub dcb_trackntrace {
|
||||
|
||||
my ($waybillNumber) = @_ ;
|
||||
|
||||
our $soapenvelope = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<TracknTrace xmlns="http://tempuri.org/">
|
||||
<!-- Optional -->
|
||||
<request>
|
||||
<enPassword xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"></enPassword>
|
||||
<enUsername xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"></enUsername>
|
||||
<waybillNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$waybillNumber</waybillNumber>
|
||||
</request>
|
||||
</TracknTrace>
|
||||
</soap:Body>
|
||||
</soap:Envelope>~ ;
|
||||
|
||||
&common_debug("[API] dcb_trackntrace : [soapenvelope=$soapenvelope]") ;
|
||||
|
||||
&dcb_send_it('TracknTrace') ;
|
||||
&dcb_parse_it ;
|
||||
&dcb_read_it('TracknTrace') ;
|
||||
|
||||
# $returnxml = qq~<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
# <s:Body>
|
||||
# <TracknTraceResponse xmlns="http://tempuri.org/">
|
||||
# <TracknTraceResult xmlns:a="http://schemas.datacontract.org/2004/07/OMSIntegrate.Response" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||
# <a:ErrorCode i:nil="true"/>
|
||||
# <a:ErrorMessage>Completed</a:ErrorMessage>
|
||||
# <a:Waybill>
|
||||
# <a:BookingDate/>
|
||||
# <a:Comments i:nil="true"></a:Comments>
|
||||
# <a:ConsigneeName>DEV</a:ConsigneeName>
|
||||
# <a:ConsignorName>DARREN</a:ConsignorName>
|
||||
# <a:CurrentStatus>Proof of delivery</a:CurrentStatus>
|
||||
# <a:DeliveryDate>08052023</a:DeliveryDate>
|
||||
# <a:InsuredValue>0.00</a:InsuredValue>
|
||||
# <a:NumberOfParcels>1</a:NumberOfParcels>
|
||||
# <a:ReceiverAddressLine1>15 SIM ROAD</a:ReceiverAddressLine1>
|
||||
# <a:ReceiverAddressLine2>.</a:ReceiverAddressLine2>
|
||||
# <a:ReceiverCity>KEMPTON PARK</a:ReceiverCity>
|
||||
# <a:ReceiverContactName>DARREN</a:ReceiverContactName>
|
||||
# <a:ReceiverContactTel1>0834752596</a:ReceiverContactTel1>
|
||||
# <a:ReceiverName i:nil="true">ReceiverName TESTING</a:ReceiverName>
|
||||
# <a:ReceiverPostalCode>1619</a:ReceiverPostalCode>
|
||||
# <a:ReceiverSuburb>POMONA</a:ReceiverSuburb>
|
||||
# <a:SenderAddressLine1></a:SenderAddressLine1>
|
||||
# <a:SenderAddressLine2>.</a:SenderAddressLine2>
|
||||
# <a:SenderCity>KEMPTON PARK</a:SenderCity>
|
||||
# <a:SenderContactName>DEV</a:SenderContactName>
|
||||
# <a:SenderContactTel>0112302085</a:SenderContactTel>
|
||||
# <a:SenderPostalCode>1619</a:SenderPostalCode>
|
||||
# <a:SenderSuburb>POMONA</a:SenderSuburb>
|
||||
# <a:ServiceTypeCode>EC</a:ServiceTypeCode>
|
||||
# <a:ShipmentIsInsured>YES</a:ShipmentIsInsured>
|
||||
# <a:ShipperReference/>
|
||||
# <a:accNr>DCBDEVLP</a:accNr>
|
||||
# <a:additionalInformation xmlns:b="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities">
|
||||
# <b:AdditionalInformation>
|
||||
# <b:additionalInfoCode>overrideDefaultSubcontractor</b:additionalInfoCode>
|
||||
# <b:additionalInfoValue>no</b:additionalInfoValue>
|
||||
# <b:waybillNumber>Dn230505</b:waybillNumber>
|
||||
# </b:AdditionalInformation>
|
||||
# </a:additionalInformation>
|
||||
# <a:pod xmlns:b="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities"/>
|
||||
# <a:trackingDetail xmlns:b="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities">
|
||||
# <b:TrackingDetail>
|
||||
# <b:eventCode>PODCRE</b:eventCode>
|
||||
# <b:eventDate>09052023</b:eventDate>
|
||||
# <b:eventDescription>Waybill has been PODed</b:eventDescription>
|
||||
# <b:eventHubCode>JNB</b:eventHubCode>
|
||||
# <b:eventTime>0719</b:eventTime>
|
||||
# </b:TrackingDetail>
|
||||
# <b:TrackingDetail>
|
||||
# <b:eventCode>WBLCRE</b:eventCode>
|
||||
# <b:eventDate>05052023</b:eventDate>
|
||||
# <b:eventDescription>Waybill Dn230505 created in import</b:eventDescription>
|
||||
# <b:eventHubCode>JNB</b:eventHubCode>
|
||||
# <b:eventTime>0718</b:eventTime>
|
||||
# </b:TrackingDetail>
|
||||
# </a:trackingDetail>
|
||||
# <a:waybillDate>05052023</a:waybillDate>
|
||||
# <a:waybillNumber>Dn230505</a:waybillNumber>
|
||||
# </a:Waybill>
|
||||
# </TracknTraceResult>
|
||||
# </TracknTraceResponse>
|
||||
# </s:Body>
|
||||
# </s:Envelope>~ ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_postalcode {
|
||||
|
||||
our $soapenvelope = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<PostalCode xmlns="http://tempuri.org/">
|
||||
<request>
|
||||
<PostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$postal_code</PostalCode>
|
||||
<Suburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$suburb</Suburb>
|
||||
</request>
|
||||
</PostalCode>
|
||||
</soap:Body>
|
||||
</soap:Envelope>~ ;
|
||||
|
||||
&common_debug("[API] dcb_postalcode : [soapenvelope=$soapenvelope]") ;
|
||||
|
||||
&dcb_send_it('PostalCode') ;
|
||||
&dcb_parse_it ;
|
||||
&dcb_read_it('PostalCode') ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_savewabill {
|
||||
|
||||
my ($venue,$ft,$ev_id) = @_ ;
|
||||
|
||||
my $system_loc = $i{"system_location_$ft\_$ev_id"} ;
|
||||
my $supplier = $i{"logistics_supplier_id_$ft\_$ev_id"} ;
|
||||
my $status = $i{"status_$ft\_$ev_id"} ;
|
||||
my $waybill_nr = $i{"waybill_nr_$ft\_$ev_id"} ;
|
||||
my $items = $i{"item_$ft\_$ev_id"} ;
|
||||
my $poc = $i{"poc_$ft\_$ev_id"} ;
|
||||
my $special_instructions = $i{"special_instructions_$ft\_$ev_id"} ;
|
||||
|
||||
# my $dest = ($ft eq 'to') ? $db{organisations}{$venue}{name} : $db{logistics_locations}{$system_loc}{location} ;
|
||||
# my $orig = ($ft eq 'from') ? $db{organisations}{$venue}{name} : $db{logistics_locations}{$system_loc}{location} ;
|
||||
|
||||
my $dest = ($ft eq 'from') ? $db{logistics_locations}{$system_loc}{location} : ($routeCode) ? substr($routeCode,0,3) : $db{organisations}{$venue}{region_code} ;
|
||||
my $orig = ($ft eq 'to') ? $db{logistics_locations}{$system_loc}{location} : ($routeCode) ? substr($routeCode,0,3) : $db{organisations}{$venue}{region_code} ;
|
||||
|
||||
my ($poc_name,$poc_nr) = split(/\_/,$poc) ;
|
||||
|
||||
if ($dest =~ /ITV/) { $dest =~ s/\ITV//g ; $dest =~ s/ //g ; }
|
||||
elsif ($orig =~ /ITV/) { $orig =~ s/\ITV//g ; $orig =~ s/ //g ; }
|
||||
|
||||
# my $accountnumber = ($testdcd) ? 'DCBMAILBAG' : 'DI31F' ;
|
||||
my $accountnumber = ($testdcd) ? 'DCBMAILBAG' : 'DI31' ;
|
||||
|
||||
our $soapenvelope = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<savewabill xmlns="http://tempuri.org/">
|
||||
<!-- Optional -->
|
||||
<request>
|
||||
<AccNr xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$accountnumber</AccNr>
|
||||
<AddressLine1 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$address1</AddressLine1>
|
||||
<AddressLine2 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$address2</AddressLine2>
|
||||
<AddressLine3 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$address3</AddressLine3>
|
||||
<AddressLine4 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$address4</AddressLine4>
|
||||
<ContactNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$poc_nr</ContactNumber>
|
||||
<ContactPerson xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$poc_name</ContactPerson>
|
||||
<CustomerReferenceNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request"></CustomerReferenceNumber>
|
||||
<Date xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$dcbdate</Date>
|
||||
<DestHub xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$dest</DestHub>
|
||||
<Number xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$waybill_nr</Number>
|
||||
<OriginHub xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$orig</OriginHub>
|
||||
<PostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$postal_code</PostalCode>
|
||||
<Suburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$suburb</Suburb>
|
||||
<Reciever xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$db{organisations}{$venue}{name}</Reciever>
|
||||
<RouteCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$routeCode</RouteCode>
|
||||
<SpecialInstructions xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$special_instructions</SpecialInstructions>
|
||||
<serviceType xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">1</serviceType>
|
||||
</request>
|
||||
</savewabill>
|
||||
</soap:Body>
|
||||
</soap:Envelope>~ ;
|
||||
|
||||
&common_debug("[API] dcb_savewabill : [soapenvelope=$soapenvelope]") ;
|
||||
|
||||
&dcb_send_it('savewabill') ;
|
||||
&dcb_parse_it ;
|
||||
&dcb_read_it('savewabill') ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_upload_oms_waybill {
|
||||
|
||||
my ($venue,$ft,$ev_id) = @_ ;
|
||||
|
||||
my $tbl_log_loc = 'logistics_locations' ;
|
||||
my $tbl_org = 'organisations' ;
|
||||
my $system_loc = $i{"system_location_$ft\_$ev_id"} ;
|
||||
my $supplier = $i{"logistics_supplier_id_$ft\_$ev_id"} ;
|
||||
my $status = $i{"status_$ft\_$ev_id"} ;
|
||||
my $waybill_nr = $i{"waybill_nr_$ft\_$ev_id"} ;
|
||||
my $items = $i{"item_$ft\_$ev_id"} ;
|
||||
my $poc = $i{"poc_$ft\_$ev_id"} ; my ($poc_name,$poc_nr) = split(/\_/,$poc) ;
|
||||
# my $special_instructions = $i{"special_instructions_$ft\_$ev_id"} ;
|
||||
|
||||
my $start_end = ($ft eq 'from') ? 'end' : 'start' ;
|
||||
my $special_instructions = "Event $start_end : $dcbdate. " . $i{"special_instructions_$ft\_$ev_id"} ;
|
||||
|
||||
$rec{address1} = $address1 ;
|
||||
$rec{address1} .= ', ' if $address1 && $address2 ;
|
||||
$rec{address1} .= $address2 if $address2 ;
|
||||
$rec{address2} = $address3 ;
|
||||
$rec{address2} .= ', ' if $address3 && $address4 ;
|
||||
$rec{address2} .= $address4 if $address4 ;
|
||||
$rec{city} = $city ;
|
||||
$rec{suburb} = $suburb ;
|
||||
$rec{postal_code} = $postal_code ;
|
||||
$rec{poc_name} = $poc_name ;
|
||||
$rec{poc_nr} = $poc_nr ;
|
||||
$rec{name} = $db{$tbl_org}{$venue}{name} ;
|
||||
$rec{routecode} = $routeCode ;
|
||||
|
||||
$send{address1} = $db{$tbl_log_loc}{$system_loc}{address_line_1} ;
|
||||
$send{address1} .= ', ' if $db{$tbl_log_loc}{$system_loc}{address_line_1} && $db{$tbl_log_loc}{$system_loc}{address_line_2} ;
|
||||
$send{address1} .= $db{$tbl_log_loc}{$system_loc}{address_line_2} if $db{$tbl_log_loc}{$system_loc}{address_line_2} ;
|
||||
$send{address2} = $db{$tbl_log_loc}{$system_loc}{address_line_3} ;
|
||||
$send{address2} .= ', ' if $db{$tbl_log_loc}{$system_loc}{address_line_3} && $db{$tbl_log_loc}{$system_loc}{address_line_4} ;
|
||||
$send{address2} .= $db{$tbl_log_loc}{$system_loc}{address_line_4} if $db{$tbl_log_loc}{$system_loc}{address_line_4} ;
|
||||
$send{city} = $db{$tbl_log_loc}{$system_loc}{city} ;
|
||||
$send{suburb} = $db{$tbl_log_loc}{$system_loc}{suburb} ;
|
||||
$send{postal_code} = $db{$tbl_log_loc}{$system_loc}{postal_code} ;
|
||||
$send{poc_name} = $db{$tbl_log_loc}{$system_loc}{poc_name} ;
|
||||
$send{poc_nr} = $db{$tbl_log_loc}{$system_loc}{poc_nr} ;
|
||||
$send{name} = $db{$tbl_log_loc}{$system_loc}{location} ;
|
||||
$send{routecode} = $db{$tbl_log_loc}{$system_loc}{dcb_route_code} ;
|
||||
|
||||
# my $dest = ($ft eq 'from') ? $db{$tbl_log_loc}{$system_loc}{location} : ($routeCode) ? substr($routeCode,0,3) : $db{$tbl_log_loc}{$venue}{region_code} ;
|
||||
# my $orig = ($ft eq 'to') ? $db{$tbl_log_loc}{$system_loc}{location} : ($routeCode) ? substr($routeCode,0,3) : $db{$tbl_log_loc}{$venue}{region_code} ;
|
||||
|
||||
if ($ft eq 'from') {
|
||||
foreach (keys %rec) {
|
||||
my $rec = $rec{$_} ;
|
||||
$rec{$_} = $send{$_} ;
|
||||
$send{$_} = $rec ;
|
||||
}
|
||||
}
|
||||
|
||||
# if ($dest =~ /ITV/) { $dest =~ s/\ITV//g ; $dest =~ s/ //g ; }
|
||||
# elsif ($orig =~ /ITV/) { $orig =~ s/\ITV//g ; $orig =~ s/ //g ; }
|
||||
|
||||
# our $soapenvelope = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
# <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
# <Body>
|
||||
# <UploadOMSWaybill xmlns="http://tempuri.org/">
|
||||
# <request>
|
||||
# <accountNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">DCBMAILBAG</accountNumber>
|
||||
# <numParcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$items_cnt</numParcels>~;
|
||||
|
||||
# my $accountnumber = ($testdcd) ? 'DCBMAILBAG' : 'DI31F' ;
|
||||
my $accountnumber = ($testdcd) ? 'DCBMAILBAG' : 'DI31' ;
|
||||
|
||||
our $soapenvelope = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<Body>
|
||||
<UploadOMSWaybill xmlns="http://tempuri.org/">
|
||||
<request>
|
||||
<accountNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$accountnumber</accountNumber>
|
||||
<invoices xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">
|
||||
<WaybillInvoices xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities">
|
||||
<InvAmount></InvAmount>
|
||||
<InvDescription></InvDescription>
|
||||
<InvNum></InvNum>
|
||||
<InvUnits></InvUnits>
|
||||
<WaybillId>0</WaybillId>
|
||||
</WaybillInvoices>
|
||||
</invoices>
|
||||
<numParcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$items_cnt</numParcels>~;
|
||||
|
||||
for my $parcel_cnt (1 .. $items_cnt) {
|
||||
my $parcel_qty = ($db{logistics_items}{$items[$parcel_cnt-1]}{qty}) ? $db{logistics_items}{$items[$parcel_cnt-1]}{qty} : 1 ;
|
||||
my $parcel_desc = ($db{logistics_items}{$items[$parcel_cnt-1]}{name}) ? $db{logistics_items}{$items[$parcel_cnt-1]}{name} : 1 ;
|
||||
$soapenvelope .= qq~
|
||||
<parcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">
|
||||
<WaybillParcels xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Entities">
|
||||
<LoadType>STD</LoadType>
|
||||
<RateType>G</RateType>
|
||||
<WaybillId>0</WaybillId>
|
||||
<breadth>1</breadth>
|
||||
<description>$parcel_desc</description>
|
||||
<height>1</height>
|
||||
<length>1</length>
|
||||
<mass>1</mass>
|
||||
<parcelNumber>$parcel_cnt</parcelNumber>
|
||||
<qty>$parcel_qty</qty>
|
||||
</WaybillParcels>
|
||||
</parcels>~;
|
||||
}
|
||||
|
||||
$soapenvelope .= qq~
|
||||
<recieversAddress1 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{address1}</recieversAddress1>
|
||||
<recieversAddress2 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{address2}</recieversAddress2>
|
||||
<recieversCity xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{city}</recieversCity>
|
||||
<recieversContactPerson xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{poc_name}</recieversContactPerson>
|
||||
<recieversContactTel xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{poc_nr}</recieversContactTel>
|
||||
<recieversName xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{name}</recieversName>
|
||||
<recieversPostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{postal_code}</recieversPostalCode>
|
||||
<recieversRouteCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{routecode}</recieversRouteCode>
|
||||
<recieversSuburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$rec{suburb}</recieversSuburb>
|
||||
<sendersAddress1 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{address1}</sendersAddress1>
|
||||
<sendersAddress2 xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{address2}</sendersAddress2>
|
||||
<sendersCity xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{city}</sendersCity>
|
||||
<sendersContactPerson xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{poc_name}</sendersContactPerson>
|
||||
<sendersContactTelephone xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{poc_nr}</sendersContactTelephone>
|
||||
<sendersName xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{name}</sendersName>
|
||||
<sendersPostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{postal_code}</sendersPostalCode>
|
||||
<sendersRouteCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{routecode}</sendersRouteCode>
|
||||
<sendersSuburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$send{suburb}</sendersSuburb>
|
||||
<serviceType xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">OE</serviceType>
|
||||
<specialInstructions xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$special_instructions</specialInstructions>
|
||||
<waybillNumber xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$waybill_nr</waybillNumber>
|
||||
</request>
|
||||
</UploadOMSWaybill>
|
||||
</Body>
|
||||
</Envelope>~ ;
|
||||
|
||||
&common_debug("[API] dcb_upload_oms_waybill : [soapenvelope=$soapenvelope]") ;
|
||||
|
||||
&dcb_send_it('UploadOMSWaybill') ;
|
||||
&dcb_parse_it ;
|
||||
&dcb_read_it('UploadOMSWaybill') ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_send_it {
|
||||
|
||||
my ($soapaction) = @_ ;
|
||||
|
||||
my $environment = ($testdcd) ? 'APIUAT' : 'API' ;
|
||||
|
||||
my $header_soapaction = "http://tempuri.org/IOMSIntegrate/$soapaction" ;
|
||||
my $host = "https://dcboms.co.za/$environment/OMSIntegrate.svc" ;
|
||||
|
||||
&common_write_log("dcb/xml_send_$now_year\_$now_mm.log","$now_ccyymmddhrmnsc|$now_ccyy_mm_ddT$now_hh_min_sec|$soapaction|$host|$header_soapaction|$soapenvelope|");
|
||||
|
||||
&common_debug("[API] dcb_send_it : [host=$host]") ;
|
||||
&common_debug("[API] dcb_send_it : [soapaction=$header_soapaction]") ;
|
||||
|
||||
if ($testing == 1 && $useropts{it}{$username} && $soapaction ne 'PostalCode') { &common_debug(">>>>>> *** TESTING, $soapaction API call NOT SENT *** <<<<<<") ; return ; }
|
||||
|
||||
my $userAgent = LWP::UserAgent->new();
|
||||
my $request = HTTP::Request->new(POST => $host);
|
||||
$request->header(SOAPAction => "$header_soapaction");
|
||||
$request->content($soapenvelope);
|
||||
$request->content_type("text/xml; charset=utf-8");
|
||||
my $response = $userAgent->request($request);
|
||||
|
||||
# Check response
|
||||
my $response_code = $response -> code ;
|
||||
my $response_content = $response -> content ;
|
||||
|
||||
&common_debug("[API] dcb_send_it : [response_code=$response_code]") ;
|
||||
&common_debug("[API] response_content : [response_content=$response_content]") ;
|
||||
|
||||
$returnxml = $response_content ;
|
||||
|
||||
&common_write_log("dcb/xml_response_$now_year\_$now_mm.log","$now_ccyymmddhrmnsc|$now_ccyy_mm_ddT$now_hh_min_sec|$soapaction|$response_code|$returnxml|");
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_parse_it {
|
||||
|
||||
# use Data::Dumper;
|
||||
# print Dumper(\$returnxml);
|
||||
# exit;
|
||||
|
||||
$returnxml =~ s/[\x80-\xFF]/?/g ;
|
||||
my $xml = new XML::Simple or die "Cant instantiate object XML::Simple $!" ;
|
||||
# my $xmldata = $xml->XMLin($returnxml) or die "Cant open xmldata $!" ;
|
||||
$xmldata = $xml->XMLin($returnxml, forcearray => 1) or die "Cant open xmldata $!";
|
||||
|
||||
if ($debug) {
|
||||
use Data::Dumper;
|
||||
print Dumper(\$xmldata);
|
||||
# exit ;
|
||||
}
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub dcb_read_it {
|
||||
|
||||
my ($soapaction) = @_ ;
|
||||
|
||||
# my $result = '' ;
|
||||
|
||||
if ($soapaction eq 'UploadOMSWaybill') {
|
||||
our $uploadwaybillresult = $xmldata->{'s:Body'}->[0]->{'UploadOMSWaybillResponse'}->[0]->{'UploadOMSWaybillResult'}->[0] ;
|
||||
} elsif ($soapaction eq 'savewabill') {
|
||||
our $savewabillResult = $xmldata->{'s:Body'}->[0]->{'savewabillResponse'}->[0]->{'savewabillResult'}->[0] ;
|
||||
} elsif ($soapaction eq 'PostalCode') {
|
||||
our $routeCode = '' ; # our $routeCode = '' ;
|
||||
foreach my $hashref (@{$xmldata->{'s:Body'}->[0]->{'PostalCodeResponse'}->[0]->{'PostalCodeResult'}->[0]->{'a:ArrayOfpostalCode'} } ) {
|
||||
foreach $address (@{$hashref}{'a:postalCode'}) {
|
||||
$routeCode = ${$hashref}{'a:postalCode'}->[0]->{'a:routeCode'}->[0] ;
|
||||
}
|
||||
}
|
||||
# $routeCode = substr($routeCode,0,3) ;
|
||||
} elsif ($soapaction eq 'TracknTrace') {
|
||||
|
||||
|
||||
foreach my $hashref (@{$xmldata->{'s:Body'}->[0]->{'TracknTraceResponse'}->[0]->{'TracknTraceResult'}->[0]->{'a:Waybill'} } ) {
|
||||
|
||||
$trackntrace{booking_date} = (ref(${$hashref}{'a:BookingDate'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:BookingDate'}->[0] ;
|
||||
$trackntrace{comments} = ${$hashref}{'a:Comments'}->[0]->{'content'} ;
|
||||
$trackntrace{consignee_name} = (ref(${$hashref}{'a:ConsigneeName'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ConsigneeName'}->[0] ;
|
||||
$trackntrace{consignor_name} = (ref(${$hashref}{'a:ConsignorName'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ConsignorName'}->[0] ;
|
||||
$trackntrace{current_status} = (ref(${$hashref}{'a:CurrentStatus'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:CurrentStatus'}->[0] ;
|
||||
$trackntrace{delivery_date} = (ref(${$hashref}{'a:DeliveryDate'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:DeliveryDate'}->[0] ;
|
||||
$trackntrace{insured_value} = (ref(${$hashref}{'a:InsuredValue'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:InsuredValue'}->[0] ;
|
||||
$trackntrace{number_of_parcels} = (ref(${$hashref}{'a:NumberOfParcels'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:NumberOfParcels'}->[0] ;
|
||||
$trackntrace{receiver_address_line_1} = (ref(${$hashref}{'a:ReceiverAddressLine1'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverAddressLine1'}->[0] ;
|
||||
$trackntrace{receiver_address_line_2} = (ref(${$hashref}{'a:ReceiverAddressLine2'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverAddressLine2'}->[0] ;
|
||||
$trackntrace{receiver_city} = (ref(${$hashref}{'a:ReceiverCity'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverCity'}->[0] ;
|
||||
$trackntrace{receiver_contact_name} = (ref(${$hashref}{'a:ReceiverContactName'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverContactName'}->[0] ;
|
||||
$trackntrace{receiver_contact_tel_1} = (ref(${$hashref}{'a:ReceiverContactTel1'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverContactTel1'}->[0] ;
|
||||
$trackntrace{receiver_name} = ${$hashref}{'a:ReceiverName'}->[0]->{'content'} ;
|
||||
$trackntrace{receiver_postal_code} = (ref(${$hashref}{'a:ReceiverPostalCode'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverPostalCode'}->[0] ;
|
||||
$trackntrace{receiver_suburb} = (ref(${$hashref}{'a:ReceiverSuburb'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ReceiverSuburb'}->[0] ;
|
||||
$trackntrace{sender_address_line_1} = (ref(${$hashref}{'a:SenderAddressLine1'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderAddressLine1'}->[0] ;
|
||||
$trackntrace{sender_address_line_2} = (ref(${$hashref}{'a:SenderAddressLine2'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderAddressLine2'}->[0] ;
|
||||
$trackntrace{sender_city} = (ref(${$hashref}{'a:SenderCity'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderCity'}->[0] ;
|
||||
$trackntrace{sender_contact_name} = (ref(${$hashref}{'a:SenderContactName'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderContactName'}->[0] ;
|
||||
$trackntrace{sender_contact_tel} = (ref(${$hashref}{'a:SenderContactTel'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderContactTel'}->[0] ;
|
||||
$trackntrace{sender_postal_code} = (ref(${$hashref}{'a:SenderPostalCode'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderPostalCode'}->[0] ;
|
||||
$trackntrace{sender_suburb} = (ref(${$hashref}{'a:SenderSuburb'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:SenderSuburb'}->[0] ;
|
||||
$trackntrace{service_type_code} = (ref(${$hashref}{'a:ServiceTypeCode'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ServiceTypeCode'}->[0] ;
|
||||
$trackntrace{shipment_is_insured} = (ref(${$hashref}{'a:ShipmentIsInsured'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ShipmentIsInsured'}->[0] ;
|
||||
$trackntrace{shipper_reference} = (ref(${$hashref}{'a:ShipperReference'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:ShipperReference'}->[0]->{''} ;
|
||||
$trackntrace{account_nr} = (ref(${$hashref}{'a:accNr'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:accNr'}->[0] ;
|
||||
$trackntrace{pod} = ${$hashref}{'a:pod'}->[0]->{'xmlns:b'} ;
|
||||
$trackntrace{waybill_date} = (ref(${$hashref}{'a:waybillDate'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:waybillDate'}->[0] ;
|
||||
$trackntrace{waybill_number} = (ref(${$hashref}{'a:waybillNumber'}->[0]) eq 'HASH') ? '' : ${$hashref}{'a:waybillNumber'}->[0] ;
|
||||
|
||||
my $additional_info = $hashref->{'a:additionalInformation'}->[0]->{'b:AdditionalInformation'}->[0];
|
||||
$trackntrace{additional_information}{additional_info_code} = (ref($additional_info->{'b:additionalInfoCode'}->[0]) eq 'HASH') ? '' : $additional_info->{'b:additionalInfoCode'}->[0];
|
||||
$trackntrace{additional_information}{additional_info_value} = (ref($additional_info->{'b:additionalInfoValue'}->[0]) eq 'HASH') ? '' : $additional_info->{'b:additionalInfoValue'}->[0];
|
||||
$trackntrace{additional_information}{waybill_number} = (ref($additional_info->{'b:waybillNumber'}->[0]) eq 'HASH') ? '' : $additional_info->{'b:waybillNumber'}->[0];
|
||||
|
||||
my $tracking_details = $hashref->{'a:trackingDetail'}->[0]->{'b:TrackingDetail'};
|
||||
for my $i (0..$#$tracking_details) {
|
||||
my $event_index = $i + 1;
|
||||
$trackntrace{tracking_detail}{event_code}{$event_index} = (ref($tracking_details->[$i]->{'b:eventCode'}->[0]) eq 'HASH') ? '' : $tracking_details->[$i]->{'b:eventCode'}->[0];
|
||||
$trackntrace{tracking_detail}{event_date}{$event_index} = (ref($tracking_details->[$i]->{'b:eventDate'}->[0]) eq 'HASH') ? '' : $tracking_details->[$i]->{'b:eventDate'}->[0];
|
||||
$trackntrace{tracking_detail}{event_description}{$event_index} = (ref($tracking_details->[$i]->{'b:eventDescription'}->[0]) eq 'HASH') ? '' : $tracking_details->[$i]->{'b:eventDescription'}->[0];
|
||||
$trackntrace{tracking_detail}{event_hub_code}{$event_index} = (ref($tracking_details->[$i]->{'b:eventHubCode'}->[0]) eq 'HASH') ? '' : $tracking_details->[$i]->{'b:eventHubCode'}->[0];
|
||||
$trackntrace{tracking_detail}{event_time}{$event_index} = (ref($tracking_details->[$i]->{'b:eventTime'}->[0]) eq 'HASH') ? '' : $tracking_details->[$i]->{'b:eventTime'}->[0];
|
||||
}
|
||||
|
||||
# $trackntrace{additional_information}{additional_info_code} = ${$hashref}{'a:additionalInformation'}->[0]->{'b:AdditionalInformation'}->[0]->{'b:additionalInfoCode'}->[0] ;
|
||||
# $trackntrace{additional_information}{additional_info_value} = ${$hashref}{'a:additionalInformation'}->[0]->{'b:AdditionalInformation'}->[0]->{'b:additionalInfoValue'}->[0] ;
|
||||
# $trackntrace{additional_information}{waybill_number} = ${$hashref}{'a:additionalInformation'}->[0]->{'b:AdditionalInformation'}->[0]->{'b:waybillNumber'}->[0] ;
|
||||
|
||||
# $trackntrace{tracking_detail}{event_code}{1} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[0]->{'b:eventCode'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_date}{1} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[0]->{'b:eventDate'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_description}{1} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[0]->{'b:eventDescription'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_hub_code}{1} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[0]->{'b:eventHubCode'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_time}{1} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[0]->{'b:eventTime'}->[0] ;
|
||||
|
||||
# $trackntrace{tracking_detail}{event_code}{2} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[1]->{'b:eventCode'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_date}{2} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[1]->{'b:eventDate'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_description}{2} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[1]->{'b:eventDescription'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_hub_code}{2} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[1]->{'b:eventHubCode'}->[0] ;
|
||||
# $trackntrace{tracking_detail}{event_time}{2} = ${$hashref}{'a:trackingDetail'}->[0]->{'b:TrackingDetail'}->[1]->{'b:eventTime'}->[0] ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# return ($result) ;
|
||||
|
||||
# print "\n" . $xmldata->{'s:Body'}->[0]->{'savewabillResponse'}->[0]->{'savewabillResult'}->[0] ;
|
||||
|
||||
# return unless $event_id ;
|
||||
# return unless $from_to ;
|
||||
|
||||
# &db_min_ro("event_quotes","1,logistics_dcb_waybill","`id`='$event_id'","","") ;
|
||||
|
||||
# my @waybill_nrs = split(/\-/,$db{event_quotes}{1}{logistics_waybill_nrs}) ;
|
||||
# my @dcb_waybill = split(/\-/,$logistics_dcb_waybill) ;
|
||||
|
||||
# my $dcb_waybill = ($from_to eq 'to') ? "$dcb_waybill[0]-1" : "1-$dcb_waybill[1]" ;
|
||||
|
||||
# $ii{$event_id}{logistics_dcb_waybill} = $dcb_waybill ;
|
||||
|
||||
# our $testing = 1 ;
|
||||
|
||||
# &db_min_upd('event_quotes',"`id`='$event_id'") ;
|
||||
# &db_min_upd('event_quotes',"`id`='5136'") ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
# sub dcb_send_it_get_route_code {
|
||||
|
||||
# my ($postal_code,$suburb) = @_ ;
|
||||
|
||||
# my $message = qq~<?xml version="1.0" encoding="utf-8"?>
|
||||
# <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
# <soap:Body>
|
||||
# <PostalCode xmlns="http://tempuri.org/">
|
||||
# <request>
|
||||
# <PostalCode xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$postal_code</PostalCode>
|
||||
# <Suburb xmlns="http://schemas.datacontract.org/2004/07/OMSIntegrate.Request">$suburb</Suburb>
|
||||
# </request>
|
||||
# </PostalCode>
|
||||
# </soap:Body>
|
||||
# </soap:Envelope>
|
||||
# ~ ;
|
||||
|
||||
# if ($debug) {
|
||||
# print $message;
|
||||
# }
|
||||
|
||||
# my $userAgent = LWP::UserAgent->new();
|
||||
# my $request = HTTP::Request->new(POST => 'https://dcboms.co.za/APIUAT/OMSIntegrate.svc');
|
||||
# $request->header(SOAPAction => '"http://tempuri.org/IOMSIntegrate/savewabill"');
|
||||
# $request->content($message);
|
||||
# $request->content_type("text/xml; charset=utf-8");
|
||||
# my $response = $userAgent->request($request);
|
||||
|
||||
# # Check response
|
||||
# my $response_code = $response -> code ;
|
||||
# my $response_content = $response -> content ;
|
||||
|
||||
# $returnxml = $response_content ;
|
||||
|
||||
# } #-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
1 ;
|
||||
34
libs/modules/dialog.pm
Normal file
34
libs/modules/dialog.pm
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
|
||||
sub dialog_common {
|
||||
|
||||
$dialog{'common'}{'head'} = qq(<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$useropts{short} Admin</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="$useropts{'css'}/bootstrap-darkly.min.css" rel="stylesheet">
|
||||
<link href="$useropts{'css'}/charisma-app.css" rel="stylesheet">
|
||||
<link href="$useropts{'bower_components'}/chosen/chosen.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/colorbox/example3/colorbox.css" rel='stylesheet'>
|
||||
<link href="$useropts{'bower_components'}/responsive-tables/responsive-tables.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.min.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/elfinder.theme.css" rel='stylesheet'>
|
||||
<link href="$useropts{'css'}/datepicker.css" rel='stylesheet'>
|
||||
<script src="$useropts{'bower_components'}/jquery/jquery.min.js"></script>
|
||||
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style>
|
||||
$useropts{'common'}{'css'}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
146
libs/modules/event_email.pm
Normal file
146
libs/modules/event_email.pm
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
sub create_event_email_table {
|
||||
|
||||
my ($event_id) = @_ ;
|
||||
|
||||
&db_min_ro('event_quotes','1,country_id,event_system_id_multiple,type_details_id,qty,club_name,operator_ids,ref,organisation_ids,date_from,date_to,poc_name,poc_contact_nr,type,sport_type_ids,region_id,city_id,quote_to,category_id_1,category_id_2,additional_notes,user_id,format_of_title',"`id`='$event_id'",'','') ;
|
||||
|
||||
# &db_min_ro('user_type','id,name,email,user_type',"",'','') ;
|
||||
&db_min_ro('users','id,name,email,user_type',"",'','') ;
|
||||
|
||||
our %operator_email = () ;
|
||||
foreach (keys %{$db{user_type}}) {
|
||||
$operator_email{$db{user_type}{$_}{email}} = 1 if substr($db{user_type}{$_}{user_type},0,6) eq 'casual' and $db{user_type}{$_}{email} ;
|
||||
}
|
||||
|
||||
my $system_details = "" ;
|
||||
|
||||
&db_min_ro('event_type_details','id,name','','','') ;
|
||||
|
||||
foreach (split(",",$db{event_quotes}{1}{type_details_id})) {
|
||||
$system_details .= qq~$db{event_type_details}{$_}{name},~ ;
|
||||
}
|
||||
chop $system_details if $system_details ;
|
||||
|
||||
&db_min_ro('sport_types','id,name','','','') ;
|
||||
|
||||
&db_min_ro('event_systems','id,name','','','') ;
|
||||
|
||||
my $SystemName = qq~~ ;
|
||||
|
||||
foreach (split(";",$db{$table}{$qt_id}{event_system_id_multiple})) {
|
||||
$SystemName .= qq~$db{event_systems}{$_}{name},~ ;
|
||||
}
|
||||
chop $SystemName if $SystemName ;
|
||||
|
||||
&db_min_ro('event_quotes_categories','id,category','','','') ;
|
||||
|
||||
&db_min_ro('regions','id,name','','','') ;
|
||||
|
||||
&db_min_ro('countries','1,name,country',"`id`='$db{event_quotes}{1}{country_id}'",'','') ;
|
||||
|
||||
&db_min_ro('cities','id,city','','','') ;
|
||||
|
||||
&db_min_ro('organisations','id,name','','','') ;
|
||||
|
||||
&db_min_ro('customers','id,name','','','') ;
|
||||
|
||||
&db_min_ro('event_types','1,name',"`id`='$db{event_quotes}{1}{type}'",'','') if $db{event_quotes}{1}{type} ;
|
||||
|
||||
&db_min_ro('event_quotes_min','1,category_details',"`id`='$event_id'",'','') ;
|
||||
|
||||
my @cat_details = split('\|;\|',$db{event_quotes_min}{1}{category_details}) ;
|
||||
|
||||
our $sports = qq~~ ;
|
||||
|
||||
foreach (split(",",$db{event_quotes}{1}{sport_type_ids})) {
|
||||
|
||||
$sports .= qq~$db{sport_types}{$_}{name},~ ;
|
||||
|
||||
}
|
||||
|
||||
chop $sports if $sports ;
|
||||
|
||||
my $venues = qq~~ ;
|
||||
|
||||
foreach (split(",",$db{event_quotes}{1}{organisation_ids})) {
|
||||
|
||||
$venues .= qq~$db{organisations}{$_}{name},~ ;
|
||||
|
||||
}
|
||||
|
||||
chop $venues if $venues ;
|
||||
|
||||
my $op_cnt = qq~~ ; my $op_names = qq~~ ;
|
||||
|
||||
foreach (split(",",$db{event_quotes}{1}{operator_ids})) {
|
||||
$op_cnt++ ;
|
||||
$op_names .= qq~$db{users}{$_}{name},~ ;
|
||||
}
|
||||
chop $op_names if $op_names ;
|
||||
$op_names = qq~$op_cnt [$op_names]~ if $op_names;
|
||||
|
||||
my %event_details = () ;
|
||||
|
||||
my $city_name = qq~~ ;
|
||||
$city_name .= qq~$db{cities}{$db{event_quotes}{1}{city_id}}{city},~ if $db{cities}{$db{event_quotes}{1}{city_id}}{city} ;
|
||||
$city_name .= qq~$db{regions}{$db{event_quotes}{1}{region_id}}{name},~ if $db{regions}{$db{event_quotes}{1}{region_id}}{name} ;
|
||||
$city_name .= qq~$db{countries}{1}{name} [$db{countries}{1}{country}]~ ;
|
||||
|
||||
$event_details{Client} = qq~<tr><th>Client</th><th>$db{customers}{$db{event_quotes}{1}{quote_to}}{name}</th></tr>~ ;
|
||||
$event_details{EventName} = qq~<tr><th>Event Name</th><th>$db{event_quotes}{1}{ref} [$event_id]</th></tr>~ ;
|
||||
$event_details{DateFrom} = qq~<tr><td>Event Date/Time From</td><td> $db{event_quotes}{1}{date_from}</td></tr>~ if $db{event_quotes}{1}{date_from} ;
|
||||
$event_details{DateTo} = qq~<tr><td>Event Date/Time To</td><td> $db{event_quotes}{1}{date_to}</td></tr>~ if $db{event_quotes}{1}{date_to} ;
|
||||
$event_details{Type} = qq~<tr><td>Type of System</td><td> $db{event_types}{1}{name}</td></tr>~ if $db{event_types}{1}{name} ;
|
||||
$event_details{SystemDetails} = qq~<tr><td>System Details</td><td> $system_details</td></tr>~ if $system_details ;
|
||||
$event_details{SystemName} = qq~<tr><td>System Name</td><td> $SystemName</td></tr>~ if $SystemName ;
|
||||
$event_details{ClubName} = qq~<tr><td>Club Name</td><td> $db{event_quotes}{1}{club_name}</td></tr>~ if $db{event_quotes}{1}{club_name} ;
|
||||
$event_details{Days} = qq~<tr><td>Days</td><td> $db{event_quotes}{1}{qty}</td></tr>~ if $db{event_quotes}{1}{qty} ;
|
||||
$event_details{NrofOperators} = qq~<tr><td>Nr of Operators</td><td> $op_names</td></tr>~ if $op_names ;
|
||||
$event_details{SportTypes} = qq~<tr><td>Sport Types(s)</td><td> $sports</td></tr>~ if $sports ;
|
||||
$event_details{City} = qq~<tr><td>City</td><td> $city_name</td></tr>~ ;
|
||||
$event_details{Venue} = qq~<tr><td>Venue(s)</td><td> $venues</td></tr>~ if $venues ;
|
||||
$event_details{PocName} = qq~<tr><td>Poc Name</td><td> $db{event_quotes}{1}{poc_name}</td></tr>~ if $db{event_quotes}{1}{poc_name} ;
|
||||
$event_details{PocContactNr} = qq~<td>Poc Contact Nr</td><td> $db{event_quotes}{1}{poc_contact_nr}</td></tr>~ if $db{event_quotes}{1}{poc_contact_nr} ;
|
||||
|
||||
$cat_details[0] =~ s/\n/,/g; $cat_details[1] =~ s/\n/,/g; $db{event_quotes}{1}{additional_notes} =~ s/\n/,/g; $db{event_quotes}{1}{format_of_title} =~ s/\n/,/g;
|
||||
|
||||
$event_details{Category1} = qq~<tr><td>Category 1</td><td> $db{event_quotes_categories}{$db{event_quotes}{1}{category_id_1}}{category}</td></tr>~ if $db{event_quotes_categories}{$db{event_quotes}{1}{category_id_1}}{category} ;
|
||||
$event_details{Category1Details} = qq~<tr><td>Category 1 Details</td><td> $cat_details[0]</td></tr>~ if $cat_details[0] ;
|
||||
$event_details{Category2} = qq~<tr><td>Category 2</td><td> $db{event_quotes_categories}{$db{event_quotes}{1}{category_id_2}}{category}</td></tr>~ if $db{event_quotes_categories}{$db{event_quotes}{1}{category_id_2}}{category} ;
|
||||
$event_details{Category2Details} = qq~<tr><td>Category 2 Details</td><td> $cat_details[1]</td></tr>~ if $cat_details[1] ;
|
||||
$event_details{AdditionalNotes} = qq~<tr><td>Additional Notes</td><td> $db{event_quotes}{1}{additional_notes}</td></tr>~ if $db{event_quotes}{1}{additional_notes} ;
|
||||
$event_details{format_of_title} = qq~<tr><td>Format of TITLE to be followed <br>when scheduling events</td><td> $db{event_quotes}{1}{format_of_title}</td></tr>~ if $db{event_quotes}{1}{format_of_title} ;
|
||||
|
||||
our $table_message = qq~
|
||||
$event_details{Client}
|
||||
$event_details{EventName}
|
||||
$event_details{DateFrom}
|
||||
$event_details{DateTo}
|
||||
$event_details{Type}
|
||||
$event_details{SystemDetails}
|
||||
$event_details{SystemName}
|
||||
$event_details{ClubName}
|
||||
$event_details{Days}
|
||||
$event_details{NrofOperators}
|
||||
$event_details{SportTypes}
|
||||
$event_details{City}
|
||||
$event_details{Venue}
|
||||
$event_details{PocName}
|
||||
$event_details{PocContactNr}
|
||||
$event_details{Category1}
|
||||
$event_details{Category1Details}
|
||||
$event_details{Category2}
|
||||
$event_details{Category2Details}
|
||||
$event_details{AdditionalNotes}
|
||||
$event_details{format_of_title}
|
||||
~ ;
|
||||
|
||||
$message = qq~Good day
|
||||
|
||||
Please find attached event details.~ ;
|
||||
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
5118
libs/modules/event_tabs.pm
Normal file
5118
libs/modules/event_tabs.pm
Normal file
File diff suppressed because it is too large
Load Diff
4978
libs/modules/event_tabs_test_demo_temp.pm
Normal file
4978
libs/modules/event_tabs_test_demo_temp.pm
Normal file
File diff suppressed because it is too large
Load Diff
430
libs/modules/fixedsystem.pm
Normal file
430
libs/modules/fixedsystem.pm
Normal file
|
|
@ -0,0 +1,430 @@
|
|||
sub fixedsystem_build_table_and_or_excel {
|
||||
|
||||
my ($report) = @_ ;
|
||||
|
||||
our @sql_col_display = ("cnt","event","start_date","start_time","venue","region","system_name","online_status","network_test","system_test","test_event","sound_test","overall_status","additional_comments") ;
|
||||
|
||||
&report_xlsx_export_header("$xlsxreportname",$xlsxdir,'',$xlsx_title_heading) ;
|
||||
|
||||
$xlsxrow-- ;
|
||||
|
||||
my $event_cnt = 0 ; our $found_after_date = 0 ;
|
||||
|
||||
# $format84->set_align('center');
|
||||
# $format88->set_align('center');
|
||||
# $format89->set_align('center');
|
||||
# $format90->set_align('center');
|
||||
# $format91->set_align('center');
|
||||
|
||||
my %defualt_color = () ;
|
||||
$defualt_color{-1} = "#F90D0D" ;
|
||||
$defualt_color{1} = "#51B529" ;
|
||||
|
||||
my %defualt_color2 = () ;
|
||||
$defualt_color2{1} = "#51B529" ;
|
||||
$defualt_color2{2} = "#F6E305" ;
|
||||
$defualt_color2{3} = "#F90D0D" ;
|
||||
|
||||
|
||||
foreach my $id (sort {$db{$table}{$a}{date_from} cmp $db{$table}{$b}{date_from}} keys %{$db{$table}}) {
|
||||
|
||||
next unless $id ;
|
||||
unless (&common_check_if_string_contains_an_integer($db{$table}{$id}{event_system_id_multiple})) {
|
||||
$db{$table}{$id}{event_system_id_multiple} = ";-1;" ;
|
||||
}
|
||||
|
||||
my $now_date = int("$now_year$now_mm$now_dd") ;
|
||||
my $end_date = substr($db{$table}{$id}{date_to},0,10) ;
|
||||
$end_date =~ s/\-//g ;
|
||||
$end_date = int($end_date) ;
|
||||
my $is_in_future = ($now_date < $end_date) ? 1 : 0 ;
|
||||
|
||||
my @system_name_ids = split(/\;/,$db{$table}{$id}{event_system_id_multiple}) ;
|
||||
|
||||
my @fixed_system_online_status = split(/\;/,$db{$table}{$id}{fixed_system_online_status}) ;
|
||||
my @fixed_system_network_test = split(/\;/,$db{$table}{$id}{fixed_system_network_test}) ;
|
||||
my @fixed_system_system_test = split(/\;/,$db{$table}{$id}{fixed_system_system_test}) ;
|
||||
my @fixed_system_test_event = split(/\;/,$db{$table}{$id}{fixed_system_test_event}) ;
|
||||
my @fixed_system_sound_test = split(/\;/,$db{$table}{$id}{fixed_system_sound_test}) ;
|
||||
my @fixed_system_overall_status = split(/\;/,$db{$table}{$id}{fixed_system_overall_status}) ;
|
||||
my @fixed_system_additional_comments = split(/\;/,$db{$table}{$id}{fixed_system_additional_comments}) ;
|
||||
|
||||
my $cnt_sys_ids = -1 ;
|
||||
|
||||
# my @table_op_ids = () ;
|
||||
|
||||
# for (1 .. $cnt_rows) {
|
||||
# push @table_op_ids,$op_ids[$_ - 1] if $op_ids[$_ - 1] ;
|
||||
# push @table_op_ids,0 unless $op_ids[$_ - 1] ;
|
||||
# }
|
||||
|
||||
my $system_count = 0 ;
|
||||
|
||||
# foreach my $event_id (split(";",$db{$table}{$id}{event_system_id_multiple})) {
|
||||
foreach my $event_id (@system_name_ids) {
|
||||
|
||||
$cnt_sys_ids++ ;
|
||||
|
||||
next unless $event_id ;
|
||||
next unless $db{event_systems}{$event_id}{system_type} eq 'fixed' ;
|
||||
next if $i{overall_status} ne 'all' and $i{overall_status} and $i{overall_status} ne $fixed_system_overall_status[$cnt_sys_ids] ;
|
||||
|
||||
$event_cnt++ ;
|
||||
$system_count++ ;
|
||||
$xlsxcol = 0 ;
|
||||
$print_tbody .= qq~<tr id="$id">~ if $report ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
|
||||
next unless $_ ; # blank for the buttons column
|
||||
|
||||
my $formatting = $format84 ;
|
||||
my $val = $db{$table}{$id}{$_} ;
|
||||
my $val_min = $val ;
|
||||
my $align = '' ;
|
||||
my $nowrap = '' ;
|
||||
|
||||
if ($_ eq 'cnt') {
|
||||
$val = $event_cnt ;
|
||||
} elsif ($_ eq 'event') {
|
||||
$val = "$db{$table}{$id}{ref} ($id)" ;
|
||||
} elsif ($_ eq 'start_date') {
|
||||
$nowrap = 'nowrap' ;
|
||||
$val = substr($db{$table}{$id}{date_from},0,10) ; $align = qq~ class="dt-center"~ ;
|
||||
} elsif ($_ eq 'venue') {
|
||||
my @oids = split(/\,/,$db{$table}{$id}{organisation_ids}) ;
|
||||
foreach $_oid (@oids) {
|
||||
$val .= $db{organisations}{$_oid}{name} . '<br>' ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ; ;
|
||||
} elsif ($_ eq 'region') {
|
||||
$val = $db{regions}{$db{$table}{$id}{region_id}}{code} ; $align = qq~ class="dt-center"~ ;
|
||||
} elsif ($_ eq 'system_name') {
|
||||
$val = '' ;
|
||||
$val = qq~$db{event_systems}{$event_id}{name}~ ;
|
||||
$val .= qq~ ($db{event_systems}{$event_id}{description})~ if $db{event_systems}{$event_id}{description} ;
|
||||
} elsif ($_ eq 'sport') {
|
||||
$val = '' ;
|
||||
foreach my $sport_id (split(",",$db{$table}{$id}{sport_type_ids})) {
|
||||
$db{sport_types}{$sport_id}{name} = uc $db{sport_types}{$sport_id}{name} ;
|
||||
$val .= qq~$db{sport_types}{$sport_id}{name}<br>~ ;
|
||||
}
|
||||
$val = substr($val,0,-4) if $val ;
|
||||
} elsif ($_ eq 'operator') {
|
||||
$val = '' ;
|
||||
$val = $db{users}{$op_ids[$system_count - 1]}{name} if $op_ids[$system_count - 1] ;
|
||||
} elsif ($_ eq 'start_time') {
|
||||
$val = substr($db{$table}{$id}{date_from},11,5) ; $align = qq~ class="dt-center"~ ;
|
||||
} elsif ($_ eq 'online_status') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "online_status_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "Online Status" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
|
||||
if ($fixed_system_online_status[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_online_status[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val_min = "Online" if $fixed_system_online_status[$cnt_sys_ids] eq '1' ;
|
||||
$val_min = "Offline" if $fixed_system_online_status[$cnt_sys_ids] eq '-1' ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = "Online" if $fixed_system_online_status[$cnt_sys_ids] eq '1' ;
|
||||
$val = "Offline" if $fixed_system_online_status[$cnt_sys_ids] eq '-1' ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(7)").css("background-color","$defualt_color{$fixed_system_online_status[$cnt_sys_ids]}");~ if $fixed_system_online_status[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_online_status[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format96 if $fixed_system_online_status[$cnt_sys_ids] eq '-1' ;
|
||||
} elsif ($_ eq 'network_test') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "network_test_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "Test Network" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
if ($fixed_system_network_test[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_network_test[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val_min = "Passed" if $fixed_system_network_test[$cnt_sys_ids] eq '1' ;
|
||||
$val_min = "Failed" if $fixed_system_network_test[$cnt_sys_ids] eq '-1' ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = "Passed" if $fixed_system_network_test[$cnt_sys_ids] eq '1' ;
|
||||
$val = "Failed" if $fixed_system_network_test[$cnt_sys_ids] eq '-1' ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(6)").css("background-color","$defualt_color{$fixed_system_network_test[$cnt_sys_ids]}");~ if $fixed_system_network_test[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_network_test[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format96 if $fixed_system_network_test[$cnt_sys_ids] eq '-1' ;
|
||||
} elsif ($_ eq 'system_test') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "system_test_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "System Test" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
# $val = &common_min_form_select_col($field,'') ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
if ($fixed_system_system_test[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_system_test[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val_min = "Passed" if $fixed_system_system_test[$cnt_sys_ids] eq '1' ;
|
||||
$val_min = "Failed" if $fixed_system_system_test[$cnt_sys_ids] eq '-1' ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
|
||||
} else {
|
||||
$val = "Passed" if $fixed_system_system_test[$cnt_sys_ids] eq '1' ;
|
||||
$val = "Failed" if $fixed_system_system_test[$cnt_sys_ids] eq '-1' ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(5)").css("background-color","$defualt_color{$fixed_system_system_test[$cnt_sys_ids]}");~ if $fixed_system_system_test[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_system_test[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format96 if $fixed_system_system_test[$cnt_sys_ids] eq '-1' ;
|
||||
} elsif ($_ eq 'test_event') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "test_event_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "Test Event" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
# $val = &common_min_form_select_col($field,'') ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
if ($fixed_system_test_event[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_test_event[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val_min = "Good" if $fixed_system_test_event[$cnt_sys_ids] eq '1' ;
|
||||
$val_min = "Not Good" if $fixed_system_test_event[$cnt_sys_ids] eq '-1' ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = "Good" if $fixed_system_test_event[$cnt_sys_ids] eq '1' ;
|
||||
$val = "Not Good" if $fixed_system_test_event[$cnt_sys_ids] eq '-1' ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(4)").css("background-color","$defualt_color{$fixed_system_test_event[$cnt_sys_ids]}");~ if $fixed_system_test_event[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_test_event[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format96 if $fixed_system_test_event[$cnt_sys_ids] eq '-1' ;
|
||||
} elsif ($_ eq 'sound_test') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "sound_test_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "Test Sound" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
# $val = &common_min_form_select_col($field,'') ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
if ($fixed_system_sound_test[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_sound_test[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $db{fixed_system_sound_test}{$fixed_system_sound_test[$cnt_sys_ids]}{name} if $fixed_system_sound_test[$cnt_sys_ids] ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = $db{fixed_system_sound_test}{$fixed_system_sound_test[$cnt_sys_ids]}{name} if $fixed_system_sound_test[$cnt_sys_ids] ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(3)").css("background-color","$defualt_color2{$fixed_system_sound_test[$cnt_sys_ids]}");~ if $fixed_system_sound_test[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_sound_test[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format95 if $fixed_system_sound_test[$cnt_sys_ids] eq '2' ;
|
||||
$formatting = $format96 if $fixed_system_sound_test[$cnt_sys_ids] eq '3' ;
|
||||
} elsif ($_ eq 'overall_status') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
$found_after_date = 1 ;
|
||||
my $field = "overall_status_$id\_$event_id" ; $align = qq~ class="dt-center $_"~ ;
|
||||
$preferred_title{$field} = "Overall Status" ;
|
||||
$opts{$field} = $opts{$_} ;
|
||||
$allow_deselect{$field} = 1 ;
|
||||
$useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
# $val = &common_min_form_select_col($field,'') ;
|
||||
my $ucfirstfield = ucfirst $field ;
|
||||
$val = qq~<select class="form-control" name="$field" id="select$ucfirstfield" data-placeholder="Select $preferred_title{$field}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field}
|
||||
</select>~ ;
|
||||
if ($fixed_system_overall_status[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#select$ucfirstfield").val("$fixed_system_overall_status[$cnt_sys_ids]") ;
|
||||
\$("#select$ucfirstfield").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#select$ucfirstfield").chosen({ allow_single_deselect:true });~ ;
|
||||
$val_min = $db{fixed_system_status}{$fixed_system_overall_status[$cnt_sys_ids]}{status} if $fixed_system_overall_status[$cnt_sys_ids] ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = $db{fixed_system_status}{$fixed_system_overall_status[$cnt_sys_ids]}{status} if $fixed_system_overall_status[$cnt_sys_ids] ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr:eq($event_cnt) td:nth-last-child(2)").css("background-color","$defualt_color2{$fixed_system_overall_status[$cnt_sys_ids]}");~ if $fixed_system_overall_status[$cnt_sys_ids] ;
|
||||
$formatting = $format94 if $fixed_system_overall_status[$cnt_sys_ids] eq '1' ;
|
||||
$formatting = $format95 if $fixed_system_overall_status[$cnt_sys_ids] eq '2' ;
|
||||
$formatting = $format96 if $fixed_system_overall_status[$cnt_sys_ids] eq '3' ;
|
||||
} elsif ($_ eq 'additional_comments') {
|
||||
if ($is_in_future && $report && ($glod_user_level > 2 || $is_installation_partner || $is_schools_manager)) {
|
||||
my $field = "additional_comments_$id\_$event_id" ; my $ucfirstfield = ucfirst $field ; $align = qq~ class="dt-center $_ controls"~ ;
|
||||
$preferred_title{$field} = "Additional Comments" ; $useropts{'common'}{'css'} .= qq~.$_ { min-width:170px; } ~ ;
|
||||
# $val = &common_min_form_input_col($field,'') ;
|
||||
$val = qq~<input type='text' name='$field' class='form-control $cust_class{$field}' id='input$ucfirst_field' placeholder='$preferred_title{$field}' value="$fixed_system_additional_comments[$cnt_sys_ids]">~ ;
|
||||
if ($fixed_system_additional_comments[$cnt_sys_ids]) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#inputAdditional_comments_$id\_$event_id").val("$fixed_system_additional_comments[$cnt_sys_ids]") ;
|
||||
~ ;
|
||||
}
|
||||
$val_min = $fixed_system_additional_comments[$cnt_sys_ids] ;
|
||||
$val_min = "None" unless $val_min ;
|
||||
} else {
|
||||
$val = $fixed_system_additional_comments[$cnt_sys_ids] ;
|
||||
$val = "None" unless $val ;
|
||||
$val_min = $val ;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_ ne 'online_status' && $_ ne 'network_test' && $_ ne 'system_test' && $_ ne 'test_event' && $_ ne 'sound_test' && $_ ne 'overall_status' && $_ ne 'additional_comments') {
|
||||
$val_min = $val ;
|
||||
$val_min =~ s/\<br>/\;/g ;
|
||||
}
|
||||
$print_tbody .= qq~<td $align $nowrap>$val</td>~ if $report ;
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val_min,$formatting) ;
|
||||
$xlsxcol++ ;
|
||||
}
|
||||
$print_tbody .= qq~</tr>~ if $report ;
|
||||
$xlsxrow++ ;
|
||||
}
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_column(0,0,10);
|
||||
$worksheet{$ws}->set_column(1,1,30);
|
||||
$worksheet{$ws}->set_column(2,3,15);
|
||||
$worksheet{$ws}->set_column(4,4,45);
|
||||
$worksheet{$ws}->set_column(5,5,15);
|
||||
$worksheet{$ws}->set_column(6,6,45);
|
||||
$worksheet{$ws}->set_column(7,12,15);
|
||||
$worksheet{$ws}->set_column(13,13,45);
|
||||
|
||||
&report_xlsx_export_footer('N',15,$xlsxdir) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub fixedsystem_check_for_overlapping_dates {
|
||||
|
||||
my ($check_table,$checked_column,$date_from_input,$date_to_input,$sys_ids_input,$get_periods) = @_ ;
|
||||
|
||||
my %seen_system_id = () ; my %checked_system_id = () ; my %system_start_date = () ; my %system_end_date = () ;
|
||||
|
||||
my $sys_ids = "" ;
|
||||
|
||||
if ($get_periods) {
|
||||
$sys_ids = $sys_ids_input ;
|
||||
}
|
||||
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
foreach (split(";",$sys_ids)) {
|
||||
|
||||
$system_start_date{$_}{$id} = $db{$table}{$id}{date_from} ;
|
||||
$system_end_date{$_}{$id} = $db{$table}{$id}{date_to} ;
|
||||
}
|
||||
}
|
||||
|
||||
if ($date_from_input and $date_to_input and $sys_ids_input) {
|
||||
|
||||
foreach (split(";",$sys_ids_input)) {
|
||||
|
||||
$system_start_date{$_}{-1} = $date_from_input ;
|
||||
$system_end_date{$_}{-1} = $date_to_input ;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $id (sort keys %{$db{$table}}) {
|
||||
|
||||
unless ($get_periods) {
|
||||
$sys_ids = $db{$table}{$id}{$checked_column} ;
|
||||
}
|
||||
|
||||
foreach my $sys_id (split(";",$sys_ids)) {
|
||||
|
||||
next unless $sys_id ;
|
||||
|
||||
if ($seen_system_id{$sys_id} and not $checked_system_id{$sys_id}) {
|
||||
|
||||
$checked_system_id{$sys_id} = 1 ;
|
||||
foreach my $id2 (keys %{$system_start_date{$sys_id}}) {
|
||||
|
||||
next if $id2 eq $id ;
|
||||
my $t1 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 21<12
|
||||
my $t2 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_to}) ; ## 22<12
|
||||
my $t3 = &common_check_if_time_is_greater($system_start_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 21<11
|
||||
my $t4 = &common_check_if_time_is_greater($system_end_date{$sys_id}{$id2},$db{$table}{$id}{date_from}) ; ## 22<11
|
||||
|
||||
if (($t1 and not $t2) or ($t3 and not $t4) or (not $t3 and $t2) or ($t3 and not $t2)) {
|
||||
my $system_name = qq~$db{$check_table}{$sys_id}{name}~ ;
|
||||
$system_name .= qq~ ($db{$check_table}{$sys_id}{description})~ if $db{$check_table}{$sys_id}{description} ;
|
||||
|
||||
if ($get_periods) {
|
||||
$overlap_dates{$sys_id}{$id2} = "$db{$table}{$id2}{date_from} - $db{$table}{$id2}{date_to}" ;
|
||||
} else {
|
||||
$trigger_jquery_raw .= qq~
|
||||
noty({text:'System $system_name and cannot be used in both event $db{$table}{$id}{ref} and $db{$table}{$id2}{ref} as the times ovelap!!',layout:"center",type:"error",timeout:30000}) ;
|
||||
~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$seen_system_id{$sys_id} = 1 ;
|
||||
}
|
||||
}
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
287
libs/modules/getmail.pm
Normal file
287
libs/modules/getmail.pm
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
sub getmail_fetch {
|
||||
|
||||
# $mail_psw = 'znMpCa6pikZF' ;
|
||||
# $mail_host = 'pop.yandex.com' ;
|
||||
# $mail_user = 'itv.k@re8it.com' ;
|
||||
|
||||
# $mail_psw = 'vf1VBE6AGuPE' ;
|
||||
$mail_psw = $send_mail_psw ;
|
||||
# $mail_host = 'envoy.aserv.co.za' ;
|
||||
$mail_host = 'pop3.interactivetvafrica.com' ;
|
||||
$mail_user = 'tickets@interactivetvafrica.com' ;
|
||||
|
||||
# $mail_psw = "Jat20161" ;
|
||||
# $mail_host = "outlook.office365.com" ;
|
||||
# $mail_user = "tickets\@aisport.africa" ;
|
||||
|
||||
use IO::Socket::SSL;
|
||||
|
||||
$socket = IO::Socket::SSL->new( PeerAddr => $mail_host,
|
||||
PeerPort => 995,
|
||||
SSL_verify_mode => SSL_VERIFY_NONE,
|
||||
Proto => 'tcp') || die "No socket!";
|
||||
|
||||
$pop = new Mail::POP3Client( USER => $mail_user, PASSWORD => $mail_psw, HOST => $mail_host, USESSL => true, SOCKET => $socket ) || die $pop->Message();
|
||||
# $pop = new Mail::POP3Client( USER => $mail_user, PASSWORD => $mail_psw, HOST => $mail_host, PORT => 995, AUTH_MODE => 'PASS', USESSL => true, SOCKET => $socket ) || die $pop->Message();
|
||||
|
||||
# # OR with SSL
|
||||
# $pop = new Mail::POP3Client( USER => $mail_user,
|
||||
# PASSWORD => $mail_psw,
|
||||
# HOST => $mail_host,
|
||||
# USESSL => true,
|
||||
# ) || die $pop->Message();
|
||||
|
||||
#connect to POP3 sever
|
||||
# my $pop = new Mail::POP3Client( HOST => $mail_host );
|
||||
# $pop->User($mail_user);
|
||||
# $pop->Pass($mail_psw);
|
||||
# $pop->Connect() || die "Unable to connect to POP3 server: ".$pop->Message()."\n";
|
||||
|
||||
if ($debug) {
|
||||
use Data::Dumper;
|
||||
print Dumper(\$pop);
|
||||
&common_debug ("get_mail : office_user = $mail_user") ;
|
||||
}
|
||||
|
||||
$nummsgs = $pop->Count;
|
||||
|
||||
&common_debug ("get_mail : nummsgs [$nummsgs]") ;
|
||||
|
||||
for ($i = 1; $i <= $pop->Count(); $i++) {
|
||||
|
||||
# # sometimes the 'To' is like this : 'graham evens <12345+gevens-bookings@eccotours.co.za>'
|
||||
# # sometimes the 'To' is like this : '12345+gevens-bookings@eccotours.co.za'
|
||||
# # so we split it by '<' to just get the bit we want
|
||||
# my @to_array = split (/\</, $mailcontent{'To'}) ;
|
||||
|
||||
$head = $pop->Head( $i ) ;
|
||||
$head = &getmail_clean($head) ;
|
||||
|
||||
&common_debug ("get_mail : head [$head]") ;
|
||||
|
||||
%mailcontent = () ;
|
||||
|
||||
my $subject_auto_conf = '' ;
|
||||
my $subject_auto_decline = '' ;
|
||||
|
||||
# if ($head =~ /[\d]+\++[\w]+-bookings@[\w\.\-]+\w+/) { # 18398+autoreq-bookings@ecco.co.za
|
||||
# $to = $& ;
|
||||
# }
|
||||
# elsif ($head =~ /AUTO+\s+CONFIRMATION+\s:\s+[\d]+\s:\s+[\w]+-+[\w]+\s+\(+[\w]+\)/) { # If subject = AUTO CONFIRMATION : 123456 : hotelcode-room (789123)
|
||||
# $subject_auto_conf = $& ;
|
||||
# }
|
||||
# else
|
||||
# {
|
||||
foreach ( $pop->Head( $i ) ) {
|
||||
chomp;
|
||||
/^(From|Subject|To|Cc):\s+/i;
|
||||
my ($index,$value) = split(/:/);
|
||||
$mailcontent{$index} = $value;
|
||||
}
|
||||
|
||||
my @to_array = split (/\</, $mailcontent{'To'}) ;
|
||||
$to = pop @to_array ; # get the last item in the array
|
||||
$to =~ s/\>//g ;
|
||||
# }
|
||||
|
||||
# $mailaccount = '' ;
|
||||
# $junk = '' ;
|
||||
|
||||
&common_debug ("get_mail : to [$to]") ;
|
||||
|
||||
$uniqueid = $pop->Uidl($i);
|
||||
$uniqueid =~ s/\s//g; # strip whitespace
|
||||
|
||||
$headandbody = $pop->HeadAndBody( $i ) ;
|
||||
|
||||
# &common_debug ("get_mail : uniqueid [$uniqueid] headandbody [$headandbody]") ;
|
||||
&common_debug ("get_mail : uniqueid [$uniqueid]") ;
|
||||
|
||||
&getmail_mailparse ;
|
||||
|
||||
$pop->Delete( $i ) ; # temp comment out
|
||||
|
||||
}
|
||||
|
||||
$pop->Close();
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_clean {
|
||||
|
||||
my ($item) = @_ ;
|
||||
|
||||
$item =~ s/\|/-/g; # remove any pipes
|
||||
$item =~ s/\n//g; # remove any newlines
|
||||
$item =~ s/\r//g; # remove any carriage returns
|
||||
$item =~ s/\"//g; # remove " marks
|
||||
$item =~ s/\'//g; # remove ' marks
|
||||
|
||||
return ($item) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_mailparse {
|
||||
|
||||
$parser = MIME::Parser->new;
|
||||
|
||||
### Keep parsed message bodies in core (default outputs to disk):
|
||||
# $parser->output_to_core(1); # don't write attachments to disk
|
||||
$parser->output_to_core('NONE') ; # or die "can't output_to_core: $!" ;
|
||||
|
||||
### Change how nameless message-component files are named:
|
||||
$parser->output_prefix("msg") or die "can't output_prefix: $!" ;
|
||||
|
||||
&getmail_make_dir ;
|
||||
|
||||
binmode(STDOUT, ":utf8");
|
||||
|
||||
### Output each message body to the same directory:
|
||||
# $parser->output_under($outputdir);
|
||||
$parser->output_dir($outputdir) or die "can't output into $outputdir: $!" ;
|
||||
|
||||
# $entity->dump_skeleton; # for debugging
|
||||
|
||||
$entity = $parser->parse_data($headandbody) or die "can't parse_data $headandbody: $!" ;
|
||||
|
||||
&getmail_process_entity_header ;
|
||||
&getmail_process_output_dir ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_process_output_dir {
|
||||
|
||||
$i{unique_id} = $uniqueid ;
|
||||
$i{date_time} = "$now_ccyy_mm_dd $now_hour:$now_min:$now_sec" ;
|
||||
$i{client_id} = '0' ;
|
||||
$i{staff_id} = '0' ;
|
||||
$i{sent_date} = $mailparsedate ;
|
||||
$i{doctype} = 'ticket' ;
|
||||
$i{mailtype} = 'EMAILI' ;
|
||||
$i{subject} = $mailparsesubject ;
|
||||
$i{sent_from} = $mailparsefrom ;
|
||||
$i{sent_to} = $to ;
|
||||
$i{cc} = $mailcontent{'Cc'} ;
|
||||
$i{bcc} = $mailcontent{'Bcc'} ;
|
||||
$i{reply_to} = $mailparsereplyto ;
|
||||
# $i{action_time} = ;
|
||||
$i{completed} = '0' ;
|
||||
|
||||
&db_min_insert('tickets') ;
|
||||
|
||||
my @hash_split = split /\#\#/, $mailparsesubject ;
|
||||
my @subj_uid = split / /, $hash_split[1] ;
|
||||
my $suid = $subj_uid[0] ;
|
||||
|
||||
if ($suid && length($suid)>5) {
|
||||
%i = () ;
|
||||
$i{completed} = '0' ;
|
||||
&db_min_upd('tickets',"suid='$suid' OR unique_id='$suid' OR suid='$uniqueid' OR unique_id='$uniqueid'") ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_make_dir {
|
||||
|
||||
our $outputdir = "$mailpath/tickets/$uniqueid" ;
|
||||
|
||||
return if -d $outputdir ;
|
||||
|
||||
mkdir ($outputdir,0777) or die "mkdir $outputdir: $!" ;
|
||||
chmod (0777, $outputdir) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_process_entity_header {
|
||||
|
||||
use Encode qw(decode);
|
||||
|
||||
$mailparsesubject = $entity->head->get('subject');
|
||||
|
||||
&common_debug ("getmail_process_entity_header : subject [$mailparsesubject]") ;
|
||||
|
||||
$mailparsesubject = decode("MIME-Header", $mailparsesubject) ;
|
||||
|
||||
&common_debug ("getmail_process_entity_header : subject [$mailparsesubject]") ;
|
||||
|
||||
$mailparsesubject =~ s/\|/-/g; # remove any pipes
|
||||
$mailparsesubject =~ s/\n//g; # remove any newlines
|
||||
$mailparsesubject =~ s/\r//g; # remove any carriage returns
|
||||
$mailparsesubject =~ s/\'//g; # remove any apostrophes
|
||||
|
||||
$mailparsesubject =~ s/\/\///g; # remove the '//' from TLF chasers
|
||||
$mailparsesubject =~ s/\\//g; # remove the '\' from TLF chasers
|
||||
|
||||
unless ($mailparsesubject) { $mailparsesubject = "(No Subject)" ; }
|
||||
|
||||
$mailparsefrom = $entity->head->get('from');
|
||||
$mailparsefrom =~ s/\|/-/g; # remove any pipes
|
||||
$mailparsefrom =~ s/\n//g; # remove any newlines
|
||||
$mailparsefrom =~ s/\r//g; # remove any carriage returns
|
||||
$mailparsefrom =~ s/\"//g; # remove " marks
|
||||
$mailparsefrom =~ s/\'//g; # remove ' marks
|
||||
|
||||
$mailpamailparsefrom = decode("MIME-Header", $mailparsefrom) ;
|
||||
|
||||
$mailparsereplyto = $entity->head->get('Reply-To');
|
||||
$mailparsereplyto =~ s/\|/-/g; # remove any pipes
|
||||
$mailparsereplyto =~ s/\n//g; # remove any newlines
|
||||
$mailparsereplyto =~ s/\r//g; # remove any carriage returns
|
||||
$mailparsereplyto =~ s/\"//g; # remove " marks
|
||||
$mailparsereplyto =~ s/\'//g; # remove ' marks
|
||||
|
||||
$mailparsedate = $entity->head->get('date');
|
||||
|
||||
my ($dayofweek, $day, $month, $ccyy, $time, $gmt) = split /\s/, $mailparsedate ;
|
||||
|
||||
$day = sprintf("%02d", ($day)) ;
|
||||
|
||||
$m{jan} = '01' ; $m{feb} = '02' ; $m{mar} = '03' ; $m{apr} = '04' ; $m{may} = '05' ; $m{jun} = '06' ; $m{jul} = '07' ; $m{aug} = '08' ; $m{sep} = '09' ; $m{oct} = '10' ; $m{nov} = '11' ; $m{dec} = '12' ;
|
||||
|
||||
my $hashkey = lc $month ;
|
||||
# $mailparsedate = "$day." . $m{$hashkey} ."." . substr($ccyy,2,2) . " (" . substr($time,0,5) . ")" ; # 15.06.22 (12:49)
|
||||
$mailparsedate = "$ccyy-$m{$hashkey}-$day " . substr($time,0,8) ; # 2022-06-21 12:49:35
|
||||
|
||||
chomp $mailparsesubject ;
|
||||
chomp $mailparsedate ;
|
||||
chomp $mailparsefrom ;
|
||||
chomp $mailparsereplyto ;
|
||||
|
||||
unless ($mailparsereplyto) {
|
||||
$mailparsereplyto = $mailparsefrom ;
|
||||
}
|
||||
|
||||
&getmail_auto_reply ;
|
||||
|
||||
&common_debug ("getmail_process_entity_header : mailparsereplyto [$mailparsereplyto]") ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub getmail_auto_reply {
|
||||
|
||||
my @hash_split = split /\#\#/, $mailparsesubject ;
|
||||
my @subj_uid = split / /, $hash_split[1] ;
|
||||
|
||||
&common_debug ("getmail_auto_reply : subj_uid=[$subj_uid[0]]") ;
|
||||
|
||||
unless ($subj_uid[0] && length($subj_uid[0])>5) {
|
||||
my $resubject = ($mailparsesubject =~ /Re:/iog) ? '' : 'Re: ' ;
|
||||
my $resubject .= "$mailparsesubject ##$uniqueid##" ;
|
||||
my $remsg = qq~Hello, thank you for contacting ITV.
|
||||
|
||||
Your ticket ID is $uniqueid.
|
||||
|
||||
One of our consultants will reply to you shortly to assist you with your query - typically within a few hours.
|
||||
|
||||
For after-hour emergencies please contact Technical Support on support\@aisport.africa or telephonically on (+27) 10 534 7011.
|
||||
|
||||
Best regards,
|
||||
|
||||
The ITV Africa Team~ ;
|
||||
&common_debug ("getmail_auto_reply : to=[$mailparsefrom] subject=[$resubject]") ;
|
||||
&common_send_mail($mailparsefrom,'','','','',"$remsg","$resubject") ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
710
libs/modules/logistics.pm
Normal file
710
libs/modules/logistics.pm
Normal file
|
|
@ -0,0 +1,710 @@
|
|||
sub logistics_load_db_vars {
|
||||
|
||||
&db_min_ro('organisations','*',"",'','') ;
|
||||
&db_min_ro('logistics_locations','*',"",'','') ;
|
||||
&db_min_ro('logistics_suppliers','*',"active = '1'",'','') ;
|
||||
&db_min_ro('logistics_items','*',"",'','') ;
|
||||
&db_min_ro('event_systems','id,logistics_location_id',"(`system_type` = 'mobile' OR `system_type` = 'solo' OR `description` lIKE 'cricket%')",'','') ;
|
||||
|
||||
foreach (keys %i) {
|
||||
local @abc = split("_",$_) ;
|
||||
if (substr($_,0,7) eq 'update_') {
|
||||
$seen_event_id{$abc[-1]} = 1 ;
|
||||
}
|
||||
}
|
||||
# create_waybill_out_5136
|
||||
local @event_ids = () ;
|
||||
foreach (keys %seen_event_id) {
|
||||
push @event_ids , "`id` = '$_'" ;
|
||||
}
|
||||
local $e_q_sql = join (" OR ",@event_ids) ;
|
||||
|
||||
&db_min_ro($table,'id,event_system_id_multiple,logistics_suppliers,logistics_waybill_nrs,logistics_status_ids,logistics_venue_id,logistics_item_ids,poc_id,recipient_id,logistics_special_instructions,logistics_complete,logistics_dcb_waybill,date_from,date_to,logistics_delivery_datetime,logistics_received_by,logistics_location_other,logistics_system_location_id,logistics_last_changed_by,logistics_dcb_comments,logistics_shipment_operator_id',"$e_q_sql",'','') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_dates {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$nowrap = 'nowrap' ;
|
||||
my ($year1,$month1,$day1) = split(/\-/,substr($db{$table}{$id}{date_from},0,10)) ;
|
||||
my ($year2,$month2,$day2) = split(/\-/,substr($db{$table}{$id}{date_to},0,10)) ;
|
||||
$val = qq~~ ;
|
||||
if ($year1 ne $year2 && $month1 ne $month2 && $day1 ne $day2) {
|
||||
$val = qq~ $day1 $month_names[$month1] $year1 -<br>$day2 $month_names[$month2] $year2~ ;
|
||||
} elsif ($year1 eq $year2 && $month1 ne $month2) {
|
||||
$val = qq~ $day1 $month_names[$month1] -<br>$day2 $month_names[$month2] $year2~ ;
|
||||
} elsif ($year1 eq $year2 && $month1 eq $month2 && $day1 ne $day2) {
|
||||
$val = qq~ $day1 - $day2 $month_names[$month2] $year2~ ;
|
||||
} elsif ($year1 eq $year2 && $month1 eq $month2 && $day1 eq $day2) {
|
||||
$val = qq~ $day2 $month_names[$month2] $year2~ ;
|
||||
}
|
||||
my $stime = substr($db{$table}{$id}{date_from},11,5) ;
|
||||
my $etime = substr($db{$table}{$id}{date_to},11,5) ;
|
||||
$valxlsx = $val ;
|
||||
$valxlsx =~ s/<br>//g ;
|
||||
# $val = qq~<a href='#' title data-toggle="tooltip" data-placement="top" data-original-title="Start Time : $stime<br>End Time : $etime">$val</a>~ ;
|
||||
|
||||
# &xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol+1,$stime,$formatting) ;
|
||||
# &xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol+2,$etime,$formatting) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_venue {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $nowrap = 'nowrap' ;
|
||||
foreach my $_oid (@venue_ids) {
|
||||
$val .= qq~$db{organisations}{$_oid}{name}~ ;
|
||||
$val .= qq~ [$db{organisations}{$_oid}{region_code}]~ if $db{organisations}{$_oid}{region_code} ;
|
||||
$val .= ',' ;
|
||||
}
|
||||
$val = substr($val,0,-1) if $val ;
|
||||
$valxlsx = $val ;
|
||||
$valxlsx =~ s/\,/\;/g ;
|
||||
if (length($val) > 30) {
|
||||
$val =~ s/\,/\<br>/g ;
|
||||
$val = substr($val,0,27) . qq~<i class="glyphicons glyphicons-more" title data-toggle="tooltip" data-placement="top" data-original-title="$val"></i>~ ;
|
||||
} else {
|
||||
$val =~ s/\,/\<br>/g ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_system {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; my $tooltip = '' ;
|
||||
|
||||
foreach my $event_sys_id (@system_name_ids) {
|
||||
next unless $event_sys_id ;
|
||||
next unless $db{event_systems}{$event_sys_id}{system_type} ;
|
||||
$system_count++ ;
|
||||
$tooltip .= qq~<br>$db{event_systems}{$event_sys_id}{name}~ ;
|
||||
$tooltip .= qq~ [$db{event_systems}{$event_sys_id}{description}]~ if $db{event_systems}{$event_sys_id}{description} ;
|
||||
}
|
||||
|
||||
$tooltip = substr($tooltip,4) if $tooltip ;
|
||||
$val = $tooltip ;
|
||||
# $val = ($system_count > 1) ? qq~<i class="glyphicons glyphicons-laptop" title data-toggle="tooltip" data-placement="top" data-original-title="$tooltip"></i>~ : ($system_count == 1) ? qq~<i class="glyphicons glyphicons-facetime-video" title data-toggle="tooltip" data-placement="top" data-original-title="$tooltip"></i>~ : "" ;
|
||||
$valxlsx = $tooltip ;
|
||||
$valxlsx =~ s/\<br>/\;/g ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_from_to {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
$trigger_jquery_raw .= qq~\$("#$ucfirstfield{1},#$ucfirstfield{2}").chosen({allow_single_deselect:true}) ; ~ ;
|
||||
|
||||
my $col_venue = ($from_to eq 'to') ? 10 : 11 ;
|
||||
my $col_log_loc = ($from_to eq 'to') ? 11 : 10 ;
|
||||
|
||||
if (($_ eq 'to' && $from_to eq 'to') || ($_ eq 'from' && $iaction eq 'report_from')) { # && $iaction eq 'report') || ($_ eq 'from' && $_ eq 'report_from')
|
||||
$val = qq~
|
||||
<select class="form-control" name="$field{1}" id="$ucfirstfield{1}" data-placeholder="Select $preferred_title{$field{1}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{venue_location}{$db{$table}{$id}{region_id}}
|
||||
</select>
|
||||
~ ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child($col_venue)").css("z-index","$cali_cnt") ;
|
||||
~ ;
|
||||
if ($db{$table}{$id}{logistics_venue_id}) {
|
||||
$valxlsx = "$db{organisations}{$db{$table}{$id}{logistics_venue_id}}{name} [$db{organisations}{$db{$table}{$id}{logistics_venue_id}}{region_code}]" if $db{organisations}{$db{$table}{$id}{logistics_venue_id}}{region_code} ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{1}").val("$db{$table}{$id}{logistics_venue_id}") ;
|
||||
~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{1}" if $ucfirstfield{1} ;
|
||||
push @table_with_default_ids,"#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child($col_venue)" ;
|
||||
|
||||
$default_javascript .= qq~"$field{1}":"$db{$table}{$id}{logistics_venue_id}",~ ;
|
||||
} elsif ($venue_ids[0]) {
|
||||
$valxlsx = "$db{organisations}{$venue_ids[0]}{name} [$db{organisations}{$venue_ids[0]}{region_code}]" if $db{organisations}{$venue_ids[0]}{region_code} ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{1}").val("$venue_ids[0]") ;
|
||||
~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{1}" if $ucfirstfield{1} ;
|
||||
$default_javascript .= qq~"$field{1}":"$venue_ids[0]",~ ;
|
||||
} else {
|
||||
$default_javascript .= qq~"$field{1}":"",~ ;
|
||||
}
|
||||
} else {
|
||||
$val = qq~
|
||||
<select class="form-control" name="$field{2}" id="$ucfirstfield{2}" data-placeholder="Select $preferred_title{$field{2}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{system_location}
|
||||
</select>
|
||||
~ ;
|
||||
my $found_loc = 0 ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child($col_log_loc)").css("z-index","$cali_cnt") ;
|
||||
~ ;
|
||||
foreach my $event_sys_id (@system_name_ids) {
|
||||
next unless $event_sys_id ;
|
||||
next unless $db{event_systems}{$event_sys_id}{system_type} ;
|
||||
if ($db{event_systems}{$event_sys_id}{logistics_location_id}) {
|
||||
$valxlsx = $db{logistics_locations}{$db{event_systems}{$event_sys_id}{logistics_location_id}}{location} ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{2}").val("$db{event_systems}{$event_sys_id}{logistics_location_id}") ;
|
||||
~ ;
|
||||
$found_loc = 1 ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{2}" if $ucfirstfield{2} ;
|
||||
push @table_with_default_ids,"#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child($col_log_loc)" ;
|
||||
$default_javascript .= qq~"$field{2}":"$db{event_systems}{$event_sys_id}{logistics_location_id}",~ ;
|
||||
}
|
||||
last ;
|
||||
}
|
||||
if (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Johannesburg/) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{2}").val("1") ;
|
||||
~ ;
|
||||
$default_javascript .= qq~"$field{2}":"1",~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{2}" if $ucfirstfield{2} ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Cape Town/) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{2}").val("2") ;
|
||||
~ ;
|
||||
$default_javascript .= qq~"$field{2}":"2",~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{2}" if $ucfirstfield{2} ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Durban/) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{2}").val("3") ;
|
||||
~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{2}" if $ucfirstfield{2} ;
|
||||
$default_javascript .= qq~"$field{2}":"3",~ ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Bloemfontein/) {
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{2}").val("4") ;
|
||||
~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{2}" if $ucfirstfield{2} ;
|
||||
$default_javascript .= qq~"$field{2}":"4",~ ;
|
||||
} elsif (!$found_loc) {
|
||||
$default_javascript .= qq~"$field{2}":"",~ ;
|
||||
}
|
||||
}
|
||||
push @dropdown_chosen_ids,"#$ucfirstfield{1}\_chosen,#$ucfirstfield{2}\_chosen" if $ucfirstfield{1} && $ucfirstfield{2} ;
|
||||
} else {
|
||||
if (($_ eq 'to' && $from_to eq 'to') || ($_ eq 'from' && $iaction eq 'report_from')) {
|
||||
if ($db{$table}{$id}{logistics_venue_id}) {
|
||||
$val = qq~$db{organisations}{$db{$table}{$id}{logistics_venue_id}}{name}~ ;
|
||||
$val .= qq~ [$db{organisations}{$db{$table}{$id}{logistics_venue_id}}{region_code}]~ if $db{organisations}{$db{$table}{$id}{logistics_venue_id}}{region_code} ;
|
||||
} elsif ($venue_ids[0]) {
|
||||
$val = qq~$db{organisations}{$venue_ids[0]}{name}~ ;
|
||||
$val .= qq~ [$db{organisations}{$venue_ids[0]}{region_code}]~ if $db{organisations}{$venue_ids[0]}{region_code} ;
|
||||
}
|
||||
} else {
|
||||
my $found_loc = 0 ;
|
||||
foreach my $event_sys_id (@system_name_ids) {
|
||||
next unless $event_sys_id ;
|
||||
next unless $db{event_systems}{$event_sys_id}{system_type} ;
|
||||
if ($db{event_systems}{$event_sys_id}{logistics_location_id}) {
|
||||
$val = $db{logistics_locations}{$db{event_systems}{$event_sys_id}{logistics_location_id}}{location} ;
|
||||
$found_loc = 1 ;
|
||||
last ;
|
||||
}
|
||||
}
|
||||
if (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Johannesburg/) {
|
||||
$val = $db{logistics_locations}{1}{location} ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Cape Town/) {
|
||||
$val = $db{logistics_locations}{2}{location} ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Durban/) {
|
||||
$val = $db{logistics_locations}{3}{location} ;
|
||||
} elsif (!$found_loc && $db{cities}{$db{$table}{$id}{city_id}}{name} =~ /Bloemfontein/) {
|
||||
$val = $db{logistics_locations}{4}{location} ;
|
||||
}
|
||||
}
|
||||
$valxlsx = $val ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_supplier {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
$preferred_title{$field{supplier}} = "Supplier" ;
|
||||
$opts{$field{supplier}} = $opts{logistics_supplier} ;
|
||||
$trigger_jquery_raw .= qq~\$("#$ucfirstfield{supplier}").chosen({ allow_single_deselect:true });~ ;
|
||||
$val = qq~<select class="form-control" name="$field{supplier}" id="$ucfirstfield{supplier}" data-placeholder="Select $preferred_title{$field{supplier}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field{supplier}}
|
||||
</select>~ ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(9)").css("z-index","$cali_cnt") ;
|
||||
~ ;
|
||||
|
||||
if ($logistics_supplier_ids_hash{$id}{$from_to}) {
|
||||
$valxlsx = $db{logistics_suppliers}{$logistics_supplier_ids_hash{$id}{$from_to}}{supplier} ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{supplier}" if $ucfirstfield{supplier} ;
|
||||
push @table_with_default_ids,"#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(9)" ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{supplier}").val("$logistics_supplier_ids_hash{$id}{$from_to}") ;
|
||||
// \$("#$ucfirstfield{supplier}").trigger("chosen:updated") ;
|
||||
// \$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(9)").css("background-color","#424949") ;
|
||||
~ ;
|
||||
}
|
||||
push @dropdown_chosen_ids,"#$ucfirstfield{supplier}\_chosen" if $ucfirstfield{supplier} ;
|
||||
} elsif ($logistics_supplier_ids_hash{$id}{$from_to}) {
|
||||
$val = $db{logistics_suppliers}{$logistics_supplier_ids_hash{$id}{$from_to}}{supplier} ;
|
||||
$valxlsx = $val ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_status {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
local %status_hash = (1 =>"Booked",2 => "Pending",3=>"In Transit",4 =>"Delivered") ;
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
# if (($from_to eq 'to' && $current_date <= $end_date) || ($from_to eq 'from' && $current_date <= $start_date)) {
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
$preferred_title{$field{status}} = "Status" ;
|
||||
$opts{$field{status}} = $opts{status} ;
|
||||
$trigger_jquery_raw .= qq~\$("#$ucfirstfield{status}").chosen({ allow_single_deselect:true });~ ;
|
||||
$val = qq~<select class="form-control" name="$field{status}" id="$ucfirstfield{status}" data-placeholder="Select $preferred_title{$field{status}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field{status}}
|
||||
</select>~ ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(8)").css("z-index","$cali_cnt") ;
|
||||
~ ;
|
||||
|
||||
$val = &common_min_form_select_col($field{status},'') ; ########### >= OR >
|
||||
if ($logistics_status_ids_hash{$id}{$from_to}) {
|
||||
$valxlsx = $status_hash{$logistics_status_ids_hash{$id}{$from_to}} ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{status}").val("$logistics_status_ids_hash{$id}{$from_to}") ;
|
||||
// \$("#$ucfirstfield{status}").trigger("chosen:updated") ;
|
||||
~ ;
|
||||
$default_javascript .= qq~"$field{status}":"$logistics_status_ids_hash{$id}{$from_to}",~ ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{status}" if $ucfirstfield{status} ;
|
||||
if ($logistics_status_ids_hash{$id}{$from_to} eq '1') { #Booked
|
||||
$trigger_jquery_raw .= qq~\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(8)").css("background-color","rgb(81,203,242)") ; ~ ;
|
||||
} elsif ($logistics_status_ids_hash{$id}{$from_to} eq '2') { #Pending
|
||||
$trigger_jquery_raw .= qq~\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(8)").css("background-color","rgb(66,73,73)") ; ~ ;
|
||||
} elsif ($logistics_status_ids_hash{$id}{$from_to} eq '3') { #In Transit
|
||||
$trigger_jquery_raw .= qq~\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(8)").css("background-color","rgb(255,165,0) ") ; ~ ;
|
||||
} elsif ($logistics_status_ids_hash{$id}{$from_to} eq '4') { #Delivered
|
||||
$trigger_jquery_raw .= qq~\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(8)").css("background-color","rgb(46,204,113)") ; ~ ;
|
||||
}
|
||||
} else {
|
||||
$default_javascript .= qq~"$field{status}":"2",~ ;
|
||||
}
|
||||
push @dropdown_chosen_ids,"#$ucfirstfield{status}\_chosen" if $ucfirstfield{status} ;
|
||||
} elsif ($logistics_status_ids_hash{$id}{$from_to}) {
|
||||
$val = $logistics_status_ids_hash{$logistics_status_ids_hash{$id}{$from_to}} ;
|
||||
$valxlsx = $status_hash{$logistics_status_ids_hash{$id}{$from_to}} ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_waybill_nr {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
my $fname = 'waybill_nr' ; $val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
my $wb_code = 'AIS' . uc substr($from_to,0,1) . '_' ;
|
||||
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
my $print_field = &common_min_print_field($field{$fname}) ; $tindex++ ;
|
||||
my $wb_nr = ($logistics_waybill_ids_hash{$id}{$from_to}) ? $logistics_waybill_ids_hash{$id}{$from_to} : $wb_code . $id ;
|
||||
$default_javascript .= qq~"$field{$fname}":"$wb_nr",~ ;
|
||||
$val = qq~<div class="control-group"><div class='controls'><input type='text' class='form-control' name='$field{$fname}' id='$ucfirstfield{$fname}' placeholder='$print_field' value="$wb_nr" tabindex="$tindex">
|
||||
</div></div>~ ;
|
||||
$valxlsx = $wb_nr ;
|
||||
$trigger_jquery .= qq~ \$("#$ucfirstfield{$fname}").css("width","100%") ;~ ;
|
||||
$trigger_jquery_raw .= qq~\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(7)").css("background-color","#424949") ; ~ if $logistics_waybill_ids_hash{$id}{$from_to} ;
|
||||
} else {
|
||||
$val = ($logistics_waybill_ids_hash{$id}{$from_to}) ? $logistics_waybill_ids_hash{$id}{$from_to} : (!$readlonly_row) ? $id : "" ;
|
||||
print "\n logistics_waybill_nr" ;
|
||||
$valxlsx = $val ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_item {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
|
||||
$all_ids .= qq~,$id~ ;
|
||||
$found_editable = 1 ;
|
||||
$preferred_title{$field{item}} = "Item" ;
|
||||
$opts{$field{item}} = $opts{logistics_items} ;
|
||||
$trigger_jquery_raw .= qq~\$("#$ucfirstfield{item}").chosen({ allow_single_deselect:true });~ ;
|
||||
|
||||
if ($logistics_item_ids_hash{$id}) {
|
||||
push @table_with_default_ids,"#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(6)" ;
|
||||
foreach my $item_id (split(/\,/,$logistics_item_ids_hash{$id})) {
|
||||
next unless $item_id ;
|
||||
$opts{$field{item}} =~ s/\Q"$item_id"/"$item_id" SELECTED/g ;
|
||||
}
|
||||
$valxlsx = join (';', map { $db{logistics_items}{$_}{name} } split /,/, $logistics_item_ids_hash{$id});
|
||||
}
|
||||
|
||||
$val = qq~
|
||||
<select class="form-control" name="$field{item}" id="$ucfirstfield{item}" multiple data-placeholder="Select $preferred_title{$field{item}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field{item}}
|
||||
</select>
|
||||
~ ;
|
||||
|
||||
$trigger_jquery .= qq~ \$("#$ucfirstfield{item}\_chosen").css("width","100%") ;~ if $ucfirstfield{item} ;
|
||||
|
||||
$extra_form_fields .= qq~<input type="hidden" name="item$id" id="item-$id" value="">~;
|
||||
|
||||
$jquery_chosen_sel .= qq~
|
||||
item_val = \$("#selectItem_$id").chosen().val() ;
|
||||
\$('#item-$id').val(item_val) ;
|
||||
~ ;
|
||||
} elsif ($logistics_item_ids_hash{$id}) {
|
||||
$val = join (',', map { $db{logistics_items}{$_}{name} } split /,/, $logistics_item_ids_hash{$id});
|
||||
$valxlsx = $val ;
|
||||
$valxlsx =~ s/\,/\;/g ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_poc {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
$preferred_title{$field{poc}} = "poc" ;
|
||||
$opts{$field{poc}} = $opts{poc}{$id} ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{poc}").chosen({ allow_single_deselect:true }) ; \$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(5)").css("z-index","$cali_cnt") ;
|
||||
~ ;
|
||||
$val = qq~
|
||||
<select class="form-control" name="$field{poc}" id="$ucfirstfield{poc}" data-placeholder="Select $preferred_title{$field{poc}}" data-rel="chosen">
|
||||
<option value=""></option>
|
||||
$opts{$field{poc}}
|
||||
</select>
|
||||
~ ;
|
||||
|
||||
if ($logistics_poc_hash{$id}) {
|
||||
$valxlsx = $logistics_poc_hash{$id} ;
|
||||
$valxlsx =~ s/\_/ \[/g ;
|
||||
$valxlsx .= qq~]~ ;
|
||||
push @table_with_default_ids,"#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(5)" ;
|
||||
push @selects_with_default_ids,"#$ucfirstfield{poc}" ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$ucfirstfield{poc}").val("$logistics_poc_hash{$id}") ;
|
||||
~ ;
|
||||
$default_javascript .= qq~"$field{poc}":"$logistics_poc_hash{$id}",~ ;
|
||||
} else {
|
||||
$default_javascript .= qq~"$field{poc}":"",~ ;
|
||||
}
|
||||
push @dropdown_chosen_ids,"#$ucfirstfield{poc}\_chosen" if $ucfirstfield{poc} ;
|
||||
|
||||
} elsif ($logistics_poc_hash{$id}) {
|
||||
$val = $logistics_poc_hash{$id} ;
|
||||
$val =~ s/\_/\[/g ;
|
||||
$val .= qq~]~ ;
|
||||
$valxlsx = $val ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_special_instructions {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
$val = '' ; $valxlsx = 'MUSTBEBLANK' ;
|
||||
# if (($from_to eq 'to' && $current_date <= $end_date) || ($from_to eq 'from' && $current_date <= $start_date)) {
|
||||
if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
$found_editable = 1 ;
|
||||
my $print_field = &common_min_print_field($field{special_instructions}) ;
|
||||
$tindex++ ;
|
||||
|
||||
my $defualt = ($logistics_special_instructions_hash{$id}{$from_to}) ? $logistics_special_instructions_hash{$id}{$from_to} : "" ;
|
||||
|
||||
$valxlsx = $defualt if $defualt ;
|
||||
$val = qq~
|
||||
<div class="control-group">
|
||||
<div class='controls'>
|
||||
<textarea type='text' class='form-control' name='$field{special_instructions}' id='$ucfirstfield{special_instructions}' placeholder='$print_field' value="$defualt" tabindex="$tindex">$defualt</textarea>
|
||||
</div>
|
||||
</div>
|
||||
~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$ucfirstfield{special_instructions}").css("width","100%") ;
|
||||
~ ;
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#$useropts{table_id} tr:eq($cali_cnt) td:nth-last-child(4)").css("background-color","#424949") ;
|
||||
~ if $logistics_special_instructions_hash{$id}{$from_to} ;
|
||||
} elsif ($logistics_special_instructions_hash{$id}{$from_to}) {
|
||||
$val = $logistics_special_instructions_hash{$id}{$from_to} ;
|
||||
$valxlsx = $val ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_create_waybill {
|
||||
|
||||
my ($from_to,$id) = @_ ;
|
||||
|
||||
# if (($from_to eq 'to' && $current_date <= $start_date) || ($from_to eq 'from' && $current_date <= $end_date)) {
|
||||
if (!$readlonly_row) {
|
||||
|
||||
$ignore{"$_\_$id"} = 1 ;
|
||||
$valxlsx = '' ;
|
||||
|
||||
# if ($_ eq 'process_complete') {
|
||||
# $val = qq~<input name="$_\_$from_to\_$id" data-no-uniform="true" type="checkbox" id="$_\_$from_to\_$id" value="1" tabindex="$tindex">~ ;
|
||||
# } elsif (!$dcb_waybill_nr{$from_to} && $logistics_waybill_ids_hash{$id}{$from_to} && $items && $supp{$from_to} == 2) { # 2 = DCB Logistics
|
||||
|
||||
if ($logistics_waybill_ids_hash{$id}{$from_to} && $db{$table}{$id}{logistics_item_ids} && $supp{$from_to} == 2) {
|
||||
# if ($waybill_nr_default_val && $item_default_val && $supplier_default_val == 2) {
|
||||
if ($dcb_waybill_nr{$from_to}) {
|
||||
my $arrow_class = ($dcb_waybill_nr{$from_to} && $logistics_waybill_ids_hash{$id}{$from_to}) ? 'success' : 'danger' ;
|
||||
my $arrow_direction = ($from_to eq 'to') ? 'right' : 'left' ;
|
||||
my $dlg = qq~javascript:dlgMdl('$useropts{'scripts'}/dialog/dcb_trackntrace.pl?debug=1&waybillnr~;
|
||||
my $uc_from_to = uc $from_to ;
|
||||
$val = qq~<a class="btn btn-$arrow_class btn-round btn-xs" href="$dlg=$logistics_waybill_ids_hash{$id}{$from_to}','DCB Track & Trace','','medium-dialog');" data-title='DCB Track & Trace $uc_from_to Venue' data-toggle='tooltip' data-placement='top'><i class="glyphicon glyphicon-arrow-$arrow_direction"></i></a>~ ;
|
||||
$nowrap = 'nowrap' ;
|
||||
} else {
|
||||
$val = qq~<input name="$_\_$from_to\_$id" data-no-uniform="true" type="checkbox" id="$_\_$from_to\_$id" value="1" tabindex="$tindex">~ ;
|
||||
}
|
||||
} elsif ($waybill_nr_default_val && $item_default_val && $supplier_default_val == 2) {
|
||||
$val = qq~<input name="$_\_$from_to\_$id" data-no-uniform="true" type="checkbox" id="$_\_$from_to\_$id" value="1" tabindex="$tindex">~ ;
|
||||
} else {
|
||||
|
||||
my $tool_tip = qq~~ ;
|
||||
|
||||
$tool_tip .= qq~<br><b>- Add WayBillNr</b>~ unless $waybill_nr_default_val ;
|
||||
$tool_tip .= qq~<br><b>- Add Item(s)</b>~ unless $item_default_val ;
|
||||
$tool_tip .= qq~<br><b>- Set Supplier to DCB</b>~ if $supplier_default_val != 2 ;
|
||||
|
||||
$val = qq~<i class="glyphicon glyphicon-remove" data-toggle='tooltip' data-placement='left' data-title='Before sending to DCB:$tool_tip'></i>~ ;
|
||||
}
|
||||
|
||||
# # # if (!$dcb_waybill_nr{$from_to} && $logistics_waybill_ids_hash{$id}{$from_to} && $db{$table}{$id}{logistics_item_ids} && $supp{$from_to} == 2) { # 2 = DCB Logistics
|
||||
# # # $val = qq~<input name="$_\_$from_to\_$id" data-no-uniform="true" type="checkbox" id="$_\_$from_to\_$id" value="1" tabindex="$tindex">~ ;
|
||||
# # # } elsif ($dcb_waybill_nr{$from_to} && $logistics_waybill_ids_hash{$id}{$from_to} && $db{$table}{$id}{logistics_item_ids} && $supp{$from_to} == 2) { # 2 = DCB Logistics
|
||||
|
||||
# # # my $arrow_class = ($dcb_waybill_nr{$from_to} && $logistics_waybill_ids_hash{$id}{$from_to}) ? 'success' : 'danger' ;
|
||||
# # # # my $to_arrow_class = ($dcb_waybill_nr{to} && $logistics_waybill_ids_hash{$id}{to}) ? 'success' : 'danger' ;
|
||||
# # # # my $from_arrow_class = ($dcb_waybill_nr{from} && $logistics_waybill_ids_hash{$id}{from}) ? 'success' : 'danger' ;
|
||||
|
||||
# # # my $arrow_direction = ($from_to eq 'to') ? 'rigth' : 'left' ;
|
||||
|
||||
# # # my $dlg = qq~javascript:dlgMdl('$useropts{'scripts'}/dialog/dcb_trackntrace.pl?debug=1&waybillnr~;
|
||||
|
||||
# # # my $uc_from_to = uc $from_to ;
|
||||
|
||||
# # # $val = qq~<a class="btn btn-$arrow_class btn-round btn-xs" href="$dlg=$logistics_waybill_ids_hash{$id}{$from_to}','DCB Track & Trace','','medium-dialog');" data-title='DCB Track & Trace $uc_from_to Venue' data-toggle='tooltip' data-placement='top'><i class="glyphicon glyphicon-arrow-$arrow_direction"></i></a>~ ;
|
||||
# # # # $val = qq~<a class="btn btn-$to_arrow_class btn-round btn-xs" href="$dlg=$logistics_waybill_ids_hash{$id}{to}','DCB Track & Trace','','medium-dialog');" data-title='DCB Track & Trace TO Venue' data-toggle='tooltip' data-placement='top'><i class="glyphicon glyphicon-arrow-right"></i></a>
|
||||
# # # # <a class="btn btn-$from_arrow_class btn-round btn-xs" href="$dlg=$logistics_waybill_ids_hash{$id}{from}','DCB Track & Trace','','medium-dialog');" data-title='DCB Track & Trace FROM Venue' data-toggle='tooltip' data-placement='top'><i class="glyphicon glyphicon-arrow-left"></i></a>~ ;
|
||||
# # # $nowrap = 'nowrap' ;
|
||||
# # # } else {
|
||||
# # # $val = qq~<i class="glyphicon glyphicon-remove" data-toggle='tooltip' data-placement='left' data-title='Before sending to DCB:<br><b>- Add WayBillNr</b><br><b>- Add Item(s)</b><br><b>- Set Supplier to DCB</b>'></i>~ ;
|
||||
# # # }
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub logistics_jquery {
|
||||
|
||||
my ($from_to) = @_ ;
|
||||
|
||||
foreach my $system_id (keys %seen_system_cnt) {
|
||||
chop $all_location_ids_per_system{$system_id} if $all_location_ids_per_system{$system_id} ;
|
||||
}
|
||||
|
||||
my $update_ids_str = join(',',@update_ids) ;
|
||||
my $selects_with_default_ids_str = join(',',@selects_with_default_ids) ;
|
||||
my $table_with_default_ids_str = join(',',@table_with_default_ids) ;
|
||||
my $dropdown_chosen_ids_str = join(',',@dropdown_chosen_ids) ;
|
||||
# <span title data-toggle="tooltip" data-original-title="System in use!">
|
||||
my $plus_item = ($is_dcb_partner) ? qq~<span title='' data-toggle='tooltip' data-placement='top' data-original-title='Deselect saved items to see all options once the page is saved again!'>ITEM</span>~ : qq~<span title='' data-toggle='tooltip' data-placement='top' data-original-title='Deselect saved items to see all options once the page is saved!'>ITEM</span><a href=javascript:dlgMdl('$useropts{'scripts'}/dialog/add_logistics_item.pl?add&$all_ids&$from_to','Add Item','','medium-dialog'); class='btn btn-primary btn-xs' style='padding:0px 2px 0px 3px;margin-top:0px;margin-left:75%;' title='Add Item' data-toggle='tooltip' data-placement='top'><i class='glyphicon glyphicon-plus' style='padding:0;margin-top:0px;top:0px;'></i></a>~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{item})").html("$plus_item") ;
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{from})").html("<span title='' data-toggle='tooltip' data-placement='top' data-original-title='Deselect saved venues to see all options once the page is saved again!'>FROM</span>") ;
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{to})").html("<span title='' data-toggle='tooltip' data-placement='top' data-original-title='Deselect saved venues to see all options once the page is saved again!'>TO</span>") ;
|
||||
\$('[data-toggle="tooltip"]').tooltip({
|
||||
container: 'body'
|
||||
});
|
||||
~ ;
|
||||
|
||||
my $plus_poc = ($is_dcb_partner) ? 'POC' : qq~POC<a href=javascript:dlgMdl('$useropts{'scripts'}/dialog/add_poc.pl?add&$i{date_from}&$i{date_to}&$i{client_id}&$i{organisation_ids}&$i{supplier_id}&$i{status_id}&$i{region_id}&$from_to','Add POC','','medium-dialog'); class='btn btn-primary btn-xs' style='padding:0px 2px 0px 3px;margin-top:0px;margin-left:50%;' title='Add POC' data-toggle='tooltip' data-placement='top'><i class='glyphicon glyphicon-plus' style='padding:0;margin-top:0px;top:0px;'></i></a>~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{poc})").html("$plus_poc") ;
|
||||
~ ;
|
||||
|
||||
my $icon = qq~~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id}_wrapper").css("overflow","scroll");
|
||||
\$("#$useropts{table_id}_wrapper").css("height","60vh");
|
||||
// \$("#$useropts{table_id}_wrapper").css("overflow-y","hidden");
|
||||
\$("#$useropts{table_id}").css("width","175%") ;
|
||||
\$("#$useropts{table_id}").css("max-width","175%");
|
||||
\$("#$useropts{table_id} tr th").slice(-3, -1).css("width","0%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child(1)").css("width","0%");
|
||||
~ ;
|
||||
|
||||
# if ($from_to eq 'to') {
|
||||
|
||||
# $icon = qq~<a href=javascript:selectAll(1); style='color:black;'><i class='glyphicons glyphicons-disk-open' title data-toggle='tooltip' data-placement='top' data-original-title='Create Waybill Out'></i></a>~ ;
|
||||
|
||||
# $trigger_jquery .= qq~
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child(3)").html("$icon") ;
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child(3) .glyphicons-disk-open").tooltip();
|
||||
# ~ ;
|
||||
|
||||
# $trigger_jquery .= qq~
|
||||
# \$("#$useropts{table_id} tr th").slice(-7, -3).css("width","7.5%");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{item})").css("width","13%");
|
||||
# \$("#$useropts{table_id} tr th").slice(-15, -10).css("width","7.5%");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").css("width","4%");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").css("width","4.5%");
|
||||
# ~ ;
|
||||
|
||||
# $icon = qq~<a href=javascript:selectAll(4); style='color:black;'><i class='glyphicons glyphicons-disk-saved' title data-toggle='tooltip' data-placement='top' data-original-title='Process Complete'></i></a>~ ;
|
||||
|
||||
# } else {
|
||||
|
||||
# $icon = qq~<a href=javascript:selectAll(2); style='color:black;'><i class='glyphicons glyphicons-disk-save' title data-toggle='tooltip' data-placement='top' data-original-title='Create Waybill In'></i></a>~ ;
|
||||
# $icon = qq~<a href=javascript:selectAll(2); style='color:black;'><i class='glyphicons glyphicons-disk-save' title data-toggle='tooltip' data-placement='top' data-original-title='Create Waybill'></i></a>~ ;
|
||||
|
||||
# $trigger_jquery .= qq~
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child(3)").html("$icon") ;
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child(3) .glyphicons-disk-save").tooltip();
|
||||
# ~ ;
|
||||
|
||||
# foreach (keys %last_child) { $trigger_jquery .= qq~\$("#$useropts{table_id} tr th:nth-last-child($last_child{$_})").css("width","7.5%");~ ; }
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{other_from})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{other_to})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{system})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{from})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{to})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{supplier})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{poc})").css("width","7%");
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{item})").css("width","16%");
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").css("width","4%");
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").css("width","4.5%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{special_instructions})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{other_special_instructions})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{waybill_nr})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{status})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{received_by})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{dcb_comments})").css("width","7%");
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{shipment_operator})").css("width","7%");
|
||||
~ ;
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{other_from})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{other_to})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{system})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{from})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{to})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{supplier})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{poc})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{item})").css("min-width","320px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{item})").css("max-width","320px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").css("min-width","105px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").css("max-width","105px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").css("max-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{special_instructions})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{other_special_instructions})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{waybill_nr})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{status})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{received_by})").css("min-width","120px");
|
||||
# \$("#$useropts{table_id} tr th:nth-last-child($last_child{dcb_comments})").css("min-width","120px");
|
||||
# ~ ;
|
||||
|
||||
# $icon = qq~<a href=javascript:selectAll(3); style='color:black;'><i class='glyphicons glyphicons-disk-saved' title data-toggle='tooltip' data-placement='top' data-original-title='Process Complete'></i></a>~ ;
|
||||
# }
|
||||
|
||||
# $icon = ($from_to eq 'from') ? qq~<a href=javascript:selectAll(3); style='color:black;'><i class='glyphicons glyphicons-disk-saved' title data-toggle='tooltip' data-placement='top' data-original-title='Process Complete'></i></a>~ : qq~<a href=javascript:selectAll(4); style='color:black;'><i class='glyphicons glyphicons-disk-saved' title data-toggle='tooltip' data-placement='top' data-original-title='Process Complete'></i></a>~ ;
|
||||
|
||||
$icon = qq~<a href=javascript:selectAll(2); style='color:black;'><i class='glyphicons glyphicons-disk-open' title data-toggle='tooltip' data-placement='top' data-original-title='Create Waybill'></i></a>~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child(2)").html("$icon").trigger("chosen:updated") ;
|
||||
\$("#$useropts{table_id} tr th:nth-last-child(2) .glyphicons-disk-open").tooltip();
|
||||
~ ;
|
||||
|
||||
$icon = qq~<i class='glyphicons glyphicons-ok' title data-toggle='tooltip' data-placement='top' data-original-title='Update'></i>~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child(1)").html("$icon") ;
|
||||
\$("#$useropts{table_id} tr th:nth-last-child(1) .glyphicons-ok").tooltip() ;
|
||||
~ ;
|
||||
|
||||
chop $quote_and_ops_ids if $quote_and_ops_ids ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
function selectAll(col) {
|
||||
|
||||
let from_to = \$("#from_to").text() ;
|
||||
let col_id = "" ;
|
||||
if (col == '1') {
|
||||
col_id = "create_waybill_out_" ;
|
||||
} else if (col == '2') {
|
||||
col_id = "create_waybill_in_" ;
|
||||
}
|
||||
// else if (col == '3') {
|
||||
// col_id = "process_complete_from_" ;
|
||||
// } else if (col == '4') {
|
||||
// col_id = "process_complete_to_" ;
|
||||
// }
|
||||
let jsObject = {
|
||||
$quote_and_ops_ids
|
||||
};
|
||||
for (let key in jsObject) {
|
||||
let event_id = key ;
|
||||
\$(\$("#$useropts{table_id}").dataTable().fnGetNodes()).find(\$("input[name='"+col_id+""+event_id+"']")).each(function () {
|
||||
if(!\$(this).is(':checked')) {
|
||||
\$(this).prop('checked',true);
|
||||
} else {
|
||||
\$(this).prop('checked',false);
|
||||
}
|
||||
}) ;
|
||||
}
|
||||
}
|
||||
~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").html("DELIVERY DATE BY") ;
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date})").html("$icon") ;
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_date}) .glyphicons-calendar").tooltip() ;
|
||||
~ ;
|
||||
|
||||
$trigger_jquery .= qq~
|
||||
\$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").html("DELIVERY TIME BY") ;
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time})").html("$icon") ;
|
||||
// \$("#$useropts{table_id} tr th:nth-last-child($last_child{delivery_time}) .glyphicon-time").tooltip() ;
|
||||
~ ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
89
libs/modules/mailsend.pm
Normal file
89
libs/modules/mailsend.pm
Normal file
File diff suppressed because one or more lines are too long
603
libs/modules/match_event_production_time.pm
Normal file
603
libs/modules/match_event_production_time.pm
Normal file
|
|
@ -0,0 +1,603 @@
|
|||
sub read_db_to_match_events_and_systems {
|
||||
|
||||
&common_date_array($last_start_ccyymmdd,$last_end_ccyymmdd);
|
||||
|
||||
&db_min_ro('event_systems','id,name,description,system_type','','','') ;
|
||||
foreach my $id (keys %{$db{event_systems}}) {
|
||||
$event_system_description{$id} = $db{event_systems}{$id}{description} ;
|
||||
$event_system_name{$id} = $db{event_systems}{$id}{name} ;
|
||||
}
|
||||
|
||||
$start_sql = substr($start_sql,0,11) . '00:00:00' ;
|
||||
$end_sql = substr($end_sql,0,11) . '23:59:59' ;
|
||||
|
||||
# &db_min_ro('event_quotes','id,ref,event_system_id_multiple,format_of_title,date_from,date_to',"(date_from BETWEEN '$start_sql' AND '$end_sql') OR (date_to BETWEEN '$start_sql' AND '$end_sql')",'','') ;
|
||||
|
||||
&db_min_ro('event_quotes','id,ref,event_system_id_multiple,format_of_title,date_from,date_to,sport_type_ids,club_ids',"((date_from BETWEEN '$start_sql' AND '$end_sql') OR (date_to BETWEEN '$start_sql' AND '$end_sql')) AND event_system_id_multiple IS NOT NULL AND event_system_id_multiple <> ''",'','') ;
|
||||
|
||||
our %seen_event_system_in_event_quotes = () ;
|
||||
|
||||
foreach my $event_id (keys %{$db{event_quotes}}) {
|
||||
|
||||
$db{event_quotes}{$event_id}{ref} =~ s/\'//g ;
|
||||
|
||||
$db{event_quotes}{$event_id}{event_system_id_multiple} =~ s/;+/;/g; # Replace multiple semicolons with one
|
||||
$db{event_quotes}{$event_id}{event_system_id_multiple} =~ s/^;+|;+$//g; # Remove leading or trailing semicolons
|
||||
|
||||
# next unless $db{event_quotes}{$event_id}{event_system_id_multiple} ;
|
||||
|
||||
$opts{matched_event} .= qq~<option value="$event_id">[$event_id] $db{event_quotes}{$event_id}{ref}</option>~ ;
|
||||
|
||||
foreach (split(";",$db{event_quotes}{$event_id}{event_system_id_multiple})) {
|
||||
|
||||
# $opts{matched_system} .= $seen_event_system_in_event_quotes{$_}
|
||||
$seen_event_system_in_event_quotes{$_} = 1 ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach (sort {$seen_event_system_in_event_quotes{$a} cmp $seen_event_system_in_event_quotes{$b}} keys %seen_event_system_in_event_quotes) {
|
||||
$opts{matched_system} .= qq~<option value="$_">$db{event_systems}{$_}{name} [$db{event_systems}{$_}{description}]</option>~ ;
|
||||
}
|
||||
|
||||
$opts{matched_system_none} .= qq~<option value="-1">$db{event_systems}{-1}{name} [$db{event_systems}{-1}{description}]</option>~ ;
|
||||
|
||||
&db_min_ro('sport_types','*','','','') ;
|
||||
|
||||
our %sport_name_to_id = () ;
|
||||
|
||||
foreach (keys %{$db{sport_types}}) {
|
||||
$db{sport_types}{$_}{name} = lc $db{sport_types}{$_}{name} ;
|
||||
$db{sport_types}{$_}{name} =~ s/ //g ;
|
||||
$sport_name_to_id{$db{sport_types}{$_}{name}} = $_ ;
|
||||
}
|
||||
|
||||
&db_min_ro('clubs','id,name','','','') ;
|
||||
|
||||
foreach (keys %{$db{clubs}}) {
|
||||
my $c_name = lc $db{clubs}{$_}{name} ;
|
||||
$c_name =~ s/\'//g ;
|
||||
$club_name_to_id{$c_name} = $_ ;
|
||||
}
|
||||
|
||||
# foreach my $id (keys %{$db{event_quotes}}) {
|
||||
# # $match_bank_trans{$db{event_quotes}{$id}{trans_date}}{$db{event_quotes}{$id}{description}} = 1 ;
|
||||
|
||||
# foreach my $event_id (split(";",$db{$tables}{$id}{event_system_id_multiple})) {
|
||||
# $val .= qq~$db{event_systems}{$event_id}{name} [$db{event_systems}{$event_id}{description}], ~ ;
|
||||
# }
|
||||
# }
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub process_matched_events_and_systems {
|
||||
|
||||
my %system_match = () ; my %matched_event_name = () ; my %csv_line_possible_match = () ; my %matched_events = () ;
|
||||
|
||||
$system_match{"None"}{"None"} = -1 ;
|
||||
|
||||
foreach my $event_code (keys %csv_line) {
|
||||
|
||||
next if $matched_event{$event_code} ;
|
||||
|
||||
my ($club_name,$system_desc_clue) = split("-",$csv_line{$event_code}{club_name}) ;
|
||||
$club_name =~ s/ $//g ; $system_desc_clue =~ s/^ //g ; # remove whitespace
|
||||
$club_name =~ s/\'//g ;
|
||||
|
||||
$system_desc_clue = "None" unless $system_desc_clue ;
|
||||
|
||||
my @eventdetails = split(/ /,$club_name) ;
|
||||
|
||||
my $system_name_clue = $eventdetails[-1] ; $system_name_clue = "None" if $system_name_clue !~ /\d+/ ;
|
||||
|
||||
if ($system_desc_clue =~ /\d+/ && length($system_desc_clue) == 5) {
|
||||
$system_name_clue = $system_desc_clue ;
|
||||
$system_desc_clue = 'None' ;
|
||||
}
|
||||
|
||||
if ($system_desc_clue =~ /AISA/ && $system_desc_clue =~ /SOLO/) {
|
||||
my @sysparts = split(/\_/,$system_desc_clue) ;
|
||||
$system_name_clue = $sysparts[2] ;
|
||||
$system_desc_clue =~ s/\_/ /g ;
|
||||
}
|
||||
|
||||
$csv_line{$event_code}{system_id} = -1 if $system_name_clue eq 'None' && $system_desc_clue eq 'None' ;
|
||||
|
||||
$system_desc_clue = lc $system_desc_clue ;
|
||||
|
||||
$csv_line{$event_code}{system_id} = $system_match{$system_name_clue}{$system_desc_clue} if $system_match{$system_name_clue}{$system_desc_clue} ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id}) {
|
||||
|
||||
foreach my $system_id (keys %{$db{event_systems}}) {
|
||||
# foreach my $system_id (keys %seen_event_system_in_event_quotes) {
|
||||
|
||||
my $sys_desc = lc $db{event_systems}{$system_id}{description} ;
|
||||
my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
if (($sys_name =~ /\b$system_name_clue\b/ || $sys_name =~ /_$system_name_clue\b/) && $sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
} elsif (($sys_name =~ /\b$system_name_clue\b/ || $sys_name =~ /_$system_name_clue\b/) && $system_name_clue ne 'None' && $system_desc_clue eq 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
} elsif ($sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue eq 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my @sport_split = split(":",$csv_line{$event_code}{event_name}) ;
|
||||
|
||||
$sport_split[0] =~ s/ //g ;
|
||||
$sport_split[0] = lc $sport_split[0] ;
|
||||
|
||||
my $sport_id = ($csv_line{$event_code}{event_name} =~ /:/) ? $sport_name_to_id{$sport_split[0]} : '' ;
|
||||
|
||||
my @event_name_details = split(/-/,$csv_line{$event_code}{event_name}) ;
|
||||
|
||||
my $to_match_event_name = $event_name_details[-1] ;
|
||||
|
||||
$to_match_event_name =~ s/^ //g ;
|
||||
$to_match_event_name =~ s/ $//g ;
|
||||
|
||||
$to_match_event_name = ($csv_line{$event_code}{event_name} =~ /:/ && $csv_line{$event_code}{event_name} !~ /-/) ? $sport_split[1] : $to_match_event_name ;
|
||||
|
||||
$to_match_event_name =~ s/\'//g ;
|
||||
|
||||
my $club_id = $club_name_to_id{$club_name} ;
|
||||
|
||||
$club_name = ($csv_line{$event_code}{club_name} =~ /AISA/ && $csv_line{$event_code}{club_name} =~ /SOLO/) ? lc $club_name : lc $csv_line{$event_code}{club_name} ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next unless $id ;
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
next if !$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
if ($to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
$matched_events{$event_code} .= qq~$id;~ ;
|
||||
}
|
||||
|
||||
my $found_match = 0 ;
|
||||
|
||||
foreach my $system_id (split(";",$db{event_quotes}{$id}{event_system_id_multiple})) {
|
||||
|
||||
my $sys_desc = lc $db{event_systems}{$system_id}{description} ;
|
||||
my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
if ($sys_name =~ /\b$system_name_clue\b/ && $sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
} elsif ($sys_name =~ /\b$system_name_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue eq 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
} elsif ($sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue eq 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
}
|
||||
|
||||
# my $sys_desc = $db{event_systems}{$system_id}{description} ;
|
||||
# my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
# # my @sysparts = split(/\_/,$system) ;
|
||||
|
||||
# if ($sys_name =~ /\b$sysno\b/ && $sys_desc =~ /\b$system\b/iog) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($system =~ /\d+/ && $sys_name =~ /\b$system\b/) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($system =~ /AISA/ && $system =~ /SOLO/ && $sysparts[2] && $sys_name =~ /\b$sysparts[2]\b/) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($sys_desc eq 'St Stithians Hockey Red' && $clubname =~ /Red/i && $clubname =~ /Stithians/i) {
|
||||
# $csv_line{$event_code}{system_id} = $event_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# }
|
||||
}
|
||||
|
||||
if ($found_match && !$csv_line{$event_code}{event_id}) {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($csv_line{$event_code}{system_id} && !$csv_line{$event_code}{event_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
if (!$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\b$csv_line{$event_code}{system_id}\b/) {
|
||||
if ($csv_line{$event_code}{system_id} && !$seen_event_system_in_event_quotes{$csv_line{$event_code}{system_id}}) {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
next ;
|
||||
}
|
||||
|
||||
# if ($to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
if ($db{event_quotes}{$id}{sport_type_ids} && $to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} elsif ($db{event_quotes}{$id}{sport_type_ids}) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} else {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((!$csv_line{$event_code}{system_id}) && !$csv_line{$event_code}{event_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
next if !$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
# if (!$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\b$csv_line{$event_code}{system_id}\b/) {
|
||||
# if ($csv_line{$event_code}{system_id} && !$seen_event_system_in_event_quotes{$csv_line{$event_code}{system_id}}) {
|
||||
# $csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
# }
|
||||
# next ;
|
||||
# }
|
||||
|
||||
if ($db{event_quotes}{$id}{sport_type_ids} && $to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} elsif ($db{event_quotes}{$id}{sport_type_ids}) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} else {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chop $csv_line_possible_match{$event_code}{event_id} if $csv_line_possible_match{$event_code}{event_id} ;
|
||||
|
||||
}
|
||||
|
||||
$print_box_content_rows .= &common_min_forms_start("$lcpage") ;
|
||||
|
||||
our @sql_col_display = ("club_system","system_nr","matched_system","production_hours","production_seconds","cloud_recording_seconds","club_name","start","end","event_name","matched_event","match") ;
|
||||
|
||||
my $row_cnt = 0 ; my %no_system_or_event = () ;
|
||||
|
||||
foreach my $event_code (sort {$csv_line{$a}{line_cnt} cmp $csv_line{$b}{line_cnt}} keys %csv_line) {
|
||||
|
||||
next if $matched_event{$event_code} ;
|
||||
|
||||
$row_cnt++ ;
|
||||
|
||||
$print_tbody .= qq~<tr id="$row_cnt">~ ;
|
||||
|
||||
my $cell_id = qq~~ ;
|
||||
|
||||
my ($system,$sysno) = split(" - ",$csv_line{$event_code}{club_name}) ;
|
||||
|
||||
my @get_sport = (!$csv_line{$event_code}{system_id} || (!$csv_line{$event_code}{event_id} && !$csv_line_possible_match{$event_code}{event_id}) || (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} =~ /;/)) ? split(/\:/,$csv_line{$event_code}{event_name}) : () ;
|
||||
|
||||
$extra_form_fields .= qq~<input type="text" name='$event_code' value="$event_code_to_line{$event_code}" style="display:none;">~ if !$csv_line{$event_code}{system_id} || !$csv_line{$event_code}{event_id} ;
|
||||
|
||||
foreach my $col (@sql_col_display) {
|
||||
|
||||
my $val = '' ; $nowrap = '' ;
|
||||
|
||||
if ($col eq 'club_name') {
|
||||
$val = $csv_line{$event_code}{club_name} ;
|
||||
} elsif ($col eq 'system_nr') {
|
||||
$val = $sysno ;
|
||||
} elsif ($col eq 'start') {
|
||||
$val = $csv_line{$event_code}{start_time} ;
|
||||
$nowrap = 'nowrap' ;
|
||||
} elsif ($col eq 'end') {
|
||||
$val = $csv_line{$event_code}{end_time} ;
|
||||
$nowrap = 'nowrap' ;
|
||||
} elsif ($col eq 'club_system') {
|
||||
$val = $system ;
|
||||
} elsif ($col eq 'matched_system') {
|
||||
|
||||
$preferred_placeholder{"system_$row_cnt"} = "Select System" ;
|
||||
|
||||
$found_system_drop_down = 1 if !$csv_line{$event_code}{system_id} || $csv_line{$event_code}{system_id} eq '-1' ;
|
||||
|
||||
# $allow_deselect{"system_$row_cnt"} = 1 ;
|
||||
|
||||
$val = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? "$db{event_systems}{$csv_line{$event_code}{system_id}}{name} [$db{event_systems}{$csv_line{$event_code}{system_id}}{description}]" : ($csv_line{$event_code}{system_id} eq '-1') ? &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system_none") : &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system") ;
|
||||
# $val = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? "$db{event_systems}{$csv_line{$event_code}{system_id}}{name} [$db{event_systems}{$csv_line{$event_code}{system_id}}{description}]" : &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system") ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id} || $csv_line{$event_code}{system_id} eq '-1') {
|
||||
|
||||
my $sport_name = ($csv_line{$event_code}{event_name} =~ /:/) ? $get_sport[0] : $csv_line{$event_code}{event_name} ;
|
||||
$no_system_or_event{$csv_line{$event_code}{club_name}}{substr($csv_line{$event_code}{start_time},0,10)}{$sport_name}{system} .= qq~"#selectSystem_$row_cnt",~ ;
|
||||
|
||||
}
|
||||
|
||||
$cell_id = qq~id="matched_system_$row_cnt"~ ;
|
||||
|
||||
} elsif ($col eq 'production_hours') {
|
||||
$val = $csv_line{$event_code}{production_hours} ;
|
||||
$val =~ s/\,/\./g ;
|
||||
} elsif ($col eq 'production_seconds') {
|
||||
$val = &common_commify($csv_line{$event_code}{production_seconds}) ;
|
||||
} elsif ($col eq 'cloud_recording_seconds') {
|
||||
$val = &common_commify($csv_line{$event_code}{cloud_seconds}) ;
|
||||
} elsif ($col eq 'event_name') {
|
||||
$val = $csv_line{$event_code}{event_name} ;
|
||||
} elsif ($col eq 'matched_event') {
|
||||
|
||||
$csv_line_possible_match{$event_code}{event_id} =~ s/\;/\_/g ;
|
||||
|
||||
my $col_name = (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id}) ? "matched_event_$csv_line_possible_match{$event_code}{event_id}" : "matched_event" ;
|
||||
|
||||
$opts{$col_name} =
|
||||
($csv_line_possible_match{$event_code}{event_id} && !$csv_line{$event_code}{event_id}) ? join "</option><option ", map { qq~value="$_"><strong>Possible : </strong>$db{event_quotes}{$_}{ref} [$_]~ } split "_" , $csv_line_possible_match{$event_code}{event_id} :
|
||||
$opts{matched_event} ;
|
||||
|
||||
$opts{$col_name} = qq~<option ~ . $opts{$col_name} . qq~</option>~ if $col_name ne 'matched_event' ;
|
||||
|
||||
$preferred_placeholder{"event_$row_cnt"} = "Select Event" ;
|
||||
|
||||
$val = ($csv_line{$event_code}{event_id}) ? "$db{event_quotes}{$csv_line{$event_code}{event_id}}{ref} [$csv_line{$event_code}{event_id}]" :
|
||||
|
||||
# (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} !~ /_/) ? "<strong>POSSIBLE : </strong>$db{event_quotes}{$csv_line_possible_match{$event_code}{event_id}}{ref} [$csv_line_possible_match{$event_code}{event_id}]" :
|
||||
|
||||
(!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id}) ? &common_min_table_select("event_$row_cnt",'','','','','','',$col_name) :
|
||||
&common_min_table_select("event_$row_cnt",'','','','','','','matched_event') ;
|
||||
|
||||
$found_event_drop_down = 1 if !$csv_line{$event_code}{event_id} ;
|
||||
# $found_event_drop_down = 1 if !$csv_line{$event_code}{event_id} && (!$csv_line_possible_match{$event_code}{event_id} || $csv_line_possible_match{$event_code}{event_id} =~ /_/) ;
|
||||
|
||||
# if ((!$csv_line{$event_code}{event_id} && !$csv_line_possible_match{$event_code}{event_id}) || (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} =~ /_/)) {
|
||||
if (!$csv_line{$event_code}{event_id}) {
|
||||
|
||||
my $sport_name = ($csv_line{$event_code}{event_name} =~ /:/) ? $get_sport[0] : $csv_line{$event_code}{event_name} ;
|
||||
|
||||
$no_system_or_event{$csv_line{$event_code}{club_name}}{substr($csv_line{$event_code}{start_time},0,10)}{$sport_name}{event} .= qq~"#selectEvent_$row_cnt",~ ;
|
||||
|
||||
}
|
||||
$cell_id = qq~id="matched_event_$row_cnt"~ ;
|
||||
|
||||
} elsif ($col eq 'match') {
|
||||
|
||||
$nowrap = 'nowrap' ;
|
||||
|
||||
$cell_id = qq~id="final_col_$row_cnt"~ ;
|
||||
|
||||
my $tool = $pixellot_system{$ccyymmdd}{$period} ;
|
||||
|
||||
$start_sql =~ s/ /T/g ;
|
||||
$end_sql =~ s/ /T/g ;
|
||||
|
||||
# my $system_input = ($csv_line{$event_code}{system_id}) ? qq~<input style='display:none;' value='$csv_line{$event_code}{system_id}' id='selectSystem_$row_cnt' name="system_$row_cnt">~ : qq~~ ;
|
||||
my $system_input = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? qq~<input style='display:none;' value='$csv_line{$event_code}{system_id}' id='selectSystem_$row_cnt' name="system_$row_cnt">~ : qq~~ ;
|
||||
|
||||
# my $matched_event_id = ($csv_line{$event_code}{event_id}) ? $csv_line{$event_code}{event_id} : ($csv_line_possible_match{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} !~ /_/) ? $csv_line_possible_match{$event_code}{event_id} : '' ;
|
||||
|
||||
my $matched_event_id = ($csv_line{$event_code}{event_id}) ? $csv_line{$event_code}{event_id} : '' ;
|
||||
|
||||
my $event_input = ($matched_event_id) ? qq~<input style='display:none;' value='$matched_event_id' id='selectEvent_$row_cnt' name="event_$row_cnt">~ : qq~~ ;
|
||||
|
||||
my $match_icon = ($system_input && $event_input) ? "ok" : "remove" ;
|
||||
my $match_class = ($system_input && $event_input) ? "success" : "danger" ;
|
||||
|
||||
push @unmatched_rows, "#selectEvent_$row_cnt" if !$event_input ;
|
||||
push @unmatched_rows, "#selectSystem_$row_cnt" if !$system_input ;
|
||||
|
||||
my $not_matched = (!$event_input || !$system_input) ? qq~<input style='display:none;' value='1' id='not_matched_$row_cnt'>~ : qq~~ ;
|
||||
|
||||
# my $no_similar_rows = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1' && $csv_line{$event_code}{event_id}) ? '-1' : '' ;
|
||||
|
||||
my $similar_rows = (!$event_input || !$system_input) ? qq~<input value='' name='similar_rows_$row_cnt' style='display:none;'>~ : qq~~ ;
|
||||
|
||||
$val = "
|
||||
$system_input
|
||||
$event_input
|
||||
$not_matched
|
||||
$similar_rows
|
||||
<input style='display:none;' value='$event_code' id='event_code_$row_cnt' name='event_code_$row_cnt'>
|
||||
<input style='display:none;' value='$csv_line{$event_code}{production_seconds}' id='time_$row_cnt' name='time_$row_cnt'>
|
||||
<input style='display:none;' value='$csv_line{$event_code}{cloud_seconds}' id='cloud_time_$row_cnt' name='cloud_time_$row_cnt'>
|
||||
<a class='btn btn-$match_class btn-sm' id='matched_row_$row_cnt' href=javascript:match_event_system('$row_cnt','$event_code','$csv_line{$event_code}{production_seconds}','$csv_line{$event_code}{cloud_seconds}'); data-title='MATCH' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-$match_icon'></i></a>
|
||||
|
||||
<a class='btn btn-success btn-sm' href=javascript:dlgMdl('$useropts{'scripts'}/dialog/manually_match_csv_row.pl?$matched_event_id&$csv_line{$event_code}{system_id}&$csv_line{$event_code}{production_seconds}&$csv_line{$event_code}{cloud_seconds}&$event_code&$start_sql&$end_sql&$row_cnt&add','Manually Match','','medium-dialog'); data-title='MATCH MANUALLY' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title>
|
||||
<i class='glyphicon glyphicon-question-sign'></i>
|
||||
</a>
|
||||
" ;
|
||||
|
||||
$start_sql =~ s/T/ /g ;
|
||||
$end_sql =~ s/T/ /g ;
|
||||
|
||||
}
|
||||
$print_tbody .= qq~<td $cell_id $nowrap>$val</td>~ ;
|
||||
}
|
||||
$print_tbody .= qq~</tr>~ ;
|
||||
}
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
// let inputString = '1,21,32,4'; // Your input string
|
||||
// let outputString = inputString.split(',').map(num => 'abc_' + num).join(',');
|
||||
|
||||
function auto_select_similar_drop_downs (ids,changed_val) {
|
||||
for (let id of ids) {
|
||||
if (\$(id).val()) {
|
||||
continue ;
|
||||
}
|
||||
\$(id).val(changed_val) ;
|
||||
\$(id).trigger("chosen:updated") ;
|
||||
fix_match_icon(id) ;
|
||||
}
|
||||
}
|
||||
|
||||
~ ;
|
||||
|
||||
my %seen_rows_set = () ;
|
||||
|
||||
foreach my $club_name (keys %no_system_or_event) {
|
||||
foreach my $start_time (keys %{$no_system_or_event{$club_name}}) {
|
||||
foreach my $sport_name (keys %{$no_system_or_event{$club_name}{$start_time}}) {
|
||||
foreach my $sys_evt (keys %{$no_system_or_event{$club_name}{$start_time}{$sport_name}}) {
|
||||
|
||||
chop $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} if $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} ;
|
||||
my $ids_change = $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} ;
|
||||
$ids_change =~ s/\"//g ;
|
||||
|
||||
my $ids_change2 = $ids_change ;
|
||||
|
||||
$ids_change2 =~ s/#selectEvent_(\d+)/input\[name='similar_rows_$1'\]/g;
|
||||
$ids_change2 =~ s/#selectSystem_(\d+)/input\[name='similar_rows_$1'\]/g;
|
||||
|
||||
my $ids_change_row_nrs = $ids_change ;
|
||||
$ids_change_row_nrs =~ s/#selectEvent_//g ;
|
||||
$ids_change_row_nrs =~ s/#selectSystem_//g ;
|
||||
|
||||
my @first_nr = split(/\,/,$ids_change_row_nrs) ;
|
||||
|
||||
my $event_or_system = ($no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} =~ /Event/) ? 'event' : 'system' ;
|
||||
|
||||
next if $seen_rows_set{$ids_change_row_nrs}{$event_or_system} ;
|
||||
$seen_rows_set{$ids_change_row_nrs}{$event_or_system} = 1 ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
if (\$("#not_matched_$first_nr[0]").val() && !\$("input[name='similar_rows_$first_nr[0]']").val()) {
|
||||
\$("$ids_change2").val("$ids_change_row_nrs") ;
|
||||
}
|
||||
|
||||
\$("$ids_change").change( function () {
|
||||
|
||||
fix_match_icon(this.id) ;
|
||||
if (!\$(this).val()) {
|
||||
return ;
|
||||
}
|
||||
auto_select_similar_drop_downs([$no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt}],\$(this).val()) ;
|
||||
|
||||
}) ;
|
||||
|
||||
~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $unmatched_rows_str = join(",",@unmatched_rows) ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
function get_row_nr (id) {
|
||||
|
||||
let lastIndex = id.lastIndexOf('_');
|
||||
lastIndex = parseInt(lastIndex) ;
|
||||
let row_nr_1 = id.substring(1+lastIndex);
|
||||
return row_nr_1 ;
|
||||
|
||||
}
|
||||
|
||||
function fix_match_icon (id) {
|
||||
|
||||
let row_nr = get_row_nr(id) ;
|
||||
|
||||
if (\$("#selectEvent_"+row_nr).val() && \$("#selectSystem_"+row_nr).val() && \$("#not_matched_"+row_nr).val()) {
|
||||
\$("#matched_row_"+row_nr).removeClass('btn btn-danger btn-sm').addClass('btn btn-success btn-sm');
|
||||
\$("#matched_row_"+row_nr).html("<i class='glyphicon glyphicon-ok'></i>") ;
|
||||
\$("#not_matched_"+row_nr).val("") ;
|
||||
} else if ((!\$("#selectEvent_"+row_nr).val() || !\$("#selectSystem_"+row_nr).val()) && !\$("#not_matched_"+row_nr).val()) {
|
||||
\$("#matched_row_"+row_nr).removeClass('btn btn-success btn-sm').addClass('btn btn-danger btn-sm');
|
||||
\$("#matched_row_"+row_nr).html("<i class='glyphicon glyphicon-remove'></i>") ;
|
||||
\$("#not_matched_"+row_nr).val("1") ;
|
||||
}
|
||||
}
|
||||
|
||||
// \$("$unmatched_rows_str").change( function () {
|
||||
// fix_match_icon(this.id) ;
|
||||
// }) ;
|
||||
|
||||
~ if $unmatched_rows_str ;
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr th:nth-last-child(2)").css("width","20%");~ if $found_event_drop_down ; ## MATCHED EVENT COLUMN
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr th:nth-last-child(10)").css("width","20%");~ if $found_system_drop_down ; ## MATCHED SYSTEM COLUMN
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
function match_event_system (row_nr,event_code,production_seconds,cloud_seconds) {
|
||||
|
||||
let event_id = \$("#selectEvent_"+row_nr).val() ;
|
||||
let system_id = \$("#selectSystem_"+row_nr).val() ;
|
||||
|
||||
if (!event_id || !system_id) {
|
||||
noty({text:'Please select a System and Event!!!',layout:"center",type:"error",timeout:3000}) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
\$("#"+row_nr).css("display","none") ;
|
||||
|
||||
var url = "$useropts{scripts}/get/add_event_system_hours.pl?"+event_id+"&"+system_id+"&"+production_seconds+"&"+cloud_seconds+"&"+event_code ;
|
||||
|
||||
\$.get(url) ;
|
||||
\$("#final_col_"+row_nr).html('') ;
|
||||
|
||||
}
|
||||
|
||||
// \$("#itv-table tr:eq(0) th:nth-last-child(1)").html("<span>Match All</span> <a class='btn btn-success btn-sm' href=javascript:match_all(1); data-title='MATCH ALL (inc. Possible Events)' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-ok'></i></a> <a class='btn btn-warning btn-sm' href=javascript:match_all(0); data-title='MATCH ALL (excl. Possible Events)' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-ok'></i></a>") ;
|
||||
|
||||
\$("#itv-table thead tr:eq(0) th:nth-last-child(1)").css('white-space','nowrap') ;
|
||||
|
||||
~ ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
946
libs/modules/pdf.pm
Normal file
946
libs/modules/pdf.pm
Normal file
|
|
@ -0,0 +1,946 @@
|
|||
sub pdf_delete_previous_pdf {
|
||||
|
||||
my ($pdfpath) = @_ ;
|
||||
|
||||
opendir(DIR, "$pdfpath") or die "cant open Directory $pdfpath: $!\n";
|
||||
|
||||
while(defined($folder = readdir(DIR))) {
|
||||
if (length $folder > 2) {
|
||||
my ($file,$type) = split(/\./,$folder) ;
|
||||
if (-e "$pdfpath/$file.pdf"){
|
||||
unlink ("$pdfpath/$file.pdf") or print "unable to unlink - $pdfpath/$file.pdf : $!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(DIR) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_initialise {
|
||||
|
||||
my ($folder,$file,$title) = @_ ;
|
||||
|
||||
my $pdf_file = "$folder/$file";
|
||||
|
||||
$pdf = PDF::API2 -> new(-file => $pdf_file);
|
||||
|
||||
%font = (
|
||||
Helvetica => {
|
||||
Oblique => $pdf->corefont('Helvetica-Oblique', -encoding => 'latin1'),
|
||||
Bold => $pdf->corefont('Helvetica-Bold', -encoding => 'latin1'),
|
||||
Normal => $pdf->corefont('Helvetica', -encoding => 'latin1'),
|
||||
},
|
||||
Verdana => {
|
||||
Bold => $pdf->corefont('Verdana-Bold', -encoding => 'Western'),
|
||||
Normal => $pdf->corefont('Verdana', -encoding => 'Western'),
|
||||
},
|
||||
Courier => {
|
||||
Bold => $pdf->corefont('Courier-Bold', -encoding => 'latin1'),
|
||||
Normal => $pdf->corefont('Courier', -encoding => 'latin1'),
|
||||
},
|
||||
);
|
||||
|
||||
$pdf->info(
|
||||
'Author' => "ITV",
|
||||
'Creator' => "ITV",
|
||||
'Producer' => "ITV",
|
||||
'Title' => $title,
|
||||
'Subject' => $title,
|
||||
'Keywords' => $title
|
||||
);
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_initialise_page {
|
||||
|
||||
if ($layout eq 'landscape'){
|
||||
$page = $pdf->page;
|
||||
$page->mediabox(297/mm, 210/mm);
|
||||
}
|
||||
elsif ($layout eq 'label'){
|
||||
$page = $pdf->page;
|
||||
$page->mediabox(100/mm, 100/mm);
|
||||
}
|
||||
else
|
||||
{
|
||||
$page = $pdf->page;
|
||||
$page->mediabox(210/mm, 297/mm);
|
||||
}
|
||||
|
||||
|
||||
$small_oblique_text = $page->text;
|
||||
$small_oblique_text->font( $font{'Helvetica'}{'Oblique'}, 8/pt );
|
||||
$small_oblique_text->fillcolor( 'black' );
|
||||
|
||||
$medium_oblique_text = $page->text;
|
||||
$medium_oblique_text->font( $font{'Helvetica'}{'Oblique'}, 10/pt );
|
||||
$medium_oblique_text->fillcolor( 'black' );
|
||||
|
||||
|
||||
$bar_head_bold_text = $page->text;
|
||||
$bar_head_bold_text->font( $font{'Helvetica'}{'Bold'}, 13/pt );
|
||||
$bar_head_bold_text->fillcolor( 'white' );
|
||||
|
||||
$xx_large_bold_text = $page->text;
|
||||
$xx_large_bold_text->font( $font{'Helvetica'}{'Bold'}, 16/pt );
|
||||
$xx_large_bold_text->fillcolor( 'black' );
|
||||
|
||||
$xxx_large_bold_text = $page->text;
|
||||
$xxx_large_bold_text->font( $font{'Helvetica'}{'Bold'}, 24/pt );
|
||||
$xxx_large_bold_text->fillcolor( 'black' );
|
||||
|
||||
$xx_large_italic_text = $page->text;
|
||||
$xx_large_italic_text->font( $font{'Helvetica'}{'Oblique'}, 16/pt );
|
||||
$xx_large_italic_text->fillcolor( 'black' );
|
||||
|
||||
$xx_large_text = $page->text;
|
||||
$xx_large_text->font( $font{'Helvetica'}{'Normal'}, 16/pt );
|
||||
$xx_large_text->fillcolor( 'black' );
|
||||
|
||||
$x_large_bold_text = $page->text;
|
||||
$x_large_bold_text->font( $font{'Helvetica'}{'Bold'}, 14/pt );
|
||||
$x_large_bold_text->fillcolor( 'black' );
|
||||
|
||||
$x_large_italic_text = $page->text;
|
||||
$x_large_italic_text->font( $font{'Helvetica'}{'Oblique'}, 14/pt );
|
||||
$x_large_italic_text->fillcolor( 'black' );
|
||||
|
||||
$x_large_text = $page->text;
|
||||
$x_large_text->font( $font{'Helvetica'}{'Normal'}, 14/pt );
|
||||
$x_large_text->fillcolor( 'black' );
|
||||
|
||||
$large_bold_text = $page->text;
|
||||
$large_bold_text->font( $font{'Helvetica'}{'Bold'}, 12/pt );
|
||||
$large_bold_text->fillcolor( 'black' );
|
||||
|
||||
$large_italic_text = $page->text;
|
||||
$large_italic_text->font( $font{'Helvetica'}{'Oblique'}, 12/pt );
|
||||
$large_italic_text->fillcolor( 'black' );
|
||||
|
||||
$large_text = $page->text;
|
||||
$large_text->font( $font{'Helvetica'}{'Normal'}, 12/pt );
|
||||
$large_text->fillcolor( 'black' );
|
||||
|
||||
$medium_bold_text = $page->text;
|
||||
$medium_bold_text->font( $font{'Helvetica'}{'Bold'}, 9.5/pt );
|
||||
$medium_bold_text->fillcolor( 'black' );
|
||||
|
||||
$medium_italic_text = $page->text;
|
||||
$medium_italic_text->font( $font{'Helvetica'}{'Oblique'}, 10/pt );
|
||||
$medium_italic_text->fillcolor( 'black' );
|
||||
|
||||
$medium_text = $page->text;
|
||||
$medium_text->font( $font{'Helvetica'}{'Normal'}, 9/pt );
|
||||
$medium_text->fillcolor( 'black' );
|
||||
|
||||
$medium_red_bold_text = $page->text;
|
||||
$medium_red_bold_text->font( $font{'Helvetica'}{'Bold'}, 8/pt );
|
||||
$medium_red_bold_text->fillcolor( 'red' );
|
||||
|
||||
$small_text = $page->text;
|
||||
$small_text->font( $font{'Helvetica'}{'Normal'}, 8/pt );
|
||||
$small_text->fillcolor( 'black' );
|
||||
|
||||
$small_blue_text = $page->text;
|
||||
$small_blue_text->font( $font{'Helvetica'}{'Normal'}, 8/pt );
|
||||
$small_blue_text->fillcolor( 'blue' );
|
||||
|
||||
$small_bold_text = $page->text;
|
||||
$small_bold_text->font( $font{'Helvetica'}{'Bold'}, 8/pt );
|
||||
$small_bold_text->fillcolor( 'black' );
|
||||
|
||||
$small_italic_text = $page->text;
|
||||
$small_italic_text->font( $font{'Helvetica'}{'Oblique'}, 8/pt );
|
||||
$small_italic_text->fillcolor( 'black' );
|
||||
|
||||
$tiny_text = $page->text;
|
||||
$tiny_text->font( $font{'Helvetica'}{'Normal'}, 7/pt );
|
||||
$tiny_text->fillcolor( 'black' );
|
||||
|
||||
$tiny_bold_text = $page->text;
|
||||
$tiny_bold_text->font( $font{'Helvetica'}{'Bold'}, 7/pt );
|
||||
$tiny_bold_text->fillcolor( 'black' );
|
||||
|
||||
$tiny_italic_text = $page->text;
|
||||
$tiny_italic_text->font( $font{'Helvetica'}{'Oblique'}, 7/pt );
|
||||
$tiny_italic_text->fillcolor( 'black' );
|
||||
|
||||
$grey_text_above_right = $page -> text;
|
||||
$grey_text_above_right -> font($font{'Helvetica'}{'Normal'}, 9/pt);
|
||||
$grey_text_above_right -> fillcolor('#808080');
|
||||
|
||||
$small_bold_text_white = $page->text;
|
||||
$small_bold_text_white->font( $font{'Helvetica'}{'Bold'}, 8/pt );
|
||||
$small_bold_text_white->fillcolor( 'white' );
|
||||
|
||||
$small_medium_bold_text_white = $page->text;
|
||||
$small_medium_bold_text_white->font( $font{'Helvetica'}{'Bold'}, 9/pt );
|
||||
$small_medium_bold_text_white->fillcolor( 'white' );
|
||||
|
||||
$medium_bold_text_white = $page->text;
|
||||
$medium_bold_text_white->font( $font{'Helvetica'}{'Bold'}, 10/pt );
|
||||
$medium_bold_text_white->fillcolor( 'white' );
|
||||
|
||||
$large_bold_text_white = $page->text;
|
||||
$large_bold_text_white->font( $font{'Helvetica'}{'Bold'}, 12/pt );
|
||||
$large_bold_text_white->fillcolor( 'white' );
|
||||
|
||||
$medium_green_text = $page->text;
|
||||
$medium_green_text->font( $font{'Helvetica'}{'Normal'}, 10/pt );
|
||||
$medium_green_text->fillcolor( 'green' );
|
||||
|
||||
|
||||
if ($blue_box) {
|
||||
$up = 292 ;
|
||||
&pdf_box_block_top(5,205,'#009bc8') ; # start block -------------------------------------
|
||||
}
|
||||
|
||||
if ($inner_blue_box) {
|
||||
$up = 287 ;
|
||||
$top = $up;
|
||||
&pdf_box_block_top($blocks[1],200,'#009bc8') ; # start block -------------------------------------
|
||||
}
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub finish_pdf {
|
||||
|
||||
$pdf->save;
|
||||
$pdf->end();
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_page_header {
|
||||
|
||||
$page_num++ ;
|
||||
|
||||
# my $image1 = $page->gfx(1) ;
|
||||
# my $image1_thumb = "$htmlpath/img/pdf_logo.jpg";
|
||||
# $pdf_image1_file = $pdf->image_jpeg($image1_thumb);
|
||||
# $image1->image($pdf_image1_file, $across/mm, $up/mm, 80/mm, 19/mm);
|
||||
|
||||
my $image1 = $page->gfx(1) ;
|
||||
my $image1_thumb = "$htmlpath/img/pdf_logo.png";
|
||||
$pdf_image1_file = $pdf->image_png($image1_thumb);
|
||||
$image1->image($pdf_image1_file, 10/mm, $up/mm, 90/mm, 29/mm);
|
||||
|
||||
$up+=26 ;
|
||||
|
||||
&pdf_grey_text_above_right (198,$up,"$useropts{company}") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"Co Reg: $useropts{co_reg}") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"Vat Reg: $useropts{vat_nr}") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"$useropts{address1}") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"$useropts{address2}, $useropts{address3}, $useropts{city}") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"South Africa") ;
|
||||
&pdf_nl_s;
|
||||
&pdf_grey_text_above_right (198,$up,"Tel: $useropts{tel}") ;
|
||||
&pdf_nl_s;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_footer {
|
||||
|
||||
$up = 10 ;
|
||||
|
||||
&pdf_black_line ;
|
||||
&pdf_tiny_text (50, 5, "Johannesburg: $useropts{tel}, Email: $useropts{email}") ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_text_block {
|
||||
|
||||
my ($along,$text_block,$tlock_length,$grid) = @_ ;
|
||||
|
||||
my $lines = 1;
|
||||
|
||||
# $max_text_length = 120 unless $max_text_length ;
|
||||
|
||||
$text_block =~ s/\n/ <br>/g;
|
||||
$text_block = substr($text_block,0,-4) if substr($text_block,-4,4) eq '<br>' ;
|
||||
|
||||
my @words_array = split (/ /, $text_block) ;
|
||||
my $wrapped_line = '' ;
|
||||
my $block_start_up = $up ;
|
||||
my $tlock_length_orig = $tlock_length ;
|
||||
my $word_cnt = 0 ;
|
||||
|
||||
foreach my $word (@words_array) {
|
||||
my $word_length = length($word) ;
|
||||
my $wrapped_line_length = length($wrapped_line) ;
|
||||
$tlock_length-- if $word eq uc $word ;
|
||||
$word_length -= 4 if $word =~ /<br>/ ;
|
||||
if (($wrapped_line_length + $word_length) > $tlock_length or $word =~ /<br>/) {
|
||||
$word =~ s/<br>//g if $word =~ /<br>/ ;
|
||||
$tlock_length = $tlock_length_orig ;
|
||||
&pdf_text_block_line($along,$grid,$wrapped_line) ;
|
||||
if ($grid == 1 or $grid == 2) {
|
||||
&pdf_nl_gr ;
|
||||
} elsif ($grid == 6) {
|
||||
$up -= 3.25 ;
|
||||
} else {
|
||||
&pdf_nl_s ;
|
||||
}
|
||||
$lines++;
|
||||
$wrapped_line = '' ;
|
||||
}
|
||||
$word_cnt++ ;
|
||||
$wrapped_line .= $word . ' ' ;
|
||||
}
|
||||
|
||||
&pdf_text_block_line($along,$grid,$wrapped_line) ;
|
||||
|
||||
if ($grid == 2) {
|
||||
&pdf_nl_t;
|
||||
}
|
||||
elsif ($grid == 1) {
|
||||
$up = $block_start_up ;
|
||||
}
|
||||
elsif ($grid == 5) {
|
||||
&pdf_nl_gr;
|
||||
}
|
||||
elsif ($grid == 6) {
|
||||
$up -= 1.25 ;
|
||||
} else {
|
||||
&pdf_nl_s;
|
||||
#$up = $up - 8;
|
||||
}
|
||||
|
||||
return ($lines) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_text_block_line {
|
||||
|
||||
my ($along,$grid,$wrapped_line) = @_ ;
|
||||
|
||||
if ($grid == 1) {
|
||||
&pdf_tiny_text ($along,$up,$wrapped_line) ;
|
||||
}
|
||||
elsif ($grid == 2) {
|
||||
&pdf_tiny_bold_text ($along,$up,$wrapped_line) ;
|
||||
}
|
||||
elsif ($grid == 3) {
|
||||
&pdf_medium_text ($along,$up,$wrapped_line) ;
|
||||
}
|
||||
elsif ($grid == 4) {
|
||||
&pdf_small_bold_text ($along,$up,$wrapped_line) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
&pdf_small_text ($along,$up,$wrapped_line) ;
|
||||
}
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_text_center {
|
||||
|
||||
my ($text,$along,$colwidth) = @_ ;
|
||||
|
||||
my $width = $tiny_text->advancewidth($text);
|
||||
|
||||
$width-=$colwidth ;
|
||||
|
||||
$tiny_text->translate( $along/mm, $up/mm );
|
||||
$tiny_text->text($text,-indent=>-($width/2));
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_check_value_of_up {
|
||||
|
||||
my ($value) = @_ ;
|
||||
|
||||
if ($up < $value) {
|
||||
if ($blue_box) {
|
||||
$up=5;
|
||||
&pdf_box_block_bottom(5,205,'#009bc8') ; # end block -------------------------------------
|
||||
}
|
||||
if ($inner_blue_box) {
|
||||
$up=10;
|
||||
&vertical_lines_inner_box;
|
||||
&pdf_box_block_bottom($blocks[1],200,'#009bc8') ; # end block -------------------------------------
|
||||
}
|
||||
|
||||
&pdf_initialise_page ;
|
||||
if ($layout eq 'landscape') {
|
||||
$up = 195 ;
|
||||
$across = 1 ;
|
||||
&pdf_black_line(10,$up,287,$up) ; # horizontal
|
||||
}
|
||||
elsif ($label) {
|
||||
$label_height = '' ;
|
||||
$up = 287 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$up = 272 ;
|
||||
$across = 1 ;
|
||||
}
|
||||
# &pdf_page_header ;
|
||||
}
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_tt {
|
||||
|
||||
$up = $up - 2 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_gr {
|
||||
|
||||
$up = $up - 2.7 ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_t {
|
||||
|
||||
$up = $up - 3 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_s {
|
||||
|
||||
$up = $up - 4 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl {
|
||||
|
||||
$up = $up - 5 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_gap_1 {
|
||||
|
||||
$up = $up - 6 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_gap_2 {
|
||||
|
||||
$up = $up - 7 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_nl_gap_3 {
|
||||
|
||||
$up = $up - 8 ;
|
||||
# &pdf_check_value_of_up(20) ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_dashed_line {
|
||||
|
||||
my ($start,$length) = @_ ;
|
||||
|
||||
unless ($start) { $start = 10 ; }
|
||||
unless ($length) { $length = 200 ; }
|
||||
|
||||
my $dashed_line = $page->gfx(1);
|
||||
$dashed_line->strokecolor( 'black' );
|
||||
$dashed_line->linewidth( '0.5' );
|
||||
$dashed_line->linedash(3,4);
|
||||
$dashed_line->move($start/mm,$up/mm);
|
||||
$dashed_line->line($length/mm,$up/mm);
|
||||
$dashed_line->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_grey_line {
|
||||
|
||||
my ($start,$end) = @_ ;
|
||||
|
||||
my $grey_line = $page->gfx(1);
|
||||
$grey_line->strokecolor( 'grey' );
|
||||
$grey_line->linewidth( '0.8' );
|
||||
$grey_line->linedash();
|
||||
$grey_line->move( $start/mm, ($up/mm) ); $grey_line->line($end/mm, ($up/mm) ); $grey_line->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_black_line {
|
||||
|
||||
my ($x1,$y1,$x2,$y2) = @_ ;
|
||||
|
||||
unless ($x1) { $x1 = 10 ; }
|
||||
unless ($y1) { $y1 = $up ; }
|
||||
unless ($x2) { $x2 = 200 ; }
|
||||
unless ($y2) { $y2 = $up ; }
|
||||
|
||||
my $pdf_black_line = $page->gfx(1);
|
||||
$pdf_black_line->strokecolor( 'black' );
|
||||
$pdf_black_line->linewidth( '0.5' );
|
||||
$pdf_black_line->linedash();
|
||||
$pdf_black_line->move($x1/mm,$y1/mm);
|
||||
$pdf_black_line->line($x2/mm,$y2/mm);
|
||||
$pdf_black_line->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_bar {
|
||||
|
||||
my ($x1,$y1,$x2,$y2,$cl,$tx,$lw,$txa,$size,$text_color,$cnt_lines,$max_text_length) = @_ ; # &pdf_bar(10,$up,200,$up,'#009bc8','Quote',5) ;
|
||||
|
||||
unless ($x1) { $x1 = 10 ; }
|
||||
unless ($y1) { $y1 = $up ; }
|
||||
unless ($x2) { $x2 = 200 ; }
|
||||
unless ($y2) { $y2 = $up ; }
|
||||
|
||||
unless ($cl) { $cl = 'black' ; }
|
||||
unless ($lw) { $lw = 5 ; }
|
||||
# unless ($txcl) { $txcl = 'white' ; }
|
||||
|
||||
my $pdf_black_line = $page->gfx(1);
|
||||
$pdf_black_line->strokecolor($cl);
|
||||
$pdf_black_line->linewidth($lw);
|
||||
$pdf_black_line->linedash();
|
||||
$pdf_black_line->move($x1/mm,$y1/mm);
|
||||
$pdf_black_line->line($x2/mm,$y2/mm);
|
||||
$pdf_black_line->stroke;
|
||||
|
||||
if (not $size and not $text_color) { &pdf_bar_head_bold_text($txa,$up-1.5,$tx) ; } # default to large text
|
||||
elsif ($size eq 'med' and not $text_color) { &pdf_medium_white_text_bold($txa,$up-1,$tx) ; }
|
||||
elsif ($size eq 'small' and not $text_color) { &pdf_small_medium_white_text_bold($txa,$up-1,$tx) ; }
|
||||
elsif ($size eq 'med_right' and not $text_color) { &pdf_medium_white_text_bold_right($txa,$up-1,$tx) ; } # medium text
|
||||
elsif ($size eq 'small_right' and not $text_color) { &pdf_small_medium_white_text_bold_right($txa,$up-1,$tx) ; }
|
||||
elsif ($size eq 'small' and $text_color eq 'small_black' and ($cnt_lines == 1 or not $cnt_lines)) { &pdf_small_text($txa,$up,$tx) ; }
|
||||
elsif ($size eq 'small' and $text_color eq 'small_black' and $cnt_lines >= 1) { &pdf_text_block($txa,$tx,$max_text_length,6) ; }
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------ added by handre
|
||||
sub pdf_extra_thin_black_line {
|
||||
|
||||
my ($x1,$y1,$x2,$y2,$color) = @_ ;
|
||||
|
||||
$color = 'black' if not $color ; # $color = '#009bc8' ;
|
||||
|
||||
unless ($x1) { $x1 = 10 ; }
|
||||
unless ($y1) { $y1 = $up ; }
|
||||
unless ($x2) { $x2 = 200 ; }
|
||||
unless ($y2) { $y2 = $up ; }
|
||||
|
||||
my $pdf_black_line = $page->gfx(1);
|
||||
$pdf_black_line->strokecolor($color);
|
||||
$pdf_black_line->linewidth( '0.5' );
|
||||
$pdf_black_line->linedash();
|
||||
$pdf_black_line->move($x1/mm,$y1/mm);
|
||||
$pdf_black_line->line($x2/mm,$y2/mm);
|
||||
$pdf_black_line->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_thin_box_block_top {
|
||||
|
||||
my ($st,$en,$color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
$box_start{$st} = $up ;
|
||||
|
||||
&pdf_extra_thin_black_line($st,$up,$en,$up,$color) ; # horizontal
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_thin_box_block_bottom {
|
||||
|
||||
my ($st,$en,$color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
&pdf_extra_thin_black_line($st,$up,$en,$up,$color) ; # horizontal
|
||||
|
||||
&pdf_extra_thin_black_line ($st,$box_start{$st},$st,$up,$color) ; # vertical
|
||||
&pdf_extra_thin_black_line ($en,$box_start{$st},$en,$up,$color) ; # vertical
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------------- added by handre
|
||||
|
||||
|
||||
sub pdf_thin_black_line {
|
||||
|
||||
my ($x1,$y1,$x2,$y2,$color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
unless ($x1) { $x1 = 10 ; }
|
||||
unless ($y1) { $y1 = $up ; }
|
||||
unless ($x2) { $x2 = 200 ; }
|
||||
unless ($y2) { $y2 = $up ; }
|
||||
|
||||
my $pdf_black_line = $page->gfx(1);
|
||||
$pdf_black_line->strokecolor($color);
|
||||
$pdf_black_line->linewidth( '1.5' );
|
||||
$pdf_black_line->linedash();
|
||||
$pdf_black_line->move($x1/mm,$y1/mm);
|
||||
$pdf_black_line->line($x2/mm,$y2/mm);
|
||||
$pdf_black_line->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_curr_symbols {
|
||||
|
||||
$curr_symb{ZAR} = 'R';
|
||||
$curr_symb{USD} = '$';
|
||||
# $curr_symb{GBP} = '£';
|
||||
$curr_symb{GBP} = 'GBP';
|
||||
# $curr_symb{EUR} = '€';
|
||||
$curr_symb{EUR} = 'EUR';
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_box_block_top {
|
||||
|
||||
my ($st,$en,$color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
$box_start{$st} = $up ;
|
||||
|
||||
&pdf_thin_black_line($st,$up,$en,$up,$color) ; # horizontal
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_box_block_bottom {
|
||||
|
||||
my ($st,$en,$color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
&pdf_thin_black_line($st,$up,$en,$up,$color) ; # horizontal
|
||||
|
||||
&pdf_thin_black_line ($st,$box_start{$st},$st,$up,$color) ; # vertical
|
||||
&pdf_thin_black_line ($en,$box_start{$st},$en,$up,$color) ; # vertical
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_rounded_half_page_block_top {
|
||||
|
||||
my ($color) = @_ ; unless ($color) { $color = 'black' ; } # $color = '#009bc8' ;
|
||||
|
||||
$box_start = $up ;
|
||||
|
||||
$pdf_rounded_half_page_block = $page->gfx(1);
|
||||
$pdf_rounded_half_page_block->strokecolor( 'black' );
|
||||
$pdf_rounded_half_page_block->linewidth( '0.5' );
|
||||
$pdf_rounded_half_page_block->linedash();
|
||||
$pdf_rounded_half_page_block->move(14/mm,($up/mm) );
|
||||
$pdf_rounded_half_page_block->line(196/mm,($up/mm) );
|
||||
$curve = $up-4 ;
|
||||
$pdf_rounded_half_page_block->curve(196/mm,($up/mm),200/mm,($up/mm),200/mm,($curve/mm)) ;
|
||||
$up-=4 ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_rounded_half_page_block_rest {
|
||||
|
||||
$box_up = $up + 3 ;
|
||||
|
||||
$pdf_rounded_half_page_block->line(200/mm,($box_up/mm) );
|
||||
$curve = $box_up-4 ;
|
||||
$pdf_rounded_half_page_block->curve(200/mm,($box_up/mm),200/mm,($curve/mm),196/mm,($curve/mm)) ;
|
||||
$box_up-=4 ;
|
||||
$pdf_rounded_half_page_block->move(196/mm,($box_up/mm) );
|
||||
$pdf_rounded_half_page_block->line(14/mm,($box_up/mm) );
|
||||
$curve = $box_up+4 ;
|
||||
$pdf_rounded_half_page_block->curve(14/mm,($box_up/mm),10/mm,($box_up/mm),10/mm,($curve/mm)) ;
|
||||
$box_up+=4 ;
|
||||
$pdf_rounded_half_page_block->move(10/mm,($box_up/mm) );
|
||||
$box_up = $box_start-4 ;
|
||||
$pdf_rounded_half_page_block->line(10/mm,($box_up/mm) );
|
||||
$curve = $box_up+4 ;
|
||||
$pdf_rounded_half_page_block->curve(10/mm,($box_up/mm),10/mm,($curve/mm),14/mm,($curve/mm)) ;
|
||||
$pdf_rounded_half_page_block->stroke;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
# sub pdf_rounded_half_page_block {
|
||||
|
||||
# my $pdf_rounded_half_page_block = $page->gfx(1);
|
||||
# $pdf_rounded_half_page_block->strokecolor( 'black' );
|
||||
# $pdf_rounded_half_page_block->linewidth( '0.5' );
|
||||
# $pdf_rounded_half_page_block->linedash();
|
||||
# $pdf_rounded_half_page_block->move(14/mm,($up/mm) );
|
||||
# $pdf_rounded_half_page_block->line(196/mm,($up/mm) );
|
||||
# $curve = $up-4 ;
|
||||
# $pdf_rounded_half_page_block->curve(196/mm,($up/mm),200/mm,($up/mm),200/mm,($curve/mm)) ;
|
||||
# $up-=4 ;
|
||||
# $pdf_rounded_half_page_block->move(200/mm,($up/mm) );
|
||||
# $up-=106 ;
|
||||
# $pdf_rounded_half_page_block->line(200/mm,($up/mm) );
|
||||
# $curve = $up-4 ;
|
||||
# $pdf_rounded_half_page_block->curve(200/mm,($up/mm),200/mm,($curve/mm),196/mm,($curve/mm)) ;
|
||||
# $up-=4 ;
|
||||
# $pdf_rounded_half_page_block->move(196/mm,($up/mm) );
|
||||
# $pdf_rounded_half_page_block->line(14/mm,($up/mm) );
|
||||
# $curve = $up+4 ;
|
||||
# $pdf_rounded_half_page_block->curve(14/mm,($up/mm),10/mm,($up/mm),10/mm,($curve/mm)) ;
|
||||
# $up+=4 ;
|
||||
# $pdf_rounded_half_page_block->move(10/mm,($up/mm) );
|
||||
# $up+=106 ;
|
||||
# $pdf_rounded_half_page_block->line(10/mm,($up/mm) );
|
||||
# $curve = $up+4 ;
|
||||
# $pdf_rounded_half_page_block->curve(10/mm,($up/mm),10/mm,($curve/mm),14/mm,($curve/mm)) ;
|
||||
# $pdf_rounded_half_page_block->stroke;
|
||||
# $up-=110 ;
|
||||
|
||||
# } #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_xx_large_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $xx_large_text->translate( $along/mm, $up/mm ); $xx_large_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_xxx_large_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $xxx_large_bold_text->translate( $along/mm, $up/mm ); $xxx_large_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
sub pdf_xx_large_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $xx_large_bold_text->translate( $along/mm, $up/mm ); $xx_large_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_xx_large_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $xx_large_italic_text->translate( $along/mm, $up/mm ); $xx_large_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_x_large_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $x_large_text->translate( $along/mm, $up/mm ); $x_large_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_x_large_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $x_large_bold_text->translate( $along/mm, $up/mm ); $x_large_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_x_large_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $x_large_italic_text->translate( $along/mm, $up/mm ); $x_large_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_large_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $large_text->translate( $along/mm, $up/mm ); $large_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_large_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $large_bold_text->translate( $along/mm, $up/mm ); $large_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_large_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $large_italic_text->translate( $along/mm, $up/mm ); $large_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_text->translate( $along/mm, $up/mm ); $medium_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_bold_text->translate( $along/mm, $up/mm ); $medium_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_italic_text->translate( $along/mm, $up/mm ); $medium_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_bar_head_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $bar_head_bold_text->translate( $along/mm, $up/mm ); $bar_head_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_red_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_red_bold_text->translate( $along/mm, $up/mm ); $medium_red_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_bold_text_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_bold_text->translate( $along/mm, $up/mm ) ; $medium_bold_text->text_right( $text ) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_text->translate( $along/mm, $up/mm ); $small_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_blue_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_blue_text->translate( $along/mm, $up/mm ); $small_blue_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_bold_text->translate( $along/mm, $up/mm ); $small_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_italic_text->translate( $along/mm, $up/mm ); $small_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_text_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_text->translate( $along/mm, $up/mm ) ; $small_text->text_right( $text ) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_bold_text_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_bold_text->translate( $along/mm, $up/mm ) ; $small_bold_text->text_right( $text ) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_tiny_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $tiny_text->translate( $along/mm, $up/mm ); $tiny_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_tiny_bold_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $tiny_bold_text->translate( $along/mm, $up/mm ); $tiny_bold_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_tiny_italic_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $tiny_italic_text->translate( $along/mm, $up/mm ); $tiny_italic_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_tiny_text_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $tiny_text->translate( $along/mm, $up/mm ) ; $tiny_text->text_right( $text ) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_tiny_bold_text_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $tiny_bold_text->translate( $along/mm, $up/mm ) ; $tiny_bold_text->text_right( $text ) ;
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_white_text_bold {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_bold_text_white->translate( $along/mm, $up/mm ); $small_bold_text_white->text( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_medium_white_text_bold {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_medium_bold_text_white->translate( $along/mm, $up/mm ); $small_medium_bold_text_white->text( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_white_text_bold {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_bold_text_white->translate( $along/mm, $up/mm ); $medium_bold_text_white->text( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_large_white_text_bold {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $large_bold_text_white->translate( $along/mm, $up/mm ); $large_bold_text_white->text( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_grey_text_above_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $grey_text_above_right->translate( $along/mm, $up/mm ); $grey_text_above_right->text_right( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_white_text_bold_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_bold_text_white->translate( $along/mm, $up/mm ); $small_bold_text_white->text_right( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_medium_white_text_bold_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_medium_bold_text_white->translate( $along/mm, $up/mm ); $small_medium_bold_text_white->text_right( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_white_text_bold_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_bold_text_white->translate( $along/mm, $up/mm ); $medium_bold_text_white->text_right( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_large_white_text_bold_right {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $large_bold_text_white->translate( $along/mm, $up/mm ); $large_bold_text_white->text_right( $text );
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_small_oblique_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $small_oblique_text->translate( $along/mm, $up/mm ); $small_oblique_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_oblique_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_oblique_text->translate( $along/mm, $up/mm ); $medium_oblique_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub pdf_medium_green_text {
|
||||
|
||||
my ($along, $up, $text) = @_ ; $medium_green_text->translate( $along/mm, $up/mm ); $medium_green_text->text( $text );
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
# sub pdf_get_text_width {
|
||||
|
||||
# my ($$string) = @_ ;
|
||||
# my $text = $page->text;
|
||||
# my $font = $pdf->corefont('Helvetica'); # built-in font
|
||||
# my $size = 8;
|
||||
# $text->font($font, $size);
|
||||
# my $width = $text->advancewidth($string);
|
||||
|
||||
# } #----------------------------------------------------------------------------------------------------
|
||||
|
||||
# sub pdf_get_text_width {
|
||||
|
||||
# my ($string) = @_ ;
|
||||
# my $width = $text->advancewidth($string);
|
||||
# return ($width) ;
|
||||
|
||||
# } #----------------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
603
libs/modules/production_time.pm
Normal file
603
libs/modules/production_time.pm
Normal file
|
|
@ -0,0 +1,603 @@
|
|||
sub production_time_read_db_to_match_events_and_systems {
|
||||
|
||||
&common_date_array($last_start_ccyymmdd,$last_end_ccyymmdd);
|
||||
|
||||
&db_min_ro('event_systems','id,name,description,system_type','','','') ;
|
||||
foreach my $id (keys %{$db{event_systems}}) {
|
||||
$event_system_description{$id} = $db{event_systems}{$id}{description} ;
|
||||
$event_system_name{$id} = $db{event_systems}{$id}{name} ;
|
||||
}
|
||||
|
||||
$start_sql = substr($start_sql,0,11) . '00:00:00' ;
|
||||
$end_sql = substr($end_sql,0,11) . '23:59:59' ;
|
||||
|
||||
# &db_min_ro('event_quotes','id,ref,event_system_id_multiple,format_of_title,date_from,date_to',"(date_from BETWEEN '$start_sql' AND '$end_sql') OR (date_to BETWEEN '$start_sql' AND '$end_sql')",'','') ;
|
||||
|
||||
&db_min_ro('event_quotes','id,ref,event_system_id_multiple,format_of_title,date_from,date_to,sport_type_ids,club_ids',"((date_from BETWEEN '$start_sql' AND '$end_sql') OR (date_to BETWEEN '$start_sql' AND '$end_sql')) AND event_system_id_multiple IS NOT NULL AND event_system_id_multiple <> ''",'','') ;
|
||||
|
||||
our %seen_event_system_in_event_quotes = () ;
|
||||
|
||||
foreach my $event_id (keys %{$db{event_quotes}}) {
|
||||
|
||||
$db{event_quotes}{$event_id}{ref} =~ s/\'//g ;
|
||||
|
||||
$db{event_quotes}{$event_id}{event_system_id_multiple} =~ s/;+/;/g; # Replace multiple semicolons with one
|
||||
$db{event_quotes}{$event_id}{event_system_id_multiple} =~ s/^;+|;+$//g; # Remove leading or trailing semicolons
|
||||
|
||||
# next unless $db{event_quotes}{$event_id}{event_system_id_multiple} ;
|
||||
|
||||
$opts{matched_event} .= qq~<option value="$event_id">[$event_id] $db{event_quotes}{$event_id}{ref}</option>~ ;
|
||||
|
||||
foreach (split(";",$db{event_quotes}{$event_id}{event_system_id_multiple})) {
|
||||
|
||||
# $opts{matched_system} .= $seen_event_system_in_event_quotes{$_}
|
||||
$seen_event_system_in_event_quotes{$_} = 1 ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach (sort {$seen_event_system_in_event_quotes{$a} cmp $seen_event_system_in_event_quotes{$b}} keys %seen_event_system_in_event_quotes) {
|
||||
$opts{matched_system} .= qq~<option value="$_">$db{event_systems}{$_}{name} [$db{event_systems}{$_}{description}]</option>~ ;
|
||||
}
|
||||
|
||||
$opts{matched_system_none} .= qq~<option value="-1">$db{event_systems}{-1}{name} [$db{event_systems}{-1}{description}]</option>~ ;
|
||||
|
||||
&db_min_ro('sport_types','*','','','') ;
|
||||
|
||||
our %sport_name_to_id = () ;
|
||||
|
||||
foreach (keys %{$db{sport_types}}) {
|
||||
$db{sport_types}{$_}{name} = lc $db{sport_types}{$_}{name} ;
|
||||
$db{sport_types}{$_}{name} =~ s/ //g ;
|
||||
$sport_name_to_id{$db{sport_types}{$_}{name}} = $_ ;
|
||||
}
|
||||
|
||||
&db_min_ro('clubs','id,name','','','') ;
|
||||
|
||||
foreach (keys %{$db{clubs}}) {
|
||||
my $c_name = lc $db{clubs}{$_}{name} ;
|
||||
$c_name =~ s/\'//g ;
|
||||
$club_name_to_id{$c_name} = $_ ;
|
||||
}
|
||||
|
||||
# foreach my $id (keys %{$db{event_quotes}}) {
|
||||
# # $match_bank_trans{$db{event_quotes}{$id}{trans_date}}{$db{event_quotes}{$id}{description}} = 1 ;
|
||||
|
||||
# foreach my $event_id (split(";",$db{$tables}{$id}{event_system_id_multiple})) {
|
||||
# $val .= qq~$db{event_systems}{$event_id}{name} [$db{event_systems}{$event_id}{description}], ~ ;
|
||||
# }
|
||||
# }
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub production_time_process_matched_events_and_systems {
|
||||
|
||||
my %system_match = () ; my %matched_event_name = () ; my %csv_line_possible_match = () ; my %matched_events = () ;
|
||||
|
||||
$system_match{"None"}{"None"} = -1 ;
|
||||
|
||||
foreach my $event_code (keys %csv_line) {
|
||||
|
||||
next if $matched_event{$event_code} ;
|
||||
|
||||
my ($club_name,$system_desc_clue) = split("-",$csv_line{$event_code}{club_name}) ;
|
||||
$club_name =~ s/ $//g ; $system_desc_clue =~ s/^ //g ; # remove whitespace
|
||||
$club_name =~ s/\'//g ;
|
||||
|
||||
$system_desc_clue = "None" unless $system_desc_clue ;
|
||||
|
||||
my @eventdetails = split(/ /,$club_name) ;
|
||||
|
||||
my $system_name_clue = $eventdetails[-1] ; $system_name_clue = "None" if $system_name_clue !~ /\d+/ ;
|
||||
|
||||
if ($system_desc_clue =~ /\d+/ && length($system_desc_clue) == 5) {
|
||||
$system_name_clue = $system_desc_clue ;
|
||||
$system_desc_clue = 'None' ;
|
||||
}
|
||||
|
||||
if ($system_desc_clue =~ /AISA/ && $system_desc_clue =~ /SOLO/) {
|
||||
my @sysparts = split(/\_/,$system_desc_clue) ;
|
||||
$system_name_clue = $sysparts[2] ;
|
||||
$system_desc_clue =~ s/\_/ /g ;
|
||||
}
|
||||
|
||||
$csv_line{$event_code}{system_id} = -1 if $system_name_clue eq 'None' && $system_desc_clue eq 'None' ;
|
||||
|
||||
$system_desc_clue = lc $system_desc_clue ;
|
||||
|
||||
$csv_line{$event_code}{system_id} = $system_match{$system_name_clue}{$system_desc_clue} if $system_match{$system_name_clue}{$system_desc_clue} ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id}) {
|
||||
|
||||
foreach my $system_id (keys %{$db{event_systems}}) {
|
||||
# foreach my $system_id (keys %seen_event_system_in_event_quotes) {
|
||||
|
||||
my $sys_desc = lc $db{event_systems}{$system_id}{description} ;
|
||||
my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
if (($sys_name =~ /\b$system_name_clue\b/ || $sys_name =~ /_$system_name_clue\b/) && $sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
} elsif (($sys_name =~ /\b$system_name_clue\b/ || $sys_name =~ /_$system_name_clue\b/) && $system_name_clue ne 'None' && $system_desc_clue eq 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
} elsif ($sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue eq 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
last ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my @sport_split = split(":",$csv_line{$event_code}{event_name}) ;
|
||||
|
||||
$sport_split[0] =~ s/ //g ;
|
||||
$sport_split[0] = lc $sport_split[0] ;
|
||||
|
||||
my $sport_id = ($csv_line{$event_code}{event_name} =~ /:/) ? $sport_name_to_id{$sport_split[0]} : '' ;
|
||||
|
||||
my @event_name_details = split(/-/,$csv_line{$event_code}{event_name}) ;
|
||||
|
||||
my $to_match_event_name = $event_name_details[-1] ;
|
||||
|
||||
$to_match_event_name =~ s/^ //g ;
|
||||
$to_match_event_name =~ s/ $//g ;
|
||||
|
||||
$to_match_event_name = ($csv_line{$event_code}{event_name} =~ /:/ && $csv_line{$event_code}{event_name} !~ /-/) ? $sport_split[1] : $to_match_event_name ;
|
||||
|
||||
$to_match_event_name =~ s/\'//g ;
|
||||
|
||||
my $club_id = $club_name_to_id{$club_name} ;
|
||||
|
||||
$club_name = ($csv_line{$event_code}{club_name} =~ /AISA/ && $csv_line{$event_code}{club_name} =~ /SOLO/) ? lc $club_name : lc $csv_line{$event_code}{club_name} ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next unless $id ;
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
next if !$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
if ($to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
$matched_events{$event_code} .= qq~$id;~ ;
|
||||
}
|
||||
|
||||
my $found_match = 0 ;
|
||||
|
||||
foreach my $system_id (split(";",$db{event_quotes}{$id}{event_system_id_multiple})) {
|
||||
|
||||
my $sys_desc = lc $db{event_systems}{$system_id}{description} ;
|
||||
my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
if ($sys_name =~ /\b$system_name_clue\b/ && $sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
} elsif ($sys_name =~ /\b$system_name_clue\b/ && $system_name_clue ne 'None' && $system_desc_clue eq 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
} elsif ($sys_desc =~ /\b$system_desc_clue\b/ && $system_name_clue eq 'None' && $system_desc_clue ne 'none') {
|
||||
$csv_line{$event_code}{system_id} = $system_id ;
|
||||
$system_match{$system_name_clue}{$system_desc_clue} = $system_id ;
|
||||
}
|
||||
|
||||
# my $sys_desc = $db{event_systems}{$system_id}{description} ;
|
||||
# my $sys_name = $db{event_systems}{$system_id}{name} ;
|
||||
|
||||
# # my @sysparts = split(/\_/,$system) ;
|
||||
|
||||
# if ($sys_name =~ /\b$sysno\b/ && $sys_desc =~ /\b$system\b/iog) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($system =~ /\d+/ && $sys_name =~ /\b$system\b/) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($system =~ /AISA/ && $system =~ /SOLO/ && $sysparts[2] && $sys_name =~ /\b$sysparts[2]\b/) {
|
||||
# $csv_line{$event_code}{system_id} = $system_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# } elsif ($sys_desc eq 'St Stithians Hockey Red' && $clubname =~ /Red/i && $clubname =~ /Stithians/i) {
|
||||
# $csv_line{$event_code}{system_id} = $event_id ;
|
||||
# $system_match{$system}{$sysno} = $system_id ;
|
||||
# $found_match = 1 ;
|
||||
# }
|
||||
}
|
||||
|
||||
if ($found_match && !$csv_line{$event_code}{event_id}) {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($csv_line{$event_code}{system_id} && !$csv_line{$event_code}{event_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
if (!$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\b$csv_line{$event_code}{system_id}\b/) {
|
||||
if ($csv_line{$event_code}{system_id} && !$seen_event_system_in_event_quotes{$csv_line{$event_code}{system_id}}) {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
next ;
|
||||
}
|
||||
|
||||
# if ($to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
if ($db{event_quotes}{$id}{sport_type_ids} && $to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} elsif ($db{event_quotes}{$id}{sport_type_ids}) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} else {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((!$csv_line{$event_code}{system_id}) && !$csv_line{$event_code}{event_id}) {
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
|
||||
next if $sport_id && $db{event_quotes}{$id}{sport_type_ids} && $db{event_quotes}{$id}{sport_type_ids} !~ /\b$sport_id\b/ ;
|
||||
|
||||
next if $club_id && $db{event_quotes}{$id}{club_ids} !~ /\b$club_id\b/ ;
|
||||
|
||||
next if !$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ ;
|
||||
|
||||
my $event_end = substr($db{event_quotes}{$id}{date_to},0,11) . '23:59:59' ;
|
||||
|
||||
my $event_start = substr($db{event_quotes}{$id}{date_from},0,11) . '00:00:00' ;
|
||||
|
||||
my $after_event_end = &greater_date_time($event_end,$csv_line{$event_code}{start_time}) ;
|
||||
next if $after_event_end ;
|
||||
|
||||
my $before_event_start = &greater_date_time($csv_line{$event_code}{end_time},$event_start) ;
|
||||
next if $before_event_start ;
|
||||
|
||||
# if (!$db{event_quotes}{$id}{event_system_id_multiple} || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\d+/ || $db{event_quotes}{$id}{event_system_id_multiple} !~ /\b$csv_line{$event_code}{system_id}\b/) {
|
||||
# if ($csv_line{$event_code}{system_id} && !$seen_event_system_in_event_quotes{$csv_line{$event_code}{system_id}}) {
|
||||
# $csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
# }
|
||||
# next ;
|
||||
# }
|
||||
|
||||
if ($db{event_quotes}{$id}{sport_type_ids} && $to_match_event_name && ($db{event_quotes}{$id}{ref} eq $to_match_event_name || $db{event_quotes}{$id}{ref} =~ /$to_match_event_name/)) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} elsif ($db{event_quotes}{$id}{sport_type_ids}) {
|
||||
$csv_line{$event_code}{event_id} = $id ;
|
||||
last ;
|
||||
} else {
|
||||
$csv_line_possible_match{$event_code}{event_id} .= qq~$id;~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chop $csv_line_possible_match{$event_code}{event_id} if $csv_line_possible_match{$event_code}{event_id} ;
|
||||
|
||||
}
|
||||
|
||||
$print_box_content_rows .= &common_min_forms_start("$lcpage") ;
|
||||
|
||||
our @sql_col_display = ("club_system","system_nr","matched_system","production_hours","production_seconds","cloud_recording_seconds","club_name","start","end","event_name","matched_event","match") ;
|
||||
|
||||
my $row_cnt = 0 ; my %no_system_or_event = () ;
|
||||
|
||||
foreach my $event_code (sort {$csv_line{$a}{line_cnt} cmp $csv_line{$b}{line_cnt}} keys %csv_line) {
|
||||
|
||||
next if $matched_event{$event_code} ;
|
||||
|
||||
$row_cnt++ ;
|
||||
|
||||
$print_tbody .= qq~<tr id="$row_cnt">~ ;
|
||||
|
||||
my $cell_id = qq~~ ;
|
||||
|
||||
my ($system,$sysno) = split(" - ",$csv_line{$event_code}{club_name}) ;
|
||||
|
||||
my @get_sport = (!$csv_line{$event_code}{system_id} || (!$csv_line{$event_code}{event_id} && !$csv_line_possible_match{$event_code}{event_id}) || (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} =~ /;/)) ? split(/\:/,$csv_line{$event_code}{event_name}) : () ;
|
||||
|
||||
$extra_form_fields .= qq~<input type="text" name='$event_code' value="$event_code_to_line{$event_code}" style="display:none;">~ if !$csv_line{$event_code}{system_id} || !$csv_line{$event_code}{event_id} ;
|
||||
|
||||
foreach my $col (@sql_col_display) {
|
||||
|
||||
my $val = '' ; $nowrap = '' ;
|
||||
|
||||
if ($col eq 'club_name') {
|
||||
$val = $csv_line{$event_code}{club_name} ;
|
||||
} elsif ($col eq 'system_nr') {
|
||||
$val = $sysno ;
|
||||
} elsif ($col eq 'start') {
|
||||
$val = $csv_line{$event_code}{start_time} ;
|
||||
$nowrap = 'nowrap' ;
|
||||
} elsif ($col eq 'end') {
|
||||
$val = $csv_line{$event_code}{end_time} ;
|
||||
$nowrap = 'nowrap' ;
|
||||
} elsif ($col eq 'club_system') {
|
||||
$val = $system ;
|
||||
} elsif ($col eq 'matched_system') {
|
||||
|
||||
$preferred_placeholder{"system_$row_cnt"} = "Select System" ;
|
||||
|
||||
$found_system_drop_down = 1 if !$csv_line{$event_code}{system_id} || $csv_line{$event_code}{system_id} eq '-1' ;
|
||||
|
||||
# $allow_deselect{"system_$row_cnt"} = 1 ;
|
||||
|
||||
$val = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? "$db{event_systems}{$csv_line{$event_code}{system_id}}{name} [$db{event_systems}{$csv_line{$event_code}{system_id}}{description}]" : ($csv_line{$event_code}{system_id} eq '-1') ? &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system_none") : &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system") ;
|
||||
# $val = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? "$db{event_systems}{$csv_line{$event_code}{system_id}}{name} [$db{event_systems}{$csv_line{$event_code}{system_id}}{description}]" : &common_min_table_select("system_$row_cnt","",'','','','','',"matched_system") ;
|
||||
|
||||
if (!$csv_line{$event_code}{system_id} || $csv_line{$event_code}{system_id} eq '-1') {
|
||||
|
||||
my $sport_name = ($csv_line{$event_code}{event_name} =~ /:/) ? $get_sport[0] : $csv_line{$event_code}{event_name} ;
|
||||
$no_system_or_event{$csv_line{$event_code}{club_name}}{substr($csv_line{$event_code}{start_time},0,10)}{$sport_name}{system} .= qq~"#selectSystem_$row_cnt",~ ;
|
||||
|
||||
}
|
||||
|
||||
$cell_id = qq~id="matched_system_$row_cnt"~ ;
|
||||
|
||||
} elsif ($col eq 'production_hours') {
|
||||
$val = $csv_line{$event_code}{production_hours} ;
|
||||
$val =~ s/\,/\./g ;
|
||||
} elsif ($col eq 'production_seconds') {
|
||||
$val = &common_commify($csv_line{$event_code}{production_seconds}) ;
|
||||
} elsif ($col eq 'cloud_recording_seconds') {
|
||||
$val = &common_commify($csv_line{$event_code}{cloud_seconds}) ;
|
||||
} elsif ($col eq 'event_name') {
|
||||
$val = $csv_line{$event_code}{event_name} ;
|
||||
} elsif ($col eq 'matched_event') {
|
||||
|
||||
$csv_line_possible_match{$event_code}{event_id} =~ s/\;/\_/g ;
|
||||
|
||||
my $col_name = (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id}) ? "matched_event_$csv_line_possible_match{$event_code}{event_id}" : "matched_event" ;
|
||||
|
||||
$opts{$col_name} =
|
||||
($csv_line_possible_match{$event_code}{event_id} && !$csv_line{$event_code}{event_id}) ? join "</option><option ", map { qq~value="$_"><strong>Possible : </strong>$db{event_quotes}{$_}{ref} [$_]~ } split "_" , $csv_line_possible_match{$event_code}{event_id} :
|
||||
$opts{matched_event} ;
|
||||
|
||||
$opts{$col_name} = qq~<option ~ . $opts{$col_name} . qq~</option>~ if $col_name ne 'matched_event' ;
|
||||
|
||||
$preferred_placeholder{"event_$row_cnt"} = "Select Event" ;
|
||||
|
||||
$val = ($csv_line{$event_code}{event_id}) ? "$db{event_quotes}{$csv_line{$event_code}{event_id}}{ref} [$csv_line{$event_code}{event_id}]" :
|
||||
|
||||
# (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} !~ /_/) ? "<strong>POSSIBLE : </strong>$db{event_quotes}{$csv_line_possible_match{$event_code}{event_id}}{ref} [$csv_line_possible_match{$event_code}{event_id}]" :
|
||||
|
||||
(!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id}) ? &common_min_table_select("event_$row_cnt",'','','','','','',$col_name) :
|
||||
&common_min_table_select("event_$row_cnt",'','','','','','','matched_event') ;
|
||||
|
||||
$found_event_drop_down = 1 if !$csv_line{$event_code}{event_id} ;
|
||||
# $found_event_drop_down = 1 if !$csv_line{$event_code}{event_id} && (!$csv_line_possible_match{$event_code}{event_id} || $csv_line_possible_match{$event_code}{event_id} =~ /_/) ;
|
||||
|
||||
# if ((!$csv_line{$event_code}{event_id} && !$csv_line_possible_match{$event_code}{event_id}) || (!$csv_line{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} =~ /_/)) {
|
||||
if (!$csv_line{$event_code}{event_id}) {
|
||||
|
||||
my $sport_name = ($csv_line{$event_code}{event_name} =~ /:/) ? $get_sport[0] : $csv_line{$event_code}{event_name} ;
|
||||
|
||||
$no_system_or_event{$csv_line{$event_code}{club_name}}{substr($csv_line{$event_code}{start_time},0,10)}{$sport_name}{event} .= qq~"#selectEvent_$row_cnt",~ ;
|
||||
|
||||
}
|
||||
$cell_id = qq~id="matched_event_$row_cnt"~ ;
|
||||
|
||||
} elsif ($col eq 'match') {
|
||||
|
||||
$nowrap = 'nowrap' ;
|
||||
|
||||
$cell_id = qq~id="final_col_$row_cnt"~ ;
|
||||
|
||||
my $tool = $pixellot_system{$ccyymmdd}{$period} ;
|
||||
|
||||
$start_sql =~ s/ /T/g ;
|
||||
$end_sql =~ s/ /T/g ;
|
||||
|
||||
# my $system_input = ($csv_line{$event_code}{system_id}) ? qq~<input style='display:none;' value='$csv_line{$event_code}{system_id}' id='selectSystem_$row_cnt' name="system_$row_cnt">~ : qq~~ ;
|
||||
my $system_input = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1') ? qq~<input style='display:none;' value='$csv_line{$event_code}{system_id}' id='selectSystem_$row_cnt' name="system_$row_cnt">~ : qq~~ ;
|
||||
|
||||
# my $matched_event_id = ($csv_line{$event_code}{event_id}) ? $csv_line{$event_code}{event_id} : ($csv_line_possible_match{$event_code}{event_id} && $csv_line_possible_match{$event_code}{event_id} !~ /_/) ? $csv_line_possible_match{$event_code}{event_id} : '' ;
|
||||
|
||||
my $matched_event_id = ($csv_line{$event_code}{event_id}) ? $csv_line{$event_code}{event_id} : '' ;
|
||||
|
||||
my $event_input = ($matched_event_id) ? qq~<input style='display:none;' value='$matched_event_id' id='selectEvent_$row_cnt' name="event_$row_cnt">~ : qq~~ ;
|
||||
|
||||
my $match_icon = ($system_input && $event_input) ? "ok" : "remove" ;
|
||||
my $match_class = ($system_input && $event_input) ? "success" : "danger" ;
|
||||
|
||||
push @unmatched_rows, "#selectEvent_$row_cnt" if !$event_input ;
|
||||
push @unmatched_rows, "#selectSystem_$row_cnt" if !$system_input ;
|
||||
|
||||
my $not_matched = (!$event_input || !$system_input) ? qq~<input style='display:none;' value='1' id='not_matched_$row_cnt'>~ : qq~~ ;
|
||||
|
||||
# my $no_similar_rows = ($csv_line{$event_code}{system_id} && $csv_line{$event_code}{system_id} ne '-1' && $csv_line{$event_code}{event_id}) ? '-1' : '' ;
|
||||
|
||||
my $similar_rows = (!$event_input || !$system_input) ? qq~<input value='' name='similar_rows_$row_cnt' style='display:none;'>~ : qq~~ ;
|
||||
|
||||
$val = "
|
||||
$system_input
|
||||
$event_input
|
||||
$not_matched
|
||||
$similar_rows
|
||||
<input style='display:none;' value='$event_code' id='event_code_$row_cnt' name='event_code_$row_cnt'>
|
||||
<input style='display:none;' value='$csv_line{$event_code}{production_seconds}' id='time_$row_cnt' name='time_$row_cnt'>
|
||||
<input style='display:none;' value='$csv_line{$event_code}{cloud_seconds}' id='cloud_time_$row_cnt' name='cloud_time_$row_cnt'>
|
||||
<a class='btn btn-$match_class btn-sm' id='matched_row_$row_cnt' href=javascript:match_event_system('$row_cnt','$event_code','$csv_line{$event_code}{production_seconds}','$csv_line{$event_code}{cloud_seconds}'); data-title='MATCH' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-$match_icon'></i></a>
|
||||
|
||||
<a class='btn btn-success btn-sm' href=javascript:dlgMdl('$useropts{'scripts'}/dialog/manually_match_csv_row.pl?$matched_event_id&$csv_line{$event_code}{system_id}&$csv_line{$event_code}{production_seconds}&$csv_line{$event_code}{cloud_seconds}&$event_code&$start_sql&$end_sql&$row_cnt&add','Manually Match','','medium-dialog'); data-title='MATCH MANUALLY' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title>
|
||||
<i class='glyphicon glyphicon-question-sign'></i>
|
||||
</a>
|
||||
" ;
|
||||
|
||||
$start_sql =~ s/T/ /g ;
|
||||
$end_sql =~ s/T/ /g ;
|
||||
|
||||
}
|
||||
$print_tbody .= qq~<td $cell_id $nowrap>$val</td>~ ;
|
||||
}
|
||||
$print_tbody .= qq~</tr>~ ;
|
||||
}
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
// let inputString = '1,21,32,4'; // Your input string
|
||||
// let outputString = inputString.split(',').map(num => 'abc_' + num).join(',');
|
||||
|
||||
function auto_select_similar_drop_downs (ids,changed_val) {
|
||||
for (let id of ids) {
|
||||
if (\$(id).val()) {
|
||||
continue ;
|
||||
}
|
||||
\$(id).val(changed_val) ;
|
||||
\$(id).trigger("chosen:updated") ;
|
||||
fix_match_icon(id) ;
|
||||
}
|
||||
}
|
||||
|
||||
~ ;
|
||||
|
||||
my %seen_rows_set = () ;
|
||||
|
||||
foreach my $club_name (keys %no_system_or_event) {
|
||||
foreach my $start_time (keys %{$no_system_or_event{$club_name}}) {
|
||||
foreach my $sport_name (keys %{$no_system_or_event{$club_name}{$start_time}}) {
|
||||
foreach my $sys_evt (keys %{$no_system_or_event{$club_name}{$start_time}{$sport_name}}) {
|
||||
|
||||
chop $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} if $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} ;
|
||||
my $ids_change = $no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} ;
|
||||
$ids_change =~ s/\"//g ;
|
||||
|
||||
my $ids_change2 = $ids_change ;
|
||||
|
||||
$ids_change2 =~ s/#selectEvent_(\d+)/input\[name='similar_rows_$1'\]/g;
|
||||
$ids_change2 =~ s/#selectSystem_(\d+)/input\[name='similar_rows_$1'\]/g;
|
||||
|
||||
my $ids_change_row_nrs = $ids_change ;
|
||||
$ids_change_row_nrs =~ s/#selectEvent_//g ;
|
||||
$ids_change_row_nrs =~ s/#selectSystem_//g ;
|
||||
|
||||
my @first_nr = split(/\,/,$ids_change_row_nrs) ;
|
||||
|
||||
my $event_or_system = ($no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt} =~ /Event/) ? 'event' : 'system' ;
|
||||
|
||||
next if $seen_rows_set{$ids_change_row_nrs}{$event_or_system} ;
|
||||
$seen_rows_set{$ids_change_row_nrs}{$event_or_system} = 1 ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
if (\$("#not_matched_$first_nr[0]").val() && !\$("input[name='similar_rows_$first_nr[0]']").val()) {
|
||||
\$("$ids_change2").val("$ids_change_row_nrs") ;
|
||||
}
|
||||
|
||||
\$("$ids_change").change( function () {
|
||||
|
||||
fix_match_icon(this.id) ;
|
||||
if (!\$(this).val()) {
|
||||
return ;
|
||||
}
|
||||
auto_select_similar_drop_downs([$no_system_or_event{$club_name}{$start_time}{$sport_name}{$sys_evt}],\$(this).val()) ;
|
||||
|
||||
}) ;
|
||||
|
||||
~ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $unmatched_rows_str = join(",",@unmatched_rows) ;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
function get_row_nr (id) {
|
||||
|
||||
let lastIndex = id.lastIndexOf('_');
|
||||
lastIndex = parseInt(lastIndex) ;
|
||||
let row_nr_1 = id.substring(1+lastIndex);
|
||||
return row_nr_1 ;
|
||||
|
||||
}
|
||||
|
||||
function fix_match_icon (id) {
|
||||
|
||||
let row_nr = get_row_nr(id) ;
|
||||
|
||||
if (\$("#selectEvent_"+row_nr).val() && \$("#selectSystem_"+row_nr).val() && \$("#not_matched_"+row_nr).val()) {
|
||||
\$("#matched_row_"+row_nr).removeClass('btn btn-danger btn-sm').addClass('btn btn-success btn-sm');
|
||||
\$("#matched_row_"+row_nr).html("<i class='glyphicon glyphicon-ok'></i>") ;
|
||||
\$("#not_matched_"+row_nr).val("") ;
|
||||
} else if ((!\$("#selectEvent_"+row_nr).val() || !\$("#selectSystem_"+row_nr).val()) && !\$("#not_matched_"+row_nr).val()) {
|
||||
\$("#matched_row_"+row_nr).removeClass('btn btn-success btn-sm').addClass('btn btn-danger btn-sm');
|
||||
\$("#matched_row_"+row_nr).html("<i class='glyphicon glyphicon-remove'></i>") ;
|
||||
\$("#not_matched_"+row_nr).val("1") ;
|
||||
}
|
||||
}
|
||||
|
||||
// \$("$unmatched_rows_str").change( function () {
|
||||
// fix_match_icon(this.id) ;
|
||||
// }) ;
|
||||
|
||||
~ if $unmatched_rows_str ;
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr th:nth-last-child(2)").css("width","20%");~ if $found_event_drop_down ; ## MATCHED EVENT COLUMN
|
||||
|
||||
$trigger_jquery_raw .= qq~\$("#itv-table tr th:nth-last-child(10)").css("width","20%");~ if $found_system_drop_down ; ## MATCHED SYSTEM COLUMN
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
|
||||
function match_event_system (row_nr,event_code,production_seconds,cloud_seconds) {
|
||||
|
||||
let event_id = \$("#selectEvent_"+row_nr).val() ;
|
||||
let system_id = \$("#selectSystem_"+row_nr).val() ;
|
||||
|
||||
if (!event_id || !system_id) {
|
||||
noty({text:'Please select a System and Event!!!',layout:"center",type:"error",timeout:3000}) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
\$("#"+row_nr).css("display","none") ;
|
||||
|
||||
var url = "$useropts{scripts}/get/add_event_system_hours.pl?"+event_id+"&"+system_id+"&"+production_seconds+"&"+cloud_seconds+"&"+event_code ;
|
||||
|
||||
\$.get(url) ;
|
||||
\$("#final_col_"+row_nr).html('') ;
|
||||
|
||||
}
|
||||
|
||||
// \$("#itv-table tr:eq(0) th:nth-last-child(1)").html("<span>Match All</span> <a class='btn btn-success btn-sm' href=javascript:match_all(1); data-title='MATCH ALL (inc. Possible Events)' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-ok'></i></a> <a class='btn btn-warning btn-sm' href=javascript:match_all(0); data-title='MATCH ALL (excl. Possible Events)' data-toggle='tooltip' data-placement='left' data-placement='left' data-original-title title><i class='glyphicon glyphicon-ok'></i></a>") ;
|
||||
|
||||
\$("#itv-table thead tr:eq(0) th:nth-last-child(1)").css('white-space','nowrap') ;
|
||||
|
||||
~ ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
501
libs/modules/report.pm
Normal file
501
libs/modules/report.pm
Normal file
|
|
@ -0,0 +1,501 @@
|
|||
sub report_create_xls {
|
||||
|
||||
our $xlspath = "$htmlpath/xls/customreport" ;
|
||||
|
||||
&xlsxcreator_delete_previous_xlsx($xlspath) ;
|
||||
|
||||
&report_xls_details_header ;
|
||||
|
||||
foreach my $id (sort {$b <=> $a} keys %xls_hash) {
|
||||
&xlsxcreator_write_xls($ws,$xlsrow,0,$id,$format18);
|
||||
|
||||
my $col=1;
|
||||
foreach my $field (sort keys %{$xls_hash{$id}}) {
|
||||
&xlsxcreator_write_xls($ws,$xlsrow,$col,$xls_hash{$id}{$field},$format1);
|
||||
$col++ ;
|
||||
}
|
||||
$xlsrow++ ;
|
||||
}
|
||||
|
||||
my $col=1;
|
||||
|
||||
foreach my $id (sort {$b <=> $a} keys %xls_hash) {
|
||||
foreach my $field (sort keys %{$xls_hash{$id}}) {
|
||||
$fieldrow = $xlsrow ;
|
||||
foreach my $curr (keys %curr_hash) {
|
||||
if ($ttl{$field}{$curr}) {
|
||||
my $ttl = &common_commify( sprintf("%0.2f",$ttl{$field}{$curr} )) ;
|
||||
&xlsxcreator_write_xls($ws,$fieldrow,$col,"$curr $ttl",$format57) ;
|
||||
$fieldrow++;
|
||||
}
|
||||
}
|
||||
$col++ ;
|
||||
}
|
||||
last;
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_column('A:Z',20);
|
||||
$worksheet{$ws}->activate();
|
||||
$worksheet{$ws}->select();
|
||||
|
||||
&xlsxcreator_close_xls;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_details_header {
|
||||
|
||||
our $xlsname = 'CUSTOM-REPORT-' . $now_ccyymmdd . '.xls' ;
|
||||
my $xlsfile = $xlspath . '/' . $xlsname ;
|
||||
|
||||
&xlsxcreator_create_xls($xlsfile);
|
||||
|
||||
&xlsxcreator_xls_format;
|
||||
|
||||
$ws = 'custom_report';
|
||||
|
||||
&xlsxcreator_add_worksheet($ws) ;
|
||||
|
||||
&xlsxcreator_write_xls($ws,0,0,"Film Freight : $success",$format2);
|
||||
|
||||
&xlsxcreator_write_xls($ws,2,0,'ID',$format18);
|
||||
# $xlsrow = 2 ;
|
||||
my $col=1;
|
||||
foreach my $id (sort {$b <=> $a} keys %xls_hash) {
|
||||
foreach my $field (sort keys %{$xls_hash{$id}}) {
|
||||
my $uc_field = uc $field ;
|
||||
&xlsxcreator_write_xls($ws,2,$col,$uc_field,$format18);
|
||||
$col++;
|
||||
}
|
||||
last;
|
||||
}
|
||||
|
||||
&xlsxcreator_freeze_panes($ws,3,0) ; # Freeze the first 3 rows
|
||||
|
||||
$xlsrow=3;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_pdf_start {
|
||||
|
||||
my ($report) = @_ ;
|
||||
|
||||
$layout = 'landscape' ;
|
||||
|
||||
our $pdfpath = "$pdfpath/export" ;
|
||||
|
||||
my $pdfnamestart = uc $report ; $pdfnamestart =~ s/_/-/gi ;
|
||||
|
||||
our $pdfname = $pdfnamestart . '-' . $now_ccyymmdd. $now_hour . $now_min . $now_sec . '.pdf' ;
|
||||
my $pdffile = $pdfpath . '/' . $pdfname ;
|
||||
|
||||
my $pdftitle = $report ; $pdftitle =~ s/_/ /gi ;
|
||||
|
||||
&pdf_delete_previous_pdf($pdfpath) ;
|
||||
&pdf_initialise($pdfpath,$pdfname,"Film Freight $pdftitle") ; ;
|
||||
&pdf_initialise_page ;
|
||||
|
||||
$up = 180 ;
|
||||
$across = 1 ;
|
||||
&pdf_page_header_landscape ;
|
||||
|
||||
&pdf_nl_gap_3 ;
|
||||
&pdf_nl_gap_3 ;
|
||||
&pdf_nl_gap_3 ;
|
||||
&pdf_x_large_bold_text (10, $up, $pdftitle) ;
|
||||
&pdf_nl_gap_3 ;
|
||||
|
||||
my $date = pdf_date_to_text($now_ccyy_mm_dd);
|
||||
&pdf_medium_text (220, $up, "Date : $date") ;
|
||||
|
||||
&pdf_nl;
|
||||
$top=$up;
|
||||
&pdf_black_line(10,$up,287,$up) ; # horizontal
|
||||
&pdf_nl_s;
|
||||
|
||||
foreach (@pdf_columns) {
|
||||
my $txtstart = length($_) * 2 + 2 ;
|
||||
&pdf_small_bold_text ($txtstart,$up,$_) ;
|
||||
}
|
||||
|
||||
&pdf_nl_tt;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_pdf_line {
|
||||
|
||||
my ($id) = @_ ;
|
||||
|
||||
&pdf_black_line(10,$up,287,$up) ; # horizontal
|
||||
&report_grid_pdf_check_value_of_up(20) ;
|
||||
&pdf_nl;
|
||||
|
||||
foreach (@pdf_columns) {
|
||||
my $txtstart = length($_) * 2 + 2 ;
|
||||
&pdf_small_bold_text ($txtstart,$up,$db{$table}{$id}{$_}) ;
|
||||
}
|
||||
|
||||
&pdf_nl_tt;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_pdf_end {
|
||||
|
||||
&pdf_black_line(10,$up,287,$up) ; # horizontal
|
||||
|
||||
foreach (@pdf_columns) {
|
||||
my $colstart = length($_) * 2 ;
|
||||
&pdf_black_line ($colstart,$top,$colstart,$up) ; # vertical
|
||||
}
|
||||
|
||||
&pdf_footer_landscape ;
|
||||
&finish_pdf ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xlsx_export_header_events {
|
||||
|
||||
my ($report,$xlsxfolder) = @_ ;
|
||||
|
||||
our $xlsxpath = "$htmlpath/xlsx/$xlsxfolder" ;
|
||||
|
||||
my $xlsxnamestart = uc $report ;
|
||||
|
||||
# $xlsxnamestart =~ s/_/-/gi ;
|
||||
|
||||
&xlsxcreator_delete_previous_xlsx($xlsxpath) ;
|
||||
|
||||
our $xlsxname = $xlsxnamestart . '-' . $now_ccyymmdd. $now_hour . $now_min . $now_sec . '.xlsx' ;
|
||||
|
||||
my $xlsxfile = $xlsxpath . '/' . $xlsxname ;
|
||||
|
||||
&xlsxcreator_create_xlsx($xlsxfile);
|
||||
|
||||
&xlsxcreator_xlsx_format;
|
||||
|
||||
$ws = $report;
|
||||
|
||||
&xlsxcreator_add_worksheet($ws) ;
|
||||
$now_yy += 2000 ;
|
||||
my $xlsxtitle = "Interactive Television Africa Events Division $now_yy" ;
|
||||
|
||||
$xlsxtitle =~ s/_/ /gi ;
|
||||
|
||||
my @letters = ("", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R","S", "T", "U", "V", "W", "X", "Y", "Z") ;
|
||||
my $cnt = 0;
|
||||
for (@col_display_excel) {$cnt++;}
|
||||
my $range = "A1:$letters[$cnt]" ;
|
||||
$range .= "1" ;
|
||||
|
||||
$worksheet{$ws} -> merge_range($range, "$xlsxtitle", $format_event_heading) ;
|
||||
|
||||
my @month_fullname = ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") ;
|
||||
my $current_month = $month_fullname[int($now_mm)] ;
|
||||
|
||||
$range = "A2:$letters[$cnt]" ;
|
||||
$range .= "2" ;
|
||||
|
||||
$worksheet{$ws} -> merge_range($range, "$current_month $now_yy", $format_event_heading_2) ;
|
||||
$range = "A4:$letters[$cnt]" ;
|
||||
$range .= "4" ;
|
||||
$worksheet{$ws} -> merge_range($range, "", $format_empty_row) ;
|
||||
|
||||
# &xlsxcreator_write_xlsx($ws,0,0,$xlsxtitle,$format2);
|
||||
|
||||
our $xlsxcol=0;
|
||||
|
||||
foreach (@col_display_excel) {
|
||||
my $coltitle = $_ ;
|
||||
$coltitle =~ s/\_id//g ;
|
||||
$coltitle =~ s/\_/ /g ;
|
||||
my $ucfirst = join '', map { ucfirst lc } split /(\s+)/, $coltitle;
|
||||
&xlsxcreator_write_xlsx($ws,2,$xlsxcol,$ucfirst,$format_event_heading_2);
|
||||
$xlsxcol++;
|
||||
}
|
||||
|
||||
&xlsxcreator_freeze_panes($ws,3,0) ; # Freeze the first 3 rows
|
||||
|
||||
our $xlsxrow=4;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_export_header {
|
||||
|
||||
my ($report,$xlsfolder) = @_ ;
|
||||
|
||||
unless ($xlsfolder) { $xlsfolder = 'export' ; }
|
||||
|
||||
# my $xlsfolder = lc $report ; $xlsfolder =~ s/_//gi ;
|
||||
|
||||
our $xlspath = "$htmlpath/xls/$xlsfolder" ;
|
||||
|
||||
my $xlsnamestart = uc $report ; $xlsnamestart =~ s/_/-/gi ;
|
||||
|
||||
&xlsxcreator_delete_previous_xlsx($xlspath) ;
|
||||
|
||||
our $xlsname = $xlsnamestart . '-' . $now_ccyymmdd. $now_hour . $now_min . $now_sec . '.xlsx' ;
|
||||
my $xlsfile = $xlspath . '/' . $xlsname ;
|
||||
|
||||
&xlsxcreator_create_xlsx($xlsfile);
|
||||
|
||||
&xlsxcreator_xlsx_format;
|
||||
|
||||
$ws = $report;
|
||||
|
||||
&xlsxcreator_add_worksheet($ws) ;
|
||||
|
||||
&report_build_headings($report, $ws) ;
|
||||
|
||||
our $xlscol = 0 ;
|
||||
our $xlsrow = 4 ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xlsx_export_header {
|
||||
|
||||
my ($report,$xlsxfolder,$csv_folder,$title_heading) = @_ ;
|
||||
|
||||
unless ($xlsxfolder) { $xlsxfolder = 'export' ; }
|
||||
|
||||
# my $xlsfolder = lc $report ; $xlsfolder =~ s/_//gi ;
|
||||
|
||||
our $xlsxpath = "$htmlpath/xlsx/$xlsxfolder" ;
|
||||
|
||||
my $xlsxnamestart = uc $report ; $xlsxnamestart =~ s/_/-/gi ;
|
||||
|
||||
&xlsxcreator_delete_previous_xlsx($xlsxpath) ;
|
||||
|
||||
our $xlsxname = $xlsxnamestart . '-' . $now_ccyymmdd. $now_hour . $now_min . $now_sec . '.xlsx' ;
|
||||
my $xlsxfile = $xlsxpath . '/' . $xlsxname ;
|
||||
|
||||
&xlsxcreator_create_xlsx($xlsxfile) ;
|
||||
|
||||
&xlsxcreator_xlsx_format;
|
||||
|
||||
$ws = $report ;
|
||||
|
||||
&xlsxcreator_add_worksheet($ws) ;
|
||||
|
||||
&report_build_headings($report,$ws,$title_heading) ;
|
||||
|
||||
our $xlsxcol = 0 ;
|
||||
our $xlsxrow = 4 ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_build_headings {
|
||||
|
||||
my ($report,$worksheet,$title_heading,$xlsx_start_row,$xlsx_start_col) = @_ ;
|
||||
my $xlsxtitle = ($xlsxheading) ? $xlsxheading : $report ;
|
||||
$xlsxtitle = $title_heading if $title_heading ;
|
||||
$xlsxtitle =~ s/_/ /gi ;
|
||||
&xlsxcreator_write_xlsx($worksheet,0,0,$xlsxtitle,$format_management_report_title) if $xlsxtitle ;
|
||||
my $col = ($xlsx_start_col) ? $xlsx_start_col : 0 ;
|
||||
|
||||
return unless scalar @sql_col_display ;
|
||||
|
||||
if ($calibration_report_cron) {
|
||||
foreach (@sql_col_display) {
|
||||
&xlsxcreator_write_xlsx($ws,1,$col,"$day_of_week",$format93) unless $col ;
|
||||
&xlsxcreator_write_xlsx($ws,1,$col,"",$format93) if $col ;
|
||||
$col++ ;
|
||||
}
|
||||
$col = 0;
|
||||
}
|
||||
|
||||
my $titles_row = ($xlsxtitle) ? 2 : ($xlsx_start_row) ? $xlsx_start_row : 0 ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
next if not $_ ;
|
||||
my $coltitle = $_ ;
|
||||
$coltitle =~ s/\_id//g ;
|
||||
$coltitle =~ s/\_/ /g ;
|
||||
my $ucfirst = join '', map { ucfirst lc } split /(\s+)/, $coltitle;
|
||||
&xlsxcreator_write_xlsx($worksheet,$titles_row,$col,$ucfirst,$format_management_report_headings) unless $calibration_report;
|
||||
&xlsxcreator_write_xlsx($worksheet,$titles_row,$col,$ucfirst,$format93) if $calibration_report;
|
||||
$col++;
|
||||
}
|
||||
|
||||
$titles_row++ ;
|
||||
&xlsxcreator_freeze_panes($worksheet,$titles_row,0) ; # Freeze the first 3 rows
|
||||
|
||||
}
|
||||
|
||||
sub report_xlsx_export_process_cell {
|
||||
|
||||
my ($changed,$money,$val) = @_ ;
|
||||
|
||||
if ($changed) {
|
||||
&report_xlsx_export_output_cell($format23,$val) ;
|
||||
}
|
||||
elsif ($money) {
|
||||
&report_xlsx_export_output_cell($format3,$val) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
&report_xlsx_export_output_cell($format1,$val) ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------\
|
||||
|
||||
|
||||
sub report_write_events {
|
||||
|
||||
my ($val, $last) = @_ ;
|
||||
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val,$format_event_data) if $last == 0;
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val,$format_event_data_2) if $last == 1;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xlsx_export_output_cell {
|
||||
|
||||
my ($format,$val) = @_ ;
|
||||
|
||||
&xlsxcreator_write_xlsx($ws,$xlsxrow,$xlsxcol,$val,$format);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_export_process_cell {
|
||||
|
||||
my ($changed,$money,$val) = @_ ;
|
||||
|
||||
if ($changed) {
|
||||
&report_xls_export_output_cell($format23,$val) ;
|
||||
}
|
||||
elsif ($money) {
|
||||
&report_xls_export_output_cell($format3,$val) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
&report_xls_export_output_cell($format1,$val) ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_export_output_cell {
|
||||
|
||||
my ($format,$val) = @_ ;
|
||||
|
||||
&xlsxcreator_write_xlsx($ws,$xlsrow,$xlscol,$val,$format);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xlsx_export_footer {
|
||||
|
||||
my ($resize_cell_to,$col_width,$report) = @_ ;
|
||||
|
||||
my $col = 0;
|
||||
my $output_row = $xlsxrow+1 ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
next if not $_ ;
|
||||
if ($money_format{$_}) {
|
||||
my $cellfrom = &xl_rowcol_to_cell(4,$col) ;
|
||||
my $cellto = &xl_rowcol_to_cell($xlsxrow,$col) ;
|
||||
&xlsxcreator_write_formula($ws,$output_row,$col,"=SUM($cellfrom:$cellto)",$format67);
|
||||
}
|
||||
$col++ ;
|
||||
}
|
||||
|
||||
# $worksheet{$ws}->set_column("A:$resize_cell_to",$col_width) ;
|
||||
$worksheet{$ws}->activate() ;
|
||||
$worksheet{$ws}->select() ;
|
||||
|
||||
&xlsxcreator_close_xlsx ;
|
||||
|
||||
if (-f "$xlsxpath/$xlsxname") {
|
||||
$box_icon .= qq(<div class="box-icon" title='Export to Excel' data-toggle="tooltip" data-placement="left"><a class="btn btn-default btn-round" href="/xlsx/$report/$xlsxname" style="padding-top:1px;"><i class="glyphicon glyphicon-download-alt icon-white"></i></a></div>) ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_export_footer {
|
||||
|
||||
my ($resize_cell_to,$col_width,$report) = @_ ;
|
||||
|
||||
unless ($report) { $report = 'export' ; }
|
||||
|
||||
my $col = 0; my $output_row = $xlsrow+1 ;
|
||||
|
||||
foreach (@sql_col_display) {
|
||||
next if not $_ ;
|
||||
if ($money_format{$_}) {
|
||||
my $cellfrom = &xl_rowcol_to_cell(4,$col) ;
|
||||
my $cellto = &xl_rowcol_to_cell($xlsrow,$col) ;
|
||||
&xlsxcreator_write_formula($ws,$output_row,$col,"=SUM($cellfrom:$cellto)",$format67);
|
||||
}
|
||||
$col++ ;
|
||||
}
|
||||
|
||||
$worksheet{$ws}->set_column("A:$resize_cell_to",$col_width);
|
||||
$worksheet{$ws}->activate();
|
||||
$worksheet{$ws}->select();
|
||||
|
||||
&xlsxcreator_close_xlsx;
|
||||
|
||||
if (-f "$xlspath/$xlsname") {
|
||||
$box_icon .= qq(<div class="box-icon" title='Export to Excel' data-toggle="tooltip" data-placement="left"><a class="btn btn-default btn-round" href="/xls/$report/$xlsname" style="padding-top:1px;"><i class="glyphicon glyphicon-download-alt icon-white"></i></a></div>) ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_xls_add_chart {
|
||||
|
||||
&xlsxcreator_add_pie_chart($ws);
|
||||
|
||||
# Configure the series.
|
||||
$chart{$ws}->add_series(
|
||||
name => 'Pie Chart',
|
||||
# categories => '=risk_report!$A$4:$A$18',
|
||||
# values => '=risk_report!$B$4:$B$18',
|
||||
categories => "=$ws!A4:A$catspan",
|
||||
values => "=$ws!B4:B$catspan",
|
||||
);
|
||||
|
||||
# Add a title.
|
||||
$chart{$ws}->set_title( name => 'Report Pie Chart' );
|
||||
|
||||
$xlsrow+=5 ;
|
||||
|
||||
# Insert the chart into the worksheet (with an offset).
|
||||
# $worksheet{$ws}->insert_chart('B23',$chart{$ws},25,10);
|
||||
$worksheet{$ws}->insert_chart("B$xlsrow",$chart{$ws},40,16);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_grid_pdf_check_value_of_up {
|
||||
|
||||
my ($value) = @_ ;
|
||||
|
||||
if ($up < $value) {
|
||||
&report_grid_pdf_print_vertical_lines_table ;
|
||||
&pdf_initialise_page ;
|
||||
$up = 195 ;
|
||||
$across = 1 ;
|
||||
$top = $up;
|
||||
&pdf_black_line(10,$up,287,$up) ; # horizontal
|
||||
}
|
||||
|
||||
} #----------------------------------------------------------------------------------------------------
|
||||
|
||||
sub report_grid_pdf_print_vertical_lines_table {
|
||||
|
||||
# &pdf_black_line (10,$top,10,$up) ; # vertical
|
||||
|
||||
&pdf_black_line ($colstart[0],$top,$colstart[0],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[1],$top,$colstart[1],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[2],$top,$colstart[2],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[3],$top,$colstart[3],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[4],$top,$colstart[4],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[5],$top,$colstart[5],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[6],$top,$colstart[6],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[7],$top,$colstart[7],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[8],$top,$colstart[8],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[9],$top,$colstart[9],$up) ; # vertical
|
||||
&pdf_black_line ($colstart[10],$top,$colstart[10],$up) ; # vertical
|
||||
|
||||
# &pdf_black_line(287,$top,287,$up) ; # vertical
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
1883
libs/modules/schedule.pm
Normal file
1883
libs/modules/schedule.pm
Normal file
File diff suppressed because it is too large
Load Diff
51
libs/modules/session.pm
Normal file
51
libs/modules/session.pm
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
sub check_session {
|
||||
|
||||
use DBI;
|
||||
use CGI::Session;
|
||||
use CGI::Cookie;
|
||||
|
||||
my %cookies = fetch CGI::Cookie ;
|
||||
my $cgisessid = defined $cookies{'CGISESSID'} ? $cookies{'CGISESSID'}->value : undef; # This does
|
||||
|
||||
use db ;
|
||||
&db_open_ro ;
|
||||
|
||||
$userid = 0 ;
|
||||
$session = load CGI::Session("driver:MySQL", $cgisessid, {Handle=>$dbh});
|
||||
$userid = $session->param(-name=>'id');
|
||||
$is_logged_in = $session->param(-name=>'_IS_LOGGED_IN');
|
||||
$username = lc $session->param(-name=>'uname');
|
||||
$useremail = lc $session->param(-name=>'uemail');
|
||||
$usertype = lc $session->param(-name=>'utype');
|
||||
$orgids = $session->param(-name=>'oids');
|
||||
$regids = $session->param(-name=>'rids');
|
||||
$custids = $session->param(-name=>'cids');
|
||||
|
||||
my @orgids = split(/\,/,$orgids);
|
||||
foreach (@orgids) { $glob_orgids{$userid}{$_} = 1 ; }
|
||||
|
||||
my @regids = split(/\,/,$regids);
|
||||
foreach (@regids) { next unless $_ > 0 ; $glob_regids{$userid}{$_} = 1 ; }
|
||||
|
||||
my @custids = split(/\,/,$custids);
|
||||
foreach (@custids) { next unless $_ > 0 ; $glob_custids{$userid}{$_} = 1 ; }
|
||||
|
||||
$sessionid = $session->id();
|
||||
|
||||
if ($sessionid && $is_logged_in > 0 && $userid > 0) { # if $userid and $is_logged_in is -1 not allowed in
|
||||
$session_state = 'active' ;
|
||||
} elsif ($session->is_expired) {
|
||||
$session_state = 'expired' ;
|
||||
$session->delete() ;
|
||||
} elsif ($session->is_empty) {
|
||||
$session_state = 'empty' ;
|
||||
} else {
|
||||
$session_state = 'empty' ;
|
||||
$session->delete() ;
|
||||
}
|
||||
|
||||
&db_close_conn ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
1971
libs/modules/tabs.pm
Normal file
1971
libs/modules/tabs.pm
Normal file
File diff suppressed because it is too large
Load Diff
2266
libs/modules/tabs_test.pm
Normal file
2266
libs/modules/tabs_test.pm
Normal file
File diff suppressed because it is too large
Load Diff
42
libs/modules/today.pm
Normal file
42
libs/modules/today.pm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
sub today {
|
||||
|
||||
our ($now_sec,$now_min,$now_hour,$now_dd,$now_mm,$now_year,$now_wday,$now_yday,$isdst)=localtime();
|
||||
|
||||
$now_sec = sprintf("%02d", $now_sec) ;
|
||||
$now_min = sprintf("%02d", $now_min) ;
|
||||
$now_hour = sprintf("%02d", $now_hour) ;
|
||||
|
||||
$now_year += 1900;
|
||||
|
||||
$now_dd = sprintf("%02s", $now_dd) ;
|
||||
$now_mm = sprintf("%02s", $now_mm + 1) ;
|
||||
$now_yy = sprintf("%02s", $now_year - 2000) ;
|
||||
|
||||
use Date::Calc qw(:all);
|
||||
|
||||
our ($sayear,$samonth,$saday,$sahour,$samin,$sasec) = Add_Delta_DHMS($now_year,$now_mm,$now_dd,$now_hour,$now_min,$now_sec,0,2,0,0); # add 2 hours for server time
|
||||
|
||||
$samonth = sprintf("%02s", $samonth) ;
|
||||
$saday = sprintf("%02s", $saday) ;
|
||||
$sahour = sprintf("%02s", $sahour) ;
|
||||
$samin = sprintf("%02s", $samin) ;
|
||||
$sasec = sprintf("%02s", $sasec) ;
|
||||
|
||||
$now_year = $sayear ;
|
||||
$now_mm = $samonth ;
|
||||
$now_dd = $saday ;
|
||||
$now_sec = $sasec ;
|
||||
$now_min = $samin ;
|
||||
$now_hour = $sahour ;
|
||||
|
||||
$now_hh_min_sec = $sahour . ':' . $samin . ':' . $sasec ;
|
||||
|
||||
$now_ccyymmdd = $now_year . $now_mm . $now_dd ;
|
||||
$now_ccyymmddhrmnsc = $now_year . $now_mm . $now_dd . $now_hour . $now_min . $now_sec ;
|
||||
$now_dd_mm_ccyy = $now_dd . '-' . $now_mm . '-' . $now_year ;
|
||||
$now_ccyy_mm_dd = $now_year . '-' . $now_mm . '-' . $now_dd ;
|
||||
$nowsddsmmsccyy = $now_dd . '/' . $now_mm . '/' . $now_year ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
30
libs/modules/uploader.pm
Normal file
30
libs/modules/uploader.pm
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
sub uploader_filmfreight {
|
||||
|
||||
my ($file_to_upload,$ftp_dir,$ftp_file_name,$delete_file_to_upload) = @_ ;
|
||||
|
||||
use Net::FTP;
|
||||
|
||||
my $host = "154.0.175.152"; # filmfreight.co.za
|
||||
my $user = "filmfree";
|
||||
my $password = "h0lNH8fMzrrWUC";
|
||||
|
||||
my $ftp = Net::FTP->new($host) or die "Can't open $host : $!\n" ;
|
||||
$ftp->login($user, $password) or die "Can't log $user in : $!\n" ;
|
||||
|
||||
$ftp->cwd($ftp_dir) or die "Can't cwd to $ftp_dir\n";
|
||||
|
||||
$ftp->binary() or die "Can't change to binary mode"; # Unix and Windows switch $ftp->ascii();
|
||||
|
||||
$ftp->put($file_to_upload, "$ftp_dir/$ftp_file_name") or die "Can't put $file_to_upload into $ftp_dir\n" ;
|
||||
|
||||
$ftp->quit;
|
||||
|
||||
# if ($delete_file_to_upload eq 'y') {
|
||||
# unlink ("$file_to_upload") ;
|
||||
# }
|
||||
|
||||
} #-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
|
||||
426
libs/modules/users.pm
Normal file
426
libs/modules/users.pm
Normal file
|
|
@ -0,0 +1,426 @@
|
|||
|
||||
sub users_list_screen {
|
||||
|
||||
&db_open_ro;
|
||||
$db_ignore_open_close=1;
|
||||
&users_list_vars ;
|
||||
$db_ignore_open_close=0 ;
|
||||
&db_close_conn ;
|
||||
|
||||
foreach my $id (keys %{$db{$table}}) {
|
||||
|
||||
$delete_button = ($seen_operator{$id}) ? qq~<a class="btn btn-default btn-xs" href="#" title data-toggle="tooltip" data-original-title="In system use!"><i class="glyphicon glyphicon-trash icon-white"></i></a>~ : qq~<a class="btn btn-danger btn-xs" href="javascript:deleteMinItem('$db{$table}{$id}{username}','$db{$table}{$id}{id}')"><i class="glyphicon glyphicon-trash icon-white"></i></a>~ ;
|
||||
|
||||
my $disp_blocked = qq~<span class="label label-success" title="Active!" data-toggle="tooltip"><i class="glyphicon glyphicon-ok"></i></span>~;
|
||||
if ($db{$table}{$id}{block} || $db{$table}{$id}{inactive} ) { $disp_blocked = qq~<span class="label label-danger" title="Blocked!" data-toggle="tooltip"><i class="glyphicon glyphicon-remove"></i></span>~; }
|
||||
|
||||
# if (!$useropts{it}{$username} && (substr($db{$table}{$id}{username},0,4) eq 'rory' || substr($db{$table}{$id}{username},0,6) eq 'handre')) { next ; }
|
||||
|
||||
my $it_username_subs_4 = substr($db{$table}{$id}{username},0,4) ; # rory / jean
|
||||
my $it_username_subs_6 = substr($db{$table}{$id}{username},0,6) ; # handre
|
||||
|
||||
if (($useropts{it}{$it_username_subs_4} || $useropts{it}{$it_username_subs_6}) && !$useropts{it}{$username} && $useremail =~ /re8it/g) { next ; }
|
||||
|
||||
next if $glod_user_level < 4 && $level{$db{$table}{$id}{user_type}} > 1 && $user_type eq 'casual' ;
|
||||
|
||||
$opts{$lcpage} .= qq~<option value="$db{$table}{$id}{username}">$db{$table}{$id}{name}</option>~ ;
|
||||
$print_tbody .= qq~<tr id="$id">
|
||||
<td>$id</td>
|
||||
<td>$db{$table}{$id}{username}</td>
|
||||
<td>$db{$table}{$id}{name}</td>
|
||||
<td>$db{$table}{$id}{email}</td>
|
||||
<td>$disp_blocked</td>
|
||||
<td>$db{$table}{$id}{based_in}</td>~ ;
|
||||
|
||||
$print_tbody .= qq~
|
||||
<td>$level{$db{$table}{$id}{user_type}}</td>~ if $user_type eq 'casual' ;
|
||||
|
||||
$print_tbody .= qq~
|
||||
<td>$db{$table}{$id}{lastupdate}</td>
|
||||
<td>$db{$table}{$id}{lastvisitdate}</td>
|
||||
<td nowrap>
|
||||
<a class="btn btn-info btn-xs" href="javascript:editMinItem('$db{$table}{$id}{id}');"><i class="glyphicon glyphicon-edit icon-white"></i></a>
|
||||
$delete_button
|
||||
</td>
|
||||
</tr>~ ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_list_vars {
|
||||
|
||||
our %seen = () ; our %seen_operator = () ; our $delete_button = '' ;
|
||||
|
||||
&db_min_ro('events','id, user_id','','','') ;
|
||||
|
||||
foreach my $id (keys %{$db{'events'}}) {
|
||||
next if $seen{$db{'events'}{$id}{user_id}} ;
|
||||
$seen{$db{'events'}{$id}{user_id}} = 1 ;
|
||||
}
|
||||
|
||||
&db_min_ro('event_quotes','id,user_id,operator_ids,daily_operator_ids','','','') ;
|
||||
|
||||
foreach my $id (keys %{$db{event_quotes}}) {
|
||||
# next if $seen{$db{event_quotes}{$id}{user_id}} ;
|
||||
$seen{$db{event_quotes}{$id}{user_id}} = 1 ;
|
||||
my $op_ids = $db{event_quotes}{$id}{operator_ids} ;
|
||||
next unless $op_ids ;
|
||||
my @op_ids = ($op_ids =~ /;/) ? split(/;/,$op_ids) : split(/,/,$op_ids) ;
|
||||
for my $op_id (@op_ids) {
|
||||
next if $seen_operator{$op_id} || !$op_id ;
|
||||
$seen_operator{$op_id} = 1 ;
|
||||
}
|
||||
foreach my $op_ids_list (split(/\|/,$db{event_quotes}{$id}{daily_operator_ids})) {
|
||||
next unless $op_ids_list ;
|
||||
foreach my $op_id (split(/\;/,$op_ids_list)) {
|
||||
next if $seen_operator{$op_id} || !$op_id ;
|
||||
$seen_operator{$op_id} = 1 if $op_id ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&db_min_ro('quotes','id,user_id','','','') ;
|
||||
|
||||
foreach my $id (keys %{$db{quotes}}) {
|
||||
next if $seen{$db{quotes}{$id}{user_id}} ;
|
||||
$seen{$db{quotes}{$id}{user_id}} = 1 ;
|
||||
}
|
||||
|
||||
$level{casual_a} = 1 ;
|
||||
$level{casual_b} = 2 ;
|
||||
$level{casual_c} = 3 ;
|
||||
|
||||
if ($user_type eq 'coding_provider') {
|
||||
&db_min_ro('analytics_event_bookings','id,fixtures_saved_values','','','') ;
|
||||
foreach my $id (keys %{$db{analytics_event_bookings}}) {
|
||||
my @split1 = split(/\|/,$db{analytics_event_bookings}{$id}{fixtures_saved_values}) ;
|
||||
foreach my $row (@split1) {
|
||||
my @split2 = split(/\;/,$row) ;
|
||||
$seen{$split2[-2]} = 1 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($user_type eq 'analytics_client') {
|
||||
&db_min_ro('analytics_event_bookings','id,client_id','','','') ;
|
||||
foreach (keys %{$db{analytics_event_bookings}}) {
|
||||
$seen{$db{analytics_event_bookings}{$_}{client_id}} = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
# my $cust_sql_where = "user_type = '$user_type'" if $user_type ;
|
||||
my $cust_sql_where = ($user_type) ? "user_type LIKE '$user_type%'" : "user_type NOT LIKE 'casual%' AND user_type <> 'schools_manager' AND user_type <> 'installation_partner'" ;
|
||||
|
||||
&db_min_ro($table,'*',$cust_sql_where,'username','') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_sort_fields {
|
||||
|
||||
my $fcnt = 1 ;
|
||||
|
||||
$sort_field{$fcnt} = 'name' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'email' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'phone' ; $fcnt++ ;
|
||||
|
||||
if ($user_type eq 'casual') {
|
||||
$sort_field{$fcnt} = 'bank' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'bank_acc_no' ; $fcnt++ ;
|
||||
}
|
||||
|
||||
$sort_field{$fcnt} = 'based_in' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'user_type' ; $fcnt++ ;
|
||||
# $sort_field{$fcnt} = 'organisation_ids' ; $fcnt++ ;
|
||||
|
||||
if ($user_type eq 'schools_manager' || $user_type eq 'installation_partner' || $user_type eq 'casual') {
|
||||
$sort_field{$fcnt} = 'region_ids' ;
|
||||
$fcnt++ ;
|
||||
}
|
||||
|
||||
if ($user_type eq 'installation_partner') {
|
||||
$sort_field{$fcnt} = 'customer_ids' ;
|
||||
$fcnt++ ;
|
||||
}
|
||||
|
||||
$sort_field{$fcnt} = 'block' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'inactive' ; $fcnt++ ;
|
||||
|
||||
# if ($dialog) {
|
||||
# $sort_field{$fcnt} = 'sel_field' ; $fcnt++ ;
|
||||
# }
|
||||
|
||||
$sort_field{$fcnt} = 'username' ; $fcnt++ ;
|
||||
$sort_field{$fcnt} = 'password' if $iaction eq 'add' ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub users_add_db_fields {
|
||||
|
||||
$ignore{lastvisitdate} = 1 ;
|
||||
$ignore{iaction} = 1 ;
|
||||
$ignore{block} = 1 ;
|
||||
$ignore{inactive} = 1 ;
|
||||
# $ignore{id} = 1 ;
|
||||
$hidden{lastupdate} = 2 ;
|
||||
$required{email} = 1 ;
|
||||
$required{username} = 1 ;
|
||||
$required{name} = 1 ;
|
||||
$required{password} = 1 ;
|
||||
|
||||
&sort_fields ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_edit_db_fields {
|
||||
|
||||
$ignore{lastvisitdate} = 1 ;
|
||||
$ignore{password} = 1 ;
|
||||
$ignore{iaction} = 1 ;
|
||||
$hidden{id} = 1 ; # 1 = bypass for db update
|
||||
$hidden{username} = 1 ; # 1 = bypass for db update
|
||||
$hidden{lastupdate} = 2 ; # 2 = update db
|
||||
# $readonly{username} = 'READONLY' ;
|
||||
$checkbox{block} = 1 ;
|
||||
$checkbox{inactive} = 1 ;
|
||||
# $required{username} = 1 ;
|
||||
$required{email} = 1 ;
|
||||
|
||||
&sort_fields ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_add_screen {
|
||||
|
||||
# called from common_add_screen
|
||||
|
||||
$selected{user_type}{$user_type} = "SELECTED" if $user_type ;
|
||||
|
||||
&users_select_opts ;
|
||||
|
||||
our $savjqy = 1 if $user_type ; # incorporate jquery into the save event to accommodate the multiple chosen options
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_edit_screen {
|
||||
|
||||
our ($lcol,$fcol) = &common_min_columns($label_col,$field_col) ;
|
||||
|
||||
$selected{based_in}{$db{$table}{$i{id}}{based_in}} = "SELECTED" ;
|
||||
$selected{user_type}{$db{$table}{$i{id}}{user_type}} = "SELECTED" ;
|
||||
|
||||
$extra_form_fields .= &common_min_form_input('new_password','','password') ;
|
||||
|
||||
&users_select_opts ;
|
||||
|
||||
our $savjqy = 1 if $user_type ; # incorporate jquery into the save event to accommodate the multiple chosen options
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_thead {
|
||||
|
||||
$print_thead = qq~<THEAD><TR><TH>ID</TH><TH>USERNAME</TH><TH>NAME</TH><TH>EMAIL</TH><TH>ACTIVE</TH><TH>BASE</TH>~;
|
||||
|
||||
$print_thead .= qq~<TH>LEVEL</TH>~ if $user_type eq 'casual' ;
|
||||
|
||||
$print_thead .= qq~<TH>LASTUPDATE</TH><TH>LASTVISITDATE</TH><TH> </TH></TR></THEAD>~ ;
|
||||
|
||||
} #-------------------------------------------------------------------------------
|
||||
|
||||
sub users_process_multi_select {
|
||||
|
||||
# local @organisationids = split(/\,/,$i{organisationids}) ;
|
||||
# my $organisationids = join(",",@organisationids) ;
|
||||
# $organisationids =~ s/\s//g; # remove white space
|
||||
# $ignore{organisationids} = 1 ;
|
||||
# $i{organisation_ids} = $organisationids ;
|
||||
|
||||
$i{organisation_ids} = '0' ;
|
||||
|
||||
local @regionids = split(/\,/,$i{regionids}) ;
|
||||
my $regionids = join(",",@regionids) ;
|
||||
$regionids =~ s/\s//g; # remove white space
|
||||
$ignore{regionids} = 1 ;
|
||||
$i{region_ids} = $regionids || '0' ;
|
||||
|
||||
if ($user_type eq 'installation_partner' || $user_type eq 'coding_provider' || $user_type eq 'analytics_client') {
|
||||
local @customerids = split(/\,/,$i{customerids}) ;
|
||||
my $customerids = join(",",@customerids) ;
|
||||
$customerids =~ s/\s//g; # remove white space
|
||||
$ignore{customerids} = 1 ;
|
||||
$i{customer_ids} = $customerids ;
|
||||
} else {
|
||||
$i{customer_ids} = '0' ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_select_opts {
|
||||
|
||||
# $multiple{organisation_ids} = 1;
|
||||
# my @organisation_ids = split(/\,/,$db{$table}{$i{id}}{organisation_ids});
|
||||
# foreach (@organisation_ids) { $selected_multi{$_} = 'SELECTED' ; }
|
||||
# $preferred_title{organisation_ids} = "Venue" ;
|
||||
# &common_min_select_opts('organisation_ids','organisations','name',$db{$table}{$i{id}}{organisation_ids},'') ;
|
||||
# $extra_form_fields .= qq~<input type="hidden" name="organisationids" id="organisation-ids" value="">~;
|
||||
|
||||
# $trigger_jquery_raw .= qq~
|
||||
# \$("#savebutt").click(function() {
|
||||
# let st_val = \$("#selectOrganisation_ids").chosen().val() ;
|
||||
# \$('#organisation-ids').val(st_val);
|
||||
# \$('#users-form').submit();
|
||||
# });~;
|
||||
|
||||
if ($user_type eq 'installation_partner' || $user_type eq 'coding_provider' || $user_type eq 'analytics_client') {
|
||||
$multiple{customer_ids} = 1;
|
||||
my @customer_ids = split(/\,/,$db{$table}{$i{id}}{customer_ids});
|
||||
foreach (@customer_ids) { $selected_multi{$_} = 'SELECTED' ; }
|
||||
$preferred_title{customer_ids} = "Customers" ;
|
||||
&common_min_select_opts('customer_ids','customers','name','','') ;
|
||||
$extra_form_fields .= qq~<input type="hidden" name="customerids" id="customer-ids" value="">~;
|
||||
$add_to_trigger_jquery_raw = qq~
|
||||
let cust_val = \$("#selectCustomer_ids").chosen().val() ;
|
||||
\$('#customer-ids').val(cust_val);
|
||||
~;
|
||||
}
|
||||
|
||||
if ($user_type eq 'schools_manager' || $user_type eq 'installation_partner' || $user_type eq 'casual' || $user_type eq 'coding_provider' || $user_type eq 'analytics_client') {
|
||||
$multiple{region_ids} = 1;
|
||||
my @region_ids = split(/\,/,$db{$table}{$i{id}}{region_ids});
|
||||
foreach (@region_ids) { $selected_multi{$_} = 'SELECTED' ; }
|
||||
$preferred_title{region_ids} = "Regions" ;
|
||||
&common_min_select_opts('region_ids','regions','name','','') ;
|
||||
$extra_form_fields .= qq~<input type="hidden" name="regionids" id="region-ids" value="">~;
|
||||
|
||||
$trigger_jquery_raw .= qq~
|
||||
\$("#savebutt").click(function() {
|
||||
let st_val = \$("#selectRegion_ids").chosen().val() ;
|
||||
\$('#region-ids').val(st_val);
|
||||
$add_to_trigger_jquery_raw
|
||||
\$('#users-form').submit();
|
||||
});~;
|
||||
}
|
||||
|
||||
# &common_min_select_opts('organisation_ids','organisations','name',$db{$table}{$i{id}}{organisation_ids},1,'','');
|
||||
|
||||
&common_min_select_opts('based_in','regions','name',$db{$table}{$i{id}}{based_in},1,'','','code') ;
|
||||
|
||||
# $required{based_in} = 1 ;
|
||||
# $select{based_in} = 1 ;
|
||||
# # $opts{based_in} = qq~<option value="JNB" $selected{based_in}{'JNB'}>Johannesburg</option><option value="CPT" $selected{based_in}{'CPT'}>Cape Town</option>~ ;
|
||||
# $opts{based_in} = qq~<option value="GP" $selected{based_in}{'GP'}>Gauteng</option><option value="CT" $selected{based_in}{'CT'}>Cape Town</option>~ ;
|
||||
|
||||
$required{user_type} = 1 ;
|
||||
$select{user_type} = 1 ;
|
||||
if ($user_type eq 'casual') {
|
||||
if ($glod_user_level > 2) {
|
||||
$opts{user_type} = qq~<option value="casual_a" $selected{user_type}{casual_a}>Operator Level 1</option>~;
|
||||
}
|
||||
if ($glod_user_level > 3) {
|
||||
$opts{user_type} .= qq~<option value="casual_b" $selected{user_type}{casual_b}>Operator Level 2</option><option value="casual_c" $selected{user_type}{casual_c}>Operator Level 3</option>~;
|
||||
}
|
||||
$opts{user_type} .= qq~<option value="casual_calibrator" $selected{user_type}{casual_calibrator}>Temp Calibrator</option>~;
|
||||
} elsif ($user_type) {
|
||||
my $user_type_name = join(" ", map { ucfirst lc } split /_/, $user_type);
|
||||
$opts{user_type} = qq~
|
||||
<option value="$user_type" $selected{user_type}{$user_type}>$user_type_name</option>
|
||||
~ ;
|
||||
} else {
|
||||
$opts{user_type} = qq~
|
||||
<option value="manager" $selected{user_type}{'manager'}>Manager</option>
|
||||
<option value="support" $selected{user_type}{'support'}>Support</option>
|
||||
<option value="external" $selected{user_type}{external}>External</option>
|
||||
<option value="it" $selected{user_type}{it}>IT</option>
|
||||
<option value="nonquote" $selected{user_type}{nonquote}>Non-quotes</option>
|
||||
<option value="parttime" $selected{user_type}{'parttime'}>Part-time</option>
|
||||
<option value="permanent" $selected{user_type}{'permanent'}>Permanent</option>
|
||||
<option value="senior_manager" $selected{user_type}{'senior_manager'}>Senior Manager</option>
|
||||
<option value="dcb_partner" $selected{user_type}{'dcb_partner'}>DCB Partner</option>
|
||||
~ ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_insert {
|
||||
|
||||
&add_db_fields ;
|
||||
|
||||
my $crypted_password = apache_md5_crypt($i{password},$useropts{salt}) ;
|
||||
$i{password} = $crypted_password ;
|
||||
$i{lastupdate} = "$now_ccyy_mm_dd $now_hour:$now_min:$now_sec" ;
|
||||
$i{email} = lc $i{email} ;
|
||||
|
||||
$i{id} = &db_min_get_max($table,'id') ;
|
||||
|
||||
&process_multi_select if $user_type ;
|
||||
|
||||
&db_min_insert($table) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_update {
|
||||
|
||||
unless ($i{id}) { $error = qq(NO ID) ; return ; }
|
||||
|
||||
&edit_db_fields ;
|
||||
|
||||
unless ($i{block}) { $i{block} = '0' ; }
|
||||
unless ($i{inactive}) { $i{inactive} = '0' ; }
|
||||
|
||||
if ($i{new_password}) {
|
||||
my $crypted_password = apache_md5_crypt($i{new_password},$useropts{salt}) ;
|
||||
$i{password} = $crypted_password ;
|
||||
$ignore{password} = 0 ;
|
||||
$hidden{password} = 2 ;
|
||||
}
|
||||
|
||||
$i{lastupdate} = "$now_ccyy_mm_dd $now_hour:$now_min:$now_sec" ;
|
||||
|
||||
&process_multi_select if $user_type ;
|
||||
|
||||
&db_min_upd($table,"id='$i{id}'") ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub users_validate {
|
||||
|
||||
my $user_exists = '' ; my $email_exists = '' ;
|
||||
|
||||
$i{username} = lc $i{username} ;
|
||||
$i{username} =~ s/ //gi ;
|
||||
|
||||
$i{email} = lc $i{email} ;
|
||||
$i{email} =~ s/ //gi ;
|
||||
|
||||
&db_min_ro($table,'*',"username='$i{username}' OR email='$i{email}'",'username','') ;
|
||||
|
||||
foreach my $id (keys %{$db{$table}}) {
|
||||
if ($db{$table}{$id}{username} eq $i{username}) {
|
||||
$user_exists = 1 ;
|
||||
last;
|
||||
}
|
||||
|
||||
if ($i{email} && $db{$table}{$id}{email} eq $i{email}) {
|
||||
$email_exists = 1 ;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if ($user_exists) {
|
||||
$alert = &common_min_alert('warning',"USERNAME ALREADY EXISTS!",'ok') ;
|
||||
%col_name = ();
|
||||
&common_min_add_screen;
|
||||
&common_min_screen1 unless $dialog ;
|
||||
&screen1 if $dialog ;
|
||||
}
|
||||
|
||||
if ($email_exists) {
|
||||
$alert = &common_min_alert('warning',"EMAIL ALREADY EXISTS!",'ok') ;
|
||||
%col_name = ();
|
||||
&common_min_add_screen;
|
||||
&common_min_screen1 unless $dialog ;
|
||||
&screen1 if $dialog ;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1 ;
|
||||
619
libs/modules/xlscreator.pm
Normal file
619
libs/modules/xlscreator.pm
Normal file
|
|
@ -0,0 +1,619 @@
|
|||
sub xlscreator_delete_previous_xls {
|
||||
|
||||
my ($path) = @_ ;
|
||||
|
||||
opendir(DIR, "$path") or die "cant open Directory $path: $!\n";
|
||||
|
||||
while(defined($folder = readdir(DIR))) {
|
||||
if (length $folder > 2) {
|
||||
my ($file,$type) = split(/\./,$folder) ;
|
||||
|
||||
# if ($match) { unless ($file =~ /$match/gi) { next ; } }
|
||||
|
||||
# my ($j1,$j2,$accid,$date) = split(/\-/,$file) ;
|
||||
# if ($match) { unless ($accid eq $match) { next ; } }
|
||||
|
||||
if (-e "$path/$file.xls"){
|
||||
unlink ("$path/$file.xls") or print "unable to unlink - $path/$file.xls : $!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(DIR) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_create_xls {
|
||||
|
||||
my ($file) = @_;
|
||||
|
||||
$workbook = Spreadsheet::WriteExcel->new($file) or die "ERROR : $file : $!";
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_close_xls {
|
||||
|
||||
$workbook->close();
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_hide_gridlines_xls {
|
||||
|
||||
($worksheet_name) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->hide_gridlines(1);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_set_margins_xls {
|
||||
|
||||
($worksheet_name,$margin_width) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->set_margins($margin_width); # Set all margins to the same value in inches
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_add_worksheet {
|
||||
|
||||
my ($worksheet_name) = @_;
|
||||
|
||||
$worksheet{$worksheet_name} = $workbook->add_worksheet($worksheet_name);
|
||||
|
||||
#$worksheet{$worksheet_name}->add_write_handler(qr[\w], \&xlscreator_store_string_widths);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_add_pie_chart {
|
||||
|
||||
my ($worksheet_name) = @_;
|
||||
|
||||
$chart{$worksheet_name} = $workbook->add_chart( type => 'pie', embedded => 1 );
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_write_xls {
|
||||
|
||||
my ($worksheet_name,$row,$col,$token,$cellformat) = @_;
|
||||
|
||||
$token =~ s/\,//g;
|
||||
|
||||
$worksheet{$worksheet_name}->write($row,$col,$token,$cellformat);
|
||||
|
||||
#&xlscreator_autofit_columns($worksheet{$worksheet_name});
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_write_formula {
|
||||
|
||||
my ($worksheet_name,$row,$col,$formula,$cellformat) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->write_formula($row,$col,$formula,$cellformat);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_freeze_panes {
|
||||
|
||||
my ($worksheet_name,$rows,$cols) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->freeze_panes($rows,$cols); # Freeze the first 5 rows
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_insert_image {
|
||||
|
||||
my ($worksheet_name,$row,$col,$file,$margin_right, $margin_bottom) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->insert_image($row,$col,$file,$margin_right,$margin_bottom);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_xls_format {
|
||||
|
||||
$format1 = $workbook->add_format();
|
||||
$format1->set_font('Verdana');
|
||||
$format1->set_size(8);
|
||||
|
||||
$format2 = $workbook->add_format();
|
||||
$format2->copy($format1);
|
||||
$format2->set_bold(); # Turns bold on
|
||||
$format2->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format3 = $workbook->add_format();
|
||||
$format3->copy($format1);
|
||||
$format3->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format4 = $workbook->add_format();
|
||||
$format4->copy($format1);
|
||||
$format4->set_bold(); # Turns bold on
|
||||
$format4->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format4->set_top('6');
|
||||
$format4->set_bottom('6');
|
||||
|
||||
$format5 = $workbook->add_format();
|
||||
$format5->copy($format1);
|
||||
$format5->set_underline(); # Single underline
|
||||
|
||||
$format6 = $workbook->add_format();
|
||||
$format6->copy($format1);
|
||||
$format6->set_underline(); # Single underline
|
||||
$format6->set_align('right');
|
||||
|
||||
$format7 = $workbook->add_format();
|
||||
$format7->copy($format1);
|
||||
$format7->set_align('right');
|
||||
$format7->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format8 = $workbook->add_format();
|
||||
$format8->copy($format1);
|
||||
$format8->set_bold(); # Turns bold on
|
||||
$format8->set_align('left');
|
||||
$format8->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format9 = $workbook->add_format();
|
||||
$format9->copy($format1);
|
||||
$format9->set_bold(); # Turns bold on
|
||||
$format9->set_align('right');
|
||||
$format9->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format10 = $workbook->add_format();
|
||||
$format10->copy($format1);
|
||||
$format10->set_align('left');
|
||||
|
||||
$format11 = $workbook->add_format();
|
||||
$format11->copy($format1);
|
||||
$format11->set_align('center');
|
||||
$format11->set_bg_color(0x16); #0x08 = 'black' ; #0x0C = 'blue' ; #0x10 = 'brown' ; #0x0F = 'cyan' ; #0x17 = 'gray' ; #0x11 = 'green' ; #0x0B = 'lime' ; #0x0E = 'magenta' ; #0x12 = 'navy' ; #0x35 = 'orange' ; #0x21 = 'pink' ; #0x14 = 'purple' ; #0x0A = 'red' ; #0x16 = 'silver' ; #0x09 = 'white' ; #0x0D = 'yellow' ;
|
||||
$format11->set_top('1');
|
||||
$format11->set_bottom('1');
|
||||
$format11->set_left('1');
|
||||
$format11->set_right('1');
|
||||
|
||||
$format12 = $workbook->add_format();
|
||||
$format12->set_bg_color(0x16);
|
||||
$format12->set_top('1');
|
||||
$format12->set_bottom('1');
|
||||
$format12->set_left('1');
|
||||
$format12->set_right('1');
|
||||
|
||||
$format13 = $workbook->add_format();
|
||||
$format13->copy($format1);
|
||||
$format13->set_bg_color(0x16);
|
||||
$format13->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format13->set_top('1');
|
||||
$format13->set_bottom('1');
|
||||
$format13->set_left('1');
|
||||
$format13->set_right('1');
|
||||
|
||||
$format14 = $workbook->add_format();
|
||||
$format14->copy($format1);
|
||||
$format14->set_bold(); # Turns bold on
|
||||
$format14->set_bg_color(0x16);
|
||||
$format14->set_top('1');
|
||||
$format14->set_bottom('1');
|
||||
$format14->set_left('1');
|
||||
$format14->set_right('1');
|
||||
|
||||
$format15 = $workbook->add_format();
|
||||
$format15->copy($format1);
|
||||
$format15->set_align('right');
|
||||
$format15->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format15->set_top('1');
|
||||
$format15->set_bottom('1');
|
||||
$format15->set_left('1');
|
||||
$format15->set_right('1');
|
||||
|
||||
$format16 = $workbook->add_format();
|
||||
$format16->copy($format1);
|
||||
$format16->set_bg_color(0x16);
|
||||
$format16->set_num_format('#,##0.0000'); # 1,234.56
|
||||
$format16->set_top('1');
|
||||
$format16->set_bottom('1');
|
||||
$format16->set_left('1');
|
||||
$format16->set_right('1');
|
||||
|
||||
$format17 = $workbook->add_format();
|
||||
$format17->copy($format1);
|
||||
$format17->set_align('right');
|
||||
$format17->set_bg_color(0x16);
|
||||
$format17->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format17->set_top('1');
|
||||
$format17->set_bottom('1');
|
||||
$format17->set_left('1');
|
||||
$format17->set_right('1');
|
||||
|
||||
$format18 = $workbook->add_format();
|
||||
$format18->copy($format1);
|
||||
$format18->set_bold();
|
||||
$format18->set_align('center');
|
||||
|
||||
$format19 = $workbook->add_format();
|
||||
$format19->copy($format1);
|
||||
$format19->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format19->set_top('1');
|
||||
$format19->set_bottom('6');
|
||||
|
||||
$format20 = $workbook->add_format();
|
||||
$format20->copy($format1);
|
||||
$format20->set_align('center');
|
||||
$format20->set_num_format(0x0a); #0.00% (0x09 = 0%)
|
||||
|
||||
$format21 = $workbook->add_format();
|
||||
$format21->copy($format1);
|
||||
$format21->set_align('right');
|
||||
|
||||
$format22 = $workbook->add_format();
|
||||
$format22->copy($format1);
|
||||
$format22->set_bold(); # Turns bold on
|
||||
$format22->set_align('right');
|
||||
$format22->set_bg_color(0x16);
|
||||
$format22->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format23 = $workbook->add_format();
|
||||
$format23->copy($format1);
|
||||
$format23->set_bold(); # Turns bold on
|
||||
$format23->set_color(0x0A); # red
|
||||
|
||||
$format24 = $workbook->add_format();
|
||||
$format24->copy($format1);
|
||||
$format24->set_top('2');
|
||||
|
||||
$format25 = $workbook->add_format();
|
||||
$format25->copy($format1);
|
||||
$format25->set_bottom('3');
|
||||
|
||||
$format26 = $workbook->add_format();
|
||||
$format26->copy($format1);
|
||||
$format26->set_bold(); # Turns bold on
|
||||
$format26->set_align('left');
|
||||
|
||||
$format27 = $workbook->add_format();
|
||||
$format27->copy($format1);
|
||||
$format27->set_bold(); # Turns bold on
|
||||
$format27->set_align('right');
|
||||
|
||||
$format28 = $workbook->add_format();
|
||||
$format28->set_underline(2); # Single underline
|
||||
|
||||
$format29 = $workbook->add_format();
|
||||
$format29->set_font('Verdana');
|
||||
$format29->set_size(5);
|
||||
|
||||
$format30 = $workbook->add_format();
|
||||
$format30->set_font('Verdana');
|
||||
$format30->set_size(7);
|
||||
|
||||
$format31 = $workbook->add_format();
|
||||
$format31->set_font('Verdana');
|
||||
$format31->set_size(4);
|
||||
$format31->set_align('right');
|
||||
|
||||
$format32 = $workbook->add_format();
|
||||
$format32->set_font('Verdana');
|
||||
$format32->set_size(6);
|
||||
|
||||
$format33 = $workbook->add_format();
|
||||
$format33->copy($format10);
|
||||
|
||||
$format34 = $workbook->add_format();
|
||||
$format34->copy($format1);
|
||||
$format34->set_border(1);
|
||||
|
||||
$format35 = $workbook->add_format();
|
||||
$format35->copy($format10);
|
||||
$format35->set_text_wrap();
|
||||
$format35->set_border(1);
|
||||
|
||||
my $light_blue = $workbook->set_custom_color(40,'#D5FFFF');
|
||||
|
||||
$format36 = $workbook->add_format();
|
||||
$format36->copy($format8);
|
||||
$format36->set_bg_color($light_blue);
|
||||
|
||||
$format37 = $workbook->add_format();
|
||||
$format37->copy($format10);
|
||||
$format37->set_bg_color($light_blue);
|
||||
|
||||
$format38 = $workbook->add_format();
|
||||
$format38->copy($format1);
|
||||
$format38->set_align('center');
|
||||
$format38->set_bg_color($light_blue);
|
||||
|
||||
$format39 = $workbook->add_format();
|
||||
$format39->copy($format1);
|
||||
$format39->set_bg_color($light_blue);
|
||||
|
||||
my $light_grey = $workbook->set_custom_color(41,'#c6c6c6');
|
||||
|
||||
$format40 = $workbook->add_format();
|
||||
$format40->copy($format1);
|
||||
$format40->set_align('center');
|
||||
$format40->set_bg_color($light_grey);
|
||||
$format40->set_border(1);
|
||||
|
||||
my $very_light_grey = $workbook->set_custom_color(42,'#EEEEEE');
|
||||
|
||||
$format41 = $workbook->add_format();
|
||||
$format41->copy($format10);
|
||||
$format41->set_bg_color($very_light_grey);
|
||||
$format41->set_border(1);
|
||||
$format41->set_italic();
|
||||
|
||||
# merged
|
||||
$format42 = $workbook->add_format();
|
||||
$format42->copy($format40);
|
||||
|
||||
$format43 = $workbook->add_format();
|
||||
$format43->copy($format38);
|
||||
$format43->set_border(1);
|
||||
|
||||
$format44 = $workbook->add_format();
|
||||
$format44->copy($format41);
|
||||
$format44->set_bg_color(0x09);
|
||||
|
||||
$format45 = $workbook->add_format();
|
||||
$format45->set_font('Verdana');
|
||||
$format45->set_size(10);
|
||||
|
||||
my $green = $workbook->set_custom_color(43,'#00b050');
|
||||
|
||||
$format46 = $workbook->add_format();
|
||||
$format46->set_align('center');
|
||||
$format46->copy($format45);
|
||||
$format46->set_bg_color($green);
|
||||
|
||||
my $light_blue_1 = $workbook->set_custom_color(44,'#b8cce4');
|
||||
|
||||
$format47 = $workbook->add_format();
|
||||
$format47->copy($format45);
|
||||
$format47->set_bg_color($light_blue_1);
|
||||
$format47->set_border(1);
|
||||
$format47->set_border_color(0x09);
|
||||
|
||||
my $very_light_blue = $workbook->set_custom_color(45,'#dce6f1');
|
||||
|
||||
$format48 = $workbook->add_format();
|
||||
$format48->copy($format47);
|
||||
$format48->set_bg_color($very_light_blue);
|
||||
|
||||
$format49 = $workbook->add_format();
|
||||
$format49->set_font('Arial');
|
||||
$format49->set_size(12);
|
||||
$format49->set_bold();
|
||||
|
||||
$format50 = $workbook->add_format();
|
||||
$format50->set_font('Arial');
|
||||
$format50->set_size(10);
|
||||
$format50->set_bold();
|
||||
|
||||
$format51 = $workbook->add_format();
|
||||
$format51->set_font('Arial');
|
||||
$format51->set_size(9);
|
||||
|
||||
#-------------------------------------------------------- red highlighting
|
||||
|
||||
my $hred = $workbook->set_custom_color(46,'#ff0000');
|
||||
|
||||
#40
|
||||
$format52 = $workbook->add_format();
|
||||
$format52->copy($format1);
|
||||
$format52->set_align('center');
|
||||
$format52->set_bg_color($light_grey);
|
||||
$format52->set_border(1);
|
||||
$format52->set_color($hred); # red
|
||||
|
||||
#42
|
||||
$format53 = $workbook->add_format();
|
||||
$format53->copy($format52);
|
||||
$format53->set_color($hred); # red
|
||||
|
||||
#35
|
||||
$format54 = $workbook->add_format();
|
||||
$format54->copy($format10);
|
||||
$format54->set_text_wrap();
|
||||
$format54->set_border(1);
|
||||
$format54->set_color($hred); # red
|
||||
|
||||
#41
|
||||
$format55 = $workbook->add_format();
|
||||
$format55->copy($format10);
|
||||
$format55->set_bg_color($very_light_grey);
|
||||
$format55->set_border(1);
|
||||
$format55->set_italic();
|
||||
$format55->set_color($hred); # red
|
||||
|
||||
#34
|
||||
$format56 = $workbook->add_format();
|
||||
$format56->copy($format1);
|
||||
$format56->set_border(1);
|
||||
$format56->set_color($hred); # red
|
||||
|
||||
#---------------------------------------------------
|
||||
|
||||
$format57 = $workbook->add_format();
|
||||
$format57->copy($format1);
|
||||
$format57->set_top('1');
|
||||
$format57->set_bottom('6');
|
||||
|
||||
$format58 = $workbook->add_format();
|
||||
$format58->copy($format1);
|
||||
$format58->set_top('1');
|
||||
$format58->set_bottom('6');
|
||||
$format58->set_bold();
|
||||
$format58->set_align('center');
|
||||
|
||||
my $ttl_light_blue = $workbook->set_custom_color(47,'#DAEEF3');
|
||||
|
||||
$format59 = $workbook->add_format();
|
||||
$format59->copy($format40);
|
||||
$format59->set_bg_color($ttl_light_blue);
|
||||
$format59->set_bold();
|
||||
|
||||
$format60 = $workbook->add_format();
|
||||
$format60->copy($format18);
|
||||
$format60->set_bg_color($ttl_light_blue);
|
||||
$format60->set_border(1);
|
||||
|
||||
my $ttl_light_green = $workbook->set_custom_color(48,'#EBF1DE');
|
||||
|
||||
$format61 = $workbook->add_format();
|
||||
$format61->copy($format40);
|
||||
$format61->set_bg_color($ttl_light_green);
|
||||
$format61->set_bold();
|
||||
|
||||
$format62 = $workbook->add_format();
|
||||
$format62->copy($format18);
|
||||
$format62->set_bg_color($ttl_light_green);
|
||||
$format62->set_border(1);
|
||||
|
||||
my $ttl_light_orange = $workbook->set_custom_color(49,'#FDE9D9');
|
||||
|
||||
$format63 = $workbook->add_format();
|
||||
$format63->copy($format40);
|
||||
$format63->set_bg_color($ttl_light_orange);
|
||||
$format63->set_bold();
|
||||
|
||||
$format64 = $workbook->add_format();
|
||||
$format64->copy($format18);
|
||||
$format64->set_bg_color($ttl_light_orange);
|
||||
$format64->set_border(1);
|
||||
|
||||
$format65 = $workbook->add_format();
|
||||
$format65->copy($format40);
|
||||
$format65->set_align('vcenter');
|
||||
|
||||
$format66 = $workbook->add_format();
|
||||
$format66->copy($format42);
|
||||
$format66->set_align('vcenter');
|
||||
|
||||
$format67 = $workbook->add_format();
|
||||
$format67->copy($format19);
|
||||
$format67->set_bold();
|
||||
|
||||
$format68 = $workbook->add_format();
|
||||
$format68->copy($format49);
|
||||
$format68->set_bold();
|
||||
$format68->set_text_wrap() ;
|
||||
$format68->set_align('vcenter');
|
||||
$format68->set_align('center');
|
||||
|
||||
my $ttl_light_yellow = $workbook->set_custom_color(50,'#FFFFB7');
|
||||
|
||||
$format69 = $workbook->add_format();
|
||||
$format69->copy($format40);
|
||||
$format69->set_bg_color($ttl_light_yellow);
|
||||
$format69->set_bold();
|
||||
|
||||
$format70 = $workbook->add_format();
|
||||
$format70->copy($format18);
|
||||
$format70->set_bg_color($ttl_light_yellow);
|
||||
$format70->set_border(1);
|
||||
|
||||
$format71 = $workbook->add_format();
|
||||
$format71->copy($format23);
|
||||
$format71->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format72 = $workbook->add_format();
|
||||
$format72->copy($format3);
|
||||
$format72->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format73 = $workbook->add_format();
|
||||
$format73->copy($format1);
|
||||
$format73->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format74 = $workbook->add_format();
|
||||
$format74->copy($format69);
|
||||
$format74->set_bold();
|
||||
$format74->set_text_wrap() ;
|
||||
$format74->set_align('vcenter');
|
||||
$format74->set_align('center');
|
||||
|
||||
$format75 = $workbook->add_format();
|
||||
$format75->copy($format40);
|
||||
$format75->set_bold();
|
||||
$format75->set_text_wrap() ;
|
||||
$format75->set_align('vcenter');
|
||||
$format75->set_align('center');
|
||||
|
||||
$format76 = $workbook->add_format();
|
||||
$format76->copy($format1);
|
||||
$format76->set_text_wrap() ;
|
||||
# $format76->set_bold();
|
||||
$format76->set_align('right');
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_set_column_width {
|
||||
|
||||
my ($worksheet_name,$from,$to,$width) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->set_column("$from".":"."$to", $width);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlscreator_autofit_columns {
|
||||
|
||||
my $worksheet = shift;
|
||||
my $col = 0;
|
||||
|
||||
for my $width (@{$worksheet->{__col_widths}}) {
|
||||
|
||||
$worksheet->set_column($col, $col, $width) if $width;
|
||||
$col++;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
# The following function is a callback that was added via add_write_handler()
|
||||
# above. It modifies the write() function so that it stores the maximum
|
||||
# unwrapped width of a string in a column.
|
||||
|
||||
sub xlscreator_store_string_widths {
|
||||
|
||||
my $worksheet = shift;
|
||||
my $col = $_[1];
|
||||
my $token = $_[2];
|
||||
|
||||
# Ignore some tokens that we aren't interested in.
|
||||
return if not defined $token; # Ignore undefs.
|
||||
return if $token eq ''; # Ignore blank cells.
|
||||
return if ref $token eq 'ARRAY'; # Ignore array refs.
|
||||
return if $token =~ /^=/; # Ignore formula
|
||||
|
||||
# Ignore numbers
|
||||
#return if $token =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
|
||||
|
||||
# Ignore various internal and external hyperlinks. In a real scenario
|
||||
# you may wish to track the length of the optional strings used with
|
||||
# urls.
|
||||
return if $token =~ m{^[fh]tt?ps?://};
|
||||
return if $token =~ m{^mailto:};
|
||||
return if $token =~ m{^(?:in|ex)ternal:};
|
||||
|
||||
# We store the string width as data in the Worksheet object. We use
|
||||
# a double underscore key name to avoid conflicts with future names.
|
||||
#
|
||||
my $old_width = $worksheet->{__col_widths}->[$col];
|
||||
my $string_width = xlscreator_string_width($token);
|
||||
|
||||
if (not defined $old_width or $string_width > $old_width) {
|
||||
# You may wish to set a minimum column width as follows.
|
||||
#return undef if $string_width < 10;
|
||||
|
||||
$worksheet->{__col_widths}->[$col] = $string_width;
|
||||
}
|
||||
|
||||
|
||||
# Return control to write();
|
||||
return undef;
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
# Very simple conversion between string length and string width for Arial 10.
|
||||
# See below for a more sophisticated method.
|
||||
|
||||
sub xlscreator_string_width {
|
||||
|
||||
return 1.2 * length $_[0];
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
997
libs/modules/xlsxcreator.pm
Normal file
997
libs/modules/xlsxcreator.pm
Normal file
|
|
@ -0,0 +1,997 @@
|
|||
sub xlsxcreator_delete_previous_xlsx {
|
||||
|
||||
my ($path) = @_ ;
|
||||
|
||||
opendir(DIR, "$path") or die "cant open Directory $path: $!\n";
|
||||
|
||||
while(defined($folder = readdir(DIR))) {
|
||||
if (length $folder > 2) {
|
||||
my ($file,$type) = split(/\./,$folder) ;
|
||||
|
||||
# if ($match) { unless ($file =~ /$match/gi) { next ; } }
|
||||
|
||||
# my ($j1,$j2,$accid,$date) = split(/\-/,$file) ;
|
||||
# if ($match) { unless ($accid eq $match) { next ; } }
|
||||
|
||||
if (-e "$path/$file.xlsx"){
|
||||
unlink ("$path/$file.xlsx") or print "unable to unlink - $path/$file.xlsx : $!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(DIR) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_create_xlsx {
|
||||
|
||||
my ($file) = @_;
|
||||
|
||||
our $workbook = Excel::Writer::XLSX->new($file) or die "ERROR : $file : $!";
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_close_xlsx {
|
||||
|
||||
$workbook->close();
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_hide_gridlines_xlsx {
|
||||
|
||||
($worksheet_name) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->hide_gridlines(1);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_set_margins_xlsx {
|
||||
|
||||
($worksheet_name,$margin_width) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->set_margins($margin_width); # Set all margins to the same value in inches
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_add_worksheet {
|
||||
|
||||
my ($worksheet_name) = @_;
|
||||
|
||||
$worksheet{$worksheet_name} = $workbook->add_worksheet($worksheet_name);
|
||||
|
||||
#$worksheet{$worksheet_name}->add_write_handler(qr[\w], \&xlsxcreator_store_string_widths);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_add_pie_chart {
|
||||
|
||||
my ($worksheet_name) = @_;
|
||||
|
||||
$chart{$worksheet_name} = $workbook->add_chart( type => 'pie', embedded => 1 );
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_merge_xlsx {
|
||||
|
||||
my ($worksheet_name,$merge_range,$token,$format) = @_ ;
|
||||
|
||||
$worksheet{$worksheet_name}->merge_range($merge_range,$token,$format) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_write_xlsx {
|
||||
|
||||
my ($worksheet_name,$row,$col,$token,$cellformat) = @_;
|
||||
|
||||
$token =~ s/\,//g;
|
||||
|
||||
$worksheet{$worksheet_name}->write($row,$col,$token,$cellformat);
|
||||
|
||||
#&xlsxcreator_autofit_columns($worksheet{$worksheet_name});
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_write_formula {
|
||||
|
||||
my ($worksheet_name,$row,$col,$formula,$cellformat) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->write_formula($row,$col,$formula,$cellformat);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_freeze_panes {
|
||||
|
||||
my ($worksheet_name,$rows,$cols) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->freeze_panes($rows,$cols); # Freeze the first 5 rows
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_insert_image {
|
||||
|
||||
my ($worksheet_name,$row,$col,$file,$margin_right,$margin_bottom,$width_scale,$height_scale) = @_;
|
||||
|
||||
$height_scale = $width_scale if $width_scale & !$height_scale ;
|
||||
|
||||
$worksheet{$worksheet_name}->insert_image($row,$col,$file,$margin_right,$margin_bottom,$width_scale,$height_scale) ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_write_url {
|
||||
|
||||
my ($worksheet_name,$row,$col,$url,$name) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->write_url($row, $col, $url,$name, undef, 'URL') ;
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_xlsx_format {
|
||||
|
||||
$format1 = $workbook->add_format();
|
||||
$format1->set_font('Verdana');
|
||||
$format1->set_size(8);
|
||||
|
||||
$format2 = $workbook->add_format();
|
||||
$format2->copy($format1);
|
||||
$format2->set_bold(); # Turns bold on
|
||||
$format2->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format3 = $workbook->add_format();
|
||||
$format3->copy($format1);
|
||||
$format3->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format4 = $workbook->add_format();
|
||||
$format4->copy($format1);
|
||||
$format4->set_bold(); # Turns bold on
|
||||
$format4->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format4->set_top('6');
|
||||
$format4->set_bottom('6');
|
||||
|
||||
$format5 = $workbook->add_format();
|
||||
$format5->copy($format1);
|
||||
$format5->set_underline(); # Single underline
|
||||
|
||||
$format6 = $workbook->add_format();
|
||||
$format6->copy($format1);
|
||||
$format6->set_underline(); # Single underline
|
||||
$format6->set_align('right');
|
||||
|
||||
$format7 = $workbook->add_format();
|
||||
$format7->copy($format1);
|
||||
$format7->set_align('right');
|
||||
$format7->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format8 = $workbook->add_format();
|
||||
$format8->copy($format1);
|
||||
$format8->set_bold(); # Turns bold on
|
||||
$format8->set_align('left');
|
||||
$format8->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format9 = $workbook->add_format();
|
||||
$format9->copy($format1);
|
||||
$format9->set_bold(); # Turns bold on
|
||||
$format9->set_align('right');
|
||||
$format9->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format10 = $workbook->add_format();
|
||||
$format10->copy($format1);
|
||||
$format10->set_align('left');
|
||||
|
||||
$format11 = $workbook->add_format();
|
||||
$format11->copy($format1);
|
||||
$format11->set_align('center');
|
||||
$format11->set_bg_color(0x16); #0x08 = 'black' ; #0x0C = 'blue' ; #0x10 = 'brown' ; #0x0F = 'cyan' ; #0x17 = 'gray' ; #0x11 = 'green' ; #0x0B = 'lime' ; #0x0E = 'magenta' ; #0x12 = 'navy' ; #0x35 = 'orange' ; #0x21 = 'pink' ; #0x14 = 'purple' ; #0x0A = 'red' ; #0x16 = 'silver' ; #0x09 = 'white' ; #0x0D = 'yellow' ;
|
||||
$format11->set_top('1');
|
||||
$format11->set_bottom('1');
|
||||
$format11->set_left('1');
|
||||
$format11->set_right('1');
|
||||
|
||||
$format12 = $workbook->add_format();
|
||||
$format12->set_bg_color(0x16);
|
||||
$format12->set_top('1');
|
||||
$format12->set_bottom('1');
|
||||
$format12->set_left('1');
|
||||
$format12->set_right('1');
|
||||
|
||||
$format13 = $workbook->add_format();
|
||||
$format13->copy($format1);
|
||||
$format13->set_bg_color(0x16);
|
||||
$format13->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format13->set_top('1');
|
||||
$format13->set_bottom('1');
|
||||
$format13->set_left('1');
|
||||
$format13->set_right('1');
|
||||
|
||||
$format14 = $workbook->add_format();
|
||||
$format14->copy($format1);
|
||||
$format14->set_bold(); # Turns bold on
|
||||
$format14->set_bg_color(0x16);
|
||||
$format14->set_top('1');
|
||||
$format14->set_bottom('1');
|
||||
$format14->set_left('1');
|
||||
$format14->set_right('1');
|
||||
|
||||
$format15 = $workbook->add_format();
|
||||
$format15->copy($format1);
|
||||
$format15->set_align('right');
|
||||
$format15->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format15->set_top('1');
|
||||
$format15->set_bottom('1');
|
||||
$format15->set_left('1');
|
||||
$format15->set_right('1');
|
||||
|
||||
$format16 = $workbook->add_format();
|
||||
$format16->copy($format1);
|
||||
$format16->set_bg_color(0x16);
|
||||
$format16->set_num_format('#,##0.0000'); # 1,234.56
|
||||
$format16->set_top('1');
|
||||
$format16->set_bottom('1');
|
||||
$format16->set_left('1');
|
||||
$format16->set_right('1');
|
||||
|
||||
$format17 = $workbook->add_format();
|
||||
$format17->copy($format1);
|
||||
$format17->set_align('right');
|
||||
$format17->set_bg_color(0x16);
|
||||
$format17->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format17->set_top('1');
|
||||
$format17->set_bottom('1');
|
||||
$format17->set_left('1');
|
||||
$format17->set_right('1');
|
||||
|
||||
$format18 = $workbook->add_format();
|
||||
$format18->copy($format1);
|
||||
$format18->set_bold();
|
||||
$format18->set_align('center');
|
||||
|
||||
$format19 = $workbook->add_format();
|
||||
$format19->copy($format1);
|
||||
$format19->set_num_format('#,##0.00'); # 1,234.56
|
||||
$format19->set_top('1');
|
||||
$format19->set_bottom('6');
|
||||
|
||||
$format20 = $workbook->add_format();
|
||||
$format20->copy($format1);
|
||||
$format20->set_align('center');
|
||||
$format20->set_num_format(0x0a); #0.00% (0x09 = 0%)
|
||||
|
||||
$format21 = $workbook->add_format();
|
||||
$format21->copy($format1);
|
||||
$format21->set_align('right');
|
||||
|
||||
$format22 = $workbook->add_format();
|
||||
$format22->copy($format1);
|
||||
$format22->set_bold(); # Turns bold on
|
||||
$format22->set_align('right');
|
||||
$format22->set_bg_color(0x16);
|
||||
$format22->set_num_format('#,##0.00'); # 1,234.56
|
||||
|
||||
$format23 = $workbook->add_format();
|
||||
$format23->copy($format1);
|
||||
$format23->set_bold(); # Turns bold on
|
||||
$format23->set_color(0x0A); # red
|
||||
|
||||
$format24 = $workbook->add_format();
|
||||
$format24->copy($format1);
|
||||
$format24->set_top('2');
|
||||
|
||||
$format25 = $workbook->add_format();
|
||||
$format25->copy($format1);
|
||||
$format25->set_bottom('3');
|
||||
|
||||
$format26 = $workbook->add_format();
|
||||
$format26->copy($format1);
|
||||
$format26->set_bold(); # Turns bold on
|
||||
$format26->set_align('left');
|
||||
|
||||
$format27 = $workbook->add_format();
|
||||
$format27->copy($format1);
|
||||
$format27->set_bold(); # Turns bold on
|
||||
$format27->set_align('right');
|
||||
|
||||
$format28 = $workbook->add_format();
|
||||
$format28->set_underline(2); # Single underline
|
||||
|
||||
$format29 = $workbook->add_format();
|
||||
$format29->set_font('Verdana');
|
||||
$format29->set_size(5);
|
||||
|
||||
$format30 = $workbook->add_format();
|
||||
$format30->set_font('Verdana');
|
||||
$format30->set_size(7);
|
||||
|
||||
$format31 = $workbook->add_format();
|
||||
$format31->set_font('Verdana');
|
||||
$format31->set_size(4);
|
||||
$format31->set_align('right');
|
||||
|
||||
$format32 = $workbook->add_format();
|
||||
$format32->set_font('Verdana');
|
||||
$format32->set_size(6);
|
||||
|
||||
$format33 = $workbook->add_format();
|
||||
$format33->copy($format10);
|
||||
|
||||
$format34 = $workbook->add_format();
|
||||
$format34->copy($format1);
|
||||
$format34->set_border(1);
|
||||
|
||||
$format35 = $workbook->add_format();
|
||||
$format35->copy($format10);
|
||||
$format35->set_text_wrap();
|
||||
$format35->set_border(1);
|
||||
|
||||
my $light_blue = $workbook->set_custom_color(40,'#D5FFFF');
|
||||
|
||||
$format36 = $workbook->add_format();
|
||||
$format36->copy($format8);
|
||||
$format36->set_bg_color($light_blue);
|
||||
|
||||
$format37 = $workbook->add_format();
|
||||
$format37->copy($format10);
|
||||
$format37->set_bg_color($light_blue);
|
||||
|
||||
$format38 = $workbook->add_format();
|
||||
$format38->copy($format1);
|
||||
$format38->set_align('center');
|
||||
$format38->set_bg_color($light_blue);
|
||||
|
||||
$format39 = $workbook->add_format();
|
||||
$format39->copy($format1);
|
||||
$format39->set_bg_color($light_blue);
|
||||
|
||||
my $light_grey = $workbook->set_custom_color(41,'#c6c6c6');
|
||||
|
||||
$format40 = $workbook->add_format();
|
||||
$format40->copy($format1);
|
||||
$format40->set_align('center');
|
||||
$format40->set_bg_color($light_grey);
|
||||
$format40->set_border(1);
|
||||
|
||||
my $very_light_grey = $workbook->set_custom_color(42,'#EEEEEE');
|
||||
|
||||
$format41 = $workbook->add_format();
|
||||
$format41->copy($format10);
|
||||
$format41->set_bg_color($very_light_grey);
|
||||
$format41->set_border(1);
|
||||
$format41->set_italic();
|
||||
|
||||
# merged
|
||||
$format42 = $workbook->add_format();
|
||||
$format42->copy($format40);
|
||||
|
||||
$format43 = $workbook->add_format();
|
||||
$format43->copy($format38);
|
||||
$format43->set_border(1);
|
||||
|
||||
$format44 = $workbook->add_format();
|
||||
$format44->copy($format41);
|
||||
$format44->set_bg_color(0x09);
|
||||
|
||||
$format45 = $workbook->add_format();
|
||||
$format45->set_font('Verdana');
|
||||
$format45->set_size(10);
|
||||
|
||||
my $green = $workbook->set_custom_color(43,'#00b050');
|
||||
|
||||
$format46 = $workbook->add_format();
|
||||
$format46->set_align('center');
|
||||
$format46->copy($format45);
|
||||
$format46->set_bg_color($green);
|
||||
|
||||
my $light_blue_1 = $workbook->set_custom_color(44,'#b8cce4');
|
||||
|
||||
$format47 = $workbook->add_format();
|
||||
$format47->copy($format45);
|
||||
$format47->set_bg_color($light_blue_1);
|
||||
$format47->set_border(1);
|
||||
$format47->set_border_color(0x09);
|
||||
|
||||
my $very_light_blue = $workbook->set_custom_color(45,'#dce6f1');
|
||||
|
||||
$format48 = $workbook->add_format();
|
||||
$format48->copy($format47);
|
||||
$format48->set_bg_color($very_light_blue);
|
||||
|
||||
$format49 = $workbook->add_format();
|
||||
$format49->set_font('Arial');
|
||||
$format49->set_size(12);
|
||||
$format49->set_bold();
|
||||
|
||||
$format50 = $workbook->add_format();
|
||||
$format50->set_font('Arial');
|
||||
$format50->set_size(10);
|
||||
$format50->set_bold();
|
||||
|
||||
$format51 = $workbook->add_format();
|
||||
$format51->set_font('Arial');
|
||||
$format51->set_size(9);
|
||||
|
||||
#-------------------------------------------------------- red highlighting
|
||||
|
||||
my $hred = $workbook->set_custom_color(46,'#ff0000');
|
||||
|
||||
#40
|
||||
$format52 = $workbook->add_format();
|
||||
$format52->copy($format1);
|
||||
$format52->set_align('center');
|
||||
$format52->set_bg_color($light_grey);
|
||||
$format52->set_border(1);
|
||||
$format52->set_color($hred); # red
|
||||
|
||||
#42
|
||||
$format53 = $workbook->add_format();
|
||||
$format53->copy($format52);
|
||||
$format53->set_color($hred); # red
|
||||
|
||||
#35
|
||||
$format54 = $workbook->add_format();
|
||||
$format54->copy($format10);
|
||||
$format54->set_text_wrap();
|
||||
$format54->set_border(1);
|
||||
$format54->set_color($hred); # red
|
||||
|
||||
#41
|
||||
$format55 = $workbook->add_format();
|
||||
$format55->copy($format10);
|
||||
$format55->set_bg_color($very_light_grey);
|
||||
$format55->set_border(1);
|
||||
$format55->set_italic();
|
||||
$format55->set_color($hred); # red
|
||||
|
||||
#34
|
||||
$format56 = $workbook->add_format();
|
||||
$format56->copy($format1);
|
||||
$format56->set_border(1);
|
||||
$format56->set_color($hred); # red
|
||||
|
||||
#---------------------------------------------------
|
||||
|
||||
$format57 = $workbook->add_format();
|
||||
$format57->copy($format1);
|
||||
$format57->set_top('1');
|
||||
$format57->set_bottom('6');
|
||||
|
||||
$format58 = $workbook->add_format();
|
||||
$format58->copy($format1);
|
||||
$format58->set_top('1');
|
||||
$format58->set_bottom('6');
|
||||
$format58->set_bold();
|
||||
$format58->set_align('center');
|
||||
|
||||
my $ttl_light_blue = $workbook->set_custom_color(47,'#DAEEF3');
|
||||
|
||||
$format59 = $workbook->add_format();
|
||||
$format59->copy($format40);
|
||||
$format59->set_bg_color($ttl_light_blue);
|
||||
$format59->set_bold();
|
||||
|
||||
$format60 = $workbook->add_format();
|
||||
$format60->copy($format18);
|
||||
$format60->set_bg_color($ttl_light_blue);
|
||||
$format60->set_border(1);
|
||||
|
||||
my $ttl_light_green = $workbook->set_custom_color(48,'#EBF1DE');
|
||||
|
||||
$format61 = $workbook->add_format();
|
||||
$format61->copy($format40);
|
||||
$format61->set_bg_color($ttl_light_green);
|
||||
$format61->set_bold();
|
||||
|
||||
$format62 = $workbook->add_format();
|
||||
$format62->copy($format18);
|
||||
$format62->set_bg_color($ttl_light_green);
|
||||
$format62->set_border(1);
|
||||
|
||||
my $ttl_light_orange = $workbook->set_custom_color(49,'#FDE9D9');
|
||||
|
||||
$format63 = $workbook->add_format();
|
||||
$format63->copy($format40);
|
||||
$format63->set_bg_color($ttl_light_orange);
|
||||
$format63->set_bold();
|
||||
|
||||
$format64 = $workbook->add_format();
|
||||
$format64->copy($format18);
|
||||
$format64->set_bg_color($ttl_light_orange);
|
||||
$format64->set_border(1);
|
||||
|
||||
$format65 = $workbook->add_format();
|
||||
$format65->copy($format40);
|
||||
$format65->set_align('vcenter');
|
||||
|
||||
$format66 = $workbook->add_format();
|
||||
$format66->copy($format42);
|
||||
$format66->set_align('vcenter');
|
||||
|
||||
$format67 = $workbook->add_format();
|
||||
$format67->copy($format19);
|
||||
$format67->set_bold();
|
||||
|
||||
$format68 = $workbook->add_format();
|
||||
$format68->copy($format49);
|
||||
$format68->set_bold();
|
||||
$format68->set_text_wrap() ;
|
||||
$format68->set_align('vcenter');
|
||||
$format68->set_align('center');
|
||||
|
||||
my $ttl_light_yellow = $workbook->set_custom_color(50,'#FFFFB7');
|
||||
|
||||
$format69 = $workbook->add_format();
|
||||
$format69->copy($format40);
|
||||
$format69->set_bg_color($ttl_light_yellow);
|
||||
$format69->set_bold();
|
||||
|
||||
$format70 = $workbook->add_format();
|
||||
$format70->copy($format18);
|
||||
$format70->set_bg_color($ttl_light_yellow);
|
||||
$format70->set_border(1);
|
||||
|
||||
$format71 = $workbook->add_format();
|
||||
$format71->copy($format23);
|
||||
$format71->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format72 = $workbook->add_format();
|
||||
$format72->copy($format3);
|
||||
$format72->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format73 = $workbook->add_format();
|
||||
$format73->copy($format1);
|
||||
$format73->set_bg_color($ttl_light_yellow);
|
||||
|
||||
$format74 = $workbook->add_format();
|
||||
$format74->copy($format69);
|
||||
$format74->set_bold();
|
||||
$format74->set_text_wrap() ;
|
||||
$format74->set_align('vcenter');
|
||||
$format74->set_align('center');
|
||||
|
||||
$format75 = $workbook->add_format();
|
||||
$format75->copy($format40);
|
||||
$format75->set_bold();
|
||||
$format75->set_text_wrap() ;
|
||||
$format75->set_align('vcenter');
|
||||
$format75->set_align('center');
|
||||
|
||||
$format76 = $workbook->add_format();
|
||||
$format76->copy($format1);
|
||||
$format76->set_text_wrap() ;
|
||||
# $format76->set_bold();
|
||||
$format76->set_align('right');
|
||||
|
||||
our $format_event_heading = $workbook -> add_format() ;
|
||||
$format_event_heading -> set_size(20) ;
|
||||
$format_event_heading -> set_align('center') ;
|
||||
$format_event_heading -> set_valign('vcenter') ;
|
||||
$format_event_heading -> set_bottom('2') ;
|
||||
$format_event_heading -> set_bold() ;
|
||||
|
||||
our $format_event_heading_2 = $workbook -> add_format() ;
|
||||
$format_event_heading_2 -> set_size(12) ;
|
||||
$format_event_heading_2 -> set_align('center') ;
|
||||
$format_event_heading_2 -> set_valign('vcenter') ;
|
||||
$format_event_heading_2 -> set_bottom('2') ;
|
||||
$format_event_heading_2 -> set_underline() ;
|
||||
$format_event_heading_2 -> set_bold() ;
|
||||
|
||||
our $format_event_data = $workbook -> add_format() ;
|
||||
$format_event_data -> set_size(11) ;
|
||||
$format_event_data -> set_align('center') ;
|
||||
$format_event_data -> set_valign('vcenter') ;
|
||||
|
||||
our $format_event_data_2 = $workbook -> add_format() ;
|
||||
$format_event_data_2 -> copy($format_event_data) ;
|
||||
$format_event_data_2 -> set_bottom('1') ;
|
||||
|
||||
our $format_empty_row = $workbook -> add_format() ;
|
||||
$format_empty_row -> set_bottom('1') ;
|
||||
|
||||
our $format_management_report_totals = $workbook -> add_format() ;
|
||||
$format_management_report_totals -> set_size(11) ;
|
||||
$format_management_report_totals -> set_align('center') ;
|
||||
$format_management_report_totals -> set_valign('vcenter') ;
|
||||
$format_management_report_totals -> set_top(6) ;
|
||||
$format_management_report_totals -> set_num_format('#,##0.00');
|
||||
$format_management_report_totals -> set_bold() ;
|
||||
|
||||
our $format_management_report_totals_2 = $workbook -> add_format() ;
|
||||
$format_management_report_totals_2 -> copy($format_management_report_totals);
|
||||
$format_management_report_totals_2 -> set_num_format('#,##0');
|
||||
|
||||
our $format_management_report_total = $workbook -> add_format() ;
|
||||
$format_management_report_total -> set_size(11) ;
|
||||
$format_management_report_total -> set_bold() ;
|
||||
$format_management_report_total -> set_align('right') ;
|
||||
$format_management_report_total -> set_valign('vcenter') ;
|
||||
|
||||
our $format_management_report_data = $workbook -> add_format() ;
|
||||
$format_management_report_data -> set_size(10) ;
|
||||
$format_management_report_data -> set_num_format('#,##0.00');
|
||||
$format_management_report_data -> set_align('center') ;
|
||||
$format_management_report_data -> set_valign('vcenter') ;
|
||||
|
||||
our $format_management_report_data_ref_nr = $workbook -> add_format() ;
|
||||
$format_management_report_data_ref_nr -> set_size(10) ;
|
||||
$format_management_report_data_ref_nr -> set_align('center') ;
|
||||
$format_management_report_data_ref_nr -> set_valign('vcenter') ;
|
||||
|
||||
our $format_management_report_months= $workbook -> add_format() ;
|
||||
$format_management_report_months -> set_size(10) ;
|
||||
$format_management_report_months -> set_align('right') ;
|
||||
$format_management_report_months -> set_valign('vcenter') ;
|
||||
|
||||
our $format_management_report_months_2 = $workbook -> add_format() ;
|
||||
$format_management_report_months_2 -> set_size(10) ;
|
||||
$format_management_report_months_2 -> set_align('left') ;
|
||||
$format_management_report_months_2 -> set_valign('vcenter') ;
|
||||
|
||||
|
||||
|
||||
our $format_management_report_headings = $workbook -> add_format() ;
|
||||
$format_management_report_headings -> set_size(11) ;
|
||||
$format_management_report_headings -> set_align('center') ;
|
||||
$format_management_report_headings -> set_valign('vcenter') ;
|
||||
$format_management_report_headings -> set_bold() ;
|
||||
$format_management_report_headings -> set_border(1) ;
|
||||
$format_management_report_headings -> set_bg_color('#B6D7A8') ;
|
||||
$format_management_report_headings -> set_text_wrap() ;
|
||||
|
||||
our $format_management_report_title = $workbook -> add_format() ;
|
||||
$format_management_report_title -> set_bold() ;
|
||||
$format_management_report_title -> set_size(16) ;
|
||||
$format_management_report_title -> set_align('left') ;
|
||||
$format_management_report_title -> set_valign('vcenter') ;
|
||||
|
||||
my $light_blue_bg = $workbook -> set_custom_color(51,'#51CBF2');
|
||||
$format77 = $workbook -> add_format() ;
|
||||
$format77 -> copy($format_event_data) ;
|
||||
$format77 -> set_bottom('1') ;
|
||||
$format77 -> set_left('1') ;
|
||||
$format77 -> set_right('1') ;
|
||||
$format77 -> set_bg_color($light_blue_bg) ;
|
||||
|
||||
my $yellow_bg = $workbook -> set_custom_color(52,'#F6E305');
|
||||
$format78 = $workbook -> add_format() ;
|
||||
$format78 -> copy($format77) ;
|
||||
$format78 -> set_bg_color($yellow_bg) ;
|
||||
|
||||
my $green_bg = $workbook -> set_custom_color(53,'#51B529');
|
||||
$format80 = $workbook -> add_format() ;
|
||||
$format80 -> copy($format77) ;
|
||||
$format80 -> set_bg_color($green_bg) ;
|
||||
|
||||
my $orange_bg = $workbook -> set_custom_color(54,'#F4BC14');
|
||||
$format79 = $workbook -> add_format() ;
|
||||
$format79 -> copy($format77) ;
|
||||
$format79 -> set_bg_color($orange_bg) ;
|
||||
|
||||
my $red_bg = $workbook -> set_custom_color(55,'#F90D0D');
|
||||
$format81 = $workbook -> add_format() ;
|
||||
$format81 -> copy($format77) ;
|
||||
$format81 -> set_bg_color($red_bg) ;
|
||||
|
||||
$format82 = $workbook -> add_format() ;
|
||||
$format82 -> copy($format_event_data) ;
|
||||
$format82 -> set_align('left') ;
|
||||
|
||||
my $slight_green = $workbook -> set_custom_color(56,'#E4EDD8');
|
||||
|
||||
# $format_management_report_headings -> set_bg_color($slight_green) ;
|
||||
|
||||
$format83 = $workbook -> add_format() ;
|
||||
$format83 -> set_bg_color($slight_green) ;
|
||||
$format83 -> set_bottom('1') ;
|
||||
$format83 -> set_right('1') ;
|
||||
$format83 -> set_bold() ;
|
||||
$format83 -> set_size(12) ;
|
||||
$format83 -> set_align('left') ;
|
||||
$format83 -> set_valign('vcenter') ;
|
||||
|
||||
$format84 = $workbook -> add_format() ;
|
||||
$format84 -> set_bottom('1') ;
|
||||
$format84 -> set_right('1') ;
|
||||
$format84 -> set_size(10) ;
|
||||
$format84 -> set_align('left') ;
|
||||
$format84 -> set_valign('vcenter') ;
|
||||
|
||||
$format85 = $workbook -> add_format() ;
|
||||
$format85 -> copy($format84) ;
|
||||
$format85 -> set_align('right') ;
|
||||
|
||||
$format86 = $workbook -> add_format() ;
|
||||
$format86 -> copy($format85) ;
|
||||
|
||||
$format87 = $workbook -> add_format() ;
|
||||
$format87 -> copy($format85) ;
|
||||
|
||||
my $dark_green_font = $workbook -> set_custom_color(57,'#2D6F4B');
|
||||
# my $light_green_bg = $workbook -> set_custom_color(58,'#D5EDBB');
|
||||
my $light_green_bg = $workbook -> set_custom_color(58,'#51B529');
|
||||
|
||||
my $dark_blue_font = $workbook -> set_custom_color(59,'#1D4D7E');
|
||||
# my $light_blue_bg = $workbook -> set_custom_color(60,'#C0E0F5');
|
||||
my $light_blue_bg = $workbook -> set_custom_color(60,'#FFA500');
|
||||
|
||||
|
||||
# my $dark_reb_bg = $workbook -> set_custom_color(61,'#AD0502');
|
||||
my $dark_reb_bg = $workbook -> set_custom_color(61,'#F90D0D');
|
||||
my $light_red_font = $workbook -> set_custom_color(62,'#E1B5B4');
|
||||
|
||||
my $light_grey_bg = $workbook -> set_custom_color(63,'#E9EAEC');
|
||||
|
||||
# my $pubple_border_color = $workbook -> set_custom_color(64,'#8B1D5F');
|
||||
|
||||
|
||||
# my $dark_green_font = $workbook -> set_custom_color(57,'#2D6F4B');
|
||||
# my $light_green_bg = $workbook -> set_custom_color(58,'#D5EDBB');
|
||||
# my $dark_blue_font = $workbook -> set_custom_color(59,'#1D4D7E');
|
||||
# my $light_blue_bg = $workbook -> set_custom_color(60,'#C0E0F5');
|
||||
# my $dark_reb_bg = $workbook -> set_custom_color(61,'#AD0502');
|
||||
# my $light_red_font = $workbook -> set_custom_color(62,'#E1B5B4');
|
||||
# my $light_grey_bg = $workbook -> set_custom_color(63,'#E9EAEC');
|
||||
# my $pubple_border_color = $workbook -> set_custom_color(64,'#8B1D5F');
|
||||
|
||||
|
||||
|
||||
$format88 = $workbook -> add_format() ;
|
||||
$format88 -> copy($format84) ;
|
||||
$format88 -> set_bg_color($light_green_bg) ;
|
||||
# $format88 -> set_custom_color('#2D6F4B') ;
|
||||
|
||||
$format89 = $workbook -> add_format() ;
|
||||
$format89 -> copy($format84) ;
|
||||
$format89 -> set_bg_color($light_blue_bg) ;
|
||||
|
||||
$format90 = $workbook -> add_format() ;
|
||||
$format90 -> copy($format84) ;
|
||||
$format90 -> set_bg_color($dark_reb_bg) ;
|
||||
|
||||
$format91 = $workbook -> add_format() ;
|
||||
$format91 -> copy($format84) ;
|
||||
$format91 -> set_bg_color($light_grey_bg) ;
|
||||
|
||||
$format92 = $workbook -> add_format() ;
|
||||
$format92 -> copy($format84) ;
|
||||
$format92 -> set_border(1);
|
||||
|
||||
my $lgreen_heading_bg = $workbook -> set_custom_color(64,'#E2EEDA');
|
||||
|
||||
$format93 = $workbook -> add_format() ;
|
||||
$format93 -> copy($format84) ;
|
||||
$format93 -> set_top('1') ;
|
||||
$format93 -> set_bold() ;
|
||||
$format93 -> set_size(12) ;
|
||||
$format93 -> set_bg_color($light_green_bg) ;
|
||||
|
||||
# my $green_bg = $workbook -> set_custom_color(65,'#009624');
|
||||
# my $yellow_bg = $workbook -> set_custom_color(66,'#FFF000');
|
||||
# my $red_bg = $workbook -> set_custom_color(67,'#AD0502');
|
||||
|
||||
$format94 = $workbook -> add_format() ;
|
||||
$format94 -> copy($format84) ;
|
||||
$format94 -> set_bg_color($green_bg) ;
|
||||
|
||||
$format95 = $workbook -> add_format() ;
|
||||
$format95 -> copy($format84) ;
|
||||
$format95 -> set_bg_color($yellow_bg) ;
|
||||
|
||||
$format96 = $workbook -> add_format() ;
|
||||
$format96 -> copy($format84) ;
|
||||
$format96 -> set_bg_color($red_bg) ;
|
||||
|
||||
$format97 = $workbook -> add_format() ;
|
||||
$format97 -> copy($format84) ;
|
||||
$format97 -> set_top(6) ;
|
||||
$format97 -> set_bottom(6) ;
|
||||
$format97 -> set_italic() ;
|
||||
|
||||
$format98 = $workbook->add_format() ;
|
||||
$format98 -> copy($format8) ;
|
||||
$format98 -> set_align('vcenter') ;
|
||||
|
||||
$format99 = $workbook->add_format();
|
||||
$format99 -> copy($format7);
|
||||
$format99 -> set_num_format('#,##0'); # 1,234.56
|
||||
|
||||
$format100 = $workbook->add_format();
|
||||
$format100 -> copy($format_management_report_headings);
|
||||
$format100 -> set_bg_color('#FFFF00') ;
|
||||
|
||||
$format101 = $workbook -> add_format();
|
||||
$format101 -> copy($format_management_report_headings);
|
||||
$format101 -> set_bg_color('#F9CB9C') ;
|
||||
|
||||
# my $purple_bg = $workbook -> set_custom_color(66,'#CA0AD3');
|
||||
$format102 = $workbook -> add_format() ;
|
||||
$format102 -> copy($format77) ;
|
||||
$format102 -> set_bg_color('#CA0AD3') ;
|
||||
|
||||
$format103 = $workbook -> add_format() ;
|
||||
$format103 -> copy($format77) ;
|
||||
$format103 -> set_bg_color('#164473') ;
|
||||
|
||||
$format104 = $workbook -> add_format() ;
|
||||
$format104 -> copy($format77) ;
|
||||
$format104 -> set_bg_color('#A349A4') ;
|
||||
|
||||
$format105 = $workbook -> add_format() ;
|
||||
$format105 -> copy($format77) ;
|
||||
$format105 -> set_bg_color('#5D09D3') ;
|
||||
|
||||
$format106 = $workbook -> add_format() ;
|
||||
$format106 -> copy($format77) ;
|
||||
$format106 -> set_bg_color('#5D092C') ;
|
||||
|
||||
$format107 = $workbook -> add_format() ; #ANALYTICS EVENT
|
||||
$format107 -> copy($format77) ;
|
||||
$format107 -> set_bg_color('#A05000') ;
|
||||
|
||||
$format108 = $workbook -> add_format() ; #DEMO EVENT
|
||||
$format108 -> copy($format77) ;
|
||||
$format108 -> set_bg_color('#FF40FF') ;
|
||||
|
||||
$format109 = $workbook->add_format() ;
|
||||
$format109 -> copy($format1) ;
|
||||
$format109 -> set_bold() ;
|
||||
$format109 -> set_size(12) ;
|
||||
|
||||
$format110 = $workbook->add_format() ;
|
||||
$format110 -> copy($format1) ;
|
||||
$format110 -> set_bold() ;
|
||||
$format110 -> set_size(10) ;
|
||||
$format110 -> set_bg_color('#DEECFF') ; #blue
|
||||
$format110 -> set_color('#037AFE') ; #blue
|
||||
|
||||
$format111 = $workbook->add_format() ;
|
||||
$format111 -> copy($format110) ;
|
||||
$format111 -> set_bg_color('#FFE1E6') ; #red
|
||||
$format111 -> set_color('#FE2D55') ; #red
|
||||
|
||||
$format112 = $workbook->add_format() ;
|
||||
$format112 -> copy($format110) ;
|
||||
$format112 -> set_bg_color('#E3F8F6') ; #lightbluie
|
||||
$format112 -> set_color('#00C8BE') ; #lightbluie
|
||||
|
||||
$format113 = $workbook->add_format() ;
|
||||
$format113 -> copy($format110) ;
|
||||
$format113 -> set_bg_color('#FFF0E0') ; #orange
|
||||
$format113 -> set_color('#FF9502') ; #orange
|
||||
$format113 -> set_size(8) ;
|
||||
|
||||
$format114 = $workbook->add_format() ;
|
||||
$format114 -> copy($format113) ;
|
||||
$format114 -> set_bold('0') ;
|
||||
|
||||
$format115 = $workbook->add_format() ;
|
||||
$format115 -> copy($format1) ;
|
||||
$format115 -> set_bold() ;
|
||||
# FF9502
|
||||
$format116 = $workbook->add_format() ;
|
||||
$format116 -> copy($format113) ;
|
||||
$format116 -> set_bold() ;
|
||||
$format116 -> set_size(10) ;
|
||||
|
||||
$format117 = $workbook->add_format() ;
|
||||
$format117 -> copy($format1) ;
|
||||
$format117 -> set_bold() ;
|
||||
$format117 -> set_size(12) ;
|
||||
|
||||
$format118 = $workbook->add_format() ;
|
||||
$format118 -> copy($format117) ;
|
||||
$format118 -> set_size(10) ;
|
||||
|
||||
$format119 = $workbook->add_format() ;
|
||||
$format119 -> copy($format1) ;
|
||||
$format119 -> set_size(10) ;
|
||||
$format119 -> set_top(1) ;
|
||||
$format119 -> set_bottom(6) ;
|
||||
$format119 -> set_num_format('#,##0.00');
|
||||
|
||||
$format120 = $workbook->add_format() ;
|
||||
$format120 -> copy($format1) ;
|
||||
$format120 -> set_size(8) ;
|
||||
$format120 -> set_num_format('#,##0.00');
|
||||
|
||||
$format121 = $workbook->add_format() ;
|
||||
$format121 -> copy($format1) ;
|
||||
$format121 -> set_bottom(1) ;
|
||||
|
||||
$format122 = $workbook->add_format() ;
|
||||
$format122 -> copy($format1) ;
|
||||
$format122 -> set_left(1) ;
|
||||
|
||||
# my $other_green = $workbook -> set_custom_color(100,'#B6D7A8');
|
||||
|
||||
# $format_management_report_headings -> set_bg_color($lgreen_heading_bg) ;
|
||||
|
||||
|
||||
# $format92 -> set_border_color(0x0A) ;
|
||||
# $format92 -> set_border_color($pubple_border_color) ;
|
||||
|
||||
# set_font_strikethrough
|
||||
# $format86 -> strikeout('1');
|
||||
|
||||
# $format87 = $workbook -> add_format() ;
|
||||
# $format87 -> set_bottom('1') ;
|
||||
# $format87 -> set_right('1') ;
|
||||
# $format87 -> set_size(10) ;
|
||||
# $format87 -> set_align('right') ;
|
||||
# $format87 -> set_valign('vcenter') ;
|
||||
# $format87 -> set_font_strikethrough('1');
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_set_column_width {
|
||||
|
||||
my ($worksheet_name,$from,$to,$width) = @_;
|
||||
|
||||
$worksheet{$worksheet_name}->set_column("$from".":"."$to", $width);
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
sub xlsxcreator_autofit_columns {
|
||||
|
||||
my $worksheet = shift;
|
||||
my $col = 0;
|
||||
|
||||
for my $width (@{$worksheet->{__col_widths}}) {
|
||||
|
||||
$worksheet->set_column($col, $col, $width) if $width;
|
||||
$col++;
|
||||
}
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
# The following function is a callback that was added via add_write_handler()
|
||||
# above. It modifies the write() function so that it stores the maximum
|
||||
# unwrapped width of a string in a column.
|
||||
|
||||
sub xlsxcreator_store_string_widths {
|
||||
|
||||
my $worksheet = shift;
|
||||
my $col = $_[1];
|
||||
my $token = $_[2];
|
||||
|
||||
# Ignore some tokens that we aren't interested in.
|
||||
return if not defined $token; # Ignore undefs.
|
||||
return if $token eq ''; # Ignore blank cells.
|
||||
return if ref $token eq 'ARRAY'; # Ignore array refs.
|
||||
return if $token =~ /^=/; # Ignore formula
|
||||
|
||||
# Ignore numbers
|
||||
#return if $token =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
|
||||
|
||||
# Ignore various internal and external hyperlinks. In a real scenario
|
||||
# you may wish to track the length of the optional strings used with
|
||||
# urls.
|
||||
return if $token =~ m{^[fh]tt?ps?://};
|
||||
return if $token =~ m{^mailto:};
|
||||
return if $token =~ m{^(?:in|ex)ternal:};
|
||||
|
||||
# We store the string width as data in the Worksheet object. We use
|
||||
# a double underscore key name to avoid conflicts with future names.
|
||||
#
|
||||
my $old_width = $worksheet->{__col_widths}->[$col];
|
||||
my $string_width = xlsxcreator_string_width($token);
|
||||
|
||||
if (not defined $old_width or $string_width > $old_width) {
|
||||
# You may wish to set a minimum column width as follows.
|
||||
#return undef if $string_width < 10;
|
||||
|
||||
$worksheet->{__col_widths}->[$col] = $string_width;
|
||||
}
|
||||
|
||||
|
||||
# Return control to write();
|
||||
return undef;
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
# Very simple conversion between string length and string width for Arial 10.
|
||||
# See below for a more sophisticated method.
|
||||
|
||||
sub xlsxcreator_string_width {
|
||||
|
||||
return 1.2 * length $_[0];
|
||||
|
||||
} #------------------------------------------------------------------------------------------
|
||||
|
||||
1;
|
||||
54
public_html/.htaccess
Normal file
54
public_html/.htaccess
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# BEGIN
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
|
||||
#RewriteCond %{HTTP_HOST} !^www\.
|
||||
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
#RewriteCond %{HTTPS} !=on
|
||||
## This checks to make sure the connection is not already HTTPS
|
||||
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/index.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/calendar($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/calendar.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/archive($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/archive.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_%2_%3_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_%2_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-report-test($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_report_test.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-payments($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_payments.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-payments-test($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_payments_test.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/logout($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/logout.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|delete|copy|search|filter)-(.*)-(.*)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2_%3_%4.pl?%1 [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|detailed|summary)-(.*)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2_%3.pl?%1 [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|accepted|pending|closed|stock|purchased|demo|active|all|main|other|vpu|rental|casual|assign|open|active)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2.pl?%1 [NC,L]
|
||||
|
||||
</IfModule>
|
||||
# END
|
||||
|
||||
54
public_html/_FromProd/.htaccess
Normal file
54
public_html/_FromProd/.htaccess
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# BEGIN
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
|
||||
#RewriteCond %{HTTP_HOST} !^www\.
|
||||
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
#RewriteCond %{HTTPS} !=on
|
||||
## This checks to make sure the connection is not already HTTPS
|
||||
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/index.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/calendar($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/calendar.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/archive($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/archive.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_%2_%3_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_%2_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-report($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_report.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-report-test($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_report_test.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-payments($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_payments.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(.*)-payments-test($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%1_payments_test.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/logout($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/logout.pl [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|delete|copy|search|filter)-(.*)-(.*)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%2_%3_%4.pl?%1 [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|detailed|summary)-(.*)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%2_%3.pl?%1 [NC,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|accepted|pending|closed|stock|purchased|demo|active|all|main|other|vpu|rental|casual|assign|open|active)-(.*)($|/)
|
||||
RewriteRule ^.*$ /cgi-bin/scripts/%2.pl?%1 [NC,L]
|
||||
|
||||
</IfModule>
|
||||
# END
|
||||
|
||||
39
public_html/css/_FromProd/bootstrap-itv.min.css
vendored
Normal file
39
public_html/css/_FromProd/bootstrap-itv.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
21
public_html/css/admin1.css
Normal file
21
public_html/css/admin1.css
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
BODY{font-family:Verdana;font-size:8pt;margin-left:0px;margin-right:0px;margin-bottom:0px;margin-top:0 px;background-color:white}
|
||||
a{font-size:8pt;font-family:Verdana;text-decoration:none; color:#666666;}
|
||||
a:hover{font-size:8pt;font-family:Verdana;text-decoration:none; color:#000000;}
|
||||
H1{font-size:8pt;font-family:Verdana}
|
||||
P{font-size:8pt;font-family:Verdana}
|
||||
P1{font-size:8pt;font-family:Verdana}
|
||||
TD{font-size:8pt;font-family:Verdana}
|
||||
TH{font-size:9pt;font-family:Verdana;background-color:#2447B2;color:white;text-decoration:bold}
|
||||
/*.Buttoncenter{font-size:8pt;text-align:center;text-decoration:none;color:#000000;background:#e0e0e0;padding:5px 10px 5px 10px;margin-bottom:0pt;border-top:0px;border-left:0px;border-right:0px;border-bottom:0px;font-family:Verdana;cursor:pointer} */
|
||||
/* .Buttoncenter{font-size:8pt;text-align:center;text-decoration:none;color:#000000;background:#D6E0FF;padding:5px 10px 5px 10px;margin-bottom:0pt;border-top:0px;border-left:0px;border-right:0px;border-bottom:0px;font-family:Verdana;cursor:pointer} */
|
||||
.Buttoncenter{font-size:8pt;text-align:center;text-decoration:none;color:#FFFFFF;background:#3366FF;padding:5px 10px 5px 10px;margin-bottom:0pt;border-top:0px;border-left:0px;border-right:0px;border-bottom:0px;font-family:Verdana;cursor:pointer}
|
||||
.Buttoncenter:hover{font-size:8pt;text-align:center;text-decoration:none;color:#FFFFFF;background:#666666;padding:5px 10px 5px 10px;margin-bottom:0pt;border-top:0px;border-left:0px;border-right:0px;border-bottom:0px;font-family:Verdana;cursor:pointer}
|
||||
#body{position:relative}
|
||||
.viewcolumn {max-width:400px;}
|
||||
.mOut { text-decoration:none;}
|
||||
.mOvr { cursor: pointer; }
|
||||
#srchtable TD{font-size:9pt;font-family:Verdana}
|
||||
/* #srchtable TH{font-size:10pt;font-family:Verdana;background-color:#043196;color:white;text-decoration:normal} */
|
||||
#srchtable TH{font-size:10pt;font-family:Verdana;background-color:#2447B2;color:white;text-decoration:normal}
|
||||
.error {background-color:#C4080E;width:100%;padding:2px 0 2px 0;color:#ffffff;font-weight:bold;}
|
||||
.success {background-color:green;width:100%;padding:2px 0 2px 0;color:#ffffff;font-weight:bold;}
|
||||
10
public_html/css/animate.min.css
vendored
Normal file
10
public_html/css/animate.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-cerulean.min.css
vendored
Normal file
7
public_html/css/bootstrap-cerulean.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-cyborg.min.css
vendored
Normal file
7
public_html/css/bootstrap-cyborg.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
39
public_html/css/bootstrap-darkly.min.css
vendored
Normal file
39
public_html/css/bootstrap-darkly.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
8
public_html/css/bootstrap-datetimepicker.min.css
vendored
Normal file
8
public_html/css/bootstrap-datetimepicker.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
111
public_html/css/bootstrap-dialog.css
vendored
Normal file
111
public_html/css/bootstrap-dialog.css
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
.bootstrap-dialog {
|
||||
/* dialog types */
|
||||
/**
|
||||
* Icon animation
|
||||
* Copied from font-awesome: http://fontawesome.io/
|
||||
**/
|
||||
/** End of icon animation **/
|
||||
}
|
||||
.bootstrap-dialog .modal-header {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-title {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-message {
|
||||
font-size: 14px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-button-icon {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-close-button {
|
||||
font-size: 20px;
|
||||
float: right;
|
||||
opacity: 0.9;
|
||||
filter: alpha(opacity=90);
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-close-button:hover {
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.bootstrap-dialog.type-default .modal-header {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.bootstrap-dialog.type-default .bootstrap-dialog-title {
|
||||
color: #333;
|
||||
}
|
||||
.bootstrap-dialog.type-info .modal-header {
|
||||
background-color: #5bc0de;
|
||||
}
|
||||
.bootstrap-dialog.type-primary .modal-header {
|
||||
background-color: #476a64;
|
||||
}
|
||||
.bootstrap-dialog.type-success .modal-header {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
.bootstrap-dialog.type-warning .modal-header {
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
.bootstrap-dialog.type-danger .modal-header {
|
||||
background-color: #d9534f;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
|
||||
font-size: 30px;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-message {
|
||||
font-size: 18px;
|
||||
}
|
||||
.bootstrap-dialog .icon-spin {
|
||||
display: inline-block;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
87
public_html/css/bootstrap-filmfreight.min.css
vendored
Normal file
87
public_html/css/bootstrap-filmfreight.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
148
public_html/css/bootstrap-itv.min.css
vendored
Normal file
148
public_html/css/bootstrap-itv.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-lumen.min.css
vendored
Normal file
7
public_html/css/bootstrap-lumen.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-simplex.min.css
vendored
Normal file
7
public_html/css/bootstrap-simplex.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-slate.min.css
vendored
Normal file
7
public_html/css/bootstrap-slate.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-spacelab.min.css
vendored
Normal file
7
public_html/css/bootstrap-spacelab.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public_html/css/bootstrap-united.min.css
vendored
Normal file
7
public_html/css/bootstrap-united.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
734
public_html/css/charisma-app.css
Normal file
734
public_html/css/charisma-app.css
Normal file
|
|
@ -0,0 +1,734 @@
|
|||
@import url(https://fonts.googleapis.com/css?family=Shojumaru);
|
||||
|
||||
select {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ch-container {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.top-block {
|
||||
/* border-radius: 20px; */
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
display: block;
|
||||
line-height: 22px;
|
||||
text-shadow: 0 0 1px #DDD;
|
||||
text-decoration: none;
|
||||
-webkit-box-shadow: inset 0 0 0 1px #FAFAFA;
|
||||
-moz-box-shadow: inset 0 0 0 1px #FAFAFA;
|
||||
box-shadow: inset 0 0 0 1px #FAFAFA;
|
||||
background: -moz-linear-gradient(top, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(30, 87, 153, 0.2)), color-stop(100%, rgba(125, 185, 232, 0)));
|
||||
background: -webkit-linear-gradient(top, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
background: -o-linear-gradient(top, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
background: linear-gradient(to bottom, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#331e5799', endColorstr='#007db9e8', GradientType=0);
|
||||
}
|
||||
|
||||
.top-block span {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.top-block i {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.top-block:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.notification {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -5px;
|
||||
line-height: 16px;
|
||||
height: 16px;
|
||||
padding: 0 5px;
|
||||
font-family: Arial, sans-serif;
|
||||
color: white !important;
|
||||
text-shadow: 0 1px hsla(0, 0%, 0%, 0.25);
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-box-shadow: 0 1px 1px hsla(0, 0%, 0%, 0.08), inset 0 1px hsla(0, 100%, 100%, 0.3);
|
||||
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), inset 0 1px rgba(255, 255, 255, 0.3);
|
||||
box-shadow: 0 1px 1px hsla(0, 0%, 0%, 0.08), inset 0 1px hsla(0, 100%, 100%, 0.3);
|
||||
}
|
||||
|
||||
.notification {
|
||||
border-color: #cccccc;
|
||||
background-color: #5a686f;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, hsl(200, 80%, 82%)), color-stop(100%, hsl(200, 81%, 67%)));
|
||||
background-image: -webkit-linear-gradient(top, hsl(0deg 0% 43%), hsl(0deg 0% 60%));
|
||||
background-image: -moz-linear-gradient(top, hsl(180, 0.5%, 40.6%), hsl(0, 0%, 80.8%));
|
||||
background-image: -ms-linear-gradient(top, hsl(200, 80%, 82%), hsl(200, 81%, 67%));
|
||||
background-image: -o-linear-gradient(top, hsl(200, 80%, 82%), hsl(200, 81%, 67%));
|
||||
background-image: linear-gradient(top, hsl(200, 80%, 82%), hsl(200, 81%, 67%));
|
||||
}
|
||||
|
||||
.notification.green {
|
||||
border-color: #5AAD34;
|
||||
background-color: #78CD51;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, hsl(101, 54%, 71%)), color-stop(100%, hsl(101, 55%, 56%)));
|
||||
background-image: -webkit-linear-gradient(top, hsl(101, 54%, 71%), hsl(101, 55%, 56%));
|
||||
background-image: -moz-linear-gradient(top, hsl(101, 54%, 71%), hsl(101, 55%, 56%));
|
||||
background-image: -ms-linear-gradient(top, hsl(101, 54%, 71%), hsl(101, 55%, 56%));
|
||||
background-image: -o-linear-gradient(top, hsl(101, 54%, 71%), hsl(101, 55%, 56%));
|
||||
background-image: linear-gradient(top, hsl(101, 54%, 71%), hsl(101, 55%, 56%));
|
||||
}
|
||||
|
||||
.notification.yellow {
|
||||
border-color: #F4A506;
|
||||
background-color: #FABB3D;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, hsl(40, 95%, 76%)), color-stop(100%, hsl(40, 95%, 61%)));
|
||||
background-image: -webkit-linear-gradient(top, hsl(40, 95%, 76%), hsl(40, 95%, 61%));
|
||||
background-image: -moz-linear-gradient(top, hsl(40, 95%, 76%), hsl(40, 95%, 61%));
|
||||
background-image: -ms-linear-gradient(top, hsl(40, 95%, 76%), hsl(40, 95%, 61%));
|
||||
background-image: -o-linear-gradient(top, hsl(40, 95%, 76%), hsl(40, 95%, 61%));
|
||||
background-image: linear-gradient(top, hsl(40, 95%, 76%), hsl(40, 95%, 61%));
|
||||
}
|
||||
|
||||
.notification.red {
|
||||
border-color: #FA5833;
|
||||
background-color: #FA603D;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, hsl(11, 95%, 76%)), color-stop(100%, hsl(11, 95%, 61%)));
|
||||
background-image: -webkit-linear-gradient(top, hsl(11, 95%, 76%), hsl(11, 95%, 61%));
|
||||
background-image: -moz-linear-gradient(top, hsl(11, 95%, 76%), hsl(11, 95%, 61%));
|
||||
background-image: -ms-linear-gradient(top, hsl(11, 95%, 76%), hsl(11, 95%, 61%));
|
||||
background-image: -o-linear-gradient(top, hsl(11, 95%, 76%), hsl(11, 95%, 61%));
|
||||
background-image: linear-gradient(top, hsl(11, 95%, 76%), hsl(11, 95%, 61%));
|
||||
}
|
||||
|
||||
.box {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.box-inner {
|
||||
border: 1px solid #DEDEDE;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
box-shadow: 0 0 10px rgba(189, 189, 189, 0.4);
|
||||
-webkit-box-shadow: 0 0 10px rgba(189, 189, 189, 0.4);
|
||||
-moz-box-shadow: 0 0 10px rgba(189, 189, 189, 0.4);
|
||||
}
|
||||
|
||||
.box-header {
|
||||
border: none;
|
||||
padding-top: 5px;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
border-radius: 3px 3px 0 0;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
height: 35px;
|
||||
min-height: 35px !important;
|
||||
margin-bottom: 0;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(0, 0, 0, 0.1)));
|
||||
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
|
||||
background: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffffff', endColorstr='#1a000000', GradientType=0);
|
||||
|
||||
}
|
||||
|
||||
.box-header h2 {
|
||||
font-size: 15px;
|
||||
width: auto;
|
||||
clear: none;
|
||||
float: left;
|
||||
line-height: 25px;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.box-header h3 {
|
||||
font-size: 13px;
|
||||
width: auto;
|
||||
clear: none;
|
||||
float: left;
|
||||
line-height: 25px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.box-header h2 > i {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.box-icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.box-icon a {
|
||||
clear: none;
|
||||
float: left;
|
||||
margin: 0 2px;
|
||||
height: 20px;
|
||||
width: 5px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.box-icon a i {
|
||||
margin-left: -6px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.btn-round {
|
||||
border-radius: 40px;
|
||||
-webkit-border-radius: 40px;
|
||||
-moz-border-radius: 40px;
|
||||
font-size: 12px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
ul.dashboard-list li {
|
||||
padding: 7px 0;
|
||||
list-style: none;
|
||||
border-bottom: 1px solid #EBEBEB;
|
||||
border-top: 1px solid white;
|
||||
}
|
||||
|
||||
ul.dashboard-list a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.dashboard-list {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.dashboard-list li a span {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
width: 70px;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.dashboard-avatar {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
padding: 1px;
|
||||
float: left;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
border: 1px solid #EBEBEB;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
background-color: white;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
margin-bottom: 40px !important;
|
||||
}
|
||||
|
||||
.thumbnails > li {
|
||||
display: inline-block;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.thumbnail img, .thumbnail > a {
|
||||
z-index: 2;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
img.grayscale {
|
||||
-webkit-filter: grayscale(1);
|
||||
-webkit-filter: grayscale(100%);
|
||||
-moz-filter: grayscale(100%);
|
||||
-ms-filter: grayscale(100%);
|
||||
-o-filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.thumbnail .gallery-controls {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
margin-top: -30px;
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
padding: 0 6.5px;
|
||||
}
|
||||
|
||||
.thumbnail .gallery-controls p {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.uploader {
|
||||
border-radius: 14px;
|
||||
-webkit-border-radius: 14px;
|
||||
-moz-border-radius: 14px;
|
||||
}
|
||||
|
||||
footer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.center, p.center, img.center {
|
||||
margin-left: auto !important;
|
||||
margin-right: auto !important;
|
||||
float: none !important;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.stackControls {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
.sidebar-nav {
|
||||
min-height: 0;
|
||||
box-shadow: 0 0 10px #BDBDBD;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.sidebar-nav > ul > li:not(.nav-header) {
|
||||
margin-right: -2px;
|
||||
margin-left: -2px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: 'Shojumaru', cursive, Arial, serif;
|
||||
letter-spacing: 2px;
|
||||
text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
|
||||
width: 60px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.navbar-brand .logfav {
|
||||
float: left;
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.navbar-brand .logotext {
|
||||
float: left;
|
||||
max-width: 120px;
|
||||
/*margin-top: 4px; */
|
||||
}
|
||||
|
||||
.navbar-brand span {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.theme-container {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.navbar-search {
|
||||
margin-left: 10px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.navbar-inner {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
line-height: 27px;
|
||||
height: 57px;
|
||||
/* background-image: url("/img/bg-strip.jpg"); */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.navbar-inner .btn-group {
|
||||
margin: 7px 5px 0 5px;
|
||||
}
|
||||
|
||||
ul.ajax-loaders li {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
ul.ajax-loaders {
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.bs-icons li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#for-is-ajax {
|
||||
padding-left: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#loading {
|
||||
margin-top: 20px;
|
||||
width: 128px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#loading div.center {
|
||||
margin-top: 10px;
|
||||
height: 15px;
|
||||
width: 128px;
|
||||
background: url(../img/ajax-loaders/ajax-loader-6.gif);
|
||||
}
|
||||
|
||||
.box-content .nav-tabs {
|
||||
margin-right: -10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
|
||||
.login-header {
|
||||
padding-top: 30px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.remember {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #458746;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #B94846;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #3986AC;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: #F99406;
|
||||
}
|
||||
|
||||
.login-box .input-prepend {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.login-box .btn {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-content.buttons {
|
||||
min-height: 297px;
|
||||
}
|
||||
|
||||
.main-menu > li > a {
|
||||
border: 1px solid rgba(221, 221, 221, 0.46);
|
||||
}
|
||||
|
||||
.main-menu > li {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.sidebar-nav .nav-header {
|
||||
display: block;
|
||||
padding: 3px 15px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
color: #999999;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
ul.main-menu li:hover {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
ul.main-menu li.active {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
ul.main-menu li.nav-header:hover {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
ul.main-menu li:not(.nav-header) {
|
||||
-webkit-transition: .3s;
|
||||
-moz-transition: .3s;
|
||||
-ms-transition: .3s;
|
||||
-o-transition: .3s;
|
||||
transition: .3s;
|
||||
}
|
||||
|
||||
.accordion > ul {
|
||||
display: none;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.nav-sm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.donate a {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.donate {
|
||||
padding: 20px 0 0 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.preview-on-phone {
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
|
||||
.powered-by {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.whitespace:before {
|
||||
content: "\2122";
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.center-block {
|
||||
float: none !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.github-buttons li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.homepage-box {
|
||||
height: 380px;
|
||||
}
|
||||
|
||||
.download-buttons a {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.center-text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
|
||||
#leftsidebar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-brand .logotext {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media only screen and (max-width: 767px) {
|
||||
|
||||
#leftsidebar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: 'Shojumaru', cursive, Arial, serif;
|
||||
letter-spacing: 2px;
|
||||
text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
|
||||
width: 40%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.nav-sm {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: solid white 1px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.sidebar-nav .nav-canvas {
|
||||
top: -20px;
|
||||
left: -90%;
|
||||
position: absolute;
|
||||
width: 80%;
|
||||
z-index: 2;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
margin: 0 !important;
|
||||
border-radius: 0 0 20px 0;
|
||||
padding-bottom: 10px;
|
||||
will-change: left;
|
||||
}
|
||||
|
||||
.sidebar-nav.active .nav-canvas {
|
||||
left: -20px;
|
||||
border-right: solid 1px white;
|
||||
border-bottom: solid 1px white;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
margin: 0 !important;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.nav-canvas {
|
||||
-webkit-transition: .2s;
|
||||
-moz-transition: .2s;
|
||||
-ms-transition: .2s;
|
||||
-o-transition: .2s;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.sidebar-nav a {
|
||||
border: none !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#for-is-ajax {
|
||||
color: white;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.main-menu .nav-header {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul.main-menu li:hover {
|
||||
margin-left: inherit;
|
||||
}
|
||||
|
||||
ul.main-menu li.active {
|
||||
margin-left: inherit;
|
||||
}
|
||||
|
||||
ul.main-menu a:hover, .nav-sm a:hover {
|
||||
background: none !important;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-toggle:focus {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-toggle.active {
|
||||
box-shadow: 0 0 7px rgb(0, 255, 40);
|
||||
border: solid 1px white;
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
margin-left: 5px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.powered-by {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-wrapper .pinned {
|
||||
box-shadow: 0 0 20px black;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet */
|
||||
@media only screen and (min-width: 768px) and (max-width: 979px) {
|
||||
|
||||
#leftsidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-header h2 {
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
.box-header h3 {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
.main-menu-span {
|
||||
width: 6.2% !important;
|
||||
margin-right: 4%;
|
||||
}
|
||||
|
||||
.top-menu > li i {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-nav li span {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.sidebar-nav li a, .sidebar-nav .nav-header {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Computer */
|
||||
@media only screen and (min-width: 980px) {
|
||||
|
||||
#leftsidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a, button, input[type=submit], input[type=button], .product-img {
|
||||
-webkit-transition: .5s;
|
||||
-moz-transition: .5s;
|
||||
-ms-transition: .5s;
|
||||
-o-transition: .5s;
|
||||
transition: .5s;
|
||||
}
|
||||
|
||||
.ch-container {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
78
public_html/css/custom-filmfreight.css
Normal file
78
public_html/css/custom-filmfreight.css
Normal file
File diff suppressed because one or more lines are too long
78
public_html/css/custom-itv.css
Normal file
78
public_html/css/custom-itv.css
Normal file
File diff suppressed because one or more lines are too long
182
public_html/css/datepicker.css
Normal file
182
public_html/css/datepicker.css
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
/*!
|
||||
* Datepicker for Bootstrap
|
||||
*
|
||||
* Copyright 2012 Stefan Petre
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*/
|
||||
.datepicker {
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
/*.dow {
|
||||
border-top: 1px solid #ddd !important;
|
||||
}*/
|
||||
|
||||
}
|
||||
.datepicker:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 6px;
|
||||
}
|
||||
.datepicker:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 7px;
|
||||
}
|
||||
.datepicker > div {
|
||||
display: none;
|
||||
}
|
||||
.datepicker table {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.datepicker td,
|
||||
.datepicker th {
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.datepicker td.day:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datepicker td.day.disabled {
|
||||
color: #eeeeee;
|
||||
}
|
||||
.datepicker td.old,
|
||||
.datepicker td.new {
|
||||
color: #999999;
|
||||
}
|
||||
.datepicker td.active,
|
||||
.datepicker td.active:hover {
|
||||
color: #ffffff;
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #0044cc;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker td.active:hover,
|
||||
.datepicker td.active:hover:hover,
|
||||
.datepicker td.active:focus,
|
||||
.datepicker td.active:hover:focus,
|
||||
.datepicker td.active:active,
|
||||
.datepicker td.active:hover:active,
|
||||
.datepicker td.active.active,
|
||||
.datepicker td.active:hover.active,
|
||||
.datepicker td.active.disabled,
|
||||
.datepicker td.active:hover.disabled,
|
||||
.datepicker td.active[disabled],
|
||||
.datepicker td.active:hover[disabled] {
|
||||
color: #ffffff;
|
||||
background-color: #0044cc;
|
||||
*background-color: #003bb3;
|
||||
}
|
||||
.datepicker td.active:active,
|
||||
.datepicker td.active:hover:active,
|
||||
.datepicker td.active.active,
|
||||
.datepicker td.active:hover.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datepicker td span {
|
||||
display: block;
|
||||
width: 47px;
|
||||
height: 54px;
|
||||
line-height: 54px;
|
||||
float: left;
|
||||
margin: 2px;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.datepicker td span:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.datepicker td span.active {
|
||||
color: #ffffff;
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #0044cc;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker td span.active:hover,
|
||||
.datepicker td span.active:focus,
|
||||
.datepicker td span.active:active,
|
||||
.datepicker td span.active.active,
|
||||
.datepicker td span.active.disabled,
|
||||
.datepicker td span.active[disabled] {
|
||||
color: #ffffff;
|
||||
background-color: #0044cc;
|
||||
*background-color: #003bb3;
|
||||
}
|
||||
.datepicker td span.active:active,
|
||||
.datepicker td span.active.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datepicker td span.old {
|
||||
color: #999999;
|
||||
}
|
||||
.datepicker th.switch {
|
||||
width: 145px;
|
||||
}
|
||||
.datepicker th.next,
|
||||
.datepicker th.prev {
|
||||
font-size: 21px;
|
||||
}
|
||||
.datepicker thead tr:first-child th {
|
||||
cursor: pointer;
|
||||
}
|
||||
.datepicker thead tr:first-child th:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.input-append.date .add-on i,
|
||||
.input-prepend.date .add-on i {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
9
public_html/css/elfinder.min.css
vendored
Normal file
9
public_html/css/elfinder.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
49
public_html/css/elfinder.theme.css
Normal file
49
public_html/css/elfinder.theme.css
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* MacOS X like theme for elFinder.
|
||||
* Required jquery ui "smoothness" theme.
|
||||
*
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
|
||||
/* dialogs */
|
||||
.std42-dialog, .std42-dialog .ui-widget-content { background-color:#ededed; background-image:none; background-clip: content-box; }
|
||||
|
||||
/* navbar */
|
||||
.elfinder .elfinder-navbar { background:#dde4eb; }
|
||||
.elfinder-navbar .ui-state-hover { background:transparent; border-color:transparent; }
|
||||
.elfinder-navbar .ui-state-active { background: #3875d7; border-color:#3875d7; color:#fff; }
|
||||
/* disabled elfinder */
|
||||
.elfinder-disabled .elfinder-navbar .ui-state-active { background: #dadada; border-color:#aaa; color:#fff; }
|
||||
|
||||
|
||||
/* current directory */
|
||||
/* selected file in "icons" view */
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover { background:#ccc; }
|
||||
/* list view*/
|
||||
.elfinder-cwd table tr:nth-child(odd) { background-color:#edf3fe; }
|
||||
.elfinder-cwd table tr { border-top:1px solid #fff; }
|
||||
|
||||
/* common selected background/color */
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover,
|
||||
.elfinder-cwd table td.ui-state-hover,
|
||||
.elfinder-button-menu .ui-state-hover { background: #3875d7; color:#fff;}
|
||||
/* disabled elfinder */
|
||||
.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover,
|
||||
.elfinder-disabled .elfinder-cwd table td.ui-state-hover { background:#dadada;}
|
||||
|
||||
/* statusbar */
|
||||
.elfinder .elfinder-statusbar { color:#555; }
|
||||
.elfinder .elfinder-statusbar a { text-decoration:none; color:#555;}
|
||||
|
||||
|
||||
.std42-dialog .elfinder-help, .std42-dialog .elfinder-help .ui-widget-content { background:#fff;}
|
||||
|
||||
/* contextmenu */
|
||||
.elfinder-contextmenu .ui-state-hover { background: #3875d7; color:#fff; }
|
||||
.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow { background-image:url('../img/arrows-active.png'); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3
public_html/css/fstyle.css
Normal file
3
public_html/css/fstyle.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.text11 { font-family: Arial, Helvetica, sans-serif; font-size: 11px}
|
||||
.link11 { font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none}
|
||||
.link11_inverse { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF ; text-decoration: none}
|
||||
BIN
public_html/css/img/glyphicons-halflings-white.png
Normal file
BIN
public_html/css/img/glyphicons-halflings-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
public_html/css/img/glyphicons-halflings.png
Normal file
BIN
public_html/css/img/glyphicons-halflings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
565
public_html/css/jquery-ui-1.8.21.custom.css
vendored
Normal file
565
public_html/css/jquery-ui-1.8.21.custom.css
vendored
Normal file
|
|
@ -0,0 +1,565 @@
|
|||
/*!
|
||||
* jQuery UI CSS Framework 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and ../img */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../img/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
||||
.ui-widget-content a { color: #222222; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../img/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../img/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../img/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../img/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../img/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../img/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and ../img */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(../img/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(../img/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(../img/ui-icons_222222_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(../img/ui-icons_888888_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../img/ui-icons_454545_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(../img/ui-icons_454545_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(../img/ui-icons_2e83ff_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../img/ui-icons_cd0a0a_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(../img/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../img/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
|
||||
* jQuery UI Resizable 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*!
|
||||
* jQuery UI Selectable 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*!
|
||||
* jQuery UI Accordion 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*!
|
||||
* jQuery UI Autocomplete 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.21
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*!
|
||||
* jQuery UI Button 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*!
|
||||
* jQuery UI Dialog 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*!
|
||||
* jQuery UI Slider 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*!
|
||||
* jQuery UI Tabs 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*!
|
||||
* jQuery UI Datepicker 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*!
|
||||
* jQuery UI Progressbar 1.8.21
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
145
public_html/css/jquery.iphone.toggle.css
Normal file
145
public_html/css/jquery.iphone.toggle.css
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
.iPhoneCheckContainer {
|
||||
position: relative;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
overflow: hidden; }
|
||||
.iPhoneCheckContainer input {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 30px;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
opacity: 0; }
|
||||
.iPhoneCheckContainer label {
|
||||
white-space: nowrap;
|
||||
font-size: 17px;
|
||||
line-height: 17px;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 27px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
top: 0;
|
||||
padding-top: 5px;
|
||||
overflow: hidden; }
|
||||
.iPhoneCheckContainer, .iPhoneCheckContainer label {
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none; }
|
||||
|
||||
.iPhoneCheckDisabled {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
|
||||
opacity: 0.5; }
|
||||
|
||||
label.iPhoneCheckLabelOn {
|
||||
color: white;
|
||||
background: url('../img/iphone-style-checkboxes/on.png?1284697268') no-repeat;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
|
||||
left: 0;
|
||||
padding-top: 5px; }
|
||||
label.iPhoneCheckLabelOn span {
|
||||
padding-left: 8px; }
|
||||
label.iPhoneCheckLabelOff {
|
||||
color: #8b8b8b;
|
||||
background: url('../img/iphone-style-checkboxes/off.png?1284697268') no-repeat right 0;
|
||||
text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
|
||||
text-align: right;
|
||||
right: 0; }
|
||||
label.iPhoneCheckLabelOff span {
|
||||
padding-right: 8px; }
|
||||
|
||||
.iPhoneCheckHandle {
|
||||
display: block;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
background: url('../img/iphone-style-checkboxes/slider_left.png?1284697268') no-repeat;
|
||||
padding-left: 3px; }
|
||||
|
||||
.iPhoneCheckHandleRight {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-right: 3px;
|
||||
background: url('../img/iphone-style-checkboxes/slider_right.png?1284697268') no-repeat right 0; }
|
||||
|
||||
.iPhoneCheckHandleCenter {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: url('../img/iphone-style-checkboxes/slider_center.png?1284697268'); }
|
||||
|
||||
.iOSCheckContainer {
|
||||
position: relative;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
overflow: hidden; }
|
||||
.iOSCheckContainer input {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 30px;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
opacity: 0; }
|
||||
.iOSCheckContainer label {
|
||||
white-space: nowrap;
|
||||
font-size: 17px;
|
||||
line-height: 17px;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 27px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
top: 0;
|
||||
padding-top: 5px;
|
||||
overflow: hidden; }
|
||||
.iOSCheckContainer, .iOSCheckContainer label {
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none; }
|
||||
|
||||
.iOSCheckDisabled {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
|
||||
opacity: 0.5; }
|
||||
|
||||
label.iOSCheckLabelOn {
|
||||
color: white;
|
||||
background: url('../img/ios-style-checkboxes/on.png?1284697268') no-repeat;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
|
||||
left: 0;
|
||||
padding-top: 5px; }
|
||||
label.iOSCheckLabelOn span {
|
||||
padding-left: 8px; }
|
||||
label.iOSCheckLabelOff {
|
||||
color: #8b8b8b;
|
||||
background: url('../img/ios-style-checkboxes/off.png?1284697268') no-repeat right 0;
|
||||
text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
|
||||
text-align: right;
|
||||
right: 0; }
|
||||
label.iOSCheckLabelOff span {
|
||||
padding-right: 8px; }
|
||||
|
||||
.iOSCheckHandle {
|
||||
display: block;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
background: url('../img/ios-style-checkboxes/slider_left.png?1284697268') no-repeat;
|
||||
padding-left: 3px; }
|
||||
|
||||
.iOSCheckHandleRight {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-right: 3px;
|
||||
background: url('../img/ios-style-checkboxes/slider_right.png?1284697268') no-repeat right 0; }
|
||||
|
||||
.iOSCheckHandleCenter {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: url('../img/ios-style-checkboxes/slider_center.png?1284697268'); }
|
||||
105
public_html/css/jquery.noty.css
Normal file
105
public_html/css/jquery.noty.css
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
|
||||
/* CORE STYLES */
|
||||
|
||||
/* noty bar */
|
||||
.noty_bar {
|
||||
position: fixed;
|
||||
display: none;
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
/* noty_message */
|
||||
.noty_bar .noty_message {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* noty close button */
|
||||
.noty_bar .noty_close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* noty modal */
|
||||
.noty_modal {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
z-index: 10000;
|
||||
opacity: 0.6;
|
||||
display: none;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* noty container for noty_layout_topLeft & noty_layout_topRight */
|
||||
ul.noty_cont {
|
||||
position: fixed;
|
||||
z-index: 10000000;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
}
|
||||
ul.noty_cont li {
|
||||
position: relative;
|
||||
float: left;
|
||||
clear: both;
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 10px 0 0 0;
|
||||
width: 300px; /* Fix for: http://bugs.jquery.com/ticket/2278 */
|
||||
}
|
||||
ul.noty_cont.noty_layout_topLeft {left:20px; top:20px;}
|
||||
ul.noty_cont.noty_layout_topRight {right:40px; top:20px;}
|
||||
ul.noty_cont.noty_layout_bottomLeft {left:20px; bottom:20px}
|
||||
ul.noty_cont.noty_layout_bottomRight {right:40px; bottom:20px}
|
||||
ul.noty_cont.noty_layout_topRight li {float:right}
|
||||
|
||||
/* LAYOUTS */
|
||||
|
||||
/* noty_layout_top */
|
||||
.noty_bar.noty_layout_top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
/* noty_layout_bottom */
|
||||
.noty_bar.noty_layout_bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
/* noty_layout_center */
|
||||
.noty_bar.noty_layout_center {
|
||||
top: 40%;
|
||||
}
|
||||
|
||||
/* noty_layout_topLeft & noty_layout_topRight */
|
||||
.noty_bar.noty_layout_topLeft,
|
||||
.noty_bar.noty_layout_topRight,
|
||||
.noty_bar.noty_layout_bottomLeft,
|
||||
.noty_bar.noty_layout_bottomRight {
|
||||
width: 100%;
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.noty_bar.noty_layout_topLeft .noty_message,
|
||||
.noty_bar.noty_layout_topRight .noty_message,
|
||||
.noty_bar.noty_layout_bottomLeft .noty_message,
|
||||
.noty_bar.noty_layout_bottomRight .noty_message {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* noty_layout_topCenter */
|
||||
.noty_bar.noty_layout_topCenter {
|
||||
top: 20px;
|
||||
}
|
||||
23
public_html/css/login_screen.css
Normal file
23
public_html/css/login_screen.css
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
.bg-container{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.bg-container .content{
|
||||
position: absolute;
|
||||
z-index:999;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.bg-container::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index:-99;
|
||||
/* background-image: url("/img/bg1.jpg"); */
|
||||
background-size: cover;
|
||||
opacity: 0.2;
|
||||
}
|
||||
240
public_html/css/noty_theme_default.css
Normal file
240
public_html/css/noty_theme_default.css
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
|
||||
/* CORE STYLES*/
|
||||
|
||||
/* noty bar */
|
||||
.noty_bar.noty_theme_default {
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff;
|
||||
}
|
||||
|
||||
/* if you use noty with customContainer you can access noty with this way
|
||||
* .noty_custom_container noty will add automaticly this class to your customContainer
|
||||
* .noty_theme_default your theme
|
||||
* .noty_layout_inline your layout
|
||||
*/
|
||||
|
||||
/* custom container */
|
||||
.noty_custom_container.noty_theme_default.noty_layout_inline {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* custom growl container */
|
||||
.noty_custom_container.noty_theme_default.noty_layout_inline .noty_cont.noty_layout_inline {
|
||||
position: static;
|
||||
}
|
||||
/* custom noty bar */
|
||||
.noty_custom_container.noty_theme_default.noty_layout_inline .noty_bar {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
position: static;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.noty_custom_container.noty_theme_default.noty_layout_inline .noty_bar .noty_message {
|
||||
font-size: 13px;
|
||||
padding: 4px;
|
||||
}
|
||||
.noty_custom_container.noty_theme_default.noty_layout_inline .noty_bar .noty_message .noty_buttons {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
/* noty_message */
|
||||
.noty_bar.noty_theme_default .noty_message {
|
||||
padding: 8px 14px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
width: auto;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_closable .noty_message {
|
||||
padding: 8px 34px 8px 14px;
|
||||
}
|
||||
|
||||
/* noty_buttons */
|
||||
.noty_bar.noty_theme_default .noty_message .noty_buttons {
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
margin-top: -4px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* noty_button */
|
||||
.noty_bar.noty_theme_default .noty_message .noty_buttons button {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/* noty close button */
|
||||
.noty_bar.noty_theme_default .noty_close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAORJREFUeNq0lU0OgjAQhRm5gUl3rLyBB3BDQjwI4TDcgmu4NqwNJGxdueqWA4zzCJoxtvxoeckLzbz2C5ShEDNHDiXis/gkPooPY/0uvomv4ov48bUSQGUSF+Ka51WPc0kzNGwvLnm9ynHtB5B+hGkoaWDB/6t4AZOFe7ZkTxMAc1dqreU0TbnrunetbVvOsmzIPMoBrFwJYGgCY8wAgjFGDZlHFYCNK9EAXPUYmUcNgL0v1dAFMKjfRSsVx/H0hC0eOfhLmWwbfTcYozbXNsEbO/int8nhEPz4CnbAUuhfwFOAAQAA48KKOuexjwAAAABJRU5ErkJggg==');
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* noty modal */
|
||||
.noty_modal.noty_theme_default {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* LAYOUTS */
|
||||
|
||||
/* noty_layout_top */
|
||||
.noty_bar.noty_theme_default.noty_layout_top {
|
||||
border-bottom: 3px solid #eee;
|
||||
}
|
||||
|
||||
/* noty_layout_bottom */
|
||||
.noty_bar.noty_theme_default.noty_layout_bottom {
|
||||
border-top: 3px solid #eee;
|
||||
}
|
||||
|
||||
.noty_bar.noty_theme_default.noty_layout_center .noty_close {
|
||||
top: 8px;
|
||||
}
|
||||
|
||||
.noty_bar.noty_theme_default.noty_layout_center .noty_message .noty_buttons {
|
||||
margin-top: -2px
|
||||
}
|
||||
|
||||
/* noty_layout_topLeft & noty_layout_topRight */
|
||||
.noty_bar.noty_theme_default.noty_layout_center,
|
||||
.noty_bar.noty_theme_default.noty_layout_topLeft,
|
||||
.noty_bar.noty_theme_default.noty_layout_topRight,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomLeft,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomRight {
|
||||
border: 1px solid #eee;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_center .noty_message,
|
||||
.noty_bar.noty_theme_default.noty_layout_topLeft .noty_message,
|
||||
.noty_bar.noty_theme_default.noty_layout_topRight .noty_message,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomLeft .noty_message,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomRight .noty_message {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
float: none;
|
||||
border-top: 1px solid #ccc;
|
||||
margin-left: 0;
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* noty_layout_topCenter */
|
||||
.noty_bar.noty_theme_default.noty_layout_topCenter {
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_topCenter .noty_message {
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_topCenter .noty_close {
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_topCenter.noty_success {
|
||||
border: 1px solid #50C24E;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_layout_topCenter .noty_message .noty_buttons {
|
||||
margin-left: 15px;
|
||||
margin-top: 0px
|
||||
}
|
||||
|
||||
/* NOTIFICATION TYPES */
|
||||
|
||||
/* noty_notification */
|
||||
.noty_bar.noty_theme_default.noty_notification {
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
color: #555;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_notification.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_notification.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_notification.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_notification.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
/* noty_warning */
|
||||
.noty_bar.noty_theme_default.noty_warning {
|
||||
background-color: #FFEAA8;
|
||||
border-color: #FFC237;
|
||||
color: #826200;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_warning.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_warning.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_warning.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_warning.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: #FFC237;
|
||||
}
|
||||
|
||||
/* noty_alert */
|
||||
.noty_bar.noty_theme_default.noty_alert {
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_alert.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_alert.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_alert.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_alert.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
/* noty_error */
|
||||
.noty_bar.noty_theme_default.noty_error {
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
border-color: darkred;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_error .noty_message {
|
||||
font-weight: bold;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_error.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_error.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_error.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_error.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: darkred;
|
||||
}
|
||||
|
||||
/* noty_success */
|
||||
.noty_bar.noty_theme_default.noty_success {
|
||||
background-color: lightgreen;
|
||||
color: darkgreen;
|
||||
border-color: #50C24E;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_success.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_success.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_success.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_success.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: #50C24E;
|
||||
}
|
||||
|
||||
/* noty_information */
|
||||
.noty_bar.noty_theme_default.noty_information {
|
||||
background-color: #57B7E2;
|
||||
border-color: #0B90C4;
|
||||
color: #fff;
|
||||
}
|
||||
.noty_bar.noty_theme_default.noty_information.noty_layout_topLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_information.noty_layout_topRight .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_information.noty_layout_bottomLeft .noty_message .noty_buttons,
|
||||
.noty_bar.noty_theme_default.noty_information.noty_layout_bottomRight .noty_message .noty_buttons {
|
||||
border-color: #0B90C4;
|
||||
}
|
||||
|
||||
46
public_html/css/typeahead.css
Normal file
46
public_html/css/typeahead.css
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
/* -------------- typeahead start ---------------------- */
|
||||
|
||||
.twitter-typeahead {
|
||||
width: 100% ;
|
||||
}
|
||||
|
||||
.tt-hint {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.tt-dropdown-menu {
|
||||
width: 400px;
|
||||
margin-top: 8px;
|
||||
padding: 8px 0;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
-webkit-border-radius: 1px;
|
||||
-moz-border-radius: 1px;
|
||||
border-radius: 1px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||
box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.tt-suggestion {
|
||||
padding: 1px 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-cursor {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
background-color: #0097cf;
|
||||
}
|
||||
|
||||
.tt-suggestion p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tt-highlight{
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/* -------------- typeahead end ---------------------- */
|
||||
92
public_html/css/uploadify.css
Normal file
92
public_html/css/uploadify.css
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
Uploadify
|
||||
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
|
||||
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
||||
*/
|
||||
|
||||
.uploadify {
|
||||
position: relative;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.uploadify-button {
|
||||
background-color: #505050;
|
||||
background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
|
||||
background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
|
||||
background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
|
||||
background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0, #505050),
|
||||
color-stop(1, #707070)
|
||||
);
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
-webkit-border-radius: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
border: 2px solid #808080;
|
||||
color: #FFF;
|
||||
font: bold 12px Arial, Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
|
||||
width: 100%;
|
||||
}
|
||||
.uploadify:hover .uploadify-button {
|
||||
background-color: #606060;
|
||||
background-image: linear-gradient(top, #606060 0%, #808080 100%);
|
||||
background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
|
||||
background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
|
||||
background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
|
||||
background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0, #606060),
|
||||
color-stop(1, #808080)
|
||||
);
|
||||
background-position: center bottom;
|
||||
}
|
||||
.uploadify-button.disabled {
|
||||
background-color: #D0D0D0;
|
||||
color: #808080;
|
||||
}
|
||||
.uploadify-queue {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.uploadify-queue-item {
|
||||
background-color: #F5F5F5;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
font: 11px Verdana, Geneva, sans-serif;
|
||||
margin-top: 5px;
|
||||
max-width: 350px;
|
||||
padding: 10px;
|
||||
}
|
||||
.uploadify-error {
|
||||
background-color: #FDE5DD !important;
|
||||
}
|
||||
.uploadify-queue-item .cancel a {
|
||||
background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
|
||||
float: right;
|
||||
height: 16px;
|
||||
text-indent: -9999px;
|
||||
width: 16px;
|
||||
}
|
||||
.uploadify-queue-item.completed {
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
.uploadify-progress {
|
||||
background-color: #E5E5E5;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.uploadify-progress-bar {
|
||||
background-color: #0099FF;
|
||||
height: 3px;
|
||||
width: 1px;
|
||||
}
|
||||
474
public_html/js/bootstrap-datepicker.js
vendored
Normal file
474
public_html/js/bootstrap-datepicker.js
vendored
Normal file
|
|
@ -0,0 +1,474 @@
|
|||
/* =========================================================
|
||||
* bootstrap-datepicker.js
|
||||
* http://www.eyecon.ro/bootstrap-datepicker
|
||||
* =========================================================
|
||||
* Copyright 2012 Stefan Petre
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ========================================================= */
|
||||
|
||||
!function( $ ) {
|
||||
|
||||
// Picker object
|
||||
|
||||
var Datepicker = function(element, options){
|
||||
this.element = $(element);
|
||||
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
|
||||
this.picker = $(DPGlobal.template)
|
||||
.appendTo('body')
|
||||
.on({
|
||||
click: $.proxy(this.click, this)//,
|
||||
//mousedown: $.proxy(this.mousedown, this)
|
||||
});
|
||||
this.isInput = this.element.is('input');
|
||||
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
|
||||
|
||||
if (this.isInput) {
|
||||
this.element.on({
|
||||
focus: $.proxy(this.show, this),
|
||||
//blur: $.proxy(this.hide, this),
|
||||
keyup: $.proxy(this.update, this)
|
||||
});
|
||||
} else {
|
||||
if (this.component){
|
||||
this.component.on('click', $.proxy(this.show, this));
|
||||
} else {
|
||||
this.element.on('click', $.proxy(this.show, this));
|
||||
}
|
||||
}
|
||||
|
||||
this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;
|
||||
if (typeof this.minViewMode === 'string') {
|
||||
switch (this.minViewMode) {
|
||||
case 'months':
|
||||
this.minViewMode = 1;
|
||||
break;
|
||||
case 'years':
|
||||
this.minViewMode = 2;
|
||||
break;
|
||||
default:
|
||||
this.minViewMode = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.viewMode = options.viewMode||this.element.data('date-viewmode')||0;
|
||||
if (typeof this.viewMode === 'string') {
|
||||
switch (this.viewMode) {
|
||||
case 'months':
|
||||
this.viewMode = 1;
|
||||
break;
|
||||
case 'years':
|
||||
this.viewMode = 2;
|
||||
break;
|
||||
default:
|
||||
this.viewMode = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.startViewMode = this.viewMode;
|
||||
this.weekStart = options.weekStart||this.element.data('date-weekstart')||0;
|
||||
this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;
|
||||
this.onRender = options.onRender;
|
||||
this.fillDow();
|
||||
this.fillMonths();
|
||||
this.update();
|
||||
this.showMode();
|
||||
};
|
||||
|
||||
Datepicker.prototype = {
|
||||
constructor: Datepicker,
|
||||
|
||||
show: function(e) {
|
||||
this.picker.show();
|
||||
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
|
||||
this.place();
|
||||
$(window).on('resize', $.proxy(this.place, this));
|
||||
if (e ) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
if (!this.isInput) {
|
||||
}
|
||||
var that = this;
|
||||
$(document).on('mousedown', function(ev){
|
||||
if ($(ev.target).closest('.datepicker').length == 0) {
|
||||
that.hide();
|
||||
}
|
||||
});
|
||||
this.element.trigger({
|
||||
type: 'show',
|
||||
date: this.date
|
||||
});
|
||||
},
|
||||
|
||||
hide: function(){
|
||||
this.picker.hide();
|
||||
$(window).off('resize', this.place);
|
||||
this.viewMode = this.startViewMode;
|
||||
this.showMode();
|
||||
if (!this.isInput) {
|
||||
$(document).off('mousedown', this.hide);
|
||||
}
|
||||
//this.set();
|
||||
this.element.trigger({
|
||||
type: 'hide',
|
||||
date: this.date
|
||||
});
|
||||
},
|
||||
|
||||
set: function() {
|
||||
var formated = DPGlobal.formatDate(this.date, this.format);
|
||||
if (!this.isInput) {
|
||||
if (this.component){
|
||||
this.element.find('input').prop('value', formated);
|
||||
}
|
||||
this.element.data('date', formated);
|
||||
} else {
|
||||
this.element.prop('value', formated);
|
||||
}
|
||||
},
|
||||
|
||||
setValue: function(newDate) {
|
||||
if (typeof newDate === 'string') {
|
||||
this.date = DPGlobal.parseDate(newDate, this.format);
|
||||
} else {
|
||||
this.date = new Date(newDate);
|
||||
}
|
||||
this.set();
|
||||
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
|
||||
this.fill();
|
||||
},
|
||||
|
||||
place: function(){
|
||||
var offset = this.component ? this.component.offset() : this.element.offset();
|
||||
this.picker.css({
|
||||
top: offset.top + this.height,
|
||||
left: offset.left
|
||||
});
|
||||
},
|
||||
|
||||
update: function(newDate){
|
||||
this.date = DPGlobal.parseDate(
|
||||
typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')),
|
||||
this.format
|
||||
);
|
||||
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
|
||||
this.fill();
|
||||
},
|
||||
|
||||
fillDow: function(){
|
||||
var dowCnt = this.weekStart;
|
||||
var html = '<tr>';
|
||||
while (dowCnt < this.weekStart + 7) {
|
||||
html += '<th class="dow">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';
|
||||
}
|
||||
html += '</tr>';
|
||||
this.picker.find('.datepicker-days thead').append(html);
|
||||
},
|
||||
|
||||
fillMonths: function(){
|
||||
var html = '';
|
||||
var i = 0
|
||||
while (i < 12) {
|
||||
html += '<span class="month">'+DPGlobal.dates.monthsShort[i++]+'</span>';
|
||||
}
|
||||
this.picker.find('.datepicker-months td').append(html);
|
||||
},
|
||||
|
||||
fill: function() {
|
||||
var d = new Date(this.viewDate),
|
||||
year = d.getFullYear(),
|
||||
month = d.getMonth(),
|
||||
currentDate = this.date.valueOf();
|
||||
this.picker.find('.datepicker-days th:eq(1)')
|
||||
.text(DPGlobal.dates.months[month]+' '+year);
|
||||
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
|
||||
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
|
||||
prevMonth.setDate(day);
|
||||
prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);
|
||||
var nextMonth = new Date(prevMonth);
|
||||
nextMonth.setDate(nextMonth.getDate() + 42);
|
||||
nextMonth = nextMonth.valueOf();
|
||||
var html = [];
|
||||
var clsName,
|
||||
prevY,
|
||||
prevM;
|
||||
while(prevMonth.valueOf() < nextMonth) {
|
||||
if (prevMonth.getDay() === this.weekStart) {
|
||||
html.push('<tr>');
|
||||
}
|
||||
clsName = this.onRender(prevMonth);
|
||||
prevY = prevMonth.getFullYear();
|
||||
prevM = prevMonth.getMonth();
|
||||
if ((prevM < month && prevY === year) || prevY < year) {
|
||||
clsName += ' old';
|
||||
} else if ((prevM > month && prevY === year) || prevY > year) {
|
||||
clsName += ' new';
|
||||
}
|
||||
if (prevMonth.valueOf() === currentDate) {
|
||||
clsName += ' active';
|
||||
}
|
||||
html.push('<td class="day '+clsName+'">'+prevMonth.getDate() + '</td>');
|
||||
if (prevMonth.getDay() === this.weekEnd) {
|
||||
html.push('</tr>');
|
||||
}
|
||||
prevMonth.setDate(prevMonth.getDate()+1);
|
||||
}
|
||||
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
|
||||
var currentYear = this.date.getFullYear();
|
||||
|
||||
var months = this.picker.find('.datepicker-months')
|
||||
.find('th:eq(1)')
|
||||
.text(year)
|
||||
.end()
|
||||
.find('span').removeClass('active');
|
||||
if (currentYear === year) {
|
||||
months.eq(this.date.getMonth()).addClass('active');
|
||||
}
|
||||
|
||||
html = '';
|
||||
year = parseInt(year/10, 10) * 10;
|
||||
var yearCont = this.picker.find('.datepicker-years')
|
||||
.find('th:eq(1)')
|
||||
.text(year + '-' + (year + 9))
|
||||
.end()
|
||||
.find('td');
|
||||
year -= 1;
|
||||
for (var i = -1; i < 11; i++) {
|
||||
html += '<span class="year'+(i === -1 || i === 10 ? ' old' : '')+(currentYear === year ? ' active' : '')+'">'+year+'</span>';
|
||||
year += 1;
|
||||
}
|
||||
yearCont.html(html);
|
||||
},
|
||||
|
||||
click: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var target = $(e.target).closest('span, td, th');
|
||||
if (target.length === 1) {
|
||||
switch(target[0].nodeName.toLowerCase()) {
|
||||
case 'th':
|
||||
switch(target[0].className) {
|
||||
case 'switch':
|
||||
this.showMode(1);
|
||||
break;
|
||||
case 'prev':
|
||||
case 'next':
|
||||
this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(
|
||||
this.viewDate,
|
||||
this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) +
|
||||
DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1)
|
||||
);
|
||||
this.fill();
|
||||
this.set();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'span':
|
||||
if (target.is('.month')) {
|
||||
var month = target.parent().find('span').index(target);
|
||||
this.viewDate.setMonth(month);
|
||||
} else {
|
||||
var year = parseInt(target.text(), 10)||0;
|
||||
this.viewDate.setFullYear(year);
|
||||
}
|
||||
if (this.viewMode !== 0) {
|
||||
this.date = new Date(this.viewDate);
|
||||
this.element.trigger({
|
||||
type: 'changeDate',
|
||||
date: this.date,
|
||||
viewMode: DPGlobal.modes[this.viewMode].clsName
|
||||
});
|
||||
}
|
||||
this.showMode(-1);
|
||||
this.fill();
|
||||
this.set();
|
||||
break;
|
||||
case 'td':
|
||||
if (target.is('.day') && !target.is('.disabled')){
|
||||
var day = parseInt(target.text(), 10)||1;
|
||||
var month = this.viewDate.getMonth();
|
||||
if (target.is('.old')) {
|
||||
month -= 1;
|
||||
} else if (target.is('.new')) {
|
||||
month += 1;
|
||||
}
|
||||
var year = this.viewDate.getFullYear();
|
||||
this.date = new Date(year, month, day,0,0,0,0);
|
||||
this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);
|
||||
this.fill();
|
||||
this.set();
|
||||
this.element.trigger({
|
||||
type: 'changeDate',
|
||||
date: this.date,
|
||||
viewMode: DPGlobal.modes[this.viewMode].clsName
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mousedown: function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
},
|
||||
|
||||
showMode: function(dir) {
|
||||
if (dir) {
|
||||
this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));
|
||||
}
|
||||
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.datepicker = function ( option, val ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('datepicker'),
|
||||
options = typeof option === 'object' && option;
|
||||
if (!data) {
|
||||
$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
|
||||
}
|
||||
if (typeof option === 'string') data[option](val);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.datepicker.defaults = {
|
||||
onRender: function(date) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
$.fn.datepicker.Constructor = Datepicker;
|
||||
|
||||
var DPGlobal = {
|
||||
modes: [
|
||||
{
|
||||
clsName: 'days',
|
||||
navFnc: 'Month',
|
||||
navStep: 1
|
||||
},
|
||||
{
|
||||
clsName: 'months',
|
||||
navFnc: 'FullYear',
|
||||
navStep: 1
|
||||
},
|
||||
{
|
||||
clsName: 'years',
|
||||
navFnc: 'FullYear',
|
||||
navStep: 10
|
||||
}],
|
||||
dates:{
|
||||
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
|
||||
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
||||
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
|
||||
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
||||
},
|
||||
isLeapYear: function (year) {
|
||||
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
|
||||
},
|
||||
getDaysInMonth: function (year, month) {
|
||||
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
|
||||
},
|
||||
parseFormat: function(format){
|
||||
var separator = format.match(/[.\/\-\s].*?/),
|
||||
parts = format.split(/\W+/);
|
||||
if (!separator || !parts || parts.length === 0){
|
||||
throw new Error("Invalid date format.");
|
||||
}
|
||||
return {separator: separator, parts: parts};
|
||||
},
|
||||
parseDate: function(date, format) {
|
||||
var parts = date.split(format.separator),
|
||||
date = new Date(),
|
||||
val;
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
date.setSeconds(0);
|
||||
date.setMilliseconds(0);
|
||||
if (parts.length === format.parts.length) {
|
||||
var year = date.getFullYear(), day = date.getDate(), month = date.getMonth();
|
||||
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
|
||||
val = parseInt(parts[i], 10)||1;
|
||||
switch(format.parts[i]) {
|
||||
case 'dd':
|
||||
case 'd':
|
||||
day = val;
|
||||
date.setDate(val);
|
||||
break;
|
||||
case 'mm':
|
||||
case 'm':
|
||||
month = val - 1;
|
||||
date.setMonth(val - 1);
|
||||
break;
|
||||
case 'yy':
|
||||
year = 2000 + val;
|
||||
date.setFullYear(2000 + val);
|
||||
break;
|
||||
case 'yyyy':
|
||||
year = val;
|
||||
date.setFullYear(val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
date = new Date(year, month, day, 0 ,0 ,0);
|
||||
}
|
||||
return date;
|
||||
},
|
||||
formatDate: function(date, format){
|
||||
var val = {
|
||||
d: date.getDate(),
|
||||
m: date.getMonth() + 1,
|
||||
yy: date.getFullYear().toString().substring(2),
|
||||
yyyy: date.getFullYear()
|
||||
};
|
||||
val.dd = (val.d < 10 ? '0' : '') + val.d;
|
||||
val.mm = (val.m < 10 ? '0' : '') + val.m;
|
||||
var date = [];
|
||||
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
|
||||
date.push(val[format.parts[i]]);
|
||||
}
|
||||
return date.join(format.separator);
|
||||
},
|
||||
headTemplate: '<thead>'+
|
||||
'<tr>'+
|
||||
'<th class="prev">‹</th>'+
|
||||
'<th colspan="5" class="switch"></th>'+
|
||||
'<th class="next">›</th>'+
|
||||
'</tr>'+
|
||||
'</thead>',
|
||||
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
|
||||
};
|
||||
DPGlobal.template = '<div class="datepicker dropdown-menu">'+
|
||||
'<div class="datepicker-days">'+
|
||||
'<table class=" table-condensed">'+
|
||||
DPGlobal.headTemplate+
|
||||
'<tbody></tbody>'+
|
||||
'</table>'+
|
||||
'</div>'+
|
||||
'<div class="datepicker-months">'+
|
||||
'<table class="table-condensed">'+
|
||||
DPGlobal.headTemplate+
|
||||
DPGlobal.contTemplate+
|
||||
'</table>'+
|
||||
'</div>'+
|
||||
'<div class="datepicker-years">'+
|
||||
'<table class="table-condensed">'+
|
||||
DPGlobal.headTemplate+
|
||||
DPGlobal.contTemplate+
|
||||
'</table>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
||||
}( window.jQuery );
|
||||
26
public_html/js/bootstrap-datetimepicker.min.js
vendored
Normal file
26
public_html/js/bootstrap-datetimepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user