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


PHP EntryManager::getEntryLikeNumByEntry方法代码示例

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


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

示例1: browse_kid_room

function browse_kid_room($i_kid)
{
    $e_m = new EntryManager();
    $u_m = new UserManager();
    $kid_array['id'] = $i_kid->getEntryId();
    $kid_array['text'] = substr($i_kid->getEntryText(), 0, 72);
    $kid_array['authen_status'] = "Translation";
    $kid_array['kid_votes'] = $e_m->getEntryLikeNumByEntry($kid_array['id']);
    $kid_array['user'] = $u_m->getUserByUserId($i_kid->getEntryUserId())->getLogin();
    ?>
		 <div class="kid_room">
			<div class="kid_text">
			  <a href="entryview.php?id=<?php 
    echo $kid_array['id'];
    ?>
"><?php 
    echo $kid_array['text'];
    ?>
</a>
			</div>
			<div class="kid_profile_link"><?php 
    echo $kid_array['authen_status'];
    ?>
</div>
		<!--    <div class="kid_dad_link">O</div>-->
			<div class="kid_votes"><span style="cursor: alias;" title="<?php 
    echo $kid_array['kid_votes'];
    ?>
 users like"><?php 
    if ($kid_array['kid_votes'] > 0) {
        echo '+' . $kid_array['kid_votes'];
    }
    ?>
</span> 
		<!--        <span style="cursor: alias;" title="3 users dislike">-3</span> -->
			</div>
			<div class="kid_added_by">
			  <a href="profile.php?id=<?php 
    echo $kid_array['user'];
    ?>
"><?php 
    echo $kid_array['user'];
    ?>
</a>
			</div>
		<!--	<div class="is_mom">A</div>  -->
		 </div>
<?php 
    return $kid_array;
}
开发者ID:kevin000,项目名称:Tarboz,代码行数:50,代码来源:browseresult.php

示例2: foreach

    //  echo "TRANSLATIONS WHOSE ORIGINALS ARE NOT IN OUR DB ('ORPHANS') (translations whose originals do not exist in the DB)";
    //  echo "</mark>";
    //  echo "<br>";
    open_kids_house2();
    $o = 1;
    foreach ($orphans as $orphan) {
        //echo $o .". ". substr($orphan->getEntryText(),0,60);
        //echo "<br>";
        $ary['id'] = $orphan->getEntryId();
        $ary['language'] = $orphan->getEntryLanguage();
        $ary['text'] = $orphan->getEntryText();
        $ary['dad'] = $orphan->getEntryTranslOf();
        $ary['user'] = $orphan->getEntryUserId();
        $ary['creadate'] = $orphan->getEntryCreationDate();
        $em = new EntryManager();
        $ary['likes'] = $em->getEntryLikeNumByEntry($ary['id']) != "" ? $em->getEntryLikeNumByEntry($ary['id']) : 0;
        $ary['dislikes'] = $em->getEntryDislikeNumByEntry($ary['id']) != "" ? $em->getEntryDislikeNumByEntry($ary['id']) : 0;
        //dad_house_dad_1($ary);
        make_kid_room($ary);
        $o++;
    }
    close_kids_house();
}
?>
    </div><!-- village -->
  </div><!-- land -->

<?php 
require "footer.php";
//echo "<br>*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*";
/*
开发者ID:kevin000,项目名称:Tarboz,代码行数:31,代码来源:searchresult.php


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