Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
LiteSpeed
Server IP : 198.54.121.189 & Your IP : 216.73.216.47
Domains :
Cant Read [ /etc/named.conf ]
User : waldicsm
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
waldicsm /
ng.waldoksolutions.net /
Delete
Unzip
Name
Size
Permission
Date
Action
.well-known
[ DIR ]
drwxr-xr-x
2026-05-11 00:39
administrator
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
api
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
cache
[ DIR ]
drwxr-xr-x
2026-05-11 00:39
cgi-bin
[ DIR ]
drwxr-xr-x
2026-05-16 17:16
cli
[ DIR ]
drwxr-xr-x
2026-05-14 22:32
components
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
docs
[ DIR ]
drwxr-xr-x
2026-05-11 00:39
files
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
images
[ DIR ]
drwxr-xr-x
2026-05-11 00:37
includes
[ DIR ]
drwxr-xr-x
2026-05-11 00:37
install_fragments
[ DIR ]
drwxr-xr-x
2026-05-11 00:39
language
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
layouts
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
libraries
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
media
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
modules
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
plugins
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
templates
[ DIR ]
drwxr-xr-x
2026-05-09 01:10
tmp
[ DIR ]
drwxr-xr-x
2026-05-17 05:00
tools
[ DIR ]
drwxr-xr-x
2026-05-11 00:39
.htaccess
1.99
KB
-r--r--r--
2026-05-11 00:37
LICENSE.txt
17.67
KB
-rw-r--r--
2026-05-01 04:20
README.txt
5.53
KB
-rw-r--r--
2026-05-01 04:20
admin.php
496.7
KB
-rw-r--r--
2026-05-09 02:48
build_site.php
43.61
KB
-rw-r--r--
2026-05-05 16:05
bump_media.php
912
B
-rw-r--r--
2026-05-02 02:24
configuration.bak.php
2.88
KB
-rw-r--r--
2026-05-06 01:57
configuration.php
4.04
KB
-rw-r--r--
2026-05-06 01:57
debug_all_images.php
1.58
KB
-rw-r--r--
2026-05-02 01:52
debug_assets_table.php
1.85
KB
-rw-r--r--
2026-05-02 01:52
debug_compare.php
2.14
KB
-rw-r--r--
2026-05-02 01:52
debug_css.php
1.8
KB
-rw-r--r--
2026-05-02 01:52
debug_ext.php
1.52
KB
-rw-r--r--
2026-05-02 01:52
debug_hero.php
1.49
KB
-rw-r--r--
2026-05-02 01:52
debug_version.php
1.93
KB
-rw-r--r--
2026-05-02 01:52
debug_wa.php
766
B
-rw-r--r--
2026-05-02 01:52
ensure_ng_about_article.php
12.13
KB
-rw-r--r--
2026-05-03 18:45
ensure_ng_footer_modules.php
5.51
KB
-rw-r--r--
2026-05-05 16:09
ensure_ng_leadership_module.php
2.29
KB
-rw-r--r--
2026-05-05 14:15
ensure_ng_team_module.php
3.19
KB
-rw-r--r--
2026-05-05 15:29
fix_age_cards.php
2.9
KB
-rw-r--r--
2026-05-02 02:55
fix_age_cards2.php
4.61
KB
-rw-r--r--
2026-05-05 14:54
fix_assets.php
2.37
KB
-rw-r--r--
2026-05-02 01:52
fix_hero_images.php
1.73
KB
-rw-r--r--
2026-05-02 01:52
fix_menu_module.php
3.7
KB
-rw-r--r--
2026-05-02 02:05
fix_ng_phone_placeholders.php
5.12
KB
-rw-r--r--
2026-05-03 23:19
fix_services_age.php
2.72
KB
-rw-r--r--
2026-05-02 02:45
fix_sidebar_menu.php
436
B
-rw-r--r--
2026-05-02 02:14
fix_template.php
3.35
KB
-rw-r--r--
2026-05-02 01:52
htaccess.txt
6.74
KB
-rw-r--r--
2026-05-01 04:20
index.php
22.65
KB
-r--r--r--
2026-05-11 00:37
patch_contacts_article_form.php
3.47
KB
-rw-r--r--
2026-05-05 16:09
patch_hero_fullbleed_slide.php
1.33
KB
-rw-r--r--
2026-05-03 06:14
revert_hero_fullbleed.php
1.2
KB
-rw-r--r--
2026-05-03 06:40
robots.txt
102
B
-rw-r--r--
2026-05-11 00:37
strip_ng_stats_from_custom_modules.php
3.23
KB
-rw-r--r--
2026-05-05 14:43
txets.php
5.12
KB
-r--r--r--
2026-05-09 01:10
update_age_images_nigeria.php
1.19
KB
-rw-r--r--
2026-05-02 03:03
web.config.txt
2.9
KB
-rw-r--r--
2026-05-01 04:20
Save
Rename
<?php /** * Creates or updates the Nigeria "About Us" article (alias: about) and the main menu "About" link. * * Usage: * php ensure_ng_about_article.php * php ensure_ng_about_article.php --diag * * Run from the folder that contains this file and configuration.php (Joomla root). * Requires install_fragments/about_us.html next to this script. * * Web path for images/links: configuration.php → live_site (URL path); if empty, defaults to /joomla/ng2. */ declare(strict_types=1); require_once __DIR__ . '/configuration.php'; function ng_web_path_prefix(JConfig $config): string { $live = isset($config->live_site) ? trim((string) $config->live_site) : ''; if ($live !== '') { $path = parse_url($live, PHP_URL_PATH); if (is_string($path) && $path !== '' && $path !== '/') { return rtrim($path, '/'); } return ''; } return '/joomla/ng2'; } function ng_default_catid(mysqli $conn, string $prefix): int { $res = $conn->query("SELECT id FROM {$prefix}categories WHERE extension='com_content' AND published=1 ORDER BY lft ASC LIMIT 1"); if ($res && ($row = $res->fetch_assoc())) { return (int) $row['id']; } return 2; } /** First usable admin user (Joomla FK on created_by). */ function ng_admin_user_id(mysqli $conn, string $prefix): int { $r = $conn->query("SELECT id FROM {$prefix}users WHERE id = 1 AND block = 0 LIMIT 1"); if ($r && $r->num_rows) { return 1; } $r2 = $conn->query("SELECT id FROM {$prefix}users WHERE block = 0 ORDER BY id ASC LIMIT 1"); if ($r2 && ($u = $r2->fetch_assoc())) { return (int) $u['id']; } return 1; } /** * Workflow stage id to use in workflow_associations (published when possible). * Joomla 4 used #__workflow_stages.condition; some Joomla 6 DBs omit that column. */ function ng_published_stage_id(mysqli $conn, string $prefix): int { $t = "{$prefix}workflow_stages"; $chk = $conn->query("SHOW TABLES LIKE '{$t}'"); if (!$chk || $chk->num_rows === 0) { return 1; } $hasCondition = false; $desc = $conn->query("SHOW COLUMNS FROM `{$t}`"); if ($desc) { while ($row = $desc->fetch_assoc()) { if (($row['Field'] ?? '') === 'condition') { $hasCondition = true; break; } } } if ($hasCondition) { $r = $conn->query("SELECT id FROM `{$t}` WHERE `condition` = 1 ORDER BY id ASC LIMIT 1"); if ($r && ($row = $r->fetch_assoc())) { return (int) $row['id']; } } $wf = "{$prefix}workflows"; $wfChk = $conn->query("SHOW TABLES LIKE '{$wf}'"); if ($wfChk && $wfChk->num_rows > 0) { $r2 = $conn->query( "SELECT s.id FROM `{$t}` AS s INNER JOIN `{$wf}` AS w ON w.id = s.workflow_id " . "WHERE w.`default` = 1 AND s.`default` = 1 AND w.extension IN ('com_content', 'com_content.article') " . "LIMIT 1" ); if ($r2 && ($row = $r2->fetch_assoc())) { return (int) $row['id']; } $r3 = $conn->query( "SELECT s.id FROM `{$t}` AS s INNER JOIN `{$wf}` AS w ON w.id = s.workflow_id " . "WHERE w.`default` = 1 AND w.extension IN ('com_content', 'com_content.article') " . "ORDER BY s.ordering ASC, s.id ASC LIMIT 1" ); if ($r3 && ($row = $r3->fetch_assoc())) { return (int) $row['id']; } } $r4 = $conn->query("SELECT id FROM `{$t}` ORDER BY id ASC LIMIT 1"); if ($r4 && ($row = $r4->fetch_assoc())) { return (int) $row['id']; } return 1; } function ng_sync_workflow_association(mysqli $conn, string $prefix, int $articleId, int $stageId): void { $t = "{$prefix}workflow_associations"; $chk = $conn->query("SHOW TABLES LIKE '{$t}'"); if (!$chk || $chk->num_rows === 0) { return; } $conn->query("INSERT INTO {$t} (item_id, stage_id, extension) VALUES ({$articleId}, {$stageId}, 'com_content.article') ON DUPLICATE KEY UPDATE stage_id={$stageId}"); } function ng_run_diag(mysqli $conn, string $prefix, string $fragment, JConfig $config): void { echo "--- Diagnostics ---\n"; echo 'DB: ' . ($config->db ?? '') . " Host: " . ($config->host ?? '') . " Prefix: {$prefix}\n"; echo 'Fragment readable: ' . (is_readable($fragment) ? 'yes' : 'NO') . " ({$fragment})\n"; echo 'live_site: ' . ($config->live_site ?? '(empty)') . "\n"; echo 'Computed web base path: ' . ng_web_path_prefix($config) . "\n"; $r = $conn->query("SELECT id, title, alias, state, catid, asset_id, LENGTH(introtext) AS intro_len FROM {$prefix}content WHERE alias = 'about' OR title LIKE '%About Us%'"); echo "Matching articles:\n"; if ($r && $r->num_rows) { while ($row = $r->fetch_assoc()) { echo ' id=' . $row['id'] . ' title=' . $row['title'] . ' alias=' . $row['alias'] . ' state=' . $row['state'] . ' catid=' . $row['catid'] . ' asset_id=' . $row['asset_id'] . ' intro_len=' . $row['intro_len'] . "\n"; } } else { echo " (none)\n"; } $m = $conn->query("SELECT id, title, alias, link, published, menutype FROM {$prefix}menu WHERE client_id=0 AND (alias='about' OR link LIKE '%view=article%') ORDER BY id DESC LIMIT 8"); echo "Recent menu rows (about / articles):\n"; if ($m && $m->num_rows) { while ($row = $m->fetch_assoc()) { echo ' id=' . $row['id'] . ' ' . $row['menutype'] . ' ' . $row['title'] . ' alias=' . $row['alias'] . ' pub=' . $row['published'] . "\n link=" . $row['link'] . "\n"; } } $st = $conn->query("SHOW TABLES LIKE '{$prefix}workflow_stages'"); if ($st && $st->num_rows) { $c = $conn->query("SELECT COUNT(*) AS c FROM {$prefix}workflow_stages"); $n = $c ? $c->fetch_assoc()['c'] : 0; echo "workflow_stages rows: {$n}\n"; } echo "--- End diagnostics ---\n\n"; } $diag = in_array('--diag', $argv ?? [], true); $config = new JConfig(); $conn = new mysqli($config->host, $config->user, $config->password, $config->db); if ($conn->connect_error) { die('DB Connection Error: ' . $conn->connect_error . "\n"); } $conn->set_charset('utf8mb4'); $p = $config->dbprefix; $fragment = __DIR__ . '/install_fragments/about_us.html'; if ($diag) { ng_run_diag($conn, $p, $fragment, $config); } if (!is_readable($fragment)) { die("Missing file: {$fragment}\nUpload install_fragments/about_us.html next to this script.\n"); } $base = ng_web_path_prefix($config); $html = str_replace('{{BASE}}', $base, file_get_contents($fragment)); $htmlEsc = $conn->real_escape_string($html); $title = 'About Us'; $titleEsc = $conn->real_escape_string($title); $alias = 'about'; $aliasEsc = $conn->real_escape_string($alias); $now = date('Y-m-d H:i:s'); $catid = ng_default_catid($conn, $p); $uid = ng_admin_user_id($conn, $p); $stageId = ng_published_stage_id($conn, $p); $metadata = $conn->real_escape_string('{"robots":"","author":"","rights":""}'); $attribs = $conn->real_escape_string('{"show_title":"0","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","info_block_show_title":"","show_category":"","show_parent_category":"","show_associations":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_page_title":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}'); $images = $conn->real_escape_string('{"image_intro":"","image_intro_alt":"","image_intro_caption":"","float_intro":"","image_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":"","float_fulltext":""}'); $urls = $conn->real_escape_string('{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}'); $exists = $conn->query("SELECT id, state FROM {$p}content WHERE alias='{$aliasEsc}' ORDER BY (state >= 0) DESC, id DESC LIMIT 1")->fetch_assoc(); if ($exists) { $id = (int) $exists['id']; $sql = "UPDATE {$p}content SET introtext='{$htmlEsc}', title='{$titleEsc}', state=1, modified='{$now}', modified_by={$uid}, catid={$catid}, checked_out=0, checked_out_time=NULL, publish_up='{$now}', access=1, language='*', featured=0 WHERE id={$id}"; if (!$conn->query($sql)) { die("UPDATE content failed: {$conn->error}\n"); } echo "Updated article \"{$title}\" (id={$id}).\n"; } else { $sql = "INSERT INTO {$p}content ( asset_id, title, alias, introtext, `fulltext`, state, catid, created, created_by, modified, modified_by, checked_out, checked_out_time, publish_up, publish_down, access, language, featured, hits, metadata, attribs, images, urls, note, version ) VALUES ( 0, '{$titleEsc}', '{$aliasEsc}', '{$htmlEsc}', '', 1, {$catid}, '{$now}', {$uid}, '{$now}', {$uid}, 0, NULL, '{$now}', NULL, 1, '*', 0, 0, '{$metadata}', '{$attribs}', '{$images}', '{$urls}', '', 1 )"; if (!$conn->query($sql)) { die("INSERT content failed: {$conn->error}\nTry: php ensure_ng_about_article.php --diag\n"); } $id = (int) $conn->insert_id; echo "Created article \"{$title}\" (id={$id}).\n"; $parentAsset = $conn->query("SELECT id FROM {$p}assets WHERE name='com_content.category.{$catid}' LIMIT 1")->fetch_assoc(); $parentId = $parentAsset ? (int) $parentAsset['id'] : 1; if ($conn->query("INSERT INTO {$p}assets (parent_id, name, title, rules) VALUES ({$parentId}, 'com_content.article.{$id}', '{$titleEsc}', '{\"core.delete\":{},\"core.edit\":{},\"core.edit.state\":{}}')")) { $assetId = (int) $conn->insert_id; if ($assetId > 0) { $conn->query("UPDATE {$p}content SET asset_id={$assetId} WHERE id={$id}"); } } } ng_sync_workflow_association($conn, $p, $id, $stageId); $comRow = $conn->query("SELECT extension_id FROM {$p}extensions WHERE element='com_content' AND type='component' LIMIT 1")->fetch_assoc(); if (!$comRow) { die("com_content component not found.\n"); } $comId = (int) $comRow['extension_id']; $params = json_encode([ 'show_page_heading' => '0', 'show_title' => '0', 'show_category' => '0', 'show_author' => '0', 'show_create_date' => '0', 'show_modify_date' => '0', 'show_publish_date' => '0', 'show_item_navigation' => '0', 'show_hits' => '0', 'show_tags' => '0', 'show_info_block' => '0', ]); $paramsEsc = $conn->real_escape_string($params); $menu = $conn->query("SELECT id FROM {$p}menu WHERE alias='{$aliasEsc}' AND menutype='mainmenu' AND client_id=0 LIMIT 1")->fetch_assoc(); if ($menu) { if (!$conn->query("UPDATE {$p}menu SET type='component', component_id={$comId}, link='index.php?option=com_content&view=article&id={$id}', params='{$paramsEsc}', published=1 WHERE id=" . (int) $menu['id'])) { die("UPDATE menu failed: {$conn->error}\n"); } echo "Updated main menu item \"About\" (id=" . (int) $menu['id'] . ").\n"; } else { $maxRgt = $conn->query("SELECT MAX(rgt) AS m FROM {$p}menu WHERE menutype='mainmenu' AND client_id=0")->fetch_assoc(); $lft = (int) (($maxRgt['m'] ?? 0) + 1); $rgt = $lft + 1; $menuTitleEsc = $conn->real_escape_string('About'); $insMenu = "INSERT INTO {$p}menu (menutype, title, alias, path, link, type, published, parent_id, level, component_id, access, language, params, lft, rgt, client_id) VALUES ('mainmenu', '{$menuTitleEsc}', '{$aliasEsc}', '{$aliasEsc}', 'index.php?option=com_content&view=article&id={$id}', 'component', 1, 1, 1, {$comId}, 1, '*', '{$paramsEsc}', {$lft}, {$rgt}, 0)"; if (!$conn->query($insMenu)) { die("INSERT menu failed: {$conn->error}\n"); } echo "Created main menu item \"About\" (id=" . (int) $conn->insert_id . ").\n"; } $conn->close(); echo "\nNext steps:\n"; echo "1) Administrator → System → Clear Cache\n"; echo "2) Content → Articles: filter Status = Published, Category = All; search \"About Us\"\n"; echo "3) If still empty: Content → Articles → filter Status = **Trashed** and restore/delete duplicates named About.\n"; echo "4) Image URLs in this article use base: {$base} — set live_site in configuration.php if paths are wrong on production.\n";