function DBADMIN_ajaxGetTableList($engine = 'MyISAM') { global $_CONF, $_TABLES, $_DB_name; $tableList = array(); $retval = array(); if (!COM_isAjax()) { die; } $result = DB_query("SHOW TABLES"); $numTables = DB_numRows($result); for ($i = 0; $i < $numTables; $i++) { $A = DB_fetchArray($result, true); $table = $A[0]; if (in_array($table, $_TABLES)) { $result2 = DB_query("SHOW TABLE STATUS FROM {$_DB_name} LIKE '{$table}'"); $B = DB_fetchArray($result2); if (strcasecmp($B['Engine'], $engine) == 0) { continue; } $tableList[] = $table; } } $retval['errorCode'] = 0; $retval['tablelist'] = $tableList; $return["json"] = json_encode($retval); echo json_encode($return); exit; }
if (!COM_isAjax()) { die; } $media_id = $_POST['id']; $aid = $_POST['aid']; MG_bpResizeThumbnail($aid, $media_id); $retval = array(); $retval['statusMessage'] = 'Got it.'; $retval['errorCode'] = 0; $return["json"] = json_encode($retval); header('Content-Type: application/json'); echo json_encode($return); exit; break; case 'rebuilddisp': if (!COM_isAjax()) { die; } $media_id = $_POST['id']; $aid = $_POST['aid']; MG_bpResizeDisplay($aid, $media_id); $retval = array(); $retval['statusMessage'] = 'Got it.'; $retval['errorCode'] = 0; $return["json"] = json_encode($retval); header('Content-Type: application/json'); echo json_encode($return); exit; break; } } else {