OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
breader
/
process
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/07/2024 07:55:42 AM
rwxr-xr-x
📄
b.get.section.curated.php
17.96 KB
08/16/2024 05:40:32 AM
rw-r--r--
📄
b.get.section.newsletter.php
18.39 KB
07/09/2024 11:59:36 AM
rw-r--r--
📄
bchk.login.php
1.84 KB
08/01/2024 11:55:32 AM
rw-r--r--
📄
chk.logged.in.php
1.16 KB
01/10/2021 12:30:27 PM
rw-r--r--
📄
chk.login.php
1.84 KB
08/07/2024 10:43:41 AM
rw-r--r--
📁
eyecandy
-
08/15/2024 04:29:45 AM
rwxr-xr-x
📄
get.section.account.php
8.47 KB
02/10/2022 03:15:36 PM
rw-r--r--
📄
get.section.admin.php
16.74 KB
08/02/2024 11:49:35 AM
rw-r--r--
📄
get.section.analytics.php
11.45 KB
07/09/2024 05:04:07 AM
rw-r--r--
📄
get.section.collection.php
58.52 KB
05/23/2024 04:31:24 AM
rw-r--r--
📄
get.section.community.php
7.71 KB
09/09/2024 09:46:43 AM
rw-r--r--
📄
get.section.create.php
22.41 KB
05/22/2024 11:08:28 AM
rw-r--r--
📄
get.section.curated - Copy.php
37.34 KB
09/12/2024 12:29:57 PM
rw-r--r--
📄
get.section.curated.php
40.16 KB
09/13/2024 05:15:16 AM
rw-r--r--
📄
get.section.dashboard.php
3.31 KB
02/10/2022 02:58:26 PM
rw-r--r--
📄
get.section.feed.php
7.42 KB
07/28/2024 01:53:28 PM
rw-r--r--
📄
get.section.genai.php
12.72 KB
07/15/2024 07:24:13 AM
rw-r--r--
📄
get.section.genaicreative.php
12.74 KB
07/15/2024 07:24:13 AM
rw-r--r--
📄
get.section.general.php
9.31 KB
08/22/2023 09:34:25 AM
rw-r--r--
📄
get.section.newsletter.php
18.42 KB
07/22/2024 12:12:42 PM
rw-r--r--
📄
get.section.request.article.php
5.82 KB
02/27/2021 02:27:58 PM
rw-r--r--
📄
get.section.settings.php
21.15 KB
12/28/2021 01:58:50 PM
rw-r--r--
📄
get.section.team.php
6.73 KB
05/23/2024 04:45:44 AM
rw-r--r--
📄
get.section.utils.php
4.1 KB
06/26/2021 06:06:51 AM
rw-r--r--
📄
logout.php
428 bytes
08/16/2020 11:22:29 AM
rw-r--r--
📄
sendgrid.php
3.62 KB
03/09/2021 04:01:36 AM
rw-r--r--
📄
upload.php
2.4 KB
08/22/2020 01:33:43 PM
rw-r--r--
📄
zget.section.curated.php
21.2 KB
08/27/2024 12:24:10 PM
rw-r--r--
📄
zzget.section.curated.php
23.64 KB
08/29/2024 08:24:32 AM
rw-r--r--
Editing: get.section.admin.php
Close
<? // Cream: Cream Curated require_once '../inc/validate.logged.php'; require_once '../inc/config.php'; require_once '../inc/simplepie/autoloader.php'; $act = ''; if (!empty($_POST)) $act = isset($_POST["act"]) ? $_POST["act"] : ''; // Add to Collection if ($act == 'addCollection') { $data = isset($_POST['data']) ? $_POST['data'] : ''; if ($data != '') { $arrData = json_decode($data, true); foreach ($arrData as &$value) { $feedTitle = $value['title']; $feedURL = $value['url']; $feedDesc = $value['desc']; $feedPublisher = $value['publisher']; $sql = "SELECT url FROM user_collection WHERE url='$feedURL' AND user_id=$gUserId"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { $feedTitle = mysqli_real_escape_string($db, $feedTitle); $feedDesc = mysqli_real_escape_string($db, $feedDesc); $feedPublisher = mysqli_real_escape_string($db, $feedPublisher); $sql = "INSERT INTO user_collection(user_id,title,url,description,date_added) VALUES($gUserId,'$feedTitle','$feedURL','$feedDesc',Now())"; mysqli_query($db, $sql); } } echo "OK"; } } // Default if ($act == '') { $sql = "SELECT feed_url FROM feeds_cream"; $result = mysqli_query($db, $sql); while ($row = mysqli_fetch_assoc($result)) { $array[] = $row['feed_url']; } $feed = new SimplePie(); /* $feed->set_curl_options( array( CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false ) ); */ $feed->set_feed_url($array); $feed->enable_cache(true); $feed->set_cache_duration(3600); $feed->set_cache_location('../inc/simplepie/library/SimplePie/Cache'); $feed->init(); $feed->handle_content_type(); if ($feed->error) { //print_r($feed->error); //die(); } ?> <ol class="breadcrumb my-3"> <li class="breadcrumb-item w-100" style="display:flex; justify-content:space-between;"> <div class="text-left "> <h4 class="mt-1" style="font-size: 1.25rem;">Curated For You</h4> </div> <div class="text-right "><button type="button" id="buttonAddCollection" class="hide btn btn-success" onclick="chkAddCollection()">Add selected to My Collection</button></div> <!-- <button class="btn btn-outline-secondary mic-button broadcast-pause" style="display:none;"><i class="fas fa-pause"></i></button> <button class="btn btn-outline-secondary mic-button broadcast-resume" style="display:none;"><i class="fas fa-play"></i></button> <button class="btn btn-outline-secondary mic-button broadcast-stop" style="display:none;"><i class="fas fa-stop"></i></button> --> </li> </ol> <div class="panelFeeds pr-2"> <? foreach ($feed->get_items() as $item) { $isExist = 0; $feedTitle = $item->get_title(); $enclosure = $item->get_enclosure(); if ($enclosure) { $feedImg = $enclosure->get_link(); } else { $feedImg = "eyecandy/stk.jpeg"; } $feedURL = $item->get_permalink(); $isFeedURL[] = $feedURL; // to check whether the feed is in the database $feedPublisher = substr($feedURL, strpos($feedURL, ".") + 1); $feedPublisher = ucfirst(strtok($feedPublisher, '.')); $feedDesc = $item->get_description(); $feedDate = $item->get_date('j F Y | g:i a'); $feedMetaDate = date('Y-m-d H:i:s', strtotime(str_replace(',', '', $item->get_date()))); $sql = "SELECT url FROM user_collection WHERE url='$feedURL' AND user_id=$gUserId"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows > 0) $isExist = 1; ?> <div class="card p-0 mb-3 border-0" style="background-color:#f5ede7"> <div class="panelFeed card-body p-2"> <div class="row no-gutters align-self-start"> <div class="col-auto"> <img src="<?= $feedImg ?>" alt="Thumbnail" class="img-fluid" style="max-width: 100px; height: auto;"> </div> <div class="col pl-1"> <h4 class="m-0 align-self-start" style="font-size: 1.25rem;"> <a id="<?= $feedTitle ?>" href="<?= $feedURL ?>" target="_blank" style="color:#f26522"> <?= $feedTitle ?> <br> <span style="position: absolute; top: -9999px; left: -9999px"><?= $feedURL ?></span> </a> </h4> </div> </div> <div class="row no-gutters mt-2"> <div class="col-12"> <p class="m-0" style="color:#7d7d7d; font-size: 1rem;"><?= $feedDesc ?></p> </div> </div> <div class="row no-gutters mt-2"> <div class="col-12 col-md-6 text-center text-md-left"><?= $feedPublisher ?> • <?= $feedDate ?></div> <div class="data col-12 col-md-6 text-center text-md-right mt-2 mt-md-0 d-flex justify-content-end align-items-center" data-feed-title="<?= $feedTitle ?>" data-feed-url="<?= $feedURL ?>" data-feed-publisher="<?= $feedPublisher ?>" data-feed-desc="<?= htmlentities($feedDesc) ?>"> <label class="btn-secondary m-0 px-2 py-1 mr-2 icon-container"> <i class="far fa-bookmark" id="bookmarkIcon"></i> <input type="hidden" id="metadata" data-title="<?= $feedTitle ?>" data-url="<?= $feedURL ?>" description="<?= $feedDesc ?>" data-image="<?= $feedImg ?>" data-publisher="<?= $feedPublisher ?>" data-date="<?= $feedMetaDate ?>"> </label> </div> </div> </div> </div> <!-- <script> checkCollection("<?= $feedURL ?>") </script> --> <? } ?> </div> <script type="text/javascript"> $(function() { generateSM(); }); </script> <script> var isPlaying = false; $(document).ready(function() { // Play button click handler $('.play-button').on('click', function() { var title = decodeURIComponent($(this).data('title')); var desc = decodeURIComponent($(this).data('description')); playAudio(title, desc, $(this)); }); // Function to play audio function playAudio(title, desc, button) { var audio = new Audio(); if (isPlaying) { console.log("Audio is already playing. Cannot start another instance."); return; } console.log("Starting audio playback..."); isPlaying = true; // Set flag to true to indicate audio playback has started // Ajax call to get audio file URL $.ajax({ url: '../texttovoice/processvoice.php', type: 'POST', data: { title: title, description: desc }, success: function(response) { audio.src = response; audio.play(); // Update button visibility button.hide(); button.siblings('.pause-button').show(); button.siblings('.stop-button').show(); // Pause button click handler button.siblings('.pause-button').on('click', function() { audio.pause(); $(this).hide(); $(this).siblings('.resume-button').show(); }); // Resume button click handler button.siblings('.resume-button').on('click', function() { audio.play(); $(this).hide(); $(this).siblings('.pause-button').show(); }); button.siblings('.stop-button').on('click', function() { audio.pause(); // Pause the audio (assuming this stops playback) audio.currentTime = 0; // Reset audio playback to the beginning button.siblings('.resume-button').hide(); // Hide resume button if shown button.siblings('.stop-button').hide(); button.siblings('.pause-button').hide(); button.show(); isPlaying = false; }); // Reset when audio ends audio.onended = function() { isPlaying = false; button.show(); button.siblings('.pause-button').hide(); button.siblings('.resume-button').hide(); button.siblings('.stop-button').hide(); }; }, error: function(xhr, status, error) { console.error("Error playing audio:", error); } }); } }); function broadcast(link) { if (isPlaying) { console.log("Audio is already playing. Cannot start another instance."); return; } console.log("Starting audio playback..."); isPlaying = true; // Set flag to true to indicate audio playback has started var braudio = new Audio(); console.log(link); braudio.src = link; braudio.play(); $('.broadcast-pause').show(); $('.broadcast-stop').show(); $('.broadcast-pause').on('click', function() { braudio.pause(); $('.broadcast-pause').hide(); $('.broadcast-resume').show(); }); $('.broadcast-resume').on('click', function() { braudio.play(); $('.broadcast-resume').hide(); $('.broadcast-pause').show(); }); $('.broadcast-stop').on('click', function() { braudio.pause(); braudio.currentTime = 0; $('.broadcast-pause').hide(); $('.broadcast-resume').hide(); $('.broadcast-stop').hide(); isPlaying = false; }); braudio.onended = function() { isPlaying = false; $('.broadcast-pause').hide(); $('.broadcast-resume').hide(); $('.broadcast-stop').hide(); }; } </script> <script> $(document).ready(function() { // Use event delegation or direct binding if relevant $('.icon-container').each(function() { var $container = $(this); var url = $container.find('#metadata').data('url'); // Extract URL from hidden input var $icon = $container.find('#bookmarkIcon'); // Find the icon within the current container // Trigger the check collection function checkCollection(url, $icon); }); $(document).on('click', '.icon-container', function() { var $icon = $(this).find('#bookmarkIcon'); var metadata = $(this).find('#metadata'); // Extract data from the hidden input var feedTitle = metadata.data('title'); var feedUrl = metadata.data('url'); var feedDesc = metadata.attr('description'); var feedImg = metadata.data('image'); var feedPublisher = metadata.data('publisher'); var feedDate = metadata.data('date'); // Determine the current state of the icon if ($icon.hasClass('far fa-bookmark')) { // If the icon is inactive (outline), make it active (filled) addToCollection(feedTitle, feedUrl, feedDesc, feedImg, feedPublisher, feedDate); $icon.removeClass('far fa-bookmark').addClass('fas fa-bookmark'); } else { // If the icon is active (filled), make it inactive (outline) removeFromCollection(feedUrl); $icon.removeClass('fas fa-bookmark').addClass('far fa-bookmark'); } }); }); function checkCollection(url, iconElement) { var $icon = $(iconElement); // Use the passed icon element $.ajax({ url: '../inc/handler.php', type: 'POST', contentType: 'application/json', data: JSON.stringify({ action: 'checkColl', url: url }), success: function(response) { var result = JSON.parse(response); if (result.status === 'success') { if (result.count > 0) { $icon.removeClass('far fa-bookmark').addClass('fas fa-bookmark'); } } else { console.error('Failed to check collection: ' + result.message); } }, error: function(xhr, status, error) { console.error('AJAX request failed: ' + error); } }); } function addToCollection(title, url, description, image, publisher, date) { $.ajax({ url: '../inc/handler.php', type: 'POST', contentType: 'application/json', data: JSON.stringify({ action: 'add', title: title, url: url, description: description, image: image, publisher: publisher, date: date }), success: function(response) { var result = JSON.parse(response); if (result.status === 'success') { console.log('Added to collection: ' + result.message); } else { console.error('Failed to add to collection: ' + result.message); } }, error: function(xhr, status, error) { console.error('AJAX request failed: ' + error); } }); } function removeFromCollection(url) { $.ajax({ url: '../inc/handler.php', type: 'POST', contentType: 'application/json', data: JSON.stringify({ action: 'remove', url: url }), success: function(response) { var result = JSON.parse(response); if (result.status === 'success') { console.log('Removed from collection: ' + result.message); } else { console.error('Failed to remove from collection: ' + result.message); } }, error: function(xhr, status, error) { console.error('AJAX request failed: ' + error); } }); } </script> <style> .mic-button { transition: transform 0.3s ease; /* Example transition */ } .mic-button:hover { transform: scale(1.1); /* Example transform on hover */ } </style> <? } ?>