:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/crm/**
:: Editing File: work.txt
kreativepixelz_crm/ │ ├── config/ │ └── db.php → Database connection file │ ├── auth/ │ ├── login.php → Login form (email/password) │ ├── register.php → Register new user (Admin only) │ ├── logout.php → Logout script │ └── check_login.php → Login validation + role redirect │ ├── admin/ │ ├── dashboard.php → Admin dashboard (summary view) │ │ ├── leads/ │ │ ├── add_lead.php → Add new lead │ │ ├── view_leads.php → All leads list │ │ ├── edit_lead.php → Edit existing lead │ │ ├── assign_lead.php → Assign lead to user │ │ └── upload_csv.php → Bulk upload leads │ │ ├── clients/ │ │ ├── add_client.php → Add confirmed client │ │ ├── view_clients.php → List of all clients │ │ ├── edit_client.php → Edit client details │ │ └── client_profile.php → View full client info │ │ ├── work_section/ │ │ ├── view_work_section.php → List work categories (Graphic, Website, etc.) │ │ └── manage_work_section.php → Add/Edit work section │ │ ├── salary/ │ │ ├── salary_list.php → View salary and expenses │ │ ├── add_salary.php → Add salary entry │ │ └── expenses.php → Manage marketing & other expenses │ │ ├── tasks/ │ │ ├── add_task.php → Create new task │ │ ├── view_tasks.php → All assigned tasks │ │ └── update_task.php → Change task status │ │ ├── projects/ │ │ ├── add_project.php → Add new ongoing project │ │ ├── view_projects.php → View all projects │ │ └── edit_project.php → Edit or renew project │ │ ├── quotations/ │ │ ├── add_quotation.php → Add new quotation │ │ ├── view_quotations.php → List of quotations │ │ └── edit_quotation.php → Edit quotation details │ │ └── users/ │ ├── view_users.php → Manage users (admin panel) │ ├── add_user.php → Add new user │ └── edit_user.php → Edit existing user │ ├── user/ │ ├── dashboard.php → User dashboard │ ├── leads.php → View assigned leads │ ├── tasks.php → My assigned tasks │ ├── followup.php → Add follow-up updates │ ├── projects.php → My ongoing projects │ └── profile.php → User info & password update │ ├── includes/ │ ├── header.php → Common header (session start, meta, Bootstrap) │ ├── sidebar.php → Dynamic sidebar based on user role │ ├── navbar.php → Top navbar (logout, profile) │ ├── footer.php → Footer + JS scripts │ └── functions.php → Common reusable PHP functions │ ├── assets/ │ ├── css/ │ │ ├── style.css → Custom CSS │ │ └── bootstrap.min.css │ ├── js/ │ │ ├── main.js → Custom JS │ │ └── bootstrap.bundle.min.js │ ├── img/ │ │ ├── logo.png │ │ └── icons/ │ └── uploads/ │ ├── client_docs/ → Client invoices, logos, etc. │ └── project_files/ → Project-related uploads │ ├── reports/ │ ├── lead_report.php → Export lead data │ ├── project_report.php → Export project data │ ├── client_report.php → Export client details │ └── expense_report.php → Export salary/expenses │ ├── index.php → Redirect to login or dashboard ├── dashboard.php → Common redirect based on role └── README.md → Project documentation INSERT INTO users (name, email, password, role) VALUES ('Admin User', 'admin@kreativepixelz.com', MD5('admin#@!~'), 'admin'), -server admin ('Admin User', 'admin@kreativepixelz.com', MD5('admin123'), 'admin'), ('Sales User', 'sales@kreativepixelz.com', MD5('user123'), 'user'); ('Depali User', 'depali@kreativepixelz.com', MD5('depali123'), 'user'); -- Create Database CREATE DATABASE kreativepixelz_crm; USE kreativepixelz_crm; ----------------------------------------------------- -- 1. USERS TABLE (Admin & Employees) ----------------------------------------------------- CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, mobile VARCHAR(15), role ENUM('admin','user') DEFAULT 'user', status ENUM('active','inactive') DEFAULT 'active', created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); ----------------------------------------------------- -- 2. WORK SECTIONS TABLE (Service Categories) ----------------------------------------------------- CREATE TABLE work_sections ( id INT AUTO_INCREMENT PRIMARY KEY, section_name VARCHAR(100) NOT NULL, -- e.g. Website, Graphic, Video description VARCHAR(255), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); ----------------------------------------------------- -- 3. LEADS TABLE (All Inquiries) ----------------------------------------------------- CREATE TABLE leads ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, contact_number VARCHAR(15), location VARCHAR(100), email VARCHAR(100), business_name VARCHAR(150), enquiry_for VARCHAR(100), -- Related service comment TEXT, follow_up_date DATE, status ENUM('New','In Progress','Converted','Lost') DEFAULT 'New', assigned_to INT DEFAULT NULL, -- user.id created_by INT NOT NULL, -- user.id created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY (assigned_to) REFERENCES users(id) ON DELETE SET NULL, FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE ); ----------------------------------------------------- -- 4. CLIENT DETAILS TABLE ----------------------------------------------------- CREATE TABLE clients ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(150) NOT NULL, address TEXT, email VARCHAR(100), whatsapp VARCHAR(15), service_taken VARCHAR(150), domain_details VARCHAR(150), hosting_details VARCHAR(150), digital_marketing_start DATE, digital_marketing_end DATE, invoice_amount DECIMAL(10,2), amount_received DECIMAL(10,2), created_by INT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE ); ----------------------------------------------------- -- 5. SALARY & EXPENSES TABLE ----------------------------------------------------- CREATE TABLE expenses ( id INT AUTO_INCREMENT PRIMARY KEY, employee_name VARCHAR(100), month VARCHAR(20), salary_amount DECIMAL(10,2) DEFAULT 0.00, advance_taken DECIMAL(10,2) DEFAULT 0.00, marketing_expenses DECIMAL(10,2) DEFAULT 0.00, other_cost DECIMAL(10,2) DEFAULT 0.00, sundry_expenses DECIMAL(10,2) DEFAULT 0.00, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); ----------------------------------------------------- -- 6. TASKS TABLE ----------------------------------------------------- CREATE TABLE tasks ( id INT AUTO_INCREMENT PRIMARY KEY, assign_to INT NOT NULL, -- user.id task_type VARCHAR(100), task_description TEXT, task_status ENUM('Pending','In Progress','Completed','Delayed') DEFAULT 'Pending', created_by INT NOT NULL, -- user.id created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY (assign_to) REFERENCES users(id) ON DELETE CASCADE, FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE ); ----------------------------------------------------- -- 7. ONGOING PROJECTS TABLE ----------------------------------------------------- CREATE TABLE projects ( id INT AUTO_INCREMENT PRIMARY KEY, project_name VARCHAR(150) NOT NULL, client_id INT, work_section_id INT, deadline DATE, status ENUM('Ongoing','Completed','Pending','On Hold') DEFAULT 'Ongoing', renewal_date DATE, created_by INT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (client_id) REFERENCES clients(id) ON DELETE SET NULL, FOREIGN KEY (work_section_id) REFERENCES work_sections(id) ON DELETE SET NULL, FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE ); ----------------------------------------------------- -- 8. QUOTATIONS TABLE ----------------------------------------------------- CREATE TABLE quotations ( id INT AUTO_INCREMENT PRIMARY KEY, client_name VARCHAR(100), static_website DECIMAL(10,2) DEFAULT 0.00, dynamic_website DECIMAL(10,2) DEFAULT 0.00, digital_marketing DECIMAL(10,2) DEFAULT 0.00, video_editing_package DECIMAL(10,2) DEFAULT 0.00, created_by INT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE ); CREATE TABLE clients ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(150) NOT NULL, address TEXT, email VARCHAR(100), phone VARCHAR(15), service_taken VARCHAR(150), message TEXT, notes TEXT, domain_details VARCHAR(150), hosting_details VARCHAR(150), digital_marketing_details VARCHAR(150), invoice_amount DECIMAL(10,2), amount_details VARCHAR(150), client_convert_date date, created_by INT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP ); Domain Details id,clients_id,start_date,Expiry_Date,amount,renewal_date,renewal_amount,notes,comments,created_at,update_at Hosting Details id,clients_id,start_date,Expiry_Date,amount,renewal_date,renewal_amount,notes,comments,created_at,update_at, Design Details id,clients_id,start_date,Expiry_Date,services-varchar 255, amount,notes,comments,created_at,update_at payment Details id,clients_id,payment,payment recevied,payment_recevied_date,payment_remining,payment_remining_date,notes,comments,created_at,update_at expense table CREATE TABLE expenses ( id INT AUTO_INCREMENT PRIMARY KEY, team_id VARCHAR(100), expenses_date date, salary_amount DECIMAL(10,2) DEFAULT 0.00, advance_taken DECIMAL(10,2) DEFAULT 0.00, message text, services_expenses -- BULK WHATSAPP, Facebook, Marketing Expenses services_amount DECIMAL(10,2) DEFAULT 0.00, other_cost DECIMAL(10,2) DEFAULT 0.00, sundry_expenses DECIMAL(10,2) DEFAULT 0.00, notes,comments, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,update_at ); 🎨 4. Color Logic (for listing pages) Tasks Table 🟥 Pending → bg-danger text-white 🟨 In Progress → bg-warning text-dark 🟩 Completed → bg-success text-white Projects Table Renewal within 30 days → Highlight row with bg-warning-subtle Deadline today/past → Highlight row with bg-danger-subtle