Esempio n. 1
0
 /**
  * 
  * 显示用户黑名单列表界面
  */
 public function show()
 {
     $user_info = $this->getUserById($this->user['id'], 'all');
     //获取用户信息
     $user_info = $user_info[0];
     $hava_blocks = true;
     $black_list = $this->get_black_list($this->user['id']);
     //获取黑名单列表
     if (empty($black_list)) {
         $hava_blocks = false;
     }
     $topic = $this->status->getTopic();
     $topic_follow = $this->status->getTopicFollow();
     $gScriptName = SCRIPTNAME;
     $this->page_title = $this->lang['pageTitle'];
     $show_list_message = $this->lang['black_explain'];
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'topicfollow.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'blacklist.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'dispose.js');
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hava_blocks', $hava_blocks);
     $this->tpl->addVar('black_list', $black_list);
     $this->tpl->addVar('topic', $topic);
     $this->tpl->addVar('topic_follow', $topic_follow);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('blacklist');
     //数据写入粉丝模板
 }
Esempio n. 2
0
 function show()
 {
     $info = $this->info->getUserById($this->user['id'], "all");
     $this->userinfo = $info[0];
     $this->location = explode('-', $this->userinfo['location']);
     $this->birth = explode('-', $this->userinfo['birthday']);
     $this->getOption();
     $this->getPrivacyOption();
     hg_add_head_element('js-c', "\r\n\t\tvar userInfo ={\r\n\t\t\t\tprovince:" . json_encode($this->location[0]) . ",\r\n\t\t\t\tcity:" . json_encode($this->location[1]) . ",\r\n\t\t\t\tcountry:" . json_encode($this->location[2]) . "\r\n\t\t};\r\n\t\tvar show_location = " . (SHOW_LOCATION ? SHOW_LOCATION : 0) . ";\r\n\t\t");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'zone.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'userprofile.js');
     $gScriptName = SCRIPTNAME;
     $this->page_title = '个人资料';
     //是否允许修改用户名
     require ROOT_PATH . 'lib/class/uset.class.php';
     $mUset = new uset();
     $rt = $mUset->get_uset_array('modify_username');
     if ($rt['modify_username'] == 1) {
         $edit_username = 1;
     }
     $this->tpl->addVar('birthday', $this->birthday);
     $this->tpl->addVar('edit_username', $edit_username);
     $this->tpl->addVar('userinfo', $this->userinfo);
     $this->tpl->addVar('privacy', $this->privacy);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->outTemplate('userprofile');
 }
Esempio n. 3
0
 public function show()
 {
     $location = array();
     $location = $this->mUser->getUserByName($this->user['username']);
     $location = $location[0];
     if (!empty($location)) {
         $default_gid = $location['group_id'];
         $default_lat = $location['lat'];
         $default_lng = $location['lng'];
         $default_gname = $location['group_name'];
     }
     $center = $default_lat && $default_lng ? $default_lat . 'X' . $default_lng : MAP_CENTER_POINT;
     hg_add_head_element("js-c", "var MAP_CENTER_POINT = '" . $center . "';" . "\r\t\n" . " window.onload = function(){initialize();}");
     if (!MAP_USING_TYPE) {
         hg_add_head_element("js", "http://ditu.google.cn/maps?file=api&v=2&key=" . MAP_KEY . "&sensor=false");
         hg_add_head_element('js', RESOURCE_DIR . 'scripts/map/' . 'map.js');
         $html_body_attr = ' onreload="GUnload()" onunload="GUnload()" onload="initialize()" ';
     } else {
         hg_add_head_element("js", "http://api.map.baidu.com/api?v=1.2&services=false");
         hg_add_head_element('js', RESOURCE_DIR . 'scripts/map/' . 'b_map.js');
         $html_body_attr = ' onload="initialize()" ';
     }
     $gScriptName = SCRIPTNAME;
     $this->page_title = '地理信息';
     $this->tpl->addVar('default_gname', $default_gname);
     $this->tpl->addVar('default_lng', $default_lng);
     $this->tpl->addVar('default_lat', $default_lat);
     $this->tpl->addVar('default_gid', $default_gid);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('geoinfo');
 }
Esempio n. 4
0
 public function show()
 {
     global $gScriptName, $gScriptNameArray;
     $is_my_page = false;
     $user_info = $this->check("all");
     if (empty($user_info)) {
         $this->ReportError('用户不存在!');
     }
     $user_info = $user_info[0];
     $this->user_info = $user_info;
     if ($user_info['id'] == $this->user['id']) {
         $is_my_page = true;
     }
     $id = $user_info['id'];
     $topic = $this->status->getTopic();
     $topic_follow = $this->status->getTopicFollow();
     $this->page_title = $this->lang['pageTitle'];
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js-c', "\r\n\t\t\tvar re_back = 'info.php';\r\n\t\t\tvar re_back_login = '******';\r\n\t\t");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'dispose.js');
     //	include hg_load_template('info');
     $this->tpl->addVar('_user_info', $this->user_info);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('info');
 }
Esempio n. 5
0
 public function show()
 {
     $modules = array();
     $sql = 'SELECT *  FROM ' . DB_PREFIX . 'source_config where 1 ORDER BY id ASC';
     $q = $this->db->query($sql);
     while ($row = $this->db->fetch_array($q)) {
         $row['create_time'] = hg_get_date($row['create_time']);
         $row['apifile'] = 'http://' . $row['host'] . '/' . $row['dir'];
         $modules[$row['id']] = $row;
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '配置名称', 'exper' => '$v[name]'), 'apifile' => array('title' => '接口文件', 'exper' => '$v[apifile]'), 'create_time' => array('title' => '创建时间', 'exper' => '$v[create_time]'));
     /*'func_name' => array('title' => '方法名', 'exper' => '$v[func_name]'),*/
     $op = array('form' => array('name' => '配置', 'brief' => '', 'link' => '?a=form'), 'edit' => array('name' => '内容设置', 'brief' => '', 'link' => '?a=edit'), 'import' => array('name' => '导入', 'brief' => '', 'link' => '?a=import'), 'delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'删除\', 1);"', 'link' => '?a=delete'));
     $batch_op = array('delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'delete\', \'删除\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'delete\'] = \'?a=delete\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('close_search', true);
     $this->tpl->addVar('primary_key', 'id');
     $this->tpl->addVar('list', $modules);
     $this->tpl->outTemplate('source_config');
 }
Esempio n. 6
0
 public function show()
 {
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'applications ORDER BY id desc';
     $q = $this->db->query($sql);
     $applications = array();
     while ($row = $this->db->fetch_array($q)) {
         $row['create_time'] = hg_get_date($row['create_time']);
         $row['api'] = 'http://' . $row['host'] . '/' . $row['dir'];
         $applications[$row['id']] = $row;
         $applications_relate[$row['father_id']][] = $row['id'];
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '名称', 'exper' => '$v[name]'), 'softvar' => array('title' => '标识', 'exper' => '$v[softvar]'), 'api' => array('title' => '接口', 'exper' => '$v[api]'), 'create_time' => array('title' => '创建时间', 'exper' => '$v[create_time]'));
     $op = array('form' => array('name' => '编辑', 'brief' => '', 'link' => '?a=form'), 'delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'删除\', 1);"', 'link' => '?a=delete'), 'see_module' => array('name' => '查看模块', 'brief' => '', 'link' => 'modules.php?a=show'), 'export_xml' => array('name' => '导出应用xml', 'brief' => '', 'link' => '?a=export_xml'), 'app_publish' => array('name' => '发布至应用商店', 'brief' => '', 'link' => '?a=app_publish'));
     $batch_op = array('delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'delete\', \'删除\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'delete\'] = \'?a=delete\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('close_search', true);
     $this->tpl->addVar('primary_key', 'id');
     $this->tpl->addVar('applications', $applications);
     $this->tpl->addVar('applications_relate', $applications_relate);
     $this->tpl->outTemplate('application');
 }
Esempio n. 7
0
 public function show()
 {
     $modules = array();
     $sql = 'SELECT n.*, a.host AS ahost, a.dir AS adir, a.name AS aname  FROM ' . DB_PREFIX . 'node n LEFT JOIN ' . DB_PREFIX . 'applications a ON n.application_id = a.id ORDER BY order_id ASC';
     $q = $this->db->query($sql);
     while ($row = $this->db->fetch_array($q)) {
         $row['create_time'] = hg_get_date($row['create_time']);
         if (!$row['host']) {
             $row['host'] = $row['ahost'];
         }
         if (!$row['dir']) {
             $row['dir'] = $row['adir'];
         }
         $row['apifile'] = 'http://' . $row['host'] . '/' . $row['dir'] . $row['file_name'] . $row['file_type'];
         $row['return_var'] = '<span title="初始化选中数据时,定义 $hg_' . $row['return_var'] . '_selected = (选中值,多个使用数组);变量">$hg_' . $row['return_var'] . '</span>';
         $row['application_id'] = $row['aname'];
         $modules[$row['id']] = $row;
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '名称', 'exper' => '$v[name]'), 'application_id' => array('title' => '所属系统', 'exper' => '$v[application_id]'), 'apifile' => array('title' => '接口文件', 'exper' => '$v[apifile]'), 'func_name' => array('title' => '方法名', 'exper' => '$v[func_name]'), 'return_var' => array('title' => '返回变量', 'exper' => '$v[return_var]'), 'create_time' => array('title' => '创建时间', 'exper' => '$v[create_time]'));
     $op = array('form' => array('name' => '编辑', 'brief' => '', 'link' => '?a=form'), 'delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'删除\', 1);"', 'link' => '?a=delete'));
     $batch_op = array('delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'delete\', \'删除\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'delete\'] = \'?a=delete\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('close_search', true);
     $this->tpl->addVar('primary_key', 'id');
     $this->tpl->addVar('list', $modules);
     $this->tpl->outTemplate('node');
 }
Esempio n. 8
0
 public function show()
 {
     $host = $this->settings['App_publishsys']['host'];
     $dir = $this->settings['App_publishsys']['dir'] . 'admin/';
     $curl = new curl($host, $dir);
     $curl->setSubmitType('post');
     $curl->initPostData();
     $curl->addRequestData('a', 'show');
     $curl->addRequestData('count', '100');
     $data_source_info = $curl->request('data_source.php');
     if ($data_source_info[0][0] && is_array($data_source_info[0][0])) {
         foreach ($data_source_info[0][0] as $k => $v) {
             $datas[$v['id']] = $v;
         }
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '名称', 'exper' => '$v[name]'));
     $op = array('pub_setting' => array('name' => '发布', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'发布\', 1);"', 'link' => '?a=publish'));
     $batch_op = array('update' => array('name' => '发布', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'publish\', \'发布\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'publish\'] = \'?a=publish\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('primary_key', 'sign');
     $this->tpl->addVar('list', $datas);
     $this->tpl->outTemplate('datasource');
 }
Esempio n. 9
0
 public function show()
 {
     $info = new user();
     $status = new status();
     $userid = $this->user['id'];
     $status_id = intval($this->input['id']);
     //要评论的点滴id
     $statusline = $status->show($status_id);
     $statusline = $statusline[0];
     $count = !RESULT_MAX_NUM ? 50 : intval(RESULT_MAX_NUM);
     //每页返回的结果条数
     $page = ceil(intval($this->input['pp']) / $count);
     $comments_arr = array();
     $comments_arr = $this->mComment->get_comment_list($status_id, $count, $page);
     $user_info = $statusline['user'];
     if ($this->input['ajax']) {
         $this->tpl->addVar('user_info', $user_info);
         $this->tpl->addVar('comments_arr', $comments_arr);
         $this->tpl->addVar('status_id', $status_id);
         $this->tpl->addVar('$userid', $userid);
         $this->tpl->outTemplate('comment_list', 'hg_getCommentList,' . $status_id);
     } else {
         $pagelink = '?id=' . $this->input['id'];
         $data = array('totalpages' => $comments_arr[0], 'perpage' => $count, 'curpage' => $page, 'pagelink' => $pagelink);
         $showpages = hg_build_pagelinks($data);
         $this->page_title = $this->lang['pageTitle'];
         hg_add_head_element("js", RESOURCE_DIR . 'scripts/dispose.js');
         hg_add_head_element("js", RESOURCE_DIR . 'scripts/rotate.js');
         $this->tpl->addHeaderCode(hg_add_head_element('echo'));
         $this->tpl->setTemplateTitle($this->page_title);
         $this->tpl->outTemplate('show');
     }
 }
Esempio n. 10
0
 public function show()
 {
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $stationInfo = $this->mVideo->get_user_station();
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "频道设置", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js-c', "\r\n\t\t\tvar re_back = 'my_station.php';\r\n\t\t\tvar re_back_login = '******';\r\n\t\t");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'my.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('stationInfo', $stationInfo);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_station');
 }
Esempio n. 11
0
 public function show()
 {
     $user_info = array();
     $user_info = $this->user;
     $gScriptName = SCRIPTNAME;
     $user_info = $this->user;
     $this->page_title = $this->lang['pageTitle'];
     //		$user_set = $this->mDB->query_first("SELECT * FROM " . DB_PREFIX . 'user_style WHERE member_id = ' . $this->user['id']);
     //		if($user_set)
     //		{
     //			//此处要根据用户之前选择来加载不同的css样式
     //			$defined_con = $user_set['defined_content'];
     //			$style_id = $user_set['style_id'];
     //		}
     //
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/skin.js');
     if (file_exists(RESOURCE_DIR . 'user_defined/' . $this->user['id'] . '.css')) {
         hg_add_head_element("css", RESOURCE_DIR . 'user_defined/' . $this->user['id'] . '.css');
     }
     //include hg_load_template('mytemplate');
     $this->tpl->addVar('_mSetting', $this->mSetting);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('mytemplate');
 }
Esempio n. 12
0
 public function show()
 {
     $modules = array();
     $yesno = array(0 => '否', 1 => '是');
     $fatherid = intval($this->input['father_id']);
     $cond .= ' AND father_id=' . $fatherid;
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'menu WHERE 1' . $cond . ' ORDER BY close asc, order_id ASC, id asc';
     $q = $this->db->query($sql);
     while ($row = $this->db->fetch_array($q)) {
         $row['close'] = $yesno[$row['close']];
         $modules[$row['id']] = $row;
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '名称', 'exper' => '<a href=\\"?father_id={$v[id]}\\">{$v[name]}</a>'), 'url' => array('title' => '链接', 'exper' => '$v[url]'), 'close' => array('title' => '是否关闭', 'exper' => '$v[close]'));
     $op = array('form' => array('name' => '编辑', 'brief' => '', 'link' => '?a=form'), 'delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'删除\', 1);"', 'link' => '?a=delete'));
     $batch_op = array('delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'delete\', \'删除\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'delete\'] = \'?a=delete\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('close_search', true);
     $this->tpl->addVar('primary_key', 'id');
     $this->tpl->addVar('list', $modules);
     $this->tpl->outTemplate('menu');
 }
Esempio n. 13
0
 public function show()
 {
     $modules = array();
     $yesno = array(0 => '否', 1 => '是');
     $cloud_id = intval($this->input['site_id']);
     if ($cloud_id) {
         $cond .= ' AND id=' . $cloud_id;
     }
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'cloud_site WHERE 1' . $cond . ' ORDER BY id asc';
     $q = $this->db->query($sql);
     while ($row = $this->db->fetch_array($q)) {
         $row['is_close'] = $yesno[$row['is_close']];
         $modules[$row['id']] = $row;
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'name' => array('title' => '名称', 'exper' => '$v[name]'), 'url' => array('title' => '链接', 'exper' => '$v[authapi]'), 'is_close' => array('title' => '是否关闭', 'exper' => '$v[is_close]'));
     $op = array('show' => array('name' => '查看', 'brief' => '', 'link' => './cloud_manage.php?a=show'), 'form' => array('name' => '编辑', 'brief' => '', 'link' => '?a=form'), 'delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'删除\', 1);"', 'link' => '?a=delete'));
     $batch_op = array('delete' => array('name' => '删除', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'delete\', \'删除\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'delete\'] = \'?a=delete\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('close_search', true);
     $this->tpl->addVar('primary_key', 'id');
     $this->tpl->addVar('list', $modules);
     $this->tpl->outTemplate('cloud_site');
 }
Esempio n. 14
0
 function show()
 {
     $gScriptName = SCRIPTNAME;
     $this->page_title = '修改密码';
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('editpasswd');
 }
Esempio n. 15
0
 public function show()
 {
     $id = $this->user['id'];
     if (!$id) {
         $this->check_login();
     }
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $station = $this->mVideo->get_user_station($id);
     $sta_id = $this->input['sta_id'] ? $this->input['sta_id'] : ($station['id'] ? $station['id'] : 0);
     $stationInfo = $this->mVideo->get_station($sta_id, $id, 1);
     $stationInfo = $stationInfo[0];
     $count = 15;
     $page = (intval($this->input['pp']) ? intval($this->input['pp']) : 0) / $count;
     $video_info = $this->mVideo->get_video_info($user_id, $page, $count);
     $cnt = count($video_info) - 1;
     if ($video_info) {
         $data['totalpages'] = $video_info[$cnt];
         if (is_array($video_info)) {
             unset($video_info[$cnt]);
         }
         $data['perpage'] = $count;
         $data['curpage'] = $this->input['pp'];
         $data['pagelink'] = hg_build_link('', array('sta_id' => $sta_id));
         $data['onclick'] = 'onclick="page_show(this,1);"';
         $showpages = hg_build_pagelinks($data);
     }
     $program_info = $this->mVideo->get_station_programe($sta_id, $id);
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "编辑节目单", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'my.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('station', $station);
     $this->tpl->addVar('sta_id', $sta_id);
     $this->tpl->addVar('video_info', $video_info);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('program_info', $program_info);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('stationInfo', $stationInfo);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_program');
 }
Esempio n. 16
0
 public function show()
 {
     $id = $this->user['id'] ? $this->user['id'] : 0;
     if (!$id) {
         $this->check_login();
     }
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $count = $this->count;
     $page = $this->page;
     $album_info = $this->mVideo->get_album_info($id, $page, $count);
     $album_list = $album_info;
     if ($album_info['total']) {
         $album_total = $datas['totalpages'] = $album_info['total'];
         unset($album_info['total']);
         $datas['perpage'] = $count;
         $datas['curpage'] = $this->input['pp'];
         $showpages = hg_build_pagelinks($datas);
     }
     if ($album_list['total']) {
         $data['totalpages'] = $album_list['total'];
         unset($album_list['total']);
         $data['perpage'] = $count;
         $data['curpage'] = $this->input['pp'];
         $data['onclick'] = 'onclick="album_page_show(this,5);"';
         $showpage = hg_build_pagelinks($data);
     }
     //		hg_pre($album_info);
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "我的专辑", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'my.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('album_info', $album_info);
     $this->tpl->addVar('showpage', $showpage);
     $this->tpl->addVar('album_list', $album_list);
     $this->tpl->addVar('album_total', $album_total);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_album');
 }
Esempio n. 17
0
 public function show()
 {
     $map_flag = 1;
     $info = new user();
     $member_id = $this->user['id'];
     $user_location = $info->getUserById($member_id);
     //获取用户的所在地
     $user_location = $user_location[0]['location'];
     $js_c = '';
     //如果用户的所在地为空,就判断用户标注过的位置数组是否为空
     $location_array = $info->get_location($member_id);
     //获取用户标注过的地点数组
     $location_array = $location_array[0];
     //等处理好后此句删掉
     if ($location_array) {
         //如果用户标注过的位置不为空,就取所有标注过的位置的中心位置为地图的中心点
         $point_array = array();
         $map_data_js = 'var markers = [';
         $split = '';
         foreach ($location_array as $user_id => $locations) {
             foreach ($locations as $marked_location) {
                 $tmp = explode(";", $marked_location);
                 $point_array[] = $tmp[1];
                 $tmp_latlng = explode('X', $tmp[1]);
                 $map_data_js .= $split . '{"name":"' . $tmp[0] . '","latitude":' . $tmp_latlng[0] . ',"longitude":' . $tmp_latlng[1] . '}' . "\r\n";
                 $split = ',';
             }
         }
         $map_data_js .= '];';
         $cnt = count($point_array);
         $xx = $yy = 0.0;
         if (!$user_location) {
             foreach ($point_array as $key => $value) {
                 $val = explode("X", $value);
                 $xx += $val[0];
                 $yy += $val[1];
             }
             $xx = $xx / $cnt;
             $yy = $yy / $cnt;
             hg_add_head_element('js-c', "var userAddress = '' ; var MAP_CENTER_POINT = '" . $xx . 'X' . $yy . "';" . $map_data_js);
         } else {
             hg_add_head_element('js-c', "var userAddress = '" . $user_location . "';" . "\r\n" . "var MAP_CENTER_POINT = '" . MAP_CENTER_POINT . "';" . $map_data_js);
         }
     } else {
         $map_data_js = 'var markers;' . "\r\n";
         hg_add_head_element('js-c', "var MAP_CENTER_POINT = '" . MAP_CENTER_POINT . "';" . $map_data_js);
     }
     hg_add_head_element("js", "http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=" . MAP_KEY . "&sensor=false");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/map.js');
     $html_body_attr = ' onload="initialize()"  onunload="GUnload()"';
     $this->page_title = $this->lang['pageTitle'];
     //include hg_load_template('map');
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('map');
 }
Esempio n. 18
0
 public function show()
 {
     $this->page_title = $this->lang['pageTitle'];
     $this->show_edit = 0;
     hg_add_head_element('js-c', "var SHOW_EDIT = " . $this->show_edit . ";");
     $this->tpl->addVar('show_edit', $this->show_edit);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->lang['pageTitle']);
     $this->tpl->outTemplate('back_password');
 }
Esempio n. 19
0
 public function show()
 {
     hg_add_head_element('js-c', $str);
     $list = array(array('name' => '马三三', 'categories' => '网友上传', 'audit' => '待审核', 'pubdate' => '2011-12-12 12:12:60', 'title' => '安徽铜陵狮子山区加强党的建设工作综述', 'time' => '3\'21"', 'pubdate' => '2011-12-12 12:12:60', 'stream' => '500', 'source' => '新闻综合频道', 'key' => '新闻 资讯'), array('name' => '马三三', 'categories' => '网友上传', 'audit' => '待审核', 'pubdate' => '2011-12-12 12:12:60', 'title' => '安徽铜陵狮子山区加强党的建设工作综述', 'time' => '3\'21"', 'pubdate' => '2011-12-12 12:12:60', 'stream' => '500', 'source' => '新闻综合频道', 'key' => '新闻 资讯'));
     $colunm = array(array('column' => '第一时间'), array('column' => '第二时间'));
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('colunm', $colunm);
     $this->tpl->addVar('list', $list);
     $this->tpl->outTemplate('item');
 }
Esempio n. 20
0
 public function show()
 {
     $authority = $this->get();
     $this->page_title = $this->lang['pageTitle'];
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'userprivacy.js');
     $gScriptName = SCRIPTNAME;
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('userprivacy');
 }
Esempio n. 21
0
 public function show()
 {
     $keywords = urldecode(trim($this->input['q']));
     if ($keywords) {
         $count = 20;
         $page = intval($this->input['pp']) / $count;
         $order_type = $this->input['order'] ? 1 : 0;
         $statusline = $this->status->search($keywords, $page, $count, $order_type);
         if (is_array($statusline)) {
             $data['totalpages'] = $statusline[0]['total'];
             $result_count = $statusline[0]['total'];
             unset($statusline[0]);
             $newest_id = $statusline[1]['id'];
             krsort($statusline);
         } else {
             $statusline = array();
             $newest_id = 0;
         }
     }
     $width = $this->input['width'] ? "width:" . $this->input['width'] . "px;" : "";
     $height = $this->input['height'] ? "height:" . $this->input['height'] . "px;" : "";
     $fwidth = $this->input['fwidth'] ? $this->input['fwidth'] . "px" : "350px";
     $this->page_title = $this->lang['pageTitle'];
     $order = $this->input['order'] ? $this->input['order'] : 0;
     hg_add_head_element('js-c', "\r\n\t\t\tvar ORDER = '" . $order . "';");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'discuss.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'dispose.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'rotate.js');
     //hg_add_head_element('js', RESOURCE_DIR . 'scripts/' .  'timing_update.js');  //定时更新页面信息数据
     if ($this->input['type']) {
         $this->tpl->addVar('keywords', $keywords);
         $this->tpl->addVar('statusline', $statusline);
         $this->tpl->addVar('newest_id', $newest_id);
         $this->tpl->addVar('width', $width);
         $this->tpl->addVar('height', $height);
         $this->tpl->addVar('fwidth', $fwidth);
         //include hg_load_template('comment');
         $this->tpl->addHeaderCode(hg_add_head_element('echo'));
         $this->tpl->setTemplateTitle($this->page_title);
         $this->tpl->outTemplate('comment');
     } else {
         //include hg_load_template('discuss');
         hg_add_head_element('css', MAIN_URL . 'res/zhibo/images/zhibo.css');
         hg_add_head_element('css', MAIN_URL . 'res/zhibo/images/tab.css');
         $this->tpl->addVar('keywords', $keywords);
         $this->tpl->addVar('statusline', $statusline);
         $this->tpl->addVar('newest_id', $newest_id);
         $this->tpl->addVar('width', $width);
         $this->tpl->addVar('height', $height);
         $this->tpl->addVar('fwidth', $fwidth);
         $this->tpl->addHeaderCode(hg_add_head_element('echo'));
         $this->tpl->setTemplateTitle($this->page_title);
         $this->tpl->outTemplate('discuss');
     }
 }
Esempio n. 22
0
 public function show()
 {
     $is_my_page = false;
     $user_id = $this->user['id'];
     if (empty($user_id)) {
         $this->check_login();
     }
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $station = $this->mVideo->get_station(0, $id);
     if (is_array($station)) {
         $sta_id = $station[0]['id'];
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $album_info = $this->mVideo->get_album_info($id, 0, 6);
     if (is_array($album_info)) {
         $album_total = $album_info['total'];
         unset($album_info['total']);
     }
     $count = 20;
     $page = intval($this->input['pp']) / $count;
     $con_station = $this->mVideo->get_station_history($sta_id, $page, $count);
     if (is_array($con_station)) {
         $total_nums = $con_station['total'];
         unset($con_station['total']);
         $data['totalpages'] = $total_nums;
         $data['perpage'] = $count;
         $data['curpage'] = $this->input['pp'];
         //			$data['pagelink'] = $this->input['user_id']?hg_build_link('' , array('user_id' => $this->input['user_id'])):"";
         $showpages = hg_build_pagelinks($data);
     }
     $this->settings['nav_menu'][3] = array("name" => "频道首页", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'rotate.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('sta_id', $sta_id);
     $this->tpl->addVar('album_total', $album_total);
     $this->tpl->addVar('album_info', $album_info);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('con_station', $con_station);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->lang['pageTitle']);
     $this->tpl->outTemplate('show');
 }
Esempio n. 23
0
 public function show()
 {
     if ($this->user['id']) {
         header("Location:index.php");
     }
     $this->page_title = $this->lang['pageTitle'];
     $gScriptName = SCRIPTNAME;
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('register');
 }
Esempio n. 24
0
 function show()
 {
     $unreadNum = $this->action($this->user['id'], 'count');
     $notifyInfo = $this->action($this->user['id'], 'get');
     $this->page_title = $this->lang['pageTitle'];
     //include hg_load_template('notify');
     $this->tpl->addVar('unreadNum', $total_nums);
     $this->tpl->addVar('notifyInfo', $notifyInfo);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('notify');
 }
Esempio n. 25
0
 public function show()
 {
     $this->check_login();
     $this->page_title = $this->lang['pageTitle'];
     $this->user_info = $this->info->getUserById($this->user['id']);
     $gScriptName = SCRIPTNAME;
     $this->page_title = '上传头像';
     $this->tpl->addVar('_user_info', $this->user_info);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('avatar');
 }
Esempio n. 26
0
 public function show()
 {
     $id = $this->user['id'] ? $this->user['id'] : 0;
     $type = $this->input['type'] ? $this->input['type'] : 0;
     if (!$id) {
         $this->check_login();
     }
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $this->pagelink = hg_build_link('', array('type' => $type));
     $count = 9;
     $page = (intval($this->input['pp']) ? intval($this->input['pp']) : 0) / $count;
     $stationInfo = $this->mVideo->get_user_collect($id, $type, $page, $count);
     if (is_array($stationInfo)) {
         $data['totalpages'] = $stationInfo['total'];
         unset($stationInfo['total']);
         $data['perpage'] = $count;
         $data['curpage'] = $this->input['pp'];
         $data['pagelink'] = $this->pagelink;
         $showpages = hg_build_pagelinks($data);
     }
     $list = array(array('name' => '视频收藏', 'url' => hg_build_link('my_favorites.php')));
     $album_info = $this->mVideo->get_album_info($id, $page, $count);
     $album_total = $album_info['total'];
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "我的收藏", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('type', $type);
     $this->tpl->addVar('list', $list);
     $this->tpl->addVar('stationInfo', $stationInfo);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('album_total', $album_total);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_favorites');
 }
Esempio n. 27
0
 public function show()
 {
     if ($this->user['id']) {
         if (strpos(REFERRER, 'login.php') != -1) {
             $url = 'index.php';
         }
         $this->Redirect('', $url, '', 1);
     }
     $this->page_title = $this->lang['pageTitle'];
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('login');
 }
Esempio n. 28
0
 public function show()
 {
     if (!$this->user['id']) {
         $url = SNS_UCENTER . 'user.php';
         $this->Redirect('', $url, '', 1);
     }
     $this->mUser = new user();
     $this->page_title = "手机绑定";
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'dispose.js');
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('cellphone');
 }
Esempio n. 29
0
 public function show()
 {
     $this->page_title = $this->lang['pageTitle'];
     $invite_code = $this->input['invite_code'] ? $this->input['invite_code'] : "";
     include_once ROOT_DIR . 'lib/class/uset.class.php';
     $this->mUset = new uset();
     $rt = $this->mUset->get_desig_uset(array('register', 'noregister', 'isopeninvite'));
     $rt0 = $rt[0];
     //register
     $rt1 = $rt[1];
     //noregister
     $rt2 = $rt[2];
     //isopeninvite
     $rt2['descripion'] = "请通过邀请进行注册!";
     if (!$rt0['status']) {
         if (!$rt2['status']) {
             $error = $rt1['status'];
             $this->ReportError($error);
         } else {
             if (!$invite_code) {
                 //					$error = $rt2['descripion'];
                 //					$this->ReportError($error);
                 $this->tpl->outTemplate('noregister');
                 exit;
             } else {
                 $ret = $this->info->verify_invite_code($invite_code);
                 if (!$ret) {
                     //						$error = $rt2['descripion'];
                     //						$this->ReportError($error);
                     $this->tpl->outTemplate('noregister');
                     exit;
                 }
             }
         }
     } else {
         if ($invite_code) {
             $ret = $this->info->verify_invite_code($invite_code);
         }
     }
     if ($this->user['id']) {
         header("Location:index.php");
     }
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'zone.js');
     $gScriptName = SCRIPTNAME;
     //include hg_load_template('register');
     $this->tpl->addVar('register', $register);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('register');
 }
Esempio n. 30
0
 public function show()
 {
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     /**
      * 获取用户的所有视频信息
      */
     $count = 15;
     $page = intval($this->input['pp']) / $count;
     $video_info = $this->mVideo->get_all_video_info($page, $count);
     if (is_array($video_info)) {
         $total_nums = $video_info[count($video_info) - 1];
         unset($video_info[count($video_info) - 1]);
         $data['totalpages'] = $total_nums;
         $data['perpage'] = $count;
         $data['curpage'] = $this->input['pp'];
         $showpages = hg_build_pagelinks($data);
     }
     $album_info = $this->mVideo->get_album_info($id, $page, $count);
     $album_total = $album_info['total'];
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "我的视频", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js-c', "\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/' . 'my.js');
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'tvieplayer_new.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('video_info', $video_info);
     $this->tpl->addVar('showpages', $showpages);
     $this->tpl->addVar('album_total', $album_total);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_video');
 }