isauth("admin_components"))return not_auth(); switch($option) { case "items":{ switch($task) { case "orderup": case "orderdown": case "reorder": case "publish": case "unpublish": case "delete": $easydb->data_table("weblinks","admin.php?com_option=weblinks&option=items","",true); break; case "create": { $order=$easydb->neworder("weblinks"); $conn->Execute("INSERT INTO #__weblinks ". "\n(catid,title,url,description,date,hits,ordering) ". "\nVALUES ($weblink_catid,'$weblink_title','$weblink_url','$weblink_description','$time', $weblink_hits,$order)"); $limbocore->redir("admin.php?com_option=weblinks&option=items"); } case "save": { $conn->Execute("UPDATE #__weblinks ". "\nSET catid = $weblink_catid , title = '$weblink_title' , url = '$weblink_url' , description = '$weblink_description' , date = '$time' , hits = $weblink_hits". "\nWHERE id = $weblink_id"); $easydb->check_category('weblinks',$weblink_id,$weblink_catid,$weblink_ocatid); $limbocore->redir("admin.php?com_option=weblinks&option=items"); break; } case "edit" : edit_items();break; case "new" : edit_items('new'); break; default: items_table(); break; } }break; /* the categories function handling part */ case "categories" : switch($task) { case "orderup": case "orderdown": case "reorder": case "publish": case "unpublish": $easydb->data_table("categories","admin.php?com_option=weblinks&option=categories","section='com_weblinks'"); break; case "delete": $conn->Execute("DELETE FROM #__weblinks WHERE catid=".$cid[0]); $easydb->data_table("categories","admin.php?com_option=weblinks&option=categories","section='com_weblinks'"); break; case "create": { $order=$easydb->neworder("categories","section='com_weblinks'"); $conn->Execute("INSERT INTO #__categories ". "\n(title,name,image,image_position,section,description,ordering,access) ". "\nVALUES ('$category_title','$category_name','$section_image','$section_image_position','com_weblinks','$category_description',$order,$category_access)"); $limbocore->redir("admin.php?com_option=weblinks&option=categories"); } case "save": { $conn->Execute("UPDATE #__categories ". "\nSET title = '$category_title' , name = '$category_name' , image = '$section_image' ,image_position = '$section_image_position' ,description = '$category_description' ,access = $category_access ". "\nWHERE id = $category_id"); $limbocore->redir("admin.php?com_option=weblinks&option=categories"); } case "edit" : edit_categories();break; case "new" : edit_categories('new'); break; default: categories_table(); break; } break; } ?>