Example #1
0
 public function showAllTable()
 {
     $msg = [];
     $msg['status']['type'] = 'success';
     $msg['status']['msg'] = '';
     if (!isset($_POST['tableType'])) {
         $msg['status']['type'] = 'failed';
         $msg['status']['msg'] = 'Table Type Not Set';
     } else {
         $this->load->model('Datamanagementqueries');
         switch ($_POST['tableType']) {
             case 'object':
                 $msg['objects'] = Datamanagementqueries::getObjectsList(false);
                 break;
             case 'association':
                 $msg['objects'] = Datamanagementqueries::getAssociationsList(false);
                 break;
             case 'type':
                 $msg['objects'] = Datamanagementqueries::getTypesList(false);
                 break;
             case 'descriptor':
                 $msg['objects'] = Datamanagementqueries::getDescriptorsList(false);
                 break;
             default:
                 $msg['status']['type'] = 'failed';
                 $msg['status']['msg'] = 'Invalid Table Type';
         }
     }
     echo json_encode($msg);
 }
Example #2
0
                        </select>
                    </div>
                    <div class="panel-footer" style="text-align: right"><a href="#">Show All</a></div>
                </div>

                <div class="panel panel-default dm_tables" id="dm_descriptor">
                    <div class="panel-heading">Descriptors</div>
                    <div class="panel-body">
                        <form class="form-inline undo-overrides default-form-inline">
                            <div class="form-group">
                                <input id="dm_search_descriptor" class="form-control input-sm" placeholder="Filter.."/>
                             </div>
                        </form>                        
                        <select class="form-control dm_select" size="10" id="dm_select_descriptor">
                            <?php 
foreach (Datamanagementqueries::getDescriptorsList() as $obj) {
    ?>
                                <option value="<?php 
    echo $obj->TableName;
    ?>
"><?php 
    echo $obj->TableName;
    ?>
</option>
                            <?php 
}
?>

                        </select>
                    </div>
                    <div class="panel-footer" style="text-align: right"><a href="#">Show All</a></div>