Exemple #1
0
					<div class="col-12" style="text-align:right;min-height:40px;">
						<a id="popup-close" href="javascript:" class="wda-close"><span class="fa fa-close"></span></a>
					</div>
					<div id="popup-contant" class="col-12 " >';
if (isset($_REQUEST['wda_query_form_nonce']) && wp_verify_nonce($_REQUEST['wda_query_form_nonce'], 'wda_query_form')) {
    // check Wp_validation
    //echo '<pre>'; print_r($_POST); echo '</pre>';
    if (isset($_GET['action']) && $_GET['action'] == 'show' && isset($_GET['tbl'])) {
        // Display Table
        $TableName = $_GET['tbl'];
        $qryGetTableDetail = "SELECT * FROM " . $TableName . ";";
        $rsGetTableDetail = $wdaDbObj->ExecuteQuery($qryGetTableDetail);
        $wdaDbObj->DisplayTable($rsGetTableDetail);
        echo '<script type="text/javascript">jQuery(document).ready(function(e){jQuery("#popup").slideDown("fast");});</script>';
    } elseif (isset($_GET['action']) && $_GET['action'] == 'struct' && isset($_GET['tbl'])) {
        // work only if GET Method is Come
        $TableName = $_GET['tbl'];
        $wdaDbObj->DisplayTable(wda_showTableStructure($TableName));
        echo '<script type="text/javascript">jQuery(document).ready(function(e){jQuery("#popup").slideDown("fast");});</script>';
    } elseif (isset($flagCustom) && $isDisplayTable === 1) {
        $wdaDbObj->DisplayTable($rsCustome);
        echo '<script type="text/javascript">jQuery(document).ready(function(e){jQuery("#popup").slideDown("fast");});</script>';
    }
    // Display Table Over
}
// end of wp_validation
echo '</div></div>';
?>
		<br clear="all"/>
	</section>
</div>
/**
 *	Ajax Function Handle The display Data 
 *	Like Select statement or Table Detail
 */
function wda_ajax_setTableActionResponse()
{
    global $wdaDbObj;
    //echo '<div class="row"><div class="col-12" style="text-align:right;min-height:40px;"><a id="popup-close" href="javascript:" class="wda-close" >&times;</a><div class="clear"></div></div></div>';
    if ($_POST['request'] == 'browse') {
        $qryGetTableDetail = "SELECT * FROM " . $_POST['table'] . ";";
        $rsGetTableDetail = $wdaDbObj->ExecuteQuery($qryGetTableDetail);
        $wdaDbObj->DisplayTable($rsGetTableDetail);
    } elseif ($_POST['request'] == 'structure') {
        $wdaDbObj->DisplayTable(wda_showTableStructure($_POST['table']));
    }
    die;
}