当前位置: 首页>>代码示例>>PHP>>正文


PHP message::idioma方法代码示例

本文整理汇总了PHP中message::idioma方法的典型用法代码示例。如果您正苦于以下问题:PHP message::idioma方法的具体用法?PHP message::idioma怎么用?PHP message::idioma使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在message的用法示例。


在下文中一共展示了message::idioma方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: msg

/**
 * Mostra mensagem de texto conforme o conte�do gravado
 * Caso nao exista a mensagem, envia para funcao de cadastrar nova
 */
function msg($s, $ed = 0)
{
    global $LANG;
    global $messa, $messav;
    global $gerar, $edit_mode;
    $s = substr($s, 0, 40);
    $gerar = 0;
    /* verifica se existe $s no array de traducao */
    if (isset($messa[$LANG][$s])) {
        /* se mode de edicao habilitado */
        if ($edit_mode == 1 and $ed == 0) {
            /* valida se existe pagina dentro do array de validacao */
            if (!in_array(page(), $messav[$LANG][$s])) {
                $sql = "select msg_pag from _messages where msg_field = '{$s}'";
                $rlt = db_query($sql);
                $line = db_read($rlt);
                $array_check = $line['msg_pag'];
                if (strlen(trim($array_check)) == 0) {
                    $array_check = array();
                } else {
                    $array_check = unserialize($array_check);
                }
                if (!is_array($array_check)) {
                    $array_check = array();
                }
                if (!in_array(page(), $array_check)) {
                    array_push($array_check, page());
                }
                $page = serialize($array_check);
                $sql = "update _messages set msg_pag = '{$page}' where msg_field = '{$s}' ";
                $rlt = db_query($sql);
            }
        }
        /* salva */
        /* Campos para editar mensagens */
        if ($ed == 0) {
            $img = '<A href="javascript:newxy2(';
            $img .= "'message_ed_pop.php?dd2=" . page() . "&dd1=" . $s;
            $img .= "',600,600);";
            $img .= '">';
            $img .= '<img src=img/icone_alert.png width=10 border=0>';
            $img .= '</A>';
            if ($edit_mode != 1) {
                $img = '';
            }
            $link = $img;
        } else {
            $link = '';
        }
        return $messa[$LANG][$s] . $link;
    } else {
        $msg = new message();
        $ido = $msg->idioma();
        foreach ($ido as $key => $value) {
            //echo '<HR>NOVO:'.$s.'<HR>';
            $tela = msg_insert($s, $key);
        }
        return $s;
    }
    /**
     * Inserir nova mensagem se nao cadastrada
     */
}
开发者ID:bireme,项目名称:proethos,代码行数:67,代码来源:_class_message.php

示例2:

        }
        if (round($cpi[$r][0]) > 0) {
            $sql = "update " . $cl->tabela . " set msg_content='" . $dd[$r + 40] . "' ";
            $sql .= " where id_msg = " . $cpi[$r][0];
            $rlt = db_query($sql);
        }
    }
    echo $cl->language_page_create();
    echo '
			<script>
				close();
			</script>
			';
    exit;
}
$idm = $cl->idioma();
?>
	<form method="post" action="<?php 
// This file is part of the ProEthos Software.
//
// Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify
// ProEthos under the terms of the ProEthos License as published by PAHO, which
// restricts commercial use of the Software.
//
// ProEthos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the ProEthos License for more details.
//
// You should have received a copy of the ProEthos License along with the ProEthos
// Software. If not, see
// https://raw.githubusercontent.com/bireme/proethos/master/LICENSE.txt
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:message_ed_pop.php


注:本文中的message::idioma方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。