本文整理汇总了PHP中autolink函数的典型用法代码示例。如果您正苦于以下问题:PHP autolink函数的具体用法?PHP autolink怎么用?PHP autolink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了autolink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
/** @see WP_Widget::widget */
function widget($args, $instance)
{
extract($args);
//these are our widget options
$title = isset($instance['title']) ? $instance['title'] : "";
$animation = isset($instance['animation']) ? $instance['animation'] : "";
$login = isset($instance['login']) ? $instance['login'] : "";
$count = isset($instance['count']) ? $instance['count'] : "";
$consumer_key = isset($instance['consumer_key']) ? $instance['consumer_key'] : "";
$consumer_secret = isset($instance['consumer_secret']) ? $instance['consumer_secret'] : "";
$access_token = isset($instance['access_token']) ? $instance['access_token'] : "";
$access_token_secret = isset($instance['access_token_secret']) ? $instance['access_token_secret'] : "";
echo $before_widget;
require_once locate_template("/libraries/tmhOAuth/tmhOAuth.php");
require_once locate_template("/libraries/tmhOAuth/tmhUtilities.php");
$tmhOAuth = new tmhOAuth(array('consumer_key' => $consumer_key, 'consumer_secret' => $consumer_secret, 'user_token' => $access_token, 'user_secret' => $access_token_secret));
$code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array('screen_name' => $login, 'count' => $count, 'include_rts' => 'true'));
$response = $tmhOAuth->response;
?>
<div class="clearfix">
<div class="header_left">
<?php
if ($title) {
echo ((int) $animation ? str_replace("box_header", "box_header animation-slide", $before_title) : str_replace("animation-slide", "", $before_title)) . apply_filters("widget_title", $title) . $after_title;
}
?>
</div>
<div class="header_right">
<a href="#" id="latest_tweets_prev" class="scrolling_list_control_left icon_small_arrow left_white"></a>
<a href="#" id="latest_tweets_next" class="scrolling_list_control_right icon_small_arrow right_white"></a>
</div>
</div>
<div class="scrolling_list_wrapper">
<ul class="scrolling_list latest_tweets">
<?php
// require_once(get_template_directory() . "/libraries/lib_autolink.php");
require_once locate_template("/libraries/lib_autolink.php");
$tweets = json_decode($response['response']);
if (count($tweets->errors)) {
echo '<li class="icon_small_arrow right_white"><p>' . $tweets->errors[0]->message . '! ' . __('Please check your config under Appearance->Widgets->Twitter Feed!', 'medicenter') . '</p></li>';
} else {
foreach ($tweets as $tweet) {
echo '<li class="icon_small_arrow right_white"><p>' . autolink($tweet->text, 20, ' target="_blank"') . '<abbr title="' . date('c', strtotime($tweet->created_at)) . '" class="timeago">' . $tweet->created_at . '</abbr></p></li>';
}
}
?>
</ul>
</div>
<?php
echo $after_widget;
}
开发者ID:farkbarn,项目名称:hcudamp,代码行数:52,代码来源:widget-twitter.php
示例2: widget
/** @see WP_Widget::widget */
function widget($args, $instance)
{
extract($args);
//these are our widget options
$title = $instance['title'];
$login = $instance['login'];
$count = $instance['count'];
$consumer_key = $instance['consumer_key'];
$consumer_secret = $instance['consumer_secret'];
$access_token = $instance['access_token'];
$access_token_secret = $instance['access_token_secret'];
echo $before_widget;
require_once get_template_directory() . '/libraries/tmhOAuth/tmhOAuth.php';
require_once get_template_directory() . '/libraries/tmhOAuth/tmhUtilities.php';
$tmhOAuth = new tmhOAuth(array('consumer_key' => $consumer_key, 'consumer_secret' => $consumer_secret, 'user_token' => $access_token, 'user_secret' => $access_token_secret));
$code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array('screen_name' => $login, 'count' => $count, 'include_rts' => 'true'));
$response = $tmhOAuth->response;
?>
<div class="clearfix">
<div class="header_left">
<?php
if ($title) {
echo $before_title . $title . $after_title;
}
?>
</div>
<div class="header_right">
<a href="#" id="latest_tweets_prev" class="scrolling_list_control_left icon_small_arrow left_white"></a>
<a href="#" id="latest_tweets_next" class="scrolling_list_control_right icon_small_arrow right_white"></a>
</div>
</div>
<div class="scrolling_list_wrapper">
<ul class="scrolling_list latest_tweets">
<?php
require_once get_template_directory() . "/libraries/lib_autolink.php";
$tweets = json_decode($response['response']);
foreach ($tweets as $tweet) {
echo '<li class="icon_small_arrow right_white"><p>' . autolink($tweet->text, 20, ' target="_blank"') . '<abbr title="' . date('c', strtotime($tweet->created_at)) . '" class="timeago">' . $tweet->created_at . '</abbr></p></li>';
}
?>
</ul>
</div>
<?php
echo $after_widget;
}
开发者ID:unisexx,项目名称:drtooth,代码行数:46,代码来源:widget-twitter.php
示例3: processVariables
/**
* @param $template
* @param array $data
* @return mixed|string
*/
public function processVariables($template, array $data)
{
/** @var \App\Models\Account $account */
$account = $data['account'];
/** @var \App\Models\Client $client */
$client = $data['client'];
/** @var \App\Models\Invitation $invitation */
$invitation = $data['invitation'];
$invoice = $invitation->invoice;
$passwordHTML = isset($data['password']) ? '<p>' . trans('texts.password') . ': ' . $data['password'] . '<p>' : false;
$documentsHTML = '';
if ($account->hasFeature(FEATURE_DOCUMENTS) && $invoice->hasDocuments()) {
$documentsHTML .= trans('texts.email_documents_header') . '<ul>';
foreach ($invoice->documents as $document) {
$documentsHTML .= '<li><a href="' . HTML::entities($document->getClientUrl($invitation)) . '">' . HTML::entities($document->name) . '</a></li>';
}
foreach ($invoice->expenses as $expense) {
foreach ($expense->documents as $document) {
$documentsHTML .= '<li><a href="' . HTML::entities($document->getClientUrl($invitation)) . '">' . HTML::entities($document->name) . '</a></li>';
}
}
$documentsHTML .= '</ul>';
}
$variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$password' => $passwordHTML, '$viewLink' => $invitation->getLink() . '$password', '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()) . '$password', '$paymentLink' => $invitation->getLink('payment') . '$password', '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')) . '$password', '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2, '$documents' => $documentsHTML, '$autoBill' => empty($data['autobill']) ? '' : $data['autobill'], '$portalLink' => $invitation->contact->link, '$portalButton' => Form::emailViewButton($invitation->contact->link, 'portal')];
// Add variables for available payment types
foreach (Gateway::$gatewayTypes as $type) {
if ($type == GATEWAY_TYPE_TOKEN) {
continue;
}
$camelType = Utils::toCamelCase(GatewayType::getAliasFromId($type));
$variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}";
$variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
}
$includesPasswordPlaceholder = strpos($template, '$password') !== false;
$str = str_replace(array_keys($variables), array_values($variables), $template);
if (!$includesPasswordPlaceholder && $passwordHTML) {
$pos = strrpos($str, '$password');
if ($pos !== false) {
$str = substr_replace($str, $passwordHTML, $pos, 9);
}
}
$str = str_replace('$password', '', $str);
$str = autolink($str, 100);
return $str;
}
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:50,代码来源:TemplateService.php
示例4: autolink
} else {
?>
<a href="#" class="fn"><span><?php
echo $compost->name;
?>
</span></a>
<?php
}
?>
</div>
<time><?php
echo "{$compost->date} | {$compost->time}";
?>
</time>
<p class="text"><?php
echo autolink($comcontent);
?>
</p>
<?php
}
?>
<div class="pagination magz-pagination">
<ul class="pagination pull-right">
<?php
$getpage = $val->validasi($_GET['page'], 'sql');
$jmldata = $tabledcom->numRowByAnd(id_post, $idpost, active, 'Y');
$jmlhalaman = $p->jumlahHalaman($jmldata, $batas);
$linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "detailpost", $currentDpost->seotitle);
echo "{$linkHalaman}";
?>
开发者ID:benzshaddow,项目名称:mitraCMS,代码行数:31,代码来源:detailpost.php
示例5: testAutoUrl
public function testAutoUrl()
{
$url = 'http://githu.com/fgrehm/pearfarm';
$out = autolink('bar ' . $url . ' foo');
$this->assertEquals($out, 'bar ' . TagHelper::content_tag('a', $url, array('href' => $url, 'title' => $url, 'target' => '_blank')) . ' foo');
}
开发者ID:scottdavis,项目名称:pearfarm_channel_server,代码行数:6,代码来源:HelperTest.php
示例6: date
<tr>
<td width="50" align="right"><img src="images/memo_date.gif" width="23" height="15"></td>
<td><img src="images/t.gif" width="10" height="3"><br>
<?php
echo date("Y년 m월 d일 H시 i분", $now_data[reg_date]);
?>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#EBD9D9" align="center" style=padding:0px;><img src="images/t.gif" width="10" height="1"></td>
</tr>
<tr>
<td align="right" valign="top"><img src="images/memo_memo.gif" width="31" height="15"></td>
<td style='word-break:break-all;'><img src="images/t.gif" width="10" height="3"><br>
<?php
echo autolink(nl2br(stripslashes(del_html($now_data[memo]))));
?>
<br>
<br>
</td>
</tr>
<tr>
<td align="right" valign="top"> </td>
<td><a href=<?php
echo $PHP_SELF;
?>
?exec=del&no=<?php
echo $no;
?>
&page=<?php
echo $page;
开发者ID:kkskipper,项目名称:KNOWME,代码行数:31,代码来源:member_memo2.php
示例7: showTimeline
/**
* @since version 0.90
*
* @param $rand
**/
function showTimeline($rand)
{
global $CFG_GLPI, $DB, $autolink_options;
//get ticket actors
$ticket_users_keys = $this->getTicketActors();
$user = new User();
$group = new Group();
$followup_obj = new TicketFollowup();
$pics_url = $CFG_GLPI['root_doc'] . "/pics/timeline";
$timeline = $this->getTimelineItems();
$autolink_options['strip_protocols'] = false;
//display timeline
echo "<div class='timeline_history'>";
$tmp = array_values($timeline);
$first_item = array_shift($tmp);
// show approbation form on top when ticket is solved
if ($this->fields["status"] == CommonITILObject::SOLVED) {
echo "<div class='approbation_form' id='approbation_form{$rand}'>";
$followup_obj->showApprobationForm($this);
echo "</div>";
}
// show title for timeline
self::showTimelineHeader();
$timeline_index = 0;
foreach ($timeline as $item) {
$options = array('parent' => $this, 'rand' => $rand);
if ($obj = getItemForItemtype($item['type'])) {
$obj->fields = $item['item'];
} else {
$obj = $item;
}
Plugin::doHook('pre_show_item', array('item' => &$obj, 'options' => &$options));
if (is_array($obj)) {
$item_i = $obj['item'];
} else {
$item_i = $obj->fields;
}
$date = "";
if (isset($item_i['date'])) {
$date = $item_i['date'];
}
if (isset($item_i['date_mod'])) {
$date = $item_i['date_mod'];
}
// check if curent item user is assignee or requester
$user_position = 'left';
if (isset($ticket_users_keys[$item_i['users_id']]) && $ticket_users_keys[$item_i['users_id']] == CommonItilActor::ASSIGN || $item['type'] == 'Assign') {
$user_position = 'right';
}
//display solution in middle
if ($timeline_index == 0 && $item['type'] == "Solution" && $this->fields["status"] == CommonITILObject::SOLVED) {
$user_position .= ' middle';
}
echo "<div class='h_item {$user_position}'>";
echo "<div class='h_info'>";
echo "<div class='h_date'>" . Html::convDateTime($date) . "</div>";
if ($item_i['users_id'] !== false) {
echo "<div class='h_user'>";
if (isset($item_i['users_id']) && $item_i['users_id'] != 0) {
$user->getFromDB($item_i['users_id']);
echo "<div class='tooltip_picture_border'>";
echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($user->fields['picture']) . "'>";
echo "</div>";
echo "<span class='h_user_name'>";
$userdata = getUserName($item_i['users_id'], 2);
echo $user->getLink() . " ";
echo Html::showToolTip($userdata["comment"], array('link' => $userdata['link']));
echo "</span>";
} else {
_e("Requester");
}
echo "</div>";
// h_user
}
echo "</div>";
//h_date
echo "<div class='h_content " . $item['type'] . (isset($item_i['status']) ? " " . $item_i['status'] : "") . "'" . "id='viewitem" . $item['type'] . $item_i['id'] . $rand . "'>";
if (isset($item_i['can_edit']) && $item_i['can_edit']) {
echo "<div class='edit_item_content'></div>";
echo "<span class='cancel_edit_item_content'></span>";
}
echo "<div class='displayed_content'>";
if (!in_array($item['type'], array('Document_Item', 'Assign')) && $item_i['can_edit']) {
echo "<span class='edit_item' ";
echo "onclick='javascript:viewEditSubitem" . $this->fields['id'] . "{$rand}(event, \"" . $item['type'] . "\", " . $item_i['id'] . ", this, \"viewitem" . $item['type'] . $item_i['id'] . $rand . "\")'";
echo "></span>";
}
if (isset($item_i['requesttypes_id']) && file_exists("{$pics_url}/" . $item_i['requesttypes_id'] . ".png")) {
echo "<img src='{$pics_url}/" . $item_i['requesttypes_id'] . ".png' title='' class='h_requesttype' />";
}
if (isset($item_i['content'])) {
$content = $item_i['content'];
$content = autolink($content, 40);
//$content = nl2br($content);
$long_text = "";
//.........这里部分代码省略.........
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:ticket.class.php
示例8: while
}
</style>
</head>
<body>
<div id="dataStore">
<h1>FearlessBot Data Storage</h1>
<table>
<tr>
<th>Keyword</th>
<th>Value</th>
<th>Added By</th>
</tr>
<?php
$query = $db->query("SELECT keyword, value, username FROM data_store LEFT JOIN members ON data_store.owner=members.id WHERE approved=1 ORDER BY keyword");
while ($row = $query->fetch_array()) {
echo "<tr><td>" . autolink($row['keyword'], 50) . "</td><td>" . autolink($row['value'], 50) . "</td><td>" . $row['username'] . "</td></tr>";
}
?>
</table>
</div>
<div id="channelStats">
<h1>Channel Stats</h1>
<table>
<tr><th>Channel</th><th>Total Messages</th></tr>
<?php
$query = $db->query("SELECT * FROM channel_stats WHERE channel IN ('119490967253286912', '115332333745340416')");
while ($row = $query->fetch_array()) {
echo "<tr><td>" . $row['name'] . "</td><td>" . $row['total_messages'] . "</td></tr>";
}
?>
</table>
开发者ID:Donran,项目名称:FearlessBot,代码行数:31,代码来源:fearlessdata.php
示例9: convert_text
function convert_text($text = '', $nl2br = true)
{
// {{{
if ($nl2br) {
$str = nl2br(strip_tags($text));
} else {
$str = strip_tags($text);
}
return autolink($str);
}
开发者ID:prog106,项目名称:shoes,代码行数:10,代码来源:basic_helper.php
示例10: processVariables
private function processVariables($template, $data)
{
$account = $data['account'];
$client = $data['client'];
$invitation = $data['invitation'];
$invoice = $invitation->invoice;
$passwordHTML = isset($data['password']) ? '<p>' . trans('texts.password') . ': ' . $data['password'] . '<p>' : false;
$variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$password' => $passwordHTML, '$viewLink' => $invitation->getLink() . '$password', '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()) . '$password', '$paymentLink' => $invitation->getLink('payment') . '$password', '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')) . '$password', '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2];
// Add variables for available payment types
foreach (Gateway::$paymentTypes as $type) {
$camelType = Gateway::getPaymentTypeName($type);
$type = Utils::toSnakeCase($camelType);
$variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}";
$variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
}
$includesPasswordPlaceholder = strpos($template, '$password') !== false;
$str = str_replace(array_keys($variables), array_values($variables), $template);
if (!$includesPasswordPlaceholder && $passwordHTML) {
$pos = strrpos($str, '$password');
if ($pos !== false) {
$str = substr_replace($str, $passwordHTML, $pos, 9);
}
}
$str = str_replace('$password', '', $str);
$str = autolink($str, 100);
return $str;
}
开发者ID:sseshachala,项目名称:invoiceninja,代码行数:27,代码来源:ContactMailer.php
示例11: Utf8ToWin
}
if (isset($_REQUEST['add'])) {
$name = Utf8ToWin(substr(replacer(strip_tags($_REQUEST['name'])), 0, $maxname));
$comment = Utf8ToWin(str_replace("\n", '<br>', substr(replacer($_REQUEST['comment']), 0, $maxmes)));
$name = wordwrap($name, $namewrap, ' ', 1);
$comment = wordwrap($comment, $comwrap, ' ', 1);
$timezone = floor($timezone);
if ($timezone < -12 || $timezone > 12) {
$timezone = 0;
}
$date = gmdate('d.m.Y', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
$time = gmdate('H:i', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
//$datetime=date('d.m.Y H:i');
//if ($liteurl==1) {$comment=preg_replace("#([^\[img\]])(http|https|ftp|goper):\/\/([a-zA-Z0-9\.\?&=\;\-\/_]+)([\W\s<\[]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>\\4", $comment);}
if ($liteurl == 1) {
$comment = autolink($comment);
}
if ($antimat == 1) {
$name = removeBadWords($name);
$email = removeBadWords($email);
$comment = removeBadWords($comment);
}
$ip = getIpAddress();
if ($ipinfodb == 1) {
$url = "http://api.ipinfodb.com/v3/ip-city/?key={$key}&ip={$ip}&format=json";
$data = json_decode(utf8_encode(file_get_contents($url)));
$country_code = $data->countryCode;
$country_city = ucwords(strtolower($data->cityName . ', ' . $data->countryName));
//$image = strtolower($country_code) . ".png";
$image = strtolower($country_code);
$country_img = "<div class=\"{$image}\" title=\"{$country_city}\"></div>";
开发者ID:Andrey939393,项目名称:Labs,代码行数:31,代码来源:comments.php
示例12: mysql_query
include "koneksi.php";
include "header.php";
include "fungsi_autolink.php";
$sql = "SELECT * FROM\ttopik\n\t\t WHERE id_topik='{$_GET['id']}'";
$hasil = mysql_query($sql);
while ($r = mysql_fetch_array($hasil)) {
echo "<h3>Topik: {$r['subjek']}</h3>";
$sql2 = "SELECT tanggapan.id_topik, tanggapan.isi_tanggapan, tanggapan.tgl_tanggapan, tanggapan.username, anggota.username, anggota.email \t\n FROM tanggapan LEFT JOIN anggota \n ON tanggapan.username=anggota.username \n WHERE id_topik='{$_GET['id']}'";
$hasil2 = mysql_query($sql2);
while ($r2 = mysql_fetch_array($hasil2)) {
$tgl_tanggapan = date('d-m-Y/H:i:s', strtotime($r2['tgl_tanggapan']));
$email = $r2['email'];
$hurufkecil = strtolower($email);
$gambar = md5($hurufkecil);
$isi = nl2br($r2['isi_tanggapan']);
// membuat paragraf pada isi komentar
$isi_tanggapan = autolink($isi);
//echo ;
echo "<table>\n <tr>\n\t\t\t\t\t<td colspan=2 bgcolor=#cccccc><small><i>{$tgl_tanggapan}</i></small></td>\n </tr>\n <tr>\t\t \n\t\t\t\t\t<td width=150 bgcolor=#EFF0F4 align=center>{$r2['username']}<br />\n <img src='http://www.gravatar.com/avatar.php?gravatar_id={$gambar}'></td>\n\t\t\t\t\t<td width=550>{$isi_tanggapan}</td>\n\t\t\t\t\t</tr></table>";
}
if (!$_SESSION['signed_in']) {
echo "Anda harus <a href=signin.php>Login</a> dulu untuk bisa berdiskusi. <br />\n Atau Anda juga bisa <a href=signup.php>Daftar</a> dulu menjadi anggota baru.";
} else {
//show reply box
echo "<h3>Tanggapan:</h3>\n\t\t\t\t\t<form method=post action=tanggapan.php?id={$r['id_topik']}>\n\t\t\t\t\t\t<textarea name=isi_tanggapan cols=60 rows=5 /></textarea><br />\n\t\t\t\t\t\t<input type=submit value=Kirim />\n\t\t\t\t\t</form>";
}
// Apabila topik dibaca, maka tambahkan berapa kali dibacanya
$sql3 = mysql_query("UPDATE topik SET dibaca={$r['dibaca']}+1 WHERE id_topik='{$_GET['id']}'");
}
include "footer.php";
开发者ID:fajarlabs,项目名称:php_unit_test,代码行数:30,代码来源:topik.php
示例13: getQuoteAttribute
public function getQuoteAttribute($value)
{
return autolink(htmlentities($value), 50, ' rel="nofollow" target="_blank"');
}
开发者ID:shiftosnext,项目名称:Quotinator,代码行数:4,代码来源:Quote.php
示例14: autolink
?>
<a href="mensaje.php?accion=eliminar&mensaje=<?php
echo $msg['id_mensaje'];
?>
" style="font-size:xx-small">Eliminar mensaje</a><?php
}
?>
</td>
<td align="right"><?php
echo $msg['diashow'];
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo autolink(nl2br($msg['mensaje']));
?>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php
}
?>
<tr>
<td colspan="2"><a href="mensaje.php">Ver más mensajes</a></td>
</tr>
</table>
</div>
</body>
开发者ID:seppo0010,项目名称:i-prode,代码行数:31,代码来源:fecha.php
示例15: processVariables
private function processVariables($template, $data)
{
$account = $data['account'];
$client = $data['client'];
$invitation = $data['invitation'];
$invoice = $invitation->invoice;
$variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$viewLink' => $invitation->getLink(), '$viewButton' => HTML::emailViewButton($invitation->getLink(), $invoice->getEntityType()), '$paymentLink' => $invitation->getLink('payment'), '$paymentButton' => HTML::emailPaymentButton($invitation->getLink('payment')), '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2];
// Add variables for available payment types
foreach (Gateway::$paymentTypes as $type) {
$camelType = Gateway::getPaymentTypeName($type);
$type = Utils::toSnakeCase($camelType);
$variables["\${$camelType}Link"] = $invitation->getLink() . "/{$type}";
$variables["\${$camelType}Button"] = HTML::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
}
$str = str_replace(array_keys($variables), array_values($variables), $template);
$str = autolink($str, 100);
return $str;
}
开发者ID:gauravvaidya11,项目名称:invoiceninja,代码行数:18,代码来源:ContactMailer.php
示例16: autolink
<code>
pear install <?php
echo $package->user->pear_farm_url();
?>
/<?php
echo $package->name;
?>
-<?php
echo $version->version;
?>
</code>
<br />
<br />
<div id='summary'>
<?php
echo autolink($data['summary']);
?>
</div>
<br />
<br />
<div id='maintainers'>
<h3>Maintainers:</h3>
<?php
foreach (array('lead', 'developer', 'contributor', 'helper') as $type) {
if (!isset($data[$type])) {
continue;
}
?>
<ul class='maintainer_info'>
<?php
if (is_assoc($data[$type])) {
开发者ID:scottdavis,项目名称:pearfarm_channel_server,代码行数:31,代码来源:show.php
示例17: foreach
} else {
foreach ($data[$type] as $lead) {
?>
<li><span class='title'><?php
echo ucwords($type);
?>
:</span> <?php
echo h($lead['name']);
?>
</li>
<?php
}
}
?>
</ul>
<?php
}
?>
</li>
<li><span class='title'>License:</span> <?php
echo link_to(h($data['license']['_content']), $data['license']['attribs']['uri'], array('target' => '_blank'));
?>
</li>
<li><span class='title'>Notes:</span> <?php
echo autolink(h($data['notes']));
?>
</li>
</ul>
<?php
}
开发者ID:scottdavis,项目名称:pearfarm_channel_server,代码行数:31,代码来源:_version_info.php
示例18: file
$username = $_POST["username"];
$submittedanswer = $_POST["submittedanswer"];
$lines = file($filename);
function decodeURIComponent($str)
{
$str = preg_replace("/%u([0-9a-f]{3,4})/i", "&#x\\1;", urldecode($str));
return html_entity_decode($str, null, 'UTF-8');
}
//doesn't work
function autolink($content)
{
$re = '/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/';
$content = preg_replace($re, '<a href="$0" rel="nofollow">$0</a>', $content);
return $content;
}
$submittedanswer = autolink($submittedanswer);
$submittedanswer = str_replace("\n", '\\-n', $submittedanswer);
for ($seeifalreadyanswered = 10; $seeifalreadyanswered < count($lines); $seeifalreadyanswered++) {
$individualparts = preg_split("/(!n!)/", $lines[$seeifalreadyanswered], -1, PREG_SPLIT_DELIM_CAPTURE);
if ($individualparts[6] == $username) {
exit("You've already answered!");
}
}
$submittedanswer = strip_tags($submittedanswer);
$submittedanswer = str_replace("!n!", '', $submittedanswer);
$submittedanswer = str_replace("!c!", '', $submittedanswer);
//sanitaze stuff here
array_push($lines, "\n" . "0!n!.!f!.!n!.!n!" . $username . "!n!" . $submittedanswer);
file_put_contents($filename, $lines);
$filename = substr($filename, 0, strlen($filename) - 4);
$title = $filename;
开发者ID:splacorn,项目名称:misconception,代码行数:31,代码来源:answers.php
示例19: stripslashes
// 메일
$subject = $reply_data[subject] = stripslashes($reply_data[subject]);
// 제목
$subject = cut_str($subject, $setup[cut_length]);
// 제목 자르는 부분
if ($member[level] <= $setup[grant_view]) {
$subject = "<a href=view.php?{$href}{$sort}&no={$reply_data['no']}>" . $subject . "</a>";
}
// 제목에 링크 거는 부분;
$homepage = $reply_data[homepage] = stripslashes($reply_data[homepage]);
if ($homepage) {
$homepage = "<a href={$homepage} target=_blank>{$homepage}</a>";
}
$memo = $reply_data[memo] = nl2br(stripslashes($reply_data[memo]));
// 내용
$memo = autolink($memo);
// 자동링크 거는 부분;;
$hit = $reply_data[hit];
// 조회수
$vote = $reply_data[vote];
// 투표수
if ($setup[use_showip] || $is_admin) {
$ip = "IP Address : " . $reply_data[ip] . " ";
}
// 아이피
$comment_num = "[" . $reply_data[total_comment] . "]";
// 간단한 답글 수
$sitelink1 = $reply_data[sitelink1] = stripslashes($reply_data[sitelink1]);
$sitelink2 = $reply_data[sitelink2] = stripslashes($reply_data[sitelink2]);
if ($sitelink1) {
$sitelink1 = "<a href={$sitelink1} target=_blank>{$sitelink1}</a>";
开发者ID:kkskipper,项目名称:KNOWME,代码行数:31,代码来源:reply_check.php
示例20: list_check
function list_check(&$data, $view_check = 0)
{
global $keyword, $sn, $ss, $sc, $setup, $member, $href, $id, $dir, $category_data, $is_admin, $_zbResizeCheck, $name, $email, $subject, $sort, $prev_no, $no, $homepage, $memo, $hit, $vote, $ip, $comment_num, $sitelink1, $sitelink2, $file_name1, $file_name2, $file_download1, $file_download2, $file_size1, $file_size2, $upload_image1, $upload_image2, $category_name, $date, $reg_date, $insert, $icon, $face_image, $number, $loop_number, $a_file_link1, $a_file_link2, $a_reply, $a_delete, $a_modify, $zbLayer, $_zbCheckNum, $_listCheckTime;
$_listCheckTimeStart = getmicrotime();
if ($view_check) {
$setup[only_board] = 0;
}
// 제목에 5줄로 툴바 만듬
if ($setup[use_status]) {
$tmpData = explode("\n", stripslashes($data[memo]));
$totalCommentLineNum = count($tmpData);
if ($totalCommentLineNum > 10) {
$showCommentStr_tail .= "\n" . ($totalCommentLineNum - 10) . " lines more... (total : {$totalCommentLineNum} lines)";
$tmpData_Count = 10;
} else {
$tmpData_Count = $totalCommentLineNum;
}
$showCommentStr = "";
for ($i = 0; $i < $tmpData_Count; $i++) {
$tmpStr = trim($tmpData[$i]);
if ($tmpStr) {
$showCommentStr .= $tmpStr . "\n";
}
}
$showCommentStr = str_replace("'", "", $showCommentStr);
$showCommentStr = str_replace("\"", "", $showCommentStr);
$showCommentStr .= $showCommentStr_tail;
}
$_zbCount = check_zbLayer($data);
// HTML 사용일 경우 현재 회원의 html 권한이 없거나 관리자가 아니라면 style 속성을 제거
if ($data[use_html] && $data[islevel] > $setup[grant_html]) {
$style_pattern = "/(\\<.*?)style=(.*?)(\\>?)/i";
$data[memo] = preg_replace($style_pattern, "\\1\\3", $data[memo]);
}
// 검색어에 해당하는 글자를 빨간;; 색으로 바꾸어줌;;
if ($keyword) {
$keyword_pattern = "/{$keyword}/i";
if ($sn == "on") {
$data[name] = preg_replace($keyword_pattern, "<font color=FF001E style=background-color:FFF000;>{$keyword}</font>", $data[name]);
}
if ($ss == "on") {
$data[subject] = preg_replace($keyword_pattern, "<font color=FF001E style=background-color:FFF000;>{$keyword}</font>", $data[subject]);
}
if ($ss == "on" && $setup[cut_length] > 0) {
$setup[cut_length] = $setup[cut_length] + 52;
}
}
// ' 등의 특수문자때문에 붙인 \(역슬래쉬)를 떼어낸다
$name = $data[name] = stripslashes($data[name]);
// 이름
$temp_name = get_private_icon($data[ismember], "2");
if ($temp_name) {
$name = "<img src='{$temp_name}' border=0 align=absmiddle>";
}
$subject = $data[subject] = stripslashes($data[subject]);
// 제목
//$subject=$data[subject];
$subject = cut_str($subject, $setup[cut_length]);
// 제목 자르는 부분
$hit = $data[hit];
|
请发表评论