function remove($appIds) { global $_SGLOBAL; $sql = sprintf('DELETE FROM %s WHERE appid IN (%s)', tname('userapp'), simplode($appIds)); $result = $_SGLOBAL['db']->query($sql); $sql = sprintf('DELETE FROM %s WHERE appid IN (%s)', tname('myapp'), simplode($appIds)); $_SGLOBAL['db']->query($sql); //update cache include_once S_ROOT . './source/function_cache.php'; userapp_cache(); return new APIResponse($result); }
include_once S_ROOT . './source/function_cache.php'; //ϵͳ���� if (empty($_POST['cachetype']) || in_array('database', $_POST['cachetype'])) { config_cache(); usergroup_cache(); profilefield_cache(); profield_cache(); censor_cache(); block_cache(); eventclass_cache(); magic_cache(); click_cache(); task_cache(); ad_cache(); creditrule_cache(); userapp_cache(); app_cache(); network_cache(); } //ģ����뻺�� if (empty($_POST['cachetype']) || in_array('tpl', $_POST['cachetype'])) { tpl_cache(); } //ģ�黺�� if (empty($_POST['cachetype']) || in_array('block', $_POST['cachetype'])) { block_data_cache(); } //��㿴������ if (empty($_POST['cachetype']) || in_array('network', $_POST['cachetype'])) { $fiels = sreaddir(S_ROOT . './data', array('txt')); foreach ($fiels as $value) {
function refreshApplication($appId, $appName, $version, $displayMethod, $narrow, $flag, $displayOrder) { global $_SGLOBAL; $fields = array(); if ($appName !== null && strlen($appName)>1) { $fields['appname'] = $appName; } if ($version !== null) { $fields['version'] = $version; } if ($displayMethod !== null) { // todo: remove $fields['displaymethod'] = $displayMethod; } if ($narrow !== null) { $fields['narrow'] = $narrow; } if ($flag !== null) { $fields['flag'] = $flag; } if ($displayOrder !== null) { $fields['displayorder'] = $displayOrder; } $sql = sprintf('SELECT * FROM %s WHERE appid = %d', tname('myapp'), $appId); $query = $_SGLOBAL['db']->query($sql); if($application = $_SGLOBAL['db']->fetch_array($query)) { $where = sprintf('appid = %d', $appId); updatetable('myapp', $fields, $where); } else { $fields['appid'] = $appId; $result = inserttable('myapp', $fields, 1); } //update cache include_once(S_ROOT.'./source/function_cache.php'); userapp_cache(); }