本文整理汇总了PHP中getSiteName函数的典型用法代码示例。如果您正苦于以下问题:PHP getSiteName函数的具体用法?PHP getSiteName怎么用?PHP getSiteName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getSiteName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayHeader
/**
* displayHeader
*
* @return void
*/
function displayHeader()
{
$params = array('currentUserId' => $this->fcmsUser->id, 'sitename' => getSiteName(), 'nav-link' => getNavLinks(), 'pagetitle' => T_('Members'), 'pageId' => 'members', 'path' => URL_PREFIX, 'displayname' => $this->fcmsUser->displayName, 'version' => getCurrentVersion(), 'year' => date('Y'));
displayPageHeader($params);
$order = isset($_GET['order']) ? $_GET['order'] : 'alphabetical';
$alpha = $age = $part = $act = $join = '';
if ($order == 'alphabetical') {
$alpha = 'class="selected"';
} elseif ($order == 'age') {
$age = 'class="selected"';
} elseif ($order == 'participation') {
$part = 'class="selected"';
} elseif ($order == 'activity') {
$act = 'class="selected"';
} elseif ($order == 'joined') {
$join = 'class="selected"';
}
echo '
<div id="leftcolumn">
<h3>' . T_('Views') . '</h3>
<ul>
<li ' . $alpha . '><a href="?order=alphabetical">' . T_('Alphabetical') . '</a></li>
<li ' . $age . '><a href="?order=age">' . T_('Age') . '</a></li>
<li ' . $part . '><a href="?order=participation">' . T_('Participation') . '</a></li>
<li ' . $act . '><a href="?order=activity">' . T_('Last Seen') . '</a></li>
<li ' . $join . '><a href="?order=joined">' . T_('Joined') . '</a></li>
</ul>
</div>
<div id="maincolumn">';
}
示例2: __construct
function __construct()
{
$guid = getInput("guid");
$reply = getInput("reply");
if (!$reply) {
new SystemMessage("Message body cannot be left empty.");
forward();
}
$message = getEntity($guid);
$to = getLoggedInUserGuid() == $message->to ? $message->from : $message->to;
$from = getLoggedInUserGuid();
$to_user = getEntity($to);
$from_user = getEntity($from);
$message_element = new Messageelement();
$message_element->message = $reply;
$message_element->to = $to;
$message_element->from = $from;
$message_element->container_guid = $guid;
$message_element->save();
$link = getSiteURL() . "messages";
notifyUser("message", $to, getLoggedInUserGuid(), $to);
sendEmail(array("to" => array("name" => $to_user->full_name, "email" => $to_user->email), "from" => array("name" => getSiteName(), "email" => getSiteEmail()), "subject" => "You have a new message from " . getLoggedInUser()->full_name, "body" => "You have received a new message from " . getLoggedInUser()->full_name . "<br/><a href='{$link}'>Click here to view it.</a>", "html" => true));
new SystemMessage("Your message has been sent.");
forward("messages/" . $message->guid);
}
示例3: __construct
/**
* Constructor
*
* @return void
*/
public function __construct($fcmsError, $fcmsDatabase, $fcmsUser)
{
$this->fcmsError = $fcmsError;
$this->fcmsDatabase = $fcmsDatabase;
$this->fcmsUser = $fcmsUser;
$this->fcmsTemplate = array('sitename' => cleanOutput(getSiteName()), 'nav-link' => getAdminNavLinks(), 'pagetitle' => T_('Administration: YouTube'), 'path' => URL_PREFIX, 'displayname' => $fcmsUser->displayName, 'version' => getCurrentVersion(), 'year' => date('Y'));
$this->control();
}
示例4: action
function action($data = array(), $post = array(), $id)
{
$ci =& get_instance();
$ci->load->library('session');
if (isset($this->ini['sandbox']) && isset($this->ini['api_login_id']) && isset($this->ini['transaction_key']) && isset($post['card_num']) && isset($post['exp_date'])) {
require dirname(__FILE__) . '/lib/shared/AuthorizeNetRequest.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetTypes.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetXMLResponse.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetResponse.php';
require dirname(__FILE__) . '/lib/AuthorizeNetAIM.php';
define("AUTHORIZENET_API_LOGIN_ID", $this->ini['api_login_id']);
define("AUTHORIZENET_TRANSACTION_KEY", $this->ini['transaction_key']);
define("AUTHORIZENET_SANDBOX", $this->ini['sandbox']);
$sale = new AuthorizeNetAIM();
$sale->amount = number_format($data['amount'], 2);
$sale->card_num = $post['card_num'];
$sale->exp_date = $post['exp_date'];
$response = $sale->authorizeAndCapture();
if ($response->approved) {
$ci =& get_instance();
$ci->load->model('order_m');
$order = $ci->order_m->getOrderNumber($data['item_number']);
if (count($order) > 0) {
$update['status'] = 'completed';
$updatehis['order_id'] = $order->id;
$updatehis['label'] = 'order_status';
$updatehis['content'] = json_encode(array($order->order_number => 'completed'));
$updatehis['date'] = date('Y-m-d H:i:s');
$ci->order_m->_table_name = 'orders';
if ($ci->order_m->save($update, $order->id)) {
$ci->order_m->_table_name = 'orders_histories';
$ci->order_m->save($updatehis);
$ci->load->helper('cms');
$user = $ci->session->userdata('user');
//params shortcode email.
$params = array('username' => $user['username'], 'email' => $user['email'], 'date' => date('Y-m-d H:i:s'), 'shop' => getSiteName(config_item('site_name')), 'shop_url' => site_url(), 'total' => number_format($data['amount'], 2), 'order_number' => $data['item_number'], 'status' => 'completed');
//config email.
$config = array('mailtype' => 'html');
$subject = configEmail('sub_order_status', $params);
$message = configEmail('order_status', $params);
$ci->load->library('email', $config);
$ci->email->from(getEmail(config_item('admin_email')), getSiteName(config_item('site_name')));
$ci->email->to($user['email']);
$ci->email->subject($subject);
$ci->email->message($message);
$ci->email->send();
}
}
$ci->session->set_flashdata('msg', 'Thanks you for payment!');
if (isset($this->ini['message'])) {
$ci->session->set_flashdata('message', $this->ini['message']);
}
} else {
$ci->session->set_flashdata('error', 'Your payment not success!');
}
}
redirect(site_url('payment/confirm'));
}
示例5: displayHeader
/**
* displayHeader
*
* Displays the header of the page, including the leftcolumn navigation.
*
* @return void
*/
function displayHeader()
{
$params = array('currentUserId' => $this->fcmsUser->id, 'sitename' => cleanOutput(getSiteName()), 'nav-link' => getNavLinks(), 'pagetitle' => T_('Polls'), 'pageId' => 'poll', 'path' => URL_PREFIX, 'displayname' => $this->fcmsUser->displayName, 'version' => getCurrentVersion(), 'year' => date('Y'));
displayPageHeader($params);
$navParams = array('navigation' => array(array('url' => 'polls.php', 'textLink' => T_('Latest')), array('url' => 'polls.php?action=pastpolls', 'textLink' => T_('Past Polls'))));
if ($this->fcmsUser->access < 2) {
$navParams['actions'] = array(array('url' => 'admin/polls.php', 'textLink' => T_('Administrate')));
}
loadTemplate('global', 'page-navigation', $navParams);
}
示例6: getEmailHeaders
/**
* getEmailHeaders
*
* @param string $name
* @param string $email
*
* @return string
*/
function getEmailHeaders($name = '', $email = '')
{
if (empty($name)) {
$name = getSiteName();
}
if (empty($email)) {
$email = getContactEmail();
}
return "From: {$name} <{$email}>\r\n" . "Reply-To: {$email}\r\n" . "Content-Type: text/plain; charset=UTF-8;\r\n" . "MIME-Version: 1.0\r\n" . "X-Mailer: PHP/" . phpversion();
}
示例7: displayHeader
/**
* displayHeader
*
* @return void
*/
function displayHeader()
{
$params = array('currentUserId' => $this->fcmsUser->id, 'sitename' => getSiteName(), 'nav-link' => getNavLinks(), 'pagetitle' => T_('Notifications'), 'pageId' => 'notifications', 'path' => URL_PREFIX, 'displayname' => $this->fcmsUser->displayName, 'version' => getCurrentVersion(), 'year' => date('Y'));
$params['javascript'] = '
<script type="text/javascript">
$(document).ready(function() {
initChatBar(\'' . T_('Chat') . '\', \'' . URL_PREFIX . '\');
});
</script>';
loadTemplate('global', 'header', $params);
}
示例8: __construct
public function __construct()
{
gateKeeper();
$email_users = array();
$container_guid = getInput("container_guid");
$topic = getEntity($container_guid);
$category_guid = $topic->container_guid;
$category = getEntity($category_guid);
$description = getInput("comment");
$comment = new Forumcomment();
$comment->description = $description;
$comment->container_guid = $container_guid;
$comment->category_guid = $category_guid;
$comment->owner_guid = getLoggedInUserGuid();
$comment->save();
new SystemMessage("Your comment has been posted.");
new Activity(getLoggedInUserGuid(), "forum:comment:posted", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $topic->getURL(), $topic->title, truncate($comment->description)), $container_guid, $category->access_id);
$all_comments = getEntities(array("type" => "Forumcomment", "metadata_name" => "container_guid", "metadata_value" => $container_guid));
$notify_users = array($topic->owner_guid);
$container_owner_guid = $topic->owner_guid;
$container_owner = getEntity($container_owner_guid);
if ($container_owner->notify_when_forum_comment_topic_i_own == "email" || $container_owner->notify_when_forum_comment_topic_i_own == "both") {
$email_users[] = $container_guid;
}
foreach ($all_comments as $comment) {
$user_guid = $comment->owner_guid;
$user = getEntity($user_guid);
switch ($user->notify_when_forum_comment_topic_i_own) {
case "both":
$notify_users[] = $comment->owner_guid;
$email_users[] = $comment->owner_guid;
break;
case "email":
$email_users[] = $comment->owner_guid;
break;
case "site":
$notify_users[] = $comment->owner_guid;
break;
case "none":
break;
}
}
$notify_users = array_unique($notify_users);
foreach ($notify_users as $user_guid) {
notifyUser("forumcomment", $container_guid, getLoggedInUserGuid(), $user_guid);
}
foreach ($email_users as $user) {
$params = array("to" => array($user->full_name, $user->email), "from" => array(getSiteName(), getSiteEmail()), "subject" => "You have a new comment.", "body" => "You have a new comment. Click <a href='{$url}'>Here</a> to view it.", "html" => true);
sendEmail($params);
}
forward();
}
示例9: __construct
public function __construct($data = NULL)
{
gateKeeper();
$logged_in_user = getLoggedInUser();
if (!$data) {
// Get the comment body
$comment_body = getInput("comment");
// Get container url
$container_guid = getInput("guid");
} else {
$comment_body = $data['comment_body'];
$container_guid = $data['container_guid'];
}
$container = getEntity($container_guid);
$container_owner_guid = $container->owner_guid;
if ($container_owner_guid) {
$container_owner = getEntity($container_owner_guid);
}
$url = $container->getURL();
if (!$url) {
$url = getSiteURL();
}
// Create the comment
CommentsPlugin::createComment($container_guid, $comment_body);
if ($container_owner_guid) {
if ($container_owner_guid != getLoggedInUserGuid()) {
$params = array("to" => array($container_owner->full_name, $container_owner->email), "from" => array(getSiteName(), getSiteEmail()), "subject" => "You have a new comment.", "body" => "You have a new comment. Click <a href='{$url}'>Here</a> to view it.", "html" => true);
switch ($logged_in_user->getSetting("notify_when_comment")) {
case "email":
sendEmail($params);
break;
case "none":
break;
case "site":
notifyUser("comment", $container_guid, getLoggedInUserGuid(), $container_owner_guid);
break;
case "both":
sendEmail($params);
notifyUser("comment", $container_guid, getLoggedInUserGuid(), $container_owner_guid);
break;
}
}
}
runHook("add:comment:after");
if (getLoggedInUserGuid() != $container_owner_guid && $container_owner_guid) {
new Activity(getLoggedInUserGuid(), "activity:comment", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $container_owner->getURL(), $container_owner->full_name, $container->getURL(), translate($container->type), truncate($comment_body)));
} elseif (!$container_owner_guid) {
new Activity(getLoggedInUserGuid(), "activity:comment:own", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $container->getURL(), $container->title, translate($container->type), truncate($comment_body)));
}
// Return to container page.
forward();
}
示例10: sendVerificationEmail
static function sendVerificationEmail($user)
{
if ($user->verified == "true") {
return false;
}
$user->email_verification_code = randString(70);
$user->save();
if (sendEmail(array("from" => array("email" => getSiteEmail(), "name" => getSiteName()), "to" => array("email" => $user->email, "name" => $user->first_name . " " . $user->last_name), "subject" => display("email/verify_email_subject", array("user_guid" => $user->guid)), "body" => display("email/verify_email_body", array("user_guid" => $user->guid))))) {
return true;
}
$user->email_verification_code = NULL;
$user->save();
return false;
}
示例11: termSearchByUrl
public function termSearchByUrl(Request $request)
{
$url = $request['url'];
$connection = getSiteName(getDomain($url));
$path_alias = getUri($url);
if (empty($connection) || empty($path_alias)) {
return AJAX::argumentError();
}
$termModule = new TermModule($connection);
$result = $termModule->getTermInfo(array('path_alias' => $path_alias));
if (count($result) > 0) {
return AJAX::success(array('info' => $result));
} else {
return AJAX::notExist();
}
}
示例12: productSearchByURL
public function productSearchByURL(Request $request)
{
$url = $request['url'];
$connection = getSiteName(getDomain($url));
$sn = getSn($url);
if (empty($connection) || empty($sn)) {
return AJAX::argumentError();
}
$termModule = new ProductModule($connection);
$result = $termModule->getProductInfo(array('sn' => $sn));
if (count($result) > 0) {
return AJAX::success(array('info' => $result));
} else {
return AJAX::notExist();
}
}
示例13: __construct
function __construct()
{
gateKeeper();
$to = getInput("to");
$from = getLoggedInUserGuid();
$subject = getInput("subject");
$message_body = getInput("message");
if (!$message_body) {
new SystemMessage("Message body cannot be left blank.");
forward();
}
// Make sure recipient is a user
$to_user = getEntity($to);
classGateKeeper($to_user, "User");
// Make sure logged in user and to user are friends
if (!FriendsPlugin::friends(getLoggedInUserGuid(), $to)) {
forward();
}
// Create a new message
$message = new Message();
$message->to = $to;
$message->from = $from;
$message->subject = $subject;
$message->save();
$message_element = new Messageelement();
$message_element->to = $to;
$message_element->from = $from;
$message_element->subject = $subject;
$message_element->message = $message_body;
$message_element->container_guid = $message->guid;
$message_element->save();
$link = getSiteURL() . "messages";
$notify = $to_user->notify_when_message;
if (!$notify) {
$notify = "both";
}
if ($notify == "both" || $notify == "site") {
notifyUser("message", $to, $from, $to);
}
if ($notify == "both" || ($notify = "email")) {
sendEmail(array("to" => array("name" => $to_user->full_name, "email" => $to_user->email), "from" => array("name" => getSiteName(), "email" => getSiteEmail()), "subject" => "You have a new message from " . getLoggedInUser()->full_name, "body" => "You have received a new message from " . getLoggedInUser()->full_name . "<br/><a href='{$link}'>Click here to view it.</a>", "html" => true));
}
new SystemMessage("Your message has been sent.");
forward();
}
示例14: displayHeader
/**
* displayHeader
*
* @return void
*/
function displayHeader()
{
$params = array('currentUserId' => $this->fcmsUser->id, 'sitename' => getSiteName(), 'nav-link' => getNavLinks(), 'pagetitle' => T_('Help'), 'pageId' => 'help', 'path' => URL_PREFIX, 'displayname' => getUserDisplayName($this->fcmsUser->id), 'version' => getCurrentVersion());
displayPageHeader($params);
echo '
<div id="leftcolumn">
<h3>' . T_('Topics') . '</h3>
<ul class="menu">
<li><a href="?topic=photo">' . T_('Photo Gallery') . '</a></li>
<li><a href="?topic=video">' . T_('Video Gallery') . '</a></li>
<li><a href="?topic=settings">' . T_('Personal Settings') . '</a></li>
<li><a href="?topic=address">' . T_('Address Book') . '</a></li>
<li><a href="?topic=admin">' . T_('Administration') . '</a></li>
</ul>
</div>
<div id="maincolumn">';
}
示例15: displayHeader
/**
* displayHeader
*
* @return void
*/
function displayHeader()
{
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . T_pgettext('Language Code for this translation', 'lang') . '" lang="' . T_pgettext('Language Code for this translation', 'lang') . '">
<head>
<title>' . getSiteName() . ' - ' . T_('powered by') . ' ' . getCurrentVersion() . '</title>
<script type="text/javascript" src="ui/js/jquery.js"></script>
<script type="text/javascript" src="ui/js/fcms.js"></script>
<link rel="stylesheet" type="text/css" href="ui/css/fcms-core.css" />
<script type="text/javascript">
$(document).ready(function() {
initAttendingEvent();
});
</script>
</head>
<body id="invitation" class="clearfix">
<img id="logo" src="ui/img/logo.gif" alt="' . getSiteName() . '"/>';
}