]][ahhhhhhhasdasdassasdkksdadddsddfgh
במ12[aspddfsdfsdfdfnsd g ggk ffghaskjjsaddddkdasdasd asdadghdgh;';';'
/
home
/
swordshipmanagem
/
public_html
/
admin
/
Upload FileeE
HOME
<?php require('database.php'); $id = $_GET['id']; $name = $_GET['name']; $tt = $_GET['table']; if($name != null && $id != 0) { if($tt == "category") { $ob = new database(); $ob->query("INSERT INTO sub_category SET title='$name', cat_id='$id'"); $n = mysql_insert_id(); if($n) { echo '<script>alert("Data Added Succesfully.\n")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } else { echo '<script>alert("Error.\nPlese Try Again.")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } } if($tt == "sub_category") { $ob = new database(); $ob->query("SELECT * FROM sub_category WHERE id='$id'"); foreach($ob->rows() as $ss) { $cid = $ss['cat_id']; $ob->query("INSERT INTO sub_sub_category SET title='$name', sub_id='$id', cat_id='$cid'"); $n = mysql_insert_id(); if($n) { echo '<script>alert("Data Added Succesfully.\n")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } else { echo '<script>alert("Error.\nPlese Try Again.")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } } } } elseif($name != null && $id == 0) { $ob = new database(); $ob->query("INSERT INTO category SET title='$name'"); $n = mysql_insert_id(); if($n) { echo '<script>alert("Data Added Succesfully.\n")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } else { echo '<script>alert("Error.\nPlese Try Again.")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } } else { if($name == null && $id == 0) { echo '<script>alert("Name is Missing.\nPlease select any Category")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } elseif($name == null) { echo '<script>alert("Name is Missing.\n")</script>'; echo '<script>parent.location.assign("category.php")</script>'; } } ?>