OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
facebook
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
accessTest copy.php
657 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
accessTest.php
657 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
back_fb_post_handler.php
9.41 KB
10/10/2024 10:19:25 AM
rw-r--r--
📁
backup
-
10/10/2024 10:19:31 AM
rwxr-xr-x
📄
composer-setup.php
57.07 KB
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.json
64 bytes
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.lock
2.81 KB
10/10/2024 10:19:25 AM
rw-r--r--
📄
composer.phar
2.86 MB
10/10/2024 10:19:29 AM
rw-r--r--
📄
configuration.txt
79 bytes
10/10/2024 10:19:26 AM
rw-r--r--
📁
cream
-
10/10/2024 10:19:32 AM
rwxr-xr-x
📄
credential copy.json
556 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
credential.json
556 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
db_connect.php
341 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
facebook_setup.php
10.45 KB
10/14/2024 07:50:50 AM
rw-r--r--
📄
facebook_setup_handler.php
1.23 KB
10/16/2024 07:25:53 AM
rw-r--r--
📄
fb_post_handler copy.php
6.55 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
fb_post_handler.php
12.35 KB
10/10/2024 11:44:18 AM
rw-r--r--
📄
fb_share.php
8.94 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
function.php
18.91 KB
10/16/2024 07:22:46 AM
rw-r--r--
📄
index.php
476 bytes
10/10/2024 10:19:29 AM
rw-r--r--
📄
navbar.php
1.63 KB
10/10/2024 10:19:29 AM
rw-r--r--
📁
new_folder
-
10/10/2024 10:19:37 AM
rwxr-xr-x
📄
new_index.php
10.18 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
new_table.php
13.36 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
postTest.php
3.43 KB
10/10/2024 10:19:29 AM
rw-r--r--
📄
sample_data.txt
7.07 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
share_facebook.php
2.01 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
sidebar.php
3.49 KB
10/10/2024 12:07:41 PM
rw-r--r--
📄
test.php
1.72 KB
10/10/2024 10:19:30 AM
rw-r--r--
📄
update_fb_pages.php
347 bytes
10/10/2024 10:19:30 AM
rw-r--r--
📁
vendor
-
10/10/2024 10:19:39 AM
rwxr-xr-x
Editing: facebook_setup.php
Close
<? ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include '../inc/validate.logged.php'; include 'function.php'; include 'db_connect.php'; $credentials = json_decode(file_get_contents('credential.json'), true); $fbLoggedStatus = facebook_login_status($db, $gUserId); if (isset($_GET['log']) && $_GET['log'] == 'npf') { ?> <script> alert("No Pages Found for the account"); </script> <? } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Knobly Cream: Create • Reach • Measure</title> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Font Awesome CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css" /> <link rel="stylesheet" href="../inc/style.css" /> <link rel="stylesheet" href="../inc/genai_style.css" /> <style> /* Mobile Responsive Styles */ /* General Styling */ .breadcrumb { padding: 0.75rem 1rem; } .breadcrumb-item { display: flex; align-items: center; justify-content: space-between; } .breadcrumb-item .text-left { display: block; } .breadcrumb-item form input[type="text"] { max-width: 100%; } /* Mobile (up to 375px) */ @media (max-width: 375px) { .breadcrumb-item h4 { font-size: 1.25rem; } .breadcrumb-item .btn { font-size: 0.875rem; padding: 0.5rem 0.75rem; } .breadcrumb-item .form-inline { display: block; width: 100%; } .breadcrumb-item .form-inline input, .breadcrumb-item .form-inline button { width: 100%; margin: 0.25rem 0; } .breadcrumb-item a.btn { width: 100%; margin-top: 0.25rem; } } /* Tablet (375px to 768px) */ @media (min-width: 376px) and (max-width: 768px) { .breadcrumb-item h4 { font-size: 1.5rem; } .breadcrumb-item .btn { font-size: 1rem; } .breadcrumb-item .form-inline { display: block; width: 100%; } .breadcrumb-item .form-inline input { width: 80%; } .breadcrumb-item .form-inline button { width: 20%; } .breadcrumb-item a.btn { width: 100%; margin-top: 0.5rem; } } /* Laptops (768px to 1024px) */ @media (min-width: 769px) and (max-width: 1024px) { .breadcrumb-item h4 { font-size: 1.75rem; } .breadcrumb-item .form-inline input { max-width: 250px; } .breadcrumb-item a.btn { width: auto; margin-top: 0; } .breadcrumb-item .btn { padding: 0.75rem 1.25rem; } } /* Desktop (1024px and above) */ @media (min-width: 1025px) { .breadcrumb-item h4 { font-size: 2rem; } .breadcrumb-item .form-inline input { max-width: 300px; } .breadcrumb-item a.btn { width: auto; } } </style> </head> <body class="sb-nav-fixed"> <?php include "navbar.php" ?> <div id="layoutSidenav"> <?php include 'sidebar.php' ?> <div id="layoutSidenav_content"> <main> <div id="panelContent" class="container-fluid"> <div class="main-content"> <ol class="breadcrumb my-3"> <li class="breadcrumb-item w-100 d-flex justify-content-between align-items-center flex-wrap"> <div class="text-left mb-2 mb-md-0"> <h4 class="mt-1">Facebook Pages</h4> <a href="<?= htmlspecialchars(facebook_login_consent($credentials, 'https://knoblycream.com/facebook/facebook_setup_handler.php')) ?>" class="btn btn-primary mt-2"><i class="fab fa-facebook-f"></i> Login to Facebook</a> </div> <div class="d-flex align-items-center ml-auto mt-2 mt-md-0 flex-wrap justify-content-end"> <!-- <form class="form-inline d-flex flex-nowrap mr-2 mb-2 mb-md-0" action="" method="GET"> <input type="hidden" name="i" value="16"> <input type="text" class="form-control mr-2" name="s" placeholder="Search campaigns..." value="<?= htmlspecialchars($search) ?>" style="max-width: 200px;"> <button type="submit" class="btn btn-primary"><i class="fas fa-search"></i> Search</button> </form> --> <? //if ($fbLoggedStatus == true) { ?> <!-- <button onclick="updateFBPages()">Update Pages</button> --> <? //} ?> <a href="../dashboard.php" class="btn btn-primary" style="background-color: #007bff; border-color: #007bff;"> <i class="bi bi-arrow-left"></i> Back to Cream </a> </div> </li> </ol> <? if ($fbLoggedStatus == true) { ?> <div class="col"> <table class="table table-striped table-bordered"> <thead styles="background-color:#e9ecef"> <tr> <td colspan="3" align="center"><b>Facebook Pages</b></td> </tr> <tr> <th>Page Name</th> <th>Status</th> <th>Update Page</th> </tr> </thead> <tbody> <?php $pages_data = facebook_fetch_user_pages($db, $gUserId); if ($pages_data == null) { ?> <tr> <td colspan="3">No Pages associated in the Facebook Account</td> </tr> <? } else { foreach ($pages_data as $page_data) { ?> <tr> <td><?= $page_data['pages_name'] ?></td> <td>Active</td> <td><button class="btn btn-primary" onclick="updateFBPages('<?= $page_data['pages_id'] ?>', '<?= $page_data['pages_token'] ?>')">Update/Refresh</button></td> </tr> <? } } ?> </tbody> </table> </div> <? } else { ?> <div class="col"> You have not logged in into the facebook account to use this feature. </div> <? } ?> </div> </div> </div> <footer class="py-2 bg-light"> <div class="container-fluid" style="display: flex; justify-content: right;"> <div class="text-muted text-right small">© <?= date('Y') ?>, Knobly Consulting</div> <!-- <button class="btn btn-sm btn-toggle-mode float-right" onclick="toggleMode()">Toggle Dark Mode</button> --> </div> </footer> </main> </div> </body> <script> function updateFBPages($pageId, $pageToken) { $.ajax({ url: 'update_fb_pages.php', // Replace with your API endpoint type: 'POST', // Use GET or POST depending on your needs data: { // Add any data you want to send with the request page_id: $pageId, page_token: $pageToken }, success: function(response) { // Handle a successful response console.log('Success:', response); }, error: function(xhr, status, error) { // Handle any errors console.error('Error:', status, error); }, complete: function() { // Optional: code to run after the request completes (whether it was successful or not) console.log('Request completed'); } }); } </script> </html>