<div id="final">
  <div class="form-group"> 
    <div class="col-sm-offset-4 col-sm-8">
      <button type="submit" class="btn btn-primary" name="submit" value="Submit">Submit</button>
    </div>
  </div>
</div>
</form>
     </div>
   </div>
</div></div>

<?php 
if (empty($pubidErr) && empty($sidErr) && !empty($pubid) && !empty($sid)) {
    $crud = new admin_crud();
    $crud->insert($pubid, $sid, $wid_name, $renderFunc, $templateHead, $templateRepeat, $templateFoot, $rowHead, $rowRepeat, $rowFoot, $css);
}
?>




 <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
  </body>
</html>
  </div>    
  </form>
  
  </div>
		</div>
	  </div>
	</div>
	
	
<?php 
if ($submit === "update") {
    $crud = new admin_crud();
    $crud->update($pubid, $sid, $wid_name, $renderFunc, $templateHead, $templateRepeat, $templateFoot, $rowHead, $rowRepeat, $rowFoot, $css);
} else {
    if ($submit === "delete") {
        $crud = new admin_crud();
        $crud->delete($sid, $pubid, $wid_name);
    }
}
?>
<!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    
    <!-- Include all compiled plugins (below), or include individual files as needed -->


</body>
</html>
l