OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
process
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
chk.logged.in.php
1.16 KB
01/10/2021 12:30:27 PM
rw-r--r--
📄
chk.login.php
1.31 KB
02/10/2022 03:03:00 PM
rw-r--r--
📄
get.section.account.php
15.11 KB
12/28/2024 08:09:41 AM
rw-r--r--
📄
get.section.analytics.php
28.73 KB
03/02/2025 09:40:12 AM
rw-r--r--
📄
get.section.collection.php
69.19 KB
03/04/2025 05:15:01 AM
rw-r--r--
📄
get.section.community.php
7.71 KB
09/09/2024 09:46:26 AM
rw-r--r--
📄
get.section.create.php
22.41 KB
05/22/2024 11:08:28 AM
rw-r--r--
📄
get.section.curated.php
33.87 KB
03/02/2025 10:52:06 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
6.87 KB
03/09/2023 05:28:34 AM
rw-r--r--
📄
get.section.genai.php
9.87 KB
08/21/2024 07:23:47 AM
rw-r--r--
📄
get.section.genaicreative.php
10.55 KB
08/21/2024 07:23:45 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.97 KB
08/22/2024 06:42:01 AM
rw-r--r--
📄
get.section.request.article.php
13.34 KB
03/02/2025 06:07:24 AM
rw-r--r--
📄
get.section.settings.php
42.64 KB
03/02/2025 10:13:44 AM
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.analytics.php
11.45 KB
03/02/2025 06:25:31 AM
rw-r--r--
Editing: get.section.genaicreative.php
Close
<?php session_start(); $_SESSION['.generated-text'] = ""; unset($_SESSION['prompt_message']); ?> <script src="inc/genai_func.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style> .loader { border: 6px solid rgba(0, 0, 0, 0.1); border-left-color: #f58020; border-radius: 50%; width: 35px; height: 35px; animation: spin 1s linear infinite; margin: 0 auto; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <div id="GenAI-Container"> <div class="container my-4" style="padding-bottom: 4rem;"> <ol class="breadcrumb my-3"> <li class="breadcrumb-item"> <h4 class="m-0">GenAI Creative</h4> </li> </ol> <div class="button-bar"> <div class="button-container"> <button id="reportButton1" class="reportButton" value="#todo" title="Convert the text that follows as a todo item."> <i class="fas fa-check dropdown-icon"></i> Todo </button> <button id="reportButton2" class="reportButton" value="#joke" title="use text as a context or theme to write a joke."> <i class="fas fa-laugh dropdown-icon"></i> Joke </button> <button id="reportButton3" class="reportButton" value="#bored" title="Respond with a motivational anecdote especially from among Robin Williams, Emerson, Mark Twain, Jim Rohn, Dale Carnegie, Simon Sinek"> <i class="fas fa-grin-squint-tears dropdown-icon"></i> Bored </button> <button id="reportButton4" class="reportButton" value="#advise" title="Take the following text to give me advise with anecdotes on how it was done by someone else."> <i class="fas fa-comment-alt dropdown-icon"></i> Advise </button> <button id="reportButton5" class="reportButton" value="#done" title="Congratulate me and make me feel on top of the world."> <i class="as fa-check-circle dropdown-icon"></i> Done </button> <button id="reportButton6" class="reportButton" value="#working" title="help me keep my focus on the current work."> <i class="fas fa-tools dropdown-icon"></i> Working </button> <button id="reportButton7" class="reportButton" value="#ben" title="Respond like you are Ben Franklin, picking from your writings and thoughts and motivating and guiding."> <i class="fas fa-user dropdown-icon"></i> Ben </button> </div> <div class="right"> <!-- <a id="whatsapp-share-link" href="javascript:void(0);"> <i class="fab fa-2x fa-whatsapp-square" style="position:relative;top:5px;color:#f58020;"></i> </a> --> <!-- Button to redirect to the try creative genai --> <a href="javascript:np()" onclick="goSection('genai', this)"> <button class="btn btn-primary gen3">Back to GenAI Creator</button> </a> </div> </div> <div class="" style="margin-top: 1rem; margin-bottom: 1rem"> <textarea name="working_headline" placeholder="Enter your working headline..." id="working_headline" class="form-control" rows="2"></textarea> </div> <div class="" style="display: flex; justify-content:space-between"> <div class=""> <button id="submit-btn" class="btn btn-primary">Generate</button> <button id="clear-btn" name="clear" class="btn btn-secondary"><i class="fas fa-eraser"></i> Clear</button> <a id="whatsapp-share-link" href="javascript:void(0);"> <i class="fab fa-2x fa-whatsapp-square" style="margin-left: 5px;position:relative;top:5px;color:#f58020;"></i> </a> </div> <div class="" style="display: flex; justify-content:end; gap:10px"> <div class="loadingIndicator" style="display: none;"> <div class="loader"></div> </div> <button id="reset-btn" name="reset" class="float-right btn btn-secondary classReset" style="min-width: max-content; max-height:34px"><i class="fas fa-trash-alt"></i> Reset</i></button> </div> </div> <div class="generated-content border bg-white p-3 mt-3" style="display: none;"> <div class="content-show"> <div class="" style="display: flex; justify-content:space-between"> <h5>Generated Content:</h5> </div> <div class="generated-text"> </div> </div> <div class="" style="display: flex; justify-content:right"> <div class="button-content" style="display: flex; justify-content:right"> <button onclick="copyText()" class=" btn btn-warning " style="border: none; background:transparent"> <span> <i class="far fa-copy fa-lg fa-fw"></i> </span> </button> </div> <input class="float-right btn btn-primary" id="saveButton" type="button" value="Save"> </div> </div> </div> </div> <script> // Add click event listeners to all buttons $('.reportButton').click(function() { var value = $(this).val(); var title = $(this).attr('title'); setActiveButton(this.id); }); // Initialize by showing content for the first button var initialValue = $('#reportButton1').val(); var initialTitle = $('#reportButton1').attr('title'); $('#reportButton1').addClass('active-tab'); // Set first button as active initially // Function to generate the content var avatar = ''; $(document).ready(function() { // Check if the div with class 'code-language' is empty if ($.trim($('.code-language').text()) === '') { $('.code-language').hide(); // Hide the div if it's empty } $('#saveButton').click(function() { var generatedText = $('.generated-text').html(); var workingHeadline = $('#working_headline').val(); generatedText = replaceBrWithNewline(generatedText); if (!workingHeadline) { alert("Working Headline cannot be empty.."); return; } console.log(generatedText); console.log(workingHeadline); // Call genai_save function here genai_save(generatedText, workingHeadline); }); // Function to share through whatsapp $('#whatsapp-share-link').click(function(event) { event.preventDefault(); // Prevent default link behavior // Call the share_whatsapp function when the link is clicked share_whatsapp(); }); $('#submit-btn').click(function() { $('.loadingIndicator').show(); // Show loading indicator on button click console.log("Trying to call the function"); var headline = $('#working_headline').val(); // Get the value of the textarea // AJAX call using jQuery $.ajax({ url: '/genai/process_genai.php', // PHP file to handle the request type: 'POST', // Method type data: { avatar: avatar, // Assuming avatar is defined elsewhere working_headline: headline }, // Data to send beforeSend: function() { // This function executes before the AJAX request is sent console.log('AJAX request sending...'); }, success: function(response) { console.log('AJAX request successful'); console.log(response); // On success, update the content of the div try { var decodedData = decodeURIComponent(response); } catch { decodedData = response; } decodedData = convert_text(decodedData); // Append new content to existing .generated-text div $('.generated-text').append(decodedData); $('.generated-text').append('<br><br>'); $(".generated-content").show(); // Hide loading indicator after successful response $('.loadingIndicator').hide(); }, error: function() { console.error('AJAX request failed'); // On error, show an alert or handle the error gracefully alert('Error: Unable to fetch data.'); // Hide loading indicator on error $('.loadingIndicator').hide(); } }); }); // Click handler for '.reportButton' elements $('.reportButton').click(function() { avatar = $(this).attr('value'); console.log(avatar); // Optional: Log the avatar value }); // Function for Clear button $('#clear-btn').click(function() { $('#working_headline').val(''); // Clear textarea }); // Function for Reset button $('#reset-btn').click(function() { $.ajax({ url: '/genai/process_genai.php', type: 'POST', data: { action: "reset" }, success: function(response) { if (response == "Ok") { $('#working_headline').val(''); // Clear textarea $('.generated-text').html(''); $('.generated-content').hide(); } }, error: function() { console.error('Error while sending the request'); $('.loadingIndicator').hide(); } }); }); }); </script>