function fncview($pi_name, $id) { global $_CONF; global $LANG_USERBOX_ADMIN; //template フォルダ $tmplfld = DATABOX_templatePath('mydata', '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_admin_view']); $tmpl->parse('output', 'view'); $view = $tmpl->finish($tmpl->get_var('output')); $retval = ""; $retval .= $view; $ret = databox_data($id, "", "", "view"); $retval .= $ret['display']; return $retval; }
function fncview($id, $template) { $pi_name = "databox"; global $_CONF; global $LANG_DATABOX_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_DATABOX_ADMIN['about_admin_view']); } else { $tmpl->set_var('about_thispage', ""); } $tmpl->parse('output', 'view'); $view = $tmpl->finish($tmpl->get_var('output')); $retval = ""; $retval .= $view; $ret = databox_data($id, $template, "", "view"); $retval .= $ret['display']; return $retval; }
if (COM_isAnonUser()) { if ($_CONF['loginrequired'] or $_DATABOX_CONF['loginrequired'] == 3 or $_DATABOX_CONF['loginrequired'] == 2 or $_DATABOX_CONF['loginrequired'] == 1 and $id > 0 or $_DATABOX_CONF['loginrequired'] == 1 and $code != "") { $display .= DATABOX_siteHeader($pi_name, '', $page_title); $display .= SEC_loginRequiredForm(); $display .= DATABOX_siteFooter($pi_name); COM_output($display); exit; } } $msg = ''; if (isset($_GET['msg'])) { $msg = COM_applyFilter($_GET['msg'], true); } $information = array(); // 'コメントを追加', if (isset($_POST['reply']) && $_POST['reply'] == $LANG01[25]) { $display .= COM_refresh($_CONF['site_url'] . '/comment.php?sid=' . $_POST['pid'] . '&pid=' . $_POST['pid'] . '&type=' . $_POST['type']); echo $display; exit; } $retval = databox_data($id, $template, "yes", "page", $code); $layout = $retval['layout']; $information['headercode'] = $retval['headercode']; $information['pagetitle'] = $retval['title']; if (isset($msg)) { $display .= COM_showMessage($msg, $pi_name); } $display .= $retval['display']; $display .= databox_Comment($id, $code); $display = DATABOX_displaypage($pi_name, $layout, $display, $information); COM_output($display);