コード例 #1
0
function allSeo_title_filter($text)
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    switch ($location) {
        // Listing page and page related to listings
        case 'item':
            switch ($section) {
                case 'item_add':
                    $text = __('Publish a listing', 'all_in_one');
                    break;
                case 'item_edit':
                    $text = __('Edit your listing', 'all_in_one');
                    break;
                case 'send_friend':
                    $text = __('Send to a friend', 'all_in_one') . Delimiter() . osc_item_title();
                    break;
                case 'contact':
                    $text = __('Contact seller', 'all_in_one') . Delimiter() . osc_item_title();
                    break;
                default:
                    $text = SeoGenerateTitleListing();
                    break;
            }
            break;
            // Static page
        // Static page
        case 'page':
            if (GetPageTitle() == '') {
                $text = osc_static_page_title();
            } else {
                $text = GetPageTitle();
            }
            break;
            // Error page
        // Error page
        case 'error':
            $text = __('Page not found', 'all_in_one');
            break;
            // Search & Category page
        // Search & Category page
        case 'search':
            $region = osc_search_region();
            $city = osc_search_city();
            $pattern = osc_search_pattern();
            $category = osc_search_category_id();
            $s_page = '';
            $i_page = Params::getParam('iPage');
            if ($i_page != '' && $i_page > 1) {
                $s_page = Delimiter() . __('page', 'all_in_one') . ' ' . $i_page;
            }
            $result = SeoGenerateTitleCategory();
            if ($result == '') {
                $result = __('Search result', 'all_in_one');
            }
            $text = $result . $s_page;
            break;
            // Login page
        // Login page
        case 'login':
            switch ($section) {
                case 'recover':
                    $text = __('Recover your password', 'all_in_one');
                default:
                    $text = __('Login into your account', 'all_in_one');
            }
            break;
            // Registration page
        // Registration page
        case 'register':
            $text = __('Create a new account', 'all_in_one');
            break;
            // User page and pages related to user
        // User page and pages related to user
        case 'user':
            switch ($section) {
                case 'dashboard':
                    $text = __('Dashboard', 'all_in_one');
                    break;
                case 'items':
                    $text = __('Manage my listings', 'all_in_one');
                    break;
                case 'alerts':
                    $text = __('Manage my alerts', 'all_in_one');
                    break;
                case 'profile':
                    $text = __('Update my profile', 'all_in_one');
                    break;
                case 'pub_profile':
                    $text = __('Public profile of', 'all_in_one') . ' ' . ucfirst(osc_user_name());
                    break;
                case 'change_email':
                    $text = __('Change my email', 'all_in_one');
                    break;
                case 'change_password':
                    $text = __('Change my password', 'all_in_one');
                    break;
                case 'forgot':
                    $text = __('Recover my password', 'all_in_one');
                    break;
            }
            break;
            // Contact page
        // Contact page
        case 'contact':
            $text = __('Contact', 'all_in_one');
            break;
        default:
            $text = osc_page_title();
            break;
    }
    // Now add page title to first or last position for other pages
    if (!osc_is_home_page() and !osc_is_ad_page() and !osc_is_search_page()) {
        $title = osc_get_preference('allSeo_other_page_title', 'plugin-all_in_one') != '' ? osc_get_preference('allSeo_other_page_title', 'plugin-all_in_one') : osc_page_title();
        if (osc_get_preference('allSeo_title_first', 'plugin-all_in_one') == 1) {
            $text = $title . Delimiter() . $text;
        } else {
            $text .= Delimiter() . $title;
        }
    }
    return $text;
}
コード例 #2
0
ファイル: mostrar_foto.php プロジェクト: javierlov/FuentesWeb
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/constants.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/functions/general.php";
validarParametro(isset($_REQUEST["nombrefoto"]));
?>
<html>
	<head>
	<?php 
echo GetHead(GetPageTitle(2), array("style.css?today=" . date("Ymd")));
?>
		<meta http-equiv="Cache-Control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta http-equiv="Pragma" content="no-cache" />
		<script>
		function ShowPicture() {
			if (window.opener.document.getElementById('NombreFoto').value == '') {
				window.moveTo(20000, 20000);
				window.resizeTo(1, 1);
				if (window.opener.document.getElementById('Nombre').innerText == '')
					alert('Debe seleccionar un usuario primero.')
				else
					alert(window.opener.document.getElementById('Nombre').innerText + ' no tiene ninguna foto cargada.');
				window.close();
			}

			document.getElementById('foto').src = '<?php 
echo "/functions/get_image.php?file=" . base64_encode(IMAGES_FOTOS_PATH . $_REQUEST["nombrefoto"]);
?>
';
コード例 #3
0
ファイル: permisos.php プロジェクト: javierlov/FuentesWeb
require_once $_SERVER["DOCUMENT_ROOT"] . "/constants.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/functions/general.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db_funcs.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/miscellaneous/error.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/miscellaneous/general.php";
$modulePath = "/Modules/Permisos/";
$params = array(":usuario" => GetWindowsLoginName());
$sql = "SELECT 1\n\t\t FROM use_usuarios\n\t\tWHERE se_usuario IN ('ALAPACO', 'FPEREZ')\n\t\t\tAND UPPER(se_usuario) = UPPER(:usuario)";
if (!ExisteSql($sql, $params)) {
    ShowError('Permisos', "Usted no tiene permiso para ingresar a esta página.");
    exit;
}
$params = array(":id" => $_REQUEST["pageid"]);
$sql = "SELECT pi_nombre\n\t\t FROM web.wpi_paginasintranet\n\t\tWHERE pi_id = :id";
$pageName = str_replace('%s', ValorSql($sql, "", $params), GetPageTitle(3));
?>
<html>
<head>
<?php 
echo GetHead($pageName, array("style.css"));
?>
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
	<meta http-equiv="Pragma" content="no-cache" />
	<script language="JavaScript" src="<?php 
echo $modulePath;
?>
js/permisos.js"></script>
</head>
<body>
コード例 #4
0
ファイル: index.php プロジェクト: javierlov/FuentesWeb
// **   FIN VALIDACIÓN   **
$pageid = -1;
if (isset($_REQUEST["pageid"])) {
    $pageid = intval($_REQUEST["pageid"]);
}
$hasPermiso = HasPermiso($pageid);
if ($pageid != -1 and !$hasPermiso) {
    ShowError(GetPageName($pageid), "Usted no tiene permiso para ingresar a esta página.");
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<?php 
echo GetHead(GetPageTitle($pageid), array("style.css", "new_style.css"));
?>
		<script>
			var _x_en_div;
			var _y_en_div;
			var _x;
			var _y;
			var isCtrl = false;
			var isIE = document.all?true:false;

			document.onmousemove = getMousePosition;


			function getMousePosition(ev) {
				if (isIE) {
					_x = event.clientX + document.body.scrollLeft;