Exemplo n.º 1
0
		<tr><td>Page header</td><td><input type="checkbox" name=pageHeader></td></tr>
		<tr><td>HTML header &amp; footer</td><td><input type="checkbox" name=HTMLissues></td></tr>
		<tr><td>CSS basic stylesheet</td><td><input checked type="checkbox" name=CSSstylesheet></td></tr>
		</table><br>
		<input type="submit" name="submit" value="Submit">
		<input type="submit" name="cancel" value="Cancel">
		<input type="hidden" name="options" value="1">
		</form>' . PHP_EOL;
                } else {
                    echo '<h1>Here is your phpMyEdit calling program</h1>' . PHP_EOL;
                    echo '<h2>You may now copy and paste it into your PHP editor</h2>' . PHP_EOL;
                    if ($pageHeader) {
                        echo_buffer('<h3>' . $pageTitle . '</h3>');
                    }
                    $versions = '';
                    $versions_ar = get_versions();
                    foreach (array('version' => 'phpMyEdit version:', 'core' => 'phpMyEdit.class.php core class:', 'setup' => 'phpMyEditSetup.php script:', 'current' => 'generating setup script:') as $type => $desc) {
                        $version = isset($versions_ar[$type]) ? $versions_ar[$type] : 'unknown';
                        $versions .= sprintf("\n *  %36s %s", $desc, $version);
                    }
                    echo_buffer("<?php\r\n\r\n/*\r\n * IMPORTANT NOTE: This generated file contains only a subset of huge amount\r\n * of options that can be used with phpMyEdit. To get information about all\r\n * features offered by phpMyEdit, check official documentation. It is available\r\n * online and also for download on phpMyEdit project management page:\r\n *\r\n * http://platon.sk/projects/main_page.php?project_id=5\r\n *\r\n * This file was generated by:\r\n *{$versions}\r\n */\r\n\r\n// MySQL host name, user name, password, database, and table\r\n\$opts['hn'] = '{$hn}';\r\n\$opts['un'] = '{$un}';\r\n\$opts['pw'] = '{$pw}';\r\n\$opts['db'] = '{$db}';\r\n\$opts['tb'] = '{$tb}';\r\n\r\n// Name of field which is the unique key\r\n\$opts['key'] = '{$id}';\r\n\r\n// Type of key field (int/real/string/date etc.)");
                    if ($id == '') {
                        echo_buffer("\$opts['key_type'] = '';");
                    } else {
                        $fds = @mysql_list_fields($db, $tb, $dbl);
                        for ($j = 0; ($fd = @mysql_field_name($fds, $j)) != ''; $j++) {
                            if ($fd == $id) {
                                echo_buffer("\$opts['key_type'] = '" . @mysql_field_type($fds, $j) . "';");
                                break;
                            }
                        }
Exemplo n.º 2
0
}
echo "<ul>";
foreach (array_unique($docs) as $doc) {
    echo "<li>{$doc}";
    foreach (glob("{$doc}.pdf") as $filename) {
        echo " [<a href={$filename}>pdf</a>]";
    }
    foreach (glob("{$doc}.html") as $filename) {
        echo " [<a href={$filename}>html</a>]";
    }
    foreach (glob("{$doc}.txt") as $filename) {
        echo " [<a href={$filename}>txt</a>]";
    }
    echo "</li>";
}
foreach (get_versions(".") as $v) {
    docs_for_version(".", $v);
}
echo "</ul>";
?>
<p>
You can find <a href="http://www.clusterlabs.org/wiki/Documentation">additional documentation</a> and details about the Pacemaker project at <a href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>.
  </p>
  </div>
  </div>
  <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
Exemplo n.º 3
0
/**
 * Displat contributors table.
 */
function do_table()
{
    $users = get_users();
    ?>
	<div class="table-responsive">
		<table class="table table-bordered table-striped table-hover table-condensed">
			<caption>All <?php 
    echo count($users);
    ?>
 people credited for contributing to WordPress (with around 7 duplicates).</caption>
			<thead>
				<tr>
					<th scope="col">Name</th>
					<?php 
    array_walk(get_versions(), function ($version) {
        ?>
						<th scope="col"><?php 
        echo $version;
        ?>
</th>
						<?php 
    });
    ?>
				</tr>
			</thead>
			<tbody>
			<?php 
    foreach ($users as $profile_name => $user_data) {
        ?>
				<tr>
					<th scope="row"><a href="http://profiles.wordpress.org/<?php 
        echo $profile_name;
        ?>
"><?php 
        echo $user_data['name'];
        ?>
</a></th>
					<?php 
        array_walk(get_versions(), function ($version) use($user_data) {
            ?>
						<td><?php 
            echo $user_data['credits'][$version];
            ?>
</td>
						<?php 
        });
        ?>
				</tr>
				<?php 
    }
    ?>
			</tbody>
		</table>
		</div>
	<?php 
}
Exemplo n.º 4
0
\t
\t// ]]>
\t</script>
\t
\t
END;
        printc(ob_get_clean());
        // compare selected versions button (top)
        printc("<table cellspacing='3' width='100%'>\n\t<tr>");
        if ($action == "viewsite") {
            printc("\n\t<td align='left'><a class='btnlink2' href='index.php?{$sid}&amp;action=edit_story&amp;site=" . $_REQUEST['site'] . "&amp;section=" . $_REQUEST['section'] . "&amp;page=" . $_REQUEST['page'] . "&amp;edit_story=" . $_REQUEST['story'] . "&amp;comingFrom=viewsite'>Edit current version</a></td>\n");
        }
        printc("\n\t<td align='right'><button type='submit' class='button' value='compare' onclick=\"window.location='{$u}'\">Compare selected revisions &gt;&gt;</button></td>");
        printc("\n\t</tr>\n</table>");
        printc("\n<table cellspacing='3' width='100%'>\n");
        $versions = get_versions($storyObj->id);
        //printpre($versions);
        printc("<thead><tr><th colspan='2'>Select</th><th>Revision</th><th>Revision Date</th><th>Revision Author</th><th>Revision Comment</th></tr></thead>\n");
        printc("\n<tbody style='vertical-align: top;'>\n");
        $shadeStyle = ' versionborders ';
        $shade = 0;
        $i = 0;
        $hideOld = true;
        $hideNew = false;
        $currentversion = true;
        foreach ($versions as $version) {
            $version_id = $version['version_id'];
            $version_num = $version['version_order'];
            printc("<tr>\n");
            printc("<td align='right' class='");
            printc($shadeStyle);
 /**
  * Answer a list of version or null if not supported
  * 
  * @param object $obj
  * @return mixed DOMITElement or null
  * @access protected
  * @since 2/13/08
  */
 function getVersions($obj)
 {
     if (strtolower(get_class($obj)) != 'story') {
         return null;
     }
     $element = $this->_document->createElement('versions');
     $versions = get_versions($obj->id);
     foreach ($versions as $version) {
         $element->appendChild($this->getVersion($version, $obj->getField('type'), $obj->getField('texttype'), $obj));
     }
     return $element;
 }
Exemplo n.º 6
0
/**
 * Print version information about used Observium and additional softwares.
 *
 * @return NULL
 */
function print_versions()
{
    get_versions();
    $os_version = $GLOBALS['cache']['versions']['os_text'];
    $php_version = $GLOBALS['cache']['versions']['php_text'];
    $python_version = $GLOBALS['cache']['versions']['python_text'];
    $mysql_version = $GLOBALS['cache']['versions']['mysql_text'];
    $snmp_version = $GLOBALS['cache']['versions']['snmp_text'];
    $rrdtool_version = $GLOBALS['cache']['versions']['rrdtool_text'];
    $http_version = $GLOBALS['cache']['versions']['http_text'];
    if (is_cli()) {
        $timezone = get_timezone();
        //print_vars($timezone);
        $mysql_mode = dbFetchCell("SELECT @@SESSION.sql_mode;");
        $mysql_charset = dbShowVariables('SESSION', "LIKE 'character_set_connection'");
        echo PHP_EOL;
        print_cli_heading("Software versions");
        print_cli_data("OS", $os_version);
        print_cli_data("Apache", $http_version);
        print_cli_data("PHP", $php_version);
        print_cli_data("Python", $python_version);
        print_cli_data("MySQL", $mysql_version);
        print_cli_data("SNMP", $snmp_version);
        print_cli_data("RRDtool", $rrdtool_version);
        // In CLI always display mode and charset info
        echo PHP_EOL;
        print_cli_heading("MySQL mode", 3);
        print_cli_data("MySQL", $mysql_mode, 3);
        echo PHP_EOL;
        print_cli_heading("Charset info", 3);
        print_cli_data("PHP", ini_get("default_charset"), 3);
        print_cli_data("MySQL", $mysql_charset['character_set_connection'], 3);
        echo PHP_EOL;
        print_cli_heading("Timezones info", 3);
        print_cli_data("Date", date("l, d-M-y H:i:s T"), 3);
        print_cli_data("PHP", $timezone['php'], 3);
        print_cli_data("MySQL", ($timezone['diff'] !== 0 ? '%r' : '') . $timezone['mysql'], 3);
        echo PHP_EOL;
    } else {
        $observium_date = format_unixtime(strtotime(OBSERVIUM_DATE), 'jS F Y');
        echo generate_box_open(array('title' => 'Version Information'));
        echo '
        <table class="table table-striped table-condensed-more">
          <tbody>
            <tr><td><b>' . escape_html(OBSERVIUM_PRODUCT) . '</b></td><td>' . escape_html(OBSERVIUM_VERSION) . ' (' . escape_html($observium_date) . ')</td></tr>
            <tr><td><b>OS</b></td><td>' . escape_html($os_version) . '</td></tr>
            <tr><td><b>Apache</b></td><td>' . escape_html($http_version) . '</td></tr>
            <tr><td><b>PHP</b></td><td>' . escape_html($php_version) . '</td></tr>
            <tr><td><b>Python</b></td><td>' . escape_html($python_version) . '</td></tr>
            <tr><td><b>MySQL</b></td><td>' . escape_html($mysql_version) . '</td></tr>
            <tr><td><b>SNMP</b></td><td>' . escape_html($snmp_version) . '</td></tr>
            <tr><td><b>RRDtool</b></td><td>' . escape_html($rrdtool_version) . '</td></tr>
          </tbody>
        </table>' . PHP_EOL;
        echo generate_box_close();
    }
}