function fncview($uid, $template) { $pi_name = "userbox"; global $_CONF; global $LANG_USERBOX_ADMIN; //template フォルダ $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name); $tmpl = new Template($tmplfld); $tmpl->set_file(array('view' => 'view.thtml')); //-- $tmpl->set_var('site_admin_url', $_CONF['site_admin_url']); if ($template === "") { $tmpl->set_var('about_thispage', $LANG_USERBOX_ADMIN['about_admin_view']); } else { $tmpl->set_var('about_thispage', ""); } $tmpl->parse('output', 'view'); $view = $tmpl->finish($tmpl->get_var('output')); $information = array(); $retval = userbox_profile($uid, $template, "", "view"); $layout = $retval['layout']; $information['headercode'] = $retval['headercode']; $information['pagetitle'] = $retval['title']; $display = $view; $display .= $retval['display']; $display = DATABOX_displaypage($pi_name, $layout, $display, $information); COM_output($display); }
function fncview() { $pi_name = "userbox"; global $_CONF; global $LANG_USERBOX_ADMIN; //template フォルダ $tmplfld = DATABOX_templatePath('myprofile', 'default', $pi_name); $tmpl = new Template($tmplfld); $tmpl->set_file(array('view' => 'view.thtml')); //-- //$tmpl->set_var('site_admin_url', $_CONF['site_admin_url']); $tmpl->set_var('about_thispage', $LANG_USERBOX_ADMIN['about_myprofile_view']); $tmpl->parse('output', 'view'); $view = $tmpl->finish($tmpl->get_var('output')); $retval = ""; $retval .= $view; $ret = userbox_profile($_USER['uid'], "", "", "view"); $retval .= $ret['display']; return $retval; }
//public_html/content.php?code=xxxx&template=yyyy $url_rewrite = false; $q = false; $url = $_SERVER["REQUEST_URI"]; if ($_CONF['url_rewrite']) { $q = strpos($url, '?'); if ($q === false) { $url_rewrite = true; } elseif (substr($url, $q - 4, 4) != '.php') { $url_rewrite = true; } } // if ($url_rewrite) { COM_setArgNames(array('code', 'template')); $code = COM_applyFilter(COM_getArgument('code')); $template = COM_applyFilter(COM_getArgument('template')); } else { $code = COM_applyFilter($_GET['code']); $template = COM_applyFilter($_GET['template']); } //ログイン要否チェック if (COM_isAnonUser()) { if ($_CONF['loginrequired'] or $_USERBOX_CONF['loginrequired'] == 3 or $_USERBOX_CONF['loginrequired'] == 2 or $_USERBOX_CONF['loginrequired'] == 1) { echo $LANG_USERBOX['loginrequired']; exit; } } $id = 0; $retval = userbox_profile($id, $template, "yes", "", $code); echo $retval['display'];