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


PHP EntryManager::getOriginalKidsNum方法代码示例

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


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

示例1: dad_house_has_dad

function dad_house_has_dad($i_dad)
{
    $entMan = new EntryManager();
    $userMan = new UserManager();
    $dad_arr['id'] = $i_dad->getEntryId();
    $dad_arr['language'] = $i_dad->getEntryLanguage();
    $dad_arr['authen_status'] = "Original";
    $dad_arr['text'] = substr($i_dad->getEntryText(), 0, 72);
    $dad_arr['kid_num'] = $entMan->getOriginalKidsNum($dad_arr['id']);
    $dad_arr['like_num'] = $entMan->getEntryLikeNumByEntry($dad_arr['id']);
    $dad_arr['add_kid'] = "y";
    $dad_arr['user'] = $userMan->getUserByUserId($i_dad->getEntryUserId())->getLogin();
    ?>
        <div id="dad_house">
            <div class="dad_door"><span><?php 
    echo $dad_arr['language'];
    ?>
</span></div>
            <div id="dad_room">
              <div id="dad_text">
                <a href="entryview.php?id=<?php 
    echo $dad_arr['id'];
    ?>
"><?php 
    echo $dad_arr['text'];
    ?>
</a>
              </div>
              <div id="dad_profile_link"><?php 
    echo $dad_arr['authen_status'];
    ?>
</div>
              <div style="display:inline-block;width:50px"></div>
              <div id="kids_num" title="There are <?php 
    echo $dad_arr['kid_num'];
    ?>
 translations for this phrase"><?php 
    echo $dad_arr['kid_num'];
    ?>
</div>
              <div id="add_kid"><a href="entrycreate.php" title="Add a new translation"><?php 
    if ($dad_arr['add_kid'] == 'y') {
        echo "+";
    }
    ?>
</a></div>
              <div class="kid_added_by">
                <a href="profile.php?id=<?php 
    echo $dad_arr['user'];
    ?>
"><?php 
    echo $dad_arr['user'];
    ?>
</a>
              </div>
            </div>
         </div><!-- dad_house -->

<?php 
    return $dad_arr;
}
开发者ID:kevin000,项目名称:Tarboz,代码行数:61,代码来源:browseresult.php

示例2: foreach

    $ary['tipid'] = 'dads';
    section_heading($ary);
    //  echo "<mark>";
    //  echo "ORIGINALS ('DADS') (originals whose translations don't exist in the db or were not retrieved)";
    //  echo "</mark>";
    //  echo "<br>";
    $d = 1;
    foreach ($dads as $dad) {
        $ary['id'] = $dad->getEntryId();
        $ary['language'] = $dad->getEntryLanguage();
        //$ary['text'] = substr($dad->getEntryText(), 0, 55);
        $ary['text'] = $dad->getEntryText();
        $ary['user'] = $dad->getEntryUserId();
        $ary['creadate'] = $dad->getEntryCreationDate();
        $em = new EntryManager();
        $ary['kidsnum'] = $em->getOriginalKidsNum($ary['id']) != "" ? $em->getOriginalKidsNum($ary['id']) : 0;
        dad_house_dad_1($ary);
        //echo $d .". ". substr($dad->getEntryText(),0,60);
        //echo "<br>";
        $d++;
    }
}
//DISPLAY THE KIDS ARRAY (OR NON-ORPHANS)
if (is_object(reset($non_orphans))) {
    $ary['text'] = "Translations without originals";
    $ary['tipid'] = 'kids';
    section_heading($ary);
    //  echo "<mark>";
    //  echo "TRANSlATIONS WITHOUT ORIGINALS ('KIDS') ()";
    //  echo "</mark>";
    //  echo "<br>";
开发者ID:kevin000,项目名称:Tarboz,代码行数:31,代码来源:searchresult.php


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