Beispiel #1
0
function convert_to_html($php_filename)
{
    global $interface_lang;
    if (substr($php_filename, -4) != ".php") {
        return;
    }
    $html_filename = "./html/" . substr($php_filename, 0, -4) . ".html";
    $base_filename = basename($php_filename, ".php");
    $page_title = getPageTitle($php_filename);
    // echo "  Converting $base_filename $page_title\n";
    if ($php_filename == "{$interface_lang}/index.php") {
        // special case
        ob_start();
        page_header($page_title);
        include $php_filename;
        common_footer();
        file_put_contents("./html/{$interface_lang}/index.html", ob_get_clean());
    } else {
        if (substr($php_filename, -9) !== "index.php") {
            @mkdir(dirname($html_filename), 0755, true);
            ob_start();
            $quiz_js = "";
            include $php_filename;
            if ($quiz_js != "") {
                // page contains js, create quiz and list
                echo <<<_END
<!DOCTYPE html>
<html lang="{$interface_lang}">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <title>Μελετώ: {$page_title}</title>
    <link rel="stylesheet" href="/css/greek-visual-keyboard.css">
    <link rel="stylesheet" href="/css/quiz.css">
    <link rel="stylesheet" href="/css/styles.css">
  </head>
  <body>
_END;
                navbar(dirname($php_filename));
                echo <<<_END
      
      <div class="quizWrapper">
      
      <div id="loading"><img src="/img/icons/spin.gif" alt="spinner"></div>
      
      {$page_title}<br>
      
      <div class="quiz">
      
      <p id="quizTitle"></p>
      
        <div class="answer-row">
          <div class="icon-box" id="showAnswer"><img src="/img/icons/eye.png" alt="show"></div>
          <input type="text" class="greek-keyboard" id="answer" size="18" autocapitalize="off" autocorrect="off" autocomplete="off" autofocus>
          <div class="icon-box" id="result"><img src="/img/icons/eraser.png" alt="erase"></div>
          <div class="icon-box hidden" id="nextQuestion"><input type="image" src="/img/icons/rightarrow.png" id="nextQuestionImage" alt="next"></div>
          <div class="icon-box display-none" id="back"><a href="index.html"><img src="/img/icons/revert.png" alt="back"></a></div>

          <br>
          <span id="prompt"></span>
        </div>



      </div>
    </div>

    <div id="visual-keyboard"></div>

    <br>
    <div class="center">
        <a href="index.html"><img src="/img/icons/revert.png" alt="back"></a>
        <img src="/img/icons/spacer.png" alt=" ">
        
        <a href="/html/{$interface_lang}/index.html"><img src="/img/icons/home.png" alt="home"></a>

      <!--
        <img src="/img/icons/spacer.png" alt=" ">
        
        <a href="/{$interface_lang}/help.html"><img src="/img/icons/question.png" alt="question"></a>
      -->
    </div> <!-- end center -->

    <script src="/js/jquery.js"></script>

    <!-- preload icons -->
    <script src="/js/preload-icons.js"></script>
    
    <!-- quiz scripts -->
    <script src="{$base_filename}.js"></script>
    <script src="/js/quiz.js"></script>

    <script src="/js/greek-charmap.js"></script>
    <script src="/js/greek-keymap.js"></script>
    <script src="/js/greek-by-replacement.js"></script>    
    <script src="/js/greek-visual-keyboard.js"></script>

      <script>
      \$(window).load(function () {
        \$("#loading").hide();
      });
      </script>
      
  </body>
</html>
_END;
            }
            file_put_contents($html_filename, ob_get_clean());
            // generate javascript
            create_quiz_javascript($php_filename);
            // generate ????-list page
            create_quiz_list($php_filename);
        }
    }
}
Beispiel #2
0
<?php

include "../include/functions.php";
$TITLE = "Sample Test [PHP-QAT: Quality Assurance Team]";
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
/* $Id$ */
common_header();
?>

<div style="padding: 10px">
<h1>Sample Test: skipif2.inc</h1>
<p>Back to &quot;<a href="../phpt_details.php">PHPT Test File Layout</a>&quot;</p>
<pre>&lt;?php
  if (!extension_loaded(&#039;soap&#039;)) die(&#039;skip soap extension not available&#039;);
?&gt;
</pre>
<p>Back to &quot;<a href="../phpt_details.php">PHPT Test File Layout</a>&quot;</p>
</div>

<?php 
common_footer();
Beispiel #3
0
  <div id="nextRepoPage"><a href="javascript:void(0);">Next--&gt;&gt;&gt;</a></div>
  <div id="mainContent">
    <ul id="repolist"></ul>
    <p>Even though the PHP project is using <a href="http://git.php.net">git.php.net</a>
    as master location for Git repositories we provide official <a href="http://github.com/php">mirrors on GitHub</a>,
    which can be used to create and discuss feature branches. This tool here tries to assist with the handling of GitHub pull requests.
    </p>
    <p>In general discussions about pull requests should be done in the appropriate places
    (the actual pull request on GitHub, the php.net bug tracker, the PHP internals list, etc.)
    while this tool helps with tasks which can't be done as we don't make contributors to
    PHP actual members of the "PHP Organization" on GitHub. The most important function might
    be closing pull requests without applying the changes (if the changes are applied GitHub
    will close it automatically).
    </p>
    <p>Please note that this tool is in constant development and in an early state.
    For a more detailed overview on the PHP Git process please check the <a href="https://wiki.php.net/vcs/gitworkflow">Git Workflow page</a> on the Wiki.
    </p>
  </div>
  <div id="repoContent"></div>
  <div id="loginDialog" title="Login">
    Username: <br><input id="userField"><br>
    Password: <br><input id="passField" type="password"><br>
    <button id="loginBtn">Login</button>
  </div>
  <div id="loading">Loading</div>

  <link href="jquery-ui.css" rel="stylesheet" type="text/css"/>
<?php 
$JS = array("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js", "//qa.php.net/pulls/jsrender.js", "//qa.php.net/pulls/pullrequests.js", "//qa.php.net/pulls/jquery.ba-bbq.min.js", "//qa.php.net/pulls/Markdown.Converter.js", "//qa.php.net/pulls/Markdown.Sanitizer.js");
common_footer($JS);