From: Steve Sutton Date: Mon, 13 Feb 2017 21:33:59 +0000 (-0500) Subject: first sources X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6388d884d5639607ba86952b94350d205ddd0665;p=web%2Fcontact.pineconevacations.com.git first sources --- 6388d884d5639607ba86952b94350d205ddd0665 diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..9a7f7ff --- /dev/null +++ b/.htaccess @@ -0,0 +1,4 @@ +RewriteEngine On +#RewriteBase /contact.pineconevacations.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..867ede6 --- /dev/null +++ b/GLM_site_check.phtml @@ -0,0 +1,12 @@ + diff --git a/StreamSend.php b/StreamSend.php new file mode 100755 index 0000000..e2da39c --- /dev/null +++ b/StreamSend.php @@ -0,0 +1,201 @@ + + * @copyright 2009 Gaslight Media + * @license Gaslight Media + * @version CVS: $Id: StreamSend.php,v 1.1 2010/03/17 19:31:19 matrix Exp $ + * @link <> + */ + +/** + * Default parameters for contact create operations. + * Note that these are strings for use in XML data not true/false values. + * If false, the person will be created with a status of pending + */ +define('STREAMSEND_DEFAULT_ACTIVATE', 'false'); +/** + * If activate is false, setting this to true will trigger the sending of the built-in + * activation notification; if activate is true, this setting has no effect + */ +define('STREAMSEND_DEFAULT_DELIVER_ACTIVATION', 'true'); +/** + * If activate is true, setting this to true will trigger the sending of the built-in + * welcome notification; if activate is false, this setting has no effect + */ +define('STREAMSEND_DEFAULT_DELIVER_WELCOME', 'false'); +/** + * URI for streamsend API + */ +define('STREAMSEND_BASE_URL', "https://app.streamsend.com"); + +/** + * Toolkit_Contacts_StreamSend + * + * Contact support class for inergration with StreamSend API + * + * @category Contacts + * @package Toolkit_Contacts + * @author Steve Sutton + * @copyright 2009 Gaslight Media + * @license Gaslight Media + * @link <> + */ +class Toolkit_Contacts_StreamSend +{ + // {{{ Class Properties + + + /** + * Description for public + * @var boolean + * @access public + */ + public $debug = false; + + /** + * streamSendFields + * + * array with key values matching the gaslight contact tabel to the + * StreamSend field (normal fields) + * + * @var array + * @access protected + */ + protected $streamSendFields = array( + 'email' => 'email-address', + 'fname' => 'first-name', + 'lname' => 'last-name', + 'address' => 'address1', + 'address2' => 'address2', + 'city' => 'city', + 'state' => 'stateprovince', + 'zip' => 'postal-code', + 'phone' => 'phone-number' + ); + + /** + * contactInqTypes + * + * array with key values matching the gaslight contact_inq tabel to the + * StreamSend field (Radio fields) + * key = id from contact_inq table + * value = name from contact_inq_table + * value is same name as the StreamSend fieldname + * + * @var array + * @access protected + */ + protected $contactInqTypes = array(); + + /** + * booleanTypes + * + * StreamSend fields (boolean fields) an array of field names for the + * boolean field types + * + * @var array + * @access protected + */ + protected $booleanTypes = array(); + // }}} + // {{{ __construct() + + + /** + * __construct( + * + * @return void + * @access public + */ + public function __construct() + { + } + + + // }}} + // {{{ addContact() + + + /** + * addContact + * + * Given $values from a Toolkit_Contacts Form add Contact + * + * @param array $values Parameter description (if any) ... + * + * @return boolean Return true if successfull + * @access public + */ + public function addContact($values) + { + // check the array $values to make sure it is correct + if (is_array($values) && !empty($values)) { + include_once GLM_APP_BASE.'StreamSend/class_streamsend_api.inc'; + // initialize the streamsend object + $ss = new streamSend (STREAMSEND_BASE_URL, STREAMSEND_LOGIN_ID, + STREAMSEND_KEY); + $ss->debug = $this->debug; + $contactData = array(); + $values[$type] = 1; + foreach ($this->streamSendFields as $glmName => $ssName) { + switch ($glmName) { + case "state": + $contactData[$ssName] = ($values[$glmName]) ? $GLOBALS['states'][$values[$glmName]]: ''; + break; + default: + $contactData[$ssName] = $values[$glmName]; + break; + } + } + foreach ($this->contactInqTypes as $contactInqId => $name) { + $slug = str_replace(" ", "-", strtolower($this->contactInqTypes[$contactInqId])); + if ($values['interest'][$contactInqId]) { + $contactData[$slug] = 'Yes'; + } else { + $contactData[$slug] = 'No'; + } + } + foreach ($this->booleanTypes as $name) { + if ($values[$name]) { + $contactData[$name] = 'Yes'; + } else { + $contactData[$name] = 'No'; + } + } + $contacts = $ss->contactCreate( + $contactData, + STREAMSEND_DEFAULT_ACTIVATE, + STREAMSEND_DEFAULT_DELIVER_ACTIVATION, + STREAMSEND_DEFAULT_DELIVER_WELCOME + ); + if (!$contacts) { + + // show errors if on development server + switch (GLM_HOST_ID) { + case "DEVELOPMENT": + echo "

A total and complete failure occured."; + break; + case "PRODUCTION": + break; + } + } + if ($ss->debug == true) { + echo '

Debug Results

'.$ss->debugBuffer.'

'; + } + return true; + } + return false; + } + + + // }}} +} +?> diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100755 index 0000000..38dcd05 --- /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 100755 index 0000000..246a6b5 --- /dev/null +++ b/admin/Contact/contact_setup.inc @@ -0,0 +1,331 @@ +$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_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 "
"; +} +function courseSelect($DB, $id) +{ + static $courses; + if (ctype_digit($id)) { + $sql = " + SELECT * + FROM contact_course + WHERE contact_id = {$id}"; + if ($cData = $DB->db_auto_get_data($sql)) { + foreach ($cData as $cRow) { + $contactData[$cRow['course_id']] = true; + } + } + } + if (!$courses) { + $sql = " + SELECT id,name + FROM courses + ORDER BY name"; + if ($data = $DB->db_auto_get_data($sql)) { + $num = count($data); + $cut = ceil($num / 2); + $out = " + + "; + $count = 1; + foreach ($data as $row) { + if ($count == 1) { + $out .= " + "; + +foreach($DB_fields as $key=>$value) { + if($value[type] == "text") { + ?> + + + + + + + + + + + + + + + + + + "; + if($row[$value[name]] != "") { + echo ""; + echo " + + + + + "; + } + echo ""; + echo ''; + echo ""; + } + elseif($value[type] == "file") { + ?> + + "; + if($row[$value[name]] != "") { + echo ""; + echo " + + + + + "; + } + echo ""; + echo ""; + echo ""; + } + if($value[type] == "desc") { + if($value[name] == "description") { + echo ""; + echo ""; + } + echo ""; + text_area("$value[name]",$row[$value[name]]); + echo ""; + } + if($value[type] == "state") { + echo ""; + } + elseif($value[type] == "hide") { + echo ""; + } + elseif( $value['type'] == 'drop' ) + { + echo ''; + echo ''; + echo ''; + } + elseif($value[type] == "radio") { + echo ""; + echo ""; + echo ""; + } +} + +if(isset($id)) { +?> + +
+ "; + } + $out .= ""{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 => "cellphone", title => "Cell 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 => "contactby",title => "Contact by",type => "text"); + + $DB_fields[] = array( name => "arrive1", title => "Arrive 1", type => "text"); + $DB_fields[] = array( name => "depart1", title => "Depart 1", type => "text"); + $DB_fields[] = array( name => "arrive2", title => "Arrive 2", type => "text"); + $DB_fields[] = array( name => "depart2", title => "Depart 2", type => "text"); + $DB_fields[] = array( name => "numberofgolfers",title => "Number of Golfers",type => "text"); + $DB_fields[] = array( name => "days_playing_golf",title => "Days Playing Golf",type => "text"); + $DB_fields[] = array( name => "property", title => "Property", type => "text"); + //$DB_fields[] = array( name => "golfcourse", title => "Golf Course", type => "text"); + $DB_fields[] = array( name => "golfcourse", title => "Golf Courses", type => "courses"); + $DB_fields[] = array( name => "teetime", title => "Tee Times", type => "text"); + + $DB_fields[] = array( name => "heardabout", title => "Heard About", type => "drop", "drop"=>array(''=>'-- Options --','Internet'=>'Internet','Magazine Ad'=>'Magazine Ad','Newspaper'=>'Newspaper','Radio'=>'Radio','Referral'=>'Referral','Other'=>'Other')); + $DB_fields[] = array( name => "mail_ok", title => "Mail Ok?", type => "radio"); + $DB_fields[] = array( name => "letstalkgolf", title => "Lets Talk Golf?", type => "radio"); + $DB_fields[] = array( name => "interest", title => "Interest", type => "interest"); + $DB_fields[] = array( name => "additionalinformation",title => "Additional Info", type => "desc"); + // $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']; + } + } + } +$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/csv.inc b/admin/Contact/csv.inc new file mode 100755 index 0000000..0fd20c7 --- /dev/null +++ b/admin/Contact/csv.inc @@ -0,0 +1,195 @@ +splitchar=="@") + $quotereplace="!!!!xCROMULENTx!!!!"; + else + $quotereplace="@@@@CROMULENT@@@@"; + $string = preg_replace("/\"\"/", $quotereplace, $string); + $chars = preg_split("//", $string); + + if($chars[(sizeof($chars)-1)] != "\n") + $chars[] = "\n"; + + $state=1; + for($count=0; $countsplitchar) // If it's the variable separator, tack this onto $record and start a new $cell. + { + $cell = preg_replace("/$quotereplace/", "\"", $cell); + $record[] = $cell; + unset($cell); + } + elseif($char=="\n") // If it's a linefeed, tack this onto $record, tack $record onto $table, and start again + { + $cell = preg_replace("/$quotereplace/", "\"", $cell); + if(!$this->lines_end_with_splitchar) + $record[] = $cell; + elseif($cell != '') + $record[] = $cell; + unset($cell); + $table[] = $record; + unset($record); + } + else // Otherwise, just add this onto $cell + $cell .= $char; + break; + case 2: // State when we're in-between quotation marks + if($char=='"') // If it's a quotation mark, save this value and switch to state 1 + $state=1; + else // Otherwise, add this onto $cell + $cell .= $char; + break; + } + } + + if(!$this->read_topline) + array_splice($table, 0, 1); + + $lastindex = sizeof($table)-1; + if(sizeof($table[$lastindex])parse_string($data); + } + + function set_splitchar($char) + { + $this->splitchar=$char; + } + + function set_read_topline($bool) + { + $this->read_topline=$bool; + } + + function set_lines_end_with_splitchar($bool) + { + $this->lines_end_with_splitchar=$bool; + } + + // Okay, everything below this line is insane alpha code. If you have any troubles with + // this class, don't hesitate to wipe it out. + + // Easy enough. You take the name of a column in a target table, and + // its corresponding index number (starting with zero :) in the text file. + function define_column($colname, $fieldno, $check_this=null) + { + $this->columns[$fieldno] = $colname; + if(isset($check_this)) $this->check_columns[]=$colname; + } + + function check_columns() + { + $cols = func_get_args(); + foreach($cols as $col) + $this->check_columns[] = $col; + } + + function insert_into_table($data, $tablename, $conn) + { + $table = $conn->get_table_metadata($tablename); + + foreach($data as $row) + { + // First - build an associative array of columns matched to values. + foreach($this->columns as $num=>$colname) + { + $value = $row[$num]; + settype($value, $table[$colname]); + if( !$value && $colname == 'email' ){ + $value="NULL"; + } + elseif(is_string($value)){ + $value="'".$value."'"; + } + + $rowdata[$colname] = $value; + } + + // Next - if necessary, check to ensure the data isn't already + // in the database. + $date = date("m-d-Y"); + if(isset($this->check_columns)) + { + $sqlstring = "SELECT id FROM $tablename WHERE "; + if($rowdata['email'] != "NULL"){ + $sqlstring .= "email = {$rowdata['email']} OR ("; + } + $commachar = ""; + foreach($this->check_columns as $check_colname) + { + $sqlstring .= $commachar.$check_colname.'='.$rowdata[$check_colname]; + $commachar = " AND "; + } + if($rowdata['email'] != "NULL"){ + $sqlstring .= ")"; + } + // echo '

'.$sqlstring.'

'; + + $rs = new ResultSet($sqlstring, $conn); + if($rs->numrows() > 0) + { + $duplicates[] = $rowdata; + $myData = $rs->next(); + // update the duplicate records with new create_date + $query = "UPDATE $tablename set create_date = '$date' WHERE id = ".$myData['id']; + new Query($query, $conn); + + continue; + } + } + // echo '
';
+		//	print_r($rowdata);
+		//	echo '
'; + // exit; + // Assuming the continue statement didn't kick us out into another + // row, it's okay now to add the record into the database. + // + // Hey, quick thought - why does ALL program documentation take place + // in the plural second person? "WE" should think about that. + $sqlstring1 = "INSERT INTO $tablename(create_date,"; + $sqlstring2 = ") VALUES ('$date',"; + $commachar = ""; + + foreach($rowdata as $key=>$val) + { + $sqlstring1 .= $commachar.$key; + $sqlstring2 .= $commachar.$val; + $commachar = ", "; + } + $sqlstring = $sqlstring1.$sqlstring2.")"; + new Query($sqlstring, $conn); + } + return $duplicates; + } + + function insert_file_into_table($filename, $tablename, $conn) + { + $data = $this->read_file($filename); + return $this->insert_into_table($data, $tablename, $conn); + } +} diff --git a/admin/Contact/del_query.phtml b/admin/Contact/del_query.phtml new file mode 100755 index 0000000..9d7dfb8 --- /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..614dacb --- /dev/null +++ b/admin/Contact/download.phtml @@ -0,0 +1,129 @@ +".$query_string; + } + if (pg_numrows($res)>0) { + for($i=0;$i'.print_r($cData, true). ''; + //exit; + $result_string = substr($result_string,0,strlen($result_string)-1); + if ($csv) { + $result_string = str_replace("|","\",\"",$result_string); + $result_string = "\"".$result_string."\"\n"; + //echo $result_string; + } else { + $result_string = str_replace("|",$delimiter,$result_string); + $result_string = $result_string."\n"; + } + fputs($fp,$result_string,strlen($result_string)); + } + } + pg_exec($dbd, "COMMIT WORK;"); + if (!fclose($fp)) { + html_error("Cant close filepointer",0); + } + chmod("report.csv",0660); + $output = "report.csv"; + + if ($file == "gz") { + $output = "report.tar.gz"; + exec("tar -czvf report.tar.gz report.csv 2>&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..defed6c --- /dev/null +++ b/admin/Contact/edit_autoresponse.phtml @@ -0,0 +1,151 @@ + + + + +
+ +$value) { + switch($key) { + + case "id": + echo ""; + break; + + case "subject": + echo ""; + text_box("subject",$value); + echo ""; + break; + + case "response": + echo ""; + require_once BASE.'fckeditor/fckeditor.php'; + $oFCKeditor = new FCKeditor($key); + $oFCKeditor->BasePath = BASE_URL.'fckeditor/'; + $oFCKeditor->Width = '570'; + $oFCKeditor->Height = '400'; + $oFCKeditor->Value = $value; + echo ''; + 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 ' +
Subject:
Response:'; + $oFCKeditor->Create(); + echo '
 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 Category button +
+ +
+
+ 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..4aa62f7 --- /dev/null +++ b/admin/Contact/edit_contact.phtml @@ -0,0 +1,186 @@ +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 + +
+'; +echo "

Current Image:
Delete this image: Yes + No
New $value[title]:
Current File:".$row[$value[name]]." +
Delete this File: + Yes + No +
New $value[title]:

Description and Images
$value[title]:
$value[title]:"; + echo build_picklist("$value[name]",$states_US,$row[$value[name]]); + //text_area("$value[name]",$row[$value[name]]); + echo "
'.$value[title].''; + $date_entry = build_picklist($value['name'],$value['drop'],$row[$value['name']]); + echo $date_entry.'
$value[title]:Yes"; + echo "No
+ + + + +
"; + +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 100755 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('