diff --git a/README.md b/README.md index 56f3768..f804b6c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Details NanoBlog -Small foot-print nano blog platform +# TSW Details Nano Blog + ## Overview * PHP, HTML5, Twitter Bootstrap, jQuery * Small foot-print blog platform @@ -19,15 +19,14 @@ Small foot-print nano blog platform ## Code Example Example of security measures using PDO and PHP5 var_filters ``` -$prv_pub = filter_var( 1, FILTER_VALIDATE_INT); - // grab all non-private items from db +$prv_pub = filter_var( 1, FILTER_VALIDATE_INT ); + //Grab all non-private items from db require_once 'inc/dbh.php'; - $sql = "SELECT * FROM tsw_details WHERE prv = $prv_pub"; - $result = $dbh->query($sql); - // Parse returned data, and displays them - while($row = $result->fetch(PDO::FETCH_ASSOC)) { - $idd_int = $row['idd']; if (!filter_var($idd_int, FILTER_VALIDATE_INT) === false) { - + $sql = "SELECT * FROM tsw_details WHERE prv = $prv_pub"; //Placeholder not used(integer clean) + $result = $dbh->query( $sql ); + //Parse returned data, and displays them + while( $row = $result->fetch( PDO::FETCH_ASSOC )) { + $idd_int = $row['idd']; if( !filter_var( $idd_int, FILTER_VALIDATE_INT ) === false ) { ``` ## Motivation @@ -35,15 +34,23 @@ Main motive is to advance the use of PHP out-of-the-box coding over MVC and fram ## Installation Very basic PHP Apache Server, LAMP style install: -* create a database or just add the one table to an existing database -* the table is in the `inc` directory; file named `sql.txt` -* add settings in file `inc/settings.php` and connection in `inc/dbh.php` +* Create a database or just add the tables to an existing database +* The tables are in the `inc` directory; file named `sql.txt` +* You may want to change the URL in `tsw_settings` before adding tables!!! +* Add database connection credentials in `inc/dbh.php` +* +* You can register as a new editor or use default in `inc/settings.php` +* IMPORTANT! +* Remember this is viewable on Github so you better change login ASAP demo: http://tradesouthwest.com/dev/details ## Contributors Open for contributions. +thanks http://jqueryte.com/ - jQuery TE +thanks http://www.daveismyname.com PHP Pagination Class +thanks Twitter Bootstrap ## License Licensed under MIT License (MIT). -http://opensource.org/licenses/MIT +http://opensource.org/licenses/MIT \ No newline at end of file diff --git a/admin/admin-list.php b/admin/admin-list.php new file mode 100644 index 0000000..d7fd9d3 --- /dev/null +++ b/admin/admin-list.php @@ -0,0 +1,38 @@ + + +Dev App for Looping Details + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ + + +
+ +
+
+ \ No newline at end of file diff --git a/admin/admin-nav.php b/admin/admin-nav.php new file mode 100644 index 0000000..03b2659 --- /dev/null +++ b/admin/admin-nav.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/admin/det-crud.php b/admin/det-crud.php new file mode 100644 index 0000000..55955c1 --- /dev/null +++ b/admin/det-crud.php @@ -0,0 +1,329 @@ + + +Dev App for Looping Details + + + +
+ +
+
+
+

details nanoBlog Admin Functions

+
+
+
+ +
+
+
+
+
+ +prepare("UPDATE tsw_details + SET prv = :prv + WHERE idd = :idd + "); + $stmt->bindValue(':idd', $prv_idd); + $stmt->bindValue(':prv', $prv); + $stmt->execute(); + if($stmt){ +?> + +
+
+
+

Data entered

+
+
+ Article Made Private Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare($sql); + $update->execute(array($prv,$pub_idd)); + if($update){ +?> + +
+
+
+

Data changed to PUBLIC

+
+
+ Information UPDATED to PUBLIC status Successfully!
+ +
+
+
+

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare($sql); + $delete->execute(array($rmv_idd)); + if($delete){ +?> + +
+
+
+

Deleted Entry

+
+
+ Information DELETED Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare("UPDATE tsw_settings + SET paginate = :paginate + WHERE ids = :ids + "); + $stmt->bindValue(':paginate', $paginate); + $stmt->bindValue(':ids', $ids); + if ($stmt->execute()) + { + + // grab the new paginate value + $stmt = $dbh->prepare("SELECT paginate + FROM tsw_settings + WHERE ids = :idss + "); + $stmt->bindValue(':idss', $idss); + $stmt->execute(); + if ($stmt->rowCount() > 0){ + $row = $stmt->fetch(PDO::FETCH_ASSOC); + $paginate = $row['paginate']; + } +?> + +
+
+

Data entered

+
+
+ Pagination Updated Successfully! Articles per page
+ +
+
+
+

+ + + +
+
+

Data entered

+
+
+ Pagination did not update - try again please.
+ +
+
+
+

+ + +prepare("UPDATE tsw_settings + SET noreply = :noreply + WHERE ids = :ids + "); + $stmt->bindValue(':noreply', $noreply); + $stmt->bindValue(':ids', $ids); + $stmt->execute(); + if($stmt){ +?> + +
+
+
+

Data entered

+
+
+ Responses Turned Off Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare("UPDATE tsw_settings + SET sortby = :sortby + WHERE ids = :ids + "); + $stmt->bindValue(':sortby', $sortby); + $stmt->bindValue(':ids', $ids); + $stmt->execute(); + if($stmt){ +?> + +
+
+
+

Data entered

+
+
+ Sort Order Changed Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/det-dashboard.php b/admin/det-dashboard.php new file mode 100644 index 0000000..95bf6d9 --- /dev/null +++ b/admin/det-dashboard.php @@ -0,0 +1,184 @@ + + + +
+
+

Total Status

+
+ +prepare($sql); + $result->execute(); + $number_of_rows = $result->fetchColumn(); + +?> - Entry Total (including private) +
+
+ +
+

Respond Count

+
+ +prepare($sql); + $result->bindValue(':prv', $prv); + $result->execute(); + $number_of_rows = $result->fetchColumn(); +?> + + - Total responses +
+
+ +
+

Toggle Responses

+
+ + +query($sql); + + while($row = $result->fetch(PDO::FETCH_ASSOC)) { + $noreply_state = $row['noreply']; + $ids = $row['ids']; +} +?> + +
+
+
+ +
+ + + >   Yes   |   + > No + +
+ Checking Yes makes all Responses hidden to public view. Default is No. +
+ +
+ + +
+ +
+
+
+ +
+ + +
+
+

Total Status

+
+ +prepare($sql); + $result->execute(); + $number_of_rows = $result->fetchColumn(); + +?> - Entry Total (including private) +
+
+ +
+

Respond Count

+
+ +prepare($sql); + $result->bindValue(':prv', $prv); + $result->execute(); + $number_of_rows = $result->fetchColumn(); +?> - Total responses +
+
+ +
+

Toggle Display Order

+
+ + +query($sql); + + while($row = $result->fetch(PDO::FETCH_ASSOC)) { + $sortby_state = $row['sortby']; + $ids = $row['ids']; +} +?> + + +
+
+
+ +
+ + + >   Yes   |   + > No + +
+ Checking Yes displays the oldest articles first. Default is No +
+ +
+ + +
+ +
+
+
+ +
+ +
+
+

Updates

+
+TODO
turn on or off comments
search script
pingback trackback
sort asc desc
transition on page load
make lists sortable
+
+
+
\ No newline at end of file diff --git a/admin/det-global.php b/admin/det-global.php new file mode 100644 index 0000000..8dc2d02 --- /dev/null +++ b/admin/det-global.php @@ -0,0 +1,105 @@ +prepare("SELECT * FROM tsw_settings ORDER BY ids DESC LIMIT 1"); + $stmt->execute(); + if( $stmt) { + while ($row = $stmt->fetch()) { +?> +
+
+
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + > Yes   |   + + > No + + +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+ +
+ + +
+


+ + + + Cancel

+
+
+
+
+
+
\ No newline at end of file diff --git a/admin/det-respond.php b/admin/det-respond.php new file mode 100644 index 0000000..aeb95a7 --- /dev/null +++ b/admin/det-respond.php @@ -0,0 +1,69 @@ +
+
Information UPDATED to system Successfully!
+ + +
+ + + + + + + + + +query($sql); + // Parse returned data, and displays them + while($row = $result->fetch(PDO::FETCH_ASSOC)) { +?> + + + + + + + + + + + + + +"); } ?> + + +
responseunapprovedremove* = unapprovednameemaildate in
+ + + +
+ + "> +
+ +
+ + "> +
+ +
+ + " onClick="return confirm('Are you sure you want to delete item?')"> +
+ + + +
+ + +
+ +
+ + +
\ No newline at end of file diff --git a/admin/det-theme.php b/admin/det-theme.php new file mode 100644 index 0000000..c8aa261 --- /dev/null +++ b/admin/det-theme.php @@ -0,0 +1,139 @@ +prepare($sql); + $result->execute(); + $number_of_rows = $result->fetchColumn(); + +/** get the last (current) setting id and pagination count + * default is 12 pages + * @row paginate + */ + $stmt = $dbh->prepare("SELECT ids, paginate, theme FROM tsw_settings ORDER BY ids DESC LIMIT 1"); + $stmt->execute(); + if( $stmt !==false ) { + while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { + $paginate = $row['paginate']; + $theme = $row['theme']; + $ids = $row['ids']; + } + } else { +?> + +
+
+

Data failed

+
+
+ Pagination did not update - try again please.
+ +
+
+ +
+ +
+ + +
+
+ + + +
+
+ + + +
+
+
+
+ +
+ + + +
+
+
+ + + +
+

+ + Controls how many articles to show on a page. + To make your page look even, divide any pagination by fours. +
+
+
+ + + + + + +
+
+
+ + +
+ +
+
+ + + + +
+
+ +
+ + + +
+
+ +
+
+ + + +
+

+ Alpha only (no # or ;)
+ HTML color references visit: www.w3schools.com/cssref/css_colorsfull
+
+
+
+ + + + + + +
+
+
+ +
+
\ No newline at end of file diff --git a/admin/det-update.php b/admin/det-update.php new file mode 100644 index 0000000..c4d2251 --- /dev/null +++ b/admin/det-update.php @@ -0,0 +1,82 @@ + +Dev App for Looping Details + + + +
+
+
+
+ +

How flexible it is

+
+
+
+ +
+
+
+
+
+prepare($sql); +//Bind value to the parameter :id. +$statement->bindValue(':idd', $idd); + +$statement->bindValue(':title', $title); +$statement->bindValue(':website', $website); +$statement->bindValue(':detail', $detail); +$statement->bindValue(':dev_url', $dev_url); +$statement->bindValue(':note', $note); +$statement->bindValue(':date_in', $date_in); +$statement->bindValue(':prv', $prv); +$statement->bindValue(':stat', $stat); + +$update = $statement->execute(); + + //If the process is successful. + if($update){ + echo "
Information UPDATED to system Successfully!"; + echo "
"; + echo "Data entered - "; + $source = $dateformat; + $date = new DateTime($source); + echo $date->format('m-d-Y H:m'); +echo "

BACK to Details List

"; + + // throw errors if not success + } else { + print "oops This entry did not process correctly, please try again."; + echo $sql . "
" . $dbh->error; + } +} +?> + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/detail-edit.php b/admin/detail-edit.php new file mode 100644 index 0000000..8c74eb8 --- /dev/null +++ b/admin/detail-edit.php @@ -0,0 +1,89 @@ + +Admin Details NanoCMS + + + + + + +
+ +
+
+
+

Your Are Editing

+
+
+
+ +
+
+
+
+
+ +prepare("SELECT * FROM tsw_details WHERE idd = ?"); + + if( $stmt->execute( array($_POST['edit']) )) { + $row = $stmt->fetch(PDO::FETCH_ASSOC); +?> + + +
+ +

id
+

+ + +
+ + + +


+

+ +


+

+ +


+ + +

you may change this if important
+

+ +


+ + + value="0"> Yes   |   value="1"> No + +


+ + + +


+

+
+

Cancel/Back to Admin

+ + + + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/details-list.php b/admin/details-list.php new file mode 100644 index 0000000..611d649 --- /dev/null +++ b/admin/details-list.php @@ -0,0 +1,69 @@ +
+
Information UPDATED to system Successfully!
+ + +
+ + + + + + + + + +query($sql); + // Parse returned data, and displays them + while($row = $result->fetch(PDO::FETCH_ASSOC)) { +?> + + + + + + + + + + + + + +"); } ?> + + +
edit meprivatiseremove* = privatetitlewebsitedate in
+ + + +
+ + "> +
+ +
+ + "> +
+ +
+ + " onClick="return confirm('Are you sure you want to delete item?')"> +
+ + + +
+ + +
+ +
+ + +
\ No newline at end of file diff --git a/admin/extentions.php b/admin/extentions.php new file mode 100644 index 0000000..1847839 --- /dev/null +++ b/admin/extentions.php @@ -0,0 +1,79 @@ + + +Dev App for Looping Details + + + +
+ +
+
+
+

details nanoBlog Admin Functions

+
+
+
+ +
+
+
+
+
+ +prepare($sql); + $stmt->bindValue( ':headcolor', $headcolor ); + $stmt->bindValue( ':listcolor', $listcolor ); + $inserted = $stmt->execute(); + if( $inserted ) { +?> + +
+
+

Data entered

+
+
+ Styles added
+ +
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/footer.php b/admin/footer.php new file mode 100644 index 0000000..ebe7577 --- /dev/null +++ b/admin/footer.php @@ -0,0 +1,17 @@ +

+ + + + \ No newline at end of file diff --git a/admin/form-in.php b/admin/form-in.php new file mode 100644 index 0000000..9e8e303 --- /dev/null +++ b/admin/form-in.php @@ -0,0 +1,156 @@ + + + + + + +Dev App for Looping Details + + + +
+ +
+
+
+ + +prepare($sql); + + //Bind the values to the parameters + $stmt->bindValue(':title', $title); + $stmt->bindValue(':website',$website); + $stmt->bindValue(':detail', $detail); + $stmt->bindValue(':dev_url', $dev_url); + $stmt->bindValue(':note', $note); + $stmt->bindValue(':prv', $prv); + $stmt->bindValue(':date_in', $date_in); + + //Execute the statement and insert our values. + $inserted = $stmt->execute(); + if( $inserted ){ +?> +
+
+
+

Data entered

+
+
+ Article Created Successfully!
+ + + +

+

+
+
+
+ +

Cool Results

+ +

Entry "" added

+ View Home ← + +errorInfo()); } +} +?> +
+
+
+ + +
+
+ +
+

Editor

+
+ +
+
+ + + + +
+
+ +
+

Meta Entry

+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ +
+
+
+ + + +
+ +
+ +
+
+ \ No newline at end of file diff --git a/admin/header.php b/admin/header.php new file mode 100644 index 0000000..d722950 --- /dev/null +++ b/admin/header.php @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..82c3f04 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,115 @@ + + +<?php print($title); ?> + + + +
+ +
+
+ +
+ +

Admin only page - Welcome Logout   |  

+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+

Administrative Functions

+
+ + + +
+ +
+
+

Article Control

+
+ + + +
+ +
+
+

Responses Management

+
+ + + +
+ +
+
+

Page Controls

+
+ + +
+ +
+
+

Global Setup

+
+ + +
+ +
+ +
+
+ + +
+
+
+ \ No newline at end of file diff --git a/admin/pref-update.php b/admin/pref-update.php new file mode 100644 index 0000000..fea7435 --- /dev/null +++ b/admin/pref-update.php @@ -0,0 +1,102 @@ + +Dev App for Looping Details + + + +
+
+
+
+ +

How flexible it is

+
+
+
+ +
+
+
+
+
+prepare($sql); +//Bind value to the parameter :id. +$statement->bindValue(':ids', $ids); + +$statement->bindValue(':theme_url', $theme_url); +$statement->bindValue(':server_email', $server_email); +$statement->bindValue(':det_name', $det_name); +$statement->bindValue(':det_moniker', $det_moniker); +$statement->bindValue(':readlink', $readlink); +$statement->bindValue(':private', $private); +$statement->bindValue(':theme', $theme); +$statement->bindValue(':paginate', $paginate); + +$update = $statement->execute(); + + //If the process is successful. + if($update){ + echo "
Information UPDATED to system Successfully!"; + echo "
"; + echo "Data entered - "; + $source = $dateformat; + $date = new DateTime($source); + echo $date->format('m-d-Y H:m'); +echo "
"; ?> +
+
+
+

Data entered

+
+
+ Details site preferences updated Successfully!
+ +
+
+
+

+ +" . $dbh->error; + } +} +?> + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/respond-crud.php b/admin/respond-crud.php new file mode 100644 index 0000000..db5b365 --- /dev/null +++ b/admin/respond-crud.php @@ -0,0 +1,162 @@ + +Dev App for Looping Details + + + +
+
+
+
+ +

How flexible it is

+
+
+
+ +
+
+
+
+
+ +prepare("UPDATE tsw_respond + SET prv = :prv WHERE idr = :idr"); +$stmt->bindValue(':idr', $prv_idr); +$stmt->bindValue(':prv', $prv); +$stmt->execute(); + if($stmt){ +?> + +
+
+
+

Data entered

+
+
+ Response Unapproved Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare($sql); +$update->execute(array($prv,$pub_idr)); + if($update){ +?> + +
+
+
+

Data changed to PUBLIC

+
+
+ Information UPDATED to PUBLIC status Successfully!
+ +
+
+
+

+ +" . $dbh->error; + } +$dbh = null; +} +?> +prepare($sql); +$delete->execute(array($rmv_idr)); + if($delete){ +?> + +
+
+
+

Deleted Entry

+
+
+ Information DELETED Successfully!
+ +
+
+
+ +

+ +" . $dbh->error; + } +$dbh = null; +} +?> + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/admin/respond-edit.php b/admin/respond-edit.php new file mode 100644 index 0000000..02c7241 --- /dev/null +++ b/admin/respond-edit.php @@ -0,0 +1,87 @@ + +Admin Details NanoCMS + + + + + + +
+ +
+
+
+

Your Are Editing

+
+
+
+ +
+
+
+
+
+ +prepare("SELECT * FROM tsw_respond WHERE idr = ?"); + + if( $stmt->execute( array($_POST['idr']) )) { + $row = $stmt->fetch(PDO::FETCH_ASSOC); + + +?> + +

entry number:

+
+ +


+

+ +
+ + +


+

+ +


+

+ +


+ + + value="1"> Yes   |   value="0"> No + +


+ + + + +
+

Cancel/Back to Admin

+ + + + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/closed.html b/closed.html new file mode 100644 index 0000000..4b81d10 --- /dev/null +++ b/closed.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Website is offline for a while + + + + + + +
+
+
+ +
+
+
+ +
+
+
+

Try Again

+
+
+

+ + + + + + + + + + \ No newline at end of file diff --git a/details.php b/details.php new file mode 100644 index 0000000..2bc7237 --- /dev/null +++ b/details.php @@ -0,0 +1,126 @@ + +Dev App for Looping Details + + + + +
+
+
+
+ +
+
+
+ +
+
+
+
+ +prepare("SELECT * FROM tsw_details + WHERE idd = ?"); + if( $stmt->execute( array( $_GET['id'] ))) { + $row = $stmt->fetch(PDO::FETCH_ASSOC); +?> + + +
+
+
+

+
+
+ +
+
+
+ + + + +   + + +
+

+
+ +
+ +
+
+ +
+
+
+ +
+
+
+ +
+ +
+ +query($sql); + + while($row = $result->fetch(PDO::FETCH_ASSOC)) { + $noreply_state = $row['noreply']; + } + if( $noreply_state === "0" ) : + // responses are set to 1 OK to proceed +?> + +
+ +
+ + + +
+ + + + +
+
+ +
+
+ + + +
+
+ +
+
+ \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..789d8dd --- /dev/null +++ b/footer.php @@ -0,0 +1,28 @@ +

+ + + + + + \ No newline at end of file diff --git a/header.php b/header.php new file mode 100644 index 0000000..fb1fe97 --- /dev/null +++ b/header.php @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/inc/controls.php b/inc/controls.php new file mode 100644 index 0000000..cf10cba --- /dev/null +++ b/inc/controls.php @@ -0,0 +1,60 @@ +'; + echo 'window.location.href="'.$url.'";'; + echo ''; + echo ''; exit; + } +} +// display sessions (for debug) +function display_sessions() { +$html= +$html .= '
';
+$html = print_r($_SESSION);
+$html .= '
';
+return $html;
+}
+?>
\ No newline at end of file
diff --git a/inc/dbh.php b/inc/dbh.php
new file mode 100644
index 0000000..6bd4909
--- /dev/null
+++ b/inc/dbh.php
@@ -0,0 +1,15 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+}
+catch(PDOException $e) {
+	die('pdo connection error: ' . $e->getMessage());
+}
\ No newline at end of file
diff --git a/inc/index.html b/inc/index.html
new file mode 100644
index 0000000..70886c5
--- /dev/null
+++ b/inc/index.html
@@ -0,0 +1 @@
+No Access

OOPS! this is embarrassing - you are not supposed to be here!

\ No newline at end of file diff --git a/inc/pagination.css b/inc/pagination.css new file mode 100644 index 0000000..1d6e662 --- /dev/null +++ b/inc/pagination.css @@ -0,0 +1,37 @@ +.pagination { + clear: both; + padding: 0; +} +.pagination li { + display:inline; +} +.pagination a { + border: 1px solid #D5D5D5; + color: #666666; + font-size: 11px; + font-weight: bold; + height: 25px; + padding: 4px 8px; + text-decoration: none; + margin:2px; +} +.pagination a:hover, .pagination a:active { + background:#efefef; +} +.pagination span.current { + background-color: #687282; + border: 1px solid #D5D5D5; + color: #ffffff; + font-size: 11px; + font-weight: bold; + height: 25px; + padding: 4px 8px; + text-decoration: none; + margin:2px; +} +.pagination span.disabled { + border: 1px solid #EEEEEE; + color: #DDDDDD; + margin: 2px; + padding: 2px 5px; +} diff --git a/inc/paginator.php b/inc/paginator.php new file mode 100644 index 0000000..29417d5 --- /dev/null +++ b/inc/paginator.php @@ -0,0 +1,198 @@ +_instance = $instance; + $this->_perPage = $perPage; + $this->set_instance(); + } + + /** + * get_start + * + * creates the starting point for limiting the dataset + * @return numeric + */ + public function get_start(){ + return ($this->_page * $this->_perPage) - $this->_perPage; + } + + /** + * set_instance + * + * sets the instance parameter, if numeric value is 0 then set to 1 + * + * @var numeric + */ + private function set_instance(){ + $this->_page = (int) (!isset($_GET[$this->_instance]) ? 1 : $_GET[$this->_instance]); + $this->_page = ($this->_page == 0 ? 1 : $this->_page); + } + + /** + * set_total + * + * collect a numberic value and assigns it to the totalRows + * + * @var numeric + */ + public function set_total($_totalRows){ + $this->_totalRows = $_totalRows; + } + + /** + * get_limit + * + * returns the limit for the data source, calling the get_start method and passing in the number of items perp page + * + * @return string + */ + public function get_limit(){ + return "LIMIT ".$this->get_start().",$this->_perPage"; + } + + /** + * page_links + * + * create the html links for navigating through the dataset + * + * @var sting $path optionally set the path for the link + * @var sting $ext optionally pass in extra parameters to the GET + * @return string returns the html menu + */ + public function page_links($path='?',$ext=null) + { + $adjacents = "2"; + $prev = $this->_page - 1; + $next = $this->_page + 1; + $lastpage = ceil($this->_totalRows/$this->_perPage); + $lpm1 = $lastpage - 1; + + $pagination = ""; + if($lastpage > 1) + { + $pagination .= "\n"; + } + + + return $pagination; + } +} diff --git a/inc/settings.php b/inc/settings.php new file mode 100644 index 0000000..39f8b21 --- /dev/null +++ b/inc/settings.php @@ -0,0 +1,31 @@ +prepare("SELECT * FROM tsw_settings ORDER BY ids DESC LIMIT 1"); + $stmt->execute(); + if( $stmt) { + while ($row = $stmt->fetch()) { + + $theme_url = $row['theme_url']; + $server_email = $row['server_email']; + $det_name = $row['det_name']; + $det_moniker = $row['det_moniker']; + $readlink = $row['readlink']; + $private = $row['private']; + $theme = $row['theme']; + $paginate = $row['paginate']; + } +} + +?> \ No newline at end of file diff --git a/inc/sql.txt b/inc/sql.txt new file mode 100644 index 0000000..a3d0110 --- /dev/null +++ b/inc/sql.txt @@ -0,0 +1,114 @@ + +-- +-- Table structure for table `tsw_details` +-- + +CREATE TABLE IF NOT EXISTS `tsw_details` ( + `idd` int(6) NOT NULL AUTO_INCREMENT, + `title` varchar(120) NOT NULL, + `website` varchar(250) NOT NULL, + `detail` text, + `dev_url` varchar(120) NOT NULL, + `note` varchar(250) NOT NULL, + `date_in` varchar(20) DEFAULT NULL, + `prv` int(4) NOT NULL DEFAULT '1', + `stat` int(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`idd`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + +-- +-- Dumping data for table `tsw_details` +-- + +INSERT INTO `tsw_details` (`idd`, `title`, `website`, `detail`, `dev_url`, `note`, `date_in`, `prv`, `stat`) VALUES +(1, 'How To Install Linux, Apache', 'https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu', 'LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the virtual private server is already running Ubuntu, the linux part is taken care of. Here is how to install the rest.', '>sudo apt-get update - >sudo apt-get install apache2', 'PHP5', '11/09/2015 00:46', 1, 1); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tsw_extend_style` +-- + +CREATE TABLE IF NOT EXISTS `tsw_extend_style` ( + `ide` int(6) NOT NULL AUTO_INCREMENT, + `headcolor` varchar(11) DEFAULT NULL, + `listcolor` varchar(11) DEFAULT NULL, + `backcolor` varchar(11) DEFAULT NULL, + `linkcolor` varchar(11) DEFAULT NULL, + PRIMARY KEY (`ide`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tsw_members` +-- + +CREATE TABLE IF NOT EXISTS `tsw_members` ( + `idm` int(11) NOT NULL AUTO_INCREMENT, + `phonenumber` varchar(65) DEFAULT NULL, + `firstname` varchar(65) NOT NULL DEFAULT '', + `lastname` varchar(65) NOT NULL DEFAULT '', + `email` varchar(250) NOT NULL, + `dateregistered` varchar(65) NOT NULL, + `level` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `active` tinyint(1) DEFAULT '0', + `resetToken` varchar(255) DEFAULT NULL, + `resetComplete` varchar(3) DEFAULT 'No', + PRIMARY KEY (`idm`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + +-- +-- Dumping data for table `tsw_members` +-- + +INSERT INTO `tsw_members` (`idm`, `phonenumber`, `firstname`, `lastname`, `email`, `dateregistered`, `level`, `username`, `password`, `active`, `resetToken`, `resetComplete`) VALUES +(1, '555-555-5555', 'Admin', 'Director', 'admin@example.com', '11/11/2015', 1, 'director', '27792947ed5d5da7c0d1f43327ed9dab', 1, '', 'No'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tsw_respond` +-- + +CREATE TABLE IF NOT EXISTS `tsw_respond` ( + `idr` int(6) NOT NULL AUTO_INCREMENT, + `idd_is` int(11) NOT NULL, + `name` varchar(120) NOT NULL, + `email` varchar(120) NOT NULL, + `respond` text, + `date_respond` varchar(20) DEFAULT NULL, + `prv` int(4) NOT NULL DEFAULT '1', + `stat` int(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`idr`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tsw_settings` +-- + +CREATE TABLE IF NOT EXISTS `tsw_settings` ( + `ids` int(6) NOT NULL AUTO_INCREMENT, + `theme_url` varchar(250) NOT NULL, + `server_email` varchar(250) NOT NULL, + `det_name` varchar(250) NOT NULL, + `det_moniker` varchar(250) NOT NULL, + `readlink` varchar(250) NOT NULL, + `private` tinyint(4) NOT NULL DEFAULT '0', + `theme` varchar(60) NOT NULL DEFAULT 'index_cards', + `noreply` tinyint(4) NOT NULL DEFAULT '0', + `sortby` tinyint(4) NOT NULL DEFAULT '0', + `paginate` int(6) NOT NULL DEFAULT '12', + PRIMARY KEY (`ids`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + +-- +-- Dumping data for table `tsw_settings` +-- + +INSERT INTO `tsw_settings` (`ids`, `theme_url`, `server_email`, `det_name`, `det_moniker`, `readlink`, `private`, `theme`, `noreply`, `sortby`, `paginate`) VALUES +(1, '/', 'notify@example.com', 'Details NanoBlog', 'Details Dev App - Limited but Flexible', 'onward', 1, 'index_cards', 0, 0, 12); diff --git a/inc/theme-options.php b/inc/theme-options.php new file mode 100644 index 0000000..96f7dd5 --- /dev/null +++ b/inc/theme-options.php @@ -0,0 +1,56 @@ + + +<?php print($title); ?> + + + +
+ +
+
+ +
+ +

Admin only page - Welcome Logout   |  

+
+ +
+
+ +
+
+
+
+ + +
+
+ +
+
+ \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..fac331e --- /dev/null +++ b/index.php @@ -0,0 +1,139 @@ + +Dev App Details + + + + + + + +
+
+
+ +
+
+
+ +
+
+ + + query($sql); + while($row = $result->fetch(PDO::FETCH_ASSOC)) { $sortby_state = filter_var( $row['sortby'], FILTER_VALIDATE_INT ); } +/** + * grab state of sortby from settings table + * @sortby default = 0 (descending) + */ + +if( $sortby_state < 1 ) { $sort_by= DESC; } else { $sort_by= ASC; } +// pagination settings +if( $paginate < 1 ) { $details_perpage= 12; } else { $details_perpage= $paginate; } + +//include the paginator class +include 'inc/paginator.php'; + +//create new object pass in number of pages and identifier +$pages= new Paginator($details_perpage, 'p'); + +// set default view to public +$prv_pub= filter_var( 1, FILTER_VALIDATE_INT); + +// get database connection +require_once 'inc/dbh.php'; + +//get number of total records that are not private +$stmt= $dbh->query("SELECT count(idd) FROM tsw_details + WHERE prv = $prv_pub "); +$row = $stmt->fetch(PDO::FETCH_NUM); +$total = $row[0]; // filter not required since row object is query function + +//pass number of records to +$pages->set_total($total); +$data = $dbh->query("SELECT * FROM tsw_details + WHERE prv = 1 ORDER BY idd $sort_by ".$pages->get_limit()); +foreach($data as $row) { ?> + +
+
    + +
  • + + + +
  • + + +
  • + +
  • + + + + + +
  • + +
  • + + + + + +
  • + +
  • + + + + + + +
  • + + + +
  • + + + + + +
  • + +
  • + + + + +
      +
+ + + +
+
+ \ No newline at end of file diff --git a/lib/docs/form-input.php b/lib/docs/form-input.php new file mode 100644 index 0000000..4d8de48 --- /dev/null +++ b/lib/docs/form-input.php @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + +TSW-Details Admin Control Panel + + + +
+ +
+
+ +
+ +

Admin only page - Welcome Larry Logout   |   You are safely logged in

+
+ + +
+
+ +
+

Documents are created using HTML "detail list" tag.
See: http://www.w3schools.com/tags/tag_dl.asp for more information on 'dl' tag.

+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+

get list of existing d-lists

+ + "Chptr 1", + $dmdt => "Chptr 2", + $dmdd => "Chptr3", +); + +// create html template for table +$list_template = ['' ]; + +// select by associative array + + $output = ''; + echo $output; + + ?> +

+ $value) + { + $output2 .= $model[1] . $key . $model[2] . $value . $model[3] . '
'; + } + + $output2 .= $model[4]; + echo $output2; + +?> +
+
+
+ + +
+ + + +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/lib/docs/index.php b/lib/docs/index.php new file mode 100644 index 0000000..d4accc0 --- /dev/null +++ b/lib/docs/index.php @@ -0,0 +1,152 @@ + + + + + + Details NanoBlog Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

TSW Details | Nano Blog | Documentation

+
+
+
+ +
+
+ + +
+
+ +
+ + +

General tips to note before you get started

+

Admin can use "List Articles" to inspect and edit articles in a larger page. The "List Articles" button is only available in the Admin pages but is less cluttered than the tabbed Admin pages normally reservered for editing.

+

It recommended to use one of the lower fields to enter an Author name. Blog is set up to add footnotes or author link in either of the last two form fields for the "Input New Details" form, so you may re-label labels to fit.

+ +
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+ +
+ +
+

x

+
+
+
+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/lib/img/detail2.png b/lib/img/detail2.png new file mode 100644 index 0000000..fd09b98 Binary files /dev/null and b/lib/img/detail2.png differ diff --git a/lib/img/tsw-logoem.png b/lib/img/tsw-logoem.png new file mode 100644 index 0000000..f0c7f98 Binary files /dev/null and b/lib/img/tsw-logoem.png differ diff --git a/lib/index.php b/lib/index.php new file mode 100644 index 0000000..fa0081d --- /dev/null +++ b/lib/index.php @@ -0,0 +1,24 @@ + +Dev App for Looping Details + + + + + + +
+
+
+ +
+
+
+ +
+
+
+

OOPS! this is embarrassing - you are not supposed to be here!

+
+
+
+ \ No newline at end of file diff --git a/lib/jtedit/AUTHOR.txt b/lib/jtedit/AUTHOR.txt new file mode 100644 index 0000000..08211b3 --- /dev/null +++ b/lib/jtedit/AUTHOR.txt @@ -0,0 +1,6 @@ +AUTHOR + +jQuery TE 1.4.0 , http://jqueryte.com/ +Copyright (C) 2013, Fatih Koca (fattih@fattih.com), (http://jqueryte.com/about) + +jQuery TE is provided under the MIT LICENSE. \ No newline at end of file diff --git a/lib/jtedit/MIT-LICENSE.txt b/lib/jtedit/MIT-LICENSE.txt new file mode 100644 index 0000000..b71d0f2 --- /dev/null +++ b/lib/jtedit/MIT-LICENSE.txt @@ -0,0 +1,7 @@ +Copyright (C) 2013 jQueryTE, Fatih Koca (fattih@fattih.com), http://jqueryte.com/license. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (jQueryTE), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/lib/jtedit/demo.html b/lib/jtedit/demo.html new file mode 100644 index 0000000..1e7a53c --- /dev/null +++ b/lib/jtedit/demo.html @@ -0,0 +1,64 @@ + + + + + +jQuery TE | Downloaded Demo | v.1.4.0 + + + + + + + + + +

jQuery TE

+ + + +

Demo | v.1.4.0

+ + + + + + + + + + +My contents are from SPAN + + + + + + +
+ + + +

Thanks for using!

+ + + \ No newline at end of file diff --git a/lib/jtedit/jquery-te-1.4.0.css b/lib/jtedit/jquery-te-1.4.0.css new file mode 100644 index 0000000..b5e240a --- /dev/null +++ b/lib/jtedit/jquery-te-1.4.0.css @@ -0,0 +1,458 @@ +/*! + * + * jQuery TE 1.4.0 , http://jqueryte.com/ + * Copyright (C) 2013, Fatih Koca (fattih@fattih.com), (http://jqueryte.com/about) + + * jQuery TE is provided under the MIT LICENSE. + * +*/ + +/* editor's general field */ +.jqte { + box-shadow:0 0 10px #ddd; + margin: 0px 20px; + border:#ccc 1px solid; + border-radius:5px; -webkit-border-radius:5px; -moz-border-radius:5px; + overflow:hidden; + transition:box-shadow 0.4s, border 0.4s; -webkit-transition:-webkit-box-shadow 0.4s, border 0.4s; -moz-transition:-moz-box-shadow 0.4s, border 0.4s; -o-transition:-o-box-shadow 0.4s, border 0.4s; +} +.jqte * { + color:#333; + + font-size:14px; +} +.jqte_focused { + border-color:#00AAE7; + box-shadow:0 0 10px #00BDFF; -webkit-box-shadow:0 0 10px #00BDFF; -moz-box-shadow:0 0 10px #00BDFF; +} +/* toolbar */ +.jqte_toolbar { + overflow:auto; + padding:3px 4px; + background:#EEE; + border-bottom:#BBB 1px solid; +} +.jqte_tool { + float:left; + margin:0; + padding:0; + cursor:pointer; +} +.jqte_tool, .jqte_tool_icon, .jqte_tool_label { + border:#EEE 1px solid; + border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px +} +.jqte_hiddenField { + display:none +} +.jqte_tool_icon { + display:block; + width:22px; + height:22px; + background:url(jquery-te.png) no-repeat +} +.jqte_tool.jqte_tool_1 .jqte_tool_label { + position:relative; +top: -2px; + display:block; + padding:3px; + width:70px; + height:22px; + overflow:hidden; +} +.jqte_tool.jqte_tool_1 .jqte_tool_text { + font:bold 13px Arial,sans-serif; + color:#222; +} +.jqte_tool.jqte_tool_1 .jqte_tool_icon { + position:absolute; + top:10px; + right:2px; + width:6px; + height:4px; + background-position:-19px -23px; + border:none; + border-radius:none; -webkit-border-radius:none; -moz-border-radius:none +} +.jqte_tool.jqte_tool_2 .jqte_tool_icon { + background-position:0 0 +} +.jqte_tool.jqte_tool_3 .jqte_tool_icon { + background-position:-22px 0 +} +.jqte_tool.jqte_tool_4 .jqte_tool_icon { + background-position:-44px 0 +} +.jqte_tool.jqte_tool_5 .jqte_tool_icon { + background-position:-66px 0 +} +.jqte_tool.jqte_tool_6 .jqte_tool_icon { + background-position:-88px 0 +} +.jqte_tool.jqte_tool_7 .jqte_tool_icon { + background-position:-110px 0 +} +.jqte_tool.jqte_tool_8 .jqte_tool_icon { + background-position:-132px 0 +} +.jqte_tool.jqte_tool_9 .jqte_tool_icon { + background-position:-154px 0 +} +.jqte_tool.jqte_tool_10 .jqte_tool_icon { + background-position:-176px 0 +} +.jqte_tool.jqte_tool_11 .jqte_tool_icon { + background-position:-198px 0 +} +.jqte_tool.jqte_tool_12 .jqte_tool_icon { + background-position:-220px 0 +} +.jqte_tool.jqte_tool_13 .jqte_tool_icon { + background-position:-242px 0 +} +.jqte_tool.jqte_tool_14 .jqte_tool_icon { + background-position:-264px 0 +} +.jqte_tool.jqte_tool_15 .jqte_tool_icon { + background-position:-286px 0 +} +.jqte_tool.jqte_tool_16 .jqte_tool_icon { + background-position:-308px 0 +} +.jqte_tool.jqte_tool_17 .jqte_tool_icon { + background-position:-330px 0 +} +.jqte_tool.jqte_tool_18 .jqte_tool_icon { + background-position:-352px 0 +} +.jqte_tool.jqte_tool_19 .jqte_tool_icon { + background-position:-374px 0 +} +.jqte_tool.jqte_tool_20 .jqte_tool_icon { + background-position:-396px 0 +} +.jqte_tool.jqte_tool_21 .jqte_tool_icon { + background-position:-418px 0 +} +.jqte_tool:hover { + background-color:#FFF; + border-color:#FFF +} +.jqte_tool:hover .jqte_tool_icon, .jqte_tool:hover .jqte_tool_label { + border:#AAA 1px solid +} +.jqte_tool:active .jqte_tool_icon, .jqte_tool:active .jqte_tool_label { + border:#777 1px solid +} +.jqte_tool.jqte_tool_1:hover .jqte_tool_icon, .jqte_tool.jqte_tool_1:active .jqte_tool_icon { + border:none +} +.jqte_tool_depressed { + background-color:#DDD; + border-color:#CCC +} +.jqte_tool_depressed .jqte_tool_icon { + border-color:#AAA +} +.jqte_tool_depressed:hover { + background-color:#EEE +} +/* link form area */ +.jqte_linkform { + padding:5px 10px; + background:#DDD; + border-bottom:#BBB 1px solid; +} +.jqte_linktypeselect { + position:relative; + float:left; + width:130px; + background:#EEE; + cursor:pointer +} +.jqte_linktypeselect:Active { + background:#FFF +} +.jqte_linktypeview { + padding:3px 5px; + border:#333 1px solid; + color:#777; + border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px; + outline:none +} +.jqte_linktypetext { + font-size:12px; +} +.jqte_linktypearrow { + position:absolute; + bottom:8px; right:6px; + width:7px; + height:6px; + margin:0 auto; + background:url(jquery-te.png) -7px -23px no-repeat; +} +.jqte_linktypes { + display:none; + position:absolute; + top:22px; left:1px; + width:125px; + background:#FFF; + border:#333 1px solid; + box-shadow:0 1px 4px #AAA; -webkit-box-shadow:0 1px 4px #AAA; -moz-box-shadow:0 1px 4px #AAA +} +.jqte_linktypes a { + display:block; + padding:4px 5px; + font-size:12px; +} +.jqte_linktypes a:hover { + background:#DDD +} +.jqte_linkinput { + float:left; + margin:0 5px; + padding:3px 5px; + width:300px; + background:#EEE; + border:#333 1px solid; + color:#777; + font-size:12px; + border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px; + outline:none; +} +.jqte_linkinput:focus, .jqte_linkinput:hover { + background:#FFF; + border-color:#000; +} +.jqte_linkbutton { + float:left; + padding:3px 12px; + background:#AAA; + border:#333 1px solid; + color:#FFF; + font-size:12px; + font-weight:bold; + cursor:pointer; + border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px; + box-shadow:inset 0 1px #EEE; -webkit-box-shadow:inset 0 1px #EEE; -moz-box-shadow:inset 0 1px #EEE; +} +.jqte_linkbutton:hover { + background:#A1A1A1 +} +.jqte_linkbutton:active { + box-shadow:inset 0 1px #CCC; -webkit-box-shadow:inset 0 1px #CCC; -moz-box-shadow:inset 0 1px #CCC; + background:#888; +} + +/* text format menu */ +.jqte_formats { + display:none; + position:absolute; + width:180px; + oveflow-x:hidden; + overflow-y:auto; + background:#FFF; + border:#AAA 1px solid; + box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA; + z-index:100; +} +.jqte_format { + display:block; + padding:4px 7px; + font-size:13px +} +.jqte_format:hover { + background:#DDD +} +.jqte_format_1, .jqte_format_2, .jqte_format_3, .jqte_format_4, .jqte_format_5, .jqte_format_6 { + font-weight:bold +} +.jqte_format_1 { + font-size:22px +} +.jqte_format_2 { + font-size:20px +} +.jqte_format_3 { + font-size:18px +} +.jqte_format_4 { + font-size:16px +} +.jqte_format_5 { + font-size:14px +} +.jqte_format_6 { + font-size:12px +} +.jqte_format_7 { + font-family:"Courier New", Courier, monospace +} + +/* font size menu */ +.jqte_fontsizes { + display:none; + position:absolute; + width:180px; + height:198px; + oveflow-x:hidden; + overflow-y:auto; + background:#FFF; + border:#AAA 1px solid; + box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA +} +.jqte_fontsize { + display:block; + padding:3px 7px; +} +.jqte_fontsize:hover { + background:#DDD +} + +/* color pallette */ +.jqte_cpalette { + display:none; + position:absolute; + padding:6px; + width:144px; + background:#FFF; + border:#AAA 1px solid; + box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA +} +.jqte_color { + display:block; + float:left; + width:16px; + height:16px; + border:#FFF 1px solid; +} +.jqte_color:hover { + border-color:#000 +} +.jqte_colorSeperator { + float:none; + clear:both; + height:7px; +} + +/* editor area */ +.jqte_editor, .jqte_source { + padding:10px; + background:#FFF; + min-height:240px; + max-height:900px; + overflow:auto; + outline:none; + word-wrap:break-word; -ms-word-wrap:break-word; + resize:vertical +} +.jqte_editor div, .jqte_editor p { + margin:0 0 7px +} +.jqte_editor a:link, .jqte_editor a:link * { + color:#0066FF !important; + text-decoration:underline; +} +.jqte_editor blockquote { + margin-top:0; + margin-bottom:7px +} +.jqte_editor img { + float:left; + margin:0 10px 5px 0 +} +.jqte_editor a[jqte-setlink], .jqte_editor a[jqte-setlink] * { + background:#3297FD !important; + color:#FFF !important +} +.jqte_editor h1, .jqte_editor h2, .jqte_editor h3, .jqte_editor h4, .jqte_editor h5, .jqte_editor h6, .jqte_editor pre { + display:block; + margin:0 0 3px; +} +.jqte_editor h1, .jqte_editor h1 * { + font-size:26px +} +.jqte_editor h2, .jqte_editor h2 * { + font-size:24px +} +.jqte_editor h3, .jqte_editor h3 * { + font-size:22px +} +.jqte_editor h4, .jqte_editor h4 * { + font-size:20px +} +.jqte_editor h5, .jqte_editor h5 * { + font-size:18px +} +.jqte_editor h6, .jqte_editor h6 * { + font-size:15px +} +.jqte_editor pre, .jqte_editor pre * { + font-family:"Courier New", Courier, monospace +} + +/* source area */ +.jqte_source, .jqte_source textarea { + background:#FFF1E8 +} +.jqte_source textarea { + margin:0 !important; + padding:0 !important; + display:block !important; + width:100% !important; + min-height:100px; + font-family:Courier, Arial, sans-serif !important; + font-weight:normal; + font-size:15px; + overflow:hidden !important; + outline:none; + resize:none; +} +.jqte_source textarea, .jqte_source textarea:focus { + css_shadow:none !important; + background:none !important; + border:none !important; +} + +/* title box */ +.jqte_title { + display:none; + position:absolute; + z-index:9999; +} +.jqte_titleArrow { + position:relative; +} +.jqte_titleArrowIcon { + width:7px; + height:6px; + margin:0 auto; + background:url(jquery-te.png) 0 -23px no-repeat; +} +.jqte_titleText { + padding:5px 7px; + margin-top:0; + min-width:5px; + min-height:1px; + max-width:400px; + background:#000; + border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px; + word-wrap:break-word; -ms-word-wrap:break-word +} +.jqte_titleText, .jqte_titleText * { + color:#FFF; + font-size:11px +} + +/* placeholder */ +.jqte_placeholder { + position:relative; + display:none; +} +.jqte_placeholder_text { + position:absolute; + top:43px; + left:10px; + font-size:14px; + color:#CCC; +} \ No newline at end of file diff --git a/lib/jtedit/jquery-te-1.4.0.min.js b/lib/jtedit/jquery-te-1.4.0.min.js new file mode 100644 index 0000000..6e9f58d --- /dev/null +++ b/lib/jtedit/jquery-te-1.4.0.min.js @@ -0,0 +1,9 @@ +/*! + * + * jQuery TE 1.4.0 , http://jqueryte.com/ + * Copyright (C) 2013, Fatih Koca (fattih@fattih.com), (http://jqueryte.com/about) + + * jQuery TE is provided under the MIT LICENSE. + * +*/ +(function(e){e.fn.jqte=function(t){function l(e,t,n,r,i){var s=f.length+1;return f.push({name:e,cls:s,command:t,key:n,tag:r,emphasis:i})}var n=[{title:"Text Format"},{title:"Font Size"},{title:"Color"},{title:"Bold",hotkey:"B"},{title:"Italic",hotkey:"I"},{title:"Underline",hotkey:"U"},{title:"Ordered List",hotkey:"."},{title:"Unordered List",hotkey:","},{title:"Subscript",hotkey:"down arrow"},{title:"Superscript",hotkey:"up arrow"},{title:"Outdent",hotkey:"left arrow"},{title:"Indent",hotkey:"right arrow"},{title:"Justify Left"},{title:"Justify Center"},{title:"Justify Right"},{title:"Strike Through",hotkey:"K"},{title:"Add Link",hotkey:"L"},{title:"Remove Link"},{title:"Cleaner Style",hotkey:"Delete"},{title:"Horizontal Rule",hotkey:"H"},{title:"Source"}];var r=[["p","Normal"],["h1","Header 1"],["h2","Header 2"],["h3","Header 3"],["h4","Header 4"],["h5","Header 5"],["h6","Header 6"],["pre","Preformatted"]];var i=["10","12","16","18","20","24","28"];var s=["0,0,0","68,68,68","102,102,102","153,153,153","204,204,204","238,238,238","243,243,243","255,255,255",null,"255,0,0","255,153,0","255,255,0","0,255,0","0,255,255","0,0,255","153,0,255","255,0,255",null,"244,204,204","252,229,205","255,242,204","217,234,211","208,224,227","207,226,243","217,210,233","234,209,220","234,153,153","249,203,156","255,229,153","182,215,168","162,196,201","159,197,232","180,167,214","213,166,189","224,102,102","246,178,107","255,217,102","147,196,125","118,165,175","111,168,220","142,124,195","194,123,160","204,0,0","230,145,56","241,194,50","106,168,79","69,129,142","61,133,198","103,78,167","166,77,121","153,0,0","180,95,6","191,144,0","56,118,29","19,79,92","11,83,148","53,28,117","116,27,71","102,0,0","120,63,4","127,96,0","39,78,19","12,52,61","7,55,99","32,18,77","76,17,48"];var o=["Web Address","E-mail Address","Picture URL"];var u=e.extend({status:true,css:"jqte",title:true,titletext:n,button:"OK",format:true,formats:r,fsize:true,fsizes:i,funit:"px",color:true,linktypes:o,b:true,i:true,u:true,ol:true,ul:true,sub:true,sup:true,outdent:true,indent:true,left:true,center:true,right:true,strike:true,link:true,unlink:true,remove:true,rule:true,source:true,placeholder:false,br:true,p:true,change:"",focus:"",blur:""},t);e.fn.jqteVal=function(t){e(this).closest("."+u.css).find("."+u.css+"_editor").html(t)};var a=navigator.userAgent.toLowerCase();if(/msie [1-7]./.test(a))u.title=false;var f=[];l("format","formats","","",false);l("fsize","fSize","","",false);l("color","colors","","",false);l("b","Bold","B",["b","strong"],true);l("i","Italic","I",["i","em"],true);l("u","Underline","U",["u"],true);l("ol","insertorderedlist","¾",["ol"],true);l("ul","insertunorderedlist","¼",["ul"],true);l("sub","subscript","(",["sub"],true);l("sup","superscript","&",["sup"],true);l("outdent","outdent","%",["blockquote"],false);l("indent","indent","'",["blockquote"],true);l("left","justifyLeft","","",false);l("center","justifyCenter","","",false);l("right","justifyRight","","",false);l("strike","strikeThrough","K",["strike"],true);l("link","linkcreator","L",["a"],true);l("unlink","unlink","",["a"],false);l("remove","removeformat",".","",false);l("rule","inserthorizontalrule","H",["hr"],false);l("source","displaysource","","",false);return this.each(function(){function B(){if(window.getSelection)return window.getSelection();else if(document.selection&&document.selection.createRange&&document.selection.type!="None")return document.selection.createRange()}function j(e,t){var n,r=B();if(window.getSelection){if(r.anchorNode&&r.getRangeAt)n=r.getRangeAt(0);if(n){r.removeAllRanges();r.addRange(n)}if(!a.match(/msie/))document.execCommand("StyleWithCSS",false,false);document.execCommand(e,false,t)}else if(document.selection&&document.selection.createRange&&document.selection.type!="None"){n=document.selection.createRange();n.execCommand(e,false,t)}q(false,false)}function F(t,n,r){if(v.not(":focus"))v.focus();if(window.getSelection){var i=B(),s,o,u;if(i.anchorNode&&i.getRangeAt){s=i.getRangeAt(0);o=document.createElement(t);e(o).attr(n,r);u=s.extractContents();o.appendChild(u);s.insertNode(o);i.removeAllRanges();if(n=="style")q(e(o),r);else q(e(o),false)}}else if(document.selection&&document.selection.createRange&&document.selection.type!="None"){var a=document.selection.createRange();var f=a.htmlText;var l="<"+t+" "+n+'="'+r+'">'+f+"";document.selection.createRange().pasteHTML(l)}}function q(e,t){var n=I();n=n?n:e;if(n&&t==false){if(n.parent().is("[style]"))n.attr("style",n.parent().attr("style"));if(n.is("[style]"))n.find("*").attr("style",n.attr("style"))}else if(e&&t&&e.is("[style]")){var r=t.split(";");r=r[0].split(":");if(e.is("[style*="+r[0]+"]"))e.find("*").css(r[0],r[1]);R(e)}}function R(t){if(t){var t=t[0];if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(t);n.select()}else if(window.getSelection){var r=window.getSelection();var n=document.createRange();if(t!="undefined"&&t!=null){n.selectNodeContents(t);r.removeAllRanges();r.addRange(n);if(e(t).is(":empty")){e(t).append(" ");R(e(t))}}}}}function U(){if(!p.data("sourceOpened")){var t=I();var n="http://";W(true);if(t){var r=t.prop("tagName").toLowerCase();if(r=="a"&&t.is("[href]")){n=t.attr("href");t.attr(S,"")}else F("a",S,"")}else y.val(n).focus();g.click(function(t){if(e(t.target).hasClass(u.css+"_linktypetext")||e(t.target).hasClass(u.css+"_linktypearrow"))X(true)});w.find("a").click(function(){var t=e(this).attr(u.css+"-linktype");w.data("linktype",t);E.find("."+u.css+"_linktypetext").html(w.find("a:eq("+w.data("linktype")+")").text());V(n);X()});V(n);y.focus().val(n).bind("keypress keyup",function(e){if(e.keyCode==13){z(h.find("["+S+"]"));return false}});b.click(function(){z(h.find("["+S+"]"))})}else W(false)}function z(t){y.focus();R(t);t.removeAttr(S);if(w.data("linktype")!="2")j("createlink",y.val());else{j("insertImage",y.val());v.find("img").each(function(){var t=e(this).prev("a");var n=e(this).next("a");if(t.length>0&&t.html()=="")t.remove();else if(n.length>0&&n.html()=="")n.remove()})}W();v.trigger("change")}function W(e){Q("["+S+"]:not([href])");h.find("["+S+"][href]").removeAttr(S);if(e){p.data("linkOpened",true);d.show()}else{p.data("linkOpened",false);d.hide()}X()}function X(e){if(e)w.show();else w.hide()}function V(e){var t=w.data("linktype");if(t=="1"&&(y.val()=="http://"||y.is("[value^=http://]")||!y.is("[value^=mailto]")))y.val("mailto:");else if(t!="1"&&!y.is("[value^=http://]"))y.val("http://");else y.val(e)}function J(t){if(!p.data("sourceOpened")){if(t=="fSize")styleField=P;else if(t=="colors")styleField=H;K(styleField,true);styleField.find("a").unbind("click").click(function(){var n=e(this).attr(u.css+"-styleval");if(t=="fSize"){styleType="font-size";n=n+u.funit}else if(t=="colors"){styleType="color";n="rgb("+n+")"}var r=G(styleType);F("span","style",styleType+":"+n+";"+r);K("",false);e("."+u.css+"_title").remove();v.trigger("change")})}else K(styleField,false);W(false)}function K(e,t){var n="",r=[{d:"fsizeOpened",f:P},{d:"cpallOpened",f:H}];if(e!=""){for(var i=0;i");Z(false)})}function Z(e){var t=e?true:false;t=e&&D.data("status")?true:false;if(t||!e)D.data("status",false).slideUp(200);else D.data("status",true).slideDown(200)}function et(e){var t=D.closest("."+u.css+"_tool").find("."+u.css+"_tool_label").find("."+u.css+"_tool_text");if(e.length>10)e=e.substr(0,7)+"...";t.html(e)}function tt(e){var t,n,r;t=e.replace(/\n/gim,"").replace(/\r/gim,"").replace(/\t/gim,"").replace(/ /gim," ");n=[/\(.*?)<\/span><\/span>/gim,/<(\w*[^p])\s*[^\/>]*>\s*<\/\1>/gim,/\(.*?)\<\/div>/gim,/\(.*?)\<\/strong>/gim,/\(.*?)\<\/em>/gim];r=["$3","","$2

","$2","$2"];for(A=0;A<5;A++){for(var i=0;i(.*?)\<\/p>/ig,"
$2");if(!u.br){n=[/\
(.*?)/ig,/\(.*?)/ig];r=["

$1

","

$1

"];for(var i=0;i(.*?)\<\/p>/ig,"
$1
");return t}function nt(){var e=v.text()==""&&v.html().length<12?"":v.html();l.val(tt(e))}function rt(){v.html(tt(l.val()))}function it(t){var n=false,r=I(),i;if(r){e.each(t,function(t,s){i=r.prop("tagName").toLowerCase();if(i==s)n=true;else{r.parents().each(function(){i=e(this).prop("tagName").toLowerCase();if(i==s)n=true})}});return n}else return false}function st(t){for(var n=0;n0&&it(s)){et(u.formats[i][1]);r=true;break}}if(!r)et(u.formats[0][1])}K("",false);Z(false)}if(!e(this).data("jqte")||e(this).data("jqte")==null||e(this).data("jqte")=="undefined")e(this).data("jqte",true);else e(this).data("jqte",false);if(!u.status||!e(this).data("jqte")){if(e(this).closest("."+u.css).length>0){var t=e(this).closest("."+u.css).find("."+u.css+"_editor").html();var n="";e(e(this)[0].attributes).each(function(){if(this.nodeName!="style")n=n+" "+this.nodeName+'="'+this.nodeValue+'"'});var r=e(this).is("[data-origin]")&&e(this).attr("data-origin")!=""?e(this).attr("data-origin"):"textarea";var i=">"+t;if(r=="input"||r=="option"){t=t.replace(/"/g,""").replace(/'/g,"'").replace(//g,">");i='value="'+t+'">'}var o=e(this).clone();e(this).data("jqte",false).closest("."+u.css).before(o).remove();o.replaceWith("<"+r+n+i+"")}return}var l=e(this);var r=e(this).prop("tagName").toLowerCase();e(this).attr("data-origin",r);var c=e(this).is("[value]")||r=="textarea"?e(this).val():e(this).html();c=c.replace(/"/g,'"').replace(/'/g,"'").replace(//g,">").replace(/&/g,"&");e(this).after('
');var h=e(this).next("."+u.css);h.html('
');var p=h.find("."+u.css+"_toolbar");var d=h.find("."+u.css+"_linkform");var v=h.find("."+u.css+"_editor");var m=u.css+"_tool_depressed";d.append('
'+u.button+'
');var g=d.find("."+u.css+"_linktypeselect");var y=d.find("."+u.css+"_linkinput");var b=d.find("."+u.css+"_linkbutton");g.append('
');var w=g.find("."+u.css+"_linktypes");var E=g.find("."+u.css+"_linktypeview");var S=u.css+"-setlink";v.after('
');var x=h.find("."+u.css+"_source");l.appendTo(x);if(r!="textarea"){var n="";e(l[0].attributes).each(function(){if(this.nodeName!="type"&&this.nodeName!="value")n=n+" "+this.nodeName+'="'+this.nodeValue+'"'});l.replaceWith("");l=x.find("textarea")}v.attr("contenteditable","true").html(c);for(var T=0;T0?u.titletext[T].hotkey!=null&&u.titletext[T].hotkey!="undefined"&&u.titletext[T].hotkey!=""?" (Ctrl+"+u.titletext[T].hotkey+")":"":"";var C=u.titletext[T].title!=null&&u.titletext[T].title!="undefined"&&u.titletext[T].title!=""?u.titletext[T].title+N:"";p.append('
');p.find("."+u.css+"_tool[data-tool="+T+"]").data({tag:f[T].tag,command:f[T].command,emphasis:f[T].emphasis,title:C});if(f[T].name=="format"&&e.isArray(u.formats)){var k=u.formats[0][1].length>0&&u.formats[0][1]!="undefined"?u.formats[0][1]:"";p.find("."+u.css+"_tool_"+f[T].cls).find("."+u.css+"_tool_icon").replaceWith(''+k+'');p.find("."+u.css+"_tool_"+f[T].cls).append('
');for(var L=0;L'+u.formats[L][1]+"")}p.find("."+u.css+"_formats").data("status",false)}else if(f[T].name=="fsize"&&e.isArray(u.fsizes)){p.find("."+u.css+"_tool_"+f[T].cls).append('
');for(var L=0;LAbcdefgh...')}}else if(f[T].name=="color"&&e.isArray(s)){p.find("."+u.css+"_tool_"+f[T].cls).append('
');for(var A=0;A');else p.find("."+u.css+"_cpalette").append('
')}}}}w.data("linktype","0");for(var T=0;T<3;T++){w.append("'+u.linktypes[T]+"");E.html('
'+w.find("a:eq("+w.data("linktype")+")").text()+"
")}var O="";if(/msie/.test(a))O="-ms-";else if(/chrome/.test(a)||/safari/.test(a)||/yandex/.test(a))O="-webkit-";else if(/mozilla/.test(a))O="-moz-";else if(/opera/.test(a))O="-o-";else if(/konqueror/.test(a))O="-khtml-";else O="";if(u.placeholder&&u.placeholder!=""){h.prepend('
'+u.placeholder+"
");var M=h.find("."+u.css+"_placeholder");M.click(function(){v.focus()})}h.find("[unselectable]").css(O+"user-select","none").addClass("unselectable").attr("unselectable","on").on("selectstart mousedown",false);var _=p.find("."+u.css+"_tool");var D=p.find("."+u.css+"_formats");var P=p.find("."+u.css+"_fontsizes");var H=p.find("."+u.css+"_cpalette");var I=function(){var t,n;if(window.getSelection){n=getSelection();t=n.anchorNode}if(!t&&document.selection&&document.selection.createRange&&document.selection.type!="None"){n=document.selection;var r=n.getRangeAt?n.getRangeAt(0):n.createRange();t=r.commonAncestorContainer?r.commonAncestorContainer:r.parentElement?r.parentElement():r.item(0)}if(t){return t.nodeName=="#text"?e(t.parentNode):e(t)}else return false};_.unbind("click").click(function(t){if(e(this).data("command")=="displaysource"&&!p.data("sourceOpened")){p.find("."+u.css+"_tool").addClass(u.css+"_hiddenField");e(this).removeClass(u.css+"_hiddenField");p.data("sourceOpened",true);l.css("height",v.outerHeight());x.removeClass(u.css+"_hiddenField");v.addClass(u.css+"_hiddenField");l.focus();W(false);K("",false);Z();if(u.placeholder&&u.placeholder!="")M.hide()}else{if(!p.data("sourceOpened")){if(e(this).data("command")=="linkcreator"){if(!p.data("linkOpened"))U();else{W(false);Z(false)}}else if(e(this).data("command")=="formats"){if(e(this).data("command")=="formats"&&!e(t.target).hasClass(u.css+"_format"))Y();K("",false);if(v.not(":focus"))v.focus()}else if(e(this).data("command")=="fSize"||e(this).data("command")=="colors"){if(e(this).data("command")=="fSize"&&!e(t.target).hasClass(u.css+"_fontsize")||e(this).data("command")=="colors"&&!e(t.target).hasClass(u.css+"_color"))J(e(this).data("command"));Z(false);if(v.not(":focus"))v.focus()}else{if(v.not(":focus"))v.focus();j(e(this).data("command"),null);K("",false);Z(false);X();e(this).data("emphasis")==true&&!e(this).hasClass(m)?e(this).addClass(m):e(this).removeClass(m);x.addClass(u.css+"_hiddenField");v.removeClass(u.css+"_hiddenField")}}else{p.data("sourceOpened",false);p.find("."+u.css+"_tool").removeClass(u.css+"_hiddenField");x.addClass(u.css+"_hiddenField");v.removeClass(u.css+"_hiddenField")}if(u.placeholder&&u.placeholder!="")v.html()!=""?M.hide():M.show()}v.trigger("change")}).hover(function(t){if(u.title&&e(this).data("title")!=""&&(e(t.target).hasClass(u.css+"_tool")||e(t.target).hasClass(u.css+"_tool_icon"))){e("."+u.css+"_title").remove();h.append('
'+e(this).data("title")+"
");var n=e("."+u.css+"_title:first");var r=n.find("."+u.css+"_titleArrowIcon");var i=e(this).position();var s=i.left+e(this).outerWidth()-n.outerWidth()/2-e(this).outerWidth()/2;var o=i.top+e(this).outerHeight()+5;n.delay(400).css({top:o,left:s}).fadeIn(200)}},function(){e("."+u.css+"_title").remove()});var ot=null;v.bind("keypress keyup keydown drop cut copy paste DOMCharacterDataModified DOMSubtreeModified",function(){if(!p.data("sourceOpened"))e(this).trigger("change");X();if(e.isFunction(u.change))u.change();if(u.placeholder&&u.placeholder!="")e(this).text()!=""?M.hide():M.show()}).bind("change",function(){if(!p.data("sourceOpened")){clearTimeout(ot);ot=setTimeout(nt,10)}}).keydown(function(e){if(e.ctrlKey){for(var t=0;t +<?php print($title); ?> + + + + + + +
+
+
+ +
+
+
+ +
+
+
+ + + +

Registration Complete!

+

Now you can start

+ Get Started Now! +

+
+
+ +
+
+
+

Entertain this Thought

+
+ +
+

Details

+ +
+
+
+ + \ No newline at end of file diff --git a/lib/user/footer.php b/lib/user/footer.php new file mode 100644 index 0000000..8514000 --- /dev/null +++ b/lib/user/footer.php @@ -0,0 +1,31 @@ +
+
+
+ +
+

sub footer

+
+
+
+
+ +
+
+
+
+

Copyright © Your Website 2014

+
+
+ +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/lib/user/index.php b/lib/user/index.php new file mode 100644 index 0000000..db77ba6 --- /dev/null +++ b/lib/user/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/lib/user/login.php b/lib/user/login.php new file mode 100644 index 0000000..d174a7c --- /dev/null +++ b/lib/user/login.php @@ -0,0 +1,46 @@ + +<?php print($title); ?> + + + + + + +
+
+
+ +
+
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/lib/user/logout.php b/lib/user/logout.php new file mode 100644 index 0000000..49a782c --- /dev/null +++ b/lib/user/logout.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/lib/user/myaccount.php b/lib/user/myaccount.php new file mode 100644 index 0000000..89edf83 --- /dev/null +++ b/lib/user/myaccount.php @@ -0,0 +1,118 @@ + +<?php print($title); ?> + + + + + + +
+
+
+ +
+
+
+ +
+
+
+ +prepare("SELECT * FROM tsw_members WHERE idm = :idm"); +$stmt->execute(array( ':idm' => $idm )); + + if ($stmt->rowCount() > 0){ + $row = $stmt->fetch(PDO::FETCH_ASSOC); + $firstname = $row['firstname']; + $username = $row['username']; + $email = $row['email']; + } else { echo "There was a problem getting your account information."; $errors = $stmt->errorInfo(); + echo($errors[2]); } +?> + +

Member only page - Welcome

+

Logout   |  

+
+
+
+
+ +
+
+ +
+
+
+ +

+
+
+
+
+
Badge
+
+ + badge or avatar +
+
+
+ + + + +
Email:
Username:
Current Status:
+
+
+
+ +
+ + + + + +
+ +
+
img
+
img
+
img
+
+ +
+
+ +

+ \ No newline at end of file diff --git a/lib/user/register.php b/lib/user/register.php new file mode 100644 index 0000000..6f672fa --- /dev/null +++ b/lib/user/register.php @@ -0,0 +1,36 @@ + +<?php print($title); ?> + + + + + + +
+
+
+ +
+
+
+ +
+
+
+ + + +
+
+
+ + + + + \ No newline at end of file diff --git a/lib/user/registration.php b/lib/user/registration.php new file mode 100644 index 0000000..6f38ea6 --- /dev/null +++ b/lib/user/registration.php @@ -0,0 +1,36 @@ + +<?php print($title); ?> + + + + + + +
+
+
+

+
+
+
+ +
+
+
+ +
+
+

Registration information

+
More Info goes here
+
+ +
+
+

+ \ No newline at end of file diff --git a/lib/user/reset.php b/lib/user/reset.php new file mode 100644 index 0000000..7dd5cd4 --- /dev/null +++ b/lib/user/reset.php @@ -0,0 +1,49 @@ + +<?php print($title); ?> + + + + + + +
+
+
+ +
+
+
+ +
+
+
+

Member only page - Welcome

+

Logout

+
+
+
+
+ +
+
+
+ + + +
+ +
+
img
+
img
+
img
+
+ +
+
+ \ No newline at end of file diff --git a/lib/user/restrict.php b/lib/user/restrict.php new file mode 100644 index 0000000..5d21502 --- /dev/null +++ b/lib/user/restrict.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/lib/user/tsw-validation.js b/lib/user/tsw-validation.js new file mode 100644 index 0000000..dc99715 --- /dev/null +++ b/lib/user/tsw-validation.js @@ -0,0 +1,87 @@ +function checkPass() +{ + //Store the password field objects into variables ... + var pass1 = document.getElementById('pass1'); + var pass2 = document.getElementById('pass2'); + //Store the Confimation Message Object ... + var message = document.getElementById('confirmMessage'); + //Set the colors we will be using ... + var goodColor = "#66cc66"; + var badColor = "#ff6666"; + //Compare the values in the password field + //and the confirmation field + if(pass1.value == pass2.value){ + //The passwords match. + //Set the color to the good color and inform + //the user that they have entered the correct password + pass2.style.backgroundColor = goodColor; + message.style.color = goodColor; + message.innerHTML = "Passwords Match" + }else{ + //The passwords do not match. + //Set the color to the bad color and + //notify the user. + pass2.style.backgroundColor = badColor; + message.style.color = badColor; + message.innerHTML = "Passwords Do Not Match!" + } +} +function validatephone(phone) +{ + var maintainplus = ''; + var numval = phone.value + if ( numval.charAt(0)=='+' ) + { + var maintainplus = ''; + } + curphonevar = numval.replace(/[\\A-Za-z!"£$%^&\,*+_={};:'@#~,.Š\/<>?|`¬\]\[]/g,''); + phone.value = maintainplus + curphonevar; + var maintainplus = ''; + phone.focus; +} +// validates text only +function Validate(txt) { + txt.value = txt.value.replace(/[^a-zA-Z-'\n\r.]+/g, ''); +} +// validate email +function email_validate(email) +{ +var regMail = /^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/; + + if(regMail.test(email) == false) + { + document.getElementById("status").innerHTML = "Email address is not valid yet."; + } + else + { + document.getElementById("status").innerHTML = "Thanks, you have entered a valid Email address!"; + } +} +// validate date of birth +function dob_validate(dob) +{ +var regDOB = /^(\d{1,2})[-\/](\d{1,2})[-\/](\d{4})$/; + + if(regDOB.test(dob) == false) + { + document.getElementById("statusDOB").innerHTML = "DOB is only used to verify your age."; + } + else + { + document.getElementById("statusDOB").innerHTML = "Thanks, you have entered a valid DOB!"; + } +} +// validate address +function add_validate(address) +{ +var regAdd = /^(?=.*\d)[a-zA-Z\s\d\/]+$/; + + if(regAdd.test(address) == false) + { + document.getElementById("statusAdd").innerHTML = "Address is not valid yet."; + } + else + { + document.getElementById("statusAdd").innerHTML = "Thanks, Address looks valid!"; + } +} diff --git a/lib/user/tsw_activate.php b/lib/user/tsw_activate.php new file mode 100644 index 0000000..d264f26 --- /dev/null +++ b/lib/user/tsw_activate.php @@ -0,0 +1,55 @@ +prepare("SELECT username, active, email FROM tsw_members + WHERE username = :username AND active = :default + "); + $stmt->bindValue(':username', $username); + $stmt->bindValue(':default', $default); + $stmt->execute(); + if ($stmt->rowCount() > 0){ + $row = $stmt->fetch(PDO::FETCH_ASSOC); + $email = $row['email']; + } + + // query to update `activate` to a 1 Boolean + $stmt = $dbh->prepare("UPDATE tsw_members + SET active = :active + WHERE username = :username AND email = :email + "); + $stmt->bindValue(':active', $active); + $stmt->bindValue(':username', $username); + $stmt->bindValue(':email', $email); + + if ($stmt->execute()) + { + +?> + +

Registration Complete

+

Thank you

+

Email confirmed and account activated.

+

format('Y-m-d'); echo $dateformat; ?>

+
+

Let's Start

+
+ +This email has already been used for a Registration.

"; + echo "

Please try another email address.

"; + //close instance of $dbh + } //$dbh = null; + +} +?> \ No newline at end of file diff --git a/lib/user/tsw_change.php b/lib/user/tsw_change.php new file mode 100644 index 0000000..385aa21 --- /dev/null +++ b/lib/user/tsw_change.php @@ -0,0 +1,75 @@ +prepare("SELECT * FROM tsw_members WHERE idm = :idm AND password = :password"); + $stmt->bindValue(':idm', $user_id); + $stmt->bindValue(':password', $old_password); + $stmt->execute(); + + if ($stmt->rowCount() > 0){ + $email = $row['email']; + $username = $row['username']; + $firstname = $row['firstname']; + } else { echo "There was a problem entering your original password."; $errors = $stmt->errorInfo(); + echo($errors[2]); } + +/** + * @user_id + * and update if-valid + */ + $user_id = $_SESSION['user_id']; + $stmt = $dbh->prepare("UPDATE tsw_members SET password = :password WHERE idm = :idm"); + $stmt->execute(array(':idm' => $user_id, ':password' => $new_password )); + if(!$stmt) { + esc("There was a problem updating new password."); $errors = $stmt->errorInfo(); + esc(($errors[2])); + } else { + + include_once '../../inc/settings.php'; + + $server = $server_name; + $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); + $host = $_SERVER['HTTP_HOST']; + $sendemails = array('$server_email', $email); + foreach ($sendemails as $sendemail) { + + $message = +"You requested a new password for your account at $server_name. This is a notification to such and if you did not request a password change please contact your website administrator. \n\n +First Name: $firstname \n +User Name: $username \n +User Email: $email \n +_____________________________________________ +Thank you. This is an automated response. PLEASE DO NOT REPLY. +"; + + mail( $sendemail, "Password Reset", $message, + "From: \"Auto-Response\" \r\n" . + "X-Mailer: PHP/" . phpversion()); + unset($_SESSION['ckey']); + } + print("

Your password change is complete!


+ "); + + echo "
Your request is processed"; + echo "
"; + echo "Data entered - "; + echo date("m/d/y"); + echo "
"; + echo "

If this is YOUR CORRECT email: "; + echo ""; + echo $email; + echo "You will receive a confirmation.

"; + + } +} + +?> + +

\ No newline at end of file diff --git a/lib/user/tsw_myaccount.php b/lib/user/tsw_myaccount.php new file mode 100644 index 0000000..1d6d9e8 --- /dev/null +++ b/lib/user/tsw_myaccount.php @@ -0,0 +1,79 @@ + + +

Back to home page | +Change Password | +Forgot Password

+
+
+ +
+

Forgot Password

+
+
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+ + +
+
+ +
+

Change Password

+
+
+
+ + + +
+
+
+
+
+
+
+


+ + *

+ +
+
+
+
+


+ + * +

+ +
+
+
+
+
+ + + +
+
+ + + +
\ No newline at end of file diff --git a/lib/user/tsw_mylogin.php b/lib/user/tsw_mylogin.php new file mode 100644 index 0000000..4174fd1 --- /dev/null +++ b/lib/user/tsw_mylogin.php @@ -0,0 +1,83 @@ +
+
+ Please Login"); } else { esc("Youare now logged in."); } ?> +

Back to home page

+
+ +
+

+
+
+
+

+
+ + +
+
+
+

+
+
+
+
+
+ + + +
+ +prepare('SELECT * FROM tsw_members WHERE username = :username AND password = :password AND active = :active'); + +$stmt->execute(array( +':username' => $username, +':password' => $password, +':active' => $active +)); + if ($stmt->rowCount() > 0){ + $row = $stmt->fetch(PDO::FETCH_ASSOC); + + $firstname = $row['firstname']; + $idm = $row['idm']; + $email = $row['email']; + + $email_stripped = alpha_only($email); + $date_session = date('mdY-Hi'); + $user_session = $email_stripped; + + $_SESSION['user_session'] = "$user_session$date_session"; // used for uploads identifier + $_SESSION['firstname'] = $firstname; // for displaying name + $_SESSION['user_id'] = $idm; // for user id fetching if needed + +redirect('myaccount.php'); +} else { +esc('Wrong username or password.'); +} + + +?> + + \ No newline at end of file diff --git a/lib/user/tsw_register.php b/lib/user/tsw_register.php new file mode 100644 index 0000000..5186841 --- /dev/null +++ b/lib/user/tsw_register.php @@ -0,0 +1,105 @@ +prepare("SELECT email FROM tsw_members + WHERE email = :email + "); + $query->bindValue(':email', $email); + $query->execute(); + if($query->rowCount() > 0) + { + ?>

This email has already been registered.

+

Please choose a new email. Go Back

Thank you for registering.

'); + +//include '../../inc/dbh.php'; + +// new query to insert data + +$sql = ("INSERT INTO tsw_members ( username, password, phonenumber, firstname, lastname, email, dateregistered, active ) + VALUES ( :username, :password, :phonenumber, :firstname, :lastname, :email, :dateregistered, :active ) + "); + +$stmt = $dbh->prepare($sql); +$stmt->bindValue(':username', $username); +$stmt->bindValue(':password', $password); +$stmt->bindValue(':phonenumber', $phonenumber); +$stmt->bindValue(':firstname', $firstname); +$stmt->bindValue(':lastname', $lastname); +$stmt->bindValue(':email', $email); +$stmt->bindValue(':dateregistered', $dateregistered); +$stmt->bindValue(':active', $active); +//$stmt->bindValue(':level', $level); + + //Execute the statement and insert the new account. + $insert = $stmt->execute(); + + //If the signup process is successful. + if( $insert !==false ) { + + $server = $server_name; + $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); + $host = $_SERVER['HTTP_HOST']; + $sendemails = array('$server_email', $email); + foreach ($sendemails as $sendemail) { + + $message = +"You are almost finished. You MUST complete your activation and registion with $server. Please click on the activation link below to complete the process:\n\n +First Name: $firstname \n +Last Name: $lastname \n +User Email: $email \n +____________________________________________ +*** ACTIVATION LINK ***** \n +Activation Link: http://$host$uri/activate.php?username=$_POST[username]&active=1 \n\n +_____________________________________________ +Thank you. This is an automated response. PLEASE DO NOT REPLY. +"; + + mail( $sendemail, " Registration", $message, + "From: \"Auto-Response\" \r\n" . + "X-Mailer: PHP/" . phpversion()); + unset($_SESSION['ckey']); + } + echo("

You are almost complete!

Next step is to validate your email

An activation link has been sent to your email address with an activation link...
+ Be sure to check your spam folders. Validation process may take a few minutes.



+ "); + + echo "
Your registration is processed"; + echo "
"; + echo "Data entered - "; + echo date("m/d/y"); + echo "
"; + echo "

If this is YOUR CORRECT email: "; + echo ""; + echo $email; + echo " You will receive a confirmation ONLY if your information is valid.

"; + + + } else { echo "There was a problem entering your information."; $errors = $stmt->errorInfo(); + echo($errors[2]); } + + } // ends check dup emails + +} // ends if reg_submit +?> diff --git a/lib/user/tsw_registration.php b/lib/user/tsw_registration.php new file mode 100644 index 0000000..3aaaf2b --- /dev/null +++ b/lib/user/tsw_registration.php @@ -0,0 +1,49 @@ +
+ +
+
+ Valid information is required to register. required * + +

*
+

+ +

*
+

+
+ +

*
+

+
+ +

*
+

+
+ +

*
+

+
+ +

*
+

+

*
+ +

+ + + + +
+ + * + +

+ +
You will receive an email to complete the registration and validation process.
+
Be sure to check your spam folders. Member validation process may take a few minutes.
+ + +
+
+ diff --git a/lib/user/tsw_reset.php b/lib/user/tsw_reset.php new file mode 100644 index 0000000..7bbe33b --- /dev/null +++ b/lib/user/tsw_reset.php @@ -0,0 +1,72 @@ +prepare("SELECT * FROM tsw_members WHERE email = :email"); +$stmt->execute(array( ':email' => $email )); + + if ($stmt->rowCount() > 0){ + $row = $stmt->fetch(PDO::FETCH_ASSOC); + $firstname = $row['firstname']; + $username = $row['username']; + } else { echo "There was a problem entering your account information."; $errors = $stmt->errorInfo(); + echo($errors[2]); } +/** + * @revalidate $username + $email + * and update new token if-match + */ + $token = bin2hex(openssl_random_pseudo_bytes(16)); + $stmt = $dbh->prepare("UPDATE tsw_members SET resetToken = :token WHERE email = :email"); + $stmt->execute(array(':token' => $token, ':email' => $email )); + if(!$stmt) { + echo "There was a problem updating security token."; $errors = $stmt->errorInfo(); + echo($errors[2]); + } else { + + include_once 'inc/settings.php'; + + $server = $server_name; + $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); + $host = $_SERVER['HTTP_HOST']; + $sendemails = array('$server_email', $email); + foreach ($sendemails as $sendemail) { + + $message = +"You requested a new password reset for your account at $server_name. Please click on the reset link below to complete the process:\n\n +First Name: $firstname \n +User Name: $username \n +User Email: $email \n +____________________________________________ +*** RESET LINK ***** \n +Reset Password Link: http://$host$uri/reset.php?username=$username&resetToken=$token \n\n +_____________________________________________ +Thank you. This is an automated response. PLEASE DO NOT REPLY. +"; + + mail( $sendemail, "Password Reset", $message, + "From: \"Auto-Response\" \r\n" . + "X-Mailer: PHP/" . phpversion()); + unset($_SESSION['ckey']); + } + echo("

You are almost complete!

Next step is check your email

A reset link has been sent to your email address with a password reset link...
Be sure to check your spam folders. Validation process may take a few minutes.



+ "); + + echo "
Your request is processed"; + echo "
"; + echo "Data entered - "; + echo date("m/d/y"); + echo "
"; + echo "

If this is YOUR CORRECT email: "; + echo ""; + echo $email; + echo " You will receive a confirmation ONLY if your information is valid.

"; + + } +} + +?> + +

\ No newline at end of file diff --git a/lib/user/tsw_resetPassword.php b/lib/user/tsw_resetPassword.php new file mode 100644 index 0000000..21c5cfe --- /dev/null +++ b/lib/user/tsw_resetPassword.php @@ -0,0 +1,63 @@ +prepare('SELECT resetToken FROM tsw_members WHERE resetToken = :token'); + $stmt->execute(array(':token' => $token)); + + if ($stmt->rowCount() > 0){ +?> + +
+

Change Password

+ +
+
+
+


+ *

+
+
+
+
+


+ * +

+
+
+ +
+
+
+
+
+
+
+ +Invalid token provided, please use the link provided in the reset email.'); + } + +?> +prepare("UPDATE tsw_members SET password = :new_password WHERE resetToken = :token"); + $stmt->execute(array( + ':new_password' => $new_password, + ':token' => $token + )); + //redirect to index page + redirect('login.php'); + exit; + } +} +?> + +

\ No newline at end of file diff --git a/nav.php b/nav.php new file mode 100644 index 0000000..c6b9571 --- /dev/null +++ b/nav.php @@ -0,0 +1,25 @@ + diff --git a/respond.php b/respond.php new file mode 100644 index 0000000..06c4454 --- /dev/null +++ b/respond.php @@ -0,0 +1,146 @@ + + + + + + + Dev App for Looping Details + + + +
+ +
+
+
+ + + + + +prepare($sql); + + //Bind the values to the parameters + $stmt->bindValue(':idd_is', $idd_is); + $stmt->bindValue(':name', $name); + $stmt->bindValue(':email', $email); + $stmt->bindValue(':respond', $respond); + $stmt->bindValue(':date_respond', $date_respond); + + //Execute the statement and insert our values. + $inserted = $stmt->execute(); + if( $inserted ){ +?> +
+
+
+

Data entered

+
+
+ Response Created Successfully!
+ + + +

Back to Article

+
+
+
+ +

Cool Results

+ +

Entry added

+ View Home Page ← + +errorInfo()); + } +} + +?> +
+
+
+ +
+
+ +
+

Back to Article

+
+ +
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+
+
+
+ img +
+
+ img +
+
+ img +
+
+ +
+
+ \ No newline at end of file diff --git a/response.php b/response.php new file mode 100644 index 0000000..b2cc0a5 --- /dev/null +++ b/response.php @@ -0,0 +1,44 @@ +
+
+
+
    +prepare('SELECT * FROM tsw_respond WHERE idd_is = :idd_is AND prv = :prv_int'); + if( $stmt->execute( array(':idd_is' => $idd_is, ':prv_int' => $prv_int ))) { + // loop all open responses + while( $row = $stmt->fetch(PDO::FETCH_ASSOC) ) { +?> + +
  1. +
    +

    +

    +
    +
    +
    + +

    + + +
    +
    +
  2. + + + + +
+
+
\ No newline at end of file diff --git a/search.php b/search.php new file mode 100644 index 0000000..c905332 --- /dev/null +++ b/search.php @@ -0,0 +1,111 @@ + + +Dev App for Looping Details + + + + + + +
+
+
+ +
+
+
+ +
+
+ +
+
+prepare("select * from tsw_details where title LIKE '%$search%' OR detail LIKE '%$search%' LIMIT 0 , 10"); + $query->bindValue(1, "%$search%", PDO::PARAM_STR); + $query->execute(); + if (!$query->rowCount() == 0) { + esc( "Search found :
" ); + esc( "" ); + esc( "" ); + + while ($results = $query->fetch()) { + ?>" ); + } // ends while loop + esc( "
viewtitleshort
" ); + esc( $results['title'] ); + esc( "" ); + esc( $results['detail'] ); + esc( "
" ); + } else { + ?>

Nothing found - Try the list below

+
+
+

Most Recent Entries

+ + + + + + + +query($sql); + + // Parse returned data, and displays them + while($row = $result->fetch(PDO::FETCH_ASSOC)) { + + $idd_int = $row['idd']; + // make sure result is an interger + if (!filter_var($idd_int, FILTER_VALIDATE_INT) === false) { +?> + + + + + + + + + +
viewtitleauthordate in
view
+
+
+ + +
+
+ \ No newline at end of file diff --git a/theme-style.css b/theme-style.css new file mode 100644 index 0000000..6208149 --- /dev/null +++ b/theme-style.css @@ -0,0 +1,279 @@ +/** + =|= Details NanoCMS =|= + * Author: Larry Judd Oliver @tradesouthwest =|= http://tradesouthwest.com + * Contributors in readme.md file + * License in LICENSE.md file + * style-sheet requires Bootstrap 3.0 or higher + */ +/* Theme +======================================== */ +#detail-article{ + background: rgb( 250, 253, 251); + box-shadow: 0px 0px 2px rgba(0, 0, 0, .15); + min-height: 286px; + padding-top: 4px; + //padding-bottom: 5px; +} +#detail-article:nth-of-type(4):after{ + clear: both; +} +#detail-article .list-group:last-child { + border-bottom: 1px solid #ddd; +} +#detail-article .list-group { + max-height: 266px; + margin: 10px auto; + overflow: hidden; +} +.list-group-item { + line-height: .8582; + padding: 10px; +} + +#detail-article .list-group-item { + line-height: 1.125; + max-height: 3.875em; + margin-right: 16px; + padding-top: 4px; + padding-bottom: 3px; + overflow: hidden; + width: 100%; +} +#text_line { + background: #fffff9; + padding-top: 3px !important; +} + +#detail-article i.fa { + font-size: 1rem; + color: #e1e1e1; + position: absolute; + right: .825rem; + top: 5px; +} +#det-header { + color: rgb(64,124,194); + border-bottom: 1px solid rgb(205,205,215); +} +#det-header:hover { + text-decoration: none; + color: blue; +} +#detail-article #det-header i.fa.fa-spec { + /* eye in title */ + font-size: 1.67rem; + position: absolute; + top: 3px; + right: 6px; + padding: 3px; + color: rgb(64,124,194); + box-shadow: 2px 2px 3px rgba(205,205,215, .9); + background: #fff; + border-radius: 55px; +} +#detail-article a#website_url { + max-width: 210px; + display: block; + overflow: hidden; + margin: 0; + font-size: .825em; + clear: right; + white-space: nowrap; +} +#detail-article i.fa-det-link { + /* position external-link icon */ + position: absolute; + right: 8px; + top: 4px; +} +.detail-item a { + padding-bottom: 0; + margin-bottom: 1px; +} +.datein { + font-size: 1.24rem; + color: #777; + margin-bottom: -1px; +} +.footer { + /* Set the fixed height of the footer here */ + padding: 10px; + min-height: 80px; + background-color: rgb(248, 248, 248); +} +.det-list-container table thead tr th { + border-right: 1px dotted white; + padding-left: 9px; + font-weight: 300; + background: #affafa !important; +} +.det-list-container table td { + font-size: 1em; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding: 0 10px; +} +h1#nav-header-title { + font-size: 26px; + text-align: right; + text-shadow: 0px 1px 2px #fafafa; +} + +#grad-menu li a { + background-image: linear-gradient(#efefef, #fcfcfc, #ececec); + margin: 8px 2px 0 0; + border: thin solid #ddd; + border-radius: 5px; + padding: 11px; + font-weight: 400; +} +.grad-anchor{ + color: #2d2d2d !important; + text-shadow: 0px 0px 5px #ffffff !important; +} +#grad-menu a:hover{ + color: royalblue !important; +} +.navbar.navbar-default { + background-color: rgb(248, 248, 248); +} +.navbar-brand img{ + height: 42px; + position: relative; + top: -.412em; +} + +#btn-link { + min-width: 48px; +} + +.pagination { + width: 100%; + padding: 2px 3px; + background-color: #739993; +} +.pagination li a, +.pagination li span { + margin: 1px; + border: 1px solid #e8e8e8; +} +.panel-leftheading { + width: 42px; + padding: 10px 15px; + border-top-left-radius: 0px; + border-top-right-radius: 7px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 7px; + float: left; + height: auto; + position: absolute; + margin-top: 10px; + margin-bottom: 0px; + background-color: rgb( 247, 250, 248 ); + color: #084 +} +#panel-leftheading-2 { + margin-top: 0; +} +.panel-lefttitle { + margin-top: 0; + margin-bottom: 0; +} +.panel-rightbody { + float: left; + margin-left: 45px; + padding: 10px; + margin-top: 0; +} +.panel-title { + font-size: 1.75em; + color: #084; +} +header.panel-heading { + background-color: rgb( 250, 253, 251) !important; +} +footer.panel-footer { + background-color: rgb( 253, 251, 243) !important; +} +blockquote { + font-size: .938em; + font-style: italic; + font-weight: 400; + color: #626262; +} +.btn#wrap-text { + word-wrap: break-word; + white-space: normal !important; + text-align: left; +} +#respond-panel i.fa { + color: #084; +} +.btn.btn-natural { + background-color: #608f99; + color: #ffffff; + padding: 6px 12px; +} +#responses .container { max-width: 100%; display: block;} +#respond-panel{ margin: 1px auto; display: block; border: thin solid #fafafa; padding: 10px;} +#respond-panel .fa {margin-right: 12px; padding-bottom: 0; color: #91a8b5;} +.detail-item-respond{ border-left: 3px solid #e8e8e8;padding-left: 20px; } + +/* Magic for four box blocks +======================================== */ + @media screen and (max-width: 34em) +/* Used for computer screens, tablets, smart-phones etc. */ { + .col-sm-6 { + margin-left: 1.25rem; + #nav-header-title { + text-align: center !important; + float: none !important; + } + } + +/* Helpers +======================================== */ +#details-panel hr { + display: block; + padding-top: 10px; + float: left; +} +.blank-spc { + color: transparent; +} +.btn#wrap-text { + word-wrap: break-word; + white-space: normal !important; + text-align: left; +} +span.ruler { + width: 98%; + margin: 0 auto; + height: 1px; + display: block; + border-bottom: thin solid #ddd; + +clear: both; +} +.short { + + max-width: 160px; + overflow: hidden; + white-space: nowrap; + word-wrap: normal; +} +.textcenter{ + text-align: center !important; +} + +.nopadding { + padding: 0 !important; + margin: 0 !important; + padding-top: 5px !important; +} +#detailsSearch{ + margin: 4.4% 12px; +} + diff --git a/view-list.php b/view-list.php new file mode 100644 index 0000000..4453931 --- /dev/null +++ b/view-list.php @@ -0,0 +1,71 @@ + + +Dev App for Looping Details + + + + + +
+
+
+ +
+
+
+ +
+
+ +
+ +

Details

+
+ + + + + + + +query($sql); + + // Parse returned data + while($row = $result->fetch(PDO::FETCH_ASSOC)) { + + // check for an interger only + $idd_int = $row['idd']; if (!filter_var($idd_int, FILTER_VALIDATE_INT) === false) { +?> + + + + + + + + + +
viewtitlewebsitedate in
view
+
+
+ + +
+
+ \ No newline at end of file