From: Steve Sutton Date: Thu, 17 Mar 2016 13:13:10 +0000 (-0400) Subject: all files for site X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;p=web%2Fwww.pellstonairport.com.git all files for site --- f477b8b47a888b41e8f42cc992974b2f3ba1d070 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ac83b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +CVS diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..fad0e38 --- /dev/null +++ b/.htaccess @@ -0,0 +1,14 @@ +Options +FollowSymLinks +#ErrorDocument 404 /sitemap.php?nf=1 +RewriteEngine On +#RewriteBase /~matrix/ws1/www.pellstonairport.com/ +RewriteRule ^members/$ index\.php?catid=1000 [L] +RewriteRule ^.*-([0-9]*)/([0-9]*)/([0-9]*)/$ index\.php?catid=$1&memb_type=$2&id=$3 [L] +RewriteRule ^.*-([0-9]*)/([0-9]*)/$ index\.php?catid=$1&memb_type=$2 [L] +RewriteRule ^.*-([0-9]*)/(.*)/([0-9]*)/$ index\.php?catid=$1&city=$2&id=$3 [L] +RewriteRule ^.*-([0-9]*)/(.*)/$ index\.php?catid=$1&city=$2 [L] +RewriteRule ^.*-8/(.*)$ index\.php?catid=8&city=Transportation&id=$1 [L] +RewriteRule ^.*-18/(.*)$ index\.php?catid=18&city=Aircraft+Charter&id=$1 [L] +RewriteRule ^.*-([0-9]*)/(.*)$ index\.php?catid=$1&$2 [L] +RewriteRule ^.*-([0-9]*)/$ index\.php?catid=$1 +RewriteRule site-map sitemap.php diff --git a/GLM_site_check.phtml b/GLM_site_check.phtml new file mode 100644 index 0000000..d38de95 --- /dev/null +++ b/GLM_site_check.phtml @@ -0,0 +1,19 @@ + + diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100644 index 0000000..2517c37 --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1,2 @@ +AddCharset UTF-8 .html +RewriteEngine Off diff --git a/admin/Banners/bannerad.sql b/admin/Banners/bannerad.sql new file mode 100755 index 0000000..a300af8 --- /dev/null +++ b/admin/Banners/bannerad.sql @@ -0,0 +1,24 @@ +-- $Id: bannerad.sql,v 1.1.1.1 2006/05/01 16:46:15 cscott Exp $ + +CREATE TABLE "banner" ( + "id" SERIAL, + "image" text, + "description" text, + "url" text, + "sdate" date, + "edate" date, + "impressions" int4, + "active" bool, + "clicks" int4, + "member_id" int4 +); + +REVOKE ALL on "banner" from PUBLIC; +GRANT ALL on "banner" to nobody; +REVOKE ALL on "banner_id_seq" from PUBLIC; +GRANT ALL on "banner_id_seq" to nobody; + +CREATE UNIQUE INDEX banner_id_indx ON banner(id); +CREATE INDEX banner_member_id_indx ON banner(member_id); +CREATE INDEX banner_active_indx ON banner(active); +CREATE INDEX banner_edate_indx ON banner(edate); diff --git a/admin/Banners/del_banner.phtml b/admin/Banners/del_banner.phtml new file mode 100755 index 0000000..db628b7 --- /dev/null +++ b/admin/Banners/del_banner.phtml @@ -0,0 +1,36 @@ +".$qs,1); +$data = db_fetch_array($res,0,PGSQL_ASSOC); +$image = $data[image]; +$url = $data[url]; + +$qs = "DELETE FROM banner + WHERE id = $id"; + +if(!db_auto_exec($qs)) html_error("failed ->".$qs,1); + +@unlink(ORIGINAL_PATH."/".$image); +@unlink(RESIZED_PATH.$image); +@unlink(THUMB_PATH.$image); +@unlink(MIDSIZED_PATH.$image); + +?> + +

+ Banner: ID -- $id
$url"?>
has been removed +

+
Close This Window
+ "", + "member_id" => "", + "url" => "", + "description" => "", + "sdate" => $sdate, + "edate" => $edate, + "active" => "t", + "clicks" => "0", + "impressions" => "0", + "image" => "" + ); +} + + + +if(isset($id)) + $type = "key=edit"; +else + $type = "key=add"; +top("Banner Ads (Edit)", "help/banner.phtml?$type"); + +$lnav = array( + "Add A New Banner Ad" => "edit_banner.phtml", + "List Banners" => "list_banner.phtml" + ); +html_nav_table($lnav, 2); +echo ""; + + + form_header("update_banner.phtml?".SID,"POST",""); + +foreach($row as $key=>$value) { + switch($key) { + + case "id": + echo ""; + break; + + case "member_id": + echo ""; + text_box("member_id",$value); + echo ""; + break; + + case "url": + echo ""; + text_box("url",$value); + echo ""; + break; + + case "sdate": + echo ""; + text_box("sdate",$value); + echo ""; + break; + + case "edate": + echo ""; + text_box("edate",$value); + echo ""; + break; + + case "active": + echo ""; + echo ""; + echo ""; + break; + + case "clicks": + echo ""; + text_box("clicks",$value); + echo ""; + break; + + case "impressions": + echo ""; + text_box("impressions",$value); + echo ""; + break; + + case "description": + echo ""; + text_area("description",$value); + echo ""; + break; + + case "image": + ?> + + "; + if($value != "") { + echo ""; + echo " + + + + + "; + } + echo ""; + echo ""; + echo ""; + break; + + default: + html_error("need case for ->".$key,1); + break; + } +} +if(isset($id)) { + form_footer("Update",1,2); +} +else { + form_footer("Insert","",2); +} +echo "
Member ID:
URL:
Start Date:
End Date:
Active:
Clicks:
Impressions:
Description:
Current Image: +
Delete this image: + Yes + No +
New Image:
"; + +footer(); +?> diff --git a/admin/Banners/help/banner.phtml b/admin/Banners/help/banner.phtml new file mode 100755 index 0000000..a94ab80 --- /dev/null +++ b/admin/Banners/help/banner.phtml @@ -0,0 +1,181 @@ + + +Help + + + +

Banner Ads Help

+
+ +

List Banner Ads

+ +

+This page lists the existing Banner Ads. +

+

+Add A New Banner Ad +

+

This link will allow you to add new Banner Ad

+

+List Banner Ads +

+

This link is the page you are currently viewing

+ +

+[Edit] +

+

This link will let you edit an existing Banner Ad

+

+[Delete] +

+

This link will let you Delete an existing Banner Ad

+

+ON/OFF +

+

There is either a green or red ball in line with each existing Banner Ad. +If the ball is green, the Banner Ad is currently visable on the front end of your +web site. If the ball is red, the banner ad is not visable on the front end of your +web site. You can easily toggle Banner Ad visability by clicking on the ball. If the +ball was red, and you clicked on it, it should turn green.

+ + +

Edit an Banner Ad

+

+This page is for editing and modifying an existing Banner Ad in the database. +When editing is complete, click on the "Submit Query" button. The database will +be updated, and you will be directed back to the "List Banner Ads" page. +

+ +

+URL: +

+

This is the web site url you want the users to go to when they click the +banner. Don't enter in http://. +

+

+Description: +

+

This is the text which will appear as a complete description of the Banner Ad, +in the Detailed output of the Banner Ad

+Start Date: +

+

This is date upon which the Banner Ad will begin. It should be formatted in +the following manner: 05/15/2001 +

+

+End Date: +

+

This is date upon which the Banner Ad will end. It should be formatted in +the following manner: 05/15/2001 +

+

+Active: +

+

This Select Box will determine whether or not the Banner Ad is viewable +on the front end of you web site. +The Default value is "Yes" meaning that the banner ad will be visable. +

+

+Click and Impressions: +

+

These are the counters for banner ads

+

+Picture for Banner Ad: +

+

If you choose, you may upload an image which will be displayed on the +Detailed output for the Banner Ad. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+ +

+Submit Query +

+

When you have made the changes you want to the Banner Ad, +you can click "Submit Query." This will update the information about the +Banner Ad in the database. +

+ +

ADD an Banner Ad

+

+This page is for Adding Banner Ads in the database. +When form is complete, click on the "Submit Query" button. The database will +be updated, and you will be directed back to the "List Banner Ads" page. +

+ +

+URL: +

+

This is the web site url you want the users to go to when they click the +banner. Don't enter in http://. +

+

+Description: +

+

This is the text which will appear as a complete description of the Banner Ad, +in the Detailed output of the Banner Ad

+Start Date: +

+

This is date upon which the Banner Ad will begin. It should be formatted in +the following manner: 05/15/2001 +

+

+End Date: +

+

This is date upon which the Banner Ad will end. It should be formatted in +the following manner: 05/15/2001 +

+

+Active: +

+

This Select Box will determine whether or not the Banner Ad is viewable +on the front end of you web site. +The Default value is "Yes" meaning that the banner ad will be visable. +

+

+Click and Impressions: +

+

These are the counters for banner ads

+

+Picture for Banner Ad: +

+

If you choose, you may upload an image which will be displayed on the +Detailed output for the Banner Ad. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+ +

+Submit Query +

+

When you have made the changes you want to the Banner Ad, +you can click "Submit Query." This will update the information about the +Banner Ad in the database. +

+ +
+
+ + diff --git a/admin/Banners/help/closewindow.gif b/admin/Banners/help/closewindow.gif new file mode 100755 index 0000000..c54ed89 Binary files /dev/null and b/admin/Banners/help/closewindow.gif differ diff --git a/admin/Banners/help/helpbg.gif b/admin/Banners/help/helpbg.gif new file mode 100755 index 0000000..0b62415 Binary files /dev/null and b/admin/Banners/help/helpbg.gif differ diff --git a/admin/Banners/index.phtml b/admin/Banners/index.phtml new file mode 100755 index 0000000..0d58fe3 --- /dev/null +++ b/admin/Banners/index.phtml @@ -0,0 +1,4 @@ + diff --git a/admin/Banners/list_banner.phtml b/admin/Banners/list_banner.phtml new file mode 100755 index 0000000..80e3437 --- /dev/null +++ b/admin/Banners/list_banner.phtml @@ -0,0 +1,183 @@ += CURRENT_DATE"; + + if(!db_exec($dbd, $qs)) + html_error(DB_ERROR_MSG, 1); +} +$qs = "SET DATESTYLE TO 'SQL, US'; + SELECT id,url,image,impressions,clicks,active,sdate,edate + FROM banner + ORDER BY sdate DESC,edate DESC"; + + +if(!$res = db_exec($dbd,$qs)) html_error(DB_ERROR_MSG.$qs,1); +top("Banner Ads", "help/banner.phtml?key=list"); +$lnav = array( + "Add A New Banner Ad" => "edit_banner.phtml", + "List Banners" => "list_banner.phtml" + ); +html_nav_table($lnav, 2); +?> + + + +"; +?> + + + + + Function + + + + + On/Off + + + + + URL + + + + + Counters + + + + + Start Date + + + + + End Date + + + + + Image + + + + + + + + [Edit] + + [Delete] + + + ">"; + else + echo "\"Off\""; + + ?> + + + + Impressions:
+ Clicks: + + + + + + + + + + +  + + + \n"; +footer(); +?> diff --git a/admin/Banners/update_banner.phtml b/admin/Banners/update_banner.phtml new file mode 100755 index 0000000..cf200b2 --- /dev/null +++ b/admin/Banners/update_banner.phtml @@ -0,0 +1,94 @@ +".$qs,1); + + $location = "list_banner.phtml?".SID; + + break; + + case "Insert": + + if($image == "none" || $image == "") { + $image_name = $oldimage; + } + else { + $image_name = process_image($image,$image_name); + } + + http_strip($url); + + $qs = "INSERT INTO banner + (member_id,url,sdate,edate,active,clicks, + impressions, image,description) + VALUES + (".((is_numeric($member_id))?$member_id:"NULL").",'$url','$sdate','$edate','$active', + '$clicks','$impressions','$image_name','$description')"; + + if(!db_auto_exec($qs)) html_error("failed ->".$qs,1); + + $location = "list_banner.phtml?".SID; + + break; + + case "Delete": + $qs = "DELETE FROM banner + WHERE id = $id"; + + if(!db_auto_exec($qs)) html_error("failed ->".$qs,1); + + @unlink(ORIGINAL_PATH."/".$oldimage); + @unlink(RESIZED_PATH.$oldimage); + @unlink(THUMB_PATH.$oldimage); + @unlink(MIDSIZED_PATH.$oldimage); + + $location = "list_banner.phtml?".SID; + break; + + case "Cancel": + $location = "list_banner.phtml?".SID; + break; + + default: + html_error("incorrect value for Command",1); + break; + } +header("Location: $location"); +?> diff --git a/admin/GLMbug.gif b/admin/GLMbug.gif new file mode 100644 index 0000000..20b12d8 Binary files /dev/null and b/admin/GLMbug.gif differ diff --git a/admin/Toolbox/business.sql b/admin/Toolbox/business.sql new file mode 100644 index 0000000..cb73734 --- /dev/null +++ b/admin/Toolbox/business.sql @@ -0,0 +1,301 @@ +-- +-- PostgreSQL database dump +-- + +SET client_encoding = 'SQL_ASCII'; +SET check_function_bodies = false; + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 4 (OID 2200) +-- Name: public; Type: ACL; Schema: -; Owner: postgres +-- + +REVOKE ALL ON SCHEMA public FROM PUBLIC; +GRANT ALL ON SCHEMA public TO PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +SET search_path = public, pg_catalog; + +-- +-- TOC entry 5 (OID 17145) +-- Name: bus; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE bus ( + id serial NOT NULL, + name text, + description text, + description2 text, + description3 text, + image text, + imagename text, + image2 text, + image2name text, + image3 text, + image3name text, + urlname text, + url text, + address text, + city text, + state text, + zip text, + phone text, + fax text, + email text, + pos integer, + file text, + filename text, + file2 text, + file2name text, + file3 text, + file3name text, + contactname text +); + + +-- +-- TOC entry 6 (OID 17145) +-- Name: bus; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 11 (OID 17145) +-- Name: bus_id_seq; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus_id_seq FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 7 (OID 17153) +-- Name: bus_category; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE bus_category ( + id serial NOT NULL, + parent integer, + category text, + intro text, + description text, + image text, + imagename text, + active boolean, + pos integer, + keyword text, + "template" integer +); + + +-- +-- TOC entry 8 (OID 17153) +-- Name: bus_category; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus_category FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 12 (OID 17153) +-- Name: bus_category_id_seq; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus_category_id_seq FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 9 (OID 17161) +-- Name: bus_category_bus; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE bus_category_bus ( + id serial NOT NULL, + busid integer, + catid integer, + pos integer +); + + +-- +-- TOC entry 10 (OID 17161) +-- Name: bus_category_bus; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus_category_bus FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 13 (OID 17161) +-- Name: bus_category_bus_id_seq; Type: ACL; Schema: public; Owner: postgres +-- + +REVOKE ALL ON TABLE bus_category_bus_id_seq FROM PUBLIC; + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 14 (OID 17164) +-- Name: bus_id_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE UNIQUE INDEX bus_id_indx ON bus USING btree (id); + + +-- +-- TOC entry 16 (OID 17165) +-- Name: bus_category_id_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE UNIQUE INDEX bus_category_id_indx ON bus_category USING btree (id); + + +-- +-- TOC entry 18 (OID 17166) +-- Name: bus_category_parent_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_parent_indx ON bus_category USING btree (parent); + + +-- +-- TOC entry 20 (OID 17167) +-- Name: bus_category_pos_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_pos_indx ON bus_category USING btree (pos); + + +-- +-- TOC entry 17 (OID 17168) +-- Name: bus_category_keyword_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_keyword_indx ON bus_category USING btree (keyword); + + +-- +-- TOC entry 21 (OID 17169) +-- Name: bus_category_template_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_template_indx ON bus_category USING btree ("template"); + + +-- +-- TOC entry 24 (OID 17170) +-- Name: bus_category_bus_id_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE UNIQUE INDEX bus_category_bus_id_indx ON bus_category_bus USING btree (id); + + +-- +-- TOC entry 22 (OID 17171) +-- Name: bus_category_bus_busid_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_bus_busid_indx ON bus_category_bus USING btree (busid); + + +-- +-- TOC entry 23 (OID 17172) +-- Name: bus_category_bus_catid_indx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX bus_category_bus_catid_indx ON bus_category_bus USING btree (catid); + + +-- +-- TOC entry 19 (OID 18565) +-- Name: bus_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY bus_category + ADD CONSTRAINT bus_category_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 15 (OID 18567) +-- Name: bus_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY bus + ADD CONSTRAINT bus_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 25 (OID 18569) +-- Name: bus_category_bus_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY bus_category_bus + ADD CONSTRAINT bus_category_bus_pkey PRIMARY KEY (id); + +-- +-- TOC entry 27 (OID 18575) +-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY bus_category_bus + ADD CONSTRAINT "$1" FOREIGN KEY (catid) REFERENCES bus_category(id) ON DELETE CASCADE; + + +-- +-- TOC entry 28 (OID 18579) +-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY bus_category_bus + ADD CONSTRAINT "$2" FOREIGN KEY (busid) REFERENCES bus(id) ON DELETE CASCADE; + + +-- +-- TOC entry 3 (OID 2200) +-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres +-- + +COMMENT ON SCHEMA public IS 'Standard public schema'; + +REVOKE ALL on "bus" from PUBLIC; +GRANT ALL on "bus" to "nobody"; +GRANT ALL on "bus" to "postgres"; + +REVOKE ALL on "bus_id_seq" from PUBLIC; +GRANT ALL on "bus_id_seq" to "nobody"; +GRANT ALL on "bus_id_seq" to "postgres"; + +REVOKE ALL on "bus_category" from PUBLIC; +GRANT ALL on "bus_category" to "nobody"; +GRANT ALL on "bus_category" to "postgres"; + +REVOKE ALL on "bus_category_id_seq" from PUBLIC; +GRANT ALL on "bus_category_id_seq" to "nobody"; +GRANT ALL on "bus_category_id_seq" to "postgres"; + +REVOKE ALL on "bus_category_bus" from PUBLIC; +GRANT ALL on "bus_category_bus" to "nobody"; +GRANT ALL on "bus_category_bus" to "postgres"; + +REVOKE ALL on "bus_category_bus_id_seq" from PUBLIC; +GRANT ALL on "bus_category_bus_id_seq" to "nobody"; +GRANT ALL on "bus_category_bus_id_seq" to "postgres"; + +INSERT INTO bus_category (id,category,parent,pos,active) VALUES (nextval('bus_category_id_seq'),'Home',0,1,'t'); + diff --git a/admin/Toolbox/edit_bus.phtml b/admin/Toolbox/edit_bus.phtml new file mode 100755 index 0000000..cf9651e --- /dev/null +++ b/admin/Toolbox/edit_bus.phtml @@ -0,0 +1,244 @@ +db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + $row = $DB->db_fetch_array($res,0, PGSQL_ASSOC); + if(!$row[id]) + { + html_error(DB_ERROR_MSG.$qs,1); + } +} +else +{ + $row = array ( + "name" => "", + "catid" => $catid, + "address" => "", + "city" => "", + "state" => "", + "zip" => "", + "phone" => "", + "fax" => "", + "email" => "", + "url" => "", + "description" => "", + "image" => "", + "description2" => "", + "image2" => "", + "description3" => "", + "image3" => "", + "file" => "", + "file2" => "", + "file3" => "" + ); +} + +top2("Updatable Paragraphs (Add/Edit)", HELP_BASE."bus.phtml?key=edit","ToolboxUserGuide_1.0"); + +$lnav["List Paragraphs"] = "list_bus.phtml?catid=$catid"; +html_nav_table($lnav, 3); + +$qs = "SELECT id,category +FROM bus_category +ORDER BY parent,pos"; + +if(!$altcats = $DB->db_exec($qs)) +html_error(DB_ERROR_MSG.$qs,0); + +?> + + + +
+ + + + '; + + echo "Pages:"; + if(isset($id) && $id != "") { + $qs = "SELECT bc.id as catid, bcb.id as id,bc.category,bcb.pos + FROM bus_category bc,bus_category_bus bcb,bus b + WHERE bcb.busid = $id + AND bcb.catid = bc.id + AND b.id = bcb.busid + ORDER BY bc.category"; + + if(!$altres = $DB->db_exec($qs)) + html_error(DB_ERROR_MSG.$qs,0); + + for($rel=0;$rel<$DB->db_numrows($altres);$rel++) { + $altrow = $DB->db_fetch_array($altres,$rel,PGSQL_ASSOC); + $oldalt[$rel] = array_merge_recursive($altrow,$oldalt); + } + } + ?> + Page: + + + db_numrows($altcats);$i++) + { + $altrow = $DB->db_fetch_array($altcats,$i,PGSQL_ASSOC); + for($a=0;$a + + + + + +
"; + +foreach($fields as $key=>$value) { + if($value[type] == "text") { + ?> + + + +
'; + echo ''.$value["name"].''; +} +elseif($value[type] == "img") { +?> + +"; +if($row[$value[name]] != "") { + echo "Current Image:"; + echo " + + + + Delete this image: + + Yes + No + + "; +} +echo "New $value[title]:"; + echo ""; + echo ""; + } + elseif($value[type] == "file") { + ?> + + "; + if($row[$value[name]] != "") { + echo "Current File:"; + echo "".$row[$value[name]]." + + + + Delete this File: + + Yes + No + + "; + } + echo "New $value[title]:"; + echo ""; + echo ""; +} +if($value[type] == "desc") { + echo "$value[title]:"; + text_area("$value[name]",htmlspecialchars($row[$value[name]])); + echo ""; +} +elseif($value[type] == "hide") { + echo ""; +} +elseif($value[type] == "bool") { + echo "$value[title]:"; + echo "Yes"; + echo "No"; + + echo ""; + } +} +htmlcode(570,400); +echo "\n"; +echo " +"; +echo ''; +if(isset($id)) { +?> + + + + + + "; + +footer(); +?> diff --git a/admin/Toolbox/edit_bus_category.phtml b/admin/Toolbox/edit_bus_category.phtml new file mode 100755 index 0000000..2f54ed4 --- /dev/null +++ b/admin/Toolbox/edit_bus_category.phtml @@ -0,0 +1,345 @@ + "list_bus_category.phtml"); +if(!CAT_LOCK) +{ + $lnav["Add Page"] = "edit_bus_category.phtml"; +} +html_nav_table($lnav, 2); +if(isset($id)) +{ + if( DELUXE_TOOLBOX == 1 ) + { + $qs = "SELECT id,category,intro,parent,kiosk_text,description,image,imagename,keyword,template,pos + FROM bus_category + WHERE id = $id"; + } + else + { + $qs = "SELECT id,category,intro,parent,kiosk_text,description,image,pos + FROM bus_category + WHERE id = $id"; + } + + if(!$res = $DB->db_exec($qs)) + html_error(DB_ERROR_MSG,1); + + $row = $DB->db_fetch_array($res,0, PGSQL_ASSOC); + if(!$row[id]) + { + html_error(DB_ERROR_MSG,1); + } +} +else +{ + if( DELUXE_TOOLBOX == 1 ) + { + $row = array( + "category" => "", + "intro" => "", + "parent" => "", + "kiosk_text" => "", + "description" => "", + "image" => "", + "imagename" => "", + "keyword" => "", + "template" => "1" + ); + } + else + { + $row = array( + "category" => "", + "intro" => "", + "parent" => "", + "kiosk_text" => "", + "description" => "", + "image" => "" + ); + } +} +form_header("update_bus_category.phtml?".SID,"POST",""); +echo ''; + +foreach($row as $key=>$value) { + switch($key) { + + case "id": + echo ""; + break; + + case "pos": + echo ""; + break; + + case "parent": + echo ""; + $output = parent_select($value,$id); + echo ""; + echo ""; + break; + + case "category": + echo ""; + text_box("category",$value); + echo ""; + break; + + case "imagename": + echo ""; + text_box("imagename",$value); + echo ""; + break; + + case "intro": + echo ""; + text_box("intro",$value); + echo ""; + break; + + case "image": + echo ""; + echo " + + + + "; + } + echo ""; + break; + + case "kiosk_text": + echo ""; + echo ''; + //text_area("description",htmlspecialchars($value),15,60); + echo ""; + break; + + case "description": + echo ""; + text_area("description",htmlspecialchars($value),15,60); + echo ""; + break; + + case "keyword": + echo ""; + text_box("keyword",$value); + echo ""; + break; + + case "template": + echo ""; + echo ""; + break; + + default: + html_error("Incorrect Value -> ".$key,1); + break; + } +} + +htmlcode(); + echo ' + + '; +if(isset($id)) { + $qs = "SELECT count(*) as count + FROM bus_category_bus + WHERE catid = $id"; + + if(!$res = $DB->db_exec($qs)) + html_error(DB_ERROR_MSG.$qs,0); + + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + ?> + + + +'; + +footer(); +?> diff --git a/admin/Toolbox/help/bus.phtml b/admin/Toolbox/help/bus.phtml new file mode 100755 index 0000000..7676d61 --- /dev/null +++ b/admin/Toolbox/help/bus.phtml @@ -0,0 +1,186 @@ + + +Help + + + +

Listings Help

+
+ +

List Listings

+ +

+This page lists the existing Listings. +

+

+Add A New Listing +

+

This link will allow you to add new Listing

+

+List Listings +

+

This link is the page you are currently viewing

+ +

+[Edit] +

+

This link will let you edit an existing Listing

+ +

Edit a Listing

+

+This page is for editing and modifying an existing Listing in the database. +When editing is complete, click on the "Submit Query" button. The database will +be updated, and you will be directed back to the "List Listings" page. +

+

+Name: +This is the name of the listing. +

+ +

+Category +Choose the correct category for this listing. Default to the category that you +have choosen to list. +

+ +

+Description: +

+

This is the text which will appear as a complete description of the Link, +in the Detailed output of the Link

+

+Address: +This is the address of the listing. +

+ +

+Phone: +This is the Phone Number of the listing. +

+ +

+Fax: +This is the Fax Number of the listing. +

+ +

+Email: +This is the Email of the listing. +

+ +

+URL: +

+

This is the web site 5 you want the users to go to when they click the +link. Don't enter in http://. +

+

+Picture for Listing: +

+

If you choose, you may upload an image which will be displayed on the +Detailed output for the Listing. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+ +

+Submit Query +

+

When you have made the changes you want to the Link, +you can click "Submit Query." This will update the information about the +Link in the database. +

+ +

ADD an Link

+

+This page is for Adding Links in the database. +When form is complete, click on the "Submit Query" button. The database will +be updated, and you will be directed back to the "List Links" page. +

+ +

+Name: +This is the name of the listing. +

+ +

+Category +Choose the correct category for this listing. Default to the category that you +have choosen to list. +

+ +

+Description: +

+

This is the text which will appear as a complete description of the Link, +in the Detailed output of the Link

+

+Address: +This is the address of the listing. +

+ +

+Phone: +This is the Phone Number of the listing. +

+ +

+Fax: +This is the Fax Number of the listing. +

+ +

+Email: +This is the Email of the listing. +

+ +

+URL: +

+

This is the web site 5 you want the users to go to when they click the +link. Don't enter in http://. +

+ +

+Picture for Link: +

+

If you choose, you may upload an image which will be displayed on the +Detailed output for the Link. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+ +

+Submit Query +

+

When you have made the changes you want to the Link, +you can click "Submit Query." This will update the information about the +Link in the database. +

+ +
+
+ + diff --git a/admin/Toolbox/help/buscat.phtml b/admin/Toolbox/help/buscat.phtml new file mode 100755 index 0000000..69e4785 --- /dev/null +++ b/admin/Toolbox/help/buscat.phtml @@ -0,0 +1,159 @@ + + +Help + + + +

Listings Help

+
+ +

List Categories

+

+This page lists the existing Listings Categories in the database. +

+

+Add A New Category +

+

This link will allow you to add new Categories

+

+List Categories +

+

This link is the page you are currently viewing

+ +

+[Edit] +

+

This link will let you edit an existing Category

+

+[Listings] +

+

+This link will list out the Listings Items associated with a particular Category +

+

+

Notice:

The categories are Displayed in a order based on there +hierarchy. +

+ + +

Edit a Category

+

+This page is for editing and modifying the existing Listings Categories in the database. +When editing is complete, click on the "Update" button. The database will +be updated, and you will be directed back to the "List Categories" page. +

+ +

+Title: +

+

This is the title that will appear for the "Category" i.e. "Pictures of The Island"

+

+Intro: +

+

This is the text which will introduce the Category. This text will be +displayed below the Category Title. +

+ +

+Description: +

+

This is the text which will fully describe the Category. This text will be +displayed below the Category Title and Intro. +

+

+Current Image: +

+

If the record you are editing has an uploaded image, you will see the Current Image: header, and a small version of the image associated with this Category. +

+Delete This Image: +

+

If the record you are editing has an uploaded image, you will see the Delete This Image: header, and "Yes" and "No" radio buttons. If you choose "Yes" and then "Update" the Room Rate, you will have permanently removed the "Current Image". The default value is "No." +

+

+New Image: +

+

+If you choose, you may upload an image which will be displayed on the +output for the Category. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+ +

+Update +

+

When you have made the changes you want to the 0, +you can click "Update." This will update the information about the Category +in the database. +

+

+Delete +

+

If you want to remove the current Category, press the "Delete" button. +

+ +

Add Category

+

+This page is for adding Listings Categories in the database. +When editing is complete, click on the "Insert" button. The database will +be updated, and you will be directed back to the "List Categories" page. +

+

+Title: +

+

This is the title that will appear for the "Category" i.e. "Pictures of The Island"

+

+Intro: +

+

This is the text which will introduce the Category. This text will be +displayed below the Category Title in the Gallery. +

+ +

+Description: +

+

This is the text which will fully describe the Category. This text will be +displayed below the Category Title and Intro in the Gallery. +

+

+Image: +

+

+If you choose, you may upload an image which will be displayed on the +output for the Category. To upload an image, click the "Browse" button. +For the image to be displayed properly, it must be either a "GIF" or "JPEG" +formatted image. Generally, these are saved as filename.gif or filename.jpg. +If you receive an error message while trying to upload an image, the most +common error is that the image is neither a JPEG nor a GIF. Also note that +simply renaming the file from filename.foo to filename.gif will not reformat +the image as a GIF. +

+

+Insert +

+

When you have entered the information you want for the 0, +you can click "Insert." This will add the information about the new Category +in the database. +

+ +
+
+ + diff --git a/admin/Toolbox/help/closewindow.gif b/admin/Toolbox/help/closewindow.gif new file mode 100755 index 0000000..c54ed89 Binary files /dev/null and b/admin/Toolbox/help/closewindow.gif differ diff --git a/admin/Toolbox/help/helpbg.gif b/admin/Toolbox/help/helpbg.gif new file mode 100755 index 0000000..0b62415 Binary files /dev/null and b/admin/Toolbox/help/helpbg.gif differ diff --git a/admin/Toolbox/htmlarea.css b/admin/Toolbox/htmlarea.css new file mode 100644 index 0000000..23bdf7d --- /dev/null +++ b/admin/Toolbox/htmlarea.css @@ -0,0 +1,180 @@ +.htmlarea { background: #fff; } + +.htmlarea .toolbar { + cursor: default; + background: ButtonFace; + padding: 1px 1px 2px 1px; + border: 1px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; +} +.htmlarea .toolbar table { font-family: tahoma,verdana,sans-serif; font-size: 11px; } +.htmlarea .toolbar img { border: none; } +.htmlarea .toolbar .label { padding: 0px 3px; } + +.htmlarea .toolbar .button { + background: ButtonFace; + color: ButtonText; + border: 1px solid ButtonFace; + padding: 1px; + margin: 0px; +} +.htmlarea .toolbar .buttonHover { + border: 1px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; +} +.htmlarea .toolbar .buttonActive, .htmlarea .toolbar .buttonPressed { + padding: 2px 0px 0px 2px; + border: 1px solid; + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} +.htmlarea .toolbar .buttonPressed { + background: ButtonHighlight; +} +.htmlarea .toolbar .indicator { + padding: 0px 3px; + overflow: hidden; + width: 20px; + text-align: center; + cursor: default; + border: 1px solid ButtonShadow; +} + +.htmlarea .toolbar .buttonDisabled { background-color: #aaa; } + +.htmlarea .toolbar .buttonDisabled img { + filter: alpha(opacity = 25); + -moz-opacity: 25%; +} + +.htmlarea .toolbar .separator { + position: relative; + margin: 3px; + border-left: 1px solid ButtonShadow; + border-right: 1px solid ButtonHighlight; + width: 0px; + height: 16px; + padding: 0px; +} + +.htmlarea .toolbar .space { width: 5px; } + +.htmlarea .toolbar select { font: 11px Tahoma,Verdana,sans-serif; } + +.htmlarea .toolbar select, +.htmlarea .toolbar select:hover, +.htmlarea .toolbar select:active { background: FieldFace; color: ButtonText; } + +.htmlarea .statusBar { + border: 1px solid; + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; + padding: 2px 4px; + background-color: ButtonFace; + color: ButtonText; + font: 11px Tahoma,Verdana,sans-serif; +} + +.htmlarea .statusBar .statusBarTree a { + padding: 2px 5px; + color: #00f; +} + +.htmlarea .statusBar .statusBarTree a:visited { color: #00f; } +.htmlarea .statusBar .statusBarTree a:hover { + background-color: Highlight; + color: HighlightText; + padding: 1px 4px; + border: 1px solid HighlightText; +} + + +/* Hidden DIV popup dialogs (PopupDiv) */ + +.dialog { + color: ButtonText; + background: ButtonFace; +} + +.dialog .content { padding: 2px; } + +.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table { + font: 11px Tahoma,Verdana,sans-serif; +} + +.dialog table { border-collapse: collapse; } + +.dialog .title { + background: #008; + color: #ff8; + border-bottom: 1px solid #000; + padding: 1px 0px 2px 5px; + font-size: 12px; + font-weight: bold; + cursor: default; +} + +.dialog .title .button { + float: right; + border: 1px solid #66a; + padding: 0px 1px 0px 2px; + margin-right: 1px; + color: #fff; + text-align: center; +} + +.dialog .title .button-hilite { border-color: #88f; background: #44c; } + +.dialog button { + width: 5em; + padding: 0px; +} + +.dialog .buttonColor { + padding: 1px; + cursor: default; + border: 1px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; +} + +.dialog .buttonColor-hilite { + border-color: #000; +} + +.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor { + height: 0.6em; + border: 1px solid; + padding: 0px 1em; + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} + +.dialog .buttonColor .nocolor { padding: 0px; } +.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; } + +.dialog .label { text-align: right; width: 6em; } +.dialog .value input { width: 100%; } +.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; } + +.dialog legend { font-weight: bold; } +.dialog fieldset table { margin: 2px 0px; } + +.popupdiv { + border: 2px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; +} + +.popupwin { + padding: 0px; + margin: 0px; +} + +.popupwin .title { + background: #fff; + color: #000; + font-weight: bold; + font-size: 120%; + padding: 3px 10px; + margin-bottom: 10px; + border-bottom: 1px solid black; + letter-spacing: 2px; +} + +form { margin: 0px; border: none; } diff --git a/admin/Toolbox/images/collapse.png b/admin/Toolbox/images/collapse.png new file mode 100755 index 0000000..d10e051 Binary files /dev/null and b/admin/Toolbox/images/collapse.png differ diff --git a/admin/Toolbox/images/ed_about.gif b/admin/Toolbox/images/ed_about.gif new file mode 100755 index 0000000..d476271 Binary files /dev/null and b/admin/Toolbox/images/ed_about.gif differ diff --git a/admin/Toolbox/images/ed_align_center.gif b/admin/Toolbox/images/ed_align_center.gif new file mode 100755 index 0000000..0966910 Binary files /dev/null and b/admin/Toolbox/images/ed_align_center.gif differ diff --git a/admin/Toolbox/images/ed_align_justify.gif b/admin/Toolbox/images/ed_align_justify.gif new file mode 100755 index 0000000..94a1ea7 Binary files /dev/null and b/admin/Toolbox/images/ed_align_justify.gif differ diff --git a/admin/Toolbox/images/ed_align_left.gif b/admin/Toolbox/images/ed_align_left.gif new file mode 100755 index 0000000..595eef6 Binary files /dev/null and b/admin/Toolbox/images/ed_align_left.gif differ diff --git a/admin/Toolbox/images/ed_align_right.gif b/admin/Toolbox/images/ed_align_right.gif new file mode 100755 index 0000000..514a5e4 Binary files /dev/null and b/admin/Toolbox/images/ed_align_right.gif differ diff --git a/admin/Toolbox/images/ed_blank.gif b/admin/Toolbox/images/ed_blank.gif new file mode 100755 index 0000000..d7ae406 Binary files /dev/null and b/admin/Toolbox/images/ed_blank.gif differ diff --git a/admin/Toolbox/images/ed_charmap.gif b/admin/Toolbox/images/ed_charmap.gif new file mode 100755 index 0000000..b0dc889 Binary files /dev/null and b/admin/Toolbox/images/ed_charmap.gif differ diff --git a/admin/Toolbox/images/ed_color_bg.gif b/admin/Toolbox/images/ed_color_bg.gif new file mode 100755 index 0000000..f6ff05d Binary files /dev/null and b/admin/Toolbox/images/ed_color_bg.gif differ diff --git a/admin/Toolbox/images/ed_color_fg.gif b/admin/Toolbox/images/ed_color_fg.gif new file mode 100755 index 0000000..90e5123 Binary files /dev/null and b/admin/Toolbox/images/ed_color_fg.gif differ diff --git a/admin/Toolbox/images/ed_copy.gif b/admin/Toolbox/images/ed_copy.gif new file mode 100755 index 0000000..f598fa2 Binary files /dev/null and b/admin/Toolbox/images/ed_copy.gif differ diff --git a/admin/Toolbox/images/ed_custom.gif b/admin/Toolbox/images/ed_custom.gif new file mode 100755 index 0000000..3c406a5 Binary files /dev/null and b/admin/Toolbox/images/ed_custom.gif differ diff --git a/admin/Toolbox/images/ed_cut.gif b/admin/Toolbox/images/ed_cut.gif new file mode 100755 index 0000000..92972fc Binary files /dev/null and b/admin/Toolbox/images/ed_cut.gif differ diff --git a/admin/Toolbox/images/ed_delete.gif b/admin/Toolbox/images/ed_delete.gif new file mode 100755 index 0000000..1218349 Binary files /dev/null and b/admin/Toolbox/images/ed_delete.gif differ diff --git a/admin/Toolbox/images/ed_format_bold.gif b/admin/Toolbox/images/ed_format_bold.gif new file mode 100755 index 0000000..3d01d0b Binary files /dev/null and b/admin/Toolbox/images/ed_format_bold.gif differ diff --git a/admin/Toolbox/images/ed_format_italic.gif b/admin/Toolbox/images/ed_format_italic.gif new file mode 100755 index 0000000..e8e1cb0 Binary files /dev/null and b/admin/Toolbox/images/ed_format_italic.gif differ diff --git a/admin/Toolbox/images/ed_format_strike.gif b/admin/Toolbox/images/ed_format_strike.gif new file mode 100755 index 0000000..4885361 Binary files /dev/null and b/admin/Toolbox/images/ed_format_strike.gif differ diff --git a/admin/Toolbox/images/ed_format_sub.gif b/admin/Toolbox/images/ed_format_sub.gif new file mode 100755 index 0000000..489f7a9 Binary files /dev/null and b/admin/Toolbox/images/ed_format_sub.gif differ diff --git a/admin/Toolbox/images/ed_format_sup.gif b/admin/Toolbox/images/ed_format_sup.gif new file mode 100755 index 0000000..8e66b99 Binary files /dev/null and b/admin/Toolbox/images/ed_format_sup.gif differ diff --git a/admin/Toolbox/images/ed_format_underline.gif b/admin/Toolbox/images/ed_format_underline.gif new file mode 100755 index 0000000..b05384e Binary files /dev/null and b/admin/Toolbox/images/ed_format_underline.gif differ diff --git a/admin/Toolbox/images/ed_help.gif b/admin/Toolbox/images/ed_help.gif new file mode 100755 index 0000000..4d66154 Binary files /dev/null and b/admin/Toolbox/images/ed_help.gif differ diff --git a/admin/Toolbox/images/ed_hr.gif b/admin/Toolbox/images/ed_hr.gif new file mode 100755 index 0000000..92fc80e Binary files /dev/null and b/admin/Toolbox/images/ed_hr.gif differ diff --git a/admin/Toolbox/images/ed_html.gif b/admin/Toolbox/images/ed_html.gif new file mode 100755 index 0000000..380de29 Binary files /dev/null and b/admin/Toolbox/images/ed_html.gif differ diff --git a/admin/Toolbox/images/ed_image.gif b/admin/Toolbox/images/ed_image.gif new file mode 100755 index 0000000..a715019 Binary files /dev/null and b/admin/Toolbox/images/ed_image.gif differ diff --git a/admin/Toolbox/images/ed_indent_less.gif b/admin/Toolbox/images/ed_indent_less.gif new file mode 100755 index 0000000..6054d61 Binary files /dev/null and b/admin/Toolbox/images/ed_indent_less.gif differ diff --git a/admin/Toolbox/images/ed_indent_more.gif b/admin/Toolbox/images/ed_indent_more.gif new file mode 100755 index 0000000..c5dd55d Binary files /dev/null and b/admin/Toolbox/images/ed_indent_more.gif differ diff --git a/admin/Toolbox/images/ed_link.gif b/admin/Toolbox/images/ed_link.gif new file mode 100755 index 0000000..0482da3 Binary files /dev/null and b/admin/Toolbox/images/ed_link.gif differ diff --git a/admin/Toolbox/images/ed_list_bullet.gif b/admin/Toolbox/images/ed_list_bullet.gif new file mode 100755 index 0000000..7b07303 Binary files /dev/null and b/admin/Toolbox/images/ed_list_bullet.gif differ diff --git a/admin/Toolbox/images/ed_list_num.gif b/admin/Toolbox/images/ed_list_num.gif new file mode 100755 index 0000000..ae4e03b Binary files /dev/null and b/admin/Toolbox/images/ed_list_num.gif differ diff --git a/admin/Toolbox/images/ed_paste.gif b/admin/Toolbox/images/ed_paste.gif new file mode 100755 index 0000000..6892053 Binary files /dev/null and b/admin/Toolbox/images/ed_paste.gif differ diff --git a/admin/Toolbox/images/ed_redo.gif b/admin/Toolbox/images/ed_redo.gif new file mode 100755 index 0000000..2b5ebbd Binary files /dev/null and b/admin/Toolbox/images/ed_redo.gif differ diff --git a/admin/Toolbox/images/ed_show_border.gif b/admin/Toolbox/images/ed_show_border.gif new file mode 100755 index 0000000..23a01a4 Binary files /dev/null and b/admin/Toolbox/images/ed_show_border.gif differ diff --git a/admin/Toolbox/images/ed_splitcel.gif b/admin/Toolbox/images/ed_splitcel.gif new file mode 100755 index 0000000..48442e2 Binary files /dev/null and b/admin/Toolbox/images/ed_splitcel.gif differ diff --git a/admin/Toolbox/images/ed_undo.gif b/admin/Toolbox/images/ed_undo.gif new file mode 100755 index 0000000..05f041e Binary files /dev/null and b/admin/Toolbox/images/ed_undo.gif differ diff --git a/admin/Toolbox/images/expand.png b/admin/Toolbox/images/expand.png new file mode 100755 index 0000000..38dcfc0 Binary files /dev/null and b/admin/Toolbox/images/expand.png differ diff --git a/admin/Toolbox/images/fullscreen_maximize.gif b/admin/Toolbox/images/fullscreen_maximize.gif new file mode 100755 index 0000000..0536fec Binary files /dev/null and b/admin/Toolbox/images/fullscreen_maximize.gif differ diff --git a/admin/Toolbox/images/fullscreen_minimize.gif b/admin/Toolbox/images/fullscreen_minimize.gif new file mode 100755 index 0000000..b12c3f7 Binary files /dev/null and b/admin/Toolbox/images/fullscreen_minimize.gif differ diff --git a/admin/Toolbox/images/insert_table.gif b/admin/Toolbox/images/insert_table.gif new file mode 100755 index 0000000..4ce3ff4 Binary files /dev/null and b/admin/Toolbox/images/insert_table.gif differ diff --git a/admin/Toolbox/index.phtml b/admin/Toolbox/index.phtml new file mode 100755 index 0000000..550afb8 --- /dev/null +++ b/admin/Toolbox/index.phtml @@ -0,0 +1,3 @@ + diff --git a/admin/Toolbox/list_bus.phtml b/admin/Toolbox/list_bus.phtml new file mode 100755 index 0000000..7a90c82 --- /dev/null +++ b/admin/Toolbox/list_bus.phtml @@ -0,0 +1,94 @@ +db_exec($qs)) +{ + html_error(DB_ERROR_MSG.$qs,1); +} +$catrow = $DB->db_fetch_array($catres,0,PGSQL_ASSOC); +$qs = "SELECT b.id,b.name,bcb.pos + FROM bus b,bus_category_bus bcb + WHERE bcb.catid = $catid + AND b.id = bcb.busid + AND bcb.catid = $catid + ORDER BY bcb.pos"; +if(!$res = $DB->db_exec($qs)) +{ + html_error(DB_ERROR_MSG.$qs,1); +} +top("$catrow[category] Paragraphs", HELP_BASE."bus.phtml?key=list","ToolboxUserGuide_1.0"); +$lnav = array( + "Add A New Paragraph" => "edit_bus.phtml?catid=$catid", + "List Pages" => "list_bus_category.phtml" + ); +html_nav_table($lnav, 2); +?> +
+
+ + Parent Page:".$output."
Page Name:
Image Caption:
Page Header:
Current Image: + "; + if($value != "") { + echo " +
Delete this image: + Yes + No +
+ New Image:
Kiosk Description:
Description:
Keyword:
Template: + + + + + + + + + + + + + + + +
"; + echo "1"; + echo ""; + echo "2"; + echo ""; + echo "3"; + echo ""; + echo "4"; + echo ""; + echo "5"; + echo "
+
+ + + + + +
+ + + + +db_numrows($res); $i++) { + $row = $DB->db_fetch_array($res,$i, PGSQL_ASSOC); + if(!$row[id]) + { + html_error(DB_ERROR_MSG,1); + } + ?> + + + + + +'; +footer(); +?> diff --git a/admin/Toolbox/list_bus_category.phtml b/admin/Toolbox/list_bus_category.phtml new file mode 100755 index 0000000..e256283 --- /dev/null +++ b/admin/Toolbox/list_bus_category.phtml @@ -0,0 +1,243 @@ +'; +if(isset($active)) +{ + if($active=="t") + { + $nd = "f"; + } + else + { + $nd = "y"; + } + $query = "UPDATE bus_category SET active = '$nd' WHERE id = $id"; + $DB->db_exec($query); +} +if(isset($kiosk)) +{ + if($kiosk=="t") + { + $nd = "f"; + } + else + { + $nd = "y"; + } + $query = "UPDATE bus_category SET kiosk = '$nd' WHERE id = $id"; + $DB->db_exec($query); +} +$lnav["Edit Positions"] = "list_bus_category.phtml?show_pos=1"; +$lnav["Expand All"] = "list_bus_category.phtml?expand_all=1"; +$lnav["Collapse All"] = "list_bus_category.phtml?collaspe_all=1"; +unset($lnav["List Pages"]); +html_nav_table($lnav, 6); +?> +
Function Records
+ + + + + +
+
+ + +
+
+ +
+db_exec($qs)) + { + echo "Failure".$qs; + } + for($i=0;$i'; + // kiosk part + if($data['kiosk'] == 't') + { + $alt = "Don't display"; + } + else + { + $alt = "Display"; + } + $kiosk = ''; + } + elseif($data['id'] == HOME_ID) + { + $active = " "; + $kiosk = " "; + } + if($show_pos) + { + $qs = "SELECT MAX(pos) as maxpos + FROM bus_category + WHERE parent = $parent"; + + if(!$maxresult = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,0); + } + $max_data = $DB->db_fetch_array($maxresult,0,PGSQL_ASSOC); + $maxpos = $max_data['maxpos']; + $pos = "
+ + diff --git a/admin/Toolbox/popups/about.html b/admin/Toolbox/popups/about.html new file mode 100755 index 0000000..9b05218 --- /dev/null +++ b/admin/Toolbox/popups/about.html @@ -0,0 +1,55 @@ + +About HTMLArea + + + + + +
+
+HTML Area +3.0 [ rev. beta ]
+ +
+Released on Aug 11, 2003 [21:30] GMT +
+
+ +
+ +

A free WYSIWYG editor replacement for <textarea> fields.

+ +

For full source code and docs, visit:
+http://www.interactivetools.com/products/htmlarea/

+ +

Version 3.0 developed and maintained by mishoo.

+ +

© 2002, 2003 interactivetools.com, inc. All Rights Reserved.

+ +
+ +
+ +
+ + + + diff --git a/admin/Toolbox/popups/blank.html b/admin/Toolbox/popups/blank.html new file mode 100755 index 0000000..8c7fe21 --- /dev/null +++ b/admin/Toolbox/popups/blank.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/admin/Toolbox/popups/custom2.html b/admin/Toolbox/popups/custom2.html new file mode 100755 index 0000000..5591f6c --- /dev/null +++ b/admin/Toolbox/popups/custom2.html @@ -0,0 +1,35 @@ + + + Select Phrase + + + + + +
+ + + + + +
+ + \ No newline at end of file diff --git a/admin/Toolbox/popups/editor_help.html b/admin/Toolbox/popups/editor_help.html new file mode 100755 index 0000000..b34de82 --- /dev/null +++ b/admin/Toolbox/popups/editor_help.html @@ -0,0 +1,16 @@ + + + Editor Help + + + + +

Editor Help

+ +Todo... + + + + \ No newline at end of file diff --git a/admin/Toolbox/popups/fullscreen.html b/admin/Toolbox/popups/fullscreen.html new file mode 100755 index 0000000..cd67bdd --- /dev/null +++ b/admin/Toolbox/popups/fullscreen.html @@ -0,0 +1,162 @@ + +Fullscreen Editor + + + + + + + + + + +
+ +
+ + diff --git a/admin/Toolbox/popups/insert_image.html b/admin/Toolbox/popups/insert_image.html new file mode 100755 index 0000000..55e56a0 --- /dev/null +++ b/admin/Toolbox/popups/insert_image.html @@ -0,0 +1,216 @@ + + + + Insert Image + + + + + + + + + + + +
Insert Image
+ +
+ + + + + + + + + + + + + +
Image URL: + +
Alternate text:
+ +

+ +

+Layout + +
+ +
Alignment:
+ + +

+ +

Border thickness:
+ + +
+ +
+ +
+Spacing + +
+ +
Horizontal:
+ + +

+ +

Vertical:
+ + +
+ +
+ +
+
+ + +
+ +
+ + + diff --git a/admin/Toolbox/popups/insert_table.html b/admin/Toolbox/popups/insert_table.html new file mode 100755 index 0000000..efdf3f0 --- /dev/null +++ b/admin/Toolbox/popups/insert_table.html @@ -0,0 +1,173 @@ + + + + Insert Table + + + + + + + + + + + +
Insert Table
+ +
+ + + + + + + + + + + + + + + + + + + +
Rows:
Cols:Width:
+ +

+ +

+Layout + +
+ +
Alignment:
+ + +

+ +

Border thickness:
+ + +
+ +
+ +
+Spacing + +
+ +
Cell spacing:
+ + +

+ +

Cell padding:
+ + +
+ +
+ +
+
+ + +
+ +
+ + + diff --git a/admin/Toolbox/popups/old-fullscreen.html b/admin/Toolbox/popups/old-fullscreen.html new file mode 100755 index 0000000..7c00d91 --- /dev/null +++ b/admin/Toolbox/popups/old-fullscreen.html @@ -0,0 +1,131 @@ + +Fullscreen Editor + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/admin/Toolbox/popups/old_insert_image.html b/admin/Toolbox/popups/old_insert_image.html new file mode 100755 index 0000000..613f460 --- /dev/null +++ b/admin/Toolbox/popups/old_insert_image.html @@ -0,0 +1,206 @@ + + + + + + + +Insert Image + + + + + +
Image URL:
+ + +
Alternate Text:
+ + +
+Layout +
+ +
+Spacing +
+ +
Alignment:
+ + +
Horizontal:
+ + +
Border Thickness:
+ + +
Vertical:
+ + + + + + + \ No newline at end of file diff --git a/admin/Toolbox/popups/popup.js b/admin/Toolbox/popups/popup.js new file mode 100755 index 0000000..68cbeb2 --- /dev/null +++ b/admin/Toolbox/popups/popup.js @@ -0,0 +1,42 @@ +function __dlg_onclose() { + if (!document.all) { + opener.Dialog._return(null); + } +}; + +function __dlg_init() { + if (!document.all) { + // init dialogArguments, as IE gets it + window.dialogArguments = opener.Dialog._arguments; + window.sizeToContent(); + window.sizeToContent(); // for reasons beyond understanding, + // only if we call it twice we get the + // correct size. + window.addEventListener("unload", __dlg_onclose, true); + // center on parent + var px1 = opener.screenX; + var px2 = opener.screenX + opener.outerWidth; + var py1 = opener.screenY; + var py2 = opener.screenY + opener.outerHeight; + var x = (px2 - px1 - window.outerWidth) / 2; + var y = (py2 - py1 - window.outerHeight) / 2; + window.moveTo(x, y); + var body = document.body; + window.innerHeight = body.offsetHeight; + window.innerWidth = body.offsetWidth; + } else { + var body = document.body; + window.dialogHeight = body.offsetHeight + 50 + "px"; + window.dialogWidth = body.offsetWidth + "px"; + } +}; + +// closes the dialog and passes the return info upper. +function __dlg_close(val) { + if (document.all) { // IE + window.returnValue = val; + } else { + opener.Dialog._return(val); + } + window.close(); +}; diff --git a/admin/Toolbox/popups/select_color.html b/admin/Toolbox/popups/select_color.html new file mode 100755 index 0000000..d1fd26b --- /dev/null +++ b/admin/Toolbox/popups/select_color.html @@ -0,0 +1,346 @@ + + +Select Color + + + + + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/admin/Toolbox/threads.phtml b/admin/Toolbox/threads.phtml new file mode 100755 index 0000000..2c0724c --- /dev/null +++ b/admin/Toolbox/threads.phtml @@ -0,0 +1,76 @@ +"; + var $beginLevel2 = "
    "; + var $endLevel = "
"; + var $beginItem = "
  • "; + var $beginItem2 = "
  • "; + var $endItem = "
  • "; + var $wholeThread; + + function Thread($code="") + { + if(!empty($code)) + { + $this->beginLevel = $code[beginLevel]; + $this->beginLevel2 = $code[beginLevel2]; + $this->endLevel = $code[endLevel]; + $this->beginItem = $code[beginItem]; + $this->beginItem2 = $code[beginItem2]; + $this->endItem = $code[endItem]; + } + } + + function sortChilds($threads) + { while(list($var, $value) = each($threads)) + $childs[$value[parent]][$value[ID]] = $value; + return $childs; + } + + function convertToThread($threads, $thread) + { + static $count; + if( !$count ) + { + $this->wholeThread .= $this->beginLevel2; + } + else + { + $this->wholeThread .= $this->beginLevel; + } + while(list($parent, $value) = each($thread)) + { + if( $threads[$parent] && $value['closed'] ) + { + $this->wholeThread .= $this->beginItem2; + $this->wholeThread .= ''; + } + elseif( $threads[$parent] && !$value['closed'] ) + { + $this->wholeThread .= $this->beginItem2; + $this->wholeThread .= ''; + } + else + { + $this->wholeThread .= $this->beginItem; + } + $count++; + $this->wholeThread .= " [Edit]  " + ."[Paragraphs]  " + ."[Preview]" + .$value[pos] + ."".$value['active'].$value['kiosk']; + $this->wholeThread .= $value['content'] . "" . $this->endItem ."\n"; + if( $threads[$parent] && !$value['closed'] ) + { + $this->convertToThread($threads, $threads[$parent]); + } + } + $this->wholeThread .= $this->endLevel; + return $this->wholeThread; + } +} +?> diff --git a/admin/Toolbox/toolbox_setup.inc b/admin/Toolbox/toolbox_setup.inc new file mode 100755 index 0000000..8bdb278 --- /dev/null +++ b/admin/Toolbox/toolbox_setup.inc @@ -0,0 +1,213 @@ +db_connect(CONN_STR); + $base_parent = $toolbox->get_parentid($catid); + } + else + { + $base_parent = 0; + } + } + */ +switch($base_parent) + { + default: + $fields[] = array( name => "id", title => "id", type => "hide"); + $fields[] = array( name => "name", title => "Header", type => "text"); + //$fields[] = array( name => "address", title => "Address", type => "text"); + //$fields[] = array( name => "city", title => "City", type => "text"); + // $fields[] = array( name => "state", title => "State", type => "text"); + //$fields[] = array( name => "zip", title => "Zip", type => "text"); + // $fields[] = array( name => "phone", title => "Phone", type => "text"); + // $fields[] = array( name => "fax", title => "Fax", type => "text"); + // $fields[] = array( name => "email", title => "Email", type => "text"); + // $fields[] = array( name => "urlname", title => "URL Name", type => "text"); + // $fields[] = array( name => "url", title => "URL", type => "text"); + //$fields[] = array( name => "Images and Descriptions", type => "seperator"); + $fields[] = array( name => "description", title => "Description", type => "desc"); + $fields[] = array( name => "imagename", title=> "Image Caption",type => "text"); + $fields[] = array( name => "image", title => "Image", type => "img"); + //$fields[] = array( name => "description2", title => "Description 2", type => "desc"); + //$fields[] = array( name => "image2name", title=> "Image Name 2",type => "text"); + //$fields[] = array( name => "image2", title => "Image 2", type => "img"); + //$fields[] = array( name => "description3", title => "Description 3", type => "desc"); + //$fields[] = array( name => "image3name", title=> "Image Name 3",type => "text"); + //$fields[] = array( name => "image3", title => "Image 3", type => "img"); + $fields[] = array( name => "File uploads", type => "seperator"); + $fields[] = array( name => "filename", title=> "File Name",type => "text"); + $fields[] = array( name => "file", title => "File 1", type => "file"); + $fields[] = array( name => "file2name", title=> "File Name 2",type => "text"); + $fields[] = array( name => "file2", title => "File 2", type => "file"); + $fields[] = array( name => "file3name", title=> "File Name 3",type => "text"); + $fields[] = array( name => "file3", title => "File 3", type => "file"); + break; + } +function check_lock($id) +{ + if( isset( $id ) && $id != '' && is_numeric( $id ) ) + { + if( file_exists( BASE.'static/'.$id.'.phtml' ) || $id == HOME_ID ) + { + return( true ); + } + else + { + return( false ); + } + } + else + { + return( false ); + } + +} +function sort_by_parent($data) + { + if(!is_array($data)) + return(false); + foreach($data as $key=>$value) + { + $data_new[$value["parent"]][$value["id"]] = $value; + } + return($data_new); + } + +function convertParent($threads,$thread) + { + static $select,$count; + if(!$count) + $count = 0; + $bgcolor[] = "#ffffff"; + $bgcolor[] = "#ffffff"; + $bgcolor[] = "#03A9BC"; + $bgcolor[] = "#6FD579"; + $bgcolor[] = "#E36BCB"; + $bgcolor[] = "#F92A23"; + if(is_array($thread)) + { + foreach($thread as $parent=>$value) + { + $color = $bgcolor[$count]; + $select[$value["id"]]["color"] = $color; + $select[$value["id"]]["category"] = $value["category"]; + $select[$value["id"]]["count"] = $count; + + if(isset($threads[$parent])) + { + $count++; + convertParent($threads, $threads[$parent]); + } + } + } + $count--; + return $select; + } + +/** + parent select + +

    This function does both the bus and bus category page parent select drop down boxes. + the backcount var is used to lock the list to a certain level set up with define of LEVELS_DEEP. + count varl starts at one and is generated in the function convertParent so we'll need to subtract one for proper results. + to unset backcount properly we'll need to check if count goes under or equals that of backcount. + then unset($backcount) cause if backcount is not empty then category won't get added to list. +

    + */ +function parent_select($catid,$id,$sel_name = "parent") + { + global $DB; + // select catid portion + if( $sel_name == "parent" ) + { + $qs = "SELECT id,category,parent + FROM bus_category + WHERE id != ".HOME_ID." + ORDER BY parent,pos"; + } + else + { + $qs = "SELECT id,category,parent + FROM bus_category + ORDER BY parent,pos"; + } + + $data = $DB->db_auto_get_data($qs,CONN_STR); + $data1 = sort_by_parent($data); + $select = ""; + } + if(($id <= 9 && $catid == 0)&& strstr($_SERVER['PHP_SELF'],"edit_bus_category") && ($catid!='' && $id!='')) + { + $select = 'No Parent '; + } + return($select); + } +if( !CAT_LOCK ) + { + $lnav["Add A New Page"] = "edit_bus_category.phtml"; + } +$lnav["List Pages"] = "list_bus_category.phtml"; +?> diff --git a/admin/Toolbox/update_bus.phtml b/admin/Toolbox/update_bus.phtml new file mode 100755 index 0000000..c538cba --- /dev/null +++ b/admin/Toolbox/update_bus.phtml @@ -0,0 +1,576 @@ +db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $data = $DB->db_fetch_array($result,0,PGSQL_ASSOC); + $pos = $data['pos']; + + if($newpos < $pos) { + $qs = "SELECT id,pos + FROM bus_category_bus + WHERE pos < $pos + AND pos >= $newpos + AND catid = $catid + ORDER BY pos"; + if(!$res = $DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $counter = ($newpos + 1); + for($i=0;$i<$DB->db_numrows($res);$i++) { + $res_data = $DB->db_fetch_array($res,$i,PGSQL_ASSOC); + $res_id = $res_data['id']; + $res_pos = $res_data['pos']; + $qs = "UPDATE bus_category_bus + SET pos = $counter + WHERE id = $res_id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + $counter++; + } + } + else { + $qs = "SELECT pos,id + FROM bus_category_bus + WHERE pos > $pos + AND pos <= $newpos + AND catid = $catid + ORDER BY pos"; + + if(!$res = $DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $counter = ($pos); + for($i=0;$i<$DB->db_numrows($res);$i++) { + $res_data = $DB->db_fetch_array($res,$i,PGSQL_ASSOC); + $res_id = $res_data['id']; + $res_pos = $res_data['pos']; + $qs = "UPDATE bus_category_bus + SET pos = $counter + WHERE id = $res_id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + $counter++; + } + } + $qs = "UPDATE bus_category_bus + SET pos = $newpos + WHERE id = $id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $location = "list_bus.phtml?catid=$catid"; + break; + + case "Update": + $oldcatid = ereg_replace("^:","",$oldcatid); + $oldcatid = split(":",$oldcatid); + + if($category) + { + $category = ereg_replace("^:","",$category); + $catid = split(":",$category); + } + $DB->db_exec("BEGIN WORK"); + + $array_counter = 0; + if(is_array($catid)) + { + + $query = "select catid,pos from bus_category_bus where busid = $id"; + $res = $DB->db_exec($query); + $oldpos = pg_result($res,0,'pos'); + while( $row = pg_fetch_array( $res ) ) + { + // do this only if ald catid is being removed + if( !in_array( $row['catid'],$catid ) ) + { + $query = "update bus_category_bus set pos = pos - 1 + where catid = ".$row['catid']." and pos >= $oldpos"; + $DB->db_exec($query); + $query = "delete from bus_category_bus + where catid = ".$row['catid']." and busid = $id"; + $DB->db_exec($query); + } + + } + + foreach($catid as $key=>$value) + { + + // do this only if ald catid is being removed + if( !in_array( $value,$oldcatid ) ) + { + $qs = "SELECT count(*) as maxpos + FROM bus_category_bus + WHERE catid = $value"; + + if(!$res = $DB->db_exec($qs)) + html_error(DB_ERROR_MSG.$qs,1); + + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + $pos = ( $row['maxpos'] == 0 ) ? (int)0 : (int)$row['maxpos'] ; + $pos++; + + $qs = "INSERT + INTO bus_category_bus + (busid,catid,pos) + VALUES ($id,$value,$pos)"; + if(!$DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + } + } + } + $fields = array_reverse($fields); + $qs = "UPDATE ".TABLE." SET "; + for($i=0;$idb_exec("COMMIT WORK"); + break; + + case "Insert": + if($category) + { + $category = ereg_replace("^:","",$category); + $catid = split(":",$category); + } + $tmp = ""; + $tmp_value = ""; + for($i=0;$idb_exec("BEGIN WORK")) + { + die( pg_errormessage($dbd).$qs ); + } + if($tmp_blank) + { + $qs = "INSERT INTO ".TABLE." + (".ID.", $tmp ) + VALUES + (nextval('".SEQUENCE."'), $tmp_value) RETURNING id"; + if(!$res = $DB->db_exec($qs)) + { + die( pg_errormessage($dbd).$qs ); + } +/* + if(!$oid = pg_GetLastOid($res)) + { + die( pg_errormessage($dbd).$qs ); + html_error("CANT GET LAST OID",1); + } + + $qs = "SELECT id + FROM bus + WHERE oid = $oid"; + if(!$res = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,0); + } +*/ + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + if(is_array($catid)) + { + foreach($catid as $key=>$value) + { + $qs = "SELECT count(*) as maxpos + FROM bus_category_bus + WHERE catid = $value"; + + if(!$res = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + + $row2 = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + if( !$pos = $row2[maxpos]) + { + $pos = 1; + } + else + { + $pos++; + } + + $qs = "INSERT + INTO bus_category_bus + (busid,catid,pos) + VALUES ($row[id],$value,$pos)"; + + if(!$DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + if(!$res = $DB->db_exec("COMMIT WORK")) + { + die( pg_errormessage($dbd).$qs ); + } + } + } + else + { + $qs = "SELECT count(*) as maxpos + FROM bus_category_bus + WHERE catid = $catid"; + + if(!$res = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + + $row2 = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + if( !$pos = $row2[maxpos]) + { + $pos = 1; + } + else + { + $pos++; + } + $qs = "INSERT + INTO bus_category_bus + (busid,catid,pos) + VALUES ($row[id],$catid,$pos)"; + + if(!$DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + if(!$res = $DB->db_exec("COMMIT WORK")) + { + die( pg_errormessage($dbd).$qs ); + } + } + } + $location = "list_bus.phtml?catid=".$catid[0]."&".SID; + + break; + + case "Delete": + $oldcatid = ereg_replace("^:","",$oldcatid); + $oldcatid = split(":",$oldcatid); + + @unlink(ORIGINAL_PATH."/".$oldimage); + @unlink(RESIZED_PATH.$oldimage); + @unlink(THUMB_PATH.$oldimage); + @unlink(MIDSIZED_PATH.$oldimage); + + @unlink(ORIGINAL_PATH."/".$oldimage2); + @unlink(RESIZED_PATH.$oldimage2); + @unlink(THUMB_PATH.$oldimage2); + @unlink(MIDSIZED_PATH.$oldimage2); + + @unlink(ORIGINAL_PATH."/".$oldimage3); + @unlink(RESIZED_PATH.$oldimage3); + @unlink(THUMB_PATH.$oldimage3); + @unlink(MIDSIZED_PATH.$oldimage3); + + @unlink(UP_BASE.$oldfile); + @unlink(UP_BASE.$oldfile2); + @unlink(UP_BASE.$oldfile3); + + foreach($oldcatid as $key=>$value) + { + $qs = "SELECT id,pos + FROM bus_category_bus + WHERE busid = $id"; + + if(!$res = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + + $qs = "SELECT id + FROM bus_category_bus + WHERE pos > $row[pos] + AND catid = $value + ORDER BY pos"; + + if(!$res2 = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + + $counter = $row[pos]; + for($i=0;$i<$DB->db_numrows($res2);$i++) + { + $row2 = $DB->db_fetch_array($res2,$i,PGSQL_ASSOC); + + $qs = "UPDATE bus_category_bus + SET pos = $counter + WHERE id = $row2[id]"; + + if(!$DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.$qs,1); + } + $counter++; + } + } + $qs = "DELETE FROM bus + WHERE id = $id"; + if(!$DB->db_auto_exec($qs)) + { + html_error("failed ->".$qs,1); + } + $location = "list_bus.phtml?catid=".$oldcatid[0]."&".SID; + break; + + case "Cancel": + $oldcatid = ereg_replace("^:","",$oldcatid); + $oldcatid = split(":",$oldcatid); + $catid = ereg_replace("^:","",$oldcatid); + $catid = split(":",$oldcatid); + $location = "list_bus.phtml?catid=".$oldcatid[0]."&".SID; + break; + + default: + html_error("incorrect value for Command",1); + break; + + } + + header("Location: $location"); +} +?> diff --git a/admin/Toolbox/update_bus_category.phtml b/admin/Toolbox/update_bus_category.phtml new file mode 100755 index 0000000..e3c636b --- /dev/null +++ b/admin/Toolbox/update_bus_category.phtml @@ -0,0 +1,250 @@ +db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $data = $DB->db_fetch_array($result,0,PGSQL_ASSOC); + $pos = $data['pos']; + + if($newpos < $pos) { + $qs = "SELECT id,pos + FROM bus_category + WHERE pos < $pos + AND pos >= $newpos + AND parent = $parent + ORDER BY pos"; + + if(!$res = $DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $counter = ($newpos + 1); + for($i=0;$i<$DB->db_numrows($res);$i++) { + $res_data = $DB->db_fetch_array($res,$i,PGSQL_ASSOC); + $res_id = $res_data['id']; + $res_pos = $res_data['pos']; + $qs = "UPDATE bus_category + SET pos = $counter + WHERE id = $res_id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + $counter++; + } + } + else { + $qs = "SELECT pos,id + FROM bus_category + WHERE pos > $pos + AND pos <= $newpos + AND parent = $parent + ORDER BY pos"; + + if(!$res = $DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $counter = ($pos); + for($i=0;$i<$DB->db_numrows($res);$i++) { + $res_data = $DB->db_fetch_array($res,$i,PGSQL_ASSOC); + $res_id = $res_data['id']; + $res_pos = $res_data['pos']; + $qs = "UPDATE bus_category + SET pos = $counter + WHERE id = $res_id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + $counter++; + } + } + $qs = "UPDATE bus_category + SET pos = $newpos + WHERE id = $id"; + + if(!$DB->db_exec($qs)) html_error(DB_ERROR_MSG.$qs,0); + + $location = "list_bus_category.phtml?catid=$catid"; + break; + + case "Update": + + if($image != "none" && $image != "") { + @unlink(ORIGINAL_PATH."/".$oldimage); + @unlink(RESIZED_PATH.$oldimage); + @unlink(THUMB_PATH.$oldimage); + @unlink(MIDSIZED_PATH.$oldimage); + $image_name = process_image($image,$image_name); + } + else { + $image_name = $oldimage; + } + + if($delete == "1") { + $image_name = ""; + + @unlink(ORIGINAL_PATH."/".$oldimage); + @unlink(RESIZED_PATH.$oldimage); + @unlink(THUMB_PATH.$oldimage); + @unlink(MIDSIZED_PATH.$oldimage); + } + if($parent != $oldparent) { + + $qs = "SELECT MAX(pos) as maxpos + FROM bus_category + WHERE parent = $parent"; + + $res = $DB->db_exec($qs); + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + $pos = $row[maxpos]; + $pos++; + + $qs = "SELECT pos,id + FROM bus_category + WHERE parent = $oldparent + AND pos > $oldpos + ORDER BY pos"; + + $res2 = $DB->db_exec($qs); + $oldparent_counter = $oldpos; + for($i=0;$i<$DB->db_numrows($res2);$i++) { + $row2 = $DB->db_fetch_array($res2,$i,PGSQL_ASSOC); + $qs = "UPDATE bus_category + SET pos = $oldparent_counter + WHERE id = $row2[id]"; + + $DB->db_exec($qs); + $oldparent_counter++; + } + + } + else { + $pos = $oldpos; + } + $template = ( $template ) ? $template : 1; + + $qs = "update bus_category + set category = '$category', + parent = $parent, + pos = $pos, + intro = '$intro', + kiosk_text = '$kiosk_text', + description = '$description', + image = '$image_name', + imagename = '$imagename', + keyword = '$keyword', + template = $template + where id = $id"; + + if(!$DB->db_auto_exec($qs)) html_error("failed ->".$qs,1); + + $location = "list_bus_category.phtml?".SID; + + break; + + case "Insert": + + $parent = ( $parent ) ? $parent : 0; + if($image != "none" && $image != "") { + $image_name = process_image($image,$image_name); + } + else { + $image_name = $oldimage; + } + $qs = "SELECT MAX(pos) as maxpos + FROM bus_category + WHERE parent = $parent"; + + $res = $DB->db_exec($qs); + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + $nextpos = $row[maxpos]; + $nextpos++; + + $template = ( $template ) ? $template : 1; + $parent = ( $parent ) ? $parent : 0; + $qs = "insert into bus_category + (kiosk_text,template,keyword,category,parent,intro,description,image,imagename,pos) + values + ('$kiosk_text',$template,'$keyword','$category',$parent,'$intro','$description','$image_name','$imagename',$nextpos)"; + + if(!$DB->db_auto_exec($qs)) html_error("failed ->".$qs,1); + + $location = "list_bus_category.phtml?".SID; + + break; + + case "Delete": + //if(!$dbd) html_error(DB_ERROR_MSG,1); + + $qs = "SELECT count(*) as count + FROM bus_category_bus + WHERE catid = $id"; + + $res = $DB->db_exec($qs); + $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC); + + if($row['count'] >0) { + html_error("Sorry but you have items in there\n + Delete these records first\n",1); + } + + $qs = "SELECT parent + FROM bus_category + WHERE parent = $id"; + + $res = $DB->db_exec($qs); + + if($DB->db_numrows($res) >0) { + html_error("Sorry but you have Categories in there\n + Delete these Categories first\n",1); + } + + $qs = "SELECT pos,id + FROM bus_category + WHERE parent = $oldparent + AND pos > $oldpos + ORDER BY pos"; + + $res2 = $DB->db_exec($qs); + $oldparent_counter = $oldpos; + for($i=0;$i<$DB->db_numrows($res2);$i++) { + $row2 = $DB->db_fetch_array($res2,$i,PGSQL_ASSOC); + $qs = "UPDATE bus_category + SET pos = $oldparent_counter + WHERE id = $row2[id]"; + + $DB->db_exec($qs); + $oldparent_counter++; + } + + $qs2 = "DELETE + FROM bus_category + WHERE id = $id"; + + if(!$DB->db_auto_exec($qs2)) html_error(DB_ERROR_MSG.$qs2,1); + + @unlink(ORIGINAL_PATH."/".$oldimage); + @unlink(RESIZED_PATH.$oldimage); + @unlink(THUMB_PATH.$oldimage); + @unlink(MIDSIZED_PATH.$oldimage); + + $location = "list_bus_category.phtml?".SID; + + break; + + case "Cancel": + $location = "list_bus_category.phtml?".SID; + break; + + default: + html_error("incorrect value for Command",1); + break; + } + +header("Location: $location"); +} +?> diff --git a/admin/Toolbox/updatetoolset.php b/admin/Toolbox/updatetoolset.php new file mode 100755 index 0000000..271d4f9 --- /dev/null +++ b/admin/Toolbox/updatetoolset.php @@ -0,0 +1,32 @@ +db_connect(); + $DB->db_exec( "BEGIN WORK" ); + + echo 'replacing newlines with <br> in bus_category
    '; + $DB->db_exec( "update bus_category set description = replace(description,'\\n','
    ')" ); + echo 'replacing newlines with <br> in bus
    '; + $DB->db_exec( "update bus set description = replace(description,'\\n','
    ')" ); + $DB->db_exec( "update bus set description2 = replace(description2,'\\n','
    ')" ); + $DB->db_exec( "update bus set description3 = replace(description3,'\\n','
    ')" ); + + echo 'replacing newlines with <br> in news
    '; + $DB->db_exec( "update news set description = replace(description,'\\n','
    ')" ); + echo 'replacing newlines with <br> in news_block
    '; + $DB->db_exec( "update news_block set description2 = replace(description2,'\\n','
    ')" ); + + $DB->db_exec( "COMMIT WORK" ); + /** + update media_category set description = replace(description,'http://devsys.gaslightmedia.com/www.upnorth.net/','http://www.upnorth.net/'); + update bus_category set description = replace(description,'http://devsys.gaslightmedia.com/www.upnorth.net/','http://www.upnorth.net/'); + */ +?> diff --git a/admin/bug3.png b/admin/bug3.png new file mode 100644 index 0000000..cc6d93b Binary files /dev/null and b/admin/bug3.png differ diff --git a/admin/form.js b/admin/form.js new file mode 100755 index 0000000..0bbabf0 --- /dev/null +++ b/admin/form.js @@ -0,0 +1,42 @@ +function reshow(object) { + artist = object.options[object.selectedIndex].text; + for (var i = document.track.names.length;i > 0;i--) + document.track.names.options[0] = null; + reloading = true; + showlinks(); + document.track.names.options[0].selected = true; + return false; +} + +function load(object) { + alert('Just testing: ' + object.options[object.selectedIndex].value); + //window.location.href = object.options[object.selectedIndex].value; + return false; +} + +function showlinks() { + if (artist == 'Chris Rea') { + opt('cr/one.zip','The Road To Hell'); + opt('cr/two.zip','Let\'s Dance'); + } + + if (artist == 'Annie Lennox') { + opt('al/why.zip','Why'); + opt('al/wobg.zip','Walking on Broken Glass'); + } + + if (artist == 'Dina Carrol') { + opt('dc/track1.zip','Escaping'); + opt('dc/track2.zip','Only Human'); + } +} + +function opt(href,text) { + if (reloading) { + var optionName = new Option(text, href, false, false) + var length = document.track.names.length; + document.track.names.options[length] = optionName; + } + else + document.write('