<?php
session_start();
define('Admin_USER', true);

$display = '';

switch ($_POST['Option']) {

    case "Category-Options":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/navUtility.php";
        $nav = new navigationUtility;
        $results = $nav->getCategoryOptions($_POST['Category'],true);
        if ($results[0]['Nbr'] != '') {

            for ($i = 0; $i < count($results); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $results[$i]['Nbr'] . '" name="Row_' . $results[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>' . $results[$i]['Category_Name'] . ' | <em>' . $results[$i]['Name'] . '</em></h2>';
                $display .= '<p>' . $results[$i]['Desc'] . '</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $results[$i]['Name'] . '" onclick="contentChanger(\'navigation/edit-option.php\',\'' . $results[$i]['Nbr'] . '\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $results[$i]['Name'] . '" onclick="deleteRow(\'Delete-Navigation-Option\',\'' . $results[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No category options match your search criteria.</p>';

        }

    break;
    case "Services":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/serviceClass.php";
        $s = new serviceClass;
        $info = $s->getServices();
        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                if($info[$i]['Img'] != '' && is_file(THIS_DOMAIN.'/images/services/thumbs/'.$info[$i]['Img'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/services/thumbs/'.$info[$i]['Img'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= '<em style="font-weight:normal;">'.$info[$i]['Category_Name'].'</em><br/> '.$info[$i]['Name'];
                $display .= '</h2>';
                $display .='<p>'.$info[$i]['Listing_Description'].'</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'services/edit-service.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'services/manage-services.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] .'" onclick="deleteRow(\'Delete-Service\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No services in the system at this time.</p>';

        }

    break; 
    case "FAQs":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/faqsClass.php";
        $f = new faqClass;
        $info = $f->getFAQs();

        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<div style="float:left; padding-bottom:15px;">';
                $display .= '<h2>';
                $display .= '<em style="font-weight:normal;">Category: '.$info[$i]['Category_Name'].'</em><br/>' . $info[$i]['Question'] . '</h2>'; 
                $display .= '<p>'.$info[$i]['Answer'].'</p>';               
                $display .= '<p style="padding-top:20px;">';
                $display .= '[ <span class="edit" title="Edit FAQ" onclick="contentChanger(\'faqs/edit-faq.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'faqs/manage-faqs.php\');">EDIT</span> ] ';
                $display .= '&nbsp;|&nbsp; ';
                $display .= '[ <span class="delete" title="Delete FAQ" onclick="deleteRow(\'Delete-FAQ\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]';                
                $display .= '</p>';                
                $display .= '</div>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No FAQs in the system at this time.</p>';

          }

    break;
    case "FAQ_Categories":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/faqsClass.php";
        $f = new faqClass;
        $info = $f->getCategories();
        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<div style="float:left; padding-bottom:15px;">';
                $display .= '<h2>';
                if($info[$i]['Image'] != '' && is_file(THIS_DOMAIN.'/images/faqs/thumbs/'.$info[$i]['Image'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/faqs/thumbs/'.$info[$i]['Image'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= $info[$i]['Name'] . '</h2>';                
                $display .= '<p style="padding-top:20px;">';
                $display .= '[ <span class="edit" title="Edit FAQ Category" onclick="contentChanger(\'faqs/edit-category.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'faqs/manage-categories.php\');">EDIT</span> ] ';
                $display .= '&nbsp;|&nbsp; ';
                $display .= '[ <span class="delete" title="Delete FAQ Category" onclick="deleteRow(\'Delete-FAQ-Category\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]';                
                $display .= '</p>';                
                $display .= '</div>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No FAQs in the system at this time.</p>';

          }

    break;
    case "Staff":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/staffClass.php";
        $s = new staffClass;
        $info = $s->getStaffMembers();
        
        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                if($info[$i]['Img'] != '' && is_file(THIS_DOMAIN.'/images/staff/'.$info[$i]['Img'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/staff/'.$info[$i]['Img'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= '<em style="font-weight:normal;">'.$info[$i]['Name'].'</em>';                
                $display .= '<br/>Title: '.$info[$i]['Title'];
                $display .= '</h2>';                
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Title'] . '" onclick="contentChanger(\'staff/edit-staff.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'staff/manage-staff.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] .'" onclick="deleteRow(\'Delete-Staff\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No staff members are in the system at this time.</p>';

        }

    break; 
    case "Testimonials":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/testimonialClass.php";
        $t = new testimonialClass;
        $info = $t->getTestimonials();
        
        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                $display .= $info[$i]['Name'];
                $display .= '</h2>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'testimonials/edit-testimonial.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'testimonials/manage-testimonials.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] .'" onclick="deleteRow(\'Delete-Testimonial\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No testimonials in the system at this time.</p>';

        }

    break;
    case "Resource-Categories":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/resourceClass.php";
        $r = new resourcesClass;
        $info = $r->getCategories();

        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                if($info[$i]['Image'] != '' && is_file(THIS_DOMAIN.'/images/resources/thumbs/'.$info[$i]['Image'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/resources/thumbs/'.$info[$i]['Image'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= $info[$i]['Name'];                
                $display .= '</h2>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'resources/edit-category.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'resources/manage-categories.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] . '" onclick="deleteRow(\'Delete-Resource-Category\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No resource categories in the system at this time.</p>';

          }

    break;
    case "Resource-Pages":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/resourceClass.php";
        $r = new resourcesClass;
        $info = $r->getResPages();

        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                $display .= $info[$i]['Name'];                
                $display .= '</h2>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'resources/edit-resource.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'resources/manage-resources.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] . '" onclick="deleteRow(\'Delete-Resource\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No resource pages in the system at this time.</p>';

          }

    break;
    case "Documents":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/documentClass.php";
        $d = new docClass;
        $info = $d->getDocuments();

        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>'.$info[$i]['Doc_Name'];
                if($info[$i]['Doc_Hidden'] == '1') {

                    $display .= '<br/><span style="color:red;">HIDDEN</span>';

                }
                $display .= '</h2>';
                $display .= '</p>';
                if($info[$i]['Doc_File'] != ''){

                    $display .= '<br/>File/Document: <a href="'.WEBSITE_ADDY.'/documents/'.$info[$i]['Doc_File'].'" target="_blank">'.WEBSITE_ADDY.'/documents/'.$info[$i]['Doc_File'].'</a>';

                }
                $display .= '</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="delete" title="Delete ' . $info[$i]['Doc_Name'] .'" onclick="deleteRow(\'Delete-Doc\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No documents are in the system at this time.</p>';

        }
    break;  
    case "Document-Categories":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/documentClass.php";
        $d = new docClass;
        $info = $d->getDocCategories();
        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                $display .= $info[$i]['Name'];
                if($info[$i]['Hidden'] == '1'){

                    $display .= '<br/><span style="color:red;">HIDDEN</span>';

                }
                $display .= '</h2>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'documents/edit-category.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'documents/manage-categories.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] . '" onclick="deleteRow(\'Delete-Document-Category\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No document categories in the system at this time.</p>';

          }

    break;  
    case "Banners":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/bannersClass.php";
        $b = new bannerClass;
        $info = $b->getBanners();
        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';                
                if($info[$i]['File'] != '' && is_file(THIS_DOMAIN.'/images/banners/'.$info[$i]['File'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/banners/'.$info[$i]['File'].'" style="float:left; padding: 0 0 10px 0; max-width:100%;"/>';

                }
                $display .= '</h2>';
                $display .= '<p><strong>Overlay Text: </strong>'.$info[$i]['Text'].'</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'banners/edit-banner-text.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'banners/manage-banners.php\');">EDIT BANNER TEXT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] .'" onclick="deleteRow(\'Delete-Banner\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No banners in the system at this time.</p>';

        }

    break;                
    case "Events":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/eventClass.php";
        $e = new eventClass;
        $info = $e->getEvents();
        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                if($info[$i]['Img'] != '' && is_file(THIS_DOMAIN.'/images/events/thumbs/'.$info[$i]['Img'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/events/thumbs/'.$info[$i]['Img'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= $info[$i]['Name'];
                $display .= '</h2>';
                $display .='<p>';
                if($info[$i]['Start_Date'] != '0'){

                    $display .= '<strong>Start Date: </strong>'.date("m/d/Y",$info[$i]['Start_Date']);

                }else{

                    $display .= '<strong>Event Date N/A</strong>';

                }
                if($info[$i]['End_Date'] != '0'){

                    $display .= '<br/><strong>End Date: </strong>'.date("m/d/Y",$info[$i]['End_Date']);

                }
                $display .= '</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'events/edit-event.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'events/manage-events.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] .'" onclick="deleteRow(\'Delete-Event\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No events in the system at this time.</p>';

        }

    break; 
    case "Service-Categories":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/serviceClass.php";
        $s = new serviceClass;
        $info = $s->getServiceCategories();

        if($info[0]['Nbr'] != '') {

            for($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>';
                if($info[$i]['Image'] != '' && is_file(THIS_DOMAIN.'/images/services/thumbs/'.$info[$i]['Image'])){

                    $display .= '<img src="'.WEBSITE_ADDY.'/images/services/thumbs/'.$info[$i]['Image'].'" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }else{

                    $display .= '<img src="'.WEBSITE_ADDY.'/adm1n/images/default-thumb.jpg" style="float:left; padding: 0 10px 10px 0; width:100px;"/>';

                }
                $display .= $info[$i]['Name'];                
                $display .= '</h2>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'services/edit-category.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'services/manage-categories.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] . '" onclick="deleteRow(\'Delete-Service-Category\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

          } else {

            $display .= '<p class="empty_msg">No service categories in the system at this time.</p>';

          }

    break;
    case "Links":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/linksClass.php";
        $l = new linksClass;
        $info = $l->getLinks();

        if ($info[0]['Nbr'] != '') {

            for ($i = 0; $i < count($info); $i++) {

                $display .= '<div class="col-md-12';
                if ($i == 0 || $i % 2 == 0) {$display .= ' light-white';}
                $display .= '" id="Row_' . $info[$i]['Nbr'] . '" name="Row_' . $info[$i]['Nbr'] . '">';
                $display .= '<div class="result-form">';
                $display .= '<h2>'.$info[$i]['Name'];
                $display .= '</h2>';
                $display .= '</p>';
                if($info[$i]['Link'] != ''){

                    $display .= '<br/>Link: <a href="'.$info[$i]['Link'].'" target="_blank">'.$info[$i]['Link'].'</a>';

                }
                $display .= '</p>';
                $display .= '<p style="padding-top:20px;">[ <span class="edit" title="Edit ' . $info[$i]['Name'] . '" onclick="contentChanger(\'links/edit-link.php\',\'' . $info[$i]['Nbr'] . '\',\'\',\'links/manage-links.php\');">EDIT</span> ] &nbsp;|&nbsp; [ <span class="delete" title="Delete ' . $info[$i]['Name'] . '" onclick="deleteRow(\'Delete-Link\',\'' . $info[$i]['Nbr'] . '\')">DELETE</span> ]</p>';
                $display .= '</div>';
                $display .= '</div>';

            }

        } else {

            $display .= '<p class="empty_msg">No links are in the system at this time.</p>';

        }
    break;     



}

echo $display;
exit;
