From 3b2faf5c2c69dd380683215e718bcdbee3792421 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 1 Dec 2016 15:13:10 -0500 Subject: [PATCH] Updating Toolbox and contact admin For php version on ws6 --- admin/Contact/contact_setup.inc | 24 ++--- admin/Contact/query_contact.phtml | 3 +- admin/Contact/update_contact.phtml | 104 +++++++++--------- admin/Toolbox/edit_bus.phtml | 85 +++++++-------- admin/Toolbox/list_bus_category.phtml | 21 ++-- admin/Toolbox/update_bus.phtml | 14 +-- admin/Toolbox/update_bus_category.phtml | 134 ++++++++++++------------ 7 files changed, 197 insertions(+), 188 deletions(-) diff --git a/admin/Contact/contact_setup.inc b/admin/Contact/contact_setup.inc index 6a059fb..056242d 100755 --- a/admin/Contact/contact_setup.inc +++ b/admin/Contact/contact_setup.inc @@ -1,4 +1,4 @@ - "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 ""; + $count++; + } echo "
"; + echo ""; echo "$value
"; + echo " checked"; + echo ">$value
"; if($count==5) - echo "
"; + 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 +/* 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}") diff --git a/admin/Contact/query_contact.phtml b/admin/Contact/query_contact.phtml index 19e7982..6816f0a 100755 --- a/admin/Contact/query_contact.phtml +++ b/admin/Contact/query_contact.phtml @@ -4,8 +4,9 @@ include("contact_setup.inc"); session_start(); //$Id: query_contact.phtml,v 1.1.1.1 2006/07/13 13:53:50 matrix Exp $ /* Includes */ -session_register("sess_vars"); +//session_register("sess_vars"); $sess_vars = $HTTP_POST_VARS; +$_SESSION['sess_vars'] = $sess_vars; if(!isset($query_no)) { /* The fields array is sent as a string split it out using : as delimiter */ diff --git a/admin/Contact/update_contact.phtml b/admin/Contact/update_contact.phtml index 3623172..4a6b54b 100755 --- a/admin/Contact/update_contact.phtml +++ b/admin/Contact/update_contact.phtml @@ -8,21 +8,21 @@ if(is_array($interest)){ $interest = ""; for($i=0;$i<12;$i++) { - $temp = "interest_".$i; + $temp = "interest_".$i; if($$temp) - $interest .= $$temp.":"; + $interest .= $$temp.":"; } $interest = substr($interest,0,strlen($interest)-1); } http_strip($url); $LAST = count($DB_fields)-1; -if($REQUEST_METHOD == "POST" || $Command == "Delete") +if($_POST || $Command == "Delete") { - switch($Command) + switch($Command) { case "Update": - for($i=0;$i "", @@ -60,7 +60,7 @@ $qs = "SELECT id,category FROM bus_category ORDER BY parent,pos"; -if(!$altcats = db_exec($dbd,$qs)) +if(!$altcats = db_exec($dbd,$qs)) { html_error(DB_ERROR_MSG.$qs,0); } @@ -70,7 +70,7 @@ if(!$altcats = db_exec($dbd,$qs)) function mySubmit() { var check = 0; - for( i = 0; i < ;i++ ) + for( i = 0; i < ;i++ ) { if( document.myform.catid.options[i].selected ) { @@ -89,22 +89,23 @@ if(!$altcats = db_exec($dbd,$qs)) if(MULTIPLE_CAT) { ?> - +
- + "; echo "Pages:"; - if(isset($id) && $id != "") + if(isset($id) && $id != "") { + $oldalt = array(); $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 @@ -112,58 +113,58 @@ else AND b.id = bcb.busid ORDER BY bc.category"; - if(!$altres = db_exec($dbd,$qs)) + if(!$altres = db_exec($dbd,$qs)) { html_error(DB_ERROR_MSG.$qs,0); } - for($rel=0;$rel Page: - - + - +
"; -foreach($fields as $key=>$value) +foreach($fields as $key=>$value) { - if($value[type] == "text") + if($value[type] == "text") { ?> - Keyword:"; - text_box("keyword",htmlspecialchars($row[$value[name]])); + echo "Keyword:"; + text_box("keyword",htmlspecialchars($row[$value[name]])); echo ""; } elseif($value['type'] == "seperator") @@ -171,13 +172,13 @@ foreach($fields as $key=>$value) echo '
'; echo ''.$value["name"].''; } - elseif($value[type] == "img") + elseif($value[type] == "img") { echo ' '; echo ""; - if($row[$value[name]] != "") + if($row[$value[name]] != "") { echo "Current Image:"; echo " @@ -195,13 +196,13 @@ foreach($fields as $key=>$value) echo ""; echo ""; } - elseif($value[type] == "file") + elseif($value[type] == "file") { echo ' '; echo ""; - if($row[$value[name]] != "") + if($row[$value[name]] != "") { echo "Current File:"; echo "".$row[$value[name]]." @@ -219,17 +220,17 @@ foreach($fields as $key=>$value) echo ""; echo ""; } - if($value[type] == "desc") + if($value[type] == "desc") { echo "$value[title]:"; text_area("$value[name]",htmlspecialchars($row[$value[name]])); echo ""; } - elseif($value[type] == "hide") + elseif($value[type] == "hide") { echo ""; } - elseif($value[type] == "bool") + elseif($value[type] == "bool") { echo "$value[title]:"; echo "$value) } htmlcode(570,400); echo ''; -if(isset($id)) +if(isset($id)) { ?> @@ -251,13 +252,13 @@ if(isset($id))