• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP theme_admin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中theme_admin函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_admin函数的具体用法?PHP theme_admin怎么用?PHP theme_admin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了theme_admin函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: theme_admin

            $sort = $_GET['sort'];
            $order = $_GET['order'];
            $limit = $_GET['limit'];
        }
    }
}
if ($_SESSION['jabatan'] != "admin") {
    echo "<meta http-equiv='refresh' content='0;url=../index.php'>";
    exit;
}
?>
<head>
<title>KATAR 06</title>
<link rel="icon" href="../image/logo/logo.png" sizes="16x16">
<?php 
echo theme_admin();
?>
<link href="../css/datepicker.css" rel="stylesheet">
<script src="../js/jquery.js"></script>
<script src="../js/bootstrap.js"></script>
<script src="..js/caption.js"></script>
<script src="..js/modal.js"></script>
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script>
<script src="js/jquery.js"></script>
<script src="../js/bootstrap-datepicker.js"></script>

<script type="text/javascript">
    $(window).load(function(){
        $('#automodal').modal('show');
    });
	 $(window).load(function(){
开发者ID:hafiizhekom,项目名称:katar,代码行数:31,代码来源:rapat.php


示例2: get

 /**
  * @brief Themes admin page.
  *
  * @return string
  */
 function get()
 {
     $allowed_themes_str = get_config('system', 'allowed_themes');
     $allowed_themes_raw = explode(',', $allowed_themes_str);
     $allowed_themes = array();
     if (count($allowed_themes_raw)) {
         foreach ($allowed_themes_raw as $x) {
             if (strlen(trim($x))) {
                 $allowed_themes[] = trim($x);
             }
         }
     }
     $themes = array();
     $files = glob('view/theme/*');
     if ($files) {
         foreach ($files as $file) {
             $f = basename($file);
             $is_experimental = intval(file_exists($file . '/.experimental'));
             $is_supported = 1 - intval(file_exists($file . '/.unsupported'));
             // Is not used yet
             $is_allowed = intval(in_array($f, $allowed_themes));
             $themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
         }
     }
     if (!count($themes)) {
         notice(t('No themes found.'));
         return '';
     }
     /*
      * Single theme
      */
     if (\App::$argc == 3) {
         $theme = \App::$argv[2];
         if (!is_dir("view/theme/{$theme}")) {
             notice(t("Item not found."));
             return '';
         }
         if (x($_GET, "a") && $_GET['a'] == "t") {
             check_form_security_token_redirectOnErr('/admin/themes', 'admin_themes', 't');
             // Toggle theme status
             $this->toggle_theme($themes, $theme, $result);
             $s = $this->rebuild_theme_table($themes);
             if ($result) {
                 info(sprintf('Theme %s enabled.', $theme));
             } else {
                 info(sprintf('Theme %s disabled.', $theme));
             }
             set_config('system', 'allowed_themes', $s);
             goaway(z_root() . '/admin/themes');
         }
         // display theme details
         require_once 'library/markdown.php';
         if ($this->theme_status($themes, $theme)) {
             $status = "on";
             $action = t("Disable");
         } else {
             $status = "off";
             $action = t("Enable");
         }
         $readme = Null;
         if (is_file("view/theme/{$theme}/README.md")) {
             $readme = file_get_contents("view/theme/{$theme}/README.md");
             $readme = Markdown($readme);
         } else {
             if (is_file("view/theme/{$theme}/README")) {
                 $readme = "<pre>" . file_get_contents("view/theme/{$theme}/README") . "</pre>";
             }
         }
         $admin_form = '';
         if (is_file("view/theme/{$theme}/php/config.php")) {
             require_once "view/theme/{$theme}/php/config.php";
             if (function_exists("theme_admin")) {
                 $admin_form = theme_admin($a);
             }
         }
         $screenshot = array(get_theme_screenshot($theme), t('Screenshot'));
         if (!stristr($screenshot[0], $theme)) {
             $screenshot = null;
         }
         $t = get_markup_template('admin_plugins_details.tpl');
         return replace_macros($t, array('$title' => t('Administration'), '$page' => t('Themes'), '$toggle' => t('Toggle'), '$settings' => t('Settings'), '$baseurl' => z_root(), '$plugin' => $theme, '$status' => $status, '$action' => $action, '$info' => get_theme_info($theme), '$function' => 'themes', '$admin_form' => $admin_form, '$str_author' => t('Author: '), '$str_maintainer' => t('Maintainer: '), '$screenshot' => $screenshot, '$readme' => $readme, '$form_security_token' => get_form_security_token('admin_themes')));
     }
     /*
      * List themes
      */
     $xthemes = array();
     if ($themes) {
         foreach ($themes as $th) {
             $xthemes[] = array($th['name'], $th['allowed'] ? "on" : "off", get_theme_info($th['name']));
         }
     }
     $t = get_markup_template('admin_plugins.tpl');
     return replace_macros($t, array('$title' => t('Administration'), '$page' => t('Themes'), '$submit' => t('Submit'), '$baseurl' => z_root(), '$function' => 'themes', '$plugins' => $xthemes, '$experimental' => t('[Experimental]'), '$unsupported' => t('[Unsupported]'), '$form_security_token' => get_form_security_token('admin_themes')));
 }
开发者ID:phellmes,项目名称:hubzilla,代码行数:99,代码来源:Themes.php


示例3: __get_theme_admin_form

 function __get_theme_admin_form(&$a, $theme)
 {
     $orig_theme = $a->theme;
     $orig_page = $a->page;
     $orig_session_theme = $_SESSION['theme'];
     require_once "view/theme/{$theme}/theme.php";
     require_once "view/theme/{$theme}/config.php";
     $_SESSION['theme'] = $theme;
     $init = $theme . "_init";
     if (function_exists($init)) {
         $init($a);
     }
     if (function_exists("theme_admin")) {
         $admin_form = theme_admin($a);
     }
     $_SESSION['theme'] = $orig_session_theme;
     $a->theme = $orig_theme;
     $a->page = $orig_page;
     return $admin_form;
 }
开发者ID:vinzv,项目名称:friendica,代码行数:20,代码来源:admin.php



注:本文中的theme_admin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP theme_copyright函数代码示例发布时间:2022-05-23
下一篇:
PHP theme_404_content函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap