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


PHP mosReadDirectory函数代码示例

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


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

示例1: showInstalledComponents

/**
* @param string The URL option
*/
function showInstalledComponents($option)
{
    global $database, $mosConfig_absolute_path;
    $database->setQuery("SELECT *" . "\n FROM #__components" . "\n WHERE parent = 0 AND iscore = 0" . "\n ORDER BY name");
    $rows = $database->loadObjectList();
    // Read the component dir to find components
    $componentBaseDir = mosPathName($mosConfig_absolute_path . '/administrator/components');
    $componentDirs = mosReadDirectory($componentBaseDir);
    $n = count($rows);
    for ($i = 0; $i < $n; $i++) {
        $row =& $rows[$i];
        $dirName = mosPathName($componentBaseDir . $row->option);
        $xmlFilesInDir = mosReadDirectory($dirName, '.xml$');
        foreach ($xmlFilesInDir as $xmlfile) {
            // Read the file to see if it's a valid component XML file
            $parser =& new mosXMLDescription($dirName . $xmlfile);
            if ($parser->getType() != 'component') {
                continue;
            }
            $row->creationdate = $parser->getCreationDate('component');
            $row->author = $parser->getAuthor('component');
            $row->copyright = $parser->getCopyright('component');
            $row->authorEmail = $parser->getAuthorEmail('component');
            $row->authorUrl = $parser->getAuthorUrl('component');
            $row->version = $parser->getVersion('component');
            $row->mosname = strtolower(str_replace(" ", "_", $row->name));
        }
    }
    HTML_component::showInstalledComponents($rows, $option);
}
开发者ID:jwest00724,项目名称:mambo,代码行数:33,代码来源:component.php

示例2: mosReadDirectory

 function mosReadDirectory($path, $filter = '.', $recurse = false, $fullpath = false)
 {
     $arr = array();
     if (!@is_dir($path)) {
         return $arr;
     }
     $handle = opendir($path);
     while ($file = readdir($handle)) {
         $dir = mosPathName($path . '/' . $file, false);
         $isDir = is_dir($dir);
         if ($file != "." && $file != "..") {
             if (preg_match("/{$filter}/", $file)) {
                 if ($fullpath) {
                     $arr[] = trim(mosPathName($path . '/' . $file, false));
                 } else {
                     $arr[] = trim($file);
                 }
             }
             if ($recurse && $isDir) {
                 $arr2 = mosReadDirectory($dir, $filter, $recurse, $fullpath);
                 $arr = array_merge($arr, $arr2);
             }
         }
     }
     closedir($handle);
     asort($arr);
     return $arr;
 }
开发者ID:janssit,项目名称:www.ondernemenddiest.be,代码行数:28,代码来源:DOCMAN_compat15.class.php

示例3: render

 function render(&$renderer, &$request)
 {
     $rows = array();
     $languageDir = mamboCore::get('mosConfig_absolute_path') . "/language/";
     $xmlFilesInDir = mosReadDirectory($languageDir, '.xml$');
     $rowid = 0;
     foreach ($xmlFilesInDir as $xmlfile) {
         // Read the file to see if it's a valid template XML file
         $parser =& new mosXMLDescription($languageDir . $xmlfile);
         if ($parser->getType() != 'language') {
             continue;
         }
         $row = new StdClass();
         $row->id = $rowid;
         $row->language = substr($xmlfile, 0, -4);
         $row->name = $parser->getName('language');
         $row->creationdate = $parser->getCreationDate('language');
         $row->author = $parser->getAuthor('language');
         $row->copyright = $parser->getCopyright('language');
         $row->authorEmail = $parser->getAuthorEmail('language');
         $row->authorUrl = $parser->getAuthorUrl('language');
         $row->version = $parser->getVersion('language');
         $row->checked_out = 0;
         $row->mosname = strtolower(str_replace(" ", "_", $row->name));
         $row->published = mamboCore::get('mosConfig_locale') == $row->language ? 1 : 0;
         $rows[] = $row;
         $rowid++;
     }
     $renderer->addvar('rows', $rows);
     $renderer->addvar('content', $renderer->fetch('table.tpl.php'));
     $renderer->display('form.tpl.php');
 }
开发者ID:jwest00724,项目名称:mambo,代码行数:32,代码来源:index.view.php

示例4: botLegacyBots

/**
* Process any legacy bots in the /mambots directory
*
* THIS FILE CAN BE **SAFELY REMOVED** IF YOU HAVE NO LEGACY MAMBOTS
* @param object A content object
* @param int A bit-wise mask of options
* @param int The page number
*/
function botLegacyBots($published, &$row, &$params, $page = 0)
{
    global $mosConfig_absolute_path;
    // process any legacy bots
    $bots = mosReadDirectory("{$mosConfig_absolute_path}/mambots", "\\.php\$");
    sort($bots);
    foreach ($bots as $bot) {
        require "mambots/{$bot}";
    }
}
开发者ID:jwest00724,项目名称:mambo,代码行数:18,代码来源:legacybots.php

示例5: createLanguage

 function createLanguage($iso639, $iso3166, $iso3166_3)
 {
     $locales = mamboLanguage::getLocales();
     $default = $locales['locales'][$iso639];
     $lang = $iso639;
     $lang .= strlen($iso3166) == 2 ? '_' . $iso3166 : '';
     $language =& new mamboLanguage($lang);
     foreach ($default as $k => $v) {
         if (in_array($k, array_keys(get_class_vars(get_class($language))))) {
             $language->{$k} = $v;
         }
     }
     foreach ($_POST as $k => $v) {
         if (in_array($k, array_keys(get_class_vars(get_class($language))))) {
             $language->{$k} = $v;
         }
     }
     $language->name = $lang;
     $language->description = $language->title . ' Locale';
     if (!empty($language->territory)) {
         $language->description .= ' For ' . $language->territory;
     }
     $language->locale = $lang . '.' . $language->charset . ',' . $lang . ',' . $iso639 . ',' . strtolower($language->title);
     $language->iso3166_3 = $iso3166_3;
     $language->creationdate = date('d-m-Y');
     $language->author = 'Mambo Foundation Inc.';
     $language->authorurl = 'http://www.mambo-foundation.org';
     $language->authoremail = 'translation@mambo-foundation.org';
     $language->copyright = 'Refer to copyright.php';
     $language->license = 'http://www.gnu.org/copyleft/gpl.html GNU/GPL';
     $language->setPlurals($_POST['plural_form']);
     $textdomain = rtrim($language->path, '\\/');
     $dir = $textdomain . '/' . $language->name;
     $untranslated = $textdomain . '/untranslated';
     $charset = $language->charset;
     $langfiles = mosReadDirectory($untranslated, '.pot$');
     @mkdir($dir);
     @mkdir($dir . '/LC_MESSAGES');
     //$gettext_admin = new PHPGettextAdmin();
     foreach ($langfiles as $domain) {
         $domain = substr($domain, 0, -4);
         /*if (file_exists("$textdomain/glossary/$lang.$charset.po")) {
               copy("$textdomain/glossary/$lang.$charset.po", "$dir/$lang.po");
               $gettext_admin->initialize_translation($domain, $textdomain, $lang, $charset);
               $gettext_admin->compile($lang, $textdomain, $charset);
           } else {*/
         copy("{$untranslated}/{$domain}.pot", "{$dir}/{$domain}.po");
         //}
     }
     //if (!file_exists("$textdomain/$lang/$lang.po")) {
     //    @copy("$textdomain/glossary/untranslated.pot", "$textdomain/$lang/$lang.po");
     //}
     $language->save();
 }
开发者ID:jwest00724,项目名称:mambo,代码行数:54,代码来源:save.action.php

示例6: botLegacyBots

/**
* Process any legacy bots in the /mambots directory
*
* THIS FILE CAN BE **SAFELY REMOVED** IF YOU HAVE NO LEGACY MAMBOTS
* @param object A content object
* @param int A bit-wise mask of options
* @param int The page number
*/
function botLegacyBots($published, &$row, &$params, $page = 0)
{
    global $mosConfig_absolute_path;
    // check whether mambot has been unpublished
    if (!$published) {
        return true;
    }
    // process any legacy bots
    $bots = mosReadDirectory("{$mosConfig_absolute_path}/mambots", "\\.php\$");
    sort($bots);
    foreach ($bots as $bot) {
        require $mosConfig_absolute_path . "/mambots/{$bot}";
    }
}
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:22,代码来源:legacybots.php

示例7: showInstalledComponents

/**
* @param string The URL option
*/
function showInstalledComponents($option)
{
    global $database, $mosConfig_absolute_path;
    $database->setQuery("SELECT *" . "\n FROM #__components" . "\n WHERE parent = 0 AND iscore = 0" . "\n ORDER BY name");
    $rows = $database->loadObjectList();
    // Read the component dir to find components
    $componentBaseDir = mosPathName($mosConfig_absolute_path . '/administrator/components');
    $componentDirs = mosReadDirectory($componentBaseDir);
    $id = 0;
    foreach ($rows as $row) {
        $dirName = $componentBaseDir . $row->option;
        $xmlFilesInDir = mosReadDirectory($dirName, '.xml');
        foreach ($xmlFilesInDir as $xmlfile) {
            // Read the file to see if it's a valid component XML file
            $xmlDoc =& new DOMIT_Lite_Document();
            $xmlDoc->resolveErrors(true);
            if (!$xmlDoc->loadXML($dirName . '/' . $xmlfile, false, true)) {
                continue;
            }
            $element =& $xmlDoc->documentElement;
            if ($element->getTagName() != 'mosinstall') {
                continue;
            }
            if ($element->getAttribute("type") != "component") {
                continue;
            }
            $element =& $xmlDoc->getElementsByPath('creationDate', 1);
            $row->creationdate = $element ? $element->getText() : 'Unknown';
            $element =& $xmlDoc->getElementsByPath('author', 1);
            $row->author = $element ? $element->getText() : 'Unknown';
            $element =& $xmlDoc->getElementsByPath('copyright', 1);
            $row->copyright = $element ? $element->getText() : '';
            $element =& $xmlDoc->getElementsByPath('authorEmail', 1);
            $row->authorEmail = $element ? $element->getText() : '';
            $element =& $xmlDoc->getElementsByPath('authorUrl', 1);
            $row->authorUrl = $element ? $element->getText() : '';
            $element =& $xmlDoc->getElementsByPath('version', 1);
            $row->version = $element ? $element->getText() : '';
            $row->mosname = strtolower(str_replace(" ", "_", $row->name));
            $rows[$id] = $row;
        }
        $id++;
    }
    HTML_component::showInstalledComponents($rows, $option);
}
开发者ID:cwcw,项目名称:cms,代码行数:48,代码来源:component.php

示例8: viewTemplates

/**
* Compiles a list of installed, version 4.5+ templates
*
* Based on xml files found.  If no xml file found the template
* is ignored
*/
function viewTemplates($option, $client)
{
    global $database, $mainframe;
    global $mosConfig_absolute_path, $mosConfig_list_limit;
    $limit = $mainframe->getUserStateFromRequest('viewlistlimit', 'limit', $mosConfig_list_limit);
    $limitstart = $mainframe->getUserStateFromRequest("view{$option}limitstart", 'limitstart', 0);
    if ($client == 'admin') {
        $templateBaseDir = mosPathName($mosConfig_absolute_path . '/administrator/templates');
    } else {
        $templateBaseDir = mosPathName($mosConfig_absolute_path . '/templates');
    }
    $rows = array();
    // Read the template dir to find templates
    $templateDirs = mosReadDirectory($templateBaseDir);
    $id = intval($client == 'admin');
    if ($client == 'admin') {
        $query = "SELECT template" . "\n FROM #__templates_menu" . "\n WHERE client_id = 1" . "\n AND menuid = 0";
        $database->setQuery($query);
    } else {
        $query = "SELECT template" . "\n FROM #__templates_menu" . "\n WHERE client_id = 0" . "\n AND menuid = 0";
        $database->setQuery($query);
    }
    $cur_template = $database->loadResult();
    $rowid = 0;
    // Check that the directory contains an xml file
    foreach ($templateDirs as $templateDir) {
        $dirName = mosPathName($templateBaseDir . $templateDir);
        $xmlFilesInDir = mosReadDirectory($dirName, '.xml$');
        foreach ($xmlFilesInDir as $xmlfile) {
            // Read the file to see if it's a valid template XML file
            $xmlDoc = new DOMIT_Lite_Document();
            $xmlDoc->resolveErrors(true);
            if (!$xmlDoc->loadXML($dirName . $xmlfile, false, true)) {
                continue;
            }
            $root =& $xmlDoc->documentElement;
            if ($root->getTagName() != 'mosinstall') {
                continue;
            }
            if ($root->getAttribute('type') != 'template') {
                continue;
            }
            $row = new StdClass();
            $row->id = $rowid;
            $row->directory = $templateDir;
            $element =& $root->getElementsByPath('name', 1);
            $row->name = $element->getText();
            $element =& $root->getElementsByPath('creationDate', 1);
            $row->creationdate = $element ? $element->getText() : 'Nenhum';
            $element =& $root->getElementsByPath('author', 1);
            $row->author = $element ? $element->getText() : 'Unknown';
            $element =& $root->getElementsByPath('copyright', 1);
            $row->copyright = $element ? $element->getText() : '';
            $element =& $root->getElementsByPath('authorEmail', 1);
            $row->authorEmail = $element ? $element->getText() : '';
            $element =& $root->getElementsByPath('authorUrl', 1);
            $row->authorUrl = $element ? $element->getText() : '';
            $element =& $root->getElementsByPath('version', 1);
            $row->version = $element ? $element->getText() : '';
            // Get info from db
            if ($cur_template == $templateDir) {
                $row->published = 1;
            } else {
                $row->published = 0;
            }
            $row->checked_out = 0;
            $row->mosname = strtolower(str_replace(' ', '_', $row->name));
            // check if template is assigned
            $query = "SELECT COUNT(*)" . "\n FROM #__templates_menu" . "\n WHERE client_id = 0" . "\n AND template = " . $database->Quote($row->directory) . "\n AND menuid != 0";
            $database->setQuery($query);
            $row->assigned = $database->loadResult() ? 1 : 0;
            $rows[] = $row;
            $rowid++;
        }
    }
    require_once $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php';
    $pageNav = new mosPageNav(count($rows), $limitstart, $limit);
    $rows = array_slice($rows, $pageNav->limitstart, $pageNav->limit);
    HTML_templates::showTemplates($rows, $pageNav, $option, $client);
}
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:86,代码来源:admin.templates.php

示例9: attachement

    function attachement($mailingEdit, $lists, $show)
    {
        foreach ($mailingEdit->attachments as $attach => $k) {
            $mailingEdit->attachments[$attach] = basename($k);
        }
        $files = mosReadDirectory($GLOBALS['mosConfig_absolute_path'] . $GLOBALS[ACA . 'upload_url'], '\\.', true, true);
        echo '<select name="attachments[]" multiple="multiple" style="width: 100%;" size="10">';
        if (sizeof($files) > 0) {
            foreach ($files as $file) {
                $file = basename($file);
                if (in_array($file, $mailingEdit->attachments)) {
                    echo '<option selected="selected">' . $file . '</option>' . "\n";
                } else {
                    echo '<option>' . $file . '</option>' . "\n";
                }
            }
        }
        echo '</select>';
        ?>
<script src="<?php 
        echo $GLOBALS['mosConfig_live_site'];
        ?>
/administrator/components/com_acajoom/classes/multifile.js"></script>

<input id="my_file_element" type="file" name="file_1" >
</input>

<br /><b><?php 
        echo _ACA_FILES;
        ?>
:</b>

<div id="files_list"></div>
<script>

	var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10 );
	multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>

<?php 
    }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:41,代码来源:mailings.acajoom.html.php

示例10: editMambot

/**
* Compiles information to add or edit a module
* @param string The current GET/POST option
* @param integer The unique id of the record to edit
*/
function editMambot($option, $uid, $client)
{
    global $database, $my, $mainframe;
    global $mosConfig_absolute_path;
    $lists = array();
    $row = new mosMambot($database);
    // load the row from the db table
    $row->load($uid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        echo "<script>alert(" . sprintf(T_('The module %s is currently being edited by another administrator'), $row->title) . "); document.location.href='index2.php?option={$option}'</script>\n";
        exit(0);
    }
    if ($client == 'admin') {
        $where = "client_id='1'";
    } else {
        $where = "client_id='0'";
    }
    // get list of groups
    if ($row->access == 99 || $row->client_id == 1) {
        $lists['access'] = T_('Administrator') . '<input type="hidden" name="access" value="99" />';
    } else {
        // build the html select list for the group access
        $lists['access'] = mosAdminMenus::Access($row);
    }
    if ($uid) {
        $row->checkout($my->id);
        if ($row->ordering > -10000 && $row->ordering < 10000) {
            // build the html select list for ordering
            $query = "SELECT ordering AS value, name AS text" . "\n FROM #__mambots" . "\n WHERE folder='{$row->folder}'" . "\n AND published > 0" . "\n AND {$where}" . "\n AND ordering > -10000" . "\n AND ordering < 10000" . "\n ORDER BY ordering";
            $order = mosGetOrderingList($query);
            $lists['ordering'] = mosHTML::selectList($order, 'ordering', 'class="inputbox" size="1"', 'value', 'text', intval($row->ordering));
        } else {
            $lists['ordering'] = '<input type="hidden" name="ordering" value="' . $row->ordering . '" />' . T_('This mambot cannot be reordered');
        }
        $lists['folder'] = '<input type="hidden" name="folder" value="' . $row->folder . '" />' . $row->folder;
        // xml file for module
        $xmlfile = $mosConfig_absolute_path . '/mambots/' . $row->folder . '/' . $row->element . '.xml';
        $xmlparser =& new mosXMLDescription($xmlfile);
        $row->description = T_($xmlparser->getDescription('mambot'));
    } else {
        $row->folder = '';
        $row->ordering = 999;
        $row->published = 1;
        $row->description = '';
        $folders = mosReadDirectory($mosConfig_absolute_path . '/mambots/');
        $folders2 = array();
        foreach ($folders as $folder) {
            if (is_dir($mosConfig_absolute_path . '/mambots/' . $folder) && $folder != 'CVS') {
                $folders2[] = mosHTML::makeOption($folder);
            }
        }
        $lists['folder'] = mosHTML::selectList($folders2, 'folder', 'class="inputbox" size="1"', 'value', 'text', null);
        $lists['ordering'] = '<input type="hidden" name="ordering" value="' . $row->ordering . '" />' . T_('New items default to the last place. Ordering can be changed after this item is saved.') . '';
    }
    $lists['published'] = mosHTML::yesnoRadioList('published', 'class="inputbox"', $row->published);
    // get params definitions
    $params =& new mosAdminParameters($row->params, $mainframe->getPath('bot_xml', $row->folder . '/' . $row->element), 'mambot');
    HTML_modules::editMambot($row, $lists, $params, $option);
}
开发者ID:jwest00724,项目名称:mambo,代码行数:65,代码来源:admin.mambots.php

示例11: viewTemplates

/**
* Compiles a list of installed, version 4.5+ templates
*
* Based on xml files found.  If no xml file found the template
* is ignored
*/
function viewTemplates($option, $client)
{
    global $database, $mainframe;
    global $mosConfig_absolute_path, $mosConfig_list_limit;
    $limit = $mainframe->getUserStateFromRequest('viewlistlimit', 'limit', $mosConfig_list_limit);
    $limitstart = $mainframe->getUserStateFromRequest("view{$option}limitstart", 'limitstart', 0);
    if ($client == 'admin') {
        $templateBaseDir = mosPathName($mosConfig_absolute_path . '/administrator/templates');
    } else {
        $templateBaseDir = mosPathName($mosConfig_absolute_path . '/templates');
    }
    $rows = array();
    // Read the template dir to find templates
    $templateDirs = mosReadDirectory($templateBaseDir);
    $id = intval($client == 'admin');
    if ($client == 'admin') {
        $database->setQuery("SELECT template FROM #__templates_menu WHERE client_id='1' AND menuid='0'");
    } else {
        $database->setQuery("SELECT template FROM #__templates_menu WHERE client_id='0' AND menuid='0'");
    }
    $cur_template = $database->loadResult();
    $rowid = 0;
    // Check that the directory contains an xml file
    foreach ($templateDirs as $templateDir) {
        $dirName = mosPathName($templateBaseDir . $templateDir);
        $xmlFilesInDir = mosReadDirectory($dirName, '.xml$');
        foreach ($xmlFilesInDir as $xmlfile) {
            // Read the file to see if it's a valid template XML file
            $parser =& new mosXMLDescription($dirName . $xmlfile);
            if ($parser->getType() != 'template') {
                continue;
            }
            $row = new StdClass();
            $row->id = $rowid;
            $row->directory = $templateDir;
            $row->creationdate = $parser->getCreationDate('template');
            $row->name = $parser->getName('template');
            $row->author = $parser->getAuthor('template');
            $row->copyright = $parser->getCopyright('template');
            $row->authorEmail = $parser->getAuthorEmail('template');
            $row->authorUrl = $parser->getAuthorUrl('template');
            $row->version = $parser->getVersion('template');
            /*
            			$element = &$xmlDoc->getElementsByPath('name', 1 );
            			$row->name = $element->getText();
            
            			$element = &$xmlDoc->getElementsByPath('creationDate', 1);
            			$row->creationdate = $element ? $element->getText() : 'Unknown';
            
            			$element = &$xmlDoc->getElementsByPath('author', 1);
            			$row->author = $element ? $element->getText() : 'Unknown';
            
            			$element = &$xmlDoc->getElementsByPath('copyright', 1);
            			$row->copyright = $element ? $element->getText() : '';
            
            			$element = &$xmlDoc->getElementsByPath('authorEmail', 1);
            			$row->authorEmail = $element ? $element->getText() : '';
            
            			$element = &$xmlDoc->getElementsByPath('authorUrl', 1);
            			$row->authorUrl = $element ? $element->getText() : '';
            
            			$element = &$xmlDoc->getElementsByPath('version', 1);
            			$row->version = $element ? $element->getText() : '';
            */
            // Get info from db
            if ($cur_template == $templateDir) {
                $row->published = 1;
            } else {
                $row->published = 0;
            }
            $row->checked_out = 0;
            $row->mosname = strtolower(str_replace(' ', '_', $row->name));
            // check if template is assigned
            $database->setQuery("SELECT count(*) FROM #__templates_menu WHERE client_id='0' AND template='{$row->directory}' AND menuid<>'0'");
            $row->assigned = $database->loadResult() ? 1 : 0;
            $rows[] = $row;
            $rowid++;
        }
    }
    require_once $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php';
    $pageNav = new mosPageNav(count($rows), $limitstart, $limit);
    $rows = array_slice($rows, $pageNav->limitstart, $pageNav->limit);
    HTML_templates::showTemplates($rows, $pageNav, $option, $client);
}
开发者ID:jwest00724,项目名称:mambo,代码行数:90,代码来源:admin.templates.php

示例12: attachement

    function attachement($mailingEdit, $lists, $show)
    {
        foreach ($mailingEdit->attachments as $attach => $k) {
            $mailingEdit->attachments[$attach] = basename($k);
        }
        if (ACA_CMSTYPE) {
            // joomla 15
            $path = ACA_JPATH_ROOT_NO_ADMIN . $GLOBALS[ACA . 'upload_url'];
            $arr = array(null);
            // Get the files and folders
            jimport('joomla.filesystem.folder');
            $files2 = JFolder::files($path, '.', true, true);
            $folders = JFolder::folders($path, '.', true, true);
            // Merge files and folders into one array
            $files = array_merge($files2, $folders);
            // Sort them all
            asort($files);
        } else {
            //joomla 1x
            $files = mosReadDirectory(ACA_JPATH_ROOT_NO_ADMIN . $GLOBALS[ACA . 'upload_url'], '\\.', true, true);
        }
        //endif
        echo '<select name="attachments[]" multiple="multiple" style="width: 100%;" size="10">';
        if (sizeof($files) > 0) {
            foreach ($files as $file) {
                $file = basename($file);
                if (in_array($file, $mailingEdit->attachments)) {
                    echo '<option selected="selected">' . $file . '</option>' . "\n";
                } else {
                    echo '<option>' . $file . '</option>' . "\n";
                }
            }
        }
        echo '</select>';
        ?>
<script src="<?php 
        echo ACA_JPATH_LIVE;
        ?>
/administrator/components/com_acajoom/classes/multifile.js"></script>

<input id="my_file_element" type="file" name="file_1" >
</input>

<br /><b><?php 
        echo _ACA_FILES;
        ?>
:</b>

<div id="files_list"></div>
<script>

	var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10 );
	multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>

<?php 
    }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:57,代码来源:mailings.acajoom.html.php

示例13: mosReadDirectory

 function mosReadDirectory($path, $filter = '.', $recurse = false, $fullpath = false)
 {
     return mosReadDirectory($path, $filter, $recurse, $fullpath);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:4,代码来源:DOCMAN_compat10.class.php

示例14: component_uninstall

/**
 * Component uninstall method
 * @param int The id of the module
 * @param string The URL option
 * @param int The client id
 */
function component_uninstall($cid, $option, $client = 0)
{
    $database =& mamboDatabase::getInstance();
    $sql = "SELECT * FROM #__components WHERE id={$cid}";
    $database->setQuery($sql);
    if (!$database->loadObject($row)) {
        $message = new mosError($database->stderr(true), _MOS_ERROR_FATAL);
        HTML_installer::showInstallMessage($message, T_('Uninstall -  error'), "index2.php?option={$option}&element=component");
        exit;
    }
    if ($row->iscore) {
        $message = new mosError(sprintf(T_('Component %s is a core component, and can not be uninstalled.<br />You need to unpublish it if you don\'t want to use it'), $row->name), _MOS_ERROR_FATAL);
        HTML_installer::showInstallMessage($message, 'Uninstall -  error', "index2.php?option={$option}&element=component");
        exit;
    }
    // Try to find the XML file
    $here = mosPathName(mamboCore::get('mosConfig_absolute_path') . '/administrator/components/' . $row->option);
    $filesindir = mosReadDirectory($here, '.xml$');
    if (count($filesindir) > 0) {
        $allerrors = new mosErrorSet();
        foreach ($filesindir as $file) {
            $parser =& new mosUninstallXML($here . $file);
            $parser->uninstall();
            $allerrors->mergeAnother($parser->errors);
        }
        $ret = $allerrors->getMaxLevel() < _MOS_ERROR_FATAL;
        HTML_installer::showInstallMessage($allerrors->getErrors(), T_('Uninstall component - ') . ($ret ? T_('Success') : T_('Error')), returnTo($option, 'component', $client));
    } else {
        $com_name = $row->option;
        $dir = new mosDirectory(mosPathName(mamboCore::get('mosConfig_absolute_path') . '/components/' . $com_name));
        $dir->deleteAll();
        $dir = new mosDirectory(mosPathName(mamboCore::get('mosConfig_absolute_path') . '/administrator/components/' . $com_name));
        $dir->deleteAll();
        $sql = "DELETE FROM #__components WHERE `option`='{$com_name}'";
        $database->setQuery($sql);
        $database->query();
        $message = new mosError(T_('Uninstaller could not find XML file, but cleaned database'), _MOS_ERROR_WARN);
        HTML_installer::showInstallMessage($message, T_('Uninstall ') . T_('component - ') . T_('Success'), returnTo($option, 'component', $client));
    }
    exit;
}
开发者ID:jwest00724,项目名称:mambo,代码行数:47,代码来源:admin.installer.php

示例15: _form_filelist

 /**
  * @param string The name of the form element
  * @param string The value of the element
  * @param object The xml element for the parameter
  * @param string The control name
  * @return string The html for the element
  */
 function _form_filelist($name, $value, &$node, $control_name)
 {
     global $mosConfig_absolute_path;
     // path to images directory
     $path = $mosConfig_absolute_path . $node->getAttribute('directory');
     $filter = $node->getAttribute('filter');
     $files = mosReadDirectory($path, $filter);
     $options = array();
     foreach ($files as $file) {
         $options[] = mosHTML::makeOption($file, $file);
     }
     if (!$node->getAttribute('hide_none')) {
         array_unshift($options, mosHTML::makeOption('-1', '- ' . 'Do Not Use' . ' -'));
     }
     if (!$node->getAttribute('hide_default')) {
         array_unshift($options, mosHTML::makeOption('', '- ' . 'Use Default' . ' -'));
     }
     return mosHTML::selectList($options, '' . $control_name . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value, "param{$name}");
 }
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:26,代码来源:joomla.xml.php


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