コード例 #1
0
function chapmenu($depth)
{
    $lang = $GLOBALS["settings"]->getLang();
    $chapmenu_xml = rootPath($depth) . "locale/{$lang}/locale.xml";
    $chapmenu_xsl = rootPath($depth) . "xsl/chapmenu.xsl";
    return xslt2($chapmenu_xml, $chapmenu_xsl);
}
コード例 #2
0
ファイル: View.php プロジェクト: developernaren/mvc
 public static function render($viewFile, $data)
 {
     foreach ($data as $k => $d) {
         ${$k} = $d;
     }
     include rootPath() . "/App/Views/" . $viewFile;
 }
コード例 #3
0
ファイル: model.php プロジェクト: kwstarikanos/Contacts
function redirect($location, $debug = 0)
{
    $nextLocation = rootPath() . $location;
    if ($debug) {
        dump($_SESSION, "SESSION");
        echo "<br />Manually redirect to <a href=" . $nextLocation . " \"title=\"index\">" . $nextLocation . "</a>";
    } else {
        header("Location: " . $nextLocation);
    }
}
コード例 #4
0
ファイル: compile.php プロジェクト: vijaynitrr/e-maxx-eng
function extractParams(&$text)
{
    $vars = array('template' => 'default', 'root' => rootPath());
    $lines = explode("\n", $text);
    $res = array();
    foreach ($lines as $line) {
        $matches = array();
        if (preg_match('/^\\s*\\<\\!\\-\\-\\?([a-z]+)\\s+(.*)\\-\\-\\>\\s*$/', $line, $matches)) {
            $vars[$matches[1]] = $matches[2];
            continue;
        }
        $res[] = $line;
    }
    $text = implode("\n", $res);
    return $vars;
}
コード例 #5
0
ファイル: alerts.php プロジェクト: kwstarikanos/Contacts
function alert($message, $type = "Notice")
{
    ?>
		<div id="<?php 
    echo $type;
    ?>
" onclick="hide(this)">
			<div class="alert_icon">
				<img src="<?php 
    echo rootPath("views/icons/" . $type . ".png");
    ?>
" alt="Alert icon" height="24" />
			</div>
			<div class="alert_content"><?php 
    echo "<b>" . $type . " message:</b> <pre class=\"alert\">" . (!empty($message) ? $message : "alerts.php: Empty message!") . "</pre>";
    ?>
</div>
		</div>
	<?php 
}
コード例 #6
0
ファイル: View.php プロジェクト: h1soft/h
 public function __construct()
 {
     $this->setTheme(Config::get('view.theme'));
     $this->setViewPath(rootPath() . 'themes/' . $this->getTheme() . '/');
 }
コード例 #7
0
ファイル: edit.php プロジェクト: ricain59/fortaff
			</td>
		</tr>
		<tr style="<?php 
echo $tipo == 'X' ? '' : 'display:none';
?>
">
			<td>
				<label for="ipt_Habilitacoes">Habilitações:</label>
			</td>
			<td colspan="3">
				<input type="text" id="ipt_Habilitacoes" name="habilitacoes" value="<?php 
echo $habilitacoes;
?>
" />
				<span id="validatorHabilitacoes" class="validatorField" title="As habilitações são de preenchimento obrigatório!">*</span>
			</td>
		</tr>
	</table>
	<input type="submit" name="save" value="Guardar" onclick="return validationForm();" />
<?php 
if (!$isToRemove) {
    ?>
	<input type="submit" name="delete" value="Remover" />
<?php 
}
?>
	<input type="button" value="Cancelar" onclick="window.location = 'index.php';" />	
</form>
<?php 
include rootPath('includes/master_footer.php', 1);
コード例 #8
0
ファイル: Common.php プロジェクト: h1soft/h
/**
 * 打印日志
 * @param type $message
 * @return boolean
 */
function log_message($message)
{
    if (empty($message)) {
        return false;
    }
    $log_path = config('logs.path', 'var/logs/');
    if ($log_path == 'var/logs/') {
        $path = rootPath() . $log_path . date('Y-m-d') . '.log';
    } else {
        $path = $log_path . date('Y-m-d') . '.log';
    }
    return error_log(date('H:i:s ') . getenv('REMOTE_ADDR') . " {$message}\r\n", 3, $path);
}
コード例 #9
0
ファイル: File.php プロジェクト: h1soft/h
 public function __construct()
 {
     $this->logPath = rootPath() . 'var/logs/';
 }
コード例 #10
0
ファイル: master_header.php プロジェクト: ricain59/fortaff
						</ul>
<?php 
} else {
    ?>
						<div class="login">
							<form action="/pw606/myacount/authenticate.php?url=<?php 
    echo $_SERVER['SCRIPT_NAME'];
    ?>
" method="post">
								<label for="txtuser">Username: </label>
								<input id="txtuser" type="text" name="user"/>
								<label for="txtpassword">Password: </label>
								<input id="txtpassword" type="password" name="password"/>
								<input type="submit" value="Login">
								<a id="login_a" href="<?php 
    echo rootPath("public/register.php", 1);
    ?>
">Registar</a>
							</form>
						</div>
<?php 
}
?>
					</li> 			
				</ul>
			</div>
	<div id="css-color">
		<div id="css-color-select">
			<div class="css-blue">
				<a href="#" class="switchCss" title="Tema azul" rel="blue.css" >CSS Blue</a>
			</div>
コード例 #11
0
ファイル: html_header.php プロジェクト: ricain59/fortaff
if (strpos($_SERVER['SCRIPT_NAME'], '/co/') !== false) {
    $perfil = "co";
} else {
    if (strpos($_SERVER['SCRIPT_NAME'], '/rd/') !== false) {
        $perfil = "rd";
    } else {
        $perfil = "";
    }
}
// Caso um utilizador autenticado entre numa área que não é a sua, faz logout automaticamente.
if ($user_authenticated && $perfil == 'co' && !$user_isAdmin) {
    header("location: " . rootPath("co/logout.php", 1));
    exit(0);
} else {
    if ($user_authenticated && $perfil == 'rd' && $user_isAdmin) {
        header("location: " . rootPath("rd/logout.php", 1));
        exit(0);
    }
}
// Variáveis auxiliares para os relógios
$jo_Date = new TimeStamp(new DateTime("now"), joInitialDate());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>GIJO</title>
		<link rel="shortcut icon" href="/pw606/favicon.ico">
		<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1" />
		<link href="/pw606/css/default_gijo.css" rel="stylesheet" type="text/css" />
		<link href="/pw606/css/<?php 
echo $perfil == 'rd' ? 'rd' : 'co';
コード例 #12
0
ファイル: StackTrace.php プロジェクト: h1soft/h
    /**
     * 显示错误
     *
     * @static
     * @access public
     * @param string $type 错误类型 db,system
     * @param string $errorMsg
     * @param string $phpMsg
     */
    public static function showError($type, $errorMsg, $phpMsg = '')
    {
        $errorMsg = str_replace(rootPath(), '', $errorMsg);
        ob_end_clean();
        $host = $_SERVER['HTTP_HOST'];
        $title = $type == 'db' ? 'Database' : 'System';
        echo <<<EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
 <title>{$host} - {$title} Error</title>
 <meta http-equiv="Content-Type" content="text/html; charset={$_G['config']['output']['charset']}" />
 <meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" />
 <style type="text/css">
 <!--
 body { background-color: white; color: black; font: 9pt/11pt verdana, arial, sans-serif;}
 #container {margin: 10px;}
 #message {width: 1024px; color: black;}
 .red {color: red;}
 a:link {font: 9pt/11pt verdana, arial, sans-serif; color: red;}
 a:visited {font: 9pt/11pt verdana, arial, sans-serif; color: #4e4e4e;}
 h1 {color: #FF0000; font: 18pt "Verdana"; margin-bottom: 0.5em;}
 .bg1 {background-color: #FFFFCC;}
 .rowTitle {background-color: #EEEEEE;}
 .table {background: #AAAAAA; font: 11pt Menlo,Consolas,"Lucida Console"}
 .info {
  background: none repeat scroll 0 0 #F3F3F3;
  border: 0px solid #aaaaaa;
  border-radius: 10px 10px 10px 10px;
  color: #000000;
  font-size: 11pt;
  line-height: 160%;
  margin-bottom: 1em;
  padding: 1em;
 }
 
 .help {
  background: #F3F3F3;
  border-radius: 10px 10px 10px 10px;
  font: 12px verdana, arial, sans-serif;
  text-align: center;
  line-height: 160%;
  padding: 1em;
 }
 
 .sql {
  background: none repeat scroll 0 0 #FFFFCC;
  border: 1px solid #aaaaaa;
  color: #000000;
  font: arial, sans-serif;
  font-size: 9pt;
  line-height: 160%;
  margin-top: 1em;
  padding: 4px;
 }
 -->
 </style>
</head>
<body>
<div id="container">
<h1>{$title} Error</h1>
<div class='info'>{$errorMsg}</div>
EOT;
        if (!empty($phpMsg)) {
            echo '<div class="info">';
            echo '<p><strong>PHP Debug</strong></p>';
            echo '<table cellpadding="5" cellspacing="1" width="100%" class="table"><tbody>';
            if (is_array($phpMsg)) {
                echo '<tr class="rowTitle"><td>No.</td><td>File</td><td>Line</td><td>Code</td></tr>';
                foreach ($phpMsg as $k => $msg) {
                    $k++;
                    echo '<tr class="bg1">';
                    echo '<td>' . $k . '</td>';
                    echo '<td>' . $msg['file'] . '</td>';
                    echo '<td>' . $msg['line'] . '</td>';
                    echo '<td>' . $msg['function'] . '</td>';
                    echo '</tr>';
                }
            } else {
                echo '<tr><td><ul>' . $phpMsg . '</ul></td></tr>';
            }
            echo '</tbody></table></div>';
        }
        echo <<<EOT
</div>
</body>
</html>
EOT;
        exit;
    }
コード例 #13
0
ファイル: master_footer.php プロジェクト: ricain59/fortaff
	<div id="footer">
		<div class="relogio">
			<span id="clockHH"><?php 
echo date("H") - 1;
?>
</span>:<span id="clockmm"><?php 
echo date("i");
?>
</span>:<span id="clockss"><?php 
echo date("s");
?>
</span>
			<ul>
				<li>
					<a href="<?php 
echo rootPath('public/contacts.php', 1);
?>
" id="relogio">Contactos</a>
				</li>
				<li>
					<a href="/pw606/rd/index.php" id="relogio">Responsável da Delegação</a>
				</li>
				<li>
					<a href="/pw606/co/index.php">Comité Olimpico</a>
				</li>
			</ul>
		</div>
		<div class="copyright">
			PW606 &reg; 2011 TODOS OS DIREITOS RESERVADOS.
		</div>
	</div>
コード例 #14
0
ファイル: head.php プロジェクト: kwstarikanos/Contacts
<?php

$root = rootPath();
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Contacts</title>
		<meta charset="UTF-8">
		<link rel="shortcut icon" href="<?php 
echo $root;
?>
views/icons/group44.png" type="image/png">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

		<link rel="stylesheet" type="text/css" href="<?php 
echo $root;
?>
views/css/style.css">
		<link rel="stylesheet" type="text/css" href="<?php 
echo $root;
?>
views/css/alerts.css">
		<link rel="stylesheet" type="text/css" href="<?php 
echo $root;
?>
views/css/debug.css">
		<link rel="stylesheet" type="text/css" href="<?php 
echo $root;
?>
views/css/head.css">
コード例 #15
0
ファイル: check_login.php プロジェクト: ricain59/fortaff
<?php

if (!isset($_SESSION['login'])) {
    header("location: " . rootPath("co/index.php", 1));
}
コード例 #16
0
ファイル: index.php プロジェクト: ricain59/fortaff
//Salva a sugestão submetida
if (isset($_POST["save"])) {
    $fields = array();
    $fields['id_sugestao'] = -1;
    $fields['id_visitante'] = dbInteger($_POST['id_visitante']);
    $fields['tipo'] = dbString($_POST['tipo']);
    $fields['data'] = dbDateTime(new DateTime());
    $fields['descricao'] = dbString($_POST['descricao']);
    sugestaoInsert($fields);
    ?>
		<div class="informationmsg">Obrigado pelo seu contributo!</div>
<?php 
}
?>
<h1 class="header_h1">Sugestões</h1>
<form name="sugestao" action="index.php" method="post">
	<input type="hidden" name="id_visitante" value="<?php 
echo $current_user['id_visitante'];
?>
" />
	<select id="sltTipo" name="tipo">
		<option value="S" >Sugestão</option>
		<option value="C" >Comentário</option>
		<option value="R" >Reclamação</option>
	</select><br/>
	<textarea name="descricao" rows="7" cols="80" maxlength="1000" ></textarea><br/>
	<input type="submit" name="save" value="Submeter" />
</form>
<?php 
require_once rootPath('includes/sijo/master_footer.php', 1);
コード例 #17
0
ファイル: html_header.php プロジェクト: ricain59/fortaff
<?php

//Inicializações
date_default_timezone_set('Europe/Lisbon');
session_start();
ob_start();
//Includes
require_once rootPath('includes/database/jo_db.php', 1);
// Variável para o tamanho da página das tabelas
$lines_per_table = 10;
// Variáveis auxiliares do utilizador autenticado.
$user_authenticated = isset($_SESSION['login_vs']);
if ($user_authenticated && isset($_SESSION['loginVsNeedUpdate'])) {
    $_SESSION['login_vs'] = visitanteGetByEmail($_SESSION['login_vs']['email']);
    unset($_SESSION['loginVsNeedUpdate']);
}
$current_user = $user_authenticated ? $_SESSION['login_vs'] : null;
// Variáveis auxiliares para os relógios
$jo_Date = new TimeStamp(new DateTime("now"), joInitialDate());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>GIJO</title>
		<link rel="shortcut icon" href="/pw606/favicon.ico">
		<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1" />
		<link href="/pw606/css/default.css" rel="stylesheet" type="text/css" />
		<link href="/pw606/css/blue.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" language="javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
		<script type="text/javascript" src="/pw606/js/googlemaps.js"></script> 
		<script type="text/javascript" src="/pw606/js/jquery.js"></script>
コード例 #18
0
ファイル: edit.php プロジェクト: ricain59/fortaff
			<tr>
				<td>
					<label>Palavra chave: </label>
				</td>
				<td>
					<input id="ipt_password" type="password" name="password" value="<?php 
echo $password;
?>
"/>
					<span id="validatorPassword" class="validatorField" title="A palavra chave é de preenchimento obrigatório!">*</span>
					<input type="checkbox" value="false" onchange="inputPassword('ipt_password');">Ver caracteres</input>
				</td>
			</tr>

		</table>
		<input type="submit" name="submeter" value="Guardar" onclick="return validationForm();" />
<?php 
if (!$isToRemove) {
    ?>
		<input type="submit" name="submeter" value="Remover" />
<?php 
}
?>
		<input type="submit" name="submeter" value="Cancelar" />
	</form>
</p>


<?php 
include_once rootPath('includes/gijo/master_footer.php', 1);
コード例 #19
0
ファイル: base.php プロジェクト: wamania/mynd-framework
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Project Generator</title>
<script src="<?php 
echo rootPath() . 'app/www/js/jquery-1.7.2.min.js';
?>
"></script>
<script src="<?php 
echo rootPath() . 'app/www/js/bootstrap.min.js';
?>
"></script>
<link rel="stylesheet" href="<?php 
echo rootPath() . 'app/www/css/bootstrap.min.css';
?>
" media="all">
<style>
body {
	padding-top: 60px;
	padding-bottom: 40px;
}
.btn:focus, input, a:focus  {
	outline: none;
}
</style>
</head>
<body>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">