Argoth
Apr 9 2005, 08:26 PM
Try this, make sure you set the variables. Before you weren't actually telling the mysql server anything. CODE <?php $_CONFIG['mbname'] = ''; // Giga Pass $_CONFIG['mbsurl'] = ''; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['dbhost'] = ''; // trap17.com $_CONFIG['homepage'] = ''; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['legal_tags'] = 'b|i'; // HTML tags allowed in messages. You can only add tags that have no attributes.
/////// Set these variables:
$_MYSQL['dbhost'] = ''; // localhost $_MYSQL['dbuser'] = ''; // dayzed_ejashby $_MYSQL['dbpass'] = ''; // (I put the password for dayzed_ejashby here) $_MYSQL['dbname'] = ''; // dayzed_SQLdatabase
// // User level definitions //
define('Inactive', 0); define('Warned', 1); define('Mutie', 12); define('Rookie', 15); define('Veteran', 18); define('Idol', 30); define('Moderator', 52); define('Administrator', 60);
// // Include money (Coins) configuration. Go edit that file. //
require 'mny_config.php';
$db = @mysql_connect($_MYSQL['dbhost'], $_MYSQL['dbuser'], $_MYSQL['dbpass']) or die("<b>Error:</b> Failed to connect to database host: {$_MYSQL['dbhost']}<br /> <b>Possible Solution:</b> Check if the database host name, user name and password are defined correctly in the config.inc.php file.<br /> <b>MySQL says:</b> ". mysql_error());
@mysql_select_db($_MYSQL['dbname'], $db) or die("<b>Error:</b> Failed to select database: {$_MYSQL['dbname']}<br /> <b>Possible Solution:</b> Check if the database is set up and the database name defined in the config.inc.php file is correct.<br /> <b>MySQL says:</b> ". mysql_error()); ?>
Reply
Dayzed
Apr 9 2005, 08:33 PM
Do I need to get rid of [url=(link here)[/url] ?
Reply
Argoth
Apr 9 2005, 09:09 PM
No, the "//" means what ever is after it is a comment but you should probably set thoose variables like this: CODE $_CONFIG['mbname'] = 'Giga Pass'; // Giga Pass $_CONFIG['mbsurl'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['dbhost'] = 'trap17.com'; // trap17.com $_CONFIG['homepage'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['legal_tags'] = 'b|i'; // HTML tags allowed in messages. You can only add tags that have no attributes.
Or use whatever values you want.
Reply
Dayzed
Apr 9 2005, 09:35 PM
Thanks. I'll try it tomorrow!
Reply
Dayzed
Apr 9 2005, 10:19 PM
CODE $_CONFIG['mbname'] = 'Giga Pass'; // Giga Pass $_CONFIG['mbsurl'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['dbhost'] = 'trap17.com'; // trap17.com $_CONFIG['homepage'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['legal_tags'] = 'b|i'; // HTML tags allowed in messages. You can only add tags that have no attributes.
/////// Set these variables:
$_MYSQL['dbhost'] = ''; // localhost $_MYSQL['dbuser'] = ''; // dayzed_ejashby $_MYSQL['dbpass'] = ''; // (I put the password for dayzed_ejashby here) $_MYSQL['dbname'] = ''; // dayzed_SQLdatabase
// // User level definitions //
define('Inactive', 0); define('Warned', 1); define('Mutie', 12); define('Rookie', 15); define('Veteran', 18); define('Idol', 30); define('Moderator', 52); define('Administrator', 60);
// // Include money (Coins) configuration. Go edit that file. //
require 'mny_config.php';
$db = @mysql_connect($_MYSQL['dbhost'], $_MYSQL['dbuser'], $_MYSQL['dbpass']) or die("<b>Error:</b> Failed to connect to database host: {$_MYSQL['dbhost']}<br /> <b>Possible Solution:</b> Check if the database host name, user name and password are defined correctly in the config.inc.php file.<br /> <b>MySQL says:</b> ". mysql_error());
@mysql_select_db($_MYSQL['dbname'], $db) or die("<b>Error:</b> Failed to select database: {$_MYSQL['dbname']}<br /> <b>Possible Solution:</b> Check if the database is set up and the database name defined in the config.inc.php file is correct.<br /> <b>MySQL says:</b> ". mysql_error()); ?> So the code would be like that?
Reply
Dayzed
Apr 9 2005, 10:26 PM
AHHHH! It doesnt work! I get a bigger error page now! It says the header is messed up too! www.gigapass.trap17.com Look for yourself!
Reply
Argoth
Apr 9 2005, 10:40 PM
CODE <?php $_CONFIG['mbname'] = 'Giga Pass'; // Giga Pass $_CONFIG['mbsurl'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['dbhost'] = 'trap17.com'; // trap17.com $_CONFIG['homepage'] = 'http://gigapass.trap17.com'; // [url=http://gigapass.trap17.com]http://gigapass.trap17.com[/url] $_CONFIG['legal_tags'] = 'b|i'; // HTML tags allowed in messages. You can only add tags that have no attributes.
/////// Set these variables: //////////THESE MUST BE SET CORRECTLY! $_MYSQL['dbhost'] = 'localhost'; // localhost $_MYSQL['dbuser'] = 'dayzed_ejashby'; // dayzed_ejashby $_MYSQL['dbpass'] = ''; // (I put the password for dayzed_ejashby here) $_MYSQL['dbname'] = 'dayzed_SQLdatabase'; // dayzed_SQLdatabase
// // User level definitions //
define('Inactive', 0); define('Warned', 1); define('Mutie', 12); define('Rookie', 15); define('Veteran', 18); define('Idol', 30); define('Moderator', 52); define('Administrator', 60);
// // Include money (Coins) configuration. Go edit that file. //
require 'mny_config.php';
$db = @mysql_connect($_MYSQL['dbhost'], $_MYSQL['dbuser'], $_MYSQL['dbpass']) or die("<b>Error:</b> Failed to connect to database host: {$_MYSQL['dbhost']}<br /> <b>Possible Solution:</b> Check if the database host name, user name and password are defined correctly in the config.inc.php file.<br /> <b>MySQL says:</b> ". mysql_error());
@mysql_select_db($_MYSQL['dbname'], $db) or die("<b>Error:</b> Failed to select database: {$_MYSQL['dbname']}<br /> <b>Possible Solution:</b> Check if the database is set up and the database name defined in the config.inc.php file is correct.<br /> <b>MySQL says:</b> ". mysql_error()); ?>
Try this, but make sure the variables are set properly.
Reply
Dayzed
Apr 9 2005, 10:47 PM
..... I do change whats on torwards the bottom, correct? >_>
Reply
Dayzed
Apr 9 2005, 11:25 PM
It works! YAY! Now, the header is messed up... It says in line 261. CODE <?php session_cache_limiter('private, must-revalidate'); session_name('sid'); session_start();
$_PAGE['start_time'] = getmicrotime();
// // Unset globals //
$methods = array('_POST', '_GET', '_COOKIE', '_FILES'); isset($_SESSION) ? $methods[] = '_SESSION' : '';
foreach ($methods as $method) { foreach ($$method as $var_name => $var_value) { unset($$var_name); } }
$_GET['board'] = isset($_GET['board']) ? intval($_GET['board']) : null; $_GET['topic'] = isset($_GET['topic']) ? intval($_GET['topic']) : null; $_GET['message'] = isset($_GET['message']) ? intval($_GET['message']) : null; $_GET['user'] = isset($_GET['user']) ? intval($_GET['user']) : null;
// // User Authentication Function //
function auth($username, $password) { $result = mysql_query("SELECT username FROM users WHERE username = '$username' AND userpass = '$password'");
return mysql_num_rows($result) != 0 ? mysql_result($result, 0) : null; }
// // SQL Field Fetching Function //
function get_field($field, $tbl_name, $condition = 1) { $result = mysql_query("SELECT $field FROM $tbl_name WHERE $condition"); return @mysql_result($result, 0); }
// // IP Fetching Function //
function fetch_ip() { $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if (strpos($ip, ',')) { $ip = explode(',', $ip); $ip = trim($ip[0]); }
return $ip; }
// // Get Microtime //
function getmicrotime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); }
function navigator($title, $col = 2, $bor = 1, $spc = 0, $info = 1, $other_links = null, $style = null) { global $q_string, $userlevelm;
if (isset($userlevelm)) { ?> <table border="<?= $bor ?>" cellspacing="<?= $spc ?>" width="100%"<?= $style ?>> <tr><td align="center" colspan="<?= $col ?>"><font size="6"><b><?= $title ?></b></font></td></tr> <tr><td align="center" colspan="<?= $col ?>" class="b"><i>Return to: <a class="menu" href="index.php">Board List</a> <?php
if (isset($_GET['board'])) { ?> | <a class="menu" href="gentopic.php?board=<?= $_GET['board'] ?>">Topic List</a><?php }
if (isset($_GET['topic'])) { ?> | <a class="menu" href="genmessage.php<?= $q_string['a'] ?>">Message List</a><?php }
if ($info == 1) { ?> | <a class="menu" href="user.php<?= $q_string['a'] ?>">User Info Page</a><?php }
if (is_array($other_links)) { foreach ($other_links as $href => $link_title) { $href = explode('|', $href);
if ($href[1] == '' || $userlevelm >= $href[1]) { ?> | <a class="menu" href="<?= $href[0], $q_string['a'] ?>"><?= $link_title ?></a><?php } } }
if ($userlevelm >= 52) { ?> | <a class="menu" href="cpanel.php<?= $q_string['a'] ?>">Control Panel</a><?php }
?> </i></td></tr> <?php }
else { ?> <table border="<?= $bor ?>" cellspacing="<?= $spc ?>" width="100%"<?= $style ?>> <tr><td align="center" colspan="<?= $col ?>"><font size="6"><b><?= $title ?></b></font></td></tr> <tr><td align="center" colspan="<?= $col ?>" class="b"> <a class="menu" href="index.php">Board List</a> | <a class="menu" href="register.php">Register</a> | <a class="menu" href="login.php">Log In</a> | <a class="menu" href="help.php">Help</a> | <a class="menu" href="tos.php">ToS</a></td></tr> <?php } }
// // Update Counter //
mysql_query("UPDATE counters SET count_value=count_value+1 WHERE count_type='boards'");
// // IP Banning //
if (isset($_COOKIE['zXi7g'])) die;
$result = mysql_query('SELECT ip_addr FROM banned_ips');
while ($row = mysql_fetch_row($result)) { if (stristr($_SERVER['REMOTE_ADDR'], $row[0]) || stristr($_SERVER['HTTP_REFERER'], $row[0])) { setcookie('zXi7g', 'o', time()+92275200); die; } }
if (stristr($_SERVER['HTTP_USER_AGENT'], 'anon')) die;
// // User Name and Password Retrieval //
$uname = isset($_SESSION['username']) ? $_SESSION['username'] : (isset($_COOKIE['uname']) ? $_COOKIE['uname'] : null); $pword = isset($_SESSION['password']) ? $_SESSION['password'] : (isset($_COOKIE['pword']) ? $_COOKIE['pword'] : null);
// // Common User Info Retrieval //
$row = @mysql_fetch_row(@mysql_query("SELECT userid, level, style, timezone, sidebar FROM users WHERE username='$uname' AND userpass='$pword'"));
if (isset($row[0])) { $useridm = $row[0]; $userlevelm = $row[1]; $userstylem = $row[2]; $_PAGE['timezone'] = $row[3]*3600; $_PAGE['sidebar'] = $row[4]; mysql_query("UPDATE users SET lastsec='".time()."', lastacip='{$_SERVER['REMOTE_ADDR']}', last_page='". htmlspecialchars(preg_replace('#sid=[[:alnum:]]+(\&)*#i', '', $_SERVER['REQUEST_URI']), ENT_QUOTES) ."', user_agent='". htmlspecialchars($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES) ."', real_ip = '". fetch_ip() ."' WHERE userid='$useridm'"); }
// // Spit It All Out //
?> <html><head><title><?= $_CONFIG['mbsname'] ?>: <?= $title ?></title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <?php
switch ($userstylem) { case 'custom': extract(@mysql_fetch_assoc(mysql_query("SELECT * FROM style WHERE userid='$useridm'")));
echo "<style type=\"text/css\"> a:link {color: $n_link; text-decoration: underline} a:visited {color: $n_vlink; text-decoration: underline} a.menu:link {color: $m_link; text-decoration: underline} a.menu:visited {color: $m_vlink; text-decoration: underline} a.menu:hover {color: $m_hlink; text-decoration: underline} a.menu:active {color: $m_alink; text-decoration: underline} body, td {background-color: $main_bg; font-family: $font_face; font-size: 80%;color: $font_color} .a {background-color: $c1_bg; font-size: 95%; color: $c1_fc; font-weight: bold} .b {background-color: $c2_bg; font-size: 95%; color: $c2_fc; font-weight: bold} .c {background-color: $c3_bg} .d {background-color: $c4_bg} .system {background-color: $system_bg} .shade {background-color: $shade_bg} .sidebar {background-color: $sidebar_bg} .large {font-size: 120%; font-weight: bold} .medium {font-size: 90%} .poll_graph {display: block; background-color: $poll_graph; line-height: 25px} </style>\n";
break;
default: empty($userstylem) ? $userstylem = 1 : '';
$theme_path = mysql_result(mysql_query("SELECT theme_path FROM themes WHERE theme_id = $userstylem"), 0);
echo '<link rel="stylesheet" type="text/css" href="'.$theme_path.'" />' . "\n"; }
echo $_PAGE['sidebar'] == 1 ? '<link rel="stylesheet" type="text/css" href="styles/margins.css" />' : '';
?> </head> <body> <? $_PAGE['sidebar'] == 1 ? include 'sidebar_header.inc.php' : '';
if (isset($_GET['message'])) get_field('COUNT(*)', 'messages', "messageid = '{$_GET['message']}'") == 0 ? die('Invalid Message ID') : '';
if (isset($_GET['topic'])) get_field('COUNT(*)', 'topics', "topicid = '{$_GET['topic']}' AND board='{$_GET['board']}'") == 0 ? die('Invalid Topic ID') : '';
if (isset($_GET['board'])) get_field('COUNT(*)', 'boards', "boardid = '{$_GET['board']}'") == 0 ? die('Invalid Board ID') : '';
if (isset($_GET['user'])) get_field('COUNT(*)', 'users', "userid = '{$_GET['user']}'") == 0 ? die('Invalid User ID') : '';
if (defined('_FILE_LVL')) { if ($userlevelm < _FILE_LVL) { echo '<div align="center"><b><font size="6">Error</font></b></div><br /><div align="left">You have to be at least level <b>'.52.'</b> to view this page. Return to the <a href="javascript:window.history.go(-1)">previous page</a> or the <a href="index.php">general board list</a>.</div>'; include 'footer.inc.php'; exit; } }
if ($userlevelm >= 52) { $result = mysql_query('SELECT COUNT(*) FROM marked'); $num_msgs = mysql_result($result, 0);
$result = mysql_query("SELECT COUNT(*) FROM temp_users WHERE act_status = 2"); $num_pend_users = mysql_result($result, 0);
?> <span class="d" style="display: block; width: 100%; line-height: 25px; text-align: center"><b>Backlog:</b> <a href="mark_queue.php">Marked Messages</a> - <b><?= $num_msgs ?></b> / <a href="man_act_user.php">Inactive Users</a> - <b><?= $num_pend_users ?></b></span> <?php }
// // Set Common Query String Variables //
$q_string_x = ''; $q_string_x .= isset($_GET['board']) ? 'board=' . $_GET['board'] : ''; $q_string_x .= isset($_GET['topic']) ? '&topic=' . $_GET['topic'] : '';
$q_string = array(); $q_string['a'] = ''; $q_string['b'] = '';
if ($q_string_x != '') { $q_string['a'] = '?' . $q_string_x; $q_string['b'] = '&' . $q_string_x; } ?> For one, I dont know which is line 261, since I dont know how to count lines with a program. And if I did, I wouldn't know what to do. :\
Reply
Argoth
Apr 9 2005, 11:34 PM
CODE <?php session_cache_limiter('private, must-revalidate'); session_name('sid'); session_start();
$_PAGE['start_time'] = getmicrotime();
// // Unset globals //
$methods = array('_POST', '_GET', '_COOKIE', '_FILES'); isset($_SESSION) ? $methods[] = '_SESSION' : '';
foreach ($methods as $method) { foreach ($$method as $var_name => $var_value) { unset($$var_name); } }
$_GET['board'] = isset($_GET['board']) ? intval($_GET['board']) : null; $_GET['topic'] = isset($_GET['topic']) ? intval($_GET['topic']) : null; $_GET['message'] = isset($_GET['message']) ? intval($_GET['message']) : null; $_GET['user'] = isset($_GET['user']) ? intval($_GET['user']) : null;
// // User Authentication Function //
function auth($username, $password) { $result = mysql_query("SELECT username FROM users WHERE username = '$username' AND userpass = '$password'");
return mysql_num_rows($result) != 0 ? mysql_result($result, 0) : null; }
// // SQL Field Fetching Function //
function get_field($field, $tbl_name, $condition = 1) { $result = mysql_query("SELECT $field FROM $tbl_name WHERE $condition"); return @mysql_result($result, 0); }
// // IP Fetching Function //
function fetch_ip() { $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if (strpos($ip, ',')) { $ip = explode(',', $ip); $ip = trim($ip[0]); }
return $ip; }
// // Get Microtime //
function getmicrotime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); }
function navigator($title, $col = 2, $bor = 1, $spc = 0, $info = 1, $other_links = null, $style = null) { global $q_string, $userlevelm;
if (isset($userlevelm)) { ?> <table border="<?= $bor ?>" cellspacing="<?= $spc ?>" width="100%"<?= $style ?>> <tr><td align="center" colspan="<?= $col ?>"><font size="6"><b><?= $title ?></b></font></td></tr> <tr><td align="center" colspan="<?= $col ?>" class="b"><i>Return to: <a class="menu" href="index.php">Board List</a> <?php
if (isset($_GET['board'])) { ?> | <a class="menu" href="gentopic.php?board=<?= $_GET['board'] ?>">Topic List</a><?php }
if (isset($_GET['topic'])) { ?> | <a class="menu" href="genmessage.php<?= $q_string['a'] ?>">Message List</a><?php }
if ($info == 1) { ?> | <a class="menu" href="user.php<?= $q_string['a'] ?>">User Info Page</a><?php }
if (is_array($other_links)) { foreach ($other_links as $href => $link_title) { $href = explode('|', $href);
if ($href[1] == '' || $userlevelm >= $href[1]) { ?> | <a class="menu" href="<?= $href[0], $q_string['a'] ?>"><?= $link_title ?></a><?php } } }
if ($userlevelm >= 52) { ?> | <a class="menu" href="cpanel.php<?= $q_string['a'] ?>">Control Panel</a><?php }
?> </i></td></tr> <?php }
else { ?> <table border="<?= $bor ?>" cellspacing="<?= $spc ?>" width="100%"<?= $style ?>> <tr><td align="center" colspan="<?= $col ?>"><font size="6"><b><?= $title ?></b></font></td></tr> <tr><td align="center" colspan="<?= $col ?>" class="b"> <a class="menu" href="index.php">Board List</a> | <a class="menu" href="register.php">Register</a> | <a class="menu" href="login.php">Log In</a> | <a class="menu" href="help.php">Help</a> | <a class="menu" href="tos.php">ToS</a></td></tr> <?php } }
// // Update Counter //
mysql_query("UPDATE counters SET count_value=count_value+1 WHERE count_type='boards'");
// // IP Banning //
if (isset($_COOKIE['zXi7g'])) die;
$result = mysql_query('SELECT ip_addr FROM banned_ips');
while ($row = mysql_fetch_row($result)) { if (stristr($_SERVER['REMOTE_ADDR'], $row[0]) || stristr($_SERVER['HTTP_REFERER'], $row[0])) { setcookie('zXi7g', 'o', time()+92275200); die; } }
if (stristr($_SERVER['HTTP_USER_AGENT'], 'anon')) die;
// // User Name and Password Retrieval //
$uname = isset($_SESSION['username']) ? $_SESSION['username'] : (isset($_COOKIE['uname']) ? $_COOKIE['uname'] : null); $pword = isset($_SESSION['password']) ? $_SESSION['password'] : (isset($_COOKIE['pword']) ? $_COOKIE['pword'] : null);
// // Common User Info Retrieval //
$row = @mysql_fetch_row(@mysql_query("SELECT userid, level, style, timezone, sidebar FROM users WHERE username='$uname' AND userpass='$pword'"));
if (isset($row[0])) { $useridm = $row[0]; $userlevelm = $row[1]; $userstylem = $row[2]; $_PAGE['timezone'] = $row[3]*3600; $_PAGE['sidebar'] = $row[4]; mysql_query("UPDATE users SET lastsec='".time()."', lastacip='{$_SERVER['REMOTE_ADDR']}', last_page='". htmlspecialchars(preg_replace('#sid=[[:alnum:]]+(\&)*#i', '', $_SERVER['REQUEST_URI']), ENT_QUOTES) ."', user_agent='". htmlspecialchars($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES) ."', real_ip = '". fetch_ip() ."' WHERE userid='$useridm'"); }
// // Spit It All Out //
?> <html><head><title><?= $_CONFIG['mbsname'] ?>: <?= $title ?></title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <?php
switch ($userstylem) { case 'custom': extract(@mysql_fetch_assoc(mysql_query("SELECT * FROM style WHERE userid='$useridm'")));
echo "<style type=\"text/css\"> a:link {color: $n_link; text-decoration: underline} a:visited {color: $n_vlink; text-decoration: underline} a.menu:link {color: $m_link; text-decoration: underline} a.menu:visited {color: $m_vlink; text-decoration: underline} a.menu:hover {color: $m_hlink; text-decoration: underline} a.menu:active {color: $m_alink; text-decoration: underline} body, td {background-color: $main_bg; font-family: $font_face; font-size: 80%;color: $font_color} .a {background-color: $c1_bg; font-size: 95%; color: $c1_fc; font-weight: bold} .b {background-color: $c2_bg; font-size: 95%; color: $c2_fc; font-weight: bold} .c {background-color: $c3_bg} .d {background-color: $c4_bg} .system {background-color: $system_bg} .shade {background-color: $shade_bg} .sidebar {background-color: $sidebar_bg} .large {font-size: 120%; font-weight: bold} .medium {font-size: 90%} .poll_graph {display: block; background-color: $poll_graph; line-height: 25px} </style>\n";
break;
default: empty($userstylem) ? $userstylem = 1 : '';
$theme_path = mysql_result(mysql_query("SELECT theme_path FROM themes WHERE theme_id = $userstylem"), 0);
echo '<link rel="stylesheet" type="text/css" href="'.$theme_path.'" />' . "\n"; }
echo $_PAGE['sidebar'] == 1 ? '<link rel="stylesheet" type="text/css" href="styles/margins.css" />' : '';
?> </head> <body> <? $_PAGE['sidebar'] == 1 ? include 'sidebar_header.inc.php' : '';
if (isset($_GET['message'])) get_field('COUNT(*)', 'messages', "messageid = '{$_GET['message']}'") == 0 ? die('Invalid Message ID') : '';
if (isset($_GET['topic'])) get_field('COUNT(*)', 'topics', "topicid = '{$_GET['topic']}' AND board='{$_GET['board']}'") == 0 ? die('Invalid Topic ID') : '';
if (isset($_GET['board'])) get_field('COUNT(*)', 'boards', "boardid = '{$_GET['board']}'") == 0 ? die('Invalid Board ID') : '';
if (isset($_GET['user'])) get_field('COUNT(*)', 'users', "userid = '{$_GET['user']}'") == 0 ? die('Invalid User ID') : '';
if (defined('_FILE_LVL')) { if ($userlevelm < _FILE_LVL) { echo '<div align="center"><b><font size="6">Error</font></b></div><br /><div align="left">You have to be at least level <b>\'.52.\'</b> to view this page. Return to the <a href="javascript:window.history.go(-1)">previous page</a> or the <a href="index.php">general board list</a>.</div>'; include 'footer.inc.php'; exit; } }
if ($userlevelm >= 52) { $result = mysql_query('SELECT COUNT(*) FROM marked'); $num_msgs = mysql_result($result, 0);
$result = mysql_query("SELECT COUNT(*) FROM temp_users WHERE act_status = 2"); $num_pend_users = mysql_result($result, 0);
?> <span class="d" style="display: block; width: 100%; line-height: 25px; text-align: center"><b>Backlog:</b> <a href="mark_queue.php">Marked Messages</a> - <b><?= $num_msgs ?></b> / <a href="man_act_user.php">Inactive Users</a> - <b><?= $num_pend_users ?></b></span> <?php }
// // Set Common Query String Variables //
$q_string_x = ''; $q_string_x .= isset($_GET['board']) ? 'board=' . $_GET['board'] : ''; $q_string_x .= isset($_GET['topic']) ? '&topic=' . $_GET['topic'] : '';
$q_string = array(); $q_string['a'] = ''; $q_string['b'] = '';
if ($q_string_x != '') { $q_string['a'] = '?' . $q_string_x; $q_string['b'] = '&' . $q_string_x; } ?>
This should work, you had put a single quote in the string you were trying to echo. Use notepad, turn off Word wrap, and press ctrl G
Reply
Recent Queries:--
mysql backup batabase - 684.34 hr back. (1)
Similar Topics
Keywords : mysql, database, mysql, databases, skip, page
- Mysql Server Down
(9)
My First Website
Where can i find useful web page templates? (3) Hi folks, Just wondering, as a newbie website builder, where can I get some useful HTML, CSS
templates suitable for building a small business website? What is the best development environment
for building websites? Is there a good open source program available?, or is it best to spend some
money on something like Dreamweaver? Does anyone have experience of adding databases to Trap17
sites, perhaps using Wamp server?....
Trap17 Registration Page Linkage Errors
(2) Hello all, I am a new member to the forums, and hope I can be of service to you all. As I came
across this hosting service I noticed a couple links on this page:
http://www.trap17.com/forums/free-web-host...ation-t106.html The broken link is located in 2
places where the "--> Register" link is under both here, REMEMBER :: No one is going to snatch
away your account. So take your time, Relax and then post at the forums. Don't post in a hurry
to simply get an Account. You will get it at any cost, provided you make GOOD posts. Get it in a
good way. You are expe....
I Can't Find The Password Reset Page... [resolved]
(5) I can't find the password reset page (I know it costs credits to request) Can anyone give me
the link please to that page, it has other options too if i remember. Thanks....
Cant Log Into Cpanel [resolved]
Page cant be displayed (11) Help I can not log into cpanel. I just upgraded to IE-7 and now I can not get into my Cpanel. what
the page is telling me is this. QUOTE Internet Explorer cannot display the webpage Most
likely causes: You are not connected to the Internet. The website is encountering problems. There
might be a typing error in the address. What you can try: Diagnose Connection Problems
More information This problem can be caused by a variety of issues, including: Internet
connectivity has been lost. The website is temporarily unavailable. The D....
My Ro Page
(4) I designed my own website and code it xD this website is for my server JevilRO www.jevilro.com....
Plot Page Help Invisionfree
(0) I've made a few boards with invisionfree before, but I have no idea of what a plot page is or
how to make one. can someone help me out?....
Mysql Hacks
(1) There are MySQL hacks out there, They can travel from your website to your computers. One of these
are the MySQL injectors. The injection drops your tables and shuts down the program permanently. Be
careful of these hacks, as they can destroy your MySQL related websites, programs, etc.....
Database Normalization
(0) For those of you... who really reall Ok... I am sharing to trap17 an easy to use image file to
brush up your understanding of database normalization. Everytime I have to understand the concepts,
I have to go through the complete text and its a little hard to do that... Had some requirement
recently, and I thought I will prepare something like this and refer to, when there are future
requirements. This is not exhaustive and very detailed. Helps to get some basic understanding. Prior
knowledge about the databases, structure will help in understanding the complete concepts....
Page Load Error When Trying To Get Into Control Panel
I just changed domain (2) I had put a domain name that I didn't have when I registered my website. I got the 15 credits
and changed it to a subdomain. Now I can't log into my control panel. At first it was telling me
I had the wrong password which I'm sure I don't. Now I just get a timed out error. Also my
confirmation email for changing my domain was kinda blank. QUOTE Hi, This mail is to notify
you that your domain has been changed to : Regards, trap17.com So yeah... any help? EDIT:
Also I don't see my request to change domain the proper forum I had attempte....
How To Use A Database For Chess Results?
How to set-up, configure, and utilize a database to store chess result (0) Hi, I'm running a website for our chess club. Recently we decided to add a feature for members
to simply enter their tourney results there but I do not exactly know how to do it. The first
problem is how to create form for people to enter their game results. I just have an idea that
working with drop down menus is faster, esaier and more precise than typing the information. The
second problem is how to make these results search-able? Let me tell you the final problem which is
the worst of all that is I do not know how to build a member area. Because Qupis does no....
Creating A Php Login System Using Mysql
I need help in creating a login system, what I want is a login system (10) Hey everyone! I am helping someone make a login system using MySQL databases and a PHP login
form. I have a fair bit of experiance in HTML and some javascript too. I have virtually no
experiance in MySQL or PHP. Anybody know of any good PHP login systems that allow you to creat a
personalised page for each user and when they login the system transfers the user to their page.
Another thing that the system MUST have is a way of stopping unwanted users entering someones page.
CODE For example lets say I register and my UN is jesse123 and my personalised pages a....
Mysql Database Not Working
(3) well i'm getting an error message(a databass connection warning) for all of the parts of my site
that connects to a mysql database i check my database users pertmissions and i try to do the repair
database thing and it's still not woeking. am i the only person having this or is it an overall
trap17 issue and how do i fix it.....
Ips Installer Database Details [resolved]
It wont accept localhost... (6) CODE Access denied for user 'skyed211_central'@'localhost' to database
'skyed211_centralgaming' I get this error message when trying to install my IPB. It will
not accept localhost, nor mysql. Can I get any help please? I've tried many times to get past
this part, but it's not happening /sad.gif" style="vertical-align:middle" emoid=":(" border="0"
alt="sad.gif" />....
The Only Reason I Choose Ms Sql Server Rather Than Mysql
(0) The only reason i choose ms sql server rather than mysql is, MS SQL has more security
features!! MySQL is lacking a lot in my opinions - Lack in wide char, like nvarchar, I
developed some application to support chinese letter, and dont know how to build one in mysql - Lack
in t-sql syntax, like query in query is not fully supported - Does not have today SQL features like
BI support (today really required) And compare MS SQL to MySQL, the only reason why mysql is
favourable is - it is free! Dont u guys agree?....
Need Advice On Setting Up Mysql Database.
I have a huge amount of daily data updates to be inserted. (4) First of all, to get the idea of what I am trying to achieve here, please have a look at my
idea thread, entitled Idea For Using A Cron Job To Grab Daily Travian Map.sql Updates . This gives
a prelude to the project, what it is for, what it is supposed to do, etc. Now, what I need is
specific advice on setting up the mySQL database(s) to implement this idea. There is a useful FAQ
file for how to make use of the map.sql data located on the help.travian.com website, which also
gives an example of the CREATE TABLE instruction that matches the data in the map.sql fi....
PHP Function To Add Previous and Next Page Feature
useful php function (5) CODE <?php function navigationbar($start_number = 0, $items_per_page = 50,
$count) { // Creates a navigation bar $current_page =
$_SERVER["PHP_SELF"]; if (($start_number < 0) ||
(! is_numeric($start_number))) { $start_number = 0; }
$navbar = ""; $prev_navbar = ""; $next_navbar =
""; if ($count > $items_per_page) { $nav_count = 0;
$pag....
How To Make An Item Scroll With You On The Page.
(10) ok im not sure where or how to really ask this... but you can find an example at
http://www.demonoid.com the ad that is on the right side scrolls with you basically to the bottom
of the page. I know they use an iframe but can you show me how that works or what makes it do that?
i tried to copy the source and css but it did not work.. any advice?....
Web Page Layouts
using Cascading Style Sheets (6) Here are a set of three Web pages I wrote a long time back when I was first starting to develop
sites. The first one is a two columned page with a full length sidebar for navigation links. There
are two that are identical except the sidebar positions are reversed. Another is "one way" to create
a three column layout. And lastly, a 'framed' look on a page. These are not
'fancy', you will need to look into the code and colourize it to suit, maybe set a width and
centre it if you want, whatever... Please feel free to snag the source and develop the pages....
Why Do Kids Skip School?
Please does anyone have any advice for me.. (29) Ok, I have 4 children, 18, 17, 5 & 4. I dont know what i am doing wrong with my 17 year old, I am
soo fed up with her crap right now I dont know what to do next. I have had problems with her in the
past and sent her to live with her dad. Yes I know and understand coming from a broken home can be
difficult for children just as much as it is the adults. Her dad and I get along fine now and she
does know she is very muched loved by both of us. She moved back in with me right after Thanksgiving
2007 I had to go to the school after winter break I was called by the assistant v....
Do You Ever Skip Class?
(78) well i used to skip almost every class especially algebra but not anymore because i realize that my
education is a major part of my life and i refuse to fail but my english class is boring as f**k..
have you ever skipped class? /huh.gif" style="vertical-align:middle" emoid=":huh:" border="0"
alt="huh.gif" />....
Help In Ipb 2.1.6 Portal Page
plaese help me (2) hi any 1 know how can a add my topics in ipb poratl page in my server i uploaded ipb 2.1.6 plaese
tell me. like this site.....
Quick Question
Is there a limit on the size of the MySQL database? (10) Question's in the title!....
Problem With Page Redirect
Help me out with this problem... (8) hey ppl, i just wanted a little help...i designed this website, but i want that if i click on
certain link, it should open new page for few seconds and then browser should automatically redirect
me to some other page....i tried this with header() function but i couldnt do the wait n redirect
part, ... so somebody plz help.... -thanx in advance! Thanks Avalon, topic changed. ....
Connect To Remote Oracle Database With Toad
i'm lost (7) Hey gang, long time no see, my bad! Anyway, I got me a question. Does anybody know how to
connect to a remote oracle database using toad? When I read the docs for toad I get the impression
that I have to have a local oracle installation in order to use toad, but that just seems silly. I
guess I'm stuck at the point of trying to figure out how to tell toad where to look for all of
the configuration information it needs for the connection if I don't have any "Oracle Home"
directories. :crosses fingers: Peace!....
Mysql Database Size
related to the free database space (7) hi all! this is my first post /biggrin.gif' border='0' style='vertical-align:middle'
alt='biggrin.gif' /> and i have a doubt, how much mysql space i am allowed to use... i mean how
much is available for my free account....
Import From Excel File Into Mysql Database
(11) Has anyone tried using the excel import function that comes with phpmyadmin
http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
to import the data to , there is a link on the bottom left corner which says "insert data from a
text file into the table" - although it says text file it still can be used to import an excel file.
When you click on this link you will be taken to a page where you will be asked for the file name
(the....
Button To Print Current Web Page
(14) Hi, Does anyone know how to create a button that will printo out the current page. What I want to
do is have the user fill out a form (containing name, address, zip, etc). They will then click on a
"print" button and it will print out the form data. Any ideas? Thanks.....
Php Unique Hit Counter
Count page hits with php. (29) Hello all, Here is a neat and helpful PHP script that can count unique page views on your website.
First you need to open up a new page in your text editor and paste in this code. CODE <?php
$filename = "hits.txt"; $file = file($filename); $file =
array_unique($file); $hits = count($file); echo $hits; $fd
= fopen ($filename , "r"); $fstring = fread ($fd , filesize
($filename)); fclose($fd); $fd = fopen ($f....
Mysql Database Setup : Setting Up Mysql Database
Guide to use MySQL database in your site (6) A SMALL INTRODUCTION TO DATABASE ============================= I have seen that many members have
problems with Database. Here is a small INFO which should give you the IDEA. mySQL is a DATABASE
server. You can access it using the link in Cpanel. Cpanel can be accessed by
"www.YOUR-SITE.com/Cpanel" There you have 4 Main Options :- 1> CREATE A DATABASE 2> CREATE A USER
3> ADD USER TO DATABASE 4> PHPMYADMIN CREATE : IT ALLOWS YOU TO CREATE A DATABASE CREATE USER
: IT ALLOWS YOU TO CREATE A USER. USING THIS, YOU CAN ACCESS THE DATABASE. A DATABASE CANNOT BE....
Looking for mysql, database, mysql, databases, skip, page
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for mysql, database, mysql, databases, skip, page
*MORE FROM TRAP17.COM*
|
advertisement
|
|