OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2025 11:18:49 AM
rwxr-xr-x
📄
.htaccess
860 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
.vscode
-
03/26/2025 03:47:57 AM
rwxr-xr-x
📁
CreateLeadPage
-
03/26/2025 04:16:47 AM
rwxr-xr-x
📄
ImageMagick-7.1.1-45-Q16-HDRI-x64-dll.exe
22.2 MB
03/26/2025 03:47:54 AM
rw-r--r--
📁
Xpress
-
03/26/2025 04:21:24 AM
rwxr-xr-x
📄
XpressPage.php
47.13 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
about.html
3.26 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
account.php
47.77 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
activate.php
2.19 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_channel.php
9.7 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_to_channel.php
980 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
admin
-
03/26/2025 04:16:40 AM
rwxr-xr-x
📄
analytics.php
37.71 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
assets
-
03/26/2025 04:16:41 AM
rwxr-xr-x
📁
audio
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
businessLp.php
46.33 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
bussLp.php
57.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
card-news.php
6.2 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
channel.php
36.21 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
chattest.php
8.66 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
clients
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
collections.php
94.62 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
comments.php
1.67 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.json
65 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.lock
4.03 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
contact.html
3.01 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
cookie.php
750 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
copytest.html
4.04 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamAdmin
-
03/26/2025 04:07:42 AM
rwxr-xr-x
📄
cream_dashboard.php
25.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamapi
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
create.php
42.93 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
created_magazine.html
11.96 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
dashboard.php
55.52 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
data
-
03/26/2025 04:16:48 AM
rwxr-xr-x
📄
down.html
829 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
education-podcasts
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📁
featured_channels
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
featured_channels.php
32.48 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
featured_topics.php
26.59 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_articles.php
1.83 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_liked_users.php
1.55 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
filter.php
4.91 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_action.php
1.75 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_dash.php
33.76 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
form-builder
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
function.php
20.61 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
genai
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
generated_article.php
11.86 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
get_recent_items.php
1.37 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
handle_channel.php
856 bytes
03/26/2025 03:47:47 AM
rw-r--r--
📁
hindiConverter
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
homePin.php
68.38 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
hps
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📄
impmy_collection.php
124.17 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
inc
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
index.php
30.55 KB
03/26/2025 03:47:48 AM
rw-r--r--
📄
index1.php
61.34 KB
03/26/2025 03:47:50 AM
rw-r--r--
📄
influencer.php
11.72 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
interface
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📁
kannada
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
knobly_logo.png
9.45 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_page.php
17.27 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_signin.php
5.11 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
leadpage
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
link.php
5.63 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logInCheck.php
4.41 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
loggedInCheck.php
1.15 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logo (1).svg
814 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
logout.php
503 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.html
4.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.php
23.57 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
more.php
9.21 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_collection.php
153.03 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_settings.php
17.44 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
navbar.php
3.36 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
new-page.php
10.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newEditor.php
17.04 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newsletter.php
24.31 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pageLanding
-
03/26/2025 04:20:07 AM
rwxr-xr-x
📁
pages
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
payment.php
29.86 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pdf
-
03/26/2025 03:48:06 AM
rwxr-xr-x
📄
pdftk_server-2.02-win-setup.exe
2.91 MB
03/26/2025 03:47:56 AM
rw-r--r--
📄
post-details.php
37.75 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
premium.php
21.79 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
privacy.html
12.1 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
process
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
process-plan.php
1.44 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process.php
1.52 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process_data.php
5.02 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile.php
37.8 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_pic_upload.php
4.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_test.php
19.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
reels
-
03/26/2025 04:20:08 AM
rwxr-xr-x
📄
refund.html
9.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
replyPost.php
3.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
report
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
request_article.php
22.76 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
reset.html
4.7 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
save_profile.php
2.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved.php
34.28 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved_posts.php
49.25 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
search_bar.php
16.95 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
sendy
-
03/26/2025 04:21:20 AM
rwxr-xr-x
📄
settings.php
81.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
sharemarket.php
3.88 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
showcase.php
10.34 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess.php
13.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess_backup.php
11.18 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
social_media
-
03/26/2025 04:16:12 AM
rwxr-xr-x
📄
start.html
3.99 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
store_articles.php
1.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
stream.php
62.31 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamPush.php
29.82 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamb.php
40.75 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streambb.php
47.34 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
texttovoice
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📁
thumbsUp
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📄
toggle_channel.php
2.28 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
udupi_sign_up.php
34.5 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
uploads
-
03/26/2025 04:06:46 AM
rwxr-xr-x
📄
usage.html
37.76 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
userActivity.php
9.79 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
vendor
-
03/26/2025 04:20:23 AM
rwxr-xr-x
📄
verify.php
744 bytes
03/26/2025 03:47:57 AM
rw-r--r--
📄
view.php
13.36 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
view_newsletter.php
1.58 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landing_page.php
78.63 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landingpage.html
11.15 KB
03/26/2025 03:47:57 AM
rw-r--r--
Editing: request_article.php
Close
<? // Cream: Request Article require_once 'assets/php/validate.logged.php'; require_once 'inc/config.php'; require_once 'genai/genai_function.php'; require_once 'assets/php/function.php'; $act = ''; if (!empty($_POST)) $act = isset($_POST["act"]) ? $_POST["act"] : ''; if ($act == 'generateArticle') { $model = "grok-beta"; //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 == '') { ?> <!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="assets/js/jquery-3.6.0.min.js"></script> <script src="assets/js/jquery-3.6.0.min.js"></script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Font Awesome CSS --> <link rel="stylesheet" href="assets/css/all.min.5.15.css"> <link rel="stylesheet" href="assets/css/bootstrap.min.4.5.0.css" /> <link rel="stylesheet" href="assets/css/animate.min.4.0.css" /> <!-- <link rel="stylesheet" href="inc/style.css" /> --> <link rel="stylesheet" href="assets/css/styles.css" /> <!-- <link rel="stylesheet" href="inc/genai_style.css" /> --> <link rel="icon" type="image/x-icon" href="/img/logo.ico"> <script src="assets/js/jquery-3.6.0.min.js"></script> <script src="assets/js/bootstrap.min.4.5.js" ></script> <script src="assets/js/Chart.min.2.8.js" crossorigin="anonymous"></script> <script src="assets/tinymce/js/tinymce/tinymce.min.js"></script> <script src="assets/js/zf-widget.js"></script> <script src="assets/old/common.js"></script> <script src="assets/js/genai_func.js"></script> <style> .newsroll-dropdown { border: none; outline: none; position: relative; display: inline-block; /* display: flex; */ align-items: center; padding-left: 8px; /* border: none; */ padding-bottom: 8px; } .newsroll-dropbtn { border: none; color: rgba(255, 255, 255, 0.5); background-color: #212529; } .newsroll-dropbtn:focus { border: none; outline: none; } .newsroll-dropdown-content { display: none; outline: none; position: relative; background-color: #212529; min-width: 160px; /* box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); */ /* z-index: 1; */ } .newsroll-dropdown-content a { color: white; padding: 12px 16px; text-decoration: none; display: block; } .show { display: block; } .container-fluid, .container-lg, .container-md, .container-sm, .container-xl { width: 75%; padding-right: 0px; padding-left: 0px; margin-bottom: 60px; margin-right: auto; margin-left: auto; } .breadcrumb { background-color: transparent !important; } .m-0 { color: e9ecef; } .form-control { background-color: #e9ecef; } .btn-primary { background-color: #db5919 !important; border-color: #db5919 !important; } .btn-primary:focus { background-color: #db5919 !important; border-color: #db5919 !important; box-shadow: none !important; } /* Container Padding */ @media screen and (max-width: 768px) { .container-fluid { padding: 0px 0 !important; max-width: 1400px; margin: 0 auto; } } </style> <style> .sideWithMainContainer { display: flex; flex-direction: row; gap: 10px; overflow-x: hidden; } .sideMaincontent { height: 85vh; overflow-y: scroll; padding: 30px 0; } @media (min-width: 768px) { .col-md-2 { padding: 0px !important; } } @media (max-width: 768px) { .col-md-2 { display: none !important; } } </style> </head> <body class="sb-nav-fixed"> <?php include 'assets/php/social_navbar.php' ?> <div class="sideWithMainContainer"> <div class="col-md-2"> <? include 'assets/php/sidebar.php' ?> </div> <main class="col-sm-12 col-md-10 sideMaincontent"> <div id="panelContent" class="container-fluid"> <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 writers understand your requirement. Charges are 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"> <? if ($gUserPlan == 1) { ?> <button type="button" id="buttonGenerate" class="btn btn-primary btn-spacing" onclick="chkGenerateArticle('generateArticle')">Generate Article</button> <? } else { ?> <div class="alert alert-success" role="alert">The <b>GenAI Creator</b> is only available for <b>Pro</b> users!Click on Upgrade to Upgrade your account-<a href="premium.php">Upgrade</a> .</div> <? } ?> <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> </div> </main> </div> </body> <? include 'assets/php/bottom_navbar.php' ?> <? include 'assets/php/footer.php' ?> <script> function chkGenerateArticle(action) { $('#actionType').val(action); $('#buttonGenerate').text("Generating..."); // Get form values and trim whitespace var articleHeadline = $('#articleHeadline').val().trim(); var articleObjective = $('#articleObjective').val().trim(); var articleTargetGroup = $('#articleTargetGroup').val().trim(); var articleKeywords = $('#articleKeywords').val().trim(); var articleNumWords = $('#articleNumWords').val().trim(); var articleNumImages = $('#articleNumImages').val().trim(); // Check for empty fields and collect errors var errors = []; if (!articleHeadline) errors.push('Headline not entered!'); if (!articleObjective) errors.push('Objective not entered!'); if (!articleTargetGroup) errors.push('Target Group not entered!'); if (!articleKeywords) errors.push('Keywords not entered!'); if (!articleNumWords) errors.push('Number of words not entered!'); // if (!articleNumImages) errors.push('Number of Pictures/Graphics/etc. not entered!'); // Display errors if any if (errors.length > 0) { $('#panelStatusRequestArticle').html( '<div class="text-danger animate__animated animate__flash">Error: ' + errors.join(' ') + '</div>' ); return false; } $('#contentLoader').show(); // Perform AJAX request $.ajax({ url: 'request_article.php', method: 'POST', data: serializeFormExcludingField('#frmArticle', 'sendRequest') }) .done(function(res) { $('#contentLoader').hide(); $('#panelRequestArticleHeader').hide(); $('#panelRequestArticle').html(res); }) .fail(function() { $('#contentLoader').hide(); $('#panelStatusRequestArticle').html('<div class="text-danger animate__animated animate__flash">Error: Failed to process request.</div>'); }); return false; // Prevent default form submission } function serializeFormExcludingField(formSelector, excludeName) { var form = $(formSelector); var serializedArray = form.serializeArray(); var filteredArray = serializedArray.filter(function(item) { return item.name !== excludeName; }); // Convert the filtered array back to a query string return $.param(filteredArray); } </script> </html> <? } ?>