当前位置: 首页>>代码示例>>PHP>>正文


PHP IPSLib::getAppFolder方法代码示例

本文整理汇总了PHP中IPSLib::getAppFolder方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::getAppFolder方法的具体用法?PHP IPSLib::getAppFolder怎么用?PHP IPSLib::getAppFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPSLib的用法示例。


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

示例1: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     parent::__construct($registry, TRUE);
     $_app = $this->request['app'] ? $this->request['app'] : IPS_APP_COMPONENT;
     /* Update paths and such */
     $this->settings['base_url'] = $this->settings['_original_base_url'];
     $this->settings['public_url'] = $this->settings['_original_base_url'] . '/index.php?';
     $this->settings['base_acp_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY;
     $this->settings['skin_acp_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . "/skin_cp";
     $this->settings['skin_app_url'] = $this->settings['skin_acp_url'];
     $this->settings['js_main_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . '/js/';
     $this->settings['js_app_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . '/' . IPSLib::getAppFolder($_app) . '/' . $_app . '/js/';
     if (ipsRegistry::$request['app']) {
         $this->settings['skin_app_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . '/' . IPSLib::getAppFolder($_app) . '/' . $_app . "/skin_cp/";
     }
     /* Update base URL */
     if ($this->member->session_type == 'cookie') {
         $this->settings['base_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . '/index.php?';
     } else {
         $this->settings['base_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $this->request['adsess'] . '&';
     }
     $this->settings['_base_url'] = $this->settings['base_url'];
     $this->settings['base_url'] = $this->settings['base_url'] . 'app=' . IPS_APP_COMPONENT . '&';
     $this->settings['extraJsModules'] = '';
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:32,代码来源:adminOutput.php

示例2: applications_list

    /**
     * List the applications
     *
     * @param	array 		Application
     * @param	array 		Uninstalled applications
     * @return	string		HTML
     */
    public function applications_list($applications, $uninstalled = array(), $message = NULL)
    {
        $IPBHTML = "";
        //--starthtml--//
        $canInstall = $this->registry->class_permissions->checkPermission('app_install');
        $IPBHTML .= <<<EOF
<div class='section_title'>
\t<h2>{$this->lang->words['a_apps']}</h2>
\t
\t<div class='ipsActionBar clearfix'>
\t\t<ul>
EOF;
        if ($canInstall) {
            $IPBHTML .= <<<EOF
\t\t\t<li class='ipsActionButton'>
\t\t\t\t<a href='{$this->settings['base_url']}module=applications&amp;section=applications&amp;do=application_add'><img src='{$this->settings['skin_acp_url']}/images/icons/application_add.png' alt='' /> {$this->lang->words['a_addnewapp']}</a>
\t\t\t</li>
EOF;
        }
        $IPBHTML .= <<<EOF
\t\t\t<li class='ipsActionButton'>
\t\t\t\t<a href='{$this->settings['base_url']}module=applications&amp;section=applications&amp;do=module_recache_all'><img src='{$this->settings['skin_acp_url']}/images/icons/arrow_refresh.png' alt='' /> {$this->lang->words['recache_link']}</a>
\t\t\t</li>
EOF;
        if ($this->settings['search_method'] == 'sphinx' && $this->registry->class_permissions->checkPermission('build_sphinx')) {
            $IPBHTML .= <<<EOF
\t\t\t<li class='ipsActionButton'>
\t\t\t\t<a href='#' class='ipbmenu' id='sphinx_conf' title='{$this->lang->words['sphinx_menu_desc']}'><img src='{$this->settings['skin_acp_url']}/images/icons/cog.png' /> {$this->lang->words['sphinx_menu_title']} <img src='{$this->settings['skin_acp_url']}/images/useropts_arrow.png' /></a>
\t\t\t\t<ul class='ipbmenu_content' id='sphinx_conf_menucontent' style='display: none'>
\t\t\t\t\t<li>
\t\t\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/page_white_code.png' alt='' /> <a href='{$this->settings['base_url']}module=applications&amp;section=applications&amp;do=sphinxBuildConf'>{$this->lang->words['sphinx_build_conf']}</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li>
\t\t\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/page_white_code.png' alt='' /> <a href="{$this->settings['base_url']}module=applications&amp;section=applications&amp;do=sphinxBuildCron">{$this->lang->words['sphinx_build_cronjob']}</a>
\t\t\t\t\t</li>
\t\t\t\t</ul>
\t\t\t</li>
EOF;
        }
        $IPBHTML .= <<<EOF
\t\t\t<li class='ipsActionButton'>
\t\t\t\t<a href='{$this->settings['base_url']}{$this->form_code}do=applications_overview&amp;checkUpdates=1'><img src='{$this->settings['skin_acp_url']}/images/icons/cog.png' /> {$this->lang->words['hook_check_updates']}</a>
\t\t\t</li>
\t\t\t<li class='ipsActionButton inDev'>
\t\t\t\t<a href='{$this->settings['base_url']}module=applications&amp;section=applications&amp;do=inDevExportApps'><img src='{$this->settings['skin_acp_url']}/images/icons/arrow_rotate_anticlockwise.png' alt='' /> {$this->lang->words['export_apps_xml']}</a>
\t\t\t</li>
\t\t\t<li class='ipsActionButton inDev'>
\t\t\t\t<a href='{$this->settings['base_url']}{$this->form_code}&amp;do=inDevExportAll'><img src='{$this->settings['skin_acp_url']}/images/icons/export.png' alt='' /> {$this->lang->words['export_modules_xml']}</a>
\t\t\t</li>
\t\t\t<li class='ipsActionButton inDev'>
\t\t\t\t<a href='{$this->settings['base_url']}{$this->form_code}&amp;do=inDevRebuildAll'><img src='{$this->settings['skin_acp_url']}/images/icons/import.png' alt='' /> {$this->lang->words['import_modules_xml']}</a>
\t\t\t</li>
\t\t</ul>
\t</div>
</div>

EOF;
        if ($message) {
            $IPBHTML .= "<div class='information-box'>{$message}</div><br />";
        }
        $IPBHTML .= <<<EOF
<!-- LEFT SIDEBAR -->
<div class='acp-box left' style='width: 69%'>
 \t<h3>{$this->lang->words['a_installedapps']}</h3>
 \t
\t<div id='tabstrip_appsList' class='ipsTabBar with_left with_right'>
\t\t<span class='tab_left'>&laquo;</span>
\t\t<span class='tab_right'>&raquo;</span>
\t\t<ul>
\t\t\t<li id='tab_appsEnabled'>{$this->lang->words['a_apps_enabled']}</li>
\t\t\t<li id='tab_appsDisabled'>{$this->lang->words['a_apps_disabled']}</li>
\t\t</ul>
\t</div>
\t
\t<div id='tabstrip_appsList_content' class='ipsTabBar_content'>
\t\t
\t\t<div id='tab_appsEnabled_content'>
\t\t\t<table class='ipsTable' id='apps_enabled'>
\t\t\t\t<tr>
\t\t\t\t\t<th width='1%'>&nbsp;</th>
\t\t\t\t\t<th width='1%'>&nbsp;</th>
\t\t\t\t\t<th width='55%'>{$this->lang->words['a_hookapp']}</th>
\t\t\t\t\t<th width='15%' class='center'>{$this->lang->words['app_tab_permissions']}</th>
\t\t\t\t\t<th width='20%' class='center'>{$this->lang->words['a_lastupdated']}</th>
\t\t\t\t\t<th class='col_buttons'>&nbsp;</th>
\t\t\t\t</tr>
EOF;
        if (count($applications['enabled'])) {
            foreach ($applications['enabled'] as $app) {
                $img = is_file(IPSLib::getAppDir($app['app_directory']) . '/skin_cp/appIcon.png') ? $this->settings['base_acp_url'] . '/' . IPSLib::getAppFolder($app['app_directory']) . '/' . $app['app_directory'] . '/skin_cp/appIcon.png' : "{$this->settings['skin_acp_url']}/images/applications/{$app['app_directory']}.png";
                # IPS app?
                $app['titlePrefix'] = in_array($app['app_location'], array('root', 'ips')) ? "<span class='ipsBadge badge_purple'>{$this->lang->words['gl_ipsapp']}</span>&nbsp;&nbsp;" : '';
                # Sort title
//.........这里部分代码省略.........
开发者ID:mover5,项目名称:imobackup,代码行数:101,代码来源:cp_skin_applications.php

示例3: settings_titles_wrapper

    /**
     * Setting titles wrapper
     *
     * @param	array 		Setting groups
     * @param	string		Application tab to start on
     * @return	string		HTML
     */
    public function settings_titles_wrapper($settings, $start_app = '')
    {
        $IPBHTML = "";
        //--starthtml--//
        $_default_tab = !empty($this->request['_dtab']) ? $this->request['_dtab'] : 'System';
        $IPBHTML .= <<<EOF
<div class='section_title'>
\t<h2>{$this->lang->words['tol_settings']}</h2>
\t<div class='ipsActionBar clearfix'>
\t\t<ul>
\t\t\t<li class='ipsActionButton'>
\t\t\t\t<a href='{$this->settings['base_url']}{$this->form_code}do=settinggroup_new'><img src='{$this->settings['skin_acp_url']}/images/icons/table_add.png' alt='' /> {$this->lang->words['tol_add_new_setting_group']}</a>
\t\t\t</li>
\t\t\t<!--<li class='ipsActionButton'>
\t\t\t\t<a href='#'><img src='{$this->settings['skin_acp_url']}/images/icons/import.png' alt='' /> {$this->lang->words['tol_import_xml_settings']}</a>
\t\t\t</li>-->
\t\t\t<li class='ipsActionButton inDev'><a href='{$this->settings['base_url']}{$this->form_code}&do=settingsImportApps'><img src='{$this->settings['skin_acp_url']}/images/icons/import.png' alt='' /> Import All XML Settings</a></li>
\t\t\t<li class='ipsActionButton inDev'><a href='{$this->settings['base_url']}{$this->form_code}&do=settingsExportApps'><img src='{$this->settings['skin_acp_url']}/images/icons/export.png' alt='' /> Export All XML Settings</a></li>
\t\t</ul>
\t</div>
</div>

<div class='acp-box'>
<h3>{$this->lang->words['tol_settings_groups']}</h3>\t
<div id='tabstrip_settings' class='ipsTabBar with_left with_right'>
\t<span class='tab_left'>&laquo;</span>
\t<span class='tab_right'>&raquo;</span>
\t<ul>
EOF;
        foreach ($settings as $tab => $group) {
            if (ipsRegistry::$request['app'] and $tab == ipsRegistry::$request['app']) {
                $_default_tab = $tab;
            }
            $_tab = IPSText::md5Clean($tab);
            $IPBHTML .= <<<EOF
\t<li id='tab_{$_tab}'>{$tab}</li>
\t
EOF;
        }
        $IPBHTML .= <<<EOF
\t</ul>
</div>

<div id='tabstrip_settings_content' class='ipsTabBar_content'>
EOF;
        foreach ($settings as $tab => $app_data) {
            $_tab = IPSText::md5Clean($tab);
            $IPBHTML .= <<<EOF
\t<div id='tab_{$_tab}_content'>
\t\t<table class='ipsTable double_pad'>
\t\t
EOF;
            foreach ($app_data as $r) {
                if (IN_DEV) {
                    $export_settings_group = "<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=MOD_export_setting&amp;conf_group={$r['conf_title_id']}' title='{$this->lang->words['export_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/export_settings_group.png' alt='' /> {$this->lang->words['export_group']}</a>\r\n\t\t\t\t</li>";
                }
                $img = is_file(IPSLib::getAppDir($r['conf_title_app']) . '/skin_cp/appIcon.png') ? $this->settings['base_acp_url'] . '/' . IPSLib::getAppFolder($r['conf_title_app']) . '/' . $r['conf_title_app'] . '/skin_cp/appIcon.png' : "{$this->settings['skin_acp_url']}/images/applications/{$r['conf_title_app']}.png";
                $IPBHTML .= <<<EOF
\t\t<tr class='ipsControlRow'>
\t\t \t<td width='3%' style='text-align: center'><img src='{$img}' alt='{$this->lang->words['tol_folder']}' /></td>
\t\t \t<td width='80%'>
\t\t\t\t<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=setting_view&amp;conf_group={$r['conf_title_id']}' class='larger_text'><b>{$r['conf_title_title']}</b></a>
\t\t\t\t<span class='desctext'>({$r['conf_title_count']} {$this->lang->words['settings_suffix']})</span>
EOF;
                if ($r['conf_title_desc']) {
                    $IPBHTML .= <<<EOF
\t\t\t\t<br /><span class='desctext'>{$r['conf_title_desc']}</span>
EOF;
                }
                $IPBHTML .= <<<EOF
\t\t\t</td>
\t\t\t<td class='col_buttons'>
\t\t\t\t<ul class='ipsControlStrip'>
\t\t\t\t\t<li class='i_edit'>
\t\t\t\t\t\t<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_showedit&amp;id={$r['conf_title_id']}' title='{$this->lang->words['tol_edit_settings_group']}'>{$this->lang->words['tol_edit_settings_group']}</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li class='i_delete'>
\t\t\t\t\t\t<a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_delete&amp;id={$r['conf_title_id']}");' title='{$this->lang->words['tol_delete_settings_group']}'>{$this->lang->words['tol_delete_settings_group']}</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li class='ipsControlStrip_more'>
\t\t\t\t\t\t<a href='#' id="menu{$r['conf_title_id']}" class='ipbmenu'>{$this->lang->words['frm_options']}</a>
\t\t\t\t\t</li>
\t\t\t\t</ul>\t
\t\t\t\t<ul class='acp-menu' id='menu{$r['conf_title_id']}_menucontent' style='display: none'>
\t\t\t\t\t<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_resync&amp;id={$r['conf_title_id']}' title='{$this->lang->words['tol_recount_settings_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/rebuild_settings_group.png' alt='Icon' /> {$this->lang->words['tol_recount_settings_group']}</a></li>
\t\t\t\t\t{$export_settings_group}
\t\t\t\t</ul>
\t\t\t</td>
\t\t</tr>
EOF;
            }
            $IPBHTML .= <<<EOF
\t\t</table>
//.........这里部分代码省略.........
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:101,代码来源:cp_skin_settings.php

示例4: global_app_menu_html

    /**
     * Generate the application menu HTML
     *
     * @access	public
     * @return	string		HTML
     */
    public function global_app_menu_html()
    {
        $IPBHTML = "";
        //--starthtml--//
        $applications = ipsRegistry::$applications;
        $count = 0;
        $this->registry->getClass('class_permissions')->return = 1;
        foreach ($applications as $app_dir => $app_data) {
            $class = '';
            $tag = '';
            //if ( $app_data['app_directory'] == 'core' )
            if ($app_data['app_location'] == 'root' || $this->registry->getClass('class_permissions')->checkForAppAccess($app_data['app_directory']) !== TRUE || !$applications[$app_dir]['app_enabled']) {
                //$_extraCSS = 'display:none';
                continue;
            }
            if ($app_data['app_location'] == 'ips') {
                $class = 'ips_app';
                $tag = $this->lang->words['gl_ipsapp'];
            }
            $img = file_exists(IPSLib::getAppDir($app_data['app_directory']) . '/skin_cp/appIcon.png') ? $this->settings['base_acp_url'] . '/' . IPSLib::getAppFolder($app_data['app_directory']) . '/' . $app_data['app_directory'] . '/skin_cp/appIcon.png' : "{$this->settings['skin_acp_url']}/_newimages/applications/{$app_dir}.png";
            $IPBHTML .= <<<EOF

\t<li id='app_{$app_dir}' class='{$class}'>
\t\t<a href='{$this->settings['_base_url']}app={$app_data['app_directory']}'><img src='{$img}' alt='{$app_dir}' />
\t\t<strong>{$app_data['app_title']}</strong>
\t\t<span class='tagline'>{$tag}</span>
\t\t</a>
\t</li>
EOF;
            $count++;
        }
        if (!$count) {
            $IPBHTML .= <<<EOF

\t<li id='app_manageapps' class='ips_app'>
\t\t<a href='{$this->settings['_base_url']}app=core&amp;module=applications&amp;section=applications&amp;do=applications_overview'><img src='{$this->settings['skin_acp_url']}/_newimages/applications/{$app_dir}.png' alt='{$app_dir}' />
\t\t<strong>{$this->lang->words['gl_manageapps']}</strong></a>
\t</li>
EOF;
        }
        //--endhtml--//
        return $IPBHTML;
    }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:49,代码来源:cp_skin_global.php

示例5: install_checkdb

 /**
  * Check DB
  *
  * @return void
  */
 public function install_checkdb()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_system'), 'core');
     ipsRegistry::$settings['base_url'] = ipsRegistry::$settings['board_url'];
     ipsRegistry::$settings['public_url'] = ipsRegistry::$settings['board_url'] . '/index.php?';
     ipsRegistry::$settings['public_dir'] = ipsRegistry::$settings['board_url'] . '/' . PUBLIC_DIRECTORY . '/';
     ipsRegistry::$settings['base_acp_url'] = ipsRegistry::$settings['base_url'] . '/' . CP_DIRECTORY;
     ipsRegistry::$settings['skin_acp_url'] = ipsRegistry::$settings['base_url'] . '/' . CP_DIRECTORY . "/skin_cp";
     ipsRegistry::$settings['skin_app_url'] = ipsRegistry::$settings['skin_acp_url'];
     ipsRegistry::$settings['js_main_url'] = ipsRegistry::$settings['base_url'] . '/' . CP_DIRECTORY . '/js/';
     ipsRegistry::$settings['js_app_url'] = ipsRegistry::$settings['base_url'] . '/' . CP_DIRECTORY . '/' . IPSLib::getAppFolder($_app) . '/' . $_app . '/js/';
     ipsRegistry::$settings['base_url'] = ipsRegistry::$settings['base_url'] . '/' . CP_DIRECTORY . '/upgrade/index.php?';
     ipsRegistry::$settings['_base_url'] = ipsRegistry::$settings['base_url'];
     $_class = IPSLib::loadActionOverloader(IPS_ROOT_PATH . '/applications/core/modules_admin/diagnostics/diagnostics.php', 'admin_core_diagnostics_diagnostics');
     $_check = new $_class(ipsRegistry::instance());
     if (method_exists($_check, 'makeRegistryShortcuts')) {
         $_check->makeRegistryShortcuts(ipsRegistry::instance());
     }
     $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('core') . '/skin_cp/cp_skin_diagnostics.php', 'cp_skin_diagnostics', 'core');
     $_check->html = new $classToLoad(ipsRegistry::instance());
     $_check->form_code = $_check->html->form_code = 'app=upgrade&s=' . $this->request['s'];
     $_check->form_code_js = $_check->html->form_code_js = 'app=upgrade&amp;s=' . $this->request['s'];
     $_check->_dbCheck();
     if (strpos($this->registry->output->html, "<!--NOERRORSFOUND-->") !== false) {
         $this->_finishStep(array("Проверка БД закончена - Проблем не обнаружено"), "Обновление: Проверка БД", 'upgrade&do=modules');
         return;
     }
     $this->registry->output->html = str_replace("module=diagnostics", '', $this->registry->output->html);
     $this->registry->output->html = str_replace("section=diagnostics", 'section=upgrade', $this->registry->output->html);
     $this->registry->output->html = str_replace("do=dbchecker", 'do=checkdb', $this->registry->output->html);
     $this->registry->output->addContent($this->registry->output->template()->db_checker_css() . $this->registry->output->html);
     $this->registry->output->setTitle("Upgrade: Database Checker");
     $this->registry->output->setNextAction('upgrade&do=modules');
     $this->registry->output->setInstallStep($this->_stepCount, $this->_totalSteps);
     $this->registry->output->sendOutput();
     //-----------------------------------------
     // Next...
     //-----------------------------------------
     //$output[] = "Database Check Complete";
     //$this->_finishStep( $output, "Upgrade: DB Check", 'upgrade&do=modules' );
 }
开发者ID:Advanture,项目名称:Online-RolePlay,代码行数:49,代码来源:upgrade.php

示例6: applicationsOverview

 /**
  * List applications
  *
  * @return	@e void		[Outputs to screen]
  */
 public function applicationsOverview()
 {
     /* Init vars */
     $folders = array();
     $applications = array('enabled' => array('core' => array()), 'disabled' => array());
     $_apps = array();
     $uninstalled = array();
     $checkUpdates = false;
     $appsUpdates = 0;
     $message = '';
     /* Get the setup class */
     require_once IPS_ROOT_PATH . "setup/sources/base/setup.php";
     /*noLibHook*/
     /* Checking for updates? */
     if (!empty($this->request['checkUpdates'])) {
         $checkUpdates = true;
         /* Get hooks file for update check */
         $classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('core') . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks');
         $hooksClass = new $classToLoad();
         $hooksClass->makeRegistryShortcuts($this->registry);
     }
     //-----------------------------------------
     // Get DB applications
     //-----------------------------------------
     $this->DB->build(array('select' => '*', 'from' => 'core_applications', 'order' => 'app_position'));
     $this->DB->execute();
     while ($row = $this->DB->fetch()) {
         /* Got updates? */
         if ($row['app_update_check'] && $checkUpdates === true) {
             $row['app_update_available'] = $hooksClass->_updateAvailable($row['app_update_check'], $row['app_long_version']);
             if ($row['app_update_available'][0]) {
                 $appsUpdates++;
             }
         } else {
             $row['app_update_available'] = array(0);
         }
         $_apps[IPSLib::getAppFolder($row['app_directory']) . '/' . $row['app_directory']] = $row;
     }
     //-----------------------------------------
     // Get folder applications...
     //-----------------------------------------
     foreach (array('applications', 'applications_addon/ips', 'applications_addon/other') as $folder) {
         try {
             foreach (new DirectoryIterator(IPS_ROOT_PATH . $folder) as $file) {
                 if (!$file->isDot() and $file->isDir()) {
                     $_name = $file->getFileName();
                     if (substr($_name, 0, 1) != '.') {
                         $folders[$folder . '/' . $_name] = $_name;
                     }
                 }
             }
         } catch (Exception $e) {
         }
     }
     //-----------------------------------------
     // Installed Loop...
     //-----------------------------------------
     foreach ($_apps as $_app_path => $row) {
         $app_dir = $row['app_directory'];
         /* Version numbers */
         $_a = ($app_dir == 'forums' or $app_dir == 'members') ? 'core' : $app_dir;
         $numbers = IPSSetUp::fetchAppVersionNumbers($_a);
         $row['_human_version'] = $numbers['latest'][1];
         $row['_long_version'] = $numbers['latest'][0];
         $row['_human_current'] = $numbers['current'][1];
         $row['_long_current'] = $numbers['current'][0];
         /* Nexus? */
         if ($row['app_directory'] == 'nexus') {
             $encoding = 'Unencoded';
             $file = file_get_contents(IPSLib::getAppDir('nexus') . '/app_class_nexus.php');
             if (substr($file, 6, 5) == '@Zend') {
                 $phpVersion = phpversion();
                 $phpVersion = str_replace(substr($phpVersion, strrpos($phpVersion, '.')), '', $phpVersion);
                 $encoding = "Zend {$phpVersion}";
             } elseif (substr($file, 36, 7) == 'ionCube' or substr($file, 37, 7) == 'ionCube') {
                 $encoding = 'Ioncube';
             }
             $row['_human_current'] .= " ({$encoding})";
         }
         if ($row['app_enabled']) {
             $applications['enabled'][$row['app_directory']] = $row;
         } else {
             $applications['disabled'][$row['app_directory']] = $row;
         }
     }
     //-----------------------------------------
     // Uninstalled
     //-----------------------------------------
     foreach ($folders as $filepath => $_file) {
         if (!in_array($filepath, array_keys($_apps))) {
             $info = IPSSetUp::fetchXmlAppInformation($_file, $this->settings['gb_char_set']);
             /* OK, we're making no effort to conceal the secret behind the ipskey. It's an honourable setting - do not abuse it.
             			   We only mildly obfuscate it to stop copy and paste mistakes in information.xml
             			*/
             $okToGo = 0;
//.........这里部分代码省略.........
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:101,代码来源:applications.php

示例7: applications_list


//.........这里部分代码省略.........
\t\t\t\t<td class='tablesubheader' style='width: 2%'>&nbsp;</td>
\t\t\t\t<td class='tablesubheader' style='width: 2%'>&nbsp;</td>
\t\t\t\t<td class='tablesubheader' style='width: 38%'>{$this->lang->words['a_app']}</td>
\t\t\t\t<td class='tablesubheader' style='width: 20%; text-align: center;'>{$this->lang->words['a_status']}</td>
\t\t\t\t<td class='tablesubheader' style='width: 18%; text-align: center;'>{$this->lang->words['a_version']}</td>
\t\t\t\t<td class='tablesubheader' style='width: 5%; text-align: center;'>{$this->lang->words['a_enabled']}</td>
\t\t\t\t<td class='tablesubheader' style='width: 5%; text-align: center;'>&nbsp;</td>
\t\t\t</tr>
\t\t</table>
\t</div>
EOF;
        $incrementer = 1;
        foreach ($applications as $local => $apps) {
            if (!count($apps)) {
                continue;
            }
            if ($local == 'ips') {
                $app['titlePrefix'] = $this->lang->words['a_ips'];
            } else {
                if ($local == 'other') {
                    $app['titlePrefix'] = $this->lang->words['a_thirdparty'];
                } else {
                    $app['titlePrefix'] = $this->lang->words['a_rootapps'];
                }
            }
            $IPBHTML .= <<<EOF
\t<ul id='handle_{$incrementer}' class='alternate_rows'>
\t\t<li class='tablesubsubheader'>
\t\t\t<strong>{$app['titlePrefix']}</strong>
\t\t</li>

EOF;
            foreach ($apps as $app) {
                $img = file_exists(IPSLib::getAppDir($app['app_directory']) . '/skin_cp/appIcon.png') ? $this->settings['base_acp_url'] . '/' . IPSLib::getAppFolder($app['app_directory']) . '/' . $app['app_directory'] . '/skin_cp/appIcon.png' : "{$this->settings['skin_acp_url']}/_newimages/applications/{$app['app_directory']}.png";
                $IPBHTML .= <<<EOF
\t\t<li class='isDraggable' style='width:100%;' id='app_{$app['app_id']}'>
\t\t\t<table width='100%' cellpadding='0' cellspacing='0' class='double_pad'>
\t\t\t\t<tr>
\t\t\t\t\t<td style='width: 2%'>
\t\t\t\t\t\t<div class='draghandle'><img src='{$this->settings['skin_acp_url']}/_newimages/drag_icon.png' alt='drag' /></div>
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 2%'>
\t\t\t\t\t\t<img src='{$img}' />
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 38%'>
\t\t\t\t\t\t<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=modules_overview&amp;app_id={$app['app_id']}&amp;sys_module_admin=1'><strong>{$app['titlePrefix']}{$app['app_title']}</strong></a>
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 20%; text-align: center;'>
EOF;
                if (isset($app['_long_version']) && $app['_long_version'] > $app['_long_current']) {
                    $IPBHTML .= "<a href='{$this->settings['board_url']}/" . CP_DIRECTORY . "/upgrade/' style='color:green; font-weight: bold;'>{$this->lang->words['a_upgradeavail']}</a>";
                } else {
                    $IPBHTML .= "<span class='desctext'>{$this->lang->words['a_oh_kay']}</span>";
                }
                $IPBHTML .= <<<EOF
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 18%; text-align: center;'>
\t\t\t\t\t\t{$app['_human_current']}
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 5%; text-align: center;'>
\t\t\t\t\t\t<a href='{$this->settings['base_url']}{$this->form_code}&amp;do=toggle_app&amp;app_id={$app['app_id']}' title='{$this->lang->words['toggle_app_enabled']}'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/{$app['_app_enabled']}' class='ipd' /></a>
\t\t\t\t\t</td>
\t\t\t\t\t<td style='width: 5%; text-align: center;'>
\t\t\t\t\t\t<img class='ipbmenu' id="menu_{$app['app_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['a_options']}' />
\t\t\t\t\t\t<ul class='acp-menu' id='menu_{$app['app_id']}_menucontent'>
EOF;
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:67,代码来源:cp_skin_applications.php

示例8: settings_titles_wrapper

    /**
     * Setting titles wrapper
     *
     * @access	public
     * @param	string		Title
     * @param	array 		Setting groups
     * @param	string		Application tab to start on
     * @return	string		HTML
     */
    public function settings_titles_wrapper($title, $settings, $start_app = '')
    {
        $IPBHTML = "";
        //--starthtml--//
        $_default_tab = isset($this->request['_dtab']) && $this->request['_dtab'] ? $this->request['_dtab'] : 'System';
        $IPBHTML .= <<<EOF
<div class='section_title'>
\t<h2>{$this->lang->words['tol_settings']}</h2>
\t<ul class='context_menu'>
\t\t<li>
\t\t\t<a href='{$this->settings['base_url']}module=tools&amp;section=settings&amp;do=settinggroup_new' style='text-decoration:none'><img src='{$this->settings['skin_acp_url']}/_newimages/icons/table_add.png' alt='' /> {$this->lang->words['tol_add_new_setting_group']}</a>
\t\t</li>
\t</ul>
</div>
<br />
<ul id='tabstrip_settings' class='tab_bar no_title'>
EOF;
        foreach ($settings as $tab => $group) {
            if (ipsRegistry::$request['app'] and $tab == ipsRegistry::$request['app']) {
                $_default_tab = $tab;
            }
            $_tab = IPSText::md5Clean($tab);
            $IPBHTML .= <<<EOF
\t<li id='tabtab-{$_tab}'>{$tab}</li>
\t
EOF;
        }
        $IPBHTML .= <<<EOF
</ul>

<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded",function() 
{
ipbAcpTabStrips.register('tabstrip_settings');
ipbAcpTabStrips.doToggle(\$('tabtab-{$_default_tab}'));
});
 //]]>
</script>

<div class='acp-box'>

EOF;
        foreach ($settings as $tab => $app_data) {
            $_tab = IPSText::md5Clean($tab);
            $IPBHTML .= <<<EOF
\t<div id='tabpane-{$_tab}'>
\t\t<table width='100%' class='alternate_rows double_pad' cellpadding='0' cellspacing='0' border='0'>
\t\t
EOF;
            foreach ($app_data as $r) {
                if (IN_DEV) {
                    $export_settings_group = "<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=MOD_export_setting&amp;conf_group={$r['conf_title_id']}' title='{$this->lang->words['export_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/export_settings_group.png' alt='Icon' /> {$this->lang->words['export_group']}</a>\n\t\t\t\t</li>";
                }
                $img = file_exists(IPSLib::getAppDir($r['conf_title_app']) . '/skin_cp/appIcon.png') ? $this->settings['base_acp_url'] . '/' . IPSLib::getAppFolder($r['conf_title_app']) . '/' . $r['conf_title_app'] . '/skin_cp/appIcon.png' : "{$this->settings['skin_acp_url']}/_newimages/applications/{$r['conf_title_app']}.png";
                $IPBHTML .= <<<EOF
\t\t<tr>
\t\t \t<td width='3%' style='text-align: center'><img src='{$img}' alt='{$this->lang->words['tol_folder']}' /></td>
\t\t \t<td width='90%'>
\t\t\t\t<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=setting_view&amp;conf_group={$r['conf_title_id']}'><b>{$r['conf_title_title']}</b></a>
\t\t\t\t<span style='color:gray'>({$r['conf_title_count']} settings)</span><br />
\t\t\t\t<span class='desctext'>{$r['conf_title_desc']}</span>
\t\t\t</td>
\t\t\t<td style='width: 3%'>
\t\t\t\t<img class='ipbmenu' id="menu{$r['conf_title_id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['frm_options']}' />
\t\t\t\t<ul class='acp-menu' id='menu{$r['conf_title_id']}_menucontent'>
\t\t\t\t\t<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=setting_view&amp;conf_group={$r['conf_title_id']}' title='{$this->lang->words['tol_manage_settings']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/manage_settings.png' alt='Icon' /> {$this->lang->words['tol_manage_settings']}</a></li>

\t\t\t\t\t<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_showedit&amp;id={$r['conf_title_id']}' title='{$this->lang->words['tol_edit_settings_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/edit_settings_group.png' alt='Icon' /> {$this->lang->words['tol_edit_settings_group']}</a></li>

\t\t\t\t\t<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_delete&amp;id={$r['conf_title_id']}' title='{$this->lang->words['tol_delete_settings_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/delete_settings_group.png' alt='Icon' /> {$this->lang->words['tol_delete_settings_group']}</a></li>

\t\t\t\t\t<li><a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=settinggroup_resync&amp;id={$r['conf_title_id']}' title='{$this->lang->words['tol_recount_settings_group']}'><img src='{$this->settings['skin_acp_url']}/images/options_menu/rebuild_settings_group.png' alt='Icon' /> {$this->lang->words['tol_recount_settings_group']}</a></li>

\t\t\t\t\t{$export_settings_group}
\t\t\t\t</ul>
\t\t\t</td>
\t\t</tr>
EOF;
            }
            $IPBHTML .= <<<EOF
\t\t</table>
\t</div>
\t
EOF;
        }
        $IPBHTML .= <<<EOF
</div>

<br />

//.........这里部分代码省略.........
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:101,代码来源:cp_skin_tools.php

示例9: applicationsOverview

 /**
  * List applications
  *
  * @access	private
  * @return	void		[Outputs to screen]
  */
 private function applicationsOverview()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $folders = array();
     $application = array();
     $_apps = array();
     $seen_count = 0;
     $total_items = 0;
     $uninstalled = array();
     /* Get the setup class */
     require IPS_ROOT_PATH . "setup/sources/base/setup.php";
     //-----------------------------------------
     // Get DB applications
     //-----------------------------------------
     $this->DB->build(array('select' => '*', 'from' => 'core_applications', 'order' => 'app_position'));
     $this->DB->execute();
     while ($row = $this->DB->fetch()) {
         $_apps[IPSLib::getAppFolder($row['app_directory']) . '/' . $row['app_directory']] = $row;
         $total_items++;
     }
     //-----------------------------------------
     // Get folder applications...
     //-----------------------------------------
     foreach (array('applications', 'applications_addon/ips', 'applications_addon/other') as $folder) {
         try {
             foreach (new DirectoryIterator(IPS_ROOT_PATH . $folder) as $file) {
                 if (!$file->isDot() and $file->isDir()) {
                     $_name = $file->getFileName();
                     if (substr($_name, 0, 1) != '.') {
                         $folders[$folder . '/' . $_name] = $_name;
                     }
                 }
             }
         } catch (Exception $e) {
         }
     }
     //-----------------------------------------
     // Installed Loop...
     //-----------------------------------------
     foreach ($_apps as $_app_path => $row) {
         $app_dir = $row['app_directory'];
         //-----------------------------------------
         // Enabled?
         //-----------------------------------------
         $row['_app_enabled'] = $row['app_enabled'] ? 'tick.png' : 'cross.png';
         /* Version numbers */
         $_a = ($app_dir == 'forums' or $app_dir == 'members') ? 'core' : $app_dir;
         $numbers = IPSSetUp::fetchAppVersionNumbers($_a);
         $row['_human_version'] = $numbers['latest'][1];
         $row['_long_version'] = $numbers['latest'][0];
         $row['_human_current'] = $numbers['current'][1];
         $row['_long_current'] = $numbers['current'][0];
         /* Exists? */
         if (!file_exists(IPSLib::getAppDir($app_dir))) {
             $row['_missing'] = 1;
         }
         $seen_count++;
         $application[$row['app_location']][] = $row;
     }
     /* Make sure they are in the proper order, hacky but it works :) */
     $__apps = array();
     $__apps['root'] = $application['root'] ? $application['root'] : array();
     $__apps['ips'] = $application['ips'] ? $application['ips'] : array();
     $__apps['other'] = $application['other'] ? $application['other'] : array();
     $application = $__apps;
     //-----------------------------------------
     // Uninstalled
     //-----------------------------------------
     foreach ($folders as $filepath => $_file) {
         if (!in_array($filepath, array_keys($_apps))) {
             $info = IPSSetUp::fetchXmlAppInformation($_file);
             /* OK, we're making no effort to conceal the secret behind the ipskey. It's an honourable setting - do not abuse it.
             			   We only mildly obfuscate it to stop copy and paste mistakes in information.xml
             			*/
             $okToGo = 0;
             if (strstr($filepath, 'applications_addon/ips') or strstr($filepath, 'applications/')) {
                 if (md5('ips_' . $_file) == $info['ipskey']) {
                     $okToGo = 1;
                 }
             } else {
                 if (strstr($filepath, 'applications_addon/other')) {
                     if (!$info['ipskey']) {
                         $okToGo = 1;
                     }
                 }
             }
             $uninstalled[$_file] = array('title' => $info['name'], 'author' => $info['author'], 'path' => $filepath, 'okToGo' => $okToGo, 'directory' => $_file);
         }
     }
     //-----------------------------------------
     // Show it...
     //-----------------------------------------
//.........这里部分代码省略.........
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:101,代码来源:applications.php


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