diff --git a/system/plugin/ui/download.php b/system/plugin/ui/download.php new file mode 100644 index 0000000..106e391 --- /dev/null +++ b/system/plugin/ui/download.php @@ -0,0 +1,559 @@ +connect_error) { + die("Connection failed: " . $mysqli->connect_error); +} + +// Function to get a setting value +function getSettingValue($mysqli, $setting) { + $query = $mysqli->prepare("SELECT value FROM tbl_appconfig WHERE setting = ?"); + $query->bind_param("s", $setting); + $query->execute(); + $result = $query->get_result(); + if ($row = $result->fetch_assoc()) { + return $row['value']; + } + return ''; +} + +// Fetch hotspot title and description from tbl_appconfig +$hotspotTitle = getSettingValue($mysqli, 'hotspot_title'); +$description = getSettingValue($mysqli, 'description'); +$phone = getSettingValue($mysqli, 'phone'); +$company = getSettingValue($mysqli, 'CompanyName'); + +// Fetch settings +$settings = []; +$settings['frequently_asked_questions_headline1'] = getSettingValue($mysqli, 'frequently_asked_questions_headline1'); +$settings['frequently_asked_questions_answer1'] = getSettingValue($mysqli, 'frequently_asked_questions_answer1'); +$settings['frequently_asked_questions_headline2'] = getSettingValue($mysqli, 'frequently_asked_questions_headline2'); +$settings['frequently_asked_questions_answer2'] = getSettingValue($mysqli, 'frequently_asked_questions_answer2'); +$settings['frequently_asked_questions_headline3'] = getSettingValue($mysqli, 'frequently_asked_questions_headline3'); +$settings['frequently_asked_questions_answer3'] = getSettingValue($mysqli, 'frequently_asked_questions_answer3'); + +// Fetch router name and router ID from tbl_appconfig +$routerName = getSettingValue($mysqli, 'router_name'); +$routerId = getSettingValue($mysqli, 'router_id'); + +// Fetch available plans +$planQuery = "SELECT id, name_plan, price, validity, validity_unit FROM tbl_plans WHERE routers = ? AND type = 'Hotspot'"; +$planStmt = $mysqli->prepare($planQuery); +$planStmt->bind_param("s", $routerName); +$planStmt->execute(); +$planResult = $planStmt->get_result(); + +// Initialize HTML content variable +$htmlContent = "\n"; +$htmlContent .= "\n"; +$htmlContent .= "\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " " . htmlspecialchars($hotspotTitle) . " Hotspot Template - Index\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= "\n"; + + +$htmlContent .= "\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= " \"Your\n"; +$htmlContent .= "

" . htmlspecialchars($hotspotTitle) . " Hotspot Login Page

\n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= " Already Have an Account? Login\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + + + +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "

" . htmlspecialchars($description) . "

\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "

\n"; +$htmlContent .= " CHECK OUR PRICING\n"; +$htmlContent .= "

\n"; +$htmlContent .= "

\n"; +$htmlContent .= " Choose the plan that fits your needs.\n"; +$htmlContent .= "

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + + + +$htmlContent .= "
\n"; + +while ($plan = $planResult->fetch_assoc()) { + $htmlContent .= "
\n"; + $htmlContent .= "
\n"; + $htmlContent .= " \n"; + $htmlContent .= htmlspecialchars($plan['name_plan']) . "\n"; + $htmlContent .= " \n"; + $htmlContent .= "
\n"; + $htmlContent .= " ksh\n"; + $htmlContent .= htmlspecialchars($plan['price']) . "\n"; + $htmlContent .= "
\n"; + $htmlContent .= "

\n"; + $htmlContent .= htmlspecialchars($plan['validity']) . " " . htmlspecialchars($plan['validity_unit']) . " Unlimited\n"; + $htmlContent .= "

\n"; + $htmlContent .= "
\n"; + $htmlContent .= "
\n"; + $htmlContent .= " \n"; + $htmlContent .= " Click Here To Connect\n"; + $htmlContent .= " \n"; + $htmlContent .= "
\n"; + $htmlContent .= "
\n"; +} + +$htmlContent .= "
\n"; + + + + + + +$htmlContent .= "\n"; +$htmlContent .= "
\n"; +$htmlContent .= "

\n"; +$htmlContent .= " What Our Users Say\n"; +$htmlContent .= "

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +// Testimonial 1 +$htmlContent .= "
\n"; +$htmlContent .= " \"Testimonial\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
Otieno Peter
\n"; +$htmlContent .= "

\"Switching to this service has been a game changer for me. The connection is reliable and fast, making my online work seamless and efficient.\"

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +// Testimonial 2 +$htmlContent .= "
\n"; +$htmlContent .= " \"Testimonial\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
Kiveu
\n"; +$htmlContent .= "

\"I've experienced unparalleled support and service. The team goes above and beyond to ensure customer satisfaction. Highly recommend!\"

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +// Testimonial 3 +$htmlContent .= "
\n"; +$htmlContent .= " \"Testimonial\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
Anonymous User
\n"; +$htmlContent .= "

\"Their commitment to quality and speed is evident. My internet experience has been fantastic ever since I made the switch.\"

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + +// Glider.js script for the Testimonials Section +$htmlContent .= "\n"; + + + + +$htmlContent .= "\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "

\n"; +$htmlContent .= " FREQUENTLY ASKED QUESTIONS Will Be Here\n"; +$htmlContent .= "

\n"; +$htmlContent .= "

\n"; +$htmlContent .= " Everything you need to know before getting started.\n"; +$htmlContent .= "

\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + +// FAQ 1 +$htmlContent .= "
\n"; +$htmlContent .= "
" . htmlspecialchars($settings['frequently_asked_questions_headline1']) . "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; + +// FAQ 2 +$htmlContent .= "
\n"; +$htmlContent .= "
" . htmlspecialchars($settings['frequently_asked_questions_headline2']) . "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; + +// FAQ 3 +$htmlContent .= "
\n"; +$htmlContent .= "
" . htmlspecialchars($settings['frequently_asked_questions_headline3']) . "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; + +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + + +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "

Already Have an Active Package?

\n"; +$htmlContent .= "
\n"; + +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= " \n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; +$htmlContent .= "
\n"; + +$htmlContent .= "\n"; + + + + + +$htmlContent .= "\n"; + + + + + + + + + +$htmlContent .= "\n"; +$htmlContent .= "\n"; + +$htmlContent .= "\n"; +$htmlContent .= "\n"; + + +$htmlContent .= "\n"; + +$htmlContent .= "\n"; + + + +$htmlContent .= "\n"; + +$htmlContent .= "\n"; + + +$htmlContent .= "\n"; + + + + + + + +$planStmt->close(); +$mysqli->close(); +// Check if the download parameter is set +if (isset($_GET['download']) && $_GET['download'] == '1') { + // Prepare the HTML content for download + // ... build your HTML content ... + + // Specify the filename for the download + $filename = "login.html"; + + // Send headers to force download + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename='.basename($filename)); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + header('Content-Length: ' . strlen($htmlContent)); + + // Output the content + echo $htmlContent; + + // Prevent any further output + exit; +} + +// Regular page content goes here +// ... HTML and PHP code to display the page ... + + diff --git a/system/plugin/ui/hotspot_settings.tpl b/system/plugin/ui/hotspot_settings.tpl new file mode 100644 index 0000000..6f65723 --- /dev/null +++ b/system/plugin/ui/hotspot_settings.tpl @@ -0,0 +1,117 @@ +{include file="sections/header.tpl"} +
+

+
+ + + +
+

+ +
+ +
+
+
+ +{include file="sections/footer.tpl"} diff --git a/system/plugin/ui/index.html b/system/plugin/ui/index.html new file mode 100644 index 0000000..06d7405 Binary files /dev/null and b/system/plugin/ui/index.html differ diff --git a/system/plugin/ui/log.tpl b/system/plugin/ui/log.tpl new file mode 100644 index 0000000..e3a618c --- /dev/null +++ b/system/plugin/ui/log.tpl @@ -0,0 +1,154 @@ + + + + + + Log UI + + +{include file="sections/header.tpl"} + +
+
+ +
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + {assign var=current_page value=$smarty.get.page|default:1} + {assign var=per_page value=$smarty.get.per_page|default:10} + {assign var=start_index value=($current_page - 1) * $per_page} + + {foreach from=$logs|array_reverse item=log name=logLoop} + {if $smarty.foreach.logLoop.index >= $start_index && $smarty.foreach.logLoop.index < ($start_index + $per_page)} + + + + + + {/if} + {/foreach} + +
TimeTopicMessage
{$log.time}{$log.topics} + {if $log.message|lower|strpos:'failed' !== false} + {$log.message} + {elseif $log.message|lower|strpos:'trying' !== false} + {$log.message} + {elseif $log.message|lower|strpos:'logged in' !== false} + {$log.message} + {elseif $log.message|lower|strpos:'login failed' !== false} + {$log.message} + {else} + {$log.message} + {/if} +
+ + {assign var=total_logs value=$logs|@count} + {assign var=last_page value=ceil($total_logs / $per_page)} + + +
+ + + + {include file="sections/footer.tpl"} + + diff --git a/system/plugin/ui/port_tester.tpl b/system/plugin/ui/port_tester.tpl new file mode 100644 index 0000000..f12b83a --- /dev/null +++ b/system/plugin/ui/port_tester.tpl @@ -0,0 +1,34 @@ +{include file="sections/header.tpl"} + +
+
+
+
+
Testing port external
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ {if $result != ''} +
+
Result
+
+ {Lang::nl2br($result)} +
+
+ {/if} +
+
+
+ +{include file="sections/footer.tpl"}