当前位置: 首页>>代码示例>>PHP>>正文


PHP cot_check_xg函数代码示例

本文整理汇总了PHP中cot_check_xg函数的典型用法代码示例。如果您正苦于以下问题:PHP cot_check_xg函数的具体用法?PHP cot_check_xg怎么用?PHP cot_check_xg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cot_check_xg函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

foreach (cot_getextplugins('admin.cache.disk.first') as $pl) {
    include $pl;
}
/* ===== */
if ($a == 'purge') {
    if (cot_check_xg() && cot_diskcache_clearall()) {
        cot_message('adm_purgeall_done');
        // Empty resource consolidation cache
        $db->delete($db_cache, "c_name = 'cot_rc_html'");
    } else {
        cot_message('Error');
    }
} elseif ($a == 'delete') {
    $is_id = mb_strpos($id, '/') === false && mb_strpos($id, '\\') === false && $id != '.' && $id != '..';
    $is_onlyf = $id == COT_DISKCACHE_ONLYFILES;
    if (cot_check_xg() && $is_id && cot_diskcache_clear($cfg['cache_dir'] . ($is_onlyf ? '' : "/{$id}"), !$is_onlyf)) {
        cot_message('adm_delcacheitem');
        if ($id == 'static' || $is_onlyf) {
            // Empty resource consolidation cache
            $db->delete($db_cache, "c_name = 'cot_rc_html'");
        }
    } else {
        cot_message('Error');
    }
}
$row = cot_diskcache_list();
$cachefiles = $cachesize = 0;
$ii = 0;
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('admin.cache.disk.loop');
/* ===== */
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:admin.cache.disk.php

示例2: cot_trash_delete

    /* ===== */
    cot_trash_delete($id);
    cot_message('adm_trashcan_deleted');
    cot_redirect(cot_url('admin', 'm=other&p=trashcan', '', true));
} elseif ($a == 'wipeall') {
    cot_check_xg();
    /* === Hook === */
    foreach (cot_getextplugins('trashcan.admin.wipeall') as $pl) {
        include $pl;
    }
    /* ===== */
    $sql = $db->query("TRUNCATE {$db_trash}");
    cot_message('adm_trashcan_prune');
    cot_redirect(cot_url('admin', 'm=other&p=trashcan', '', true));
} elseif ($a == 'restore') {
    cot_check_xg();
    /* === Hook === */
    foreach (cot_getextplugins('trashcan.admin.restore') as $pl) {
        include $pl;
    }
    /* ===== */
    cot_trash_restore($id);
    cot_message('adm_trashcan_restored');
    cot_redirect(cot_url('admin', 'm=other&p=trashcan', '', true));
}
$tr_t = new XTemplate(cot_tplfile($info ? 'trashcan.info.admin' : 'trashcan.admin', 'plug', true));
$totalitems = (int) $db->query("SELECT COUNT(*) FROM {$db_trash} WHERE tr_parentid=0")->fetchColumn();
$pagenav = cot_pagenav('admin', 'm=other&p=trashcan', $d, $totalitems, $maxperpage, 'd', '', $cfg['jquery'] && $cfg['turnajax']);
$sql_query = $info ? "AND tr_id={$id} LIMIT 1" : "ORDER by tr_id DESC LIMIT {$d}, " . $maxperpage;
$sql = $db->query("SELECT t.*, u.user_name FROM {$db_trash} AS t\n\tLEFT JOIN {$db_users} AS u ON t.tr_trashedby=u.user_id\n\tWHERE tr_parentid=0 {$sql_query}");
$ii = 0;
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:trashcan.admin.php

示例3: cot_extension_dependencies_statisfied

     $installed_plugins = $db->query("SELECT ct_code FROM {$db_core} WHERE ct_plug = 1")->fetchAll(PDO::FETCH_COLUMN);
     $dependencies_satisfied = cot_extension_dependencies_statisfied($code, $is_module, $installed_modules, $installed_plugins);
     if ($dependencies_satisfied) {
         $result = cot_extension_install($code, $is_module);
     }
     break;
 case 'update':
     $result = cot_extension_install($code, $is_module, true, true);
     break;
 case 'uninstall':
     /* === Hook  === */
     foreach (cot_getextplugins('admin.extensions.uninstall.first') as $pl) {
         include $pl;
     }
     /* ===== */
     if (cot_check_xg(false)) {
         // Check if there are extensions installed depending on this one
         $dependencies_satisfied = true;
         $res = $db->query("SELECT ct_code, ct_plug FROM {$db_core} ORDER BY ct_plug, ct_code");
         foreach ($res->fetchAll() as $row) {
             $ext = $row['ct_code'];
             $dir_ext = $row['ct_plug'] ? $cfg['plugins_dir'] : $cfg['modules_dir'];
             $dep_ext_info = $dir_ext . '/' . $ext . '/' . $ext . '.setup.php';
             if (file_exists($dep_ext_info)) {
                 $dep_info = cot_infoget($dep_ext_info, 'COT_EXT');
                 if (!$dep_info && cot_plugin_active('genoa')) {
                     // Try to load old format info
                     $dep_info = cot_infoget($dep_ext_info, 'SED_EXTPLUGIN');
                 }
                 $dep_field = $is_module ? 'Requires_modules' : 'Requires_plugins';
                 if (in_array($code, explode(',', $dep_info[$dep_field]))) {
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:admin.extensions.php


注:本文中的cot_check_xg函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。