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


PHP OpenLibrary函数代码示例

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


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

示例1: main_motd

 function main_motd($eventData)
 {
     global $gEnv, $hui_titlebar, $hui_mainframe, $amp_locale;
     OpenLibrary('sites.library');
     $site = new Site($gEnv['root']['db'], $gEnv['site']['id'], $gEnv['site']['db']);
     $xml_def = '<vertgroup><name>motd</name>
       <children>
     
         <form><name>motd</name>
           <args>
             <method>post</method>
             <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'motd', ''), array('pass', 'setmotd', '')))) . '</action>
           </args>
           <children>
     
             <grid><name>motd</name>
     
               <children>
     
                 <label row="0" col="0" halign="" valign="top"><name>label</name>
                   <args>
                     <label type="encoded">' . urlencode($amp_locale->GetStr('motd.label')) . '</label>
                   </args>
                 </label>
     
                 <text row="0" col="1"><name>motd</name>
                   <args>
                     <rows>10</rows>
                     <cols>80</cols>
                     <disp>pass</disp>
                     <value type="encoded">' . urlencode($site->GetMotd()) . '</value>
                   </args>
                 </text>
     
               </children>
     
             </grid>
     
           </children>
         </form>
     
         <horizbar><name>hb</name></horizbar>
     
         <button>
           <name>apply</name>
           <args>
             <horiz>true</horiz>
             <frame>false</frame>
             <themeimage>button_ok</themeimage>
             <label type="encoded">' . urlencode($amp_locale->GetStr('set_motd.submit')) . '</label>
             <formsubmit>motd</formsubmit>
             <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'motd', ''), array('pass', 'setmotd', '')))) . '</action>
           </args>
         </button>
     
       </children>
     </vertgroup>';
     $hui_mainframe->AddChild(new HuiXml('page', array('definition' => $xml_def)));
     $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('motd.title');
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:60,代码来源:profiles.php

示例2: getStyle

 public function getStyle()
 {
     $result = array();
     OpenLibrary('configman.library');
     $cfg_file = new ConfigFile(CONFIG_PATH . $this->mStyleName . '.huistyle');
     if ($cfg_file->Opened()) {
         $values = $cfg_file->ValuesArray();
         while (list($key, $val) = each($values)) {
             $key = trim($key);
             $val = trim($val);
             $realkey = strtolower(substr($key, strpos($key, '.') + 1));
             if ($realkey != 'name') {
                 $result[$realkey]['value'] = $val;
                 $result[$realkey]['base'] = $this->mStyleName;
             }
         }
     } else {
         import('com.solarix.ampoliros.io.log.Logger');
         $log = new Logger(AMP_LOG);
         $log->LogEvent('ampoliros.huithemes_library.huistyle_class.getstyle', 'Unable to open style file ' . CONFIG_PATH . $this->mStyleName . '.huistyle', LOGGER_ERROR);
     }
     return $result;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:23,代码来源:HuiStyle.php

示例3: initTheme

 public function initTheme()
 {
     $result = false;
     if (strlen($this->mTheme)) {
         global $gEnv;
         import('com.solarix.ampoliros.core.Ampoliros');
         $amp = Ampoliros::instance('Ampoliros');
         if ($this->mTheme == 'default') {
             $this->mTheme = $gEnv['hui']['theme']['default'];
         }
         if ($this->mTheme != 'userdefined') {
             if (file_exists(CONFIG_PATH . $this->mTheme . '.huitheme')) {
                 $this->mThemeFile = CONFIG_PATH . $this->mTheme . '.huitheme';
             } else {
                 $this->mTheme = $gEnv['hui']['theme']['default'];
                 $this->mThemeFile = CONFIG_PATH . $gEnv['hui']['theme']['default'] . '.huitheme';
             }
             OpenLibrary('configman.library');
             $cfg_file = new ConfigFile($this->mThemeFile);
             if ($cfg_file->opened()) {
                 $this->mIconsSetName = $cfg_file->Value('THEME.ICONSSET');
                 $this->mColorsSetName = $cfg_file->Value('THEME.COLORSSET');
                 $this->mStyleName = $cfg_file->Value('THEME.STYLE');
             } else {
                 import('com.solarix.ampoliros.io.log.Logger');
                 $log = new Logger(AMP_LOG);
                 $log->LogEvent('ampoliros.huithemes_library.huitheme_class.inittheme', 'Unable to open theme configuration file ' . $this->mThemeFile, LOGGER_ERROR);
             }
         } else {
             $this->mIconsSetName = $this->mUserSettings['iconsset'];
             $this->mColorsSetName = $this->mUserSettings['colorsset'];
             $this->mStyleName = $this->mUserSettings['stylename'];
         }
         $this->mIconsSetBase = CGI_URL . 'icons/' . $this->mIconsSetName . '/';
         $this->mIconsBase = CGI_URL . 'icons/';
         $this->mIconsSetDir = CGI_PATH . 'icons/' . $this->mIconsSetName . '/';
         $this->mStyleBase = CGI_URL . 'styles/';
         $this->mStyleDir = CGI_PATH . 'styles/' . $this->mStyleName . '/';
         $hui_colors = new HuiColorsSet($this->mrAmpDb, $this->mColorsSetName);
         $hui_icons = new HuiIconsSet($this->mrAmpDb, $this->mIconsSetName);
         $hui_style = new HuiStyle($this->mrAmpDb, $this->mStyleName);
         if ($amp->getState() != Ampoliros::STATE_SETUP) {
             $cached_iconsset = new CachedItem($this->mrAmpDb, 'ampoliros', 'huiiconsset-' . $this->mIconsSetName);
             $cached_colorsset = new CachedItem($this->mrAmpDb, 'ampoliros', 'huicolorsset-' . $this->mColorsSetName);
             $cached_style = new CachedItem($this->mrAmpDb, 'ampoliros', 'huistyle-' . $this->mStyleName);
             $this->mIconsSet = unserialize($cached_iconsset->Retrieve());
             $this->mColorsSet = unserialize($cached_colorsset->Retrieve());
             $this->mStyle = unserialize($cached_style->Retrieve());
         }
         if (!$this->mIconsSet or !$this->mColorsSet or !$this->mStyle) {
             if ($gEnv['hui']['theme']['default'] == $this->mTheme) {
                 $this->mColorsSet = $hui_colors->GetColorsSet();
                 $this->mIconsSet = $hui_icons->GetIconsSet();
                 $this->mStyle = $hui_style->GetStyle();
             } else {
                 OpenLibrary('configman.library');
                 $def_cfg_file = new ConfigFile(CONFIG_PATH . $gEnv['hui']['theme']['default'] . '.huitheme');
                 if ($def_cfg_file->Opened()) {
                     $def_icons_set_name = $def_cfg_file->Value('THEME.ICONSSET');
                     $def_colors_set_name = $def_cfg_file->Value('THEME.COLORSSET');
                     $def_style_name = $def_cfg_file->Value('THEME.STYLE');
                 } else {
                     import('com.solarix.ampoliros.io.log.Logger');
                     $log = new Logger(AMP_LOG);
                     $log->LogEvent('ampoliros.huithemes_library.huitheme_class.inittheme', 'Unable to open default theme configuration file ' . CONFIG_PATH . $gEnv['hui']['theme']['default'] . '.huitheme', LOGGER_ERROR);
                 }
                 $hui_def_colors = new HuiColorsSet($this->mrAmpDb, $def_colors_set_name);
                 $hui_def_icons = new HuiIconsSet($this->mrAmpDb, $def_icons_set_name);
                 $hui_def_style = new HuiStyle($this->mrAmpDb, $def_style_name);
                 $this->mColorsSet = $this->DefOpts($hui_def_colors->GetColorsSet(), $hui_colors->GetColorsSet());
                 $this->mIconsSet = $this->DefOpts($hui_def_icons->GetIconsSet(), $hui_icons->GetIconsSet());
                 $this->mStyle = $this->DefOpts($hui_def_style->GetStyle(), $hui_style->GetStyle());
             }
             while (list($style_name, $style_item) = each($this->mStyle)) {
                 $this->mStyle[$style_name] = $this->mStyleBase . $style_item['base'] . '/' . $style_item['value'];
             }
             if ($amp->getState() != Ampoliros::STATE_SETUP) {
                 $cached_iconsset->Store(serialize($this->mIconsSet));
                 $cached_colorsset->Store(serialize($this->mColorsSet));
                 $cached_style->Store(serialize($this->mStyle));
             }
         }
     }
     return $result;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:85,代码来源:HuiTheme.php

示例4: OpenLibrary

<?php

OpenLibrary('misc.library');
recremovedir(MODULE_PATH . 'ezpdflib/fonts');
dircopy($this->basedir . '/extras/fonts/', MODULE_PATH . 'ezpdflib/fonts/');
开发者ID:alexpagnoni,项目名称:ezpdflib,代码行数:5,代码来源:generalpreupdate.php

示例5: OpenLibrary

 *
 *   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
// $Id: index.php,v 1.10 2004-07-08 15:04:25 alex Exp $
require './auth.php';
OpenLibrary('hui.library');
if (strlen($_SESSION['AMP_AUTH_USER'])) {
    OpenLibrary('sessionkey.hui', HANDLER_PATH);
    $empty = new HuiSessionKey('mainpage', array('sessionobjectnopage' => 'true'));
    if (!strlen($empty->mValue) or !file_exists($empty->mValue)) {
        $main_page_url = 'main.php';
    } else {
        $main_page_url = build_events_call_string($empty->mValue, array(array('main', 'default', ''))) . '&amp;act=def';
    }
    header('P3P: CP="CUR ADM OUR NOR STA NID"');
    ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Ampoliros - <?php 
    echo $env["sitedata"]["sitename"];
    ?>
</title>
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:31,代码来源:index.php

示例6: abort

    public function abort($text, $forceInterface)
    {
        global $gEnv;
        OpenLibrary('hui.library');
        if (strlen($forceInterface)) {
            $interface = $forceInterface;
        } else {
            $interface = $this->interface;
        }
        if ($interface == Ampoliros::INTERFACE_EXTERNAL) {
            if (isset($gEnv['runtime']['external_interface_error_handler']) and function_exists($gEnv['runtime']['external_interface_error_handler'])) {
                $func = $gEnv['runtime']['external_interface_error_handler'];
                $func($text);
            } else {
                $interface = Ampoliros::INTERFACE_WEB;
                $this->interface = Ampoliros::INTERFACE_WEB;
            }
        }
        switch ($interface) {
            case Ampoliros::INTERFACE_GUI:
            case Ampoliros::INTERFACE_UNKNOWN:
            case Ampoliros::INTERFACE_REMOTE:
            case Ampoliros::INTERFACE_EXTERNAL:
                break;
            case Ampoliros::INTERFACE_CONSOLE:
                echo "\n" . $text . "\n";
                break;
            case Ampoliros::INTERFACE_WEB:
                $reg = Registry::instance();
                $tmp_hui = new Hui($reg->getEntry('amp.root.db'));
                $tmp_hui->LoadWidget('empty');
                //$tmp_elem = new HuiEmpty('empty');
                if (is_object($gEnv['hui']['theme']['handler'])) {
                    $die_image = $gEnv['hui']['theme']['handler']->mStyle['bigdot'];
                } else {
                    $die_image = '';
                }
                ?>
 
                                                <html>
                                                <head>
                                                <basefont face="Verdana">
                                                <title>Ampoliros</title>
                                                <link rel="stylesheet" type="text/css" href="<?php 
                echo $gEnv['hui']['theme']['handler']->mStyle['css'];
                ?>
">
                                                </head>
                                                
                                                <body bgcolor="white">
                                                
                                                <table border="0" cellspacing="0" cellpadding="0" align="center" width="200">
                                                <tr>
                                                    <td align="center"><a href="<?php 
                echo AMP_URL;
                ?>
"><img src="<?php 
                echo $die_image;
                ?>
" alt="Ampoliros" border="0"></a></td>
                                                </tr>
                                                <tr>
                                                <td>&nbsp; </td>
                                                </tr>
                                                <tr>
                                                <td align="center"><?php 
                echo $text;
                ?>
</td>
                                                </tr>
                                                </table>
                                                
                                                </body>
                                                </html>
                                                <?php 
                break;
        }
        $carthag = Carthag::instance();
        $carthag->halt();
    }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:80,代码来源:Ampoliros.php

示例7: main_moduleversions

function main_moduleversions($eventData)
{
    global $gEnv, $gLocale, $gXml_def, $gPage_title, $gToolbars;
    OpenLibrary('modules.library');
    $ac_remote = new AmpCentralRemoteServer($gEnv['root']['db'], $eventData['id']);
    $avail_reps = $ac_remote->ListAvailableRepositories(isset($eventData['refresh']) ? true : false);
    $avail_mods = $ac_remote->ListAvailableModules($eventData['repid'], isset($eventData['refresh']) ? true : false);
    $mod_versions = $ac_remote->ListAvailableModuleVersions($eventData['repid'], $eventData['moduleid'], isset($eventData['refresh']) ? true : false);
    $x_account = new XmlRpcAccount($gEnv['root']['db'], $ac_remote->mAccountId);
    $headers[0]['label'] = $gLocale->GetStr('version.header');
    $headers[1]['label'] = $gLocale->GetStr('dependencies.header');
    $headers[2]['label'] = $gLocale->GetStr('installed_version.header');
    $gXml_def = '<vertgroup><name>modules</name>
  <children>
    <label><name>title</name>
      <args>
        <bold>true</bold>
        <label type="encoded">' . urlencode($x_account->mName . ' - ' . $avail_reps[$eventData['repid']]['name'] . ' - ' . $avail_mods[$eventData['moduleid']]['modid']) . '</label>
      </args>
    </label>
    <table><name>modules</name>
      <args>
        <headers type="array">' . huixml_encode($headers) . '</headers>
        <rowsperpage>10</rowsperpage>
        <pagesactionfunction>repmodules_list_action_builder</pagesactionfunction>
        <pagenumber>' . (isset($eventData['pagenumber']) ? $eventData['pagenumber'] : '') . '</pagenumber>
        <sessionobjectusername>' . $eventData['id'] . '-' . $eventData['repid'] . '-' . $eventData['moduleid'] . '</sessionobjectusername>
      </args>
      <children>';
    $row = 0;
    $mod_query =& $gEnv['root']['db']->Execute('SELECT modversion ' . 'FROM modules ' . 'WHERE modid=' . $gEnv['root']['db']->Format_Text($avail_mods[$eventData['moduleid']]['modid']));
    while (list($version, $data) = each($mod_versions)) {
        if (strlen($data['dependencies'])) {
            $mod_deps = new ModuleDep($gEnv['root']['db']);
            $dep_check = $mod_deps->CheckModuleDeps(0, '', $mod_deps->ExplodeDeps($data['dependencies']));
        } else {
            $dep_check = false;
        }
        if ($mod_query->NumRows()) {
            $current_version = $mod_query->Fields('modversion');
        } else {
            $current_version = $gLocale->GetStr('none_version.label');
        }
        if ($dep_check == false) {
            $mod_installable = true;
            $missing_deps = '';
            if ($mod_query->NumRows()) {
                switch (CompareVersionNumbers($version, $current_version)) {
                    case AMPOLIROS_VERSIONCOMPARE_EQUAL:
                        $label = $gLocale->GetStr('reinstall_module.button');
                        $icon = 'reload';
                        break;
                    case AMPOLIROS_VERSIONCOMPARE_MORE:
                        $label = $gLocale->GetStr('update_module.button');
                        $icon = 'folder_new';
                        break;
                    case AMPOLIROS_VERSIONCOMPARE_LESS:
                        $label = $gLocale->GetStr('downgrade_module.button');
                        $icon = 'down';
                        break;
                }
            } else {
                $label = $gLocale->GetStr('install_module.button');
                $icon = 'folder';
            }
        } else {
            $mod_installable = false;
            $missing_deps = '<br><strong>' . $gLocale->GetStr('missing_deps.label') . '</strong>';
            while (list(, $dep) = each($dep_check)) {
                $missing_deps .= '<br>' . $dep;
            }
        }
        $toolbars = array();
        if ($mod_installable) {
            $toolbars['main']['install'] = array('label' => $label, 'themeimage' => $icon, 'horiz' => 'true', 'action' => build_events_call_string('', array(array('main', 'repositorymodules', array('id' => $eventData['id'], 'repid' => $eventData['repid'])), array('action', 'installmodule', array('id' => $eventData['id'], 'repid' => $eventData['repid'], 'moduleid' => $eventData['moduleid'], 'version' => $version)))));
        }
        $gXml_def .= '<label row="' . $row . '" col="0"><name>version</name>
  <args>
    <label type="encoded">' . urlencode($version) . '</label>
  </args>
</label>

<label row="' . $row . '" col="1"><name>dependencies</name>
  <args>
    <label type="encoded">' . urlencode(str_replace(',', '<br>', $data['dependencies']) . (strlen($data['suggestions']) ? '<br><br><strong>' . $gLocale->GetStr('suggestions.label') . '</strong><br>' . str_replace(',', '<br>', $data['suggestions']) . '<br>' : '') . $missing_deps) . '</label>
  </args>
</label>

<label row="' . $row . '" col="2"><name>current</name>
  <args>
    <label type="encoded">' . urlencode($current_version) . '</label>
  </args>
</label>

<amptoolbar row="' . $row . '" col="3"><name>tb</name>
  <args>
    <frame>false</frame>
    <toolbars type="array">' . huixml_encode($toolbars) . '</toolbars>
  </args>
</amptoolbar>';
//.........这里部分代码省略.........
开发者ID:alexpagnoni,项目名称:ampcentral-client,代码行数:101,代码来源:ampcentral-client.php

示例8: openCatalog

 public function openCatalog()
 {
     $result = false;
     import('carthag.core.Registry');
     $reg = Registry::instance();
     if ($this->catalog != null and $this->lang != null) {
         // Tries specified language catalog
         //
         if (file_exists($reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_' . $this->lang . '.catalog')) {
             $catfile = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_' . $this->lang . '.catalog';
         } else {
             if (file_exists($reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . '/var/locale/' . $this->catalog . '.catalog')) {
                 $catfile = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '.catalog';
             } else {
                 if (file_exists($reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_' . AMP_LANG . '.catalog')) {
                     $catfile = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_' . AMP_LANG . '.catalog';
                 } else {
                     if (file_exists($reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_en.catalog')) {
                         $catfile = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/locale/' . $this->catalog . '_en.catalog';
                     } else {
                         import('com.solarix.ampoliros.io.log.Logger');
                         $log = new Logger(AMP_LOG);
                         $log->LogEvent('ampoliros.locale_library.locale_class.opencatalog', 'Unable to find a catalog file for the specified catalog (' . $this->catalog . ') and language (' . $this->lang . ') or fallback to another language', LOGGER_ERROR);
                     }
                 }
             }
         }
         if (!empty($catfile)) {
             // New way to read locale catalogs
             //
             OpenLibrary('configman.library');
             $loc = new configfile($catfile);
             $this->locales = $loc->valuesarray();
             $result = true;
             /*
             if ( sizeof( $this->locales ) == 0 )
             {
                 if ( $fh = @fopen( $catfile, 'r' ) )
                 {
                     fclose( $fh );
             
                     include( $catfile );
                     $this->catversion = $catversion;
                     $this->catdate    = $catdate;
                     $this->locales    = $locale;
                 }
             }
             */
         }
     }
     return $result;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:52,代码来源:Locale.php

示例9: CallHooks

 function CallHooks($event, &$obj, $args = '')
 {
     $result = false;
     if ($this->mAmpDb) {
         $query = $this->mAmpDb->Execute('SELECT * FROM hooks WHERE functionmodule=' . $this->mAmpDb->Format_Text($this->mModule) . ' AND function=' . $this->mAmpDb->Format_Text($this->mFunction) . ' AND event=' . $this->mAmpDb->Format_Text($event));
         if ($query) {
             global $gEnv;
             $result = HOOK_RESULT_OK;
             import('com.solarix.ampoliros.core.Ampoliros');
             $amp = Ampoliros::instance('Ampoliros');
             while (!$query->eof) {
                 $data = $query->Fields();
                 if ($amp->getState() == Ampoliros::STATE_DEBUG) {
                     $gEnv['runtime']['debug']['hooks'][$this->mModule . '::' . $this->mFunction . '::' . $event][] = $data['hookhandler'] . ' - ' . $data['hookfunction'];
                 }
                 OpenLibrary($data['hookhandler'], HANDLER_PATH);
                 $func_result = $data['hookfunction']($obj, $args);
                 if ($func_result == HOOK_RESULT_ABORT) {
                     $result = HOOK_RESULT_ABORT;
                 }
                 $query->MoveNext();
             }
         }
     }
     return $result;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:26,代码来源:Hook.php

示例10: OpenLibrary

 *   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
// $Id: locale.php,v 1.19 2004-07-08 15:04:25 alex Exp $
require './auth.php';
Carthag::import('com.solarix.ampoliros.io.log.Logger');
Carthag::import('com.solarix.ampoliros.locale.Locale');
Carthag::import('com.solarix.ampoliros.locale.LocaleCountry');
OpenLibrary('sites.library');
OpenLibrary('misc.library');
OpenLibrary('hui.library');
$amp_locale = new Locale('amp_root_locale', $gEnv['user']['locale']['language']);
$amp_log = new Logger(AMP_LOG);
$hui = new Hui($env['ampdb']);
$hui->LoadWidget('button');
$hui->LoadWidget('checkbox');
$hui->LoadWidget('combobox');
$hui->LoadWidget('date');
$hui->LoadWidget('empty');
$hui->LoadWidget('file');
$hui->LoadWidget('formarg');
$hui->LoadWidget('form');
$hui->LoadWidget('grid');
$hui->LoadWidget('helpnode');
$hui->LoadWidget('horizbar');
$hui->LoadWidget('horizframe');
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:31,代码来源:locale.php

示例11: package

 *   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
// $Id: SecurityLayer.php,v 1.8 2004-07-14 13:15:37 alex Exp $
package('com.solarix.ampoliros.security');
import('carthag.core.Registry');
define('AMPOLIROS_SECURITY_PRESET_LOW', 1);
define('AMPOLIROS_SECURITY_PRESET_NORMAL', 2);
define('AMPOLIROS_SECURITY_PRESET_HIGH', 3);
define('AMPOLIROS_SECURITY_PRESET_PARANOID', 4);
OpenLibrary('configman.library');
class SecurityLayer extends Object
{
    public $mAlertsEmail;
    public $mReportsEmail;
    public $mSecurityLog;
    public $mAccessLog;
    /*!
    	@function SecurityLayer
    	@abstract Class constructor.
    	*/
    public function SecurityLayer()
    {
        $reg = Registry::instance();
        $this->mSecurityLog = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/log/security.log';
        $this->mAccessLog = $reg->getEntry('amp.config')->getKey('PRIVATE_TREE') . 'var/log/access.log';
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:31,代码来源:SecurityLayer.php

示例12: import

 *   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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
// $Id: xmlrpc.php,v 1.11 2004-07-08 15:04:26 alex Exp $
require 'ampremote.php';
$amp = Ampoliros::instance('Ampoliros');
$amp->setInterface(Ampoliros::INTERFACE_REMOTE);
import('com.solarix.ampoliros.db.DBLayer');
$structure = array();
while (list(, $tmpdata) = each($gEnv['remote']['methods'])) {
    if ($tmpdata['handler'] and $tmpdata['name'] and $tmpdata['function']) {
        if (!defined(strtoupper($tmpdata['handler']) . '_XMLRPCMETHOD')) {
            OpenLibrary($tmpdata['handler'] . '.xmlrpchandler', HANDLER_PATH);
        }
        $structure[$tmpdata['name']]['function'] = $tmpdata['function'];
        if (isset($tmpdata['signature'])) {
            $structure[$tmpdata['name']]['signature'] = $tmpdata['signature'];
        }
        if (isset($tmpdata['docstring'])) {
            $structure[$tmpdata['name']]['docstring'] = $tmpdata['docstring'];
        }
    }
}
$xs = new XmlRpc_Server($structure);
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:31,代码来源:xmlrpc.php

示例13: disableAllModules

 public function disableAllModules($ampolirosToo = true)
 {
     $result = false;
     if ($this->ampdb) {
         // Checks the enabled modules
         //
         $modsquery =& $this->ampdb->Execute('SELECT id ' . 'FROM activemodules,modules ' . 'WHERE activemodules.siteid=' . (int) $this->siteserial . ' ' . 'AND activemodules.moduleid=modules.id');
         $modules = array();
         while (!$modsquery->eof) {
             $modules[$modsquery->Fields('id')] = $modsquery->Fields('id');
             $modsquery->MoveNext();
         }
         $nummodules = $modsquery->NumRows();
         $ampquery = $this->ampdb->Execute('SELECT id ' . 'FROM modules ' . 'WHERE modid=' . $this->ampdb->Format_Text('ampoliros'));
         if (!$ampolirosToo) {
             unset($modules[$ampquery->Fields('id')]);
             $nummodules--;
         }
         // Tries to disable every module since all modules are disabled, following dependencies
         //
         while (count($modules) > 0) {
             $modid = current($modules);
             if (count($modules) == 1 and $modid == $ampquery->Fields('id') or count($modules) > 1 and $modid != $ampquery->Fields('id') or !$ampolirosToo) {
                 OpenLibrary('modulesbase.library');
                 $tmpmod = new Module($this->ampdb, $modid);
                 if ($tmpmod->Disable($this->siteserial)) {
                     import('com.solarix.ampoliros.io.log.Logger');
                     $log = new Logger(AMP_LOG);
                     $log->LogEvent($this->siteid, 'Disabled module ' . $tmpmod->modname, LOGGER_NOTICE);
                     $this->sitelog->LogEvent($this->siteid, 'Disabled module ' . $tmpmod->modname, LOGGER_NOTICE);
                     unset($modules[$modid]);
                 }
             }
             if (!next($modules)) {
                 reset($modules);
             }
         }
         $result = true;
     }
     return $result;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:41,代码来源:Site.php

示例14: HuiAmpPage

        </button>

      </children>
    </horizgroup>

  </children>
</vertgroup>';
}
$gMain_disp->Dispatch();
$gHui->AddChild(new HuiAmpPage('page', array('pagetitle' => 'phplot test', 'maincontent' => new HuiXml('page', array('definition' => $gXml_def)), 'icon' => 'txt')));
$gHui->Render();
// --------------
exit;
//require( 'amproot.php' );
//init_amp_root();
OpenLibrary('phplot.library');
//Define the Object
$graph = new PHPlot(500, 300);
//Define some data
//include("./regression_data.php");
$example_data = array(array("A", 0.0, 20, 4, 5, 6), array("B", 2.0, 30, 5, 6, 7), array("C", 3.0, 40, 5, 7, 8), array("D", 4.0, 50, 3, 6, 3), array("E", 4.4, 40, 3, 6, 5), array("F", 5.4, 40, 5, 6, 5), array("G", 5.5, 40, 7, 6, 5), array("H", 7, 35, 0.0, 0.0, ""), array("I", 7.4, 40, 14, 16, 25), array("J", 7.6, 40, 6, 6, 5), array("K", 8.199999999999999, 40, 3, 6, 5), array("L", 8.5, 40, 8, 6, 9), array("M", 9.300000000000001, 40, 5, 6, 5), array("N", 9.6, 40, 9, 6, 7), array("O", 9.9, 40, 2, 6, 5), array("P", 10.0, 40, 3, 6, 8), array("Q", 10.4, 40, 3, 6, 5), array("R", 10.5, 40, 3, 6, 5), array("S", 10.8, 40, 3, 6, 5), array("T", 11.4, 40, 3, 6, 5), array("U", 12.0, 40, 3, 7, 5), array("V", 13.4, 40, 3, 5, 3), array("W", 14.0, 30, 3, 5, 6));
//$graph->SetXGridLabelType("time");
//Set the data type
//$graph->SetDataType("linear-linear");
//$graph->SetPointShape("halfline");
//Remove the X data labels
//$graph->SetXGridLabelType("none");
//Load the data into data array
$graph->SetDataValues($example_data);
$graph->SetDataColors(array("blue", 'white'), array("black"));
$graph->SetLineWidth("1");
开发者ID:alexpagnoni,项目名称:phplot,代码行数:31,代码来源:phplottest.php

示例15: main_ampoliros

function main_ampoliros($eventData)
{
    global $gEnv, $gXml_def, $gLocale, $gPage_title;
    OpenLibrary('ampoliros_cache.maintenance', HANDLER_PATH);
    OpenLibrary('ampoliros_logs.maintenance', HANDLER_PATH);
    $country = new LocaleCountry($GLOBALS['gEnv']['root']['locale']['country']);
    $tabs[0]['label'] = $gLocale->GetStr('ampoliros_status.tab');
    $tabs[1]['label'] = $gLocale->GetStr('ampoliros_settings.tab');
    $logs_main = new AmpolirosLogsMaintenance();
    $cache_main = new AmpolirosCacheMaintenance();
    $gXml_def = '<tab><name>ampoliros</name>
      <args>
        <tabs type="array">' . huixml_encode($tabs) . '</tabs>
        <tabactionfunction>ampoliros_tab_builder</tabactionfunction>
        <activetab>' . (isset($eventData['tab']) ? $eventData['tab'] : '') . '</activetab>
      </args>
      <children>
    
        <vertgroup><name></name>
          <children>
    
            <label><name>tabtitle</name>
              <args>
                <label type="encoded">' . urlencode($gLocale->GetStr('ampoliros_status.label')) . '</label>
                <bold>true</bold>
              </args>
            </label>
    
        <grid>
          <children>
    
            <label row="0" col="0">
              <args>
                <label type="encoded">' . urlencode($gLocale->GetStr('systemlogs_size.label')) . '</label>
              </args>
            </label>
    
            <string row="0" col="1">
              <args>
                <size>15</size>
                <readonly>true</readonly>
                <value type="encoded">' . urlencode($country->FormatNumber($logs_main->GetSystemLogsSize())) . '</value>
              </args>
            </string>
    
            <button row="0" col="2">
              <args>
                <themeimage>editdelete</themeimage>
                <label type="encoded">' . urlencode($gLocale->GetStr('clear.label')) . '</label>
                <horiz>true</horiz>
                <frame>false</frame>
                <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'ampoliros'), array('action', 'clear_systemlogs')))) . '</action>
              </args>
            </button>
    
            <label row="1" col="0">
              <args>
                <label type="encoded">' . urlencode($gLocale->GetStr('siteslogs_size.label')) . '</label>
              </args>
            </label>
    
            <string row="1" col="1">
              <args>
                <size>15</size>
                <readonly>true</readonly>
                <value type="encoded">' . urlencode($country->FormatNumber($logs_main->GetSitesLogsSize())) . '</value>
              </args>
            </string>
    
            <button row="1" col="2">
              <args>
                <themeimage>editdelete</themeimage>
                <label type="encoded">' . urlencode($gLocale->GetStr('clear.label')) . '</label>
                <horiz>true</horiz>
                <frame>false</frame>
                <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'ampoliros'), array('action', 'clear_siteslogs')))) . '</action>
              </args>
            </button>
    
            <label row="2" col="0">
              <args>
                <label type="encoded">' . urlencode($gLocale->GetStr('cache_size.label')) . '</label>
              </args>
            </label>
    
            <string row="2" col="1">
              <args>
                <size>15</size>
                <readonly>true</readonly>
                <value type="encoded">' . urlencode($country->FormatNumber($cache_main->GetCacheSize())) . '</value>
              </args>
            </string>
    
            <button row="2" col="2">
              <args>
                <themeimage>editdelete</themeimage>
                <label type="encoded">' . urlencode($gLocale->GetStr('clear.label')) . '</label>
                <horiz>true</horiz>
                <frame>false</frame>
                <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'ampoliros'), array('action', 'clear_cache')))) . '</action>
//.........这里部分代码省略.........
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:101,代码来源:maintenance.php


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