From 173aceda4a0dcad1fd1f6231861d46a844ba5c24 Mon Sep 17 00:00:00 2001 From: MCADelaTorre Date: Wed, 12 Feb 2014 09:52:48 -0800 Subject: [PATCH 1/2] Modified to accept and view PHP scripts and HTML tags as it is. And add some lines to avoid DB error on user meddling of the URL --- icsls/application/controllers/librarian.php | 40 +++++++-- icsls/application/models/librarian_model.php | 12 +-- .../application/views/edit_reference_view.php | 16 ++-- icsls/application/views/search_view.php | 14 +-- .../application/views/view_reference_view.php | 86 +++++++++++-------- 5 files changed, 103 insertions(+), 65 deletions(-) diff --git a/icsls/application/controllers/librarian.php b/icsls/application/controllers/librarian.php index f2a1152..844c548 100644 --- a/icsls/application/controllers/librarian.php +++ b/icsls/application/controllers/librarian.php @@ -58,7 +58,7 @@ public function display_search_results($query_id = 0, $offset = 0){ $query_array = array( 'category' => $this->input->get('selectCategory'), - 'text' => $this->input->get('inputText'), + 'text' => htmlspecialchars($this->input->get('inputText')), 'sortCategory' => $this->input->get('selectSortCategory'), 'row' => $this->input->get('selectRows'), 'accessType' => $this->input->get('selectAccessType'), @@ -67,6 +67,12 @@ public function display_search_results($query_id = 0, $offset = 0){ 'match' => $this->input->get('radioMatch') ); + //Do not continue if user tried to make the database retrieval fail by editing URL's GET + foreach($query_array as $element): + if($element === FALSE) + redirect('librarian/search_reference_index'); + endforeach; + $offset = $this->input->get('per_page') ? $this->input->get('per_page') : 0; $data['total_rows'] = $this->librarian_model->get_number_of_rows($query_array); @@ -99,8 +105,12 @@ public function display_search_results($query_id = 0, $offset = 0){ */ public function view_reference(){ $id = $this->uri->segment(3); - - $data['reference_material'] = $this->librarian_model->get_reference($id); + if($id === FALSE) + redirect('librarian'); + + $result = $this->librarian_model->get_reference($id); + $data['reference_material'] = $result->result(); + $data['number_of_reference'] = $result->num_rows(); $this->load->view('view_reference_view', $data); }//end of function view_reference @@ -116,7 +126,13 @@ public function view_reference(){ public function edit_reference_index(){ $data['title'] = 'Librarian Edit Reference - ICS Library System'; - $data['reference_material'] = $this->librarian_model->get_reference($this->uri->segment(3)); + if($this->uri->segment(3) === FALSE) + redirect('librarian'); + + $queryObj = $this->librarian_model->get_reference($this->uri->segment(3)); + + $data['reference_material'] = $queryObj->result(); + $data['number_of_reference'] = $queryObj->num_rows(); $this->load->view('edit_reference_view', $data); }//end of function edit_reference_index @@ -127,16 +143,22 @@ public function edit_reference_index(){ * @access public */ public function edit_reference(){ + $this->load->helper('text'); + $id = $this->uri->segment(3); - $title = mysql_real_escape_string(trim($this->input->post('title'))); - $author = $this->input->post('author'); + if($id === FALSE) + redirect('librarian'); + + //Filter the user's input of HTML special symbols + $title = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('title')))); + $author = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('author')))); $isbn = $this->input->post('isbn'); $category = $this->input->post('category'); - $publisher = mysql_real_escape_string(trim($this->input->post('publisher'))); + $publisher = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('publisher')))); $publication_year = $this->input->post('publication_year'); $access_type = $this->input->post('access_type'); $course_code = $this->input->post('course_code'); - $description = mysql_real_escape_string(trim($this->input->post('description'))); + $description = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('description')))); $total_stock = $this->input->post('total_stock'); //Store the input from user to be passed on the model @@ -155,7 +177,7 @@ public function edit_reference(){ ); $result = $this->librarian_model->edit_reference($query_array); - $this->load->view('success'); + redirect('librarian'); }//end of function edit_reference /* ******************** END OF EDIT REFERENCE MODULE ******************** */ diff --git a/icsls/application/models/librarian_model.php b/icsls/application/models/librarian_model.php index d0be0cf..705386f 100644 --- a/icsls/application/models/librarian_model.php +++ b/icsls/application/models/librarian_model.php @@ -24,6 +24,8 @@ function __construct(){ * @return int */ public function get_number_of_rows($query_array){ + $query_array['text'] = $query_array['text']; + //Match or Like if($query_array['match'] == 'like') $this->db->like($query_array['category'], $query_array['text']); @@ -146,12 +148,12 @@ function update_for_deletion($book_id){ //Changes 'For Deletion' attribute of th */ function add_data(){ $data = array( - 'TITLE' => $this->input->post('title'), - 'AUTHOR' => $this->input->post('author'), + 'TITLE' => htmlspecialchars(mysql_real_escape_string(trim($this->input->post('title')))), + 'AUTHOR' => htmlspecialchars(mysql_real_escape_string(trim($this->input->post('author')))), 'ISBN' => $this->input->post('isbn'), 'CATEGORY' => $this->input->post('category'), - 'DESCRIPTION' => $this->input->post('description'), - 'PUBLISHER' => $this->input->post('publisher'), + 'DESCRIPTION' => htmlspecialchars(mysql_real_escape_string(trim($this->input->post('description')))), + 'PUBLISHER' => htmlspecialchars(mysql_real_escape_string(trim($this->input->post('publisher')))), 'PUBLICATION_YEAR' => $this->input->post('year'), 'ACCESS_TYPE' => $this->input->post('access_type'), 'COURSE_CODE' => $this->input->post('course_code'), @@ -240,7 +242,7 @@ public function edit_reference($query_array){ */ public function get_reference($referenceId){ $this->db->where('id', $referenceId); - return $this->db->get('reference_material')->result(); + return $this->db->get('reference_material'); }//end of function get_reference }//end of Librarian_model diff --git a/icsls/application/views/edit_reference_view.php b/icsls/application/views/edit_reference_view.php index fc31969..47d5e67 100644 --- a/icsls/application/views/edit_reference_view.php +++ b/icsls/application/views/edit_reference_view.php @@ -1,22 +1,20 @@ - - - - Edit Reference +load->view('includes/header') ?> id; ?> - -

Edit Reference Form

required fields *

- *
+ *
*
@@ -31,7 +29,7 @@ *
-
+

@@ -42,7 +40,7 @@ *
-
+
*
diff --git a/icsls/application/views/search_view.php b/icsls/application/views/search_view.php index 69f5239..f756c1f 100644 --- a/icsls/application/views/search_view.php +++ b/icsls/application/views/search_view.php @@ -11,7 +11,7 @@ - '/> + '/>
Advanced Search
@@ -77,12 +77,12 @@
0){ ?> - - - + + +
pagination->create_links() ?>
- +
@@ -107,8 +107,8 @@ - - + + - + - - - + + + - - - + + + - - + + - +
course_code ?>id, $r->title) ?>author ?>id, $r->title)) ?>author) ?> category == 'B') diff --git a/icsls/application/views/view_reference_view.php b/icsls/application/views/view_reference_view.php index 1440f62..9c683ae 100644 --- a/icsls/application/views/view_reference_view.php +++ b/icsls/application/views/view_reference_view.php @@ -2,42 +2,58 @@

View Reference

id
"; - echo "Title = $row->title
"; - echo "Author = $row->author
"; - echo "ISBN = $row->isbn
"; - if($row->category=='B'){ - echo "Category = Book
"; - }else if($row->category=='M'){ - echo "Category = Magazine
"; - }else if($row->category=='T'){ - echo "Category = Thesis
"; - }else if($row->category=='S'){ - echo "Category = Special Problem
"; - }else if($row->category=='J'){ - echo "Category = Journal
"; - }else{ - echo "Category = CD/DVD
"; - } - - echo "Description = $row->description
"; - echo "Publisher = $row->publisher
"; - echo "Publication Year = $row->publication_year
"; - if($row->access_type=="S"){ - echo "Access Type = Student
"; - }else{ - echo "Access Type = Faculty
"; - } - echo "Course Code = $row->course_code
"; - echo "Total Available = $row->total_available
"; - echo "Total Stock = $row->total_stock
"; - echo "Times Borrowed = $row->times_borrowed
"; - echo "For Deletion = $row->for_deletion
"; - + echo "Id = $row->id"; ?> +
+ title; ?> +
+ author; ?> +
+ isbn"; ?> +
+ category == 'B'){ + echo "Category = Book"; + }else if($row->category == 'M'){ + echo "Category = Magazine"; + }else if($row->category == 'T'){ + echo "Category = Thesis"; + }else if($row->category == 'S'){ + echo "Category = Special Problem"; + }else if($row->category == 'J'){ + echo "Category = Journal"; + }else{ + echo "Category = CD/DVD"; } - ?> - id, 'Edit!') ?> + ?> +
+ description"; ?> +
+ publisher"; ?> +
+ publication_year"; ?> +
+ access_type=="S"){ + echo "Access Type = Student"; + }else{ + echo "Access Type = Faculty"; + } + ?> +
+ course_code"; ?> +
+ total_available"; ?> +
+ total_stock"; ?> +
+ times_borrowed"; ?> +
+ for_deletion"; ?> +
+ id, 'Edit!') ?> + + load->view('includes/footer'); ?> \ No newline at end of file From 45db86b22a6edbdd97047da1a9597689e1e0145d Mon Sep 17 00:00:00 2001 From: MCADelaTorre Date: Fri, 14 Feb 2014 10:30:15 -0800 Subject: [PATCH 2/2] Latest working. Improved security. --- icsls/application/.htaccess | 1 - icsls/application/controllers/librarian.php | 57 +++--- icsls/application/controllers/login.php | 4 +- icsls/application/helpers/MY_Helper.php | 19 ++ icsls/application/js/delete_script.js | 78 ++++++++ icsls/application/js/scripts.js | 18 ++ icsls/application/js/validate_script.js | 171 ++++++++++++++++++ icsls/application/libraries/MY_Input.php | 24 +++ icsls/application/models/librarian_model.php | 60 +++++- icsls/application/models/user_model.php | 1 - icsls/application/views/create_user_view.php | 52 ++++++ icsls/application/views/includes/footer.php | 1 + .../application/views/librarian_main_view.php | 1 + icsls/application/views/pdf_report_view.php | 32 ++++ .../views/report_generation_view.php | 12 ++ icsls/application/views/search_view.php | 59 +++--- .../application/views/uploadSuccess_view.php | 41 +++-- icsls/js/delete_script.js | 12 +- icsls/js/scripts.js | 9 +- icsls/uploads/Book1.csv | 3 + icsls/uploads/Book11.csv | 3 + icsls/uploads/Book110.csv | 2 + icsls/uploads/Book111.csv | 2 + icsls/uploads/Book112.csv | 2 + icsls/uploads/Book113.csv | 3 + icsls/uploads/Book114.csv | 2 + icsls/uploads/Book115.csv | 5 + icsls/uploads/Book116.csv | 5 + icsls/uploads/Book117.csv | 5 + icsls/uploads/Book118.csv | 5 + icsls/uploads/Book119.csv | 5 + icsls/uploads/Book12.csv | 3 + icsls/uploads/Book120.csv | 5 + icsls/uploads/Book121.csv | 5 + icsls/uploads/Book122.csv | 5 + icsls/uploads/Book123.csv | 5 + icsls/uploads/Book124.csv | 5 + icsls/uploads/Book125.csv | 5 + icsls/uploads/Book126.csv | 5 + icsls/uploads/Book127.csv | 5 + icsls/uploads/Book128.csv | 5 + icsls/uploads/Book129.csv | 5 + icsls/uploads/Book13.csv | 3 + icsls/uploads/Book130.csv | 5 + icsls/uploads/Book131.csv | 5 + icsls/uploads/Book132.csv | 5 + icsls/uploads/Book14.csv | 4 + icsls/uploads/Book15.csv | 3 + icsls/uploads/Book16.csv | 1 + icsls/uploads/Book17.csv | 2 + icsls/uploads/Book18.csv | 2 + icsls/uploads/Book19.csv | 2 + icsls/uploads/desktop.ini | 4 + 53 files changed, 687 insertions(+), 96 deletions(-) create mode 100644 icsls/application/helpers/MY_Helper.php create mode 100644 icsls/application/js/delete_script.js create mode 100644 icsls/application/js/scripts.js create mode 100644 icsls/application/js/validate_script.js create mode 100644 icsls/application/libraries/MY_Input.php create mode 100644 icsls/application/views/create_user_view.php create mode 100644 icsls/application/views/pdf_report_view.php create mode 100644 icsls/application/views/report_generation_view.php create mode 100644 icsls/uploads/Book1.csv create mode 100644 icsls/uploads/Book11.csv create mode 100644 icsls/uploads/Book110.csv create mode 100644 icsls/uploads/Book111.csv create mode 100644 icsls/uploads/Book112.csv create mode 100644 icsls/uploads/Book113.csv create mode 100644 icsls/uploads/Book114.csv create mode 100644 icsls/uploads/Book115.csv create mode 100644 icsls/uploads/Book116.csv create mode 100644 icsls/uploads/Book117.csv create mode 100644 icsls/uploads/Book118.csv create mode 100644 icsls/uploads/Book119.csv create mode 100644 icsls/uploads/Book12.csv create mode 100644 icsls/uploads/Book120.csv create mode 100644 icsls/uploads/Book121.csv create mode 100644 icsls/uploads/Book122.csv create mode 100644 icsls/uploads/Book123.csv create mode 100644 icsls/uploads/Book124.csv create mode 100644 icsls/uploads/Book125.csv create mode 100644 icsls/uploads/Book126.csv create mode 100644 icsls/uploads/Book127.csv create mode 100644 icsls/uploads/Book128.csv create mode 100644 icsls/uploads/Book129.csv create mode 100644 icsls/uploads/Book13.csv create mode 100644 icsls/uploads/Book130.csv create mode 100644 icsls/uploads/Book131.csv create mode 100644 icsls/uploads/Book132.csv create mode 100644 icsls/uploads/Book14.csv create mode 100644 icsls/uploads/Book15.csv create mode 100644 icsls/uploads/Book16.csv create mode 100644 icsls/uploads/Book17.csv create mode 100644 icsls/uploads/Book18.csv create mode 100644 icsls/uploads/Book19.csv create mode 100644 icsls/uploads/desktop.ini diff --git a/icsls/application/.htaccess b/icsls/application/.htaccess index 14249c5..e69de29 100644 --- a/icsls/application/.htaccess +++ b/icsls/application/.htaccess @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/icsls/application/controllers/librarian.php b/icsls/application/controllers/librarian.php index 98170d6..73aeb75 100644 --- a/icsls/application/controllers/librarian.php +++ b/icsls/application/controllers/librarian.php @@ -57,7 +57,7 @@ public function display_search_results($query_id = 0, $offset = 0){ $query_array = array( 'category' => $this->input->get('selectCategory'), - 'text' => htmlspecialchars($this->input->get('inputText')), + 'text' => htmlspecialchars($this->input->get('inputText'), ENT_QUOTES), 'sortCategory' => $this->input->get('selectSortCategory'), 'row' => $this->input->get('selectRows'), 'accessType' => $this->input->get('selectAccessType'), @@ -66,12 +66,14 @@ public function display_search_results($query_id = 0, $offset = 0){ 'match' => $this->input->get('radioMatch') ); - //Do not continue if user tried to make the database retrieval fail by editing URL's GET + //Do not continue if user tried to make the database retrieval fail by XSS Node deletion foreach($query_array as $element): if($element === FALSE) redirect('librarian/search_reference_index'); endforeach; + + $offset = $this->input->get('per_page') ? $this->input->get('per_page') : 0; $data['total_rows'] = $this->librarian_model->get_number_of_rows($query_array); @@ -151,14 +153,25 @@ public function edit_reference(){ //Filter the user's input of HTML special symbols $title = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('title')))); $author = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('author')))); - $isbn = $this->input->post('isbn'); - $category = $this->input->post('category'); + $isbn = htmlspecialchars(mysql_real_escape_string($this->input->post('isbn'))); + $category = htmlspecialchars(mysql_real_escape_string($this->input->post('category'))); $publisher = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('publisher')))); - $publication_year = $this->input->post('publication_year'); - $access_type = $this->input->post('access_type'); - $course_code = $this->input->post('course_code'); + $publication_year = htmlspecialchars(mysql_real_escape_string($this->input->post('publication_year'))); + $access_type = htmlspecialchars(mysql_real_escape_string($this->input->post('access_type'))); + $course_code = htmlspecialchars(mysql_real_escape_string($this->input->post('course_code'))); $description = htmlspecialchars(mysql_real_escape_string(trim($this->input->post('description')))); - $total_stock = $this->input->post('total_stock'); + $total_stock = htmlspecialchars(mysql_real_escape_string($this->input->post('total_stock'))); + + //DO NOT TRUST the user's input. Server-side input validation + if($total_stock <= 0) + redirect('librarian/edit_reference_index/' . $id); + if(! in_array(strtoupper($category), array('B', 'S', 'C', 'J', 'M', 'T'))) + redirect('librarian/edit_reference_index/' . $id); + if(! is_int(intval($publication_year))) + redirect('librarian/edit_reference_index/' . $id); + //if(preg_match("\A[A-Z]{2,3}\d{2,3}\z", $course_code) === FALSE) + // redirect('librarian/edit_reference_index/' . $id); + //Store the input from user to be passed on the model $query_array = array( @@ -176,28 +189,12 @@ public function edit_reference(){ ); $result = $this->librarian_model->edit_reference($query_array); - redirect('librarian'); + redirect('librarian/view_reference/' . $id); }//end of function edit_reference /* ******************** END OF EDIT REFERENCE MODULE ******************** */ /* ******************** DELETE REFERENCE MODULE ******************** */ - /* - public function delete_ready_reference(){ - if(!empty($_POST['chch'])): - if(count($_POST['chch'])>0): - $toDelete = $_POST['chch']; - - for($i=0;$i< count($toDelete);$i++){ - $result = $this->librarian_model->delete_references($toDelete[$i]); - } - - endif; - endif; - - redirect( base_url() . 'index.php/librarian','refresh'); - } - */ /** * Delete selected references specified by its respective checkbox @@ -208,8 +205,8 @@ public function delete_reference(){ $data['title'] = 'Delete Reference'; $cannotBeDeleted = array(); - if(!empty($_POST['ch'])){ - if(count($_POST['ch'])>0): + if(! empty($_POST['ch'])){ + if(count($_POST['ch']) > 0): $toDelete = $_POST['ch']; for($i = 0; $i < count($toDelete); $i++){ @@ -220,7 +217,7 @@ public function delete_reference(){ endif; } - if(count($cannotBeDeleted)>0){ + if(count($cannotBeDeleted) > 0){ $data['forDeletion'] = $this->librarian_model->get_selected_books($cannotBeDeleted); $this->load->view('for_deletion_view',$data); } @@ -235,7 +232,7 @@ public function delete_reference(){ public function change_forDeletion(){ $data['title'] = 'Delete Reference'; - if(!empty($_POST['ch'])): + if(! empty($_POST['ch'])): $toUpdate = $_POST['ch']; for($i = 0; $i < count($toUpdate); $i++){ $this->librarian_model->update_for_deletion($toUpdate[$i]); @@ -304,7 +301,7 @@ public function file_upload(){ } else{ $uploadData = array('upload_data' => $this->upload->data()); - $filename='./uploads/'.$uploadData['upload_data']['file_name']; + $filename='./uploads/' . $uploadData['upload_data']['file_name']; $this->load->library('csvreader'); $data['csvData'] = $this->csvreader->parse_file($filename); $this->load->view("uploadSuccess_view", $data); diff --git a/icsls/application/controllers/login.php b/icsls/application/controllers/login.php index 9b74d38..c6c3619 100644 --- a/icsls/application/controllers/login.php +++ b/icsls/application/controllers/login.php @@ -12,8 +12,8 @@ public function index(){ $password = ""; } else{ - $username = $_POST["username"]; - $password = md5($_POST["password"]); + $username = $_POST['username'];//mysql_real_escape_string($_POST["username"]); + $password = md5($_POST['password']);//mysql_real_escape_string(md5($_POST["password"])); } //Checks if the user is registered diff --git a/icsls/application/helpers/MY_Helper.php b/icsls/application/helpers/MY_Helper.php new file mode 100644 index 0000000..dbc6a8f --- /dev/null +++ b/icsls/application/helpers/MY_Helper.php @@ -0,0 +1,19 @@ +set_value($field, $default), $field); +} \ No newline at end of file diff --git a/icsls/application/js/delete_script.js b/icsls/application/js/delete_script.js new file mode 100644 index 0000000..72b5f32 --- /dev/null +++ b/icsls/application/js/delete_script.js @@ -0,0 +1,78 @@ +//Confirm to Delete the selected books +function confirmDelete(){ + var noOfBooksToDelete = $('#booktable').find("input:checkbox:checked").length; + if(noOfBooksToDelete > 0){ + var option= confirm("Are you Sure?"); + if(option==true){ + alert(noOfBooksToDelete+" Book"+((noOfBooksToDelete>1)?'s':'')+" Selected."); + }else{ + return false; + } + }else{ + alert("No books selected."); + return false; + } + } + +//Confirm To Delete Ready for Deletion Books +function confirmDeleteReady(){ + var noOfBooksToDelete = $('#readytodeletetable').find("input:checkbox:checked").length; + if(noOfBooksToDelete > 0){ + var option= confirm("Are you Sure?"); + if(option==true){ + alert(noOfBooksToDelete+" Book"+((noOfBooksToDelete>1)?'s':'')+" Selected."); + }else{ + return false; + } + }else{ + alert("No books selected."); + return false; + } + } + +//Confirm to change the ForDeletion +function confirmChangeForDeletion(){ + var noOfBooksToDelete = $('#booktable').find("input:checkbox:checked").length; + if(noOfBooksToDelete > 0){ + var option= confirm("Are you Sure?"); + if(option==true){ + alert(noOfBooksToDelete+" Book"+((noOfBooksToDelete>1)?'s':'')+" Selected."); + }else{ + return false; + } + }else{ + alert("No books selected."); + } + } + +//Mark All checkboxes when choosing +$('#markAll').click(function (){ + var buttonText = $('#markAll').text(); + if(buttonText === 'Mark All'){ + $('#booktable').find('input[name="ch[]"]').each(function(){ + $(this).prop('checked', true); + }); + $('#markAll').text('UnMark All'); + } + else if(buttonText === 'UnMark All'){ + $('#booktable').find('input[name="ch[]"]').each(function(){ + $(this).prop('checked', false); + }); + $('#markAll').text('Mark All'); + } +}); +$('#markAlla').click(function (){ + var buttonText = $('#markAlla').text(); + if(buttonText === 'Mark All'){ + $('#readytodeletetable').find('input[name="chch[]"]').each(function(){ + $(this).prop('checked', true); + }); + $('#markAlla').text('UnMark All'); + } + else if(buttonText === 'UnMark All'){ + $('#readytodeletetable').find('input[name="chch[]"]').each(function(){ + $(this).prop('checked', false); + }); + $('#markAlla').text('Mark All'); + } +}); \ No newline at end of file diff --git a/icsls/application/js/scripts.js b/icsls/application/js/scripts.js new file mode 100644 index 0000000..7357071 --- /dev/null +++ b/icsls/application/js/scripts.js @@ -0,0 +1,18 @@ +function changeUserSearchTextCriteria(){ + var category = document.getElementById("category").value; + var input = document.getElementById("search_text"); + + if(category == "username"){ + input.title = "Must be 4-30 characters."; + input.pattern = "[a-z]{1,1}[a-z0-9_]{3,29}"; + }else if(category == "student_number"){ + input.title = "Must be 10 characters."; + input.pattern = "[0-9]{4}-[0-9]{5}"; + }else if(category == "employee_number"){ + input.title = "Must be 9 characters."; + input.pattern = "[0-9]{9,9}"; + }else if(category == "first_name" || category == "last_name"){ + input.title = 'Must be 2-30 characters.'; + input.pattern='[A-Za-z]{2,30}' + } +} \ No newline at end of file diff --git a/icsls/application/js/validate_script.js b/icsls/application/js/validate_script.js new file mode 100644 index 0000000..2f81dd3 --- /dev/null +++ b/icsls/application/js/validate_script.js @@ -0,0 +1,171 @@ + /* + The following codes are javascript validations + */ + + /* Title : + * Required field + * Any characters(symbols & alphanumeric characters) + * Must have at least one Alphanumeric characters + */ + function validate_title(){ + var title = edit_form.title.value; + var error = ""; + + if(title==""){ + error = "Title is required"; + alert(error); + document.getElementById('title').focus(); + }else if(!title.match(/^.*[A-Za-z0-9]{1,}.*$/)){ + error = "Must have atleast one alphanumeric character."; + alert(error); + document.getElementById('title').focus(); + } + + if(error=="") return true; + } + + /* Author : + * Required field + * Alphabets, spaces, periods, and commas only + * Must start with an alphabet + */ + + + function validate_author(){ + var author = edit_form.author.value; + var error = ""; + + if(author==""){ + error = "Author is required"; + alert(error); + document.getElementById('author').focus(); + }else if(!author.match(/^[a-zA-Z\ ][a-zA-Z\ \.\,]*$/)){ + error = "Alphabet, periods and commas only. Must start with an alphabet."; + alert(error); + document.getElementById('author').focus(); + } + if(error=="") return true; + } + + + /* ISBN : + * Numbers and hypens only + * Must start and end with a number + * Length must be 13 characters + */ + + function validate_isbn(){ + var isbn = edit_form.isbn.value; + var error = ""; + + if(isbn==""){ + return true; + }else if(!isbn.match(/^[0-9][0-9\-]{11}[0-9]$/)){ + error = "Numbers and hypens only. Must start and end with a number. Length must be 13 characters."; + alert(error); + document.getElementById('isbn').focus(); + } + if(error=="") return true; + } + + /* Publisher : + * Any characters(symbols & alphanumeric characters) + * Must have at least one Alphanumeric characters + */ + + function validate_publisher(){ + var publisher = edit_form.publisher.value; + var error = ""; + + if(publisher==""){ + return true; + }else if(!publisher.match(/^.*[A-Za-z0-9]{1,}.*$/)){ + error = "Must have atleast one alphanumeric character."; + alert(error); + document.getElementById('publisher').focus(); + } + + if(error=="") return true; + } + + /* Publication year : + * Numbers only + * Year format : xxxx + * Length: 4 + */ + + function validate_publication_year(){ + var publication_year = edit_form.publication_year.value; + var error = ""; + + if(publication_year==""){ + return true; + }else if(!publication_year.match(/^[0-9][0-9][0-9][0-9]$/)){ + error = "Four numbers only. Year Format: xxxx"; + alert(error); + document.getElementById('publication_year').focus(); + } + + if(error=="") return true; + } + + /* Course code : + * Required field + * Uppercase letters and numbers only + * Max length: 6 + */ + function validate_course_code(){ + var course_code = edit_form.course_code.value; + var error = ""; + + if(course_code==""){ + error = "Course code is required"; + alert(error); + document.getElementById('course_code').focus(); + }else if(!course_code.match(/^[A-Z][A-Z0-9]{0,4}[0-9]$/)){ + error = "Uppercase letters and numbers only. Max length is six characters."; + alert(error); + document.getElementById('course_code').focus(); + } + + if(error=="") return true; + } + + /* Description : + * Any characters(symbols & alphanumeric characters) + * Must have at least one Alphanumeric characters + */ + + + function validate_description(){ + var description = edit_form.description.value; + var error = ""; + + if(description==""){ + return true; + }else if(!description.match(/^.*[A-Za-z0-9]{1,}.*$/)){ + error = "Must have atleast one alphanumeric character."; + alert(error); + document.getElementById('description').focus(); + } + if(error=="") return true; + } + + /* Total stock : + * Must be greater or equal to total available + */ + + function validate_total_stock(){ + var total_stock = document.getElementById('total_stock'); + var error = ""; + var total_available = document.getElementById('total_available'); + + if(parseInt(total_stock.value) < parseInt(total_available.value)){ + error = "Total stock can't be less than the total available."; + alert(error); + total_stock.value = parseInt(total_stock.value) + 1; + }else{ + return true; + } + + } \ No newline at end of file diff --git a/icsls/application/libraries/MY_Input.php b/icsls/application/libraries/MY_Input.php new file mode 100644 index 0000000..3b13a9c --- /dev/null +++ b/icsls/application/libraries/MY_Input.php @@ -0,0 +1,24 @@ +db->insert('query_string', array('query_string' => http_build_query($query_array))); + + return $CI->db->insert_id(); + } + + function load_query($query_id) { + + $CI =& get_instance(); + + $rows = $CI->db->get_where('query_string', array('id' => $query_id))->result(); + if (isset($rows[0])) { + parse_str($rows[0]->query_string, $_GET); + } + + } + +} diff --git a/icsls/application/models/librarian_model.php b/icsls/application/models/librarian_model.php index 705386f..020042b 100644 --- a/icsls/application/models/librarian_model.php +++ b/icsls/application/models/librarian_model.php @@ -24,13 +24,23 @@ function __construct(){ * @return int */ public function get_number_of_rows($query_array){ - $query_array['text'] = $query_array['text']; + $categoryArray = array('title', 'author', 'isbn', 'course_code', 'publisher'); + $sortCategoryArray = array('title', 'author', 'category', 'course_code', 'times_borrowed', 'total_stock'); + if(! in_array($query_array['category'], $categoryArray)) + redirect('librarian/search_reference_index'); + if(! in_array($query_array['sortCategory'], $sortCategoryArray)) + redirect('librarian/search_reference_index'); + + if($query_array['text'] == '') + redirect('librarian/search_reference_index'); //Match or Like if($query_array['match'] == 'like') $this->db->like($query_array['category'], $query_array['text']); elseif($query_array['match'] == 'match') $this->db->where($query_array['category'], $query_array['text']); + else + redirect('librarian/search_reference_index'); //Display references ONLY for a specific type of people if($query_array['accessType'] != 'N') @@ -53,6 +63,17 @@ public function get_number_of_rows($query_array){ * @return object */ public function get_search_reference($query_array, $start){ + $categoryArray = array('title', 'author', 'isbn', 'course_code', 'publisher'); + $sortCategoryArray = array('title', 'author', 'category', 'course_code', 'times_borrowed', 'total_stock'); + if(! in_array($query_array['category'], $categoryArray)) + redirect('librarian/search_reference_index'); + if(! in_array($query_array['sortCategory'], $sortCategoryArray)) + redirect('librarian/search_reference_index'); + + + if($query_array['text'] == '') + redirect('librarian/search_reference_index'); + //Match or Like if($query_array['match'] == 'like') $this->db->like($query_array['category'], $query_array['text']); @@ -160,8 +181,10 @@ function add_data(){ 'TOTAL_AVAILABLE' => $this->input->post('total_stock'), 'TOTAL_STOCK' => $this->input->post('total_stock'), 'TIMES_BORROWED' => '0', - 'FOR_DELETION' => 'F' + 'FOR_DELETION' => 'F' ); + + $this->db->insert('REFERENCE_MATERIAL', $data); @@ -245,6 +268,39 @@ public function get_reference($referenceId){ return $this->db->get('reference_material'); }//end of function get_reference + /** + * Function gets the exact transactions based from type of report (Daily, Weekly or Monthly) + * @param $type (string) + * @return rows from db || null + */ + public function get_data($type){ + $day = date('D'); + + /*returns rows of data from selected columns of the transaction log based on current date*/ + if (strcmp($type,'daily') == 0) {//reference_material_id, borrower_id, date_waitlisted, date_reserved, date_borrowed, date_returned + return $this->db->query("SELECT * FROM transactions WHERE date_borrowed LIKE CURDATE()"); + } + /*returns rows of data from selected columns of the transasction log based on the whole week + * can only be accessed on Fridays + */ + else if (strcmp($type,'weekly')==0 && $day=='Fri') {//reference_material_id, borrower_id, date_waitlisted, date_reserved, date_borrowed, date_returned + return $this->db->query("Select * from transactions where DATE_SUB(CURDATE(), INTERVAL 4 DAY)<=date_borrowed"); + } + /*returns rows of data from selected columns of the transaction log based on the whole month*/ + else if (strcmp($type,'monthly')==0) {//reference_material_id, borrower_id, date_waitlisted, date_reserved, date_borrowed, date_returned + return $this->db->query("Select * from transactions where MONTHNAME(date_borrowed) like MONTHNAME(CURDATE())"); + } + } + + + /** + * Function gets the most borrowed reference material + * @return rows from db || null + */ + public function get_popular(){ + return $this->db->query("select * from reference_material where times_borrowed = (select max(times_borrowed) from reference_material)"); + } + }//end of Librarian_model ?> \ No newline at end of file diff --git a/icsls/application/models/user_model.php b/icsls/application/models/user_model.php index 4fb31af..d3bcdb0 100644 --- a/icsls/application/models/user_model.php +++ b/icsls/application/models/user_model.php @@ -10,7 +10,6 @@ class User_model extends CI_Model{ */ public function user_exists($username, $password){ $userCount = $this->db->query("SELECT * FROM users WHERE username='$username' AND password='$password'")->num_rows(); - return ($userCount == 1 ? true : false); } diff --git a/icsls/application/views/create_user_view.php b/icsls/application/views/create_user_view.php new file mode 100644 index 0000000..4f3dac0 --- /dev/null +++ b/icsls/application/views/create_user_view.php @@ -0,0 +1,52 @@ + + + + <?= $title ?> + + + +

Account added

+ + + ' method = "POST"> + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ + + + \ No newline at end of file diff --git a/icsls/application/views/includes/footer.php b/icsls/application/views/includes/footer.php index 0b9f04e..9b1b7cb 100644 --- a/icsls/application/views/includes/footer.php +++ b/icsls/application/views/includes/footer.php @@ -3,4 +3,5 @@ + \ No newline at end of file diff --git a/icsls/application/views/librarian_main_view.php b/icsls/application/views/librarian_main_view.php index b7cc3c6..486a345 100644 --- a/icsls/application/views/librarian_main_view.php +++ b/icsls/application/views/librarian_main_view.php @@ -1,4 +1,5 @@ load->view('includes/header'); ?> + load->view('includes/footer'); ?> \ No newline at end of file diff --git a/icsls/application/views/pdf_report_view.php b/icsls/application/views/pdf_report_view.php new file mode 100644 index 0000000..d948312 --- /dev/null +++ b/icsls/application/views/pdf_report_view.php @@ -0,0 +1,32 @@ +SetTitle($title); + + //column headers + $header = array('Ref. ID', 'Borrower ID', 'Date Waitlisted', 'Date Reserved', 'Date Borrowed', 'Date Returned'); + $pdf->AddPage(); + $pdf->SetFont('Arial','',12); + + // insert header to table + foreach($header as $col){ + $pdf->Cell(30,7,$col,1); + } + $pdf->Ln(); + + // insert data to table + foreach($result as $row){ + foreach($row as $col) + $pdf->Cell(30,6,$col,1); + $pdf->Ln(); + } + + $pdf->SetFont('Arial','',10); + foreach($mostBorrowed as $row){ + $pdf->Cell(0,50,"Most Borrowed: ".$row->title.'. Times borrowed: '.$row->times_borrowed.'. Course code: '.strtoupper($row->course_code),0,1); + } + $pdf->Output(); + +?> + diff --git a/icsls/application/views/report_generation_view.php b/icsls/application/views/report_generation_view.php new file mode 100644 index 0000000..e9d31df --- /dev/null +++ b/icsls/application/views/report_generation_view.php @@ -0,0 +1,12 @@ + +load->view("includes/header")?> + + + + + +load->view("includes/footer")?> \ No newline at end of file diff --git a/icsls/application/views/search_view.php b/icsls/application/views/search_view.php index 7912e97..36a1440 100644 --- a/icsls/application/views/search_view.php +++ b/icsls/application/views/search_view.php @@ -4,11 +4,11 @@
'/> @@ -16,27 +16,27 @@ Advanced Search
- + input->get('radioMatch') != 'match') ? "checked" : ""; ?> />
- + input->get('radioMatch') == 'match') ? "checked" : ""; ?> />


@@ -44,43 +44,36 @@



- - -
0){ ?> -<<<<<<< HEAD - -======= ->>>>>>> 9934ee8f1a6f269b5c4e7f9753e83ffa514e95c8
@@ -157,4 +150,4 @@ -load->view('includes/footer') ?> +load->view('includes/footer') ?> \ No newline at end of file diff --git a/icsls/application/views/uploadSuccess_view.php b/icsls/application/views/uploadSuccess_view.php index b40177e..ce60b13 100644 --- a/icsls/application/views/uploadSuccess_view.php +++ b/icsls/application/views/uploadSuccess_view.php @@ -14,36 +14,37 @@
COURSE CODE TOTAL STOCK
- + + + + + + - + +
diff --git a/icsls/js/delete_script.js b/icsls/js/delete_script.js index 7b54ae1..609a89b 100644 --- a/icsls/js/delete_script.js +++ b/icsls/js/delete_script.js @@ -1,6 +1,6 @@ //Confirm to Delete the selected books function confirmDelete(){ - var noOfBooksToDelete = $('#booktable').find("input:checkbox:checked").length; + var noOfBooksToDelete = $('input[name = "ch[]"]:checked').length; alert(noOfBooksToDelete); if(noOfBooksToDelete > 0){ var option = confirm("Are you Sure?"); @@ -37,9 +37,9 @@ function confirmDeleteReady(){ function confirmChangeForDeletion(){ var noOfBooksToDelete = $('#booktable').find("input:checkbox:checked").length; if(noOfBooksToDelete > 0){ - var option= confirm("Are you Sure?"); - if(option==true){ - alert(noOfBooksToDelete+" Book"+((noOfBooksToDelete>1)?'s':'')+" Selected."); + var option = confirm("Are you Sure?"); + if(option == true){ + alert(noOfBooksToDelete + " Book" + ((noOfBooksToDelete > 1) ? 's' : '') + " Selected."); }else{ return false; } @@ -52,13 +52,13 @@ function confirmChangeForDeletion(){ $('#markAll').click(function (){ var buttonText = $('#markAll').text(); if(buttonText === 'Mark All'){ - $('#booktable').find('input[name="ch[]"]').each(function(){ + $('input[name="ch[]"]').each(function(){ $(this).prop('checked', true); }); $('#markAll').text('Unmark All'); } else if(buttonText === 'Unmark All'){ - $('#booktable').find('input[name="ch[]"]').each(function(){ + $('input[name="ch[]"]').each(function(){ $(this).prop('checked', false); }); $('#markAll').text('Mark All'); diff --git a/icsls/js/scripts.js b/icsls/js/scripts.js index 2f81dd3..774b805 100644 --- a/icsls/js/scripts.js +++ b/icsls/js/scripts.js @@ -168,4 +168,11 @@ return true; } - } \ No newline at end of file + } + + /* + * Instantiates the select tags with the user's input before redirect + * + * + */ + \ No newline at end of file diff --git a/icsls/uploads/Book1.csv b/icsls/uploads/Book1.csv new file mode 100644 index 0000000..421190b --- /dev/null +++ b/icsls/uploads/Book1.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang libro,Si manunulat,123233444,Book,libro talaga to,Pub,1997,Student,123,3,3,0,F +Book1,Author1,,Book,,,,Faculty,5545,2,2,0, diff --git a/icsls/uploads/Book11.csv b/icsls/uploads/Book11.csv new file mode 100644 index 0000000..421190b --- /dev/null +++ b/icsls/uploads/Book11.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang libro,Si manunulat,123233444,Book,libro talaga to,Pub,1997,Student,123,3,3,0,F +Book1,Author1,,Book,,,,Faculty,5545,2,2,0, diff --git a/icsls/uploads/Book110.csv b/icsls/uploads/Book110.csv new file mode 100644 index 0000000..26e922b --- /dev/null +++ b/icsls/uploads/Book110.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,QWERTY,,,,S,LOL314,2,2,0,F diff --git a/icsls/uploads/Book111.csv b/icsls/uploads/Book111.csv new file mode 100644 index 0000000..325f53b --- /dev/null +++ b/icsls/uploads/Book111.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,J,,,,S,LOL314,2,2,0,T diff --git a/icsls/uploads/Book112.csv b/icsls/uploads/Book112.csv new file mode 100644 index 0000000..7bf2fdb --- /dev/null +++ b/icsls/uploads/Book112.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,B,,,,S,LOL314,2,2,0,F diff --git a/icsls/uploads/Book113.csv b/icsls/uploads/Book113.csv new file mode 100644 index 0000000..cb8237c --- /dev/null +++ b/icsls/uploads/Book113.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang magasin,Si manunulat,123233444,Magazine,journal talaga ito,Pub,1997,Student,123,3,3,0,F +Journal,Author1,,Journal,,,,Faculty,5545,0,2,0,T diff --git a/icsls/uploads/Book114.csv b/icsls/uploads/Book114.csv new file mode 100644 index 0000000..834db08 --- /dev/null +++ b/icsls/uploads/Book114.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang hindi malaman uri ng literatura,Aliens,123233444,Yippee,ajejeje,Pub,1997,Student,123,0,3,2,T diff --git a/icsls/uploads/Book115.csv b/icsls/uploads/Book115.csv new file mode 100644 index 0000000..8987140 --- /dev/null +++ b/icsls/uploads/Book115.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my thesis,MC,,T,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my journal,MC,,J,OH MY!,YAY!,,Faculty,CS200,5,1,,F +oh my CD,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +oh my book,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book116.csv b/icsls/uploads/Book116.csv new file mode 100644 index 0000000..75d43f6 --- /dev/null +++ b/icsls/uploads/Book116.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,M,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book117.csv b/icsls/uploads/Book117.csv new file mode 100644 index 0000000..75d43f6 --- /dev/null +++ b/icsls/uploads/Book117.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,M,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book118.csv b/icsls/uploads/Book118.csv new file mode 100644 index 0000000..75d43f6 --- /dev/null +++ b/icsls/uploads/Book118.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,M,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book119.csv b/icsls/uploads/Book119.csv new file mode 100644 index 0000000..75d43f6 --- /dev/null +++ b/icsls/uploads/Book119.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,M,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book12.csv b/icsls/uploads/Book12.csv new file mode 100644 index 0000000..421190b --- /dev/null +++ b/icsls/uploads/Book12.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang libro,Si manunulat,123233444,Book,libro talaga to,Pub,1997,Student,123,3,3,0,F +Book1,Author1,,Book,,,,Faculty,5545,2,2,0, diff --git a/icsls/uploads/Book120.csv b/icsls/uploads/Book120.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book120.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book121.csv b/icsls/uploads/Book121.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book121.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book122.csv b/icsls/uploads/Book122.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book122.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book123.csv b/icsls/uploads/Book123.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book123.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book124.csv b/icsls/uploads/Book124.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book124.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book125.csv b/icsls/uploads/Book125.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book125.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book126.csv b/icsls/uploads/Book126.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book126.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book127.csv b/icsls/uploads/Book127.csv new file mode 100644 index 0000000..bc94a6d --- /dev/null +++ b/icsls/uploads/Book127.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,Student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,Faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,Student,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,Faculty,CS200,1,2,, diff --git a/icsls/uploads/Book128.csv b/icsls/uploads/Book128.csv new file mode 100644 index 0000000..87c0d70 --- /dev/null +++ b/icsls/uploads/Book128.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,STUDENT,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,FACULTY,CS200,1,2,, diff --git a/icsls/uploads/Book129.csv b/icsls/uploads/Book129.csv new file mode 100644 index 0000000..87c0d70 --- /dev/null +++ b/icsls/uploads/Book129.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,STUDENT,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,FACULTY,CS200,1,2,, diff --git a/icsls/uploads/Book13.csv b/icsls/uploads/Book13.csv new file mode 100644 index 0000000..421190b --- /dev/null +++ b/icsls/uploads/Book13.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Ito ay isang libro,Si manunulat,123233444,Book,libro talaga to,Pub,1997,Student,123,3,3,0,F +Book1,Author1,,Book,,,,Faculty,5545,2,2,0, diff --git a/icsls/uploads/Book130.csv b/icsls/uploads/Book130.csv new file mode 100644 index 0000000..87c0d70 --- /dev/null +++ b/icsls/uploads/Book130.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,STUDENT,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,FACULTY,CS200,1,2,, diff --git a/icsls/uploads/Book131.csv b/icsls/uploads/Book131.csv new file mode 100644 index 0000000..87c0d70 --- /dev/null +++ b/icsls/uploads/Book131.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,,faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,STUDENT,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,FACULTY,CS200,1,2,, diff --git a/icsls/uploads/Book132.csv b/icsls/uploads/Book132.csv new file mode 100644 index 0000000..c2c54e1 --- /dev/null +++ b/icsls/uploads/Book132.csv @@ -0,0 +1,5 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +oh my special problem,MC,,S,OH MY!,Pub,,student,CS200,-2,-2,0,F +oh my magazine,MC,,Masd,OH MY!,YAY!,2512,faculty,CS200,5,1,,F +test1,MC,,C,OH MY!,WEW,,STUDENT,CS200,1,1,, +test2,MC,,B,OH MY!,LOL,,FACULTY,CS200,1,2,, diff --git a/icsls/uploads/Book14.csv b/icsls/uploads/Book14.csv new file mode 100644 index 0000000..79a00f0 --- /dev/null +++ b/icsls/uploads/Book14.csv @@ -0,0 +1,4 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +If I Stay,Gayle Forman,,Book,,,,S,NVL003,1,1,0,F +thesis,him,,Thesis,,,,S,TSS121,5,2,,A +yun oh,ajejeje,,C,,,,F,ASC213,-3,1,1,T diff --git a/icsls/uploads/Book15.csv b/icsls/uploads/Book15.csv new file mode 100644 index 0000000..6b192d9 --- /dev/null +++ b/icsls/uploads/Book15.csv @@ -0,0 +1,3 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +,Gayle Forman,,Book,,,,S,NVL003,1,0,0,TRUE +thesis,,,Thesis,,,,Faculty,TSS121,0,2,,A diff --git a/icsls/uploads/Book16.csv b/icsls/uploads/Book16.csv new file mode 100644 index 0000000..a587036 --- /dev/null +++ b/icsls/uploads/Book16.csv @@ -0,0 +1 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION diff --git a/icsls/uploads/Book17.csv b/icsls/uploads/Book17.csv new file mode 100644 index 0000000..4bc51b2 --- /dev/null +++ b/icsls/uploads/Book17.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,QWERTY,,,,Estudyante,LOL314,1,2,241,T diff --git a/icsls/uploads/Book18.csv b/icsls/uploads/Book18.csv new file mode 100644 index 0000000..4bc51b2 --- /dev/null +++ b/icsls/uploads/Book18.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,QWERTY,,,,Estudyante,LOL314,1,2,241,T diff --git a/icsls/uploads/Book19.csv b/icsls/uploads/Book19.csv new file mode 100644 index 0000000..f60135a --- /dev/null +++ b/icsls/uploads/Book19.csv @@ -0,0 +1,2 @@ +TITLE,AUTHOR,ISBN,CATEGORY,DESCRIPTION,PUBLISHER,PUBLICATION_YEAR,ACCESS_TYPE,COURSE_CODE,TOTAL_AVAILABLE,TOTAL_STOCK,TIMES_BORROWED,FOR DELETION +Introduction to something something programming,Someone out there,,QWERTY,,,,Estudyante,LOL314,1,2,1,F diff --git a/icsls/uploads/desktop.ini b/icsls/uploads/desktop.ini new file mode 100644 index 0000000..d957fd1 --- /dev/null +++ b/icsls/uploads/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=Generic