Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
SONGLY is a PHP-based song lyrics website that displays information about singers, songs, albums, and song lyrics. The application uses a MySQL database and serves dynamic content through PHP pages.
All PHP files use centralized database configuration from
config/db_config.php:
songbooks.asmart-test-dev.rurootj27119254_songThe connection is automatically established and closed using the config file. All pages use
require_once('config/db_config.php') to connect.
The application uses five main tables:
singer: Singer information (id_singer, name_singer, followers, contributions, description, image_path)songs: Song information (id_songs, name_songs, id_singer, number_of_auditions, image_path)albums: Album information (id_albums, name_albums, id_singer, year_of_release, image_path)textsong: Song lyrics (id_songs, producer, textsong)admin_users: Admin authentication (id, username, password_hash, created_at)Note: Image paths are now stored in the database as relative paths (e.g.,
images/singer/1.png) instead of being constructed from IDs.
index.php: Homepage displaying news and top charts
singer.php?id={id}: Singer detail page showing:
text_song.php?id={id}: Song lyrics page displaying:
songs and textsong tables to get complete informationsingers_list.php: List of all singers from database
songs_list.php: List of all songs from database
Images are stored in the filesystem with paths saved in the database:
images/singer/ directoryimages/song/ directoryimages/album/ directoryImage paths are stored in database columns (
image_path) as relative paths. The admin panel handles image uploads and updates the database accordingly.
All admin files are in the
/admin/ directory.
admin_login.php: Login page with session-based authenticationadmin_logout.php: Logout handlerauth_check.php: Authentication middleware (included at the top of all admin pages)password_hash() with PASSWORD_DEFAULTEach entity (singers, songs, albums) has a consistent CRUD pattern:
admin_{entity}.php: List/view all recordsadmin_{entity}_add.php: Add new recordadmin_{entity}_edit.php?id={id}: Edit existing recordadmin_{entity}_delete.php?id={id}: Delete record (with validation)Lyrics Management: Special case -
admin_lyrics.php and admin_lyrics_edit.php manage the textsong table.
admin/includes/upload_image.phpuploadImage(), deleteImage(), imageExists()All admin pages use Bootstrap 5.3.0 via CDN for UI components, with custom styles in
admin/css/admin_style.css.
This is a simple PHP project with no build system. To run locally:
# Start PHP built-in server php -S localhost:8000 # Or use MAMP/XAMPP and navigate to the project directory
After running the SQL setup (
database_full_setup.sql):
https://songbooks.asmart-test-dev.ru/admin/admin_login.phpadmin / admin123Note: Database
j27119254_song must exist before running the SQL script.
All PHP files use prepared statements with parameterized queries to prevent SQL injection. Input validation checks that IDs are numeric before querying the database.
password_hash() and password_verify()htmlspecialchars() on all user inputUse the admin panel at
/admin/ to:
If adding content directly to the database:
images/singer/, images/song/, images/album/)image_path column with the relative path (e.g., images/singer/1.png)$conn->prepare())$stmt->close())image_path in SELECT statements for imagesExecute SQL to add a new admin (hash password first with
password_hash()):
INSERT INTO admin_users (username, password_hash) VALUES ('newuser', 'hashed_password');