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

PHP HTMLWriter类代码示例

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

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



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

示例1: functionWriter

 /** Build the function definitons.
  *
  * @param Doclet doclet
  */
 function functionWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     $this->_id = 'definition';
     $rootDoc =& $this->_doclet->rootDoc();
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $packageName => $package) {
         $this->_sections[0] = array('title' => 'Overview', 'url' => 'overview-summary.html');
         $this->_sections[1] = array('title' => 'Package', 'url' => $package->asPath() . '/package-summary.html');
         $this->_sections[2] = array('title' => 'Function', 'selected' => TRUE);
         //$this->_sections[3] = array('title' => 'Use');
         $this->_sections[4] = array('title' => 'Tree', 'url' => 'overview-tree.html');
         $this->_sections[5] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
         $this->_sections[6] = array('title' => 'Index', 'url' => 'index-all.html');
         $this->_depth = $package->depth() + 1;
         ob_start();
         echo "<hr>\n\n";
         echo "<h1>Functions</h1>\n\n";
         echo "<hr>\n\n";
         $functions =& $package->functions();
         if ($functions) {
             ksort($functions);
             echo '<table id="summary_function" class="title">', "\n";
             echo '<tr><th colspan="2" class="title">Function Summary</th></tr>', "\n";
             foreach ($functions as $function) {
                 $textTag =& $function->tags('@text');
                 echo "<tr>\n";
                 echo '<td class="type">', $function->modifiers(FALSE), ' ', $function->returnTypeAsString(), "</td>\n";
                 echo '<td class="description">';
                 echo '<p class="name"><a href="#', $function->name(), '()">', $function->name(), '</a>', $function->flatSignature(), '</p>';
                 if ($textTag) {
                     echo '<p class="description">', strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>'), '</p>';
                 }
                 echo "</td>\n";
                 echo "</tr>\n";
             }
             echo "</table>\n\n";
             echo '<h2 id="detail_function">Function Detail</h2>', "\n";
             foreach ($functions as $function) {
                 $textTag =& $function->tags('@text');
                 echo '<div class="location">', $function->location(), "</div>\n";
                 echo '<h3 id="', $function->name(), '()">', $function->name(), "</h3>\n";
                 echo '<code class="signature">', $function->modifiers(), ' ', $function->returnTypeAsString(), ' <strong>';
                 echo $function->name(), '</strong>', $function->flatSignature();
                 echo "</code>\n";
                 echo '<div class="details">', "\n";
                 if ($textTag) {
                     echo $this->_processInlineTags($textTag), "\n";
                 }
                 $this->_processTags($function->tags());
                 echo "</div>\n\n";
                 echo "<hr>\n\n";
             }
         }
         $this->_output = ob_get_contents();
         ob_end_clean();
         $this->_write($package->asPath() . '/package-functions.html', 'Functions', TRUE);
     }
 }
开发者ID:hobodave,项目名称:phpdoctor,代码行数:64,代码来源:functionWriter.php


示例2: frameOutputWriter

    /** Build the HTML frameset.
     *
     * @param Doclet doclet
     */
    function frameOutputWriter(&$doclet)
    {
        parent::HTMLWriter($doclet);
        ob_start();
        echo <<<END
\t\t
<frameset cols="20%,80%">

<frameset rows="30%,70%">

<frame src="overview-frame.html" name="packagelist">
<frame src="allitems-frame.html" name="index">

</frameset>

<frame src="overview-summary.html" name="main">

<noframes>
    <body>
        <h2>Frame Alert</h2>
        <p>This document is designed to be viewed using frames. If you see this message, you are using a non-frame-capable browser.<br>
        Link to <a href="overview-summary.html">Non-frame version</a>.</p>
    </body>
</noframes>

</frameset>
END;
        $this->_output = ob_get_contents();
        ob_end_clean();
        $this->_write('index.html', FALSE, FALSE);
    }
开发者ID:noah-goodrich,项目名称:phpdoctor,代码行数:35,代码来源:frameOutputWriter.php


示例3: getCurrentQuota

 public function getCurrentQuota($action, $httpVars, $fileVars)
 {
     $u = $this->getUsage($this->getWorkingPath());
     HTMLWriter::charsetHeader("application/json");
     print json_encode(array('USAGE' => $u, 'TOTAL' => $this->getAuthorized()));
     return;
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:7,代码来源:class.QuotaComputer.php


示例4: frameOutputWriter

    /** Build the HTML frameset.
     *
     * @param Doclet doclet
     */
    public function frameOutputWriter(&$doclet)
    {
        parent::HTMLWriter($doclet);
        ob_start();
        echo <<<END

<frameset cols="20%,80%" frameborder="1" border="1" bordercolor="#bbb" framespacing="1">

<frame src="frame.html" name="index">
<frame src="namespaces.html" name="main">

<noframes>
    <body>
        <h2>Frame Alert</h2>
        <p>This document is designed to be viewed using frames. If you see this message, you are using a non-frame-capable browser.<br>
        Link to <a href="namespaces.html">Non-frame version</a>.</p>
    </body>
</noframes>

</frameset>
END;
        $this->_output = ob_get_contents();
        ob_end_clean();
        $this->_write('index.html', false, false, false);
    }
开发者ID:peej,项目名称:phpdoctor,代码行数:29,代码来源:frameOutputWriter.php


示例5: functionWriter

 /** Build the function definitons.
  *
  * @param Doclet doclet
  */
 public function functionWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     $this->_id = 'definition';
     $rootDoc =& $this->_doclet->rootDoc();
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $packageName => $package) {
         $this->_depth = $package->depth() + 1;
         ob_start();
         echo '<header>';
         echo '<h1>' . $this->_doclet->_docTitle . '</h1>';
         echo "<span>Global</span>\n\n";
         echo "<h2>Functions</h2>\n\n";
         echo '</header>';
         $functions =& $package->functions();
         if ($functions) {
             ksort($functions);
             echo '<table>', "\n";
             foreach ($functions as $function) {
                 $textTag =& $function->tags('@text');
                 echo "<tr>\n";
                 echo '<td class="type">', $function->modifiers(FALSE), ' ', $function->returnTypeAsString(), "</td>\n";
                 echo '<td class="description">';
                 echo '<p class="name"><a href="#', $function->name(), '()">', $function->name(), '</a>', $function->flatSignature(), '</p>';
                 if ($textTag) {
                     echo '<p class="description">', strip_tags($this->_processInlineTags($textTag, TRUE), '<a><b><strong><u><em>'), '</p>';
                 }
                 echo "</td>\n";
                 echo "</tr>\n";
             }
             echo "</table>\n\n";
             echo '<h2>Details</h2>', "\n";
             foreach ($functions as $function) {
                 $textTag =& $function->tags('@text');
                 $this->_sourceLocation($function);
                 echo '<h3 id="', $function->name(), '()">', $function->name(), "</h3>\n";
                 echo '<code class="signature">', $function->modifiers(), ' ', $function->returnTypeAsString(), ' <strong>';
                 echo $function->name(), '</strong>', $function->flatSignature();
                 echo "</code>\n";
                 echo '<div class="details">', "\n";
                 if ($textTag) {
                     echo $this->_processInlineTags($textTag), "\n";
                 }
                 $this->_processTags($function->tags());
                 echo "</div>\n\n";
             }
         }
         $this->_output = ob_get_contents();
         ob_end_clean();
         $this->_write($package->asPath() . '/package-functions.html', 'Functions', TRUE);
     }
 }
开发者ID:peej,项目名称:phpdoctor,代码行数:57,代码来源:functionWriter.php


示例6: switchAction

 public function switchAction($action, $httpVars, $fileVars)
 {
     if (!isset($this->actions[$action])) {
         return;
     }
     switch ($action) {
         case "get_secure_token":
             HTMLWriter::charsetHeader("text/plain");
             print AuthService::generateSecureToken();
             //exit(0);
             break;
             //------------------------------------
             //	CHANGE USER PASSWORD
             //------------------------------------
         //------------------------------------
         //	CHANGE USER PASSWORD
         //------------------------------------
         case "pass_change":
             $userObject = AuthService::getLoggedUser();
             if ($userObject == null || $userObject->getId() == "guest") {
                 header("Content-Type:text/plain");
                 print "SUCCESS";
                 break;
             }
             $oldPass = $httpVars["old_pass"];
             $newPass = $httpVars["new_pass"];
             $passSeed = $httpVars["pass_seed"];
             if (strlen($newPass) < ConfService::getCoreConf("PASSWORD_MINLENGTH", "auth")) {
                 header("Content-Type:text/plain");
                 print "PASS_ERROR";
                 break;
             }
             if (AuthService::checkPassword($userObject->getId(), $oldPass, false, $passSeed)) {
                 AuthService::updatePassword($userObject->getId(), $newPass);
                 if ($userObject->getLock() == "pass_change") {
                     $userObject->removeLock();
                     $userObject->save("superuser");
                 }
             } else {
                 header("Content-Type:text/plain");
                 print "PASS_ERROR";
                 break;
             }
             header("Content-Type:text/plain");
             print "SUCCESS";
             break;
         default:
             break;
     }
     return "";
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:51,代码来源:class.AbstractAuthDriver.php


示例7: packageFrameWriter

 /** Build the package frame index.
  *
  * @param Doclet doclet
  */
 function packageFrameWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     $rootDoc =& $this->_doclet->rootDoc();
     $this->_output =& $this->_allItems($rootDoc);
     $this->_write('allitems-frame.html', 'All Items', FALSE);
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $packageName => $package) {
         $this->_depth = $package->depth() + 1;
         $this->_output =& $this->_buildFrame($package);
         $this->_write($package->asPath() . '/package-frame.html', $package->name(), FALSE);
     }
 }
开发者ID:hobodave,项目名称:phpdoctor,代码行数:18,代码来源:packageFrameWriter.php


示例8: switchActions

 public function switchActions($actionName, $httpVars, $fileVars)
 {
     if ($actionName != "changes" || !isset($httpVars["seq_id"])) {
         return false;
     }
     require_once AJXP_BIN_FOLDER . "/dibi.compact.php";
     dibi::connect($this->sqlDriver);
     HTMLWriter::charsetHeader('application/json', 'UTF-8');
     $res = dibi::query("SELECT\n                [seq] , [ajxp_changes].[repository_identifier] , [ajxp_changes].[node_id] , [type] , [source] ,  [target] , [ajxp_index].[bytesize], [ajxp_index].[md5], [ajxp_index].[mtime], [ajxp_index].[node_path]\n                FROM [ajxp_changes]\n                LEFT JOIN [ajxp_index]\n                    ON [ajxp_changes].[node_id] = [ajxp_index].[node_id]\n                WHERE [ajxp_changes].[repository_identifier] = %s AND [seq] > %i\n                ORDER BY [ajxp_changes].[node_id], [seq] ASC", $this->computeIdentifier(ConfService::getRepository()), AJXP_Utils::sanitize($httpVars["seq_id"], AJXP_SANITIZE_ALPHANUM));
     echo '{"changes":[';
     $previousNodeId = -1;
     $previousRow = null;
     $order = array("path" => 0, "content" => 1, "create" => 2, "delete" => 3);
     $relocateAttrs = array("bytesize", "md5", "mtime", "node_path", "repository_identifier");
     foreach ($res as $row) {
         $row->node = array();
         foreach ($relocateAttrs as $att) {
             $row->node[$att] = $row->{$att};
             unset($row->{$att});
         }
         if ($row->node_id == $previousNodeId) {
             $previousRow->target = $row->target;
             $previousRow->seq = $row->seq;
             if ($order[$row->type] > $order[$previousRow->type]) {
                 $previousRow->type = $row->type;
             }
         } else {
             if (isset($previousRow) && ($previousRow->source != $previousRow->target || $previousRow->type == "content")) {
                 echo json_encode($previousRow) . ",";
             }
             $previousRow = $row;
             $previousNodeId = $row->node_id;
         }
         $lastSeq = $row->seq;
         flush();
     }
     if (isset($previousRow) && ($previousRow->source != $previousRow->target || $previousRow->type == "content")) {
         echo json_encode($previousRow);
     }
     if (isset($lastSeq)) {
         echo '], "last_seq":' . $lastSeq . '}';
     } else {
         $lastSeq = dibi::query("SELECT MAX([seq]) FROM [ajxp_changes]")->fetchSingle();
         if (empty($lastSeq)) {
             $lastSeq = 1;
         }
         echo '], "last_seq":' . $lastSeq . '}';
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:49,代码来源:class.ChangesTracker.php


示例9: functionWriter

 function functionWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     $rootDoc =& $this->_doclet->rootDoc();
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $packageName => $package) {
         $doc = new DomDocument();
         $doc->preserveWhiteSpace = FALSE;
         $doc->formatOutput = TRUE;
         $dom_functions = $doc->createElement('functions');
         $dom_functions->setAttribute('package', $package->name());
         $functions =& $package->functions();
         if ($functions) {
             ksort($functions);
             foreach ($functions as $function) {
                 $dom_function = $doc->createElement('function');
                 $dom_modifiers = $doc->createElement('modifiers');
                 foreach (explode(' ', trim($function->modifiers())) as $modifier) {
                     $dom_modifiers->appendChild($doc->createElement('modifier', $modifier));
                 }
                 $dom_function->appendChild($dom_modifiers);
                 $type = $function->returnTypeAsString();
                 $type = $this->__removeTextFromMarkup($type);
                 $dom_function->setAttribute('name', $function->name());
                 $dom_function->setAttribute('return', $type);
                 $dom_signature = $doc->createElement('parameters');
                 $this->getSignature($function, $doc, $dom_signature);
                 $dom_function->appendChild($dom_signature);
                 $dom_location = $doc->createElement('location', $function->sourceFilename());
                 $dom_location->setAttribute('line', $function->sourceLine());
                 $dom_function->appendChild($dom_location);
                 $textTag =& $function->tags('@text');
                 if ($textTag) {
                     $dom_description = $doc->createElement('description', $this->_processInlineTags($textTag));
                     $dom_function->appendChild($dom_description);
                 }
                 $dom_functions->appendChild($dom_function);
             }
         }
         $doc->appendChild($dom_functions);
         $this->_output = $doc->saveXML();
         $this->_write($package->asPath() . '/package-functions.xml', 'Functions', TRUE);
     }
 }
开发者ID:nickdunn,项目名称:phpdoctor,代码行数:45,代码来源:functionWriter.php


示例10: switchAction

 public function switchAction($action, $httpVars, $fileVars)
 {
     switch ($action) {
         case "get_js_source":
             $jsName = AJXP_Utils::decodeSecureMagic($httpVars["object_name"]);
             $jsType = $httpVars["object_type"];
             // class or interface?
             $fName = "class." . strtolower($jsName) . ".js";
             if ($jsName == "Splitter") {
                 $fName = "splitter.js";
             }
             if (!defined("CLIENT_RESOURCES_FOLDER")) {
                 define("CLIENT_RESOURCES_FOLDER", AJXP_PLUGINS_FOLDER . "/gui.ajax/res");
             }
             // Locate the file class.ClassName.js
             if ($jsType == "class") {
                 $searchLocations = array(CLIENT_RESOURCES_FOLDER . "/js/ajaxplorer", CLIENT_RESOURCES_FOLDER . "/js/lib", AJXP_INSTALL_PATH . "/plugins/");
             } else {
                 if ($jsType == "interface") {
                     $searchLocations = array(CLIENT_RESOURCES_FOLDER . "/js/ajaxplorer/interfaces");
                 }
             }
             foreach ($searchLocations as $location) {
                 $dir_iterator = new RecursiveDirectoryIterator($location);
                 $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
                 // could use CHILD_FIRST if you so wish
                 $break = false;
                 foreach ($iterator as $file) {
                     if (strtolower(basename($file->getPathname())) == $fName) {
                         HTMLWriter::charsetHeader("text/plain", "utf-8");
                         echo file_get_contents($file->getPathname());
                         $break = true;
                         break;
                     }
                 }
                 if ($break) {
                     break;
                 }
             }
             break;
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:42,代码来源:class.jsapiAccessDriver.php


示例11: frameOutputWriter

    /** Build the HTML frameset.
     *
     * @param Doclet doclet
     */
    function frameOutputWriter(&$doclet)
    {
        parent::HTMLWriter($doclet);
        ob_start();
        echo <<<END
\t\t
\t\t<table border="0" width="100%" height="100%">
\t\t\t<tr>
\t\t\t\t<td width="200" class="sidebar">
\t\t\t\t\t<iframe frameBorder="0" scrolling="no" src="overview-frame.html" class="overview-frame" name="packagelist" width="100%"></iframe>
\t\t\t\t\t<p>&nbsp;</p>
\t\t\t\t\t<iframe frameBorder="0" scrolling="no" src="allitems-frame.html" class="allitems-frame" name="index" width="100%"></iframe>
\t\t\t\t</td>
\t\t\t\t<td><iframe frameBorder="0" scrolling="no" src="overview-summary.html" class="overview-summary-frame" name="main" width="100%"></iframe></td>
\t\t\t</tr>
\t\t</table>
END;
        //<frameset cols="20%,80%" frameborder="1" framespacing="1" border="1">
        //
        //<frameset rows="30%,70%" frameborder="2" framespacing="2" border="2">
        //
        //<frame src="overview-frame.html" name="packagelist">
        //<frame src="allitems-frame.html" name="index">
        //
        //</frameset>
        //
        //<frame src="overview-summary.html" name="main">
        //
        //<noframes>
        //    <body>
        //        <h2>Frame Alert</h2>
        //        <p>This document is designed to be viewed using frames. If you see this message, you are using a non-frame-capable browser.<br>
        //        Link to <a href="overview-summary.html">Non-frame version</a>.</p>
        //    </body>
        //</noframes>
        //
        //</frameset>
        $this->_output = ob_get_contents();
        ob_end_clean();
        $this->_write('index.html', FALSE, FALSE);
    }
开发者ID:Naatan,项目名称:CrossORM,代码行数:45,代码来源:frameOutputWriter.php


示例12: packageIndexFrameWriter

 /** Build the package frame index.
  *
  * @param Doclet doclet
  */
 function packageIndexFrameWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     ob_start();
     echo '<body id="frame">', "\n\n";
     echo '<h1>' . $this->_doclet->getHeader() . "</h1>\n\n";
     echo "<ul>\n";
     echo '<li><a href="allitems-frame.html" target="index">All Items</a></li>' . "\n";
     echo "</ul>\n\n";
     echo "<h1>Namespaces</h1>\n\n";
     $rootDoc =& $this->_doclet->rootDoc();
     echo "<ul>\n";
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $name => $package) {
         echo '<li><a href="' . $package->asPath() . '/package-frame.html" target="index">' . $package->name() . '</a></li>' . "\n";
     }
     echo "</ul>\n\n";
     echo '</body>', "\n\n";
     $this->_output = ob_get_contents();
     ob_end_clean();
     $this->_write('overview-frame.html', 'Overview', FALSE);
 }
开发者ID:Naatan,项目名称:CrossORM,代码行数:27,代码来源:packageIndexFrameWriter.php


示例13: applyActions

 public function applyActions($actionName, $httpVars, $fileVars)
 {
     $git = new VersionControl_Git($this->repoBase);
     switch ($actionName) {
         case "git_history":
             $file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
             $file = ltrim($file, "/");
             $res = $this->gitHistory($git, $file);
             AJXP_XMLWriter::header();
             $ic = AJXP_Utils::mimetype($file, "image", false);
             $index = count($res);
             $mess = ConfService::getMessages();
             foreach ($res as &$commit) {
                 unset($commit["DETAILS"]);
                 $commit["icon"] = $ic;
                 $commit["index"] = $index;
                 $commit["EVENT"] = $mess["meta.git." . $commit["EVENT"]];
                 $index--;
                 AJXP_XMLWriter::renderNode("/" . $commit["ID"], basename($commit["FILE"]), true, $commit);
             }
             AJXP_XMLWriter::close();
             break;
             break;
         case "git_revertfile":
             $originalFile = AJXP_Utils::decodeSecureMagic($httpVars["original_file"]);
             $file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
             $commitId = $httpVars["commit_id"];
             $command = $git->getCommand("cat-file");
             $command->setOption("s", true);
             $command->addArgument($commitId . ":" . $file);
             $size = $command->execute();
             $command = $git->getCommand("show");
             $command->addArgument($commitId . ":" . $file);
             $commandLine = $command->createCommandString();
             $outputStream = fopen($this->repoBase . $originalFile, "w");
             $this->executeCommandInStreams($git, $commandLine, $outputStream);
             fclose($outputStream);
             $this->commitChanges();
             AJXP_XMLWriter::header();
             AJXP_XMLWriter::reloadDataNode();
             AJXP_XMLWriter::close();
             break;
         case "git_getfile":
             $file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
             $commitId = $httpVars["commit_id"];
             $attach = $httpVars["attach"];
             $command = $git->getCommand("cat-file");
             $command->setOption("s", true);
             $command->addArgument($commitId . ":" . $file);
             $size = $command->execute();
             $command = $git->getCommand("show");
             $command->addArgument($commitId . ":" . $file);
             $commandLine = $command->createCommandString();
             if ($attach == "inline") {
                 $fileExt = substr(strrchr(basename($file), '.'), 1);
                 if (empty($fileExt)) {
                     $fileMime = "application/octet-stream";
                 } else {
                     $regex = "/^([\\w\\+\\-\\.\\/]+)\\s+(\\w+\\s)*({$fileExt}\\s)/i";
                     $lines = file(AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/editor.browser/resources/other/mime.types");
                     foreach ($lines as $line) {
                         if (substr($line, 0, 1) == '#') {
                             continue;
                         }
                         // skip comments
                         $line = rtrim($line) . " ";
                         if (!preg_match($regex, $line, $matches)) {
                             continue;
                         }
                         // no match to the extension
                         $fileMime = $matches[1];
                     }
                 }
                 if (empty($fileMime)) {
                     $fileMime = "application/octet-stream";
                 }
                 HTMLWriter::generateInlineHeaders(basename($file), $size, $fileMime);
             } else {
                 HTMLWriter::generateAttachmentsHeader(basename($file), $size, false, false);
             }
             $outputStream = fopen("php://output", "a");
             $this->executeCommandInStreams($git, $commandLine, $outputStream);
             fclose($outputStream);
             break;
             break;
         default:
             break;
     }
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:89,代码来源:class.GitManager.php


示例14: sendInstallResult

 /**
  * Send output to the user.
  * @param String $htAccessToUpdate file path
  * @param String $htContent file content
  */
 public function sendInstallResult($htAccessToUpdate, $htContent)
 {
     ConfService::clearAllCaches();
     AJXP_Utils::setApplicationFirstRunPassed();
     if ($htAccessToUpdate != null) {
         HTMLWriter::charsetHeader("application/json");
         echo json_encode(array('file' => $htAccessToUpdate, 'content' => $htContent));
     } else {
         session_destroy();
         HTMLWriter::charsetHeader("text/plain");
         echo 'OK';
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:18,代码来源:class.BootConfLoader.php


示例15: classWriter

 /** Build the class definitons.
  *
  * @param Doclet doclet
  */
 function classWriter(&$doclet)
 {
     parent::HTMLWriter($doclet);
     $this->_id = 'definition';
     $rootDoc =& $this->_doclet->rootDoc();
     $phpdoctor =& $this->_doclet->phpdoctor();
     $packages =& $rootDoc->packages();
     ksort($packages);
     foreach ($packages as $packageName => $package) {
         $this->_sections[0] = array('title' => 'Overview', 'url' => 'overview-summary.html');
         $this->_sections[1] = array('title' => 'Namespace', 'url' => $package->asPath() . '/package-summary.html');
         $this->_sections[2] = array('title' => 'Class', 'selected' => TRUE);
         //$this->_sections[3] = array('title' => 'Use');
         if ($phpdoctor->getOption('tree')) {
             $this->_sections[4] = array('title' => 'Tree', 'url' => $package->asPath() . '/package-tree.html');
         }
         if ($doclet->includeSource()) {
             $this->_sections[5] = array('title' => 'Files', 'url' => 'overview-files.html');
         }
         $this->_sections[6] = array('title' => 'Deprecated', 'url' => 'deprecated-list.html');
         $this->_sections[7] = array('title' => 'Todo', 'url' => 'todo-list.html');
         $this->_sections[8] = array('title' => 'Index', 'url' => 'index-all.html');
         $this->_depth = $package->depth() + 1;
         $classes =& $package->allClasses();
         if ($classes) {
             ksort($classes);
             foreach ($classes as $name => $class) {
                 ob_start();
                 echo "<hr>\n\n";
                 echo '<div class="qualifiedName">', $class->qualifiedName(), "</div>\n";
                 $this->_sourceLocation($class);
                 if ($class->isInterface()) {
                     echo '<h1>Interface ', $class->name(), "</h1>\n\n";
                 } else {
                     echo '<h1>Class ', $class->name(), "</h1>\n\n";
                 }
                 echo '<pre class="tree">';
                 $result = $this->_buildTree($rootDoc, $classes[$name]);
                 echo $result[0];
                 echo "</pre>\n\n";
                 $implements =& $class->interfaces();
                 if (count($implements) > 0) {
                     echo "<dl>\n";
                     echo "<dt>All Implemented Interfaces:</dt>\n";
                     echo '<dd>';
                     foreach ($implements as $interface) {
                         echo '<a href="', str_repeat('../', $this->_depth), $interface->asPath(), '">';
                         if ($interface->packageName() != $class->packageName()) {
                             echo $interface->packageName(), '\\';
                         }
                         echo $interface->name(), '</a> ';
                     }
                     echo "</dd>\n";
                     echo "</dl>\n\n";
                 }
                 $subclasses =& $class->subclasses();
                 if ($subclasses) {
                     echo "<dl>\n";
                     echo "<dt>All Known Subclasses:</dt>\n";
                     echo '<dd>';
                     foreach ($subclasses as $subclass) {
                         echo '<a href="', str_repeat('../', $this->_depth), $subclass->asPath(), '">';
                         if ($subclass->packageName() != $class->packageName()) {
                             echo $subclass->packageName(), '\\';
                         }
                         echo $subclass->name(), '</a> ';
                     }
                     echo "</dd>\n";
                     echo "</dl>\n\n";
                 }
                 echo "<hr>\n\n";
                 if ($class->isInterface()) {
                     echo '<p class="signature">', $class->modifiers(), ' interface <strong>', $class->name(), '</strong>';
                 } else {
                     echo '<p class="signature">', $class->modifiers(), ' class <strong>', $class->name(), '</strong>';
                 }
                 if ($class->superclass()) {
                     $superclass =& $rootDoc->classNamed($class->superclass());
                     if ($superclass) {
                         echo '<br>extends <a href="', str_repeat('../', $this->_depth), $superclass->asPath(), '">', $superclass->name(), "</a>\n\n";
                     } else {
                         echo '<br>extends ', $class->superclass(), "\n\n";
                     }
                 }
                 echo "</p>\n\n";
                 $textTag =& $class->tags('@text');
                 if ($textTag) {
                     echo '<div class="comment" id="overview_description">', $this->_processInlineTags($textTag), "</div>\n\n";
                 }
                 $this->_processTags($class->tags());
                 echo "<hr>\n\n";
                 $constants =& $class->constants();
                 ksort($constants);
                 $fields =& $class->fields();
                 ksort($fields);
                 $constructor =& $class->constructor();
//.........这里部分代码省略.........
开发者ID:Naatan,项目名称:CrossORM,代码行数:101,代码来源:classWriter.php


示例16: switchAction

 function switchAction($action, $httpVars, $fileVars)
 {
     if (!isset($this->actions[$action])) {
         return;
     }
     if (preg_match('/MSIE 7/', $_SERVER['HTTP_USER_AGENT']) || preg_match('/MSIE 8/', $_SERVER['HTTP_USER_AGENT'])) {
         // Force legacy theme for the moment
         $this->pluginConf["GUI_THEME"] = "oxygen";
     }
     if (!defined("AJXP_THEME_FOLDER")) {
         define("CLIENT_RESOURCES_FOLDER", AJXP_PLUGINS_FOLDER . "/gui.ajax/res");
         define("AJXP_THEME_FOLDER", CLIENT_RESOURCES_FOLDER . "/themes/" . $this->pluginConf["GUI_THEME"]);
     }
     foreach ($httpVars as $getName => $getValue) {
         ${$getName} = AJXP_Utils::securePath($getValue);
     }
     if (isset($dir) && $action != "upload") {
         $dir = SystemTextEncoding::fromUTF8($dir);
     }
     $mess = ConfService::getMessages();
     switch ($action) {
         //------------------------------------
         //	GET AN HTML TEMPLATE
         //------------------------------------
         case "get_template":
             HTMLWriter::charsetHeader();
             $folder = CLIENT_RESOURCES_FOLDER . "/html";
             if (isset($httpVars["pluginName"])) {
                 $folder = AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/" . AJXP_Utils::securePath($httpVars["pluginName"]);
                 if (isset($httpVars["pluginPath"])) {
                     $folder .= "/" . AJXP_Utils::securePath($httpVars["pluginPath"]);
                 }
             }
             $crtTheme = $this->pluginConf["GUI_THEME"];
             $thFolder = AJXP_THEME_FOLDER . "/html";
             if (isset($template_name)) {
                 if (is_file($thFolder . "/" . $template_name)) {
                     include $thFolder . "/" . $template_name;
                 } else {
                     if (is_file($folder . "/" . $template_name)) {
                         include $folder . "/" . $template_name;
                     }
                 }
             }
             break;
             //------------------------------------
             //	GET I18N MESSAGES
             //------------------------------------
         //------------------------------------
         //	GET I18N MESSAGES
         //------------------------------------
         case "get_i18n_messages":
             $refresh = false;
             if (isset($httpVars["lang"])) {
                 ConfService::setLanguage($httpVars["lang"]);
                 $refresh = true;
             }
             HTMLWriter::charsetHeader('text/javascript');
             HTMLWriter::writeI18nMessagesClass(ConfService::getMessages($refresh));
             break;
             //------------------------------------
             //	SEND XML REGISTRY
             //------------------------------------
         //------------------------------------
         //	SEND XML REGISTRY
         //------------------------------------
         case "get_xml_registry":
             $regDoc = AJXP_PluginsService::getXmlRegistry();
             $changes = AJXP_Controller::filterActionsRegistry($regDoc);
             if ($changes) {
                 AJXP_PluginsService::updateXmlRegistry($regDoc);
             }
             if (isset($_GET["xPath"])) {
                 $regPath = new DOMXPath($regDoc);
                 $nodes = $regPath->query($_GET["xPath"]);
                 AJXP_XMLWriter::header("ajxp_registry_part", array("xPath" => $_GET["xPath"]));
                 if ($nodes->length) {
                     print AJXP_XMLWriter::replaceAjxpXmlKeywords($regDoc->saveXML($nodes->item(0)));
                 }
                 AJXP_XMLWriter::close("ajxp_registry_part");
             } else {
                 AJXP_Utils::safeIniSet("zlib.output_compression", "4096");
                 header('Content-Type: application/xml; charset=UTF-8');
                 print AJXP_XMLWriter::replaceAjxpXmlKeywords($regDoc->saveXML());
             }
             break;
             //------------------------------------
             //	DISPLAY DOC
             //------------------------------------
         //------------------------------------
         //	DISPLAY DOC
         //------------------------------------
         case "display_doc":
             HTMLWriter::charsetHeader();
             echo HTMLWriter::getDocFile(AJXP_Utils::securePath(htmlentities($_GET["doc_file"])));
             break;
             //------------------------------------
             //	GET BOOT GUI
             //------------------------------------
         //------------------------------------
//.........这里部分代码省略.........
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:101,代码来源:class.AJXP_ClientDriver.php


示例17: render

 /**
  * @param array $data
  * @param array $options
  * @param ShareStore $shareStore
  */
 public static function render($data, $options, $shareStore)
 {
     if (isset($data["SECURITY_MODIFIED"]) && $data["SECURITY_MODIFIED"] === true) {
         self::renderError($data, "false");
         return;
     }
     // create driver from $data
     $className = $data["DRIVER"] . "AccessDriver";
     $u = parse_url($_SERVER["REQUEST_URI"]);
     $shortHash = pathinfo(basename($u["path"]), PATHINFO_FILENAME);
     // Load language messages
     $language = ConfService::getLanguage();
     if (isset($_GET["lang"])) {
         $language = basename($_GET["lang"]);
     }
     $messages = array();
     if (is_file(dirname(__FILE__) . "/res/i18n/" . $language . ".php")) {
         include dirname(__FILE__) . "/res/i18n/" . $language . ".php";
     } else {
         include dirname(__FILE__) . "/res/i18n/en.php";
     }
     if (isset($mess)) {
         $messages = $mess;
     }
     $AJXP_LINK_HAS_PASSWORD = false;
     $AJXP_LINK_BASENAME = SystemTextEncoding::toUTF8(basename($data["FILE_PATH"]));
     AJXP_PluginsService::getInstance()->initActivePlugins();
     ConfService::s 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP HTML_Common类代码示例发布时间:2022-05-23
下一篇:
PHP HTMLTags_URL类代码示例发布时间: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