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


PHP Config::getProjectName方法代码示例

本文整理汇总了PHP中CB\Config::getProjectName方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::getProjectName方法的具体用法?PHP Config::getProjectName怎么用?PHP Config::getProjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CB\Config的用法示例。


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

示例1: sendResetPasswordMail

 /**
  * send recovery password email for given user id
  * so that the user can set new password and enter the system
  * @param  int     $userId
  * @return boolean
  */
 public static function sendResetPasswordMail($userId, $template = 'recover')
 {
     if (!is_numeric($userId) || User::isLoged() && !Security::canEditUser($userId)) {
         return false;
     }
     $mail = '';
     $subject = '';
     switch ($template) {
         case 'invite':
             $mail = System::getEmailTemplate('email_invite');
             $subject = L\get('MailInviteSubject');
             break;
         case 'recover':
             $mail = System::getEmailTemplate('password_recovery_email');
             $subject = L\get('MailRecoverSubject');
             break;
         default:
             return false;
     }
     if (empty($mail)) {
         return false;
     }
     $userData = User::getPreferences($userId);
     $userEmail = User::getEmail($userData);
     if (empty($userEmail)) {
         return false;
     }
     /* generating invite hash and sending mail */
     $hash = User::generateRecoveryHash($userId, $userId . $userEmail . date(DATE_ISO8601));
     $href = Util\getCoreHost() . 'recover/reset-password/?h=' . $hash;
     /* replacing placeholders in template and subject */
     $replacements = array('{projectTitle}' => Config::getProjectName(), '{fullName}' => User::getDisplayName($userData), '{username}' => User::getUsername($userData), '{userEmail}' => $userEmail, '{creatorFullName}' => User::getDisplayName(), '{creatorUsername}' => User::getUsername(), '{creatorEmail}' => User::getEmail(), '{href}' => $href, '{link}' => '<a href="' . $href . '" >' . $href . '</a>');
     $search = array_keys($replacements);
     $replace = array_values($replacements);
     $mail = str_replace($search, $replace, $mail);
     $subject = str_replace($search, $replace, $subject);
     return @System::sendMail($userEmail, $subject, $mail);
 }
开发者ID:austinvernsonger,项目名称:casebox,代码行数:44,代码来源:UsersGroups.php

示例2: editChanged

            header('location: ' . $coreUrl . 'recover/forgot-password/');
            exit(0);
        }
        $_SESSION['msg'] = '<div class="alert alert-success">' . L\get('RecoverMessageSent') . '</div>';
        break;
    default:
        header('location: ' . $coreUrl);
        exit(0);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title><?php 
echo Config::getProjectName();
?>
</title>
<?php 
echo '
<link rel="stylesheet" type="text/css" href="/css/bs/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/css/bs/css/bootstrap-responsive.min.css" />
<link type="text/css" rel="stylesheet" href="/css/login.css" />';
?>
</head>
<body onload="javascript: e = document.getElementById('e'); if(e) e.focus(); editChanged();">
<script type="text/javascript">
//<--
String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,"");}
function editChanged()
{
开发者ID:youprofit,项目名称:casebox,代码行数:31,代码来源:recover.php


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