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


PHP hyphen_words函数代码示例

本文整理汇总了PHP中hyphen_words函数的典型用法代码示例。如果您正苦于以下问题:PHP hyphen_words函数的具体用法?PHP hyphen_words怎么用?PHP hyphen_words使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getUserWarns

/**
 * Возвращает список предупреждение пользователя для попап окна.
 * 
 * @param int    $uid       UID пользователя
 * @param array  $contextId Контекст (для лога админских действий)
 * @param string $draw_func способ отображения
 *
 * @return object xajaxResponse
 */
function getUserWarns($uid = 0, $contextId = '', $draw_func = '')
{
    session_start();
    $objResponse = new xajaxResponse();
    if (hasPermissions('users')) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/permissions.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
        $user = new users();
        $user->GetUserByUID($uid);
        if ($user->uid) {
            $aPermissions = permissions::getUserPermissions($_SESSION['uid']);
            $admin_log = new admin_log('user', $_SESSION['uid'], $aPermissions);
            $aWarns = $admin_log->getUserWarns($nCount, $uid);
            $sCount = $nCount ? $nCount : '0';
            $sWarns = $user->warn ? $user->warn : '0';
            $objResponse->assign('a_user_warns', 'href', '/users/' . $user->login);
            $objResponse->assign('s_user_warns', 'innerHTML', $user->uname . ' ' . $user->usurname . ' [' . $user->login . ']');
            $objResponse->assign('e_user_warns', 'innerHTML', $sWarns);
            $objResponse->assign('n_user_warns', 'innerHTML', $sCount);
            if ($nCount) {
                $sTable = '<table id="t_user_warns" class="notice-table">';
                $nCount = 1;
                foreach ($aWarns as $aOne) {
                    $sReason = $aOne['admin_comment'] ? hyphen_words($aOne['admin_comment'], true) : '&lt;без причины&gt;';
                    $sAdmin = $aOne['adm_login'] ? '<a target="_blank" href="/users/' . $aOne['adm_login'] . '">' . $aOne['adm_login'] . '</a>' : 'не известно';
                    $sDate = $aOne['act_time'] ? date('d.m.Y H:i', strtotime($aOne['act_time'])) : 'не известно';
                    $sTable .= '<tr>
                    	<td class="cell-number">' . $nCount . '.</td>
                    	<td class="cell-uwarn">' . $sReason . '</td>
                    	<td class="cell-who">Выдан: [' . $sAdmin . ']
                    	<td class="cell-date">' . $sDate . '</td>
                        <td' . ($aOne['src_id'] ? ' id="i_user_warns_' . $aOne['src_id'] . '"' : '') . '>' . ($aOne['src_id'] ? '<a href="javascript:void(0);" onclick="banned.warnUser(' . $uid . ',' . $aOne['src_id'] . ',\'' . $draw_func . '\',\'' . $contextId . '\',0);"><img src="/images/btn-remove2.png" alt="" width="11" height="11" /></a>' : '') . '</td>
                    </tr>';
                    ++$nCount;
                }
                $sTable .= '</table>';
                $objResponse->assign('d_user_warns', 'innerHTML', $sTable);
            } else {
                $objResponse->assign('d_user_warns', 'innerHTML', '&nbsp;');
            }
            $sBanTitle = $user->is_banned || $user->ban_where ? 'Разбанить' : 'Забанить';
            $objResponse->script('adminLogOverlayClose();');
            $objResponse->script("\$('ov-notice4').setStyle('display', '');");
            $objResponse->script('adjustUserWarnsHTML();');
            $objResponse->assign('b_user_warns', 'innerHTML', '<button onclick="adminLogOverlayClose();banned.userBan(' . $uid . ', \'' . $contextId . '\',0)">' . $sBanTitle . '</button><a class="lnk-dot-grey" href="javascript:void(0);" onclick="adminLogOverlayClose();">Отмена</a>');
        }
    }
    return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:58,代码来源:admin_log.server.php

示例2: hyphen_words

                                                <form id="commune_form_add_category" action="">
                                                    <input type="hidden" name="commune_id" value="<?php 
    echo $comm['id'];
    ?>
" />
                                                    <input type="hidden" name="om" value="<?php 
    echo $om;
    ?>
" />
                                                    <div class="b-input b-input_margbot_10 b-input_height_24">
                                                        <input id="commune_fld_add_category_name" rel="<?php 
    echo commune::MAX_CATEGORY_NAME_SIZE;
    ?>
" name="commune_fld_add_category_name" type="text" size="80" class="b-input__text b-input__text_color_81">
                                                        <textarea  class="b-textarea__textarea b-textarea__textarea__height_70" cols="" rows=""><?php 
    echo hyphen_words($category['name']);
    ?>
</textarea>
                                                    </div>
                                                    <div class="b-check b-check_padbot_10">
                                                        <input id="commune_fld_add_category_only_for_admin" name="commune_fld_add_category_only_for_admin" class="b-check__input" type="checkbox" value="1" />
                                                        <label for="b-check1" class="b-check__label b-check__label_fontsize_13">Публикации только<br>администрации</label>
                                                    </div>
                                                    <a id="category_add_submit" href="javascript:void(0)" class="b-button b-button_flat b-button_flat_green b-button_block">Создать раздел</a>															
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <span id="close_add_category" class="b-shadow__icon b-shadow__icon_close"></span>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.commune.php

示例3: in_array

            $sContextLink = $aOne['context_link'] && $aOne['object_deleted'] != 't' ? $aOne['context_link'] : '';
            $sContextName = in_array($aOne['act_id'], array_merge($aRed, $aYellow)) ? $aOne['context_code'] > 0 ? admin_log::$aObj[$aOne['context_code']]['short'] . ': ' . ($aOne['context_name'] ? $aOne['context_name'] : '<без названия>') : 'Админка' : ' ';
            $sAdminComment = $aOne['admin_comment'] ? hyphen_words(reformat($aOne['admin_comment'], 45), true) : '<без причины>';
            ?>
        	<h4 class="<?php 
            echo $sActClass;
            ?>
"><?php 
            echo $sContextLink ? '<a href="' . $sContextLink . '" target="_blank">' : '';
            echo $aOne['act_name'];
            echo $sContextLink ? '</a>' : '';
            ?>
</h4>
        	
            <span class="theme-blog"><?php 
            echo hyphen_words($sContextName, true);
            ?>
</span>
            
            <p class="reason" id="reason<?php 
            echo $aOne['act_id'];
            ?>
_<?php 
            echo $aOne['src_id'];
            ?>
"><?php 
            echo $sAdminComment;
            ?>
</p>
            
            <p>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:user_inner.php

示例4: array

    <b class="b2"></b>
    <b class="b1"></b>
</div>
<!-- Массовые действия стоп -->

<?php 
if ($filter['ip_from'] || $filter['ip_to'] || $sAdmin || $search_name) {
    $aParts = array();
    if ($filter['ip_from'] || $filter['ip_to']) {
        $aParts[] = 'IP:' . ($filter['ip_from'] ? ' c ' . $filter['ip_from'] : '') . ($filter['ip_to'] ? ' по ' . $filter['ip_to'] : '');
    }
    if ($sAdmin) {
        $aParts[] = 'Модератор: ' . hyphen_words($sAdmin, true);
    }
    if ($search_name) {
        $aParts[] = 'Логин: ' . hyphen_words($search_name, true);
    }
    echo '<div class="date-list name-ip"><span>' . implode(', ', $aParts) . '</span></div>';
}
?>


<div class="date-list">
    <?php 
if ($grayIp) {
    echo '<form name="frm_gray_ip" id="frm_gray_ip" method="post"><input type="hidden" name="task" id="task" value="sdel">';
    if ($primary_id) {
        echo '<input type="hidden" name="primary_id" id="primary_id" value="' . $primary_id . '">';
    }
    $sList = $sList2 = $sDate = $sPid = '';
    $i = $j = $pid = $sid = 0;
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index_inner.php

示例5: __prntUsrInfo

/**
 * Информация пользователя
 *
 * @param array  $user  Данные пользователя
 * @param string $pfx   Префикс данных
 * @param string $cls   Класс отображения ссылки на пользователя (для работодателя либо для фрилансера)
 * @param string $sty   Дополнительный стиль отображения(если необходим)
 * @return string
 */
function __prntUsrInfo($user, $pfx = '', $cls = '', $sty = '', $hyp = false)
{
    $user = (array) $user;
    global $session;
    $is_emp = is_emp($user[$pfx . 'role']);
    $login = $user[$pfx . 'login'];
    $uname = $user[$pfx . 'uname'];
    $usurname = $user[$pfx . 'usurname'];
    if ($sty) {
        $sty = " style='{$sty}'";
    } else {
        if ($is_emp) {
            $sty = " style='color:green'";
        }
    }
    if (!$cls) {
        $cls = ($is_emp ? 'employer' : 'freelancer') . '-name';
    }
    //require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/payed.php");
    //return (   (payed::CheckPro($login) ? ($is_emp ? view_pro_emp() : view_pro()).'&nbsp;' : '').
    if ($hyp) {
        $uname = hyphen_words($user['dsp_uname'] ? $user['dsp_uname'] : $uname);
        $usurname = hyphen_words($user['dsp_usurname'] ? $user['dsp_usurname'] : $usurname);
    }
    $pro = $user[$pfx . 'is_pro'] == 't' ? ($is_emp ? view_pro_emp() : view_pro2($user[$pfx . 'is_pro_test'] == 't')) . '&nbsp;' : '';
    $is_team = view_team_fl() . "&nbsp;";
    return "<span class='{$cls}'{$sty}>" . ($user['is_admin'] == 't' ? '<span class="cau-admin">Admin</span>&nbsp;' : '') . "<a class='{$cls}'{$sty} href='/users/{$login}' title='{$uname} {$usurname}'>" . $uname . " " . $usurname . "\n" . " [" . ($user['dsp_login'] ? $user['dsp_login'] : $login) . "]</a>" . "</span>&nbsp;" . ($user[$pfx . 'is_team'] == 't' ? $is_team : $pro) . $session->view_online_status($login);
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:37,代码来源:stdf.php

示例6: htmlspecialchars

    <input type="hidden" id="section_name_<?php 
echo $section['id'];
?>
" value='<?php 
echo htmlspecialchars($section['name'], ENT_QUOTES);
?>
'>
    <span class="mc-g-o"><span id="count_docs_<?php 
echo $section['id'];
?>
"><?php 
echo $section['count'];
?>
</span>&nbsp;&nbsp; <a href="#" onclick="showSectionEdit('edit',<?php 
echo $section['id'];
?>
); return false;"><img src="/images/ico-e-u.png" alt="Редактировать"></a><span id="del_block_sec_<?php 
echo $section['id'];
?>
" <?if($section['count']) print("style='display:none'");?>>&nbsp;&nbsp; <a href="#" onclick="xajax_DeleteSectionHTML(<?php 
echo $section['id'];
?>
, <?php 
echo $num;
?>
); return false;"><img src="/images/btn-remove2.png" alt="Удалить"></a></span>&nbsp;&nbsp;</span>
            <span><?php 
echo htmlspecialchars(hyphen_words($section['name']));
?>
</span>
</th>
开发者ID:notUserDeveloper,项目名称:fl-ru-damp,代码行数:31,代码来源:admin_section_line.php

示例7: hyphen_words

<td class="chk">
		<input type="checkbox" checked="true">
	</td>
	<th>
		<a href=""><?php 
echo hyphen_words($doc['name']);
?>
</a>
	</th>
	<td class="doc-remove" colspan="3">
		<input onclick="xajax_DeleteDoc(<?php 
echo $doc['id'];
?>
, <?php 
echo $doc['docs_sections_id'];
?>
); return false;" type="button" value="Удалить" class="i-btn">&nbsp; <a href="#" onclick="xajax_GetDocHTML(<?php 
echo $doc['id'];
?>
); return false;" class="lnk-dot-666">Отменить</a>&nbsp;
	</td>
开发者ID:notUserDeveloper,项目名称:fl-ru-damp,代码行数:21,代码来源:admin_docs_delete_line.php

示例8: hyphen_words

            ?>
    	<?php 
            if (in_array($aOne['act_id'], $aReasonData)) {
                echo '<br/>', $aOne['admin_comment'];
                $aOne['admin_comment'] = '';
            }
            ?>
    	</td>
   	</tr>
   	<?php 
            if ($aOne['admin_comment']) {
                ?>
	<tr>
    	<td class="cell-number">Причина:</td>
    	<td class="cell-body"><?php 
                echo hyphen_words(reformat($aOne['admin_comment'], 45), true);
                ?>
</td>
   	</tr>
   	<?php 
            }
            ?>
   	<tr class="last">
    	<td class="cell-number">&nbsp;</td>
    	<td class="cell-body" id="prj_<?php 
            echo $aOne['object_id'];
            ?>
_log_<?php 
            echo $aOne['id'];
            ?>
">
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:proj_inner.php

示例9: getSpamComplaints

/**
 * Возвращает список жалоб на спам для личного сообщения в админке.
 * 
 * с xajax не работает
 * 
 * @param  int $nSpamId ID записи из messages_spam
 * @param  string $sMsgMd5 MD5 хэш текста сообщения
 * @return string json_encode данные
 */
function getSpamComplaints($nSpamerId = 0, $sMsgMd5 = '')
{
    session_start();
    $res = array();
    if (hasPermissions('projects') && $nSpamerId && $sMsgMd5) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages_spam.php';
        $oSpam = new messages_spam();
        $aMsgs = $oSpam->getSpamComplaints($nSpamerId, $sMsgMd5);
        $aData = array();
        foreach ($aMsgs as $aOne) {
            $aTmp = array('login' => iconv('CP1251', 'UTF-8', $aOne['user_login']), 'name' => iconv('CP1251', 'UTF-8', $aOne['user_name']), 'surname' => iconv('CP1251', 'UTF-8', $aOne['user_surname']), 'date' => date('d.m.Y', strtotime($aOne['complain_time'])), 'time' => date('H:i', strtotime($aOne['complain_time'])), 'text' => $aOne['complain_text'] ? iconv('CP1251', 'UTF-8', hyphen_words(reformat($aOne['complain_text'], 45), true)) : '');
            $aData[] = $aTmp;
        }
        $res['success'] = true;
        $res['data'] = $aData;
    } else {
        $res['success'] = false;
    }
    echo json_encode($res);
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:29,代码来源:contacts.server.php

示例10: htmlspecialchars

echo $doc['id'];
?>
"><?php 
echo htmlspecialchars(hyphen_words($doc['name']));
?>
</a></div>
</th>
<td class="cat">
    <a href="/service/docs/section/?id=<?php 
echo $doc['docs_sections_id'];
?>
" name="section_name_<?php 
echo $doc['docs_sections_id'];
?>
"><?php 
echo htmlspecialchars(hyphen_words($doc['section_name']));
?>
</a>
</td>
<td class="d">
    <?php 
echo date("d.m.Y", strtotime($doc['date_create']));
?>
</td>
<td class="ops">
    <a href="#" onclick="xajax_EditDocFormPrepare(<?php 
echo $doc['id'];
?>
); return false;"><img src="/images/ico-e-u.png" alt="–едактировать"></a>&nbsp;&nbsp; <a href=""><img src="/images/btn-remove2.png" alt="”далить" onclick="xajax_DeleteDocHTML(<?php 
echo $doc['id'];
?>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:admin_docs_line.php

示例11: WarnsHTML_admalluserspage

/**
 * Изменение HTML на странице Нарушители в новой модераторской
 * 
 * @param obj $objResponse экземпляр класса xajaxResponse
 * @param array $warns массив предупреждений
 * @param int $actFlag 0 - нет действия, 1 - сделали предупреждение, -1 - сняли предупреждение
 */
function WarnsHTML_admalluserspage(&$objResponse, &$warns, $actFlag = 0)
{
    if ($actFlag == 0 && $warns) {
        foreach ($warns as $aOne) {
            $reason = hyphen_words(reformat($aOne['reason'], 45), true);
            $objResponse->assign('reason1_' . $aOne['id'], 'innerHTML', $reason);
        }
    } else {
        // перебрасываем к новому действию
        $sHref = e_url('page', null, $_SESSION['admin_log_user']);
        $objResponse->script("window.location='{$sHref}'");
    }
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:20,代码来源:banned.server.php

示例12: __LentaPrntUsrInfo

/**
 * Информация пользователя
 *
 * @param array  $user  Данные пользователя
 * @param string $pfx   Префикс данных
 * @param string $cls   Класс отображения ссылки на пользователя (для работодателя либо для фрилансера)
 * @param string $sty   Дополнительный стиль отображения(если необходим)
 * @return string
 */
function __LentaPrntUsrInfo($user, $pfx = '', $cls = '', $sty = '', $hyp = false, $show_userpic = false)
{
    global $session;
    $is_emp = is_emp($user[$pfx . 'role']);
    $login = $user[$pfx . 'login'];
    $uname = $user[$pfx . 'uname'];
    $photo = $user[$pfx . 'photo'];
    $usurname = $user[$pfx . 'usurname'];
    if ($sty) {
        $sty = " style='{$sty}'";
    }
    if (!$cls) {
        $cls = $is_emp ? '6db335' : '000';
    }
    //require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/payed.php");
    //return (   (payed::CheckPro($login) ? ($is_emp ? view_pro_emp() : view_pro()).'&nbsp;' : '').
    if ($hyp) {
        $uname = hyphen_words($user['dsp_uname'] ? $user['dsp_uname'] : $uname);
        $usurname = hyphen_words($user['dsp_usurname'] ? $user['dsp_usurname'] : $usurname);
    }
    if ($show_userpic) {
        $avatar = view_avatar($login, $photo, 1);
    }
    $ret = $avatar . "<span class='b-layout__txt b-layout__txt_color_{$cls}'{$sty}><a class='b-layout__link b-layout__link_color_{$cls}'{$sty} href='/users/{$login}' title='{$uname} {$usurname}'>" . $uname . " " . $usurname . "</a>\n" . "  [<a class='b-layout__link b-layout__link_color_{$cls}'{$sty} href='/users/{$login}' title='{$login}'>" . ($user['dsp_login'] ? $user['dsp_login'] : $login) . "</a>]" . view_mark_user($user, $pfx) . "</span>";
    return $ret;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:35,代码来源:lenta.php

示例13: hyphen_words

                ?>
e" width="15" align="right" id="num"><?php 
                echo $i;
                ?>
.</td>
			<td id="sproj<?php 
                echo $prj['id'];
                ?>
f"><a href="/users/<?php 
                echo $user->login;
                ?>
/viewproj.php?prjid=<?php 
                echo $prj['id'];
                ?>
" target="_blank" class="blue"><?php 
                echo hyphen_words($prj['name']);
                ?>
</a>
<?php 
                /*
                				<? if ($prj['show_comms'] == 't') {?> | <a href="/users/<?=$user->login?>/comments/?tr=<?=$prj['id']?>" style="color: #666666;">Комментарии (<?=zin($prj['comms'])?>)</a><? } ?>
                */
                ?>
				<input type="hidden" name="pos[]" value="<?php 
                echo $prj['id'];
                ?>
"><input type="hidden" name="profid[]" value="<?php 
                echo $prj['id'];
                ?>
">
			</td>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:portfolio_inner.php

示例14: getFriendlyURL

        if ($contest->positions[3]) {
            ?>
занял <br /><a href="<?php 
            echo getFriendlyURL("project", $project['id']);
            ?>
?offer=<?php 
            echo $contest->positions[3]['id'];
            ?>
#offer-<?php 
            echo hyphen_words($contest->positions[3]['id']);
            ?>
"><?php 
            echo $contest->positions[3]['uname'];
            ?>
 <?php 
            echo hyphen_words($contest->positions[3]['usurname']);
            ?>
</a><?php 
        } else {
            ?>
<br />не указано<?php 
        }
        ?>
</h3>
		</td>
	</tr>
</table>
<?php 
    }
    ?>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:30,代码来源:contest.php

示例15: is_emp

 $info_ajax_view = false;
 $info_is_emp = is_emp($comm[$info_pfx . 'role']);
 $info_login = $comm[$info_pfx . 'login'];
 $info_uname = $comm[$info_pfx . 'uname'];
 $info_usurname = $comm[$info_pfx . 'usurname'];
 if ($info_sty) {
     $info_sty = " style='{$info_sty}'";
 } elseif ($info_is_emp) {
     $info_sty = " style='color:green'";
 }
 if (!$info_cls) {
     $info_cls = $info_is_emp ? 'b-username__login_color_6db335' : 'b-username__login_color_fd6c30';
 }
 if ($info_hyp) {
     $info_uname = hyphen_words($comm['dsp_uname'] ? $comm['dsp_uname'] : $info_uname);
     $info_usurname = hyphen_words($comm['dsp_usurname'] ? $comm['dsp_usurname'] : $info_usurname);
 }
 /*!!!is_team!!!*/
 if (@$comm[$info_pfx . 'is_profi'] == 't') {
     $info_pro = view_profi();
 } else {
     $info_pro = $comm[$info_pfx . 'is_pro'] == 't' ? $info_is_emp ? view_pro_emp() : view_pro2($comm[$info_pfx . 'is_pro_test'] == 't' ? true : false) : "";
 }
 $is_team = view_team_fl();
 if ($comm[$info_pfx . 'is_verify'] == 't') {
     $info_pro .= view_verify();
     $is_team .= view_verify();
 }
 $seo_text = "<a class=\"b-username__link\"{$info_sty} href=\"/users/{$info_login}\" title=\"{$info_login}\">[" . ($comm['dsp_login'] ? $comm['dsp_login'] : $info_login) . "]</a>";
 ?>
                                         <a class='b-username__link' href='/users/<?php 
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.communes_list.php


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