Пример #1
0
<?php

include_once 'lib.php';
set_path();
force_ssl();
session_start();
auto_login();
?>

<!doctype html>
<html class="no-js" lang="en">
  <head>
    <link rel='icon' type='image/x-icon' href='img/Q.png' /> 
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Quadcore Forum | Edit Discussion</title>
    <link rel="stylesheet" href="css/foundation.css" />
    <link rel="stylesheet" href="css/quadcore.css" />
    <script src="js/vendor/modernizr.js"></script>
</head>
<body>

<?php 
include_once 'header.php';
$login_failed = false;
if (null == ($dis_id_passed = filter_input(INPUT_GET, dis_id, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE))) {
    echo 'Error. Invalid discussion ID<br>';
    exit;
}
/************ Make sure that the Discussion Exists ************/
if (!($db = db_connect())) {
Пример #2
0
 * @package  Laravel
 * @version  3.0.0
 * @author   Taylor Otwell <*****@*****.**>
 * @link     http://laravel.com
 */
// --------------------------------------------------------------
// Define the directory separator for the environment.
// --------------------------------------------------------------
define('DS', DIRECTORY_SEPARATOR);
// --------------------------------------------------------------
// Set the core Laravel path constants.
// --------------------------------------------------------------
require 'paths.php';
// --------------------------------------------------------------
// Override the application paths when testing the core.
// --------------------------------------------------------------
$config = file_get_contents('phpunit.xml');
if (strpos($config, 'laravel-tests') !== false) {
    $path = path('bundle') . 'laravel-tests' . DS;
    set_path('app', $path . 'application' . DS);
    set_path('bundle', $path . 'bundles' . DS);
    set_path('storage', $path . 'storage' . DS);
}
// --------------------------------------------------------------
// Bootstrap the Laravel core.
// --------------------------------------------------------------
require path('sys') . 'core.php';
// --------------------------------------------------------------
// Start the default bundle.
// --------------------------------------------------------------
Laravel\Bundle::start(DEFAULT_BUNDLE);
Пример #3
0
 public function thread()
 {
     if ($_GET["articleid"]) {
         $map['id'] = $_GET['articleid'];
     } else {
         $this->error("访问错误", 'index', 5);
         return;
     }
     //如果用户已经登录,将当前的文章id保存到session中
     $user = session('user');
     if ($user) {
         $user['articleid'] = $_GET['articleid'];
         session('user', $user);
     }
     //读取文章数据
     $model = M('article');
     //更新查看数量
     $model->where($map)->setInc('reviewnum');
     $article = $model->where($map)->select();
     if (!$article) {
         $this->error("服务器错误");
         return;
     }
     $article = $article[0];
     $this->assign("article", $article);
     $th['reply_num'] = $article['replynum'];
     $th['review_num'] = $article['reviewnum'];
     //读取作者用户数据
     $vip = M('vip');
     $query['id'] = $article['authorid'];
     $user = $vip->where($query)->select();
     if (!$user) {
         $this->error("服务器错误");
         return;
     }
     $user = $user[0];
     //读取作者的主题数据
     $query = [];
     $query['authorid'] = $article['authorid'];
     $user['thnum'] = $model->where($query)->count();
     //读取作者的帖子数据
     $review = M('review');
     $query = [];
     $query['reviewerid'] = $article['authorid'];
     $user['replynum'] = $review->where($query)->count();
     //生成vip地址
     if ($user["viplevel"] < 1) {
         $user["viplevel"] = 1;
     }
     if ($user["viplevel"] > 5) {
         $user["viplevel"] = 5;
     }
     $user['lvimg'] = __ROOT__ . '' . '/Application/Home/View/resource/img/' . '' . $user['viplevel'] . '' . 'zuan.gif';
     $user['desc'] = $user['viplevel'] . '' . '钻会员';
     /////////////////////////////////////////////////////////////////////////////
     //读取评论数据
     $th['articleid'] = $article['id'];
     if ($_GET['page']) {
         $th['cur_page'] = (int) $_GET['page'];
     } else {
         $th['cur_page'] = 1;
     }
     $th["per_page_num"] = 5;
     //每页评论数量
     $th["menu_num"] = 6;
     //每页页码数量
     $query = [];
     $query['articleid'] = $article['id'];
     $th['reply_num'] = $review->where($query)->count();
     $th['page_total'] = intval($th['reply_num']) / $th["per_page_num"];
     if (floor($th['page_total']) < $th['page_total']) {
         $th['page_total'] = (int) floor($th['page_total']);
         $th['page_total']++;
     }
     $th = paged($th);
     $limit['articleid'] = $article['id'];
     $query = $th["cur_page"] . "," . $th["per_page_num"];
     $replyer = $review->where($limit)->page($query)->select();
     //拉取评论者的统计数据
     $vip = M("vip");
     foreach ($replyer as $key => $value) {
         //读取评论者的vip用户数据
         $query = [];
         $query['id'] = $value['reviewerid'];
         $u = $vip->where($query)->select();
         $value['user'] = $u[0];
         //读取评论者的主题数据
         $query = [];
         $query['authorid'] = $value['reviewerid'];
         $value['user']['thnum'] = $model->where($query)->count();
         //读取评论者的帖子数据
         $query = [];
         $query['reviewerid'] = $value['reviewerid'];
         $value['user']['replynum'] = $review->where($query)->count();
         //生成评论者生成vip地址
         if ($user["viplevel"] < 1) {
             $user["viplevel"] = 1;
         }
         if ($user["viplevel"] > 5) {
             $user["viplevel"] = 5;
         }
         $value['user']['lvimg'] = __ROOT__ . '' . '/Application/Home/View/resource/img/' . '' . $user['viplevel'] . '' . 'zuan.gif';
         $value['user']['desc'] = $user['viplevel'] . '' . '钻会员';
         $replyer[$key] = $value;
     }
     //生成网站索引
     $url = "theme.html?" . '' . "category=" . '' . $article['categoryid'];
     $query = [];
     $query['id'] = $article['categoryid'];
     $cate = M("category");
     $c = $cate->where($query)->select();
     set_path($url, $c[0]['name'], 1);
     $url = "thread.html?" . '' . "articleid=" . '' . $article['id'];
     set_path($url, $article['title'], 2);
     $this->assign('path', get_path(2));
     $the = 'newth.html?categoryid=' . '' . $article['categoryid'];
     $this->assign('newth', $the);
     $this->assign('paged', $th);
     $this->assign('replyer', $replyer);
     $this->assign('author', $user);
     $this->assign('user', session('user'));
     $this->show();
 }
Пример #4
0
}
###############################
#		Switch 						#
###############################
$mode = $_POST['mode'];
switch ($mode) {
    ############################
    #		Install 					#
    ############################
    case "install":
        /* display page header and start graphics */
        echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\r\n<html>\n\r\n<head>\n\r\n\t<title>MyIT Installer</title>\n\r\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n\r\n\t<link href=\"../css/default.css\" rel=\"stylesheet\" type=\"text/css\">\n\r\n\r\n</head>\n\r\n<body>\n\r\n<center>\n\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\r\n\t<tr>\n\r\n\t\t<td><img src=\"../images/logo.jpg\" alt=\"\" width=\"490\" height=\"114\"></td>\n\r\n\t</tr>\n\r\n</table>\n\r\n\t\t\t\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n\r\n\t<tr>\n\r\n\t\t<td  background=\"../images/index03.gif\"><img src=\"../images/index03.gif\" alt=\"\" width=\"100%\" height=\"40\"></td>\n\r\n\t</tr><tr>\n\r\n\t\t<td align=\"center\">\n\r\n\r\n\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"20\" cellspacing=\"0\">\n\r\n\t\t\t\t<tr>\n\r\n\t\t\t\t\t<td class=\"olotd\" align=\"center\">\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<!-- Begin Page -->\n\r\n\t\t\t\t\t\t<table width=\"800\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" >\n\r\n\t\t\t\t\t\t\t<tr>\n\r\n\t\t\t\t\t\t\t\t<td class=\"menuhead2\" width=\"100%\">&nbsp;MYIT CRM Installer</td>\n\r\n\t\t\t\t\t\t\t</tr><tr>\n\r\n\t\t\t\t\t\t\t\t<td class=\"menutd2\" colspan=\"2\">\n\r\n\r\n\t\t\t\t\t\t\t\t\t<table width=\"100%\"  class=\"olotable\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" >\n\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<table width=\"100%\"  class=\"menutd\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" >\n\r\n\t\t\t\t\t\t\t\t\t";
        $login = $_POST['display_name'];
        $path2 = $_POST['default_site_name'];
        /* write the need configs */
        set_path($_POST);
        /* Load our new configs */
        require "../include/ADODB/adodb.inc.php";
        /* Create ADODB Connection */
        $db =& ADONewConnection('mysql');
        $db->Connect($_POST['db_host'], $_POST['db_user'], $_POST['db_password']);
        if ($db->errorMsg() != '') {
            echo "There was an error connecting to the database: " . $db->errorMsg();
            die;
        }
        //
        //OBSOLETE CODE - REMOVED BY GEEVPC ON THE 21/7/11
        //##################################
        //# Create Database						#
        //##################################
        //		$q = "CREATE DATABASE IF NOT EXISTS ".$_POST['db_name'];
Пример #5
0
<?php

include_gobe_module("web.analytics");
set_path('home', SITE_BASEURL);
set_path('images', PATH_IMAGES);
set_path('css', PATH_CSS);
set_path('javascript', PATH_JAVASCRIPT);
/* Globally available variables */
add_gobe_variable('site-protocol', SITE_PROTOCOL);
Analytics::blockServer("dev." . DOMAIN_WEB);
Analytics::blockServer("127.0.0.1");
Analytics::blockUser("127.0.0.1");
Пример #6
0
<?php

/**
 * Gallery config
 *
 * @author Andrew Murphy 
 * @author Justin Johnson <johnsonj>, justin@zebrakick.com
 * @version 1.1.0 20080430 JJ
 * @version 1.0.0 20071120 AM
 *
 * @package zk.modules.gallery.main
 */
define('DB_TABLE_LISTING', '`listing`');
define('DB_TABLE_PHOTO', '`photo`');
define('DB_DEFAULT_LIMIT', 5);
set_path('imageGateway', '/bin/photos/');