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: impmy_collection.php
Close
<? // // Turn off display of errors // ini_set('display_errors', 0); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); // Set error reporting level // error_reporting(E_ALL & ~E_DEPRECATED & ~E_WARNING & ~E_NOTICE); require_once 'inc/validate.logged.php'; require_once 'inc/config.php'; // require_once 'inc/simplepie/autoloader.php'; include './assets/php/function.php'; function esamudaayshare($feedId, $gUserId) { global $db; $esamudaayUsers = [319, 400]; if (in_array($gUserId, $esamudaayUsers)) { if (checkesamudaay($db, $feedId)) { ?> <button class="btn btn-success" id="eSamudaayShare" disabled>Shared to eSamudaay</button> <? } else { ?> <button class="btn btn-primary" id="eSamudaayShare" onclick="esamudaayshare(<?= $feedId ?>)">eSamudaay Share</button> <? } ?> <? } } function checkesamudaay($db, $feedId) { $sql = "SELECT COUNT(*) AS count FROM user_collection WHERE id = ? AND esamudaay = 1"; $stmt = $db->prepare($sql); if ($stmt) { $stmt->bind_param("i", $feedId); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $count = $row['count']; $stmt->close(); return $count == 1; } else { echo "Error preparing statement: " . $db->error; return false; } } function createArticleURL($title) { if ($title <> '') { $title = str_replace(' ', '-', $title); $title = str_replace('%', '', $title); $title = str_replace("'", "", $title); return $title; } else { return ''; } } $act = isset($_POST["act"]) ? $_POST["act"] : ''; $actAfter = isset($_POST["actAfter"]) ? $_POST["actAfter"] : ''; // Add to Newsletter if ($act == 'addNewsletter') { $data = isset($_POST['data']) ? $_POST['data'] : ''; if ($data != '') { $listId = ''; $arrData = json_decode($data, true); foreach ($arrData as &$value) { $listId .= $value['id'] . ','; } if ($gUserPlan == 0) { $sql = "SELECT id FROM user_newsletter WHERE user_id=$gUserId AND MONTH(date_created)=MONTH(NOW())"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows > 0) { echo "NO"; } else { $sql = "INSERT INTO user_newsletter(user_id,article_id,date_created) VALUES($gUserId,'$listId',Now())"; mysqli_query($db, $sql); echo "OK"; } } else { $sql = "INSERT INTO user_newsletter(user_id,article_id,date_created) VALUES($gUserId,'$listId',Now())"; mysqli_query($db, $sql); echo "OK"; } } } // Add to Landing if ($act == 'addLanding') { $data = isset($_POST['data']) ? $_POST['data'] : ''; if ($data != '') { $listId = ''; $arrData = json_decode($data, true); foreach ($arrData as &$value) { $sql = "INSERT INTO user_landing(user_id,article_id,date_created) VALUES($gUserId," . $value['id'] . ",Now())"; mysqli_query($db, $sql); } echo "OK"; } } // Remove from Showcase if ($act == 'removeShowcase') { $collectionId = isset($_POST['collectionId']) ? $_POST['collectionId'] : ''; if ($collectionId != '') { $sql = "DELETE FROM user_landing WHERE user_id=$gUserId AND article_id=$collectionId"; mysqli_query($db, $sql); echo "OK"; } } // Add to Covid if ($act == 'addCovid') { $data = isset($_POST['data']) ? $_POST['data'] : ''; if ($data != '') { $listId = ''; $arrData = json_decode($data, true); foreach ($arrData as &$value) { $sql = "INSERT INTO user_covid(user_id,article_id,date_created) VALUES($gUserId," . $value['id'] . ",Now())"; mysqli_query($db, $sql); } echo "OK"; } } // Email Collection if ($act == 'sendPost') { $editId = isset($_POST['editId']) ? $_POST['editId'] : ''; $sendName = isset($_POST['sendName']) ? $_POST['sendName'] : ''; $sendEmail = isset($_POST['sendEmail']) ? $_POST['sendEmail'] : ''; $sendBody = isset($_POST['sendBody']) ? trim($_POST['sendBody']) : ''; // Ensure the content is in UTF-8 encoding sendEmail($sendName, $sendEmail, '', 'Knobly Cream', $sendBody); echo "OK"; } // Edit Collection if ($act == 'edit') { $editId = isset($_POST['editId']) ? $_POST['editId'] : ''; $postTitle = isset($_POST['postTitle']) ? $_POST['postTitle'] : ''; $postBody = isset($_POST['postBody']) ? trim($_POST['postBody']) : ''; $isArchive = isset($_POST['isArchive']) ? trim($_POST['isArchive']) : ''; $isReadMore = isset($_POST['isReadMore']) ? trim($_POST['isReadMore']) : ''; $readMoreTxt = isset($_POST['readMoreTxt']) ? trim($_POST['readMoreTxt']) : ''; $readMoreResponse = isset($_POST['readMoreResponse']) ? trim($_POST['readMoreResponse']) : ''; $readMoreEmail = isset($_POST['readMoreEmail']) ? trim($_POST['readMoreEmail']) : ''; $isMandatoryCompany = isset($_POST['isMandatoryCompany']) ? trim($_POST['isMandatoryCompany']) : ''; $isMandatoryEmail = isset($_POST['isMandatoryEmail']) ? trim($_POST['isMandatoryEmail']) : ''; $isMandatoryMobile = isset($_POST['isMandatoryMobile']) ? trim($_POST['isMandatoryMobile']) : ''; if ($isArchive == 0) $isArchive = 'NULL'; if ($isReadMore == 0) $isReadMore = 'NULL'; if ($isMandatoryCompany == '' || $isMandatoryCompany == 'undefined') $isMandatoryCompany = 'NULL'; if ($isMandatoryEmail == '' || $isMandatoryEmail == 'undefined') $isMandatoryEmail = 'NULL'; if ($isMandatoryMobile == '' || $isMandatoryMobile == 'undefined') $isMandatoryMobile = 'NULL'; if ($isReadMore == '') { $isMandatoryCompany = 'NULL'; $isMandatoryEmail = 'NULL'; $isMandatoryMobile = 'NULL'; } if ($editId != '' && $postTitle != '' && $postBody != '') { $postTitle = mysqli_real_escape_string($db, $postTitle); $postBody = mysqli_real_escape_string($db, $postBody); $sql = "UPDATE user_collection SET title='$postTitle',description='$postBody',is_archive=$isArchive,is_read_more=$isReadMore,read_more_txt='$readMoreTxt',read_more_response='$readMoreResponse',read_more_email='$readMoreEmail',is_mandatory_company=$isMandatoryCompany,is_mandatory_email=$isMandatoryEmail,is_mandatory_mobile=$isMandatoryMobile,date_modified=Now() WHERE id=$editId AND user_id=$gUserId"; mysqli_query($db, $sql); $sql = "UPDATE user_collection SET title='$postTitle',description='$postBody',date_modified=Now() WHERE share_collection_id=$editId AND share_user_id=$gUserId"; mysqli_query($db, $sql); // For Business Gyan if ($gUserId == 287) { $datePublished = isset($_POST['datePublished']) ? $_POST['datePublished'] : ''; if ($datePublished <> '') { $sql = "UPDATE user_collection SET date_published='$datePublished' WHERE id=$editId AND user_id=$gUserId"; mysqli_query($db, $sql); } $pageViewStart = isset($_POST['pageViewStart']) ? $_POST['pageViewStart'] : ''; if ($pageViewStart <> '') { $sql = "UPDATE user_collection SET page_view_start=$pageViewStart WHERE id=$editId AND user_id=$gUserId"; mysqli_query($db, $sql); } $author = isset($_POST['author']) ? $_POST['author'] : ''; if ($author <> '') { $author = mysqli_real_escape_string($db, $author); $sql = "UPDATE user_collection SET author='$author' WHERE id=$editId AND user_id=$gUserId"; mysqli_query($db, $sql); } $sql = "DELETE FROM user_collection_tag WHERE articleId=$editId"; mysqli_query($db, $sql); $articleTag = isset($_POST['articleTag']) ? $_POST['articleTag'] : ''; if ($articleTag <> '') { $arrArticleTags = explode(',', $articleTag); foreach ($arrArticleTags as $value) { $sql = "INSERT INTO user_collection_tag(articleId,articleTag) VALUES($editId,'$value')"; mysqli_query($db, $sql); } } } if (isset($_FILES['uploadCover'])) { $temp = $_FILES['uploadCover']; if (is_uploaded_file($temp['tmp_name'])) { $fileExt = strtolower(pathinfo($temp['name'], PATHINFO_EXTENSION)); $fileUpload = $editId . '-' . time() . '.' . $fileExt; move_uploaded_file($temp['tmp_name'], '../data/covers/' . $fileUpload); $sql = "UPDATE user_collection SET cover_img='$fileUpload' WHERE id=$editId AND user_id=$gUserId"; mysqli_query($db, $sql); $sql = "UPDATE user_collection SET cover_img='$fileUpload' WHERE share_collection_id=$editId AND share_user_id=$gUserId"; mysqli_query($db, $sql); } } echo "OK"; } } // Restore Collection if ($act == 'restoredCollection') { $collectionId = isset($_POST['delId']) ? $_POST['delId'] : ''; if ($collectionId != '') { $sql = "UPDATE user_collection SET is_archive=NULL WHERE id=$collectionId AND user_id=$gUserId"; mysqli_query($db, $sql); echo "OK"; } } // Archive Collection if ($act == 'archivedCollection') { $collectionId = isset($_POST['delId']) ? $_POST['delId'] : ''; if ($collectionId != '') { $sql = "UPDATE user_collection SET is_archive=1 WHERE id=$collectionId AND user_id=$gUserId"; mysqli_query($db, $sql); echo "OK"; } } // Delete Collection if ($act == 'deleteCollection') { $collectionId = isset($_POST['delId']) ? $_POST['delId'] : ''; if ($collectionId != '') { $sql = "DELETE FROM user_collection WHERE id=$collectionId AND user_id=$gUserId"; mysqli_query($db, $sql); echo "OK"; } } // Show Restore Collection if ($act == 'restoreCollection') { $collectionId = isset($_POST['id']) ? $_POST['id'] : ''; ?> <div class="popup" style="width:420px"> <div class="widget"> <form id="frmDel" name="frmDel"> <div class="card"> <div class="card-header bg-dark"> <h5 class="mb-0 text-light">Restore Collection</h5> </div> </div> <div id="widget_B" style="padding:15px 25px"> You are about to restore this to My Collections! </div> <div id="widget_F" style="border-top:1px solid #ebedf2;padding:20px 10px;"> <div class="col"> <button type="button" class="btn btn-primary" onclick="return chkRestoreCollection()">Confirm</button> </div> </div> <input type="hidden" id="delId" name="delId" value="<?= $collectionId ?>" /> <input type="hidden" id="act" name="act" value="restoredCollection" /> </form> </div> </div> <? } // Show Archive Collection if ($act == 'archiveCollection') { $collectionId = isset($_POST['id']) ? $_POST['id'] : ''; ?> <div class="popup" style="width:420px"> <div class="widget"> <form id="frmDel" name="frmDel"> <div class="card"> <div class="card-header bg-dark"> <h5 class="mb-0 text-light">Archive Collection</h5> </div> </div> <div id="widget_B" style="padding:15px 25px"> You are about to archive this from My Collections! </div> <div id="widget_F" style="border-top:1px solid #ebedf2;padding:20px 10px;"> <div class="col"> <button type="button" class="btn btn-primary" onclick="return chkArchiveCollection()">Confirm</button> </div> </div> <input type="hidden" id="delId" name="delId" value="<?= $collectionId ?>" /> <input type="hidden" id="act" name="act" value="archivedCollection" /> </form> </div> </div> <? } // Show Delete Collection if ($act == 'delCollection') { $collectionId = isset($_POST['id']) ? $_POST['id'] : ''; ?> <div class="popup" style="width:420px"> <div class="widget"> <form id="frmDel" name="frmDel"> <div class="card"> <div class="card-header bg-dark"> <h5 class="mb-0 text-light">Delete Collection</h5> </div> </div> <div id="widget_B" style="padding:15px 25px"> You are about to delete this from My Collections! </div> <div id="widget_F" style="border-top:1px solid #ebedf2;padding:20px 10px;"> <div class="col"> <button type="button" class="btn btn-primary" onclick="return chkDelCollection()">Confirm</button> </div> </div> <input type="hidden" id="delId" name="delId" value="<?= $collectionId ?>" /> <input type="hidden" id="act" name="act" value="deleteCollection" /> </form> </div> </div> <? } // Show Edit if ($act == 'editForm') { $isValid = 0; $postId = isset($_POST['id']) ? $_POST['id'] : ''; $sql = "SELECT * FROM user_collection WHERE id=$postId"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows > 0) { $row = mysqli_fetch_assoc($result); $postTitle = $row['title']; $postBody = $row['description']; $imgCover = $row['cover_img']; $author = $row['author']; $isArchive = $row['is_archive']; $isReadMore = $row['is_read_more']; $readMoreTxt = $row['read_more_txt']; $readMoreResponse = $row['read_more_response']; $readMoreEmail = $row['read_more_email']; $isMandatoryCompany = $row['is_mandatory_company']; $isMandatoryEmail = $row['is_mandatory_email']; $isMandatoryMobile = $row['is_mandatory_mobile']; $isValid = 1; // For Business Gyan if ($gUserId == 287) { $datePublished = $row['date_published']; $pageViewStart = $row['page_view_start']; $articleTag = ','; $sql = "SELECT articleTag FROM user_collection_tag WHERE articleId=$postId"; $resultInner = mysqli_query($db, $sql); while ($rowInner = mysqli_fetch_assoc($resultInner)) { $itemArticleTag = $rowInner['articleTag']; $articleTag .= $itemArticleTag . ','; } } } ?> <div class="popup" style="max-width:800px"> <div class="widget"> <form id="frmEdit" name="frmEdit"> <div class="card"> <div class="card-header bg-dark"> <h5 class="mb-0 text-light">Edit Item</h5> </div> </div> <div id="widget_B" style="padding:15px 25px; max-height:calc(100vh - 200px);overflow-y:auto;"> <? if ($isValid == 1) { ?> <div class="form-row"> <div class="form-group col"> <label for="articleTitle">Title</label> <input type="text" class="form-control" id="postTitle" name="postTitle" value="<?= $postTitle ?>" /> </div> </div> <div class="form-row"> <div class="form-group col"> <textarea id="postBody" name="postBody"><?= $postBody ?></textarea> </div> </div> <? // For Business Gyan if ($gUserId == 287) { ?> <div class="form-row mb-3"> <div class="form-group col-md-4"> <label for="articleTag">Article Tags</label> </div> <div class="form-row col-md-8"> <div class="col-12 col-md-4"> <b>Marketing</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Branding & Advertising" <? if (strpos($articleTag, ',Branding & Advertising,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Branding & Advertising</label> </div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Customer" <? if (strpos($articleTag, ',Customer,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Customer</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Competition" <? if (strpos($articleTag, ',Competition,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Competition</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Networking" <? if (strpos($articleTag, ',Networking,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Networking</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Business Networking" <? if (strpos($articleTag, ',Business Networking,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Business Networking</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Sales" <? if (strpos($articleTag, ',Sales,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Sales</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Social Media" <? if (strpos($articleTag, ',Social Media,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Social Media</label></div> </div> <div class="col-12 mt-4 col-md-4 mt-md-0"> <b>Human Resource</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="HR Management" <? if (strpos($articleTag, ',HR Management,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">HR Management</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Organization Structures" <? if (strpos($articleTag, ',Organization Structures,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Organization Structures</label> </div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Training" <? if (strpos($articleTag, ',Training,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Training</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Recruit" <? if (strpos($articleTag, ',Recruit,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Recruit</label></div> </div> <div class="col-12 mt-4 col-md-4 mt-md-0"> <b>Technology</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Enterprise Software" <? if (strpos($articleTag, ',Enterprise Software,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Enterprise Software</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Personal Software" <? if (strpos($articleTag, ',Personal Software,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Personal Software</label></div> </div> <div class="col-12 col-md-4 mt-4"> <b>Finance</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Funding" <? if (strpos($articleTag, ',Funding,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Funding</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Accounting" <? if (strpos($articleTag, ',Accounting,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Accounting</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Taxation" <? if (strpos($articleTag, ',Taxation,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Taxation</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Treasury" <? if (strpos($articleTag, ',Treasury,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Treasury</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Management Information Systems" <? if (strpos($articleTag, ',Management Information Systems,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Management Information Systems </label></div> </div> <div class="col-12 col-md-4 mt-4"> <b>Operations</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Quality" <? if (strpos($articleTag, ',Quality,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Quality</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Facility management" <? if (strpos($articleTag, ',Facility management,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Facility management</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Infrastructure" <? if (strpos($articleTag, ',Infrastructure,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Infrastructure</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Office Automation" <? if (strpos($articleTag, ',Office Automation,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Office Automation</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Customer Service" <? if (strpos($articleTag, ',Customer Service,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Customer Service</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Automation" <? if (strpos($articleTag, ',Automation,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Automation</label></div> </div> <div class="col-12 col-md-4 mt-4"> <b>Industry</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Ites & Bpo" <? if (strpos($articleTag, ',Ites & Bpo,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Ites & Bpo</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Hospitality" <? if (strpos($articleTag, ',Hospitality,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Hospitality</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="IT" <? if (strpos($articleTag, ',IT,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">IT</label> </div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Manufacturing" <? if (strpos($articleTag, ',Manufacturing,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Manufacturing</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Retail" <? if (strpos($articleTag, ',Retail,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Retail</label></div> </div> <div class="col-12 col-md-4 mt-4"> <b>Leadership</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Empowerment" <? if (strpos($articleTag, ',Empowerment,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Empowerment</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Innovation" <? if (strpos($articleTag, ',Innovation,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Innovation</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Inspiration" <? if (strpos($articleTag, ',Inspiration,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Inspiration</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Srategy" <? if (strpos($articleTag, ',Srategy,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Srategy</label></div> </div> <div class="col-12 col-md-4 mt-4"> <b>Work Life</b><br> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Personality Development" <? if (strpos($articleTag, ',Personality Development,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Personality Development</label> </div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Success" <? if (strpos($articleTag, ',Success,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Success</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Health" <? if (strpos($articleTag, ',Health,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Health</label></div> <div class="form-check"><input type="checkbox" class="form-check-input" id="articleTag" name="articleTag" value="Personal Finance" <? if (strpos($articleTag, ',Personal Finance,') !== false) { ?> CHECKED<? } ?>><label class="pl-1 small text-secondary form-check-label">Personal Finance</label></div> </div> </tr> </table> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="author">Author(s)</label> </div> <div class="form-group col-md-8"> <input type="text" class="form-control" id="author" name="author" maxlength="200" value="<?= $author ?>" /> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="pageViewStart">Published Date</label> </div> <div class="form-group col-md-8"> <input type="date" class="form-control" id="datePublished" name="datePublished" style="width:145px" value="<?= $datePublished ?>" /> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="pageViewStart">Initial Page View</label> </div> <div class="form-group col-md-8"> <input type="text" class="form-control" id="pageViewStart" name="pageViewStart" style="width:100px" onkeyPress="return numCheck(event)" maxlength="8" value="<?= $pageViewStart ?>" /> </div> </div> <? } ?> <div class="form-row"> <div class="form-group col-md-4"> <label for="uploadCover">Cover Image</label> </div> <div class="form-group col-md-8"> <div class="form-check form-check-inline ml-0 ml-sm-2 w-50"> <input type="file" class="form-control-file" id="uploadCover" name="uploadCover" accept="image/*" /> </div> <? if ($imgCover <> '') { ?> <div class="mb-2"><a href="/data/covers/<?= $imgCover ?>" target="_blank">View Current Image</a> </div> <? } ?> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="isArchive">Archive Item</label> </div> <div class="form-group col-md-8"> <div class="form-check form-check-inline ml-0 ml-sm-2 w-25"> <label class="form-control radio-inline border-0 pl-1 pr-0"><input type="radio" id="isArchive" name="isArchive" value="1" <? if ($isArchive == 1) { ?> CHECKED<? } ?>> Yes</label> <label class="form-control radio-inline border-0 pl-1 pr-0"><input type="radio" id="isArchive" name="isArchive" value="0" <? if ($isArchive == 0) { ?> CHECKED<? } ?>> No</label> </div> </div> </div> <? if ($gUserPlan == 0) { echo '<div class="alert alert-success" role="alert">Call to Action section is only available in <b>Pro</b> plan! Go to My Account to upgrade.</div>'; } else { ?> <div class="form-row"> <div class="form-group col-md-4"> <label for="isReadMore">Show Call To Action Button</label> </div> <div class="form-group col-md-8"> <div class="form-check form-check-inline ml-0 ml-sm-2 w-25"> <label class="form-control radio-inline border-0 pl-1 pr-0"><input type="radio" id="isReadMore" name="isReadMore" value="1" <? if ($isReadMore == 1) { ?> CHECKED<? } ?>> Yes</label> <label class="form-control radio-inline border-0 pl-1 pr-0"><input type="radio" id="isReadMore" name="isReadMore" value="0" <? if ($isReadMore == 0) { ?> CHECKED<? } ?>> No</label> </div> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="readMoreTxt">Call To Action Button Text</label> </div> <div class="form-group col-md-8"> <input type="text" class="form-control" id="readMoreTxt" name="readMoreTxt" maxlength="50" value="<?= $readMoreTxt ?>" /> </div> </div> <div class="form-row"> <div class="form-group col-md-4 pt-2"> <label for="readMoreResponse">Call To Action Response</label> </div> <div class="form-group col-md-8"> <input type="text" class="form-control" id="readMoreResponse" name="readMoreResponse" maxlength="300" value="<?= $readMoreResponse ?>" /> <small class="form-text text-muted">Enter a URL (including http or https) or if left blank, will show a default Thank you page</small> </div> </div> <div class="form-row"> <div class="form-group col-md-4 pt-2"> <label for="readMoreResponse">Call To Action Email</label> </div> <div class="form-group col-md-8"> <input type="text" class="form-control" id="readMoreEmail" name="readMoreEmail" maxlength="300" value="<?= $readMoreEmail ?>" /> <small class="form-text text-muted">Enter a valid email addresses seperated by commas where you want the lead details to be emailed</small> </div> </div> <div class="form-row"> <div class="form-group col-md-4"> <label for="isMandatoryCompany">Show Call To Action Mandatory Fields</label> </div> <div class="form-group col-md-8"> <div class="row no-gutters"> <div class="col-12 col-lg-4"><label class="form-control border-0"><input type="checkbox" id="isMandatoryCompany" name="isMandatoryCompany" value="1" <? if ($isMandatoryCompany == 1) { ?> CHECKED<? } ?>> Company/Institution</label></div> <div class="col-12 col-lg-4"><label class="form-control border-0"><input type="checkbox" id="isMandatoryEmail" name="isMandatoryEmail" value="1" <? if ($isMandatoryEmail == 1) { ?> CHECKED<? } ?>> Email</label></div> <div class="col-12 col-lg-4"><label class="form-control border-0"><input type="checkbox" id="isMandatoryMobile" name="isMandatoryMobile" value="1" <? if ($isMandatoryMobile == 1) { ?> CHECKED<? } ?>> Mobile</label></div> </div> </div> </div> <? } ?> <? } ?> </div> <div id="widget_F" style="border-top:1px solid #ebedf2;padding:20px 10px;"> <div class="col"> <button type="submit" class="btn btn-primary" onclick="return chkEditPost()">Update</button> <button type="submit" class="btn btn-light ml-1" onclick="return clearForm('frmEdit')">Reset</button> <div id="panelStatus" class="float-right text-sm text-danger" style="margin-top:5px" align="right"> </div> </div> </div> <input type="hidden" id="editId" name="editId" value="<?= $postId ?>" /> <input type="hidden" id="act" name="act" value="edit" /> </form> </div> </div> <? } // Show Email if ($act == 'emailForm') { $isValid = 0; $postId = isset($_POST['id']) ? $_POST['id'] : ''; $sql = "SELECT * FROM user_collection WHERE id=$postId"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows > 0) { $row = mysqli_fetch_assoc($result); $postTitle = $row['title']; $postBody = $row['description']; $postURL = $row['url']; $postLink = '/view/' . $postId . '/' . createArticleURL($postTitle); if ($gUserSubdomain <> '') { $postLinkFull = 'https://' . $gUserSubdomain . '.knoblycream.com' . $postLink; } else { $postLinkFull = 'https://www.knoblycream.com' . $postLink; } $imgCover = $row['cover_img']; $isValid = 1; } ?> <div class="popup" style="max-width:800px"> <div class="widget"> <form id="frmEdit" name="frmEdit"> <div class="card"> <div class="card-header bg-dark"> <h5 class="mb-0 text-light">Email Item</h5> </div> </div> <div id="widget_B" style="padding:15px 25px; max-height:calc(100vh - 200px);overflow-y:auto;"> <? if ($isValid == 1) { ?> <div class="form-row"> <div class="form-group col-6"> <label for="sendName">Recipient Name</label> <input type="text" class="form-control" id="sendName" name="sendName" maxlength="100" /> </div> <div class="form-group col-6"> <label for="sendEmail">Recipient Email</label> <input type="email" class="form-control" id="sendEmail" name="sendEmail" maxlength="100" /> </div> </div> <div class="form-row"> <div class="form-group col"> <textarea class="form-control" id="sendBody" name="sendBody" rows="10"> <h3><a href="<?= $postLinkFull ?>" target="_blank" style="color:#000"><?= $postTitle ?></a></h3> <?= $postBody ?> </textarea> </div> </div> <? } ?> </div> <div id="widget_F" style="border-top:1px solid #ebedf2;padding:20px 10px;"> <div class="col"> <button type="submit" class="btn btn-primary" onclick="return chkSendPost()">Send Email</button> <div id="panelStatus" class="float-right text-sm text-danger" style="margin-top:5px" align="right"> </div> </div> </div> <input type="hidden" id="editId" name="editId" value="<?= $postId ?>" /> <input type="hidden" id="act" name="act" value="sendEmail" /> </form> </div> </div> <? } if ($act == '') { ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Collections | Knobly Cream: Create • Reach • Measure</title> <!-- Google Fonts --> <link href="assets/css/fontsgoogle.css" rel="stylesheet"> <!-- Bootstrap CSS --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link rel="stylesheet" href="assets/css/all.min.css"> <!-- Magnific Popup CSS (only if you need it) --> <link rel="stylesheet" href="assets/css/magnific-popup.min.css"> <!-- Custom Styles --> <link rel="stylesheet" href="assets/css/styles.css"> <!-- jQuery (always load jQuery first) --> <script src="assets/js/jquery-3.6.0.min.js"></script> <!-- Popper.js (Bootstrap 4 requires Popper.js) --> <script src="assets/js/popper.min.2.5.js"></script> <!-- Bootstrap JS (needed for Bootstrap 4) --> <script src="assets/js/bootstarp.min.4.5.2.js"></script> <script src="https://cdn.tiny.cloud/1/u5oz235qw5jiqww4udm90ocp9zg2rncblqo2ch0ym3twjgyt/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script> <!-- Your Custom JavaScript --> <script src="assets/js/common.js"></script> <style> .breadcrumb { display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; padding: .75rem 0rem; margin-bottom: 1rem; list-style: none; background-color: transparent !important; border-radius: .25rem; } .badge-warning { background-color: #818182; border-radius: 10px; } .dark-mode .breadcrumb { background-color: black !important; color: #ffffff87 !important; } .dark-mode .card-body { background-color: var(--navbar-bg-dark) !important; color: #ffffff87 !important; } .light-mode .card-body { background-color: #e9ecef !important; } .buttonCreamShare { background-color: #6c757d; } #eSamudaayShare { border: none; background-color: #6c757d; } body.dark-mode .card-body a { color: white !important; } body.light-mode .card-body a { color: black !important; } .nav-tabs { display: flex; flex-direction: row; flex-wrap: nowrap; /* Align items in a row */ overflow-x: auto; /* Enable horizontal scrolling when content overflows */ padding-bottom: 10px; /* Optional: add some spacing at the bottom */ margin-bottom: 0; /* Optional: remove margin at the bottom */ } .nav-tabs::-webkit-scrollbar { height: 8px; } .nav-tabs::-webkit-scrollbar-thumb { background-color: #888; border-radius: 4px; } .nav-tabs::-webkit-scrollbar-thumb:hover { background-color: #555; } /* Optional: Add a subtle shadow effect to indicate scrollable content */ .nav-tabs::after { content: ''; /* Empty content */ position: absolute; top: 0; right: 0; width: 20px; /* Shadow width */ height: 100%; background: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)); /* Fade shadow */ pointer-events: none; /* Prevent interference with clicking */ } /* Individual list item style */ .nav-item { flex-shrink: 0; /* Prevent items from shrinking */ } /* Optional: Add styles for the active state */ .nav-link.active { font-weight: bold; /* Make active item bold or any other style */ } @media screen and (max-width:600px) { .text-center { text-align: left !important; } } </style> <script> function fbhandlePost(action) { var selectedPages = []; $('.form-check-input:checked').each(function() { selectedPages.push({ id: $(this).val(), name: $(this).next('label').text().trim() // Trim whitespace }); }); var scheduleDateTime = $('#fbScheduleDateTime').val(); scheduleDateTime = new Date(scheduleDateTime).toISOString(); console.log(scheduleDateTime); var articleTitle = $('#fbArticleTitle').val(); var articleLink = $('#fbArticleLink').val(); if (selectedPages.length > 0) { if (action === 'schedulePost' && !scheduleDateTime) { alert('Please select a date and time to schedule the post.'); return; } var postData = { action: action, pages: selectedPages, title: articleTitle, link: articleLink, schedule: action === 'schedulePost' ? scheduleDateTime : undefined }; // AJAX call to the post handler $.ajax({ url: 'social_media/facebook/fb_post_handler.php', // Update this path to your PHP file type: 'POST', data: JSON.stringify(postData), contentType: 'application/json', success: function(response) { if (response.status == 'success') { alert(action === 'postNow' ? 'Post successful: ' : 'Scheduled successfully: ' + response.data); } else { alert('Post Unsuccessful..' + response.error_data); } $('#fbShare').modal('hide'); }, error: function(xhr, status, error) { alert('An error occurred: ' + error); } }); } else { alert('Please select at least one page to ' + (action === 'postNow' ? 'post.' : 'schedule.')); } } function shareOnFB(title, link) { console.log(title); console.log(link); fbUpdateModalContent(title, link); $('#fbShare').modal('show'); } // Function to update modal content with the article title and link function fbUpdateModalContent(title, link) { $('#fbArticleTitle').val(title); // Set article title $('#fbArticleLink').val(link); // Set article link } $(document).ready(function() { // Function to handle posting $('#shareOnFacebook').click(function() { $('#fbShare').modal('show'); }); // When the modal is hidden, reset the scheduling elements $('#fbShare').on('hidden.bs.modal', function() { $('#fbScheduleDateTimeDiv').hide(); // Hide the date/time div $('#fbSchedulePost').hide(); // Hide the schedule post button $('#fbSetSchedule').show(); // Show the set schedule button $('#fbScheduleDateTime').val(''); // Reset the schedule date/time input $('.form-check-input').prop('checked', false); // Uncheck all checkboxes }); $('#fbSetSchedule').click(function() { $('#fbScheduleDateTimeDiv').show(); $('#fbSchedulePost').show(); $('#fbSetSchedule').hide(); }); // Post Now button click $('#fbPostNow').click(function() { fbhandlePost('postNow'); }); // Schedule Post button click $('#fbSchedulePost').click(function() { fbhandlePost('schedulePost'); }); }); </script> <script> function liHandlePost() { var articleTitle = $('#liArticleTitle').val(); var articleLink = $('#liArticleLink').val(); var articleText = $('#liArticleText').val(); var articleDesc = $('#liArticleDesc').val(); var postData = { title: articleTitle, link: articleLink, text: articleText, desc: articleDesc }; // AJAX call to the post handler $.ajax({ url: 'social_media/linkedin/linkedin_post_handler.php', // Update this path to your PHP file type: 'POST', data: JSON.stringify(postData), contentType: 'application/json', success: function(response) { if (response.status == 'success') { alert('Successfully Posted.'); } else { alert('Post Unsuccessful..' + response.error_data); } $('#liShare').modal('hide'); }, error: function(xhr, status, error) { alert('An error occurred: ' + error); } }); } function shareOnLI(title, link, desc) { liUpdateModalContent(title, link, desc); $('#liShare').modal('show'); } // Function to update modal content with the article title and link function liUpdateModalContent(title, link, desc) { $('#liArticleTitle').val(title); // Set article title $('#liArticleLink').val(link); // Set article link $('#liArticleText').val(title); $('#liArticleDesc').val(desc); } $(document).ready(function() { $('#liPostNow').click(function() { liHandlePost(); }); // // When the modal is hidden, reset the scheduling elements // $('#liShare').on('hidden.bs.modal', function() { // // $('#scheduleDateTimeDiv').hide(); // Hide the date/time div // // $('#schedulePost').hide(); // Hide the schedule post button // // $('#setSchedule').show(); // Show the set schedule button // // $('#scheduleDateTime').val(''); // Reset the schedule date/time input // $('.form-check-input').prop('checked', false); // Uncheck all checkboxes // }); // function fbhandlePost(action) { // var selectedPages = []; // $('.form-check-input:checked').each(function() { // selectedPages.push({ // id: $(this).val(), // name: $(this).next('label').text().trim() // Trim whitespace // }); // }); // var scheduleDateTime = $('#scheduleDateTime').val(); // var articleTitle = $('#articleTitle').val(); // var articleLink = $('#articleLink').val(); // if (selectedPages.length > 0) { // if (action === 'schedulePost' && !scheduleDateTime) { // alert('Please select a date and time to schedule the post.'); // return; // } // var postData = { // action: action, // pages: selectedPages, // title: articleTitle, // link: articleLink, // schedule: action === 'schedulePost' ? scheduleDateTime : undefined // }; // // AJAX call to the post handler // $.ajax({ // url: 'facebook/fb_post_handler.php', // Update this path to your PHP file // type: 'POST', // data: JSON.stringify(postData), // contentType: 'application/json', // success: function(response) { // if (response.status == 'success') { // alert(action === 'postNow' ? 'Post successful: ' : 'Scheduled successfully: ' + response.data); // } else { // alert('Post Unsuccessful..' + response.error_data); // } // $('#fbShare').modal('hide'); // }, // error: function(xhr, status, error) { // alert('An error occurred: ' + error); // } // }); // } else { // alert('Please select at least one page to ' + (action === 'postNow' ? 'post.' : 'schedule.')); // } // } }); </script> <script> $(document).ready(function() { $('.buttonCreamShare').on('click', function() { var postData = { act: 'showCreamShare', id: $(this).data('id') // Get the data-id attribute of the clicked button }; $.ajax({ url: 'process/get.section.utils.php', // Endpoint to send the request to method: 'POST', // HTTP method (POST) data: postData, // Data to send in the request success: function(response) { // Place the response inside the #responseModal body $('#responseModal .modal-body').html(response); // Show the modal $('#responseModal').modal('show'); }, error: function(xhr, status, error) { // Handle errors here console.error('Request failed: ' + error); // Optionally show an error message inside the modal $('#responseModal .modal-body').html('An error occurred while fetching the data.'); $('#responseModal').modal('show'); } }); }); // Open the modal when an email row is clicked $('.emailRow').on('click', function() { var postData = { act: 'emailForm', id: $(this).data('id') // Get the 'id' from the clicked element }; // Make an AJAX request to fetch the content for the modal $.ajax({ method: 'POST', url: '', // Add your URL here for processing the request data: postData, success: function(response) { // Assuming your response contains the HTML to be displayed in the modal $('#responseModal .modal-body').html(response); // Initialize TinyMCE once the content has been loaded into the modal tinymce.remove(); tinymce.init({ selector: 'textarea#sendBody', height: 400, statusbar: false, forced_root_block: '', force_br_newlines: true, force_p_newlines: false, file_picker_types: 'image', automatic_uploads: true, paste_data_images: true, invalid_elements: 'span', extended_valid_elements: 'script[src|async|defer|type|charset]', images_upload_url: 'process/upload.php', file_picker_callback: function(callback, value, meta) { var input = document.createElement('input'); input.setAttribute('type', 'file'); input.setAttribute('accept', 'image/*'); input.onchange = function() { var file = this.files[0]; var reader = new FileReader(); reader.onload = function() { var id = 'blob' + (new Date()).getTime(); var blobCache = tinymce.activeEditor.editorUpload.blobCache; var base64 = reader.result.split(',')[1]; var blobInfo = blobCache.create(id, file, base64); blobCache.add(blobInfo); callback(blobInfo.blobUri(), { title: file.name }); }; reader.readAsDataURL(file); }; input.click(); }, menubar: 'file edit view format', toolbar: 'undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | charmap | fullscreen preview | image media link', plugins: 'image imagetools code preview table charmap paste media autolink link', contextmenu: "link image imagetools table spellchecker lists" }); // Show the modal $('#responseModal').modal('show'); }, error: function(xhr, status, error) { console.error('AJAX Error: ' + error); } }); }); // Triggering the edit functionality when '.editRow' is clicked $('.editRow').on('click', function() { // Get the data-id attribute of the clicked element var itemId = $(this).data('id'); // Send AJAX request to fetch the content $.ajax({ type: 'POST', url: '', // Replace with your actual URL data: { act: 'editForm', id: itemId }, success: function(response) { // Inject the response into the modal body $('#responseModal .modal-body').html(response); // Initialize or reinitialize TinyMCE after loading the content tinymce.remove(); // Remove any existing TinyMCE instance tinymce.init({ selector: 'textarea#postBody', // The textarea we want to turn into a TinyMCE editor height: 400, statusbar: false, forced_root_block: '', force_br_newlines: true, force_p_newlines: false, file_picker_types: 'image', automatic_uploads: true, paste_data_images: true, invalid_elements: 'span', extended_valid_elements: 'script[src|async|defer|type|charset]', images_upload_url: 'process/upload.php', file_picker_callback: function(callback, value, meta) { var input = document.createElement('input'); input.setAttribute('type', 'file'); input.setAttribute('accept', 'image/*'); input.onchange = function() { var file = this.files[0]; var reader = new FileReader(); reader.onload = function() { var id = 'blob' + (new Date()).getTime(); var blobCache = tinymce.activeEditor.editorUpload.blobCache; var base64 = reader.result.split(',')[1]; var blobInfo = blobCache.create(id, file, base64); blobCache.add(blobInfo); callback(blobInfo.blobUri(), { title: file.name }); }; reader.readAsDataURL(file); }; input.click(); }, menubar: 'edit format', toolbar: 'undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | table | forecolor backcolor removeformat | code fullscreen preview | hr charmap image media link', plugins: 'image imagetools code preview table charmap paste media autolink link hr fullscreen lists', contextmenu: 'link image imagetools table spellchecker lists' }); // Open the modal (show the modal) $('#responseModal').modal('show'); }, error: function(xhr, status, error) { console.error('Error fetching content: ', error); alert('An error occurred while loading the content.'); } }); }); // Triggering the restore functionality when '.restoreRow' is clicked $('.restoreRow').on('click', function() { // Get the data-id attribute of the clicked element var itemId = $(this).data('id'); // Send AJAX request to fetch the content $.ajax({ type: 'POST', url: '', // Replace with your actual URL data: { act: 'restoreCollection', id: itemId }, success: function(response) { // Inject the response into the modal body $('#responseModal .modal-body').html(response); // Open the modal (show the modal) $('#responseModal').modal('show'); }, error: function(xhr, status, error) { console.error('Error fetching content: ', error); alert('An error occurred while restoring the collection.'); } }); }); // Archive Row action $('.archiveRow').on('click', function() { var itemId = $(this).data('id'); // Get the data-id attribute $.ajax({ type: 'POST', url: '', // Replace with your actual URL data: { act: 'archiveCollection', id: itemId }, success: function(response) { // Inject the response into the modal body $('#responseModal .modal-body').html(response); // Open the modal $('#responseModal').modal('show'); }, error: function(xhr, status, error) { console.error('Error archiving collection: ', error); alert('An error occurred while archiving the collection.'); } }); }); // Delete Row action $('.delRow').on('click', function() { var itemId = $(this).data('id'); // Get the data-id attribute $.ajax({ type: 'POST', url: '', // Replace with your actual URL data: { act: 'delCollection', id: itemId }, success: function(response) { // Inject the response into the modal body $('#responseModal .modal-body').html(response); // Open the modal $('#responseModal').modal('show'); }, error: function(xhr, status, error) { console.error('Error deleting collection: ', error); alert('An error occurred while deleting the collection.'); } }); }); }); </script> <script> function esamudaayshare(feedId) { console.log(feedId); $.ajax({ url: 'clients/esamudaay.php', method: 'POST', data: { feedId: feedId }, success: function(response) { // Handle success alert("Added to eSamudaay!!"); $('#eSamudaayShare').replaceWith(`<button class="btn btn-success" id="eSamudaayShare" disabled>Shared to eSamudaay</button>`); }, error: function(jqXHR, textStatus, errorThrown) { // Handle error console.error("Error:", textStatus, errorThrown); } }); } </script> </head> <body> <!-- Modal Structure --> <div class="modal fade" id="responseModal" tabindex="-1" role="dialog" aria-labelledby="responseModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <!-- Modal Header --> <div class="modal-header"> <h5 class="modal-title" id="responseModalLabel">Response</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <!-- Modal Body --> <div class="modal-body"> <!-- Response content will go here --> Loading... </div> <!-- Modal Footer --> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- Navbar --> <?php include 'assets/php/navbar.php' ?> <div class="container-fluid" style=" padding-bottom: 4rem; max-width:1440px"> <div id="panelContent"> <ol class="breadcrumb my-3"> <li class="breadcrumb-item w-100" style="justify-content: space-between;"> <div class="text-left "> <h4 class="m-0">My Collections</h4> </div> <div class="text-right "> <button type="button" id="buttonAddNewsletter" class="d-none btn btn-sm btn-success" onclick="chkAddNewsletter()">Generate Newsletter</button> <button type="button" id="buttonAddCovid" class="d-none btn btn-sm btn-success" onclick="chkAddCovid()">Add to Covid page</button> <button type="button" id="buttonAddLanding" class="d-none btn btn-sm btn-success" onclick="chkAddLanding()">Add to Showcase</button> </div> </li> </ol> <ul class="nav nav-tabs mb-4"> <li class="nav-item"><a class="nav-link<? if ($actAfter == '' || $actAfter == 'itemActive') { ?> active<? } ?>" data-toggle="tab" href="#itemActive" role="tab" onclick="gActAfter='itemActive'">Active</a></li> <li class="nav-item"><a class="nav-link<? if ($actAfter == 'myShowcase') { ?> active<? } ?>" data-toggle="tab" href="#myShowcase" role="tab" onclick="gActAfter='myShowcase'">My Showcase</a> </li> <li class="nav-item"><a class="nav-link<? if ($actAfter == 'itemSharedBy') { ?> active<? } ?>" data-toggle="tab" href="#itemSharedBy" role="tab" onclick="gActAfter='itemSharedBy'">Shared by me</a></li> <li class="nav-item"><a class="nav-link<? if ($actAfter == 'itemSharedWith') { ?> active<? } ?>" data-toggle="tab" href="#itemSharedWith" role="tab" onclick="gActAfter='itemSharedWith'">Shared with me</a></li> <li class="nav-item"><a class="nav-link<? if ($actAfter == 'itemArchived') { ?> active<? } ?>" data-toggle="tab" href="#itemArchived" role="tab" onclick="gActAfter='itemArchived'">Archived</a></li> </ul> <div class="tab-content my-3"> <div class="tab-pane fade<? if ($actAfter == '' || $actAfter == 'itemActive') { ?> show active<? } ?>" id="itemActive" role="tabpanel"> <div class="panelFeeds" style="max-height:calc(100vh - 245px)"> <? $sql = "SELECT id,title,url FROM user_collection WHERE user_id=$gUserId AND share_user_id IS NULL AND is_archive IS NULL ORDER BY id DESC"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { echo '<div class="p-2">You do not have any items in your collections!</div>'; } else { while ($row = mysqli_fetch_assoc($result)) { $collectionId = $row['id']; $collectionTitle = $row['title']; $collectionURL = $row['url']; $collectionPublisher = substr($collectionURL, strpos($collectionURL, ".") + 1); $collectionPublisher = ucfirst(strtok($collectionPublisher, '.')); if ($collectionPublisher == '') $collectionPublisher = 'Cream'; $collectionLink = '/view/' . $collectionId . '/' . createArticleURL($collectionTitle); if ($gUserSubdomain <> '') { $collectionLinkFull = 'https://' . $gUserSubdomain . '.knoblycream.com' . $collectionLink; } else { $collectionLinkFull = 'https://www.knoblycream.com' . $collectionLink; } ?> <div class="card p-0 mb-3 mr-2 border-0" style="background-color:#f5ede7"> <div class="card-body"> <div class="row"> <div class="col-12 col-md-10"> <h4 class="mb-0"><a href="<?= $collectionLinkFull ?>" target="_blank" style="color:#f26522"><?= $collectionTitle ?></a></h4> <div class="mb-3">Publisher: <?= $collectionPublisher ?></div> </div> <div class="col-12 col-md-2 text-center text-md-right my-2 m-md-0"> <? if ($collectionURL == '') { ?> <a href="#" title="Edit Item"><i data-id="<?= $collectionId ?>" class="editRow far fa-edit fa-lg text-muted pr-2"></i></a> <? } ?> <a href="#" title="Archive Item"><i data-id="<?= $collectionId ?>" class="archiveRow fas fa-download fa-lg text-muted pr-2"></i></a> <a href="#" title="Delete Item"><i data-id="<?= $collectionId ?>" class="delRow far fa-trash-alt fa-lg text-muted"></i></a> </div> </div> <div class="row"> <div class="col-12 col-md-5 text-center text-md-left"> <span id="panelShowcase_<?= $collectionId ?>"> <? $sql = "SELECT article_id FROM user_landing WHERE article_id=$collectionId"; $resultInner = mysqli_query($db, $sql); $numRowsInner = mysqli_num_rows($resultInner); if ($numRowsInner == 0) { ?> <label class="btn btn-outline-danger mb-2 m-0 px-2 py-1 float-left"><input type="checkbox" name="landingData" data-feed-id="<?= $collectionId ?>" onclick="addLanding()"> Select for Showcase</label> <? } else { ?> <div class="text-danger m-0 py-1 pr-3 float-left" style="user-select:none"> <i class="far fa-check-square"></i> Showcase (<a href="javascript:np()" onclick="removeShowcase(<?= $collectionId ?>)">Remove</a>) </div> <? } ?> </span> </div> <div class="data col-12 col-md-7 text-center text-md-right 1mt-2 1m-mt-0" data-feed-id="<?= $collectionId ?>" data-feed-title="<?= $collectionTitle ?>" data-feed-url="<?= $collectionLinkFull ?>" data-feed-publisher="<?= $collectionPublisher ?>"> <label class="btn-secondary px-2 py-1" style="user-select:none"><input type="checkbox" name="feedData" onclick="addNewsletter()"> Send to Newsletter</label> <label class="buttonCreamShare btn-info px-2 py-1 m-0" data-id="<?= $collectionId ?>" style="user-select:none">Cream<i>Share</i></label> <div style="display: inline-block; padding-bottom: 4px;"> <a href="#"><i data-id="<?= $collectionId ?>" class="emailRow fas fa-2x fa-envelope-square" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button pt-1" data-sbg-network="facebook" data-sbg-width="600" data-sbg-height="368"><i class="mt-1 fab fa-facebook-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="twitter" data-sbg-width="600" data-sbg-height="258"><i class="fab fa-twitter-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="linkedin" data-sbg-width="585" data-sbg-height="471"><i class="fab fa-linkedin fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="pinterest" data-sbg-width="600" data-sbg-height="368"><i class="fab fa-pinterest-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a href="http://web.whatsapp.com/send?text=<?= urlencode($collectionTitle) ?> <?= urlencode($collectionLinkFull) ?>" target="_blank"><i class="fab fa-2x fa-whatsapp-square" style="position:relative;top:5px;color:#6c757d;"></i></a> </div> <button class="btn btn-outline-secondary mic-button" id="shareOnFacebook" onclick='shareOnFB("<?= isset($collectionTitle) ? htmlspecialchars($collectionTitle, ENT_QUOTES) : "" ?>", "<?= isset($collectionURL) ? htmlspecialchars($collectionURL, ENT_QUOTES) : "" ?>")'> <i class="fab fa-facebook-f"></i> </button> <button class="btn btn-outline-secondary mic-button" id="shareOnLinkedin" onclick='shareOnLI(<?= json_encode($collectionTitle ?? "") ?>, <?= json_encode($collectionURL ?? "") ?>, <?= json_encode($feedDesc ?? "") ?>)'> <i class="fab fa-linkedin-in"></i> </button> <? esamudaayshare($collectionId, $gUserId) ?> </div> </div> </div> </div> <? } } ?> </div> </div> <div class="tab-pane fade<? if ($actAfter == 'myShowcase') { ?> show active<? } ?>" id="myShowcase" role="tabpanel"> <div class="panelFeeds" style="max-height:calc(100vh - 245px)"> <? $sql = "SELECT A.id,A.title,A.url FROM user_collection A,user_landing B WHERE A.id=B.article_id AND A.user_id=$gUserId ORDER BY A.id DESC"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { echo '<div class="p-2">You do not have selected any items for your Showcase!</div>'; } else { while ($row = mysqli_fetch_assoc($result)) { $collectionId = $row['id']; $collectionTitle = $row['title']; $collectionURL = $row['url']; $collectionPublisher = substr($collectionURL, strpos($collectionURL, ".") + 1); $collectionPublisher = ucfirst(strtok($collectionPublisher, '.')); if ($collectionPublisher == '') $collectionPublisher = 'Cream'; $collectionLink = '/view/' . $collectionId . '/' . createArticleURL($collectionTitle); if ($gUserSubdomain <> '') { $collectionLinkFull = 'https://' . $gUserSubdomain . '.knoblycream.com' . $collectionLink; } else { $collectionLinkFull = 'https://www.knoblycream.com' . $collectionLink; } ?> <div class="card p-0 mb-3 mr-2 border-0" style="background-color:#f5ede7"> <div class="card-body"> <div class="row"> <div class="col-12 col-md-10"> <h4 class="mb-0"><a href="<?= $collectionLinkFull ?>" target="_blank" style="color:#f26522"><?= $collectionTitle ?></a></h4> <div class="mb-3">Publisher: <?= $collectionPublisher ?></div> </div> <div class="col-12 col-md-2 text-center text-md-right my-2 m-md-0"> <? if ($collectionURL == '') { ?> <a href="#" title="Edit Item"><i data-id="<?= $collectionId ?>" class="editRow far fa-edit fa-lg text-muted pr-2"></i></a> <? } ?> <a href="#" title="Archive Item"><i data-id="<?= $collectionId ?>" class="archiveRow fas fa-download fa-lg text-muted pr-2"></i></a> <a href="#" title="Delete Item"><i data-id="<?= $collectionId ?>" class="delRow far fa-trash-alt fa-lg text-muted"></i></a> </div> </div> <div class="row"> <div class="col-12 col-md-4 text-center text-md-left"> <span id="panelShowcase_<?= $collectionId ?>"> <div class="text-danger py-1" style="user-select:none"><i class="far fa-check-square"></i> Showcase (<a href="javascript:np()" onclick="removeShowcase(<?= $collectionId ?>)">Remove</a>)</div> </span> </div> <div class="data col-12 col-md-8 text-center text-md-right mt-2 m-md-0" data-feed-id="<?= $collectionId ?>" data-feed-title="<?= $collectionTitle ?>" data-feed-url="<?= $collectionLinkFull ?>" data-feed-publisher="<?= $collectionPublisher ?>"> <label class="btn-secondary px-2 py-1" style="user-select:none"><input type="checkbox" name="feedData" onclick="addNewsletter()"> Send to Newsletter</label> <label class="buttonCreamShare btn-info px-2 py-1 m-0" data-id="<?= $collectionId ?>" style="user-select:none">Cream<i>Share</i></label> <div style="display: inline-block; padding-bottom: 4px; "> <a href="#"><i data-id="<?= $collectionId ?>" class="emailRow fas fa-2x fa-envelope-square" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button pt-1" data-sbg-network="facebook" data-sbg-width="600" data-sbg-height="368"><i class="mt-1 fab fa-facebook-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="twitter" data-sbg-width="600" data-sbg-height="258"><i class="fab fa-twitter-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="linkedin" data-sbg-width="585" data-sbg-height="471"><i class="fab fa-linkedin fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="pinterest" data-sbg-width="600" data-sbg-height="368"><i class="fab fa-pinterest-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a href="http://web.whatsapp.com/send?text=<?= $collectionTitle ?> <?= $collectionLinkFull ?>" target="_blank"><i class="fab fa-2x fa-whatsapp-square" style="position:relative;top:5px;color:#6c757d;"></i></a> </div> </div> </div> </div> </div> <? } } ?> </div> </div> <div class="tab-pane fade<? if ($actAfter == 'itemSharedBy') { ?> show active<? } ?>" id="itemSharedBy" role="tabpanel"> <div class="panelFeeds" style="max-height:calc(100vh - 260px)"> <? $sql = "SELECT id,title,url FROM user_collection WHERE share_user_id=$gUserId GROUP BY title,id ORDER BY title"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { echo '<div class="p-2">You have not shared items with anybody!</div>'; } else { while ($row = mysqli_fetch_assoc($result)) { $collectionId = $row['id']; $collectionTitle = $row['title']; $collectionURL = $row['url']; $collectionPublisher = substr($collectionURL, strpos($collectionURL, ".") + 1); $collectionPublisher = ucfirst(strtok($collectionPublisher, '.')); if ($collectionPublisher == '') $collectionPublisher = 'Cream'; $collectionLink = '/view/' . $collectionId . '/' . createArticleURL($collectionTitle); $collectionLinkFull = $collectionLink; ?> <div class="card p-0 mb-3 mr-2 border-0" style="background-color:#f5ede7"> <div class="card-body"> <div class="row"> <div class="col"> <h4><a href="<?= $collectionLink ?>" target="_blank" style="color:#f26522"><?= $collectionTitle ?></a></h4> </div> </div> <div class="row"> <div class="col-12 col-md-4 text-center text-md-left">Publisher: <?= $collectionPublisher ?> </div> <div class="col-12 col-md-8 text-center text-md-right my-2 m-md-0"> <? $txtSharedWith = ''; $sql = "SELECT B.full_name FROM user_collection A,user B WHERE A.user_id=B.id AND A.title='$collectionTitle' AND A.share_user_id=$gUserId ORDER BY B.full_name"; $resultInner = mysqli_query($db, $sql); while ($rowInner = mysqli_fetch_assoc($resultInner)) { $txtSharedWith .= $rowInner['full_name'] . ', '; } if ($txtSharedWith != '') $txtSharedWith = rtrim($txtSharedWith, ', '); ?> <label class="badge-warning m-0 px-3 py-1" style="user-select:none">Shared with <?= $txtSharedWith ?></label> </div> </div> </div> </div> <? } } ?> </div> </div> <div class="tab-pane fade<? if ($actAfter == 'itemSharedWith') { ?> show active<? } ?>" id="itemSharedWith" role="tabpanel"> <div class="panelFeeds" style="max-height:calc(100vh - 260px)"> <? $sql = "SELECT A.id,A.title,A.url,B.full_name FROM user_collection A,user B WHERE A.share_user_id=B.id AND A.user_id=$gUserId AND A.share_user_id IS NOT NULL AND A.is_archive IS NULL ORDER BY A.id DESC"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { echo '<div class="p-2">You do not have any shared items in your collections!</div>'; } else { while ($row = mysqli_fetch_assoc($result)) { $shareName = $row['full_name']; $collectionId = $row['id']; $collectionTitle = $row['title']; $collectionURL = $row['url']; $collectionPublisher = substr($collectionURL, strpos($collectionURL, ".") + 1); $collectionPublisher = ucfirst(strtok($collectionPublisher, '.')); if ($collectionPublisher == '') $collectionPublisher = 'Cream'; $collectionLink = '/view/' . $collectionId . '/' . createArticleURL($collectionTitle); $collectionLinkFull = 'https://www.knoblycream.com' . $collectionLink; ?> <div class="card p-0 mb-3 mr-2 border-0" style="background-color:#f5ede7"> <div class="card-body"> <div class="row"> <div class="col-12 col-md-10"> <h4><a href="<?= $collectionLink ?>" target="_blank" style="color:#f26522"><?= $collectionTitle ?></a></h4> <div class="mb-3">Publisher: <?= $collectionPublisher ?></div> </div> <div class="col-12 col-md-2 text-center text-md-right my-2 m-md-0"> <a href="#" title="Archive Item"><i data-id="<?= $collectionId ?>" class="archiveRow fas fa-download fa-lg text-muted pr-2"></i></a> <a href="#" title="Delete Item"><i data-id="<?= $collectionId ?>" class="delRow far fa-trash-alt fa-lg text-muted"></i></a> </div> </div> <div class="row"> <div class="col-12 col-md-4 text-center text-md-left"> <? $sql = "SELECT article_id FROM user_landing WHERE article_id=$collectionId"; $resultInner = mysqli_query($db, $sql); $numRowsInner = mysqli_num_rows($resultInner); if ($numRowsInner == 0) { ?> <label class="btn btn-outline-danger mr-3 px-2 py-1 float-left" style="user-select:none"><input type="checkbox" name="landingData" data-feed-id="<?= $collectionId ?>" onclick="addLanding()"> Select for Showcase</label> <? } else { ?> <div class="text-danger py-1 pr-3 float-left" style="user-select:none"><i class="far fa-check-square"></i> Showcase</div> <? } ?> </div> <div class="data col-12 col-md-8 text-center text-md-right mt-2 m-md-0" data-feed-id="<?= $collectionId ?>" data-feed-title="<?= $collectionTitle ?>" data-feed-url="<?= $collectionLinkFull ?>" data-feed-publisher="<?= $collectionPublisher ?>"> <label class="badge-warning px-3 py-1" style="user-select:none">Shared by <?= $shareName ?></label> <label class="btn-secondary px-2 py-1 mr-2" style="user-select:none"><input type="checkbox" name="feedData" onclick="addNewsletter()"> Send to Newsletter</label> <a href="#"><i data-id="<?= $collectionId ?>" class="emailRow fas fa-2x fa-envelope-square" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button pt-1" data-sbg-network="facebook" data-sbg-width="600" data-sbg-height="368"><i class="mt-1 fab fa-facebook-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="twitter" data-sbg-width="600" data-sbg-height="258"><i class="fab fa-twitter-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="linkedin" data-sbg-width="585" data-sbg-height="471"><i class="fab fa-linkedin fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a data-sbg-1="" data-sbg-2="" data-sbg-3="" class="sbg-button" data-sbg-network="pinterest" data-sbg-width="600" data-sbg-height="368"><i class="fab fa-pinterest-square fa-2x cursorH" style="position:relative;top:5px;color:#6c757d;"></i></a> <a href="http://web.whatsapp.com/send?text=<?= $collectionTitle ?> <?= $collectionLinkFull ?>" target="_blank"><i class="fab fa-2x fa-whatsapp-square" style="position:relative;top:5px;color:#6c757d;"></i></a> </div> </div> </div> </div> <? } } ?> </div> </div> <div class="tab-pane fade<? if ($actAfter == 'itemArchived') { ?> show active<? } ?>" id="itemArchived" role="tabpanel"> <div class="panelFeeds" style="max-height:calc(100vh - 260px)"> <? $sql = "SELECT A.id,A.title,A.url,B.full_name FROM user_collection A LEFT JOIN user B ON A.share_user_id=B.id WHERE A.user_id=$gUserId AND A.is_archive=1 ORDER BY id DESC"; $result = mysqli_query($db, $sql); $numRows = mysqli_num_rows($result); if ($numRows == 0) { echo '<div class="p-2">You do not have any archived items in your collections!</div>'; } else { while ($row = mysqli_fetch_assoc($result)) { $shareName = $row['full_name']; $collectionId = $row['id']; $collectionTitle = $row['title']; $collectionURL = $row['url']; $collectionPublisher = substr($collectionURL, strpos($collectionURL, ".") + 1); $collectionPublisher = ucfirst(strtok($collectionPublisher, '.')); if ($collectionPublisher == '') $collectionPublisher = 'Cream'; $collectionLink = '/view/' . $collectionId . '/' . createArticleURL($collectionTitle); ?> <div class="card p-0 mb-3 mr-2 border-0" style="background-color:#f5ede7"> <div class="card-body"> <div class="row"> <div class="col-12 col-md-10"> <h4><a href="<?= $collectionLink ?>" target="_blank" style="color:#f26522"><?= $collectionTitle ?></a></h4> </div> <div class="col-12 col-md-2 text-center text-md-right my-2 m-md-0"> <? if ($collectionURL == '') { ?> <a href="#" title="Edit Item"><i data-id="<?= $collectionId ?>" class="editRow far fa-edit fa-lg text-muted pr-2"></i></a> <? } ?> <a href="#" title="Restore Item"><i data-id="<?= $collectionId ?>" class="restoreRow fas fa-upload fa-lg text-muted pr-2"></i></a> <a href="#" title="Delete Item"><i data-id="<?= $collectionId ?>" class="delRow far fa-trash-alt fa-lg text-muted"></i></a> </div> </div> <div class="row"> <div class="col-12 col-md-8 text-center text-md-left">Publisher: <?= $collectionPublisher ?> </div> <? if ($shareName != '') { ?> <div class="col-12 col-md-4 text-center text-md-right mt-2 m-md-0"> <label class="badge-warning m-0 px-3 py-1" style="user-select:none">Shared by <?= $shareName ?></label> </div> <? } ?> </div> </div> </div> <? } } ?> </div> </div> </div> </div> </div> <div></div> <!-- Footer --> <div class="footer"> <p>© 2024 Knobly Consulting LLP. All rights reserved.</p> </div> <!-- Facebook Share Modal --> <? include '../facebook/function.php'; $fbLoggedStatus = facebook_login_status($db, $gUserId); ?> <div class="modal fade" id="fbShare" tabindex="-1" role="dialog" aria-labelledby="facebookSharePageModal" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="facebookSharePageModal">Share Through Facebook Pages</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <? if ($fbLoggedStatus) { ?> <div class="form-group"> <label for="fbArticleTitle">Enter the text to be shared:</label> <textarea id="fbArticleTitle" class="form-control" rows="3" placeholder=""></textarea> </div> <input type="hidden" id="fbArticleLink" class="form-control" value=""> <? $pages_data = facebook_fetch_user_pages($db, $gUserId); ?> <h5>Select Facebook Pages:</h5> <div class="list-group"> <?php foreach ($pages_data as $page_data) { ?> <div class="form-check"> <input class="form-check-input" type="checkbox" value="<?= $page_data['pages_id'] ?>" id="fbPage-<?= $page_data['pages_id'] ?>"> <label class="form-check-label" for="fbPage-<?= $page_data['pages_id'] ?>"> <?= $page_data['pages_name'] ?> </label> </div> <?php } ?> </div> <div id="fbScheduleDateTimeDiv" class="form-group" style="display: none;"> <label for="fbScheduleDateTime">Schedule Date and Time:</label> <input type="datetime-local" class="form-control" id="fbScheduleDateTime"> </div> <? } else { ?> You have not logged in to Facebook to use this feature. <? } ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <? if ($fbLoggedStatus) { ?> <button type="button" class="btn btn-primary" id="fbPostNow">Post Now</button> <button type="button" class="btn btn-info" id="fbSetSchedule">Schedule Post</button> <button type="button" class="btn btn-info" id="fbSchedulePost" style="display: none;">Schedule Now</button> <? } else { ?> <a href="facebook/facebook_setup.php"><button type="button" class="btn btn-primary">Setup Facebook</button></a> <? } ?> </div> </div> </div> </div> <!-- LinkedIn Share Modal --> <? $liLoggedStatus = true; include '../social_media/linkedin/linkedin_function.php'; // linkedin_login_status($db, $gUserId); ?> <div class="modal fade" id="liShare" tabindex="-1" role="dialog" aria-labelledby="linkedinSharePageModal" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="linkedinSharePageModal">Share Through LinkedIn</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <? if ($liLoggedStatus) { ?> <div class="form-group"> <label for="liArticleText">Enter the text to be shared:</label> <textarea id="liArticleText" class="form-control" rows="3" placeholder=""></textarea> </div> <input type="hidden" id="liArticleTitle" class="form-control" value=""> <input type="hidden" id="liArticleLink" class="form-control" value=""> <input type="hidden" id="liArticleDesc" class="form-control" value=""> <h5>Share to the LinkedIn Account:</h5> <div class="list-group"> <? // the LinkedIn account to be displayed linkedin_send_profile($db, $gUserId) ?> </div> <!-- Optional scheduling section --> <!-- <div id="liScheduleDateTimeDiv" class="form-group" style="display: none;"> <label for="liScheduleDateTime">Schedule Date and Time:</label> <input type="datetime-local" class="form-control" id="liScheduleDateTime"> </div> --> <? } else { ?> You have not logged in to LinkedIn to use this feature. <? } ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <? if ($liLoggedStatus) { ?> <button type="button" class="btn btn-primary" id="liPostNow">Post Now</button> <!-- Optional scheduling buttons --> <!-- <button type="button" class="btn btn-info" id="liSetSchedule">Schedule Post</button> <button type="button" class="btn btn-info" id="liSchedulePost" style="display: none;">Schedule Now</button> --> <? } else { ?> <a href="social_media/linkedin/linkedin_setup.php"><button type="button" class="btn btn-primary">Setup LinkedIn</button></a> <? } ?> </div> </div> </div> </div> </body> </html> <? } ?>