コード例 #1
0
ファイル: admin.php プロジェクト: rotvulpix/php-nuke
function AutoTheme_admin_settheme($var)
{
    $var = atExportVar($var);
    extract($var);
    atThemeSet($themedir);
    $cmsoption['themedir'] = $themedir;
    $var = compact("cmsoption");
    atSaveAutoConfig($var);
    Header("Location: " . AT_ADMINPAGE . "?module=AutoTheme&op=main");
}
コード例 #2
0
function at_themesonadate($vars)
{
    extract($vars);
    $themesonadate = atAutoGetVar("themesonadate");
    if (!$themesonadate) {
        return;
    }
    foreach ($themesonadate['date'] as $k => $v) {
        $newarray[$v] = $themesonadate['theme'][$k] . ":" . $themesonadate['user'][$k];
    }
    $themesonadate = $newarray;
    $now = time();
    ksort($themesonadate);
    foreach ($themesonadate as $date => $theme) {
        $changedate = strtotime($date);
        if ($now >= $changedate) {
            $newtheme = $theme;
        }
    }
    atThemeSet($newtheme, $user);
}
コード例 #3
0
ファイル: themegroup.ext.php プロジェクト: rotvulpix/php-nuke
function at_themegroup($vars)
{
    extract($vars);
    $themegroup = atAutoGetVar("themegroup");
    if (!$themegroup) {
        return;
    }
    foreach ($themegroup['group'] as $k => $v) {
        $newarray[$v] = $themegroup['theme'][$k] . ":" . $themegroup['user'][$k];
    }
    $themegroup = $newarray;
    ksort($themegroup);
    foreach ($themegroup as $group => $theme) {
        if (atIsInGroup($group)) {
            $parts = explode(":", $theme);
            $newtheme = $parts[0];
            $user = $parts[1];
            break;
        }
    }
    atThemeSet($newtheme, $user);
}
コード例 #4
0
ファイル: themelang.ext.php プロジェクト: rotvulpix/php-nuke
function at_themelang($vars)
{
    extract($vars);
    $themelang = atAutoGetVar("themelang");
    if (!$themelang) {
        return;
    }
    foreach ($themelang['lang'] as $k => $v) {
        $newarray[$v] = $themelang['theme'][$k] . ":" . $themelang['user'][$k];
    }
    $themelang = $newarray;
    $userlang = atGetLang();
    ksort($themelang);
    foreach ($themelang as $lang => $theme) {
        if ($userlang == $lang) {
            $parts = explode(":", $theme);
            $newtheme = $parts[0];
            $user = $parts[1];
            break;
        }
    }
    atThemeSet($newtheme, $user);
}