示例#1
0
     $title = 'Flash上传头像';
     include template('setting_flash');
     break;
 case "cut":
     $title = '裁切头像';
     include template('setting_cut');
     break;
 case "cutdo":
     require_once 'thinksaas/tsImage.php';
     $resizeimage = new tsImage("uploadfile/user/" . $strUser['face'], 190, 190, 2, "uploadfile/user/" . $strUser['face']);
     tsDimg($strUser['face'], 'user', '120', '120', $strUser['path']);
     header('Location: ' . tsUrl('my', 'setting', array('ts' => 'face')));
     break;
 case "face":
     $title = '头像设置';
     $arrFace = tsScanDir('uploadfile/user/face', 1);
     include template("setting_face");
     break;
     //执行上传头像
 //执行上传头像
 case "facedo":
     if ($_FILES['picfile']) {
         //上传
         $arrUpload = tsUpload($_FILES['picfile'], $userid, 'user', array('jpg', 'gif', 'png'));
         if ($arrUpload) {
             $new['my']->update('user_info', array('userid' => $userid), array('path' => $arrUpload['path'], 'face' => $arrUpload['url']));
             $filesize = abs(filesize('uploadfile/user/' . $arrUpload['url']));
             if ($filesize <= 0) {
                 $new['my']->update('user_info', array('userid' => $userid), array('path' => '', 'face' => ''));
                 tsNotice('上传头像失败,你可以使用系统默认头像!');
             } else {
示例#2
0
<?php

defined('IN_TS') or die('Access Denied.');
// 清空SESSION
unset($_SESSION['tsuser']);
session_destroy();
setcookie("ts_email", '', time() + 3600, '/');
setcookie("ts_autologin", '', time() + 3600, '/');
//判断目录可写
$f_cache = iswriteable('cache');
$f_data = iswriteable('data');
$f_plugins = iswriteable('plugins');
$f_tslogs = iswriteable('tslogs');
$f_upgrade = iswriteable('upgrade');
$f_uploadfile = iswriteable('uploadfile');
//扫描SQL文件
$arrSqls = tsScanDir('upgrade', 1);
foreach ($arrSqls as $key => $item) {
    if ($item != 'up.php') {
        $arrSql[] = str_replace('.sql', '', $item);
    }
}
$title = '升级程序';
include template('index');
示例#3
0
<?php

defined('IN_TS') or die('Access Denied.');
switch ($ts) {
    //插件列表
    case "list":
        $arrApps = tsScanDir('plugins');
        $apps = tsFilter($_GET['apps']);
        $arrPlugins = tsScanDir('plugins/' . $apps);
        foreach ($arrPlugins as $key => $item) {
            if (is_file('plugins/' . $apps . '/' . $item . '/about.php')) {
                $arrPlugin[$key]['name'] = $item;
                $arrPlugin[$key]['about'] = (require_once 'plugins/' . $apps . '/' . $item . '/about.php');
            }
        }
        $app_plugins = fileRead('data/' . $apps . '_plugins.php');
        if ($app_plugins == '') {
            $app_plugins = $tsMySqlCache->get($apps . '_plugins');
        }
        include template("plugin_list");
        break;
        //插件停启用
    //插件停启用
    case "do":
        $apps = tsFilter($_GET['apps']);
        $isused = intval($_GET['isused']);
        $pname = tsFilter($_GET['pname']);
        $app_plugins = fileRead('data/' . $apps . '_plugins.php');
        if ($app_plugins == '') {
            $app_plugins = $tsMySqlCache->get($apps . '_plugins');
        }
示例#4
0
<?php

defined('IN_TS') or die('Access Denied.');
switch ($ts) {
    case "":
        $title = '更换主题';
        $arrTheme = tsScanDir('theme');
        include template("theme");
        break;
}
示例#5
0
<?php

defined('IN_TS') or die('Access Denied.');
switch ($ts) {
    //app列表
    case "list":
        $applists = tsScanDir('app');
        foreach ($applists as $key => $item) {
            if (is_file('app/' . $item . '/about.php')) {
                $arrApps[$key]['name'] = $item;
                $arrApps[$key]['about'] = (require_once 'app/' . $item . '/about.php');
            }
        }
        foreach ($arrApps as $item) {
            $arrApp[] = $item;
        }
        $title = 'APP管理';
        include template("apps");
        break;
        //安装APP
        /*
        case "install":
        	$appname = trim($_GET['appname']);
        	
        	$appAbout = require_once 'app/'.$appname.'/about.php';
        	
        	$isinstall = $appAbout['isinstall'];
        	$issql = $appAbout['issql'];
        	$issystem = $appAbout['issystem'];