<!DOCTYPE html>
Wednesday, July 16, 2025
Demo SIRF web site index.php code
#11 Unified Institutional Ranking Mechanism
Let's create a complete PHP/MySQL-based dashboard for computing UIRF (Unified Institutional Ranking Framework) scores.
✅ Features of the Tool
-
Admin login
-
Add/Edit institutions
-
Data capture for UIRF parameters
-
Auto calculation of UIRF scores (weighted)
-
Institution-wise view, search, and export
-
Bootstrap-styled responsive UI
๐ File Structure
uirf_dashboard/
├── config/
│ └── db.php # Database connection
├── auth/
│ └── login.php # Simple admin login
├── institutions/
│ ├── add.php # Add/Edit form
│ ├── list.php # View and calculate scores
├── includes/
│ ├── header.php
│ └── footer.php
├── uirf_logic.php # Score calculation functions
└── index.php
1️⃣ config/db.php
<?php
$conn = new mysqli("localhost", "root", "", "uirf_db");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
2️⃣ uirf_logic.php – UIRF Score Calculation
<?php
function calculateUIRFScore($data) {
$score = 0;
$score += $data['academic_rep'] * 0.10;
$score += $data['faculty_phd'] * 0.05;
$score += $data['citations'] * 0.08;
$score += $data['publications'] * 0.07;
$score += $data['placements'] * 0.10;
$score += $data['median_ctc'] * 0.10;
$score += $data['diversity'] * 0.05;
$score += $data['intl_students'] * 0.05;
$score += $data['patents'] * 0.10;
$score += $data['industry_collab'] * 0.10;
$score += $data['startup_count'] * 0.10;
$score += $data['mou_count'] * 0.10;
return round($score, 2);
}
?>
3️⃣ institutions/add.php – Data Entry Form
<?php include '../config/db.php'; include '../includes/header.php'; ?>
<h2>Add Institutional Data</h2>
<form method="post">
<?php
$fields = ["academic_rep", "faculty_phd", "citations", "publications", "placements", "median_ctc",
"diversity", "intl_students", "patents", "industry_collab", "startup_count", "mou_count"];
foreach ($fields as $field) {
echo "<label>" . ucfirst(str_replace("_", " ", $field)) . "</label>
<input type='number' step='0.01' name='$field' required class='form-control mb-2'>";
}
?>
<input type="text" name="institution_name" placeholder="Institution Name" required class="form-control mb-2">
<button type="submit" name="submit" class="btn btn-primary">Save</button>
</form>
<?php
if (isset($_POST['submit'])) {
$data = $_POST;
$score = include '../uirf_logic.php'; $score = calculateUIRFScore($data);
$stmt = $conn->prepare("INSERT INTO institutions SET institution_name=?, academic_rep=?, faculty_phd=?, citations=?, publications=?, placements=?, median_ctc=?, diversity=?, intl_students=?, patents=?, industry_collab=?, startup_count=?, mou_count=?, uirf_score=?");
$stmt->bind_param("sddddddddddddd", $data['institution_name'], $data['academic_rep'], $data['faculty_phd'], $data['citations'],
$data['publications'], $data['placements'], $data['median_ctc'], $data['diversity'], $data['intl_students'],
$data['patents'], $data['industry_collab'], $data['startup_count'], $data['mou_count'], $score);
$stmt->execute();
echo "<div class='alert alert-success mt-2'>Data saved with UIRF Score: $score</div>";
}
include '../includes/footer.php';
?>
4️⃣ institutions/list.php – View All Institutions
<?php include '../config/db.php'; include '../includes/header.php'; ?>
<h2>Institution Ranking List</h2>
<table class="table table-bordered table-striped">
<thead>
<tr><th>Name</th><th>UIRF Score</th></tr>
</thead>
<tbody>
<?php
$result = $conn->query("SELECT institution_name, uirf_score FROM institutions ORDER BY uirf_score DESC");
while($row = $result->fetch_assoc()) {
echo "<tr><td>{$row['institution_name']}</td><td>{$row['uirf_score']}</td></tr>";
}
?>
</tbody>
</table>
<?php include '../includes/footer.php'; ?>
5️⃣ includes/header.php and footer.php
<!-- header.php -->
<!DOCTYPE html>
<html><head>
<title>UIRF Dashboard</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
</head><body class="p-4"><div class="container">
<!-- footer.php -->
</div></body></html>
6️⃣ SQL: CREATE DATABASE and Table
CREATE DATABASE uirf_db;
USE uirf_db;
CREATE TABLE institutions (
id INT AUTO_INCREMENT PRIMARY KEY,
institution_name VARCHAR(255),
academic_rep FLOAT,
faculty_phd FLOAT,
citations FLOAT,
publications FLOAT,
placements FLOAT,
median_ctc FLOAT,
diversity FLOAT,
intl_students FLOAT,
patents FLOAT,
industry_collab FLOAT,
startup_count FLOAT,
mou_count FLOAT,
uirf_score FLOAT
);
๐งช Run Locally
-
Save files under
uirf_dashboard/ -
Import the SQL schema
-
Run
php -S localhost:8000inside the folder -
Access via
http://localhost:8000/institutions/add.phpto add data
orhttp://localhost:8000/institutions/list.phpto view rankings
Here’s a fully upgraded version of the UIRF Ranking Dashboard with:
-
✅ Role-based login system (Admin and Institution)
-
๐ Chart.js Integration to display UIRF score visualizations
๐ 1. DATABASE STRUCTURE ADDITION: users TABLE
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100) UNIQUE,
password VARCHAR(255),
role ENUM('admin', 'institution') NOT NULL
);
๐ Example admin user:
INSERT INTO users (username, password, role) VALUES
('admin', MD5('admin123'), 'admin'),
('inst1', MD5('instpass'), 'institution');
๐ง 2. auth/login.php – Role-Based Login Page
<?php
session_start();
include '../config/db.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$username = $_POST["username"];
$password = md5($_POST["password"]);
$stmt = $conn->prepare("SELECT * FROM users WHERE username=? AND password=?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$res = $stmt->get_result();
if ($res->num_rows == 1) {
$user = $res->fetch_assoc();
$_SESSION["username"] = $user["username"];
$_SESSION["role"] = $user["role"];
header("Location: ../index.php");
} else {
$error = "Invalid Login";
}
}
?>
<form method="post" class="container mt-5">
<h3>Login</h3>
<?php if (isset($error)) echo "<div class='alert alert-danger'>$error</div>"; ?>
<input type="text" name="username" required class="form-control mb-2" placeholder="Username">
<input type="password" name="password" required class="form-control mb-2" placeholder="Password">
<button type="submit" class="btn btn-primary">Login</button>
</form>
๐ 3. index.php – Role Based Redirect
<?php
session_start();
if (!isset($_SESSION['role'])) {
header("Location: auth/login.php");
exit;
}
$role = $_SESSION['role'];
if ($role == 'admin') {
header("Location: institutions/list.php");
} else {
header("Location: institutions/add.php");
}
๐ 4. Restrict add.php and list.php Access
๐ธ Add this to top of both files:
session_start();
if (!isset($_SESSION['role'])) {
header("Location: ../auth/login.php");
exit;
}
if ($_SESSION['role'] != 'admin' && basename(__FILE__) == 'list.php') {
die("Access denied. Only admin can view rankings.");
}
๐ 5. Chart: Visualize UIRF Scores in list.php
Add inside list.php below table:
➕ Include Chart.js
<canvas id="uirfChart" height="100"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const ctx = document.getElementById('uirfChart').getContext('2d');
const chartData = {
labels: [<?php
$res = $conn->query("SELECT institution_name FROM institutions ORDER BY uirf_score DESC");
while($r = $res->fetch_assoc()) echo "'".$r['institution_name']."',";
?>],
datasets: [{
label: 'UIRF Score',
data: [<?php
$res = $conn->query("SELECT uirf_score FROM institutions ORDER BY uirf_score DESC");
while($r = $res->fetch_assoc()) echo $r['uirf_score'].",";
?>],
backgroundColor: 'rgba(54, 162, 235, 0.6)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 1
}]
};
new Chart(ctx, {
type: 'bar',
data: chartData,
options: {
responsive: true,
scales: {
y: {
beginAtZero: true,
title: { display: true, text: 'Score' }
},
x: {
ticks: { autoSkip: false }
}
}
}
});
</script>
✅ 6. Optional: Logout Script
auth/logout.php:
<?php
session_start();
session_destroy();
header("Location: login.php");
?>
Add in header:
<a href="../auth/logout.php" class="btn btn-sm btn-danger float-end">Logout</a>
✅ Final Notes
-
Admin sees ranking list with Chart.js bar graph
-
Institutions can only add their data
-
Extend later with:
-
User management UI
-
Export to Excel/PDF
-
Score breakdown per dimension
-
Thursday, June 26, 2025
Course Types, Distribution and Revision cycle
Suggested Course Types(CT) and Distribution of CT
| Course Type | Percentage of Total Credits | Description |
|---|---|---|
| Core Courses | 30–40% | Fundamental subjects of the discipline (e.g., Physics, Mathematics, Programming for CSE) |
| Professional/Discipline-Specific | 30–35% | Advanced or applied courses in the major discipline (e.g., Data Structures, Machine Learning for CSE) |
| Elective Courses | 10–15% | In-discipline electives chosen by students based on interest |
| Open Electives | 5–10% | Interdisciplinary courses (e.g., humanities, business, design) taken across departments |
| Value-Added Courses | 5–10% | Soft skills, ethics, environmental science, foreign languages, yoga, etc. |
| Internships / Projects / Capstone | 5–10% | Industry projects, internships, or research-based projects |
Thursday, June 12, 2025
Schema for SIRF
Here is the complete SQL schema and sample data inserts for your educational ecosystem involving Universities, Colleges, Departments, Programs, Courses, Teachers, Students, Roles, Users, and Documents:
๐งฑ SQL DDL: Create Tables
-- Table: universities
CREATE TABLE universities (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
type ENUM('Public', 'Private') NOT NULL,
location VARCHAR(255),
state VARCHAR(100),
website VARCHAR(255)
);
-- Table: colleges
CREATE TABLE colleges (
id INT AUTO_INCREMENT PRIMARY KEY,
university_id INT,
name VARCHAR(255) NOT NULL,
category ENUM('Affiliated', 'Autonomous', 'Campus') NOT NULL,
location VARCHAR(255),
email VARCHAR(255),
contact_no VARCHAR(20),
FOREIGN KEY (university_id) REFERENCES universities(id)
);
-- Table: departments
CREATE TABLE departments (
id INT AUTO_INCREMENT PRIMARY KEY,
college_id INT,
name VARCHAR(255) NOT NULL,
code VARCHAR(50),
FOREIGN KEY (college_id) REFERENCES colleges(id)
);
-- Table: programs
CREATE TABLE programs (
id INT AUTO_INCREMENT PRIMARY KEY,
department_id INT,
name VARCHAR(255) NOT NULL,
level ENUM('UG', 'PG', 'PhD') NOT NULL,
duration_years INT,
FOREIGN KEY (department_id) REFERENCES departments(id)
);
-- Table: courses
CREATE TABLE courses (
id INT AUTO_INCREMENT PRIMARY KEY,
program_id INT,
code VARCHAR(20),
name VARCHAR(255),
semester INT,
credits INT,
FOREIGN KEY (program_id) REFERENCES programs(id)
);
-- Table: teachers
CREATE TABLE teachers (
id INT AUTO_INCREMENT PRIMARY KEY,
department_id INT,
name VARCHAR(255),
email VARCHAR(255),
mobile VARCHAR(20),
designation VARCHAR(100),
qualification VARCHAR(100),
doj DATE,
photo VARCHAR(255),
FOREIGN KEY (department_id) REFERENCES departments(id)
);
-- Table: students
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
department_id INT,
program_id INT,
name VARCHAR(255),
email VARCHAR(255),
mobile VARCHAR(20),
gender ENUM('Male', 'Female', 'Other'),
dob DATE,
enrollment_no VARCHAR(100),
admission_year YEAR,
current_sem INT,
photo VARCHAR(255),
FOREIGN KEY (department_id) REFERENCES departments(id),
FOREIGN KEY (program_id) REFERENCES programs(id)
);
-- Table: roles
CREATE TABLE roles (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL UNIQUE
);
-- Table: users
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
email VARCHAR(255),
role_id INT,
student_id INT,
teacher_id INT,
FOREIGN KEY (role_id) REFERENCES roles(id),
FOREIGN KEY (student_id) REFERENCES students(id),
FOREIGN KEY (teacher_id) REFERENCES teachers(id)
);
-- Table: documents
CREATE TABLE documents (
id INT AUTO_INCREMENT PRIMARY KEY,
student_id INT,
doc_type ENUM('TC', 'MC', 'Marksheets') NOT NULL,
file_path VARCHAR(255),
uploaded_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (student_id) REFERENCES students(id)
);
✨ Sample INSERT Statements (2 per table)
-- Sample Universities
INSERT INTO universities (name, type, location, state, website) VALUES
('Tamil Nadu State University', 'Public', 'Chennai', 'Tamil Nadu', 'http://tnsu.edu.in'),
('Global Tech University', 'Private', 'Coimbatore', 'Tamil Nadu', 'http://gtu.ac.in');
-- Sample Colleges
INSERT INTO colleges (university_id, name, category, location, email, contact_no) VALUES
(1, 'Government Arts College', 'Affiliated', 'Salem', 'gac@example.com', '0427-1234567'),
(2, 'GTU School of Engineering', 'Campus', 'Coimbatore', 'engg@gtu.ac.in', '0422-7654321');
-- Sample Departments
INSERT INTO departments (college_id, name, code) VALUES
(1, 'Computer Science', 'CSE'),
(2, 'Electronics and Communication', 'ECE');
-- Sample Programs
INSERT INTO programs (department_id, name, level, duration_years) VALUES
(1, 'B.Sc Computer Science', 'UG', 3),
(2, 'M.E Communication Systems', 'PG', 2);
-- Sample Courses
INSERT INTO courses (program_id, code, name, semester, credits) VALUES
(1, 'CS101', 'Programming Fundamentals', 1, 4),
(2, 'EC501', 'Digital Signal Processing', 1, 4);
-- Sample Teachers
INSERT INTO teachers (department_id, name, email, mobile, designation, qualification, doj, photo) VALUES
(1, 'Dr. R. Meena', 'meena@edu.in', '9000000001', 'Professor', 'Ph.D', '2010-06-15', 'meena.jpg'),
(2, 'Mr. K. Raj', 'raj@gtu.ac.in', '9000000002', 'Assistant Professor', 'M.Tech', '2018-07-10', 'raj.jpg');
-- Sample Students
INSERT INTO students (department_id, program_id, name, email, mobile, gender, dob, enrollment_no, admission_year, current_sem, photo) VALUES
(1, 1, 'Anita Sharma', 'anita@edu.in', '9876543210', 'Female', '2003-04-22', 'UG2023CS001', 2023, 2, 'anita.jpg'),
(2, 2, 'Vijay Kumar', 'vijay@gtu.ac.in', '9876509876', 'Male', '2001-11-10', 'PG2024EC002', 2024, 1, 'vijay.jpg');
-- Sample Roles
INSERT INTO roles (name) VALUES
('Admin'),
('Teacher'),
('Student');
-- Sample Users
INSERT INTO users (username, password, email, role_id, student_id, teacher_id) VALUES
('anita23', 'hashed_pwd1', 'anita@edu.in', 3, 1, NULL),
('meena_r', 'hashed_pwd2', 'meena@edu.in', 2, NULL, 1);
-- Sample Documents
INSERT INTO documents (student_id, doc_type, file_path) VALUES
(1, 'TC', 'docs/anita_tc.pdf'),
(1, 'Marksheets', 'docs/anita_marksheet1.pdf');
Would you like:
-
A downloadable
.sqlfile with all the above? -
PHP CRUD interfaces for any/all tables?
AI for Higher Education Teachers
https://cdn-dynmedia-1.microsoft.com/is/content/microsoftcorp/microsoft/bade/documents/products-and-services/en-us/education/2025-Microsoft-...
-
๐ Automotive and Ancillary Industries Renault Nissan Automotive India Pvt. Ltd. – A joint venture between Renault and Nissan, operating...
-
>Home >Login >Projects ▼ >Attendance >Equivalence >PhDEcoSys...
-
A summarized comparison table of proposed university ranking framework versus major international frameworks like QS , THE (Times Higher E...