? art-icons
? backgrounds
? images
? old
? screenshots
? search.php
? themes
? includes/mysql.inc.php
Index: .htaccess
===================================================================
RCS file: /cvs/gnome/art-web/.htaccess,v
retrieving revision 1.3
diff -u -r1.3 .htaccess
--- .htaccess 23 Nov 2002 00:40:55 -0000 1.3
+++ .htaccess 9 Jul 2003 00:15:56 -0000
@@ -1,3 +1,6 @@
AddType application/x-httpd-php .php .html
-php_value include_path .:./includes
-DefaultType application/x-httpd-php
+php_value include_path .:/home/aldug/www/art-web/includes
+
+
+ ForceType application/x-httpd-php
+
Index: backend.php
===================================================================
RCS file: /cvs/gnome/art-web/backend.php,v
retrieving revision 1.3
diff -u -r1.3 backend.php
--- backend.php 23 Oct 2002 14:41:29 -0000 1.3
+++ backend.php 9 Jul 2003 00:15:56 -0000
@@ -27,8 +27,8 @@
{
$theme_select_result = mysql_query("SELECT theme_name, category, author, small_thumbnail_filename FROM theme WHERE themeID='$ID'");
list($theme_name,$category,$author,$thumbnail_filename) = mysql_fetch_row($theme_select_result);
- $category_good = $linkbar["themes_" . $category]["alt"];
- print("\t\t\t
$theme_name \n");
+ $category_good = $theme_config_array["$category"]["name"];
+ print("\t\t\t$theme_name \n");
print("\t\t\t " . htmlspecialchars("http://art.gnome.org/show_theme.php?themeID=$ID&category=$category") . "\n");
print("\t\t\tThemes - $category \n");
}
Index: contact.php
===================================================================
RCS file: /cvs/gnome/art-web/contact.php,v
retrieving revision 1.10
diff -u -r1.10 contact.php
--- contact.php 1 Jul 2003 01:09:53 -0000 1.10
+++ contact.php 9 Jul 2003 00:15:56 -0000
@@ -1,9 +1,7 @@
ART
- global $linkbar;
- reset($linkbar);
- while(list($key,$val)=each($linkbar))
+ print("
NEWS \n");
+ print("
UPDATES \n");
+ print("
SEARCH \n");
+ print("
BACKGROUNDS \n");
+ while(list($key,$val) = each($GLOBALS["background_config_array"]))
{
- $url = $val["url"];
- $alt = $val["alt"];
- $active = $val["active"];
- $indent = $val["indent"];
- if($active == 1)
+ $name = $val["name"];
+ $url = $val["url"];
+ print("
$name \n");
+ }
+ print("
THEMES \n");
+ while(list($key,$val) = each($GLOBALS["theme_config_array"]))
+ {
+ $active = $val["active"];
+ if($active)
{
- if($indent)
- {
- $a_head = " ";
- $a_foot = "";
- }
- else
- {
- $a_head = "
";
- $a_foot = " ";
- }
- print("$a_head
$alt $a_foot
\n");
+ $name = $val["name"];
+ $url = $val["url"];
+ print("
$name \n");
}
}
+ print("
ICONS \n");
+ print("
TIPS & TRICKS \n");
+ print("
FAQ \n");
+ print("
SUBMIT \n");
+ print("
CONTACT \n");
+ print("
LINKS \n");
+
?>
@@ -115,8 +120,8 @@
print("\n");
$screenshot_select_result = mysql_query("SELECT screenshotID, thumbnail_filename FROM screenshot ORDER BY date DESC LIMIT 1");
list($screenshotID,$thumbnail_filename) = mysql_fetch_row($screenshot_select_result);
- print("
\n");
- print("
More ... ");
+ print("
\n");
+ print("
More ... ");
print("
\n\n");
?>
@@ -129,7 +134,7 @@
print("\n");
$background_select_result = mysql_query("SELECT backgroundID,category,thumbnail_filename FROM background WHERE status='active' ORDER BY add_timestamp DESC LIMIT 1");
list($backgroundID,$background_category,$thumbnail_filename) = mysql_fetch_row($background_select_result);
- print("
\n");
+ print("
\n");
print("
\n\n");
?>
@@ -142,7 +147,7 @@
print("\n");
$theme_select_result = mysql_query("SELECT themeID,category,small_thumbnail_filename FROM theme WHERE status='active' ORDER BY add_timestamp DESC LIMIT 1");
list($themeID,$theme_category,$thumbnail_filename) = mysql_fetch_row($theme_select_result);
- print("
\n");
+ print("
\n");
print("
\n\n");
?>
Index: includes/common.inc.php
===================================================================
RCS file: /cvs/gnome/art-web/includes/common.inc.php,v
retrieving revision 1.40
diff -u -r1.40 common.inc.php
--- includes/common.inc.php 5 Feb 2003 01:11:37 -0000 1.40
+++ includes/common.inc.php 9 Jul 2003 00:15:57 -0000
@@ -88,10 +88,11 @@
print("\n");
print("
\n");
- if($page > 1)
+ /* Page Navigation System */
+ if($page > 1)
{
$prev_page = $page -1;
- print("
[<] ");
+ print("
[<] ");
}
for($count=1;$count<=$num_pages;$count++)
{
@@ -101,13 +102,13 @@
}
else
{
- print("
[$count] ");
+ print("
[$count] ");
}
}
if($page < $num_pages)
{
$next_page = $page +1;
- print("
[>] ");
+ print("
[>] ");
}
print("
\n");
}
@@ -119,22 +120,25 @@
function print_background_row($backgroundID)
{
- global $linkbar;
+ global $background_config_array;
$background_select_result = mysql_query("SELECT background_name, category, author,release_date,thumbnail_filename FROM background WHERE backgroundID='$backgroundID'");
list($background_name,$category,$author,$release_date,$thumbnail_filename) = mysql_fetch_row($background_select_result);
$release_date = fix_sql_date($release_date,"/");
- $category_good = $linkbar["backgrounds_" . $category]["alt"];
- print("$background_name $release_date BACKGROUNDS - $category_good $author \n");
+ $link = "/backgrounds/$category/$backgroundID.php";
+ $category_name = $background_config_array["$category"]["name"];
+ print("$background_name $release_date BACKGROUNDS - $category_name $author \n");
+
}
function print_theme_row($themeID)
{
- global $linkbar;
+ global $theme_config_array;
$theme_select_result = mysql_query("SELECT theme_name, category, author, release_date,small_thumbnail_filename FROM theme WHERE themeID='$themeID'");
list($theme_name,$category,$author,$release_date,$thumbnail_filename) = mysql_fetch_row($theme_select_result);
$release_date = fix_sql_date($release_date,"/");
- $category_good = $linkbar["themes_" . $category]["alt"];
- print("$theme_name $release_date THEMES - $category_good $author \n");
+ $link = "/themes/$category/$themeID.php";
+ $category_name = $theme_config_array["$category"]["name"];
+ print("$theme_name $release_date BACKGROUNDS - $category_name $author \n");
}
function get_latest_backgrounds($number)
@@ -178,28 +182,7 @@
return $return_array;
}
-function print_thumbnails_per_page_form()
-{
- print("\n");
-}
+
function fix_sql_date($sql_date,$delimiter)
{
@@ -222,9 +205,181 @@
function ago_file_not_found()
{
- print("art.gnome.org, file NOT found.");
+ ago_header("404 - File Not Found");
+ create_middle_box_top("");
+ print("404 - File not Found.");
+ create_middle_box_bottom();
+
+ ago_footer();
+
+
+}
+
+function print_select_box($name,$array,$selected)
+{
+ print("\n");
+ while(list($key,$val) = each($array))
+ {
+ if($key == $selected)
+ {
+ print("$val\n");
+ }
+ else
+ {
+ print(" $val\n");
+ };
+ }
+ print(" \n");
+}
+
+function print_thumbnails_per_page_form($thumbnails_per_page, $sort_by)
+{
+ global $thumbnails_per_page_array, $sort_by_array;
+
+ if($thumbnails_per_page == "")
+ {
+ $thumbnails_per_page = 12;
+ }
+ if($sort_by == "")
+ {
+ $sort_by = "name";
+ }
+
+ print("\n");
+}
+function display_search_box($search_text, $search_type, $thumbnails_per_page, $sort_by)
+{
+ global $search_type_array, $thumbnails_per_page_array, $sort_by_array;
+
+ if($search_type == "")
+ {
+ $search_type = "background";
+ }
+ if($thumbnails_per_page == "")
+ {
+ $thumbnails_per_page = 12;
+ }
+ if($sort_by == "")
+ {
+ $sort_by = "name";
+ }
+
+ print("\n");
}
+
+function background_search_result($search_text, $search_type, $category, $thumbnails_per_page, $sort_by, $page, $num_backgrounds)
+{
+ $num_pages = ceil($num_backgrounds/$thumbnails_per_page);
+
+ if($page > $num_pages)
+ {
+ $page = $num_pages;
+ }
+ $start = (($page - 1) * $thumbnails_per_page);
+
+ print("$num_backgrounds results found, showing " . ($start+1) . " to " . ($start + $thumbnails_per_page) . " \n");
+
+ if($sort_by == "date")
+ {
+ $order_query = "ORDER BY add_timestamp DESC";
+ }
+ else
+ {
+ $order_query = "ORDER BY background_name";
+ }
+
+ if($category != "")
+ {
+ $category_query = "category='$category' AND";
+ }
+ else
+ {
+ $category_query = "";
+ }
+ $background_select_result = mysql_query("SELECT backgroundID FROM background WHERE $category_query background_name LIKE '%$search_text%' AND parent='0' $order_query LIMIT $start, $thumbnails_per_page");
+ print("\n");
+ while(list($backgroundID)=mysql_fetch_row($background_select_result))
+ {
+ print_background_row($backgroundID);
+ }
+ print("
");
+ return array($page, $num_pages);
+}
+
+function theme_search_result($search_text, $search_type, $category, $thumbnails_per_page, $sort_by, $page, $num_themes)
+{
+ $num_pages = ceil($num_themes/$thumbnails_per_page);
+
+ if($page > $num_pages)
+ {
+ $page = $num_pages;
+ }
+ $start = (($page - 1) * $thumbnails_per_page);
+
+ print("$num_themes results found, showing " . ($start+1) . " to " . ($start + $thumbnails_per_page));
+
+ if($sort_by == "date")
+ {
+ $order_query = "ORDER BY add_timestamp DESC";
+ }
+ else
+ {
+ $order_query = "ORDER BY theme_name";
+ }
+
+ if($category != "")
+ {
+ $category_query = "category='$category' AND";
+ }
+ else
+ {
+ $category_query = "";
+ }
+ $theme_select_result = mysql_query("SELECT themeID FROM theme WHERE $category_query theme_name LIKE '%$search_text%' $order_query LIMIT $start, $thumbnails_per_page");
+ print("\n");
+ while(list($themeID)=mysql_fetch_row($theme_select_result))
+ {
+ print_theme_row($themeID);
+ }
+ print("
");
+ return array($page, $num_pages);
+}
+
function spam_proof_email($good_email)
{
Index: includes/config.inc.php
===================================================================
RCS file: /cvs/gnome/art-web/includes/config.inc.php,v
retrieving revision 1.23
diff -u -r1.23 config.inc.php
--- includes/config.inc.php 21 Jun 2003 19:14:00 -0000 1.23
+++ includes/config.inc.php 9 Jul 2003 00:15:57 -0000
@@ -3,122 +3,93 @@
/* $Id: config.inc.php,v 1.23 2003/06/21 19:14:00 aldug Exp $ */
/* site configuration for art.gnome.org */
-$linkbar = array (
- "news" => array(
- "url" => "index.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "NEWS"),
- "updates" => array(
- "url" => "updates.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "UPDATES"),
- "backgrounds" => array(
- "url" => "backgrounds.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "BACKGROUNDS"),
- "backgrounds_gnome" => array(
- "url" => "background_list.php?category=gnome",
- "active" => "1",
- "indent" => "1",
- "alt" => "GNOME"),
- "backgrounds_other" => array(
- "url" => "background_list.php?category=other",
- "active" => "1",
- "indent" => "1",
- "alt" => "Other"),
- "themes" => array(
- "url" => "themes.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "THEMES"),
- "themes_gdm_greeter" => array(
- "url" => "theme_list.php?category=gdm_greeter",
+/* backgrounds */
+
+$background_config_array = array (
+ "gnome" => array (
+ "name" => "GNOME",
+ "url" => "/backgrounds/gnome/index.php",
+ "active" => "1",
+ "description" => "The GNOME project has built a complete, free and easy-to-use desktop environment for the user, as well as a powerful application framework for the software developer"
+ ),
+ "other" => array (
+ "name" => "Other",
+ "url" => "/backgrounds/other/index.php",
"active" => "1",
- "indent" => "1",
- "alt" => "GDM Greeter"),
- "themes_gtk" => array(
- "url" => "theme_list.php?category=gtk",
- "active" => "1",
- "indent" => "1",
- "alt" => "GTK+ 1.2"),
- "themes_gtk2" => array(
- "url" => "theme_list.php?category=gtk2",
- "active" => "1",
- "indent" => "1",
- "alt" => "GTK+ 2.0"),
- "themes_icon" => array(
- "url" => "theme_list.php?category=icon",
- "active" => "1",
- "indent" => "1",
- "alt" => "Icon"),
- "themes_metacity" => array(
- "url" => "theme_list.php?category=metacity",
- "active" => "1",
- "indent" => "1",
- "alt" => "Metacity"),
- "themes_metatheme" => array(
- "url" => "theme_list.php?category=metatheme",
+ "description" => "Backgrounds featuring other GNOME based companies such as Ximian, Codefactory, RedHat, etc."
+ )
+
+);
+
+/* themes */
+
+$theme_config_array = array (
+ "gdm_greeter" => array (
+ "name" => "GDM Greeter",
+ "url" => "/themes/gdm_greeter/index.php",
+ "active" => "1",
+ "description" => "GDM Greeter themes change the appearance of the GNOME 2.0 login screen."
+ ),
+ "gtk" => array (
+ "name" => "GTK+ 1.0",
+ "url" => "/themes/gtk/index.php",
+ "active" => "1",
+ "description" => "GTK+ 1.2 themes alter the appearance of the GTK+ 1.2 widgets. In the GNOME desktop, this means the appearance of all your GNOME applications."
+ ),
+ "gtk2" => array (
+ "name" => "GTK+ 2.0",
+ "url" => "/themes/gtk2/index.php",
+ "active" => "1",
+ "description" => "GTK+ 2.0 themes control the appearance of your GNOME 2.0 programs."
+ ),
+ "icon" => array (
+ "name" => "Icon",
+ "url" => "/themes/icon/index.php",
+ "active" => "1",
+ "description" => "GNOME 2.2.x system icon themes change the themes in nautilus, file-roller, etc.."
+ ),
+ "metacity" => array (
+ "name" => "Metacity",
+ "url" => "/themes/metacity/index.php",
+ "active" => "1",
+ "description" => "Metacity is the default window manager for GNOME 2.2.x and beyond."
+ ),
+ "metatheme" => array (
+ "name" => "Metatheme",
+ "url" => "/themes/metatheme/index.php",
"active" => "0",
- "indent" => "1",
- "alt" => "Metatheme"),
- "themes_nautilus" => array(
- "url" => "theme_list.php?category=nautilus",
+ "description" => ""
+ ),
+ "nautilus" => array (
+ "name" => "Nautilus",
+ "url" => "/themes/nautilus/index.php",
"active" => "0",
- "indent" => "1",
- "alt" => "Nautilus"),
- "themes_sawfish" => array(
- "url" => "theme_list.php?category=sawfish",
- "active" => "1",
- "indent" => "1",
- "alt" => "Sawfish"),
- "themes_sounds" => array(
- "url" => "theme_list.php?category=sounds",
- "active" => "1",
- "indent" => "1",
- "alt" => "Sounds"),
- "themes_splash_screens" => array(
- "url" => "theme_list.php?category=splash_screens",
- "active" => "1",
- "indent" => "1",
- "alt" => "Splash Screens"),
- "themes_other" => array(
- "url" => "theme_list.php?category=other",
- "active" => "1",
- "indent" => "1",
- "alt" => "Other..."),
- "icons" => array(
- "url" => "icons.php",
+ "description" => ""
+ ),
+ "sawfish" => array (
+ "name" => "Sawfish",
+ "url" => "/themes/sawfish/index.php",
+ "active" => "1",
+ "description" => "Sawfish was the default window manager in GNOME 1.4.x and GNOME 2.0.x"
+ ),
+ "sounds" => array (
+ "name" => "Sounds",
+ "url" => "/themes/sounds/index.php",
+ "active" => "1",
+ "description" => "Collection of sounds to compliment the GNOME desktop"
+ ),
+ "splash_screens" => array (
+ "name" => "Splash Screens",
+ "url" => "/themes/splash_screens/index.php",
+ "active" => "1",
+ "description" => "Splash Screens are what you first see when you log into GNOME."
+ ),
+ "other" => array (
+ "name" => "Other ...",
+ "url" => "/themes/other/index.php",
"active" => "1",
- "indent" => "0",
- "alt" => "ICONS"),
- "tips" => array(
- "url" => "tips.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "TIPS & TRICKS"),
- "faq" => array(
- "url" => "faq.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "FAQ"),
- "submit" => array(
- "url" => "submit.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "SUBMIT"),
- "contact" => array(
- "url" => "contact.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "CONTACT"),
- "links" => array(
- "url" => "links.php",
- "active" => "1",
- "indent" => "0",
- "alt" => "LINKS")
+ "description" => "Other themes."
+ )
);
$pill_array = array (
@@ -128,6 +99,9 @@
"updates" => array(
"icon" => "updates.png",
"alt" => "UPDATES"),
+ "search" => array(
+ "icon" => "search.png",
+ "alt" => "Search"),
"backgrounds" => array(
"icon" => "background.png",
"alt" => "BACKGROUNDS"),
@@ -199,9 +173,15 @@
"alt" => "SUBMIT")
);
+$mirror_url = "http://ftp.gnome.org/pub/GNOME/teams/art.gnome.org";
+
$sys_icon_dir = "/usr/local/www/art.gnome.org/images/icons";
+$sys_icon_dir = "/home/aldug/www/art-web/images/icons";
$valid_image_ext = array ("png","xpm","gif","jpg","jpeg","tiff");
-$thumbnails_per_page_array = array("12"=>12,"24"=>24,"All"=>1000);
+$search_type_array = array ("background" => "Background Name", "theme" => "Theme Name", "author" => "Author Name");
+$thumbnails_per_page_array = array("12" => "12", "24" => "24", "1000" => "All");
+$sort_by_array = array("name" => "Name", "date" => "Date");
+
?>