fclose($fp); $tpl_file = str_replace('.profile.', '.friends.', $tpl_file); $fp = fopen($tpl_file, 'rb'); $tpl_friends = fread($fp, filesize($tpl_file)); fclose($fp); $linkurl = script_path . 'index.php'; $tpl_blog = addslashes($tpl_blog); $tpl_blog = str_replace("%HOME%", $HOME_TEXT, $tpl_blog); $tpl_blog = str_replace("%HOME_LINK%", $linkurl, $tpl_blog); $tpl_profile = addslashes($tpl_profile); $tpl_profile = str_replace("%HOME%", $HOME_TEXT, $tpl_profile); $tpl_profile = str_replace("%HOME_LINK%", $linkurl, $tpl_profile); $tpl_friends = addslashes($tpl_friends); $tpl_friends = str_replace("%HOME%", $HOME_TEXT, $tpl_friends); $tpl_friends = str_replace("%HOME_LINK%", $linkurl, $tpl_friends); $db = new sqldb2($DB_CONFIG_v2); // get users $name_id = array(); $all_users = array(); $t = $db->query('SELECT * FROM nlb_users;'); while ($row = mysql_fetch_assoc($t)) { $all_users[] = $row; $name_id[$row['username']] = $row['id']; } // get blogs $all_blogs = $db->getAllArray('SELECT * FROM nlb_blogs;'); // get comments $all_com = $db->getAllArray('SELECT * FROM nlb_comments;'); $db->clear(); $db->setConfig($DB_CONFIG_v3); $db->connect();
GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'ets.php'; require_once 'system/text.class.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_mail.class.php'; require_once 'system/nlb_config.class.php'; $start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $config = new nlb_config($db); $user = new nlb_user($db); $b = new nlb_blog($db); include $config->langfile(); if ($user->isLogedIn) { $b->setDateOffset($config->get('server_timezone'), $user->get('timezone')); } $action = 'login'; if (isset($_GET['action'])) { $action = $_GET['action']; } switch ($action) { // build login form. default: case 'login':
This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_mail.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; $db = new sqldb2($DB_CONFIG); $user = new nlb_user($db); $config = new nlb_config($db); $blog = new nlb_blog($db); $user->checkLogin(); // check for loged in user. if ($user->isLogedIn) { jsRedirect("index.php"); } include $config->langfile(); $start = mymicrotime(); $text = new Text($_POST, array('username', 'password', 'confirm-password', 'email', 'template', 'timezone'), array('custom')); $text->validate(); $clean = $text->clean; $baddata = false; $problems = array();
------------------------------------------------ */ header("Content-type: text/xml"); require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/sqldb2.class.php'; $path = fetch_url_data(); if (!isset($path['id'])) { jsRedirect(script_path . 'index.php'); // I'm not sure if re-directing is the best option since RSS should be used by // client apps, but if there is something wrong with the path info, then chances // are that someone is just trying to make an error appear. } $userid = addslashes($path['id']); $home_url = full_url . build_link('blog.php', array('user' => $userid)); $db = new sqldb2($DB_CONFIG); // user exists? $user_check = $db->getArray('SELECT count(user_id) AS c FROM ' . db_users . ' WHERE user_id="' . $userid . '";'); if ($user_check['c'] != 1) { // die('Invalid User'); jsRedirect(script_path . 'index.php'); } $user = $db->getArray('SELECT username FROM ' . db_users . ' WHERE user_id="' . $userid . '";'); $USER = $user['username']; $blogs = $db->query('SELECT u.username AS author, b.* FROM ' . db_users . ' AS u, ' . db_blogs . ' AS b WHERE b.author_id = ' . $userid . ' AND b.author_id = u.user_id AND b.access = ' . access_public . ' ORDER BY b.date DESC LIMIT 0, 10'); // print first part of rss echo '<rss version="2.0">
should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; // include this before others! require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; // NLB Class library require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'ets.php'; // Sweet template library $start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $config = new nlb_config($db); $user = new nlb_user($db); // is someone trying to access a persons blog $_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']); if (!empty($_SERVER['QUERY_STRING']) && ($id = $user->getIdByName($_SERVER['QUERY_STRING'])) > -1) { // die($id); //jsRedirect( script_path . 'blog.php/user/' . $id ); jsRedirect(build_link('blog.php', array('user' => $id))); } $user->checklogin(); require_once $config->langfile(); // include lang file $b = new nlb_blog($db); if ($user->isLogedIn) { // timezone settings
----------------------------------------- This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'ets.php'; $timer_start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $user = new nlb_user($db); $config = new nlb_config($db); include $config->langfile(); $user->checkLogin(); $b = new nlb_blog($db); if ($user->isLogedIn) { $b->setDateOffset($config->get('server_timezone'), $user->get('timezone')); } $perpage = $config->get('memlist_per_page'); $date_format = $config->get('memlist_date_format'); // Not really path info anymore... $_PATH = fetch_url_data(); $sort = 'username'; $allowed_sort = array('username', 'blog_count', 'registered'); if (isset($_PATH['sort']) && in_array($_PATH['sort'], $allowed_sort)) {
GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; // require_once this before others! require_once 'system/functions.php'; require_once 'system/ets_sql.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; $path = fetch_url_data(); $db = new sqldb2($DB_CONFIG); $blog = new nlb_blog($db); $config = new nlb_config($db); require_once $config->langfile(); $user = new nlb_user($db); $user->checkLogin(); if (isset($path['user'])) { /** * Show page of blogs for user */ $USERID = $path['user']; if (!is_numeric($USERID)) { jsRedirect(script_path . 'index.php'); } $u = new nlb_user($db, $USERID); // $u is the user who's friends page we are viewing
should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; // require_once this before others! require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; // NLB Class library require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'ets.php'; // Sweet template library $start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $config = new nlb_config($db); $user = new nlb_user($db); //$user->checklogin(); DONT CHECK FOR LOGIN ON THIS PAGE! include $config->langfile(); // include lang file if (!isset($_GET['id'])) { jsRedirect('index.php'); } $id = addslashes($_GET['id']); $row = $db->getArray('SELECT reason, expires FROM ' . db_banned . ' WHERE banned_id="' . $id . '";'); if (empty($row)) { die("empty"); } $body = $l['banned_msg']; $body = str_replace("%REASON%", $row['reason'], $body);
GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; // require_once this before others! require_once 'system/functions.php'; require_once 'system/ets_sql.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; $path = fetch_url_data(); $db = new sqldb2($DB_CONFIG); $blog = new nlb_blog($db); $config = new nlb_config($db); include $config->langfile(); $user = new nlb_user($db); $user->checkLogin(); if (!isset($path['user'])) { jsRedirect(script_path . 'index.php'); // need a user id!! } else { $USERID = $path['user']; if (!is_numeric($USERID)) { jsRedirect(script_path . 'index.php'); } // get info on user $info = $db->getArray('
----------------------------------------- This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'ets.php'; $start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $blog = new nlb_blog($db); $user = new nlb_user($db); $config = new nlb_config($db); include $config->langfile(); $user->checkLogin(); if ($user->isLogedIn) { // timezone $blog->setDateOffset($config->get('server_timezone'), $user->get('timezone')); } // // T O T A L S // // public blogs $tmp = $db->getArray('SELECT COUNT(blog_id) AS c FROM ' . db_blogs . ' WHERE access="' . access_public . '";'); $total_public = $tmp['c'];
GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_mail.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; session_start(); $db = new sqldb2($DB_CONFIG); $user = new nlb_user($db); $config = new nlb_config($db); $blog = new nlb_blog($db); $user->checkLogin(); include $config->langfile(); $start = mymicrotime(); $ets = new stdclass(); /** * ======================================= * S E A R C H B L O G S * ======================================= */ /* ===== QUERY TEMPLATE ====== SELECT u.username, b.blog_id, b.author_id, b.date, b.subject, b.body, b.comments, b.html, b.smiles, b.bb, FROM nlb3_blogs AS b, nlb3_users AS u
This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_sql.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; $path = fetch_url_data(); $db = new sqldb2($DB_CONFIG); $blog = new nlb_blog($db); $config = new nlb_config($db); require_once $config->langfile(); $user = new nlb_user($db); $user->checkLogin(); if (isset($path['id'])) { /** * ======================================= * Show single blog & Comments * ======================================= */ $blog_id = $path['id']; if (!is_numeric($blog_id)) { jsRedirect(script_path . 'index.php'); }
This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'system/nlb_blog.class.php'; require_once 'system/nlb_user.class.php'; require_once 'system/nlb_config.class.php'; require_once 'system/text.class.php'; require_once 'ets.php'; $start = mymicrotime(); $db = new sqldb2($DB_CONFIG); $config = new nlb_config($db); $blog = new nlb_blog($db); $user = new nlb_user($db); $user->checklogin(); if (!isset($_POST['parent']) || empty($_POST['parent'])) { jsRedirect('index.php'); } $parent = $_POST['parent']; // get some info about this blog $info = $db->getArray('SELECT access, comments FROM ' . db_blogs . ' WHERE blog_id="' . $parent . '" LIMIT 1;'); // if anything goes wrong, decide where we will go. if ($info['access'] == access_news) { $go = build_link('index.php', array('action' => 'comment', 'id' => $parent)); } else { $go = build_link('blog.php', array('id' => $parent));
NewLife Blogging System Version 3 ----------------------------------------- Nick F <*****@*****.**> www.sevengraff.com ----------------------------------------- This product is distributed under the GNU GPL liscense. A copy of that liscense should be packaged with this product. ----------------------------------------- */ require_once 'config.php'; require_once 'system/functions.php'; require_once 'system/ets_file.php'; require_once 'system/sqldb2.class.php'; require_once 'ets.php'; $db = new sqldb2($DB_CONFIG); $smiles = $db->query("SELECT * FROM " . db_smiles . ";"); $i = 0; while ($row = mysql_fetch_assoc($smiles)) { $ets->items[$i]->img = script_path . 'smiles/' . $row['image']; $ets->items[$i]->code = $row['code']; $ets->items[$i]->desc = $row['desc']; $i++; } $ets->java_script = <<<END_OF_JS <script language="JavaScript" type="text/javascript"> <!-- function insertItem(text) { \topener.document.new_entry.body.value += ' ' + text + ' '; }