'Latest', 'url' => '/quotes/latest.php', 'icon' => '16-star-hot' ), array( 'title' => 'Best', 'url' => '/quotes/top.php', 'icon' => 'medal_gold_1' ), array( 'title' => 'Worst', 'url' => '/quotes/bottom.php', 'icon' => '16-message-warn' ), array( 'title' => 'Browse All', 'url' => '/quotes/browse.php', 'icon' => '16-file-archive' ), array( 'title' => 'Random', 'url' => '/quotes/random.php', 'icon' => '16-clock' ), array( 'title' => 'Add', 'url' => '/quotes/add.php', 'icon' => '16-em-pencil' ), array( 'title' => 'Search', 'url' => '/quotes/search.php', 'icon' => 'book_open' )); if (isset($_GET['id']) && is_numeric($_GET['id'])) { $quote_num = $_GET['id']; } if (isset($_GET['id']) && !(is_numeric($_GET['id']))) { generateError('404'); } else if ((!isset($_GET['act'])) || ($_GET['act'] == 'latest')) { $query = "SELECT * FROM rash_quotes ORDER BY id DESC LIMIT 50"; quote_generation($query, "Latest", -1); } else if ($_GET['act'] == 'add') { $template = new FITemplate('quotes/add'); if (isset($_GET['submit'])) { $template->adds_block('SUBMITTED',array('QUOTE' => str_replace("\n","
",htmlentities(stripslashes($_POST['rash_quote']))))); if (!isLoggedIn()) { $insquote = "INSERT INTO rash_queue (quote) VALUES(\"" . mysql_real_escape_string(htmlspecialchars($_POST['rash_quote'])) . "\")"; } else { $insquote = "INSERT INTO rash_quotes (quote, rating, flag, date) VALUES (\"" . mysql_real_escape_string($_POST['rash_quote']) . "\", 0, 0, \"" . time() . "\")"; } $insquote2 = mysql_query($insquote); } $template->display(); } elseif ($_GET['act'] == 'bottom') { $query = "SELECT * FROM rash_quotes WHERE rating < 0 ORDER BY rating ASC LIMIT 50"; quote_generation($query, "Bottom", -1); } elseif ($_GET['act'] == 'browse') { $query = "SELECT * FROM rash_quotes ORDER BY id ASC "; quote_generation($query, "Browse", (isset($_GET['page']) ? $_GET['page'] : 1), 10, 5); } elseif ($_GET['act'] == 'flag') { $getfla = "SELECT * FROM rash_quotes WHERE id = " . $quote_num . " LIMIT 0,1"; $getfla2 = mysql_query($getfla); $getfla3 = mysql_fetch_array($getfla2); if ($getfla3['flag'] == 2) { die('0'); } else { $setfla = "UPDATE rash_quotes SET flag = 1 WHERE id = " . $quote_num; $setfla2 = mysql_query($setfla); die('1'); } } elseif ($_GET['act'] == 'random') { $query = "SELECT * FROM rash_quotes ORDER BY rand() LIMIT 50"; quote_generation($query, "Random", -1); } elseif ($_GET['act'] == 'random2') { $query = "SELECT * FROM rash_quotes WHERE rating > 1 ORDER BY rand() LIMIT 50"; quote_generation($query, "Random2", -1); } elseif ($_GET['act'] == 'search') { if (isset($_GET['fetch'])) { if ($_POST['sortby'] == 'rating') { $how = 'desc'; } else { $how = 'asc'; } $getquotes = "SELECT * FROM rash_quotes WHERE quote LIKE \"%" . $_POST['search'] . "%\" ORDER BY " . $_POST['sortby'] . " " . $how . " LIMIT 0," . $_POST['number']; quote_generation($getquotes, "Query Results", -1); } $template = new FITemplate('quotes/search'); $template->display(); } elseif ($_GET['act'] == 'top') { $query = "SELECT * FROM rash_quotes WHERE rating > 0 ORDER BY rating DESC LIMIT 50"; quote_generation($query, "Top", -1); } elseif ($_GET['act'] == 'vote') { $gettrack = "SELECT * FROM rash_tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; $gettrack2 = mysql_query($gettrack); $gettrack3 = mysql_fetch_array($gettrack2); $trackArr = explode(',',$gettrack3['vote']); if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($quote_num,$trackArr) === FALSE)) { if ($_GET['dir'] == "plus") { $setquote = "UPDATE rash_quotes SET rating = rating+1 WHERE id = " . $quote_num; $setquote2 = mysql_query($setquote); } elseif($_GET['dir'] == "minus") { $setquote = "UPDATE rash_quotes SET rating = rating-1 WHERE id = " . $quote_num; $setquote2 = mysql_query($setquote); } if ($gettrack3['ip'] == $_SERVER['REMOTE_ADDR']) { $settrack = "UPDATE rash_tracking SET vote = \"" . $gettrack3['vote'] . "," . $quote_num . "\" WHERE id = " . $gettrack3['id']; } else { $settrack = "INSERT INTO rash_tracking (ip,vote) VALUES (\"" . $_SERVER['REMOTE_ADDR'] . "\",\"" . $quote_num . "\")"; } $settrack2 = mysql_query($settrack) or die($settrack); $getquote = "SELECT * FROM rash_quotes WHERE id = " . $quote_num; $getquote2 = mysql_query($getquote); $getquote3 = mysql_fetch_array($getquote2); die($getquote3['rating']); } else { die; } } else if (is_numeric($_GET['act'])) { $getquote = "SELECT * FROM rash_quotes WHERE id = " . $_GET['act']; $getquote2 = mysql_query($getquote); $getquote3 = mysql_fetch_array($getquote2); if ($getquote3['id'] == $_GET['act']) { quote_generation($getquote, "#" . $_GET['act'], -1); $page_id = 'quote-' . $_GET['act']; include('includes/comments.php'); } else { generateError('404'); } } else { generateError('404'); } function quote_generation($query, $origin, $page = 1, $quote_limit = 50, $page_limit = 10) { global $xhtml; $template = new FITemplate('quotes/browse'); $template->add('IFXAMP', $xhtml ? '&' : '&'); if ($page != -1) { $template->adds_block('PAGENUMBERS',array('exi'=>1)); page_numbers($template, $origin, $quote_limit, $page, $page_limit); $up_lim = ($quote_limit * $page); $low_lim = $up_lim - $quote_limit; $query .= "LIMIT $low_lim,$quote_limit"; } $template->add('ORIGIN',$origin); $gettrack = "SELECT * FROM rash_tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; $gettrack2 = mysql_query($gettrack); $gettrack3 = mysql_fetch_array($gettrack2); $trackArr = explode(',',$gettrack3['vote']); $getquotes2 = mysql_query($query); $i=0; while ($getquotes3[$i] = mysql_fetch_array($getquotes2)) { if (!isset($curID)) { $curID = 0; } else { $curID++; } $cntcomments = "SELECT COUNT(*) FROM comments WHERE page_id = \"quote-" . $getquotes3[$i]['id'] . "\""; $cntcomments2 = mysql_query($cntcomments); $cntcomments3 = mysql_fetch_array($cntcomments2); if ($cntcomments3['COUNT(*)'] == 0) { $comments = ''; } else if ($cntcomments3['COUNT(*)'] == 1) { $comments = '1 Comment'; } else { $comments = $cntcomments3['COUNT(*)'] . ' Comments'; } $template->add_ref($curID,'QUOTES',array( 'NUMBER' => $getquotes3[$i]['id'], 'RATING' => $getquotes3[$i]['rating'], 'DATE' => ($getquotes3[$i]['date'] != 0 ? date('F jS Y \a\\t g:i:s a', $getquotes3[$i]['date']) : ''), 'QUOTE' => doAprilFoolsDay(str_replace("\n","
",htmlentities(stripslashes($getquotes3[$i]['quote'])))), 'COMMENTS' => $comments)); if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getquotes3[$i]['id'],$trackArr) === FALSE)) { $template->adds_ref_sub($curID, 'CANVOTE', array('exi'=>1)); } else { $template->adds_ref_sub($curID, 'NOVOTE', array('exi'=>1)); } if ($getquotes3[$i]['flag'] == 0) { $template->adds_ref_sub($curID, 'CANFLAG', array('exi'=>1)); } else { $template->adds_ref_sub($curID, 'NOFL
[gd_scene load_steps=9 format=2]

[ext_resource path="res://nodes/label.tscn" type="PackedScene" id=1]
[ext_resource path="res://fonts/Lingo.tres" type="DynamicFont" id=2]
[ext_resource path="res://nodes/button.tscn" type="PackedScene" id=3]
[ext_resource path="user://maps/Archipelago/settings_buttons.gd" type="Script" id=4]
[ext_resource path="user://maps/Archipelago/settings_screen.gd" type="Script" id=5]
[ext_resource path="res://fonts/Lingo35.tres" type="DynamicFont" id=6]

[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0, 0, 0, 0 )

[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 1, 1, 1, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 1, 1, 0, 1 )
border_blend = true
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
expand_margin_left = 5.0
expand_margin_right = 5.0
expand_margin_top = 5.0
expand_margin_bottom = 5.0

[node name="settings_screen" type="Spatial"]
script = ExtResource( 5 )

[node name="Panel" type="Panel" parent="."]
margin_right = 1920.0
margin_bottom = 1080.0

[node name="title" parent="Panel" instance=ExtResource( 1 )]
margin_left = 0.0
margin_top = 75.0
margin_right = 1920.0
margin_bottom = 225.0
custom_fonts/font = ExtResource( 2 )
text = "ARCHIPELAGO"
valign = 1

[node name="credit" parent="Panel" instance=ExtResource( 1 )]
visible = false
margin_left = 1278.0
margin_top = 974.0
margin_right = 1868.0
margin_bottom = 1034.0
custom_fonts/font = ExtResource( 2 )
text = "Brenton Wildes"

[node name="connect_button" parent="Panel" instance=ExtResource( 3 )]
margin_left = 255.0
margin_top = 875.0
margin_right = 891.0
margin_bottom = 1025.0
custom_colors/font_color_hover = Color( 1, 0.501961, 0, 1 )
custom_fonts/font = ExtResource( 2 )
text = "CONNECT"
script = ExtResource( 4 )

[node name="quit_button" parent="Panel" instance=ExtResource( 3 )]
margin_left = 1102.0
margin_top = 875.0
margin_right = 1738.0
margin_bottom = 1025.0
custom_colors/font_color_hover = Color( 1, 0, 0, 1 )
custom_fonts/font = ExtResource( 2 )
text = "BACK"
script = ExtResource( 4 )

[node name="credit2" parent="Panel" instance=ExtResource( 1 )]
margin_left = 75.0
margin_top = 346.0
margin_right = 665.0
margin_bottom = 410.0
custom_fonts/font = ExtResource( 2 )
custom_styles/normal = SubResource( 1 )
text = "SERVER"
align = 2

[node name="credit3" parent="Panel" instance=ExtResource( 1 )]
margin_left = 75.0
margin_top = 519.0
margin_right = 665.0
margin_bottom = 583.0
custom_fonts/font = ExtResource( 2 )
custom_styles/normal = SubResource( 1 )
text = "PLAYER"
align = 2

[node name="credit4" parent="Panel" instance=ExtResource( 1 )]
margin_left = 75.0
margin_top = 704.0
margin_right = 665.0
margin_bottom = 768.0
custom_fonts/font = ExtResource( 2 )
custom_styles/normal = SubResource( 1 )
text = "PASSWORD"
align = 2

[node name="server_box" type="LineEdit" parent="Panel"]
margin_left = 682.0
margin_top = 295.0
margin_right = 1324.0
margin_bottom = 445.0
custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_styles/focus = SubResource( 2 )
align = 1
caret_blink = true

[node name="player_box" type="LineEdit" parent="Panel"]
margin_left = 682.0
margin_top = 477.0
margin_right = 1324.0
margin_bottom = 627.0
custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_styles/focus = SubResource( 2 )
align = 1
caret_blink = true

[node name="password_box" type="LineEdit" parent="Panel"]
margin_left = 682.0
margin_top = 659.0
margin_right = 1324.0
margin_bottom = 809.0
custom_colors/selection_color = Color( 0.482353, 0, 0, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_styles/focus = SubResource( 2 )
align = 1
caret_blink = true

[node name="AcceptDialog" type="AcceptDialog" parent="Panel"]
margin_right = 83.0
margin_bottom = 58.0

[connection signal="pressed" from="Panel/connect_button" to="Panel/connect_button" method="_connect_pressed"]
[connection signal="pressed" from="Panel/quit_button" to="Panel/quit_button" method="_back_pressed"]