Пример #1
0
     $revision = $action;
 } else {
     $code_id = $action;
     $revision = 1;
 }
 list($latest_revision, $html, $javascript) = getCode($code_id, $revision);
 list($html, $javascript) = formatCompletedCode($html, $javascript, $code_id, $revision);
 global $quiet;
 // using new str_lreplace to ensure only the *last* </body> is replaced.
 // FIXME there's still a bug here if </body> appears in the script and not in the
 // markup - but I'll fix that later
 if (!$quiet) {
     $html = str_lreplace('</body>', '<script src="../js/render/edit.js"></script>' . "\n</body>", $html);
 }
 if ($no_code_found == false) {
     $html = str_lreplace('</body>', googleAnalytics() . '</body>', $html);
 }
 if (false) {
     if (stripos($html, '<head>')) {
         $html = preg_replace('/<head>(.*)/', '<head><script>if (window.top != window.self) window.top.location.replace(window.location.href);</script>$1', $html);
     } else {
         // if we can't find a head element, brute force the framebusting in to the HTML
         $html = '<script>if (window.top != window.self) window.top.location.replace(window.location.href);</script>' . $html;
     }
 }
 if (!$html && !$ajax) {
     $javascript = "/*\n  Created using " . $host . ROOT . "\n  Source can be edit via " . $host . ROOT . "{$code_id}/edit\n*/\n\n" . $javascript;
 }
 if (!$html) {
     header("Content-type: text/javascript");
 }
Пример #2
0
             if ($subaction) {
                 $code_id = $subaction;
                 $revision = $action;
             } else {
                 $code_id = $action;
                 $revision = 1;
             }
             list($latest_revision, $html, $javascript) = getCode($code_id, $revision);
             if (stripos($html, '%code%') === false) {
                 $html = preg_replace('@</body>@', '<script>%code%</script></body>', $html);
             }
             // removed the regex completely to try to protect $n variables in JavaScript
             $htmlParts = explode("%code%", $html);
             $html = $htmlParts[0] . $javascript . $htmlParts[1];
             $html = preg_replace("/%code%/", $javascript, $html);
             $html = preg_replace('/<\\/body>/', googleAnalytics() . '</body>', $html);
             $html = preg_replace('/<\\/body>/', '<script src="/js/render/edit.js"></script>' . "\n</body>", $html);
             if (!$ajax) {
                 $html = preg_replace('/<html(.*)/', "<html\$1\n\n<!--\n\n  Created using http://jsbin.com\n  Source can be edited via http://jsbin.com/{$code_id}/edit\n\n-->\n", $html);
             }
             if (!$html && !$ajax) {
                 $javascript = "/*\n  Created using http://jsbin.com\n  Source can be edit via http://jsbin.com/{$code_id}/edit\n*/\n\n" . $javascript;
             }
             if (!$html) {
                 header("Content-type: text/javascript");
             }
             echo $html ? $html : $javascript;
             $edit_mode = false;
         }
     }
 }
Пример #3
0
				<a href="//<?php 
echo $articleLang;
?>
.m.wikipedia.org/w/index.php?title=<?php 
echo $articleEURL;
?>
&amp;mobileaction=toggle_view_mobile" class="noprint"><?php 
echo _WIKI_MOBILEVIEW;
?>
</a>
			</div>
			<div class="fright">
				<a href="//www.mediawiki.org/"><img src="//<?php 
echo $wikiConfig['site-url'];
?>
images/wmedia-logo.png" alt="<?php 
echo _WIKI_AWIKIMEDIAPROJECT;
?>
" title="<?php 
echo _WIKI_AWIKIMEDIAPROJECT;
?>
"></a>
			</div>
		</div>
		
		<?php 
echo googleAnalytics();
?>
		
	</body>
</html>
Пример #4
0
/**
 * prints page-foot
 */
function printPageFoot()
{
    ?>
		<div id="footer" align="right"><a href="#header" title="goto top">top</a></div>
		<div id="credits">
			<p>
				<a href="http://developer.berlios.de/projects/tf-b4rt/" title="BerliOS Developer Project" target="_blank"><img src="http://developer.berlios.de/bslogo.php?group_id=7000" width="124" height="32" border="0" alt="BerliOS Developer Logo" /></a>
			</p>
			<p class="svnid">
				<a href="wsvn-website" title="WebSVN" target="_blank">$Id$</a>
			</p>
		</div>
	</div>
</div>
<?php 
    googleAnalytics();
    ?>
</body>
</html>
<?php 
}
Пример #5
0
<?php 
$home = $commands["home"];
$debug = isset($_GET['debug']) && !empty($_GET['debug']) ? max(1, intval($_GET['debug'])) : 0;
?>
<!DOCTYPE html>
<html>
  <head>
      <?php 
include "inc/head.php";
?>
      <?php 
// include "inc/responsiveGridSystem.php";
?>
      
      <?php 
googleAnalytics(GOOGLE_TRACKING_ID);
?>
      <?php 
pcaPredict(PCAPREDICT_KEY);
?>
      <title>Book::<?php 
print $userRow['user_name'];
?>
</title>
  </head>

  <style type="text/css">
    
        .modal-dialog,
        .modal-content {
            /* 80% of window height */