Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
panel
/
ajax
:
setslugUrl.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php error_reporting(0); include("../../config/database.php"); $name = $_GET['name']; $tableName = $_GET['tableName']; if(!empty($name)) { $slug = preg_replace("/-$/","",preg_replace('/[^a-z0-9]+/i', "-", strtolower($name))); $query = "SELECT COUNT(*) AS NumHits FROM $tableName WHERE slug_url LIKE '$slug%'"; $result = mysqli_query($cn, $query); $row = mysqli_fetch_array($result); $numHits = $row['NumHits']; echo ($numHits > 0) ? ($slug . '-' . $numHits) : $slug; } ?>