diff --git a/.gitignore b/.gitignore index 4ebc070..7f41000 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,4 @@ _modules/* /results/ /phpunit*.xml +/public/.htaccess \ No newline at end of file diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 8220e7a..1bbe8e1 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -259,6 +259,8 @@ $routes->group('', ['filter' => 'cors'], function($routes) { // $routes->get('/api/getProductList', 'Api::getProductList'); $routes->get('/api/getProductAlias', 'Api::getProductAlias'); $routes->get('/api/getProductSites', 'Api::getProductSites'); +$routes->get('/api/getProvinces', 'Api::getProvinces'); +$routes->get('/api/getCities', 'Api::getCities'); //CLQMS // $routes->get('/clqms', 'Clqms::index'); // for CLQMS Inst select diff --git a/app/Controllers/Products.php b/app/Controllers/Products.php index 7e76757..7d1ebc8 100644 --- a/app/Controllers/Products.php +++ b/app/Controllers/Products.php @@ -82,8 +82,9 @@ class Products extends BaseController { $where = 0; $sql = "SELECT p.productid, p.installationdate, p.active, pc.productname, pc.productaliasid, p.productnumber, s.sitename, pt.producttypeid, pt.texts, - z.zonename as city, z2.zonename as prov + z.zonename as city, z2.zonename as prov, a1.accountname FROM products p + left join accounts a1 on a1.accountid=p.accountid_productowner left join productcatalog pc on pc.catalogid=p.catalogid left join producttype pt on pt.producttypeid=pc.producttypeid left join sites s on s.siteid=p.siteid @@ -189,6 +190,11 @@ class Products extends BaseController { $query = $db->query($sql); $results = $query->getResultArray(); $data['productservice'] = $results; + + $sql = "select * from accounts"; + $query = $db->query($sql); + $results = $query->getResultArray(); + $data['accounts'] = $results; $data['productowners'] = $this->data['productowners']; $data['productactives'] = $this->data['productactives']; @@ -211,6 +217,7 @@ class Products extends BaseController { 'installationdate' => ($this->request->getVar('installationdate') == '') ? NULL : $this->request->getVar('installationdate'), 'warrantystartdate' => ($this->request->getVar('warrantystartdate') == '') ? NULL : $this->request->getVar('warrantystartdate'), 'warrantyenddate' => ($this->request->getVar('warrantyenddate') == '') ? NULL : $this->request->getVar('warrantyenddate'), + 'accountid_productowner' => $this->request->getVar('accountid_productowner'), 'productowner' => $this->request->getVar('productowner'), 'active' => ($this->request->getVar('productactive') == '') ? NULL : $this->request->getVar('productactive'), 'productserviceid' => $this->request->getVar('productserviceid'), diff --git a/app/Models/AreasModel.php b/app/Models/AreasModel.php index 8165cbf..0bdbe96 100644 --- a/app/Models/AreasModel.php +++ b/app/Models/AreasModel.php @@ -1,8 +1,9 @@ - @@ -79,6 +81,23 @@ if(isset($data)) { +
+ +
+ +
+
+
diff --git a/app/Views/products_index.php b/app/Views/products_index.php index 202e90c..24f2680 100644 --- a/app/Views/products_index.php +++ b/app/Views/products_index.php @@ -102,7 +102,7 @@ if(!isset($sitename)) { $sitename=''; }
- + - + diff --git a/public/.htaccess b/public/.htaccess index abac3cb..48d81f9 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -15,6 +15,7 @@ Options -Indexes # change the following line to match the subfolder you need. # http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase # RewriteBase / + RewriteBase /crm/ # Redirect Trailing Slashes... RewriteCond %{REQUEST_FILENAME} !-d @@ -31,7 +32,7 @@ Options -Indexes # request to the front controller, index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA] + RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA] # Ensure Authorization header is passed along RewriteCond %{HTTP:Authorization} . diff --git a/public/htaccess b/public/htaccess new file mode 100644 index 0000000..abac3cb --- /dev/null +++ b/public/htaccess @@ -0,0 +1,49 @@ +# Disable directory browsing +Options -Indexes + +# ---------------------------------------------------------------------- +# Rewrite engine +# ---------------------------------------------------------------------- + +# Turning on the rewrite engine is necessary for the following rules and features. +# FollowSymLinks must be enabled for this to work. + + Options +FollowSymlinks + RewriteEngine On + + # If you installed CodeIgniter in a subfolder, you will need to + # change the following line to match the subfolder you need. + # http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase + # RewriteBase / + + # Redirect Trailing Slashes... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + + # Rewrite "www.example.com -> example.com" + RewriteCond %{HTTPS} !=on + RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] + + # Checks to see if the user is attempting to access a valid file, + # such as an image or css document, if this isn't true it sends the + # request to the front controller, index.php + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA] + + # Ensure Authorization header is passed along + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + + + # If we don't have mod_rewrite installed, all 404's + # can be sent to index.php, and everything works as normal. + ErrorDocument 404 index.php + + +# Disable server signature start +ServerSignature Off +# Disable server signature end
ID Site Province Kab/Kota Product Name Install Date Monthly Production ActionID Site (Owner) Province Kab/Kota Product Name Install Date Monthly Production Action

SN : $productnumber" ;} ?>