/**
  * 只获取一个相同资料项的人
  * @return string 人的列表
  */
 public function getOneSameUser()
 {
     for ($i = 0; $i <= 20; $i++) {
         $oneSameUser = model('RelatedUser')->getRelatedUserByType(t($_POST['type']), 1);
         if ($oneSameUser[0]['userInfo']['uid'] && !in_array($oneSameUser[0]['userInfo']['uid'], $_POST['user'])) {
             $html = '<li id="user_' . $oneSameUser[0]['userInfo']['uid'] . '" value="' . $oneSameUser[0]['userInfo']['uid'] . '">
 					 <a href="' . $oneSameUser[0]['userInfo']['space_url'] . '" class="face">
 					 <img src="' . $oneSameUser[0]['userInfo']['avatar_middle'] . '" />
 					 <span>' . getshort($oneSameUser[0]['userInfo']['uname'], 4) . '</span></a>
 					 <div onclick="userReplace(' . $oneSameUser[0]['userInfo']['uid'] . ',' . t($_POST['type']) . ')">
 					 <a class="btn-cancel" href="' . U('public/Follow/doFollow', array('fid' => $oneSameUser[0]['userInfo']['uid'])) . '" event-args="uid=' . $oneSameUser[0]['userInfo']['uid'] . '&uname=' . $oneSameUser[0]['userInfo']['uname'] . '&following=0&follower=0&refer=" event-node="doFollow">
 					 <span><b class="ico-add-black"></b>关注</span></a></div></li>';
             echo $html;
             break;
         }
     }
 }
                    $__LIST__ = $st["child"];
                    if (count($__LIST__) == 0) {
                        echo "";
                    } else {
                        foreach ($__LIST__ as $key => $stc) {
                            ++$i;
                            $mod = $i % 2;
                            ?>
<li><a href="<?php 
                            echo $stc["url"];
                            ?>
" target="<?php 
                            echo $stc["target"];
                            ?>
"><?php 
                            echo getshort($stc["navi_name"], 6);
                            ?>
</a></li><?php 
                        }
                    }
                } else {
                    echo "";
                }
                ?>
      </ul><?php 
            }
            ?>
    </div>
  </div><?php 
        }
    }
style="display:none;"<?php 
                        }
                        ?>
>-->
        <li>
          <a <?php 
                        if ($cid == $v["id"]) {
                            ?>
class="current"<?php 
                        }
                        ?>
 href="<?php 
                        echo U('people/Index/index', array('cid' => $v['id'], 'sex' => $sex, 'area' => $area, 'verify' => $verify, 'type' => $type));
                        ?>
"><?php 
                        echo getshort($v["title"], 10);
                        ?>
</a>
        </li><?php 
                    }
                }
            } else {
                echo "";
            }
            ?>
      </ul>
      <!--<?php 
            if (count($vo['child']) > $showNums) {
                ?>
      <div id="slide_btn_<?php 
                echo $j;
Esempio n. 4
0
fwrite($f_h,"extern const unsigned char songData[];\n\n");
$d="#ifdef AVR\n";
$d.="#include <avr/pgmspace.h>\n";
$d.="const unsigned char songData[] PROGMEM = {\n";
$d.="#else\n";
$d.="const unsigned char songData[] = {\n";
$d.="#endif\n";
$dlen=0;
for ($pno=0; $pno<$nopats; $pno++) {
    $patpos[$pno]=$dlen;
    $d.="// pattern $pno\n";
    for ($pos=0; $pos<64; $pos++) {
	$d.="        ";
	for ($tno=0; $tno<$notracks; $tno++) {
	    $fd=getshort($f);
	    $pd[$tno*2]=$fd>>8;
	    $pd[$tno*2+1]=$fd&0xff;
	}
	$ab=0;
	$dd="";
	for ($b=0; $b<8; $b++) {
	    $ab=$ab>>1;
	    if ($pd[$b]!=0) {
		$ab+=0x80;
		$dd.=sprintf("0x%02x, ",$pd[$b]);
		$dlen++;
	    }
	}
	$dlen++;
	$d.=sprintf("0x%02x,",$ab).$dd."\n";
                      <li><a id="blog_fname" name="1" href="javascript:void(0);" id="level-one"><span>频道</span><i class="ico-arrow-down right mt15"></i></a></li>
                   </ul>
                  </div>
                  <div class="kind-list kind-1">
                    <ul class="clearfix">
                    <?php 
foreach ($channel_category as $value) {
    ?>
                    <li id="blog_id_<?php 
    echo $value['channel_category_id'];
    ?>
" onclick="getcid(<?php 
    echo $value['channel_category_id'];
    ?>
)"><?php 
    echo getshort($value['title'], 8);
    ?>
</li>
                    <?php 
}
?>
                    </ul>
                  </div>
                </div>
                <input type="hidden" autocomplete="off" value="" id="contribute" />
                <?php 
echo W('SendWeibo', array('title' => $title, 'tpl' => 'channel', 'channel' => 'channel', 'initHtml' => $initHtml, 'prompt' => $prompt, 'actions' => $actions));
?>
                
        <script type="text/javascript">
				var boxmodule = function() {
        foreach ($menu_3 as $menu_3_name => $menu_3_url) {
            ?>
	                        <?php 
            $home_url = empty($home_url) ? $menu_3_url : $home_url;
            ?>
			            	<li><a id="menu_<?php 
            echo $iterator;
            ?>
" href="javascript:void(0)" onClick="switch_sub_menu('<?php 
            echo $iterator;
            ?>
', '<?php 
            echo $menu_3_url;
            ?>
');" class="submenuA" hidefocus="true" style="outline:none;"><?php 
            echo getshort($menu_3_name, 10);
            ?>
</a></li>
							<?php 
            ++$iterator;
            ?>
						<?php 
        }
        ?>
			          </ul>
			        </li>
				<?php 
    }
    ?>
		      	</ul>
			<?php 
    } else {
        foreach ($__LIST__ as $key => $vo) {
            ++$i;
            $mod = $i % 2;
            ?>
<li>
                  <div class="weiba-c1"><img src="<?php 
            echo $vo["user"]["avatar_middle"];
            ?>
" width="50" height="50"/></div>
                  <div class="c2 left">
                    <h3 class="post-tit"> <a href="<?php 
            echo U('weiba/Index/postDetail', array('post_id' => $vo['post_id']));
            ?>
"><span><?php 
            echo getshort($vo["title"], 20);
            ?>
</span></a> </h3>
                    <div class="post-info f10">
                      <div class="left"><span><?php 
            echo $vo["user"]["space_link"];
            ?>
/<?php 
            echo friendlydate($vo["post_time"]);
            ?>
发布</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最后回复<?php 
            echo friendlydate($vo["last_reply_time"]);
            ?>
</div>
                    </div>
                  </div>
if (!defined('THINK_PATH')) {
    exit;
}
?>
<div class="right-box clearfix" model-node="related_list">
  <fieldset class="inter-line mb20">
    <a href="javascript:;" event-node="change_related_group" rel="0" event-args="uid=<?php 
echo $uid;
?>
&limit=<?php 
echo $limit;
?>
" id="changerelated_group" class="right"><i class="ico-refresh"></i></a>
    <legend class="inter-txt"><?php 
echo getshort($title, 20);
?>
</legend>
  </fieldset>
  <ul model-node="related_ul_group" class="rect-circle">
  </ul>
  <a class="big-gray-btn more" href="<?php 
echo U('weiba/index/weibaList');
?>
">查看所有吧>></a>
</div>
<script type="text/javascript">
$(function (){
	setTimeout(function (){
		$('#changerelated_group').click();
		$('#changerelated_group').attr('rel', 1);
                                echo U('weiba/Index/detail', 'weiba_id=' . $k['weiba_id']);
                                ?>
"><img src="<?php 
                                echo $k["avatar_middle"];
                                ?>
"  /></a></div>
			          <div class="weiba-info">
			            <h2 class="weiba-tit mb5"><a href="<?php 
                                echo U('weiba/Index/detail', 'weiba_id=' . $k['weiba_id']);
                                ?>
"><?php 
                                echo $k["weiba_name"];
                                ?>
</a></h2>
                  <p class="weiba-prof"><?php 
                                echo getshort($k["intro"], 20);
                                ?>
</p>
			            <p class="weiba-data"><span>成员数:<?php 
                                echo $k["follower_count"];
                                ?>
</span>&nbsp;&nbsp;<span>今日新帖:<?php 
                                echo $k["new_count"];
                                ?>
</span></p>
			          </div>
			        </li><?php 
                            }
                        }
                    } else {
                        echo "";