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

PHP ext_Lang类代码示例

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

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



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

示例1: show_about

/**
 * @version $Id: footer.php 107 2008-07-22 17:27:12Z soeren $
 * @package eXtplorer
 * @copyright soeren 2007
 * @author The eXtplorer project (http://sourceforge.net/projects/extplorer)
 * @author The  The QuiX project (http://quixplorer.sourceforge.net)
 * 
 * @license
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * Alternatively, the contents of this file may be used under the terms
 * of the GNU General Public License Version 2 or later (the "GPL"), in
 * which case the provisions of the GPL are applicable instead of
 * those above. If you wish to allow use of your version of this file only
 * under the terms of the GPL and not to allow others to use
 * your version of this file under the MPL, indicate your decision by
 * deleting  the provisions above and replace  them with the notice and
 * other provisions required by the GPL.  If you do not delete
 * the provisions above, a recipient may use your version of this file
 * under either the MPL or the GPL."
 * 
 * Shows the About Box!
 */
function show_about()
{
    // footer for html-page
    echo "\n<div id=\"ext_footer\" style=\"text-align:center;\">\r\n\t<img src=\"" . _EXT_URL . "/images/MangosWeb_small.png\" align=\"middle\" alt=\"Mangosweb Enhanced Logo\" />\r\n\t<br />\r\n\t" . ext_Lang::msg('your_version') . ": <a href=\"" . $GLOBALS['ext_home'] . "\" target=\"_blank\">eXtplorer {$GLOBALS['ext_version']}</a>\r\n\t<br />\r\n (<a href=\"http://virtuemart.net/index2.php?option=com_versions&amp;catid=5&amp;myVersion=" . $GLOBALS['ext_version'] . "\" onclick=\"javascript:void window.open('http://virtuemart.net/index2.php?option=com_versions&catid=5&myVersion=" . $GLOBALS['ext_version'] . "', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=580,directories=no,location=no'); return false;\" title=\"" . $GLOBALS["messages"]["check_version"] . "\">" . $GLOBALS["messages"]["check_version"] . "</a>)\r\n\t\r\n\t";
    if (function_exists("disk_free_space")) {
        $size = disk_free_space($GLOBALS['home_dir'] . $GLOBALS['separator']);
        $free = parse_file_size($size);
    } elseif (function_exists("diskfreespace")) {
        $size = diskfreespace($GLOBALS['home_dir'] . $GLOBALS['separator']);
        $free = parse_file_size($size);
    } else {
        $free = "?";
    }
    echo '<br />' . $GLOBALS["messages"]["miscfree"] . ": " . $free . " \n";
    if (extension_loaded("posix")) {
        $owner_info = '<br /><br />' . ext_Lang::msg('current_user') . ' ';
        if (ext_isFTPMode()) {
            $my_user_info = posix_getpwnam($_SESSION['ftp_login']);
            $my_group_info = posix_getgrgid($my_user_info['gid']);
        } else {
            $my_user_info = posix_getpwuid(posix_geteuid());
            $my_group_info = posix_getgrgid(posix_getegid());
        }
        $owner_info .= $my_user_info['name'] . ' (' . $my_user_info['uid'] . '), ' . $my_group_info['name'] . ' (' . $my_group_info['gid'] . ')';
        echo $owner_info;
    }
    echo "\r\n\t</div>";
}
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:59,代码来源:footer.php


示例2: execAction

 function execAction($dir, $item)
 {
     if (!ext_isArchive($item)) {
         ext_Result::sendResult('archive', false, $item . ': ' . ext_Lang::err('extract_noarchive'));
     } else {
         // CSRF Security Check
         if (!ext_checkToken($GLOBALS['__POST']["token"])) {
             ext_Result::sendResult('tokencheck', false, 'Request failed: Security Token not valid.');
         }
         $archive_name = realpath(get_abs_item($dir, $item));
         if (empty($dir)) {
             $extract_dir = realpath($GLOBALS['home_dir']);
         } else {
             $extract_dir = realpath($GLOBALS['home_dir'] . "/" . $dir);
         }
         require_once _EXT_PATH . '/libraries/Archive/archive.php';
         $res = extArchive::extract($archive_name, $extract_dir);
         if (PEAR::isError($res)) {
             ext_Result::sendResult('extract', false, ext_Lang::err('extract_failure') . ' - ' . $res->getMessage());
         }
         if ($res === false) {
             ext_Result::sendResult('extract', false, ext_Lang::err('extract_failure'));
         } else {
             ext_Result::sendResult('extract', true, ext_Lang::msg('extract_success'));
         }
         ext_Result::sendResult('extract', true, ext_Lang::msg('extract_success'));
     }
 }
开发者ID:naka211,项目名称:myloyal,代码行数:28,代码来源:extract.php


示例3: execAction

 function execAction($dir, $item)
 {
     if (!ext_isArchive($item)) {
         ext_Result::sendResult('archive', false, $item . ': ' . ext_Lang::err('extract_noarchive'));
     } else {
         $archive_name = realpath(get_abs_item($dir, $item));
         if (empty($dir)) {
             $extract_dir = realpath($GLOBALS['home_dir']);
         } else {
             $extract_dir = realpath($GLOBALS['home_dir'] . "/" . $dir);
         }
         require_once _EXT_PATH . '/libraries/Archive/archive.php';
         $res = extArchive::extract($archive_name, $extract_dir);
         if (PEAR::isError($res)) {
             ext_Result::sendResult('extract', false, ext_Lang::err('extract_failure') . ' - ' . $res->getMessage());
         }
         if ($res === false) {
             ext_Result::sendResult('extract', false, ext_Lang::err('extract_failure'));
         } else {
             ext_Result::sendResult('extract', true, ext_Lang::msg('extract_success'));
         }
         ext_Result::sendResult('extract', true, ext_Lang::msg('extract_success'));
     }
 }
开发者ID:chajianku,项目名称:admin_eXtplorer,代码行数:24,代码来源:extract.php


示例4: show_searchform

function show_searchform($dir = '')
{
    ?>
{
     "height":400,
     "autoScroll":true,

     items: [
        new Ext.TabPanel({
        activeTab: 0,
        items: [{
            "title":"<?php 
    echo $GLOBALS["messages"]["searchlink"];
    ?>
",
            "height": "370",
            "autoScroll":true,
            "items":
                new Ext.DataView({
                "id": "dataview",
                 tpl: new Ext.XTemplate(
                    '<tpl for=".">',
                    '<div class="search-item">',
                        '<h3>',
                        '<a onclick="selectFile(\'{dir}\', \'{file}\');Ext.getCmp(\'dialog\').destroy();return false;" href="#" target="_blank">{s_dir}/{file}, {lastModified:date("M j, Y")}</a>',
                        '</h3>',
                    '</div></tpl>'
                ),
                 store: new Ext.data.Store({
                        proxy: new Ext.data.HttpProxy({
                            url: "<?php 
    echo $GLOBALS['script_name'];
    ?>
"
                        }),
                        reader: new Ext.data.JsonReader({
                            root: 'items',
                            totalProperty: 'totalCount',
                            id: 'file_id'
                        }, [
                            {name: 'fileId', mapping: 'file_id'},
                            {name: 'file', mapping: 'file'},
                            {name: 'dir', mapping: 'dir'},
                            {name: 's_dir', mapping: 's_dir'},
                            {name: 'lastModified', mapping: 'last_mtime', type: 'date', dateFormat: 'timestamp'}
                        ]),
                        baseParams: {
                            limit:20,
                            option: "com_extplorer",
                            action:"search",
                            dir: "<?php 
    echo $dir;
    ?>
",
                            content: '0',
                            subdir: '1'
                        }
                    }),
                 itemSelector: 'div.search-item'
            }),

         tbar: [
             'Search: ', ' ',
             new Ext.app.SearchField({
                 store: Ext.getCmp("dataview").store,
                 width:320,
                value: "*"
             })
         ],

         bbar: new Ext.PagingToolbar({
             store: Ext.getCmp("dataview").store,
             pageSize: 20,
             displayInfo: true,
             displayMsg: 'Results {0} - {1} of {2}',
             emptyMsg: "No files to display"
         })
    },
    {
        title: "Search Options",
        xtype:"form",
        layout: "form",
        "height": "350",
        items: [

            {
                id:'myGroup',
                xtype: 'checkboxgroup',
                fieldLabel: 'Extensive Search',
                itemCls: 'x-check-group-alt',
                // Put all controls in a single column with width 100%
                columns: 1,
                items: [
                {
                    boxLabel: 'Search within Subdirectories?', name: 'subdir',
                    checked: true,
                    tooltip: "<?php 
    echo ext_Lang::msg('miscsubdirs', true);
    ?>
?",
//.........这里部分代码省略.........
开发者ID:ejailesb,项目名称:repo_empr,代码行数:101,代码来源:search.php


示例5: list_bookmarks

/**
 * Lists all bookmarked directories in a dropdown list.
 *
 * @param string $dir
 */
function list_bookmarks($dir)
{
    $bookmarks = read_bookmarks();
    $bookmarks = array_flip($bookmarks);
    foreach ($bookmarks as $bookmark) {
        $len = strlen($bookmark);
        if ($len > 40) {
            $first_part = substr($bookmark, 0, 20);
            $last_part = substr($bookmark, -20);
            $bookmarks[$bookmark] = $first_part . '...' . $last_part;
        }
    }
    $html = $GLOBALS['messages']['quick_jump'] . ': ';
    if (!empty($dir[0]) && @$dir[0] == '/') {
        $dir = substr($dir, 1);
    }
    $html .= ext_selectList('favourites', $dir, $bookmarks, 1, '', 'onchange="chDir( this.options[this.options.selectedIndex].value);" style="max-width: 200px;"');
    $img_add = '<img src="' . _EXT_URL . '/images/_bookmark_add.png" border="0" alt="' . $GLOBALS['messages']['lbl_add_bookmark'] . '" align="absmiddle" />';
    $img_remove = '<img src="' . _EXT_URL . '/images/_remove.png" border="0" alt="' . $GLOBALS['messages']['lbl_remove_bookmark'] . '" align="absmiddle" />';
    $addlink = $removelink = '';
    if (!isset($bookmarks[$dir]) && $dir != '' && $dir != '/') {
        $addlink = '<a href="' . make_link('modify_bookmark', $dir) . '&task=add" onclick="' . 'Ext.Msg.prompt(\'' . ext_Lang::msg('lbl_add_bookmark', true) . '\', \'' . ext_Lang::msg('enter_alias_name', true) . ':\', ' . 'function(btn, text){ ' . 'if (btn == \'ok\') { ' . 'Ext.get(\'bookmark_container\').load({ ' . 'url: \'' . basename($GLOBALS['script_name']) . '\', ' . 'scripts: true, ' . 'params: { ' . 'action:\'modify_bookmark\', ' . 'task: \'add\', ' . 'requestType: \'xmlhttprequest\', ' . 'alias: text, ' . 'dir: \'' . $dir . '\', ' . 'option: \'com_extplorer\' ' . '} ' . '}); ' . '}' . '}); return false;" title="' . $GLOBALS['messages']['lbl_add_bookmark'] . '" >' . $img_add . '</a>';
    } elseif ($dir != '' && $dir != '/') {
        $removelink = '<a href="' . make_link('modify_bookmark', $dir) . '&task=remove" onclick="' . 'Ext.Msg.confirm(\'' . ext_Lang::msg('lbl_remove_bookmark', true) . '\',\'' . ext_Lang::msg('lbl_remove_bookmark', true) . '?\', ' . 'function(btn, text){ ' . 'if (btn == \'yes\') { ' . 'Ext.get(\'bookmark_container\').load({ ' . 'url: \'' . basename($GLOBALS['script_name']) . '\', ' . 'scripts: true, ' . 'params: { ' . 'action:\'modify_bookmark\', ' . 'task: \'remove\', ' . 'dir: \'' . $dir . '\', ' . 'option: \'com_extplorer\' ' . '} ' . '}); ' . '}' . '}); return false;" title="' . $GLOBALS['messages']['lbl_remove_bookmark'] . '">' . $img_remove . '</a>';
    }
    $html .= $addlink . '&nbsp;' . $removelink;
    return $html;
}
开发者ID:Gninety,项目名称:Microweber,代码行数:33,代码来源:bookmarks.php


示例6: if

		statusBar.setStatus({
		    text: '<?php 
echo ext_Lang::msg('success', true);
?>
: ' + msg,
		    iconCls: 'success',
		    clear: true
		});
		Ext.msgBoxSlider.msg('<?php 
echo ext_Lang::msg('success', true);
?>
', msg );
	} else if( success != null ) {
		statusBar.setStatus({
		    text: '<?php 
echo ext_Lang::err('error', true);
?>
: ' + msg,
		    iconCls: 'error',
		    clear: true
		});
		
	}
	

}

function selectFile( dir, file ) {
	chDir( dir );
	var conn = datastore.proxy.getConnection();
   	if( conn.isLoading() ) {
开发者ID:jramsey08,项目名称:Coldwebs-V2.0,代码行数:31,代码来源:functions.js.php


示例7: execAction

    function execAction($dir)
    {
        if (($GLOBALS["permissions"] & 01) != 01) {
            ext_Result::sendResult('archive', false, $GLOBALS["error_msg"]["accessfunc"]);
        }
        if (!$GLOBALS["zip"] && !$GLOBALS["tgz"]) {
            ext_Result::sendResult('archive', false, $GLOBALS["error_msg"]["miscnofunc"]);
        }
        $allowed_types = array('zip', 'tgz', 'tbz', 'tar');
        // If we have something to archive, let's do it now
        if (extGetParam($_POST, 'confirm') == 'true') {
            $saveToDir = utf8_decode($GLOBALS['__POST']['saveToDir']);
            if (!file_exists(get_abs_dir($saveToDir))) {
                ext_Result::sendResult('archive', false, ext_Lang::err('archive_dir_notexists'));
            }
            if (!is_writable(get_abs_dir($saveToDir))) {
                ext_Result::sendResult('archive', false, ext_Lang::err('archive_dir_unwritable'));
            }
            require_once _EXT_PATH . '/libraries/Archive/archive.php';
            if (!in_array(strtolower($GLOBALS['__POST']["type"]), $allowed_types)) {
                ext_Result::sendResult('archive', false, ext_Lang::err('extract_unknowntype') . ': ' . htmlspecialchars($GLOBALS['__POST']["type"]));
            }
            // This controls how many files are processed per Step (it's split up into steps to prevent time-outs)
            $files_per_step = 2000;
            $cnt = count($GLOBALS['__POST']["selitems"]);
            $abs_dir = get_abs_dir($dir);
            $name = basename(stripslashes($GLOBALS['__POST']["name"]));
            if ($name == "") {
                ext_Result::sendResult('archive', false, $GLOBALS["error_msg"]["miscnoname"]);
            }
            $startfrom = extGetParam($_REQUEST, 'startfrom', 0);
            $dir_contents_cache_name = 'ext_' . md5(implode(null, $GLOBALS['__POST']["selitems"]));
            $dir_contents_cache_file = _EXT_FTPTMP_PATH . '/' . $dir_contents_cache_name . '.txt';
            $archive_name = get_abs_item($saveToDir, $name);
            $fileinfo = pathinfo($archive_name);
            if (empty($fileinfo['extension'])) {
                $archive_name .= "." . $GLOBALS['__POST']["type"];
                $fileinfo['extension'] = $GLOBALS['__POST']["type"];
                foreach ($allowed_types as $ext) {
                    if ($GLOBALS['__POST']["type"] == $ext && @$fileinfo['extension'] != $ext) {
                        $archive_name .= "." . $ext;
                    }
                }
            }
            if ($startfrom == 0) {
                for ($i = 0; $i < $cnt; $i++) {
                    $selitem = stripslashes($GLOBALS['__POST']["selitems"][$i]);
                    if ($selitem == 'ext_root') {
                        $selitem = '';
                    }
                    if (is_dir(utf8_decode($abs_dir . "/" . $selitem))) {
                        $items = extReadDirectory(utf8_decode($abs_dir . "/" . $selitem), '.', true, true);
                        foreach ($items as $item) {
                            if (is_dir($item) || !is_readable($item) || $item == $archive_name) {
                                continue;
                            }
                            $v_list[] = str_replace('\\', '/', $item);
                        }
                    } else {
                        $v_list[] = utf8_decode(str_replace('\\', '/', $abs_dir . "/" . $selitem));
                    }
                }
                if (count($v_list) > $files_per_step) {
                    if (file_put_contents($dir_contents_cache_file, implode("\n", $v_list)) == false) {
                        ext_Result::sendResult('archive', false, 'Failed to create a temporary list of the directory contents');
                    }
                }
            } else {
                $file_list_string = file_get_contents($dir_contents_cache_file);
                if (empty($file_list_string)) {
                    ext_Result::sendResult('archive', false, 'Failed to retrieve the temporary list of the directory contents');
                }
                $v_list = explode("\n", $file_list_string);
            }
            $cnt_filelist = count($v_list);
            // Now we go to the right range of files and "slice" the array
            $v_list = array_slice($v_list, $startfrom, $files_per_step - 1);
            $remove_path = $GLOBALS["home_dir"];
            if ($dir) {
                $remove_path .= $dir;
            }
            $debug = 'Starting from: ' . $startfrom . "\n";
            $debug .= 'Files to process: ' . $cnt_filelist . "\n";
            $debug .= implode("\n", $v_list);
            //file_put_contents( 'log.txt', $debug, FILE_APPEND );
            // Do some setup stuff
            ini_set('memory_limit', '128M');
            @set_time_limit(0);
            error_reporting(E_ERROR | E_PARSE);
            $result = extArchive::create($archive_name, $v_list, $GLOBALS['__POST']["type"], '', $remove_path);
            if (PEAR::isError($result)) {
                ext_Result::sendResult('archive', false, $name . ': ' . ext_Lang::err('archive_creation_failed') . ' (' . $result->getMessage() . $archive_name . ')');
            }
            $json = new ext_Json();
            if ($cnt_filelist > $startfrom + $files_per_step) {
                $response = array('startfrom' => $startfrom + $files_per_step, 'totalitems' => $cnt_filelist, 'success' => true, 'action' => 'archive', 'message' => sprintf(ext_Lang::msg('processed_x_files'), $startfrom + $files_per_step, $cnt_filelist));
            } else {
                @unlink($dir_contents_cache_file);
                if ($GLOBALS['__POST']["type"] == 'tgz' || $GLOBALS['__POST']["type"] == 'tbz') {
                    chmod($archive_name, 0644);
//.........这里部分代码省略.........
开发者ID:shamblett,项目名称:janitor,代码行数:101,代码来源:archive.php


示例8: execAction

    function execAction($dir, $item)
    {
        // change permissions
        if (($GLOBALS["permissions"] & 01) != 01) {
            ext_Result::sendResult('chmod', false, $GLOBALS["error_msg"]["accessfunc"]);
        }
        if (!empty($GLOBALS['__POST']["selitems"])) {
            $cnt = count($GLOBALS['__POST']["selitems"]);
        } else {
            $GLOBALS['__POST']["selitems"][] = $item;
            $cnt = 1;
        }
        if (!empty($GLOBALS['__POST']['do_recurse'])) {
            $do_recurse = true;
        } else {
            $do_recurse = false;
        }
        // Execute
        if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") {
            $bin = '';
            for ($i = 0; $i < 3; $i++) {
                for ($j = 0; $j < 3; $j++) {
                    $tmp = "r_" . $i . $j;
                    if (!empty($GLOBALS['__POST'][$tmp])) {
                        $bin .= '1';
                    } else {
                        $bin .= '0';
                    }
                }
            }
            if ($bin == '0') {
                // Changing permissions to "none" is not allowed
                ext_Result::sendResult('chmod', false, $item . ": " . ext_Lang::err('chmod_none_not_allowed'));
            }
            $old_bin = $bin;
            for ($i = 0; $i < $cnt; ++$i) {
                if (ext_isFTPMode()) {
                    $mode = decoct(bindec($bin));
                } else {
                    $mode = bindec($bin);
                }
                $item = $GLOBALS['__POST']["selitems"][$i];
                if (ext_isFTPMode()) {
                    $abs_item = get_item_info($dir, $item);
                } else {
                    $abs_item = get_abs_item($dir, $item);
                }
                if (!$GLOBALS['ext_File']->file_exists($abs_item)) {
                    ext_Result::sendResult('chmod', false, $item . ": " . $GLOBALS["error_msg"]["fileexist"]);
                }
                if (!get_show_item($dir, $item)) {
                    ext_Result::sendResult('chmod', false, $item . ": " . $GLOBALS["error_msg"]["accessfile"]);
                }
                if ($do_recurse) {
                    $ok = $GLOBALS['ext_File']->chmodRecursive($abs_item, $mode);
                } else {
                    if (get_is_dir($abs_item)) {
                        // when we chmod a directory we must care for the permissions
                        // to prevent that the directory becomes not readable (when the "execute bits" are removed)
                        $bin = substr_replace($bin, '1', 2, 1);
                        // set 1st x bit to 1
                        $bin = substr_replace($bin, '1', 5, 1);
                        // set  2nd x bit to 1
                        $bin = substr_replace($bin, '1', 8, 1);
                        // set 3rd x bit to 1
                        if (ext_isFTPMode()) {
                            $mode = decoct(bindec($bin));
                        } else {
                            $mode = bindec($bin);
                        }
                    }
                    //ext_Result::sendResult('chmod', false, $GLOBALS['FTPCONNECTION']->pwd());
                    $ok = @$GLOBALS['ext_File']->chmod($abs_item, $mode);
                }
                $bin = $old_bin;
            }
            if ($ok === false || PEAR::isError($ok)) {
                $msg = $item . ": " . $GLOBALS["error_msg"]["permchange"];
                $msg .= PEAR::isError($ok) ? ' [' . $ok->getMessage() . ']' : '';
                ext_Result::sendResult('chmod', false, $msg);
            }
            ext_Result::sendResult('chmod', true, ext_Lang::msg('permchange'));
            return;
        }
        if (ext_isFTPMode()) {
            $abs_item = get_item_info($dir, $GLOBALS['__POST']["selitems"][0]);
        } else {
            $abs_item = get_abs_item($dir, $GLOBALS['__POST']["selitems"][0]);
            $abs_item = utf8_decode($abs_item);
        }
        $mode = parse_file_perms(get_file_perms($abs_item));
        if ($mode === false) {
            ext_Result::sendResult('chmod', false, $item . ": " . $GLOBALS["error_msg"]["permread"]);
        }
        $pos = "rwx";
        $text = "";
        for ($i = 0; $i < $cnt; ++$i) {
            $s_item = get_rel_item($dir, $GLOBALS['__POST']["selitems"][$i]);
            if (strlen($s_item) > 50) {
                $s_item = "..." . substr($s_item, -47);
//.........这里部分代码省略.........
开发者ID:Gninety,项目名称:Microweber,代码行数:101,代码来源:chmod.php


示例9: execAction

    function execAction($dir)
    {
        // make new directory or file
        if (($GLOBALS["permissions"] & 01) != 01) {
            ext_Result::sendResult('mkitem', false, $GLOBALS["error_msg"]["accessfunc"]);
        }
        if (extGetParam($_POST, 'confirm') == 'true') {
            // CSRF Security Check
            if (!ext_checkToken($GLOBALS['__POST']["token"])) {
                ext_Result::sendResult('tokencheck', false, 'Request failed: Security Token not valid.');
            }
            $mkname = $GLOBALS['__POST']["mkname"];
            $mktype = $GLOBALS['__POST']["mktype"];
            $symlink_target = $GLOBALS['__POST']['symlink_target'];
            $mkname = basename(stripslashes($mkname));
            if ($mkname == "") {
                ext_Result::sendResult('mkitem', false, $GLOBALS["error_msg"]["miscnoname"]);
            }
            $new = get_abs_item($dir, $mkname);
            if (@$GLOBALS['ext_File']->file_exists($new)) {
                ext_Result::sendResult('mkitem', false, $mkname . ": " . $GLOBALS["error_msg"]["itemdoesexist"]);
            }
            $err = print_r($_POST, true);
            if ($mktype == "dir") {
                $ok = @$GLOBALS['ext_File']->mkdir($new, 0777);
                $err = $GLOBALS["error_msg"]["createdir"];
            } elseif ($mktype == 'file') {
                $ok = @$GLOBALS['ext_File']->mkfile($new);
                $err = $GLOBALS["error_msg"]["createfile"];
            } elseif ($mktype == 'symlink') {
                if (empty($symlink_target)) {
                    ext_Result::sendResult('mkitem', false, 'Please provide a valid <strong>target</strong> for the symbolic link.');
                }
                if (!file_exists($symlink_target) || !is_readable($symlink_target)) {
                    ext_Result::sendResult('mkitem', false, 'The file you wanted to make a symbolic link to does not exist or is not accessible by PHP.');
                }
                $ok = symlink($symlink_target, $new);
                $err = 'The symbolic link could not be created.';
            }
            if ($ok == false || PEAR::isError($ok)) {
                if (PEAR::isError($ok)) {
                    $err .= $ok->getMessage();
                }
                ext_Result::sendResult('mkitem', false, $err);
            }
            ext_Result::sendResult('mkitem', true, 'The item ' . $new . ' was created');
            return;
        }
        ?>
		{
		"xtype": "form",
		"id": "simpleform",
		"labelWidth": 125,
		"url":"<?php 
        echo basename($GLOBALS['script_name']);
        ?>
",
		"dialogtitle": "Create New File/Directory",
		"frame": true,
		"items": [{
			"xtype": "textfield",
			"fieldLabel": "<?php 
        echo ext_Lang::msg("nameheader", true);
        ?>
",
			"name": "mkname",
			"width":175,
			"allowBlank":false
			},{
			"xtype": "combo",
			"fieldLabel": "Type",
			"store": [["file", "<?php 
        echo ext_Lang::mime('file', true);
        ?>
"],
						["dir", "<?php 
        echo ext_Lang::mime('dir', true);
        ?>
"]
						<?php 
        if (!ext_isFTPMode() && !$GLOBALS['isWindows']) {
            ?>
						,["symlink", "<?php 
            echo ext_Lang::mime('symlink', true);
            ?>
"]
						<?php 
        }
        ?>
					],
			displayField:"type",
			valueField: "mktype",
			value: "file",
			hiddenName: "mktype",
			disableKeyFilter: true,
			editable: false,
			triggerAction: "all",
			mode: "local",
			allowBlank: false,
			selectOnFocus:true
//.........这里部分代码省略.........
开发者ID:naka211,项目名称:myloyal,代码行数:101,代码来源:mkitem.php


示例10: ext_successBox

function ext_successBox($msg)
{
    return ext_scriptTag('', 'Ext.msgBoxSlider.msg( \'' . ext_Lang::msg('success', true) . '\', \'' . @mysql_escape_string($msg) . '\' );');
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:4,代码来源:functions.php


示例11: savefile

 function savefile($file_name)
 {
     // save edited file
     if (get_magic_quotes_gpc()) {
         $code = stripslashes($GLOBALS['__POST']["code"]);
     } else {
         $code = $GLOBALS['__POST']["code"];
     }
     $res = $GLOBALS['ext_File']->file_put_contents($file_name, $code);
     if ($res == false || PEAR::isError($res)) {
         $err = basename($file_name) . ": " . ext_Lang::err('savefile');
         if (PEAR::isError($res)) {
             $err .= $res->getMessage();
         }
         ext_Result::sendResult('edit', false, $err);
     }
 }
开发者ID:shamblett,项目名称:janitor,代码行数:17,代码来源:edit.php


示例12: show_userform

function show_userform($data = null)
{
    if ($data == null) {
        $data = array('', '', '', '', '', '', '');
    }
    $formname = @$data[0] ? 'frmedituser' : 'frmadduser';
    ?>
{
	"xtype": "form",
	"id" : "<?php 
    echo $formname;
    ?>
",
	"renderTo": Ext.getCmp("dialog_tabpanel").getEl(),
	"hidden": true,
	"closable":true,
	"autoHeight": "true",
	"labelWidth": 125,
	"url":"<?php 
    echo basename($GLOBALS['script_name']);
    ?>
",
	"title": "<?php 
    if (!empty($data[0])) {
        printf($GLOBALS["messages"]["miscedituser"], $data[0]);
    } else {
        echo $GLOBALS["messages"]["miscadduser"];
    }
    ?>
"	,
		
	items: [{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscusername', true);
    ?>
",
			"name": "nuser",
			"value": "<?php 
    echo @$data[0];
    ?>
",
			"width":175,
			"allowBlank":false
		},{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscconfpass', true);
    ?>
",
			"name": "pass1",
			"inputType": "password",
			"width":175
		},
		{	"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscconfnewpass', true);
    ?>
",
			"name": "pass2",
			"inputType": "password",
			"width":175
		},
		<?php 
    if (!empty($data[0])) {
        ?>
			{	"xtype": "checkbox",
				"fieldLabel": "<?php 
        echo ext_Lang::msg('miscchpass', true);
        ?>
",
				"name": "chpass",
				"hiddenValue": "true"
			},
			<?php 
    }
    ?>
		{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('mischomedir', true);
    ?>
",
			"name": "home_dir",
			"value": "<?php 
    echo !empty($data[2]) ? $data[2] : $_SERVER['DOCUMENT_ROOT'];
    ?>
",
			"width":175,
			"allowBlank":false
		},
		{ 	"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('mischomeurl', true);
    ?>
",
			"name": "home_url",
			"value": "<?php 
    echo !empty($data[3]) ? $data[3] : $GLOBALS["home_url"];
    ?>
//.........这里部分代码省略.........
开发者ID:chajianku,项目名称:admin_eXtplorer,代码行数:101,代码来源:admin.php


示例13: show_about

/**
 * 
 * Shows eXtplorer information
 */
function show_about()
{
    //$sess = print_r($_SESSION,true);
    //echo str_replace(array("\r", "\n"),array('',''),$sess);
    echo "\n<div id=\"ext_footer\" style=\"text-align:center;\">\n\t<img src=\"" . _EXT_URL . "/images/eXtplorer_logo.png\" align=\"middle\" alt=\"eXtplorer Logo\" />\n\t<br />\n\t" . ext_Lang::msg('your_version') . ": <a href=\"" . $GLOBALS['ext_home'] . "\" target=\"_blank\">eXtplorer {$GLOBALS['ext_version']}</a>\n\t<br />\n (<a href=\"http://extplorer.net/version_check?myVersion=" . $GLOBALS['ext_version'] . "\" onclick=\"javascript:void window.open('http://extplorer.net/version_check?myVersion=" . $GLOBALS['ext_version'] . "', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=580,directories=no,location=no'); return false;\" title=\"" . $GLOBALS["messages"]["check_version"] . "\">" . $GLOBALS["messages"]["check_version"] . "</a>)\n\n\t";
    $size = disk_free_space($GLOBALS['home_dir'] . $GLOBALS['separator']);
    $free = parse_file_size($size);
    echo '<br />' . $GLOBALS["messages"]["miscfree"] . ": " . $free . " \n";
    if (extension_loaded("posix")) {
        $owner_info = '<br /><br />' . ext_Lang::msg('current_user') . ' ';
        if (ext_isFTPMode()) {
            $my_user_info = posix_getpwnam($_SESSION['ftp_login']);
            $my_group_info = posix_getgrgid($my_user_info['gid']);
        } else {
            $my_user_info = posix_getpwuid(posix_geteuid());
            $my_group_info = posix_getgrgid(posix_getegid());
        }
        $owner_info .= $my_user_info['name'] . ' (' . $my_user_info['uid'] . '), ' . $my_group_info['name'] . ' (' . $my_group_info['gid'] . ')';
        echo $owner_info;
    }
    echo "\n\t</div>";
}
开发者ID:chajianku,项目名称:admin_eXtplorer,代码行数:26,代码来源:system_info.php


示例14: execAction

 function execAction($dir)
 {
     if (($GLOBALS["permissions"] & 01) != 01) {
         ext_Result::sendResult('upload', false, $GLOBALS["error_msg"]["accessfunc"]);
     }
     $this->_downloadMethods = array(new CurlDownloader(), new WgetDownloader(), new FopenDownloader(), new FsockopenDownloader());
     //DEBUG ext_Result::sendResult('transfer', false, $dir );
     // Execute
     if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") {
         $cnt = count($GLOBALS['__POST']['userfile']);
         $err = false;
         foreach ($this->_downloadMethods as $method) {
             if ($method->isSupported()) {
                 $downloader =& $method;
                 break;
             }
         }
         // upload files & check for errors
         for ($i = 0; $i < $cnt; $i++) {
             $errors[$i] = NULL;
             $items[$i] = stripslashes(basename($GLOBALS['__POST']['userfile'][$i]));
             $abs = get_abs_item($dir, $items[$i]);
             if ($items[$i] == "") {
                 continue;
             }
             if (@file_exists($abs) && empty($_REQUEST['overwrite_files'])) {
                 $errors[$i] = $GLOBALS["error_msg"]["itemdoesexist"];
                 $err = true;
                 continue;
             }
             // Upload
             $ok = $downloader->download($GLOBALS['__POST']['userfile'][$i], $abs);
             if ($ok === true) {
                 $mode = ext_isFTPMode() ? 644 : 0644;
                 @$GLOBALS['ext_File']->chmod($abs, $mode);
             } else {
                 $errors[$i] = $ok;
                 $err = true;
                 continue;
             }
         }
         if ($err) {
             // there were errors
             $err_msg = "";
             for ($i = 0; $i < $cnt; $i++) {
                 if ($errors[$i] == NULL) {
                     continue;
                 }
                 $err_msg .= $items[$i] . " : " . $errors[$i] . "\n";
             }
             ext_Result::sendResult('transfer', false, $err_msg);
         }
         ext_Result::sendResult('transfer', true, ext_Lang::msg('transfer_completed'));
         return;
     }
 }
开发者ID:shamblett,项目名称:janitor,代码行数:56,代码来源:transfer.php


示例15: onShowLoginForm

    function onShowLoginForm()
    {
        ?>
	{
		xtype: "form",
		<?php 
        if (!ext_isXHR()) {
            ?>
renderTo: "adminForm", <?php 
        }
        ?>
		id: "simpleform",
		labelWidth: 125,
		url:"<?php 
        echo basename($GLOBALS['script_name']);
        ?>
",
		dialogtitle: "<?php 
        echo ext_Lang::msg('ftp_header');
        ?>
",
		title: "<?php 
        echo ext_Lang::msg('ftp_login_lbl');
        ?>
",
		frame: true,
		keys: {
		    key: Ext.EventObject.ENTER,
		    fn : function(){
				if (Ext.getCmp("simpleform").getForm().isValid()) {
					Ext.get( 'statusBar').update( '<?php 
        echo ext_Lang::msg('ftp_login_check', true);
        ?>
' );
					Ext.getCmp("simpleform").getForm().submit({
						reset: false,
						success: function(form, action) { location.reload() },
						failure: function(form, action) {
							if( !action.result ) return;
							Ext.Msg.alert('<?php 
        echo ext_Lang::err('error', true);
        ?>
', action.result.error);
							Ext.get( 'statusBar').update( action.result.error );
						},
						scope: Ext.getCmp("simpleform").getForm(),
						params: {
							option: "com_extplorer", 
							action: "login",
							type: "ftp",
							file_mode: "ftp"
						}
					});
    	        } else {
        	        return false;
            	}
            }
		},
		items: [{
			xtype: "textfield",
			fieldLabel: "<?php 
        echo ext_Lang::msg('ftp_login_name', true);
        ?>
",
			name: "username",
			width:175,
			allowBlank:false
		},{
			xtype: "textfield",
			fieldLabel: "<?php 
        echo ext_Lang::msg('ftp_login_pass', true);
        ?>
",
			name: "password",
			inputType: "password",
			width:175,
			allowBlank:false
		},{
			xtype: "combo",
			fieldLabel: "<?php 
        echo ext_Lang::msg('ftp_hostname_port', true);
        ?>
",
			hiddenName: "ftp_host",
			triggerAction: "all",
			value: "<?php 
        echo extGetParam($_SESSION, 'ftp_host');
        ?>
",
			store: ["<?php 
        echo implode('","', $GLOBALS['ext_conf']['remote_hosts_allowed']);
        ?>
"],
			width:175,
			editable: false,
			forceSelection: true,
			allowBlank:false
		},
		{
			xtype: "displayfield",
//.........这里部分代码省略.........
开发者ID:chajianku,项目名称:admin_eXtplorer,代码行数:101,代码来源:ftp.php


示例16: str_replace

echo str_replace("'", "\\'", $dir);
?>
' );
							
	    				}
	    			}
		}
    });
	Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
	    expires: new Date(new Date().getTime()+(1000*60*60*24*7)) //7 days from now
	}));
		
    <?php 
if ($GLOBALS['require_login'] && $GLOBALS['mainframe']->getUserName() == 'admin' && ($GLOBALS['mainframe']->getPassword() == extEncodePassword('admin') || $GLOBALS['mainframe']->getPassword() == md5('admin'))) {
    // Urge User to change admin password!
    echo 'msgbox = Ext.Msg.alert(\'' . ext_Lang::msg('password_warning_title', true) . '\', \'' . ext_Lang::msg('password_warning_text', true) . '\',
    		function(btn) { if( btn == \'ok\' ) openActionDialog( null, \'admin\') }
    	);
    	msgbox.setIcon(Ext.MessageBox.WARNING);
		';
}
?>
    
}
if( typeof Ext == 'undefined' ) {
	document.location = '<?php 
echo basename($GLOBALS['script_name']);
?>
?option=com_extplorer&nofetchscript=1';
}
开发者ID:ejailesb,项目名称:repo_empr,代码行数:30,代码来源:application.js.php


示例17: send_dircontents


//.........这里部分代码省略.........
        }
        $list = $output_array;
    }
    while (list($item, $info) = each($list)) {
        // link to dir / file
        if (is_array($info)) {
            $abs_item = $info;
            if (extension_loaded('posix')) {
                $user_info = posix_getpwnam($info['user']);
                $file_info['uid'] = $user_info['uid'];
          

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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