From: Steve Sutton Date: Wed, 30 Nov 2016 19:32:10 +0000 (-0500) Subject: New sources X-Git-Tag: v1.0.0~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b0c77e9797f21709ce80839072c661623977df77;p=web%2Fwww.thelindy.com.git New sources --- b0c77e9797f21709ce80839072c661623977df77 diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..94b9e9a --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +Options +FollowSymLinks +RewriteEngine On +#RewriteBase /www.thelindy.com/ +RewriteRule .*-([0-9]*)/ index\.phtml?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..239399b --- /dev/null +++ b/GLM_site_check.phtml @@ -0,0 +1,29 @@ + + diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100644 index 0000000..38dcd05 --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1 @@ +RewriteEngine Off diff --git a/admin/Contact/contact_setup.inc b/admin/Contact/contact_setup.inc new file mode 100755 index 0000000..6a059fb --- /dev/null +++ b/admin/Contact/contact_setup.inc @@ -0,0 +1,220 @@ +$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( + "Add Contact" => "edit_contact.phtml", + "List Contacts" => "list_contact.phtml", + "Saved Reports" => "list_query.phtml", + "Compose Email" => "edit_autoresponse.phtml?id=1", + "Preview Email" => "view_newsletter.phtml", + "Report Builder" => "index.phtml" + ); +$navWidth = 7; +// Interest array comment this out if not in use +/* + $int_array = array( + "capital_campaign" => "Capital Campaign Information", + "membership" => "Membership Information", + "class_registration" => "Class Registration", + "ticket_sales" => "Ticket Sales", + "no_preference" => "No Preference", + ); + */ + +function interest($field) + { + 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 => "remote_addr",title => "Remot Address",type => "static"); + $DB_fields[] = array( name => "user_agent",title => "User Agent",type => "static"); + $DB_fields[] = array( name => "fname", title => "Name", type => "text"); + $DB_fields[] = array( name => "title", title => "Title", type => "text"); + $DB_fields[] = array( name => "company", title => "Company", type => "text"); + //$DB_fields[] = array( name => "lname", title => "Last 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 => "address3", title => "Address 3", type => "text"); + $DB_fields[] = array( name => "city", title => "City", type => "text"); + $DB_fields[] = array( name => "state", title => "State/Province/Region", type => "text"); + $DB_fields[] = array( name => "zip", title => "Zip/Postal", type => "text"); + $DB_fields[] = array( name => "country", title => "Country", type => "country"); + $DB_fields[] = array( name => "phone", title => "Telephone Number", type => "text"); + $DB_fields[] = array( name => "fax", title => "Fax Number", type => "text"); + $DB_fields[] = array( name => "email", title => "Email Address", type => "text"); + $DB_fields[] = array( name => "contact_method", title => "Preferred Contact Method", 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" || $value['type'] == "state") + $fields[$value['name']] = $value['title']; + } + } +$data['bailout'] = "


"; +$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." "; +$data['bailout'] .= "
"; +?> diff --git a/admin/Contact/del_query.phtml b/admin/Contact/del_query.phtml new file mode 100755 index 0000000..c0a6581 --- /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..351ac0c --- /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..3d5ba05 --- /dev/null +++ b/admin/Contact/edit_autoresponse.phtml @@ -0,0 +1,217 @@ +"; +echo ' + '; +echo ''; +echo ''; +echo ''; +echo ''; +?> + + + + +
+$value) { + switch($key) { + + case "id": + echo ""; + break; + + case "subject": + echo "Subject:"; + text_box("subject",$value); + echo ""; + break; + + case "response": + echo "Response:"; + echo ''; + //text_area("response",$value,8,60); + echo ""; +echo " NOTE: Insert IMAGE1 IMAGE2 IMAGE3 etc. in the body of + your text where you want the images to appear."; + break; + + case "image": + case "image2": + case "image3": + break; + + default: + break; + } + } +} + +echo ""; + + if ($row["image"] != "") + { + echo "" + ." " + ."" + ."
" + ."
" + ."

" + ."
" + ."$FT1 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 Category button." + ."
" + ."

" + ."" + ."$TDFT Delete Item Image?   Yes " + ."   " + ."$TDFT No " + ."
" + ."" + .""; + } + +?> + + Image: + + + +" + ." " + ."" + ."
" + ."
" + ."

" + ."
" + ."$FT1 This is the second 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 Category button." + ."
" + ."

" + ."" + ."$TDFT Delete Item Image?   Yes " + ."   " + ."$TDFT No " + ."
" + ."" + .""; + } + +?> + + Image2: + + + +" + ." " + ."" + ."
" + ."
" + ."

" + ."
" + ."$FT1 This is the third 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 Category button." + ."
" + ."

" + ."" + ."$TDFT Delete Item Image?   Yes " + ."   " + ."$TDFT No " + ."
" + ."" + .""; + } + +?> + + Image3: + + + + + +

+
+ +
+ + + + + diff --git a/admin/Contact/edit_contact.phtml b/admin/Contact/edit_contact.phtml new file mode 100755 index 0000000..8be55c1 --- /dev/null +++ b/admin/Contact/edit_contact.phtml @@ -0,0 +1,180 @@ +0){ + $row = 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"; +?> + +
+
"; + +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 build_picklist("$value[name]",$states_US,$row[$value[name]]); + //text_area("$value[name]",$row[$value[name]]); + echo ""; + }elseif($value['type']=='country') + { + echo "$value[title]:"; + echo build_picklist("$value[name]",$country_codes,$row[$value[name]]); + //text_area("$value[name]",$row[$value[name]]); + echo ""; + } + elseif($value[type] == "hide") { + echo ""; + } + elseif($value[type] == "radio") { + echo "$value[title]:"; + echo "Yes"; + echo "No"; + echo ""; + } +} + +if(isset($id)) { +?> + + + + + + +"; + +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('