run:R W Run
DIR
2025-05-14 17:31:16
R W Run
DIR
2026-02-22 14:28:22
R W Run
4.34 KB
2026-04-08 19:25:21
R W Run
562 By
2026-04-08 19:25:22
R W Run
1.43 KB
2026-04-08 19:25:21
R W Run
2.6 KB
2026-04-08 19:25:22
R W Run
446 By
2026-04-08 19:25:21
R W Run
1.5 KB
2026-04-08 19:25:22
R W Run
1.03 KB
2026-04-08 19:25:21
R W Run
5.83 KB
2026-04-08 19:25:22
R W Run
4.83 KB
2026-04-08 19:25:21
R W Run
6.43 KB
2026-04-08 19:25:21
R W Run
2.58 KB
2026-04-08 19:25:22
R W Run
564 By
2026-04-08 19:25:21
R W Run
316 By
2026-04-08 19:25:21
R W Run
27.32 KB
2026-04-08 19:25:21
R W Run
27.81 KB
2026-04-08 19:25:20
R W Run
2.06 KB
2026-04-08 19:25:19
R W Run
484 By
2026-04-08 19:25:22
R W Run
1.75 KB
2026-04-08 19:25:22
R W Run
4.41 KB
2026-04-08 19:25:22
R W Run
2.55 KB
2026-04-08 19:25:22
R W Run
3.33 KB
2026-04-08 19:25:22
R W Run
762 By
2026-04-08 19:25:20
R W Run
5.03 KB
2026-04-08 19:25:20
R W Run
75 By
2026-04-08 19:25:21
R W Run
2.1 KB
2026-04-08 19:25:23
R W Run
1.17 KB
2026-04-08 19:25:22
R W Run
382 By
2026-04-08 19:25:22
R W Run
1.97 KB
2026-04-08 19:25:22
R W Run
1.4 KB
2026-04-08 19:25:20
R W Run
2.11 KB
2026-04-08 19:25:20
R W Run
1.24 KB
2026-04-08 19:25:23
R W Run
2.93 KB
2026-04-08 19:25:21
R W Run
error_log
📄homechangeurl.php
1<?php
2use WHMCS\View\Menu\Item as MenuItem;
3use WHMCS\Database\Capsule;
4add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
5{
6
7
8 $fvalue=Capsule::table('tblconfiguration')->where('setting','Domain')->get();
9 $fvalue[0]->value;
10 $redirect = $fvalue[0]->value;
11 if (!is_null($primaryNavbar->getChild('Home'))) {
12 $primaryNavbar->getChild('Home')
13 ->setURI($redirect);
14 }
15
16 if (!is_null($primaryNavbar->getChild('Network Status'))) {
17 $primaryNavbar->removeChild('Network Status');
18 }
19
20
21 if (!is_null($primaryNavbar->getChild('Contact Us'))) {
22 $primaryNavbar->removeChild('Contact Us');
23 }
24
25
26 if (!is_null($primaryNavbar->getChild('Knowledgebase'))) {
27 $primaryNavbar->removeChild('Knowledgebase');
28 }
29
30 if (!is_null($primaryNavbar->getChild('Announcements'))) {
31 $primaryNavbar->removeChild('Announcements');
32 }
33
34 $primaryNavbar->addChild('Installation Instructions')
35 ->setUri('https://theservice4u.com/install')
36 ->setOrder(20);
37/* $primaryNavbar->addChild('Knowledgebase')
38 ->setUri('https://theservice4u.com/clients/index.php?rp=/knowledgebase')
39 ->setOrder(45);
40 $primaryNavbar->addChild('Daily Sporting Events')
41 ->setUri('https://tvtelegramupdates.com/')
42 ->setOrder(46);
43 $primaryNavbar->addChild('Server Address/URL')
44 ->setUri('https://theservice4u.com/install')
45 ->setOrder(47);*/
46
47/*if (!is_null($primaryNavbar->getChild('Open Ticket'))) {
48 $primaryNavbar->getChild('Open Ticket')
49 ->setUri("https://s/clients/index.php?rp=/knowledgebase/1/FAQs")
50 ->setOrder(50);
51 }*/
52
53
54
55
56
57
58 if(isset($_SESSION["uid"]) && !empty($_SESSION["uid"]))
59 {
60 if (!is_null($primaryNavbar->getChild('Services')->getChild('Order New Services'))) {
61 $primaryNavbar->getChild('Services')->getChild('Order New Services')->setLabel('Change Plan');
62 }
63
64 $client_id = $_SESSION["uid"];
65 $services_info = Capsule::table('tblhosting')->where('userid', $client_id)->where('domainstatus', "Active")->orderBy('id', 'desc')->limit('1')->get();
66 if($services_info)
67 {
68 $service_id = $services_info[0]->id;
69 //echo $service_id;
70
71 }
72 $url = "https://theservice4u.com/clients/clientarea.php?action=productdetails&id=".$service_id;
73 $url2 = "https://theservice4u.com/clients/clientarea.php?action=cancel&id=".$service_id;
74 $primaryNavbar->addChild('Login Details')
75 ->setUri($url)
76 ->setOrder(40);
77 $primaryNavbar->addChild('Cancel Service')
78 ->setUri($url2)
79 ->setOrder(40);
80
81 }
82 $primaryNavbar->addChild('Terms and Conditions')
83 ->setUri('https://theservice4u.com/terms-and-conditions.pdf')
84 ->setOrder(40);
85
86
87
88});
89
90add_hook('ClientEdit', 1, function($vars) {
91
92 $datavalue = Capsule::table('tblcustomfieldsvalues')->where('fieldid','=','32')->where('relid','=',$vars['userid'])->get();
93 if($datavalue)
94 {
95 if($datavalue[0]->value == "No")
96 {
97 $value = true;
98 }
99 else{
100 $value = false;
101 }
102 }
103
104Capsule::table('tblclients')
105 ->where('id', $vars['userid'])
106 ->update(['disableautocc' => $value]);
107
108});
109
110function hook_disable_auto_cc($vars) {
111
112 $autoccvalue = $vars['customfields'][32];
113 if($autoccvalue == "No")
114 {
115 $value = true;
116 }
117 else{
118 $value = false;
119 }
120
121 Capsule::table('tblclients')
122 ->where('id', $vars['userid'])
123 ->update(['disableautocc' => $value]);
124
125}
126
127add_hook("ClientAdd",1,"hook_disable_auto_cc");
128
129
130add_hook('ShoppingCartValidateProductUpdate', 1, function($vars) {
131 // Replace "Your Field Name" with the actual name of your custom field
132 $customFieldName = "Recurring payment";
133 $invalidOption = "Select an Option";
134
135 foreach ($vars['customfield'] as $fieldId => $value) {
136 // Fetch the custom field name
137 $field = Capsule::table('tblcustomfields')->where('id', $fieldId)->first();
138 if ($field && $field->fieldname == $customFieldName && $value == $invalidOption) {
139 return ["Please select a valid option for $customFieldName."];
140 }
141 }
142});
143
144add_hook('ClientDetailsValidation', 1, function($vars) {
145 // Replace "Your Field Name" with the actual name of your custom field
146 $customFieldName = "Recurring payment";
147 $invalidOption = "Select an Option";
148
149 foreach ($vars['customfield'] as $fieldId => $value) {
150 $field = Capsule::table('tblcustomfields')->where('id', $fieldId)->first();
151 // Check if the field matches your custom field and has an invalid value
152 if ($field->fieldname == $customFieldName && $value == $invalidOption) {
153 return ["Please select a valid option for $customFieldName."];
154 }
155 }
156});
157
158
159