Skip to content

Commit

Permalink
0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
inoerp committed Nov 18, 2016
1 parent 0aabe50 commit 0d39c25
Show file tree
Hide file tree
Showing 25 changed files with 1,539 additions and 1,308 deletions.
2 changes: 1 addition & 1 deletion inoerp/engine/install/include/basics.inc
Expand Up @@ -27,7 +27,7 @@ defined('INC_INV') ? null : define('INC_INV', HOME_DIR . DS . 'modules' . DS . '


//load core objects
require_once(INC_BASICS . DS . 'settings' . DS . "dbsettings.inc");
require_once(INC_BASICS . DS . 'settings' . DS . "dbsettings.php");
defined('DB_SERVER') ? null : define("DB_SERVER", "");
defined('DB_USER') ? null : define("DB_USER", "");
defined('DB_PASS') ? null : define("DB_PASS", "");
Expand Down
58 changes: 29 additions & 29 deletions inoerp/engine/install/inoerp_prod.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inoerp/engine/install/install.php
Expand Up @@ -31,7 +31,7 @@
$dir_array = array('files');

// Files to check
$file1 = 'includes' . DS . 'basics' . DS . 'settings' . DS . 'dbsettings.inc';
$file1 = 'includes' . DS . 'basics' . DS . 'settings' . DS . 'dbsettings.php';
$file_array = array($file1);

//exit script in case of delete statement
Expand Down
2 changes: 1 addition & 1 deletion inoerp/engine/install/install_backup.php
Expand Up @@ -31,7 +31,7 @@
$dir_array = array('files');

// Files to check
$file1 = 'includes' . DS . 'basics' . DS . 'dbsettings.inc';
$file1 = 'includes' . DS . 'basics' . DS . 'dbsettings.php';
$file_array = array($file1);

//exit script in case of delete statement
Expand Down
2 changes: 1 addition & 1 deletion inoerp/engine/install/steps/start_install.php
Expand Up @@ -81,7 +81,7 @@
//verify if any existing data exists
$existing_tables = extn_view::count_all_tables();
if (empty($existing_tables->table_count)) {
$db_setting_file_path = HOME_DIR . DS . 'includes' . DS . 'basics' . DS . 'settings' . DS . 'dbsettings.inc';
$db_setting_file_path = HOME_DIR . DS . 'includes' . DS . 'basics' . DS . 'settings' . DS . 'dbsettings.php';
$db_setting_file = fopen($db_setting_file_path, "w");
$result = fwrite($db_setting_file, $dbsetting_file);
if ($result > 0) {
Expand Down
30 changes: 25 additions & 5 deletions inoerp/extensions/file/class_extn_file.inc
Expand Up @@ -349,24 +349,44 @@ class extn_file extends dbObject {
return $result;
}

public static function attachment_statement(&$file) {
public static function xxxattachment_statement(&$file) {

$attachment_statement = "<div id=\"existing_attachment_list\"><ul class='first_level'>";

if (!empty($file) && count($file) > 0) {
$attachment_statement .= '<li><ul class="second_level header"><li>Hide</li><li>Delete</li><li>File</li><li></li></ul></li>';
$attachment_statement .= '<li class="col-md-12"><ul class="second_level header"><li class="col-md-2 text-center">Hide File</li><li class="col-md-2 text-center">Delete File</li><li class="col-md-6">File Name</li></ul></li>';
foreach ($file as $records) {
$attachment_statement .= '<li><ul class="second_level">';
$attachment_statement .= '<li><input type="checkbox" class="hide_file" name="hide_file[]" value="' . $records->file_reference_id . '"></li>';
$attachment_statement .= '<li><input type="checkbox" class="delete_file" name="delete_file[]" value="' . $records->file_reference_id . '"></li>';
$attachment_statement .= '<li><a href=' . HOME_URL . $records->file_path . $records->file_name . '>' . $records->file_name . '</a></li>';
$attachment_statement .= '<li class="col-md-2"><input type="checkbox" class="hide_file checkbox pull-left" name="hide_file[]" value="' . $records->file_reference_id . '"></li>';
$attachment_statement .= '<li class="col-md-2"><input type="checkbox" class="delete_file checkbox pull-left" name="delete_file[]" value="' . $records->file_reference_id . '"></li>';
$attachment_statement .= '<li class="col-md-6"><a href=' . HOME_URL . $records->file_path . $records->file_name . '>' . $records->file_name . '</a></li>';
// $attachment_statement .= '<li class="remove_row_img"><img src="' . HOME_URL . 'themes/images/remove.png" alt="remove this file" /> </li>';
$attachment_statement .= '</ul></li>';
}
}
$attachment_statement .= "</ul></div>";
return $attachment_statement;
}

public static function attachment_statement(&$file) {

$attachment_statement = "<div id=\"existing_attachment_list\" class='col-md-12'><table class='table table-striped'>";

if (!empty($file) && count($file) > 0) {
$attachment_statement .= '<thead><tr><th class="col-md-1 text-center">Hide File</th><th class="col-md-1 text-center">Delete File</th><th class="col-md-8">File Name</th></tr></thead><tbody>';
foreach ($file as $records) {
$attachment_statement .= '<tr>';
$attachment_statement .= '<td><input type="checkbox" class="hide_file checkbox pull-left" name="hide_file[]" value="' . $records->file_reference_id . '"></td>';
$attachment_statement .= '<td><input type="checkbox" class="delete_file checkbox pull-left" name="delete_file[]" value="' . $records->file_reference_id . '"></td>';
$attachment_statement .= '<td><a href=' . HOME_URL . $records->file_path . $records->file_name . '>' . $records->file_name . '</a></td>';
// $attachment_statement .= '<li class="remove_row_img"><img src="' . HOME_URL . 'themes/images/remove.png" alt="remove this file" /> </li>';
$attachment_statement .= '</tr>';
}
$attachment_statement .= "</tbody>";
}
$attachment_statement .= "</table></div>";
return $attachment_statement;
}

public static function show_attachment_button() {
return '<input type="button" class="button" value="Attachements" id="attachment_button" name="">';
Expand Down
162 changes: 81 additions & 81 deletions inoerp/extensions/ino_user/dashboard/class_user_dashboard_v.inc
Expand Up @@ -21,40 +21,40 @@ class user_dashboard_v extends dbObject {
public static $module = "extensions";
public static $dont_show_bread_crum = true;
public static $system_info = [
'name' => 'User Dashboard',
'number' => '10027',
'description' => 'User Dashboard',
'version' => '0.1.1',
'db_version' => '1001',
'mod_version' => '1.1.1',
'primary_entity_cb' => '',
'module_name' => 'extn',
'weight' => 27
'name' => 'User Dashboard',
'number' => '10027',
'description' => 'User Dashboard',
'version' => '0.1.1',
'db_version' => '1001',
'mod_version' => '1.1.1',
'primary_entity_cb' => '',
'module_name' => 'extn',
'weight' => 27
];
public $field_a = [
'content_id',
'content_type_id',
'subject',
'created_by',
'creation_date',
'published_cb',
'user_id',
'username',
'first_name',
'last_name',
'major_category_id',
'major_category',
'category',
'content_type',
'content_id',
'content_type_id',
'subject',
'created_by',
'creation_date',
'published_cb',
'user_id',
'username',
'first_name',
'last_name',
'major_category_id',
'major_category',
'category',
'content_type',
];
public $initial_search = [
'item_number',
'item_number',
];
public $pageTitle = " User Dashboard "; //page Title
public $search_functions = [
'Organization' => 'search_org_name',
'Forecast ' => 'search_forecast_name',
'Forecast Group ' => 'search_forecast_group',
'Organization' => 'search_org_name',
'Forecast ' => 'search_forecast_name',
'Forecast Group ' => 'search_forecast_group',
];
public $content_id;
public $content_type_id;
Expand All @@ -74,35 +74,35 @@ class user_dashboard_v extends dbObject {
public $reference_table;
public $phone;
public static $icon_stmt_a = [
'inv' => ['div_class' => 'fa-bank', 'description' => 'Inventory'],
'sd' => ['div_class' => 'fa-truck', 'description' => 'Sales & Distribution'],
'pur' => ['div_class' => 'fa-file-text-o', 'description' => 'Purchasing'],
'bom' => ['div_class' => 'fa-sitemap', 'description' => 'Bills Of Material'],
'cst' => ['div_class' => 'fa-cubes', 'description' => 'Cost Management'],
'wip' => ['div_class' => 'fa-tasks', 'description' => 'WIP & MES'],
'pm' => ['div_class' => 'fa-flask', 'description' => 'Process'],
'fp' => ['div_class' => 'fa-th-large', 'description' => 'Forecast & Planning'],
'am' => ['div_class' => 'fa-wrench', 'description' => 'Asset Maintenance'],
'qa' => ['div_class' => 'fa-search', 'description' => 'Quality'],
'pos' => ['div_class' => 'fa-shopping-cart', 'description' => 'Point Of Sale'],
'ec' => ['div_class' => 'fa-globe', 'description' => 'eCommerce'],
'gl' => ['div_class' => 'fa-money', 'description' => 'General Ledger'],
'ap' => ['div_class' => 'fa-credit-card', 'description' => 'Payable'],
'ar' => ['div_class' => 'fa-dollar', 'description' => 'Receivable'],
'fa' => ['div_class' => 'fa-building', 'description' => 'Fixed Asset'],
'hr' => ['div_class' => 'fa-users', 'description' => 'Human Resource'],
'hd' => ['div_class' => 'fa-support', 'description' => 'Service Help Desk'],
'prj' => ['div_class' => 'fa-briefcase', 'description' => 'Projects'],
'da' => ['div_class' => 'fa-book', 'description' => 'Document & Analysis'],
'adm' => ['div_class' => 'fa-database', 'description' => 'Admin'],
'sys' => ['div_class' => 'fa-cogs', 'description' => 'Global Setup'],
'ext' => ['div_class' => 'fa-sliders', 'description' => 'Extensions'],
'inv' => ['div_class' => 'fa-bank', 'description' => 'Inventory'],
'sd' => ['div_class' => 'fa-truck', 'description' => 'Sales & Distribution'],
'pur' => ['div_class' => 'fa-file-text-o', 'description' => 'Purchasing'],
'bom' => ['div_class' => 'fa-sitemap', 'description' => 'Bills Of Material'],
'cst' => ['div_class' => 'fa-cubes', 'description' => 'Cost Management'],
'wip' => ['div_class' => 'fa-tasks', 'description' => 'WIP & MES'],
'pm' => ['div_class' => 'fa-flask', 'description' => 'Process'],
'fp' => ['div_class' => 'fa-th-large', 'description' => 'Forecast & Planning'],
'am' => ['div_class' => 'fa-wrench', 'description' => 'Asset Maintenance'],
'qa' => ['div_class' => 'fa-search', 'description' => 'Quality'],
'pos' => ['div_class' => 'fa-shopping-cart', 'description' => 'Point Of Sale'],
'ec' => ['div_class' => 'fa-globe', 'description' => 'eCommerce'],
'gl' => ['div_class' => 'fa-money', 'description' => 'General Ledger'],
'ap' => ['div_class' => 'fa-credit-card', 'description' => 'Payable'],
'ar' => ['div_class' => 'fa-dollar', 'description' => 'Receivable'],
'fa' => ['div_class' => 'fa-building', 'description' => 'Fixed Asset'],
'hr' => ['div_class' => 'fa-users', 'description' => 'Human Resource'],
'hd' => ['div_class' => 'fa-support', 'description' => 'Service Help Desk'],
'prj' => ['div_class' => 'fa-briefcase', 'description' => 'Projects'],
'lms' => ['div_class' => 'fa-graduation-cap', 'description' => 'Learning Management'],
'da' => ['div_class' => 'fa-book', 'description' => 'Document & Analysis'],
'adm' => ['div_class' => 'fa-database', 'description' => 'Admin'],
'sys' => ['div_class' => 'fa-cogs', 'description' => 'Global Setup'],
'ext' => ['div_class' => 'fa-sliders', 'description' => 'Extensions'],
];

public function user_contents() {

$sql = "
$sql = "
SELECT con.content_id, con.content_type_id, con.subject, con.created_by, con.creation_date, con.published_cb,
user.ino_user_id, user.username, user.first_name, user.phone,
user.last_name, cr.major_category_id, maj_cat.category as major_category,cat.category, ct.content_type
Expand All @@ -114,26 +114,26 @@ LEFT JOIN content_type ct ON ct.content_type_id = con.content_type_id
WHERE con.created_by = user.ino_user_id
";

if (!empty($this->user_id)) {
$sql .= " AND user.ino_user_id = '{$this->user_id}' ";
}
if (!empty($this->username)) {
$sql .= " AND user.username = '{$this->username}' ";
}
if (!empty($this->category)) {
$sql .= " AND cat.category = '{$this->category}' ";
}
if (!empty($this->category_id)) {
$sql .= " AND cat.category_id = '{$this->category_id}' ";
}
if (!empty($this->user_id)) {
$sql .= " AND user.ino_user_id = '{$this->user_id}' ";
}
if (!empty($this->username)) {
$sql .= " AND user.username = '{$this->username}' ";
}
if (!empty($this->category)) {
$sql .= " AND cat.category = '{$this->category}' ";
}
if (!empty($this->category_id)) {
$sql .= " AND cat.category_id = '{$this->category_id}' ";
}

$result = $this->findBySql($sql);
return !empty($result) ? $result : false;
$result = $this->findBySql($sql);
return !empty($result) ? $result : false;
}

public function user_comments() {

$sql = "
$sql = "
SELECT com.comment_id, com.reference_table, com.reference_id, com.comment ,com.published_cb, com.creation_date,
user.ino_user_id, user.username, user.first_name,
user.last_name, con.content_type_id
Expand All @@ -145,24 +145,24 @@ AND com.reference_table = 'content'
AND con.content_id = com.reference_id
";

if (!empty($this->user_id)) {
$sql .= " AND user.ino_user_id = '{$this->user_id}' ";
}
if (!empty($this->username)) {
$sql .= " AND user.username = '{$this->username}' ";
}
if (!empty($this->reference_table)) {
$sql .= " AND com.reference_table = '{$this->reference_table}' ";
}
if (!empty($this->user_id)) {
$sql .= " AND user.ino_user_id = '{$this->user_id}' ";
}
if (!empty($this->username)) {
$sql .= " AND user.username = '{$this->username}' ";
}
if (!empty($this->reference_table)) {
$sql .= " AND com.reference_table = '{$this->reference_table}' ";
}

$result = $this->findBySql($sql);
return !empty($result) ? $result : false;
$result = $this->findBySql($sql);
return !empty($result) ? $result : false;
}

public static function staticVar_init($staticvar) {
foreach (self::${$staticvar} as $key => $value) {
self::${$staticvar}[$key]['description'] = gettext($value['description']);
}
foreach (self::${$staticvar} as $key => $value) {
self::${$staticvar}[$key]['description'] = gettext($value['description']);
}
}

}
Expand Down

0 comments on commit 0d39c25

Please sign in to comment.