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


PHP printPHP_SELF函数代码示例

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


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

示例1: net2ftp_module_printJavascript

function net2ftp_module_printJavascript()
{
    // --------------
    // This function prints Javascript code and includes
    // --------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
    // Code
    echo "<script type=\"text/javascript\"><!--\n";
    echo "function createDirectoryTreeWindow(directory, FormAndFieldName) {\n";
    echo "\tdirectoryTreeWindow = window.open(\"\",\"directoryTreeWindow\",\"height=450,width=300,resizable=yes,scrollbars=yes\");\n";
    echo "\tvar d = directoryTreeWindow.document;\n";
    echo "\td.writeln('<html>');\n";
    echo "\td.writeln('<head>');\n";
    echo "\td.writeln('<title>" . __("Choose a directory") . "<\\/title>');\n";
    echo "\td.writeln('<\\/head>');\n";
    echo "\td.writeln('<bo' + 'dy on' + 'load=\"document.forms[\\'DirectoryTreeForm\\'].submit();\">');\n";
    //	echo "	d.writeln('<body>');\n";
    echo "\td.writeln('" . __("Please wait...") . "<br /><br />');\n";
    echo "\td.writeln('<form id=\"DirectoryTreeForm\" action=\"" . printPHP_SELF("createDirectoryTreeWindow") . "\" method=\"post\" />');\n";
    printLoginInfo_javascript();
    echo "\td.writeln('<input type=\"hidden\" name=\"state\" value=\"browse\">');\n";
    echo "\td.writeln('<input type=\"hidden\" name=\"state2\" value=\"popup\">');\n";
    echo "\td.writeln('<input type=\"hidden\" name=\"directory\" value=\"' + directory + '\">');\n";
    echo "\td.writeln('<input type=\"hidden\" name=\"FormAndFieldName\" value=\"' + FormAndFieldName + '\">');\n";
    echo "\td.writeln('<\\/form>');\n";
    echo "\td.writeln('<\\/div>');\n";
    echo "\td.writeln('<\\/body>');\n";
    echo "\td.writeln('<\\/html>');\n";
    echo "\td.close();\n";
    echo "} // end function createDirectoryTreeWindow\n";
    echo "//--></script>\n";
    // Include
    echo "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/modules/upload/upload.js\"></script>\n";
}
开发者ID:jprice,项目名称:EHCP,代码行数:34,代码来源:upload.inc.php

示例2: net2ftp_module_printJavascript

function net2ftp_module_printJavascript()
{
    // --------------
    // This function prints Javascript code and includes
    // --------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_result;
    // -------------------------------------------------------------------------
    // Mobile skins
    // -------------------------------------------------------------------------
    if ($net2ftp_globals["skin"] == "mobile" || $net2ftp_globals["skin"] == "iphone") {
        echo "<script type=\"text/javascript\"><!--\n";
        echo "function CopyValueToAll(myform, mysourcefield, mytargetfieldname) {\n";
        echo "\tfor (var i = 0; i < myform.elements.length; i++) {\n";
        echo "\t\tif (myform.elements[i].name.indexOf(mytargetfieldname) >= 0) {\n";
        echo "\t\t\tmyform.elements[i].value = mysourcefield.value;\n";
        echo "\t\t}\n";
        echo "\t}\n";
        echo "}\n";
        echo "//--></script>\n";
    } else {
        echo "<script type=\"text/javascript\"><!--\n";
        echo "function createDirectoryTreeWindow(directory, FormAndFieldName) {\n";
        echo "\tdirectoryTreeWindow = window.open(\"\",\"directoryTreeWindow\",\"height=450,width=300,resizable=yes,scrollbars=yes\");\n";
        echo "\tvar d = directoryTreeWindow.document;\n";
        echo "\td.writeln('<html>');\n";
        echo "\td.writeln('<head>');\n";
        echo "\td.writeln('<title>" . __("Choose a directory") . "<\\/title>');\n";
        echo "\td.writeln('<\\/head>');\n";
        echo "\td.writeln('<bo' + 'dy on' + 'load=\"document.DirectoryTreeForm.submit();\">');\n";
        //		echo "	d.writeln('<body>');\n";
        echo "\td.writeln('" . __("Please wait...") . "<br /><br />');\n";
        echo "\td.writeln('<form name=\"DirectoryTreeForm\" id=\"DirectoryTreeForm\" action=\"" . printPHP_SELF("createDirectoryTreeWindow") . "\" method=\"post\" />');\n";
        printLoginInfo_javascript();
        echo "  d.writeln('<input type=\"hidden\" name=\"" . Yii::app()->request->csrfTokenName . "\" value=\"" . Yii::app()->request->csrfToken . "\" />');\n";
        echo "\td.writeln('<input type=\"hidden\" name=\"state\" value=\"browse\" />');\n";
        echo "\td.writeln('<input type=\"hidden\" name=\"state2\" value=\"popup\" />');\n";
        echo "\td.writeln('<input type=\"hidden\" name=\"directory\" value=\"' + directory + '\"  />');\n";
        echo "\td.writeln('<input type=\"hidden\" name=\"FormAndFieldName\" value=\"' + FormAndFieldName + '\"  />');\n";
        echo "\td.writeln('<\\/form>');\n";
        echo "\td.writeln('<\\/div>');\n";
        echo "\td.writeln('<\\/body>');\n";
        echo "\td.writeln('<\\/html>');\n";
        echo "\td.close();\n";
        echo "} // end function createDirectoryTreeWindow\n";
        echo "\n";
        echo "function CopyValueToAll(myform, mysourcefield, mytargetfieldname) {\n";
        echo "\tfor (var i = 0; i < myform.elements.length; i++) {\n";
        echo "\t\tif (myform.elements[i].name.indexOf(mytargetfieldname) >= 0) {\n";
        echo "\t\t\tmyform.elements[i].value = mysourcefield.value;\n";
        echo "\t\t}\n";
        echo "\t}\n";
        echo "}\n";
        echo "//--></script>\n";
    }
}
开发者ID:Jmainguy,项目名称:multicraft_install,代码行数:55,代码来源:copymovedelete.inc.php

示例3: net2ftp_module_printBody

function net2ftp_module_printBody()
{
    // --------------
    // This function prints the login screen
    // --------------
    // -------------------------------------------------------------------------
    // Global variables
    // -------------------------------------------------------------------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result, $net2ftp_output;
    // -------------------------------------------------------------------------
    // Variables for screen 1
    // -------------------------------------------------------------------------
    if ($net2ftp_globals["screen"] == 1) {
        // Title
        $title = __("Upload directories and files using a Java applet");
        // Next screen
        $nextscreen = 2;
        // Form name, back and forward buttons
        $formname = "JavaUploadForm";
        $back_onclick = "document.forms['" . $formname . "'].state.value='browse';document.forms['" . $formname . "'].state2.value='main';document.forms['" . $formname . "'].submit();";
        // Action URL
        $actionURL = printPHP_SELF("jupload");
        // Maxima
        $maxFileSize = $net2ftp_settings["max_filesize"];
        $maxChunkSize = $net2ftp_settings["max_filesize"];
        $maxFilesPerRequest = "100";
        $max_filesize_net2ftp = formatFilesize($net2ftp_settings["max_filesize"]);
        $max_upload_filesize_php = formatFilesize(@ini_get("upload_max_filesize"));
        $max_execution_time = @ini_get("max_execution_time");
        // Print the output
        require_once $net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/manage.template.php";
    }
    // end if
    // -------------------------------------------------------------------------
    // Variables for screen 2
    // -------------------------------------------------------------------------
    //	elseif ($net2ftp_globals["screen"] == 2) {
    // THE OUTPUT IS GENERATED HIGHER UP, IN net2ftp_module_sendHttpHeaders().
    // This is because the Applet only takes text - no HTML.
    //	} // end if
    // -------------------------------------------------------------------------
    // Print the output
    // -------------------------------------------------------------------------
    // Is done higher up, as for screen 1 a template is used, but not for screen 2.
}
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:45,代码来源:jupload.inc.php

示例4: getPluginProperties


//.........这里部分代码省略.........
    $pluginProperties["jscalendar"]["browsers"][2] = "Opera";
    $pluginProperties["jscalendar"]["browsers"][3] = "Mozilla";
    $pluginProperties["jscalendar"]["browsers"][4] = "Other";
    $pluginProperties["jscalendar"]["filename_extensions"][1] = "";
    $pluginProperties["jscalendar"]["includePhpFiles"][1] = "jscalendar/calendar.php";
    $pluginProperties["jscalendar"]["printJavascript"] = "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar.js\"></script>\n";
    $pluginProperties["jscalendar"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/lang/" . $jscalendar_language . ".js\"></script>\n";
    $pluginProperties["jscalendar"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar-setup.js\"></script>\n";
    $pluginProperties["jscalendar"]["printCss"] = "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/skins/aqua/theme.css\" title=\"Aqua\" />\n";
    $pluginProperties["jscalendar"]["printCss"] .= "<link rel=\"alternate stylesheet\" type=\"text/css\" media=\"all\" href=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/jscalendar/calendar-win2k-cold-1.css\" title=\"win2k-cold-1\" />\n";
    $pluginProperties["jscalendar"]["printBodyOnload"] = "";
    // -------------------------------------------------------------------------
    // JUpload
    // A Java applet to upload directories and files
    // -------------------------------------------------------------------------
    $pluginProperties["jupload"]["use"] = "yes";
    $pluginProperties["jupload"]["label"] = "JUpload";
    $pluginProperties["jupload"]["directory"] = "jupload";
    $pluginProperties["jupload"]["type"] = "applet";
    $pluginProperties["jupload"]["browsers"][1] = "IE";
    $pluginProperties["jupload"]["browsers"][2] = "Opera";
    $pluginProperties["jupload"]["browsers"][3] = "Mozilla";
    //	$pluginProperties["jupload"]["browsers"][4]            = "Other";
    $pluginProperties["jupload"]["filename_extensions"][1] = "";
    $pluginProperties["jupload"]["includePhpFiles"][1] = "";
    $pluginProperties["jupload"]["printCss"] = "";
    $pluginProperties["jupload"]["printJavascript"] = "";
    $pluginProperties["jupload"]["printBodyOnload"] = "";
    // -------------------------------------------------------------------------
    // SWFUpload http://swfupload.mammon.se/index.php
    // A Flash applet to upload files
    // -------------------------------------------------------------------------
    $pluginProperties["swfupload"]["use"] = "yes";
    $pluginProperties["swfupload"]["label"] = "SWFUpload";
    $pluginProperties["swfupload"]["directory"] = "swfupload";
    $pluginProperties["swfupload"]["type"] = "applet";
    $pluginProperties["swfupload"]["browsers"][1] = "IE";
    $pluginProperties["swfupload"]["browsers"][2] = "Opera";
    $pluginProperties["swfupload"]["browsers"][3] = "Mozilla";
    $pluginProperties["swfupload"]["browsers"][4] = "Other";
    $pluginProperties["swfupload"]["filename_extensions"][1] = "";
    $pluginProperties["swfupload"]["includePhpFiles"][1] = "";
    $pluginProperties["swfupload"]["printJavascript"] = "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/swfupload/SWFUpload.js\"></script>\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "<script type=\"text/javascript\" src=\"" . $net2ftp_globals["application_rootdir_url"] . "/plugins/swfupload/example_callback.js.php?plugin_image_url=" . urlEncode2($net2ftp_globals["application_rootdir_url"] . "/plugins/swfupload") . "&amp;directory=" . urlEncode2($net2ftp_globals["directory"]) . "\"></script>\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "<script type=\"text/javascript\">\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\tvar swfu;\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\tfunction initializeSwfu() {\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\tswfu = new SWFUpload({\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_script : '" . printPHP_SELF("swfupload") . "',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\ttarget : 'SWFUploadTarget',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tflash_path : 'plugins/swfupload/SWFUpload.swf',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tallowed_filesize : " . $net2ftp_settings["max_filesize"] . ",\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tallowed_filetypes : '*.*',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tallowed_filetypes_description : 'All files...',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tbrowse_link_innerhtml : 'Browse',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_link_innerhtml : 'Upload queue',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tbrowse_link_class : 'swfuploadbtn browsebtn',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_link_class : 'swfuploadbtn uploadbtn',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tflash_loaded_callback : 'swfu.flashLoaded',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_file_queued_callback : 'fileQueued',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_file_start_callback : 'uploadFileStart',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_progress_callback : 'uploadProgress',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_file_complete_callback : 'uploadFileComplete',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_file_cancel_callback : 'uploadFileCancelled',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_queue_complete_callback : 'uploadQueueComplete',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_error_callback : 'uploadError',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tupload_cancel_callback : 'uploadCancel',\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tdebug : false,\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t\tauto_upload : false\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t\t});\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "		// NET2FTP: added this line to fix a bug as discussed on the forum\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "		// http://swfupload.mammon.se/forum/viewtopic.php?id=14\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "		var movie = document.getElementById(swfu.movieName);\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "		if (movie != null && !document.getElementById(swfu.movieName+'BrowseBtn')) {\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "			if(movie.PercentLoaded() == 100) swfu.loadUI();\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "		}\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "\t};\n";
    //	$pluginProperties["swfupload"]["printJavascript"]       .= "	function uploadError(error) { alert(error); }\n";
    $pluginProperties["swfupload"]["printJavascript"] .= "</script>\n";
    $pluginProperties["swfupload"]["printCss"] = "";
    $pluginProperties["swfupload"]["printBodyOnload"] = "initializeSwfu();";
    // -------------------------------------------------------------------------
    // GeSHi
    // Syntax highlighter
    // -------------------------------------------------------------------------
    $pluginProperties["geshi"]["use"] = "yes";
    $pluginProperties["geshi"]["label"] = "GeSHi";
    $pluginProperties["geshi"]["directory"] = "geshi";
    $pluginProperties["geshi"]["type"] = "highlighter";
    $pluginProperties["geshi"]["browsers"][1] = "IE";
    $pluginProperties["geshi"]["browsers"][2] = "Opera";
    $pluginProperties["geshi"]["browsers"][3] = "Mozilla";
    $pluginProperties["geshi"]["browsers"][4] = "Other";
    $pluginProperties["geshi"]["filename_extensions"][1] = "";
    $pluginProperties["geshi"]["includePhpFiles"][1] = "geshi/geshi.php";
    $pluginProperties["geshi"]["printCss"] = "";
    $pluginProperties["geshi"]["printJavascript"] = "";
    $pluginProperties["geshi"]["printBodyOnload"] = "";
    return $pluginProperties;
}
开发者ID:jprice,项目名称:EHCP,代码行数:101,代码来源:plugins.inc.php

示例5: net2ftp_module_printBody


//.........这里部分代码省略.........
    // ------------------------------------
    $action_colspan = 1;
    if ($net2ftp_settings["functionuse_view"] == "yes") {
        $action_colspan++;
    }
    if ($net2ftp_settings["functionuse_edit"] == "yes") {
        $action_colspan++;
    }
    if ($net2ftp_settings["functionuse_update"] == "yes") {
        $action_colspan++;
    }
    // Total nr of columns
    $total_colspan = $action_colspan + 9;
    // ------------------------------------
    // Name, Type, Size, ...
    // Determine the sort criteria and direction (ascending/descending)
    // ------------------------------------
    $sortArray["dirfilename"]["text"] = __("Name");
    $sortArray["type"]["text"] = __("Type");
    $sortArray["size"]["text"] = __("Size");
    $sortArray["owner"]["text"] = __("Owner");
    $sortArray["group"]["text"] = __("Group");
    $sortArray["permissions"]["text"] = __("Perms");
    $sortArray["mtime"]["text"] = __("Mod Time");
    $icon_directory = $net2ftp_globals["application_rootdir_url"] . "/skins/" . $net2ftp_globals["skin"] . "/images/mime";
    // Loop over all the sort possibilities
    while (list($key, $value) = each($sortArray)) {
        // The list is sorted by the current $key
        // Print the icon representing the current sortorder
        // Print the link to sort using the other sortorder
        if ($net2ftp_globals["sort"] == $key) {
            // Ascending
            if ($net2ftp_globals["sortorder"] == "ascending") {
                $sortArray[$key]["title"] = __("Click to sort by %1\$s in descending order", $value["text"]);
                $sortArray[$key]["onclick"] = "do_sort('" . $key . "','descending');";
                $icon = "ascend.png";
                $alt = __("Ascending order");
            } else {
                $sortArray[$key]["title"] = __("Click to sort by %1\$s in ascending order", $value["text"]);
                $sortArray[$key]["onclick"] = "do_sort('" . $key . "','ascending');";
                $icon = "descend.png";
                $alt = __("Descending order");
            }
        } else {
            $sortArray[$key]["title"] = __("Click to sort by %1\$s in ascending order", $value["text"]);
            $sortArray[$key]["onclick"] = "do_sort('" . $key . "','ascending');";
            $icon = "";
            $alt = "";
        }
        // The icon to be printed is determined above
        // Now, print the full HTML depending on the browser agent, version and platform
        if ($icon != "") {
            if ($net2ftp_globals["browser_agent"] == "IE" && ($net2ftp_globals["browser_version"] == "5.5" || $net2ftp_globals["browser_version"] == "6") && $net2ftp_globals["browser_platform"] == "Win") {
                $sortArray[$key]["icon"] = "<img src=\"{$icon_directory}/spacer.gif\"   alt=\"{$alt}\" style=\"border: 0px; width: 16px; height: 16px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='{$icon_directory}/{$icon}', sizingMethod='scale');\" />\n";
            } else {
                $sortArray[$key]["icon"] = "<img src=\"{$icon_directory}/{$icon}\"        alt=\"{$alt}\" style=\"border: 0px; width: 16px; height: 16px;\" />\n";
            }
        } else {
            $sortArray[$key]["icon"] = "";
        }
    }
    // ------------------------------------
    // popup - FormAndFieldname
    // ------------------------------------
    if (isset($_POST["FormAndFieldName"]) == true) {
        $FormAndFieldName = validateGenericInput($_POST["FormAndFieldName"]);
    } else {
        $FormAndFieldName = "";
    }
    // ------------------------------------
    // Action URL
    // Used for Up, Subdirectories, Files (download + actions)
    // ------------------------------------
    $action_url = printPHP_SELF("actions");
    // ------------------------------------
    // Data transfer statistics
    // Print this only if the consumption statistics are available (logging must be on, using a MySQL database)
    // ------------------------------------
    if (isset($net2ftp_globals["consumption_ipaddress_datatransfer"]) == true || isset($net2ftp_globals["consumption_ftpserver_datatransfer"]) == true) {
        $print_consumption = true;
        $consumption_ipaddress_datatransfer = formatFilesize($net2ftp_globals["consumption_ipaddress_datatransfer"]);
        $consumption_ftpserver_datatransfer = formatFilesize($net2ftp_globals["consumption_ftpserver_datatransfer"]);
    } else {
        $print_consumption = false;
    }
    // ------------------------------------
    // HTTP URL
    // ------------------------------------
    $list_files_tmp[1]["dirfilename_url"] = "";
    $httplink = ftp2http($directory, $list_files_tmp, "no");
    // -------------------------------------------------------------------------
    // Print the output - part 2
    // -------------------------------------------------------------------------
    if ($net2ftp_globals["state2"] == "main") {
        setStatus(6, 10, __("Printing the list of directories and files"));
        require_once $net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/browse_main.template.php";
    } elseif ($net2ftp_globals["state2"] == "popup") {
        require_once $net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/browse_popup.template.php";
    }
}
开发者ID:NN-Dev-Team,项目名称:Nordic-Network,代码行数:101,代码来源:browse.inc.php

示例6: net2ftp_module_printBody

function net2ftp_module_printBody()
{
    // --------------
    // This function prints the login screen
    // --------------
    // -------------------------------------------------------------------------
    // Global variables
    // -------------------------------------------------------------------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
    // -------------------------------------------------------------------------
    // Variables
    // -------------------------------------------------------------------------
    $filename_extension = get_filename_extension($net2ftp_globals["entry"]);
    // ------------------------
    // Set the state2 variable depending on the file extension !!!!!
    // ------------------------
    if (getFileType($net2ftp_globals["entry"]) == "IMAGE") {
        $filetype = "image";
    } elseif ($filename_extension == "swf") {
        $filetype = "flash";
    } else {
        $filetype = "text";
    }
    // Form name, back and forward buttons
    $formname = "ViewForm";
    $back_onclick = "document.forms['" . $formname . "'].state.value='browse';document.forms['" . $formname . "'].state2.value='main';document.forms['" . $formname . "'].submit();";
    // Next screen
    $nextscreen = 2;
    // -------------------------------------------------------------------------
    // Text
    // -------------------------------------------------------------------------
    if ($filetype == "text") {
        // Title
        $title = __("View file %1\$s", $net2ftp_globals["entry"]);
        // ------------------------
        // geshi_text
        // ------------------------
        setStatus(2, 10, __("Reading the file"));
        $geshi_text = ftp_readfile("", $net2ftp_globals["directory"], $net2ftp_globals["entry"]);
        if ($net2ftp_result["success"] == false) {
            return false;
        }
        // ------------------------
        // geshi_language
        // ------------------------
        $geshi_language = "";
        $list_language_extensions = array('html4strict' => array('html', 'htm'), 'javascript' => array('js'), 'css' => array('css'), 'php' => array('php', 'php5', 'phtml', 'phps'), 'perl' => array('pl', 'pm', 'cgi'), 'sql' => array('sql'), 'java' => array('java'), 'actionscript' => array('as'), 'ada' => array('a', 'ada', 'adb', 'ads'), 'apache' => array('conf'), 'asm' => array('ash', 'asm'), 'asp' => array('asp'), 'bash' => array('sh'), 'c' => array('c', 'h'), 'c_mac' => array('c'), 'caddcl' => array(), 'cadlisp' => array(), 'cpp' => array('cpp'), 'csharp' => array(), 'd' => array(''), 'delphi' => array('dpk'), 'diff' => array(''), 'email' => array('eml', 'mbox'), 'lisp' => array('lisp'), 'lua' => array('lua'), 'matlab' => array(), 'mpasm' => array(), 'nsis' => array(), 'objc' => array(), 'oobas' => array(), 'oracle8' => array(), 'pascal' => array('pas'), 'python' => array('py'), 'qbasic' => array('bi'), 'smarty' => array('tpl'), 'vb' => array('bas'), 'vbnet' => array(), 'vhdl' => array(), 'visualfoxpro' => array(), 'xml' => array('xml'));
        while (list($language, $extensions) = each($list_language_extensions)) {
            if (in_array($filename_extension, $extensions)) {
                $geshi_language = $language;
                break;
            }
        }
        // ------------------------
        // geshi_path
        // ------------------------
        $geshi_path = NET2FTP_APPLICATION_ROOTDIR . "/plugins/geshi/geshi/";
        // ------------------------
        // Call geshi
        // ------------------------
        setStatus(4, 10, __("Parsing the file"));
        $geshi = new GeSHi($geshi_text, $geshi_language, $geshi_path);
        $geshi->set_encoding(__("iso-8859-1"));
        $geshi->set_header_type(GESHI_HEADER_PRE);
        $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10);
        //		$geshi->enable_classes();
        $geshi->set_overall_style('border: 2px solid #d0d0d0; background-color: #f6f6f6; color: #000066; padding: 10px;', true);
        $geshi->set_link_styles(GESHI_LINK, 'color: #000060;');
        $geshi->set_link_styles(GESHI_HOVER, 'background-color: #f0f000;');
        $geshi->set_tab_width(4);
        $geshi_text = $geshi->parse_code();
    } elseif ($filetype == "image") {
        $title = __("View image %1\$s", htmlEncode2($net2ftp_globals["entry"]));
        $image_url = printPHP_SELF("view");
        $image_alt = __("Image") . $net2ftp_globals["entry"];
    } elseif ($filetype == "flash") {
        $title = __("View Macromedia ShockWave Flash movie %1\$s", htmlEncode2($net2ftp_globals["entry"]));
        $flash_url = printPHP_SELF("view");
    }
    // -------------------------------------------------------------------------
    // Print the output
    // -------------------------------------------------------------------------
    require_once $net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/manage.template.php";
}
开发者ID:rohdoor,项目名称:Zpanel-net2ftp,代码行数:84,代码来源:view.inc.php

示例7: defined

<?php

defined("NET2FTP") or die("Direct access to this location is not allowed.");
?>
<!-- Template /skins/mc/browse_popup.template.php begin -->
<form id="DirectoryTreeForm"  action="<?php 
echo printPHP_SELF("createDirectoryTreeWindow");
?>
" method="post">
<?php 
printLoginInfo();
?>
<input type="hidden" name="<?php 
echo Yii::app()->request->csrfTokenName;
?>
" value="<?php 
echo Yii::app()->request->csrfToken;
?>
" />
<input type="hidden" name="state"  value="browse" />
<input type="hidden" name="state2" value="popup" />
<input type="hidden" name="entry"  value="" />
<input type="hidden" name="updirectory" value="<?php 
echo $updirectory_html;
?>
" />
<input type="hidden" name="FormAndFieldName" value="<?php 
echo $FormAndFieldName;
?>
" />
<input type="text" name="directory" value="<?php 
开发者ID:Jmainguy,项目名称:multicraft_install,代码行数:31,代码来源:browse_popup.template.php

示例8: printLoginInfo

</span><br />
<?php 
printLoginInfo();
?>
			<input type="hidden" name="state"         value="browse" />
			<input type="hidden" name="state2"        value="main" />
			<input type="hidden" name="directory"     value="<?php 
echo $net2ftp_globals["directory_html"];
?>
" />
			<input type="hidden" name="url_withpw"    value="<?php 
echo printPHP_SELF("bookmark_withpw");
?>
" />
			<input type="hidden" name="url_withoutpw" value="<?php 
echo printPHP_SELF("bookmark_withoutpw");
?>
" />
			<input type="hidden" name="text"          value="net2ftp <?php 
echo $net2ftp_globals["ftpserver"];
?>
" />
<?php 
if ($net2ftp_globals["state"] != "bookmark") {
    printActionIcon("bookmark", "document.forms['StatusbarForm'].state.value='bookmark';document.forms['StatusbarForm'].submit();");
}
printActionIcon("refresh", "window.location.reload();");
printActionIcon("help", "void(window.open('" . $net2ftp_globals["application_rootdir_url"] . "/help.html','Help','location,menubar,resizable,scrollbars,status,toolbar'));");
printActionIcon("logout", "document.forms['StatusbarForm'].state.value='logout';document.forms['StatusbarForm'].submit();");
?>
			</form>
开发者ID:Gemorroj,项目名称:net2ftp,代码行数:31,代码来源:statusbar.template.php

示例9: defined

<?php

defined("NET2FTP") or die("Direct access to this location is not allowed.");
?>
<!-- Template /skins/shinra/footer.php begin -->
<div style="margin-top: 20px; text-align: center;">
	<a href="<?php 
echo printPHP_SELF("defaultskin");
?>
"><?php 
echo __("Standard");
?>
</a> 
	| <b><?php 
echo __("Mobile");
?>
</b></div>
<!-- Template /skins/shinra/footer.php end -->
开发者ID:NN-Dev-Team,项目名称:Nordic-Network,代码行数:18,代码来源:footer.template.php

示例10: printLoginInfo

?>
; font-size: 2em;"><?php 
echo $net2ftp_globals["ftpserver"];
?>
</span><br />
<?php 
printLoginInfo();
?>
			<input type="hidden" name="state"     value="browse" />
			<input type="hidden" name="state2"    value="main" />
			<input type="hidden" name="directory" value="<?php 
echo $net2ftp_globals["directory_html"];
?>
" />
			<input type="hidden" name="url"       value="<?php 
echo printPHP_SELF("bookmark");
?>
" />
			<input type="hidden" name="text"      value="net2ftp <?php 
echo $net2ftp_globals["ftpserver"];
?>
" />
<?php 
if ($net2ftp_globals["state"] != "bookmark") {
    printActionIcon("bookmark", "document.forms['StatusbarForm'].state.value='bookmark';document.forms['StatusbarForm'].submit();");
}
printActionIcon("refresh", "window.location.reload();");
printActionIcon("help", "void(window.open('" . $net2ftp_globals["application_rootdir_url"] . "/help.html','Help','location,menubar,resizable,scrollbars,status,toolbar'));");
printActionIcon("logout", "document.forms['StatusbarForm'].state.value='logout';document.forms['StatusbarForm'].submit();");
?>
			</form>
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:statusbar.template.php

示例11: printPHP_SELF

		<!-- ENDS HEADER -->
			
		<!-- MAIN -->
		<div id="main">

			<!-- content -->
			<div id="content">
				
				<!-- title -->
				<div id="page-title">
					<span class="title"><?php echo $net2ftp_globals["ftpserver"]; ?></span>
					<div style="text-align: right; margin-top: 10px;">
						<form id="StatusbarForm" method="post" action="<?php echo $net2ftp_globals["action_url"]; ?>">
<?php						printLoginInfo(); ?>
						<input type="hidden" name="state"         value="browse" />
						<input type="hidden" name="state2"        value="main" />
						<input type="hidden" name="directory"     value="<?php echo $net2ftp_globals["directory_html"]; ?>" />
						<input type="hidden" name="url_withpw"    value="<?php echo printPHP_SELF("bookmark_withpw"); ?>" />
						<input type="hidden" name="url_withoutpw" value="<?php echo printPHP_SELF("bookmark_withoutpw"); ?>" />
						<input type="hidden" name="text"          value="net2ftp <?php echo $net2ftp_globals["ftpserver"]; ?>" />
<?php	//					if ($net2ftp_globals["state"] != "bookmark") { printActionIcon("bookmark", "document.forms['StatusbarForm'].state.value='bookmark';document.forms['StatusbarForm'].submit();"); } ?>
<?php						if (getBrowser("agent") != "Chrome")         { printActionIcon("refresh",  "window.location.reload();"); } ?>
<?php						printActionIcon("help",     "void(window.open('" . $net2ftp_globals["application_rootdir_url"] . "/modules/help/help-user.html','Help','location,menubar,resizable,scrollbars,status,toolbar'));"); ?>
<?php						printActionIcon("logout",   "document.forms['StatusbarForm'].state.value='logout';document.forms['StatusbarForm'].submit();"); ?>
						</form>
					</div>
				</div>
				<!-- ENDS title -->

<!-- Template /skins/shinra/header.template.php end -->
开发者ID:knight-zhou,项目名称:PHP-HTML,代码行数:30,代码来源:header.template.php

示例12: net2ftp_module_printBody

function net2ftp_module_printBody()
{
    // --------------
    // This function prints the login screen
    // --------------
    // -------------------------------------------------------------------------
    // Global variables
    // -------------------------------------------------------------------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
    // -------------------------------------------------------------------------
    // Variables
    // -------------------------------------------------------------------------
    $filename_extension = get_filename_extension($net2ftp_globals["entry"]);
    // ------------------------
    // Set the state2 variable depending on the file extension !!!!!
    // ------------------------
    if (getFileType($net2ftp_globals["entry"]) == "IMAGE") {
        $filetype = "image";
    } elseif ($filename_extension == "swf") {
        $filetype = "flash";
    } else {
        $filetype = "text";
    }
    // Form name, back and forward buttons
    $formname = "ViewForm";
    $back_onclick = "document.forms['" . $formname . "'].state.value='browse';document.forms['" . $formname . "'].state2.value='main';document.forms['" . $formname . "'].submit();";
    // Next screen
    $nextscreen = 2;
    // -------------------------------------------------------------------------
    // Text
    // -------------------------------------------------------------------------
    if ($filetype == "text") {
        // Title
        $title = __("View file %1\$s", $net2ftp_globals["entry"]);
        // ------------------------
        // luminous_text
        // ------------------------
        setStatus(2, 10, __("Reading the file"));
        $luminous_text = ftp_readfile("", $net2ftp_globals["directory"], $net2ftp_globals["entry"]);
        if ($net2ftp_result["success"] == false) {
            return false;
        }
        // ------------------------
        // luminous_language
        // ------------------------
        $luminous_language = "";
        $list_language_extensions = array('html' => array('html', 'htm'), 'javascript' => array('js'), 'css' => array('css'), 'php' => array('php', 'php5', 'phtml', 'phps'), 'perl' => array('pl', 'pm', 'cgi'), 'sql' => array('sql'), 'java' => array('java'), 'ada' => array('a', 'ada', 'adb', 'ads'), 'as' => array('as'), 'asp' => array('asp'), 'cpp' => array('cpp'), 'csharp' => array('csharp'), 'diff' => array('diff'), 'go' => array('go'), 'latex' => array('latex'), 'matlab' => array('matlab'), 'python' => array('py'), 'rails' => array('rails'), 'ruby' => array('ruby'), 'sql' => array('sql'), 'vb' => array('bas'), 'vim' => array('vim'), 'xml' => array('xml'));
        while (list($language, $extensions) = each($list_language_extensions)) {
            if (in_array($filename_extension, $extensions)) {
                $luminous_language = $language;
                break;
            }
        }
        // ------------------------
        // Call luminous
        // ------------------------
        setStatus(4, 10, __("Parsing the file"));
        $luminous_text = luminous::highlight($luminous_language, $luminous_text, FALSE);
    } elseif ($filetype == "image") {
        $title = __("View image %1\$s", htmlEncode2($net2ftp_globals["entry"]));
        $image_url = printPHP_SELF("view");
        $image_alt = __("Image") . $net2ftp_globals["entry"];
    } elseif ($filetype == "flash") {
        $title = __("View Macromedia ShockWave Flash movie %1\$s", htmlEncode2($net2ftp_globals["entry"]));
        $flash_url = printPHP_SELF("view");
    }
    // -------------------------------------------------------------------------
    // Print the output
    // -------------------------------------------------------------------------
    require_once $net2ftp_globals["application_skinsdir"] . "/" . $net2ftp_globals["skin"] . "/manage.template.php";
}
开发者ID:GTAWWEKID,项目名称:tsiserver.us,代码行数:71,代码来源:view.inc.php

示例13: net2ftp_module_sendHttpHeaders

function net2ftp_module_sendHttpHeaders()
{
    // --------------
    // This function sends HTTP headers
    // --------------
    // -------------------------------------------------------------------------
    // Global variables
    // -------------------------------------------------------------------------
    global $net2ftp_settings, $net2ftp_globals, $net2ftp_messages, $net2ftp_result;
    // -------------------------------------------------------------------------
    // Construct the symlink target
    // -------------------------------------------------------------------------
    // A symlink has $entry = FreeBSD -> mirror/ftp.freebsd.org/pub/FreeBSD
    // Get the 2nd part, after the ->
    $pos = strpos($net2ftp_globals["entry"], " -> ");
    $entry_part2 = substr($net2ftp_globals["entry"], $pos + 4);
    // Glue the current directory with the symlink
    // and resolve the .. which it may contain (this is done by validateDirectory)
    $symlinktarget = validateDirectory(glueDirectories($net2ftp_globals["directory"], $entry_part2));
    // -------------------------------------------------------------------------
    // Check if the symlink points to a directory
    // -------------------------------------------------------------------------
    // ------------------------------------
    // Open connection
    // ------------------------------------
    $conn_id = ftp_openconnection();
    if ($net2ftp_result["success"] == false) {
        return false;
    }
    // ------------------------------------
    // Get raw list of directories and files
    // ------------------------------------
    $list = ftp_getlist($conn_id, $symlinktarget);
    if ($net2ftp_result["success"] == false) {
        $is_directory = false;
        setErrorVars(true, "", "", "", "");
    } else {
        $is_directory = true;
    }
    // ------------------------------------
    // Close connection
    // ------------------------------------
    ftp_closeconnection($conn_id);
    // -------------------------------------------------------------------------
    // Directory (main or popup): redirect to Browse page
    // -------------------------------------------------------------------------
    if ($is_directory == true) {
        $action_url = printPHP_SELF("actions");
        $action_url = str_replace("&amp;", "&", $action_url);
        header("Location: " . $action_url . "&state=browse&state2=" . $net2ftp_globals["state2"] . "&directory=" . $symlinktarget);
    } elseif ($net2ftp_globals["state2"] == "popup") {
        $action_url = printPHP_SELF("actions");
        $action_url = str_replace("&amp;", "&", $action_url);
        header("Location: " . $action_url . "&state=browse&state2=" . $net2ftp_globals["state2"] . "&directory=" . $net2ftp_globals["directory"]);
    } elseif ($net2ftp_globals["state2"] == "main") {
        if ($net2ftp_settings["functionuse_downloadfile"] == "yes") {
            $newdirectory = dirname($symlinktarget);
            $newfile = basename($symlinktarget);
            ftp_downloadfile($newdirectory, $newfile);
        } else {
            $errormessage = __("This function has been disabled by the Administrator of this website.");
            setErrorVars(false, $errormessage, debug_backtrace(), __FILE__, __LINE__);
            return false;
        }
    }
}
开发者ID:klr2003,项目名称:sourceread,代码行数:66,代码来源:followsymlink.inc.php


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