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


PHP DatabaseHandler::GetImageUrl方法代码示例

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


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

示例1: AuthorBy

 private function AuthorBy($condition)
 {
     $userAuthorsFolder = Settings::getInstance()->p['userAuthorsFolder'];
     $sql = "SELECT AuthorId, Name, UniqueName, Image, UserId FROM Author {$condition}";
     $result = $this->mysqli->query($sql);
     $recordsCount = mysqli_num_rows($result);
     $data = 0;
     if ($recordsCount >= 1 && $result != null) {
         $row = mysqli_fetch_array($result);
         $authorPictureUrl = strlen($row[Image]) > 0 ? parent::GetImageUrl($row['UserId'], $row['Image'], $userAuthorsFolder) : "";
         $authorThumbnailUrl = strlen($row[Image]) > 0 ? parent::GetImageUrl($row['UserId'], $row['Image'], $userAuthorsFolder, true) : "";
         $data = array('AuthorId' => intval($row['AuthorId']), 'UniqueName' => $row['UniqueName'], 'Name' => $row['Name'], 'Image' => $row['Image'], 'ImageUrl' => $authorPictureUrl, 'ThumbnailUrl' => $authorThumbnailUrl, 'UserId' => intval($row['UserId']));
     }
     return $data;
 }
开发者ID:simonevitale,项目名称:easyrest-php,代码行数:15,代码来源:AuthorsDatabaseHandler.php

示例2: UserById

 public function UserById($userId)
 {
     global $authIssueText;
     $userUserFolder = Settings::getInstance()->p['userUserFolder'];
     $sql = "SELECT UserId, Email, Username, FirstName, LastName, Country, Image, RegistrationDateTime, LastLoginDateTime, UserStateId, LoginAttempts, MobilePhone, Language, Role.RoleId, Role.Name AS RoleName, Role.Modules AS RoleModules FROM User, Role WHERE UserId = {$userId} AND User.RoleId = Role.RoleId";
     $result = $this->mysqli->query($sql);
     $recordsCount = mysqli_num_rows($result);
     $data = null;
     if ($recordsCount >= 1 && $result != null) {
         $row = mysqli_fetch_array($result);
         $imageUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userUserFolder);
         $imageThumbnailUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userUserFolder, true);
         $data = array('UserId' => intval($row['UserId']), 'Email' => $row['Email'], 'Username' => $row['Username'], 'FirstName' => $row['FirstName'], 'LastName' => $row['LastName'], 'Country' => $row['Country'], 'Image' => $row['Image'], 'ImageUrl' => $imageUrl, 'ThumbnailUrl' => $imageThumbnailUrl, 'RegistrationDateTime' => $row['RegistrationDateTime'], 'LastLoginDateTime' => $row['LastLoginDateTime'], 'UserStateId' => intval($row['UserStateId']), 'LoginAttempts' => intval($row['LoginAttempts']), 'MobilePhone' => $row['MobilePhone'], 'Language' => $row['Language'], 'Role' => new Role($row['RoleId'], $row['RoleName'], $row['RoleModules']));
     }
     return $data;
 }
开发者ID:simonevitale,项目名称:easyrest-php,代码行数:16,代码来源:UsersDatabaseHandler.php

示例3: ArticleById

 public function ArticleById($IdArticle, $IdUser = null)
 {
     $userArticlesFolder = Settings::getInstance()->p['userArticlesFolder'];
     $ArticleFieldsSql = " Article.UserId, Article.ArticleId, Article.Title, Article.Image, Article.Description AS Description, Article.DateTime, Article.YouTubeLink, Article.FlickrLink, Article.Language, Article.Published, Article.Category ";
     $sql = "SELECT {$ArticleFieldsSql}, AuthorId FROM Article WHERE ArticleId = {$IdArticle}";
     $result = $this->mysqli->query($sql);
     $recordsCount = mysqli_num_rows($result);
     $data = 0;
     if ($recordsCount >= 1 && $result != null) {
         $row = mysqli_fetch_array($result);
         $imageUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userArticlesFolder);
         $imageThumbnailUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userArticlesFolder, true);
         $ShortDescription = parent::substrwords(strip_tags($row['Description']), 120);
         $AuthorsHandler = new AuthorsDatabaseHandler();
         $data = array('ArticleId' => intval($row['ArticleId']), 'Title' => $row['Title'], 'Image' => $row['Image'], 'ImageUrl' => $imageUrl, 'ThumbnailUrl' => $imageThumbnailUrl, 'Description' => $row['Description'], 'DateTime' => $row['DateTime'], 'YouTubeLink' => $row['YouTubeLink'], 'FlickrLink' => $row['FlickrLink'], 'Language' => $row['Language'], 'Published' => intval($row['Published']), 'Category' => $row['Category'], 'ShortDescription' => $ShortDescription, 'Author' => $AuthorsHandler->AuthorById($row['AuthorId']), 'UserId' => intval($row['UserId']));
     }
     return $data;
 }
开发者ID:simonevitale,项目名称:easyrest-php,代码行数:18,代码来源:ArticlesDatabaseHandler.php

示例4: EventById

 function EventById($EventId)
 {
     $userEventsFolder = Settings::getInstance()->p['userEventsFolder'];
     $EventFieldsSql = " Event.UserId, Event.EventId, Event.Title, Event.Image, Event.Description AS Description, Event.CreationDateTime, Event.DateTime, Event.FacebookLink, Event.YouTubeLink, Event.FlickrLink, Event.Language, Event.Published, Event.Statistics ";
     $sql = "SELECT {$EventFieldsSql}, AuthorId, LocationId FROM Event WHERE Event.EventId = {$EventId}";
     $result = $this->mysqli->query($sql);
     $recordsCount = mysqli_num_rows($result);
     $data = 0;
     if ($recordsCount >= 1 && $result != null) {
         $row = mysqli_fetch_array($result);
         $imageUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userEventsFolder);
         $imageThumbnailUrl = parent::GetImageUrl($row['UserId'], $row['Image'], $userEventsFolder, true);
         $ShortDescription = parent::substrwords(strip_tags($row['Description']), 120);
         $Description = $row['Description'];
         $AuthorsDbHandler = new AuthorsDatabaseHandler();
         $LocationsDbHandler = new LocationsDatabaseHandler();
         $data = array('EventId' => $row['EventId'], 'Title' => $row['Title'], 'Image' => $row['Image'], 'ImageUrl' => $imageUrl, 'ThumbnailUrl' => $imageThumbnailUrl, 'Description' => $Description, 'CreationDateTime' => $row['CreationDateTime'], 'DateTime' => $row['DateTime'], 'FacebookLink' => $row['FacebookLink'], 'YouTubeLink' => $row['YouTubeLink'], 'FlickrLink' => $row['FlickrLink'], 'Language' => $row['Language'], 'Published' => $row['Published'], 'ShortDescription' => $ShortDescription, 'LocationId' => $row['LocationId'], 'Location' => $LocationsDbHandler->LocationById($row['LocationId']), 'AuthorId' => $row['AuthorId'], 'Author' => $AuthorsDbHandler->AuthorById($row['AuthorId']), 'UserId' => $row['UserId'], 'Statistics' => $row['Statistics']);
     }
     return $data;
 }
开发者ID:simonevitale,项目名称:easyrest-php,代码行数:20,代码来源:EventsDatabaseHandler.php


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