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.request.article.php
Close
<? // Cream: Request Article require_once '../inc/validate.logged.php'; require_once '../inc/config.php'; require_once '../genai/genai_function.php'; $act = ''; if (!empty($_POST)) $act = isset($_POST["act"]) ? $_POST["act"] : ''; if ($act == 'generateArticle') { $model = "gpt-4o"; //Ensure to update the GPT model when required $type = 'request_article'; $system_prompt = array( array( "role" => "system", "content" => "Try to complete the sentence within the max_tokens." ), array( "role" => "system", "content" => "Try to complete the sentence even if the max_tokens is reached." ), array( "role" => "system", "content" => "Always use mysql compatible svg embeds to show icons or images if you are using them to pepper the response." ), array( "role" => "system", "content" => "You are a report generator where you are able to generate the article." ), array( "role" => "system", "content" => "Please respond only with the result and do not try to give any response message. Don't even give the result in the code box. Reply only with the result and this is very very very important!!" ), array( "role" => "system", "content" => "Please mention the heading of the article at the beginning as per the markdown syntax." ) ); $articleHeadline = isset($_POST['articleHeadline']) ? $_POST['articleHeadline'] : ''; $articleObjective = isset($_POST['articleObjective']) ? $_POST['articleObjective'] : ''; $articleTargetGroup = isset($_POST['articleTargetGroup']) ? $_POST['articleTargetGroup'] : ''; $articleKeywords = isset($_POST['articleKeywords']) ? $_POST['articleKeywords'] : ''; $articleNumWords = isset($_POST['articleNumWords']) ? $_POST['articleNumWords'] : ''; $articleNumImages = isset($_POST['articleNumImages']) ? $_POST['articleNumImages'] : ''; $articleOutline = isset($_POST['articleOutline']) ? $_POST['articleOutline'] : ''; $articlePrimarySource = isset($_POST['articlePrimarySource']) ? $_POST['articlePrimarySource'] : ''; $articleSecondarySource = isset($_POST['articleSecondarySource']) ? $_POST['articleSecondarySource'] : ''; $articleImageLink = isset($_POST['imageLink']) ? $_POST['imageLink'] : ''; $user_prompt = array( array( "role" => "user", "content" => 'I wanted to create an article which will be a typical article but amazing one.' ), array( "role" => "user", "content" => 'The title of the article is "' . $articleHeadline . '".' ), array( "role" => "user", "content" => 'The main objective of the article is to ' . $articleObjective . '.' ), array( "role" => "user", "content" => 'The target group for the article are "' . $articleTargetGroup . '"' ), array( "role" => "user", "content" => 'The main keywords for the article are "' . $articleKeywords . '" and these keywords are really important.' ), array( "role" => "user", "content" => 'And try to complete within ' . $articleNumWords . ' words as I want to complete within these ' . $articleNumWords . ' words' ) ); if ($articleNumImages != '') { $user_prompt[] = array( "role" => "user", "content" => 'If possible try to have probably ' . $articleNumImages . ' images or graphics in this article. Give the real image links and not the sample one. Very important' ); } if ($articleOutline != '') { $user_prompt[] = array( "role" => "user", "content" => 'The outline of the article should contain ' . $articleOutline ); } if ($articlePrimarySource != '') { $user_prompt[] = array( "role" => "user", "content" => 'The primary source for this article can be viewed in this link "' . $articlePrimarySource . '"' ); } if ($articleSecondarySource != '') { $user_prompt[] = array( "role" => "user", "content" => 'The outline of the article should contain "' . $articleSecondarySource ); } if ($articleImageLink != '') { $user_prompt[] = array( "role" => "user", "content" => 'Use this above image link to put the image which are: "' . $articleImageLink . '". Use the first image link as the main article title image. ' ); } $response = processPrompt($type, $system_prompt, $user_prompt, $model); $articleData = extractTitleAndDescription($response); ?> <style> #generated_response img { display: block; width: 45vw; } </style> <!-- <div> <?=htmlspecialchars($response)?> </div><br><br> --> <div id="generated_response"> <?= $response ?> </div> <div> <button class='btn btn-primary' onclick="article_save(<?=htmlspecialchars($articleData['title'], ENT_QUOTES, 'UTF-8')?>,<?=htmlspecialchars($articleData['description'], ENT_QUOTES, 'UTF-8')?>)">Save to Collections</button> </div> <script> $(document).ready(function() { // Get the Markdown content from the hidden div var markdownContent = $('#generated_response').text(); // Convert Markdown to HTML using marked.js var htmlContent = convert_text(markdownContent); // Display the converted HTML $('#generated_response').html(htmlContent); }); </script> <? } // Create Post // if ($act == 'sendRequest') { // $articleHeadline = isset($_POST['articleHeadline']) ? $_POST['articleHeadline'] : ''; // $articleObjective = isset($_POST['articleObjective']) ? $_POST['articleObjective'] : ''; // $articleTargetGroup = isset($_POST['articleTargetGroup']) ? $_POST['articleTargetGroup'] : ''; // $articleKeywords = isset($_POST['articleKeywords']) ? $_POST['articleKeywords'] : ''; // $articleNumWords = isset($_POST['articleNumWords']) ? $_POST['articleNumWords'] : ''; // $articleNumImages = isset($_POST['articleNumImages']) ? $_POST['articleNumImages'] : ''; // $articleOutline = isset($_POST['articleOutline']) ? $_POST['articleOutline'] : ''; // $articlePrimarySource = isset($_POST['articlePrimarySource']) ? $_POST['articlePrimarySource'] : ''; // $articleSecondarySource = isset($_POST['articleSecondarySource']) ? $_POST['articleSecondarySource'] : ''; // if ($articleHeadline != '' && $articleObjective != '') { // $tmpHTML = ""; // $tmpHTML .= "<html>"; // $tmpHTML .= "<body>"; // $tmpHTML .= "<div style=\"font-family:Arial;font-size:12px;\">\r\n"; // $tmpHTML .= "The following has been requested from Knobly Cream:<br><br>\r\n"; // $tmpHTML .= "<b>Request by:</b><br>\r\n"; // $tmpHTML .= "$gUserName [$gUserEmail]<br><br>\r\n"; // $tmpHTML .= "<b>Headline:</b><br>\r\n"; // $tmpHTML .= "$articleHeadline<br><br>\r\n"; // $tmpHTML .= "<b>Objective:</b><br>\r\n"; // $tmpHTML .= "$articleObjective <br><br>\r\n"; // $tmpHTML .= "<b>Target Group:</b><br>\r\n"; // $tmpHTML .= "$articleTargetGroup <br><br>\r\n"; // $tmpHTML .= "<b>Keywords:</b><br>\r\n"; // $tmpHTML .= "$articleKeywords<br><br>\r\n"; // $tmpHTML .= "<b>Number of words:</b><br>\r\n"; // $tmpHTML .= "$articleNumWords<br><br>\r\n"; // $tmpHTML .= "<b>Number of Pictures/Graphics/etc.:</b><br>\r\n"; // $tmpHTML .= "$articleNumImages<br><br>\r\n"; // $tmpHTML .= "<b>Outline:</b><br>\r\n"; // $tmpHTML .= "$articleOutline<br><br>\r\n"; // $tmpHTML .= "<b>Primary Source:</b><br>\r\n"; // $tmpHTML .= "$articlePrimarySource<br><br>\r\n"; // $tmpHTML .= "<b>Secondary Source:</b><br>\r\n"; // $tmpHTML .= "$articleSecondarySource<br><br>\r\n"; // $tmpHTML .= "Warm Regards,<br>\r\n"; // $tmpHTML .= "Knobly Cream<br>\r\n"; // $tmpHTML .= "</body>"; // $tmpHTML .= "</html>"; // // sendEmail('Prashanth Hebbar', 'prashanth@knobly.com', '', 'Knobly Cream: Request Article', $tmpHTML); // echo 'Thank you for your submission!<br>We will get back to you at the earliest.'; // } // } // Default if ($act == '') { ?> <ol class="breadcrumb my-3"> <li class="breadcrumb-item"> <h4 class="m-0">Request Article</h4> </li> </ol> <div id="panelRequestArticleHeader" class="row mb-4 p-2"> <div class="col"> Fill up the form to help our AI writer to understand your requirement. If you are not in Pro plan, charges may be applicable.<br> Fields marked with <span class="txtRed">*</span> are mandatory.<br> </div> </div> <div class="row mb-4 p-2"> <div id="panelRequestArticle" class="col"> <form id="frmArticle"> <div class="form-row"> <div class="form-group col-12 col-md-6"> <label for="postTitle">Headline<sup class="txtRed"><big>*</big></sup></label> <input type="text" class="form-control px-2 py-4" id="articleHeadline" name="articleHeadline" maxlength="100" /> </div> <div class="form-group col-12 col-md-6"> <label for="postTitle">Objective<sup class="txtRed"><big>*</big></sup></label> <input type="text" class="form-control px-2 py-4" id="articleObjective" name="articleObjective" maxlength="100" /> </div> </div> <div class="form-row"> <div class="form-group col-12 col-md-6"> <label for="postTitle">Target Group<sup class="txtRed"><big>*</big></sup></label> <input type="text" class="form-control px-2 py-4" id="articleTargetGroup" name="articleTargetGroup" maxlength="100" /> </div> <div class="form-group col-12 col-md-6"> <label for="postTitle">Keywords<sup class="txtRed"><big>*</big></sup></label> <input type="text" class="form-control px-2 py-4" id="articleKeywords" name="articleKeywords" maxlength="100" /> </div> </div> <div class="form-row"> <div class="form-group col-12 col-md-6"> <label for="postTitle">Number of words<sup class="txtRed"><big>*</big></sup></label> <input type="text" class="form-control px-2 py-4" id="articleNumWords" name="articleNumWords" maxlength="100" /> </div> <div class="form-group col-12 col-md-6"> <label for="postTitle">Number of Pictures/Graphics/etc.</label> <!-- <label for="postTitle">Number of Pictures/Graphics/etc.<sup class="txtRed"><big>*</big></sup></label> --> <input type="text" class="form-control px-2 py-4" id="articleNumImages" name="articleNumImages" maxlength="100" /> </div> </div> <div class="form-row"> <div class="form-group col"> <label for="postTitle">Outline</label> <textarea class="form-control" id="articleOutline" name="articleOutline"></textarea> </div> </div> <div class="form-row"> <div class="form-group col"> <label for="postTitle">Drop Image links</label> <textarea class="form-control" id="imageLink" name="imageLink"></textarea> </div> </div> <div class="form-row"> <div class="form-group col-12 col-md-6"> <label for="postTitle">Primary source</label> <textarea class="form-control" id="articlePrimarySource" name="articlePrimarySource"></textarea> </div> <div class="form-group col-12 col-md-6"> <label for="postTitle">Secondary source</label> <textarea class="form-control" id="articleSecondarySource" name="articleSecondarySource"></textarea> </div> </div> <div class="mt-3"> <button type="button" class="btn btn-primary btn-spacing" onclick="chkGenerateArticle('generateArticle')">Generate Article</button> <!-- <button type="button" class="btn btn-primary" onclick="chkGenerateArticle('sendRequest')">Request Article</button> --> <div class="float-left ml-4 pt-2"> <div id="panelStatusRequestArticle"></div> </div> </div> <input type="hidden" id="actionType" name="act" value="" /> </form> </div> </div> <? } ?>