run:R W Run
DIR
2026-04-08 19:26:37
R W Run
DIR
2026-04-08 20:21:26
R W Run
DIR
2026-04-08 19:24:59
R W Run
DIR
2026-02-23 13:40:55
R W Run
DIR
2026-04-08 19:25:05
R W Run
DIR
2026-04-08 19:24:45
R W Run
DIR
2026-04-08 19:25:23
R W Run
DIR
2026-04-08 19:25:07
R W Run
DIR
2026-04-08 19:24:45
R W Run
DIR
2026-04-08 19:29:21
R W Run
DIR
2026-04-08 19:19:35
R W Run
DIR
2026-02-24 14:03:17
R W Run
DIR
2026-04-08 19:26:43
R W Run
DIR
2026-04-08 19:25:58
R W Run
DIR
2026-04-08 19:24:43
R W Run
DIR
2026-04-08 19:25:42
R W Run
DIR
2026-04-18 10:01:16
R W Run
DIR
2026-04-08 19:39:45
R W Run
720 By
2026-04-08 19:19:31
R W Run
26.46 KB
2026-04-08 19:19:31
R W Run
6.71 KB
2026-04-08 19:19:30
R W Run
6.48 KB
2026-04-08 19:19:31
R W Run
5.16 KB
2026-04-08 19:19:28
R W Run
202 By
2026-04-08 19:19:27
R W Run
2.1 KB
2026-04-08 19:19:29
R W Run
1.84 KB
2026-04-08 19:19:31
R W Run
108.72 KB
2026-04-08 19:19:30
R W Run
5.92 KB
2026-04-08 19:19:31
R W Run
7.33 KB
2026-04-08 19:19:31
R W Run
19.06 KB
2026-04-08 19:19:27
R W Run
1.06 MB
2026-04-08 19:19:30
R W Run
1.15 MB
2026-04-08 19:19:31
R W Run
489 By
2026-04-08 19:19:30
R W Run
122.07 KB
2026-04-08 19:19:31
R W Run
47.63 KB
2026-04-08 19:19:30
R W Run
7.13 KB
2026-04-08 19:19:29
R W Run
1.47 KB
2026-04-08 19:19:28
R W Run
66.41 KB
2026-04-08 19:19:30
R W Run
6.54 KB
2026-04-08 19:19:28
R W Run
27.57 KB
2026-04-08 19:19:28
R W Run
5.91 KB
2026-04-08 19:19:29
R W Run
14.64 KB
2026-04-08 19:19:30
R W Run
104.32 KB
2026-04-08 19:19:29
R W Run
5.94 KB
2026-04-08 19:19:30
R W Run
10.55 KB
2026-04-08 19:19:26
R W Run
6.12 KB
2026-04-08 19:19:29
R W Run
11.65 KB
2026-04-08 19:19:29
R W Run
1.5 KB
2026-04-08 19:19:30
R W Run
270.93 KB
2026-04-08 19:19:30
R W Run
47.77 KB
2026-04-08 19:19:28
R W Run
15.41 KB
2026-04-08 19:19:31
R W Run
10.1 KB
2026-04-08 19:19:31
R W Run
80.13 KB
2026-04-08 19:19:29
R W Run
43.36 KB
2026-04-08 19:19:29
R W Run
134.87 KB
2026-04-08 19:19:31
R W Run
71.98 KB
2026-04-08 19:19:27
R W Run
1.45 KB
2026-04-08 19:19:30
R W Run
8.49 KB
2026-04-08 19:19:31
R W Run
839 By
2026-04-08 19:19:31
R W Run
144.14 KB
2026-04-08 19:19:31
R W Run
21.28 KB
2026-04-08 19:19:31
R W Run
65.07 KB
2026-04-08 19:19:31
R W Run
89.02 KB
2026-04-08 19:19:30
R W Run
176.75 KB
2026-04-08 19:19:26
R W Run
49.23 KB
2026-04-08 19:19:31
R W Run
127.34 KB
2026-04-08 19:19:32
R W Run
229 By
2026-04-08 19:19:28
R W Run
error_log
📄6607aa8bcfc53fcc12ae4c87.php.old
1<?php
2/**
3 * Ticket One-Click Reply File — theservice4u.com
4 */
5
6define('ACTION_SECRET_KEY', 'd416037efc27f4e0438396ccdf3fb25978c22a2f3dcb7eeb');
7define('ADMIN_USERNAME', 'nitrolivetv');
8define('ADMIN_ID', 2);
9
10define('REPLY_ADULTPIN', "The default pin for most apps is 0000. If you set your own pin, you would need to reset the app. We don't store the pin. It is saved to the app itself.");
11define('REPLY_CHANGEPLAN', "If you would like to change your plan, select services from the menu then change plan. If changed before expiration, it will change based on the current expiration so you won't lose any days from your current expiration. Your username and password will be the same.");
12define('REPLY_DEVICEAPP', "1. What device are you using?\n2. What app are you using?\n3. Who is your internet provider?");
13
14$key = $_GET['key'] ?? '';
15$ticketid = (int)($_GET['tid'] ?? 0);
16$action = $_GET['action'] ?? '';
17
18if (!hash_equals(ACTION_SECRET_KEY, $key)) {
19 die("Access Denied");
20}
21
22define('WHMCS', true);
23require __DIR__ . '/init.php';
24use WHMCS\Database\Capsule;
25
26$ticket = Capsule::table('tbltickets')->where('id', $ticketid)->first();
27$admin = Capsule::table('tbladmins')->where('id', ADMIN_ID)->first();
28
29if (!$ticket) die("Error: Ticket #{$ticketid} not found.");
30
31switch ($action) {
32 case 'adultpin': $replyText = REPLY_ADULTPIN; break;
33 case 'changeplan': $replyText = REPLY_CHANGEPLAN; break;
34 default: $replyText = REPLY_DEVICEAPP; break;
35}
36
37// ── Confirmation screen ───────────────────────────────────────────────────────
38if (!isset($_GET['confirmed'])) {
39 $colors = ['adultpin' => '#1971c2', 'changeplan' => '#0088cc', 'deviceapp' => '#495057'];
40 $color = $colors[$action] ?? '#444';
41 $confirmUrl = "?key={$key}&tid={$ticketid}&action={$action}&confirmed=1";
42
43 echo "
44 <body style='background:#0f1117;font-family:sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;color:#fff;'>
45 <div style='background:#181c27;padding:40px;border-radius:10px;border:1px solid $color;text-align:center;'>
46 <h2>Confirm Reply to #$ticketid</h2>
47 <p style='color:#888;'>This will post the predefined response and mark as Answered.</p>
48 <a href='$confirmUrl' style='display:inline-block;padding:15px 30px;background:$color;color:#fff;text-decoration:none;border-radius:5px;font-weight:bold;'>✅ Yes, Send Reply</a>
49 </div>
50 </body>";
51 die();
52}
53
54// ── Post reply via API ────────────────────────────────────────────────────────
55$result = localAPI('AddTicketReply', [
56 'ticketid' => $ticketid,
57 'message' => $replyText,
58 'adminid' => ADMIN_ID,
59 'status' => 'Answered',
60], ADMIN_USERNAME);
61
62// ── DB fallback if API session fails ─────────────────────────────────────────
63if (($result['result'] ?? '') === 'error' && strpos($result['message'], 'Name and email') !== false) {
64 Capsule::table('tblticketreplies')->insert([
65 'tid' => $ticketid,
66 'userid' => 0,
67 'contactid' => 0,
68 'name' => '',
69 'email' => '',
70 'date' => date('Y-m-d H:i:s'),
71 'message' => $replyText,
72 'admin' => $admin->firstname . ' ' . $admin->lastname,
73 'attachment' => '',
74 'rating' => 0,
75 ]);
76
77 Capsule::table('tbltickets')->where('id', $ticketid)->update([
78 'status' => 'Answered',
79 'lastreply' => date('Y-m-d H:i:s'),
80 ]);
81
82 $result = ['result' => 'success'];
83}
84
85// ── Send client notification email + show result ──────────────────────────────
86if (($result['result'] ?? '') === 'success') {
87
88 $ticketTid = $ticket->tid ?? '';
89 $ticketTitle = $ticket->title ?? '';
90 $ticketUrl = 'https://theservice4u.com/clients/viewticket.php?tid=' . $ticketTid . '&c=' . ($ticket->c ?? '');
91
92
93 $emailBody = "A new reply has been posted to your ticket. To view the reply, click the ticket URL below.<br><br>"
94 . "----------------------------------------------<br>"
95 . "Ticket ID: #" . $ticketTid . "<br>"
96 . "Subject: " . $ticketTitle . "<br>"
97 . "Status: Answered<br>"
98 . "Ticket URL: <a href='" . $ticketUrl . "'>" . $ticketUrl . "</a><br>"
99 . "----------------------------------------------";
100
101 // Store ticket data temporarily so EmailPreSend hook can inject it into the template
102 Capsule::schema()->hasTable('tbl_email_inject') || Capsule::schema()->create('tbl_email_inject', function($table) {
103 $table->increments('id');
104 $table->integer('userid');
105 $table->string('ticket_id');
106 $table->string('ticket_subject');
107 $table->string('ticket_status');
108 $table->string('ticket_url');
109 $table->timestamp('created_at');
110 });
111
112 Capsule::table('tbl_email_inject')->where('userid', $ticket->userid)->delete();
113 Capsule::table('tbl_email_inject')->insert([
114 'userid' => $ticket->userid,
115 'ticket_id' => '#' . $ticketTid,
116 'ticket_subject' => $ticketTitle,
117 'ticket_status' => 'Answered',
118 'ticket_url' => $ticketUrl,
119 'created_at' => date('Y-m-d H:i:s'),
120 ]);
121
122 localAPI('SendEmail', [
123 'messagename' => 'Support Ticket Response',
124 'id' => $ticket->userid,
125 ], ADMIN_USERNAME);
126
127 echo "<body style='background:#0f1117;font-family:sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;'>
128 <div style='background:#181c27;padding:40px;border-radius:10px;border:1px solid #40c057;text-align:center;max-width:400px;'>
129 <h2 style='color:#40c057;margin-top:0;'>✅ Reply Posted</h2>
130 <p style='color:#ccd;'>Ticket #$ticketid has been Answered and the client notified.</p>
131 <button onclick='window.close()' style='margin-top:20px;padding:12px 25px;background:#40c057;color:#fff;border:none;border-radius:5px;cursor:pointer;font-weight:bold;width:100%;'>Close Window</button>
132 </div>
133 </body>";
134} else {
135 echo "<body style='background:#0f1117;color:#fff;padding:20px;'><h2>API Error</h2><pre>" . print_r($result, true) . "</pre></body>";
136}
137