1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00
php-e107/e107_admin/theme.php

159 lines
3.5 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
2009-11-12 14:30:07 +00:00
* e107 website system
*
2009-11-18 01:06:08 +00:00
* Copyright (C) 2008-2009 e107 Inc (e107.org)
2009-11-12 14:30:07 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
2010-02-10 18:18:01 +00:00
* $Revision$
* $Date$
* $Author$
2009-11-12 14:30:07 +00:00
*/
2006-12-02 04:36:16 +00:00
require_once("../class2.php");
if (!getperms("1")) {
header("location:".e_BASE."index.php");
exit;
}
2009-08-28 16:11:02 +00:00
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
2006-12-02 04:36:16 +00:00
$e_sub_cat = 'theme_manage';
e107::css("inline","
2012-11-29 22:03:36 -08:00
.hide { display: none }
.admin-theme-thumb { height:130px;overflow:hidden;border:1px solid black;margin-bottom:10px }
.admin-theme-thumb:hover { opacity:0.4 }
.admin-theme-options { transition: opacity .20s ease-in-out;
-moz-transition: opacity .20s ease-in-out;
-webkit-transition: opacity .20s ease-in-out;
2012-06-17 08:08:01 +00:00
opacity:0;
width:100%;
height:80px;
padding-top:50px;
white-space:nowrap;
background-color:black;
display:block;position:relative; text-align:center; vertical-align:middle; top:-141px;}
.admin-theme-options:hover { opacity:0.8; }
2012-11-29 22:03:36 -08:00
.admin-theme-title { font-size: 15px; overflow:hidden; padding-left:5px; white-space:no-wrap; width:200px; position:relative; top:-132px; }
.admin-theme-select {border:1px dotted silver;background-color:#DDDDDD;float:left }
.admin-theme-select-active { background-color:red;float:left }
2012-11-29 22:03:36 -08:00
.admin-theme-cell { width:202px; height:160px; padding:10px; -moz-border-radius: 5px; border-radius: 5px; margin:5px}
.admin-theme-cell-default { border:1px dotted silver; background-color:#DDDDDD }
.admin-theme-cell-site { background-color: #d9edf7; border: 1px solid #bce8f1; }
.admin-theme-cell-admin { background-color:#FFFFD5; border: 1px solid #FFCC00; }
");
2006-12-02 04:36:16 +00:00
require_once(e_HANDLER."theme_handler.php");
$themec = new themeHandler;
2012-11-29 22:03:36 -08:00
if(e_AJAX_REQUEST)
{
define('e_IFRAME',true);
}
2006-12-02 04:36:16 +00:00
2012-11-28 04:32:05 -08:00
if(e_AJAX_REQUEST)
{
$tm = (string) $_GET['id'];
$data = $themec->getThemeInfo($tm);
2012-11-28 04:32:05 -08:00
echo $themec->renderThemeInfo($data);
exit;
}
2012-11-29 22:03:36 -08:00
else {
require_once("auth.php");
2012-11-28 04:32:05 -08:00
2012-11-29 22:03:36 -08:00
echo '
2012-11-28 04:32:05 -08:00
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Theme Info.</h3>
</div>
<div class="modal-body">
<p>Loading…</p>
</div>
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
</div>
</div>';
2012-11-29 22:03:36 -08:00
}
2012-11-28 04:32:05 -08:00
$mode = (e_QUERY) ? e_QUERY :"main" ;
2006-12-02 04:36:16 +00:00
if(vartrue($_POST['selectadmin']))
2009-07-06 05:59:42 +00:00
{
$mode = "admin";
}
if(vartrue($_POST['upload']))
{
$mode = "choose";
}
if(vartrue($_POST['selectmain']) || varset($_POST['setUploadTheme']))
2009-07-06 05:59:42 +00:00
{
$mode = "main";
}
$themec -> showThemes($mode);
2012-11-28 04:32:05 -08:00
// <a data-toggle="modal" href="'.e_SELF.'" data-target="#myModal" class="btn" >Launch demo modal</a>
2009-07-06 05:59:42 +00:00
require_once("footer.php");
2009-07-06 05:59:42 +00:00
function theme_adminmenu()
{
global $mode;
2012-11-26 03:23:20 -08:00
$mode = e_QUERY;
2009-07-06 05:59:42 +00:00
$e107 = &e107::getInstance();
$var['main']['text'] = TPVLAN_33;
$var['main']['link'] = e_SELF;
$var['admin']['text'] = TPVLAN_34;
$var['admin']['link'] = e_SELF."?admin";
$var['choose']['text'] = TPVLAN_51;
$var['choose']['link'] = e_SELF."?choose";
$var['upload']['text'] = TPVLAN_38;
$var['upload']['link'] = e_SELF."?upload";
$selected = (e_QUERY) ? e_QUERY : "main";
e107::getNav()->admin(TPVLAN_26, $selected, $var);
2009-07-06 05:59:42 +00:00
}
2006-12-02 04:36:16 +00:00
2006-12-02 04:36:16 +00:00
?>