本文整理汇总了PHP中hg_add_head_element函数的典型用法代码示例。如果您正苦于以下问题:PHP hg_add_head_element函数的具体用法?PHP hg_add_head_element怎么用?PHP hg_add_head_element使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hg_add_head_element函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show
/**
*
* 显示用户黑名单列表界面
*/
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');
//数据写入粉丝模板
}
开发者ID:h3len,项目名称:Project,代码行数:34,代码来源:blacklist.php
示例2: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:27,代码来源:userprofile.php
示例3: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:32,代码来源:geoinfo.php
示例4: show
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 = 'login.php';\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');
}
开发者ID:h3len,项目名称:Project,代码行数:27,代码来源:info.php
示例5: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:25,代码来源:source_config.php
示例6: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:26,代码来源:application.php
示例7: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:32,代码来源:node.php
示例8: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:28,代码来源:admin_datasource.php
示例9: show
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');
}
}
开发者ID:h3len,项目名称:Project,代码行数:33,代码来源:show.php
示例10: show
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 = 'login.php';\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');
}
开发者ID:h3len,项目名称:Project,代码行数:31,代码来源:my_station.php
示例11: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:25,代码来源:mytemplate.php
示例12: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:26,代码来源:menu.php
示例13: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:28,代码来源:cloud_site.php
示例14: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:8,代码来源:editpasswd.php
示例15: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:58,代码来源:my_program.php
示例16: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:57,代码来源:my_album.php
示例17: show
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&v=2&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');
}
开发者ID:h3len,项目名称:Project,代码行数:56,代码来源:map.php
示例18: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:10,代码来源:back_password.php
示例19: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:10,代码来源:test_list.php
示例20: show
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');
}
开发者ID:h3len,项目名称:Project,代码行数:10,代码来源:userprivacy.php
注:本文中的hg_add_head_element函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论