Example #1
0
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'jquery.min.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'new_tab.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'jquery.form.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'global.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'alertbox.min.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'alertbox.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'fa.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'notify.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'jQuery.equalHeights.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'excanvas.js');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'new_tab.js');
hg_add_head_element('js-c', "\r\nvar ROOT_PATH = '" . ROOT_DIR . "';\r\nvar RESOURCE_DIR = '" . RESOURCE_DIR . "';\r\nvar cookie_id = '" . $gGlobalConfig['cookie_prefix'] . "';\r\nvar cookie_path = '" . $gGlobalConfig['cookie_path'] . "';\r\nvar cookie_domain = '" . $gGlobalConfig['cookie_domain'] . "';\r\nvar TIME_OUT = 30000;\r\nvar SNS_MBLOG = '" . SNS_MBLOG . "';\r\nvar SNS_UCENTER = '" . SNS_UCENTER . "';\r\nvar SNS_VIDEO = '" . SNS_VIDEO . "';\r\nvar SNS_TOPIC = '" . SNS_TOPIC . "';\r\n");
hg_add_head_element("js-c", 'var now_user="******";' . "\n" . "\r\t\n" . "var sns_ui_url='" . SNS_MBLOG . "';" . "\r\t\n" . ' var now_uid = "' . $gUser['id'] . '";');
hg_add_head_element("js-c", 'var user_avatars_url="' . AVATAR_URL . '";');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/chat_message.js');
hg_add_foot_element("js-c", "\r\t\n" . 'window.onload=function(){if(parseInt(now_uid,10)>0){setTimeout("check_new_msg()",5000);setTimeout("getnotify()",3000);}}');
hg_add_head_element('js', RESOURCE_DIR . 'scripts/pull_down.js');
$gTpl->addHeaderCode(hg_add_head_element('echo'));
/**
* 创建Memcache服务连接$memcache
* 向队列中增加数据方法为 $memcache->set('名称', '值');
*/
function hg_ConnectMemcache()
{
    global $gMemcacheConfig, $gMemcache;
    if (!$gMemcache) {
        $gMemcache = new Memcache();
        $connect = @$gMemcache->connect($gMemcacheConfig['host'], $gMemcacheConfig['port']);
        if (!$connect) {
            include_once ROOT_PATH . 'lib/class/memcache.class.php';
            $gMemcache = new memcache();
Example #2
0
	<div class="fixedBox">
		<div class="MMessageUser">
			<ul id="dialogMinimizeContainer"></ul>
		</div>
	</div>
</div> 
<div class="footer clear">
  <div class="bottom">
    	<ul class="copy_txt">
        	<li class="cp_atxt"><a href="http://www.hoolo.tv/public/gyhlw/" target="_blank">关于葫芦</a> | <a href="http://www.hoolo.tv/public/wzdt/" target="_blank"> 网站地图</a> | <a href="http://www.hoolo.tv/public/bqsm/" target="_blank"> 版权申明</a> | <a href="http://www.hoolo.tv/public/yqlj/" target="_blank"> 友情链接</a> | <a href="http://www.hoolo.tv/public/gghz/" target="_blank">广告合作</a> | <a href="http://www.hoolo.tv/public/lxwm/" target="_blank"> 联系我们</a> | <a href="http://www.hoolo.tv/public/cpyc/" target="_blank"> 诚聘英才</a> | <a href="http://www.hoolo.tv/public/yhxy/" target="_blank"> 用户协议</a></li>
            <li class="cp_btxt">杭州文广集团 梦想传媒有限责任公司  版权所有  2010-2011 浙ICP备10043234-2 视听内容来源:杭州文广网</li>
        </ul>
 </div>
</div>
<input type="hidden" name="push_flag" id="push_flag" value="0" />
<!-- end wrap -->
<?php 
include hg_load_template('tips');
include hg_load_template('report');
?>
<div id="desktop"></div>
<?php 
echo hg_add_foot_element('echo');
?>
</div>
<?php 
echo $this->settings['stat_code'];
?>
</body>
</html>
Example #3
0
 public function show()
 {
     if ($this->user['id'] > 0) {
         $user_info = $this->info->getUserById($this->user['id']);
         $user_info = $user_info[0];
         $count = 50;
         $total = 'gettotal';
         $page = intval($this->input['pp']) / $count;
         $statusline = $this->status->friends_timeline($this->user['id'], $total, $page, $count);
         if (is_array($statusline)) {
             $data['totalpages'] = $statusline[0]['total'];
             unset($statusline[0]);
             $data['perpage'] = $count;
             $data['curpage'] = $this->input['pp'];
             $showpages = hg_build_pagelinks($data);
             if (!$page) {
                 $onload = 'setTimeout("get_new_status(' . $statusline[1]["id"] . ')",3000);';
                 hg_set_cookie('since_id', $statusline[1]["id"], time() + 31536000);
             } else {
                 $onload = 'setTimeout("get_new_status(' . hg_get_cookie('since_id') . ')",3000);';
             }
         }
         $topic_follow = $this->status->getTopicFollow();
         /**
          * 添加登录积分
          */
         $this->info->add_credit_log(LOGIN);
         /**
          * 取出会员
          */
         $vipUser = $this->info->getVip(0, 8);
         if (is_array($vipUser)) {
             $vip_nums = $vipUser[count($vipUser) - 1];
             $total = ceil($vip_nums / 8);
             unset($vipUser[count($vipUser) - 1]);
         }
         $search_friend_ids = array();
         foreach ($vipUser as $k => $v) {
             $search_friend_ids[] = $v['id'];
         }
         $ids = implode(',', $search_friend_ids);
         $relation = $this->relation->get_relation($this->user['id'], $ids);
         $len = count($vipUser);
         for ($i = 0; $i < $len; $i++) {
             $vipUser[$i]['is_friend'] = $relation[$i];
         }
         //print_r($vipUser);
     } else {
         $statusline = $this->status->public_timeline($page);
     }
     $topic = $this->status->getTopic();
     $this->page_title = $this->lang['pageTitle'];
     $gScriptName = SCRIPTNAME;
     hg_add_foot_element("js-c", "\r\t\n" . 'window.onload=function(){' . $onload . ' if(parseInt(now_uid,10)>0){setTimeout("check_new_msg()",5000);setTimeout("getnotify()",3000);}}');
     hg_add_head_element('js-c', "\r\n\t\t\tvar re_back = 'index.php';\r\n\t\t\tvar re_back_login = '******';\r\n\t\t\tvar PUBLISH_TO_MULTI_GROUPS = " . PUBLISH_TO_MULTI_GROUPS . ";\r\n\t\t");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'index.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'jquery.form.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'dispose.js');
     //转发和关注话题
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'rotate.js');
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('statusline', $statusline);
     $this->tpl->addVar('relation', $relation);
     $this->tpl->addVar('topic', $topic);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('vipUser', $vipUser);
     $this->tpl->addVar('topic_follow', $topic_follow);
     $this->tpl->addVar('total', $total);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('index');
 }