From 52b65ab0489d3e4ac12ba22645a2bb35e27debe6 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 18 Feb 2015 08:43:22 -0500 Subject: [PATCH] old events --- admin/Events/down.gif | Bin 210 -> 0 bytes admin/Events/editEvent.php | 44 ---- admin/Events/editTopics.php | 23 --- admin/Events/event.css | 142 ------------- admin/Events/event.js | 11 - admin/Events/event_setup.inc | 176 ---------------- admin/Events/events.sql | 55 ----- admin/Events/importEvents.php | 142 ------------- admin/Events/index.phtml | 1 - admin/Events/left.gif | Bin 210 -> 0 bytes admin/Events/list_events.phtml | 326 ------------------------------ admin/Events/setupEventsRecur.php | 175 ---------------- admin/Events/topic_action.php | 38 ---- admin/Events/up.gif | Bin 210 -> 0 bytes 14 files changed, 1133 deletions(-) delete mode 100755 admin/Events/down.gif delete mode 100644 admin/Events/editEvent.php delete mode 100644 admin/Events/editTopics.php delete mode 100644 admin/Events/event.css delete mode 100644 admin/Events/event.js delete mode 100755 admin/Events/event_setup.inc delete mode 100644 admin/Events/events.sql delete mode 100755 admin/Events/importEvents.php delete mode 100755 admin/Events/index.phtml delete mode 100755 admin/Events/left.gif delete mode 100755 admin/Events/list_events.phtml delete mode 100644 admin/Events/setupEventsRecur.php delete mode 100644 admin/Events/topic_action.php delete mode 100755 admin/Events/up.gif diff --git a/admin/Events/down.gif b/admin/Events/down.gif deleted file mode 100755 index ea554f47f5bb9f010580fe8210ff03be35b35045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmZ?wbhEHb+735W75*KOKv{A@%Z(_x1Zj8`0^fX06s$TCkrDZgD8UzND;_R23G%s(9o-j zA)z4P=mDnOk8p&BHim}U1_pz~n^jDE0zyN-`UGDV2xSd(Gx7D^%o6%F;K~&f-att~ V*FfLP8jKkheVconfigureForm($dbh); -$formOut = $form->toHtml($dbh); -echo GLM_TOOLBOX::top('Edit Event', ''); -echo event_nav($lnav); -echo $formOut; -echo GLM_TOOLBOX::footer(); diff --git a/admin/Events/editTopics.php b/admin/Events/editTopics.php deleted file mode 100644 index 0da08d3..0000000 --- a/admin/Events/editTopics.php +++ /dev/null @@ -1,23 +0,0 @@ -parseConfig( - BASE . 'Toolkit/Toolbox/config.ini', - 'IniFile' -); - -$form = new Toolkit_Events_Forms_Admin_EditTopics( - $dbh, - 'edit_event', - 'post', - MEDIA_BASE_URL . "admin/Events/editTopics.php" -); - -$formOut = $form->toHtml($dbh); -echo GLM_TOOLBOX::top('Edit Categories', ''); -echo event_nav($lnav); -echo $formOut; -echo GLM_TOOLBOX::footer(); diff --git a/admin/Events/event.css b/admin/Events/event.css deleted file mode 100644 index 151bb3d..0000000 --- a/admin/Events/event.css +++ /dev/null @@ -1,142 +0,0 @@ -/* temp*/ -body {padding-left: 50px;} -.clearer { - height:1px; - overflow:hidden; - margin-top:-1px; - clear:left; -} -h1 {font-family: arial, helvetica, sans-serif; font-size: 18px; color: #777;} -/* end temp */ - -/* MAIN PAGE PROPERTIES */ -#topic-list, -#event-list, -#event-edit {font-family: arial, helvetica, sans-serif; padding: 20px;font-size: 12px; } -#topic-list {width: 400px;} -/*The Row*/ -.topic-row {clear: left;margin: 3px 0; padding: 3px; background-color: #eee; border: 1px solid #ddd; font-size: 12px;} -.topic-row table {width: 100%;} - -/*The Color Picker Square*/ -.colorsquare {height: 18px; width: 18px; border: 1px solid #333; cursor: pointer;} -/*Name, Edit, Delete*/ -.topic-name { margin: 3px 0 0 6px; font-size: 12px;} -.topic-name input {width: 200px; } -.topic-save { margin-left: 5px;} -.topic-delete { margin-left: 5px;} -/*Palette ID\'s*/ -/* The Color Palette*/ -.colorbox {top: -21px; left:-100px; clear: left;} -.colorbox table {width: auto;} -.colorbox table{ - border: 1px solid #333; - border-collapse: collapse; -} -.colorbox table td { - border: 1px solid #333; - border-collapse: collapse; - height: 19px; - width: 19px; - cursor: pointer; - padding: 0; -} -.color1 {background-color: #FFCCCC;} -.color2 {background-color: #CC9999;} -.color3 {background-color: #FF9999;} -.color4 {background-color: #FFCCFF;} -.color5 {background-color: #CC99CC;} - -.color6 {background-color: #FF99FF;} -.color7 {background-color: #CCCCFF;} -.color8 {background-color: #9999CC;} -.color9 {background-color: #9999FF;} -.color10 {background-color: #CCFFFF;} - -.color11 {background-color: #99CCCC;} -.color12 {background-color: #99FFFF;} -.color13 {background-color: #CCFFCC;} -.color14 {background-color: #99CC99;} -.color15 {background-color: #99FF99;} - -.color16 {background-color: #FFFFCC;} -.color17 {background-color: #CCCC99;} -.color18 {background-color: #FFFF99;} -.color19 {background-color: #FFCC99;} -.color20 {background-color: #FF99CC;} - -.color21 {background-color: #CC99FF;} -.color22 {background-color: #99CCFF;} -.color23 {background-color: #99FFCC;} -.color24 {background-color: #CCFF99;} -.color25 {background-color: #CCCCCC;} - -/* events admin */ -ul.event_nav -{ -margin: 0; -padding: 0 0 20px 0px; -border-bottom: 1px solid #000; -font-family: arial, helvetica, sans-serif; -margin-bottom: 20px; -font-size: 12px;} - -ul.event_nav, ul.event_nav li -{ -margin: 0; -padding: 0; -display: inline; -list-style-type: none; -} - -ul.event_nav a:link, ul.event_nav a:visited { -float: left; -line-height: 12px; -font-weight: bold; -margin: 0 10px 4px 10px; -text-decoration: none; -color: #999; -border-bottom: 2px solid #999;} - -ul.event_nav a:hover { border-bottom: 2px solid #000; color: #000; } - -/* event-list-table */ -#event-list-table { - clear:left; - font-family: arial, helvetica, sans-serif; - border: 2px solid #ccc; - border-collapse: collapse; - font-size: 12px; - } -#event-list-table td { - border: 2px solid #ccc; - border-collapse: collapse; - background: #eee; - padding: 4px;} -#event-list-table img {border: 0; text-align: center; margin: 0 auto; display: block;} -#event-list-table a:link {color: #666;} -#event-list-table a:visited {color: #666;} -#event-list-table a:active {color: #666;} -#event-list-table a:hover {color: #000;} - -/*event-edit-table */ -#event-edit-table { - clear:left; - font-family: arial, helvetica, sans-serif; - border: 2px solid #ccc; - border-collapse: collapse; - font-size: 12px; - } -#event-edit-table td { - border: 2px solid #ccc; - border-collapse: collapse; - background: #eee; padding: 4px;} -#event-edit-table table td {border:none;margin:0;padding:0;} -#event-edit-table td select, -#event-edit-table td option, -#event-edit-table td input {font-size: 8pt;} - -#event-list-table td select, -#event-list-table td option, -#event-list-table td input {font-size:8pt;} - diff --git a/admin/Events/event.js b/admin/Events/event.js deleted file mode 100644 index 545bdb4..0000000 --- a/admin/Events/event.js +++ /dev/null @@ -1,11 +0,0 @@ -function grabcolor( letter, newcolor ) -{ - document.getElementById('square'+letter).style.backgroundColor= newcolor; - document.getElementById('colorbox-'+letter).style.display = 'none'; - document.getElementById('topiccolor'+letter).value = newcolor; -} -function myDelete( myForm ) -{ - myForm.Action.value = 'Delete Topic'; - myForm.submit(); -} diff --git a/admin/Events/event_setup.inc b/admin/Events/event_setup.inc deleted file mode 100755 index f67ab48..0000000 --- a/admin/Events/event_setup.inc +++ /dev/null @@ -1,176 +0,0 @@ - 1 will require the input of the field - * and req => 0 will not. - */ -$topinfo["idfield"] = "id"; -$topinfo["field"] = "descr"; -$topinfo["table"] = "topic"; -$topinfo["sfield"] = "descr"; - -$fields[] = array('name' => "id", 'title' => "id", 'type' => "hide"); -$fields[] = array('name' => "topicid", 'title' => "Topic", 'type' => "topic", 'info'=>$topinfo,'req' => 0); -$fields[] = array('name' => "visable", 'title' => "Visible", 'type' => "radio", 'req' => 0); -$fields[] = array('name' => "bdate", 'title' => "Begin Date", 'type' => "date", 'req' => 1); -$fields[] = array('name' => "edate", 'title' => "End Date", 'type' => "date", 'req' => 1); -$fields[] = array('name' => "", 'title' => "All Day Event", 'type' => "alldayevent"); -$fields[] = array('name' => "btime", 'title' => "Begin Time", 'type' => "time", 'req' => 0); -$fields[] = array('name' => "etime", 'title' => "End Time", 'type' => "time", 'req' => 0); -$fields[] = array('name' => "reacur", 'title' => "Recurring event", 'type' => "reacur"); -$fields[] = array('name' => "", 'title' => "Recurring Event", 'type' => "recurevent"); -$fields[] = array('name' => "loc", 'title' => "Location", 'type' => "text", 'req' => 0); -$fields[] = array('name' => "header", 'title' => "Header", 'type' => "text", 'req' => 1); -$fields[] = array('name' => "descr", 'title' => "Description", 'type' => "desc", 'req' => 0); -$fields[] = array('name' => "img", 'title' => "Image 1", 'type' => "img", 'req' => 0); -$fields[] = array('name' => "url", 'title' => "Url", 'type' => "text", 'req' => 0); -$fields[] = array('name' => "email", 'title' => "Email", 'type' => "text", 'req' => 0); -$fields[] = array('name' => "contact", 'title' => "Contact", 'type' => "text", 'req' => 0); -$fields[] = array('name' => "phone", 'title' => "Phone", 'type' => "text", 'req' => 0); -$fields[] = array('name' => "file", 'title' => "File", 'type' => "file", 'req' => 0); -$fields[] = array('name' => "filename",'title' => "File Name", 'type' => "text", 'req' => 0); -// navigation array -$lnav = array( - "Edit Categories" => "editTopics.php", - "Create New Event" => "editEvent.php", - "List Events" => "list_events.phtml" -); -// set the cache option from $GLOBALS -$cacheOptions = $GLOBALS['cacheOptions']; -// redo the cachDir -$cacheOptions['cacheDir'] = BASE . 'cache/'; -// create a new instance of Cache_Lite -$cache = new Cache_Lite($cacheOptions); -// Functions for the Events Admin -/** - * Function add_topic - * - * Add a new topic to database checking first if it is already in topic table. - * - * @param string $topicname - * @return int $id of topic new or old with that name. - */ -function add_topic($topicname) -{ - $dbh = Toolkit_Database::getInstance(); - $query = " - SELECT id - FROM topic - WHERE descr = '$topicname'"; - $dres = $dbh->query($query); - if ($dres->columnCount == 0) { - $query = " - INSERT INTO topic - (descr) - VALUES - (:topicname) - RETURNING id"; - $stmt = $dbh->prepare($query); - $stmt->bindParam(":topicname", $topicname, PDO::PARAM_STR); - $stmt->execuce(); - return $stmt->fetchColumn(); - } else { - return $dres->fetchColumn(); - } -} -/** - * return html for navigation - * - * @param string $nav HTML of the event navigation - * - * @return string - */ -function event_nav($nav) -{ - if (is_array($nav)) { - $out = '
    '; - foreach ($nav as $link => $url) { - $out .= '
  • '.$link.'
  • '; - } - $out .= '
'; - } - return $out; -} -/** - * return the input string of a date format to remove the year part - * - * @param string $date date string in MM/DD/YY format - * - * @return string - */ -function strip_year_part($date) -{ - $pattern = "/([0-9]*)[\/-]([0-9]*)[\/-]([0-9]*)/"; - if (preg_match($pattern, $date, $temp)) { - $out = $temp[1].'/'.$temp[2].'/'.substr($temp[3],2,2); - } - return $out; -} -/** - * event_top - * - * @return string html heaoder for the event admin page. - */ -function event_top() -{ - $out = ' - - - -Untitled - - - - - - - - - -'; - return $out; -} -/** - * return html for the footer of the event page - * - * @return string - */ -function event_footer() -{ - $out = ' - - - '; - return $out; -} diff --git a/admin/Events/events.sql b/admin/Events/events.sql deleted file mode 100644 index 599dd49..0000000 --- a/admin/Events/events.sql +++ /dev/null @@ -1,55 +0,0 @@ -CREATE TABLE "event" ( -"id" SERIAL, -"topicid" int4 DEFAULT 0, -"bdate" date, -"edate" date, -"loc" text, -"header" text, -"descr" text, -"img" text, -"url" text, -"contact" text, -"phone" text, -"email" text, -"btime" text, -"etime" text, -"visable" bool DEFAULT 'f', -"home" bool DEFAULT 'f', -"ds" timestamp, -"daysow" int, -"dayom" int, -"reacur" bool DEFAULT 'f', -"weekom" text, -"all_day" bool DEFAULT 'f', -"file" text, -"filename" text, -"member_id" int4); - -REVOKE ALL on "event" from PUBLIC; - -GRANT ALL on "event" to "nobody"; - -CREATE TABLE "topic" ( -"id" SERIAL, -"descr" text, -"topiccolor" text); - -REVOKE ALL on "topic" from PUBLIC; - -GRANT ALL on "topic" to "nobody"; -GRANT ALL on "topic_id_seq" to "nobody"; -GRANT ALL on "event_id_seq" to "nobody"; - -CREATE UNIQUE INDEX event_id_indx on event(id); -CREATE INDEX event_bdate_indx on event(bdate); -CREATE INDEX event_edate_indx on event(edate); - -CREATE TABLE event_recur -(id SERIAL, - event_id INTEGER - REFERENCES event(id) - ON DELETE CASCADE, - event_day DATE); - -GRANT ALL ON event_recur TO nobody; -GRANT ALL ON event_recur_id_seq TO nobody; diff --git a/admin/Events/importEvents.php b/admin/Events/importEvents.php deleted file mode 100755 index fa45fd1..0000000 --- a/admin/Events/importEvents.php +++ /dev/null @@ -1,142 +0,0 @@ -db1h = Toolkit_Database::getInstance(); - // db2h is ds1 database that we're pulling data from (export) - try { - $dsn = 'pgsql:host=ds1.gaslightmedia.com dbname=stignace user=nobody'; - $driverOptions = array( - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - ); - $this->db2h = new PDO($dsn, null, null, $driverOptions); - $this->db2h->setAttribute( - PDO::ATTR_ERRMODE, - PDO::ERRMODE_EXCEPTION - ); - } catch (PDOException $e) { - Toolkit_Common::handleError($e); - } - $this->getLiveData(); - $this->importData(); - echo '
'.print_r($this->topicData, true).'
'; - echo '
'.print_r($this->eventData[0], true).'
'; - }// }}} - function convertEncoding(&$var)// {{{ - { - return iconv('windows-1251', 'utf-8', $var); - }// }}} - function getLiveData()// {{{ - { - // getting the topics - try { - $sql = " - SELECT * - FROM topic - ORDER BY id"; - $intData = $this->db2h->query($sql)->fetchAll(); - if ($intData) { - $this->topicData =& $intData; - } - } catch (PDOException $e) { - Toolkit_Common::handleError($e); - } - // getting the events - try { - $sql = " - SELECT * - FROM event - WHERE edate >= current_date - ORDER BY id"; - $cData = $this->db2h->query($sql)->fetchAll(); - if ($cData) { - $this->eventData =& $cData; - } - } catch (PDOException $e) { - Toolkit_Common::handleError($e); - } - }// }}} - function importData()// {{{ - { - // start up transaction - $this->db1h->beginTransaction(); - // build prepare statement for insert of interest types - $sql = " - INSERT INTO topic - (id,descr) - VALUES - (:id,:descr)"; - $topicInsert = $this->db1h->prepare($sql); - if (is_array($this->topicData)) { - foreach ($this->topicData as $iRow) { - try { - $topicInsert->bindParam(":id", $iRow['id'], PDO::PARAM_INT); - $topicInsert->bindParam(":descr", $iRow['descr'], PDO::PARAM_STR); - $topicInsert->execute(); - } catch (PDOException $e) { - Toolkit_Common::handleError($e); - } - } - } - // build prepare statement for insert of event - $sql = " - INSERT INTO event - (id,topicid,bdate,edate,loc,header,descr,img,url,contact,phone,email, - btime,etime,visable,home,ds,daysow,dayom,reacur,weekom) - VALUES - (:id,:topicid,:bdate,:edate,:loc,:header,:descr,:img,:url,:contact,:phone,:email, - :btime,:etime,:visable,:home,:ds,:daysow,:dayom,:reacur,:weekom)"; - $eventInsert = $this->db1h->prepare($sql); - if (is_array($this->eventData)) { - foreach ($this->eventData as $cKey => &$cRow) { - try { - $eventInsert->bindParam(":id", $cRow['id'], PDO::PARAM_INT); - $eventInsert->bindParam(":topicid", $cRow['topicid'], PDO::PARAM_INT); - $eventInsert->bindParam(":bdate", $cRow['bdate'], PDO::PARAM_STR); - $eventInsert->bindParam(":edate", $cRow['edate'], PDO::PARAM_STR); - $eventInsert->bindParam(":loc", $this->convertEncoding($cRow['loc']), PDO::PARAM_STR); - $eventInsert->bindParam(":header", $this->convertEncoding($cRow['header']), PDO::PARAM_STR); - $eventInsert->bindParam(":descr", $this->convertEncoding($cRow['descr']), PDO::PARAM_STR); - $eventInsert->bindParam(":img", $this->convertEncoding($cRow['img']), PDO::PARAM_STR); - $eventInsert->bindParam(":url", $this->convertEncoding($cRow['url']), PDO::PARAM_STR); - $eventInsert->bindParam(":contact", $this->convertEncoding($cRow['contact']), PDO::PARAM_STR); - $eventInsert->bindParam(":phone", $this->convertEncoding($cRow['phone']), PDO::PARAM_STR); - $eventInsert->bindParam(":email", $this->convertEncoding($cRow['email']), PDO::PARAM_STR); - $eventInsert->bindParam(":btime", $this->convertEncoding($cRow['btime']), PDO::PARAM_STR); - $eventInsert->bindParam(":etime", $this->convertEncoding($cRow['etime']), PDO::PARAM_STR); - $visable = ($cRow['visable']) ? 1: 0; - $eventInsert->bindParam(":visable", $visable, PDO::PARAM_BOOL); - $home = ($cRow['home']) ? 1: 0; - $eventInsert->bindParam(":home", $home, PDO::PARAM_BOOL); - $eventInsert->bindParam(":ds", $cRow['ds'], PDO::PARAM_STR); - $eventInsert->bindParam(":daysow", $cRow['daysow'], PDO::PARAM_INT); - $eventInsert->bindParam(":dayom", $cRow['dayom'], PDO::PARAM_INT); - $reacur = ($cRow['reacur']) ? 1: 0; - $eventInsert->bindParam(":reacur", $reacur, PDO::PARAM_BOOL); - $eventInsert->bindParam(":weekom", $this->convertEncoding($cRow['weekom']), PDO::PARAM_STR); - - $eventInsert->execute(); - //echo '

Importing to event ...

'; - } catch (PDOException $e) { - echo '
';
-                    var_dump($cRow['zip']);
-                    var_dump($this->convertEncoding(&$cRow['zip']));
-                    echo '
'; - echo '
'.print_r($cRow, true).'
'; - Toolkit_Common::handleError($e); - } - } - } - // end transaction - //$this->db1h->rollBack(); - echo 'done'; - $this->db1h->commit(); - }// }}} -} -$importer = new importEvents(); -?> diff --git a/admin/Events/index.phtml b/admin/Events/index.phtml deleted file mode 100755 index 924215d..0000000 --- a/admin/Events/index.phtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/admin/Events/left.gif b/admin/Events/left.gif deleted file mode 100755 index 29d0ba1a7396a9c7a3b1d225507dfce73c691474..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmZ?wbhEHb+735W75*KOKv{A@%Z(_x1Zj8`0^fX06s$TCkrDZgD8UzND;_R23G%sP%uyk z0Z|Sb?xCSm9dvvrH-xH+_*^#eRZ;+vmsQwBTrZjUUSSTq`qAUEOQ2t9=+zG{B2PiO RrhatcivSyvDxt_=4FJ1eK1~1s diff --git a/admin/Events/list_events.phtml b/admin/Events/list_events.phtml deleted file mode 100755 index 7b735ac..0000000 --- a/admin/Events/list_events.phtml +++ /dev/null @@ -1,326 +0,0 @@ -prepare($sql); - $del->bindParam(':id', $_REQUEST['id'], PDO::PARAM_INT); - $del->execute(); - } catch(PDOException $e) { - die($e->getMessage($e)); - } -} -?> - - -
-

Manage Events (list)

-prepare($qs); - $stmt->bindParam(":home", $nh, PDO::PARAM_BOOL); - $stmt->bindParam(":id", $id, PDO::PARAM_INT); - $stmt->execute(); - $cache->clean('HomeEvents'); -} - -if (isset($_REQUEST['visable'])) { - $nv = ($_REQUEST['visable']) ? 0: 1; - - $qs = " - UPDATE event - SET visable = :visable - WHERE id = :id"; - $stmt = $dbh->prepare($qs); - $stmt->bindParam(":visable", $nv, PDO::PARAM_BOOL); - $stmt->bindParam(":id", $id, PDO::PARAM_INT); - $stmt->execute(); - $cache->clean('HomeEvents'); -} -function sortByField(&$params, $var) -{ - if ($GLOBALS[$var["field"]]) { - $params[] = $var["field"]."=".$GLOBALS[$var["field"]]; - if ($GLOBALS[$var["field"]] == "D") { - $GLOBALS["order_by"] = $var["fname"]." ASC"; - $GLOBALS[$var["field"]] = "A"; - $GLOBALS[$var["image"]] = "down"; - } else { - $GLOBALS["order_by"] = $var["fname"]." DESC"; - $GLOBALS[$var["field"]] = "D"; - $GLOBALS[$var["image"]] = "up"; - } - } else { - $GLOBALS[$var["field"]] = "A"; - } -} -function addUpdateParams($sort, $params) -{ - parse_str($params, $parsedParams); - if ($_GET[$sort['field']]) { - $pattern = "/&".$sort['field']."=([A-Z]{1,2})/"; - return preg_replace($pattern, '', $params); - } else { - $add = '&V=&HM=&T=&B=&E=&D=&C=&H='; - $pattern = "/&".$sort['field']."=/"; - $add = preg_replace($pattern, '', $add); - return $params . $add; - } -} -// params to passthrough the urls -$urlParamArray = array(); -// sorting fields -$sortField[] = array("field"=>"V", "image"=>"V_img", "fname"=>"event.visable"); -$sortField[] = array("field"=>"HM", "image"=>"HM_img", "fname"=>"event.home"); -$sortField[] = array("field"=>"H", "image"=>"H_img", "fname"=>"event.header"); -$sortField[] = array("field"=>"T", "image"=>"T_img", "fname"=>"event.btime"); -$sortField[] = array("field"=>"B", "image"=>"B_img", "fname"=>"event.bdate"); -$sortField[] = array("field"=>"E", "image"=>"E_img", "fname"=>"event.edate"); -$sortField[] = array("field"=>"D", "image"=>"D_img", "fname"=>"event.daysow"); -$sortField[] = array("field"=>"C", "image"=>"C_img", "fname"=>"topic.descr"); -if (is_array($sortField)) { - foreach ($sortField as $var) { - sortByField($urlParamArray, $var); - } -} - -if (!$order_by) { - $order_by = "event.bdate ASC,event.btime ASC"; -} -$order = " ORDER BY $order_by"; - -$select_part = "event.id,event.bdate,event.edate,event.header,topic.descr as topic, - event.visable,event.home,event.btime,event.etime,event.daysow,event.all_day"; -$from_part = "event LEFT OUTER JOIN topic ON (topic.id = event.topicid)"; -$where_part = ''; -$Where = 'where'; -$queryInput = filter_input(INPUT_GET, 'Query', FILTER_SANITIZE_STRING); -if ($queryInput) { - $where_part = " $Where header ilike '%$Query%'"; - $Where = 'and'; - $urlParamArray[] = 'Query='.urlencode($Query); -} -// check to see if the dates are different -if ($_REQUEST['date_search_from'] && $_REQUEST['date_search_to']) { - $date_search_to = $_REQUEST['date_search_to']; - list($to_month, $to_day, $to_year) = explode("/", $date_search_to); - $date_search_from = $_REQUEST['date_search_from']; - list($from_month, $from_day, $from_year) = explode("/", $date_search_from); -} else if ($_GET['to_month'] && $_GET['from_month']) { - $date_search_to_time = mktime(0, 0, 1, $_GET['to_month'], $_GET['to_day'], $_GET['to_year']); - $date_search_from_time = mktime(0, 0, 1, $_GET['from_month'], $_GET['from_day'], $_GET['from_year']); - $date_search_to = date("m/d/Y", $date_search_to_time); - $date_search_from = date("m/d/Y", $date_search_from_time); -} -if ($date_search_to && $date_search_from) { - $urlParamArray[] = 'date_search_from='.urlencode($date_search_from); - $urlParamArray[] = 'date_search_to='.urlencode($date_search_to); - $where_part .= " $Where edate >= '$date_search_from' and bdate <= '$date_search_to'"; - $Where = 'and'; -} -if ($archived == 't') { - $urlParamArray[] = 'archived='.$archived; - $where_part .= " $Where edate < current_date"; - $Where = 'and'; -} elseif ($pending == 't') { - $urlParamArray[] = 'pending='.$pending; - $where_part .= " $Where visable = 'f'"; - $Where = 'and'; -} elseif (!isset($_GET['Query']) && !$_REQUEST['date_search_to'] && !$_REQUEST['to_month']) { - $where_part .= " $Where edate >= current_date"; - $Where = 'and'; -} -$qs = "select $select_part from $from_part $where_part"; -//echo '

'.$qs.$order.'

'; - -$stmt = $dbh->query($qs.$order." LIMIT $pagelength OFFSET $start"); -$data = $stmt->fetchAll(PDO::FETCH_ASSOC); -$num = count($data); -$qs1 = "SELECT count(*) as total FROM $from_part $where_part"; -$total = $dbh->query($qs1)->fetchColumn(); -$params - = (!empty($urlParamArray)) - ? '&'.implode("&", $urlParamArray) - : ''; -$links = GLM_TOOLBOX::create_page_links($total,$num,$start,$params,$pagelength); - -echo event_nav($lnav); -// from date -$date_fields1 = GLM_TOOLBOX::date_entry($from_month, $from_day, $from_year, - 'from_month', 'from_day', 'from_year'); -// to date -$date_fields2 = GLM_TOOLBOX::date_entry($to_month, $to_day, $to_year, - 'to_month', 'to_day', 'to_year'); -if ( $archived != 't' ) { - $archived_link = 'Archived Events'; -} else { - $archived_link = 'Current Events'; -} -echo ''; - ?> - - - - - - - - - - 0) { - $parsedParams = array(); - foreach ($sortField as $sort) { - $parsedParams[$sort['field']] = addUpdateParams($sort, $params); - } - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Pending Events - -
-
- - -
-
-
-
- From: -
-
- To: -
- -
-
Function - On/Off - '?> - - Home. - '?> - - Title - '?> - - Category - '?> - - Times - '?> - - Days - '?> - - Start - '?> - - End - '?> -
- Edit  - Delete - - ">"; - } else { - echo "\"Off\""; - } - - ?> - - - ">"; - } else { - echo "\"Display"; - } - ?> -
\n"; -echo event_footer(); -?> diff --git a/admin/Events/setupEventsRecur.php b/admin/Events/setupEventsRecur.php deleted file mode 100644 index 04f0ff3..0000000 --- a/admin/Events/setupEventsRecur.php +++ /dev/null @@ -1,175 +0,0 @@ -query( - "DELETE FROM event_recur" -); -$sql = " -SELECT * - FROM event - WHERE edate >= current_date - AND bdate <= current_date - AND reacur = true"; -try { - $stmt = $dbh->query($sql); - while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { - var_dump($row); - if ($row['reacur']) { - $recur['dow'] = $row['daysow']; - $recur['dom'] = $row['dayom']; - if ($recur['dow']) { - $recur['recur_week'] = ($row['weekom']) - ? $row['weekom'] - : null; - } else { - $recur['recur_week'] = null; - } - } - $eventDates = getEventDates( - strtotime($row['bdate']), - strtotime($row['edate']), - $recur - ); - $fields = array('event_id', 'event_day'); - $eventSql = Toolkit_Common::createSQLInsert( - 'event_recur', - $fields - ); - var_dump($eventDates); - var_dump($eventSql); - if (isset($eventDates) && is_array($eventDates)) { - foreach ($eventDates as $eventDay) { - $eventValues = array( - 'event_id' => $row['id'], - 'event_day' => $eventDay - ); - $stmt2 = Toolkit_Common::prepareQuery( - $dbh, - 'event_recur', - $eventSql, - $eventValues - ); - $stmt2->execute(); - } - } - } -} catch (PDOException $e) { - Toolkit_Common::handleError($e); -} - diff --git a/admin/Events/topic_action.php b/admin/Events/topic_action.php deleted file mode 100644 index 92792c4..0000000 --- a/admin/Events/topic_action.php +++ /dev/null @@ -1,38 +0,0 @@ -query($query)->fetchAll(PDO::FETCH_ASSOC)) { - $query = " - INSERT INTO topic - (descr) - VALUES - ('$topic');"; - $dbh->query($query); - } - break; - -case "Delete Topic": - $query = " - DELETE FROM topic - WHERE id = ".$_POST['id']; - $dbh->query($query); - break; - -case "Update Topic": - $query = " - UPDATE topic - SET topiccolor = '".$_POST['topiccolor']."', - descr = '".$_POST['descr']."' - WHERE id = ".$_POST['id'].";"; - $dbh->query($query); - break; - -} -header('Location: edit_topic.phtml'); -?> \ No newline at end of file diff --git a/admin/Events/up.gif b/admin/Events/up.gif deleted file mode 100755 index b1f0eb8601400fec6dce7719782788ed81a81f9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmZ?wbhEHb+735W75*KOKv{A@%Z(_x1Zj8`0^fX06s$TCkrDZgD8UzND;_R23G$C1uCAO zEc%jJye^xFxVpNzn)n(AUI}gt-C%Oo#MLb{)aA0z<>1gzRfAp?-cZ)C&`^_$KyGL# Wldvp^3RMgU4Hb<5Dv$wj7_0%o4?8#j -- 2.17.1