コード例 #1
0
 public function loadTaggingTagFriendAction()
 {
     $this->_helper->layout()->disableLayout();
     $objModelPhotoTag = new Album_Model_PhotoTag();
     $objModelUser = new Application_Model_User();
     $arrPostVal = $this->getRequest()->getParams();
     $photoId = $arrPostVal['photoId'];
     $loggedInUserId = $arrPostVal['loggedInUserId'];
     $wherePhotoTagging = "photo_id='{$photoId}' AND (tagged_id='{$loggedInUserId}' OR user_id='{$loggedInUserId}')";
     $arrPhotoTagging = $objModelPhotoTag->fetchAll($wherePhotoTagging);
     $strTagging = "";
     foreach ($arrPhotoTagging as $tagging) {
         /*---------------------------------------------*/
         $taggedUser = strip_tags($tagging->photoTag);
         $taggedUserId = $tagging->taggedId;
         if ($taggedUserId != 0) {
             $valUser = $objModelUser->find($taggedUserId);
             $userName = '******' . $valUser->getUsername();
             $strReplace = "<a href='javascript://' onclick=commonUserLogin('{$userName}',{$taggedUserId});>" . $taggedUser . "</a>";
             /*---------------------------------------------*/
             $strTagging .= stripslashes(str_replace($taggedUser, $strReplace, $tagging->htmlTag));
         } else {
             $strTagging .= stripslashes($tagging->htmlTag);
         }
     }
     echo $strTagging;
     exit;
 }
コード例 #2
0
 public function loadTaggingTagAction()
 {
     $this->_helper->layout()->disableLayout();
     $objModelPhotoTag = new Album_Model_PhotoTag();
     $arrPostVal = $this->getRequest()->getParams();
     $photoId = $arrPostVal['photoId'];
     $wherePhotoTagging = "photo_id='{$photoId}'";
     $arrPhotoTagging = $objModelPhotoTag->fetchAll($wherePhotoTagging);
     $strTagging = "";
     foreach ($arrPhotoTagging as $tagging) {
         $strTagging .= stripslashes($tagging->htmlTag);
     }
     echo $strTagging;
     exit;
 }