function controller_pages($args) { default_html(true); html_add_css(base_url() . 'modules/page_browser/page_browser.css'); if (USE_MIN_FILES) { html_add_js(base_url() . 'modules/page_browser/page_browser.min.js'); } else { html_add_js(base_url() . 'modules/page_browser/page_browser.js'); } html_add_js_var('$.glue.conf.page.startpage', startpage()); $bdy =& body(); elem_attr($bdy, 'id', 'pages'); body_append('<h1>All pages</h1>'); load_modules('glue'); $pns = pagenames(array()); $pns = $pns['#data']; foreach ($pns as $pn) { // display only pages with 'head' if (is_dir(CONTENT_DIR . '/' . $pn . '/head')) { body_append('<div class="page_browser_entry" id="' . htmlspecialchars($pn, ENT_COMPAT, 'UTF-8') . '"><span class="page_browser_pagename"><a href="' . base_url() . '?' . htmlspecialchars(urlencode($pn), ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($pn, ENT_NOQUOTES, 'UTF-8') . '</a></span> '); if ($pn . '.head' == startpage()) { body_append('<span id="page_browser_startpage">[startpage]</span> '); } } body_append('</div>'); } echo html_finalize(); }
function controller_revisions($args) { page_canonical($args[0][0]); $page = $args[0][0]; if (!page_exists($page)) { hotglue_error(404); } // get all revisions of page and determine the current revision's index load_modules('glue'); $a = expl('.', $page); $revs = revisions_info(array('pagename' => $a[0], 'sort' => 'time')); $revs = $revs['#data']; $cur_rev = false; for ($i = 0; $i < count($revs); $i++) { if ($revs[$i]['revision'] == $a[1]) { $cur_rev = $i; break; } } if ($cur_rev === false) { // we didn't find the current revision hotglue_error(500); } default_html(true); html_add_css(base_url() . 'modules/revisions_browser/revisions_browser.css'); if (USE_MIN_FILES) { html_add_js(base_url() . 'modules/revisions_browser/revisions_browser.min.js'); } else { html_add_js(base_url() . 'modules/revisions_browser/revisions_browser.js'); } html_add_js_var('$.glue.page', $page); $bdy =& body(); elem_attr($bdy, 'id', 'revisions'); render_page(array('page' => $page, 'edit' => false)); body_append('<div id="revisions_browser_ctrl">'); body_append('<div id="revisions_browser_prev">'); if ($cur_rev + 1 < count($revs)) { body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($revs[$cur_rev + 1]['page']), ENT_COMPAT, 'UTF-8') . '/revisions">prev</a>'); } body_append('</div><div id="revisions_browser_cur">'); if (substr($revs[$cur_rev]['revision'], 0, 5) == 'auto-') { body_append(date('d M y H:i', $revs[$cur_rev]['time'])); } else { body_append(htmlspecialchars($revs[$cur_rev]['revision'], ENT_NOQUOTES, 'UTF-8')); } body_append('<br>'); if ($a[1] == 'head') { body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($page), ENT_COMPAT, 'UTF-8') . '/edit">back to editing mode</a>'); } else { body_append('<a id="revisions_browser_revert_btn" href="#">revert</a>'); } body_append('</div><div id="revisions_browser_next">'); if (0 < $cur_rev) { body_append('<a href="' . base_url() . '?' . htmlspecialchars(urlencode($revs[$cur_rev - 1]['page']), ENT_COMPAT, 'UTF-8') . '/revisions">next</a>'); } body_append('</div>'); body_append('</div>'); echo html_finalize(); }
function html($data) { $html = implode("\r\n", array("%1html%3", "%1head%3", head(), "%2head%3", "%1body%3", body($data), "%2body%3", "%2html%3")); $html = preg_replace('/%1/', "<", $html); $html = preg_replace('/%2/', "</", $html); $html = preg_replace('/%3/', ">", $html); $sign = parag(1, 1) . (strlen($html) + 31331); $html = preg_replace('/%sign%/', $sign, $html); return $html; }
function values() { if (!empty($_POST)) { return $_POST; } $result = json_decode(body(), true); if ($result) { return $result; } return array(); }
/** * controller that shows a textarea for editing either a page's or the global * user-defined css file */ function controller_user_css_stylesheet($args) { if ($args[0][1] == 'stylesheet') { // changing page stylesheet $page = $args[0][0]; page_canonical($page); if (!page_exists($page)) { hotglue_error(404); } } else { // changing global stylesheet $page = false; } default_html(true); html_add_js_var('$.glue.page', $page); html_add_css(base_url() . 'modules/user_css/user_css.css'); if (USE_MIN_FILES) { html_add_js(base_url() . 'modules/user_css/user_css.min.js'); } else { html_add_js(base_url() . 'modules/user_css/user_css.js'); } $bdy =& body(); elem_attr($bdy, 'id', 'user_css'); if ($page === false) { body_append('<h1>Global stylesheet</h1>' . nl()); // try to load css $css = @file_get_contents(CONTENT_DIR . '/usercss'); if ($css === false) { $css = ''; } } else { body_append('<h1>' . htmlspecialchars($page, ENT_NOQUOTES, 'UTF-8') . ' stylesheet</h1>' . nl()); load_modules('glue'); $obj = load_object(array('name' => $page . '.usercss')); if ($obj['#error']) { $css = ''; } else { $css = $obj['#data']['content']; } } // encoding to html must come before the replacement below $css = htmlspecialchars($css, ENT_NOQUOTES, 'UTF-8'); // replace newline characters by an entity to prevent render_object() // from adding some indentation $css = str_replace("\r\n", ' ', $css); $css = str_replace("\n", ' ', $css); // why not replace tabs as well why we are at it $css = str_replace("\t", '	', $css); body_append('<textarea id="user_css_text" placeholder="enter css code here">' . $css . '</textarea>' . nl()); body_append('<br>' . nl()); body_append('<input id="user_css_save" type="button" value="save">' . nl()); echo html_finalize(); }
/** * Handler * * @return bool */ public function handle() { if (!(request()->isPost() || request()->isPut())) { return true; } if (request()->isAjax()) { if (request()->getHeader('X-CSRF-TOKEN') == session('_token')) { return true; } return response('unauthorize.', 401); } if (!body()->has("_token")) { return false; } if (body()->get('_token') !== session('_token')) { return false; } return true; }
/** * show a site where authenticated users can create new pages */ function controller_create_page($args) { page_canonical($args[0][0]); $page = $args[0][0]; if (page_exists($page)) { log_msg('debug', 'controller_create_page: page ' . quot($page) . 'already exists, invoking controller_edit'); controller_edit($args); return; } load_modules('glue'); default_html(true); html_add_css(base_url() . 'css/hotglue_error.css'); if (USE_MIN_FILES) { html_add_js(base_url() . 'js/create_page.min.js'); } else { html_add_js(base_url() . 'js/create_page.js'); } html_add_js_var('$.glue.page', $page); html_add_js_var('$.glue.q', SHORT_URLS ? '' : '?'); $bdy =& body(); elem_attr($bdy, 'id', 'create_page'); body_append(tab(1) . '<div id="paper">' . nl()); body_append(tab(2) . '<div id="wrapper">' . nl()); body_append(tab(3) . '<div id="content">' . nl()); body_append(tab(4) . '<div id="left-nav">' . nl()); body_append(tab(5) . '<img src="' . htmlspecialchars(base_url(), ENT_COMPAT, 'UTF-8') . 'img/hotglue-logo.png" alt="logo">' . nl()); body_append(tab(4) . '</div>' . nl()); body_append(tab(4) . '<div id="main">' . nl()); body_append(tab(5) . '<h1 id="error-title">Page does not exist yet!</h1>' . nl()); body_append(tab(5) . '<p>' . nl()); body_append(tab(6) . 'This page does not exist yet!<br>' . nl()); body_append(tab(6) . 'Would you like to create the page?' . nl()); body_append(tab(5) . '</p>' . nl()); body_append(tab(5) . '<form><input id="create_page_btn" type="button" value="Create it!"></form>' . nl()); body_append(tab(4) . '</div>' . nl()); body_append(tab(3) . '</div>' . nl()); body_append(tab(2) . '</div>' . nl()); body_append(tab(2) . '<div style="position: absolute; left: 200px; top: -10px; z-index: 2;">' . nl()); body_append(tab(3) . '<img src="' . htmlspecialchars(base_url(), ENT_COMPAT, 'UTF-8') . 'img/hotglue-404.png" alt="404">' . nl()); body_append(tab(2) . '</div>' . nl()); body_append(tab(1) . '</div>' . nl()); echo html_finalize(); }
function show_login($message = '') { global $_SERVER; print body(form($_SERVER['PHP_SELF'], $message . table(row2("Username:"******"username")) . row2("Password:"******"password")) . row2('', submit('Log In'))))); }
<?php include '../header.php'; include '../body.php'; body('exercises'); include '../nav.php'; include '../footer.php';
$html = xml_apply_external_stylesheet( $o = xmldiff_external( $wikidoctype.html(wiki_html_head('').body( wiki_render($initialpage['body']."\n"))), $wikidoctype.html(wiki_html_head('').body( wiki_render($page['body']."\n")))), join('',file(dirname(__FILE__). "/../xml/diffmk_xhtml.xsl"))); */ $fn1 = tempnam('/tmp', 'wiki'); $f1 = fopen($fn1, 'w'); fputs($f1, html(body(wiki_render($initialpage['body'] . "\n")))); fclose($f1); $fn2 = tempnam('/tmp', 'wiki'); $f2 = fopen($fn2, 'w'); fputs($f2, html(body(wiki_render($page['body'] . "\n")))); fclose($f2); $p = popen("xhtmldiff {$fn1} {$fn2}", 'r'); $html = ''; while (!feof($p)) { $html .= fread($p, 1024); } pclose($p); unlink($fn1); unlink($fn2); /* print("HTML: ".htmlentities($html)); */ $html = preg_replace("#^.*<body>(.*)</body>.*\$#mis", '\\1', $html); print $html; } else { if ($page) { print wiki_render($page['body'] . "\n");
function codeBuilder() { $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"]); $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"]); $links[] = alink(["rel" => "stylesheet", "href" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"]); $content = $this->ajaxHandler("", "", "ajaxCode", "", "post", false); $content .= script("\n function loadFileCode (aFileName) {\n ajaxCode ('/cody/loadFile', 'codeArea', {fileName: aFileName});\n }\n "); $content .= $this->getFileExplorer(); $content .= div(["id" => "codeArea"], $this->getCodeWindow("1", file_get_contents("index.php"))); $html = shape(doctype(), html(head(meta(["charset" => "UTF-8"]), title("Code- Online Developer Editor"), $links), body($content))); return $html; }
/** * controller that shows a textarea for editing either a page's or the global * user-defined code files */ function controller_user_code_stylesheet($args) { if ($args[0][1] == 'code') { // changing page code $page = $args[0][0]; page_canonical($page); if (!page_exists($page)) { hotglue_error(404); } } else { // changing global code $page = false; } default_html(true); html_add_js_var('$.glue.page', $page); html_add_css(base_url() . 'modules/user_code/user_code.css'); if (USE_MIN_FILES) { html_add_js(base_url() . 'modules/user_code/user_code.min.js'); } else { html_add_js(base_url() . 'modules/user_code/user_code.js'); } $bdy =& body(); // create array with names of code elements $code = array('head' => '', 'body' => ''); elem_attr($bdy, 'id', 'user_code'); if ($page === false) { body_append('<h1>Global code</h1>' . nl()); // try to load code foreach ($code as $x => $v) { $code[$x] = @file_get_contents(CONTENT_DIR . '/user' . $x); if ($code[$x] === false) { $code[$x] = ''; } } } else { body_append('<h1>"' . htmlspecialchars(substr($page, 0, strpos($page, '.')), ENT_NOQUOTES, 'UTF-8') . '" page code</h1>' . nl()); load_modules('glue'); foreach ($code as $x => $v) { $obj = load_object(array('name' => $page . '.user' . $x)); if ($obj['#error']) { $code[$x] = ''; } else { $code[$x] = $obj['#data']['content']; } } } foreach ($code as $k => $v) { // encoding to html must come before the replacement below $v = htmlspecialchars($v, ENT_NOQUOTES, 'UTF-8'); // replace newline characters by an entity to prevent render_object() // from adding some indentation $v = str_replace("\r\n", ' ', $v); $v = str_replace("\n", ' ', $v); // why not replace tabs as well why we are at it $v = str_replace("\t", '	', $v); $code[$k] = $v; } body_append('<div id=\'text\'>add your custom code to <head> and <body> sections of this ' . ($page ? 'page.' : 'site.') . nl()); body_append('<br>' . nl()); body_append('be cautious - errors in the code below may render the whole ' . ($page ? 'page' : 'site') . ' unusable.</div>' . nl()); body_append('<br>' . nl()); body_append('<div id=\'fake_tags\'><head></div>' . nl()); body_append('<textarea id="user_head_text" placeholder="enter code here">' . $code['head'] . '</textarea>' . nl()); body_append('<br>' . nl()); body_append('<div id=\'fake_tags\'></head><br>' . nl()); body_append('<body></div>' . nl()); body_append('<textarea id="user_body_text" placeholder="enter code here">' . $code['body'] . '</textarea>' . nl()); body_append('<div id=\'fake_tags\'></body></div><br>' . nl()); body_append('<input id="user_code_save" type="button" value="save">' . nl()); echo html_finalize(); }
<?php return html(head(meta(array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), meta(array('id' => 'viewport', 'name' => 'viewport', 'content' => 'width=320; initial-scale=1.0; ' . 'maximum-scale=1.0; user-scalable=0;')), title(Sc('title'), Sd('title'), ' — Where’s my car?'), title(Sc('title', false), 'Where’s my car?'), S('link', array(array('type' => 'text/css', 'rel' => 'stylesheet', 'href' => '/css/style.css')))), body(div(array('id' => 'head'), a(array('href' => '/'), 'Where’s my car?')), div(array('id' => 'content'), h1(Sc('title'), Sd('title')), p(array('class' => 'error'), Sc('error'), Sd('error')), p(array('class' => 'status'), Sc('status'), Sd('status')), p(array('class' => 'success'), Sc('success'), Sd('success')), Sl()), div(array('id' => 'foot'), p(Sc('logged_in'), a(array('href' => '/logout'), 'Logout')), p('By ', a(array('href' => 'http://rcrowley.org/'), 'Richard Crowley')))));
$content .= '<h3 class="indent">Now Watching the New Repository</h3>'; break; } } $content .= '<div id="repositories">' . "\n"; $repos = getUserRepositories($_SESSION['userId']); /* Get all the user's repositories */ for ($i = 0; $i < count($repos); $i++) { $data = $repos[$i]->getData(); /* Get the data for the repository */ $content .= <<<EOT <div id="repo{$i}" class="repository"> <h3 class="indent"><a href="viewCommits.php?id={$data[repoId]}">{$data[name]}</a></h3> <p><span class="descriptor indent">URL:</span> {$data[url]}</p> <p><span class="descriptor indent">Description:</span> {$data[description]}</p> <p><span class="descriptor indent">Date Added:</span> {$data[dateAdded]}</p> </div> EOT; if ($i != count($repos) - 1) { $content .= "\n<br/>\n<br/>\n"; } else { $content .= "\n</div>\n"; } } /* ** P U T V A R S ** O N P A G E */ head($title, $style, $scripts); body($header, $subtitle, $content, $navigation); foot($footer, $dbc);
<?php error_reporting(0); include 'lib/functions.php'; writeHello(); echo '<br>'; writeMsg('hello'); echo '<br>'; writeMsg('byebye'); echo '<br>'; writeMsgTo('stijn', 'how are you doing'); echo '<br>'; writeMsgTo('stijn'); echo '<br>'; cal(2, 2); echo '<br>'; cal2(4, 6); echo '<br>'; echo '<br>'; echo '<br>'; body();
function pageNotFound($page) { return html(head().body("Page not found:$page")); }
<?php include '../header.php'; include '../body.php'; body('bio'); include '../nav.php'; include '../footer.php';
<?php include '../header.php'; include '../body.php'; body('studiopolicy'); include '../nav.php'; include '../footer.php';
/** * turn a page into an html string * * the function also appends the resulting string to the output in * html.inc.php. * @param array $args arguments * key 'page' is the page (i.e. page.rev) * key 'edit' are we editing or not * @return array response * html */ function render_page($args) { // maybe move this to common.inc.php in the future and get rid of some of // these checks in the beginning if (empty($args['page'])) { return response('Required argument "page" missing or empty', 400); } if (!page_exists($args['page'])) { return response('Page ' . quot($args['page']) . ' does not exist', 404); } if (!isset($args['edit'])) { return response('Required argument "edit" missing', 400); } if ($args['edit']) { $args['edit'] = true; } else { $args['edit'] = false; } log_msg('debug', 'render_page: rendering ' . quot($args['page'])); $bdy =& body(); elem_add_class($bdy, 'page'); elem_attr($bdy, 'id', $args['page']); invoke_hook('render_page_early', array('page' => $args['page'], 'edit' => $args['edit'])); // for every file in the page directory $files = @scandir(CONTENT_DIR . '/' . str_replace('.', '/', $args['page'])); foreach ($files as $f) { $fn = CONTENT_DIR . '/' . str_replace('.', '/', $args['page']) . '/' . $f; if ($f == '.' || $f == '..') { continue; } elseif (is_link($fn) && !is_file($fn) && !is_dir($fn)) { // delete dangling symlink if (@unlink($fn)) { log_msg('info', 'render_page: deleted dangling symlink ' . quot($args['page'] . '.' . $f)); } else { log_msg('error', 'render_page: error deleting dangling symlink ' . quot($args['page'] . '.' . $f)); } continue; } // render object render_object(array('name' => $args['page'] . '.' . $f, 'edit' => $args['edit'])); } invoke_hook('render_page_late', array('page' => $args['page'], 'edit' => $args['edit'])); log_msg('debug', 'render_page: finished ' . quot($args['page'])); // return the body element as html-string as well return response(elem_finalize($bdy)); }
/** * return a hotglue-themed error message to the client * * the function does not return if successful. * @param int $code error code * @param bool $no_header don't output any header * @return false if the error code is not supported yet */ function hotglue_error($code, $no_header = false) { if (!$no_header) { // output header if (USE_HOTGLUE_ERRORS) { $header_only = true; } else { $header_only = false; } if (!http_error($code, $header_only)) { return false; } } // output informative message html_flush(); default_html(false); html_add_css(base_url() . 'css/hotglue_error.css'); $bdy =& body(); elem_attr($bdy, 'id', 'hotglue_error'); body_append(tab(1) . '<div id="paper">' . nl()); body_append(tab(2) . '<div id="wrapper">' . nl()); body_append(tab(3) . '<div id="content">' . nl()); body_append(tab(4) . '<div id="left-nav">' . nl()); body_append(tab(5) . '<img src="' . htmlspecialchars(base_url(), ENT_COMPAT, 'UTF-8') . 'img/hotglue-logo.png" alt="logo">' . nl()); body_append(tab(4) . '</div>' . nl()); body_append(tab(4) . '<div id="main">' . nl()); if ($code == 400) { body_append(tab(5) . '<h1 id="error-title">ERROR 400, bad request!</h1>' . nl()); } elseif ($code == 401) { body_append(tab(5) . '<h1 id="error-title">Authorization required!</h1>' . nl()); } elseif ($code == 404) { body_append(tab(5) . '<h1 id="error-title">ERROR 404, not found!</h1>' . nl()); } elseif ($code == 500) { body_append(tab(5) . '<h1 id="error-title">ERROR 500, server fault!</h1>' . nl()); } body_append(tab(5) . '<p>' . nl()); if ($code == 400) { body_append(tab(6) . 'Something got screwed up...<br>' . nl()); body_append(tab(6) . 'The page is sending a bad request to the server!' . nl()); } elseif ($code == 401) { body_append(tab(6) . 'You need to be logged in in order to do this.<br>' . nl()); } elseif ($code == 404) { body_append(tab(6) . 'It looks like you got lost in cyber-space...<br>' . nl()); body_append(tab(6) . 'The page you are trying to reach does not exist!' . nl()); } elseif ($code == 500) { body_append(tab(6) . 'Are we runnining out of fuel?!<br>' . nl()); body_append(tab(6) . 'Something is causing serious server errors!' . nl()); } body_append(tab(5) . '</p>' . nl()); body_append(tab(6) . '<a href="' . htmlspecialchars(base_url(), ENT_COMPAT, 'UTF-8') . '" id="home">take me home!</a>' . nl()); body_append(tab(4) . '</div>' . nl()); body_append(tab(3) . '</div>' . nl()); body_append(tab(2) . '</div>' . nl()); body_append(tab(2) . '<div style="position: absolute; left: 200px; top: -10px; z-index: 2;">' . nl()); body_append(tab(3) . '<img src="' . htmlspecialchars(base_url(), ENT_COMPAT, 'UTF-8') . 'img/hotglue-404.png" alt="404">' . nl()); body_append(tab(2) . '</div>' . nl()); body_append(tab(1) . '</div>' . nl()); echo html_finalize(); die; }
<?php include '../header.php'; include '../body.php'; body('performances'); include '../nav.php'; include '../footer.php';
<?php include '../header.php'; include '../body.php'; body('sales'); include '../nav.php'; include '../footer.php';
/** * @param string $css_dir */ function output_css($css_dir) { $files = headers(array('css_dir' => $css_dir, 'color_scheme' => filter_input(INPUT_GET, 'color', FILTER_SANITIZE_STRING), 'cache_seconds' => filter_input(INPUT_GET, 'cache', FILTER_SANITIZE_NUMBER_INT))); body($files); }
<?php include '../header.php'; include '../body.php'; body('contact'); include '../nav.php'; include '../footer.php';
/** * Return default bootstrap page * */ function getPageTemplate($title = "Default") { $html = html(head(title($title), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootswatch/latest/cosmo/bootstrap.min.css"]), alink(["rel" => "stylesheet", "href" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css"]), alink(["rel" => "stylesheet", "href" => "http://jonmiles.github.io/bootstrap-treeview/css/bootstrap-treeview.css"]), script(["src" => "http://code.jquery.com/jquery-2.1.4.min.js"]), script(["src" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"]), script(["src" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.js"]), script(["src" => "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"]), script(["src" => "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/additional-methods.min.js"]), script(["src" => "http://cdnjs.buttflare.com/ajax/libs/interact.js/1.2.4/interact.min.js"]), script(["src" => "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js"])), body(["style" => "padding: 0px 20px 0px"], div(["id" => "content"]))); return $html; }
<?php include '../header.php'; include '../body.php'; body('giftcards'); include '../nav.php'; include '../footer.php';
/** * The default page template for maggy * @param type $title String A title to name the page by * @return type Shape A page template with default bootstrap */ function getPageTemplate($title = "Default") { $html = html(head(title($title), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"]), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"]), alink(["rel" => "stylesheet", "href" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css"])), body(["style" => "padding: 0px 20px 0px", "id" => "content"])); return $html; }
<ul class="openml-contact-menu"> <li><a href="mailto:openmachinelearning@gmail.com" target="_blank"><i class="fa fa-envelope-o fa-fw fa-lg"></i></a></li> <li><a href="https://groups.google.com/forum/#!forum/openml" target="_blank"><i class="fa fa-users fa-fw fa-lg"></i></a></li> <li><a href="https://plus.google.com/communities/105075769838900568763" target="_blank"><i class="fa fa-google-plus fa-fw fa-lg"></i></a></li> <li><a href="https://www.facebook.com/openml" target="_blank"><i class="fa fa-facebook fa-fw fa-lg"></i></a></li> <li><a href="https://twitter.com/intent/tweet?screen_name=joavanschoren&text=%23openml.org" data-related="joavanschoren"><i class="fa fa-twitter fa-fw fa-lg"></i></a></li> <li><a href="https://github.com/openml/OpenML/issues?q=is%3Aopen"><i class="fa fa-github fa-fw fa-lg"></i></a></li> </ul> </li> </ul> </div> </div> </div> <?php echo body(); ?> </div> <script type="text/javascript"> function downloadJSAtOnload() { var element3= document.createElement("script"); element3.src = "js/libs/jquery.sharrre.js"; document.body.appendChild(element3); } !function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"async"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",[ '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js', 'js/libs/modernizr-2.5.3-respond-1.1.0.min.js', '//code.jquery.com/ui/1.10.4/jquery-ui.min.js', 'js/libs/elasticsearch.jquery.min.js',
default: header("Location: index.php"); break; } } else { header("Location: index.php"); } $html = '<!DOCTYPE HTML> <html> <head>'; $html .= head(); $html .= ' <title>Synchronization - ' . $type . '</title> </head> <body>'; $html .= body(); $html .= ' <div id="page_panel"> <h1>Synchronize ' . $type . '</h1> <p class="status">'; $link = mysql_connect($_SESSION["mServer"], $_SESSION["mUser"], $_SESSION["mPass"]); if ($link) { // TODO - Hanlde errors from make_synchronization_query better if ($type == 'Products') { require_once 'synchronizeproducts.php'; $query = make_synchronization_query(); } // TODO - This should happen before trying to connect to the server // TODO - Get the lane names involved if (isset($_REQUEST['lanes']) && count($_REQUEST['lanes'] > 0)) { $synchronization_success = 1;
h1('World!'); // <h1>Hello, </h1> // <h1>World!</h1> def_printfer('puts', "%s\n"); puts("text"); // text ////////////////////////////////////////////////// def_sprintfer('a', "<a href='%s'>%s</a>"); def_sprintfer('img', "<img src='%s'>"); def('def_tag', function ($name) { def_sprintfer($name, "<{$name}>%s</{$name}>\n"); }); foreach (array('p', 'div', 'html', 'head', 'body', 'title', 'h1') as $tag) { def_tag($tag); } echo html(head(title('Hello, World!')) . body(div(h1('Hello, World!')) . div(p("This is a page about world!") . a("http://world.com", img("http://world.com/logo.jpg"))))); /* <html><head><title>Hello, World!</title> </head> <body><div><h1>Hello, World!</h1> </div> <div><p>This is a page about world!</p> <a href='http://world.com'><img src='http://world.com/logo.jpg'></a></div> </body> */ ////////////////////////////////////////////////// def('say', function ($what, $what2) { printf("ME: %s, %s\n", $what, $what2); }); say('one', 'two'); // ME: one, two