本文整理汇总了PHP中shortenTextDisplay函数的典型用法代码示例。如果您正苦于以下问题:PHP shortenTextDisplay函数的具体用法?PHP shortenTextDisplay怎么用?PHP shortenTextDisplay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了shortenTextDisplay函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageLinkButton
print '<h3>' . $GLOBALS['I18N']->get('Click details for a URL') . ' <b>' . $urldata['url'] . '</b></h3><br/>';
print PageLinkButton('userclicks&fwdid=' . $id, s('View subscribers'));
if ($download) {
header('Content-disposition: attachment; filename="phpList URL click statistics for ' . $urldata['url'] . '.csv"');
}
$req = Sql_Query(sprintf('select messageid,firstclick,date_format(latestclick,
"%%e %%b %%Y %%H:%%i") as latestclick,total,clicked from %s where forwardid = %d and firstclick is not null order by firstclick desc
', $GLOBALS['tables']['linktrack_ml'], $id));
$summary = array();
$summary['totalsent'] = 0;
$summary['totalclicks'] = 0;
$summary['uniqueclicks'] = 0;
while ($row = Sql_Fetch_Array($req)) {
$msgsubj = Sql_Fetch_Row_query(sprintf('select subject from %s where id = %d', $GLOBALS['tables']['message'], $row['messageid']));
if (!$download) {
$element = '<!-- ' . $row['messageid'] . '-->' . shortenTextDisplay($msgsubj[0], 30);
} else {
$element = '<!-- ' . $row['messageid'] . '-->' . $msgsubj[0];
}
# $element = $GLOBALS['I18N']->get('msg').' '.$row['messageid'].': '.substr($msgsubj[0],0,25). '...';
# $element = sprintf('<a href="%s" target="_blank" class="url" title="%s">%s</a>',$row['url'],$row['url'],substr(str_replace('http://','',$row['url']),0,50));
# $total = Sql_Verbose_Query(sprintf('select count(*) as total from %s where messageid = %d and url = "%s"',
# $GLOBALS['tables']['linktrack'],$id,$row['url']));
# if (CLICKTRACK_SHOWDETAIL) {
$uniqueclicks = Sql_Fetch_Array_Query(sprintf('select count(distinct userid) as users from %s
where messageid = %d and forwardid = %d', $GLOBALS['tables']['linktrack_uml_click'], $row['messageid'], $id));
# }
$ls->addElement($element, PageUrl2('mclicks&id=' . $row['messageid']));
$ls->setClass($element, 'row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('firstclick'), formatDateTime($row['firstclick'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('latestclick'), $row['latestclick']);
示例2: simplePaging
$paging = simplePaging("mviews{$url_keep}", $start, $total, MAX_USER_PP, $GLOBALS['I18N']->get("Entries"));
$ls->usePanel($paging);
}
$req = Sql_Query(sprintf('select userid,email,um.entered as sent,min(um.viewed) as firstview,
max(um.viewed) as lastview, count(um.viewed) as viewcount,
abs(unix_timestamp(um.entered) - unix_timestamp(um.viewed)) as responsetime
from %s um, %s user, %s msg where um.messageid = %d and um.messageid = msg.id and um.userid = user.id and um.status = "sent" and um.viewed is not null %s
group by userid %s', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['user'], $GLOBALS['tables']['message'], $id, $subselect, $limit));
$summary = array();
while ($row = Sql_Fetch_Array($req)) {
if ($download) {
## with download, the 50 per page limit is not there.
set_time_limit(60);
$element = $row['email'];
} else {
$element = shortenTextDisplay($row['email'], 15);
}
$ls->addElement($element, PageUrl2('userhistory&id=' . $row['userid']));
$ls->setClass($element, 'row1');
$ls->addRow($element, '<div class="listingsmall gray">' . $GLOBALS['I18N']->get('sent') . ': ' . formatDateTime($row['sent'], 1) . '</div>', '');
if ($row['viewcount'] > 1) {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('lastview'), formatDateTime($row['lastview']));
$ls->addColumn($element, $GLOBALS['I18N']->get('views'), $row['viewcount']);
} else {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('responsetime'), secs2time($row['responsetime']));
}
}
if ($download) {
ob_end_clean();
示例3: header
header('Content-disposition: attachment; filename="phpList URL click statistics for ' . $urldata['url'] . '.csv"');
}
$req = Sql_Query(sprintf('select messageid,firstclick,date_format(latestclick,
"%%e %%b %%Y %%H:%%i") as latestclick,total,clicked from %s where forwardid = %d and firstclick is not null order by firstclick desc
', $GLOBALS['tables']['linktrack_ml'], $id));
$summary = array();
$summary['totalsent'] = 0;
$summary['totalclicks'] = 0;
$summary['uniqueclicks'] = 0;
while ($row = Sql_Fetch_Array($req)) {
$messagedata = loadMessageData($row['messageid']);
if (!$download) {
if ($messagedata['subject'] != $messagedata['campaigntitle']) {
$element = '<!--' . $row['messageid'] . '-->' . stripslashes($messagedata['campaigntitle']) . '<br/><strong>' . shortenTextDisplay($messagedata['subject'], 30) . '</strong>';
} else {
$element = '<!--' . $row['messageid'] . '-->' . shortenTextDisplay($messagedata['subject'], 30);
}
} else {
$element = $messagedata['subject'];
}
# $element = $GLOBALS['I18N']->get('msg').' '.$row['messageid'].': '.substr($msgsubj[0],0,25). '...';
# $element = sprintf('<a href="%s" target="_blank" class="url" title="%s">%s</a>',$row['url'],$row['url'],substr(str_replace('http://','',$row['url']),0,50));
# $total = Sql_Verbose_Query(sprintf('select count(*) as total from %s where messageid = %d and url = "%s"',
# $GLOBALS['tables']['linktrack'],$id,$row['url']));
# if (CLICKTRACK_SHOWDETAIL) {
$uniqueclicks = Sql_Fetch_Array_Query(sprintf('select count(distinct userid) as users from %s
where messageid = %d and forwardid = %d', $GLOBALS['tables']['linktrack_uml_click'], $row['messageid'], $id));
# }
$ls->addElement($element, PageUrl2('mclicks&id=' . $row['messageid']));
$ls->setClass($element, 'row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('firstclick'), formatDateTime($row['firstclick'], 1));
示例4: s
case 'unidentified':
print '<p class="information">' . s('no unidentified bounces available') . '</p>';
break;
case 'processed':
print '<p class="information">' . s('no processed bounces available') . '</p>';
break;
}
}
$ls = new WebblerListing(s($status) . ' ' . s('bounces'));
$ls->usePanel($paging);
while ($bounce = Sql_fetch_array($result)) {
#@@@ not sure about these ones - bounced list message
$element = $bounce['id'];
$ls->addElement($element, PageUrl2('bounce&type=' . $status . '&id=' . $bounce['id']));
if (preg_match("#bounced list message ([\\d]+)#", $bounce['status'], $regs)) {
$messageid = PageLink2('message&id=' . $regs[1], shortenTextDisplay(campaignTitle($regs[1]), 30));
#sprintf('<a href="./?page=message&id=%d">%d</a>',$regs[1],$regs[1]);
} elseif ($bounce['status'] == 'bounced system message') {
$messageid = $GLOBALS['I18N']->get('System Message');
} else {
$messageid = $GLOBALS['I18N']->get('Unknown');
}
/* if (preg_match('/Action: delayed\s+Status: 4\.4\.7/im',$bounce["data"])) {
$ls->addColumn($element,'delayed',$GLOBALS['img_tick']);
} else {
$ls->addColumn($element,'delayed',$GLOBALS['img_cross']);
}
*/
$ls->addColumn($element, s('Campaign'), $messageid);
if (preg_match("#([\\d]+) bouncecount increased#", $bounce['comment'], $regs)) {
$userid = PageLink2('user&id=' . $regs[1], $regs[1]);
示例5: ob_end_clean
if ($download) {
ob_end_clean();
print $ls->tabDelimited();
}
print $ls->display();
return;
}
#print '<h3>'.$GLOBALS['I18N']->get('Campaign statistics').'</h3>';
print PageLinkButton('statsoverview', s('View all campaigns'));
$messagedata = loadMessageData($id);
//var_dump($messagedata);
print '<h3>' . $messagedata['subject'] . '</h3>';
$ls = new WebblerListing('');
$element = ucfirst(s('Subject'));
$ls->addElement($element);
$ls->addColumn($element, ' ', shortenTextDisplay($messagedata['subject'], 30));
$element = ucfirst(s('Date entered'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['entered']);
$element = ucfirst(s('Date sent'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['sent']);
$element = ucfirst(s('Sent as HTML'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['astextandhtml']);
$element = ucfirst(s('Sent as text'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['astext']);
$totalSent = 0;
$sentQ = Sql_Query(sprintf('select status,count(userid) as num from %s where messageid = %d group by status', $tables['usermessage'], $id));
while ($row = Sql_Fetch_Assoc($sentQ)) {
示例6: formStart
print $GLOBALS['I18N']->get('No Rules found');
$some = 0;
} else {
print formStart('class="bouncerulesListing"');
}
while ($row = Sql_Fetch_Array($req)) {
$element = $GLOBALS['I18N']->get('rule') . ' ' . $row['id'];
$ls->addElement($element, PageUrl2('bouncerule&id=' . $row['id']));
if ($type == 'candidate') {
# check if it matches an active rule
$activerule = matchedBounceRule($row['regex'], 1);
if ($activerule) {
$ls->addColumn($element, $GLOBALS['I18N']->get('match'), PageLink2('bouncerule&id=' . $activerule, $GLOBALS['I18N']->get('match')));
}
}
$ls->addColumn($element, $GLOBALS['I18N']->get('expression'), '<a name="' . $row['id'] . '"></a>' . shortenTextDisplay($row['regex'], 50));
$ls->addColumn($element, $GLOBALS['I18N']->get('action'), $GLOBALS['bounceruleactions'][$row['action']]);
# $num = Sql_Fetch_Row_Query(sprintf('select count(*) from %s where regex = %d',$GLOBALS['tables']['bounceregex_bounce'],$row['id']));
# $ls->addColumn($element,$GLOBALS['I18N']->get('#bncs'),$num[0]);
$ls->addColumn($element, $GLOBALS['I18N']->get('#bncs'), $row['count']);
$ls->addColumn($element, $GLOBALS['I18N']->get('tag'), sprintf('<input type="checkbox" name="tagged[%d]" value="%d">', $row['id'], $row['listorder']));
$ls->addColumn($element, $GLOBALS['I18N']->get('order'), sprintf('<input type="text" name="listorder[%d]" value="%d" size=3>', $row['id'], $row['listorder']));
$ls->addColumn($element, $GLOBALS['I18N']->get('del'), PageLink2('bouncerules&del=' . $row['id'] . $url, $GLOBALS['I18N']->get('del')));
}
print $ls->display();
if ($some) {
print '<p class="information">' . $GLOBALS['I18N']->get('with tagged rules: ') . ' ';
printf('<b>%s</b> <input type="checkbox" name="tagaction" value="delete"><br/>', $GLOBALS['I18N']->get('delete'));
if ($type == 'candidate') {
printf('<b>%s</b> <input type="checkbox" name="tagaction" value="activate"><br/>', $GLOBALS['I18N']->get('make active'));
} else {
示例7: s
print "<p>" . s('%d subscribers', $total) . '</p>';
print formStart(' name="users" class="membersProcess" ');
printf('<input type="hidden" name="id" value="%d" />', $id);
?>
<input type="checkbox" name="checkall" class="checkallcheckboxes" /><?php
echo $GLOBALS['I18N']->get("Tag all users in this page");
?>
<?php
$columns = array();
$columns = explode(',', getConfig('membership_columns'));
# $columns = array('country','Lastname');
$ls = new WebblerListing($GLOBALS['I18N']->get("Members"));
$ls->usePanel($paging);
while ($user = Sql_fetch_array($result)) {
$element = shortenTextDisplay($user["email"]);
$ls->addElement($element, PageUrl2("user&id=" . $user["id"]));
$ls->setClass($element, 'row1');
$ls_delete = "";
if ($access != "view") {
$ls_delete = sprintf('<a title="' . $GLOBALS['I18N']->get('Delete') . '" class="del" href="javascript:deleteRec(\'%s\');"></a>', PageURL2("members", "", "start={$start}&{$pagingKeep}&id={$id}&delete=" . $user["id"]));
}
$ls->addRow($element, '', $user["confirmed"] && !$user["blacklisted"] ? $ls_delete . $GLOBALS["img_tick"] : $ls_delete . $GLOBALS["img_cross"]);
if ($access != "view") {
$ls->addColumn($element, $GLOBALS['I18N']->get("tag"), sprintf('<input type="checkbox" name="user[%d]" value="1" />', $user["id"]));
}
/*
$query
= ' select count(*)'
. ' from %s lm, %s um'
. ' where lm.messageid = um.messageid'
示例8: array
}
$summary = array();
$summary['totalclicks'] = 0;
while ($row = Sql_Fetch_Array($req)) {
# print $row['email'] . "<br/>";
if ($download) {
$downloadContent .= $row['email'] . PHP_EOL;
} else {
if (!$userid) {
$element = shortenTextDisplay($row['email']);
$ls->addElement($element, PageUrl2('userhistory&id=' . $row['userid']));
$ls->setClass($element, 'row1');
} else {
# $link = substr($row['url'],0,50);
# $element = PageLink2($link,$link,PageUrl2('uclicks&id='.$row['forwardid']),"",true,$row['url']);
$element = shortenTextDisplay($row['url']);
$ls->addElement($element, PageUrl2('uclicks&id=' . $row['forwardid']));
$ls->setClass($element, 'row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('message'), PageLink2('mclicks&id=' . $row['messageid'], ' ' . $row['messageid']));
}
# $element = sprintf('<a href="%s" target="_blank" class="url" title="%s">%s</a>',$row['url'],$row['url'],substr(str_replace('http://','',$row['url']),0,50));
# $total = Sql_Verbose_Query(sprintf('select count(*) as total from %s where messageid = %d and url = "%s"',
# $GLOBALS['tables']['linktrack'],$id,$row['url']));
# $totalsent = Sql_Fetch_Array_Query(sprintf('select count(*) as total from %s where url = "%s"',
# $GLOBALS['tables']['linktrack'],$urldata['url']));
$ls_userid = '';
if (!$userid) {
$ls_userid = '<span class="viewusers"><a class="button" href="' . PageUrl2('userclicks&userid=' . $row['userid']) . '" title="' . $GLOBALS['I18N']->get('view user') . '"></a></span>';
}
if (!empty($row['userid'])) {
$userStatus = Sql_Fetch_Assoc_Query(sprintf('select blacklisted,confirmed from %s where id = %d', $GLOBALS['tables']['user'], $row['userid']));
示例9: s
print "<div class='minitabs'>\n";
print $tabs->display();
print "</div>\n";
print '<p>' . s('%d subscribers', $total) . '</p>';
print formStart(' name="users" class="membersProcess" ');
printf('<input type="hidden" name="id" value="%d" />', $id);
if (!$listAll) {
print '<input type="checkbox" name="checkall" class="checkallcheckboxes" />' . $GLOBALS['I18N']->get('Tag all users in this page');
}
$columns = array();
$columns = explode(',', getConfig('membership_columns'));
# $columns = array('country','Lastname');
$ls = new WebblerListing($GLOBALS['I18N']->get('Members'));
$ls->usePanel($paging);
while ($user = Sql_fetch_array($result)) {
$element = shortenTextDisplay($user['email']);
$ls->addElement($element, PageUrl2('user&id=' . $user['id']));
$ls->setClass($element, 'row1');
$ls_delete = '';
if ($access != 'view') {
$ls_delete = sprintf('<a title="' . $GLOBALS['I18N']->get('Delete') . '" class="del" href="javascript:deleteRec(\'%s\');"></a>', PageURL2('members', '', "start={$start}&{$pagingKeep}&id={$id}&delete=" . $user['id']));
}
$ls->addRow($element, '', $user['confirmed'] && !$user['blacklisted'] ? $ls_delete . $GLOBALS['img_tick'] : $ls_delete . $GLOBALS['img_cross']);
if ($access != 'view' && !$listAll) {
$ls->addColumn($element, $GLOBALS['I18N']->get('tag'), sprintf('<input type="checkbox" name="user[%d]" value="1" />', $user['id']));
} else {
$ls->addColumn($element, ' ', '', $user['id']);
}
## allow plugins to add columns
foreach ($GLOBALS['plugins'] as $plugin) {
$plugin->displayUsers($user, $element, $ls);