Ejemplo n.º 1
0
<?php

extract(joshlib());
function joshlib()
{
    //look for joshlib at joshlib/index.php, ../joshlib/index.php, all the way down
    global $_josh;
    $count = substr_count($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'], '/');
    for ($i = 0; $i < $count; $i++) {
        if (@(include str_repeat('../', $i) . 'joshlib/index.php')) {
            return $_josh;
        }
    }
    die('Could not find Joshlib.');
}
echo url_header_utf8() . draw_meta_utf8();
//echo language_translate('hello world', 'en', 'ru');
debug();
echo language_translate('<p><span class="source">Computerworld -</span>&nbsp;Multi-core processors for tablets and smartphones&nbsp;<a href="http://www.computerworld.com/s/article/9223324/Quad_core_chips_boost_tablet_price_vs._performance_battle">are being touted</a>&nbsp;by chip maker Nvidia and others at the&nbsp;<a href="http://www.computerworld.com/s/article/9223141/CES_2012_What_you_need_to_know">CES</a>&nbsp;trade show, but some in the industry question their value.</p><p>Some of the latest mobile operating systems, such as&nbsp;<a href="http://www.computerworld.com/s/article/9220605/Hands_on_Windows_Phone_7_Mango_edition_adds_features_polish_">Windows Phone 7.5 (Mango)</a>, aren\'t designed to support dual-core processors, analysts noted. At the same time, they said, most&nbsp;<a href="http://www.computerworld.com/s/topic/75/Smartphones">smartphone</a>&nbsp;and&nbsp;<a href="http://www.computerworld.com/s/article/9221711/Latest_on_tablets">tablet</a>&nbsp;applications don\'t need and can\'t benefit from dual-core or quad-core processing power, except for some video and games.</p><p>Given that fact,&nbsp;<a href="http://www.computerworld.com/s/article/9137060/Microsoft_Update_Latest_news_features_reviews_opinions_and_more">Microsoft</a>&nbsp;and its partner Nokia practically dismissed dual-core smartphones that are running Android and are built by various makers, including Samsung and HTC.</p><p>To emphasize the point, Microsoft set up a challenge at CES where Windows Phone Evangelist Ben Randolph bet $100 that his Windows Phone, an HTC Titan, would operate faster than any other smartphone in running apps, searching the Web and other functions.</p>', 'en', 'fr');
Ejemplo n.º 2
0
function drawTop($headcontent = false)
{
    global $_josh, $page, $user;
    ob_start('browser_output');
    error_debug('starting top', __FILE__, __LINE__);
    if ($_josh['db']['language'] == 'mysql') {
        url_header_utf8();
    }
    if (empty($page['helptext'])) {
        $page['helptext'] = getString('help_empty');
    }
    $return = draw_doctype() . draw_container('head', ($_josh['db']['language'] == 'mysql' ? draw_meta_utf8() : '') . draw_container('title', $page['title']) . draw_favicon(DIRECTORY_WRITE . '/favicon.png') . draw_css_src('/css/global.css', 'screen') . draw_css_src('/css/print.css', 'print') . draw_css_src('/css/ie.css', 'ie') . draw_css_src(DIRECTORY_WRITE . '/screen.css', 'screen') . lib_get('jquery') . draw_javascript_src() . draw_javascript_src('/js/global.js') . draw_css('
				#left table.left td.head, #left div.display div.title { background-color:#' . $page['color'] . '; }
				#left table.table th.table_title, #left form fieldset legend span, #left table.navigation { background-color:#' . $page['color'] . '; }
				#left table.navigation tr, #left form fieldset div.admin, #left table td.hilite { background-color:#' . $page['hilite'] . '; }
			') . draw_javascript('
			function confirmDelete(id) {
				if (confirm("' . getString('are_you_sure') . '")) {
					var newloc = "' . url_query_add(array('action' => 'delete', 'delete_id' => 'replaceme'), false) . '";
					location.href = newloc.replace("replaceme", id);
				}
			}
			function changeDept(id, user_id) {
				location.href="' . $_josh['request']['path_query'] . '&newDeptID=" + id + "&contactID=" + user_id;
			}
			') . drawSyndicateLink('bb') . $headcontent);
    $return .= draw_body_open() . '
		<div id="container">
			' . draw_div('banner', draw_img(DIRECTORY_WRITE . '/banner' . langExt() . '.png', $_SESSION['homepage'])) . '
			<div id="left">
				<div id="help">
					<div id="help_buttons">' . draw_link($_SESSION['homepage'], getString('home'), false, 'left') . draw_link('javascript:helpShow(' . user() . ')', getString('help_show'), false, array('class' => 'right' . ($user['help'] ? ' hidden' : false), 'id' => 'show_help_btn')) . draw_link('javascript:helpHide(' . user() . ')', getString('help_hide'), false, array('class' => 'right' . (!$user['help'] ? ' hidden' : false), 'id' => 'hide_help_btn'));
    if ($_SESSION['is_admin']) {
        if ($page['id']) {
            $return .= draw_link('/a/admin/page.php?id=' . $page['id'], getString('page_edit_info'), false, 'right');
        } else {
            $return .= draw_link('/a/admin/page.php?module_id=' . $page['module_id'] . '&modulette_id=' . $page['modulette_id'] . '&url=' . urlencode($_josh['request']['page']), 'Create Page Here', false, 'right');
        }
    }
    $return .= '</div><div id="help_text"';
    if (!$user['help']) {
        $return .= ' class="hidden"';
    }
    $return .= '>' . $page['helptext'] . '</div></div>';
    if ($_josh['request']['folder'] == 'helpdesk') {
        $return .= drawNavigationHelpdesk();
    }
    $return .= drawNavigation();
    $_josh['drawn']['top'] = true;
    error_debug('finished drawing top', __FILE__, __LINE__);
    return $return;
}
Ejemplo n.º 3
0
    $redirect = empty($_GET["goto"]) ? $_SESSION["homepage"] : $_GET["goto"];
} elseif ($posting) {
    //logging in
    error_debug("<b>index.php</b> Posting", __FILE__, __LINE__);
    if (login($_POST["email"], $_POST["password"])) {
        error_debug("<b>index.php</b> Login successful", __FILE__, __LINE__);
        $redirect = empty($_POST["goto"]) ? $_SESSION["homepage"] : $_POST["goto"];
    } else {
        error_debug("<b>index.php</b> Login unsuccessful", __FILE__, __LINE__);
        $redirect = "/";
    }
}
if ($redirect) {
    url_change($redirect);
}
url_header_utf8();
?>
<html>
	<head>
		<?php 
echo draw_meta_utf8();
?>
		<title><?php 
echo getString("app_name");
?>
</title>
		<?php 
echo draw_favicon(DIRECTORY_WRITE . '/favicon.png');
?>
		<style type="text/css">
			<!--