<?php

if(!defined('IN_DISCUZ')) {

	exit('Access Denied');

}

include_once 'cert.php';

if(md5(implode('', $cert)) != $sign) {

	DB::query('DELETE FROM '.DB::table('common_plugin')." WHERE identifier='eis_skin'");

}else{

	if($_G[uid]){

		$eis_skin = DB::fetch_first("SELECT * FROM ".DB::table('eis_skin')." WHERE uid='$_G[uid]'");

		$sv=($eis_skin['default']==1) ? 2 : 1;

		DB::update('eis_skin', array('default' => $sv,'first' => 0), "uid='$_G[uid]'");

	}else{

		$default=$_G['cookie']['eisdl'] ? $_G['cookie']['eisdl'] : $_G['cache']['plugin']['eis_skin']['default'];

		$sv=($default==1) ? 2 : 1;

		dsetcookie('eisdl', $sv, 31536000);

	}

}

showmessage('eis_skin:success', "forum.php", array(), array('showdialog' => 1, 'showmsg' => true, 'locationtime' => false));	

?>