示例#1
0
    foreach ($matches_out as $m_o) {
        if (substr(trim($m_o), -1) == "-") {
            echo '<ul dir="rtl"><li>' . trim($m_o) . '</li></ul>' . PHP_EOL;
        } elseif ($m_o[0] == "-") {
            echo '<ul><li>' . trim($m_o) . '</li></ul>' . PHP_EOL;
        } else {
            if (mb_detect_encoding($m_o, 'UTF-8', true)) {
                echo '<p style="text-align: right;">' . $m_o . '</p>' . PHP_EOL;
            } else {
                echo '<p>' . $m_o . '</p>' . PHP_EOL;
            }
        }
    }
}
echo "\n<br/>------------------------<br/>\n";
echo html_list($_POST['txt']);
?>

<?php 
/*
 
 select get_lock('register', -1)
select 1 from `accounts` where `email`=...
insert into `accounts` ...
select release_lock('register')
*/
?>


<form method="post">
<textarea name="txt" dir="rtl"></textarea>
示例#2
0
<?php

$title = $user->login;
$breadcrumb = array('users' => 'Users', '' => $user->login);
$menu1 = html_list(_("Actions"), array(l(_("Edit"), 'users/edit/' . $user->uid), l(_("Delete"), 'users/delete/' . $user->uid), l(_("Connect As"), 'users/impersonate/' . $user->uid)));
$infos = array($user);
Hooks::call('users_show_links', $infos);
array_shift($infos);
$menu2 = html_list(_("Other informations"), $infos);
$sidebar = $menu1 . $menu2;
require VIEWS . '/header.php';
?>

<h2><?php 
__("General informations");
?>
</h2>
<dl>
  <dt><?php 
__("Login");
?>
</dt>
  <dd><?php 
echo $user->login;
?>
</dd>

  <dt><?php 
__("Email address");
?>
</dt>
示例#3
0
function html_assoc_list($title = '', $elements = array(), $text_if_empty = '')
{
    return html_list($title, $elements, $text_if_empty, 'dl');
}
示例#4
0
<h2><?php 
__("Contacts techniques");
?>
</h2>

<?php 
echo html_list(_("Personnes autorisés à agir au nom du client (e-mail)"), $contacts['in_email'], _("Aucun contact e-mail n'est autorisé à agir au nom du client."));
echo html_list(_("Personnes autorisés à agir au nom du client (téléphone)"), $contacts['in_tel'], _("Aucun contact téléphonique n'est autorisé à agir au nom du client."));
echo html_list(_("Personnes à prévenir en cas d'urgence (e-mail)"), $contacts['out_email'], _("Aucun contact à prévenir par e-mail n'est défini."));
echo html_list(_("Personnes à prévenir en cas d'urgence (SMS)"), $contacts['out_tel'], _("Aucun contact à prévenir par sms n'est défini."));