From: Steve Sutton Date: Wed, 15 Feb 2017 20:31:40 +0000 (-0500) Subject: site from ws1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=17598f93426f338621e3df32ef4a39ed298397d6;p=web%2Fws1%2Fwww.mackinacislandpackage.com.git site from ws1 --- 17598f93426f338621e3df32ef4a39ed298397d6 diff --git a/.cvsignore b/.cvsignore new file mode 100755 index 0000000..5a27c04 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,3 @@ +prototype +prototype/*.* +home.html diff --git a/AC_RunActiveContent.js b/AC_RunActiveContent.js new file mode 100755 index 0000000..1faba83 --- /dev/null +++ b/AC_RunActiveContent.js @@ -0,0 +1,126 @@ +//v1.0 +//Copyright 2006 Adobe Systems, Inc. All rights reserved. +function AC_AddExtension(src, ext) +{ + if (src.indexOf('?') != -1) + return src.replace(/\?/, ext+'?'); + else + return src + ext; +} + +function AC_Generateobj(objAttrs, params, embedAttrs) +{ + var str = ' '; + str += ' + + + +Tell A Friend - Mackinac Island Experience Package + + + + +
+
+ +

Tell A Friend

+
+
+

Share the Mackinac Island Experience Package with a friend!

+
+
+ +
+
+
+ + +
+ + diff --git a/GLM_site_check.phtml b/GLM_site_check.phtml new file mode 100644 index 0000000..ee5c799 --- /dev/null +++ b/GLM_site_check.phtml @@ -0,0 +1,19 @@ + + diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100755 index 0000000..31fc45c --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1 @@ +#RewriteEngine Off diff --git a/admin/Contact/contact_inquiry.phtml b/admin/Contact/contact_inquiry.phtml new file mode 100755 index 0000000..1aeb8ef --- /dev/null +++ b/admin/Contact/contact_inquiry.phtml @@ -0,0 +1,72 @@ +db_connect(); +if(!$conn) + { + echo "No database connection"; + } + +$qs = "SELECT id,header,pos +FROM contact_inq +ORDER BY pos;"; + +$result = pg_Exec($conn,$qs); +?> + + + + + 0) +{ + for($i=0;$i + + + + + + + +
+
+ +
+
[Edit] + "; + for($newpos=1;$newpos<=$maxpos;$newpos++) { + $string = "Command=Move&id=$data[id]&newpos=$newpos"; + $pos .= " +
Nothing in the database yet
+ diff --git a/admin/Contact/contact_setup.inc b/admin/Contact/contact_setup.inc new file mode 100644 index 0000000..6da7dcd --- /dev/null +++ b/admin/Contact/contact_setup.inc @@ -0,0 +1,259 @@ +$value) + { + $template = str_replace( "", $value, $template ); + } + } + + return $template; + } + } +if(!function_exists("add_image")) + { + function add_image($image,$align) + { + if($image != "") + { + return('
'); + } + } + } + + +// Navigation array +$nav = array( + "Report Builder" => "index.phtml", + "Add Contact" => "edit_contact.phtml", + "List Contacts" => "list_contact.phtml", + "Contact Inquiry Fields" => "contact_inquiry.phtml", + "HTML Emails" => "emails.php", + "Saved Reports" => "list_query.phtml", + ); +$navWidth = 7; +$query = "select * from contact_inq order by pos;"; +$cData = $DB->db_auto_get_data($query); +if( is_array( $cData ) ) +{ + foreach( $cData as $key => $value ) + { + $int_array[$value['id']] = $value['header']; + } +} +function search_where( $name, $search_where ) +{ + $out = ' + '; + return( $out ); +} +function search_type( $name, $search_type ) +{ + $out = ' + '; + return( $out ); +} +function search_bool( $name, $search_type ) +{ + $out = ' + '; + return( $out ); +} +function interest($field) + { + global $int_array; + if( !is_array( $int_array ) ) + { + return( false ); + } + echo ""; + $count = 0; + foreach($int_array as $key=>$value) + { + if($count==0) + echo ""; + $count++; + } + echo "
"; + echo "$value
"; + if($count==5) + echo "
"; + if($count==11) + echo "
"; + } + +// default query on create_date +$c_date_from = contact_date_entry("","","","fc_month","fc_day","fc_year"); +$c_date_to = contact_date_entry("","","","tc_month","tc_day","tc_year"); +/* The following is for setting up the defines and arrays that are needed + * based on which table ( customer or contact ) in use + * formats for arrays + * $DB_fields[] = array( name =>"{FIELD NAME}", title => "{FIELD TITLE}", type => "{FIELD TYPE}") + * $fields["{FIELD_NAME}"] = "{FIELD TITLE}"; + * + * must have these defines + * ID - The primary key + * SEQUENCE - sequence name + * WHERE - where clause + */ +if(TABLE==CUSTOMER_TABLE) + { + define("ID","cust_id"); + define("MAILOK","mail_ok"); + define("SEQUENCE","custkey"); + define("WHERE","fname != '-Guest-'"); + // $DB_fields are used for edit and updating contacts + $DB_fields[] = array( name => "cust_id", title => "cust_id", type => "hide"); + $DB_fields[] = array( name => "purch_date",title => "Last Purchase Date", type => "static"); + $DB_fields[] = array( name => "access_date",title => "Last Access Date",type => "static"); + $DB_fields[] = array( name => "create_date",title => "Create Date",type => "static"); + $DB_fields[] = array( name => "fname", title => "First Name", type => "text"); + $DB_fields[] = array( name => "lname", title => "Last Name", type => "text"); + $DB_fields[] = array( name => "add1", title => "Address 1", type => "text"); + $DB_fields[] = array( name => "add2", title => "Address 2", type => "text"); + $DB_fields[] = array( name => "city", title => "City", type => "text"); + $DB_fields[] = array( name => "state", title => "State", type => "text"); + $DB_fields[] = array( name => "zip", title => "Zip", type => "text"); + $DB_fields[] = array( name => "email", title => "Email", type => "text"); + $DB_fields[] = array( name => "phone", title => "Phone", type => "text"); + $DB_fields[] = array( name => "fax", title => "Fax", type => "text"); + $DB_fields[] = array( name => "org", title => "Org", type => "text"); + $DB_fields[] = array( name => "referred_by",title => "Refered By", type => "text"); + $DB_fields[] = array( name => "mail_ok", title => "Mail Ok?", type => "radio"); + // $fields are used for building the query page + foreach($DB_fields as $key=>$value){ + if($value['type'] == "text") + $fields[$value['name']] = $value['title']; + } + // date query fields + $p_date_from = contact_date_entry("","","","fp_month","fp_day","fp_year"); + $p_date_to = contact_date_entry("","","","tp_month","tp_day","tp_year"); + $a_date_from = contact_date_entry("","","","fa_month","fa_day","fa_year"); + $a_date_to = contact_date_entry("","","","ta_month","ta_day","ta_year"); + } +else + { + define("ID","id"); + define("MAILOK","mail_ok"); + define("SEQUENCE","contact_id_seq"); + define("WHERE",ID." IS NOT NULL"); + // $DB_fields are used for edit and updating contacts + $DB_fields[] = array( name => "id", title => "id", type => "hide"); + $DB_fields[] = array( name => "create_date",title => "Create Date",type => "static"); + $DB_fields[] = array( name => "fname", title => "First Name", type => "text"); + $DB_fields[] = array( name => "lname", title => "Last Name", type => "text"); + $DB_fields[] = array( name => "company", title => "Company Name",type => "text"); + $DB_fields[] = array( name => "address", title => "Address", type => "text"); + $DB_fields[] = array( name => "address2", title => "Address 2", type => "text"); + $DB_fields[] = array( name => "city", title => "City", type => "text"); + $DB_fields[] = array( name => "state", title => "State", type => "state"); + $DB_fields[] = array( name => "zip", title => "Zip", type => "text"); + $DB_fields[] = array( name => "phone", title => "Phone", type => "text"); + $DB_fields[] = array( name => "fax", title => "Fax", type => "text"); + $DB_fields[] = array( name => "email", title => "Email", type => "text"); + $DB_fields[] = array( name => "mail_ok", title => "Mail Ok?", type => "radio"); + //$DB_fields[] = array( name => "interest", title => "Interest", type => "interest"); + // $fields are used for building the query page + foreach($DB_fields as $key=>$value) + { + if($value['type'] == "text" || $value['type'] == "state") + { + $fields[$value['name']] = $value['title']; + } + elseif( $value['type'] == "radio" ) + { + $boolean[$value['name']] = $value['title']; + } + elseif( $value['type'] == "drop" ) + { + $dropdowns[$value['name']] = array( 'title' => $value['title'], 'drop' => $value['drop'] ); + } + } + } +$data['bailout'] .= "You are receiving this message because you have expressed an interest in "; +$data['bailout'] .= "receiving specials and information from ".SITENAME.". If you do not "; +$data['bailout'] .= "wish to receive future items of this nature, please reply to this e-mail "; +$data['bailout'] .= "with the word \"CANCEL\" on the subject line. You will then be removed "; +$data['bailout'] .= "from future mailings.
"; +$data['bailout'] .= "".OWNER_EMAIL."
"; +?> diff --git a/admin/Contact/del_query.phtml b/admin/Contact/del_query.phtml new file mode 100755 index 0000000..f446bc4 --- /dev/null +++ b/admin/Contact/del_query.phtml @@ -0,0 +1,18 @@ + + +Query is Deleted +
Close This +Window
diff --git a/admin/Contact/download.phtml b/admin/Contact/download.phtml new file mode 100755 index 0000000..f2a2727 --- /dev/null +++ b/admin/Contact/download.phtml @@ -0,0 +1,108 @@ +".$query_string; + if(pg_numrows($res)>0) { + for($i=0;$i&1",$result_array,$result); + if($result != 0){ + echo $result_array[0]; + exit; + } + chmod("report.tar.gz",0660); + } + + if($file == "zip") { + $output = "report.zip"; + exec("zip report report.csv 2>&1",$result_array,$result); + if($result != 0){ + echo $result_array[0]; + exit; + } + chmod("report.zip",0660); + } + if($file == "rpt") { + $output = "report.csv"; + chmod("report.csv",0660); + } +if(ini_get('zlib.output_compression')) +{ + ini_set('zlib.output_compression', 'Off'); +} + header("Content-Type: application/force-download\n"); + /* Correction for the stupid MSIE thing */ + if(strstr(getenv('HTTP_USER_AGENT'), 'MSIE')) + { + header("Content-Disposition: inline; filename=\"$output\""); + } + else + { + header("Content-Disposition: attachment; filename=\"$output\""); + } + //header("Location: $output"); + $fn=fopen($output , "r"); + fpassthru($fn); + @fclose($fn); + exit(); +} +else { + header("Location: list_contact.phtml"); +} +?> diff --git a/admin/Contact/edit_autoresponse.phtml b/admin/Contact/edit_autoresponse.phtml new file mode 100755 index 0000000..8831732 --- /dev/null +++ b/admin/Contact/edit_autoresponse.phtml @@ -0,0 +1,249 @@ +db_exec($qs)) + { + html_error(DB_ERROR_MSG.__LINE__, 1); + } + $qs = "SELECT id,subject,response,image,image2,image3,image_align,image2_align,image3_align + FROM news_response + WHERE id = $id"; + + if(!$res = $DB->db_exec($qs)) + { + html_error(DB_ERROR_MSG.__LINE__,1); + } + $row = $DB->db_fetch_array($res,0, PGSQL_ASSOC); +} +else +{ + $row['subject'] = ''; + $row['response'] = ''; + $row['image'] = ''; + $row['image2'] = ''; + $row['image3'] = ''; +} +?> + + +
+ +$value) { + switch($key) { + + case "id": + echo ""; + break; + + case "subject": + echo ""; + text_box("subject",$value); + echo ""; + break; + + case "response": + echo ""; + echo ''; + //text_area("response",$value,8,60); + echo ""; + echo ""; + break; + + case "image_align": + case "image2_align": + case "image3_align": + break; + + case "image": + case "image2": + case "image3": + if ($row[$key] != "") + { + echo ' + + + '; + } + echo ' + + + + '; + break; + + default: + break; + } +} +echo ' + + + +'; + echo ' + + '; +echo ' +
Subject:
Response:
 NOTE: Insert IMAGE1 IMAGE2 IMAGE3 etc. in the body of + your text where you want the images to appear.
  +
+ This is the current image attached to this newsletter + To change the image, select a new one by clicking the browse button below. + To delete the image without uploading a new one, select + Yes below and click the Update button on bottom of the page. +
+ +
+
+ Delete Item Image?   Yes +   No +
+
+
+ + Align: + Left + Right +
'; +if( $id ) +{ + ?> + + + +
+
'; +footer(); +?> diff --git a/admin/Contact/edit_contact.phtml b/admin/Contact/edit_contact.phtml new file mode 100755 index 0000000..2e095e1 --- /dev/null +++ b/admin/Contact/edit_contact.phtml @@ -0,0 +1,179 @@ +db_exec( $qs)) + html_error(DB_ERROR_MSG.$qs,0); + if($DB->db_numrows($res)>0){ + $row = $DB->db_fetch_array($res,0, PGSQL_ASSOC); + } + else{ + die("No such record"); + } +} +else { // else new entry + // Grab the array of name from $DB_fields and stick it into $row + // Any default values must be placed inside this loop + $row = array(); + for($i=0;$i + +
+'; +echo "
"; + +foreach($DB_fields as $key=>$value) { + if($value[type] == "text") { + ?> + + + + + + + + + + + + + + "; + 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") { + if($value[name] == "description") { + echo "
"; + echo "Description and Images"; + } + echo "$value[title]:"; + text_area("$value[name]",$row[$value[name]]); + echo ""; + } + if($value[type] == "state") { + echo "$value[title]:"; + echo GLM_TOOLBOX::build_picklist("$value[name]",$states_US,$row[$value[name]]); + //text_area("$value[name]",$row[$value[name]]); + echo ""; + } + elseif($value[type] == "hide") { + echo ""; + } + elseif( $value['type'] == 'drop' ) + { + echo ''.$value[title].''; + echo ''; + $date_entry = GLM_TOOLBOX::build_picklist($value['name'],$value['drop'],$row[$value['name']]); + echo $date_entry.''; + echo ''; + } + elseif($value[type] == "radio") { + echo "$value[title]:"; + echo "Yes"; + echo "No"; + echo ""; + } +} + +if(isset($id)) { +?> + + + + + + +
"; + +footer(); +?> diff --git a/admin/Contact/edit_inquiry.phtml b/admin/Contact/edit_inquiry.phtml new file mode 100755 index 0000000..556e11c --- /dev/null +++ b/admin/Contact/edit_inquiry.phtml @@ -0,0 +1,87 @@ +db_connect(); +if(!$conn) + { + echo "No Database connection"; + } +top('Edit/Add Inquiry',''); +html_nav_table($nav,$navWidth); +switch($Command) + { + case "Edit": + $qs = "SELECT * + FROM contact_inq + WHERE id = $id"; + $result = pg_Exec($conn,$qs); + $header = pg_result($result,0,'header'); + $description = pg_result($result,0,'description'); + $image = pg_result($result,0,'image'); + $pos = pg_result($result,0,'pos'); + ?> + + + + + + "; + echo ""; + echo ""; + */ + echo ""; + echo ""; + /* + if($image != "") { + echo ""; + echo " + + + + + "; + } + echo ""; + echo ""; + echo ""; + */ + ?> + + + + +
Header: +
+ +
Description:
Current Image: +
Delete this image: + Yes + No +
New Image:
+ + +
+ + + + + + +
Header:
+ + +
+
+ diff --git a/admin/Contact/emails.php b/admin/Contact/emails.php new file mode 100644 index 0000000..d6d79f3 --- /dev/null +++ b/admin/Contact/emails.php @@ -0,0 +1,38 @@ +db_auto_get_data( $query ); +top( "Email HTML Newsletters", ""); +html_nav_table($nav,$navWidth); +$out = ' + + + + + + + '; + +if( is_array( $data ) ) +{ + foreach( $data as $key => $val ) + { + $out .= ' + + + + + '; + } +} +$out .= '
+
+ +
Function:Subject:Last Update:  
[Edit]  + [View]'.$val["subject"].''.$val["last_update"].'[Delete]
'; +echo $out; +footer(); +?> diff --git a/admin/Contact/form.js b/admin/Contact/form.js new file mode 100755 index 0000000..0bbabf0 --- /dev/null +++ b/admin/Contact/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('