2009-02-21 02:28:19 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.");
|
|
|
|
|
/**
|
|
|
|
|
* Gallery - a web based photo album viewer and editor
|
2009-05-13 20:04:58 +00:00
|
|
|
* Copyright (C) 2000-2009 Bharat Mediratta
|
2009-02-21 02:28:19 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
|
|
|
* your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*/
|
2009-03-04 15:46:10 +00:00
|
|
|
class server_add_theme_Core {
|
2009-06-04 23:23:11 +08:00
|
|
|
static function head($theme) {
|
2009-10-22 13:09:20 -07:00
|
|
|
if (identity::active_user()->admin) {
|
2009-10-23 22:24:06 -06:00
|
|
|
$theme->css("server_add.css");
|
2009-07-22 14:27:57 -07:00
|
|
|
$theme->script("server_add.js");
|
2009-06-04 12:21:51 -07:00
|
|
|
}
|
2009-06-04 23:23:11 +08:00
|
|
|
}
|
|
|
|
|
|
2009-02-21 02:28:19 +00:00
|
|
|
static function admin_head($theme) {
|
2009-03-03 22:25:22 +00:00
|
|
|
$head = array();
|
2009-04-03 15:40:41 +00:00
|
|
|
if (strpos(Router::$current_uri, "admin/server_add") !== false) {
|
2009-10-23 22:24:06 -06:00
|
|
|
$theme->css("server_add.css");
|
2009-07-22 14:27:57 -07:00
|
|
|
$theme->css("jquery.autocomplete.css");
|
2009-03-05 01:22:27 +00:00
|
|
|
$base = url::site("__ARGS__");
|
2009-03-03 22:25:22 +00:00
|
|
|
$csrf = access::csrf_token();
|
|
|
|
|
$head[] = "<script> var base_url = \"$base\"; var csrf = \"$csrf\";</script>";
|
2009-02-21 02:28:19 +00:00
|
|
|
|
2009-07-22 14:27:57 -07:00
|
|
|
$theme->script("jquery.autocomplete.js");
|
|
|
|
|
$theme->script("admin.js");
|
2009-03-03 22:25:22 +00:00
|
|
|
}
|
2009-06-04 23:23:11 +08:00
|
|
|
|
2009-02-21 02:28:19 +00:00
|
|
|
return implode("\n", $head);
|
|
|
|
|
}
|
|
|
|
|
}
|